"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6509],{"4MO2":function(e,t,a){a.d(t,{B:function(){return BookingSearchBarV3},T:function(){return TextDivider}});var i,n,r,o,l=a("q1tI"),s=a("VZtU"),c=a("0D4Z"),d=a("iuhU"),p=a("Eso5"),h=a("aDCK"),u=a("mYVa"),m=a("vaps"),g=a("8vDj"),b=a("OAL+"),f=a("SPK5"),x=a("TIp3"),E=a("CmzK"),v=a("NEaA"),y=a("rlLN"),C=a("Iblh"),S=a("Dh7N"),w=a("+Q0Z"),T=a("thIk"),k=a("sEfC"),I=a.n(k),_=a("DXMQ"),O=a("rBCA"),N=a("iBNF"),B=a("oKqh"),A=a("BdHP"),L=a("F/Hd"),R=a("5/p/"),M=a("fbRC"),D=a("D6YN"),j=a("h3Tz"),P=a("Hcbr"),F=a("G5av");let $=O.Z.div``,z=O.Z.div` background-color: ${N.r.colors.neutral50}; padding-bottom: 1px; ${B.M.mbDown} { padding: 0; } `,U=(0,O.Z)(A.C)` padding: 0 16px; ${B.M.mbDown} { padding: 0; } `,H=O.Z.div` padding: 24px 56px; border-radius: 16px; background-color: ${N.r.colors.white}; box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.04), 0px 0px 2px 0px rgba(0, 0, 0, 0.06), 0px 4px 8px 0px rgba(0, 0, 0, 0.04); ${B.M.mbDown} { padding: 16px; border-radius: 0; } .flex-search-input { flex-direction: row; ${B.M.mbDown} { flex-direction: column; } } `,G={"en-PH":3,"tl-PH":2,"id-ID":3,"vi-VN":2,"zh-TW":0,"ms-MY":2,"th-TH":2},W={isMobile:!1,isDebug:!1,navigateTo:null,geoLocationPermission:"unset",geoLocationCoordinates:null,focused:"none",focusedSpecialty:"none",searchLocationKeywords:"",searchSpecialtyKeywords:"",searchKeywords:"",selectedLocation:null,selectedSpecialty:null,defaultCity:null,initialCities:[],cities:[],searchResults:{},initialSearchResults:{},isLoadingCities:!1,isLoadingSearchResults:!1,isMobileModalOpened:!1,initialSelectedCity:null,autoCompleteDisabled:!1,inputSearchPlaceholder:"",locale:"vi-VN",allSpecialties:[],popularKeys:[]};function resetSearchLocationKeywords(e){let{selectedLocation:t,searchLocationKeywords:a}=e;return t&&a!==t.name?Object.assign(Object.assign({},e),{searchLocationKeywords:t.name}):e}function reducer(e,t){var a,i;switch(e.isDebug&&console.log("bookingSearchBarV3",{action:t,state:e}),t.type){case r.NavigateTo:return Object.assign(Object.assign({},e),{navigateTo:t.payload,focused:"none",isMobileModalOpened:!1});case r.ClickOutsideInputLocation:if("location"!==e.focused)return e;return resetSearchLocationKeywords(Object.assign(Object.assign({},e),{focused:"none"}));case r.ClickOutsideInputSpecialty:if("specialty"!==e.focused)return e;return resetSearchLocationKeywords(Object.assign(Object.assign({},e),{focused:"none"}));case r.ClickOutsideInputSearch:if("search"!==e.focused)return e;return Object.assign(Object.assign({},e),{focused:"none"});case r.ClickOutsideInputSearchSpecialty:if("search"!==e.focusedSpecialty)return e;return Object.assign(Object.assign({},e),{focusedSpecialty:"none"});case r.FocusInputLocation:{let t=Object.assign(Object.assign({},e),{focused:"location"});return(null===(a=e.selectedLocation)||void 0===a?void 0:a.id)===_.a&&(t.searchLocationKeywords=""),t}case r.FocusInputSpecialty:{let t=Object.assign(Object.assign({},e),{focused:"specialty"});return(null===(i=e.selectedLocation)||void 0===i?void 0:i.id)===_.a&&(t.searchLocationKeywords=""),t}case r.FocusInputSearch:let n=Object.assign(Object.assign({},e),{focused:"search"});if(e.isMobile)return resetSearchLocationKeywords(n);return n;case r.FocusInputSearchSpecialty:{let t=Object.assign(Object.assign({},e),{focusedSpecialty:"search"});return t}case r.ChangeInputLocation:return Object.assign(Object.assign({},e),{searchLocationKeywords:t.payload});case r.ChangeInputSearch:{let a=t.payload;return Object.assign(Object.assign({},e),{searchKeywords:a,isLoadingSearchResults:a.trim().length>G[e.locale]})}case r.SelectCurrentLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name});case r.ClearInputLocation:return Object.assign(Object.assign({},e),{focused:"location",cities:e.initialCities,searchLocationKeywords:""});case r.ClearInputSearch:return Object.assign(Object.assign({},e),{focused:"search",searchKeywords:""});case r.SelectLocation:return Object.assign(Object.assign({},e),{focused:"none",selectedLocation:t.payload,searchLocationKeywords:t.payload.name,searchResults:{}});case r.SelectSpecialty:return Object.assign(Object.assign({},e),{focused:"none",selectedSpecialty:t.payload,searchResults:{}});case r.SelectSearchResult:return Object.assign(Object.assign({},e),{searchKeywords:t.payload.name,isMobileModalOpened:!1,focused:"none",navigateTo:t.payload.url});case r.FetchCitiesStart:return Object.assign(Object.assign({},e),{isLoadingCities:!0});case r.FetchCitiesFinish:return Object.assign(Object.assign({},e),{isLoadingCities:!1});case r.FetchSearchResultsStart:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!0});case r.FetchSearchResultsFinish:return Object.assign(Object.assign({},e),{isLoadingSearchResults:!1});case r.FetchSearchResultsComplete:{let a=Object.assign(Object.assign({},e),{searchResults:Object.assign(Object.assign({},e.searchResults),{[t.payload.key]:t.payload.searches})});return a}case r.FetchCitiesByGeoIpComplete:{let{cities:a}=t.payload,{default:i}=t.payload;a=a.filter(e=>e.id!==i.id),i&&a.unshift(i),e.initialSelectedCity&&!a.find(t=>t.id===e.initialSelectedCity.id)&&a.unshift(e.initialSelectedCity);let n=Object.assign(Object.assign({},e),{defaultCity:i,initialCities:a,cities:a});return"denied"!==e.geoLocationPermission||e.initialSelectedCity||(n.selectedLocation=i,n.searchLocationKeywords=i.name),n}case r.FetchCitiesByKeywordComplete:return Object.assign(Object.assign({},e),{cities:t.payload});case r.DisplayInitialCities:return Object.assign(Object.assign({},e),{cities:e.initialCities});case r.DisplayInitialSearchResults:{let t=e.searchKeywords.trim(),a=G[e.locale],i=t.length>0&&t.length<=a;return Object.assign(Object.assign({},e),{searchResults:i?{}:e.initialSearchResults,isLoadingSearchResults:!1})}case r.UpdateInitialSearchResults:return Object.assign(Object.assign({},e),{initialSearchResults:Object.assign(Object.assign({},e.initialSearchResults),{[t.payload.key]:t.payload.searches})});case r.GrantGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"granted",geoLocationCoordinates:t.payload});case r.DenyGeoLocationPermission:return Object.assign(Object.assign({},e),{geoLocationPermission:"denied",geoLocationCoordinates:null});case r.OpenMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!0});case r.CloseMobileModal:return Object.assign(Object.assign({},e),{isMobileModalOpened:!1});case r.UpdateInitialSearchValue:return Object.assign(Object.assign({},e),{searchKeywords:t.payload});case r.SetInputSearchPlaceholder:return Object.assign(Object.assign({},e),{inputSearchPlaceholder:t.payload});case r.FetchAllSpecialties:return Object.assign(Object.assign({},e),{allSpecialties:t.payload});case r.FetchPopularKeys:return Object.assign(Object.assign({},e),{popularKeys:t.payload});default:return e}}(i=r||(r={})).NavigateTo="navigate to url",i.ClickOutsideInputLocation="click outside input location",i.ClickOutsideInputSearch="click outside input search",i.ClickOutsideInputSearchSpecialty="click outside input search specialty",i.ClickOutsideInputSpecialty="click outside input specialty",i.SelectCurrentLocation="select current location",i.FocusInputLocation="focus input location",i.FocusInputSearch="focus input search",i.FocusInputSearchSpecialty="focus input search specialty",i.ChangeInputLocation="change input location",i.ChangeInputSearch="change input search",i.ClearInputLocation="clear input location",i.ClearInputSearch="clear input search",i.SelectLocation="select location",i.SelectSpecialty="select specialty",i.FetchCitiesStart="fetch cities start",i.FetchCitiesFinish="fetch cities finish",i.FetchSearchResultsStart="fetch search results start",i.FetchSearchResultsComplete="fetch search results complete",i.FetchSearchResultsFinish="fetch search results finish",i.FetchCitiesByGeoIpComplete="fetch cities by geo IP finish",i.FetchCitiesByKeywordComplete="fetch cities by keyword finish",i.DisplayInitialCities="display initial cities",i.DisplayInitialSearchResults="display initial search results",i.UpdateInitialSearchResults="update initial search results",i.GrantGeoLocationPermission="grant geolocation permission",i.DenyGeoLocationPermission="deny geolocation permission",i.OpenMobileModal="open mobile modal",i.CloseMobileModal="close mobile modal",i.UpdateInitialSearchValue="update initial search value",i.SelectSearchResult="select search result",i.SetInputSearchPlaceholder="set input search placeholder",i.FocusInputSpecialty="focus input specialty",i.FetchAllSpecialties="fetch all specialty",i.FetchPopularKeys="fetch popular key by type";let Z=O.Z.div` flex: 1; position: relative; ${B.M.mbDown} { width: 100%; } `,K=O.Z.div` background: #f7f9fc; border-radius: 12px; height: 48px; display: flex; align-items: center; padding: 4px 12px 4px 4px; gap: 16px; ${B.M.mbDown} { height: 48px; width: 100%; } `,V=O.Z.div` display: flex; align-items: center; flex-shrink: 0; color: #8c8c8c; svg { width: 18px; height: 18px; } `,q=O.Z.div` position: absolute; top: calc(100% + 2px); width: 100%; border-radius: 4px; background: ${N.r.colors.white}; box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1); z-index: 10; ${B.M.mbDown} { width: calc(100% + 64px); left: -32px; } `,Y=O.Z.div``;O.Z.div` display: flex; justify-content: space-between; align-item: center; padding: 9px 14px 9px 22px; background: #f7f9fc; .title { color: ${N.r.colors.gray800}; font-size: 14px; font-weight: 600; line-height: 22px; } .btn-see-all { color: ${N.r.colors.blue600}; font-size: 14px; line-height: 22px; cursor: pointer; } `;let X=O.Z.div` padding: 10px 16px; max-height: 400px; overflow: auto; `,Q=O.Z.div` display: flex; gap: 12px; align-items: center; cursor: pointer; ${B.M.mbUp} { &:hover { background-color: ${N.r.colors.blue50}; } } .image-item { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; img { object-fit: contain; width: 100%; height: 100%; border-radius: 50%; } } .infor { overflow: hidden; padding: 12px 0; flex: 1; border-bottom: 1px solid ${N.r.colors.neutral100}; .title { color: ${N.r.colors.gray800}; font-size: 16px; font-weight: 600; line-height: 24px; } .description { overflow: hidden; color: ${N.r.colors.gray600}; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; display: flex; gap: 8px; align-items: center; margin-top: 5px; svg { flex: 0 0 16px; } .sub-description { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: 1; } } } &.last-item { .infor { border-bottom: none; } } `;O.Z.div` padding: 0 16px 16px; .search-detail-btn { color: ${N.r.colors.blue600}; font-size: 14px; line-height: 22px; cursor: pointer; } `;let SearchResult=({state:e,type:t,results:a,isLoading:i,typeInformation:n,dispatch:o})=>{let{t:s}=(0,T.u)(),{selectedLocation:p}=e,h=(0,l.useMemo)(()=>n[t].slug,[n,t]),handleOnClick=e=>{let a="";switch(t){case"service":a=`/${p.slug}/${h}/${e.slug}`;break;case"doctor":case"hospital":a=`/${h}/${e.slug}-${e.id}`}a&&o({type:r.NavigateTo,payload:a})};return null===a?null:l.createElement(Y,null,l.createElement(X,{className:"search-results__body"},i&&l.createElement("div",{className:"skeleton-result"},[,,,].fill(void 0).map((e,a)=>l.createElement(Q,{key:t+"loading"+a,className:2===a?"last-item":""},l.createElement("div",{className:"image-item"},l.createElement(c.O,{height:48,circle:!0,mb:"xl",animate:!0})),l.createElement("div",{className:"infor"},l.createElement("div",{className:"title"},l.createElement(c.O,{height:8,mt:10,radius:"xl",animate:!0})),l.createElement("div",{className:"description"},l.createElement("div",{className:"sub-description"},l.createElement(c.O,{height:8,mt:10,radius:"xl",width:"80%",animate:!0}))))))),!i&&a&&a.length>0&&l.createElement(l.Fragment,null,a.map((e,i)=>{var r,o;let s=a.length>4&&3===i||a.length<=4&&i===a.length-1,c="";return("hospital"===t&&(c=(null==e?void 0:e.address)||""),"doctor"===t&&(c=(null===(r=null==e?void 0:e.specialties)||void 0===r?void 0:r.join(", "))||""),"service"===t&&(c=(null===(o=null==e?void 0:e.hospital_branch)||void 0===o?void 0:o.name)||""),i>=4)?l.createElement(l.Fragment,null):l.createElement(Q,{key:e.id,className:(0,d.default)(s?"last-item":"","result-item"),onClick:()=>handleOnClick(e)},l.createElement("div",{className:"image-item"},l.createElement("img",{src:e.logo||e.avatar,alt:e.name})),l.createElement("div",{className:"infor"},l.createElement("div",{className:"title"},e.name),l.createElement("div",{className:"description"},n[t].icon,l.createElement("div",{className:"sub-description"},c))))})),!i&&(null==a?void 0:a.length)===0&&l.createElement(L.T,{size:"sm",color:N.r.colors.gray400,className:"noresult-block"},s("booking.searchBar.noResults"))))},SearchResultContent=({state:e,type:t,isLoading:a,clientSlug:i,typeInformation:n,dispatch:r})=>{var o;return"search"!==e.focused?null:l.createElement(SearchResult,{type:t,state:e,results:(null===(o=e.searchResults)||void 0===o?void 0:o[t])||null,location:e.selectedLocation.name,dispatch:r,isLoading:a,typeInformation:n,clientSlug:i})},J=O.Z.div` position: relative; flex-shrink: 0; ${B.M.mbDown} { width: 100%; display: flex; flex-direction: column; gap: 12px; } &.compact { ${B.M.mbDown} { width: auto; display: block; } } `,ee=O.Z.div` position: absolute; top: calc(100% + 4px); left: 0; min-width: 264px; background: white; border-radius: 12px; box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.04), 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 10px 16px 0px rgba(0, 0, 0, 0.04); z-index: 10; overflow: hidden; &.mobile { min-width: 280px; } `,et=O.Z.div` cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 12px; outline: none; .image-item { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; img { width: 100%; height: 100%; object-fit: contain; } svg { width: 24px; height: 24px; } } .item-label { font-size: 15px; font-weight: 400; line-height: 24px; letter-spacing: -0.3px; color: ${N.r.colors.gray800}; } &:hover { background-color: ${N.r.colors.neutral50}; } &.selected { background-color: ${N.r.colors.neutral50}; } &:last-child { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; } `,DoctorIcon=()=>l.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l.createElement("path",{d:"M8.983 14.333q-1.666 0-2.833-1.166Q4.983 12 4.983 10.333v-.366a3.48 3.48 0 0 1-2.258-1.2 3.57 3.57 0 0 1-.909-2.434V3.1a.58.58 0 0 1 .175-.425.58.58 0 0 1 .425-.175h1.4v-.167a.486.486 0 0 1 .5-.5q.217 0 .36.142a.5.5 0 0 1 .14.358v1.334a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V3.5h-1v2.833q0 1.1.784 1.884Q4.383 9 5.483 9t1.883-.783.784-1.884V3.5h-1v.167a.485.485 0 0 1-.5.5.484.484 0 0 1-.5-.5V2.333a.486.486 0 0 1 .5-.5q.217 0 .358.142a.5.5 0 0 1 .142.358V2.5h1.4a.58.58 0 0 1 .425.175.58.58 0 0 1 .175.425v3.233q0 1.4-.908 2.434a3.5 3.5 0 0 1-2.259 1.2v.366q0 1.25.875 2.126a2.9 2.9 0 0 0 2.125.874q1.25 0 2.125-.874a2.9 2.9 0 0 0 .875-2.126V9.25a1.74 1.74 0 0 1-.858-.609 1.6 1.6 0 0 1-.342-1.008q0-.716.5-1.216t1.2-.5q.716 0 1.217.5.5.5.5 1.216 0 .567-.342 1.008t-.875.609v1.083q0 1.667-1.167 2.834-1.166 1.166-2.833 1.166m3.5-6q.3 0 .509-.208a.67.67 0 0 0 .208-.492q0-.3-.208-.508a.7.7 0 0 0-.509-.208q-.3 0-.5.208a.7.7 0 0 0-.2.508q0 .284.2.492t.5.208",fill:"#595959"})),ServiceIcon=()=>l.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l.createElement("path",{d:"M6.868 9.265v.974q0 .405.284.69.284.283.69.283t.69-.284.284-.69v-.973h.973q.405 0 .69-.284a.94.94 0 0 0 .284-.689.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284h-.973v-.974a.94.94 0 0 0-.284-.69.94.94 0 0 0-.69-.284.94.94 0 0 0-.689.284.94.94 0 0 0-.285.69v.974h-.973a.94.94 0 0 0-.69.283.94.94 0 0 0-.284.69q0 .405.284.69.285.284.69.284zm-3.46 4.868q-.581 0-.994-.413A1.36 1.36 0 0 1 2 12.725v-6.65a1.4 1.4 0 0 1 .563-1.127l4.434-3.333q.369-.282.844-.282.474 0 .846.282l4.434 3.333q.264.193.413.493.15.3.15.633v6.651q0 .58-.414.995a1.36 1.36 0 0 1-.994.413zm0-1.168h8.868q.105 0 .172-.068a.23.23 0 0 0 .068-.172v-6.65a.2.2 0 0 0-.027-.11.3.3 0 0 0-.07-.085L7.983 2.554a.2.2 0 0 0-.142-.052.2.2 0 0 0-.142.052L3.266 5.88a.3.3 0 0 0-.071.086.2.2 0 0 0-.027.108v6.651q0 .105.068.172a.23.23 0 0 0 .172.068",fill:"#595959"})),HospitalIcon=()=>l.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l.createElement("path",{d:"M8 8q.55 0 .941-.392.393-.391.392-.941 0-.55-.392-.942A1.28 1.28 0 0 0 8 5.333q-.55 0-.942.392a1.28 1.28 0 0 0-.391.942q0 .55.391.941Q7.45 8 8 8m0 4.9q2.032-1.866 3.017-3.392Q12 7.983 12 6.8q0-1.817-1.158-2.975Q9.682 2.667 8 2.667T5.158 3.825Q4 4.983 4 6.8q0 1.184.983 2.708Q5.966 11.034 8 12.9m0 1.517a.8.8 0 0 1-.5-.183q-2.433-2.151-3.633-3.992T2.667 6.8q0-2.5 1.608-3.983Q5.883 1.332 8 1.333q2.116 0 3.725 1.484T13.333 6.8q0 1.6-1.2 3.442-1.2 1.841-3.633 3.991a.8.8 0 0 1-.5.184",fill:"#8C8C8C"})),SpecialtyIcon=()=>l.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16"},l.createElement("path",{d:"M3.833.5a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667M10.5.5c-.92 0-1.667.746-1.667 1.667V5.5c0 .92.746 1.667 1.667 1.667h3.333c.921 0 1.667-.746 1.667-1.667V2.167C15.5 1.246 14.754.5 13.833.5zM3.833 8.833a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667m8.334 0a3.333 3.333 0 1 0 0 6.667 3.333 3.333 0 0 0 0-6.667",fill:"#9AA2AC"})),SearchSpecialty=({state:e,isMobile:t,onSpecialtyClick:a,dispatch:i,isCompact:n=!1})=>{let{t:o,locale:c}=(0,T.u)(),d=(0,l.useRef)(null),g=(0,l.useRef)(null),b=(0,l.useMemo)(()=>_.L[c],[c]),[f,x]=(0,l.useState)(""),[E,{close:v,toggle:y}]=(0,C.q)(!1);(0,w.a)(d,()=>{v(),x(""),i({type:r.ClickOutsideInputSpecialty})});let S=(0,l.useMemo)(()=>[{name:o("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:b.SPECIALTIES},...e.allSpecialties],[e.allSpecialties,o,b.SPECIALTIES]),k=(0,l.useMemo)(()=>f.trim()?S.filter(e=>e.name.toLowerCase().includes(f.toLowerCase().trim())):S,[S,f]),I=(0,l.useMemo)(()=>e.selectedSpecialty?e.selectedSpecialty.name:"",[e.selectedSpecialty]),O=(0,l.useCallback)(e=>{a({id:e.id,name:e.name,slug:e.slug,thumbnail:e.thumbnail||"",total_doctor:0}),v(),x("")},[a,v]),B=(0,l.useCallback)(()=>{y(),E&&x("")},[y,E]);return l.createElement(J,{ref:d,className:n?"compact":""},l.createElement(p.x,{onClick:B,className:E?"dropdown-trigger-open":"",sx:{cursor:"pointer",position:"relative",width:n?t?96:160:"100%",flexShrink:0}},l.createElement(h.I,{readOnly:!0,value:I,placeholder:o("booking.searchPopup.specialties"),rightSection:l.createElement(R.C,{style:{width:20,height:20}}),styles:Object.assign({input:{cursor:"pointer",outline:"none","&:focus":{outline:"none"},"&:not(.mantine-Textarea-input)":{height:n?40:t?40:46,fontSize:n?(0,u.h)(14):t?(0,u.h)(14):(0,u.h)(16),paddingLeft:n?12:16,paddingRight:30,background:n?"white":"transparent",border:n?`1px solid ${N.r.colors.gray200}`:"none",borderRadius:8,letterSpacing:"-0.2px",color:N.r.colors.gray800,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}},rightSection:{width:30,pointerEvents:"none"}},!n&&{wrapper:{position:"relative","&:after":{content:'""',width:"1px",height:"20px",backgroundColor:N.r.colors.neutral100,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)"}}})})),E&&l.createElement(ee,{className:t?"mobile":""},l.createElement(p.x,{sx:{padding:"12px 12px 8px"}},l.createElement(h.I,{ref:g,icon:l.createElement(s.Z,{size:18,color:N.r.colors.gray300}),placeholder:o("booking.searchBar.placeholder.specialty"),value:f,onChange:e=>x(e.target.value),size:"md",styles:{input:{height:40,fontSize:(0,u.h)(15),paddingLeft:36,"&::placeholder":{color:N.r.colors.gray400}},icon:{width:36}}})),l.createElement(m.x.Autosize,{mah:300},0===k.length?l.createElement(p.x,{sx:{padding:"12px 16px",color:N.r.colors.gray400,fontSize:14}},o("common.noResult")):k.map(t=>{var a,i;return l.createElement(et,{key:t.id,tabIndex:0,role:"option","aria-selected":(null===(a=e.selectedSpecialty)||void 0===a?void 0:a.id)===t.id,className:(null===(i=e.selectedSpecialty)||void 0===i?void 0:i.id)===t.id?"selected":"",onClick:()=>O(t),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),O(t))}},l.createElement("div",{className:"image-item"},t.thumbnail?l.createElement("img",{src:t.thumbnail,alt:t.name}):l.createElement(SpecialtyIcon,null)),l.createElement("span",{className:"item-label"},t.name))}))))},ea=(0,l.forwardRef)(({state:e,type:t,isMobile:a,isLoading:i,initalSearchValue:n,typeInformation:o,debouncedFetchSearchResults:c,trackingAttributes:d,hideSpecialtySelection:p=!1,clientSlug:m="",onSearch:g,onFocusInput:b,onEnterSearch:f,dispatch:x,onlyShowSearchBox:E,onChangeSpecialty:v},y)=>{let{t:C}=(0,T.u)(),S=(0,l.useRef)(null),k=(0,l.useRef)(null);(0,l.useImperativeHandle)(y,()=>({focus:()=>{var e;null===(e=k.current)||void 0===e||e.focus()}}));let I=(0,l.useMemo)(()=>d?{"data-event-category":d.dataEventCategory,"data-event-action":d.dataEventAction,"data-event-label":d.dataEventLabel}:{},[d]),_=(0,l.useMemo)(()=>"doctor"===t?C("booking.searchBar.placeholder.doctor"):"service"===t?C("booking.searchBar.placeholder.service"):"hospital"===t?C("booking.searchBar.placeholder.hospital"):"specialty"===t?C("booking.searchBar.placeholder.specialty"):"",[t,C]),O="specialty"!==t&&"service"!==t&&!p&&!E,B=(0,l.useMemo)(()=>({input:{border:"none",background:"transparent",height:"100%",fontSize:(0,u.h)(16),color:N.r.colors.gray800,padding:"0","&::placeholder":{color:N.r.colors.gray400},"&:focus":{outline:"none",boxShadow:"none"},[a?"@media (max-width: 767px)":""]:a?{fontSize:(0,u.h)(16)}:{}},wrapper:{flex:1}}),[a]);(0,w.a)(S,()=>{a||x({type:r.ClickOutsideInputSearch})});let A=(0,l.useCallback)(function(a){x({type:r.ChangeInputSearch,payload:a}),"function"!=typeof g&&(a.trim().length>G[e.locale]||n||0===a.trim().length)&&c(a.trim(),e,t,m)},[x,e,t,n,c,m,g]),L=(0,l.useCallback)(function(e){var t;x({type:r.SelectSpecialty,payload:e}),null==v||v(e),a||null===(t=k.current)||void 0===t||t.focus()},[x,v]),R=(0,l.useCallback)(e=>{"Enter"===e.key&&(e.stopPropagation(),e.preventDefault(),f&&f())},[f]);return l.createElement(Z,{ref:S},l.createElement(K,null,O&&l.createElement(SearchSpecialty,{state:e,isMobile:a,dispatch:x,debouncedFetchSearchResults:c,onSpecialtyClick:L,isCompact:!0}),l.createElement(V,null,l.createElement(s.Z,null)),l.createElement(h.I,Object.assign({ref:k,variant:"unstyled",size:a?"md":"lg",placeholder:_,styles:B,value:e.searchKeywords,name:"search-results",autoComplete:"off",onFocus:()=>{x({type:r.FocusInputSearch}),null==b||b()},onChange:e=>{A(e.target.value)},onKeyDown:R},I))),!a&&"specialty"!==t&&l.createElement(q,null,l.createElement(SearchResultContent,{type:t,state:e,dispatch:x,isLoading:i,typeInformation:o,clientSlug:m})))});ea.displayName="SearchInputs";let ModalSearchResult=e=>{var{searchInputEle:t,closeModal:a,children:i}=e,n=(0,M._)(e,["searchInputEle","closeModal","children"]);let r=(0,g.rZ)();return l.createElement(j.M,Object.assign({},n,{zIndex:310,fullScreen:!0,styles:{content:{borderRadius:0,height:"100%",".search-results__body":{padding:0},".result-item":{paddingLeft:16,paddingRight:16},".noresult-block":{padding:16},".skeleton-result":{padding:16}},header:{display:"none"}}}),l.createElement(b.K,{spacing:16,sx:{paddingTop:16}},l.createElement(f.k,{align:"center",gap:12},l.createElement(D.Z,{size:28,onClick:a,color:r.fn.primaryColor()}),l.createElement(p.x,{sx:{width:"100%"}},t)),i))},ei=O.Z.div` position: relative; width: 240px; flex-shrink: 0; ${B.M.mbDown} { width: 100%; } `;O.Z.div` position: absolute; top: calc(100% + 2px); width: 100%; border-radius: 4px; background: ${N.r.colors.white}; box-shadow: 0px 8px 40px 0px rgba(0, 0, 0, 0.1); z-index: 10; ${B.M.mbDown} { width: calc(100% + 64px); left: -32px; } `;let en=O.Z.div` position: relative; cursor: pointer; padding: 12px 18px; display: flex; align-items: center; gap: 14px; overflow: hidden; & + li::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 1px; background-color: ${N.r.colors.neutral100}; } &:not([data-is-denied='true']):hover { background-color: ${N.r.colors.neutral50}; } &:last-child:hover { border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; } &:first-child:hover { border-top-right-radius: 6px; border-top-left-radius: 6px; } &[data-is-denied='true'] { cursor: not-allowed; } `,er=(0,O.Z)(S.P)` width: 12px; height: 18px; flex: 0 0 12px; `,eo=(0,l.forwardRef)((e,t)=>{var{label:a,value:i}=e,n=(0,M._)(e,["label","value"]);return l.createElement("div",Object.assign({ref:t},n),l.createElement(en,{key:i,role:"button",tabIndex:0,"aria-label":`Select ${a} as location`,className:"location-item"},l.createElement(er,{color:N.r.colors.neutral400}),l.createElement(x.x,{size:"md"},a)))}),SearchLocation=({state:e,debouncedFetchCitiesByKeyword:t,selectedLocation:a,trackingAttributes:i,onLocationClick:n,dispatch:o})=>{var s;let{t:c,locale:d}=(0,T.u)(),p=(0,l.useRef)(null),h=(0,l.useMemo)(()=>{var t;return[{name:c("booking.searchBar.allLocations"),id:_.I,slug:null===(t=_.L[d])||void 0===t?void 0:t.ALL},...e.cities]},[e.cities,c,d]),m=(0,l.useMemo)(()=>i?{"data-event-category":i.dataEventCategory,"data-event-action":i.dataEventAction,"data-event-label":i.dataEventLabel}:{},[i]),g=(0,l.useCallback)(function(a){o({type:r.ChangeInputLocation,payload:a}),a.trim().length>G[e.locale]?t(a.trim()):(t.cancel(),o({type:r.DisplayInitialCities}))},[t,o,e.locale]);(0,w.a)(p,()=>{o({type:r.ClickOutsideInputLocation})});let b=null!==(s=null==a?void 0:a.id)&&void 0!==s?s:null,f=null===b?void 0:String(b);return l.createElement(ei,{ref:p},l.createElement(E.Ph,Object.assign({key:null!=f?f:"no-selected-location",defaultValue:f,placeholder:c("booking.searchBar.allLocations"),searchable:!0,onSearchChange:e=>{g(e)},onFocus:()=>{o({type:r.DisplayInitialCities})},onDropdownClose:()=>{t.cancel(),o({type:r.DisplayInitialCities})},nothingFound:c("common.noResult"),maxDropdownHeight:340,dropdownPosition:"bottom",icon:l.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M9.99908 10.8332C11.2264 10.8332 12.2213 9.83764 12.2213 8.61097C12.2213 7.3843 11.2264 6.38875 9.99908 6.38875C8.77174 6.38875 7.77686 7.3843 7.77686 8.61097C7.77686 9.83764 8.77174 10.8332 9.99908 10.8332Z",stroke:"#111111",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),l.createElement("path",{d:"M9.99919 18.0554C11.7584 17.4999 16.6659 13.611 16.6659 8.61097C16.6659 4.93097 13.6811 1.94431 9.99919 1.94431C6.3173 1.94431 3.33252 4.93097 3.33252 8.61097C3.33252 13.611 8.23996 17.4999 9.99919 18.0554Z",stroke:"#111111",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})),rightSection:l.createElement(R.C,{style:{width:20,height:20}})},m,{styles:()=>({item:{padding:0,"&[data-selected]":{"&, &:hover":{backgroundColor:"#F7F9FC",color:"inherit"},".location-item":{"&::after":{content:S.i,top:"50%",right:19,position:"absolute",transform:"translateY(-50%)"}}},"&[data-hovered]":{backgroundColor:"transparent"}},root:{width:"100%"},wrapper:{width:"100%"},input:{"&:not(.mantine-Textarea-input)":{height:48,fontSize:(0,u.h)(15),fontWeight:400,letterSpacing:"-0.3px",color:N.r.colors.gray1000,paddingLeft:44,paddingRight:40,background:"white",border:`1px solid ${N.r.colors.gray200}`,borderRadius:12}},icon:{width:44,paddingLeft:12},rightSection:{width:40,paddingRight:12},itemsWrapper:{padding:0},dropdown:{left:"0 !important",border:0,marginTop:4,borderRadius:12,overflow:"hidden",boxShadow:"0px 0px 1px 0px rgba(0, 0, 0, 0.04), 0px 2px 8px 0px rgba(0, 0, 0, 0.04), 0px 10px 16px 0px rgba(0, 0, 0, 0.04)","& ::-webkit-scrollbar":{width:"6px",height:"6px"}}}),itemComponent:eo,filter:()=>!0,onChange:e=>{if(null==e)return;let a=h.find(t=>String(t.id)===e);a&&(n(a),t.cancel(),o({type:r.DisplayInitialCities}),setTimeout(()=>{var e,t;null===(t=null===(e=p.current)||void 0===e?void 0:e.querySelector("input"))||void 0===t||t.blur()},0))},data:h.map(e=>({value:String(e.id),label:e.name,city:e}))})))},el=O.Z.div` display: flex; flex-wrap: wrap; row-gap: 8px; column-gap: 20px; ${B.M.mbDown} { margin-top: 12px; } `,es=O.Z.div` display: flex; align-items: center; border-radius: 8px; border: 1px solid ${N.r.colors.neutral100}; background: ${N.r.colors.white}; padding: 8px 12px 8px 8px; flex: 0 0 calc(33.3% - 13px); gap: 12px; cursor: pointer; &:hover { background: ${N.r.colors.blue50}; } ${B.M.tdDown} { flex: 0 0 calc(50% - 10px); } ${B.M.mbDown} { flex: 0 0 100%; border: none; } .image-item { display: flex; align-items: center; width: 40px; height: 40px; img { width: 100%; object-fit: cover; } } .infor { flex: 1; .title { color: ${N.r.colors.gray800}; font-size: 14px; font-style: normal; font-weight: 400; line-height: 22px; } .description { color: ${N.r.colors.gray600}; font-size: 12px; font-weight: 400; line-height: 18px; } } `,ec=(0,O.Z)(v.i)` margin: 24px 0 !important; `,ed=O.Z.div` display: flex; justify-content: center; margin-top: 24px; .show-more { border-radius: 4px; border: 1px solid ${N.r.colors.neutral200}; padding: 12px 16px; cursor: pointer; display: inline-block; color: ${N.r.colors.gray800}; font-size: 16px; font-weight: 600; line-height: 24px; ${B.M.mbDown} { width: 100%; text-align: center; } } `,SearchResultSpecialties=({state:e,isMobile:t,specialties:a,isLoading:i,dispatch:n})=>{let{t:o,locale:s}=(0,T.u)(),{selectedLocation:d}=e,p=(0,l.useMemo)(()=>_.L[s],[s]),handleOnClick=e=>{let t="";e===_.S?(t=`/${d.slug}/${p.HOSPITAL}/${_.C.GSK}/`,n({type:r.ClickOutsideInputSearchSpecialty})):t=`/${d.slug}/${p.DOCTOR}/${e}`,n({type:r.NavigateTo,payload:t})},h=(0,l.useMemo)(()=>a.length>=9||e.searchKeywords.trim().length<=G[e.locale],[e.searchKeywords,a]);return l.createElement(l.Fragment,null,!t&&l.createElement(ec,{color:"#E4E8EC"}),l.createElement(el,null,a.length>0&&!i&&l.createElement(l.Fragment,null,a.map((e,t)=>t>=9?l.createElement(l.Fragment,null):l.createElement(es,{key:e.id,onClick:()=>handleOnClick(e.slug)},l.createElement("div",{className:"image-item"},l.createElement("img",{src:e.thumbnail,alt:e.name})),l.createElement("div",{className:"infor"},l.createElement("div",{className:"title"},e.name))))),0===a.length&&!i&&l.createElement(L.T,{size:"sm",color:N.r.colors.gray400},o("booking.searchBar.noResults")),i&&Array(6).fill(void 0).map((e,t)=>l.createElement(es,{key:"loading"+t},l.createElement("div",{className:"image-item"},l.createElement(c.O,{height:40,animate:!0})),l.createElement("div",{className:"infor"},l.createElement("div",{className:"title"},l.createElement(c.O,{height:20,radius:"sm",animate:!0})))))),h&&l.createElement(ed,null,l.createElement("div",{className:"show-more",onClick:()=>{let e=`/${p.SPECIALTIES}`;n({type:r.NavigateTo,payload:e})}},o("home.seeAll"))))},ep=O.Z.div` display: flex; gap: 5px; margin-top: 16px; flex-wrap: wrap; `,eh=O.Z.div` color: ${N.r.colors.gray600}; font-size: 14px; font-weight: 600; line-height: 22px; padding: 4px 12px; background: ${N.r.colors.white}; border-radius: 32px; cursor: pointer; border: 1px solid ${N.r.colors.white}; margin-bottom: 5px; border-color: ${N.r.colors.neutral100}; background: #f7f9fc; &.view-all { border-radius: 32px; border-color: ${N.r.colors.blue50}; background: ${N.r.colors.blue50}; color: ${N.r.colors.blue600}; &:hover { border-color: ${N.r.colors.blue50}; background: ${N.r.colors.blue50}; color: ${N.r.colors.blue600}; } } &:hover { border-color: ${N.r.colors.neutral100}; background: #f7f9fc; } `,eu=O.Z.div` color: ${N.r.colors.gray600}; font-size: 14px; font-weight: 600; line-height: 22px; padding: 4px 0; background: ${N.r.colors.white}; border-radius: 32px; border: 1px solid ${N.r.colors.white}; margin-bottom: 5px; margin-right: 7px; `,SearchTag=({state:e,type:t,typeInformation:a,dispatch:i})=>{let{t:n}=(0,T.u)(),{selectedLocation:o}=e,s=(0,l.useMemo)(()=>a[t].slug,[a,t]),handleClickKeyword=e=>{e.url&&(window.location.href=e.url)};return l.createElement(ep,null,l.createElement(eu,null,n("booking.searchBar.popularKey")),e.popularKeys.map(e=>l.createElement(eh,{key:e.id,onClick:()=>handleClickKeyword(e)},e.keyword)),l.createElement(eh,{className:"view-all",onClick:()=>{let e=`/${o.slug}/${s}`;e&&i({type:r.NavigateTo,payload:e})}},n("booking.searchBar.viewAll")))},em=O.Z.div` background: rgba(255, 255, 255, 0.64); backdrop-filter: blur(12px); border-bottom: 1px solid ${N.r.colors.neutral100}; `,eg=(0,O.Z)(A.C)` padding: 0 16px; `,TabSearch=({currentTab:e,hideTabBookingSearch:t=[],hideSpecialtyTab:a,isMobile:i,setCurrentTab:n})=>{let{t:r}=(0,T.u)(),o=(0,l.useMemo)(()=>({root:{overflowY:i?"hidden":"initial",overflowX:i?"auto":"initial"},tabsList:{background:"rgba(255, 255, 255, 0)",borderBottom:"none",flexWrap:"nowrap",".mantine-Tabs-tab":{"&:last-child":{"&:after":{display:"none"}}}},tab:{padding:i?"12px 16px 12px 16px":"15px 40px 15px 40px",borderTop:"2px solid transparent",borderBottom:"none",margin:0,borderRadius:0,position:"relative",width:"auto",'&[data-active="true"]':{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:after":{display:"none"},"&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:hover":{borderColor:"#2d87f3",backgroundColor:"#ffffff","&:before":{content:'""',width:"100%",height:"1px",position:"absolute",backgroundColor:"#ffffff",bottom:"-1px"}},"&:after":{content:'""',width:"1px",height:"24px",backgroundColor:"#E4E8EC",position:"absolute",right:"-1px"}},tabLabel:{color:"#595959",fontSize:i?"14px":"16px",fontWeight:600,lineHeight:i?"22px":"24px"}}),[i]),s=(0,l.useMemo)(()=>[{value:"hospital",label:r("booking.searchPopup.hospitals")},{value:"doctor",label:r("booking.searchPopup.doctors")},{value:"service",label:r("booking.searchPopup.services")},...a?[]:[{value:"specialty",label:r("booking.searchPopup.specialties")}]],[a]),c=(0,l.useMemo)(()=>s.filter(e=>!t.includes(e.value))||[],[t,s]);return l.createElement(em,{className:"booking-search-tab"},l.createElement(eg,null,l.createElement(y.m,{value:e,onTabChange:e=>{n(e)},styles:o},l.createElement(y.m.List,null,c.map(e=>l.createElement(y.m.Tab,{value:e.value,key:e.value},e.label))))))};(n=o||(o={})).doctor="doctor",n.service="hospital_service",n.hospital="hospital_branch";let ignoreCacarSpecialty=e=>e.filter(e=>"string"==typeof e?"cacar-api"!==e:(null==e?void 0:e.id)!==232),BookingSearchBarV3=({isMobile:e,careApiDomain:t,geoLocationPermission:a,geoLocationCoordinates:i,initialSelectedCity:n,initialSearchValue:c="",initTypeSearch:d="hospital",initSpecialty:h,careFrontDomain:u="/care",isDebug:m=!1,gaTrackingSearchBar:g,gaTrackingLocationSearch:b,autoCompleteDisabled:x=!1,inputSearchPlaceholder:E="",hideTabBookingSearch:v=[],hideSpecialtySelection:y=!1,hideSpecialtyTab:k=!1,hidePopularSearchKeys:O=!1,clientSlug:N="",triggerSearchWhenChangeFilter:B,routerPush:A,onGeoLocationPermissionChange:L,onChangeLocation:R})=>{var M;let{locale:D,t:j}=(0,T.u)(),Z=(0,l.useRef)(null),K=(0,l.useRef)(null),V=(0,l.useRef)(null),q=(0,l.useRef)(null),[Y,X]=(0,l.useState)(d),{geoLocationPermission:Q,geoLocationCoordinates:J}=(0,S.u)(),[ee,et]=(0,l.useReducer)(reducer,W,t=>Object.assign(Object.assign({},t),{isDebug:m,isMobile:e,geoLocationPermission:a||Q||"unset",geoLocationCoordinates:i||J||null,searchKeywords:c,initialSelectedCity:n||null,selectedLocation:n||t.selectedLocation||null,searchLocationKeywords:(null==n?void 0:n.name)||t.searchLocationKeywords,autoCompleteDisabled:x,inputSearchPlaceholder:E,locale:D})),{navigateTo:ei,focusedSpecialty:en,searchKeywords:er,geoLocationPermission:eo,selectedLocation:el,initialSelectedCity:es,searchResults:ec,isLoadingSearchResults:ed}=ee,{fetchCitiesByLocation:ep,fetchCitiesByKeyword:eh,fetchSearchResults:eu,fetchAllSpecialties:em,fetchPopularKeys:eg}=function({dispatch:e,careApiDomain:t,locale:a="vi-VN",client:i=""}){let n=(0,l.useCallback)(function(i,n={}){let o=`${t}${i}`;return e({type:r.FetchCitiesStart}),fetch((0,S.h)(o,n,a),{method:"GET"}).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:(console.log("error loading cities",e),Promise.reject(e))).finally(()=>e({type:r.FetchCitiesFinish}))},[a]),s=(0,l.useCallback)(function({coordinates:t}){let o={},l={};t&&(o={lat:t.lat,lng:t.lng}),"ms-MY"===a&&(l.noPaging=1);let s=[n(P.P.GET_CITY_BY_IP,Object.assign(Object.assign(Object.assign({},o),l),{hospitalActive:1,client:_.C.MSD===i?"":i}))];return"zh-TW"===a?s.push(n(P.P.GET_CITIES_LIST,{noPaging:1,hospitalActive:1,client:_.C.MSD===i?"":i})):s.push(n(P.P.GET_CITIES_LIST,{noPaging:1,hospitalActive:1})),Promise.all(s).then(([t,a])=>{let i=Object.assign({},t);if(a){let e=i.cities.map(e=>e.id);i.cities=i.cities.concat(a.cities.filter(t=>!e.includes(t.id)))}e({type:r.FetchCitiesByGeoIpComplete,payload:i})}).catch(e=>console.error("error loading cities by location",e))},[a,t,e]),c=(0,l.useCallback)(function(t){return n(P.P.GET_CITIES_LIST,{keyword:t,client:i}).then(t=>{e({type:r.FetchCitiesByKeywordComplete,payload:t.cities})}).catch(e=>console.error("error loading cities by keyword",e))},[a,t,e]),d=(0,l.useCallback)(function(n,o,l,s,c){let d="specialty"===l?`${t}${P.P.GET_SEARCH_SPECIALTY}`:`${t}${P.P.GET_SEARCH_V2}`;e({type:r.FetchSearchResultsStart});let{selectedLocation:p,geoLocationCoordinates:h,selectedSpecialty:u}=o,m="";if(!p){e({type:r.FetchSearchResultsFinish});return}m=p.id===_.I?"":p.id;let g=(null==h?void 0:h.lat)||"",b=(null==h?void 0:h.lng)||"",f=(null==u?void 0:u.id)>0?null==u?void 0:u.id:"",x=n.trim().length>G[a]?n.trim():"";return fetch((0,S.h)(d,Object.assign({domain:t,searchType:l||"global",keyword:x,city:m===_.a?"":m,lat:g,lng:b,specialty_id:f,client_slug:_.C.MSD===s?"":s,msd:_.C.MSD===i?1:""},"doctor"===l&&{skipBooking:1}),a),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)).then(t=>{let a=[];"specialty"!==l&&(a="doctor"===l?t.searches.map(e=>Object.assign(Object.assign({},e),{specialties:ignoreCacarSpecialty((null==e?void 0:e.specialties)||[])})):t.searches),"specialty"===l&&(a=x?ignoreCacarSpecialty((null==t?void 0:t.specialties)||[]):ignoreCacarSpecialty((null==t?void 0:t.default)||[])),e({type:r.FetchSearchResultsComplete,payload:{key:l,searches:a||[]}}),c&&e({type:r.UpdateInitialSearchResults,payload:{key:l,searches:a||[]}})}).catch(e=>{console.log("error loading search results",{url:d,error:e})}).finally(()=>e({type:r.FetchSearchResultsFinish}))},[a,t,e]),p=(0,l.useCallback)(function(){let n=`${t}${P.P.GET_SEARCH_SPECIALTY}`;return fetch((0,S.h)(n,{domain:t,searchType:"",msd:_.C.MSD===i?1:""},a),{method:"GET",headers:{accept:"version=2.0.0.0"}}).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)).then(t=>{e({type:r.FetchAllSpecialties,payload:ignoreCacarSpecialty(t.specialties||[])})}).catch(e=>{console.log("error loading search results",{url:n,error:e})})},[a,t,e]),h=(0,l.useCallback)(function(i){let n=`${t}${P.P.GET_SEARCH_POPULAR_KEY}`;return fetch((0,S.h)(n,{domain:t,searchType:o[i],sort_by:"display_order",sort_order:"asc"},a)).then(e=>e.json()).then(e=>1===e._status&&e._data?null==e?void 0:e._data:Promise.reject(e)).then(t=>{e({type:r.FetchPopularKeys,payload:t.popular_searches||[]})}).catch(e=>{console.log("error loading search results",{url:n,error:e})})},[a,t,e]);return{fetchCitiesByLocation:s,fetchCitiesByKeyword:c,fetchSearchResults:d,fetchAllSpecialties:p,fetchPopularKeys:h}}({dispatch:et,locale:D,careApiDomain:t,client:N}),eb=(0,l.useMemo)(()=>_.L[D],[D]),[ef,{close:ex,open:eE}]=(0,C.q)(!1),ev=(0,l.useMemo)(()=>Object.assign({doctor:{name:j("booking.searchPopup.doctors"),icon:l.createElement(DoctorIcon,null),slug:eb.DOCTOR},service:{name:j("booking.searchPopup.services"),icon:l.createElement(ServiceIcon,null),slug:eb.SERVICE},hospital:{name:j("booking.searchPopup.hospitals"),icon:l.createElement(HospitalIcon,null),slug:eb.HOSPITAL}},!k&&{specialty:{name:j("booking.searchPopup.specialties"),icon:l.createElement(SpecialtyIcon,null),slug:eb.SPECIALTIES}}),[Y]),ey=(0,l.useMemo)(()=>I()(eh,400),[eh]),eC=(0,l.useMemo)(()=>I()(eu,400),[eu]),eS=(0,l.useCallback)(function({locationSlug:e,specialtyId:t}={}){var a;ex();let i="",{slug:n}=ev[Y],o="",l=_.M[D][N],s=t||(null===(a=ee.selectedSpecialty)||void 0===a?void 0:a.id)||-1,c=e||(null==el?void 0:el.slug)||"";("doctor"===Y||"hospital"===Y)&&s>0&&(o=`&specialtyId=${s}`),i="specialty"===Y?`/${n}`:`/${c}/${n}`,l&&(i+=`/${l}`),(i+=`?q=${er}${o}`)&&et({type:r.NavigateTo,payload:i})},[N,ex,Y,et,D,er,null==el?void 0:el.slug,null===(M=ee.selectedSpecialty)||void 0===M?void 0:M.id,ev]),ew=(0,l.useCallback)(function(e){B&&eS({locationSlug:e.slug}),et({type:r.SelectLocation,payload:e}),R&&R(e)},[et,e,R,eS,B]);(0,w.a)(q,()=>{e||et({type:r.ClickOutsideInputSearchSpecialty})}),(0,l.useEffect)(()=>{var t;"denied"===eo||es||et({type:r.SelectLocation,payload:{name:j("booking.searchBar.allLocations"),id:_.I,slug:null===(t=_.L[D])||void 0===t?void 0:t.ALL}}),L&&L(eo,ee.geoLocationCoordinates),e&&"granted"===eo&&el&&et({type:r.FocusInputSearch}),ep({coordinates:ee.geoLocationCoordinates})},[eo]),(0,l.useEffect)(()=>{var e;let t=h||{name:j("booking.searchBar.allSpecialties"),id:-1,thumbnail:"",total_doctor:0,slug:eb.SPECIALTIES};if(h){(null===(e=ee.selectedSpecialty)||void 0===e?void 0:e.id)!==h.id&&et({type:r.SelectSpecialty,payload:h});return}ee.selectedSpecialty&&ee.selectedSpecialty.id===t.id||et({type:r.SelectSpecialty,payload:t})},[h,eb.SPECIALTIES,j]),(0,l.useEffect)(()=>{em()},[]),(0,l.useEffect)(()=>{eg(Y)},[Y]),(0,l.useEffect)(()=>{ei&&(A?A(ei):window.location.href=`${u}${ei}`)},[ei]),(0,l.useEffect)(()=>{eu(ee.searchKeywords,ee,Y,N,!0)},[Y]),(0,l.useEffect)(()=>{if(ef&&e){let e=setTimeout(()=>{var e;null===(e=V.current)||void 0===e||e.focus()},150);return()=>clearTimeout(e)}},[ef,e]);let eT={type:Y,isMobile:e,state:ee,dispatch:et,debouncedFetchSearchResults:eC,initalSearchValue:c,onEnterSearch:eS,typeInformation:ev,trackingAttributes:g,isLoading:ed,hideSpecialtySelection:y||k,clientSlug:N,triggerSearchWhenChangeFilter:B,onChangeSpecialty:e=>B&&eS({specialtyId:e.id})};return l.createElement(l.Fragment,null,l.createElement($,{ref:Z},l.createElement(TabSearch,{currentTab:Y,setCurrentTab:X,isMobile:e,hideTabBookingSearch:v,hideSpecialtyTab:k}),l.createElement(z,{className:"booking-search-container"},l.createElement(U,null,l.createElement(H,{className:"booking-search-content"},l.createElement("div",{ref:q},l.createElement(f.k,{gap:"12px",align:"center",className:"flex-search-input"},l.createElement(ea,Object.assign({},eT,{ref:K,onFocusInput:()=>e&&eE()})),"specialty"!==Y&&l.createElement(SearchLocation,{state:ee,isMobile:e,dispatch:et,debouncedFetchCitiesByKeyword:ey,selectedLocation:el,onLocationClick:ew,trackingAttributes:b}),!e&&l.createElement(F.B,{size:"lg",variant:"primary",onClick:()=>eS(),styles:{root:{height:"48px",minWidth:"120px",borderRadius:"12px"}}},j("booking.searchBar.searchButton"))),!O&&"specialty"!==Y&&ee.popularKeys.length>0&&l.createElement(SearchTag,{type:Y,state:ee,typeInformation:ev,dispatch:et}),"specialty"===Y&&"search"===en&&l.createElement(SearchResultSpecialties,{state:ee,isMobile:e,dispatch:et,specialties:(null==ec?void 0:ec.specialty)||[],isLoading:ed})))))),e&&l.createElement(ModalSearchResult,{keepMounted:!0,opened:ef,onClose:ex,closeModal:ex,searchInputEle:l.createElement(f.k,{align:"center",gap:8},l.createElement(ea,Object.assign({},eT,{onlyShowSearchBox:!0,ref:V})),l.createElement(F.B,{variant:"primary",leftIcon:l.createElement(s.Z,{size:20,color:"#fff"}),onClick:()=>eS(),styles:{root:{borderRadius:"12px"}}}))},l.createElement(p.x,{sx:{marginLeft:-16,marginRight:-16}},l.createElement(SearchResultContent,{type:Y,state:ee,dispatch:et,isLoading:ed,typeInformation:ev,clientSlug:N}))))},eb=O.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:i})=>l.createElement(eb,{style:i,className:a},l.createElement(A.C,null,l.createElement("div",{className:"icon-wrapper"},t),l.createElement(L.T,{size:"c1",color:"var(--neutral800)"},e)))},hFre:function(e,t,a){a.d(t,{B:function(){return BtnChoice}});var i=a("q1tI"),n=a("G5av"),r=a("rBCA");let o=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[l,s]=(0,i.useState)(e);return(0,i.useEffect)(()=>{s(e)},[e]),i.createElement(o,{className:a},t.map((e,t)=>i.createElement(n.B,{dataEventCategory:e.dataEventCategory,dataEventAction:e.dataEventAction,dataEventLabel:e.dataEventLabel,size:"sm",variant:e.value===l?"primary":"tertiary",className:e.value===l?"btn-choice-selected":"",key:t,onClick:()=>{s(e.value),null==r||r(e.value)}},e.label||"")))}},"/M6w":function(e,t,a){a.d(t,{P:function(){return PopoverMenu},S:function(){return c}});var i=a("q1tI"),n=a("9B3w"),r=a("cMvO"),o=a("rBCA"),l=a("iBNF");let s=o.Z.div` position: relative; display: content; .popover-menu__btn { /* position: relative; */ > span { width: 100%; height: 100%; > img { width: 100%; height: 100%; } } } .popover-menu__content { position: absolute; z-index: 10; width: 320px; padding: 8px; border: none; background: #fff; border-radius: 8px; box-shadow: 3px 3px 20px rgba(0, 0, 0, 0.1); &::before { position: absolute; width: 16px; height: 8px; background: #fff; content: ''; } &.--position { &-top { bottom: calc(100% + 8px); &.--align { &-start { left: 0; &::before { top: 100%; left: 16px; clip-path: polygon(0 0, 50% 100%, 100% 0); } } &-end { left: 100%; transform: translateX(calc(-100% + 1rem)); &::before { top: 100%; right: 16px; clip-path: polygon(0 0, 50% 100%, 100% 0); } } } } &-right { left: calc(100% + 8px); &.--align { &-start { top: 0; &::before { top: 16px; left: 0; width: 8px; height: 16px; clip-path: polygon(0 50%, 100% 0%, 100% 100%); transform: translateX(-100%); } } &-end { top: 100%; transform: translateX(calc(-100% + 1rem)); &::before { bottom: 16px; left: 0; width: 8px; height: 16px; clip-path: polygon(0 50%, 100% 0%, 100% 100%); transform: translateX(-100%); } } } } &-bottom { top: calc(100% + 8px); &.--align { &-start { left: 0; &::before { bottom: 100%; left: 16px; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); } } &-end { left: 100%; transform: translateX(calc(-100% + 1rem)); &::before { right: 16px; bottom: 100%; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); } } } } &-left { left: -8px; transform: translateX(-100%); &.--align { &-start { top: 0; &::before { top: 16px; left: 100%; width: 8px; height: 16px; clip-path: polygon(0 0%, 100% 50%, 0% 100%); transform: translateX(0); } } &-end { bottom: 0; &::before { bottom: 16px; left: 100%; width: 8px; height: 16px; clip-path: polygon(0 0%, 100% 50%, 0% 100%); transform: translateX(0); } } } } } } &[data-is-marrybaby='true'] { .popover-menu__content { padding: 0; border-radius: 12px; /* &::before { display: none; } */ } } `,c=o.Z.div` display: flex; /* max-height: 300px; */ flex-direction: column; cursor: default; .__header { position: relative; display: flex; align-items: center; justify-content: center; padding: 1rem 0; margin-bottom: 8px; .__back-btn { position: absolute; top: 50%; left: 8px; width: 16px; height: 16px; cursor: pointer; transform: translateY(-50%); } } .tree-text-description { padding-right: 8px; padding-left: 8px; margin-top: -8px; margin-bottom: 8px; font-size: 14px; font-weight: 400; line-height: 22px; text-align: left; } .__content { overflow: auto; flex: 1; } .__list { .__item { position: relative; &.bold-item { font-weight: 700; } &:last-child { .__btn { margin-bottom: 0; } } .__btn { position: relative; display: flex; width: 100%; height: 40px; align-items: center; padding: 0 1rem; border: none; margin-bottom: 8px; color: ${l.r.colors.gray800}; cursor: pointer; text-align: left; transition: background 0.3s; /* for better gtm tracking result */ * { pointer-events: none; } &.--checked { color: ${l.r.colors.gray500}; pointer-events: none; } &:hover { background: ${l.r.colors.gray100}; } .__icon { width: 16px; height: 16px; margin-right: 0.4rem; } & > span { position: relative; & > img { width: 16px; height: 16px; margin-right: 0.4rem; } } } .__toggle { position: absolute; top: 50%; right: 16px; width: 16px; height: 16px; pointer-events: none; transform: translateY(-50%); } } } &[data-is-marrybaby='true'] { .__header { padding: 1rem; } .tree-text-description { padding: 0 1rem; } .__list { .__item { &:first-child { .__btn { border-top-left-radius: 12px; border-top-right-radius: 12px; } } &:last-child { .__btn { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; } } .__btn { height: unset; padding: 1rem; margin-bottom: 0; &:hover { background: ${l.r.mbColors.lightPink}; } } } } } `,PopoverMenu=({className:e,style:t,toggleButtonContent:a,position:o="bottom",align:l="end",children:c,buttonProps:d})=>{let{data:{env:{isMarryBaby:p}}}=(0,i.useContext)(r.T),[h,u]=(0,i.useState)(!1),m=(0,i.useRef)(null),g=(0,i.useRef)(h);return(0,i.useEffect)(()=>{var e;g.current=h,h&&(null===(e=m.current)||void 0===e||e.focus())},[h]),(0,i.useEffect)(()=>{let clickHandler=e=>{var t;(null===(t=m.current)||void 0===t?void 0:t.contains(e.target))||!g.current||u(!1)};return window.addEventListener("click",clickHandler,{passive:!0}),()=>{window.removeEventListener("click",clickHandler)}},[]),i.createElement(s,{"data-is-marrybaby":p,className:e,style:t},i.createElement(n.B,Object.assign({theme:p?"marryBaby":"helloSites",className:"popover-menu__btn",size:"md",color:"transparent",onClick:()=>u(e=>!e)},d),a),h?i.createElement("div",{ref:m,className:`popover-menu__content --position-${o} --align-${l}`,tabIndex:0,onClick:e=>e.stopPropagation()},"function"==typeof c?c({setShow:u}):c):null)}},"4jlX":function(e,t,a){a.d(t,{T:function(){return TextArea}});var i=a("fbRC"),n=a("q1tI"),r=a("0qvZ"),o=a("6HDN"),l=a("aaf5");let TextArea=e=>{var{styles:t}=e,a=(0,i._)(e,["styles"]);let s=(0,l.u)(),{classes:c}=(0,o.u)({variantStyle:s},{name:"MantineTextarea",styles:t});return n.createElement(r.g,Object.assign({classNames:{input:c.input},minRows:2,maxRows:4},a))}},h3Tz:function(e,t,a){a.d(t,{M:function(){return Modal}});var i=a("fbRC"),n=a("q1tI"),r=a("h8tX"),o=a("UUOW");let Modal=e=>{var{styles:t,classNames:a,transitionProps:l}=e,s=(0,i._)(e,["styles","classNames","transitionProps"]);let{classes:c}=(0,o.u)(void 0,{name:"Modal",styles:t,classNames:a});return n.createElement(r.u,Object.assign({centered:!0,classNames:c,transitionProps:Object.assign({transition:"fade"},l),trapFocus:!1},s))}},nSs0:function(e,t,a){a.d(t,{M:function(){return f},N:function(){return NotificationsHandler},a:function(){return getHeadingStyles},g:function(){return getMantineThemeOverride},s:function(){return showNotification},t:function(){return T},u:function(){return useMantineLocale}});var i=a("fbRC"),n=a("q1tI"),r=a("Wgwc"),o=a.n(r),l=a("/hDE"),s=a("INKa"),c=a("0Woy"),d=a("v7JE"),p=a("mYVa"),h=a("gC6A"),u=a("iBNF"),m=a("oKqh"),g=a("aaf5"),b=a("OhZU");let f={[l.L.Vietnam]:"vi",[l.L.Cambodia]:"km",[l.L.India]:"hi",[l.L.Indonesia]:"id",[l.L.Malaysia]:"ms",[l.L.Thailand]:"th",[l.L.Taiwan]:"zh-tw",[l.L.PhilippinesTagalog]:"tl-ph",[l.L.PhilippinesEnglish]:"en",[l.L.Myanmar]:"my",[l.L.Singapore]:"zh-cn"},x={[l.L.Vietnam]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"EdQk",23)),[l.L.Cambodia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"9mFM",23)),[l.L.India]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"sjup",23)),[l.L.Indonesia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"gydT",23)),[l.L.Malaysia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"KjFU",23)),[l.L.Thailand]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"axPs",23)),[l.L.Taiwan]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"UIeI",23)),[l.L.Singapore]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"pHGr",23)),[l.L.PhilippinesTagalog]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"BmsB",23)),[l.L.PhilippinesEnglish]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"njAx",23)),[l.L.Myanmar]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.t.bind(a,"5EMu",23))},useMantineLocale=e=>{let[t,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{(0,i.a)(void 0,void 0,void 0,function*(){var t;a(!1),yield null===(t=x[e])||void 0===t?void 0:t.call(x),o().locale(f[e]),a(!0)})},[e]),{isLoaded:t}},GlobalButtonStyle=()=>({Button:{defaultProps:{variant:"primary",size:"md"}}}),E={[g.C.NONE]:{hb:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],mb:["#FFE9F1","#F8CCDC","#F5B4CB","#F29CBA","#EE84AA","#EB6B99","#E85388","#D34C7C","#BE446F","#A93D63"],blue:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],gray:["#fafafa","#f2f2f2","#d9d9d9","#bfbfbf","#8c8c8c","#737373","#595959","#404040","#262626","#1a1a1a"],delftGray:["#F3F3F3","#EAEAEC","#D9DAE2","#B9BAC8","#9898A9","#7C7C8F","#5A5A72","#3E3F58","#202135","#0C0C12"],neutral:["#f7f9fc","#e4e8ec","#d2d6dc","#bfc5cc","#adb3bc","#9aa2ac","#87909c","#757f8c","#626d7c","#545E6C"],green:["#e0f8ee","#b3eed5","#7ce2b9","#2ed69e","#00CB8A","#00C076","#00B16A","#009E5C","#008C50","#006C39"],pink:["#fff1f6","#ffdce9","#fec7dc","#feb2cf","#fe9dc2","#fd87b4","#fd72a7","#fc5d9a","#fc488d","#e92d74"],violet:["#F5EDFF","#E7D2F7","#D8B7F0","#CA9CE8","#BB82E1","#AD67D9","#9E4CD1","#9031CA","#8116C2","#63059D"],yellow:["#fff8e2","#ffecb6","#ffe187","#ffd658","#ffcb37","#ffc326","#ffb521","#fea21e","#fe921d","#fc7419"],teal:["#e0f7fc","#b1ebf8","#7ddff3","#44d1ec","#00c7e6","#00bee0","#00aecd","#0099b2","#008599","#00626c"],indigol:["#CEDDF0","#ACC5E6","#95B3DA","#85A6CF","#6D91BE","#5F85B5","#4C77AC","#35639C","#284A75","#1B3250"],red:["#fae9e8","#feccbf","#FEAA96","#f44d2c","#ff6f4d","#ff5331","#f44d2c","#e64728","#d84023","#bf331b"],redViolet:["#F3EAEB","#E8D5D7","#DDC1C4","#D1ACB0","#C5979C","#BA8288","#AF6D74","#A35961","#97444D","#8C2F39"]},[g.C.LEADGEN]:{hb:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],mb:["#FFE9F1","#F8CCDC","#F5B4CB","#F29CBA","#EE84AA","#EB6B99","#E85388","#D34C7C","#BE446F","#A93D63"],blue:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],gray:["#fafafa","#f2f2f2","#d9d9d9","#bfbfbf","#8c8c8c","#737373","#595959","#404040","#262626","#111111"],delftGray:["#F3F3F3","#EAEAEC","#D9DAE2","#B9BAC8","#9898A9","#7C7C8F","#5A5A72","#3E3F58","#202135","#0C0C12"],neutral:["#f7f9fc","#e4e8ec","#d2d6dc","#bfc5cc","#adb3bc","#9aa2ac","#87909c","#757f8c","#626d7c","#545E6C"],green:["#e0f8ee","#b3eed5","#7ce2b9","#2ed69e","#00CB8A","#00C076","#00B16A","#009E5C","#008C50","#006C39"],pink:["#fff1f6","#ffdce9","#fec7dc","#feb2cf","#fe9dc2","#fd87b4","#fd72a7","#fc5d9a","#fc488d","#e92d74"],violet:["#F5EDFF","#E7D2F7","#D8B7F0","#CA9CE8","#BB82E1","#AD67D9","#9E4CD1","#9031CA","#8116C2","#63059D"],yellow:["#fff8e2","#ffecb6","#ffe187","#ffd658","#ffcb37","#ffc326","#ffb521","#fea21e","#fe921d","#fc7419"],teal:["#e0f7fc","#b1ebf8","#7ddff3","#44d1ec","#00c7e6","#00bee0","#00aecd","#0099b2","#008599","#00626c"],indigol:["#CEDDF0","#ACC5E6","#95B3DA","#85A6CF","#6D91BE","#5F85B5","#4C77AC","#35639C","#284A75","#1B3250"],red:["#fae9e8","#feccbf","#FEAA96","#f44d2c","#ff6f4d","#ff5331","#f44d2c","#e64728","#d84023","#bf331b"],redViolet:["#F3EAEB","#E8D5D7","#DDC1C4","#D1ACB0","#C5979C","#BA8288","#AF6D74","#A35961","#97444D","#8C2F39"]}};function NotificationsHandler(){return n.createElement(s.T,{position:"top-right",zIndex:d.Z+5,autoClose:5e3})}let v={success:"green",danger:"red",warning:"yellow",info:"blue",firebase:"gray"},y={success:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M10 18.333a8.333 8.333 0 1 0 0-16.666 8.333 8.333 0 0 0 0 16.666",fill:"#00B16A"}),n.createElement("path",{d:"m13.833 7.5-5.5 5-2.5-2.273",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),danger:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10",fill:"#262626"}),n.createElement("path",{d:"m14.829 9.172-5.657 5.656m-.001-5.656 5.657 5.656",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),warning:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1.66666C5.4 1.66666 1.66667 5.39999 1.66667 9.99999C1.66667 14.6 5.4 18.3333 10 18.3333C14.6 18.3333 18.3333 14.6 18.3333 9.99999C18.3333 5.39999 14.6 1.66666 10 1.66666ZM10 10.8333C9.54167 10.8333 9.16667 10.4583 9.16667 9.99999V6.66666C9.16667 6.20832 9.54167 5.83332 10 5.83332C10.4583 5.83332 10.8333 6.20832 10.8333 6.66666V9.99999C10.8333 10.4583 10.4583 10.8333 10 10.8333ZM9.16667 12.5V14.1667H10.8333V12.5H9.16667Z",fill:"#FE921D"})),null),info:n.createElement(()=>n.createElement("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("path",{d:"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12",fill:"#2D87F3"}),n.createElement("path",{d:"M8 11V8m0-3h.01",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),firebase:""},showNotification=e=>{var{type:t,title:a}=e,r=(0,i._)(e,["type","title"]);let o=y[t];c.N9.show(Object.assign(Object.assign({title:n.createElement("b",null,a),icon:o,withCloseButton:!0,closeButtonProps:{label:"Close alert"}},r),{styles:e=>{let a=v[t]||"blue";return{root:{backgroundColor:e.colors[a][0],borderColor:e.colors[a][0],"&::before":{backgroundColor:e.white}},title:{color:e.colors[a][8]},description:{color:e.black},closeButton:{color:e.black,"&:hover":{backgroundColor:e.colors[a][0]}},icon:{backgroundColor:"transparent",padding:0}}}}))},C={Container:{defaultProps:{sizes:{lg:(0,p.em)(m.S.LG)}}}},S={none:{default:[{size:"40px",lineHeight:"52px",letterSpacing:"-1.2px"},{size:"32px",lineHeight:"42px",letterSpacing:"-1px"},{size:"26px",lineHeight:"36px",letterSpacing:"-0.8px"},{size:"22px",lineHeight:"32px",letterSpacing:"-0.6px"},{size:"18px",lineHeight:"28px",letterSpacing:"-0.2px"},{size:"16px",lineHeight:"24px",letterSpacing:0}],mbDown:[{size:"26px",lineHeight:"34px",letterSpacing:"-0.9px"},{size:"24px",lineHeight:"32px",letterSpacing:"-0.8px"},{size:"20px",lineHeight:"26px",letterSpacing:"-0.7px"},{size:"18px",lineHeight:"26px",letterSpacing:"-0.6px"},{size:"16px",lineHeight:"24px",letterSpacing:"-0.2px"},{size:"14px",lineHeight:"22px",letterSpacing:"-0.2px"}]},leadgen:{default:[{size:"40px",lineHeight:"48px",letterSpacing:"-1.2px"},{size:"32px",lineHeight:"40px",letterSpacing:"-1px"},{size:"26px",lineHeight:"32px",letterSpacing:"-0.6px"},{size:"20px",lineHeight:"28px",letterSpacing:"-0.4px"},{size:"17px",lineHeight:"24px",letterSpacing:"-0.4px"},{size:"15px",lineHeight:"24px",letterSpacing:"-0.3px"}],mbDown:[{size:"26px",lineHeight:"34px",letterSpacing:"-0.9px"},{size:"24px",lineHeight:"32px",letterSpacing:"-0.8px"},{size:"20px",lineHeight:"26px",letterSpacing:"-0.7px"},{size:"18px",lineHeight:"26px",letterSpacing:"-0.6px"},{size:"16px",lineHeight:"24px",letterSpacing:"-0.2px"},{size:"14px",lineHeight:"22px",letterSpacing:"-0.2px"}]}},getHeadingStyles=e=>{let{version:t=g.C.NONE,mbDown:a}=e||{},i=S[t]||{};return Object.fromEntries((i[a?"mbDown":"default"]||[]).map((e,t)=>[`h${t+1}`,{fontSize:e.size,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing}]))},GlobalHeadingStyle=(e=g.C.NONE)=>({Title:{styles:{root:Object.assign(Object.assign({fontWeight:g.F.bold},getHeadingStyles({version:e})),{[`&${m.M.mbDown}`]:Object.assign({},getHeadingStyles({version:e,mbDown:!0}))})}}}),GlobalInputStyle=e=>{var t;return{InputWrapper:{styles:{label:{display:"inline-flex",gap:4,marginBottom:"0.25rem",fontWeight:600,fontSize:(0,p.h)(14),lineHeight:"22px",color:u.r.colors.gray600},description:{fontWeight:400,fontSize:"12px",lineHeight:"18px",color:u.r.colors.gray600,marginBottom:"0.25rem"},error:{marginTop:"0.25rem"}}},NumberInput:{defaultProps:{decimalSeparator:null===(t=d.I[e])||void 0===t?void 0:t.separator}},Input:{styles:(e,t,{size:a})=>({input:{border:`1px solid ${u.r.colors.gray200}`,transition:`all ${b.A} ease-in-out`,"&:not(.mantine-Textarea-input)":Object.assign({},(()=>{switch(a){case"lg":return{height:48,minHeight:"unset",fontSize:16,lineHeight:"24px"};case"md":return{height:40,minHeight:"unset",fontSize:(0,p.h)(14),lineHeight:"22px"};case"sm":return{height:32,minHeight:"unset",fontSize:(0,p.h)(14),lineHeight:"22px"}}})()),"&:hover":{border:`1px solid ${e.primaryColor}`},"&:focus":{boxShadow:`0px 0px 0px 2px ${e.colors[e.primaryColor][2]}`}},'&[data-invalid="true"]':{border:`1px solid ${u.r.colors.red600}`,color:"#000"}})}}},w={Radio:{defaultProps:{size:"sm",color:"blue.6"},styles:{radio:{backgroundColor:"transparent","&:checked":{backgroundColor:"transparent"}}}}},T=E[g.C.NONE],getMantineThemeOverride=(e,t="hb",a)=>{var i;return{defaultRadius:"hb"===t?8:16,cursorType:"pointer",colors:Object.assign(Object.assign(Object.assign({},null!==(i=E[a])&&void 0!==i?i:E[g.C.NONE]),u.r.colors),{toneYellow:"#fff9eb",toneGreen:"#f2fcf7",toneBlue:"#e0e9fb",tonePink:"#ffeaf1"}),primaryColor:t,primaryShade:6,fontFamily:(e===l.L.Cambodia?"Battambang":e===l.L.Thailand?"Noto Sans Thai":"Inter")+", -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",breakpoints:{xs:(0,p.em)(m.B.BREAK_POINT_SMALL_MOBILE),sm:(0,p.em)(m.B.BREAK_POINT_MOBILE),md:(0,p.em)(m.B.BREAK_POINT_TABLET),lg:(0,p.em)(m.B.BREAK_POINT_PC),xl:(0,p.em)(m.B.BREAK_POINT_LGPC)},components:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},GlobalInputStyle(e)),w),GlobalButtonStyle()),GlobalHeadingStyle(a)),C),other:{template:t,customStyleType:a,defaultImage:h.C.getAssetPath("mb"===t?"default-image-mb.jpg":"default-image.jpg")}}}},x4uK:function(e,t,a){a.d(t,{C:function(){return CartCareButton},S:function(){return ShoppingCartCare}});var i=a("q1tI"),n=a("xXM3"),r=a.n(n),o=a("rBCA"),l=a("Eso5"),s=a("oKqh"),c=a("iBNF"),d=a("thIk"),p=a("F/Hd");let ShoppingCartCare=e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),i.createElement("path",{d:"M1.94434 1.94434L3.44545 2.31989C3.88211 2.42878 4.20989 2.791 4.27545 3.23656L5.55656 11.9454",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M16.9444 14.7218H4.99997C4.23331 14.7218 3.61108 14.0996 3.61108 13.3329C3.61108 12.5662 4.23331 11.944 4.99997 11.944H14.4766C14.9544 11.944 15.38 11.6385 15.5311 11.184L17.0122 6.73957C17.2522 6.01957 16.7166 5.27734 15.9578 5.27734H4.57553",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M4.16648 18.8891C4.93354 18.8891 5.55537 18.2673 5.55537 17.5002C5.55537 16.7332 4.93354 16.1113 4.16648 16.1113C3.39941 16.1113 2.77759 16.7332 2.77759 17.5002C2.77759 18.2673 3.39941 18.8891 4.16648 18.8891Z",fill:"currentColor"}),i.createElement("path",{d:"M15.8332 18.8891C16.6003 18.8891 17.2221 18.2673 17.2221 17.5002C17.2221 16.7332 16.6003 16.1113 15.8332 16.1113C15.0662 16.1113 14.4443 16.7332 14.4443 17.5002C14.4443 18.2673 15.0662 18.8891 15.8332 18.8891Z",fill:"currentColor"})),h=(0,o.Z)(l.x)` display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #ffffff33; position: relative; flex-shrink: 0; cursor: pointer; /* Desktop: Square layout */ border-radius: 28px; max-height: 40px; padding: 9px 1rem; background-color: inherit; white-space: nowrap; .cart-care-icon { width: 20px; height: 20px; color: ${c.r.colors.white}; flex-shrink: 0; } .cart-care-button-text { display: block; font-size: 14px; font-weight: 500; line-height: 22px; } /* Mobile: Circle layout */ ${s.M.mbDown} { border-radius: 100%; aspect-ratio: 1/1; width: 32px; height: 32px; padding: auto; background-color: ${c.r.colors.white}; max-height: none; padding: 0; .cart-care-icon { width: 20px; height: 20px; color: ${c.r.colors.blue900}; flex-shrink: 0; } .cart-care-button-text { display: none; } } `,u=(0,o.Z)(l.x)` min-width: 20px; min-height: 20px; aspect-ratio: 1/1; border-radius: 100%; background-color: ${c.r.colors.red500}; color: ${c.r.colors.white}; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: absolute; top: -4px; right: -4px; ${s.M.mbDown} { top: -8px; right: -8px; } `,CartCareButton=e=>{let{count:t=0,href:a,classes:n,boxProps:o,anchorProps:l,tracking:s}=e,{t:m}=(0,d.u)();return i.createElement("a",Object.assign({className:r()("cart-care-button"),href:a,"data-testid":"cart-care-button","data-event-category":"Hamburger Navigation","data-event-action":"Cart Click","data-event-label":a},s,l),i.createElement(h,Object.assign({className:r()("cart-care-button-box",null==n?void 0:n.box)},o),i.createElement(ShoppingCartCare,{className:"cart-care-icon"}),i.createElement(p.T,{size:"label1",color:c.r.colors.white,fw:500,className:"cart-care-button-text"},m("navigation.button.cartCareService")),t>0&&i.createElement(u,{className:r()("cart-care-button-count-box",null==n?void 0:n.count)},i.createElement(p.T,{size:t>99?"label2":"c1",color:c.r.colors.white,fw:600,className:"cart-care-button-count-text"},t>99?"99+":t))))}},aaf5:function(e,t,a){a.d(t,{C:function(){return r},F:function(){return o},G:function(){return GlobalTextStyleNew},T:function(){return TemplateProvider},a:function(){return c},u:function(){return useTemplateVariant}});var i,n,r,o,l=a("mYVa"),s=a("q1tI");(i=r||(r={})).LEADGEN="leadgen",i.NONE="none",(n=o||(o={}))[n.regular=400]="regular",n[n.halfBold=500]="halfBold",n[n.semiBold=600]="semiBold",n[n.bold=700]="bold";let c={[r.NONE]:{fontSize:{base:[(0,l.h)(16),(0,l.h)(16)],lg:[(0,l.h)(18),(0,l.h)(16)],md:[(0,l.h)(18),(0,l.h)(16)],sm:[(0,l.h)(16),(0,l.h)(14)],xs:[(0,l.h)(14),(0,l.h)(12)],s1:[(0,l.h)(22),(0,l.h)(18)],s2:[(0,l.h)(18),(0,l.h)(16)],s3:[(0,l.h)(16),(0,l.h)(14)],s4:[(0,l.h)(14),(0,l.h)(12)],s5:[(0,l.h)(12),(0,l.h)(12)],p1:[(0,l.h)(18),(0,l.h)(16)],p2:[(0,l.h)(16),(0,l.h)(16)],p3:[(0,l.h)(16),(0,l.h)(14)],p4:[(0,l.h)(14),(0,l.h)(12)],p5:[(0,l.h)(12),(0,l.h)(12)],c1:[(0,l.h)(16),(0,l.h)(14)],c2:[(0,l.h)(14),(0,l.h)(12)],n1:[(0,l.h)(12),(0,l.h)(12)],label1:[(0,l.h)(14),(0,l.h)(14)],label2:[(0,l.h)(12),(0,l.h)(12)],h1:[(0,l.h)(40),(0,l.h)(26)],h2:[(0,l.h)(32),(0,l.h)(24)],h3:[(0,l.h)(26),(0,l.h)(20)],h4:[(0,l.h)(22),(0,l.h)(18)],h5:[(0,l.h)(18),(0,l.h)(16)],h6:[(0,l.h)(16),(0,l.h)(14)],title1:[(0,l.h)(17),(0,l.h)(17)],title2:[(0,l.h)(15),(0,l.h)(15)]},lineHeight:{base:[(0,l.h)(24),(0,l.h)(24)],lg:[(0,l.h)(32),(0,l.h)(28)],md:[(0,l.h)(32),(0,l.h)(28)],sm:[(0,l.h)(24),(0,l.h)(22)],xs:[(0,l.h)(24),(0,l.h)(18)],s1:[(0,l.h)(32),(0,l.h)(26)],s2:[(0,l.h)(28),(0,l.h)(24)],s3:[(0,l.h)(24),(0,l.h)(24)],s4:[(0,l.h)(22),(0,l.h)(18)],s5:[(0,l.h)(18),(0,l.h)(18)],p1:[(0,l.h)(28),(0,l.h)(28)],p2:[(0,l.h)(24),(0,l.h)(24)],p3:[(0,l.h)(24),(0,l.h)(22)],p4:[(0,l.h)(22),(0,l.h)(18)],c1:[(0,l.h)(24),(0,l.h)(22)],c2:[(0,l.h)(22),(0,l.h)(18)],n1:[(0,l.h)(18),(0,l.h)(18)],label1:[(0,l.h)(22),(0,l.h)(22)],label2:[(0,l.h)(18),(0,l.h)(18)],h1:[(0,l.h)(52),(0,l.h)(34)],h2:[(0,l.h)(42),(0,l.h)(32)],h3:[(0,l.h)(36),(0,l.h)(26)],h4:[(0,l.h)(32),(0,l.h)(26)],h5:[(0,l.h)(28),(0,l.h)(24)],h6:[(0,l.h)(24),(0,l.h)(22)],title1:[(0,l.h)(24),(0,l.h)(24)],title2:[(0,l.h)(24),(0,l.h)(24)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.2,-.2],p2:[0,-.2],p3:[0,-.2],p4:[-.2,0],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.8,-.7],h4:[-.6,-.6],h5:[-.2,-.2],h6:[0,-.2],title1:[-.4,-.4],title2:[-.3,-.3]},fontWeightBySize:{s1:o.semiBold,s2:o.semiBold,s3:o.semiBold,s4:o.semiBold,h1:o.bold,h2:o.bold,h3:o.bold,h4:o.bold,h5:o.bold,h6:o.bold},fontWeight:o},[r.LEADGEN]:{fontSize:{base:[(0,l.h)(16),(0,l.h)(16)],lg:[(0,l.h)(18),(0,l.h)(16)],md:[(0,l.h)(18),(0,l.h)(16)],sm:[(0,l.h)(16),(0,l.h)(14)],xs:[(0,l.h)(14),(0,l.h)(12)],s1:[(0,l.h)(22),(0,l.h)(18)],s2:[(0,l.h)(18),(0,l.h)(16)],s3:[(0,l.h)(16),(0,l.h)(14)],s4:[(0,l.h)(14),(0,l.h)(12)],s5:[(0,l.h)(12),(0,l.h)(12)],p1:[(0,l.h)(17),(0,l.h)(17)],p2:[(0,l.h)(15),(0,l.h)(15)],p3:[(0,l.h)(13),(0,l.h)(13)],p4:[(0,l.h)(14),(0,l.h)(12)],p5:[(0,l.h)(12),(0,l.h)(12)],c1:[(0,l.h)(12),(0,l.h)(12)],c2:[(0,l.h)(11),(0,l.h)(11)],n1:[(0,l.h)(12),(0,l.h)(12)],label1:[(0,l.h)(14),(0,l.h)(14)],label2:[(0,l.h)(12),(0,l.h)(12)],h1:[(0,l.h)(40),(0,l.h)(26)],h2:[(0,l.h)(32),(0,l.h)(24)],h3:[(0,l.h)(26),(0,l.h)(22)],h4:[(0,l.h)(22),(0,l.h)(20)],h5:[(0,l.h)(18),(0,l.h)(16)],h6:[(0,l.h)(16),(0,l.h)(14)],title1:[(0,l.h)(17),(0,l.h)(17)],title2:[(0,l.h)(15),(0,l.h)(15)],overline:[(0,l.h)(11),(0,l.h)(11)],subText:[(0,l.h)(10),(0,l.h)(10)]},lineHeight:{base:[(0,l.h)(24),(0,l.h)(24)],lg:[(0,l.h)(32),(0,l.h)(28)],md:[(0,l.h)(32),(0,l.h)(28)],sm:[(0,l.h)(24),(0,l.h)(22)],xs:[(0,l.h)(24),(0,l.h)(18)],s1:[(0,l.h)(32),(0,l.h)(26)],s2:[(0,l.h)(28),(0,l.h)(24)],s3:[(0,l.h)(24),(0,l.h)(24)],s4:[(0,l.h)(22),(0,l.h)(18)],s5:[(0,l.h)(18),(0,l.h)(18)],p1:[(0,l.h)(28),(0,l.h)(28)],p2:[(0,l.h)(24),(0,l.h)(24)],p3:[(0,l.h)(20),(0,l.h)(20)],p4:[(0,l.h)(22),(0,l.h)(18)],c1:[(0,l.h)(16),(0,l.h)(16)],c2:[(0,l.h)(22),(0,l.h)(18)],n1:[(0,l.h)(18),(0,l.h)(18)],label1:[(0,l.h)(22),(0,l.h)(22)],label2:[(0,l.h)(18),(0,l.h)(18)],h1:[(0,l.h)(48),(0,l.h)(34)],h2:[(0,l.h)(40),(0,l.h)(32)],h3:[(0,l.h)(32),(0,l.h)(32)],h4:[(0,l.h)(32),(0,l.h)(28)],h5:[(0,l.h)(28),(0,l.h)(24)],h6:[(0,l.h)(24),(0,l.h)(22)],title1:[(0,l.h)(24),(0,l.h)(24)],title2:[(0,l.h)(24),(0,l.h)(24)],overline:[(0,l.h)(12),(0,l.h)(12)],subText:[(0,l.h)(12),(0,l.h)(12)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.4,-.4],p2:[-.3,-.3],p3:[-.3,-.3],p4:[-.2,0],c1:[-.2,-.2],c2:[-.2,-.2],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.6,-.6],h4:[-.6,-.4],h5:[-.2,-.2],h6:[0,-.2],n1:[-.2,-.2],title1:[-.4,-.4],title2:[-.3,-.3],overline:[-.2,-.2],subText:[-.2,-.2]},fontWeightBySize:{s1:o.semiBold,s2:o.semiBold,s3:o.semiBold,s4:o.semiBold,h1:o.bold,h2:o.bold,h3:o.bold,h4:o.bold,h5:o.bold,h6:o.bold},fontWeight:o}},GlobalTextStyleNew=e=>({[r.LEADGEN]:{h1:{fontSize:(0,l.h)(40),lineHeight:(0,l.h)(48),letterSpacing:"-1.2px",[e.fn.smallerThan("sm")]:{fontSize:(0,l.h)(26),lineHeight:(0,l.h)(32),letterSpacing:"-0.6px"}},h2:{fontSize:(0,l.h)(32),lineHeight:(0,l.h)(40),letterSpacing:"-1px",[e.fn.smallerThan("sm")]:{fontSize:(0,l.h)(20),lineHeight:(0,l.h)(28),letterSpacing:"-0.4px"}},h3:{fontSize:(0,l.h)(26),lineHeight:(0,l.h)(32),letterSpacing:"-0.6px",[e.fn.smallerThan("sm")]:{fontSize:(0,l.h)(20),lineHeight:(0,l.h)(28),letterSpacing:"-0.4px"}},p1:{fontSize:(0,l.h)(17),lineHeight:(0,l.h)(28),letterSpacing:"-0.4px"},p2:{fontSize:(0,l.h)(15),lineHeight:(0,l.h)(24),letterSpacing:"-0.3px"}}}),d=(0,s.createContext)(r.NONE),TemplateProvider=({variant:e=r.NONE,children:t})=>s.createElement(d.Provider,{value:e},t),useTemplateVariant=()=>(0,s.useContext)(d)},Aeci:function(e,t,a){a.d(t,{I:function(){return ImageWrap},u:function(){return useScreenSize}});var i=a("q1tI"),n=a("oKqh"),r=a("fbRC"),o=a("rBCA");let getIsMobile=()=>"undefined"!=typeof window&&window.innerWidth"undefined"!=typeof window&&window.innerWidth>=n.B.BREAK_POINT_MOBILE&&window.innerWidth{let[e,t]=(0,i.useState)(getIsMobile()),[a,n]=(0,i.useState)(getIsLargeMobile());return(0,i.useEffect)(()=>{let handleResize=()=>{t(getIsMobile()),n(getIsLargeMobile())};return window.addEventListener("resize",handleResize,{passive:!0}),()=>{window.removeEventListener("resize",handleResize)}},[]),{isMobile:e,isLargeMobile:a}},ImageWrap=e=>{var{alt:t,backupSrc:a,src:n,placeholderSrc:o,style:s,ref:c}=e,d=(0,r._)(e,["alt","backupSrc","src","placeholderSrc","style","ref"]);let[p,h]=(0,i.useState)(!1);return i.createElement(l,Object.assign({loading:"lazy",alt:t,onError:()=>!p&&h(!0),src:p?a||n:n||a,style:Object.assign(Object.assign({},o?{backgroundImage:`url(${o})`}:{}),s),"data-has-placeholder":!!o,ref:c},d))},l=o.Z.img` &[data-has-placeholder='true'] { background-position: center; background-repeat: no-repeat; background-size: cover; } `},Sin0:function(e,t,a){a.d(t,{B:function(){return b},C:function(){return A},E:function(){return N},F:function(){return O},G:function(){return g},N:function(){return C},S:function(){return k},V:function(){return T},a:function(){return f},c:function(){return v},d:function(){return y},e:function(){return _},f:function(){return S},g:function(){return w},h:function(){return B},i:function(){return L}});var i,n,r,o,l,s,c,d,p,h,u,m,g,b,f,x,E,v,y,C,S,w,T,k,I=a("/hDE");(i=g||(g={})).Boy="boy",i.Girl="girl",(n=b||(b={}))[n.Height=0]="Height",n[n.Weight=1]="Weight",n[n.Head=2]="Head",n[n.BMI=3]="BMI",(r=f||(f={}))[r.Weekly=0]="Weekly",r[r.Monthly=1]="Monthly",r[r.Yearly=2]="Yearly",(o=x||(x={}))[o.Height=0]="Height",o[o.Weight=1]="Weight",o[o.Head=2]="Head",o[o.BMI=3]="BMI",o[o.Record=4]="Record",(l=E||(E={}))[l.Phone=0]="Phone",l[l.OTP=1]="OTP",l[l.OTPEmail=2]="OTPEmail",l[l.PersonalInfo=3]="PersonalInfo",l[l.UpdatePassword=4]="UpdatePassword",l[l.Result=5]="Result",l[l.DynamicForm=6]="DynamicForm",(s=v||(v={}))[s.HEAD=0]="HEAD",s[s.TAIL=1]="TAIL",s[s.MIDDLE=2]="MIDDLE",s[s.CONNECT=3]="CONNECT",s[s.SSO=4]="SSO",s[s.MULTIPLE=5]="MULTIPLE",(c=y||(y={}))[c.UNDEFINED=-1]="UNDEFINED",c[c.TEXT=0]="TEXT",c[c.IMAGE=1]="IMAGE",c[c.FORM=2]="FORM",c[c.CONDITION=3]="CONDITION",c[c.POLL=4]="POLL",c[c.FINAL_STANDARD=5]="FINAL_STANDARD",c[c.FINAL=6]="FINAL",c[c.FINAL_THANK_YOU=7]="FINAL_THANK_YOU",c[c.RATING=8]="RATING",c[c.REACTION=9]="REACTION",c[c.REVIEW=10]="REVIEW",c[c.RESULT_POLL=11]="RESULT_POLL",c[c.RESULT_RATING=12]="RESULT_RATING",c[c.RESULT_REACTION=13]="RESULT_REACTION",c[c.OTP=14]="OTP";let _=[y.FINAL,y.FINAL_STANDARD,y.FINAL_THANK_YOU];(d=C||(C={})).BOT_TEXT="bot-text",d.BOT_IMAGE="bot-image",d.BOT_BACKGROUND_IMAGE="bot-background-image",d.BOT_BUTTON="bot-button",d.BOT_URL="bot-url",d.BOT_RECALCULATE="bot-recalculate",d.BOT_BOOKING="bot-booking",d.BOT_MAIN_TITLE="bot-main-title",d.BOT_MAIN_IMAGE="bot-main-image",d.BOT_MAIN_BODY="bot-main-body",d.BOT_MAIN_BUTTON="bot-main-button",d.BOT_SUB_TITLE="bot-sub-title",d.BOT_SUB_BODY="bot-sub-body",d.BOT_LANDING_PAGE_URL="bot-landing-page-url",d.BOT_LANDING_PAGE_BUTTON="bot-landing-page-button",d.BOT_RISK_SCREEN="bot-risk-screen",d.BOT_RELATED_ARTICLE="bot-related-article",d.THANK_YOU_IMAGE="thank-you-image",d.THANK_YOU_TITLE="thank-you-title",d.THANK_YOU_BODY="thank-you-body",d.TOTAL_LINE="total-line",d.BOT_SUBMISSION="bot-submission",d.BOT_EVENT_SUBMISSION="bot-event-submission",d.BOT_SUGGESTED_SERVICE="bot-suggested-service",d.SSO_INTENT="sso-intent",(p=S||(S={})).ACTION_CONDITION="action-condition",p.ACTION_INTERNAL="action-internal",p.ACTION_EXTERNAL="action-external",p.ACTION_SSO_REDIRECT="action-sso-redirect",p.ACTION_MULTIPLE_BUTTON="action-multiple-button",p.USER_CHOICE_TEXT="user-choice-text",p.USER_CHOICE_TEXT_BY_INPUT="user-choice-text-by-input",p.USER_CHOICE_NEXT="user-choice-next",p.USER_CHOICE_IMAGE="user-choice-image",p.USER_SUBMIT_TEXT="user-submit-text",p.USER_SUBMIT_NUMBER="user-submit-number",p.USER_SUBMIT_NAME="user-submit-name",p.USER_SUBMIT_PHONE="user-submit-phone",p.USER_SUBMIT_EMAIL="user-submit-email",p.USER_SUBMIT_DROPDOWN="user-submit-dropdown",p.USER_SUBMIT_DATE="user-submit-date",p.USER_SUBMIT_DOB="user-submit-dob",p.USER_SUBMIT_CONFIRM="user-submit-confirm",p.USER_SUBMIT_SEND="user-submit-send",p.USER_SUBMIT_RESEND="user-submit-resend",p.USER_SUBMIT_ADDRESS="user-submit-address",p.USER_SUBMIT_ADDRESS_PROVINCE="user-submit-address-province",p.USER_SUBMIT_ADDRESS_DISTRICT="user-submit-address-district",p.USER_SUBMIT_ADDRESS_COMMUNE="user-submit-address-commune",p.USER_SUBMIT_BMI="user-submit-bmi",p.USER_SUBMIT_BMI_HIDDEN="user-submit-bmi-hidden",p.USER_SUBMIT_TERMS="user-submit-terms",p.USER_SUBMIT_GENDER="user-submit-gender",p.USER_SUBMIT_OTP="user-submit-otp",p.USER_SUBMIT_WHATSAPP="user-submit-whatsapp",p.POLL_CHOICE="poll-choice",p.POLL_CHOICE_TEXT_BY_INPUT="poll-choice-text-by-input",p.POLL_CHOICE_IMAGE="poll-choice-image",p.POLL_BUTTON="poll-button",p.RATING_STAR="rating-star",p.RATING_DESCRIPTION="rating-description",p.RATING_BUTTON="rating-button",p.LIKE_CHOICE="like-choice",p.DISLIKE_CHOICE="dislike-choice",p.REVIEW_CHOICE="review-choice",p.REVIEW_DESCRIPTION="review-description",p.REVIEW_BUTTON="review-button",p.RESULT_BUTTON="result-button",p.POLL_RESULT="poll-result",p.USER_SUBMIT_GOOGLE_API_ADDRESS="user-submit-google-api-address";let O=[S.USER_SUBMIT_ADDRESS_PROVINCE,S.USER_SUBMIT_ADDRESS_DISTRICT,S.USER_SUBMIT_ADDRESS_COMMUNE,S.USER_SUBMIT_ADDRESS];(h=w||(w={}))[h.UNLIMITED=0]="UNLIMITED",h[h.EXACT_NUMBER=1]="EXACT_NUMBER",h[h.RANGE=2]="RANGE";let N={[S.USER_SUBMIT_EMAIL]:"email",[S.USER_SUBMIT_TEXT]:"text",[S.USER_SUBMIT_DROPDOWN]:"text",[S.USER_SUBMIT_NAME]:"name",[S.USER_SUBMIT_NUMBER]:"number",[S.USER_SUBMIT_ADDRESS]:"address",[S.USER_SUBMIT_PHONE]:"tel",[S.USER_SUBMIT_OTP]:"tel",[S.USER_SUBMIT_WHATSAPP]:"tel",[S.USER_SUBMIT_DATE]:"date",[S.USER_SUBMIT_CONFIRM]:"confirm",[S.USER_SUBMIT_SEND]:"submit",[S.USER_SUBMIT_TERMS]:"terms",[S.USER_SUBMIT_ADDRESS_PROVINCE]:"province",[S.USER_SUBMIT_ADDRESS_DISTRICT]:"district",[S.USER_SUBMIT_ADDRESS_COMMUNE]:"commune",[S.USER_SUBMIT_BMI]:"bmi",[S.USER_SUBMIT_GENDER]:"gender",[S.POLL_CHOICE]:"poll",[S.POLL_CHOICE_TEXT_BY_INPUT]:"poll",[S.POLL_CHOICE_IMAGE]:"poll",[S.RATING_STAR]:"rating",[S.RATING_DESCRIPTION]:"text",[S.LIKE_CHOICE]:"like",[S.DISLIKE_CHOICE]:"dislike",[S.REVIEW_CHOICE]:"review",[S.USER_SUBMIT_GOOGLE_API_ADDRESS]:"google-api-address",[S.USER_SUBMIT_DOB]:"dob"},B={FRU:"FRU",survey:"Survey",ristScreener:"risk_screener",voucherAcuvue:"ACUVUE"};(u=T||(T={})).VIDEO="video",u.SHORTS="short",u.PODCAST="podcast",u.LIVESTREAM="live-stream",(m=k||(k={})).Facebook="facebook",m.Zalo="zalo",m.Twitter="twitter",m.WhatsApp="whatsApp",m.Line="line",m.Instagram="instagram",m.LinkedIn="linkedin",m.Youtube="youtube",m.Tiktok="tiktok",m.Telegram="telegram",m.Viber="viber";let A={DD:{id:"common.day",defaultMessage:"Day"},MM:{id:"common.month",defaultMessage:"Month"},YYYY:{id:"common.year",defaultMessage:"Year"}};var L=Object.freeze({__proto__:null,get SocialType(){return k},COMMON_DATE_TRANSLATE_KEY:A,get Gender(){return g},get BabyGrowthChartType(){return b},get BabyGrowthChartDuration(){return f},get BabyGrowthResultTab(){return x},get LOCALE(){return I.L},get OnboardingStep(){return E},get NodePosition(){return v},get NodeType(){return y},NodeFinalTypes:_,get NodeIntentType(){return C},get NodeActionType(){return S},FULL_KEY_ADDRESS:O,get NodeMultipleOptions(){return w},ELEMENT_CONTROL_INPUT_TYPE:N,SubotType:B,get VideoType(){return T}})},GJr1:function(e,t,a){a.d(t,{C:function(){return CardAuthor},P:function(){return PopupExpert},a:function(){return PopupDoctor},b:function(){return PopupHospital},c:function(){return ProfileDetailModal},d:function(){return CardAuthor$1}});var i=a("q1tI"),n=a("rCoo"),r=a("dgD7"),o=a("/npG"),l=a("Eso5"),s=a("SPK5"),c=a("mAfZ"),d=a("mYVa"),p=a("Wgwc"),h=a.n(p),u=a("QgiU"),m=a.n(u),g=a("thIk"),b=a("oKqh"),f=a("lOMy"),x=a("SZ3Q"),E=a("fbRC"),v=a("XmEH"),y=a("Aeci"),C=a("gC6A"),S=a("cMvO"),w=a("9B3w"),T=a("F/Hd"),k=a("iBNF"),I=a("rBCA"),_=a("IQVP"),O=a("a2sD"),N=a("iHoF"),B=a("h3Tz"),A=a("xrdX");let MainText=({children:e,className:t=""})=>i.createElement("div",{className:`tMiOKib ${t}`},e),SubText=({children:e,className:t=""})=>i.createElement("div",{className:`uDcqD-2 ${t}`},e);var L={container:"sTU4T4I",info:"tCql9Je",avatarWrapper:"_3j7uYhH",avatarIcon:"PHABgoT"};let CardAuthor$1=({avatarProps:e,title:t,subTitle:a,children:n,className:r="",style:o,onAvatarClick:l,avatarIcon:s,dataEventCategory:c,dataEventAction:d,dataEventLabel:p})=>i.createElement("div",{className:`${L.container} ${r}`,style:o},i.createElement("div",{className:L.avatarWrapper,onClick:l,"data-event-category":c,"data-event-action":d,"data-event-label":p},i.createElement(v.U,Object.assign({},e)),s&&i.createElement("div",{className:L.avatarIcon},s)),i.createElement("div",{className:`${L.info} ${r}`,style:{minHeight:`${(null==e?void 0:e.size)||40}px`}},n||i.createElement(i.Fragment,null,t&&i.createElement(MainText,null,t),a&&i.createElement(SubText,null,a))));CardAuthor$1.MainText=MainText,CardAuthor$1.SubText=SubText,CardAuthor$1.SubDivider=({className:e=""})=>i.createElement("span",{className:`m-HVXw1 ${e}`}),CardAuthor$1.Row=({children:e,className:t=""})=>i.createElement("div",{className:`dZWeHns ${t} row`},e),CardAuthor$1.ColLeft=({children:e,className:t=""})=>i.createElement("div",{className:`${t} col-left`},e),CardAuthor$1.ColRight=({children:e,className:t=""})=>i.createElement("div",{className:`${t} col-right`},e),CardAuthor$1.SubTextRow=e=>{var{children:t,className:a=""}=e,n=(0,E._)(e,["children","className"]);return i.createElement("div",Object.assign({className:`pDlsows ${a}`},n),t)};var R=(0,o.k)(()=>({root:{verticalAlign:"bottom"}}));let M=(0,i.createContext)({}),AuthorBadgeItem=({styles:e,className:t,classNames:a})=>{let{role:n,siteType:r,title:o}=(0,i.useContext)(M),{cx:l,classes:s}=R(void 0,{name:"AuthorBadgeItem",styles:e,classNames:a});return n?i.createElement(f.A,{className:l(s.root,t),siteType:r,role:n,title:o}):null};var D=(0,o.k)(()=>({root:{}}));let j=I.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${k.r.colors.white}; border-radius: ${k.r.borderRadius}; box-shadow: 0px 0px 4px ${k.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: ${k.r.colors.primary50}; border-radius: ${k.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,P=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; } `,F=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; } `,z=I.Z.ul` padding-left: 18px; li { list-style-type: disc; } `;var U="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:n,locale:r,isMobile:o,overwriteProfileProps:l,avatarFallback:s=C.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{var d,p,h;let{t:u}=(0,g.u)(),[m,b]=(0,i.useState)(null),[f,x]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e&&n&&String(null==m?void 0:m.id)!==String(n)){x(!0);try{b(null),(0,S.c)((0,S.g)(_.tC.GET_DOCTOR_INFO,{doctorId:n,website_url:S.l[r]}),"get").then(e=>{b(Object.assign(Object.assign({},null==e?void 0:e._data.doctor),l))})}catch(e){console.error(e)}x(!1)}},[e,n,null==m?void 0:m.id]);let E=(null==m?void 0:m.experiences)||[],v=(null==m?void 0:m.specialties)||[],I=v.map(e=>(null==e?void 0:e.name)||e).join(" • "),N=E.map(e=>{try{return JSON.parse(e.description)}catch(t){return e.description}}).filter(e=>e.content),renderExperienceText=e=>(null==e?void 0:e.year)?`${e.year} ${null==e?void 0:e.content}`:(null==e?void 0:e.content)?e.content:"string"==typeof e?e:"";return i.createElement(i.Fragment,null,i.createElement(j,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},f||!m?i.createElement(O.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:t},i.createElement("img",{src:U,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(F,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(y.I,{src:null==m?void 0:m.avatar,backupSrc:s,className:"profile-image",alt:"avatar"}),i.createElement("img",{className:"badge-avatar",src:H,alt:"badge",loading:"lazy"})))),i.createElement($,null,i.createElement(T.T,{size:"s3",weight:"semiBold",className:"full-name"},null==m?void 0:m.name),i.createElement("div",{className:"specialty"},I&&i.createElement(i.Fragment,null,i.createElement(T.T,{size:"p4",color:k.r.colors.gray800},I," • ")),i.createElement("a",{href:(0,S.m)({id:null===(d=null==m?void 0:m.organization)||void 0===d?void 0:d.id,name:null===(p=null==m?void 0:m.organization)||void 0===p?void 0:p.name,slug:null===(h=null==m?void 0:m.organization)||void 0===h?void 0:h.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(T.T,{size:"p4",className:"organisation",color:k.r.colors.gray800,style:{textDecoration:"underline"}},null==m?void 0:m.organization.name))))),!o&&i.createElement("div",{className:"btn-wrapper"},i.createElement("a",{href:(0,S.n)({name:m.name,id:m.id,locale:r})},i.createElement(w.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment"))))),N&&i.createElement($,null,i.createElement("div",{className:"experience"},i.createElement(T.T,{weight:"bold",size:"s3",color:k.r.colors.gray800,style:{paddingBottom:16}},u("expert.content.description").toUpperCase()),i.createElement(z,null,N.map((e,t)=>i.createElement("li",{key:t},i.createElement(T.T,{size:"p2"},renderExperienceText(e))))),o?i.createElement("div",{className:"btn-wrapper"},i.createElement("a",{href:(0,S.n)({name:m.name,id:m.id,locale:r})},i.createElement(w.B,{color:"primary",size:"md",className:"btn-booking"},u("careBooking.bookAnAppointment")))):i.createElement("a",{href:(0,S.n)({name:m.name,id:m.id,locale:r})},i.createElement(T.T,{size:"s4",color:"#2D87F3",style:{paddingTop:24},"data-event-category":c,"data-event-action":"See Full Doctor Profile","data-event-label":(0,S.k)(r)+(0,S.n)({name:m.name,id:m.id,locale:r})},u("home.seeExpert"))))))),i.createElement(P,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},G=I.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${k.r.colors.white}; border-radius: ${k.r.borderRadius}; box-shadow: 0px 0px 4px ${k.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: ${k.r.colors.primary50}; border-radius: ${k.r.borderRadius}; .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,W=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; } `,Z=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; } `,K=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; } `,V=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 Y={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:n,enableAnimation:r=!0,expertId:o,overwriteProfileProps:l,avatarFallback:s=C.C.getAssetPath("avatar.jpg")})=>{let{t:c}=(0,g.u)(),[d,p]=(0,i.useState)(null),[h,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(a&&o&&String(null==d?void 0:d.user_id)!==String(o)){u(!0);try{p(null),(0,S.c)((0,S.o)(_.D9.GET_EXPERT_BY_ID,{id:o}),"get").then(e=>{p(Object.assign(Object.assign({},null==e?void 0:e.data),l))})}catch(e){console.error(e)}u(!1)}},[a,o,null==d?void 0:d.user_id]),i.createElement(i.Fragment,null,i.createElement(G,{"data-open":a,"data-animation":r,onClick:e=>e.stopPropagation()},h||!d?i.createElement(O.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:n},i.createElement("img",{src:U,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(Z,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(y.I,{src:null==d?void 0:d.avatar,className:"profile-image",alt:"avatar",backupSrc:s}),i.createElement("img",{className:"badge-avatar",src:Y[null==d?void 0:d.role],alt:"badge",loading:"lazy"})))),i.createElement(K,null,i.createElement(T.T,{size:"s3",className:"full-name",weight:"semiBold"},null==d?void 0:d.display_name),i.createElement("div",null,i.createElement(T.T,{size:"p4",color:k.r.colors.gray800},null==d?void 0:d.specialty," • "),i.createElement("a",{href:null==d?void 0:d.organisation_url,className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(T.T,{size:"p4",className:"organisation",color:k.r.colors.gray800,style:{textDecoration:"underline"}},null==d?void 0:d.organisation)))))),i.createElement(K,null,i.createElement("div",{className:"experience"},i.createElement(T.T,{weight:"bold",size:"p4",color:k.r.colors.gray800,style:{paddingBottom:16}},c("expert.content.description").toUpperCase()),i.createElement("div",{className:"list-items"},null!=d&&!!d.experiences&&d.experiences.filter(e=>!!(e&&(e.title||e.organization))).slice(0,3).map((e,t)=>i.createElement(V,{key:t},i.createElement("img",{className:"bullet-point",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3ccircle cx='12' cy='12' r='2' fill='%232D87F3'/%3e%3c/svg%3e",alt:"point",loading:"lazy"}),i.createElement("div",{className:"text-contain"},i.createElement(N.H,{tag:"h6",color:k.r.colors.gray800},null==e?void 0:e.title),i.createElement(T.T,{size:"p2",color:k.r.colors.gray500},null==e?void 0:e.organization))))),i.createElement("a",{href:null==d?void 0:d.profile_url,style:{display:"inline-block",paddingTop:24}},i.createElement(T.T,{as:"span",size:"s4",color:"#2D87F3","data-event-category":e,"data-event-action":"See Full Doctor Profile","data-event-label":(0,S.k)(t)+(null==d?void 0:d.profile_url)},c("home.seeExpert"))))))),i.createElement(W,{"data-open":a,onClick:e=>{e.stopPropagation(),n()}}))},X=I.Z.div` position: fixed; left: 50%; width: 343px; background-color: ${k.r.colors.white}; border-radius: ${k.r.borderRadius}; box-shadow: 0px 0px 4px ${k.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: ${k.r.colors.primary50}; border-radius: ${k.r.borderRadius}; .btn-booking { display: flex; margin: 12px auto; } .avatar-title { position: relative; width: 100%; padding-top: 46px; text-align: center; } } `,Q=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; } `,J=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:n,locale:r,isMobile:o,overwriteProfileProps:l,avatarFallback:s=C.C.getAssetPath("avatar.jpg"),trackingCategory:c="Together"})=>{let{t:d}=(0,g.u)(),[p,h]=(0,i.useState)(null),[u,m]=(0,i.useState)(!1);(0,i.useEffect)(()=>{if(e&&n&&String(null==p?void 0:p.id)!==String(n)){m(!0);try{h(null),(0,S.c)((0,S.g)(_.tC.GET_HOSPITAL_INFO,{hospital_branch_id:n,website_url:S.l[r]}),"get").then(e=>{h(Object.assign(Object.assign({},null==e?void 0:e._data.branch),l))})}catch(e){console.error(e)}m(!1)}},[e,n,null==p?void 0:p.id]);let b=(null==p?void 0:p.specialties)||[],f=(0,i.useMemo)(()=>b.map(e=>e.name),[b]);return i.createElement(i.Fragment,null,i.createElement(X,{"data-open":e,"data-animation":a,onClick:e=>e.stopPropagation()},u||!p?i.createElement(O.L,null):i.createElement("div",{className:"popup-content"},i.createElement("div",{className:"close-button",onClick:t},i.createElement("img",{src:U,style:{width:20,height:20},alt:"close-icon",loading:"lazy"})),i.createElement("div",{className:"main-info"},i.createElement("div",{className:"border-banner"}),i.createElement("div",{className:"avatar-title"},i.createElement(J,null,i.createElement("div",{className:"image-container"},i.createElement("div",{style:{position:"relative"}},i.createElement(y.I,{src:null==p?void 0:p.logo,className:"profile-image",alt:"avatar",backupSrc:s}),i.createElement("img",{className:"badge-avatar",src:H,alt:"badge",loading:"lazy"})))),i.createElement(ee,null,i.createElement(T.T,{size:"s3",weight:"semiBold",className:"full-name"},null==p?void 0:p.name),i.createElement("div",{className:"specialty"},b&&i.createElement(T.T,{size:"p4",color:k.r.colors.gray800},f.join(" • "),"•"),i.createElement("a",{href:(0,S.m)({id:p.id,name:p.name,slug:p.slug,locale:r}),className:"organisation",target:"_blank",rel:"noreferrer"},i.createElement(T.T,{size:"p4",className:"organisation",color:k.r.colors.gray800,style:{textDecoration:"underline"}},null==p?void 0:p.name))))),!o&&i.createElement("a",{href:(0,S.m)({id:p.id,name:p.name,slug:p.slug,locale:r})},i.createElement("div",{className:"btn-wrapper"},i.createElement(w.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment"))))),i.createElement(ee,null,i.createElement("div",{className:"experience"},i.createElement(T.T,{weight:"bold",size:"s3",color:k.r.colors.gray800,style:{paddingBottom:16}},d("hospital.content.description").toUpperCase()),i.createElement(T.T,{size:"p2",color:k.r.colors.gray500},p.about),o?i.createElement("a",{href:(0,S.m)({id:p.id,name:p.name,slug:p.slug,locale:r})},i.createElement("div",{className:"btn-wrapper"},i.createElement(w.B,{color:"primary",size:"md",className:"btn-booking"},d("careBooking.bookAnAppointment")))):i.createElement("a",{href:(0,S.m)({id:p.id,name:p.name,slug:p.slug,locale:r})},i.createElement(T.T,{size:"s4",color:"#2D87F3",as:"span","data-event-category":c,"data-event-action":"See Full Hospital Profile","data-event-label":(0,S.k)(r)+(0,S.m)({id:p.id,name:p.name,slug:p.slug,locale:r})},d("home.seeHospital"))))))),i.createElement(Q,{"data-open":e,onClick:e=>{e.stopPropagation(),t()}}))},ProfileDetailModal=({open:e,onClose:t,children:a,profileModalProps:n})=>{let{t:r}=(0,g.u)();return i.createElement(B.M,Object.assign({title:r("profilePanel.modal.heading"),titleProps:!0,className:"_2UKyiK1",opened:e,onClose:t,overlayOpacity:.2,overflow:"inside",transitionProps:{transition:"slide-left"},styles:{header:{borderBottom:0},inner:{padding:0,justifyContent:"flex-end"},modal:{height:"100%",borderRadius:0},body:{maxHeight:"100%"},content:{maxHeight:"100%",height:"100%",borderRadius:0}}},n),a)};h().extend(m());let CardAuthor=e=>{let{className:t="",community:o,name:p,username:h,url:u,avatar:m,role:E,title:v,userType:w="user",expertId:T,specialty:I,organisation:_,isMarryBaby:O,doctorId:N,hospitalId:B,hasQuickBooking:L,handleMakeAppointment:R,communityTrackingAttr:j,isAnonymous:P,showDetailPopup:F,showChatbotButton:$=!1,subLine:z,authActionWrapper:U,profileProps:H,profileModalProps:G,extendEle:W,avatarProps:Z,hideInfo:K,timeText:V,onCloseFromPost:q,onChatWithBot:Y,avatarIcon:X,badgeIconSize:Q,hideBackground:J,children:ee,styles:et,dataEventCategory:ea,dataEventAction:ei,dataEventLabel:en}=e,{data:{locale:er,router:eo,env:{isMarryBaby:el,togetherBasePath:es}}}=(0,i.useContext)(S.T),{isMobile:ec}=(0,y.u)(),{t:ed}=(0,g.u)(),{classes:ep}=D(void 0,{name:"CardAuthor",styles:et}),eh="boolean"==typeof O?O:el,eu=eh?"marryBaby":"helloSites",em=P?ed("cardPost.anonymous"):p||h||"",eg=P?C.C.getAssetPath("avatar.jpg"):m,eb=P?void 0:E,[ef,ex]=(0,i.useState)(!1),{asPath:eE}=eo||{},ev=`https://${A.v[er]}${eE}`,onAuthorClick=()=>{if(P)return!1;F?eC(!0):u&&(window.location.href=u)};(0,i.useEffect)(()=>{(0,b.t)(ef)},[ef]);let[ey,eC]=(0,i.useState)(!1),eS=(null==e?void 0:e.role)==="expert",ew=!!(N||B),eT=["expert"===eb&&_&&i.createElement("span",null,_),"expert"===eb&&I&&i.createElement("span",null,I),!("expert"===eb&&I&&_)&&(null==o?void 0:o.name)&&i.createElement("a",Object.assign({href:(null==o?void 0:o.slug)&&o.isActive&&!o.isHidden?`${es}/${null==o?void 0:o.slug}/`:void 0,className:"author-community-name"},j),`${null==o?void 0:o.name}`),V&&i.createElement("span",null,V)].filter(Boolean),[ek,eI]=(0,i.useState)(null);return(0,i.useEffect)(()=>{ey&&!ek&&("chatbot"===w?Promise.all([a.e(5231),a.e(7797),a.e(5454),a.e(5481),a.e(2354),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(3580),a.e(4584),a.e(6509),a.e(4125),a.e(1111),a.e(7730),a.e(7884),a.e(137),a.e(4414),a.e(9709),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,"wLeJ")).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(7797),a.e(5454),a.e(5481),a.e(2354),a.e(3684),a.e(5349),a.e(4148),a.e(2509),a.e(1533),a.e(1108),a.e(9124),a.e(3580),a.e(4584),a.e(6509),a.e(4125),a.e(1111),a.e(7730),a.e(7884),a.e(137),a.e(4414),a.e(9709),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)}))},[ey,w]),i.createElement(M.Provider,{value:{displayName:em,title:v,role:eb,siteType:eu,handleMakeAppointment:R,doctorId:N,hospitalId:B,currentUrl:ev}},i.createElement(ProfileDetailModal,{open:ey,onClose:()=>eC(!1),profileModalProps:G},ek&&i.createElement(ek,Object.assign({currentPageUrl:en,authActionWrapper:U,onCloseFromPost:()=>{eC(!1),null==q||q()},onChatWithBot:Y},H,{authorProps:Object.assign({userId:null==e?void 0:e.userId,avatar:eg,name:null==e?void 0:e.name,role:null==e?void 0:e.role,title:null==e?void 0:e.title,doctorId:N,hospitalId:B,hasQuickBooking:L,userType:w},null==H?void 0:H.authorProps)}))),"expert"===eb&&T?i.createElement(PopupExpert,{isOpen:ef,onClose:()=>ex(!1),expertId:T}):null,"expert"===eb&&N?i.createElement(PopupDoctor,{isOpen:ef,onClose:()=>ex(!1),doctorId:N,locale:er}):null,"expert"===eb&&B?i.createElement(PopupHospital,{isOpen:ef,onClose:()=>ex(!1),hospitalId:B,locale:er}):null,i.createElement("div",{className:`hhg-card-author ${ep.root} ${t} ${eS?"expert-author":""}`,"data-background":!J&&eS,"data-is-marrybaby":eh},i.createElement(CardAuthor$1,{dataEventCategory:ea,dataEventAction:ei,dataEventLabel:en,onAvatarClick:onAuthorClick,avatarProps:Object.assign(Object.assign({avatar:P?C.C.getAssetPath(eh?"anomyous-avatar-1.svg":"anomyous-avatar.svg"):eg,username:em},Z),{style:{cursor:!P&&(u||F)?"pointer":"default"}}),avatarIcon:X||eS&&i.createElement(n.Z,{size:Q||15})},ee?i.createElement("div",{onClick:onAuthorClick},ee):!K&&i.createElement(CardAuthor$1.Row,null,i.createElement(CardAuthor$1.ColLeft,null,i.createElement(s.k,{align:"center",onClick:onAuthorClick},i.createElement(CardAuthor$1.MainText,{onClick:onAuthorClick},em,"chatbot"===w?i.createElement(i.Fragment,null," ",i.createElement(r.Z,{color:k.r.colors.primaryBase,size:16,style:{display:"inline-block",transform:"translate(0, 2px)"}}),$&&i.createElement("div",{style:{marginTop:"8px"}},i.createElement(c.z,{color:"primary",size:"xs",variant:"filled",type:"button",leftIcon:i.createElement(x.I.App,{size:16}),onClick:()=>{null==Y||Y()}},ed("chatbot.with.me")))):i.createElement(AuthorBadgeItem,null))),z||i.createElement(CardAuthor$1.SubTextRow,{style:L?{position:"relative"}:{}},eT.map((e,t)=>i.createElement(i.Fragment,null,0!==t&&i.createElement(CardAuthor$1.SubDivider,null),i.createElement(CardAuthor$1.SubText,null,e))),L&&ew&&i.createElement(l.x,{sx:{marginTop:(0,d.h)(5)}},i.createElement(f.B,{bookingId:N||B,bookingType:N?"doctor":B?"hospital":void 0,size:ec?"xs":"sm"})))))),W&&W))};CardAuthor.MainText=CardAuthor$1.MainText,CardAuthor.SubText=CardAuthor$1.SubText,CardAuthor.SubTextRow=CardAuthor$1.SubTextRow,CardAuthor.SubDivider=CardAuthor$1.SubDivider,CardAuthor.AuthorBadge=AuthorBadgeItem,CardAuthor.DisplayName=()=>{let{displayName:e}=(0,i.useContext)(M);return i.createElement(l.x,null,e)}},r3MB:function(e,t,a){a.d(t,{T:function(){return s}});var i=a("q1tI"),n=a("rBCA"),r=a("5JWB"),o=a("iBNF");let l=n.Z.div` textarea { width: 100%; height: var(--textarea-height, 116px); padding: 1rem; border: 1px solid ${o.r.colors.gray200}; border-radius: 6px; color: ${o.r.colors.gray800}; font-size: 14px; resize: none; &:focus { box-shadow: 0px 0px 2px 2px #91caff; } &::placeholder { color: ${o.r.colors.gray500}; } &:disabled { background-color: ${o.r.colors.neutral50}; cursor: not-allowed; } } `,s=i.forwardRef(({height:e,placeholder:t,labelText:a,labelColor:n,id:o,name:s,onChange:c,value:d,className:p,onKeyPress:h,disabled:u=!1},m)=>i.createElement(l,{className:p,style:{"--textarea-height":e||"116px"}},a&&i.createElement(r.L,{size:"label2",style:{color:n||"#595959"},htmlFor:o},a),i.createElement("textarea",{name:s,ref:m,placeholder:t,id:o,onChange:e=>c&&c(e.target.value),onKeyPress:e=>h&&h(e),value:d,disabled:u})))},"9AFI":function(e,t,a){a.d(t,{H:function(){return HealthToolCardWrapper},T:function(){return ToolsBannerCard}});var i=a("fbRC"),n=a("q1tI"),r=a("/npG"),o=a("mYVa"),l=a("8vDj"),s=a("Eso5"),c=a("SPK5"),d=a("vaps"),p=a("TD78"),h=a("7CRU"),u=a("F/Hd"),m=a("aaf5"),g=a("thIk"),b=a("oKqh"),f=a("g73v");let x=(0,r.k)((e,{isRevamp:t,isPregTool:a,bannerColor:i,isMarryBaby:n})=>({wrapper:{position:"relative",width:"100%",height:"100%",display:"flex",gap:(0,o.h)(24),alignItems:"center",justifyContent:"space-between",padding:(0,o.h)(16),[e.fn.smallerThan("sm")]:{gap:(0,o.h)(12)}},container:{width:"100%",backgroundColor:i||(n?e.colors.mb[1]:a?e.colors.pink[1]:e.colors.blue[1]),position:"relative",display:"flex",gap:24,alignItems:"center",justifyContent:"space-between",padding:(0,o.h)(16),[e.fn.smallerThan("sm")]:{padding:`${(0,o.h)(12)} ${(0,o.h)(16)}`},a:{textDecoration:"none",color:"inherit"},'&[data-site="marryBaby"]':{a:{textDecoration:"underline"},[b.M.mbDown]:{paddingBottom:0}},[b.M.tdDown]:{height:"auto",".hhgcomp-toolbanner-wrapper":{".hhgcomp-toolbanner-inner":{display:"flex",alignItems:"center",[b.M.mbDown]:{justifyContent:"space-between"},".hhgcomp-toolbanner-iconcontainer":{position:"relative",right:(0,o.h)(-50),bottom:(0,o.h)(-20),width:(0,o.h)(110),minWidth:0,height:"auto",minHeight:0,alignSelf:"flex-end",marginBottom:(0,o.h)(-20),[b.M.mbDown]:{right:"unset"}}}}},".embedded-review":{gap:(0,o.h)(12),display:"flex",alignItems:"center"},".embedded-review__avatar":{position:"relative",minWidth:(0,o.h)(32),img:{width:(0,o.h)(32),height:(0,o.h)(32),display:"block",borderRadius:"100%"},svg:{bottom:0,right:0,position:"absolute"}}},headingWrapper:{display:"flex",flexDirection:"column",gap:t?(0,o.h)(8):0,[e.fn.smallerThan("sm")]:{gap:4}},avatarWrapper:{position:"relative",img:{maxWidth:(0,o.h)(48),maxHeight:(0,o.h)(48)},".embedded-review__avatar":{position:"relative"}},reviewText:{a:{textDecoration:"underline",textUnderlineOffset:"2px"}},iconWrapper:{display:"flex",justifyContent:"center",alignItems:"center",width:(0,o.h)(80),height:(0,o.h)(80),borderRadius:"50%",backgroundColor:"#fff",flexShrink:0,img:{maxWidth:(0,o.h)(48),maxHeight:(0,o.h)(48)},[e.fn.smallerThan("sm")]:{width:(0,o.h)(64),height:(0,o.h)(64),img:{maxWidth:(0,o.h)(40),maxHeight:(0,o.h)(40)}}},heading:{},disclaimerIcon:{flexShrink:0}})),ToolsBannerCard=e=>{var{className:t,classNames:a,heading:r,bannerColor:o,medicalReview:d={link:"#",reviewer:"",date:""},icon:m,style:b,isPregTool:f,isRevamp:E,disclaimer:v,styles:y}=e,C=(0,i._)(e,["className","classNames","heading","bannerColor","medicalReview","icon","style","isPregTool","isRevamp","disclaimer","styles"]);let{t:S}=(0,g.u)(),w=(0,l.rZ)(),T="mb"===w.other.template,k=T?"marryBaby":"helloSites",{classes:I,cx:_}=x({isRevamp:E,isPregTool:f,bannerColor:o,isMarryBaby:T},{name:"ToolsBannerCard",styles:y,classNames:a}),O=(null==d?void 0:d.reviewer)?n.createElement(u.T,{size:"label2",as:"div",className:I.reviewText},d.avatar&&n.createElement("div",{className:"embedded-review__avatar"},n.createElement(s.x,{className:I.avatarWrapper},n.createElement("img",{src:d.avatar,alt:d.reviewer,loading:"lazy"}),n.createElement(h.Z,{size:14}))),n.createElement("div",{dangerouslySetInnerHTML:{__html:S("toolPage.toolReviewer",{expert_name:`${d.reviewer.trim()}`,date:d.date})}})):null;return n.createElement(s.x,Object.assign({className:_(t,I.container),style:b,"data-site":k},C),n.createElement(c.k,{className:I.headingWrapper},n.createElement(u.T,{className:_(I.heading,"heading"),size:"h4",as:"h2"},r),O&&n.createElement(u.T,{size:"n1"},O),v&&n.createElement(c.k,{gap:4},n.createElement(p.Z,{size:16,color:w.colors.yellow[8],className:I.disclaimerIcon}),n.createElement(u.T,{size:"c1",variant:"secondary"},v))),n.createElement(c.k,{className:I.iconWrapper},m))};var E=(0,r.k)(()=>({root:{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}})),v=(0,r.k)(e=>({root:{paddingTop:16,borderRadius:"inherit",[e.fn.smallerThan("sm")]:{paddingTop:8}}})),y=(0,r.k)((e,{isPregTool:t,variant:a})=>{let i="mb"===e.other.template;return{root:Object.assign(Object.assign(Object.assign({display:"flex",flexDirection:"column",borderRadius:(0,o.h)(i?16:8)},"default"===a&&{backgroundColor:"#fff",border:`1px solid ${i?e.colors.mb[2]:t?e.colors.pink[1]:e.colors.blue[2]}`}),"gray"===a&&{backgroundColor:e.colors.neutral[0]}),"violet"===a&&{backgroundColor:e.colors.violet[0]}),submitBtn:{},bodyWrapper:{},scrollAreaWrapper:{},bannerWrapper:Object.assign(Object.assign({},"gray"===a&&{backgroundColor:"transparent",padding:`${(0,o.h)(16)} ${(0,o.h)(16)} 0`}),"violet"===a&&{backgroundColor:"transparent",padding:`${(0,o.h)(16)} ${(0,o.h)(16)} 0`}),bannerHeading:Object.assign({},("gray"===a||"violet"===a)&&{fontSize:(0,o.h)(20),lineHeight:(0,o.h)(28),fontWeight:m.F.semiBold,[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(17),lineHeight:(0,o.h)(24)}}),bannerReviewText:Object.assign({},("gray"===a||"violet"===a)&&{fontSize:(0,o.h)(14),lineHeight:(0,o.h)(22),[e.fn.smallerThan("sm")]:{fontSize:(0,o.h)(12),lineHeight:(0,o.h)(18)}}),submitWrapper:Object.assign(Object.assign({[e.fn.smallerThan("sm")]:{button:{width:"100%"}},[e.fn.largerThan("sm")]:{textAlign:"right"}},"gray"===a&&{backgroundColor:e.colors.neutral[0],button:{marginTop:10}}),"violet"===a&&{backgroundColor:e.colors.violet[0],button:{marginTop:10}}),newsletterBlock:Object.assign(Object.assign({},"gray"===a&&{backgroundColor:e.colors.neutral[0]}),"violet"===a&&{backgroundColor:e.colors.violet[0]})}});let HealthToolCardWrapper=e=>{var{children:t,styles:a,classNames:r,className:o,isPregTool:l,variant:c="default",hasBodyScroll:d}=e,p=(0,i._)(e,["children","styles","classNames","className","isPregTool","variant","hasBodyScroll"]);let{classes:h,cx:u}=y({isPregTool:l,variant:c},{name:"HealthToolCardWrapper",styles:a,classNames:r});return n.createElement(m.T,{variant:m.C.LEADGEN},n.createElement(f.C.Provider,{value:{isPregTool:l,classes:h,variant:c,hasBodyScroll:d}},n.createElement(s.x,Object.assign({className:u(o,h.root)},p),t)))};HealthToolCardWrapper.Body=e=>{var{children:t,className:a,styles:r,classNames:o}=e,l=(0,i._)(e,["children","className","styles","classNames"]);let{classes:c,hasBodyScroll:p}=(0,n.useContext)(f.C),{classes:h,cx:u}=v(void 0,{name:"HealthToolCardWrapper__Body",styles:r,classNames:o});return n.createElement(s.x,Object.assign({className:u(a,h.root,c.bodyWrapper)},l),p?n.createElement(d.x,{h:"100%",type:"auto",scrollbarSize:8,className:c.scrollAreaWrapper},t):t)},HealthToolCardWrapper.Banner=e=>{var{className:t,classNames:a,styles:r}=e,o=(0,i._)(e,["className","classNames","styles"]);let{classes:l}=(0,n.useContext)(f.C),{isPregTool:s}=(0,n.useContext)(f.C),{classes:c,cx:d}=E(void 0,{name:"HealthToolCardWrapper__Banner",classNames:a,styles:r});return n.createElement(ToolsBannerCard,Object.assign({isPregTool:s,classNames:{container:l.bannerWrapper,heading:l.bannerHeading,reviewText:l.bannerReviewText},className:d(t,c.root)},o))}},m1fp:function(e,t,a){a.d(t,{L:function(){return Loading}});var i=a("q1tI"),n=a("thIk"),r=a("9B3w");let Loading=({className:e,size:t="md"})=>{let{t:a}=(0,n.u)();return i.createElement("div",{className:`PD6nRZX ${e}`},i.createElement(r.B,{size:t,color:"transparent",isLoading:!0},a("loading")))}},oF1Y:function(e,t,a){a.d(t,{G:function(){return GenderOptionControl}});var i=a("fbRC"),n=a("q1tI"),r=a("XUjW"),o=a("ah6c"),l=a("/npG"),s=a("mYVa"),c=a("Eso5"),d=a("SPK5"),p=a("6HDN"),h=a("gC6A"),u=a("F/Hd"),m=a("thIk");let g={lg:{height:48},md:{height:40},sm:{height:32},xs:{height:32}};var b=(0,l.k)((e,{type:t,gap:a,size:i})=>{let n="mb"===e.other.template,r=g[i]||{},o=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 ${n?"#EAEAEC":e.colors.gray[2]}`,backgroundColor:"#fff",borderRadius:(0,s.h)(n?16:4),cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",height:o,'&[data-disabled="true"]':{background:e.colors.gray[1],color:`${e.colors.gray[4]} !important`,img:{opacity:.5}},img:{height:(0,s.h)("lg"===i?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:l,isBaby:g,genderValue:f={male:"male",female:"female"},type:x="button",hideLabel:E,labelTextProps:v,labelText:y,gap:C,size:S="md",LabelWrapper:w}=e,T=(0,i._)(e,["label","availableValue","styles","isBaby","genderValue","type","hideLabel","labelTextProps","labelText","gap","size","LabelWrapper"]);let{t:k}=(0,m.u)(),{classes:I,cx:_,theme:O}=b({type:x,gap:C,size:S},{name:"GenderOptionControl",styles:l}),N="mb"===O.other.template,[B,A]=(0,n.useState)(),L=(0,n.useRef)(null),R=w?{}:Object.assign({as:"label",size:"p2",weight:"semiBold",variant:"primary"},v),M=w||u.T,D=(0,n.useMemo)(()=>[{value:f.male,label:g?k("gender.boy"):k("gender.male"),icon:g?N?n.createElement(r.Z,null):h.C.getAssetPath("health-tools/boy-icon.svg"):h.C.getAssetPath("health-tools/male-icon.svg")},{value:f.female,label:g?k("gender.girl"):k("gender.female"),icon:g?N?n.createElement(o.Z,null):h.C.getAssetPath("health-tools/girl-icon.svg"):h.C.getAssetPath("health-tools/female-icon.svg")}],[]);return(0,n.useEffect)(()=>{A(a)},[a]),n.createElement(c.x,{ref:L,className:I.root},n.createElement(p.R.Group,Object.assign({className:"radio-group",label:E?void 0:n.createElement(M,Object.assign({id:"gender-option-control-label"},R),t||(g?k("tools.selectBabyGender"):k("tools.selectGender"))),size:"lg"},T,{classNames:{error:I.groupErr}},"radio"===x&&{error:null}),n.createElement(d.k,{className:_(I.wrapper)},D.map(e=>n.createElement(p.R,Object.assign({className:"gender-item",size:"sm",classNames:{root:I.itemRoot,labelWrapper:I.itemLabelWrapper,label:I.itemLabel,inner:I.itemInner,body:I.itemBody},key:e.value,value:e.value},B&&e.value!==B&&{disabled:!0},{label:n.createElement(d.k,{gap:(0,s.h)(8),align:"center",justify:"center",sx:{zIndex:0}},"button"===x&&("string"==typeof e.icon?n.createElement("img",{src:e.icon,className:"gender-image",alt:"female",loading:"lazy"}):e.icon),n.createElement(u.T,Object.assign({size:"p3"},y),e.label))}))))))}},WS31:function(e,t,a){a.d(t,{C:function(){return ChoiceField},T:function(){return TextField},i:function(){return T},u:function(){return m}});var i=a("/npG"),n=a("iuhU"),r=a("Eso5"),o=a("8vDj"),l=a("aaf5"),s=a("fbRC"),c=a("q1tI"),d=a("ChHM"),p=a("AeFk"),h=a("rBCA"),u=a("iBNF"),m=(0,i.k)(e=>(0,l.G)(e)[l.C.LEADGEN]);let g=(0,c.createContext)({}),b=p.iv` height: 100% !important; min-height: calc(var(--container-height, 56px) * 24 / 56); line-height: calc(var(--container-height, 56px) * 24 / 56); border: none !important; border-radius: 0 !important; outline: none !important; box-shadow: none !important; padding: 0; cursor: pointer; /* opacity: 0; */ ::placeholder { color: ${u.r.colors.gray400}; } `,f=p.iv` height: auto !important; cursor: text; opacity: 1; transition: 0.1s ease-in-out all; `,x=p.iv` position: absolute; top: calc(var(--container-height) / 2); left: var(--space-x, 16px); margin: 0; z-index: 1; cursor: pointer; transform: translateY(-50%); transition: 0.125s ease-in all; right: 0; // auto grow width `,E=p.iv` top: var(--space-y-shrink, 6px); transform: translateY(0); transition: 0.125s ease-out all; right: 0; // auto grow width `,v=p.iv` min-height: var(--container-height, 56px); display: flex; align-items: flex-end; border: 1px solid ${u.r.colors.gray200}; border-radius: 8px; background-color: #fff; padding-inline: var(--space-x, 16px); padding-block: var(--space-y-not-shrink, 16px); cursor: pointer; pointer-events: none; &:has(.mantine-Input-rightSection) { padding-right: var(--container-height, 56px); } .mantine-Input-icon { display: none; } .mantine-NumberInput-control { border-color: ${u.r.colors.gray200}; } `,y=p.iv` height: auto; min-height: var(--container-height, 56px); padding-block: var(--space-y-shrink, 6px); cursor: text; pointer-events: auto; `,C=p.iv` color: ${u.r.colors.red800}; font-size: 12px; line-height: 1.5; `,S=h.Z.div` --space-x: 16px; --space-y-not-shrink: 15px; --space-y-shrink: 6px; --container-height: 56px; --label-not-shrink: 16px; --label-shrink: 12px; --input: 15px; position: relative; min-width: 100px; max-width: 100%; display: inline-block; .textField_wrapper { display: inline-block; width: 100%; cursor: pointer; } .mantine-InputWrapper-root { &[data-invalid='true'] { .mantine-Input-wrapper { border-color: ${u.r.colors.red400}; } } .mantine-Input-wrapper { &:has([data-invalid]) { border-color: ${u.r.colors.red400}; } } } .mantine-InputWrapper-label { ${x} } .mantine-Input-wrapper { ${v} + .mantine-Popover-dropdown[data-position="bottom-start"] { left: 0 !important; } + .mantine-Popover-dropdown[data-position='top-start'] { top: unset !important; left: 0 !important; bottom: 100% !important; } } .mantine-Input-input { ${b} } &.textField_shrink { .mantine-InputWrapper-label { ${E} } .mantine-Input-wrapper { ${y} &.mantine-Select-wrapper { .mantine-Select-rightSection { pointer-events: auto !important; } } } .mantine-Input-input { ${f} } &:has(.PhoneInput) { .mantine-InputWrapper-label { left: var(--space-x, 16px); } .PhoneInput { .PhoneInputInput { opacity: 1; } } } } &:focus-within { .mantine-Input-wrapper { transition: 0.25s linear border; border-color: ${u.r.colors.primary600}; box-shadow: 0 0 4px ${u.r.colors.primary200}; } } .PhoneInput { --phone-select: 75px; --phone-input-space-x: 8px; width: 100%; opacity: 1; border: none; .PhoneInputCountry { background-color: transparent; border: none; padding: 0; width: var(--phone-select, 75px); } .PhoneInputInput { flex: 1; min-width: 0; line-height: 1.5; outline: none !important; border: none; box-shadow: none; font-size: var(--input, 15px); padding: 0 var(--phone-input-space-x, 8px); /* opacity: 0; */ color: ${u.r.colors.gray800} !important; :focus { color: ${u.r.colors.gray800} !important; } } } &:has(.PhoneInput) { .mantine-InputWrapper-label { left: calc( var(--space-x, 16px) + var(--phone-select, 75px) + var(--phone-input-space-x, 8px) ); } } .icon { position: absolute; top: calc(var(--container-height) / 2); right: var(--space-x, 16px); transform: translateY(-50%); transition: 0.125s ease-in all; &.shrink { top: calc(var(--container-height) / 2 - 4px); transform: translateY(0); } } `,w=h.Z.div` &.leadgen-form_checkbox, &.leadgen-form_radio { width: 100%; } &.leadgen-form_dropdown { width: calc(50% - 12px); } .mantine-InputWrapper-root { display: block; } .mantine-InputWrapper-label { margin-bottom: 0.5rem; color: ${u.r.colors.gray800}; font-size: 16px; font-weight: 400; line-height: 1.5; } .mantine-Radio-root, .mantine-Checkbox-root { gap: 8px; min-width: calc(50% - 4px); // input[type='radio'], // input[type='checkbox'] { // border-color: ${u.r.colors.gray600}; // width: 18px; // height: 18px; // } // input[type='checkbox'] { // border-radius: 4px; // } // &[data-checked='true'] { // input[type='radio'], // input[type='checkbox'] { // border-color: ${u.r.colors.primary600}; // } // input[type='radio'] { // background-color: white; // } // } .mantine-Checkbox-input { &:checked { border-color: ${u.r.colors.primary600}; } } } .leadgen-choiceContainer { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; } .mantine-InputWrapper-error { ${C} } `;h.Z.div` position: absolute; top: calc(var(--container-height) / 2); right: var(--space-x, 16px); `;let TextField=e=>{let{shrink:t,onChangeShrink:a,children:i,className:r}=e,o=(0,s._)(e,["shrink","onChangeShrink","children","className"]),[l,d]=(0,c.useState)(t),[p,h]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{d(t)},[t]),c.createElement(g.Provider,Object.assign({value:{shrinkProps:t,shrink:l,setShrink:d,onChangeShrink:a,hasIcon:p,setHasIcon:h}},o),c.createElement(S,Object.assign({shrink:l,className:(0,n.default)(r,"textField",{textField_shrink:!!l})},o),i))},TextFieldControl=e=>{let{shrink:t,shrinkProps:a,onChangeShrink:i,setShrink:n,hasIcon:o}=(0,c.useContext)(g),{children:l,htmlFor:s}=e,p=(0,d.O)(()=>{a||(n(!1),null==i||i(!1))}),focusInput=e=>{setTimeout(()=>{let t=e.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])'),a=t.item(t.length-1);a&&a.focus({preventScroll:!0})},150)},h=(0,c.useCallback)(e=>{if(t){focusInput(e.currentTarget);return}n(!0),null==i||i(!0),focusInput(e.currentTarget)},[t]);return(0,c.useEffect)(()=>{n(a)},[a]),c.createElement(r.x,{ref:p,onClick:h,className:"textField_wrapper",component:s?"label":"div",htmlFor:s},"function"==typeof l?l({shrink:!!t,hasIcon:o}):l)},TextFieldIcon=({Icon:e})=>{let{shrink:t,setHasIcon:a}=(0,c.useContext)(g),i=(0,o.rZ)();return(0,c.useEffect)(()=>{e&&a(!0)},[]),e?c.createElement(e,{className:`icon ${t?"shrink":""}`,shrink:t,size:24,color:i.colors.gray[9]}):null};TextField.Control=TextFieldControl,TextField.Icon=TextFieldIcon;let ChoiceField=e=>{let{children:t,className:a}=e,i=(0,s._)(e,["children","className"]);return c.createElement(w,Object.assign({className:(0,n.default)(a,"choiceField")},i),t)};var T=Object.freeze({__proto__:null,TextField:TextField,TextFieldControl:TextFieldControl,TextFieldIcon:TextFieldIcon,ChoiceField:ChoiceField})},P5Mp:function(e,t,a){a.d(t,{A:function(){return ArrowRightBlue},C:function(){return Clinic},D:function(){return DoctorExpertiseItem},I:function(){return InsuranceList},P:function(){return PaymentList},a:function(){return DoctorInfoExpertise}});var i=a("q1tI"),n=a("rBCA"),r=a("iBNF"),o=a("izct"),l=a("xXM3"),s=a.n(l),c=a("Aeci"),d=a("F/Hd");let ArrowRightBlue=e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 6 10",fill:"none"},e),i.createElement("path",{d:"M1 9L5 5L1 1",stroke:"#2D87F3",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})),Clinic=e=>i.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),i.createElement("path",{d:"M4.89646 16.9996H2.96549C2.43225 16.9996 2 16.5674 2 16.0341V12.6549C2 12.1217 2.43225 11.6895 2.96549 11.6895H4.89646",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M15.0342 11.6895H16.9652C17.4984 11.6895 17.9306 12.1217 17.9306 12.6549V16.0341C17.9306 16.5674 17.4984 16.9996 16.9652 16.9996H15.0342",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M5.86197 3H14.0686C14.6015 3 15.0341 3.43263 15.0341 3.96549V16.9995H4.89648V3.96549C4.89648 3.43263 5.32912 3 5.86197 3Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M11.172 13.6206H8.7583V16.9998H11.172V13.6206Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M9.96533 9.99996V5.65527",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),i.createElement("path",{d:"M12.1377 7.82764H7.79297",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),p=n.Z.ul` display: grid; grid-gap: 16px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); list-style: none; `,h=n.Z.li` p { margin-top: 8px; text-align: center; } .insuranceLogo { display: grid; height: 58px; border: 1px solid ${r.r.colors.neutral200}; border-radius: 6px; place-content: center; > img { width: 93px; height: 43px; object-fit: contain; } } `,InsuranceList=({insurances:e,className:t,isName:a=!0})=>e.length?i.createElement(p,{id:"insurance-list",className:t},e.map(e=>i.createElement(h,{className:"insuranceItem",key:e.id},i.createElement("div",{className:"insuranceLogo"},i.createElement("img",{src:e.logo,alt:e.name||"insurance-logo"})),a&&i.createElement(o.T,{size:"base",color:r.r.colors.gray500,type:"bold"},e.name)))):null,u=n.Z.div` display: flex; flex-wrap: wrap; gap: 7px; &.paymentList { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); justify-content: center; } `,m=n.Z.div` border: 1px solid ${r.r.colors.neutral100}; border-radius: 12px; width: 80px; min-height: 80px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; &.payment-item-mobile { width: 100%; } .logo { position: relative; width: 55px; aspect-ratio: 55 / 32; object-fit: contain; } .txt-caption-1 { font-size: 0.6875rem; line-height: 1rem; color: ${r.r.colors.gray800}; } `,PaymentList=({payments:e,className:t,isName:a=!0,isMobile:n=!1})=>e.length?i.createElement(u,{id:"payment-container",className:s()(t,{paymentList:n&&e.length>=4})},e.map(t=>i.createElement(m,{className:s()("payment-item",{"payment-item-mobile":n&&e.length>=4}),key:t.id},i.createElement(c.I,{className:"logo",src:t.logo,alt:t.name}),a&&i.createElement("div",{className:"txt-caption-1"},t.name)))):null,g=n.Z.div` display: flex; gap: 8px; .icon { width: 1.25rem; height: 1.25rem; color: ${r.r.colors.gray400}; flex-shrink: 0; } .doctor-info-item-content { display: flex; flex-direction: column; gap: 10px; } `;(0,n.Z)(Clinic)` width: 1.25rem; height: 1.25rem; `;let b=n.Z.div` display: flex; flex-direction: column; gap: 4px; `,DoctorExpertiseItem=e=>{let{doctorInfo:t,Icon:a,title:n}=e;return i.createElement(g,null,i.createElement(a,{className:"icon"}),i.createElement(b,null,i.createElement(d.T,{size:"p3",weight:"semiBold",color:"#111111"},n),i.createElement("div",{className:"doctor-info-item-content"},(Array.isArray(t)?t:[t]).map(e=>i.createElement(d.T,{size:"p3",weight:"regular",key:e},e)))))},f=n.Z.div` display: flex; padding: 1rem; width: 100%; justify-content: space-between; `,x=n.Z.div` display: flex; flex-direction: column; gap: 2px; `,DoctorInfoExpertise=e=>{let{name:t,specialty:a,experience:n,profileImage:r}=e;return i.createElement(f,null,i.createElement(x,null,i.createElement(d.T,{size:"title2",weight:"semiBold",color:"#111111"},t),i.createElement("div",null,a&&i.createElement(d.T,{size:"c1",weight:"regular"},a),n&&i.createElement(d.T,{size:"c1",weight:"regular"},n))),i.createElement(c.I,{src:r,alt:t,style:{width:"4.5rem",height:"4.5rem",borderRadius:"50%",objectFit:"cover",flexShrink:0}}))}}}]);