"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4125],{S3DO:function(e,t,a){a.d(t,{T:function(){return s}});var n=a("q1tI"),l=a("rBCA"),r=a("OgrB"),i=a("iBNF");let o=l.Z.div` textarea { width: 100%; height: var(--textarea-height, 116px); padding: 1rem; border: 1px solid ${i.r.colors.gray200}; border-radius: 6px; color: ${i.r.colors.gray800}; font-size: 14px; resize: none; &:focus { box-shadow: 0px 0px 2px 2px #91caff; } &::placeholder { color: ${i.r.colors.gray500}; } &:disabled { background-color: ${i.r.colors.neutral50}; cursor: not-allowed; } } `,s=n.forwardRef(({height:e,placeholder:t,labelText:a,labelColor:l,id:i,name:s,onChange:c,value:d,className:m,onKeyPress:u,disabled:p=!1},g)=>n.createElement(o,{className:m,style:{"--textarea-height":e||"116px"}},a&&n.createElement(r.L,{size:"label2",style:{color:l||"#595959"},htmlFor:i},a),n.createElement("textarea",{name:s,ref:g,placeholder:t,id:i,onChange:e=>c&&c(e.target.value),onKeyPress:e=>u&&u(e),value:d,disabled:p})))},dHB8:function(e,t,a){a.r(t),a.d(t,{ProfileChatbot:function(){return ProfileChatbot},TabDataInit:function(){return w},TabName:function(){return r},UserType:function(){return i}});var n,l,r,i,o=a("usZY"),s=a("q1tI"),c=a("P0e6"),d=a("rCcT"),m=a("Pfvg"),u=a("IQVP"),p=a("XAIn"),g=a("kd6S"),h=a("oTwY"),b=a("4JiQ"),v=a("Qcqv"),f=a("e6f9");a("NmYn"),a("gY0P"),a("Wgwc"),a("QgiU"),a("rBCA");let x=(0,s.createContext)({}),Faqs=({faqs:e})=>{let[t,a]=(0,s.useState)([]),handleClick=e=>{if(t.includes(e)){let n=t.filter(t=>t!==e);a(n)}else a(t=>[...t,e])};return s.createElement("div",{className:"_0NhMo6T"},e.map((e,a)=>{let n=t.includes(a);return s.createElement("div",{className:"nrZtZ-u",key:a},s.createElement("div",{className:"faq-item",onClick:()=>handleClick(a)},s.createElement("div",{className:"faq-question",dangerouslySetInnerHTML:{__html:e.question||""}}),n?s.createElement(g.Z,null):s.createElement(h.Z,null)),s.createElement(b.U,{in:n,className:"faq-answer"},s.createElement("div",{dangerouslySetInnerHTML:{__html:e.answer||""}})))}))};var E={container:"_2ugC2Ll",body:"CCwRHCd",description:"RF63WXG",cardAuthorWrapper:"PIaeC0v"};let formatExperience=e=>e?{title:null==e?void 0:e.title,organization:null==e?void 0:e.organization,duration:e.duration}:{},formatEducation=e=>e?{completedYear:null==e?void 0:e.completed_year,schoolName:e.school_name,study:e.study}:{};(n=r||(r={}))[n.About=0]="About",n[n.Care=1]="Care",n[n.Answer=2]="Answer",n[n.Posts=3]="Posts",(l=i||(i={}))[l.Expert=0]="Expert",l[l.User=1]="User";let w={experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileChatbot=e=>{var{authorProps:t,authActionWrapper:a,onSkipQuestion:n,onCloseFromPost:l,onChatWithBot:r,showSkipQuestionTag:i,currentPageUrl:g}=e,h=(0,o._)(e,["authorProps","authActionWrapper","onSkipQuestion","onCloseFromPost","onChatWithBot","showSkipQuestionTag","currentPageUrl"]);let{data:{locale:b,userInfo:w,env:{isMarryBaby:y}}}=(0,s.useContext)(p.T),C=String(null==t?void 0:t.userId),[k,N]=(0,s.useState)(),[z,I]=(0,s.useState)(!1),[S,T]=(0,s.useState)(),[A,D]=(0,s.useState)([]),[j,P]=(0,s.useState)(""),$=(null==w?void 0:w._togetherUserId)===(null==t?void 0:t.userId),[L,B]=(0,s.useState)(1),O={value:String(L),dataList:[{value:"1",text:"FAQs",content:s.createElement(Faqs,{faqs:A})}],onTabChange:e=>B(Number(e))};return(0,s.useEffect)(()=>{(0,o.a)(void 0,void 0,void 0,function*(){var e,t,a,n,l,r,i,o,s,c,d;I(!0);let g=yield Promise.all([(0,p.c)((0,p.e)(u.yy.USER.DETAIL,{_locale:b,id:C}),"GET"),(0,p.c)((0,p.e)(u.yy.CHATBOT.PROFILE,{_locale:b}),"GET"),(0,p.c)((0,p.e)(u.yy.CHATBOT.FAQS_LIST,{_locale:b}),"GET")]),[h,v,f]=g,x={data:null==h?void 0:h.data,experiences:((null===(t=null===(e=null==h?void 0:h.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(formatExperience),relatedPosts:((null===(a=null==h?void 0:h.data)||void 0===a?void 0:a.related_post)||[]).map(e=>(0,m.g)(e.post)),educations:((null===(l=null===(n=null==h?void 0:h.data)||void 0===n?void 0:n.fields)||void 0===l?void 0:l.educations)||[]).map(formatEducation),awards:(null===(i=null===(r=null==h?void 0:h.data)||void 0===r?void 0:r.fields)||void 0===i?void 0:i.awards_accreditations)||[],contact:(null===(s=null===(o=null==h?void 0:h.data)||void 0===o?void 0:o.fields)||void 0===s?void 0:s.contact)||{}};(null==h?void 0:h.status)===1&&T(x),D((null===(c=null==f?void 0:f.data)||void 0===c?void 0:c.faqs)||[]),P((null===(d=null==v?void 0:v.data)||void 0===d?void 0:d.description)||""),I(!1)})},[]),s.createElement(x.Provider,{value:{isMarryBaby:y,siteType:y?"marryBaby":"helloSites",authorId:String((null==t?void 0:t.userId)||""),authActionWrapper:a,onSkipQuestion:n,info:S,authorProps:t,onCloseFromPost:l,countValues:k,setCountValues:N,isAuthorLogin:$,showSkipQuestionTag:i,currentPageUrl:g}},s.createElement("div",Object.assign({},h,{className:`${E.container} ${(null==h?void 0:h.className)||""}`,"data-is-marrybaby":y}),z?s.createElement(d.L,null):s.createElement(s.Fragment,null,s.createElement("div",{className:E.cardAuthorWrapper},s.createElement(v.C,Object.assign({},t,{className:"card-author",showDetailPopup:!1,showChatbotButton:b===f.L.Vietnam,onChatWithBot:r}))),s.createElement("div",{className:E.description,dangerouslySetInnerHTML:{__html:j}}),A.length>0&&s.createElement("div",{className:E.body},s.createElement(c.T,Object.assign({},O))))))}},OgrB:function(e,t,a){a.d(t,{I:function(){return Input},L:function(){return Label},S:function(){return u},a:function(){return m},b:function(){return d}});var n=a("usZY"),l=a("q1tI"),r=a("8vDj"),i=a("rBCA"),o=a("iBNF"),s=a("pvoY");let c=i.Z.div` position: relative; width: 100%; &[data-has-error] { input { border-color: ${o.r.colors.red700}; } } input { width: 100%; padding: 12px 16px; border: solid 1px ${o.r.colors.gray200}; border-radius: ${o.r.borderRadius}; &:active, &:focus, &.focused { border-color: ${e=>e.color}; box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor}; } &:disabled { background-color: ${o.r.colors.gray100}; cursor: not-allowed; } } &[data-has-action-icon] { input { padding: 12px 48px 12px 16px; } } &[data-has-display-icon] { input { padding: 12px 16px 12px 48px; } } &[data-has-action-icon][data-has-display-icon] { input { padding: 12px 48px; } } &[data-size='lg'] { input { font-size: 16px; font-weight: ${o.r.sizes.fwRegular}; ${s.M.mbDown} { font-size: 22px; line-height: 1.2; } ${s.M.mbUp} { font-size: 26px; line-height: 1.2; } } } &[data-size='md'] { input { font-weight: ${o.r.sizes.fwRegular}; line-height: 22px; ${s.M.mbDown} { font-size: 14px; line-height: 1.2; } ${s.M.mbUp} { font-size: 16px; line-height: 1.2; } } } &[data-size='sm'] { input { font-weight: ${o.r.sizes.fwRegular}; line-height: 20px; ${s.M.mbDown} { font-size: 13px; line-height: 1.5; } ${s.M.mbUp} { font-size: 13px; line-height: 1.5; } } } `,d=i.Z.label` color: ${o.r.colors.red700}; font-weight: ${o.r.sizes.fwRegular}; `,m=i.Z.div` position: absolute; top: 50%; right: 16px; cursor: pointer; transform: translateY(-50%); `,u=i.Z.div` position: absolute; top: 50%; left: 16px; display: inline-flex; cursor: default; transform: translateY(-50%); `,Label=({children:e,className:t,style:a,htmlFor:n,size:r})=>l.createElement("label",{"data-size":r,className:`DjBFAbd ${t||""}`,style:a,htmlFor:n},e),Input=e=>{var{name:t,value:a,errorMessage:i,isNumerousKeyboard:o=!1,showErrorMessage:s=!0,actionIcon:p,displayIcon:g,onActionClick:h,label:b,className:v,onChange:f,isDisabled:x,CustomInput:E,size:w,style:y,autoComplete:C="off",type:k="text",inputClassName:N,trackingAttributes:z,enterKeyHint:I}=e,S=(0,n._)(e,["name","value","errorMessage","isNumerousKeyboard","showErrorMessage","actionIcon","displayIcon","onActionClick","label","className","onChange","isDisabled","CustomInput","size","style","autoComplete","type","inputClassName","trackingAttributes","enterKeyHint"]);let T=(0,r.rZ)(),A=(0,l.useMemo)(()=>z?{"data-event-category":z.dataEventCategory,"data-event-action":z.dataEventAction,"data-event-label":z.dataEventLabel}:{},[z]);return l.createElement(c,{"data-size":w,className:v,"data-has-action-icon":!!p||void 0,"data-has-display-icon":!!g||void 0,"data-has-error":i&&i.length>0||void 0,color:T.fn.primaryColor(),shadowColor:T.colors[T.primaryColor][0],style:y},b&&l.createElement(Label,{size:"label2",htmlFor:t,className:"inputLabel"},b),l.createElement("div",{style:{position:"relative"}},E||l.createElement("input",Object.assign({id:t,name:t,onChange:e=>f&&f(e.target.value),type:k,"aria-label":k,value:a,disabled:x,autoComplete:C,inputMode:o||"number"===k?"numeric":k,pattern:o?"[0-9]*":".*",className:N,enterKeyHint:I},A,S)),g&&l.createElement(u,{className:"displayIcon"},g),p&&l.createElement(m,{className:"actionIcon",onClick:h},p)),i&&i.length>0&&s&&l.createElement(d,{className:"errorLabel"},i))}},FjXF: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 n=a("q1tI"),l=a("6Dmq"),r=a("pvoY"),i=a("FQi+"),o=a("XAIn"),s=a("t/pd"),c=a("srUE"),d=a("rBCA"),m=a("usZY"),u=a("iBNF"),p=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 b=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; } `,v=d.Z.div` display: flex; `,f=d.Z.div` font-size: 12px; line-height: 18px; &[data-has-icon='true'] { margin-left: 10px; } `,x=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=u.r.colors.yellow50,highlightColor:l=u.r.colors.yellow800,message:r}=e,i=(0,m._)(e,["icon","bgColor","highlightColor","message"]);return n.createElement(b,Object.assign({bgColor:a,highlight:l},i),n.createElement(v,null,t&&n.createElement(x,null,t),n.createElement(f,{"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:l,onClose:r,onOpenSingleView:o,alt:d})=>{let{t:m}=(0,i.u)(),[u,p]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{setTimeout(()=>{p(!0)},0)},[]),n.createElement(s.h,null,n.createElement(w,{className:e,style:t,"data-open":u},n.createElement("div",{className:"top-bar"},n.createElement("img",{className:"icon-arrow-left",src:h,onClick:r,alt:"go back",loading:"lazy"}),n.createElement(c.T,{size:"p2",weight:"bold",style:{textAlign:"center"}},m("previewPhotos.title",{name:a}))),n.createElement("div",{className:"container"},l.map((e,t)=>n.createElement("img",{className:"img-preview",key:t,src:e,onClick:()=>null==o?void 0:o(t),alt:d,loading:"lazy"})))),",")},C=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; } `,k=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; } `,z=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; } `,I=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 S="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:l})=>{let[r,i]=(0,n.useState)(e),[o,c]=(0,n.useState)(!1);(0,n.useEffect)(()=>{setTimeout(()=>{c(!0)},0)},[]);let d=null==t?void 0:t[r],m=0===r,u=!(null==t?void 0:t.length)||r===(null==t?void 0:t.length)-1;return n.createElement(s.h,null,n.createElement(C,{"data-open":o&&!!d},n.createElement(k,null,n.createElement("img",{src:g,className:"icon-close",onClick:a,alt:"close",loading:"lazy"})),d&&r>=0&&n.createElement(n.Fragment,null,n.createElement(N,null,n.createElement("img",{className:"img-preview",src:d,alt:l,loading:"lazy"}),n.createElement(z,{"data-disabled":m,onClick:()=>!m&&i(r-1)},n.createElement(I,null,n.createElement("img",{src:S,style:{transform:"rotate(180deg)"},alt:"left arrow","data-disabled":m,loading:"lazy"}))),n.createElement(z,{"data-right":!0,"data-disabled":u,onClick:()=>!u&&i(r+1)},n.createElement(I,null,n.createElement("img",{src:S,alt:"right arrow","data-disabled":u,loading:"lazy"})))))))},T=(0,p.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"),A=d.Z.div``,D=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; ${T.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,l]=(0,n.useState)(!0);return n.createElement(D,{"data-is-blurred":a,onClick:e=>a&&e.stopPropagation()},n.createElement("img",{loading:"lazy",className:"img-preview",src:e}),n.createElement(T,{onClick:e=>{e.stopPropagation(),l(!a)}},t&&n.createElement(A,null,a?n.createElement("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none"},n.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"})):n.createElement("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none"},n.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:m="top"})=>{let{data:{env:{isMarryBaby:u}}}=(0,n.useContext)(o.T),{t:p}=(0,i.u)(),g=`+ ${(t.length||0)-4}`,[h,b]=(0,n.useState)(!1),[v,f]=(0,n.useState)(-1),x=t.length>5,w=(0,n.useRef)(!1);return(0,n.useEffect)(()=>()=>{w.current&&(0,r.t)(!1)},[]),(0,n.useEffect)(()=>{h||v>=0?((0,r.t)(!0),w.current=!0):((0,r.t)(!1),w.current=!1)},[h,v]),n.createElement(n.Fragment,null,c&&"top"===m&&n.createElement(y,{message:p("sensitiveMask.contentWarningDescription"),icon:n.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},n.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"}))}),n.createElement(E,{className:e,style:a,"data-image-count":x?5:t.length||0,"data-is-marrybaby":u,"data-cursor-pointer":!c},null==t?void 0:t.slice(0,5).map((e,t)=>{let a=4===t&&x;return n.createElement("div",{className:"img-wrapper",key:t,onClick:()=>{t>=4&&x?b(!0):f(t)}},c&&n.createElement(SensitiveMask,{image:e,showIcon:!a}),!u&&n.createElement("img",{loading:"lazy",className:"img-preview-blur",src:e,alt:d}),n.createElement("img",{loading:"lazy",className:"img-preview",src:e,alt:d}),a&&n.createElement("div",{className:"img-more-overlay"},n.createElement(l.H,{tag:"h1",as:"h2",color:"white"},g)))})),h&&n.createElement(ImagePreviewPopup,{authorName:s||"",images:t,onClose:()=>b(!1),onOpenSingleView:f,alt:d}),v>=0&&n.createElement(PostSingleImageViewPopup,{images:t,initialViewIndex:v,onClose:()=>f(-1),alt:d}),c&&"bottom"===m&&n.createElement(y,{message:p("sensitiveMask.contentWarningDescription.community"),className:"noti-bottom",icon:n.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},n.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"}))}))}},dOyR:function(e,t,a){a.d(t,{G:function(){return GenderOptionControl}});var n=a("usZY"),l=a("q1tI"),r=a("XUjW"),i=a("ah6c"),o=a("/npG"),s=a("mYVa"),c=a("Eso5"),d=a("SPK5"),m=a("MQ5V"),u=a("ipFv"),p=a("srUE"),g=a("FQi+");let h={lg:{height:48},md:{height:40},sm:{height:32},xs:{height:32}};var b=(0,o.k)((e,{type:t,gap:a,size:n})=>{let l="mb"===e.other.template,r=h[n]||{},i=r.height;return{root:{},wrapper:Object.assign({gap:(0,s.h)(a||8)},"radio"===t&&{justifyContent:"flex-end",gap:(0,s.h)(a||24)}),groupErr:{fontSize:(0,s.h)(14)},itemRoot:Object.assign({},"button"===t?{flexGrow:1,width:"50%",'&[data-checked="true"]':{".mantine-Radio-label":{borderColor:e.fn.primaryColor()}}}:"radio"===t?{padding:`${(0,s.h)(10)} 0`,margin:0}:{}),itemLabelWrapper:{padding:0,width:"100%"},itemLabel:Object.assign({whiteSpace:"nowrap"},"button"===t?{position:"relative",padding:`${(0,s.h)(2)} ${(0,s.h)(16)}`,border:`1px solid ${l?"#EAEAEC":e.colors.gray[2]}`,backgroundColor:"#fff",borderRadius:(0,s.h)(l?16:4),cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",height:i,'&[data-disabled="true"]':{background:e.colors.gray[1],color:`${e.colors.gray[4]} !important`,img:{opacity:.5}},img:{height:(0,s.h)("lg"===n?26:22)}}:"radio"===t?{fontSize:(0,s.h)(14)}:{}),itemInner:Object.assign(Object.assign({},"button"===t&&{display:"none"}),"radio"===t&&{alignSelf:"center"}),itemBody:Object.assign({},"radio"===t&&{alignItems:"center"})}});let GenderOptionControl=e=>{var{label:t,availableValue:a,styles:o,isBaby:h,genderValue:v={male:"male",female:"female"},type:f="button",hideLabel:x,labelTextProps:E,gap:w,size:y="md",LabelWrapper:C}=e,k=(0,n._)(e,["label","availableValue","styles","isBaby","genderValue","type","hideLabel","labelTextProps","gap","size","LabelWrapper"]);let{t:N}=(0,g.u)(),{classes:z,cx:I,theme:S}=b({type:f,gap:w,size:y},{name:"GenderOptionControl",styles:o}),T="mb"===S.other.template,[A,D]=(0,l.useState)(),j=(0,l.useRef)(null),P=C?{}:Object.assign({as:"label",size:"p2",weight:"semiBold",variant:"primary"},E),$=C||p.T,L=(0,l.useMemo)(()=>[{value:v.male,label:h?N("gender.boy"):N("gender.male"),icon:h?T?l.createElement(r.Z,null):u.C.getAssetPath("health-tools/boy-icon.svg"):u.C.getAssetPath("health-tools/male-icon.svg")},{value:v.female,label:h?N("gender.girl"):N("gender.female"),icon:h?T?l.createElement(i.Z,null):u.C.getAssetPath("health-tools/girl-icon.svg"):u.C.getAssetPath("health-tools/female-icon.svg")}],[]);return(0,l.useEffect)(()=>{D(a)},[a]),l.createElement(c.x,{ref:j,className:z.root},l.createElement(m.R.Group,Object.assign({className:"radio-group",label:x?void 0:l.createElement($,Object.assign({},P),t||(h?N("tools.selectBabyGender"):N("tools.selectGender"))),size:"lg"},k,{classNames:{error:z.groupErr}},"radio"===f&&{error:null}),l.createElement(d.k,{className:I(z.wrapper)},L.map(e=>l.createElement(m.R,Object.assign({className:"gender-item",size:"sm",classNames:{root:z.itemRoot,labelWrapper:z.itemLabelWrapper,label:z.itemLabel,inner:z.itemInner,body:z.itemBody},key:e.value,value:e.value},A&&e.value!==A&&{disabled:!0},{label:l.createElement(d.k,{gap:(0,s.h)(8),align:"center",justify:"center",sx:{zIndex:0}},"button"===f&&("string"==typeof e.icon?l.createElement("img",{src:e.icon,className:"gender-image",alt:"female",loading:"lazy"}):e.icon),l.createElement(p.T,{size:"p3"},e.label))}))))))}},ex1I:function(e,t,a){a.d(t,{D:function(){return Dropdown}});var n=a("q1tI"),l=a("8vDj"),r=a("rBCA"),i=a("iBNF");let o=r.Z.div` --dropdown-padding: 12px 18px 12px 16px; position: relative; box-sizing: border-box; border: 1px solid ${i.r.colors.gray200}; background: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat; background-position: right 16px center; border-radius: ${i.r.borderRadius}; &[data-disabled='true'], :disabled { background-color: #f2f2f2; cursor: not-allowed; } &[data-size='sm'] { font-size: 13px; line-height: 20px; } &[data-size='md'] { font-size: 14px; line-height: 21px; } &[data-size='lg'] { font-size: 16px; line-height: 24px; } &[data-has-icons='true'] { border: none; background: ${i.r.colors.gray100}; img, svg { display: inline-block; max-width: 16px; margin-right: 6px; } span { display: inline-block; vertical-align: middle; } &:hover { box-shadow: none; } > div { position: relative; display: flex; width: 100%; box-sizing: border-box; align-items: center; } > div::after { position: absolute; top: 50%; right: 12px; width: 10px; height: 8px; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A"); background-repeat: no-repeat; content: ''; transform: translateY(-50%); } } &:hover { box-shadow: 0 0 2px 2px ${e=>e.shadowColor}; } &[data-is-native='true'] { padding: var(--dropdown-padding); line-height: 24px; &:focus { box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor}; } } `,s=r.Z.div` padding: var(--dropdown-padding); cursor: pointer; &.with-label { padding-top: 34px; padding-bottom: 12px; } &[data-dropdown-open] { padding: 11px 15px 11px 15px; border: 1px solid ${e=>e.color}; border-radius: ${i.r.borderRadius}; box-shadow: 0 0 2px 2px ${e=>e.shadowColor}; } `,c=r.Z.ul` position: absolute; top: 100%; /* right: 0; */ min-width: 100%; left: 0; display: block; margin-top: 4px; background: ${i.r.colors.white}; border-radius: ${i.r.borderRadius}; box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001), -2px 2px 5px rgba(67, 86, 100, 0.123689); cursor: pointer; &[data-has-icons='true'] { border: 1px solid ${i.r.colors.gray200}; background: white; box-shadow: none; filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04)); } `,d=r.Z.li` display: flex; padding: 12px 18px 12px 16px; &[data-disabled='true'] { cursor: not-allowed; color: #bfbfbf; & > * { pointer-events: none; } } &:hover, :active { background: ${i.r.colors.gray100}; } `,m=r.Z.div` max-width: 16px; margin-right: 8px; `,u=r.Z.div` position: absolute; top: 12px; left: 16px; pointer-events: none; `,Dropdown=({className:e,value:t,options:a,onChange:r=()=>void 0,id:i,placeholderIcon:p,placeholder:g,style:h,size:b="lg",groupedWithLabel:v,disabled:f,dropdownLabelTrackingAttributes:x={},isNativeSelect:E=!1})=>{let w=(0,l.rZ)(),[y,C]=n.useState(!1),showDropdown=()=>!f&&C(!y);if(E){let e="object"==typeof(null==t?void 0:t.value)&&t.value instanceof Date?t.value.toString():null==t?void 0:t.value;return n.createElement(o,{color:w.fn.primaryColor(),shadowColor:w.colors[w.primaryColor][2],as:"select","data-is-native":"true",value:e||void 0,disabled:f,onChange:e=>{if("string"==typeof e.target.value){let t=a.find(t=>t.value===e.target.value);t&&r(t)}}},g&&n.createElement("option",{value:g,disabled:!0,selected:!0},g),a.map(e=>n.createElement("option",{key:`${i}-${e.value}`,value:e.value,disabled:!!e.disabled&&e.disabled},e.label)))}return n.createElement(o,{color:w.fn.primaryColor(),shadowColor:w.colors[w.primaryColor][2],className:e,"data-dropdown-open":y||void 0,"data-size":b,id:i,"data-has-icons":!!p,style:h,onBlur:()=>C(!1),tabIndex:0,"data-disabled":f},!!v&&n.createElement(u,null,v),n.createElement(s,Object.assign({color:w.fn.primaryColor(),shadowColor:w.colors[w.primaryColor][2],onClick:showDropdown,className:v&&"with-label"},x),p," ",n.createElement("span",null,t&&t.value?t.label:g)),y&&n.createElement(c,{onClick:showDropdown,"data-has-icons":!!p},a.map(e=>n.createElement(d,{key:`${i}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>!e.disabled&&!f&&(null==r?void 0:r(e)),"data-disabled":!!e.disabled&&e.disabled},e.icon&&n.createElement(m,null,e.icon),e.label))))}},MkKI:function(e,t,a){a.d(t,{L:function(){return Logo}});var n=a("q1tI"),l=a("e6f9"),r=a("ipFv"),i=a("rBCA"),o=a("pvoY"),s=a("BEsg"),c=a("D0kt");let d=i.Z.div` position: relative; display: inline-flex; align-items: center; z-index: 0; .main-logo-icon { object-fit: contain; } &[data-logo-is-light] { > svg path { fill: #fff; } img { filter: brightness(0) invert(1); } } &[data-has-badge] { @supports (display: flex) and (gap: 1em) { gap: 0.5rem; } @supports not ((display: flex) and (gap: 1em)) { > img { margin-left: 0.25rem; } } } .common-logo-seasonal-left, .common-logo-seasonal-right { z-index: -1; max-width: unset; max-height: unset; pointer-events: none; } .common-logo-seasonal-left { position: absolute; top: 50%; left: 0; transform: translateY(-50%); pointer-events: none; } .common-logo-seasonal-right { position: absolute; top: 50%; right: 0; transform: translateY(-50%); } &[data-seasonal='christmas'] { padding-left: 37px; padding-right: 22px; .common-logo-seasonal-left { width: 125px; height: 56px; } .common-logo-seasonal-right { width: 23px; height: 17px; } ${o.M.mbDown} { padding-left: 30px; padding-right: 16px; .common-logo-seasonal-left { // width: 125px; height: 46px; } .common-logo-seasonal-right { // width: 23px; height: 12px; } } } &[data-seasonal='new-year'] { padding-right: 85px; .common-logo-seasonal-left { top: 35%; width: 100px; height: 56px; } .common-logo-seasonal-right { width: 85px; height: 54px; } ${o.M.mbDown} { padding-right: 0; .common-logo-seasonal-right { display: none; } } } &[data-seasonal='lunar-new-year'] { padding-left: 30px; padding-right: 35px; .common-logo-seasonal-left { width: 33px; height: 41px; } .common-logo-seasonal-right { width: 37px; height: 54px; } } &[data-seasonal='ramadan'] { &[data-type='hellosehat'] { padding-right: 35px; .common-logo-seasonal-left { width: 165px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 33px; height: unset; } } &[data-type='hellodoktor'] { padding-right: 66px; .common-logo-seasonal-left { width: 133px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 63px; height: unset; } } } &[data-seasonal='hung-king'] { &[data-type='hellobacsi'] { .common-logo-seasonal-left { width: 134px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left { width: 145px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } } &[data-seasonal='vn-independent-day'] { &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { width: unset; height: 56px; left: 65%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { left: 50%; z-index: 1; } } &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { width: unset; height: 56px; left: 60%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { left: 40%; z-index: 1; } } } .desktop-only { ${o.M.mbDown} { display: none; } } .mobile-only { ${o.M.mbUp} { display: none; } } `,m=i.Z.img` height: 16px; width: unset; margin-bottom: 4px; margin-left: -3px; `,isChristmas=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=16&&t<=25},u={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},p=[l.L.Vietnam,l.L.Taiwan,l.L.Indonesia,l.L.Malaysia],isLunarNewYear=e=>{let t=e.getFullYear(),a=u[t];if(!a)return!1;let n=new Date(t,a[1],a[0]),l=new Date(n);l.setDate(n.getDate()-7);let r=new Date(n);return r.setDate(n.getDate()+5),l<=e&&e<=r},isNewYear=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=26||0===a&&t<=15},g=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],isRamadan=e=>{let t=e.getFullYear(),a=g.filter(e=>e.year===t);return!!a.length&&a.some(a=>{let n=a.start[2]||t,l=new Date(n,a.start[1],a.start[0]),r=new Date(n,a.end[1],a.end[0]);return l<=e&&e<=r})},h={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]},isVNHungKing=e=>{let t=e.getFullYear(),a=h[t];if(!a)return!1;let n=new Date(t,a[1],a[0]),l=new Date(n);l.setDate(n.getDate()-1);let r=new Date(n);return r.setDate(n.getDate()+1),l<=e&&e<=r},isVN3004=e=>{let t=e.getFullYear(),a=new Date(t,3,30),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+2),n<=e&&e<=l},isLabourDay=e=>{let t=e.getFullYear(),a=new Date(t,4,1),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+1),n<=e&&e<=l},isVNIndependentDay=e=>{let t=e.getFullYear(),a=new Date(t,8,2),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+1),n<=e&&e<=l},Logo=({type:e,className:t,style:a,isLightLogo:i,customSize:o,badge:u,locale:g,dateForSeasonal:h,isPro:b})=>{let[v,f]=(0,n.useState)({isChristmas:!1,isLunarNewYear:!1,isNewYear:!1,isRamadan:!1,isVNHungKing:!1,isVN3004:!1,isLabourDay:!1,isVNIndependentDay:!1});return(0,n.useEffect)(()=>{if(!h||isNaN(new Date(h).getTime()))return;let e=new Date(h),t=isChristmas(e),a=p.includes(g)&&isLunarNewYear(e),n=!a&&isNewYear(e),r=isRamadan(e),i=g===l.L.Vietnam&&isVNHungKing(e),o=g===l.L.Vietnam&&isVN3004(e),s=g===l.L.Vietnam&&isLabourDay(e),c=g===l.L.Vietnam&&isVNIndependentDay(e);f({isChristmas:t,isLunarNewYear:a,isNewYear:n,isRamadan:r,isVNHungKing:i,isVN3004:o,isLabourDay:s,isVNIndependentDay:c})},[g,new Date(h).getDate()]),n.createElement(d,{className:t,style:a,"data-logo-is-light":i||void 0,"data-has-badge":!!u,"data-seasonal":v.isRamadan?"ramadan":v.isChristmas?"christmas":v.isLunarNewYear?"lunar-new-year":v.isNewYear?"new-year":v.isVNHungKing?"hung-king":v.isVN3004?"30-04":v.isLabourDay?"labour-day":v.isVNIndependentDay?"vn-independent-day":void 0,"data-type":e},v.isChristmas?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left xmas logo",src:r.C.getAssetPath("logo/xmas-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right xmas logo",src:r.C.getAssetPath("logo/xmas-right.png"),className:"common-logo-seasonal-right"})):v.isNewYear?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left new year logo",src:r.C.getAssetPath("logo/new-year-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right new year logo",src:r.C.getAssetPath("logo/new-year-right.png"),className:"common-logo-seasonal-right"})):v.isLunarNewYear?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left lunar new year logo",loading:"lazy",src:r.C.getAssetPath("logo/lunar-new-year-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right lunar new year logo",loading:"lazy",src:r.C.getAssetPath("logo/lunar-new-year-right.png"),className:"common-logo-seasonal-right"})):v.isRamadan&&"hellosehat"===e?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-sehat-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-sehat-right.png"),className:"common-logo-seasonal-right"})):v.isRamadan&&"hellodoktor"===e?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-doktor-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-doktor-right.png"),className:"common-logo-seasonal-right"})):v.isVNHungKing&&("hellobacsi"===e||"marryBaby"===e)?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"Hung King logo",loading:"lazy",src:r.C.getAssetPath("logo/hung-king-bg.png"),className:"common-logo-seasonal-left"})):v.isVNIndependentDay&&("hellobacsi"===e||"marryBaby"===e)?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:r.C.getAssetPath("logo/vn-independence-desktop.png"),className:"common-logo-seasonal-left desktop-only"}),n.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:r.C.getAssetPath("logo/vn-independence-mobile.png"),className:"common-logo-seasonal-left mobile-only"})):null,n.createElement(s.L,{type:e,width:null==o?void 0:o.width,height:null==o?void 0:o.height,isLight:i}),b?n.createElement(m,{src:r.C.getAssetPath("logo/pro-suffix.svg")}):null,u)}},P0e6:function(e,t,a){a.d(t,{T:function(){return Tabs}});var n=a("usZY"),l=a("q1tI"),r=a("5Q4Z"),i=a("iZ8j"),o=a("/npG"),s=a("mYVa"),c=a("rlLN"),d=a("vaps"),m=a("5bY3"),u=a("srUE"),p=(0,o.k)((e,t)=>{let{variant:a}=t,n={content:"none",top:0,bottom:0,zIndex:1,width:(0,s.h)(56)};return Object.assign({},"inline"===a&&{root:{},tabsList:{gap:(0,s.h)(24),borderBottom:"none",flexWrap:"nowrap"},tab:{padding:`${(0,s.h)(8)} 0`,color:e.colors.gray[4],borderColor:"transparent",borderBottomWidth:(0,s.h)(2),marginBottom:(0,s.h)(-1),transition:"border 0.2s ease","&:hover":{backgroundColor:"initial",borderColor:"transparent"},"&[data-active='true']":{color:e.fn.primaryColor(),borderColor:e.fn.primaryColor()}},tabRightSection:{},tabLabel:{},tabIcon:{},panel:{},scrollArea:{position:"relative","&.prev-bg":{"&:before":Object.assign(Object.assign({},n),{content:'""',position:"absolute",left:0,background:"linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)"})},"&.next-bg":{"&:after":Object.assign(Object.assign({},n),{content:'""',position:"absolute",right:0,background:"linear-gradient(90deg, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%)"})}},list:{borderBottom:`1px solid ${e.colors.neutral[1]}`},btn:{position:"absolute",top:"50%",zIndex:2,transform:"translate(0, -50%)",width:(0,s.h)(28),height:(0,s.h)(28),padding:0,background:"white",borderRadius:"50%",cursor:"pointer",filter:"drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04)) drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04))",".mantine-Button-icon":{display:"flex",alignItems:"center",justifyContent:"center"},"&.disabled":{opacity:0,zIndex:0}},prevBtn:{left:0},nextBtn:{right:0}})});let Tabs=e=>{var t,{variant:a="inline",value:o,styles:s,children:g,dataList:h=[],tabProps:b,listProps:v,panelProps:f,TabComponentDisplay:x,startPadding:E=40,defaultValue:w}=e,y=(0,n._)(e,["variant","value","styles","children","dataList","tabProps","listProps","panelProps","TabComponentDisplay","startPadding","defaultValue"]);let{cx:C,classes:k}=p({variant:a},{name:"Tabs",styles:s}),N=(0,l.useRef)(null),z=(0,l.useRef)([]),[I,S]=(0,l.useState)(w||(null===(t=null==h?void 0:h[0])||void 0===t?void 0:t.value)),[T,A]=(0,l.useState)(0),[D,j]=(0,l.useState)(!1),[P,$]=(0,l.useState)(!0),[L,B]=(0,l.useState)({x:0,y:0}),O=(0,l.useRef)(null),F=Object.assign({defaultValue:w,classNames:k},g?{value:o}:{value:I,onTabChange:e=>S(e)});(0,l.useEffect)(()=>{S(o)},[o]),(0,l.useEffect)(()=>{var e,t,a;null===(e=O.current)||void 0===e||e.scrollTo({left:(null===(a=null===(t=null==z?void 0:z.current)||void 0===t?void 0:t[T])||void 0===a?void 0:a.offsetLeft)-E,behavior:"smooth"})},[T]),(0,l.useEffect)(()=>{A(h.findIndex(e=>e.value==I))},[I]),(0,l.useEffect)(()=>{var e,t;$(0===L.x),j((null===(e=null==O?void 0:O.current)||void 0===e?void 0:e.clientWidth)+L.x===(null===(t=null==O?void 0:O.current)||void 0===t?void 0:t.scrollWidth))},[L]);let TabTextComponent=({text:e,dataEventCategory:t,dataEventAction:a,dataEventLabel:n})=>x?l.createElement(x,null,e):l.createElement(u.T,{size:"s3",color:"inherit",weight:"semiBold","data-event-category":t,"data-event-action":a,"data-event-label":n},e);return l.createElement(c.m,Object.assign({},F,y),g||l.createElement(l.Fragment,null,l.createElement(d.x,{className:C(k.scrollArea,`${P?"":"prev-bg"} ${D?"":"next-bg"}`),scrollbarSize:0,viewportRef:O,onScrollPositionChange:B},l.createElement(c.m.List,Object.assign({className:k.list,ref:N},v),h.map((e,t)=>l.createElement(c.m.Tab,Object.assign({ref:e=>z.current[t]=e,className:k.tab,key:String(e.value),value:String(e.value)},b),l.createElement(TabTextComponent,Object.assign({},e))))),l.createElement(m.B,{className:C(k.btn,k.prevBtn,P?"disabled":""),unstyled:!0,onClick:()=>A(T-1>-1?T-1:0),leftIcon:l.createElement(r.Z,{size:16})}),l.createElement(m.B,{className:C(k.btn,k.nextBtn,D?"disabled":""),unstyled:!0,onClick:()=>A(T+1l.createElement(c.m.Panel,Object.assign({value:String(e.value),key:String(e.value)},f),e.content))))};Tabs.List=c.m.List,Tabs.Tab=c.m.Tab,Tabs.Panel=c.m.Panel},Qcqv: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 n=a("q1tI"),l=a("rCoo"),r=a("dgD7"),i=a("/npG"),o=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),m=a("Wgwc"),u=a.n(m),p=a("QgiU"),g=a.n(p),h=a("FQi+"),b=a("pvoY"),v=a("EUHu"),f=a("xt28"),x=a("usZY"),E=a("jvlS"),w=a("D0kt"),y=a("ipFv"),C=a("XAIn"),k=a("d53r"),N=a("srUE"),z=a("iBNF"),I=a("rBCA"),S=a("IQVP"),T=a("hVVU"),A=a("6Dmq"),D=a("/M6t"),j=a("xrdX");let MainText=({children:e,className:t=""})=>n.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>n.createElement("div",{className:`uDcqD-2 ${t}`},e);var P={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:l,className:r="",style:i,onAvatarClick:o,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:m})=>n.createElement("div",{className:`${P.container} ${r}`,style:i},n.createElement("div",{className:P.avatarWrapper,onClick:o,"data-event-category":c,"data-event-action":d,"data-event-label":m},n.createElement(E.U,Object.assign({},e)),s&&n.createElement("div",{className:P.avatarIcon},s)),n.createElement("div",{className:`${P.info} ${r}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},l||n.createElement(n.Fragment,null,t&&n.createElement(MainText,null,t),a&&n.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>n.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>n.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>n.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>n.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,l=(0,x._)(e,["children","className"]);return n.createElement("div",Object.assign({className:`pDlsows ${a}`},l),t)};var $=(0,i.k)(()=>({root:{verticalAlign:"bottom"}}));let L=(0,n.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:l,siteType:r,title:i}=(0,n.useContext)(L),{cx:o,classes:s}=$(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return l?n.createElement(v.A,{className:o(s.root,t),siteType:r,role:l,title:i}):null};var B=(0,i.k)(()=>({root:{}}));let O=I.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${z.r.colors.white}; border-radius: ${z.r.borderRadius}; box-shadow: 0px 0px 4px ${z.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${b.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 { ${b.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: ${z.r.colors.primary50}; border-radius: ${z.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,F=I.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; } `,M=I.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; } `,_=I.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; } `,R=I.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var Z="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='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:l,locale:r,isMobile:i,overwriteProfileProps:o,avatarFallback:s=y.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,m,u;let{t:p}=(0,h.u)(),[g,b]=(0,n.useState)(null),[v,f]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(e&&l&&String(null==g?void 0:g.id)!==String(l)){f(!0);try{b(null),(0,C.c)((0,C.g)(S.tC.GET_DOCTOR_INFO,{doctorId:l,website_url:C.l[r]}),"get").then(e=>{b(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),o))})}catch(e){console.error(e)}f(!1)}},[e,l,null==g?void 0:g.id]);let x=(null==g?void 0:g.experiences)||[],E=(null==g?void 0:g.specialties)||[],I=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 n.createElement(n.Fragment,null,n.createElement(O,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},v||!g?n.createElement(T.L,null):n.createElement("div",{className:"popup-content"},n.createElement("div",{className:"close-button",onClick:t},n.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),n.createElement("div",{className:"main-info"},n.createElement("div",{className:"border-banner"}),n.createElement("div",{className:"avatar-title"},n.createElement(M,null,n.createElement("div",{className:"image-container"},n.createElement("div",{style:{position:"relative"}},n.createElement(w.I,{src:null==g?void 0:g.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),n.createElement("img",{className:"badge-avatar",src:H,alt:"badge",loading:"lazy"})))),n.createElement(_,null,n.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==g?void 0:g.name),n.createElement("div",{className:"specialty"},I&&n.createElement(n.Fragment,null,n.createElement(N.T,{size:"p4",color:z.r.colors.gray800},I," • ")),n.createElement("a",{href:(0,C.m)({id:null===(d=null==g?void 0:g.organization)||void 0===d?void 0:d.id,name:null===(m=null==g?void 0:g.organization)||void 0===m?void 0:m.name,slug:null===(u=null==g?void 0:g.organization)||void 0===u?void 0:u.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},n.createElement(N.T,{size:"p4",className:"organisation",color:z.r.colors.gray800,style:{textDecoration:"underline"}},null==g?void 0:g.organization.name))))),!i&&n.createElement("div",{className:"btn-wrapper"},n.createElement("a",{href:(0,C.n)({name:g.name,id:g.id,locale:r})},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment"))))),A&&n.createElement(_,null,n.createElement("div",{className:"experience"},n.createElement(N.T,{weight:"bold",size:"s3",color:z.r.colors.gray800,style:{paddingBottom:16}},p("expert.content.description").toUpperCase()),n.createElement(R,null,A.map((e,t)=>n.createElement("li",{key:t},n.createElement(N.T,{size:"p2"},renderExperienceText(e))))),i?n.createElement("div",{className:"btn-wrapper"},n.createElement("a",{href:(0,C.n)({name:g.name,id:g.id,locale:r})},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},p("careBooking.bookAnAppointment")))):n.createElement("a",{href:(0,C.n)({name:g.name,id:g.id,locale:r})},n.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,C.k)(r)+(0,C.n)({name:g.name,id:g.id,locale:r})},p("home.seeExpert"))))))),n.createElement(F,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},V=I.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${z.r.colors.white}; border-radius: ${z.r.borderRadius}; box-shadow: 0px 0px 4px ${z.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${b.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 { ${b.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: ${z.r.colors.primary50}; border-radius: ${z.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,U=I.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=I.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; } `,q=I.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=I.Z.div` display: flex; margin-top: 8px; .bullet-point { width: 24px; height: 24px; } `;var Q="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:Q,edtior:Q,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:H},PopupExpert=({trackingCategory:e="Together",locale:t,isOpen:a=!0,onClose:l,enableAnimation:r=!0,expertId:i,overwriteProfileProps:o,avatarFallback:s=y.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,h.u)(),[d,m]=(0,n.useState)(null),[u,p]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(a&&i&&String(null==d?void 0:d.user_id)!==String(i)){p(!0);try{m(null),(0,C.c)((0,C.o)(S.D9.GET_EXPERT_BY_ID,{id:i}),"get").then(e=>{m(Object.assign(Object.assign({},null==e?void 0:e.data),o))})}catch(e){console.error(e)}p(!1)}},[a,i,null==d?void 0:d.user_id]),n.createElement(n.Fragment,null,n.createElement(V,{"data-open":a,"data-animation":r,onClick:e=>e.stopPropagation()},u||!d?n.createElement(T.L,null):n.createElement("div",{className:"popup-content"},n.createElement("div",{className:"close-button",onClick:l},n.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),n.createElement("div",{className:"main-info"},n.createElement("div",{className:"border-banner"}),n.createElement("div",{className:"avatar-title"},n.createElement(Y,null,n.createElement("div",{className:"image-container"},n.createElement("div",{style:{position:"relative"}},n.createElement(w.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),n.createElement("img",{className:"badge-avatar",src:G[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),n.createElement(q,null,n.createElement(N.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),n.createElement("div",null,n.createElement(N.T,{size:"p4",color:z.r.colors.gray800},null==d?void 0:d.specialty," • "),n.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},n.createElement(N.T,{size:"p4",className:"organisation",color:z.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),n.createElement(q,null,n.createElement("div",{className:"experience"},n.createElement(N.T,{weight:"bold",size:"p4",color:z.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),n.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>n.createElement(W,{key:t},n.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"}),n.createElement("div",{className:"text-contain"},n.createElement(A.H,{tag:"h6",color:z.r.colors.gray800},null==e?void 0:e.title),n.createElement(N.T,{size:"p2",color:z.r.colors.gray500},null==e?void 0:e.organization))))),n.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},n.createElement(N.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,C.k)(t)+(null==d?void 0:d.profile_url)},c("home.seeExpert"))))))),n.createElement(U,{"data-open":a,onClick:e=>{e.stopPropagation(),l()}}))},K=I.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${z.r.colors.white}; border-radius: ${z.r.borderRadius}; box-shadow: 0px 0px 4px ${z.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; ${b.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 { ${b.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: ${z.r.colors.primary50}; border-radius: ${z.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,J=I.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=I.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=I.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:l,locale:r,isMobile:i,overwriteProfileProps:o,avatarFallback:s=y.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,h.u)(),[m,u]=(0,n.useState)(null),[p,g]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(e&&l&&String(null==m?void 0:m.id)!==String(l)){g(!0);try{u(null),(0,C.c)((0,C.g)(S.tC.GET_HOSPITAL_INFO,{hospital_branch_id:l,website_url:C.l[r]}),"get").then(e=>{u(Object.assign(Object.assign({},null==e?void 0:e._data.branch),o))})}catch(e){console.error(e)}g(!1)}},[e,l,null==m?void 0:m.id]);let b=(null==m?void 0:m.specialties)||[],v=(0,n.useMemo)(()=>b.map(e=>e.name),[b]);return n.createElement(n.Fragment,null,n.createElement(K,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},p||!m?n.createElement(T.L,null):n.createElement("div",{className:"popup-content"},n.createElement("div",{className:"close-button",onClick:t},n.createElement("img",{src:Z,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),n.createElement("div",{className:"main-info"},n.createElement("div",{className:"border-banner"}),n.createElement("div",{className:"avatar-title"},n.createElement(X,null,n.createElement("div",{className:"image-container"},n.createElement("div",{style:{position:"relative"}},n.createElement(w.I,{src:null==m?void 0:m.logo,className:"profile-image",alt:"avatar",backupSrc:s}),n.createElement("img",{className:"badge-avatar",src:H,alt:"badge",loading:"lazy"})))),n.createElement(ee,null,n.createElement(N.T,{size:"s3",weight:"semiBold",className:"full-name"},null==m?void 0:m.name),n.createElement("div",{className:"specialty"},b&&n.createElement(N.T,{size:"p4",color:z.r.colors.gray800},v.join(" • "),"•"),n.createElement("a",{href:(0,C.m)({id:m.id,name:m.name,slug:m.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},n.createElement(N.T,{size:"p4",className:"organisation",color:z.r.colors.gray800,style:{textDecoration:"underline"}},null==m?void 0:m.name))))),!i&&n.createElement("a",{href:(0,C.m)({id:m.id,name:m.name,slug:m.slug,locale:r})},n.createElement("div",{className:"btn-wrapper"},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),n.createElement(ee,null,n.createElement("div",{className:"experience"},n.createElement(N.T,{weight:"bold",size:"s3",color:z.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),n.createElement(N.T,{size:"p2",color:z.r.colors.gray500},m.about),i?n.createElement("a",{href:(0,C.m)({id:m.id,name:m.name,slug:m.slug,locale:r})},n.createElement("div",{className:"btn-wrapper"},n.createElement(k.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):n.createElement("a",{href:(0,C.m)({id:m.id,name:m.name,slug:m.slug,locale:r})},n.createElement(N.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":c,"data-event-action":"See Full Hospital Profile","data-event-label":(0,C.k)(r)+(0,C.m)({id:m.id,name:m.name,slug:m.slug,locale:r})},d("home.seeHospital"))))))),n.createElement(J,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:l})=>{let{t:r}=(0,h.u)();return n.createElement(D.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}}},l),a)};u().extend(g());let CardAuthor=e=>{let{className:t="",community:i,name:m,username:u,url:p,avatar:g,role:x,title:E,userType:k="user",expertId:N,specialty:I,organisation:S,isMarryBaby:T,doctorId:A,hospitalId:D,hasQuickBooking:P,handleMakeAppointment:$,communityTrackingAttr:O,isAnonymous:F,showDetailPopup:M,showChatbotButton:_=!1,subLine:R,authActionWrapper:Z,profileProps:H,profileModalProps:V,extendEle:U,avatarProps:Y,hideInfo:q,timeText:W,onCloseFromPost:Q,onChatWithBot:G,avatarIcon:K,badgeIconSize:J,hideBackground:X,children:ee,styles:et,dataEventCategory:ea,dataEventAction:en,dataEventLabel:el}=e,{data:{locale:er,router:ei,env:{isMarryBaby:eo,togetherBasePath:es}}}=(0,n.useContext)(C.T),{isMobile:ec}=(0,w.u)(),{t:ed}=(0,h.u)(),{classes:em}=B(void 0,{name:"CardAuthor",styles:et}),eu="boolean"==typeof T?T:eo,ep=eu?"marryBaby":"helloSites",eg=F?ed("cardPost.anonymous"):m||u||"",eh=F?y.C.getAssetPath("avatar.jpg"):g,eb=F?void 0:x,[ev,ef]=(0,n.useState)(!1),{asPath:ex}=ei||{},eE=`https://${j.v[er]}${ex}`,onAuthorClick=()=>{if(F)return!1;M?ey(!0):p&&(window.location.href=p)};(0,n.useEffect)(()=>{(0,b.t)(ev)},[ev]);let[ew,ey]=(0,n.useState)(!1),eC=(null==e?void 0:e.role)==="expert",ek=!!(A||D),eN=["expert"===eb&&S&&n.createElement("span",null,S),"expert"===eb&&I&&n.createElement("span",null,I),!("expert"===eb&&I&&S)&&(null==i?void 0:i.name)&&n.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&&n.createElement("span",null,W)].filter(Boolean),[ez,eI]=(0,n.useState)(null);return(0,n.useEffect)(()=>{ew&&!ez&&("chatbot"===k?Promise.all([a.e(5231),a.e(1500),a.e(7797),a.e(5454),a.e(5481),a.e(2354),a.e(9803),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(1873),a.e(336),a.e(4584),a.e(4447),a.e(6509),a.e(6404),a.e(4125),a.e(6874),a.e(7730),a.e(891),a.e(4072),a.e(4414),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,"dHB8")).then(e=>{eI(()=>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(1500),a.e(7797),a.e(5454),a.e(5481),a.e(2354),a.e(9803),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(1873),a.e(336),a.e(4584),a.e(4447),a.e(6509),a.e(6404),a.e(4125),a.e(6874),a.e(7730),a.e(891),a.e(4072),a.e(4414),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=>{eI(()=>e.ProfileDetail)}))},[ew,k]),n.createElement(L.Provider,{value:{displayName:eg,title:E,role:eb,siteType:ep,handleMakeAppointment:$,doctorId:A,hospitalId:D,currentUrl:eE}},n.createElement(ProfileDetailModal,{open:ew,onClose:()=>ey(!1),profileModalProps:V},ez&&n.createElement(ez,Object.assign({currentPageUrl:el,authActionWrapper:Z,onCloseFromPost:()=>{ey(!1),null==Q||Q()},onChatWithBot:G},H,{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:A,hospitalId:D,hasQuickBooking:P,userType:k},null==H?void 0:H.authorProps)}))),"expert"===eb&&N?n.createElement(PopupExpert,{isOpen:ev,onClose:()=>ef(!1),expertId:N}):null,"expert"===eb&&A?n.createElement(PopupDoctor,{isOpen:ev,onClose:()=>ef(!1),doctorId:A,locale:er}):null,"expert"===eb&&D?n.createElement(PopupHospital,{isOpen:ev,onClose:()=>ef(!1),hospitalId:D,locale:er}):null,n.createElement("div",{className:`hhg-card-author ${em.root} ${t} ${eC?"expert-author":""}`,"data-background":!X&&eC,"data-is-marrybaby":eu},n.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:en,dataEventLabel:el,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:F?y.C.getAssetPath(eu?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eh,username:eg},Y),{style:{cursor:!F&&(p||M)?"pointer":"default"}}),avatarIcon:K||eC&&n.createElement(l.Z,{size:J||15})},ee?n.createElement("div",{onClick:onAuthorClick},ee):!q&&n.createElement(CardAuthor$1.Row,null,n.createElement(CardAuthor$1.ColLeft,null,n.createElement(s.k,{align:"center",onClick:onAuthorClick},n.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},eg,"chatbot"===k?n.createElement(n.Fragment,null," ",n.createElement(r.Z,{color:z.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),_&&n.createElement("div",{style:{marginTop:"8px"}},n.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:n.createElement(f.I.App,{size:16}),onClick:()=>{null==G||G()}},ed("chatbot.with.me")))):n.createElement(AuthorBadgeItem,null))),R||n.createElement(CardAuthor$1.SubTextRow,{style:P?{position:"relative"}:{}},eN.map((e,t)=>n.createElement(n.Fragment,null,0!==t&&n.createElement(CardAuthor$1.SubDivider,null),n.createElement(CardAuthor$1.SubText,null,e))),P&&ek&&n.createElement(o.x,{sx:{marginTop:(0,d.h)(5)}},n.createElement(v.B,{bookingId:A||D,bookingType:A?"doctor":D?"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,n.useContext)(L);return n.createElement(o.x,null,e)}},UHMz:function(e,t,a){a.d(t,{B:function(){return BtnChoice}});var n=a("q1tI"),l=a("5bY3"),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,n.useState)(e);return(0,n.useEffect)(()=>{s(e)},[e]),n.createElement(i,{className:a},t.map((e,t)=>n.createElement(l.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||"")))}},cwNN:function(e,t,a){a.d(t,{T:function(){return TextDivider}});var n=a("q1tI"),l=a("rBCA"),r=a("HesN"),i=a("srUE");let o=l.Z.div` background-color: var(--neutral50); padding: 12px 0; box-shadow: inset 0px 1px 0px #e4e8ec; > * { display: grid; grid-template-columns: 32px 1fr; align-content: center; p { font-weight: 600; } } .icon-wrapper { display: flex; align-items: center; } `,TextDivider=({children:e,icon:t,className:a,style:l})=>n.createElement(o,{style:l,className:a},n.createElement(r.C,null,n.createElement("div",{className:"icon-wrapper"},t),n.createElement(i.T,{size:"c1",color:"var(--neutral800)"},e)))},BF61:function(e,t,a){a.d(t,{B:function(){return BmiForm},H:function(){return T},N:function(){return NewsletterCheckbox},Q:function(){return Question1Label},a:function(){return Question2Label},b:function(){return Question2Description}});var n=a("usZY"),l=a("q1tI"),r=a("wUmw"),i=a("gcJ3"),o=a("ORpR"),s=a("/npG"),c=a("SPK5"),d=a("Eso5"),m=a("C/sX"),u=a("iuhU"),p=a("mYVa"),g=a("OAL+"),h=a("MQ5V"),b=a("srUE"),v=a("COU7"),f=a("FQi+"),x=a("WdVV"),E=a("68DG"),w=a("dOyR"),y=a("e6f9"),C=a("xrdX"),k=a("mx4j");let Question1Label=e=>{var{LabelWrapper:t}=e,a=(0,n._)(e,["LabelWrapper"]);let{t:r}=(0,f.u)(),i=t?{}:Object.assign({size:"p2"},a),o=t||b.T;return l.createElement(o,Object.assign({},i),r("bmi.question.weightLossSupport"))},Question2Label=e=>{var{LabelWrapper:t}=e,a=(0,n._)(e,["LabelWrapper"]);let{t:r}=(0,f.u)(),i=t?{}:Object.assign({size:"p2"},a),o=t||b.T;return l.createElement(o,Object.assign({},i),r("bmi.question.glp1Awareness"))},Question2Description=e=>{var{LabelWrapper:t}=e,a=(0,n._)(e,["LabelWrapper"]);let{t:r}=(0,f.u)(),i=t?{}:Object.assign({size:"p2"},a),o=t||b.T;return l.createElement(o,Object.assign({},i),r("bmi.question.glp1Awareness.desc"))},N=(0,l.createContext)({});var z=(0,s.k)(()=>({label:{marginTop:2,cursor:"pointer",userSelect:"none"}}));let NewsletterCheckbox=e=>{var{labelTextProps:t,checked:a,LabelWrapper:r,useCollapse:i=!0}=e,o=(0,n._)(e,["labelTextProps","checked","LabelWrapper","useCollapse"]);let{t:s}=(0,f.u)(),[m,u]=(0,l.useState)(!i),[p,g]=(0,l.useState)(!0),[v,x]=(0,l.useState)(a),E=r?{}:Object.assign({size:"p3"},t),w=r||b.T,{classes:y}=z(void 0,{name:"NewsletterCheckbox"});return l.createElement(c.k,{gap:8,align:"flex-start"},l.createElement(h.d,Object.assign({},o,{label:void 0,size:"sm",checked:v,onChange:e=>{p?g(!1):x(e.currentTarget.checked)},styles:{labelWrapper:{display:"none"}}})),l.createElement(d.x,null,l.createElement(w,Object.assign({},E,{onClick:()=>{i&&u(e=>!e)},className:y.label,lineClamp:m?void 0:1}),s("bmi.newsletter.label"))))},DefaultForm=e=>{var t,a,i,o,s,p,g;let{t:b,locale:v}=(0,f.u)(),{classes:w={}}=(0,l.useContext)(E.C),{control:k,bmiGenerated:z,linkTool:I,submitProps:S,withAdditionalQuestion:A,classes:D={}}=(0,l.useContext)(N),j={body:{alignItems:"center"}};return l.createElement(x.H,Object.assign({formLayout:"default"},e),l.createElement(T,{isMobile:e.isMobile,gutter:4},l.createElement(T.Row,{px:16},l.createElement(T.Col,{span:12},l.createElement(r.Qr,{name:"gender",control:k,rules:null===(t=z.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>l.createElement("div",null,l.createElement(T.GenderControl,{LabelWrapper:T.Label,error:void 0,onChange:e,gap:4}),(null==t?void 0:t.message)&&l.createElement(T.Error,{label:t.message}))})),l.createElement(T.Col,{span:12},l.createElement(r.Qr,{name:"age",control:k,rules:null===(a=z.age)||void 0===a?void 0:a.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(T.InputNumber,{label:l.createElement(T.Label,null,b("bmi.ageInput")),placeholder:b("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:a,min:0,rightSection:b("bmi.ageInput.desc"),classNames:{rightSection:D.inputRightSection}}),(null==n?void 0:n.message)&&l.createElement(T.Error,{label:n.message}))})),l.createElement(T.Col,{span:12},l.createElement(r.Qr,{name:"height",control:k,rules:null===(i=z.height)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(T.InputNumber,{label:l.createElement(T.Label,null,b("bmi.heightInput")),rightSection:b("bmi.heightInput.desc"),placeholder:b("tools.inputPlaceholder",{content:v===y.L.Myanmar?6:170}),name:e,value:t,onChange:a,min:0,classNames:{rightSection:D.inputRightSection}}),(null==n?void 0:n.message)&&l.createElement(T.Error,{label:n.message}))})),l.createElement(T.Col,{span:12},l.createElement(r.Qr,{name:"weight",control:k,rules:null===(o=z.weight)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(T.InputNumber,{label:l.createElement(T.Label,null,b("bmi.weightInput")),rightSection:b("bmi.weightInput.desc"),placeholder:b("tools.inputPlaceholder",{content:v===y.L.Myanmar?130:60}),name:e,value:t,onChange:a,precision:1,min:0,classNames:{rightSection:D.inputRightSection}}),(null==n?void 0:n.message)&&l.createElement(T.Error,{label:n.message}))}))),A?l.createElement(l.Fragment,null,l.createElement(m.r,{gutter:4,px:16},l.createElement(T.Col,null,l.createElement(r.Qr,{name:"question1",control:k,rules:null===(s=z.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(h.R.Group,{name:a,value:e,onChange:t,sx:{flex:1},label:l.createElement(Question1Label,{LabelWrapper:T.Label}),size:"lg"},l.createElement(c.k,{gap:"lg"},l.createElement(h.R,{size:"sm",value:"1",label:l.createElement(T.OptionLabel,null,b("switchBtn.yes")),styles:j}),l.createElement(h.R,{size:"sm",value:"0",label:l.createElement(T.OptionLabel,null,b("switchBtn.no")),styles:j}))),(null==n?void 0:n.message)&&l.createElement(T.Error,{label:n.message}))})),l.createElement(T.Col,null,l.createElement(r.Qr,{name:"question2",control:k,rules:null===(p=z.question2)||void 0===p?void 0:p.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(h.R.Group,{name:e,value:t,onChange:a,sx:{flex:1},label:l.createElement(Question2Label,{LabelWrapper:T.Label}),size:"lg",description:v!==y.L.Malaysia&&l.createElement(Question2Description,{LabelWrapper:T.SubLabel})},l.createElement(c.k,{gap:"lg"},l.createElement(h.R,{size:"sm",value:"1",label:l.createElement(T.OptionLabel,null,b("switchBtn.yes")),styles:j}),l.createElement(h.R,{size:"sm",value:"0",label:l.createElement(T.OptionLabel,null,b("switchBtn.no")),styles:j}))),(null==n?void 0:n.message)&&l.createElement(T.Error,{label:n.message}))}))),l.createElement(d.x,{className:(0,u.default)(D.newsletterBlock,w.newsletterBlock)},l.createElement(m.r,{gutter:8,px:16,py:12},l.createElement(T.Col,null,l.createElement(r.Qr,{name:"newsletter",control:k,rules:null===(g=z.newsletter)||void 0===g?void 0:g.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:i}=t,o=(0,n._)(t,["value","onChange","name"]);return l.createElement(NewsletterCheckbox,Object.assign({size:"sm",onChange:e=>r(e.currentTarget.checked),name:i,checked:!!a},o))}})),l.createElement(T.Col,null,l.createElement(x.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${C.v[v]}/${I}`,type:"submit",fullWidth:!0},S),b("bmi.submit")))))):l.createElement(d.x,{px:16,sx:{paddingBottom:8}},l.createElement(x.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${C.v[v]}/${I}`,type:"submit",fullWidth:!0},S),b("bmi.submit")))))};var I=(0,s.k)(e=>({newsletterBlock:{backgroundColor:e.colors.neutral[0],borderBottomLeftRadius:"inherit",borderBottomRightRadius:"inherit",".bmi-btn":{marginTop:0}},inputRightSection:{fontSize:(0,p.h)(13),lineHeight:(0,p.h)(24),color:e.colors.gray[4],justifyContent:"flex-end",paddingRight:8,whiteSpace:"nowrap"}}));let InlineForm=e=>{var t,a,i,o,s,m,v,k;let{t:z,locale:I}=(0,f.u)(),{control:S,bmiGenerated:T,isTouched:A,linkTool:D,submitProps:j,withAdditionalQuestion:P}=(0,l.useContext)(N),{classes:$={},variant:L}=(0,l.useContext)(E.C),{classes:B={}}=(0,l.useContext)(N);return l.createElement(x.H,Object.assign({formLayout:"inline"},e),l.createElement(r.Qr,{name:"gender",control:S,rules:null===(t=T.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:z("tools.selectGender"),width:"none",errorMess:A&&(null==t?void 0:t.message)},l.createElement(w.G,{type:"radio",hideLabel:!0,error:A?l.createElement(l.Fragment,null):"",onChange:e})))}),l.createElement(r.Qr,{name:"age",control:S,rules:null===(a=T.age)||void 0===a?void 0:a.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:z("bmi.ageInput"),errorMess:A&&(null==n?void 0:n.message)},l.createElement(h.I.Number,{placeholder:z("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:a,error:A&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",min:0,rightSection:l.createElement(x.H.Unit,null,z("tools.yearsOld")),styles:()=>({rightSection:{width:"auto"}})})))}),l.createElement(r.Qr,{name:"height",control:S,rules:null===(i=T.height)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:z("bmi.heightInput"),errorMess:A&&(null==n?void 0:n.message)},l.createElement(h.I.Number,{placeholder:z("tools.inputPlaceholder",{content:I===y.L.Myanmar?6:170}),name:e,value:t,onChange:a,min:0,error:A&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",rightSection:l.createElement(x.H.Unit,null,z("bmi.heightInput.desc"))})))}),l.createElement(r.Qr,{name:"weight",control:S,rules:null===(o=T.weight)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:z("bmi.weightInput"),errorMess:A&&(null==n?void 0:n.message)},l.createElement(h.I.Number,{placeholder:z("tools.inputPlaceholder",{content:I===y.L.Myanmar?130:60}),name:e,value:t,onChange:a,error:A&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",precision:1,min:0,rightSection:l.createElement(x.H.Unit,null,z("bmi.weightInput.desc"))})))}),P?l.createElement(l.Fragment,null,l.createElement(r.Qr,{name:"question1",control:S,rules:null===(s=T.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:a},fieldState:{error:n}})=>l.createElement(x.H.FormRow,null,l.createElement(h.R.Group,{name:a,value:e,onChange:t,sx:{flex:1},label:l.createElement(b.T,{size:"s4",weight:"semiBold",span:!0},z("bmi.question.weightLossSupport")),size:"lg"},l.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,p.h)(8)}},l.createElement(h.R,{size:"sm",value:"1",label:z("switchBtn.yes")}),l.createElement(h.R,{size:"sm",value:"0",label:z("switchBtn.no")}))),A&&(null==n?void 0:n.message)&&l.createElement(h.e,{label:n.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),l.createElement(r.Qr,{name:"question2",control:S,rules:null===(m=T.question2)||void 0===m?void 0:m.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(x.H.FormRow,null,l.createElement(h.R.Group,{name:e,value:t,onChange:a,sx:{flex:1},label:l.createElement(b.T,{size:"s4",weight:"semiBold",span:!0},z("bmi.question.glp1Awareness")),size:"lg",description:I!==y.L.Malaysia&&l.createElement(b.T,{style:{fontSize:"10px"},span:!0},z("bmi.question.glp1Awareness.desc"))},l.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,p.h)(8)}},l.createElement(h.R,{size:"sm",value:"1",label:z("switchBtn.yes")}),l.createElement(h.R,{size:"sm",value:"0",label:z("switchBtn.no")}))),A&&(null==n?void 0:n.message)&&l.createElement(h.e,{label:n.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),"gray"===L||"violet"===L?l.createElement(l.Fragment,null,l.createElement(r.Qr,{name:"newsletter",control:S,rules:null===(v=T.newsletter)||void 0===v?void 0:v.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:i}=t,o=(0,n._)(t,["value","onChange","name"]);return l.createElement(x.H.FormRow,null,l.createElement(h.d,Object.assign({size:"sm",label:l.createElement(b.T,{size:"p3"},z("bmi.newsletter.label")),onChange:e=>r(e.currentTarget.checked),name:i,checked:!!a},o)))}}),l.createElement(x.H.FormRow,{className:(0,u.default)($.submitWrapper)},l.createElement(x.H.Submit,Object.assign({className:(0,u.default)("bmi-btn bmi--btn-submit",$.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${C.v[I]}/${D}`,type:"submit"},j),z("bmi.submit")))):l.createElement(x.H.FormRow,{py:16,className:(0,u.default)(B.newsletterBlock,$.newsletterBlock)},l.createElement(g.K,{spacing:16},l.createElement(r.Qr,{name:"newsletter",control:S,rules:null===(k=T.newsletter)||void 0===k?void 0:k.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:i}=t,o=(0,n._)(t,["value","onChange","name"]);return l.createElement(NewsletterCheckbox,Object.assign({size:"sm",labelTextProps:{size:"p4"},onChange:e=>r(e.currentTarget.checked),name:i,checked:!!a,useCollapse:!1},o))}}),l.createElement(d.x,{className:(0,u.default)($.submitWrapper)},l.createElement(x.H.Submit,Object.assign({className:(0,u.default)("bmi-btn bmi--btn-submit",$.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${C.v[I]}/${D}`,type:"submit"},j),z("bmi.submit")))))):l.createElement(x.H.FormRow,{className:(0,u.default)($.submitWrapper)},l.createElement(x.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${C.v[I]}/${D}`,type:"submit"},j),z("bmi.submit"))))},BmiForm=e=>{var{value:t,onChange:a,onSubmit:s,bmiGenerated:c,bmiUnit:d,formLayout:m="default",submitProps:u,withAdditionalQuestion:p,isMobile:g}=e,h=(0,n._)(e,["value","onChange","onSubmit","bmiGenerated","bmiUnit","formLayout","submitProps","withAdditionalQuestion","isMobile"]);let{classes:b}=I(void 0,{name:"BmiForm"}),[x,E]=(0,l.useState)(!1),{control:w,handleSubmit:y,setValue:C,watch:z}=(0,r.cI)({defaultValues:{question1:void 0,question2:void 0,newsletter:!0}}),S=z(),{locale:T}=(0,f.u)(),{getHealthToolLink:A}=(0,i.u)(T),D=(0,l.useMemo)(()=>A(o.H.OVULATION),[A]),onInValid=()=>{E(!0)};(0,l.useEffect)(()=>{Object.keys(t||{}).forEach(e=>{C(e,null==t?void 0:t[e],{shouldTouch:!1,shouldDirty:!1,shouldValidate:!1})})},[t]),(0,l.useEffect)(()=>{a&&a(S)},[S]);let j=Object.assign({onSubmit:y(e=>(0,n.a)(void 0,void 0,void 0,function*(){let t=d.heightConvert(e.height),a=d.weightConvert(e.weight),n=Object.assign(Object.assign({},e),{height:t,weight:a,bmi:(0,k.F)({height:t,weight:a})});onInValid(),s&&s(n)}),onInValid)},h);return l.createElement(v.T,{variant:v.C.LEADGEN},l.createElement(N.Provider,{value:{control:w,bmiGenerated:c,isTouched:x,linkTool:D,submitProps:u,withAdditionalQuestion:p,classes:b}},"inline"===m?l.createElement(InlineForm,Object.assign({},j)):l.createElement(DefaultForm,Object.assign({},j,{isMobile:g}))))},S=(0,l.createContext)({}),Error=e=>{let{errorLabelSize:t}=(0,l.useContext)(S);return l.createElement(h.e,Object.assign({textProps:{size:t},sx:{marginTop:5}},e))};var T=Object.assign(e=>{var t,a,r,i,o,s,{children:c,isMobile:d}=e,m=(0,n._)(e,["children","isMobile"]);let u=Object.assign({isMobile:d,labelSize:null!==(t=m.labelSize)&&void 0!==t?t:d?"p2":"s4",subLabelSize:null!==(a=m.subLabelSize)&&void 0!==a?a:"subText",optionLabelSize:null!==(r=m.optionLabelSize)&&void 0!==r?r:d?"p2":"s4",inputSize:null!==(i=m.inputSize)&&void 0!==i?i:d?"sm":"md",gutter:null!==(o=m.gutter)&&void 0!==o?o:d?4:12,errorLabelSize:null!==(s=m.errorLabelSize)&&void 0!==s?s:"p3"},m);return l.createElement(S.Provider,{value:u},c)},{Row:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{gutter:r}=(0,l.useContext)(S);return l.createElement(m.r,Object.assign({gutter:r},a),t)},Col:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);return l.createElement(m.r.Col,Object.assign({span:12},a),t)},SubLabel:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{subLabelSize:r}=(0,l.useContext)(S);return l.createElement(b.T,Object.assign({size:r},a),t)},Label:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{labelSize:r}=(0,l.useContext)(S);return l.createElement(b.T,Object.assign({size:r,weight:"semiBold"},a,{span:!0}),t)},OptionLabel:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{optionLabelSize:r}=(0,l.useContext)(S);return l.createElement(b.T,Object.assign({size:r,weight:"regular"},a,{span:!0}),t)},Input:h.I,InputNumber:e=>{var{error:t}=e,a=(0,n._)(e,["error"]);let{inputSize:r}=(0,l.useContext)(S);return l.createElement("div",null,l.createElement(h.I.Number,Object.assign({size:r},a)),t&&l.createElement(Error,{label:t}))},GenderControl:e=>{let{inputSize:t}=(0,l.useContext)(S);return l.createElement(w.G,Object.assign({size:t},e))},Error})},wvgE:function(e,t,a){a.d(t,{D:function(){return DatePicker}});var n=a("usZY"),l=a("q1tI"),r=a("8vDj"),i=a("gHhT"),o=a("catb"),s=a("EoE9"),c=a("ipFv"),d=a("g2vb"),m=a("e6f9"),u=a("yNk5");let DatePicker=e=>{var t,{value:a,fullWidth:p=!0}=e,g=(0,n._)(e,["value","fullWidth"]);let h=(0,r.rZ)(),b="mb"===h.other.template,v=null===(t=s.I[u.env.UNIFY_LOCALE||m.L.Vietnam])||void 0===t?void 0:t.dateFormat;return l.createElement(o.a,Object.assign({locale:d.M[u.env.UNIFY_LOCALE||m.L.Vietnam],valueFormat:v,size:"md",clearable:!1,popoverProps:p?{styles:{dropdown:{minWidth:"100%",display:"flex",justifyContent:"center",alignItems:"center"}}}:{},styles:{root:{position:"relative"},rightSection:{pointerEvents:"none",cursor:"default"}},rightSection:l.createElement(i.E,{src:c.C.getAssetPath(b?"MB-calendar.svg":"OutlineCalendar.svg"),width:18,height:18}),value:a,placeholder:v},g,{className:`input-control ${(null==g?void 0:g.className)||""}`}))}},LcyI:function(e,t,a){a.d(t,{T:function(){return p},a:function(){return getUserIdFromCookie},b:function(){return getSubotCookieId},c:function(){return getUserInfoFromCookie},d:function(){return getWindowId},e:function(){return checkUntilFinished},f:function(){return checkMobile},g:function(){return getHelloSitesUrl},h:function(){return clickAndOpenInNewTab},i:function(){return formatUrlWithEncrypedGa},j:function(){return isFakeEmail},k:function(){return getHhgIdFromCookie},o:function(){return overrideParamsByQuery},s:function(){return ssoIntents}});var n=a("UG0A"),l=a("EoE9"),r=a("Dphd"),i=a("JIJ2"),o=a("hHL7"),s=a("GOBr"),c=a("xrdX");let d=["form_submit_meta","selected_actions","current_selected","current_keys","current_polls"],m=["bot_id","node_id","action_id","action_value","current_score","gtm_id","ga_client_id","is_new","title_url","url","window_id",...d],overrideParamsByQuery=(e,t)=>{let a=Object.keys(t);return a.map(a=>{let n=t[a];if("source"===a){e.is_new="first_login"===n;return}if(m.includes(a)){if(d.includes(a)){try{e[a]=JSON.parse(n)}catch(e){}return}if("account_id"===a||"current_score"===a||"bot_id"===a){e[a]=parseInt(n);return}e[a]=n}}),e},ssoIntents=e=>[{id:(0,o.Z)(),label:JSON.stringify({title:"",description:""}),type:r.N.SSO_INTENT,url:""},{id:(0,o.Z)(),label:JSON.stringify({title:e({id:"subot.myHealth.title",defaultMessage:"My Health"}),description:e({id:"subot.myHealth.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:r.N.SSO_INTENT,url:"/images/subot/my-health.svg"},{id:(0,o.Z)(),label:JSON.stringify({title:e({id:"subot.saveData.title",defaultMessage:"Save Data"}),description:e({id:"subot.saveData.description",defaultMessage:"Hellobacsi would like to learn from your data to provide better healthcare for you"})}),type:r.N.SSO_INTENT,url:"/images/subot/file-storage.svg"},{id:(0,o.Z)(),label:JSON.stringify({title:e({id:"subot.productYourIdentifiers.title",defaultMessage:"Protect your identifiers"}),description:e({id:"subot.productYourIdentifiers.description",defaultMessage:"Personal identifiers (like your name) will always be removed to protect your privacy. "})}),type:r.N.SSO_INTENT,url:"/images/subot/shield.svg"}];function checkUntilFinished(e){let t=e.condition,a=e.finished,n=e.timeout||3e3,l=new Date().getTime(),r=setInterval(()=>{let e=new Date().getTime();(e-l>n||t())&&(clearInterval(r),a())},300)}let getHhgIdFromCookie=e=>{let t=n.c.parse(e||""),a=t["hhg-id"];return a||i.Z.get("hhg-id")||""},getSubotCookieId=e=>{if(e)return i.Z.set("hhg-id",e),e;let t=getHhgIdFromCookie();if(t)return t;let a=(0,o.Z)();return i.Z.set("hhg-id",a),a},getUserIdFromCookie=e=>{let t=n.c.parse(e||""),a=t[l.B],r=a||i.Z.get(l.B)||"";try{let e=r.split(".")[1],t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a).sub}catch(e){return""}},getUserInfoFromCookie=e=>{let t=n.c.parse(e||""),a=t[l.B],r=a||i.Z.get(l.B)||"";try{let e=r.split(".")[1],t=e.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join("")),n=JSON.parse(a);return{email:n.email,id:n.sub}}catch(e){return{email:"",id:0}}},u=(0,o.Z)(),getWindowId=()=>u,getHelloSitesUrl=(e,t)=>{let a=!t&&"undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname);return a?"http://localhost":`https://${s.y?"":"discover."}${c.v[e]}`},checkMobile=e=>{let t=e||("undefined"==typeof navigator?"":navigator.userAgent);return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substring(0,4)))},clickAndOpenInNewTab=e=>{let t=document.createElement("a");t.href=e,t.target="_blank",t.click()},p=30,isFakeEmail=e=>(null==e?void 0:e.endsWith("@hhg.com"))||(null==e?void 0:e.endsWith("@facebook.com"));function formatUrlWithEncrypedGa(e="",t=""){if(!e.startsWith("https://")||!t)return"";let a=new URL(e),n=a.searchParams;return n.get("hhgclid")?(n.delete("hhgclid"),n.set("hhgclid",t),`${a.origin}${a.pathname}?${n.toString()}`):e}}}]);