"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4190],{NJlO: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 i=a("q1tI"),n=a("Frvz"),r=a("daqB"),l=a("/npG"),o=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),p=a("Wgwc"),m=a.n(p),u=a("QgiU"),g=a.n(u),h=a("L+vc"),v=a("Efqo"),b=a("+4U8"),x=a("wDwK"),f=a("HJpP"),E=a("bgUz"),w=a("1N+i"),y=a("Y5X8"),k=a("Xfk/"),C=a("+6Eu"),N=a("oZWv"),P=a("iBNF"),z=a("rBCA"),A=a("IQVP"),j=a("wGwR"),$=a("ake8"),T=a("mis8"),S=a("xrdX");let MainText=({children:e,className:t=""})=>i.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>i.createElement("div",{className:`uDcqD-2 ${t}`},e);var D={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:n,className:r="",style:l,onAvatarClick:o,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>i.createElement("div",{className:`${D.container} ${r}`,style:l},i.createElement("div",{className:D.avatarWrapper,onClick:o,"data-event-category":c,"data-event-action":d,"data-event-label":p},i.createElement(E.U,Object.assign({},e)),s&&i.createElement("div",{className:D.avatarIcon},s)),i.createElement("div",{className:`${D.info} ${r}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},n||i.createElement(i.Fragment,null,t&&i.createElement(MainText,null,t),a&&i.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>i.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>i.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>i.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>i.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,n=(0,f._)(e,["children","className"]);return i.createElement("div",Object.assign({className:`pDlsows ${a}`},n),t)};var M=(0,l.k)(()=>({root:{verticalAlign:"bottom"}}));let B=(0,i.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:n,siteType:r,title:l}=(0,i.useContext)(B),{cx:o,classes:s}=M(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return n?i.createElement(b.A,{className:o(s.root,t),siteType:r,role:n,title:l}):null};var F=(0,l.k)(()=>({root:{}}));let I=z.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${P.r.colors.white}; border-radius: ${P.r.borderRadius}; box-shadow: 0px 0px 4px ${P.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: ${P.r.colors.primary50}; border-radius: ${P.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,H=z.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; } `,Z=z.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; } `,O=z.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; } `,L=z.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var _="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",R="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:l,overwriteProfileProps:o,avatarFallback:s=y.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,p,m;let{t:u}=(0,h.u)(),[g,v]=(0,i.useState)(null),[b,x]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e&&n&&String(null==g?void 0:g.id)!==String(n)){x(!0);try{v(null),(0,k.c)((0,k.b)(A.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)}x(!1)}},[e,n,null==g?void 0:g.id]);let f=(null==g?void 0:g.experiences)||[],E=(null==g?void 0:g.specialties)||[],z=E.map(e=>(null==e?void 0:e.name)||e).join(" • "),$=f.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 i.createElement(i.Fragment,null,i.createElement(I,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},b||!g?i.createElement(j.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:t},i.createElement("img",{src:_,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(Z,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(w.I,{src:null==g?void 0:g.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),i.createElement("img",{className:"badge-avatar",src:R,alt:"badge",loading:"lazy"})))),i.createElement(O,null,i.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==g?void 0:g.name),i.createElement("div",{className:"specialty"},z&&i.createElement(i.Fragment,null,i.createElement(N.T,{size:"p4",color:P.r.colors.gray800},z," • ")),i.createElement("a",{href:(0,k.n)({id:null===(d=null==g?void 0:g.organization)||void 0===d?void 0:d.id,name:null===(p=null==g?void 0:g.organization)||void 0===p?void 0:p.name,slug:null===(m=null==g?void 0:g.organization)||void 0===m?void 0:m.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(N.T,{size:"p4",className:"organisation",color:P.r.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.organization.name))))),!l&&i.createElement("div",{className:"btn-wrapper"},i.createElement("a",{href:(0,k.o)({name:g.name,id:g.id,locale:r})},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),$&&i.createElement(O,null,i.createElement("div",{className:"experience"},i.createElement(N.T,{weight:"bold",size:"s3",color:P.r.colors.gray800,style:{paddingBottom:16}},u("expert.content.description").toUpperCase()),i.createElement(L,null,$.map((e,t)=>i.createElement("li",{key:t},i.createElement(N.T,{size:"p2"},renderExperienceText(e))))),l?i.createElement("div",{className:"btn-wrapper"},i.createElement("a",{href:(0,k.o)({name:g.name,id:g.id,locale:r})},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):i.createElement("a",{href:(0,k.o)({name:g.name,id:g.id,locale:r})},i.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:g.name,id:g.id,locale:r})},u("home.seeExpert"))))))),i.createElement(H,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},V=z.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${P.r.colors.white}; border-radius: ${P.r.borderRadius}; box-shadow: 0px 0px 4px ${P.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: ${P.r.colors.primary50}; border-radius: ${P.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,U=z.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; } `,Y=z.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; } `,W=z.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; } `,q=z.Z.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var G="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 K={author:G,edtior:G,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:R},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:n,enableAnimation:r=!0,expertId:l,overwriteProfileProps:o,avatarFallback:s=y.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,h.u)(),[d,p]=(0,i.useState)(null),[m,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(a&&l&&String(null==d?void 0:d.user_id)!==String(l)){u(!0);try{p(null),(0,k.c)((0,k.g)(A.D9.GET_EXPERT_BY_ID,{id:l}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e.data),o))})}catch(e){console.error(e)}u(!1)}},[a,l,null==d?void 0:d.user_id]),i.createElement(i.Fragment,null,i.createElement(V,{"data-open":a,"data-animation":r,onClick:e=>e.stopPropagation()},m||!d?i.createElement(j.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:n},i.createElement("img",{src:_,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(Y,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(w.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),i.createElement("img",{className:"badge-avatar",src:K[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),i.createElement(W,null,i.createElement(N.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),i.createElement("div",null,i.createElement(N.T,{size:"p4",color:P.r.colors.gray800},null==d?void 0:d.specialty," • "),i.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(N.T,{size:"p4",className:"organisation",color:P.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),i.createElement(W,null,i.createElement("div",{className:"experience"},i.createElement(N.T,{weight:"bold",size:"p4",color:P.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),i.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>i.createElement(q,{key:t},i.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"}),i.createElement("div",{className:"text-contain"},i.createElement($.H,{tag:"h6",color:P.r.colors.gray800},null==e?void 0:e.title),i.createElement(N.T,{size:"p2",color:P.r.colors.gray500},null==e?void 0:e.organization))))),i.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},i.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"))))))),i.createElement(U,{"data-open":a,onClick:e=>{e.stopPropagation(),n()}}))},J=z.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${P.r.colors.white}; border-radius: ${P.r.borderRadius}; box-shadow: 0px 0px 4px ${P.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: ${P.r.colors.primary50}; border-radius: ${P.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,X=z.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=z.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=z.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:l,overwriteProfileProps:o,avatarFallback:s=y.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,h.u)(),[p,m]=(0,i.useState)(null),[u,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e&&n&&String(null==p?void 0:p.id)!==String(n)){g(!0);try{m(null),(0,k.c)((0,k.b)(A.tC.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:k.m[r]}),"get").then(e=>{m(Object.assign(Object.assign({},null==e?void 0:e._data.branch),o))})}catch(e){console.error(e)}g(!1)}},[e,n,null==p?void 0:p.id]);let v=(null==p?void 0:p.specialties)||[],b=(0,i.useMemo)(()=>v.map(e=>e.name),[v]);return i.createElement(i.Fragment,null,i.createElement(J,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},u||!p?i.createElement(j.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:t},i.createElement("img",{src:_,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(Q,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(w.I,{src:null==p?void 0:p.logo,className:"profile-image",alt:"avatar",backupSrc:s}),i.createElement("img",{className:"badge-avatar",src:R,alt:"badge",loading:"lazy"})))),i.createElement(ee,null,i.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==p?void 0:p.name),i.createElement("div",{className:"specialty"},v&&i.createElement(N.T,{size:"p4",color:P.r.colors.gray800},b.join(" • "),"•"),i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(N.T,{size:"p4",className:"organisation",color:P.r.colors.gray800,style:{textDecoration:"underline"}},null==p?void 0:p.name))))),!l&&i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:r})},i.createElement("div",{className:"btn-wrapper"},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),i.createElement(ee,null,i.createElement("div",{className:"experience"},i.createElement(N.T,{weight:"bold",size:"s3",color:P.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),i.createElement(N.T,{size:"p2",color:P.r.colors.gray500},p.about),l?i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:r})},i.createElement("div",{className:"btn-wrapper"},i.createElement(C.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):i.createElement("a",{href:(0,k.n)({id:p.id,name:p.name,slug:p.slug,locale:r})},i.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:p.id,name:p.name,slug:p.slug,locale:r})},d("home.seeHospital"))))))),i.createElement(X,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:n})=>{let{t:r}=(0,h.u)();return i.createElement(T.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)};m().extend(g());let CardAuthor=e=>{let{className:t="",community:l,name:p,username:m,url:u,avatar:g,role:f,title:E,userType:C="user",expertId:N,specialty:z,organisation:A,isMarryBaby:j,doctorId:$,hospitalId:T,hasQuickBooking:D,handleMakeAppointment:M,communityTrackingAttr:I,isAnonymous:H,showDetailPopup:Z,showChatbotButton:O=!1,subLine:L,authActionWrapper:_,profileProps:R,profileModalProps:V,extendEle:U,avatarProps:Y,hideInfo:W,timeText:q,onCloseFromPost:G,onChatWithBot:K,avatarIcon:J,badgeIconSize:X,hideBackground:Q,children:ee,styles:et,dataEventCategory:ea,dataEventAction:ei,dataEventLabel:en}=e,{data:{locale:er,router:el,env:{isMarryBaby:eo,togetherBasePath:es}}}=(0,i.useContext)(k.T),{isMobile:ec}=(0,w.u)(),{t:ed}=(0,h.u)(),{classes:ep}=F(void 0,{name:"CardAuthor",styles:et}),em="boolean"==typeof j?j:eo,eu=em?"marryBaby":"helloSites",eg=H?ed("cardPost.anonymous"):p||m||"",eh=H?y.C.getAssetPath("avatar.jpg"):g,ev=H?void 0:f,[eb,ex]=(0,i.useState)(!1),{asPath:ef}=el||{},eE=`https://${S.v[er]}${ef}`,onAuthorClick=()=>{if(H)return!1;Z?ey(!0):u&&(window.location.href=u)};(0,i.useEffect)(()=>{(0,v.t)(eb)},[eb]);let[ew,ey]=(0,i.useState)(!1),ek=(null==e?void 0:e.role)==="expert",eC=!!($||T),eN=["expert"===ev&&A&&i.createElement("span",null,A),"expert"===ev&&z&&i.createElement("span",null,z),!("expert"===ev&&z&&A)&&(null==l?void 0:l.name)&&i.createElement("a",Object.assign({href:(null==l?void 0:l.slug)&&l.isActive&&!l.isHidden?`${es}/${null==l?void 0:l.slug}/`:void 0,className:"author-community-name"},I),`${null==l?void 0:l.name}`),q&&i.createElement("span",null,q)].filter(Boolean),[eP,ez]=(0,i.useState)(null);return(0,i.useEffect)(()=>{ew&&!eP&&("chatbot"===C?Promise.all([a.e(5231),a.e(7797),a.e(5454),a.e(106),a.e(9803),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(1829),a.e(2582),a.e(9301),a.e(4291),a.e(3792),a.e(7743),a.e(3929),a.e(891),a.e(137),a.e(4414),a.e(9762),a.e(1079),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"KWnV")).then(e=>{ez(()=>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(7797),a.e(5454),a.e(106),a.e(9803),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(1829),a.e(2582),a.e(9301),a.e(4291),a.e(3792),a.e(7743),a.e(3929),a.e(891),a.e(137),a.e(4414),a.e(9762),a.e(1079),a.e(7613),a.e(8098),a.e(3416),a.e(2500),a.e(1570),a.e(3506),a.e(1413)]).then(a.bind(a,"aUqw")).then(e=>{ez(()=>e.ProfileDetail)}))},[ew,C]),i.createElement(B.Provider,{value:{displayName:eg,title:E,role:ev,siteType:eu,handleMakeAppointment:M,doctorId:$,hospitalId:T,currentUrl:eE}},i.createElement(ProfileDetailModal,{open:ew,onClose:()=>ey(!1),profileModalProps:V},eP&&i.createElement(eP,Object.assign({currentPageUrl:en,authActionWrapper:_,onCloseFromPost:()=>{ey(!1),null==G||G()},onChatWithBot:K},R,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:eh,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:$,hospitalId:T,hasQuickBooking:D,userType:C},null==R?void 0:R.authorProps)}))),"expert"===ev&&N?i.createElement(PopupExpert,{isOpen:eb,onClose:()=>ex(!1),expertId:N}):null,"expert"===ev&&$?i.createElement(PopupDoctor,{isOpen:eb,onClose:()=>ex(!1),doctorId:$,locale:er}):null,"expert"===ev&&T?i.createElement(PopupHospital,{isOpen:eb,onClose:()=>ex(!1),hospitalId:T,locale:er}):null,i.createElement("div",{className:`hhg-card-author ${ep.root} ${t} ${ek?"expert-author":""}`,"data-background":!Q&&ek,"data-is-marrybaby":em},i.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:ei,dataEventLabel:en,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:H?y.C.getAssetPath(em?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eh,username:eg},Y),{style:{cursor:!H&&(u||Z)?"pointer":"default"}}),avatarIcon:J||ek&&i.createElement(n.Z,{size:X||15})},ee?i.createElement("div",{onClick:onAuthorClick},ee):!W&&i.createElement(CardAuthor$1.Row,null,i.createElement(CardAuthor$1.ColLeft,null,i.createElement(s.k,{align:"center",onClick:onAuthorClick},i.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eg,"chatbot"===C?i.createElement(i.Fragment,null," ",i.createElement(r.Z,{color:P.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),O&&i.createElement("div",{style:{marginTop:"8px"}},i.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:i.createElement(x.I.App,{size:16}),onClick:()=>{null==K||K()}},ed("chatbot.with.me")))):i.createElement(AuthorBadgeItem,null))),L||i.createElement(CardAuthor$1.SubTextRow,{style:D?{position:"relative"}:{}},eN.map((e,t)=>i.createElement(i.Fragment,null,0!==t&&i.createElement(CardAuthor$1.SubDivider,null),i.createElement(CardAuthor$1.SubText,null,e))),D&&eC&&i.createElement(o.x,{sx:{marginTop:(0,d.h)(5)}},i.createElement(b.B,{bookingId:$||T,bookingType:$?"doctor":T?"hospital":void 0,size:ec?"xs":"sm"})))))),U&&U))};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,i.useContext)(B);return i.createElement(o.x,null,e)}},wGwR:function(e,t,a){a.d(t,{L:function(){return Loading}});var i=a("q1tI"),n=a("+6Eu"),r=a("L+vc"),l=a("AeFk"),o=a("rBCA"),s=a("iBNF");let c=o.Z.div` display: flex; align-items: center; justify-content: center; padding: 1em; button { position: relative; } `,d=l.F4` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `;o.Z.div` display: flex; width: fit-content; width: -moz-fit-content; flex-direction: column; align-items: center; justify-content: center; padding: 1rem 2rem; background: white; border-radius: ${s.r.borderRadius}; box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001), -2px 2px 5px rgba(67, 86, 100, 0.123689); .loading-spinner { width: 24px; height: 24px; margin-bottom: 0.5rem; animation: ${d} 1.2s linear infinite; } &[data-is-marrybaby='true'] { box-shadow: none; } `;let Loading=({className:e,size:t="md"})=>{let{t:a}=(0,r.u)();return i.createElement(c,{className:e},i.createElement(n.B,{size:t,color:"transparent",isLoading:!0},a("loading")))}},gRZs:function(e,t,a){a.d(t,{C:function(){return g},I:function(){return ImagePreviewPopup},P:function(){return PostSingleImageViewPopup},a:function(){return PostImagePreview},b:function(){return h}});var i=a("q1tI"),n=a("ake8"),r=a("Efqo"),l=a("L+vc"),o=a("Xfk/"),s=a("t/pd"),c=a("oZWv"),d=a("rBCA"),p=a("HJpP"),m=a("iBNF"),u=a("gEnE"),g="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",h="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath stroke='%23262626' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.05 18.06 4 12.038l6.05-6.025M4.002 12.035h15'/%3e%3c/svg%3e";let v=d.Z.div` padding: 14px 16px 14px 17px; background: ${e=>e.bgColor}; border-left: 3px solid ${e=>e.highlight}; ${r.M.mbUp} { padding: 12px 12px 12px 17px; } `,b=d.Z.div` display: flex; `,x=d.Z.div` font-size: 12px; line-height: 18px; &[data-has-icon='true'] { margin-left: 10px; } `,f=d.Z.div` flex-shrink: 0; `,E=d.Z.div` display: grid; grid-gap: 3px; grid-template-columns: 1fr 1fr; grid-template-rows: auto; .img-wrapper { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; grid-column: auto; & > img { cursor: zoom-in; } .img-preview-blur { position: absolute; top: 50%; left: 50%; width: 110%; height: 110%; /* Add the blur effect */ -webkit-filter: blur(8px); filter: blur(8px); object-fit: cover; object-position: center; opacity: 0.8; transform: translate(-50%, -50%); } .img-preview { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; } .img-more-overlay { position: absolute; top: 0; left: 0; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.5); z-index: 4; } } &[data-image-count='1'] { .img-wrapper { /* padding-top: 100%; */ grid-column: 1/3; } } &[data-image-count='2'] { .img-wrapper { /* padding-top: 100%; */ } } &[data-image-count='3'] { .img-wrapper { &:first-child { grid-column: 1/3; } } } &[data-image-count='4'] { .img-wrapper { /* padding-top: 100%; */ } } &[data-image-count='5'] { grid-template-columns: repeat(6, 1fr); .img-wrapper { /* padding-top: 100%; */ grid-column: auto/ span 2; &:first-child { padding-top: 56.25%; grid-column: 1/4; } &:nth-child(2) { padding-top: 56.25%; grid-column: 4/7; } } } &[data-is-marrybaby='true'] { grid-gap: 8px; .img-wrapper { padding-top: 66.66%; border-radius: 1rem; .img-preview { object-fit: cover; } } &[data-image-count='3'] { grid-template-columns: 1fr 1fr 1fr; .img-wrapper { &:first-child { padding-top: 100%; grid-column: 1/3; grid-row: 1/3; } } } } `,w=d.Z.div` position: fixed; z-index: 999; top: 0; left: 0; display: flex; overflow: hidden; width: 100vw; height: 100vh; flex-direction: column; background: white; opacity: 0; pointer-events: none; transition: opacity 0.2s linear; &[data-open='true'] { opacity: 1; pointer-events: auto; } .top-bar { position: relative; padding: 20px 40px; .icon-arrow-left { position: absolute; top: 50%; left: 20px; height: 24px; width: 24px; cursor: pointer; transform: translateY(-50%); } } .container { flex: 1; overflow-y: auto; .img-preview { width: 100%; min-width: 100%; margin-bottom: 0.5rem; cursor: pointer; max-height: 100%; object-fit: cover; } } `,y=(0,d.Z)(e=>{var{icon:t,bgColor:a=m.r.colors.yellow50,highlightColor:n=m.r.colors.yellow800,message:r}=e,l=(0,p._)(e,["icon","bgColor","highlightColor","message"]);return i.createElement(v,Object.assign({bgColor:a,highlight:n},l),i.createElement(b,null,t&&i.createElement(f,null,t),i.createElement(x,{"data-has-icon":!!t},r)))})` margin-bottom: 16px; &.noti-bottom { border-left: none; margin-top: 4px; padding: 4px 8px; margin-left: 16px; margin-right: 16px; border-radius: 4px; } `,ImagePreviewPopup=({className:e,style:t,authorName:a,images:n,onClose:r,onOpenSingleView:o,alt:d})=>{let{t:p}=(0,l.u)(),[m,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{setTimeout(()=>{u(!0)},0)},[]),i.createElement(s.h,null,i.createElement(w,{className:e,style:t,"data-open":m},i.createElement("div",{className:"top-bar"},i.createElement("img",{className:"icon-arrow-left",src:h,onClick:r,alt:"go back",loading:"lazy"}),i.createElement(c.T,{size:"p2",weight:"bold",style:{textAlign:"center"}},p("previewPhotos.title",{name:a}))),i.createElement("div",{className:"container"},n.map((e,t)=>i.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==o?void 0:o(t),alt:d,loading:"lazy"})))),",")},k=d.Z.div` position: fixed; z-index: 999; top: 0; left: 0; display: flex; width: 100%; height: 100%; flex-direction: column; background: black; opacity: 0; pointer-events: none; transition: opacity 0.2s linear; &[data-open='true'] { opacity: 1; pointer-events: auto; } `,C=d.Z.div` padding: 1rem; background: white; .icon-close { width: 26px; height: 26px; cursor: pointer; } `,N=d.Z.div` position: relative; flex: 1; overflow: hidden; > img { height: 100%; width: 100%; object-fit: contain; object-position: center; } `,P=d.Z.div` --inner-padding: max(16px, 20%); height: 100%; position: absolute; left: 0; padding: 8px; padding-right: var(--inner-padding); display: flex; align-items: center; top: 0; cursor: pointer; &[data-right] { padding-right: 8px; padding-left: var(--inner-padding); left: unset; right: 0; } &[data-disabled='true'] { cursor: not-allowed; } `,z=d.Z.div` border-radius: 50%; background: rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; padding: 4px; > img { width: 16px; height: 16px; &[data-disabled='true'] { opacity: 0.5; } } ${r.M.tdUp} { padding: 8px; > img { width: 30px; height: 30px; } } `;var A="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m6 12.813 4-4-4-4'/%3e%3c/svg%3e";let PostSingleImageViewPopup=({initialViewIndex:e,images:t,onClose:a,alt:n})=>{let[r,l]=(0,i.useState)(e),[o,c]=(0,i.useState)(!1);(0,i.useEffect)(()=>{setTimeout(()=>{c(!0)},0)},[]);let d=null==t?void 0:t[r],p=0===r,m=!(null==t?void 0:t.length)||r===(null==t?void 0:t.length)-1;return i.createElement(s.h,null,i.createElement(k,{"data-open":o&&!!d},i.createElement(C,null,i.createElement("img",{src:g,className:"icon-close",onClick:a,alt:"close",loading:"lazy"})),d&&r>=0&&i.createElement(i.Fragment,null,i.createElement(N,null,i.createElement("img",{className:"img-preview",src:d,alt:n,loading:"lazy"}),i.createElement(P,{"data-disabled":p,onClick:()=>!p&&l(r-1)},i.createElement(z,null,i.createElement("img",{src:A,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":p,loading:"lazy"}))),i.createElement(P,{"data-right":!0,"data-disabled":m,onClick:()=>!m&&l(r+1)},i.createElement(z,null,i.createElement("img",{src:A,alt:"right arrow","data-disabled":m,loading:"lazy"})))))))},j=(0,u.Z)(d.Z.div` position: absolute; top: 0; right: 0; left: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; `,"hhgcomp-sensitivemask-inner"),$=d.Z.div``,T=d.Z.div` position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 3; background: white; cursor: pointer; &, * { // transition: all 300ms; transform-origin: bottom left; } img { transition: none; } .img-preview { width: 100%; } &[data-is-blurred='true'] { .img-preview { /* Add the blur effect */ -webkit-filter: blur(24px); filter: blur(24px); } } &[data-is-blurred='false'] { background: transparent; cursor: zoom-in; ${j.classSelector} { top: auto; right: auto; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0); align-items: flex-end; justify-content: flex-start; } } `,SensitiveMask=({image:e,showIcon:t=!0})=>{let[a,n]=(0,i.useState)(!0);return i.createElement(T,{"data-is-blurred":a,onClick:e=>a&&e.stopPropagation()},i.createElement("img",{loading:"lazy",className:"img-preview",src:e}),i.createElement(j,{onClick:e=>{e.stopPropagation(),n(!a)}},t&&i.createElement($,null,a?i.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},i.createElement("path",{d:"M1.71 2.54a.996.996 0 0 1 0-1.41c.39-.39 1.03-.39 1.42 0l16.31 16.33a.996.996 0 1 1-1.41 1.41l-2.72-2.72c-1.34.52-2.79.82-4.31.82-5 0-9.27-3.11-11-7.5C.77 7.5 2.06 5.8 3.68 4.51zM16 9.47c0-2.76-2.24-5-5-5-.51 0-1 .1-1.47.24L7.36 2.54c1.15-.37 2.37-.57 3.64-.57 5 0 9.27 3.11 11 7.49-.69 1.76-1.79 3.3-3.18 4.53l-3.06-3.06c.14-.46.24-.95.24-1.46m-5 5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14L8.06 8.9c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07l1.57 1.57c-.65.32-1.37.5-2.14.5m2.97-5.33a2.97 2.97 0 0 0-2.64-2.64z",fill:"#fff"})):i.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none"},i.createElement("path",{d:"M12 0C5.142 0 1.886 5.879 1.096 7.557c-.132.28-.132.604 0 .884C1.886 10.121 5.142 16 12 16c6.834 0 10.092-5.837 10.896-7.54a1.08 1.08 0 0 0 0-.92C22.092 5.836 18.834 0 12 0m0 3a5 5 0 1 1-.001 10.001 5 5 0 0 1 0-10.001m0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6",fill:"#2D87F3"})))))},PostImagePreview=({className:e,images:t=[],style:a,authorName:s,isSensitive:c=!1,alt:d,positionAlert:p="top"})=>{let{data:{env:{isMarryBaby:m}}}=(0,i.useContext)(o.T),{t:u}=(0,l.u)(),g=`+ ${(t.length||0)-4}`,[h,v]=(0,i.useState)(!1),[b,x]=(0,i.useState)(-1),f=t.length>5,w=(0,i.useRef)(!1);return(0,i.useEffect)(()=>()=>{w.current&&(0,r.t)(!1)},[]),(0,i.useEffect)(()=>{h||b>=0?((0,r.t)(!0),w.current=!0):((0,r.t)(!1),w.current=!1)},[h,b]),i.createElement(i.Fragment,null,c&&"top"===p&&i.createElement(y,{message:u("sensitiveMask.contentWarningDescription"),icon:i.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},i.createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}),i.createElement(E,{className:e,style:a,"data-image-count":f?5:t.length||0,"data-is-marrybaby":m,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map((e,t)=>{let a=4===t&&f;return i.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&f?v(!0):x(t)}},c&&i.createElement(SensitiveMask,{image:e,showIcon:!a}),!m&&i.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:d}),i.createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:d}),a&&i.createElement("div",{className:"img-more-overlay"},i.createElement(n.H,{tag:"h1",as:"h2",color:"white"},g)))})),h&&i.createElement(ImagePreviewPopup,{authorName:s||"",images:t,onClose:()=>v(!1),onOpenSingleView:x,alt:d}),b>=0&&i.createElement(PostSingleImageViewPopup,{images:t,initialViewIndex:b,onClose:()=>x(-1),alt:d}),c&&"bottom"===p&&i.createElement(y,{message:u("sensitiveMask.contentWarningDescription.community"),className:"noti-bottom",icon:i.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},i.createElement("path",{d:"M9 .667A8.336 8.336 0 0 0 .667 9c0 4.6 3.733 8.333 8.333 8.333S17.333 13.6 17.333 9 13.6.667 9 .667m0 9.166A.836.836 0 0 1 8.167 9V5.667c0-.459.375-.834.833-.834s.833.375.833.834V9A.836.836 0 0 1 9 9.833M8.167 11.5v1.667h1.666V11.5z",fill:"#FE921D"}))}))}},BwPM:function(e,t,a){a.d(t,{B:function(){return BabyVaccineForm}});var i,n,r=a("HJpP"),l=a("q1tI"),o=a("iuhU"),s=a("8vDj"),c=a("cChf"),d=a("ZFu2"),p=a("RL1p"),m=a("oZWv"),u=a("L+vc"),g=a("SlSK"),h=a("1iCw"),v=a("qABS"),b=a("fkrl");let x=(0,l.createContext)({}),DefaultLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,u.u)(),{currentUrl:i,submitProps:n,form:s}=(0,l.useContext)(x),{classes:c={}}=(0,l.useContext)(g.C);return l.createElement(h.H,Object.assign({formLayout:"default"},t),l.createElement(h.H.FormRow,null,l.createElement(v.G,Object.assign({isBaby:!0},s.getInputProps("gender")))),l.createElement(h.H.FormRow,null,l.createElement(p.D,Object.assign({label:l.createElement(m.T,{size:"p2",weight:"semiBold"},a("babyGrowth.input.birthday")),placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age")))),l.createElement(h.H.FormRow,{className:c.submitWrapper},l.createElement(h.H.Submit,Object.assign({type:"submit",className:(0,o.default)("due-date-calculate-button",c.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:i},n),a("dueDatePage.lastPeriod.calculate"))))},InlineLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,u.u)(),{currentUrl:i,submitProps:n,form:s}=(0,l.useContext)(x),{classes:c={}}=(0,l.useContext)(g.C);return l.createElement(h.H,Object.assign({formLayout:"inline"},t),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:a("tools.selectBabyGender"),width:"none"},l.createElement(v.G,Object.assign({isBaby:!0,hideLabel:!0,type:"radio"},s.getInputProps("gender")))),s.errors.gender&&l.createElement(h.H.Error,null,s.errors.gender)),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:a("babyGrowth.input.birthday")},l.createElement(p.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age"),{error:null}))),s.errors.age&&l.createElement(h.H.Error,null,s.errors.age)),l.createElement(h.H.FormRow,{className:c.submitWrapper},l.createElement(h.H.Submit,Object.assign({type:"submit",className:(0,o.default)("due-date-calculate-button",c.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:i},n),a("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,u.u)(),{currentUrl:i,submitProps:n,form:o}=(0,l.useContext)(x);return l.createElement(h.H,Object.assign({formLayout:"default"},t),l.createElement(h.H.Control,null,l.createElement(v.G,Object.assign({isBaby:!0},o.getInputProps("gender"),{error:null}))),o.errors.gender&&l.createElement(h.H.Error,null,o.errors.gender),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderBoxControl,{label:a("babyGrowth.input.birthday"),rightSection:l.createElement(b.Z,null)},l.createElement(p.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null},o.getInputProps("age"),{error:null}))),o.errors.age&&l.createElement(h.H.Error,null,o.errors.age)),l.createElement(h.H.Submit,Object.assign({type:"submit",className:"due-date-calculate-button",dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:i},n),a("dueDatePage.lastPeriod.calculate")))};(i=n||(n={}))[i.trackPeriod=0]="trackPeriod",i[i.conceive=1]="conceive",i[i.avoidPregnancy=2]="avoidPregnancy";let BabyVaccineForm=e=>{var{formLayout:t="default",submitProps:a,currentUrl:i,onSubmit:n}=e,o=(0,r._)(e,["formLayout","submitProps","currentUrl","onSubmit"]);let{t:p}=(0,u.u)(),m=(0,s.rZ)(),g="mb"===m.other.template,h=(0,c.c)({validate:{gender:(0,d.U)(p("validation.error.requiredField")),age:(0,d.U)(p("validation.error.requiredField"))}}),v=Object.assign({onSubmit:h.onSubmit(n)},o);return l.createElement(x.Provider,{value:{submitProps:a,currentUrl:i,form:h}},"inline"===t?l.createElement(InlineLayout,Object.assign({},v)):g?l.createElement(MbLayout,Object.assign({formLayout:t},v)):l.createElement(DefaultLayout,Object.assign({},v)))}}}]);