"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4190],{HalR:function(e,t,a){a.d(t,{T:function(){return d}});var n=a("XBaX"),r=a("q1tI"),o=a("/npG"),l=a("8vDj"),i=a("TIp3"),s=a("O8A1"),c=(0,o.k)((e,t)=>{var a,n,r,o,l,i,c,d,m,p;let u=s.a[null==t?void 0:t.customStylesType]||s.a[s.C.NONE],h=null===(a=u.fontSize[null==t?void 0:t.size])||void 0===a?void 0:a[0],g=null===(n=u.lineHeight[null==t?void 0:t.size])||void 0===n?void 0:n[0],f=null!==(l=null===(o=null===(r=u.letterSpacing)||void 0===r?void 0:r[null==t?void 0:t.size])||void 0===o?void 0:o[0])&&void 0!==l?l:0,v=null===(i=u.fontSize[null==t?void 0:t.size])||void 0===i?void 0:i[1],C=null===(c=u.lineHeight[null==t?void 0:t.size])||void 0===c?void 0:c[1],x=null!==(p=null===(m=null===(d=u.letterSpacing)||void 0===d?void 0:d[null==t?void 0:t.size])||void 0===m?void 0:m[1])&&void 0!==p?p:0;return{root:Object.assign({},(null==t?void 0:t.size)&&{fontWeight:(null==t?void 0:t.as)==="label"?s.F.semiBold:u.fontWeight[t.weight]||u.fontWeightBySize[null==t?void 0:t.size]||s.F.regular,fontSize:`${h}`,lineHeight:`${g}`,letterSpacing:f,[e.fn.smallerThan("sm")]:{fontSize:`${v}`,lineHeight:`${C}`,letterSpacing:x}})}});let d=(0,r.forwardRef)((e,t)=>{var a,{size:o,color:d,weight:m,as:p="p",styles:u,className:h,dataEventCategory:g,dataEventAction:f,dataEventLabel:v,variant:C}=e,x=(0,n._)(e,["size","color","weight","as","styles","className","dataEventCategory","dataEventAction","dataEventLabel","variant"]);let b=(0,l.rZ)(),y=(0,s.u)(),{classes:E,cx:w}=c({size:o,weight:"caption"===m?"bold":m,as:p,customStylesType:y},{name:"Text",styles:u}),k="string"==typeof b.colors[d]?b.colors[d]:d;return r.createElement(i.x,Object.assign({"data-size":o,className:w(E.root,h),color:k||("label"===p?b.colors.gray[6]:(null===(a=null==b?void 0:b.other)||void 0===a?void 0:a.template)==="mb"?b.colors.delftGray[7]:void 0)||("primary"===C?b.colors.gray[9]:"secondary"===C?b.colors.gray[7]:"tertiary"===C?b.colors.gray[4]:"disabled"===C?b.colors.gray[3]:"error"===C?b.colors.red[6]:"success"===C?b.colors.green[6]:void 0)||b.colors.gray[7],component:p,"data-event-category":g,"data-event-action":f,"data-event-label":v,classNames:{root:Object.assign(Object.assign({},x.wordWrap?{"word-wrap":x.wordWrap}:void 0),x.isUppercase||"caption"===m?{"text-transform":"uppercase"}:void 0)},ref:t},x))})},lcQT:function(e,t,a){a.d(t,{I:function(){return InputCommentBar},P:function(){return PopupDanger},S:function(){return SharePopup},a:function(){return PopupFrame},b:function(){return SubmitReportForm},c:function(){return I},d:function(){return getPostFormData},e:function(){return editPost},f:function(){return createPost},g:function(){return getDefaultFailNoti},h:function(){return deletePost},i:function(){return O},j:function(){return deleteComment},k:function(){return decodeCommentBody},l:function(){return likeUnlikeComment},m:function(){return likeUnlikePost},u:function(){return useImagePicker}});var n=a("q1tI"),r=a("cw2P"),o=a("0mzb"),l=a("HalR"),i=a("+J3I"),s=a("i8i4"),c=a("Czgk"),d=a("rBCA"),m=a("iBNF"),p=a("XBaX"),u=a("Of7P"),h=a("RVQf"),g=a("KMnL"),f=a("EnpW"),v=a("IQVP"),C=a("FcWh"),x=a("OpGc"),b=a("Hoxw"),y=a("WMes"),E=a("2hEA"),w=a("t/pd"),k=a("fKfj"),P=a("3jI+"),N=a("9vqH"),M=a("/pFO");let useImagePicker=(e,t)=>{let[a,r]=(0,n.useState)(e||[]),o=(0,n.useMemo)(()=>(e||a).map(e=>"string"==typeof e?e:URL.createObjectURL(e)),[e,a]);return{onSelectImages:n=>{let o=n.target.files;if(o){if(t&&e){let n=e||a;t(n.concat(Array.from(o)))}else r(a=>{let n=e||a;return t&&t(n.concat(Array.from(o))),n.concat(Array.from(o))})}},onRemoveImage:a=>{t&&e?(e.splice(a,1),t(e.slice())):r(n=>{let r=e||n;return r.splice(a,1),t&&t(r.slice()),r.slice()})},onRemoveAllImages:()=>{t?t([]):r([])},imageSrcs:o,imageFiles:e||a}},getDefaultFailNoti=e=>({message:e("notification.failure"),type:"danger"}),likeUnlikePost=({id:e,locale:t})=>(0,p.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,c.e)((0,c.f)(v.yy.POST.LIKE,{id:e,_locale:t}),"GET");return a}),deletePost=({id:e,locale:t})=>(0,p.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,c.e)((0,c.f)(v.yy.POST.DELETE,{id:e,_locale:t}),"DELETE");return a}),getPostFormData=({title:e,description:t,communityId:a,imageFiles:n,previewUrl:r,topicIds:o,locale:l,sanitizeFunction:s,categoryCommunityId:c,categoryTopicIds:d,introUrl:m,bannerUrl:u,scheduleTime:h,isAnonymous:g,isAskDoctor:v})=>(0,p.a)(void 0,void 0,void 0,function*(){let p=new FormData,x=(0,C.j)(t),b=(0,C.j)(e),y=(0,C.i)(x);if(p.append("title",b),p.append("description",(0,C.k)(x,s)),c?p.append("category_community",String(c)):a&&p.append("community_id",String(a)),p.append("is_anonymous",g?"1":"0"),p.append("is_question",v?"1":"0"),(null==r?void 0:r.title)&&p.append("preview_title",r.title),(null==r?void 0:r.description)&&p.append("preview_description",r.description),(null==r?void 0:r.url)&&p.append("preview_link",(0,i.c)(r.url)),(null==r?void 0:r.image)&&p.append("preview_image",(0,i.c)(r.image)),null==o||o.forEach(e=>{p.append("topics[]",String(e||""))}),null==d||d.forEach(e=>{p.append("category_topics[]",String(e||""))}),null==n?void 0:n.length){let e=yield Promise.all(n.map((e,t)=>new Promise(a=>{setTimeout(()=>{a((0,C.u)(e,l))},2e3*t)})));null==e||e.filter(Boolean).slice(0,f.M).forEach((e,t)=>{p.append(`images[${t}]`,e)})}else p.append("images","");return null==y||y.forEach(e=>{p.append("mention_ids[]",e)}),p.append("intro_url",m||""),p.append("banner",u||""),h&&(p.append("post_type","scheduled"),p.append("schedule_datetime",h)),p}),createPost=({locale:e,formData:t,isArticleComment:a})=>(0,p.a)(void 0,void 0,void 0,function*(){let n=yield(0,c.e)((0,c.f)(a?v.yy.POST.CREATE_ARTICLE_COMMENT:v.yy.POST.CREATE,{_locale:e}),"POST",{data:t});return n}),editPost=({id:e,locale:t,formData:a})=>(0,p.a)(void 0,void 0,void 0,function*(){let n=yield(0,c.e)((0,c.f)(v.yy.POST.UPDATE,{id:e,_locale:t}),"POST",{data:a});return n}),reportPost=({id:e,reason:t,locale:a})=>{let n=new FormData;return n.append("reason",t),(0,c.e)((0,c.f)(v.yy.POST.REPORT,{_locale:a,id:e}),"POST",{data:n})},S=d.Z.div`
[data-type='confirm'] {
max-width: 468px;
/* height: 486px; */
padding: 0;
.popup-content {
display: flex;
flex-direction: column;
padding: 0;
.close-button {
top: 16px;
right: 16px;
width: 24px;
height: 24px;
z-index: 5;
}
.header {
display: flex;
height: 56px;
align-items: center;
padding: 16px 56px 16px 32px;
border-bottom: 1px solid ${m.r.colors.neutral100};
font-weight: 900;
width: 100%;
justify-content: space-between;
}
.content {
overflow: auto;
flex: 1;
.topic-list-wrapper {
padding: 1rem;
}
}
}
}
> div&[data-open='true'] {
z-index: 250;
&:last-child {
z-index: 200;
}
}
${e=>e.isExpand&&`
& > div[data-open] {
width: 100%;
height: 100%;
max-width: none;
max-height: none;
}
`}
${e=>e.hasFullscreen&&`
& > div[data-open] {
transition: all 0.5s ease-in-out, width 0s, height 0s;
}
`}
`,L=d.Z.div`
cursor: pointer;
display: flex;
align-items: center;
`,PopupFrame=({className:e,style:t,closeIcon:a,heading:r="",children:l,isOpen:i=!1,hasFullscreen:s=!1,disableClickOutside:c=!1,initExpand:d=!1,onExpandChange:m,onClose:p=()=>null})=>{let[u,h]=(0,n.useState)(d);return n.createElement(S,{className:e,style:t,isExpand:u,hasFullscreen:s},n.createElement(P.P,{type:"confirm",onClose:p,isOpen:i,closeIcon:a||n.createElement("img",{src:N.C,loading:"lazy"}),enableAnimation:!s,disableClickOutside:c},n.createElement("div",{className:"header"},n.createElement(o.H,{tag:"h5"},r),s&&n.createElement(L,{onClick:()=>{null==m||m(),h(!u)}},n.createElement(k.Z,{size:14,isExpand:u}))),n.createElement("div",{className:"content"},"function"==typeof l?l(u):l)))};var I="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='25' fill='none'%3e%3cpath fill='%23262626' d='M12 22.984c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.478-10 10 4.477 10 10 10'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14.828 10.156-5.657 5.657M9.172 10.156l5.657 5.657'/%3e%3c/svg%3e";let _=d.Z.div`
[data-type='confirm'] {
width: min(360px, 100%);
height: auto;
&[data-open='false'] {
top: calc(-100% - 500px);
}
}
z-index: 600;
.header {
display: none !important;
}
.confirm-dialog {
position: relative;
overflow: auto;
width: 100%;
padding-top: 44px;
background: #fff;
border-radius: ${m.r.borderRadius};
.confirm-content {
display: flex;
flex-direction: column;
align-items: center;
padding: 0 16px 16px;
text-align: center;
.title {
margin-bottom: 8px;
font-size: 24px;
line-height: 32px;
word-break: break-word;
overflow-wrap: break-word;
}
.desc {
margin-bottom: 24px;
color: ${m.r.colors.gray500};
font-size: 18px;
line-height: 24px;
text-align: center;
word-break: break-word;
overflow-wrap: break-word;
}
.btn-group {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
button {
margin: 0 4px 0.5rem;
}
}
}
}
.thumbnail-container {
width: 80px;
height: 80px;
margin-bottom: 32px;
.thumbnail {
width: 100%;
height: 100%;
}
&.is-icon {
display: flex;
align-items: center;
justify-content: center;
background: #e0e9fc;
border-radius: 1rem;
.thumbnail {
width: 40px;
height: 40px;
}
}
}
&[data-is-marrybaby='true'] {
.popup-frame {
> div:first-child {
overflow: hidden;
border-radius: 1rem;
&[data-open='true'] {
${i.M.mbDown} {
top: 100%;
transform: translate(-50%, -100%);
max-width: unset;
width: 100%;
background: unset;
overflow: unset;
}
}
}
.popup-content {
.close-button {
${i.M.mbDown} {
display: none;
}
}
.confirm-dialog {
${i.M.mbDown} {
background: unset;
position: relative;
overflow-x: hidden;
&::before {
content: '';
width: 200%;
background: #fff;
position: absolute;
left: 50%;
top: 0;
transform: translateX(-50%);
z-index: -1;
height: 100%;
border-top-left-radius: 100%;
border-top-right-radius: 100%;
}
}
.confirm-content {
padding: 0 40px 40px;
${i.M.mbDown} {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.btn-group {
width: 100%;
justify-content: space-between;
button {
flex: 1;
margin: 0;
&:first-child {
margin-right: 0.5rem;
}
}
}
}
}
}
.thumbnail-container {
${i.M.mbDown} {
display: none;
}
&.is-icon {
background: #ffeaf1;
border-radius: 24px;
}
&.is-mobile {
position: absolute;
top: 0;
left: 50%;
display: none;
width: 48px;
height: 48px;
transform: translate(-50%, -50%);
&.is-icon {
border-radius: 1rem;
.thumbnail {
width: 24px;
height: 24px;
}
}
${i.M.mbDown} {
display: flex;
}
}
}
}
}
`,PopupDanger=({className:e,isMarryBaby:t,style:a,title:d,description:m,acceptText:p,cancelText:u,onAccept:h,onCancel:g,thumbnail:f,isThumbnailIcon:v,onClose:C,acceptBtnTracking:x,acceptBtnProps:b,cancelBtnProps:y})=>{let{data:{env:{isMarryBaby:E}}}=(0,n.useContext)(c.T),w="boolean"==typeof t?t:E,[k,P]=(0,n.useState)(!1);return((0,n.useEffect)(()=>((0,i.t)(!0),setTimeout(()=>P(!0),0),()=>(0,i.t)(!1)),[]),"undefined"==typeof window)?null:s.createPortal(n.createElement(_,{"data-is-marrybaby":w,className:e,style:a,"data-open":k},n.createElement(PopupFrame,{className:"popup-frame",isOpen:k,onClose:C},n.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},n.createElement("div",{className:"confirm-content"},f&&n.createElement("div",{className:`thumbnail-container ${v?"is-icon":""}`},n.createElement("img",{className:"thumbnail",src:f,loading:"lazy"})),n.createElement(o.H,{className:"title",tag:"h2"},d),n.createElement(l.T,{className:"desc",size:"lg"},m),n.createElement("div",{className:"btn-group"},n.createElement(r.B,Object.assign({theme:w?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==h||h(),null==C||C()}},b,x),p),n.createElement(r.B,Object.assign({theme:w?"marryBaby":"helloSites",size:"md",onClick:()=>{null==g||g(),null==C||C()}},y),u)))),w&&f&&n.createElement("div",{className:`thumbnail-container is-mobile ${v?"is-icon":""}`},n.createElement("img",{className:"thumbnail",src:f,loading:"lazy"})))),(0,i.a)())},B=d.Z.div`
padding: 1rem;
border-top: 1px solid #f2f2f2;
&[data-is-reply='true'] {
padding-right: 0;
padding-left: 0;
border-top: 1px solid #e4e8ec;
margin-right: 1rem;
margin-left: 1rem;
}
.error-text {
padding: 1rem;
color: ${m.r.colors.red700};
}
.reply-to-container {
display: flex;
justify-content: space-between;
padding-bottom: 0.75rem;
margin-top: -0.25rem;
.icon-close-comment {
width: 16px;
height: 16px;
cursor: pointer;
}
a {
text-decoration: none;
}
}
.input-container {
display: flex;
align-items: center;
.avatar-wrapper {
display: flex;
flex-shrink: 0;
align-items: center;
margin-right: 0.5rem;
&.avatar-wrapper-reply {
width: 32px;
height: 32px;
.avatar {
width: 32px;
height: 32px;
}
}
}
.input-wrapper {
margin-right: 0.5rem;
&[data-has-error] {
.as-input {
border-color: ${m.r.colors.red700};
}
}
.as-input {
.textarea {
width: 100%;
max-height: 225px;
min-height: 75px;
.ql-toolbar {
padding: 0;
}
.ql-editor {
padding-left: 0;
padding-right: 0;
}
.quill {
height: 0;
}
}
width: 100%;
padding: 12px 16px;
border: solid 1px ${m.r.colors.gray200};
border-radius: ${m.r.borderRadius};
&:active,
&:focus {
border-color: ${m.r.colors.primaryBase};
box-shadow: 0px 0px 2px 2px ${m.r.colors.primary200};
}
&:disabled {
background-color: ${m.r.colors.gray100};
cursor: not-allowed;
}
span {
&[data-error='true'] {
color: red;
text-decoration: underline;
}
}
}
&[data-has-action-icon] {
.as-input {
padding: 12px 48px 12px 16px;
}
}
&[data-has-display-icon] {
.as-input {
padding: 12px 16px 12px 48px;
}
}
&[data-has-action-icon][data-has-display-icon] {
.as-input {
padding: 12px 48px;
}
}
&[data-size='lg'] {
.as-input {
font-size: 16px;
font-weight: ${m.r.sizes.fwRegular};
${i.M.mbDown} {
font-size: 22px;
line-height: 1.2;
}
${i.M.mbUp} {
font-size: 26px;
line-height: 1.2;
}
}
}
&[data-size='md'] {
.as-input {
font-weight: ${m.r.sizes.fwRegular};
line-height: 22px;
${i.M.mbDown} {
font-size: 14px;
line-height: 1.2;
}
${i.M.mbUp} {
font-size: 16px;
line-height: 1.2;
}
}
}
&[data-size='sm'] {
.as-input {
font-weight: ${m.r.sizes.fwRegular};
line-height: 20px;
${i.M.mbDown} {
font-size: 13px;
line-height: 1.5;
}
${i.M.mbUp} {
font-size: 13px;
line-height: 1.5;
}
}
}
}
.images-input-label {
height: 100%;
cursor: pointer;
.icon-images-input {
width: 24px;
height: 24px;
vertical-align: middle;
}
}
.send-button {
display: flex;
width: 40px;
height: 40px;
flex-shrink: 0;
align-items: center;
justify-content: center;
padding: 0;
border: none;
&.send-button-post {
background: ${m.r.colors.neutral100};
border-radius: 50%;
}
.icon-enter {
width: 20px;
height: 20px;
vertical-align: middle;
}
&[data-is-loading='true'] {
> div {
display: flex;
align-items: center;
justify-content: center;
}
}
}
}
.preview-images-container {
margin-top: 1rem;
.image-src-wrapper {
position: relative;
width: 100%;
padding-top: 66.67%;
&:not(:last-child) {
margin-bottom: 1rem;
}
.preview-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.icon-close-circle {
position: absolute;
top: 10px;
right: 10px;
width: 20px;
height: 20px;
cursor: pointer;
}
}
}
`,$=(0,n.createContext)({}),getCommentFormBody=({postId:e,message:t,photos:a,link:n,locale:r,sanitizeFunction:o,replyingUserId:l,replyingUserName:i,replyingId:s})=>(0,p.a)(void 0,void 0,void 0,function*(){let c=new FormData,d=(0,C.k)(t.replace(/(\ )+/g," "),o),m=(0,C.i)(d);if(a&&a.length>0){let e=yield Promise.all(null==a?void 0:a.map(e=>(0,C.u)(e,r)));e.filter(Boolean).slice(0,f.M).forEach(e=>{c.append("images[]",e)})}return n&&c.append("link",n),null==m||m.forEach(e=>{c.append("mention_ids[]",e)}),c.append("post_id",e),s&&c.append("parent_id",s),l&&(m.unshift(l),d=`[mention+id="${l}"+name="${(i||"").replace('"',"'")}"]${d}`,c.append("parent_user_id",String(l))),c.append("content",d),c.append("content",d),c}),submitComment=(e,t)=>(0,p.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(v.yy.COMMENT.CREATE,{_locale:t}),"POST",{data:e})}),decodeCommentBody=e=>{try{let t=e.match(/\[@([^\]]+)\]/),a=t?t[0].replace("[@","").replace("]",""):"",n=e.replace(/\[@([^\]]+)\]/,"");return{text:n.trim(),replyingTo:a}}catch(e){}return{text:""}},submitReply=(e,t)=>(0,p.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(v.yy.COMMENT.REPLY,{_locale:t}),"POST",{data:e})}),likeUnlikeComment=({commentId:e,setLike:t=!1,locale:a})=>(0,p.a)(void 0,void 0,void 0,function*(){return(0,c.e)((0,c.f)(t?v.yy.COMMENT.LIKE:v.yy.COMMENT.UNLIKE,{_locale:a,id:e}),"GET")}),deleteComment=({id:e,locale:t})=>(0,c.e)((0,c.f)(v.yy.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"),InputCommentBar=({isReply:e,className:t,onClose:a,replyToName:o,style:i,replyingId:s,replyingUser:d,onPostSuccess:m,post:v,isMarryBaby:C})=>{let{action:{pushNotifications:w,sanitizeFunction:k},data:{userInfo:P,locale:N,env:{isMarryBaby:M}}}=(0,n.useContext)(c.T),{t:S}=(0,h.u)(),{onSelectImages:L,onRemoveImage:_,imageSrcs:z,onRemoveAllImages:F,imageFiles:O}=useImagePicker(),[H,D]=(0,n.useState)(""),{trigger:T}=(0,n.useContext)($),[j,Z]=(0,n.useState)(!1),R=(0,n.useRef)(null),A=(0,n.useRef)(null),U=(0,n.useRef)(null),[q,W]=(0,n.useState)([]),[V,G]=(0,n.useState)([]),[Y,K]=(0,n.useState)(null);return(0,n.useEffect)(()=>{var e;null===(e=U.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"start"}),setTimeout(()=>{var e;null===(e=A.current)||void 0===e||e.focus()},400)},[T]),n.createElement(B,{"data-is-reply":e,className:t,style:i},e&&n.createElement("div",{className:"reply-to-container"},n.createElement(l.T,{size:"p4"},n.createElement("span",{dangerouslySetInnerHTML:{__html:S("inputComment.replyTo",{name:`@${o||""}`})}})),n.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3ccircle cx='8' cy='8.5' r='6.667' fill='white' stroke='%23404040'/%3e%3cpath stroke='%23404040' stroke-linecap='round' stroke-linejoin='round' d='m10 6.5-4 4M6 6.5l4 4'/%3e%3c/svg%3e",className:"icon-close-comment",onClick:()=>a&&a(),loading:"lazy"})),n.createElement("div",{className:"input-container",ref:U},n.createElement(y.U,{className:`avatar-wrapper ${e?"avatar-wrapper-reply":""}`,avatar:(null==P?void 0:P.id)?P.avatar:f.D,username:(null==P?void 0:P.name)||(null==P?void 0:P.username)}),n.createElement("input",{ref:R,onChange:L,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),n.createElement(u.I,{value:H,name:"input",size:"md",className:"input-wrapper",displayIcon:n.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M10.754 4.854H4.492a1.79 1.79 0 0 0-1.789 1.789v12.524a1.79 1.79 0 0 0 1.79 1.789h12.523a1.79 1.79 0 0 0 1.79-1.79v-6.261'/%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='M17.463 3.512a1.898 1.898 0 0 1 2.684 2.684l-8.498 8.498-3.579.895.895-3.579z'/%3e%3c/svg%3e",loading:"lazy"}),CustomInput:n.createElement("div",{className:"as-input"},n.createElement(E.R,{className:"textarea",html:H,onChange:D,onImagePickerClick:()=>{var e;return null===(e=R.current)||void 0===e?void 0:e.click()},bannedWords:V,onPreviewUrlChange:K,onInvalidUrlsChange:W,setEditorRef:e=>A.current=e,isReplying:e}))}),n.createElement(r.B,{theme:("boolean"==typeof C?C:M)?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>(0,p.a)(void 0,void 0,void 0,function*(){var t,n,r,o,l,i,c,p,u;if((null==v?void 0:v.id)&&!j){Z(!0);try{let h=yield getCommentFormBody(Object.assign({message:H,photos:O,postId:String(v.id),link:null==Y?void 0:Y.url,sanitizeFunction:k,locale:N},e&&s?{replyingUserId:String((null==d?void 0:d.id)||(null===(t=null==v?void 0:v.author)||void 0===t?void 0:t.id)||""),replyingId:s,replyingUserName:(null==d?void 0:d.name)||(null==d?void 0:d.username)||""}:{})),f=yield e&&s?submitReply(h,N):submitComment(h,N),C=null==f?void 0:f.data;(null==C?void 0:C.id)&&!(null===(r=null===(n=null==f?void 0:f.messages)||void 0===n?void 0:n.moderation)||void 0===r?void 0:r.type)?(e=>{D(""),F(),a&&a();let t=(0,g.g)(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),m&&m(t)})(f):(null===(l=null===(o=null==f?void 0:f.messages)||void 0===o?void 0:o.moderation)||void 0===l?void 0:l.type)==="banned"?(w({title:S("notification.comment.blocked.title"),message:S("notification.comment.blocked.message"),type:"danger"}),f.messages.moderation.words&&G(f.messages.moderation.words)):(null===(c=null===(i=null==f?void 0:f.messages)||void 0===i?void 0:i.moderation)||void 0===c?void 0:c.type)==="suspect"?(w({title:S("notification.comment.suspect.title"),message:S("notification.comment.suspect.message"),type:"warning"}),D(""),F(),a&&a()):(null===(p=null==f?void 0:f.messages)||void 0===p?void 0:p.find(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))}))?(w({message:S("notification.suspend.message"),type:"warning"}),D(""),F(),a&&a()):w({title:"",message:(null===(u=null==f?void 0:f.messages)||void 0===u?void 0:u[0])||S("notification.comment.somethingWrong"),type:"danger"})}catch(e){w({title:"",message:S("notification.comment.somethingWrong"),type:"danger"})}Z(!1)}}),isLoading:j,isDisabled:!!(null==q?void 0:q.length)||j||!H||(null==H?void 0:H.length)<2||!H.trim()},n.createElement("img",{src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='21' fill='none'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m7.5 9.734-3.75 3.75 3.75 3.75'/%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M16.25 4.734v5.569c0 .843-.33 1.653-.915 2.25a3.1 3.1 0 0 1-2.21.931H3.75'/%3e%3c/svg%3e",className:"icon-enter",loading:"lazy"}))),(null==q?void 0:q.length)?n.createElement("div",{className:"error-text"},S("notification.limitUrlDomain")):null,(!z||0===z.length)&&Y&&n.createElement("div",{className:"link-preview-wrapper"},Y.isFetching?n.createElement(b.L,null):n.createElement(n.Fragment,null,n.createElement(x.C,{title:Y.title,url:Y.url||"#",image:Y.image,noRefetch:!0}),n.createElement("img",{src:I,className:"icon-close",onClick:()=>K(null),loading:"lazy"}))),z&&z.length>0&&n.createElement("div",{className:"preview-images-container"},z.map((e,t)=>n.createElement("div",{key:t,className:"image-src-wrapper"},n.createElement("img",{className:"preview-image",src:e,loading:"lazy"}),n.createElement("img",{src:I,className:"icon-close-circle",onClick:()=>_(t),loading:"lazy"})))))},SharePopup=({trackingCategory:e,className:t,style:a,url:r,text:o,onClose:l})=>{let{data:{env:{isMarryBaby:s}}}=(0,n.useContext)(c.T),{t:d}=(0,h.u)(),[m,p]=(0,n.useState)(!1);return(0,n.useEffect)(()=>((0,i.t)(!0),setTimeout(()=>p(!0),0),()=>(0,i.t)(!1)),[]),n.createElement(w.h,null,n.createElement(z,{"data-is-marrybaby":s,className:t,style:a},n.createElement(PopupFrame,{className:"share-popup",isOpen:m,onClose:l,heading:d("bottomBar.share")},m&&n.createElement(M.r,{trackingCategory:e,shareUrl:r||("undefined"!=typeof window?window.location.href:""),title:o}))))},z=d.Z.div`
.share-popup {
> div:first-child {
height: unset;
}
}
.custom-share__header {
display: flex;
flex-wrap: no-wrap;
align-items: center;
padding: 1rem;
border-bottom: 1px solid ${m.r.colors.neutral100};
margin-bottom: 16px;
.custom-share__header-image {
width: 38px;
height: 38px;
flex-shrink: 0;
& > img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
}
.custom-share__header-info {
flex: 1;
padding: 0 8px;
word-break: break-word;
[data-tag='h4'] {
margin-bottom: 8px;
font-size: 14px;
font-weight: bold;
line-height: 14px;
}
[data-size='md'] {
color: #a5a5a5;
font-size: 14px;
line-height: 14px;
}
}
}
&[data-is-marrybaby='true'] {
.share-popup {
> div:first-child {
overflow: hidden;
border-radius: 1rem;
&[data-open='true'] {
${i.M.mbDown} {
max-width: unset;
width: 100%;
top: 100%;
transform: translate(-50%, -100%);
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
}
.close-button {
display: block;
}
.popup-content {
.header {
display: block;
padding: 1rem;
background-color: rgb(243, 243, 243);
}
.content {
padding-bottom: 1rem;
}
}
.share-mb-text {
margin: 1rem 1rem 0.5rem;
}
}
}
`,F=d.Z.div`
padding: 0 8px;
margin-top: 18px;
.report-list {
margin-bottom: 18px;
.report-item {
display: flex;
align-items: center;
margin-bottom: 10px;
font-weight: 600;
& > img {
width: 12px;
height: 12px;
margin-right: 8px;
}
.__label {
font-size: 14px;
}
}
}
.report-submit {
width: 100%;
}
&[data-is-marrybaby='true'] {
padding: 0 1rem 1rem;
}
`;var O="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12M8 5v3M8 11h.007'/%3e%3c/svg%3e";let SubmitReportForm=({className:e,style:t,reason:a,reasonText:o,onClose:i,postId:s})=>{let{data:{locale:d,env:{isMarryBaby:u}},action:{pushNotifications:g}}=(0,n.useContext)(c.T),{t:f}=(0,h.u)(),[v,C]=(0,n.useState)(!1);return n.createElement(F,{"data-is-marrybaby":u,className:e,style:t},n.createElement("ul",{className:"report-list"},n.createElement("li",{className:"report-item"},n.createElement("img",{src:O,loading:"lazy"}),n.createElement(l.T,{className:"__label",color:m.r.colors.gray800,size:"p4"},o))),n.createElement(r.B,{theme:u?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:v,onClick:()=>(0,p.a)(void 0,void 0,void 0,function*(){if(s&&!v){C(!0);try{let e=yield reportPost({id:s,reason:a,locale:d});(null==e?void 0:e.status)===1&&(g({message:"Post reported",type:"success"}),i&&i())}catch(e){}C(!1)}})},f("submit")))}},"qR8+":function(e,t,a){a.d(t,{D:function(){return Divider}});var n=a("q1tI"),r=a("rBCA"),o=a("iBNF");let l=r.Z.hr`
border-width: 1px;
border-color: ${o.r.colors.neutral200};
border-style: ${e=>e.dividerType};
`,Divider=({type:e="solid",className:t,style:a})=>n.createElement(l,{style:a,className:t,"data-diver-type":e,dividerType:e})},pxeJ:function(e,t,a){a.d(t,{D:function(){return Dropdown}});var n=a("q1tI"),r=a("8vDj"),o=a("rBCA"),l=a("iBNF");let i=o.Z.div`
--dropdown-padding: 12px 18px 12px 16px;
position: relative;
box-sizing: border-box;
border: 1px solid ${l.r.colors.gray200};
background: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")
no-repeat;
background-position: right 16px center;
border-radius: ${l.r.borderRadius};
&[data-disabled='true'],
:disabled {
background-color: #f2f2f2;
cursor: not-allowed;
}
&[data-size='sm'] {
font-size: 13px;
line-height: 20px;
}
&[data-size='md'] {
font-size: 14px;
line-height: 21px;
}
&[data-size='lg'] {
font-size: 16px;
line-height: 24px;
}
&[data-has-icons='true'] {
border: none;
background: ${l.r.colors.gray100};
img,
svg {
display: inline-block;
max-width: 16px;
margin-right: 6px;
}
span {
display: inline-block;
vertical-align: middle;
}
&:hover {
box-shadow: none;
}
> div {
position: relative;
display: flex;
width: 100%;
box-sizing: border-box;
align-items: center;
}
> div::after {
position: absolute;
top: 50%;
right: 12px;
width: 10px;
height: 8px;
background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
background-repeat: no-repeat;
content: '';
transform: translateY(-50%);
}
}
&:hover {
box-shadow: 0 0 2px 2px ${e=>e.shadowColor};
}
&[data-is-native='true'] {
padding: var(--dropdown-padding);
line-height: 24px;
&:focus {
box-shadow: 0px 0px 2px 2px ${e=>e.shadowColor};
}
}
`,s=o.Z.div`
padding: var(--dropdown-padding);
cursor: pointer;
&.with-label {
padding-top: 34px;
padding-bottom: 12px;
}
&[data-dropdown-open] {
padding: 11px 15px 11px 15px;
border: 1px solid ${e=>e.color};
border-radius: ${l.r.borderRadius};
box-shadow: 0 0 2px 2px ${e=>e.shadowColor};
}
`,c=o.Z.ul`
position: absolute;
top: 100%;
/* right: 0; */
min-width: 100%;
left: 0;
display: block;
margin-top: 4px;
background: ${l.r.colors.white};
border-radius: ${l.r.borderRadius};
box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
-2px 2px 5px rgba(67, 86, 100, 0.123689);
cursor: pointer;
&[data-has-icons='true'] {
border: 1px solid ${l.r.colors.gray200};
background: white;
box-shadow: none;
filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04));
}
`,d=o.Z.li`
display: flex;
padding: 12px 18px 12px 16px;
&[data-disabled='true'] {
cursor: not-allowed;
color: #bfbfbf;
& > * {
pointer-events: none;
}
}
&:hover,
:active {
background: ${l.r.colors.gray100};
}
`,m=o.Z.div`
max-width: 16px;
margin-right: 8px;
`,p=o.Z.div`
position: absolute;
top: 12px;
left: 16px;
pointer-events: none;
`,Dropdown=({className:e,value:t,options:a,onChange:o=()=>void 0,id:l,placeholderIcon:u,placeholder:h,style:g,size:f="lg",groupedWithLabel:v,disabled:C,dropdownLabelTrackingAttributes:x={},isNativeSelect:b=!1})=>{let y=(0,r.rZ)(),[E,w]=n.useState(!1),showDropdown=()=>!C&&w(!E);if(b){let e="object"==typeof(null==t?void 0:t.value)&&t.value instanceof Date?t.value.toString():null==t?void 0:t.value;return n.createElement(i,{color:y.fn.primaryColor(),shadowColor:y.colors[y.primaryColor][2],as:"select","data-is-native":"true",value:e||void 0,disabled:C,onChange:e=>{if("string"==typeof e.target.value){let t=a.find(t=>t.value===e.target.value);t&&o(t)}}},h&&n.createElement("option",{value:h,disabled:!0,selected:!0},h),a.map(e=>n.createElement("option",{key:`${l}-${e.value}`,value:e.value,disabled:!!e.disabled&&e.disabled},e.label)))}return n.createElement(i,{color:y.fn.primaryColor(),shadowColor:y.colors[y.primaryColor][2],className:e,"data-dropdown-open":E||void 0,"data-size":f,id:l,"data-has-icons":!!u,style:g,onBlur:()=>w(!1),tabIndex:0,"data-disabled":C},!!v&&n.createElement(p,null,v),n.createElement(s,Object.assign({color:y.fn.primaryColor(),shadowColor:y.colors[y.primaryColor][2],onClick:showDropdown,className:v&&"with-label"},x),u," ",n.createElement("span",null,t&&t.value?t.label:h)),E&&n.createElement(c,{onClick:showDropdown,"data-has-icons":!!u},a.map(e=>n.createElement(d,{key:`${l}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>!e.disabled&&!C&&(null==o?void 0:o(e)),"data-disabled":!!e.disabled&&e.disabled},e.icon&&n.createElement(m,null,e.icon),e.label))))}},O8A1:function(e,t,a){a.d(t,{C:function(){return o},F:function(){return l},G:function(){return GlobalTextStyleNew},T:function(){return TemplateProvider},a:function(){return c},u:function(){return useTemplateVariant}});var n,r,o,l,i=a("mYVa"),s=a("q1tI");(n=o||(o={})).LEADGEN="leadgen",n.NONE="none",(r=l||(l={}))[r.regular=400]="regular",r[r.halfBold=500]="halfBold",r[r.semiBold=600]="semiBold",r[r.bold=700]="bold";let c={[o.NONE]:{fontSize:{base:[(0,i.h)(16),(0,i.h)(16)],lg:[(0,i.h)(18),(0,i.h)(16)],md:[(0,i.h)(18),(0,i.h)(16)],sm:[(0,i.h)(16),(0,i.h)(14)],xs:[(0,i.h)(14),(0,i.h)(12)],s1:[(0,i.h)(22),(0,i.h)(18)],s2:[(0,i.h)(18),(0,i.h)(16)],s3:[(0,i.h)(16),(0,i.h)(14)],s4:[(0,i.h)(14),(0,i.h)(12)],s5:[(0,i.h)(12),(0,i.h)(12)],p1:[(0,i.h)(18),(0,i.h)(16)],p2:[(0,i.h)(16),(0,i.h)(16)],p3:[(0,i.h)(16),(0,i.h)(14)],p4:[(0,i.h)(14),(0,i.h)(12)],p5:[(0,i.h)(12),(0,i.h)(12)],c1:[(0,i.h)(16),(0,i.h)(14)],c2:[(0,i.h)(14),(0,i.h)(12)],n1:[(0,i.h)(12),(0,i.h)(12)],label1:[(0,i.h)(14),(0,i.h)(14)],label2:[(0,i.h)(12),(0,i.h)(12)],h1:[(0,i.h)(40),(0,i.h)(26)],h2:[(0,i.h)(32),(0,i.h)(24)],h3:[(0,i.h)(26),(0,i.h)(20)],h4:[(0,i.h)(22),(0,i.h)(18)],h5:[(0,i.h)(18),(0,i.h)(16)],h5New:[(0,i.h)(20),(0,i.h)(18)],h6:[(0,i.h)(16),(0,i.h)(14)],title1:[(0,i.h)(17),(0,i.h)(17)],title2:[(0,i.h)(15),(0,i.h)(15)],body2:[(0,i.h)(15),(0,i.h)(15)]},lineHeight:{base:[(0,i.h)(24),(0,i.h)(24)],lg:[(0,i.h)(32),(0,i.h)(28)],md:[(0,i.h)(32),(0,i.h)(28)],sm:[(0,i.h)(24),(0,i.h)(22)],xs:[(0,i.h)(24),(0,i.h)(18)],s1:[(0,i.h)(32),(0,i.h)(26)],s2:[(0,i.h)(28),(0,i.h)(24)],s3:[(0,i.h)(24),(0,i.h)(24)],s4:[(0,i.h)(22),(0,i.h)(18)],s5:[(0,i.h)(18),(0,i.h)(18)],p1:[(0,i.h)(28),(0,i.h)(28)],p2:[(0,i.h)(24),(0,i.h)(24)],p3:[(0,i.h)(24),(0,i.h)(22)],p4:[(0,i.h)(22),(0,i.h)(18)],c1:[(0,i.h)(24),(0,i.h)(22)],c2:[(0,i.h)(22),(0,i.h)(18)],n1:[(0,i.h)(18),(0,i.h)(18)],label1:[(0,i.h)(22),(0,i.h)(22)],label2:[(0,i.h)(18),(0,i.h)(18)],h1:[(0,i.h)(52),(0,i.h)(34)],h2:[(0,i.h)(42),(0,i.h)(32)],h3:[(0,i.h)(36),(0,i.h)(26)],h4:[(0,i.h)(32),(0,i.h)(26)],h5:[(0,i.h)(28),(0,i.h)(24)],h5New:[(0,i.h)(28),(0,i.h)(24)],h6:[(0,i.h)(24),(0,i.h)(22)],title1:[(0,i.h)(24),(0,i.h)(24)],title2:[(0,i.h)(24),(0,i.h)(24)],body2:[(0,i.h)(24),(0,i.h)(24)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.2,-.2],p2:[0,-.2],p3:[0,-.2],p4:[-.2,0],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.8,-.7],h4:[-.6,-.6],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3]},fontWeightBySize:{s1:l.semiBold,s2:l.semiBold,s3:l.semiBold,s4:l.semiBold,h1:l.bold,h2:l.bold,h3:l.bold,h4:l.bold,h5:l.bold,h5New:l.semiBold,h6:l.bold},fontWeight:l},[o.LEADGEN]:{fontSize:{base:[(0,i.h)(16),(0,i.h)(16)],lg:[(0,i.h)(18),(0,i.h)(16)],md:[(0,i.h)(18),(0,i.h)(16)],sm:[(0,i.h)(16),(0,i.h)(14)],xs:[(0,i.h)(14),(0,i.h)(12)],s1:[(0,i.h)(22),(0,i.h)(18)],s2:[(0,i.h)(18),(0,i.h)(16)],s3:[(0,i.h)(16),(0,i.h)(14)],s4:[(0,i.h)(14),(0,i.h)(12)],s5:[(0,i.h)(12),(0,i.h)(12)],p1:[(0,i.h)(17),(0,i.h)(17)],p2:[(0,i.h)(15),(0,i.h)(15)],p3:[(0,i.h)(13),(0,i.h)(13)],p4:[(0,i.h)(14),(0,i.h)(12)],p5:[(0,i.h)(12),(0,i.h)(12)],c1:[(0,i.h)(12),(0,i.h)(12)],c2:[(0,i.h)(11),(0,i.h)(11)],n1:[(0,i.h)(12),(0,i.h)(12)],label1:[(0,i.h)(14),(0,i.h)(14)],label2:[(0,i.h)(12),(0,i.h)(12)],h1:[(0,i.h)(40),(0,i.h)(26)],h2:[(0,i.h)(32),(0,i.h)(24)],h3:[(0,i.h)(26),(0,i.h)(22)],h4:[(0,i.h)(22),(0,i.h)(20)],h5:[(0,i.h)(18),(0,i.h)(16)],h5New:[(0,i.h)(20),(0,i.h)(18)],h6:[(0,i.h)(16),(0,i.h)(14)],title1:[(0,i.h)(17),(0,i.h)(17)],title2:[(0,i.h)(15),(0,i.h)(15)],body2:[(0,i.h)(15),(0,i.h)(15)],overline:[(0,i.h)(11),(0,i.h)(11)],subText:[(0,i.h)(10),(0,i.h)(10)]},lineHeight:{base:[(0,i.h)(24),(0,i.h)(24)],lg:[(0,i.h)(32),(0,i.h)(28)],md:[(0,i.h)(32),(0,i.h)(28)],sm:[(0,i.h)(24),(0,i.h)(22)],xs:[(0,i.h)(24),(0,i.h)(18)],s1:[(0,i.h)(32),(0,i.h)(26)],s2:[(0,i.h)(28),(0,i.h)(24)],s3:[(0,i.h)(24),(0,i.h)(24)],s4:[(0,i.h)(22),(0,i.h)(18)],s5:[(0,i.h)(18),(0,i.h)(18)],p1:[(0,i.h)(28),(0,i.h)(28)],p2:[(0,i.h)(24),(0,i.h)(24)],p3:[(0,i.h)(20),(0,i.h)(20)],p4:[(0,i.h)(22),(0,i.h)(18)],c1:[(0,i.h)(16),(0,i.h)(16)],c2:[(0,i.h)(22),(0,i.h)(18)],n1:[(0,i.h)(18),(0,i.h)(18)],label1:[(0,i.h)(22),(0,i.h)(22)],label2:[(0,i.h)(18),(0,i.h)(18)],h1:[(0,i.h)(48),(0,i.h)(34)],h2:[(0,i.h)(40),(0,i.h)(32)],h3:[(0,i.h)(32),(0,i.h)(32)],h4:[(0,i.h)(32),(0,i.h)(28)],h5:[(0,i.h)(28),(0,i.h)(24)],h5New:[(0,i.h)(28),(0,i.h)(24)],h6:[(0,i.h)(24),(0,i.h)(22)],title1:[(0,i.h)(24),(0,i.h)(24)],title2:[(0,i.h)(24),(0,i.h)(24)],body2:[(0,i.h)(24),(0,i.h)(24)],overline:[(0,i.h)(12),(0,i.h)(12)],subText:[(0,i.h)(12),(0,i.h)(12)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.4,-.4],p2:[-.3,-.3],p3:[-.3,-.3],p4:[-.2,0],c1:[-.2,-.2],c2:[-.2,-.2],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.6,-.6],h4:[-.6,-.4],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],n1:[-.2,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3],overline:[-.2,-.2],subText:[-.2,-.2]},fontWeightBySize:{s1:l.semiBold,s2:l.semiBold,s3:l.semiBold,s4:l.semiBold,h1:l.bold,h2:l.bold,h3:l.bold,h4:l.bold,h5:l.bold,h5New:l.semiBold,h6:l.bold},fontWeight:l}},GlobalTextStyleNew=e=>({[o.LEADGEN]:{h1:{fontSize:(0,i.h)(40),lineHeight:(0,i.h)(48),letterSpacing:"-1.2px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(26),lineHeight:(0,i.h)(32),letterSpacing:"-0.6px"}},h2:{fontSize:(0,i.h)(32),lineHeight:(0,i.h)(40),letterSpacing:"-1px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(20),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"}},h3:{fontSize:(0,i.h)(26),lineHeight:(0,i.h)(32),letterSpacing:"-0.6px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(20),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"}},p1:{fontSize:(0,i.h)(17),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"},p2:{fontSize:(0,i.h)(15),lineHeight:(0,i.h)(24),letterSpacing:"-0.3px"}}}),d=(0,s.createContext)(o.NONE),TemplateProvider=({variant:e=o.NONE,children:t})=>s.createElement(d.Provider,{value:e},t),useTemplateVariant=()=>(0,s.useContext)(d)},l8Ca:function(e,t,a){a.d(t,{M:function(){return Modal}});var n=a("q1tI"),r=a("bmjk"),o=a("i8i4"),l=a("rBCA"),i=a("+J3I"),s=a("gEnE"),c=a("iBNF");let d=(0,s.Z)(l.Z.div`
position: relative;
z-index: 200;
background-color: ${c.r.colors.white};
border-radius: ${c.r.borderRadius};
box-shadow: 0px 8px 40px 0px #0000001a;
&[data-site-type='marryBaby'] {
border-radius: 16px;
.hhg-modal__content {
position: relative;
z-index: 111;
height: 100%;
padding: 24px;
}
}
.hhg-modal__content {
position: relative;
z-index: 111;
height: 100%;
padding: 16px;
}
.hhg-modal__video {
position: relative;
z-index: 111;
height: 100%;
background-color: none;
box-shadow: none;
}
`,"hhgcomp-modal-modal"),m=l.Z.div`
position: fixed;
top: 0;
left: 0;
z-index: 201;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
overflow-x: hidden;
overflow-y: auto;
outline: 0;
visibility: hidden;
opacity: 0;
background-color: rgba(0, 0, 0, 0.6);
transition: opacity 0.3s ease-in-out;
.hhg-modal__close {
position: absolute;
top: 16px;
right: 16px;
cursor: pointer;
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
&[data-type='video'] {
z-index: 1001;
}
&[data-open='true'] {
opacity: 1;
visibility: visible;
}
${d.classSelector} {
transition: transform 0.3s ease-in-out;
}
&.slideTop {
${d.classSelector} {
transform: translate(0, -100vh);
}
&[data-open='true'] {
${d.classSelector} {
transform: translate(0);
}
}
}
&.scaleUp {
${d.classSelector} {
transform: scale(0.9);
}
&[data-open='true'] {
${d.classSelector} {
transform: scale(1);
}
}
}
&[data-type='tail'] {
justify-content: flex-end;
${d.classSelector} {
width: 420px;
height: 100%;
border-radius: 0;
overflow: hidden auto;
}
}
&[data-type='form'] {
${d.classSelector} {
width: 496px;
height: 548px;
max-height: 100%;
overflow-y: auto;
${i.M.mbDown} {
width: 340px;
}
}
}
&[data-type='video'] {
${d.classSelector} {
height: 100%;
max-height: 539px;
${i.M.mbDown} {
height: 192px;
width: 100%;
height: 100%;
border-radius: ${c.r.borderRadius};
max-height: 192px;
}
}
}
&[data-type='confirm'] {
${d.classSelector} {
width: 100%;
max-width: 407px;
${i.M.mbDown} {
width: calc(100% - 32px);
max-width: calc(100% - 32px);
}
}
}
`,p=l.Z.div`
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
align-items: center;
&[data-open='false'] {
display: none;
}
&[data-type='video'] {
background-color: ${c.r.colors.secondaryDark};
}
`,u="hhg-modals",getModalsRoot=()=>{let e=document.getElementById(u);return e||((e=document.createElement("div")).setAttribute("id",u),document.body.append(e)),e},cleanUpModalShow=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&document.body.classList.remove("hhc-modal-show")},cleanUpDisabledScroll=()=>{let e=document.querySelectorAll('.hhg-modal[data-open="true"]');e.length<1&&(document.body.style.overflow="",document.body.style.paddingRight="",document.body.classList.remove("hhc-disabled-scroll"))},Modal=({type:e="lead",closeIcon:t,isOpen:a=!0,onClose:l,children:i,className:s="",animationType:c="scaleUp",isStaticBackdrop:u=!1,siteType:h})=>{let[g,f]=(0,n.useState)(!1),v=(0,n.useRef)(null),{width:C}=(0,r.u)();if(!v.current&&g&&(v.current=document.createElement("div")),(0,n.useEffect)(()=>(f(!0),()=>{f(!1),cleanUpModalShow(),cleanUpDisabledScroll()}),[]),(0,n.useEffect)(()=>{if(g){let e=getModalsRoot();return e.appendChild(v.current),()=>{e.removeChild(v.current)}}},[g]),(0,n.useEffect)(()=>{a?document.body.classList.add("hhc-modal-show"):cleanUpModalShow()},[a]),(0,n.useEffect)(()=>{a?(document.body.style.overflow="hidden",document.body.style.paddingRight=C+"px",document.body.classList.add("hhc-disabled-scroll")):cleanUpDisabledScroll()},[a,C]),!g)return null;let x=["hhg-modal__wrapper",s,c].filter(e=>e).join(" ");return(0,o.createPortal)(n.createElement(m,{className:x,"data-open":a,"data-type":e},!u&&n.createElement(p,{"data-open":a,onClick:l,"data-type":e}),!u&&"video"===e&&!!t&&n.createElement("div",{className:"hhg-modal__close",onClick:l},t),n.createElement(d,{className:"hhg-modal","data-open":a,"data-site-type":h},n.createElement("div",{className:"video"===e?"hhg-modal__video":"hhg-modal__content"},!!t&&"video"!==e&&n.createElement("div",{className:"hhg-modal__close",onClick:l},t),i))),v.current)}},dzuZ:function(e,t,a){a.d(t,{A:function(){return ArticleDetailCard},C:function(){return ClinicInfo},D:function(){return DoctorExpertise},E:function(){return l},H:function(){return HospitalInfo},M:function(){return Mobile},N:function(){return NavHeader},P:function(){return PopupCollectPhone},R:function(){return RequestConsultationForm},U:function(){return UserProfileNavigation},a:function(){return UserStats},b:function(){return CollectPhoneForm},c:function(){return i},d:function(){return RequestConsultationSuccess},e:function(){return s},f:function(){return eC},g:function(){return PopupRequestConsultation},h:function(){return ProductInsuranceInfo},i:function(){return Check},j:function(){return Clock},k:function(){return Comment},l:function(){return Credential},m:function(){return Education},n:function(){return Email},o:function(){return HelloZalo},p:function(){return Highlight},q:function(){return Ellipse},r:function(){return PhoneInactive}});var n,r,o,l,i,s,c=a("q1tI"),d=a("RVQf"),m=a("27Mu"),p=a("0aVn"),u=a("eosd"),h=a("iBNF"),g=a("cI3h"),f=a("jVHB"),v=a("cw2P"),C=a("Egxm"),x=a("rBCA"),b=a("+J3I"),y=a("mYVa"),E=a("iuhU"),w=a("SPK5"),k=a("Eso5"),P=a("GcSG"),N=a("xXM3"),M=a.n(N),S=a("LBVr"),L=a("EnpW"),I=a("5Pdi"),_=a("HJ8n"),B=a("XBaX"),$=a("Iblh"),z=a("2Sv4"),F=a("uNLz"),O=a("A9bs"),H=a("NQDR"),D=a("O8A1"),T=a("k1Nl"),j=a("BSZG"),Z=a("HalR"),R=a("xzoI"),A=a("3on8"),U=a("wnOA"),q=a("fkwy"),W=a("Fky9");let Check=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 81 80",fill:"none"},e),c.createElement("circle",{cx:39.5,cy:40,r:36,fill:"#00B16A"}),c.createElement("path",{d:"M25.6113 40.5543L34.5002 51.6654L53.3891 28.332",stroke:"white",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round"})),Clock=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 12 12",fill:"none"},e),c.createElement("path",{d:"M6 11.25C8.8995 11.25 11.25 8.8995 11.25 6C11.25 3.10051 8.8995 0.75 6 0.75C3.10051 0.75 0.75 3.10051 0.75 6C0.75 8.8995 3.10051 11.25 6 11.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6 3.25V6L8 7.75",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),Comment=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"none"},e),c.createElement("path",{d:"M20.0002 3.33203C29.1902 3.33203 36.6671 10.0621 36.6672 18.332C36.6672 18.8686 36.6342 19.4005 36.5725 19.9238C35.5792 29.1272 26.1203 35.6308 24.2336 36.8408L23.3333 37.417C21.8711 38.2196 21.7181 37.0263 21.6799 36.7295C21.6746 36.6884 21.6713 36.665 21.6672 36.666V33.2539C11.7339 34.1789 3.33325 27.097 3.33325 18.332C3.3334 10.0622 10.8104 3.33209 20.0002 3.33203ZM13.3333 16.666C12.4131 16.6663 11.6674 17.4118 11.6672 18.332C11.6672 19.2524 12.413 19.9988 13.3333 19.999C14.2537 19.999 15.0002 19.2525 15.0002 18.332C15.0001 17.4117 14.2536 16.666 13.3333 16.666ZM20.0002 16.666C19.0799 16.6661 18.3334 17.4117 18.3333 18.332C18.3333 19.2525 19.0798 19.999 20.0002 19.999C20.9207 19.999 21.6672 19.2525 21.6672 18.332C21.6671 17.4117 20.9206 16.666 20.0002 16.666ZM26.6672 16.666C25.7468 16.666 25.0004 17.4117 25.0002 18.332C25.0002 19.2525 25.7468 19.999 26.6672 19.999C27.5876 19.9989 28.3333 19.2524 28.3333 18.332C28.3331 17.4117 27.5875 16.6661 26.6672 16.666Z",fill:"#2D87F3"})),Credential=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),c.createElement("path",{d:"M10.7146 13.4812L11.5779 12.7568C11.7779 12.589 12.0312 12.4968 12.2923 12.4968H13.419C13.9579 12.4968 14.4201 12.1101 14.5135 11.579L14.709 10.469C14.7546 10.2112 14.889 9.97901 15.089 9.81124L15.9523 9.08679C16.3657 8.74012 16.4701 8.14679 16.2001 7.68012L15.6368 6.70346C15.5057 6.47679 15.459 6.21235 15.5046 5.95457L15.7001 4.84457C15.7935 4.31346 15.4923 3.79235 14.9857 3.6079L13.9268 3.22235C13.6812 3.13346 13.4757 2.96012 13.3446 2.73346L12.7812 1.75679C12.5112 1.29012 11.9457 1.08346 11.439 1.2679L10.3801 1.65346C10.1346 1.74235 9.86568 1.74235 9.62012 1.65346L8.56123 1.2679C8.05457 1.08346 7.48901 1.28901 7.21901 1.75679L6.65568 2.73346C6.52457 2.96012 6.31901 3.13235 6.07346 3.22235L5.01457 3.6079C4.5079 3.79235 4.20679 4.31346 4.30012 4.84457L4.49568 5.95457C4.54123 6.21235 4.49457 6.47679 4.36346 6.70346L3.80012 7.68012C3.53012 8.14679 3.63457 8.74012 4.0479 9.08679L4.91123 9.81124C5.11123 9.97901 5.24568 10.2123 5.29123 10.469L5.48679 11.579C5.58012 12.1101 6.04234 12.4968 6.58123 12.4968H7.7079C7.96901 12.4968 8.22234 12.589 8.42234 12.7568L9.28568 13.4812C9.69901 13.8279 10.3012 13.8279 10.7146 13.4812Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M13.6114 15.2778V19.1667L10.0003 16.3889L6.38916 19.1667V15.2778",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M10.0001 9.69347C11.2274 9.69347 12.2223 8.69855 12.2223 7.47125C12.2223 6.24395 11.2274 5.24902 10.0001 5.24902C8.77275 5.24902 7.77783 6.24395 7.77783 7.47125C7.77783 8.69855 8.77275 9.69347 10.0001 9.69347Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Education=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),c.createElement("g",{clipPath:"url(#clip0_2422_9990)"},c.createElement("path",{d:"M15.5 15.5003C14.678 15.5003 13.956 15.0983 13.5 14.4863V18.5003C13.5 18.7023 13.622 18.8853 13.809 18.9623C13.996 19.0413 14.21 18.9973 14.354 18.8543L15.5 17.7083L16.646 18.8543C16.742 18.9503 16.87 19.0003 17 19.0003C17.064 19.0003 17.13 18.9883 17.191 18.9623C17.378 18.8853 17.5 18.7023 17.5 18.5003V14.4863C17.044 15.0983 16.322 15.5003 15.5 15.5003Z",fill:"currentColor"}),c.createElement("path",{d:"M11.75 17.25H5.25C4.145 17.25 3.25 16.355 3.25 15.25V4.75C3.25 3.645 4.145 2.75 5.25 2.75H13.75C14.855 2.75 15.75 3.645 15.75 4.75V8",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.25 6.75H12.75",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.25 10H9.25",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.25 13.2505H9.25",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M15.5 15.5C16.8807 15.5 18 14.3807 18 13C18 11.6193 16.8807 10.5 15.5 10.5C14.1193 10.5 13 11.6193 13 13C13 14.3807 14.1193 15.5 15.5 15.5Z",stroke:"currentColor",strokeWidth:1.125,strokeLinecap:"round",strokeLinejoin:"round"})),c.createElement("defs",null,c.createElement("clipPath",{id:"clip0_2422_9990"},c.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(1 1)"})))),Email=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none"},e),c.createElement("path",{d:"M2 4.66668C2 4.31305 2.14048 3.97392 2.39052 3.72387C2.64057 3.47382 2.97971 3.33334 3.33333 3.33334H12.6667C13.0203 3.33334 13.3594 3.47382 13.6095 3.72387C13.8595 3.97392 14 4.31305 14 4.66668V11.3333C14 11.687 13.8595 12.0261 13.6095 12.2762C13.3594 12.5262 13.0203 12.6667 12.6667 12.6667H3.33333C2.97971 12.6667 2.64057 12.5262 2.39052 12.2762C2.14048 12.0261 2 11.687 2 11.3333V4.66668Z",stroke:"#111111",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2 4.66666L8 8.66666L14 4.66666",stroke:"#111111",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),HelloZalo=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 85 49",fill:"none"},e),c.createElement("g",{clipPath:"url(#clip0_4296_167461)"},c.createElement("rect",{x:.446777,y:6.57019,width:42,height:42,rx:12,transform:"rotate(-9 0.446777 6.57019)",fill:"url(#paint0_linear_4296_167461)"})),c.createElement("g",{filter:"url(#filter0_d_4296_167461)"},c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.0704 15.8758C22.0399 15.6835 21.9937 15.478 21.949 15.2821C21.8766 14.911 21.6943 14.5612 21.4056 14.242C20.7176 13.4843 19.8778 13.1977 18.9096 13.394C18.3946 13.5068 18.0388 13.811 17.8488 14.2998C17.6892 14.7096 17.7052 15.1677 17.8916 15.5559C18.0774 15.9402 18.4069 16.2218 18.8154 16.3484C19.03 16.4217 19.1016 16.5041 19.1099 16.6921L19.1108 16.6978L20.8289 27.5452C20.8334 27.5738 20.8363 27.6046 20.8395 27.6372C20.8469 27.7083 20.8568 27.7828 20.8777 27.8537C20.9096 27.9931 20.875 28.0708 20.7489 28.1493C20.1621 28.5233 19.9468 29.0863 20.112 29.8214C20.2773 30.5818 20.9404 31.0467 21.7218 30.9522C21.7563 30.9487 21.7906 30.9433 21.8249 30.9378C23.2472 30.7126 24.1124 29.3478 24.0029 28.2253C23.9862 28.021 23.9665 27.8231 23.9343 27.6194L23.0054 21.7549C22.9023 21.1037 22.801 20.4522 22.6998 19.8007C22.4943 18.5158 22.2877 17.1862 22.0704 15.8758Z",fill:"url(#paint1_radial_4296_167461)"}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.1017 28.7679C16.8433 28.7015 16.7458 28.5783 16.7271 28.3002L14.9771 17.251C14.9662 17.1083 15.0045 17.03 15.1188 16.963C15.1867 16.923 15.258 16.8805 15.3117 16.8251C15.8063 16.374 15.9509 15.6484 15.6692 15.0158C15.3717 14.3817 14.7876 14.0585 14.1038 14.1531C14.0867 14.1558 14.0696 14.1586 14.0524 14.1613C13.2432 14.2894 12.6134 14.7249 12.1809 15.4571C11.8782 15.9734 11.7746 16.5637 11.8774 17.213L12.8469 23.3345C13.0116 24.3741 13.1798 25.4113 13.3473 26.4446C13.5146 27.4759 13.6813 28.5035 13.8444 29.5336C13.9855 30.4247 14.6791 31.4391 15.9127 31.6985C16.2352 31.7626 16.5295 31.7726 16.8018 31.7294C16.9598 31.7044 17.1091 31.6612 17.2535 31.5993C17.8075 31.3633 18.1509 30.7955 18.1257 30.1554C18.1011 29.5074 17.681 28.9377 17.1017 28.7679Z",fill:"url(#paint2_radial_4296_167461)"}),c.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.5518 28.5261L33.4621 28.3666L33.2972 28.4103C33.1886 28.4392 32.6966 28.5366 32.2214 28.6295C31.1557 28.8392 31.0258 28.8695 30.9791 28.8945L30.8763 28.9479L30.8966 29.0637C31.1931 30.7266 30.2735 31.9692 29.3939 32.5281C29.032 32.7572 28.6159 32.9519 28.1252 33.1194C26.8906 33.5199 25.613 33.7222 24.3304 33.7205C23.7168 33.7161 23.1571 33.633 22.6675 33.4744C21.9917 33.2496 21.4545 32.8155 21.0733 32.183C20.9885 32.0422 20.9077 31.8891 20.8296 31.7415C20.7378 31.5686 20.6533 31.4044 20.5743 31.2881C20.2226 30.7309 19.5433 30.5086 18.9603 30.7591C18.3548 31.015 18.0228 31.6297 18.1511 32.2555C18.2243 32.6186 18.3468 32.9486 18.5761 33.3983C18.8115 33.849 19.142 34.2846 19.5269 34.6569C20.2278 35.3481 21.0901 35.8264 22.1587 36.1158C23.1874 36.3998 24.2868 36.4892 25.5177 36.386C25.9642 36.3464 26.3817 36.2959 26.7778 36.2332C27.6213 36.0996 28.3625 35.912 29.0561 35.6577C30.085 35.2898 30.9185 34.8338 31.6054 34.2663C32.9455 33.1523 34.1597 31.7732 33.5518 28.5261Z",fill:"url(#paint3_radial_4296_167461)"}),c.createElement("path",{d:"M30.3378 16.8439C26.9562 17.3795 24.6466 20.6048 25.1898 24.034C25.7329 27.4632 28.9261 29.8169 32.3077 29.2813C35.6893 28.7457 37.9989 25.5205 37.4557 22.0913C36.9126 18.662 33.7194 16.3083 30.3378 16.8439ZM34.6453 22.5364C34.9397 24.3947 33.6885 26.1446 31.8568 26.4347C30.0251 26.7248 28.2948 25.4491 28.0002 23.5889C27.7058 21.7305 28.957 19.9806 30.7887 19.6905C32.6204 19.4004 34.3507 20.6761 34.6453 22.5364Z",fill:"url(#paint4_radial_4296_167461)"}),c.createElement("path",{d:"M32.7364 23.0984C32.7097 22.328 32.0636 21.7251 31.2933 21.7517C30.5229 21.7784 29.92 22.4245 29.9466 23.1948C29.9733 23.9652 30.6194 24.5681 31.3898 24.5415C32.1601 24.5148 32.763 23.8687 32.7364 23.0984Z",fill:"url(#paint5_radial_4296_167461)"})),c.createElement("path",{d:"M68.2974 17.9266C68.8728 18.0177 69.4481 18.1088 70.0248 18.2002C69.4816 21.569 68.9476 24.9406 68.4232 28.3123C67.8724 28.144 66.8779 28.3563 66.7847 27.573C67.2588 24.3542 67.8003 21.1432 68.2974 17.9266Z",fill:"#0068FF"}),c.createElement("path",{d:"M50.6775 15.2582C53.3548 15.6795 56.0318 16.0856 58.7044 16.5282C58.6025 17.0496 58.4825 17.6162 58.064 17.9844C55.874 19.9719 53.7183 21.9951 51.5296 23.9828C53.471 24.3027 55.4156 24.6024 57.3589 24.9102C57.2507 25.3591 57.3264 25.9141 56.9689 26.2617C56.7434 26.4872 56.4118 26.4113 56.1337 26.37C53.7044 25.9715 51.2689 25.6119 48.8428 25.2015C48.9308 24.6889 49.0263 24.1211 49.4505 23.769C51.6175 21.7875 53.8035 19.8254 55.9633 17.8373C54.1135 17.547 52.265 17.2391 50.4124 16.9663C50.4904 16.3958 50.5847 15.8264 50.6775 15.2582Z",fill:"#0068FF"}),c.createElement("path",{d:"M73.9347 21.2294C75.9287 21.104 77.8179 22.6996 78.0446 24.6794C78.3933 26.757 76.8148 28.9114 74.7254 29.1964C72.937 29.5249 71.0326 28.4246 70.4014 26.7243C69.8948 25.4618 70.0924 23.9451 70.9067 22.8574C71.6036 21.8941 72.7509 21.2908 73.9347 21.2294ZM73.6319 22.9329C72.3914 23.1613 71.532 24.4907 71.8077 25.718C72.0144 26.8698 73.1867 27.7401 74.3502 27.5807C75.6656 27.4784 76.6666 26.115 76.4099 24.8275C76.2252 23.5636 74.8801 22.6385 73.6319 22.9329Z",fill:"#0068FF"}),c.createElement("path",{d:"M59.4453 20.3739C60.5538 19.3727 62.2662 19.0638 63.6311 19.6992C64.0843 19.8934 64.4747 20.1972 64.8481 20.5134C64.864 20.3867 64.8943 20.1344 64.9103 20.0077C65.4512 20.0906 65.9901 20.1774 66.531 20.2603C66.129 22.7812 65.727 25.3021 65.3341 27.8258C64.9388 27.7522 64.5277 27.7352 64.1502 27.5929C63.8943 27.4383 63.8571 27.1258 63.7872 26.8646C62.1123 27.7871 59.811 27.1531 58.7952 25.546C57.6906 23.9701 57.991 21.6311 59.4453 20.3739ZM61.5751 21.0577C60.264 21.2982 59.4084 22.8028 59.8547 24.0558C60.2132 25.2647 61.6485 25.9759 62.8263 25.5273C63.9114 25.1603 64.5807 23.9286 64.3155 22.817C64.0781 21.6164 62.7719 20.7578 61.5751 21.0577Z",fill:"#0068FF"}),c.createElement("path",{d:"M50.7263 1.42608C52.1821 1.42705 53.6267 1.65448 55.0566 1.91395L54.9152 2.00841C52.8428 2.94085 51.0183 4.38272 49.5862 6.14245C46.7159 9.66507 45.1671 14.1229 44.6491 18.5996C44.2607 22.25 44.553 26.0288 45.8972 29.4683C46.1165 30.0804 46.5513 30.6594 46.451 31.3446C46.2763 32.821 45.3317 34.0887 44.1839 34.982C44.2377 35.0593 44.2901 35.1363 44.3438 35.2136C45.1036 36.3622 45.9347 37.4603 46.7113 38.5979C47.8003 40.3074 49.1014 41.8745 50.1593 43.6066C47.9922 43.2963 45.7889 43.0505 43.7164 42.3084C41.1101 41.3608 39.0181 39.1185 38.2728 36.4462C37.8103 34.8964 37.8588 33.253 38.0552 31.666C39.2081 24.378 40.3622 17.0916 41.5176 9.80546C41.9328 7.37463 42.9815 4.92865 44.9816 3.39361C46.5812 2.07834 48.6606 1.3876 50.7263 1.42608Z",fill:"#0068FF"}),c.createElement("path",{d:"M54.9152 2.00841C55.2292 1.97016 55.5473 1.99304 55.8599 2.03293C61.2199 2.9025 66.5867 3.72914 71.9484 4.58798C73.3793 4.83248 74.8363 4.96427 76.2247 5.40825C78.171 5.87049 79.9352 7.00503 81.1923 8.55554C82.7539 10.6052 83.3345 13.2927 82.9654 15.823C81.8407 22.9326 80.7098 30.0466 79.591 37.1544C79.5656 37.193 79.5158 37.2731 79.4902 37.313C77.2405 39.1481 74.4417 40.1882 71.6072 40.6988C67.792 41.3594 63.8519 41.1423 60.093 40.25C56.34 39.3201 52.6631 37.719 49.7694 35.1051C48.0036 35.5774 46.1268 35.6486 44.3438 35.2136C44.2901 35.1363 44.2377 35.0593 44.1839 34.982C45.3317 34.0887 46.2763 32.821 46.451 31.3446C46.5513 30.6594 46.1165 30.0804 45.8972 29.4683C44.553 26.0288 44.2607 22.25 44.6491 18.5996C45.1671 14.1229 46.7159 9.66507 49.5862 6.14245C51.0183 4.38272 52.8428 2.94085 54.9152 2.00841ZM68.2974 17.9266C67.8003 21.1432 67.2588 24.3542 66.7847 27.573C66.8779 28.3563 67.8724 28.144 68.4232 28.3123C68.9476 24.9406 69.4816 21.569 70.0248 18.2002C69.4481 18.1088 68.8728 18.0177 68.2974 17.9266ZM50.6775 15.2582C50.5847 15.8264 50.4904 16.3958 50.4124 16.9663C52.265 17.2391 54.1135 17.547 55.9633 17.8373C53.8035 19.8254 51.6175 21.7875 49.4505 23.769C49.0263 24.1211 48.9308 24.6889 48.8428 25.2015C51.2689 25.6119 53.7044 25.9715 56.1337 26.37C56.4118 26.4113 56.7434 26.4872 56.9689 26.2617C57.3264 25.9141 57.2507 25.3591 57.3589 24.9102C55.4156 24.6024 53.471 24.3027 51.5296 23.9828C53.7183 21.9951 55.874 19.9719 58.064 17.9844C58.4825 17.6162 58.6025 17.0496 58.7044 16.5282C56.0318 16.0856 53.3548 15.6795 50.6775 15.2582ZM73.9347 21.2294C72.7509 21.2908 71.6036 21.8941 70.9067 22.8574C70.0924 23.9451 69.8948 25.4618 70.4014 26.7243C71.0326 28.4246 72.937 29.5249 74.7254 29.1964C76.8148 28.9114 78.3933 26.757 78.0446 24.6794C77.8179 22.6996 75.9287 21.104 73.9347 21.2294ZM59.4453 20.3739C57.991 21.6311 57.6906 23.9701 58.7952 25.546C59.811 27.1531 62.1123 27.7871 63.7872 26.8646C63.8571 27.1258 63.8943 27.4383 64.1502 27.5929C64.5277 27.7352 64.9388 27.7522 65.3341 27.8258C65.727 25.3021 66.129 22.7812 66.531 20.2603C65.9901 20.1774 65.4512 20.0906 64.9103 20.0077C64.8943 20.1344 64.864 20.3867 64.8481 20.5134C64.4747 20.1972 64.0843 19.8934 63.6311 19.6992C62.2662 19.0638 60.5538 19.3727 59.4453 20.3739Z",fill:"white"}),c.createElement("path",{d:"M61.5753 21.0583C62.7721 20.7584 64.0782 21.6169 64.3156 22.8176C64.5809 23.9292 63.9115 25.1608 62.8264 25.5278C61.6487 25.9765 60.2133 25.2652 59.8549 24.0564C59.4085 22.8034 60.2641 21.2988 61.5753 21.0583Z",fill:"white"}),c.createElement("path",{d:"M73.6318 22.9336C74.88 22.6391 76.2251 23.5643 76.4099 24.8281C76.6665 26.1157 75.6656 27.479 74.3502 27.5814C73.1866 27.7408 72.0143 26.8705 71.8077 25.7187C71.5319 24.4913 72.3914 23.1619 73.6318 22.9336Z",fill:"white"}),c.createElement("path",{d:"M79.4899 37.3134L79.6141 37.2149C79.3371 39.3198 78.764 41.4713 77.4398 43.1739C75.8969 45.1731 73.4695 46.4549 70.9462 46.5887C69.5321 46.6548 68.1179 46.4954 66.7259 46.2571C62.4354 45.5789 58.1453 44.898 53.8548 44.2199C52.6242 44.0043 51.3785 43.8661 50.1589 43.607C49.1011 41.8749 47.7999 40.3078 46.711 38.5984C45.9343 37.4608 45.1033 36.3627 44.3435 35.214C46.1264 35.649 48.0033 35.5778 49.769 35.1055C52.6628 37.7194 56.3397 39.3205 60.0926 40.2504C63.8515 41.1427 67.7916 41.3598 71.6068 40.6993C74.4413 40.1886 77.2402 39.1485 79.4899 37.3134Z",fill:"#005BE0"}),c.createElement("defs",null,c.createElement("filter",{id:"filter0_d_4296_167461",x:7.83887,y:13.3341,width:33.696,height:31.0933,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),c.createElement("feOffset",{dy:4}),c.createElement("feGaussianBlur",{stdDeviation:2}),c.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),c.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"}),c.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_4296_167461"}),c.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_4296_167461",result:"shape"})),c.createElement("linearGradient",{id:"paint0_linear_4296_167461",x1:21.4468,y1:6.57019,x2:21.4468,y2:48.5702,gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#68B8FE"}),c.createElement("stop",{offset:1,stopColor:"#2C89F3"})),c.createElement("radialGradient",{id:"paint1_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(20.9589 22.0707) rotate(81) scale(8.89343 2.07462)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint2_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(14.9033 23.0283) rotate(81) scale(8.89098 2.07896)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint3_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(26.2523 32.9125) rotate(81) scale(3.36206 7.90006)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint4_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(31.3227 23.0626) rotate(81) scale(6.29618 6.20942)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("radialGradient",{id:"paint5_radial_4296_167461",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(31.3415 23.1466) rotate(-1.98088) scale(1.39571 1.39571)"},c.createElement("stop",{offset:.25,stopColor:"white"}),c.createElement("stop",{offset:1,stopColor:"#C5E1FB"})),c.createElement("clipPath",{id:"clip0_4296_167461"},c.createElement("rect",{x:.446777,y:6.57019,width:42,height:42,rx:10.5,transform:"rotate(-9 0.446777 6.57019)",fill:"white"})))),Highlight=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none"},e),c.createElement("path",{d:"M7.76093 1.94434L11.8267 4.92811L16.5893 3.27134L15.0077 8.05978L18.0553 12.0772L13.0127 12.0526L10.1339 16.1928L8.59882 11.3896L3.77148 9.93078L7.86504 6.98645L7.76093 1.94434Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M2.22217 17.7777L5.5555 14.4443",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M1.94434 13.6112L2.49989 13.0557",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M6.38867 18.0556L6.94423 17.5",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),Ellipse=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 4 4",fill:"none"},e),c.createElement("circle",{cx:2,cy:2,r:2,fill:"#BFBFBF"})),Mobile=e=>c.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 17 16",fill:"none"},e),c.createElement("path",{d:"M11.3889 1.55566H5.61115C4.62931 1.55566 3.83337 2.3516 3.83337 3.33344V12.6668C3.83337 13.6486 4.62931 14.4446 5.61115 14.4446H11.3889C12.3708 14.4446 13.1667 13.6486 13.1667 12.6668V3.33344C13.1667 2.3516 12.3708 1.55566 11.3889 1.55566Z",stroke:"currentColor",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M7.38892 1.55566V2.44455H9.61114V1.55566",stroke:"currentColor",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),c.createElement("path",{d:"M8.49997 12.4448C8.99089 12.4448 9.38886 12.0468 9.38886 11.5559C9.38886 11.065 8.99089 10.667 8.49997 10.667C8.00905 10.667 7.61108 11.065 7.61108 11.5559C7.61108 12.0468 8.00905 12.4448 8.49997 12.4448Z",fill:"currentColor"})),PhoneInactive=e=>c.createElement("svg",Object.assign({className:"callTrigger",width:"1em",height:"1em",viewBox:"0 0 18 18",fill:"none"},e),c.createElement("path",{d:"M14.4198 11.4486L12.526 11.2306C12.0676 11.178 11.6167 11.3358 11.2935 11.659L9.9032 13.0493C8.8368 12.5082 7.8696 11.8025 7.03391 10.9661C6.19747 10.1304 5.4918 9.1632 4.95071 8.0968L6.34101 6.70649C6.66416 6.38334 6.82198 5.93243 6.76938 5.47401L6.55144 3.58018C6.46125 2.82115 5.82247 2.25 5.05592 2.25H3.75579C2.90658 2.25 2.20015 2.95643 2.25276 3.80564C2.45191 7.01386 3.83395 9.89894 5.96751 12.0325C8.10106 14.166 10.9861 15.5481 14.1944 15.7472C15.0436 15.7998 15.75 15.0934 15.75 14.2442V12.9441C15.75 12.1775 15.1788 11.5387 14.4198 11.4486Z",fill:"#8C8C8C"})),V={myBooking:"booking",mySaved:"saved",myHealth:"health",myFamily:"family",myCommunity:"my-communities",eCom:"/shop/ho-so/quan-li-don-hang/"};function NavHeader({userInfo:e,onClickMyProfileButton:t,themeName:a="helloSites"}){let{t:n}=(0,d.u)(),r=(0,c.useMemo)(()=>{let t=(null==e?void 0:e.name)||(null==e?void 0:e.username);return t&&t.length?t[0].toUpperCase():"A"},[null==e?void 0:e.username,null==e?void 0:e.name]);return c.createElement("div",{className:"uJQBNNg",onClick:()=>{t&&t()}},c.createElement(g.A,{className:"TfG3dM5",type:"rounded",size:"xl",avatarUrl:null==e?void 0:e.avatar,firstLetter:r,backgroundColor:"marryBaby"===a?h.r.mbColors.pink:h.r.colors.secondaryBase}),c.createElement("div",{className:"aMtjFNf"},c.createElement("div",{className:"cSz2RR-"},(null==e?void 0:e.name)||(null==e?void 0:e.username)),c.createElement("div",{className:"GyFm00F",style:{"--bg-hellosites":`url(${p.C.getAssetPath("userProfileNav/helloSites/icon-chevronRight.svg")})`,"--bg-marrybaby":`url(${p.C.getAssetPath("userProfileNav/marryBaby/icon-arrowRight.svg")})`}},n("userProfile.nav.header.viewProfile"))))}let G={myHealth:h.r.mbColors.toneYellow,myCommunity:h.r.mbColors.toneBlue,mySaved:h.r.mbColors.toneGreen},Y={helloSites:{myBooking:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-myBooking.svg"),myCommunity:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-myCommunity.svg"),myFamily:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-myFamily.svg"),myHealth:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-myHealth.svg"),mySaved:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-mySaved.svg"),eCom:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-eCom.svg")},marryBaby:{mySaved:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-mySaved.svg"),myCommunity:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-myCommunity.svg"),myHealth:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-myHealth.svg")}},NavigationCard=({type:e,themeName:t,className:a,onClick:n=()=>void 0})=>{let{t:r}=(0,d.u)(),o=(0,c.useMemo)(()=>{var a,n;return(null===(n=null===(a=Y[t])||void 0===a?void 0:a[e])||void 0===n?void 0:n.call(a))||""},[e,t]),l=(0,c.useMemo)(()=>"marryBaby"!==t?"transparent":G[e],[e,t]);return c.createElement("div",{onClick:function(){n(e)},className:`fVk18fq ${a}`},c.createElement("div",{className:"mx7T4V3",style:{backgroundColor:l,backgroundImage:`url("${o}")`}}),c.createElement("h3",{className:"v8TCvUb"},r(`userProfile.nav.card.${e}`)))},navMenuItemsHelloSites=()=>[{key:"userProfile.nav.menu.accountSettings",icon:p.C.getAssetPath("userProfileNav/helloSites/icon-settingsWheel.svg"),subMenu:[{key:"userProfile.nav.menu.password",link:"password"},{key:"userProfile.nav.menu.disableAccount",link:"disable-account",disableLocale:["hi-IN"]},{key:"userProfile.nav.menu.dataPrivacy",link:"data-privacy",disableLocale:["vi-VN","ms-MY","km-KH","en-PH","th-TH","my-MM","zh-TW","hi-IN","tl-PH"]}]},{key:"userProfile.nav.menu.help",icon:p.C.getAssetPath("userProfileNav/helloSites/icon-helpCircle.svg"),link:"help"}],navMenuItemsMarryBaby=()=>[{key:"userProfile.nav.menu.password",icon:p.C.getAssetPath("userProfileNav/marryBaby/icon-lock.svg"),link:"password"},{key:"userProfile.nav.menu.logout",icon:p.C.getAssetPath("userProfileNav/marryBaby/icon-logOut.svg"),link:"logout"}];var K={navMenu:"gn6HmGG",navMenuItem:"FCx8FEM",navMenuItemContent:"zMiRxaE",navMenuItemIcon:"lZ2Z9MQ",navMenuItemDropdown:"rwm-agG",navFooterSubMenu:"qMOscoq"};let NavMenu=({themeName:e,locale:t,onClickItem:a})=>{let[n,r]=(0,c.useState)(""),o=(0,c.useMemo)(()=>"marryBaby"===e?navMenuItemsMarryBaby():navMenuItemsHelloSites(),[e]);function handleParentItemClick(e){e.subMenu?r(t=>t?"":e.key):a&&a(e)}return c.createElement("div",{className:K.navMenu},o.map(e=>c.createElement(NavMenuItem,{key:e.key,item:e,openKey:n,onClickItem:handleParentItemClick,locale:t})))},NavMenuItem=({item:e,openKey:t,onClickItem:a,locale:n})=>{var r;let{t:o}=(0,d.u)();return(null===(r=e.disableLocale)||void 0===r?void 0:r.includes(n))?null:c.createElement("div",{className:`${K.navMenuItem} nav-menu-item`,"data-is-open":t===e.key,key:e.key,"data-has-submenu":!!e.subMenu},c.createElement("div",{className:K.navMenuItemContent,onClick:()=>a(e)},e.icon&&c.createElement("div",{className:K.navMenuItemIcon,style:{backgroundImage:`url("${e.icon}")`}}),o(e.key),e.subMenu&&c.createElement("div",{className:K.navMenuItemDropdown,style:{"--after-bg":`url(${p.C.getAssetPath("userProfileNav/helloSites/icon-chevronDown.svg")})`}})),e.subMenu&&c.createElement("div",{className:K.navFooterSubMenu},e.subMenu.map(e=>c.createElement(NavMenuItem,{key:e.key,item:e,openKey:t,onClickItem:a,locale:n}))))};var X={userStats:"_4y-O0w3",wrapper:"kO8iNgD",header:"a1d4E10",headerIcon:"Tdguxxf",headerTitle:"-mOxsaU",headerPoints:"yPeDBNZ"};let Q={helloSites:{member:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-rank-member.svg"),ambassador:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-rank-ambassador.svg"),doctor:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-rank-doctor.svg"),expert:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-rank-expert.svg"),influencer:()=>p.C.getAssetPath("userProfileNav/helloSites/icon-rank-influencer.svg")},marryBaby:{member:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-rank-member.svg"),ambassador:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-rank-ambassador.svg"),doctor:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-rank-doctor.svg"),expert:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-rank-expert.svg"),influencer:()=>p.C.getAssetPath("userProfileNav/marryBaby/icon-rank-influencer.svg")}},UserStats=({themeName:e,rank:t="member",numberOfPosts:a=0})=>{let{t:n}=(0,d.u)(),r=(0,c.useMemo)(()=>{var a,n;return(null===(n=null===(a=Q[e])||void 0===a?void 0:a[t])||void 0===n?void 0:n.call(a))||""},[t,e]);return c.createElement("div",{className:X.userStats,"data-user-rank":t},c.createElement("div",{className:X.wrapper},c.createElement("div",{className:X.header},c.createElement("div",{className:X.headerIcon,style:{backgroundImage:`url("${r}")`}}),c.createElement("h3",{className:X.headerTitle},n(`userProfile.userRank.${t}`)),a>0&&c.createElement("p",{className:X.headerPoints},a," ",n("userProfile.nav.header.count.posts")))))},UserProfileNavigation=({SSO_URL:e,UP_BASEPATH:t="user",themeName:a="helloSites",cardUrls:n=V,enableCare:r,enableTogether:o,enableEcom:l,enableMySaved:i,userInfo:s,togetherApiDomain:h,userPostsNumber:g,onClickNavigationCard:C,onClickMyProfileButton:x,onClickMenuItem:b,onClickLogout:y,isUserProfileNavigatorMenuHidden:E=!1,isMyHealthEnabled:w=!1,locale:k})=>{let{t:P}=(0,d.u)(),[N,M]=(0,c.useState)(g||0),S="marryBaby"===a;(0,c.useEffect)(()=>{if(s&&void 0===g){let e=(0,m.ej)("hhg_user_token");e&&fetch((0,u.n)((0,f.g)(k,S,h)),{headers:{Authorization:`Bearer ${e}`}}).then(e=>e.json()).then(e=>{var t,a,n;(null==e?void 0:e.status)===1&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pagination)&&M((null===(n=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.pagination)||void 0===n?void 0:n.total_items)||0)}).catch(e=>console.error("Error fetching post number",e))}},[k,null!==s,g,h,S]);let L=(0,c.useMemo)(()=>(S?["myHealth","myCommunity","mySaved"]:["myHealth","mySaved","myBooking","myCommunity","eCom"]).filter(e=>"myBooking"===e?r:"myCommunity"===e?o:"myHealth"===e?w:"eCom"===e?l:"mySaved"!==e||i),[S,w]),I=(0,c.useMemo)(()=>"marryBaby"===a?null:c.createElement(v.B,{color:"tertiary",icon:c.createElement("img",{src:p.C.getAssetPath("userProfileNav/helloSites/icon-logOut.svg"),width:15,height:15,loading:"lazy"}),size:"md",onClick:y,className:"XIyViFs"},P("userProfile.nav.menu.logout")),[a]),push=a=>{a.startsWith("http")||a.startsWith("/")?window.location.href=(0,u.e)(a):e&&(window.location.href=(0,u.e)(`${e}${t}/${a}`))},handleClickCardItem=e=>{let t=n[e];C?C(t):push(t)};return s?c.createElement("div",{className:"-AZt1au","data-theme":a},c.createElement(NavHeader,{userInfo:s,themeName:a,onClickMyProfileButton:()=>{x?x():push("profile")}}),c.createElement(UserStats,{themeName:a,rank:"member",numberOfPosts:N}),c.createElement("div",{className:"IvSIfCI"},L.map(e=>c.createElement(NavigationCard,{className:"eahCJov",key:e,themeName:a,type:e,onClick:handleClickCardItem}))),!E&&c.createElement(c.Fragment,null,c.createElement(NavMenu,{themeName:a,locale:k,onClickItem:e=>{"logout"===e.link&&y?y():e.link&&!e.subMenu&&(b?b(e.link):push(e.link))}}),I)):null},J=x.Z.div`
${b.M.mbUp} {
margin: 0;
}
color: ${h.r.colors.gray1000};
margin-bottom: 1rem;
.txt-body-1 {
font-size: 0.8125rem;
line-height: 1.25rem;
${b.M.mbUp} {
font-size: 0.9375rem;
line-height: 1.5rem;
color: ${h.r.colors.gray700};
}
}
.txt-body-2 {
font-size: 0.9375rem;
line-height: 1.5rem;
padding: 0.75rem 0 0;
font-weight: 500;
${b.M.mbUp} {
padding: 0;
font-weight: 600;
}
}
.txt-hours {
font-weight: 500;
color: ${h.r.colors.gray1000};
}
`,ee=x.Z.div`
${b.M.mbUp} {
padding: 8px 0;
gap: 4px;
}
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 0;
border-bottom: 1px solid ${h.r.colors.neutral100};
&:last-child {
border-bottom: 0;
}
`;function OpeningHours({workingTimes:e}){let{t}=(0,d.u)(),a=(0,c.useMemo)(()=>{let a=[],n="";return C.w.forEach(t=>{let r=e[t];if(r){let e=r.map(e=>`${e.start_at}-${e.end_at}`).join("|");n===e?a[a.length-1]=[...a[a.length-1],t]:a.push([t]),n=e}}),a.map(a=>{var n;if(!a.length)return null;let r=t(`workingDays.${a[0]}`);return a.length>1&&(r=`${r} - ${t(`workingDays.${a.at(-1)}`)}`),{day:r,value:null===(n=e[a[0]])||void 0===n?void 0:n.map(e=>`${e.start_at.slice(0,5)} - ${e.end_at.slice(0,5)}`).join(", ")}})},[e]);return c.createElement(J,null,c.createElement("div",{className:"txt-body-2"},t("detail.openHours")),c.createElement("div",{className:"opening-hours-container"},a.map((e,t)=>c.createElement(ee,{className:"txt-body-1",key:t},c.createElement("div",null,null==e?void 0:e.day),c.createElement("div",{className:"txt-hours"},null==e?void 0:e.value)))))}let getHospitalUrl=(e,t)=>{var a;return`/${null===(a=L.L[e])||void 0===a?void 0:a.HOSPITAL}/${t.slug}-${t.id}`},et=x.Z.div`
position: relative;
min-height: calc(var(--mapHeight) + var(--card-height));
&:not([data-has-card]) {
--mapCardHeight: calc(var(--mapHeight) + 32px);
height: var(--mapCardHeight);
}
strong {
font-weight: 700;
&::after {
content: ' ';
}
}
iframe {
max-width: 100%;
/* padding-top: calc(var(--mapHeight) / var(--mapWidth) * 100%); */
}
&[data-has-floating-card='true'] {
--card-height: 0;
.card {
position: absolute;
top: 10px;
left: 10px;
max-width: 329px;
}
}
.map {
width: 100%;
height: var(--mapHeight);
border-radius: 6px 6px 0px 0px;
@media (max-width: 768px) {
height: auto;
}
}
.infoList {
display: flex;
margin-top: 8px;
svg {
min-width: 24px;
margin-right: 8px;
}
}
a {
text-decoration: none;
}
.directions {
margin-top: 16px;
}
.directionsNo {
display: inline-block;
margin-top: 8px;
margin-bottom: 24px;
color: ${h.r.colors.primaryBase};
}
`,ea=x.Z.div`
padding: 16px;
border: 1px solid ${h.r.colors.neutral200}
background: ${h.r.colors.white}
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
border-top-left-radius: 0;
border-top-right-radius: 0;
max-width: 100%;
&:not([data-is-full-width]) {
@media (min-width: 768px) {
width: var(--mapWidth);
}
}
`,en=x.Z.div`
margin-top: 4px;
color: ${h.r.colors.gray600};
font-size: 14px;
line-height: 22px;
letter-spacing: -0.1px;
address {
display: inline;
}
.dots {
display: inline-flex;
margin: 0 0.5rem;
vertical-align: middle;
~ span {
color: ${h.r.colors.gray500};
}
}
`,er=x.Z.a`
display: flex;
align-items: center;
span {
color: ${h.r.colors.gray500};
}
svg {
margin: 0 8px;
}
`,eo=(0,x.Z)(v.B)`
margin-top: 12px;
width: max-content;
`,el=x.Z.div`
${b.M.mbUp} {
display: flex;
gap: ${(0,y.h)(24)};
padding: 0 ${(0,y.h)(24)} ${(0,y.h)(24)};
}
color: #111111;
padding: 0 ${(0,y.h)(16)} ${(0,y.h)(16)};
.name {
${b.M.mbUp} {
font-weight: 600;
}
font-size: 0.9375rem;
line-height: 1.5rem;
font-weight: 500;
}
address {
${b.M.mbUp} {
font-size: 0.9375rem;
line-height: 1.5rem;
font-style: normal;
}
font-size: 0.8125rem;
line-height: 1.25rem;
font-weight: 400;
}
.contact-item {
display: inline-flex;
align-items: center;
padding: 8px 12px;
gap: 8px;
border: ${h.r.colors.neutral100} 1px solid;
border-radius: 12px;
a {
text-decoration: none;
color: currentColor;
font-size: 0.8125rem;
line-height: 1.25rem;
font-weight: 500;
}
}
/* .map-card {
border: none;
} */
`,ei=(0,x.Z)(e=>{let{className:t,hospital:a,hasNoCard:n,isFullWidth:r,height:o=256,width:l=768,isUsingEmbedMap:i=!0,isCardFloating:s=!1,distance:m,isLoggedIn:p,locale:u,googleMapKey:f,onPhoneHospital:v,dataEventCategory:C,dataEventAction:x,dataEventLabel:b}=e,{latitude:y,longitude:E,address:w,name:k}=a,N=parseFloat(y),L=parseFloat(E),_={lng:L,lat:N},B=(0,c.useRef)(null),{t:$}=(0,d.u)(),z=c.useCallback(function(e){setTimeout(()=>{e.setZoom(14),e.setCenter(_)},100)},[]),F={"--mapHeight":o+"px","--mapWidth":l+"px","--card-height":n||s||!B.current?0:B.current.clientHeight+"px"};return c.createElement(et,{className:M()(t),style:F,"data-has-card":!n||void 0,"data-has-floating-card":s||void 0},c.createElement("div",{className:"map"},i?c.createElement("iframe",{width:l,height:o,style:{border:0},className:"aspect-ratio-map",loading:"lazy",allowFullScreen:!0,src:`https://www.google.com/maps/embed/v1/place?key=${f}&q=${a.latitude},${a.longitude}&zoom=14`}):c.createElement(P.LoadScript,{googleMapsApiKey:f||""},c.createElement(P.GoogleMap,{mapContainerClassName:"map",center:_,zoom:14,onLoad:z,options:{mapTypeControl:!1,fullscreenControl:!1}},c.createElement(P.Marker,{position:_}))),n?null:c.createElement(ea,{className:M()("map-card"),"data-is-full-width":r||void 0,ref:B},c.createElement(er,{href:`${S.b}${getHospitalUrl(u,a)}`},c.createElement(I.T,{size:"s2",type:"semiBold"},k)),c.createElement(en,null,c.createElement("address",null,w),void 0!==m&&c.createElement(c.Fragment,null,c.createElement(g.I,{iconSize:4,wrapperSize:16,svgIcon:{fill:h.r.colors.gray400},wrapperStyle:{transform:"translateY(-2px)"}},c.createElement(Ellipse,null)),c.createElement("span",null,m," km"))),a.phone&&c.createElement(eo,{size:"md",color:"tertiary",isBlock:!1,onClick:v,icon:c.createElement(PhoneInactive,null),dataEventCategory:C,dataEventAction:x,dataEventLabel:b},p||"ms-MY"===u?a.phone:$("doctorInfoComponent.loginToCall")))))})`
&.panel-map {
--mapCardHeight: --cardHeight;
}
iframe {
${b.M.mbUp} {
width: ${(0,y.h)(180)};
height: ${(0,y.h)(180)};
}
border-radius: 12px;
overflow: hidden;
}
`,es=(0,x.Z)(Mobile)`
width: 1rem;
height: 1rem;
`,ec=(0,x.Z)(Email)`
width: 1rem;
height: 1rem;
`,ed=x.Z.div`
${b.M.mbUp} {
padding: 0;
display: flex;
flex-direction: column;
gap: 24px;
}
.clinic-content {
display: flex;
flex-direction: column;
${b.M.mbUp} {
gap: 8px;
}
gap: 12px;
}
padding-top: 1rem;
padding-bottom: 1rem;
padding-left: 4.5px;
padding-right: 4.5px;
flex: 1;
& > * + * {
margin-top: 0.75rem;
}
`,em=x.Z.div`
display: flex;
flex-wrap: nowrap;
gap: 0.75rem;
`,ep=(0,x.Z)(g.D)`
border-radius: 0.75rem !important;
`,eu=x.Z.div`
display: flex;
gap: 4px;
flex-direction: column;
${b.M.mbUp} {
flex-direction: row;
}
.contact-item {
width: fit-content;
}
`;function ClinicInfo(e){let{hospitalInfo:t,distance:a,isLoggedIn:n,locale:r,googleMapKey:o,onPhoneHospital:l,dataEventCategory:i,dataEventAction:s,dataEventLabel:d}=e,m={latitude:t.latitude||"",longitude:t.longitude||"",address:t.address||"",name:t.name||"",phone:t.phone||"",email:t.email||""};return c.createElement(el,null,c.createElement(ei,{dataEventAction:s,dataEventCategory:i,dataEventLabel:d,googleMapKey:o,hasNoCard:!0,hospital:m,locale:r,isLoggedIn:n,isFullWidth:!0,height:220,className:"panel-map",onPhoneHospital:l}),c.createElement(ed,null,c.createElement("div",{className:"clinic-content"},c.createElement("div",{className:"name"},t.name),c.createElement(em,null,c.createElement("address",null,t.address),a&&c.createElement("div",{style:{flexShrink:0}},c.createElement(ep,{value:`${a} km`}))),c.createElement(eu,null,t.phone&&c.createElement("div",{className:"contact-item"},c.createElement(es,null),c.createElement("a",{href:`tel:${t.phone}`},(0,_.f)(t.phone))),t.email&&c.createElement("div",{className:"contact-item"},c.createElement(ec,null),c.createElement("a",{href:`mailto:${null==t?void 0:t.email}`},t.email)))),t.working_times&&c.createElement(OpeningHours,{workingTimes:t.working_times})))}let eh=x.Z.div`
.mantine-Input-input.custom_input {
/* font-size: 16px; */
}
.info {
display: flex;
flex-direction: column;
gap: 24px;
align-items: center;
padding: 24px 16px;
h5 {
font-weight: 600;
font-size: 1.25rem;
line-height: 1.75rem;
letter-spacing: -0.4px;
text-align: center;
}
.description {
color: ${h.r.colors.gray700};
text-align: center;
font-size: 0.8125rem;
font-weight: 400;
line-height: 1.25rem;
letter-spacing: -0.3px;
}
}
.mb-1 {
margin-bottom: 4px;
}
.w-full {
width: 100%;
}
.px-3 {
padding-left: 12px;
padding-right: 12px;
}
.action {
padding: 8px 16px;
&.actionBox {
border-top: 0.5px solid ${h.r.colors.neutral100};
}
}
`,eg=(0,x.Z)(T.B)`
&.mantine-Button-root {
border-radius: 12px;
border: 1px solid;
font-size: 15px;
&.tertiary {
border-color: ${h.r.colors.neutral200};
}
}
.mantine-Button-label {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
`;(0,x.Z)(z.D)``;let ef=(0,x.Z)(H.P)`
--custom-primary-text: #111111;
.PhoneInputCountry {
pointer-events: none;
--phone-select: 58px;
}
&.PhoneInput {
.PhoneInputCountry {
}
.PhoneInputCountryIconCallingCode {
color: var(--custom-primary-text);
}
.PhoneInputInput {
color: var(--custom-primary-text) !important ;
:focus {
color: var(--custom-primary-text) !important ;
}
}
}
`,ev=(0,x.Z)(H.I.Wrapper)`
--phone-input-space-x: -8px;
.mantine-Text-root[data-size='c1'] {
font-size: 0.75rem;
}
.mantine-Text-root[data-size='p3'] {
font-size: 0.8125rem;
}
.mantine-Text-root[data-size='p2'] {
font-size: 0.9375rem;
}
`,eC={ZALO:"Zalo",WHATS_APP:"Whatsapp"};function CollectPhoneForm({onSubmit:e,title:t,formType:a=eC.ZALO,isLoading:n,locale:r}){let{t:o}=(0,d.u)(),[l,i]=(0,c.useState)(""),[s,m]=(0,c.useState)(""),[p,u]=(0,c.useState)(!1),{classes:h}=(0,F.u)(),validatePhone=e=>{try{if(!e){m(o("collectPhoneNumber.phoneRequired"));return}let t=(0,O.parsePhoneNumber)(e,"VN");(null==t?void 0:t.isValid())?m(""):m(o("collectPhoneNumber.inputInvalid"))}catch(e){m(o("collectPhoneNumber.inputInvalid"))}},handleChange=e=>{validatePhone(e),i(e)};return c.createElement(eh,null,c.createElement("div",{className:"info"},a===eC.ZALO&&c.createElement(HelloZalo,{width:84,height:48})," ",c.createElement("h5",{className:"px-3"},t||o("collectPhoneNumber.title",{name:a})),c.createElement(F.T,{shrink:!!l,className:(0,E.default)("leadgen-form_input w-full",{"leadgen-form_field_error":!!(p&&s)})},c.createElement(F.T.Control,{htmlFor:"collection_phone_input"},({shrink:e})=>c.createElement(ev,{"data-invalid":!!(p&&s),labelElement:"div",label:c.createElement(Z.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},o("collectPhoneNumber.inputLabel")),inputWrapperOrder:["label","input","description","error"],error:p&&s&&c.createElement(w.k,{align:"center",gap:4},c.createElement(H.E,{size:12}),c.createElement(Z.T,{size:"c1",variant:"error"},s))},c.createElement(k.x,{className:"mantine-Input-wrapper",sx:e=>({".PhoneInput .PhoneInputInput":Object.assign(Object.assign({},(0,D.G)(e)[D.C.LEADGEN].p2),{fontWeight:D.F.halfBold})})},c.createElement(ef,{inputId:"collection_phone_input",onChange:handleChange,className:`mantine-Input-input ${h.p2}`,name:"phoneNumber",spellCheck:!1,placeholder:" ",defaultCountry:r&&j.M[r]||"VN",type:"text",value:l,"data-control":"tel",countries:["VN"],arrowComponent:()=>c.createElement(c.Fragment,null)})))))),c.createElement("div",{className:"action actionBox"},c.createElement(eg,{variant:"primary",onClick:()=>{validatePhone(l),u(!0);let t=(0,O.parsePhoneNumber)(l,"VN");if(t&&t.isValid()){let a=t.countryCallingCode;e({phone:t.nationalNumber,countryCode:t.country,callingCode:(null==a?void 0:a.includes("+"))?a:`+${a}`})}},fullWidth:!0,size:"lg",loading:n},c.createElement("div",null,o("collectPhoneNumber.action")),c.createElement("img",{src:"data:image/svg+xml,%3csvg width='21' height='20' viewBox='0 0 21 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.04169 13.5416L12.5834 9.99998L9.04169 6.45831' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"arrow icon",width:20,height:20}))))}function CollectPhoneSuccess({onClose:e}){let{t}=(0,d.u)();return c.createElement(eh,null,c.createElement("div",{className:"info"},c.createElement(Check,{width:80,height:80}),c.createElement("div",null,c.createElement("h5",{className:"mb-1"},t("collectPhoneNumber.titleSuccess")),c.createElement("p",{className:"description"},t("collectPhoneNumber.descriptionSuccess")))),c.createElement("div",{className:"action"},c.createElement(eg,{variant:"tertiary",onClick:e,fullWidth:!0,size:"lg"},t("common.action.close"))))}function PopupCollectPhone({children:e,isMobile:t,onSubmit:a,isOpen:n,onOpenChange:r,drawerProps:o={}}){let i=(0,$.q)(n),[s,d]=(0,c.useState)(l.FORM),[m,{open:p,toggle:u,close:h}]=i,[g,f]=(0,c.useState)(!1),handleOpenChange=e=>{e?p():h(),null==r||r(e)},handleClose=()=>{handleOpenChange(!1)};return(0,c.useEffect)(()=>{m&&d(l.FORM)},[m]),(0,c.useEffect)(()=>{handleOpenChange(n)},[n]),c.createElement(c.Fragment,null,"function"==typeof e?e(i):c.createElement("div",{onClick:u},e),c.createElement(z.D,Object.assign({isOpen:m,onClose:handleClose,onOpenChange:handleOpenChange,isMobile:t,fadeFromIndex:S.Z-9e6,zIndex:S.Z,repositionInputs:!1,isLinear:s===l.SUCCESS},o),s===l.FORM&&c.createElement(CollectPhoneForm,{onSubmit:e=>(0,B.a)(this,void 0,void 0,function*(){try{f(!0),yield a(e),d(l.SUCCESS)}catch(e){console.log("\uD83D\uDE80 ~ handleSubmit ~ error:",e)}finally{f(!1)}}),isLoading:g}),s===l.SUCCESS&&c.createElement(CollectPhoneSuccess,{onClose:handleClose})))}(n=l||(l={}))[n.FORM=0]="FORM",n[n.SUCCESS=1]="SUCCESS";let ex=x.Z.div`
padding-top: 16px;
padding-bottom: 16px;
width: 100%;
& #request_consultation_name_input.mantine-Input-input {
font-size: 15px;
font-weight: 500;
line-height: 24px;
letter-spacing: -0.3px;
color: ${h.r.colors.gray1000};
}
& #gender-option-control-label {
font-size: 13px;
font-weight: 500;
line-height: 20px;
letter-spacing: -0.3px;
color: ${h.r.colors.gray600};
}
& .radio-group .gender-item .mantine-Radio-label {
border-radius: 8px;
}
& .info {
.PhoneInput .PhoneInputInput {
&:focus {
border-color: unset;
outline: none;
box-shadow: none;
}
&:hover {
border-color: unset;
outline: none;
box-shadow: none;
}
}
}
${b.M.mbUp} {
width: 420px;
padding-top: 32px;
padding-bottom: 32px;
}
.mantine-Input-input.custom_input {
/* font-size: 16px; */
}
.formHeader {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 0 24px;
margin-bottom: 34px;
${b.M.mbUp} {
margin-bottom: 24px;
}
}
.formHeaderIcon {
width: 40px;
height: 40px;
flex-shrink: 0;
svg {
width: 40px;
height: 40px;
}
}
.formCloseButton {
flex-shrink: 0;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: ${h.r.colors.white};
border: none;
cursor: pointer;
color: ${h.r.colors.gray800};
:hover {
background: ${h.r.colors.gray100};
}
}
.formTitleBlock {
margin-top: 4px;
padding: 0 24px 24px;
}
.formTitle {
font-weight: 600;
font-size: 1.375rem;
line-height: 2rem;
letter-spacing: -0.4px;
color: ${h.r.colors.gray800};
margin-bottom: 12px;
}
.formSubtitle {
color: ${h.r.colors.gray600};
font-size: 0.875rem;
font-weight: 400;
line-height: 1.375rem;
letter-spacing: -0.2px;
margin: 0;
}
.info {
display: flex;
flex-direction: column;
gap: 8px;
align-items: stretch;
padding: 0 24px 16px;
text-align: left;
h5 {
font-weight: 600;
font-size: 1.25rem;
line-height: 1.75rem;
letter-spacing: -0.4px;
text-align: center;
}
.description {
color: ${h.r.colors.gray700};
text-align: center;
font-size: 0.8125rem;
font-weight: 400;
line-height: 1.25rem;
letter-spacing: -0.3px;
}
&.center {
align-items: center;
}
}
.mb-1 {
margin-bottom: 4px;
}
.w-full {
width: 100%;
}
.px-3 {
padding-left: 12px;
padding-right: 12px;
}
.action {
padding: 0px 24px;
width: 100%;
&.actionBox {
border-top: 0.5px solid ${h.r.colors.neutral100};
padding-top: 16px;
}
}
&.formSuccess {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
justify-content: center;
height: 100%;
.action {
padding: 0px 24px;
}
}
`,eb=(0,x.Z)(T.B)`
&.mantine-Button-root {
border-radius: 8px;
font-size: 16px;
font-weight: 600;
line-height: 24px;
&:hover {
background-color: ${h.r.colors.primaryBase};
}
background-color: ${h.r.colors.primaryBase};
color: ${h.r.colors.white};
&.tertiary {
border-color: ${h.r.colors.neutral200};
}
}
.mantine-Button-label {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
`,ey=(0,x.Z)(z.D)`
${b.M.mbDown} {
.mantine-Modal-content {
height: 100dvh;
}
}
.mantine-Modal-body {
padding: 0;
height: 100%;
.formSuccess {
background: linear-gradient(180deg, #a5d4ff 0%, #ffffff 50%);
}
}
`,eE=(0,x.Z)(H.P)`
--custom-primary-text: #111111;
.PhoneInputCountry {
pointer-events: none;
--phone-select: 58px;
}
&.PhoneInput {
.PhoneInputCountry {
}
.PhoneInputCountryIconCallingCode {
color: var(--custom-primary-text);
}
.PhoneInputInput {
color: var(--custom-primary-text) !important ;
:focus {
color: var(--custom-primary-text) !important ;
}
}
}
`,ew=(0,x.Z)(H.I.Wrapper)`
--phone-input-space-x: -8px;
.mantine-Text-root[data-size='c1'] {
font-size: 0.75rem;
}
.mantine-Text-root[data-size='p3'] {
font-size: 0.8125rem;
}
.mantine-Text-root[data-size='p2'] {
font-size: 0.9375rem;
}
`;(r=i||(i={})).Male="male",r.Female="female";let ek=["VN","MY"];function RequestConsultationForm({onSubmit:e,onClose:t,title:a,isLoading:n,locale:r}){let{t:o}=(0,d.u)(),[l,s]=(0,c.useState)(""),[m,p]=(0,c.useState)(""),[u,h]=(0,c.useState)(i.Female),[g,f]=(0,c.useState)(""),[v,C]=(0,c.useState)(""),[x,b]=(0,c.useState)(""),[y,P]=(0,c.useState)(!1),{classes:N}=(0,F.u)(),M=r&&U.M[r]||"VN",validatePhone=e=>{try{if(!e)return C(o("collectPhoneNumber.phoneRequired")),!1;let t=(0,O.parsePhoneNumber)(e,M);if(!(null==t?void 0:t.isValid()))return C(o("collectPhoneNumber.inputInvalid")),!1;return C(""),!0}catch(e){return C(o("collectPhoneNumber.inputInvalid")),!1}},handlePhoneChange=e=>{p(e),e?validatePhone(e):C("")};return c.createElement(ex,null,c.createElement("div",{className:"formHeader"},c.createElement("div",{className:"formHeaderIcon"},c.createElement(Comment,{width:24,height:24})),c.createElement("button",{type:"button",className:"formCloseButton",onClick:t,"aria-label":o("common.action.close")},c.createElement(A.C,{width:20,height:20}))),c.createElement("div",{className:"formTitleBlock"},c.createElement("h2",{className:"formTitle"},a||o("popupRequestConsultation.title")),c.createElement("p",{className:"formSubtitle"},o("popupRequestConsultation.subtitle"))),c.createElement("div",{className:"info"},c.createElement(F.T,{shrink:!!l,className:(0,E.default)("leadgen-form_input w-full",{"leadgen-form_field_error":!!(y&&g)})},c.createElement(F.T.Control,{htmlFor:"request_consultation_name_input"},({shrink:e})=>c.createElement(ew,{"data-invalid":!!(y&&g),labelElement:"div",label:c.createElement(Z.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},o("popupRequestConsultation.yourName")),inputWrapperOrder:["label","input","description","error"],error:y&&g&&c.createElement(w.k,{align:"center",gap:4},c.createElement(H.E,{size:12}),c.createElement(Z.T,{size:"c1",variant:"error"},g))},c.createElement(H.I,{id:"request_consultation_name_input",value:l,onChange:e=>{s(null!=e?e:""),y&&g&&f("")},placeholder:" ",classNames:{input:`mantine-Input-input ${N.p2}`}})))),c.createElement(F.T,{shrink:!!m,className:(0,E.default)("leadgen-form_input w-full",{"leadgen-form_field_error":!!(y&&v)})},c.createElement(F.T.Control,{htmlFor:"request_consultation_phone_input"},({shrink:e})=>c.createElement(ew,{"data-invalid":!!(y&&v),labelElement:"div",label:c.createElement(Z.T,{size:e?"p3":"p2",variant:"secondary",weight:"halfBold"},o("popupRequestConsultation.phoneLabel")),inputWrapperOrder:["label","input","description","error"],error:y&&v&&c.createElement(w.k,{align:"center",gap:4},c.createElement(H.E,{size:12}),c.createElement(Z.T,{size:"c1",variant:"error"},v))},c.createElement(k.x,{className:"mantine-Input-wrapper",sx:e=>({".PhoneInput .PhoneInputInput":Object.assign(Object.assign({},(0,D.G)(e)[D.C.LEADGEN].p2),{fontWeight:D.F.halfBold})})},c.createElement(eE,{inputId:"request_consultation_phone_input",onChange:handlePhoneChange,className:`mantine-Input-input ${N.p2}`,name:"phoneNumber",spellCheck:!1,placeholder:" ",defaultCountry:M,type:"text",value:m,"data-control":"tel",countries:ek,arrowComponent:()=>c.createElement(c.Fragment,null)}))))),c.createElement(R.G,{id:"gender-option-control-consultation",label:o("popupRequestConsultation.gender"),type:"button",value:u||void 0,onChange:e=>{h(e),y&&x&&b("")},error:y&&x?x:void 0,styles:{wrapper:{flexDirection:"row-reverse"}},labelText:{size:"title2",color:"gray800",fw:500}})),c.createElement("div",{className:"action"},c.createElement(eb,{variant:"primary",onClick:()=>{P(!0);let t=!!(null==l?void 0:l.trim());t?f(""):f(o("popupRequestConsultation.nameRequired"));let a=validatePhone(m),n=u===i.Male||u===i.Female;if(n?b(""):b(o("popupRequestConsultation.genderRequired")),!t||!a||!n)return;let r=(0,O.parsePhoneNumber)(m,M);if(!r||!r.isValid())return;let s=r.countryCallingCode;e({name:l.trim(),phone:r.nationalNumber,countryCode:r.country,callingCode:(null==s?void 0:s.includes("+"))?s:`+${s}`,gender:u})},fullWidth:!0,size:"lg",loading:n},o("popupRequestConsultation.action"))))}function RequestConsultationSuccess({onClose:e}){let{t}=(0,d.u)();return c.createElement(ex,{className:"formSuccess"},c.createElement("div",{className:"formTitleBlock"},c.createElement(Check,{width:64,height:64})),c.createElement("div",{className:"formTitleBlock"},c.createElement("h2",{className:"formTitle"},t("popupRequestConsultation.titleSuccess")),c.createElement("p",{className:"formSubtitle"},t("popupRequestConsultation.descriptionSuccess"))),c.createElement("div",{className:"action"},c.createElement(eb,{variant:"tertiary",onClick:e,fullWidth:!0,size:"lg"},t("common.action.close"))))}function PopupRequestConsultation({children:e,isMobile:t,onSubmit:a,isOpen:n,onOpenChange:r,drawerProps:o={},locale:l}){let i=(0,$.q)(n),[d,m]=(0,c.useState)(s.FORM),[p,{open:u,toggle:h,close:g}]=i,[f,v]=(0,c.useState)(!1),handleOpenChange=e=>{e?u():g(),null==r||r(e)},handleClose=()=>{handleOpenChange(!1)};return(0,c.useEffect)(()=>{p&&m(s.FORM)},[p]),(0,c.useEffect)(()=>{handleOpenChange(n)},[n]),c.createElement(c.Fragment,null,"function"==typeof e?e(i):c.createElement("div",{onClick:h},e),c.createElement(ey,Object.assign({isOpen:p,onClose:handleClose,onOpenChange:handleOpenChange,isMobile:!1,fadeFromIndex:S.Z-9e6,zIndex:S.Z,repositionInputs:!1,isLinear:!0,withCloseButton:!1,fullScreen:t},o),d===s.FORM&&c.createElement(RequestConsultationForm,{onSubmit:e=>(0,B.a)(this,void 0,void 0,function*(){try{v(!0),yield a(e),m(s.SUCCESS)}catch(e){console.log("\uD83D\uDE80 ~ handleSubmit ~ error:",e)}finally{v(!1)}}),onClose:handleClose,isLoading:f,locale:l}),d===s.SUCCESS&&c.createElement(RequestConsultationSuccess,{onClose:handleClose})))}(o=s||(s={}))[o.FORM=0]="FORM",o[o.SUCCESS=1]="SUCCESS";let eP=x.Z.div`
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
.hospitalName {
color: #111111;
font-size: 0.8125rem;
font-weight: 500;
line-height: 1.25rem;
}
.hospitalStatus {
display: inline-flex;
align-items: center;
gap: 4px;
border-radius: 8px;
font-size: 0.6875rem;
line-height: 1rem;
color: ${h.r.colors.red600};
&[data-is-opened='true'] {
color: ${h.r.colors.primaryBase};
}
}
.distanceTag {
padding: 4px 0px;
}
.flex-1 {
flex: 1 1 0%;
}
`,eN=(0,x.Z)(q.I)`
/* object-contain object-center aspect-square */
width: 44px;
height: 44px;
background-color: ${h.r.colors.neutral50};
padding: 2px;
object-fit: contain;
object-position: center;
border-radius: 8px;
flex-shrink: 0;
aspect-ratio: 1;
align-self: baseline;
`,eM=(0,x.Z)(Clock)`
width: 12px;
height: 12px;
`,eS=(0,x.Z)(g.S)`
flex-shrink: 0;
color: ${h.r.colors.gray400};
width: 12px;
height: 12px;
transform: rotate(90deg);
& > path {
stroke-width: 1.5;
}
`,eL=(0,x.Z)(g.D)`
& > span {
color: ${h.r.colors.gray800};
}
& {
border: none;
}
`,checkHospitalStatus=e=>{if(!e)return!1;let t=new Date,a=C.w.at(t.getDay()-1),n=e[a];return null==n?void 0:n.some(e=>{let[a,n]=e.start_at.split(":").map(parseInt),[r,o]=e.end_at.split(":").map(parseInt),l=t.getHours(),i=t.getMinutes();return a===r&&r==l?!(io):!(lr)})};function HospitalInfo({hospitalInfo:e,distance:t,className:a}){let{t:n}=(0,d.u)(),[r,o]=(0,c.useState)(null);return(0,c.useEffect)(()=>{o(checkHospitalStatus(e.working_times))},[e.working_times]),c.createElement(eP,{className:a},c.createElement(eN,{src:e.logo,backupSrc:p.C.getAssetPath("avatar.jpg"),alt:"hospital"}),c.createElement("div",{className:"flex-1"},c.createElement("div",{className:"hospitalName"},e.name),e.working_times&&null!==r&&c.createElement("div",{className:"hospitalStatus","data-is-opened":r},c.createElement(eM,null),c.createElement(Z.T,{size:"p3",weight:"regular",color:"inherit"},n(r?"hospital.status.opening":"hospital.status.closed"))),t&&c.createElement(eL,{className:M()({distanceTag:null===e.working_times}),value:`${t} km`})),c.createElement(eS,null))}let eI=x.Z.div`
padding: 0 1rem 1.25rem;
& > :not(:first-child) {
margin-top: 1.25rem;
}
.txt-body-1 {
font-size: 0.8125rem;
line-height: 1.25rem;
color: ${h.r.colors.gray700};
}
.txt-body-2 {
font-size: 0.9375rem;
line-height: 1.5rem;
color: ${h.r.colors.gray800};
font-weight: 600;
}
.txt-caption-1 {
font-size: 0.6875rem;
line-height: 1rem;
color: ${h.r.colors.gray800};
}
h3 {
padding: 1rem 0;
}
`,e_=(0,x.Z)(W.I)`
gap: 8px;
margin-top: 1rem;
& .insuranceItem > .insuranceLogo {
height: 64px;
border-radius: 12px;
border-color: ${h.r.colors.neutral100};
& > img {
height: auto;
aspect-ratio: 109/64;
}
}
`;function ProductInsuranceInfo({hospitalInfo:e,isMobile:t=!1}){let{t:a}=(0,d.u)(),n=(null==e?void 0:e.accepted_payments)&&e.accepted_payments.length>0;return c.createElement(eI,{id:"insurance-container"},c.createElement("div",null,c.createElement("h3",{className:"txt-body-2"},a("common.insurance")),c.createElement("p",{className:"txt-body-1"},a("common.insuranceIntro")),c.createElement(e_,{insurances:e.insurances,isName:!1})),n&&c.createElement("div",null,c.createElement("h3",{className:"txt-body-2"},a("common.paymentMethods")),c.createElement(W.P,{payments:e.accepted_payments,isMobile:t})))}let eB=(0,c.createContext)({id:"",name:"",specialty:"",experience:"",profileImage:"",clinics:"",educations:[],expertise:"",otherHighlights:[]}),DoctorExpertiseProvider=({children:e,value:t})=>c.createElement(eB.Provider,{value:t},e),e$=x.Z.div`
display: flex;
align-items: center;
flex-direction: column;
background-color: ${h.r.colors.blue50};
border-radius: 12px;
padding: 0px 4px 4px;
.body-section {
width: 100%;
height: 100%;
}
`,ez=x.Z.div`
background-color: #ffffffcc;
border-radius: 8px;
padding: 0.75rem;
display: flex;
flex-direction: column;
justify-content: space-between;
.flex-item-doctor-info {
display: flex;
flex-direction: column;
gap: 12px;
}
`,eF=x.Z.div`
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 8px;
`,eO=x.Z.div`
display: flex;
justify-content: flex-end;
`,eH=(0,x.Z)(W.A)`
width: 0.65rem;
height: 0.65rem;
& > path {
stroke-width: 1.25;
}
`,DoctorExpertise=e=>{var t,a,n,r;let{className:o,doctorInformation:l,onClickReadMore:i,children:s,isShowReadMoreButton:m,style:p,defaultProfileImage:u}=e,{t:g}=(0,d.u)(),f=(null===(t=null==l?void 0:l.clinics)||void 0===t?void 0:t.length)>0||(null===(a=null==l?void 0:l.educations)||void 0===a?void 0:a.length)>0||s||m;return c.createElement(DoctorExpertiseProvider,{value:l},c.createElement(e$,{className:o,style:p},c.createElement(W.a,{name:l.name,specialty:l.specialty,experience:l.experience,profileImage:l.profileImage||u}),f&&c.createElement(ez,{className:"body-section"},c.createElement("div",{className:"flex-item-doctor-info"},(null===(n=null==l?void 0:l.clinics)||void 0===n?void 0:n.length)>0&&c.createElement(W.D,{doctorInfo:l.clinics,Icon:W.C,title:g("common.clinicHospital")}),(null===(r=null==l?void 0:l.educations)||void 0===r?void 0:r.length)>0&&c.createElement(W.D,{doctorInfo:l.educations,Icon:Education,title:g("common.education")}),s),m&&c.createElement(eO,null,c.createElement(eF,{onClick:i},c.createElement(Z.T,{size:"p2",weight:"halfBold",color:h.r.colors.primaryBase},g("common.readMore")),c.createElement(eH,null))))))};DoctorExpertise.Expertise=()=>{let{expertise:e}=(0,c.useContext)(eB),{t}=(0,d.u)();return e?c.createElement(W.D,{doctorInfo:e,Icon:Credential,title:t("common.expertiseCredentials")}):null},DoctorExpertise.OtherHighlights=()=>{let{otherHighlights:e}=(0,c.useContext)(eB),{t}=(0,d.u)();return e?c.createElement(W.D,{doctorInfo:e,Icon:Highlight,title:t("common.otherHighlights")}):null};let eD=x.Z.div`
display: flex;
flex-direction: column;
gap: ${(0,y.h)(12)};
`,eT=x.Z.div`
display: flex;
flex-direction: column;
gap: ${(0,y.h)(8)};
`,ej=x.Z.div`
display: flex;
flex-direction: column;
gap: ${(0,y.h)(4)};
`,eZ=x.Z.div`
display: flex;
gap: ${(0,y.h)(4)};
align-items: center;
`,eR=x.Z.span`
color: ${h.r.colors.gray600};
`,ArticleDetailCard=e=>{let{article:t,doctor:a,className:n,style:r,handleClick:o,altText:l}=e,{articleType:i,articleTitle:s,articleTypeColor:m,image:p,defaultImage:u}=t||{},{doctorName:g,doctorAvatar:f,defaultDoctorAvatar:v}=a||{},{t:C}=(0,d.u)();return c.createElement(eD,{className:n,style:r,onClick:o},c.createElement(q.I,{alt:l||s||"article-image",src:p||u,style:{width:"100%",height:(0,y.h)(143.5),objectFit:"cover",borderRadius:(0,y.h)(4)}}),c.createElement(eT,null,c.createElement(ej,null,c.createElement(Z.T,{color:m||h.r.colors.green600,size:"c1",weight:"halfBold"},i),c.createElement(Z.T,{size:"p2",weight:"semiBold",color:h.r.colors.gray800,lineClamp:2},s)),c.createElement(eZ,null,c.createElement(q.I,{alt:`${C("common.articleCard.reviewedDoctor")} ${g}`,src:f||v,style:{width:(0,y.h)(20),height:(0,y.h)(20),borderRadius:"50%"}}),c.createElement("div",null,c.createElement(Z.T,{size:"c1",weight:"regular",color:h.r.colors.gray800,lineClamp:1},c.createElement(eR,null,C("common.articleCard.reviewedDoctor"),":")," ",g)))))}},LbLa:function(e,t,a){a.d(t,{O:function(){return OvulationForm}});var n,r,o=a("XBaX"),l=a("q1tI"),i=a("/npG"),s=a("mYVa"),c=a("iuhU"),d=a("8vDj"),m=a("cChf"),p=a("ZFu2"),u=a("dFtw"),h=a("NQDR"),g=a("6p9C"),f=a("HalR"),v=a("RVQf"),C=a("g+a8"),x=a("dU++"),b=a("fkrl");let AvoidPregnancy=e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,o._)(e,["isMarryBaby","size"]);let r=Object.assign({width:a,height:a},n);return t?l.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),l.createElement("path",{d:"M16.5 27.133c1.298 0 2.596-.149 3.868-.447a9.15 9.15 0 0 0 6.818-6.818 16.94 16.94 0 0 0 0-7.736 9.15 9.15 0 0 0-6.818-6.818 16.94 16.94 0 0 0-7.736 0 9.15 9.15 0 0 0-6.818 6.818A17 17 0 0 0 5.367 16a.867.867 0 0 1-1.734 0c0-1.43.165-2.862.494-4.264a10.88 10.88 0 0 1 8.109-8.11 18.7 18.7 0 0 1 8.528 0 10.88 10.88 0 0 1 8.11 8.11 18.7 18.7 0 0 1 0 8.528 10.88 10.88 0 0 1-8.11 8.11 18.7 18.7 0 0 1-4.264.493.867.867 0 0 1 0-1.734",fill:"#3E3F58"}),l.createElement("path",{d:"M12.5 16a4 4 0 1 1 8 0 4 4 0 0 1-8 0",fill:"#fff"}),l.createElement("path",{d:"M11.633 16a4.867 4.867 0 1 1 9.734 0 4.867 4.867 0 0 1-9.734 0m4.867-3.133a3.133 3.133 0 1 0 0 6.266 3.133 3.133 0 0 0 0-6.266m-4 9.8a2.667 2.667 0 1 1-5.333 0 2.667 2.667 0 0 1 5.333 0",fill:"#3E3F58"}),l.createElement("path",{d:"M10.305 22.195c.26.26.26.683 0 .943l-1.91 1.91c-.36.36-.562.847-.562 1.355a3.25 3.25 0 0 1-1.796 2.907l-1.239.62a.667.667 0 1 1-.596-1.193l1.238-.62a1.92 1.92 0 0 0 1.06-1.714c0-.862.342-1.688.952-2.298l1.91-1.91c.26-.26.682-.26.943 0",fill:"#3E3F58"}),l.createElement("path",{d:"M3.874 4.788a1 1 0 0 1 1.414-1.414l23.099 23.098a1 1 0 1 1-1.415 1.415z",fill:"#E85388"})):l.createElement("svg",Object.assign({viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),l.createElement("g",{clipPath:"url(#clip0_1530_7251)"},l.createElement("path",{d:"M8.983 10.87a.23.23 0 0 1 .049-.16c.08-.114.156-.229.207-.36.1-.166.168-.348.233-.528.246-.668.397-1.36.508-2.062.036-.235.076-.471.09-.71.065-.511.101-1.024.095-1.541.004-.015.011-.03.011-.044a13 13 0 0 0-.089-1.62c-.023-.196-.093-.335-.298-.406-.293-.1-.48-.316-.568-.615a2.7 2.7 0 0 0-.217-.566c-.123-.222-.29-.391-.54-.47-.057-.018-.088-.016-.106.052q-.045.165-.073.336c-.005.044 0 .058.048.058q.122.005.244.017c.127.009.21.09.202.196-.011.111-.108.179-.239.166-.065-.007-.133-.009-.198-.016-.058-.008-.077.016-.067.072q.027.165.052.332c.006.043.031.053.07.053.078 0 .147-.03.218-.057.104-.042.2-.004.242.093.04.09.004.187-.093.235-.13.063-.27.113-.411.085a.23.23 0 0 0-.235.077c-.04-.084-.106-.146-.167-.211-.46-.475-.55-1.194-.235-1.82.18-.359.45-.627.828-.776A.4.4 0 0 0 8.69.595c.33-.317.734-.477 1.172-.55.641-.11 1.25-.024 1.819.3.41.233.728.566.942.983.131.253.188.535.246.814.16.762.233 1.538.293 2.313q.108 1.411.213 2.826c.055.712.13 1.422.24 2.128.066.428.175.846.26 1.27.097.479.039.941-.24 1.358a1.2 1.2 0 0 1-.517.428c-.163.05-.327.105-.491.155-.178.052-.302-.059-.268-.239a4.6 4.6 0 0 0 .077-.72 13.6 13.6 0 0 0-.133-2.225c-.03-.196-.055-.395-.087-.591-.07-.43-.151-.857-.257-1.28l-.015-.07a16 16 0 0 0-.282-1.03c-.012-.039-.025-.079-.076-.075-.038.003-.053.034-.058.07l-.146 1.105c-.05.219-.094.437-.158.652a5.5 5.5 0 0 1-.806 1.654l-.091.113c-.308.382-.654.719-1.094.95-.122.06-.177.048-.252-.063",fill:"#1B3250"}),l.createElement("path",{d:"M12.304 9.435c.1.737.154 1.477.133 2.224a4.6 4.6 0 0 1-.077.72c-.034.182.09.293.268.239q.246-.075.491-.155c.053.226.126.448.17.675q.09.452.129.912c.025.302.043.603.032.905q-.015.483-.065.964a14 14 0 0 1-.299 1.707c-.02.086-.045.17-.065.255-.02.09-.068.12-.16.12L8.789 18H7.781c-.111 0-.117-.011-.13-.124a3 3 0 0 0-.361-1.121c-.132-.235-.297-.448-.415-.692a3.14 3.14 0 0 1-.324-1.521c.233.07.418.001.571-.184q.236-.281.477-.559c.07-.08.136-.164.244-.193.315-.087.631-.166.94-.262.665-.207 1.324-.43 1.917-.804.251-.159.475-.344.595-.63.237-.564.415-1.147.592-1.733.085-.28.184-.55.417-.742",fill:"#2D87F3"}),l.createElement("path",{d:"M12.304 9.435c-.233.194-.33.462-.413.74-.177.585-.355 1.169-.592 1.733-.12.286-.344.471-.595.63-.593.375-1.254.597-1.916.804-.312.097-.628.177-.941.262-.11.031-.177.113-.244.193q-.24.277-.477.559c-.153.184-.34.253-.571.184a.87.87 0 0 1-.44-.54.64.64 0 0 1 .045-.503 1 1 0 0 0 .094-.31.47.47 0 0 1 .392-.405c.132-.03.269-.039.404-.053a.4.4 0 0 0 .114-.024c.115-.009.21-.069.31-.12.322-.167.646-.328.966-.497q.586-.308 1.192-.571a.78.78 0 0 0 .473-.524q.09-.305.177-.608c.047-.171.113-.337.14-.514a5.5 5.5 0 0 0 .806-1.654c.064-.215.108-.433.159-.652a.63.63 0 0 1 .342-.054c.08.013.156.036.237.054.105.423.187.85.256 1.28q.039.292.082.59m-4.19-5.947a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.071.027-.14.056-.218.056-.039 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.198.017.131.013.228-.053.239-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.046 0-.053-.014-.047-.058.016-.115.043-.224.072-.337.017-.067.05-.069.106-.05.25.078.417.247.54.469.1.178.16.371.217.566.087.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.272-.016-.525.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.309-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.013-.319.06-.07.126-.134.186-.202",fill:"#FCCAAF"}),l.createElement("path",{d:"M10.069 7.052c-.013.239-.053.473-.09.71-.11.7-.261 1.394-.507 2.062-.066.18-.135.362-.233.528a.46.46 0 0 0-.235-.4c-.328-.21-.544-.508-.599-.898a.86.86 0 0 1 .242-.742c.237-.244.504-.459.761-.683.188-.162.37-.327.555-.493.033-.031.064-.064.106-.084m.349 2.818c-.025.176-.093.341-.14.513-.057.204-.119.404-.177.608a.78.78 0 0 1-.473.524q-.607.261-1.192.571c-.32.17-.646.33-.966.497-.099.051-.195.111-.31.12.066-.15.177-.266.277-.387.273-.334.615-.596.932-.881q.306-.28.611-.565c.077.11.13.124.251.06.439-.229.787-.567 1.094-.95z",fill:"#2D87F3"}),l.createElement("path",{d:"M8.271 4.49a1 1 0 0 0 .377-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z",fill:"#FF6F4D"}),l.createElement("path",{d:"M11.96 7.563c-.079-.018-.157-.041-.237-.054a.65.65 0 0 0-.342.054l.146-1.104c.005-.037.02-.068.058-.071.05-.006.063.034.076.074q.159.511.282 1.03.01.036.017.071",fill:"#2D87F3"}),l.createElement("path",{d:"M9.834 1.004a7.996 7.996 0 1 0 0 15.992 7.996 7.996 0 0 0 0-15.992M9.465 2.26c1.606-.09 3.191.4 4.467 1.378a.282.282 0 0 1 .03.424l-9.066 9.066a.283.283 0 0 1-.424-.03A6.749 6.749 0 0 1 9.465 2.26m.369 13.49a6.72 6.72 0 0 1-4.016-1.325.284.284 0 0 1-.032-.426l9.046-9.047a.283.283 0 0 1 .427.032A6.75 6.75 0 0 1 9.834 15.75",fill:"#F44D2C"}),l.createElement("path",{d:"M10.159 5.509c.005.517 2.997-1.054 2.997-1.054s-.133-1.55-.293-2.313c-.058-.279-.114-.56-.245-.814a2.35 2.35 0 0 0-.943-.983c-.568-.324-1.178-.41-1.818-.3-.44.073-.843.233-1.173.55a.4.4 0 0 1-.147.085c-.379.15-.648.417-.828.776-.315.626-.224 1.345.235 1.82.062.065.127.127.167.21a.23.23 0 0 1 .235-.076c.142.028.282-.022.411-.085.097-.048.133-.144.093-.235-.042-.097-.138-.135-.242-.093-.071.027-.14.057-.218.057-.039 0-.064-.01-.07-.053q-.024-.165-.052-.332c-.01-.056.009-.08.067-.072.066.007.133.009.198.016.131.013.228-.055.239-.166.009-.105-.075-.187-.202-.196h-.007q-.118-.013-.237-.017c-.047 0-.053-.014-.047-.058.016-.114.043-.225.072-.336.019-.068.05-.07.106-.051.25.078.417.247.54.47.099.178.16.37.217.565.087.299.275.515.568.615.206.071.275.21.298.406.066.539.091 1.078.09 1.62z",fill:"#1B3250"}),l.createElement("path",{d:"M8.107 3.488a.23.23 0 0 1 .235-.076c.142.025.282-.022.411-.086.097-.047.133-.143.093-.234-.042-.095-.138-.133-.242-.093-.07.027-.14.056-.218.056-.038 0-.062-.009-.07-.053q-.024-.165-.052-.33-.017-.082.067-.074c.066.008.133.01.199.017.13.013.227-.053.238-.166.01-.105-.073-.187-.202-.196-.082-.006-.162-.015-.244-.017-.045 0-.053-.014-.047-.058.016-.115.043-.224.073-.337.016-.067.049-.069.105-.05.25.078.417.247.54.469.1.178.16.371.217.566.088.298.273.515.568.615.206.07.275.21.298.406.066.539.091 1.08.09 1.62 0 .014-.008.029-.011.043-.271-.016-.524.075-.783.133a1.4 1.4 0 0 1-.513.031.5.5 0 0 1-.433-.36 2.3 2.3 0 0 1-.091-.46c.154-.024.31-.048.451-.124.1-.055.135-.148.09-.242a.18.18 0 0 0-.24-.084 1 1 0 0 1-.376.087 1.3 1.3 0 0 0-.326-.482c-.096-.093-.096-.215-.012-.319.06-.07.125-.134.185-.202",fill:"#FCCAAF"}),l.createElement("path",{d:"M8.265 4.49a1 1 0 0 0 .376-.088.183.183 0 0 1 .239.084c.047.095.01.187-.09.242-.14.076-.296.1-.45.124z",fill:"#FF6F4D"})),l.createElement("defs",null,l.createElement("clipPath",{id:"clip0_1530_7251"},l.createElement("path",{fill:"#fff",d:"M.834 0h18v18h-18z"}))))},TryConceive=e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,o._)(e,["isMarryBaby","size"]);let r=Object.assign({width:a,height:a},n);return t?l.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),l.createElement("path",{d:"M14.018 9.155c-1.422 1.066-1.777 1.777-1.067 2.843.57.853 2.133 2.488 3.2 3.554-.712 2.133-6.753 1.422-6.753 1.422l-.711 1.421-1.067 3.199c-1.066 0-3.198.142-3.198.71 0 .712 2.843 2.844 3.554 2.844.569 0 1.658-2.132 2.132-3.199 1.54 1.777 5.474 4.905 8.885 3.199 4.265-2.132 6.398-5.331 5.687-7.819-.274-.959-.284-1.495-.132-1.813a4.62 4.62 0 0 0 3.438-2.3c.715-1.108.78-2.417.397-3.652-.41-1.663-1.15-2.955-2.637-3.252-3.423-.685-6.397 1.016-6.397 4.62a4.6 4.6 0 0 0 .971 2.834c-1.184.316-2.414-.236-6.302-4.611",fill:"#fff"}),l.createElement("path",{d:"M29.3 10.825A5.235 5.235 0 0 0 24.077 5.6c-2.876 0-5.245 2.348-5.245 5.224 0 .36.275.634.634.634.36 0 .635-.275.635-.634 0-2.179 1.776-3.955 3.976-3.955s3.954 1.776 3.954 3.955a3.947 3.947 0 0 1-3.531 3.933.8.8 0 0 0-.381-.021c-.042.021-.085.021-.106.042a.64.64 0 0 0-.57.635c0 .254.147.465.359.57.105.487.148.995.148 1.502a7.175 7.175 0 0 1-7.17 7.17 7.22 7.22 0 0 1-5.773-2.898l-.02-.021c.507-.317 1.902-.17 2.41-.106a.637.637 0 0 0 .698-.57.637.637 0 0 0-.571-.699c-1.184-.148-3.384-.38-3.891 1.164-.064.19-.127.401-.19.592-.318.994-.74 2.347-1.27 2.58-.634.063-2.918-1.587-3.172-2.284.212-.275 1.248-.444 2.623 0 .169.063.36.042.507-.064s.275-.232.296-.423c.571-2.707.74-3.278.74-3.299v-.021c.212-.888.867-.973 2.538-.93 1.523.042 3.384.084 4.674-1.46a7.8 7.8 0 0 0 3.235.994h.043a.643.643 0 0 0 .634-.592c.021-.36-.232-.655-.57-.677-4.4-.36-6.028-4.652-6.091-4.842 0 0 0-.022-.022-.022-.274-.634-.063-1.036.19-1.163.17-.105.445-.105.614.17 1.248 2.008 2.432 3.32 3.574 4.018.021 0 .042.02.042.02.677.34 2.052.762 3.596-.295.296-.19.359-.592.169-.889-.19-.296-.592-.36-.889-.169-.951.635-1.776.487-2.305.233-.93-.571-1.988-1.777-3.108-3.574-.508-.783-1.48-1.036-2.284-.613-.762.401-1.312 1.438-.762 2.77.085.254.93 2.368 2.898 3.934a2.7 2.7 0 0 1-.614.486c-.02 0-.02 0-.042-.021-8.205-2.517-8.86-8.586-8.924-9.77a.61.61 0 0 0-.656-.614.63.63 0 0 0-.592.656c.042 1.226.655 7.084 7.74 10.172h-.508c-1.48-.042-3.34-.085-3.806 1.882-.021.106-.17.677-.613 2.707-1.587-.36-3.194-.127-3.574 1.036-.19.55.126 1.206.972 2.01.571.549 2.263 1.902 3.447 1.902.149 0 .297-.02.423-.063.952-.36 1.438-1.544 1.861-2.813a8.48 8.48 0 0 0 6.324 2.855c4.652 0 8.438-3.785 8.438-8.438 0-.507-.043-1.015-.148-1.522a5.264 5.264 0 0 0 4.23-5.16",fill:"#3E3F58"}),l.createElement("rect",{x:"23.005",y:"8.444",width:"1.942",height:"1.422",rx:".711",transform:"rotate(34.869 23.005 8.444)",fill:"#FB8C00"})):l.createElement("svg",Object.assign({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),l.createElement("path",{d:"M13.996 8.62v3.221c1.054.035 1.682-.705 1.845-1.467.209-.977-.444-2.041-1.845-1.754",fill:"#FEAA96"}),l.createElement("path",{d:"M14.055 10.67a.21.21 0 0 1-.2-.277c.166-.508.594-.69.92-.644a.21.21 0 1 1-.059.418c-.163-.023-.37.079-.461.358a.21.21 0 0 1-.2.145",fill:"#FF886C"}),l.createElement("path",{d:"M2.16 10.374c.162.762.79 1.502 1.844 1.467V8.62c-1.4-.287-2.054.777-1.845 1.754",fill:"#FEAA96"}),l.createElement("path",{d:"M3.98 10.67a.21.21 0 0 1-.2-.145c-.093-.28-.299-.381-.462-.358a.21.21 0 0 1-.21-.102.21.21 0 0 1 .152-.316c.326-.046.753.136.92.644a.21.21 0 0 1-.2.277",fill:"#FF886C"}),l.createElement("path",{d:"M9 15.831c1.325 0 3.365-.561 4.534-2.292 1.057-1.563.436-4.144.462-5.169.053-2.079-1.447-4.78-4.996-4.78s-5.05 2.7-4.996 4.78c.026 1.025-.595 3.606.461 5.169 1.17 1.73 3.21 2.292 4.535 2.292",fill:"#FECCBF"}),l.createElement("path",{d:"M6.881 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121",fill:"#A35961"}),l.createElement("path",{d:"M7.114 9.777a.21.21 0 0 1-.188-.116c-.049-.097-.205-.122-.27-.129-.225-.022-.44.056-.477.104a.211.211 0 1 1-.347-.241c.149-.215.53-.306.831-.285.306.021.533.15.64.362a.21.21 0 0 1-.189.305",fill:"#8C2F39"}),l.createElement("path",{d:"M11.119 10.535a.56.56 0 1 0 0-1.121.56.56 0 0 0 0 1.121",fill:"#A35961"}),l.createElement("path",{d:"M9 13.329c.777 0 .994-.61 1.046-.92.031-.185-.132-.35-.34-.35H8.293c-.208 0-.371.165-.34.35.052.31.27.92 1.047.92",fill:"#D84023"}),l.createElement("path",{d:"M10.763 7.94a.2.2 0 0 1-.107-.03.33.33 0 0 0-.18-.029.21.21 0 1 1-.07-.416.74.74 0 0 1 .464.081.211.211 0 0 1-.107.393m-3.526 0a.21.21 0 0 1-.107-.393.74.74 0 0 1 .463-.08.211.211 0 1 1-.07.415.3.3 0 0 0-.18.029.2.2 0 0 1-.106.029",fill:"#FEAA96"}),l.createElement("path",{d:"M10.887 9.777a.21.21 0 0 1-.189-.305c.107-.212.334-.34.64-.362.3-.021.682.07.83.285a.211.211 0 0 1-.346.24c-.038-.048-.252-.125-.477-.103-.065.007-.221.032-.27.129a.21.21 0 0 1-.188.116",fill:"#8C2F39"}),l.createElement("path",{d:"M9.284 11.02a.21.21 0 0 1-.22-.15.07.07 0 0 0-.063-.05H9a.07.07 0 0 0-.064.05.21.21 0 0 1-.22.15.22.22 0 0 1-.192-.244c.018-.221.213-.379.476-.379.264 0 .458.158.476.38a.22.22 0 0 1-.192.244",fill:"#FEAA96"}),l.createElement("path",{d:"M9.55 12.06h-1.1l-.003.054a.552.552 0 1 0 1.102-.055m2.041-.774-.29.53a.1.1 0 0 1-.041.04l-.53.29a.1.1 0 0 0-.053.09.1.1 0 0 0 .053.09l.53.29q.026.015.04.04l.29.53a.103.103 0 0 0 .18 0l.29-.53a.1.1 0 0 1 .041-.04l.53-.29a.103.103 0 0 0 0-.18l-.53-.29a.1.1 0 0 1-.04-.04l-.29-.53a.1.1 0 0 0-.143-.039.1.1 0 0 0-.038.04",fill:"#fff"}),l.createElement("path",{d:"M11.055 2.193c-.147-.422-.524-.698-1.01-.738a.9.9 0 0 0-.535.154c-.206.155-.37.358-.478.592a.036.036 0 0 1-.066 0 1.55 1.55 0 0 0-.475-.592.9.9 0 0 0-.537-.154c-.485.04-.862.316-1.008.739a1.03 1.03 0 0 0 .259 1.09c.479.447 1.156.518 1.543.518h.502c.387 0 1.066-.07 1.545-.517a1.03 1.03 0 0 0 .26-1.092M8.79 3.243a.13.13 0 0 1-.134.135c-.316-.012-.821-.084-1.163-.402a.61.61 0 0 1-.148-.644.66.66 0 0 1 .438-.417c.242-.078.404-.006.456.033.446.33.539.932.551 1.295m1.718-.267c-.342.319-.847.39-1.163.402a.13.13 0 0 1-.135-.135c.013-.362.105-.964.551-1.295a.47.47 0 0 1 .25-.073c.318.027.554.193.645.457a.61.61 0 0 1-.149.644",fill:"#2D87F3"}),l.createElement("path",{d:"M8.998 3.338a.21.21 0 0 1 .122.383l-.04.028c-.16.118-.957.76-.991 1.758-.027.78.403 1.132.814 1.202.367.062.831-.096.985-.59a.415.415 0 0 0-.211-.52c-.136-.069-.32-.076-.425.064a.211.211 0 0 1-.337-.253c.215-.287.607-.363.954-.186a.836.836 0 0 1 .422 1.02 1.28 1.28 0 0 1-1.458.88c-.56-.095-1.202-.58-1.166-1.631.046-1.334 1.17-2.093 1.222-2.125a.2.2 0 0 1 .109-.03",fill:"#BA8288"}))},y=(0,l.createContext)({});var E=(0,i.k)(e=>({inputRightSection:{fontSize:(0,s.h)(13),lineHeight:(0,s.h)(24),color:e.colors.gray[4],justifyContent:"flex-end",paddingRight:8}}));let DefaultLayout=e=>{var t=(0,o._)(e,[]);let{t:a}=(0,v.u)(),{currentUrl:n,submitProps:r,form:i,calculatingMethods:s,isMobile:d}=(0,l.useContext)(y),{classes:m={}}=(0,l.useContext)(C.C),{classes:p}=E(void 0,{name:"OvulationTool__DefaultLayout"});return l.createElement(x.H,Object.assign({formLayout:"default"},t),l.createElement(x.H.FormRow,null,l.createElement(x.H.Control,null,l.createElement(x.H.ChipGroup,Object.assign({data:s,label:a("dueDatePage.calculationMethod"),isMobile:d},i.getInputProps("calculatorType"))))),l.createElement(x.H.FormRow,null,l.createElement(g.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},label:l.createElement(f.T,{size:"p2",weight:"semiBold"},` (${a("dueDatePage.lastPeriod.lastPeriodLabel")})`),maxDate:new Date},i.getInputProps("lastPeriodDate")))),l.createElement(x.H.FormRow,null,l.createElement(h.I.Number,Object.assign({label:l.createElement(f.T,{size:"p2",weight:"semiBold"},a("ovulationPage.cycleLength")),rightSection:a("ovulationPage.dayUnit"),min:21,max:45,defaultValue:1},i.getInputProps("cycleLength"),{classNames:{rightSection:p.inputRightSection}}))),l.createElement(x.H.FormRow,null,l.createElement(h.I.Number,Object.assign({label:l.createElement(f.T,{size:"p2",weight:"semiBold"},a("ovulationPage.periodDuration")),rightSection:a("ovulationPage.dayUnit"),min:1,max:15,defaultValue:1},i.getInputProps("periodLength"),{classNames:{rightSection:p.inputRightSection}}))),l.createElement(x.H.FormRow,{className:m.submitWrapper},l.createElement(x.H.Submit,Object.assign({type:"submit",className:(0,c.default)("due-date-calculate-button",m.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:n},r),a("dueDatePage.lastPeriod.calculate"))))},InlineLayout=e=>{var t=(0,o._)(e,[]);let{t:a}=(0,v.u)(),{currentUrl:n,submitProps:r,form:i,calculatingMethods:s}=(0,l.useContext)(y),{classes:d={}}=(0,l.useContext)(C.C);return l.createElement(x.H,Object.assign({formLayout:"inline"},t),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:a("dueDatePage.calculationMethod"),direction:"column",width:"100%"},l.createElement(x.H.ChipGroup,Object.assign({data:s},i.getInputProps("calculatorType"))))),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:a("dueDatePage.lastPeriod.lastPeriodLabel")},l.createElement(g.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},i.getInputProps("lastPeriodDate"))))),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:a("ovulationPage.cycleLength")+" "+a("ovulationPage.dayUnit")},l.createElement(h.I.Number,Object.assign({min:21,max:45,defaultValue:1},i.getInputProps("cycleLength"),{error:null}))),i.errors.cycleLength&&l.createElement(x.H.Error,null,i.errors.cycleLength)),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:a("ovulationPage.periodDuration")+" "+a("ovulationPage.dayUnit")},l.createElement(h.I.Number,Object.assign({min:1,max:15,defaultValue:1},i.getInputProps("periodLength"),{error:null}))),i.errors.periodLength&&l.createElement(x.H.Error,null,i.errors.periodLength)),l.createElement(x.H.FormRow,{className:d.submitWrapper},l.createElement(x.H.Submit,Object.assign({type:"submit",className:(0,c.default)("due-date-calculate-button",d.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:n},r),a("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,o._)(e,[]);let{t:a}=(0,v.u)(),{currentUrl:n,submitProps:r,form:i,calculatingMethods:s}=(0,l.useContext)(y);return l.createElement(x.H,Object.assign({formLayout:"inline"},t),l.createElement(x.H.Control,null,l.createElement(h.I.Wrapper,{label:l.createElement(f.T,{size:"p4",sx:{fontWeight:"normal"}},a("dueDatePage.calculationMethod"))},l.createElement(x.H.ChipGroup,Object.assign({data:s},i.getInputProps("calculatorType"))))),l.createElement(x.H.BorderBoxControl,{label:a("dueDatePage.lastPeriod.lastPeriodLabel"),rightSection:l.createElement(b.Z,null)},l.createElement(g.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null},i.getInputProps("lastPeriodDate")))),l.createElement(x.H.BorderBoxControl,{label:a("ovulationPage.cycleLength"),rightSection:a("ovulationPage.dayUnit")},l.createElement(h.I.Number,Object.assign({min:21,max:45,defaultValue:1},i.getInputProps("cycleLength")))),i.errors.cycleLength&&l.createElement(x.H.Error,null,i.errors.cycleLength),l.createElement(x.H.BorderBoxControl,{label:a("ovulationPage.periodDuration"),rightSection:a("ovulationPage.dayUnit")},l.createElement(h.I.Number,Object.assign({min:1,max:15,defaultValue:1},i.getInputProps("periodLength")))),i.errors.periodLength&&l.createElement(x.H.Error,null,i.errors.periodLength),l.createElement(x.H.Submit,Object.assign({type:"submit",className:"due-date-calculate-button",dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:n},r),a("dueDatePage.lastPeriod.calculate")))};(n=r||(r={}))[n.trackPeriod=0]="trackPeriod",n[n.conceive=1]="conceive",n[n.avoidPregnancy=2]="avoidPregnancy";let OvulationForm=e=>{var{formLayout:t="default",submitProps:a,currentUrl:n,isMobile:i,onSubmit:s}=e,c=(0,o._)(e,["formLayout","submitProps","currentUrl","isMobile","onSubmit"]);let h=(0,d.rZ)(),{t:g}=(0,v.u)(),f="mb"===h.other.template,C=(0,m.c)({initialValues:{calculatorType:String(r.trackPeriod),periodLength:7,cycleLength:28,lastPeriodDate:new Date},validate:{periodLength:(0,p.U)(g("validation.error.requiredField")),cycleLength:(0,p.U)(g("validation.error.requiredField"))}}),x=Object.assign({onSubmit:C.onSubmit(s)},c),b=[{label:g("ovulationPage.trackPeriod"),value:r.trackPeriod,icon:l.createElement(u.L,null)},{label:g("ovulationPage.conceive"),value:r.conceive,icon:l.createElement(TryConceive,null)},{label:g("ovulationPage.avoidPregnancy"),value:r.avoidPregnancy,icon:l.createElement(AvoidPregnancy,null)}];return l.createElement(y.Provider,{value:{submitProps:a,currentUrl:n,form:C,isMobile:i,calculatingMethods:b}},"inline"===t?l.createElement(InlineLayout,Object.assign({},x)):f?l.createElement(MbLayout,Object.assign({formLayout:t},x)):l.createElement(DefaultLayout,Object.assign({},x)))}}}]);