"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4584],{Dbk7:function(e,t,a){a.d(t,{M:function(){return MantineProvider}});var n=a("fbRC"),l=a("q1tI"),r=a("8vDj"),o=a("nSs0"),i=a("aaf5");let MantineProvider=e=>{var{children:t,locale:a,template:s="hb",isNotifications:d=!0,customStyleType:c=i.C.NONE}=e,u=(0,n._)(e,["children","locale","template","isNotifications","customStyleType"]);return(0,o.u)(a),l.createElement(r.Me,Object.assign({theme:(0,o.g)(a,s,c)},u),l.createElement(i.T,{variant:c},t,d&&l.createElement(o.N,null)))}},Y6TQ:function(e,t,a){a.d(t,{P:function(){return Popup}});var n=a("q1tI"),l=a("rBCA"),r=a("oKqh"),o=a("iBNF");let i=l.Z.div` position: fixed; left: 50%; padding: 0 16px 32px; background-color: ${o.r.colors.white}; border-radius: ${o.r.borderRadius}; box-shadow: 0px 4px 8px ${o.r.colors.gray200}; transform: translate(-50%, -50%); transition: all 0.5s ease-in-out; visibility: hidden; &[data-open='true'] { z-index: 400; top: 50%; opacity: 1; visibility: visible; } &[data-open='false'] { top: -50%; } &[data-type='lead'] { width: 332px; height: 460px; div { top: -15px; right: -15px; } } &[data-type='form'] { width: 496px; height: 548px; ${r.M.mbDown} { width: 340px; } } &[data-type='confirm'] { ${r.M.mbDown} { width: calc(100% - 32px); } ${r.M.mbUp} { width: 100%; max-width: 407px; } } .popup-content { position: relative; z-index: 111; height: 100%; padding: 16px; } .close-button { position: absolute; top: 16px; right: 0; cursor: pointer; img { width: 100%; height: 100%; border-radius: 50%; } } `,s=l.Z.div` position: fixed; z-index: 110; top: 0; left: 0; width: 100%; height: 100%; align-items: center; background: rgba(38, 38, 38, 0.3); &[data-open='false'] { display: none; } `,Popup=({type:e="lead",closeIcon:t,isOpen:a=!0,onClose:l,children:r,className:o="",enableAnimation:d=!0,disableClickOutside:c=!1})=>n.createElement(n.Fragment,null,n.createElement(i,{"data-open":a,"data-type":e,"data-animation":d},n.createElement("div",{className:`${o||""} popup-content`},!!t&&n.createElement("div",{className:"close-button",onClick:l},t),r)),n.createElement(s,{"data-open":a,onClick:()=>{c||l()}}))},dcCS:function(e,t,a){a.d(t,{S:function(){return l}});var n=a("2wr/");let l=n.r},zHM9:function(e,t,a){a.d(t,{P:function(){return PillCarousel}});var n=a("fbRC"),l=a("q1tI"),r=a("rBCA"),o=a("gC6A"),i=a("iBNF"),s=a("Aeci"),d=a("izct"),c=a("/hDE"),u=a("6HDN");let m=r.Z.div` display: inline-flex; overflow: hidden; width: ${e=>e.size}px; height: ${e=>e.size}px; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid #e4e8ec; background-color: ${e=>e.backgroundColor||i.r.colors.white}; border-radius: ${e=>e.borderRadius||"50%"}; & > * { width: ${e=>e.iconSize}px; height: ${e=>e.iconSize}px; } `,p=r.Z.div` display: inline-block; height: 108px; background-color: ${i.r.colors.white}; border-radius: 60px; cursor: pointer; &.selected-week-pill { background-color: ${i.r.colors.pink100}; } & > div:first-child { margin: 4px 4px 0; } & > p { margin-top: 8px; text-align: center; } & > * { pointer-events: none; } `,g=[c.L.Myanmar,c.L.Taiwan],v=(0,r.Z)(e=>{var{icon:t,name:a,className:r,locale:c="en-PH",dataEventCategory:u,dataEventAction:v,dataEventLabel:h,onSelect:b}=e,f=(0,n._)(e,["icon","name","className","locale","dataEventCategory","dataEventAction","dataEventLabel","onSelect"]);let C=(0,l.useMemo)(()=>null==r?void 0:r.includes("selected-week-pill"),[r]);return l.createElement(p,Object.assign({onClick:b,className:r?"week-pill".concat(" non-pointer-event-child ",r):"week-pill non-pointer-event-child","data-event-category":u,"data-event-action":v,"data-event-label":h},f),l.createElement(m,{size:64,iconSize:40,backgroundColor:i.r.colors.white},l.createElement(s.I,{src:t||o.C.getAssetPath("week_default.png"),alt:`week ${a}`})),C?l.createElement(d.T,Object.assign({type:"semiBold",size:"n1",color:i.r.colors.gray800},g.includes(c)&&{style:{fontSize:"10px"}}),a):l.createElement(d.T,Object.assign({size:"n1",color:i.r.colors.gray600},g.includes(c)&&{style:{fontSize:"10px"}}),a))})` box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08); `,h=(0,r.Z)(u.f.Slide)` cursor: pointer; > div * { pointer-events: none; } `,b=(0,r.Z)(u.f)` .centerred-pill-wrapper { padding: 16px 0; } `,PillCarousel=e=>{var{data:t,isMobile:a,onSlideChange:r,pillProps:o,locale:i=c.L.Vietnam,blurFromIndex:s,blurLength:d}=e,u=(0,n._)(e,["data","isMobile","onSlideChange","pillProps","locale","blurFromIndex","blurLength"]);let[m,p]=(0,l.useState)("");return(0,l.useEffect)(()=>{p(window.location.href)},[]),l.createElement(b,Object.assign({},{withControls:!a,slideGap:16,blurFromCenter:!0,blurFromIndex:s||(a?2:4),blurLength:d||(a?1:3),onSlideChange:r},u,{selectSlideWhenClick:!0,previousControlIcon:l.createElement(Arrow,{currentUrl:m}),nextControlIcon:l.createElement(Arrow,{currentUrl:m,isRight:!0})}),e=>t.map((t,a)=>l.createElement(h,Object.assign({key:a,onClick:r,"data-event-category":"Health Tool","data-event-action":"Pregnancy Week Click","data-event-label":m,innerSlideProps:{"data-event-category":"Health Tool","data-event-action":"Pregnancy Week Click","data-event-label":m}},o),l.createElement("div",{className:"centerred-pill-wrapper"},l.createElement(v,{"data-event-category":"Health Tool","data-event-action":"Fetal Week Click","data-event-label":m,locale:i,name:t.name,icon:t.icon,className:a===e?"selected-week-pill pointer-event-child-none":"pointer-event-child-none"})))))},Arrow=({isRight:e,currentUrl:t})=>l.createElement("svg",{viewBox:"0 0 15 15",fill:"none",width:"16",height:"16",style:e?{transform:"rotate(-90deg)"}:{transform:"rotate(90deg)"},"data-event-category":"Health Tool","data-event-action":"Pregnancy Week Arrow Click","data-event-label":t,className:"pointer-event-child-none"},l.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))},wLeJ:function(e,t,a){a.r(t),a.d(t,{ProfileChatbot:function(){return ProfileChatbot},TabDataInit:function(){return y},TabName:function(){return r},UserType:function(){return o}});var n,l,r,o,i=a("fbRC"),s=a("q1tI"),d=a("wGEy"),c=a("m1fp"),u=a("uyts"),m=a("IQVP"),p=a("cMvO"),g=a("kd6S"),v=a("oTwY"),h=a("4JiQ"),b=a("GJr1"),f=a("/hDE");a("NmYn"),a("gY0P"),a("Wgwc"),a("QgiU"),a("rBCA");let C=(0,s.createContext)({}),Faqs=({faqs:e})=>{let[t,a]=(0,s.useState)([]),handleClick=e=>{if(t.includes(e)){let n=t.filter(t=>t!==e);a(n)}else a(t=>[...t,e])};return s.createElement("div",{className:"_0NhMo6T"},e.map((e,a)=>{let n=t.includes(a);return s.createElement("div",{className:"nrZtZ-u",key:a},s.createElement("div",{className:"faq-item",onClick:()=>handleClick(a)},s.createElement("div",{className:"faq-question",dangerouslySetInnerHTML:{__html:e.question||""}}),n?s.createElement(g.Z,null):s.createElement(v.Z,null)),s.createElement(h.U,{in:n,className:"faq-answer"},s.createElement("div",{dangerouslySetInnerHTML:{__html:e.answer||""}})))}))};var E={container:"_2ugC2Ll",body:"CCwRHCd",description:"RF63WXG",cardAuthorWrapper:"PIaeC0v"};let formatExperience=e=>e?{title:null==e?void 0:e.title,organization:null==e?void 0:e.organization,duration:e.duration}:{},formatEducation=e=>e?{completedYear:null==e?void 0:e.completed_year,schoolName:e.school_name,study:e.study}:{};(n=r||(r={}))[n.About=0]="About",n[n.Care=1]="Care",n[n.Answer=2]="Answer",n[n.Posts=3]="Posts",(l=o||(o={}))[l.Expert=0]="Expert",l[l.User=1]="User";let y={experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileChatbot=e=>{var{authorProps:t,authActionWrapper:a,onSkipQuestion:n,onCloseFromPost:l,onChatWithBot:r,showSkipQuestionTag:o,currentPageUrl:g}=e,v=(0,i._)(e,["authorProps","authActionWrapper","onSkipQuestion","onCloseFromPost","onChatWithBot","showSkipQuestionTag","currentPageUrl"]);let{data:{locale:h,userInfo:y,env:{isMarryBaby:w}}}=(0,s.useContext)(p.T),x=String(null==t?void 0:t.userId),[P,D]=(0,s.useState)(),[k,I]=(0,s.useState)(!1),[_,S]=(0,s.useState)(),[M,T]=(0,s.useState)([]),[F,L]=(0,s.useState)(""),O=(null==y?void 0:y._togetherUserId)===(null==t?void 0:t.userId),[N,R]=(0,s.useState)(1),B={value:String(N),dataList:[{value:"1",text:"FAQs",content:s.createElement(Faqs,{faqs:M})}],onTabChange:e=>R(Number(e))};return(0,s.useEffect)(()=>{(0,i.a)(void 0,void 0,void 0,function*(){var e,t,a,n,l,r,o,i,s,d,c;I(!0);let g=yield Promise.all([(0,p.c)((0,p.e)(m.yy.USER.DETAIL,{_locale:h,id:x}),"GET"),(0,p.c)((0,p.e)(m.yy.CHATBOT.PROFILE,{_locale:h}),"GET"),(0,p.c)((0,p.e)(m.yy.CHATBOT.FAQS_LIST,{_locale:h}),"GET")]),[v,b,f]=g,C={data:null==v?void 0:v.data,experiences:((null===(t=null===(e=null==v?void 0:v.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(formatExperience),relatedPosts:((null===(a=null==v?void 0:v.data)||void 0===a?void 0:a.related_post)||[]).map(e=>(0,u.g)(e.post)),educations:((null===(l=null===(n=null==v?void 0:v.data)||void 0===n?void 0:n.fields)||void 0===l?void 0:l.educations)||[]).map(formatEducation),awards:(null===(o=null===(r=null==v?void 0:v.data)||void 0===r?void 0:r.fields)||void 0===o?void 0:o.awards_accreditations)||[],contact:(null===(s=null===(i=null==v?void 0:v.data)||void 0===i?void 0:i.fields)||void 0===s?void 0:s.contact)||{}};(null==v?void 0:v.status)===1&&S(C),T((null===(d=null==f?void 0:f.data)||void 0===d?void 0:d.faqs)||[]),L((null===(c=null==b?void 0:b.data)||void 0===c?void 0:c.description)||""),I(!1)})},[]),s.createElement(C.Provider,{value:{isMarryBaby:w,siteType:w?"marryBaby":"helloSites",authorId:String((null==t?void 0:t.userId)||""),authActionWrapper:a,onSkipQuestion:n,info:_,authorProps:t,onCloseFromPost:l,countValues:P,setCountValues:D,isAuthorLogin:O,showSkipQuestionTag:o,currentPageUrl:g}},s.createElement("div",Object.assign({},v,{className:`${E.container} ${(null==v?void 0:v.className)||""}`,"data-is-marrybaby":w}),k?s.createElement(c.L,null):s.createElement(s.Fragment,null,s.createElement("div",{className:E.cardAuthorWrapper},s.createElement(b.C,Object.assign({},t,{className:"card-author",showDetailPopup:!1,showChatbotButton:h===f.L.Vietnam,onChatWithBot:r}))),s.createElement("div",{className:E.description,dangerouslySetInnerHTML:{__html:F}}),M.length>0&&s.createElement("div",{className:E.body},s.createElement(d.T,Object.assign({},B))))))}},LU4e:function(e,t,a){a.d(t,{C:function(){return CardPost},S:function(){return SourceList},V:function(){return VerifiedTag},a:function(){return CardPostPopoverMore},b:function(){return CardReply},c:function(){return CardReplyPopover}});var n=a("fbRC"),l=a("q1tI"),r=a("9B3w"),o=a("iHoF"),i=a("thIk"),s=a("ns0B"),d=a.n(s),c=a("HChT"),u=a("gC6A"),m=a("TUmP"),p=a("aZjv"),g=a("cMvO"),v=a("KERF"),h=a("rBCA"),b=a("oKqh"),f=a("iBNF"),C=a("uyts"),E=a("IQVP"),y=a("inbl"),w=a("GJr1"),x=a("SmZL"),P=a("XB+i"),D=a("gPi1"),k=a("uMQ2"),I=a("oTwY"),_=a("iZ8j"),S=a("e0pn"),M=a("LWwf"),T=a("PbOM"),F=a("bpvy"),L=a("5JWB"),O=a("F/Hd"),N=a("a2sD"),R=a("i6hl"),B=a("xrdX"),j="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3e%3cpath fill='%233E3F58' d='M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2'/%3e%3c/svg%3e",H="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='3' height='13' fill='none'%3e%3ccircle cx='1.583' cy='6.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 6.417)'/%3e%3ccircle cx='1.583' cy='1.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 1.417)'/%3e%3ccircle cx='1.583' cy='11.417' r='1.25' fill='%23595959' transform='rotate(90 1.583 11.417)'/%3e%3c/svg%3e",$="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.75' d='M2 4h12'/%3e%3cpath stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.334 1.334 0 0 1 1.334 1.334V4m2 0v9.333a1.334 1.334 0 0 1-1.334 1.334H4.667a1.334 1.334 0 0 1-1.334-1.334V4zM6.667 7.333v4M9.333 7.333v4'/%3e%3c/svg%3e";let CardPostPopoverMore=({authorEmail:e,onDeletePost:t,shareUrl:a,post:r,className:o="",popoverClassName:s="",onEditPost:d})=>{let{data:{locale:h,userInfo:b,env:{isMarryBaby:f}}}=(0,l.useContext)(g.T),{t:C}=(0,i.u)(),[E,y]=(0,l.useState)(!1),[w,x]=(0,l.useState)(!1),[P,D]=(0,l.useState)(!1),{authActionWrapper:k}=(0,p.iV)(),I=e&&(null==b?void 0:b.email)&&e===String(null==b?void 0:b.email);return l.createElement("div",{className:o,onClick:e=>{e.preventDefault(),e.stopPropagation()}},P&&l.createElement(c.S,{url:a,text:null==r?void 0:r.title,onClose:()=>D(!1)}),w&&l.createElement(c.P,{thumbnail:u.C.getAssetPath("trash-bin.svg"),isThumbnailIcon:!0,title:C("popup.deletePost.title"),description:C("popup.deletePost.description"),acceptText:C("popup.deletePost.accept"),cancelText:C("popup.deletePost.cancel"),onAccept:()=>(0,n.a)(void 0,void 0,void 0,function*(){if((null==r?void 0:r.id)&&!E){y(!0);try{let e=yield(0,c.h)({id:r.id,locale:h});(null==e?void 0:e.status)===1&&(null==t||t())}catch(e){}y(!1)}}),onClose:()=>x(!1)}),l.createElement(v.b,{className:s,toggleButtonContent:l.createElement("img",{src:f?j:H,loading:"lazy"}),position:"bottom",align:"end",buttonProps:{isLoading:E},data:I?{isShowheader:!1,type:"list",list:[{icon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M7.17 3.236H2.995a1.193 1.193 0 0 0-1.193 1.192v8.35a1.193 1.193 0 0 0 1.193 1.192h8.35a1.193 1.193 0 0 0 1.192-1.192V8.603'/%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M11.643 2.341a1.265 1.265 0 0 1 1.789 1.79L7.766 9.795l-2.385.596.596-2.385z'/%3e%3c/svg%3e",label:C("actionPopover.edit"),onClick:d},{icon:$,label:C("actionPopover.delete"),onClick:()=>{k(()=>x(!0))}}]}:{isShowheader:!1,type:"list",list:[{icon:c.i,label:C("morePopover.report"),subTree:{title:C("morePopover.report.title"),description:C("morePopover.report.description"),isShowheader:!0,type:"list",list:Object.keys(m.R).map(e=>({label:m.R[e].label,reason:m.R[e].reportReasonText,reasonValue:e})).map(e=>({label:C(e.label),subTree:{title:C("morePopover.reportSubmit.title"),description:C("morePopover.reportSubmit.description"),isShowheader:!0,type:"jsx",jsxRenderer:t=>l.createElement(c.b,{reason:e.reasonValue,reasonText:C(e.reason),postId:null==r?void 0:r.id,onClose:()=>t&&t(!1)})}}))}}]}}))},z=h.Z.div` position: relative; margin-bottom: 24px; background: white; border-radius: ${f.r.borderRadius}; a { text-decoration: none; } ${b.M.mbDown} { margin-bottom: 8px; } &.flat-top { border-top-left-radius: 0; border-top-right-radius: 0; } .post-pin { padding: 0.5rem 1rem; border-radius: ${f.r.borderRadius} 6px 0 0; } .post-author { display: flex; align-items: center; justify-content: space-between; &.comment { padding-right: 2.6rem; } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${b.M.mbDown} { width: 32px; height: 32px; font-size: 16px; } } } .post-content-link-wrapper { color: inherit; cursor: pointer; .post-content-title { padding: 1rem 1rem 0; word-break: break-word; } } .social-preview-wrapper.has-image { margin-bottom: 5px; } .social-preview-wrapper, .image-preview-wrapper, .link-preview-wrapper { width: 100%; &[data-is-reply='true'] { padding-right: 1rem; padding-left: 1rem; } } .post-topics { padding: 0 1rem; } .post-reaction { background: none; border-radius: 0 0 6px 6px; &.hide-top-border { ::before { display: none; } } } .most-engaging-wrapper { padding: 1rem; cursor: pointer; .author-avatar-wrapper { width: 2rem; height: 2rem; font-size: 1rem; } .see-more-comments { width: 100%; padding: 12px 0 0; text-align: unset; } } &[data-most-engaging='true'] { border: none; ${b.M.mbDown} { margin: 1rem; border: 1px solid #e4e8ec; } } .top-divider { border-color: #e4e8ec; } .popover { .popover-menu__btn { display: flex; width: 1.5rem; height: 1rem; align-items: center; justify-content: center; padding: 0; background: transparent; &:hover { background-color: transparent; } } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 12.5px; } } } } } &[data-is-marrybaby='true'] { border: 1px solid #f3f3f3; border-radius: 1rem; /* shadow */ box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.08); .image-preview-wrapper, .link-preview-wrapper { padding-right: 1rem; padding-left: 1rem; } .popover { .popover-menu__btn { width: 24px; height: 24px; ${b.M.mbDown} { width: 18px; height: 18px; } } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 1rem; } width: 350px; ${b.M.mbDown} { max-width: calc(320px - 2rem); } } } } } .most-engaging-wrapper { position: relative; padding: 0; &::before { position: absolute; z-index: 5; top: 0; left: 50%; width: calc(100% - 2rem); height: 1px; background: #f3f3f3; content: ' '; transform: translateX(-50%); } } ${b.M.mbDown} { margin-bottom: 12px; } } `;var A="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e";let CardReplyPopover=({onDeleteComment:e,commentId:t,className:a="",popoverClassName:r=""})=>{let{data:{env:{isMarryBaby:o},locale:s},action:{pushNotifications:d}}=(0,l.useContext)(g.T),{t:u}=(0,i.u)(),[m,h]=(0,l.useState)(!1),{authActionWrapper:b}=(0,p.iV)();return l.createElement("div",{className:a,onClick:e=>{e.preventDefault(),e.stopPropagation()}},m&&l.createElement(c.P,{thumbnail:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='17' fill='none'%3e%3cg stroke='%23737373' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' clip-path='url(%23a)'%3e%3cpath d='M2 4.008h12m-8.667 0V2.675a1.333 1.333 0 0 1 1.334-1.333h2.666a1.333 1.333 0 0 1 1.334 1.333v1.333m2 0v9.334a1.333 1.333 0 0 1-1.334 1.333H4.667a1.333 1.333 0 0 1-1.334-1.333V4.008zm-6 3.334v4m2.666-4v4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='a'%3e%3cpath fill='white' d='M0 .008h16v16H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",isThumbnailIcon:!0,title:u("popup.deleteComment.title"),description:u("popup.deleteComment.description"),acceptText:u("popup.deletePost.accept"),cancelText:u("popup.deletePost.cancel"),onAccept:()=>(0,n.a)(void 0,void 0,void 0,function*(){var a;if(!t)return;let n=yield(0,c.j)({id:t,locale:s});(null==n?void 0:n.status)===1?(e&&e(),d({title:"",message:u("notification.success"),type:"success"})):d({title:"",message:(null===(a=null==n?void 0:n.messages)||void 0===a?void 0:a[0])||u("notification.failure"),type:"danger"})}),onClose:()=>h(!1)}),l.createElement(v.b,{position:"bottom",align:"end",data:{isShowheader:!1,type:"list",list:[{icon:$,label:u("actionPopover.delete"),onClick:()=>{b(()=>{h(!0)})}}]},className:r,toggleButtonContent:l.createElement("img",{src:o?j:H,loading:"lazy"}),buttonProps:{}}))},Z=h.Z.div` .add-link { color: ${f.r.colors.primaryBase}; } `,U=h.Z.div` margin: 16px 0; background: ${f.r.colors.yellow50}; padding: 5px 10px; border-radius: 2px; .icon { display: inline-block; vertical-align: middle; margin-right: 6px; } `,V=h.Z.div` display: flex; align-items: center; gap: 8px; `,G=h.Z.div` padding: 8px 16px; `,Q=h.Z.div` margin-bottom: 12px; width: 100%; `,q=h.Z.div``,W=h.Z.div` margin-bottom: 16px; `,Y=h.Z.div` display: flex; flex-wrap: wrap; row-gap: 16px; ${b.M.tdUp} { align-items: center; column-gap: 24px; } `,K=h.Z.a` display: flex; align-items: center; gap: 16px; ${b.M.mbDown} { width: 100%; justify-content: space-between; } `,X=h.Z.div` display: flex; align-items: center; gap: 16px; `,J=h.Z.div` border-radius: ${f.r.borderRadius}; overflow: hidden; width: 48px; height: 48px; img { object-fit: cover; width: 100%; height: 100%; } `,RecommentCategories=({categories:e})=>{let{t}=(0,i.u)(),{data:{locale:a,env:{isMarryBaby:n}}}=(0,l.useContext)(g.T),r=(0,R.g)(a,n);return l.createElement(q,null,l.createElement(W,null,l.createElement(o.H,{tag:"h6",as:"h5"},t("cardReply.recommentCategories.heading"))),l.createElement(Y,null,e.map(e=>l.createElement(K,{href:r+e.permalink,key:String(e.termId),target:"_blank"},l.createElement(X,null,l.createElement(J,null,l.createElement("img",{src:e.featureImage||u.C.getAssetPath(n?"mb-logo.svg":"/logo/logomark.png"),alt:e.displayName,loading:"lazy"})),l.createElement(O.T,{size:"s3",weight:"bold"},e.displayName)),l.createElement(_.Z,{size:20,color:f.r.colors.gray400})))))},ee=h.Z.a` padding: 12px 0; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid ${f.r.colors.neutral100}; text-decoration: none; &:first-child { border-top: 0; } `,SourceItem=({postTitle:e,articleReviewed:t,modifiedTime:a,href:n})=>{let{t:r}=(0,i.u)(),o=(()=>{let{expert:e,editor:a,is_author:n}=t;if(e){let t={name:e.display_name,role:"expert",avatar:e.avatar};return n?Object.assign({title:r("articleAuthor.title.written-by")},t):"expert"===e.role?Object.assign({title:r("articleAuthor.title.expert")},t):Object.assign({title:r("articleAuthor.title.medical")},t)}if(a)return{title:r("articleAuthor.title.fact-check"),name:a.display_name,avatar:a.avatar}})();return l.createElement(ee,{href:n,title:e,target:"_blank"},l.createElement(O.T,{size:"s3",as:"h5",weight:"bold"},e),l.createElement("div",null,l.createElement(w.C,{avatar:null==o?void 0:o.avatar,avatarProps:{size:32},name:null==o?void 0:o.name,role:null==o?void 0:o.role,hideBackground:!0},l.createElement(w.C.SubTextRow,null,l.createElement(w.C.SubText,null,null==o?void 0:o.title," ",l.createElement("span",{style:{color:f.r.colors.gray800}},null==o?void 0:o.name)),l.createElement(w.C.SubDivider,null),l.createElement(w.C.SubText,null,a)))))};var et={header:"F4mmgSy",chevron:"A7QrQ7A"};let SourceList=e=>{var{listUrl:t,hideSourceList:a,categorySlug:s,editMode:d,collapseSource:c,onListChange:m,isMarryBaby:p}=e,v=(0,n._)(e,["listUrl","hideSourceList","categorySlug","editMode","collapseSource","onListChange","isMarryBaby"]);let{t:h}=(0,i.u)(),[b,y]=(0,l.useState)(t||[]),[w,x]=(0,l.useState)([]),[P,D]=(0,l.useState)([]),[k,_]=(0,l.useState)(!1);(0,l.useEffect)(()=>{a||(0,n.a)(void 0,void 0,void 0,function*(){_(!0);let e=b.map(e=>{let t=new URL(e),a=String(t.pathname).split("/").filter(e=>""!=e),n=t.origin,l=-1!==n.search("marrybaby.vn");return{isMarrySite:l,path:a[a.length-1],href:e}}),t=[...e.map(e=>(0,g.c)(e.isMarrySite?(0,g.s)(E.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0):(0,g.o)(E.D9.GET_PREVIEW_ARTICLE,{fullSlug:e.path},!0),"GET"))],a=yield Promise.all(t);x(a.map((t,a)=>{var n,l;return(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.post)&&Object.assign(Object.assign({},(0,C.g)(null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.post)),{href:e[a].href})}).filter(Boolean)),_(!1)})},[]),(0,l.useEffect)(()=>{!a&&(null==w?void 0:w.length)===0&&s&&(0,n.a)(void 0,void 0,void 0,function*(){var e;let t=yield(0,g.c)(p?(0,g.s)(E.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:s},!0):(0,g.o)(E.D9.GET_CATEGORY_OR_ARTICLE_DETAIL,{fullSlug:s},!0),"GET");(null==t?void 0:t.data)&&D([(0,C.h)(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.category)])})},[w]);let handleRemoveItem=e=>{y(t=>{let a=[...t];return a.splice(e,1),a}),x(t=>{let a=[...t];return a.splice(e,1),a})};return(0,l.useEffect)(()=>{null==m||m(b)},[b]),l.createElement("div",Object.assign({},v),!d&&l.createElement(U,null,l.createElement("img",{className:"icon",src:u.C.getAssetPath("warning.svg"),alt:"warning",style:{marginBottom:"3px",width:"18px"},loading:"lazy"}),l.createElement(O.T,{size:"s3",as:"span",dangerouslySetInnerHTML:{__html:h("cardReply.disclaimer")}})),a?null:k?l.createElement(N.L,null):w.length>0||d?l.createElement(Z,null,l.createElement(F.U,{defaultValue:!c&&"accordion",styles:{control:{borderRadius:"inherit",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,borderBottom:0,borderTop:`1px solid ${f.r.colors.neutral100}`},item:{marginBottom:"16px",borderTopLeftRadius:"8px",borderTopRightRadius:"8px",border:`1px solid ${f.r.colors.neutral100}`,borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px","&[data-active]":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},chevron:l.createElement("div",{className:et.chevron},l.createElement(S.Z,{color:f.r.colors.gray600,size:20}))},l.createElement(F.U.Item,{value:"accordion"},l.createElement(F.U.Control,null,l.createElement("div",{className:et.header},l.createElement(o.H,{as:"h4",tag:"h6"},h("cardReply.source")))),l.createElement(F.U.Panel,null,l.createElement(G,null,(w||[]).map((e,t)=>l.createElement(V,{key:String(t)},"object"==typeof e?l.createElement(SourceItem,Object.assign({},e)):l.createElement(Q,null,l.createElement(L.I,{style:{width:"100%"},name:"source-list",value:e||"",size:"sm",onChange:e=>{y(a=>{let n=[...a];return n[t]=e,n}),x(a=>{let n=[...a];return n[t]=e,n})}})),d&&l.createElement(r.B,{size:"md",color:"transparent",icon:l.createElement(M.Z,null),onClick:()=>handleRemoveItem(t)}))),d&&l.createElement(r.B,{className:"add-link",color:"transparent",size:"md",icon:l.createElement(I.Z,{color:f.r.colors.primaryBase,size:18}),onClick:()=>{y(e=>[...e,""]),x(e=>[...e,""])}},"Add source")))))):l.createElement(RecommentCategories,{categories:P}))},ea=h.Z.div` position: relative; margin-bottom: 0; background: white; border-radius: ${f.r.borderRadius}; .verify-tag { margin-top: 12px; } .post-author { &.with-popover { padding-right: 2.6rem; } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${b.M.mbDown} { width: 32px; height: 32px; font-size: 16px; } } } .image-preview-wrapper, .link-preview-wrapper { width: 100%; &[data-is-reply='true'] { padding-right: 1rem; padding-left: 1rem; } } .post-reaction { background: none; border-radius: 0 0 6px 6px; } &[data-is-reply='true'] { > .post-author .author-avatar-wrapper { width: 20px; height: 20px; font-size: 10px; } } &[data-is-reply='false'] { border: 1px solid #e4e8ec; } .expert-wrapper { width: 100%; } &[data-has-booking='true'] { display: grid; .post-author { background-color: ${f.r.colors.primary50}; } .btn-wrapper { padding: 0 16px; .btn-booking { width: 100%; margin: 12px 0; } } } .comment-reply-wrapper { padding: 0 1rem; .more-cmt { .chevron-right { height: 1rem; width: 1rem; vertical-align: middle; } } } .top-divider { border-color: #e4e8ec; } .popover { position: absolute; top: 1.5rem; right: 1rem; .popover-menu__btn { display: flex; width: 1rem; height: 1rem; align-items: center; justify-content: center; padding: 0; background: transparent; &:hover { background-color: transparent; } .popover-menu__content { &.--position-bottom { &.--align-end { &::before { right: 12.5px; } } } } } } &[data-is-marrybaby='true'] { &[data-is-reply='false'] { border: none; } .image-preview-wrapper, .link-preview-wrapper { padding-right: 1rem; padding-left: 1rem; } .popover { .popover-menu__btn { width: 24px; height: 24px; } } margin-left: 56px; ${b.M.mbDown} { margin-left: 40px; } > .post-author { margin-left: -56px; ${b.M.mbDown} { margin-left: -40px; } .author-info { align-items: center; display: flex; align-items: center; .author-info-top { width: 100%; } .author-info-text-wrapper { justify-content: space-between; } } .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${b.M.mbDown} { width: 24px; height: 24px; font-size: 12px; } } } &[data-is-reply] { > .post-author { .author-avatar-wrapper { width: 40px; height: 40px; font-size: 20px; ${b.M.mbDown} { width: 24px; height: 24px; font-size: 12px; } } } } .comment-reply-wrapper { padding-right: 0; padding-left: 0; } .post-reaction { &::after { position: absolute; bottom: 0; left: 50%; width: calc(100% - 2rem); height: 1px; background: #f3f3f3; content: ' '; transform: translateX(-50%); } } .post-content-wrapper { padding-top: 0; padding-bottom: 0; ${b.M.mbDown} { padding-left: 0.5rem; } } ${b.M.mbDown} { margin-bottom: 12px; } } `,en=(0,h.Z)(SourceList)` margin-top: 12px; padding: 0.5rem 1rem 1rem; `,VerifiedTag=({userId:e,avatar:t,name:a,role:n,title:o,className:s})=>{let{t:d}=(0,i.u)(),[c,u]=(0,l.useState)(!1);return l.createElement(l.Fragment,null,l.createElement(r.B,{className:`-dzIuHr ${s}`,color:"success",size:"xs",onClick:()=>u(!0),style:{padding:"5px 8px",marginBottom:"12px",borderRadius:"4px"}},l.createElement("span",{className:"text"},l.createElement(T.Z,{isSolid:!0,size:18,color:f.r.colors.green800,className:"icon"}),d("cardReply.verifyBy",{name:`${a||""}`}))),l.createElement(w.c,{open:c,onClose:()=>u(!1),profileModalProps:{zIndex:1e3}},l.createElement(x.a,{authorProps:{userId:e,avatar:t,name:a,role:n,title:o},hideQuestionTab:!0})))},CardReply=({className:e,style:t,comment:a,type:o="comment",level:s=0,replyingId:d,onPostCommentSuccess:u,post:m,onDeleteComment:h,refetchComment:b,hasQuickBookingEnable:f,handleMakeAppointment:C,cardAuthorProps:D,maxChars:I=600,disableShortenContent:_})=>{var S,M,T,F,L,O,N,R,j,H,$,z,A;let{data:{locale:Z,userInfo:U,env:{isMarryBaby:V}}}=(0,l.useContext)(g.T),{t:G}=(0,i.u)(),[Q,q]=(0,l.useState)(a||null),{id:W,countLikes:Y,content:K,replies:X=[],images:J=[],author:ee,liked:et,link:el,mentionedUser:er,mentions:eo}=Q,{text:ei,replyingTo:es}=(0,c.k)(K),{authActionWrapper:ed}=(0,p.iV)({_joinCommunityIds:[null===(S=null==m?void 0:m.community)||void 0===S?void 0:S.id],_joinTopicIds:null===(M=null==m?void 0:m.topics)||void 0===M?void 0:M.map(e=>e.id)}),[ec,eu]=(0,l.useState)(4),em=null!=U&&!!U.id&&(null==X?void 0:X.some(e=>e.author.id===U.id)),addNewReply=e=>{q(t=>{if(!t.replies.find(t=>t.id===e.id)){t.replies.unshift(e);let a=Object.assign(Object.assign({},t),{replies:t.replies.slice(),countReplies:t.countReplies+1});return b&&b(a),a}return t})},[ep,eg]=(0,l.useState)(!1),ev=(0,l.useMemo)(()=>"comment"===o&&X&&0!=X.length?X.sort((e,t)=>{let a=new Date(e.createdAt).getTime(),n=new Date(t.createdAt).getTime();return a>n?-1:a{var e,t;(null==ee?void 0:ee.hospitalId)&&(e=ee.hospitalId,(0,n.a)(void 0,void 0,void 0,function*(){var t;let a=yield(0,g.c)((0,g.g)(E.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:B.v[Z]}),"get");(null===(t=null==a?void 0:a._data)||void 0===t?void 0:t.branch)&&eP(null==a?void 0:a._data.branch)})),(null==ee?void 0:ee.doctorId)&&(t=ee.doctorId,(0,n.a)(void 0,void 0,void 0,function*(){var e;let a=yield(0,g.c)((0,g.g)(E.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:B.v[Z]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&ek(null==a?void 0:a._data.doctor)}))},[ee.hospitalId,ee.doctorId]);let eI=(null==eD?void 0:eD.valid_outpatient)||(null==eD?void 0:eD.valid_telemedicine),e_=((null==ex?void 0:ex.total_available_service)||(null==ex?void 0:ex.total_available_doctor))>0,eS=f&&(eI||e_),eM=(null===(F=null==Q?void 0:Q.author)||void 0===F?void 0:F.type)==="chatbot";return l.createElement(p.I_,{defaultParams:{_joinCommunityIds:[null===(L=null==m?void 0:m.community)||void 0===L?void 0:L.id],_joinTopicIds:null===(O=null==m?void 0:m.topics)||void 0===O?void 0:O.map(e=>e.id)}},l.createElement(ea,{className:e,style:t,"data-is-reply":!!s,"data-is-marrybaby":V,"data-has-booking":eS},"reply"===o&&l.createElement(k.D,{className:"top-divider",type:"solid"}),l.createElement("div",{style:{padding:"16px 16px 0"}},l.createElement(w.C,Object.assign({avatar:eE,name:ef,username:eC,timeText:null==m?void 0:m.createdTime,community:null==m?void 0:m.community,className:`post-author ${eb?"with-popover":""}`,type:o,userId:null==ee?void 0:ee.id,role:ey,expertId:null==ee?void 0:ee.partnerId,title:null==ee?void 0:ee.title,doctorId:null==ee?void 0:ee.doctorId,hospitalId:null==ee?void 0:ee.hospitalId,hasQuickBooking:eS,handleMakeAppointment:C,isAnonymous:(null==Q?void 0:Q.isAnonymous)||!!(null==m?void 0:m.isAnonymous)&&(null===(N=null==m?void 0:m.author)||void 0===N?void 0:N.username)===(null==ee?void 0:ee.username),hideBackground:eM,userType:null==ee?void 0:ee.type},D)),!!(null==Q?void 0:Q.isVerify)&&!(null==Q?void 0:Q.isOppose)&&l.createElement(VerifiedTag,{title:null===(R=null==Q?void 0:Q.userVerify)||void 0===R?void 0:R.title,name:null===(j=null==Q?void 0:Q.userVerify)||void 0===j?void 0:j.name,userId:null===(H=null==Q?void 0:Q.userVerify)||void 0===H?void 0:H.id,role:null===($=null==Q?void 0:Q.userVerify)||void 0===$?void 0:$.role,avatar:null===(z=null==Q?void 0:Q.userVerify)||void 0===z?void 0:z.avatar,className:"verify-tag"})),l.createElement(x.P,{className:"post-content-wrapper",replyingTo:es,mentionedUser:er,description:ei,mentions:ew,maxChars:I,disableShortenContent:_}),l.createElement("span",null),l.createElement("span",null),J&&J.length>0?l.createElement("div",{key:"image-preview",className:"image-preview-wrapper","data-is-reply":!0},l.createElement(P.a,{images:J,authorName:null==ee?void 0:ee.username})):null,(!J||0===J.length)&&el?l.createElement("div",{key:"link-preview",className:"link-preview-wrapper","data-is-reply":!0},l.createElement(y.C,{url:el})):null,"most-engaging"!==o?l.createElement(l.Fragment,null,eM&&l.createElement(en,{listUrl:null==Q?void 0:Q.source,categorySlug:null==Q?void 0:Q.categorySlug}),l.createElement(v.C,{type:v.c.reply,loveCount:Y,replyCount:eh,className:"post-reaction",liked:et,isReplied:em,hideCommentIcon:"reply"===o||eM,hasShare:!1,onCommentClick:()=>ed(()=>eg(e=>!e)),onCommentCountClick:()=>ed(()=>{eg(!0)}),onLikeClick:()=>ed(()=>(0,n.a)(void 0,void 0,void 0,function*(){if(W){let e=yield(0,c.l)({commentId:W,setLike:!et,locale:Z});1===e.status&&q(e=>Object.assign(Object.assign({},e),{liked:!et,countLikes:e.countLikes+(et?-1:1)}))}}))}),ep&&l.createElement(c.I,{replyingId:d||Q.id,replyToName:ef,isReply:!0,onClose:()=>eg(!1),onPostSuccess:e=>{"reply"===o?u&&u(e):addNewReply(e)},post:m,replyingUser:ee}),"comment"===o&&X&&X.length>0?l.createElement("div",{className:"comment-reply-wrapper"},null===(A=null==ev?void 0:ev.slice(0,ec))||void 0===A?void 0:A.map(e=>l.createElement(CardReply,{key:e.id,comment:e,type:"reply",className:"comment-reply-item",level:s+1,replyingId:W,onPostCommentSuccess:addNewReply,post:m,onDeleteComment:()=>{q(t=>Object.assign(Object.assign({},t),{replies:t.replies.filter(t=>t.id!==e.id),countReplies:t.countReplies-1}))},handleMakeAppointment:C,hasQuickBookingEnable:f})),eh>ec&&l.createElement(l.Fragment,null,l.createElement(k.D,{className:"top-divider",type:"solid"}),l.createElement(r.B,{className:"more-cmt",size:"lg",color:"ghost",onClick:()=>eu(e=>e+4)},G("comment.seeMoreReplies",{count:eh-ec}),l.createElement("img",{className:"chevron-right",src:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3e%3cpath stroke='%232D87F3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 12 4-4-4-4'/%3e%3c/svg%3e",loading:"lazy"})))):null):null,eb&&l.createElement(CardReplyPopover,{onDeleteComment:h,className:"popover",commentId:Q.id})))},getMostEngagingComment=(e,t)=>(0,n.a)(void 0,void 0,void 0,function*(){var a,n,l;let r=yield(0,g.t)((0,g.e)(E.yy.COMMENT.LIST,{postId:e,_locale:t,sort:"popularity",perPage:1,withoutReply:1}),"GET");return null===(l=null===(n=null===(a=null==r?void 0:r.data)||void 0===a?void 0:a.comments)||void 0===n?void 0:n.map(C.e))||void 0===l?void 0:l[0]}),CardPost=({className:e,style:t,hideViewMoreComment:a,showMostEngaging:s,onCommentClick:u,onCommentCountClick:h,onMostEngagingCommentClick:b,onPostCommentSuccess:f,disableCardLink:C,disableShortenContent:k,onDeletePost:I,onEditPost:_,post:S,mostEngagingComment:M,onDeleteComment:T,showInputComment:F,InlineCommentsComponent:L,hasQuickBookingEnable:O,handleMakeAppointment:N,onSaveUnsaveSuccess:R,cardAuthorProps:B,verticalReactions:j=!1})=>{let[H,$]=(0,l.useState)(S),[Z,U]=(0,l.useState)(!1),[V,G]=(0,l.useState)(M),{community:Q,topics:q,author:W,slug:Y,isPin:K,liked:X,photos:J,mentions:ee,title:et,description:ea,previewUrl:en,likesCount:el,commentsCount:er,id:eo,commented:ei}=H,{data:{locale:es,togetherUserId:ed,userInfo:ec,env:{isMarryBaby:eu,togetherBasePath:em}},action:{pushNotifications:ep}}=(0,l.useContext)(g.T),eg=!!(null==ec?void 0:ec.id),{t:ev}=(0,i.u)(),[eh,eb]=(0,l.useState)(F),ef=`${em}/${(null==Q?void 0:Q.slug)||"_"}/${Y||""}`,eC=`${(0,g.k)(es)}${ef}`,{authActionWrapper:eE}=(0,p.iV)((null==Q?void 0:Q.slug)?{_joinCommunityIds:[Q.id],_joinTopicIds:null==q?void 0:q.map(e=>e.id)}:void 0),[ey,ew]=(0,l.useState)(!1);(0,l.useEffect)(()=>{eb(F)},[F]);let ex=(null==W?void 0:W.name)||(null==W?void 0:W.username)||"",eP=(null==W?void 0:W.username)||(null==W?void 0:W.name)||"",eD=null==W?void 0:W.avatar,ek=(null==H?void 0:H.isAnonymous)?void 0:null==W?void 0:W.role,[eI,e_]=(0,l.useState)(null),[eS,eM]=(0,l.useState)(null);(0,l.useEffect)(()=>{var e,t;(null==W?void 0:W.hospitalId)&&(e=W.hospitalId,(0,n.a)(void 0,void 0,void 0,function*(){var t;let a=yield(0,g.c)((0,g.g)(E.tC.GET_HOSPITAL_INFO,{hospital_branch_id:e,website_url:g.l[es]}),"get");(null===(t=null==a?void 0:a._data)||void 0===t?void 0:t.branch)&&e_(null==a?void 0:a._data.branch)})),(null==W?void 0:W.doctorId)&&(t=W.doctorId,(0,n.a)(void 0,void 0,void 0,function*(){var e;let a=yield(0,g.c)((0,g.g)(E.tC.GET_DOCTOR_INFO,{doctorId:t,website_url:g.l[es]}),"get");(null===(e=null==a?void 0:a._data)||void 0===e?void 0:e.doctor)&&eM(null==a?void 0:a._data.doctor)}))},[W.hospitalId,W.doctorId]);let eT=(null==eS?void 0:eS.valid_outpatient)||(null==eS?void 0:eS.valid_telemedicine),eF=((null==eI?void 0:eI.total_available_service)||(null==eI?void 0:eI.total_available_doctor))>0;(0,l.useEffect)(()=>{(0,n.a)(void 0,void 0,void 0,function*(){if(eo&&er&&s&&!(null==M?void 0:M.id)){let e=yield getMostEngagingComment(eo,es);G(e)}})},[eo,es,er,s,null==M?void 0:M.id]),(0,l.useEffect)(()=>{G(M)},[null==M?void 0:M.id]);let onDeleteComment=e=>(0,n.a)(void 0,void 0,void 0,function*(){if(er>1&&(null==V?void 0:V.id)&&(null==V?void 0:V.id)===(null==e?void 0:e.id)){let e=yield getMostEngagingComment(eo,es);G(e)}$(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount-1})),T&&T(e)});return l.createElement(p.I_,{defaultParams:(null==Q?void 0:Q.slug)?{_joinCommunityIds:[Q.id],_joinTopicIds:null==q?void 0:q.map(e=>e.id)}:void 0},Z&&l.createElement(c.S,{url:eC,avatar:m.D,text:et,onClose:()=>U(!1)}),l.createElement(z,{className:e,style:t,"data-is-marrybaby":eu},K?l.createElement(v.a,{className:"post-pin"}):null,l.createElement("div",{style:{position:"relative",padding:"1rem 1rem 0"}},l.createElement(w.C,Object.assign({avatar:eD,name:ex,username:eP,url:C?void 0:ef,community:Q,timeText:null==H?void 0:H.createdTime,className:"post-author",role:ek,userId:null==W?void 0:W.id,expertId:null==W?void 0:W.partnerId,doctorId:null==W?void 0:W.doctorId,hospitalId:null==W?void 0:W.hospitalId,title:null==W?void 0:W.title,hasQuickBooking:O&&(eT||eF),handleMakeAppointment:N,"data-testid":"name",isAnonymous:!!(null==H?void 0:H.isAnonymous),extendEle:l.createElement(CardPostPopoverMore,{authorEmail:String(null==W?void 0:W.email),onDeletePost:I,shareUrl:eC,post:H,className:"popover",onEditPost:_})},B))),l.createElement("a",{href:C?void 0:ef,className:"post-content-link-wrapper"},et&&l.createElement(o.H,{className:"post-content-title",as:"h2",tag:"h5",fontWeight:"bold","data-testid":"Title of the Post"},d()(et)),l.createElement(x.P,{className:"post-content-wrapper",description:ea,disableShortenContent:k,mentions:ee,"data-testid":"Content of the Post"})),l.createElement("span",null),l.createElement("span",null),l.createElement("div",{key:"tag-topic"},q&&q.length>0?l.createElement(v.T,{topics:q,className:"post-topics"}):null),l.createElement("div",{key:"social-preview"},(null==H?void 0:H.introUrl)?l.createElement("div",{className:`social-preview-wrapper ${(null==J?void 0:J.length)?"has-image":""}`},l.createElement(D.S,{url:H.introUrl,image:H.bannerImage})):null),l.createElement("div",{key:"image-preview"},(null==J?void 0:J.length)?l.createElement("div",{className:"image-preview-wrapper"},l.createElement(P.a,{images:J,authorName:null==W?void 0:W.name,isSensitive:!!(null==H?void 0:H.isSensitive)})):null),l.createElement("div",{key:"link-preview"},(null==H?void 0:H.introUrl)||(null==J?void 0:J.length)||null==en||!en.url?null:l.createElement("div",{className:"link-preview-wrapper"},l.createElement(y.C,{title:en.title,url:en.url,image:en.image}))),l.createElement(v.C,{isMarryBaby:eu,type:v.c.post,loveCount:el,replyCount:er,className:`post-reaction ${(null==J?void 0:J.length)||(null==en?void 0:en.url)?"hide-top-border":""}`,liked:ey?!X:X,isReplied:ei,isSaved:(null==H?void 0:H.bookmarked)||!1,onCommentClick:()=>eE(()=>{u?u():eb(e=>!e)}),onCommentCountClick:()=>{eE(()=>{eu?eb(!0):h?h():C||(window.location.href=ef)})},onShareClick:()=>{U(!0)},onLikeClick:()=>(0,n.a)(void 0,void 0,void 0,function*(){eE(()=>(0,n.a)(void 0,void 0,void 0,function*(){if(eo&&!ey){ew(!0);try{let e=yield(0,c.m)({id:eo,locale:es});(null==e?void 0:e.status)!==1?ep((0,c.g)(ev)):$(e=>Object.assign(Object.assign({},e),{likesCount:(e.likesCount||0)+(e.liked?-1:1),liked:!e.liked}))}catch(e){ep((0,c.g)(ev))}ew(!1)}}))}),onSaveClick:()=>{eE(()=>(0,n.a)(void 0,void 0,void 0,function*(){if((null==ec?void 0:ec.id)&&(null==H?void 0:H.id)){if(null==H?void 0:H.bookmarked){let e=yield(0,g.b)((0,g.e)(E.yy.BOOKMARK.DELETE,{_locale:es}),"DELETE",{headers:{"Content-Type":"application/json"},data:{post_id:String(H.id)}});(null==e?void 0:e.status)===1?(ep({title:"",message:ev("post.remove.success"),type:"success",displayIcon:A}),null==R||R()):ep({title:"",message:ev("post.remove.failed"),type:"danger",displayIcon:A})}else{let e=yield(0,g.b)((0,g.e)(E.yy.BOOKMARK.CREATE,{_locale:es}),"POST",{headers:{"Content-Type":"application/json"},data:{user_id:ed||ec.id,post_id:H.id}});(null==e?void 0:e.status)===1?(ep({title:"",message:ev("post.save.success"),type:"success",displayIcon:"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23595959'%3e%3cpath stroke='%23595959' stroke-linecap='round' stroke-linejoin='round' d='M12 13.333 8 10.37l-4 2.963V3.852c0-.314.12-.616.335-.838.214-.222.505-.347.808-.347h5.714c.303 0 .594.125.808.347s.335.524.335.838z'/%3e%3c/svg%3e"}),null==R||R()):ep({title:"",message:ev("post.save.failed"),type:"danger",displayIcon:A})}}}))},onGoToUrl:e=>{let t=e?`${eC}${e}`:eC;eg?window.location.href=t:eE(()=>window.location.href=t)},showingMostEngaging:!!(s&&(null==V?void 0:V.id)),isVertical:j}),eh&&l.createElement(c.I,{isMainCmt:!F,onClose:()=>eb(!1),onPostSuccess:e=>{0!==er||(null==V?void 0:V.id)||G(e),$(e=>Object.assign(Object.assign({},e),{commentsCount:e.commentsCount+1,commented:!0})),f&&f(e)},post:H}),s&&(null==V?void 0:V.id)?l.createElement("div",{className:"most-engaging-wrapper",onClick:e=>{b?(e.stopPropagation(),b()):window.location.href=ef}},l.createElement(CardReply,{hasQuickBookingEnable:O,handleMakeAppointment:N,comment:V,post:H,onDeleteComment:()=>{onDeleteComment&&onDeleteComment(V)},className:"most-engaging-comment",type:"most-engaging",key:V.id,cardAuthorProps:B}),er>1&&!a&&l.createElement(r.B,{className:"see-more-comments",color:"ghost",size:"md"},ev("comment.seeMoreComments",{count:er-1}))):null,L))}},XmEH:function(e,t,a){a.d(t,{U:function(){return UserAvatar}});var n=a("fbRC"),l=a("q1tI"),r=a("cMvO"),o=a("rBCA"),i=a("iBNF");let s=o.Z.div` width: ${e=>e.size||40}px; height: ${e=>e.size||40}px; flex-shrink: 0; cursor: pointer; img { border-radius: 50%; } .avatar { width: 100%; height: 100%; object-fit: cover; } .avatar-default { display: flex; align-items: center; justify-content: center; background-color: ${i.r.colors.secondaryBase}; border-radius: 50%; color: white; font-size: 1em; font-weight: bold; line-height: 1; } &[data-is-marrybaby='true'] { .avatar-default { background-color: ${i.r.mbColors.pink}; } } `,UserAvatar=e=>{var{className:t,isMarryBaby:a,style:o,avatar:i,username:d,size:c}=e,u=(0,n._)(e,["className","isMarryBaby","style","avatar","username","size"]);let{data:{env:{isMarryBaby:m}}}=(0,l.useContext)(r.T),[p,g]=(0,l.useState)(!1);return l.createElement(s,Object.assign({"data-is-marrybaby":"boolean"==typeof a?a:m,className:t,style:o,size:c},u),i&&!p?l.createElement("img",{loading:"lazy",src:i,className:"avatar",alt:"avatar",onError:()=>{p||g(!0)}}):l.createElement("div",{className:"avatar avatar-default"},d&&(null==d?void 0:d.length)>0?d[0].toUpperCase():"A"))}},lOMy:function(e,t,a){a.d(t,{A:function(){return AuthorBadge},B:function(){return BookingBtn}});var n=a("fbRC"),l=a("q1tI"),r=a("thIk"),o=a("/npG"),i=a("Hcbr"),s=a("DXMQ"),d=a("G5av"),c=a("cMvO"),u=a("xrdX"),m=a("GOBr"),p=(0,o.k)(e=>({root:{display:"inline-block",flexShrink:0,padding:"2px 0.5rem",marginLeft:"4px",borderRadius:e.radius.xs,fontSize:"12px",fontWeight:400,lineHeight:"18px",'&[data-label-type="admin"]':{background:e.primaryColor[0],color:e.primaryColor[9]},'&[data-label-type="local admin"]':{background:e.primaryColor[8]},'&[data-label-type="ambassador"]':{background:e.colors.green[4]},'&[data-label-type="expert"]':{background:e.colors.yellow[6]},'&[data-label-type="moderator"]':{background:e.colors.red[0],color:e.colors.red[8]},'&[data-label-type="sponsor"]':{background:e.colors.teal[4]},'&[data-label-type="guide"]':{background:e.colors.teal[4]},'&[data-label-type="influencer"]':{background:e.colors.teal[4]}}}));let g={admin:"cardAuthor.admin",moderator:"cardAuthor.moderator",ambassador:"cardAuthor.ambassador",expert:"cardAuthor.expert",sponsor:"cardAuthor.sponsor",guide:"cardAuthor.guide",influencer:"cardAuthor.influencer"},looselyMatchRole=e=>["admin","moderator","ambassador","expert","sponsor","guide","influencer"].find(t=>t===e),AuthorBadge=e=>{var{siteType:t,role:a,title:o,styles:i,className:s}=e,d=(0,n._)(e,["siteType","role","title","styles","className"]);let{t:c}=(0,r.u)(),u=a?looselyMatchRole(a):"",{classes:m,cx:v}=p(void 0,{name:"AuthorBadge",styles:i});return u&&g[u]?l.createElement("div",Object.assign({className:v(m.root,s),"data-label-type":u,"data-is-marrybaby":"marryBaby"===t},d),o||c(g[u])):null},BookingBtn=e=>{var{label:t,bookingId:a,bookingType:o="doctor",locale:p="vi-VN"}=e,g=(0,n._)(e,["label","bookingId","bookingType","locale"]);let{t:v}=(0,r.u)(),[h,b]=(0,l.useState)(!1),f=(0,l.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]),C=(0,l.useCallback)(()=>(0,n.a)(void 0,void 0,void 0,function*(){var e,t,n,l,r,d,g,v,h,f,C,E,y,w,x;let P="doctor"===o?i.P.GET_DOCTOR_DETAIL:"hospital"===o?i.P.GET_HOSPITAL_DETAIL:"service"===o?i.P.GET_SERVICE_DETAIL:"";try{b(!0);let i=yield(0,c.c)((0,c.g)(P,{id:a,site:u.v[p]}),"get");if((null==i?void 0:i._status)===1){let a="doctor"===o?{id:null===(t=null===(e=null==i?void 0:i._data)||void 0===e?void 0:e.doctor)||void 0===t?void 0:t.id,slug:null===(l=null===(n=null==i?void 0:i._data)||void 0===n?void 0:n.doctor)||void 0===l?void 0:l.slug,localSlug:null===(r=s.L[p])||void 0===r?void 0:r.DOCTOR}:"hospital"===o?{id:null===(g=null===(d=null==i?void 0:i._data)||void 0===d?void 0:d.branch)||void 0===g?void 0:g.id,slug:null===(h=null===(v=null==i?void 0:i._data)||void 0===v?void 0:v.branch)||void 0===h?void 0:h.slug,localSlug:null===(f=s.L[p])||void 0===f?void 0:f.HOSPITAL}:{id:null===(E=null===(C=null==i?void 0:i._data)||void 0===C?void 0:C.service)||void 0===E?void 0:E.id,slug:null===(w=null===(y=null==i?void 0:i._data)||void 0===y?void 0:y.service)||void 0===w?void 0:w.slug,localSlug:null===(x=s.L[p])||void 0===x?void 0:x.SERVICE};window.location.href=`https://${m.y?"":"discover."}${u.v[p]}/care/${a.localSlug}/${a.slug}-${a.id}/`}else b(!1)}catch(e){console.log(e),b(!1)}}),[]);return a&&o?l.createElement(d.B,Object.assign({dataEventCategory:"Care",dataEventAction:"Comment - Quick Booking",dataEventLabel:f,onClick:C,loading:h},g),t||v("careBooking.bookAnAppointment")):null}},jroG:function(e,t,a){a.d(t,{B:function(){return BabyVaccineForm}});var n,l,r=a("fbRC"),o=a("q1tI"),i=a("iuhU"),s=a("8vDj"),d=a("cChf"),c=a("ZFu2"),u=a("qZBo"),m=a("F/Hd"),p=a("thIk"),g=a("g73v"),v=a("Ni80"),h=a("oF1Y"),b=a("Zge2");let f=(0,o.createContext)({}),DefaultLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,p.u)(),{currentUrl:n,submitProps:l,form:s}=(0,o.useContext)(f),{classes:d={}}=(0,o.useContext)(g.C);return o.createElement(v.H,Object.assign({formLayout:"default"},t),o.createElement(v.H.FormRow,null,o.createElement(h.G,Object.assign({isBaby:!0},s.getInputProps("gender")))),o.createElement(v.H.FormRow,null,o.createElement(u.D,Object.assign({label:o.createElement(m.T,{size:"p2",weight:"semiBold"},a("babyGrowth.input.birthday")),placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age")))),o.createElement(v.H.FormRow,{className:d.submitWrapper},o.createElement(v.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",d.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:n},l),a("dueDatePage.lastPeriod.calculate"))))},InlineLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,p.u)(),{currentUrl:n,submitProps:l,form:s}=(0,o.useContext)(f),{classes:d={}}=(0,o.useContext)(g.C);return o.createElement(v.H,Object.assign({formLayout:"inline"},t),o.createElement(v.H.FormRow,null,o.createElement(v.H.BorderInlineControl,{label:a("tools.selectBabyGender"),width:"none"},o.createElement(h.G,Object.assign({isBaby:!0,hideLabel:!0,type:"radio"},s.getInputProps("gender")))),s.errors.gender&&o.createElement(v.H.Error,null,s.errors.gender)),o.createElement(v.H.FormRow,null,o.createElement(v.H.BorderInlineControl,{label:a("babyGrowth.input.birthday")},o.createElement(u.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age"),{error:null}))),s.errors.age&&o.createElement(v.H.Error,null,s.errors.age)),o.createElement(v.H.FormRow,{className:d.submitWrapper},o.createElement(v.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",d.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:n},l),a("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,p.u)(),{currentUrl:n,submitProps:l,form:i}=(0,o.useContext)(f);return o.createElement(v.H,Object.assign({formLayout:"default"},t),o.createElement(v.H.Control,null,o.createElement(h.G,Object.assign({isBaby:!0},i.getInputProps("gender"),{error:null}))),i.errors.gender&&o.createElement(v.H.Error,null,i.errors.gender),o.createElement(v.H.FormRow,null,o.createElement(v.H.BorderBoxControl,{label:a("babyGrowth.input.birthday"),rightSection:o.createElement(b.Z,null)},o.createElement(u.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null},i.getInputProps("age"),{error:null}))),i.errors.age&&o.createElement(v.H.Error,null,i.errors.age)),o.createElement(v.H.Submit,Object.assign({type:"submit",className:"due-date-calculate-button",dataEventCategory:"Health Tool",dataEventAction:"Vaccination Tool",dataEventLabel:n},l),a("dueDatePage.lastPeriod.calculate")))};(n=l||(l={}))[n.trackPeriod=0]="trackPeriod",n[n.conceive=1]="conceive",n[n.avoidPregnancy=2]="avoidPregnancy";let BabyVaccineForm=e=>{var{formLayout:t="default",submitProps:a,currentUrl:n,onSubmit:l}=e,i=(0,r._)(e,["formLayout","submitProps","currentUrl","onSubmit"]);let{t:u}=(0,p.u)(),m=(0,s.rZ)(),g="mb"===m.other.template,v=(0,d.c)({validate:{gender:(0,c.U)(u("validation.error.requiredField")),age:(0,c.U)(u("validation.error.requiredField"))}}),h=Object.assign({onSubmit:v.onSubmit(l)},i);return o.createElement(f.Provider,{value:{submitProps:a,currentUrl:n,form:v}},"inline"===t?o.createElement(InlineLayout,Object.assign({},h)):g?o.createElement(MbLayout,Object.assign({formLayout:t},h)):o.createElement(DefaultLayout,Object.assign({},h)))}},"95eE":function(e,t,a){a.d(t,{D:function(){return DueDateForm},a:function(){return L}});var n,l,r,o,i=a("fbRC"),s=a("q1tI"),d=a("8vDj"),c=a("iuhU"),u=a("DA0W"),m=a("SPK5"),p=a("FQtM"),g=a("Eso5"),v=a("25AQ"),h=a("HShT"),b=a("/hDE"),f=a("cChf"),C=a("ZFu2"),E=a("Wgwc"),y=a.n(E),w=a("6HDN"),x=a("qZBo"),P=a("F/Hd"),D=a("thIk"),k=a("Ni80"),I=a("Zge2"),_=a("g73v"),S=a("v7JE"),M=a("iBNF");(n=r||(r={}))[n.lastPeriod=0]="lastPeriod",n[n.conception=1]="conception",n[n.IVF=2]="IVF",n[n.IUI=3]="IUI",n[n.ultrasound=4]="ultrasound";let T={[String(r.lastPeriod)]:{value:String(r.lastPeriod),icon:h.L,label:"dueDatePage.lastPeriod"},[String(r.IVF)]:{value:String(r.IVF),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let l=Object.assign({width:a,height:a},n);return t?s.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),s.createElement("path",{d:"M15.804 28.278a3.16 3.16 0 0 1-3.18-3.208l.128-20.306 6.405.008-.128 20.307c-.012 1.757-1.452 3.191-3.225 3.2",fill:"#fff"}),s.createElement("path",{d:"m12.72 10.266-.116 14.788c-.011 1.757 1.423 3.197 3.18 3.208 1.774-.008 3.214-1.442 3.225-3.2V10.267",fill:"#FFEAF1"}),s.createElement("circle",{cx:"14.662",cy:"19.027",transform:"rotate(-49.83 14.662 19.027)",fill:"#3E3F58",r:"1.012"}),s.createElement("circle",{cx:"16.326",cy:"13.426",r:"1.012",transform:"rotate(-49.83 16.326 13.426)",fill:"#3E3F58"}),s.createElement("path",{d:"m14.662 19.026.087 1.022a.98.98 0 0 0 .344.667.98.98 0 0 1 .32.98l-.123.51m1.036-8.779.087 1.022a.98.98 0 0 0 .344.666.98.98 0 0 1 .32.98l-.123.511",stroke:"#3E3F58"}),s.createElement("path",{d:"M18.833 27.597a3.94 3.94 0 0 1-3.02 1.408 4 4 0 0 1-2.795-1.148 3.98 3.98 0 0 1-1.14-2.795l.108-20.553c0-.426.344-.756.753-.738.426 0 .757.345.738.754l-.108 20.553c.002.656.248 1.256.697 1.733a2.42 2.42 0 0 0 1.727.706 2.483 2.483 0 0 0 2.47-2.462l.109-20.553c0-.426.344-.757.753-.738.426 0 .757.344.738.754l-.108 20.553a3.85 3.85 0 0 1-.922 2.526",fill:"#202135"}),s.createElement("path",{d:"M20.753 4.975a.75.75 0 0 1-.58.262l-8.714-.027a.727.727 0 0 1-.738-.754c0-.425.344-.756.754-.737l8.713.026c.426 0 .756.344.738.754a.66.66 0 0 1-.173.476",fill:"#202135"})):s.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),s.createElement("path",{d:"M13.064 5.794a17.8 17.8 0 0 1 3.34-4.638l4.26 2.881a17.8 17.8 0 0 0-3.272 4.507l-1.08 2.12a.65.65 0 0 0 .124.76 7.9 7.9 0 0 1 2.296 4.81c.027.265-1.141 5.997-9.376 5.573-1.587-.082-5.724-1.269-6.12-2.86a8 8 0 0 1-.233-2.161c.124-4.165 3.718-7.648 7.884-7.647h.098a.65.65 0 0 0 .59-.36z",fill:"#BCDEFF"}),s.createElement("path",{d:"M20.75 3.234 16.696.496a.886.886 0 1 0-.992 1.469l4.056 2.738a.886.886 0 0 0 .992-1.469",fill:"#E3F2FF"}),s.createElement("path",{d:"M18.771 17.024a7.87 7.87 0 0 1-2.7 5.944A4.2 4.2 0 0 1 13.301 24H8.473a4.2 4.2 0 0 1-2.769-1.03 7.9 7.9 0 0 1-2.468-4.023c.924.468 2.191.805 3.922.805 1.142 0 2.01-.346 2.775-.834q.323-.21.629-.446c1.973-1.516 3.524-3.668 8.17-2.238q.04.39.04.79",fill:"#2D87F3"}),s.createElement("path",{d:"M11.858 15.5c-1.78.348-3.096-1.608-2.134-3.121a2.06 2.06 0 0 1 1.529-.944q.303-.03.588.025a.27.27 0 0 0 .268-.107c.282-.373.737-.573 1.2-.639.224-.031.374-.24.379-.44.021-.794.657-1.311 1.288-1.234.183.022.223.27.058.35l-.012.006a.9.9 0 0 0-.28.196c-.213.263-.187.407-.153.6.03.167.066.37-.04.715a1.45 1.45 0 0 1-.504.7c-.255.19-.445.23-.592.263-.088.019-.16.034-.223.076a.27.27 0 0 0-.07.379c.184.27.306.587.344.934a2.063 2.063 0 0 1-1.646 2.24",fill:"#fff"}),s.createElement("ellipse",{cx:"10",cy:"20.5",rx:"3",ry:"2.5",fill:"#FF6F4D"}))},label:"dueDatePage.ivf"},[String(r.conception)]:{value:String(r.conception),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let l=Object.assign({width:a,height:a},n);return t?s.createElement("svg",Object.assign({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),s.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 1 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"}),s.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.266",fill:"#E85388"}),s.createElement("path",{d:"M9.834 25.333a2.667 2.667 0 1 0-2.298-1.312l-.084.084a3.25 3.25 0 0 0-.952 2.298c0 .726-.41 1.39-1.06 1.715l-1.238.619a.667.667 0 0 0 .596 1.193l1.24-.62a3.25 3.25 0 0 0 1.796-2.907c0-.508.202-.995.561-1.355l.084-.084c.397.235.86.37 1.355.37",fill:"#3E3F58"})):s.createElement("svg",Object.assign({width:a,height:a,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),s.createElement("circle",{cx:"9",cy:"6.75",fill:"#91CAFF",r:"6.75"}),s.createElement("circle",{cx:"9",cy:"6.75",fill:"#2D87F3",r:"5.4"}),s.createElement("path",{d:"M1.789 12.2a.245.245 0 0 1-.02-.489c.073-.006 1.795-.167 1.761-1.605-.013-.587.15-1.057.485-1.397.524-.53 1.273-.528 1.305-.527a.245.245 0 0 1-.002.49h-.002c-.011 0-.582.004-.955.385-.236.24-.351.59-.34 1.038.018.793-.367 1.41-1.114 1.787a3.3 3.3 0 0 1-1.118.319M.75 17.774a.245.245 0 0 1 .226-.263c.073-.006 1.786-.162 1.749-1.593-.016-.586.146-1.055.48-1.392.521-.528 1.27-.524 1.3-.523a.245.245 0 0 1-.006.49c-.015 0-.58.004-.949.38q-.352.362-.335 1.033c.02.791-.362 1.406-1.106 1.78a3.3 3.3 0 0 1-1.095.313.245.245 0 0 1-.263-.225",fill:"#D2D6DC"}),s.createElement("path",{d:"M8.659 5.035c-.562-.561-1.956-.078-2.699.665-.407.407-.635.91-.665 1.373v.124l1.145 1.16.181.042c.464-.03.966-.258 1.373-.665.743-.743 1.226-2.137.665-2.699",fill:"#E3F2FF"}),s.createElement("path",{d:"m5.295 7.073-.292.75a.55.55 0 0 0 .124.589l.155.155a.55.55 0 0 0 .589.124l.75-.292z",fill:"#91CAFF"}),s.createElement("path",{d:"M8.098 11.358a.87.87 0 0 0-.233-.523c-.562-.562-1.956-.079-2.699.664-.407.408-.635.91-.665 1.373v.125l1.146 1.16.18.042c.464-.03.966-.258 1.374-.666.566-.566.98-1.51.897-2.175",fill:"#E3F2FF"}),s.createElement("path",{d:"m4.5 12.872-.29.75a.55.55 0 0 0 .123.589l.156.155a.55.55 0 0 0 .588.124l.75-.292z",fill:"#91CAFF"}))},label:"dueDatePage.conceptionDate"},[String(r.IUI)]:{value:String(r.IUI),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let l=Object.assign({width:a,height:a},n);return s.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),s.createElement("ellipse",{cx:"10",cy:"7.5",rx:"7.5",ry:"7.5",fill:"#91CAFF"}),s.createElement("ellipse",{cx:"10",cy:"7.5",rx:"6",ry:"6",fill:"#2D87F3"}),s.createElement("path",{d:"M1.98877 13.5566C1.8483 13.5566 1.72914 13.4487 1.71769 13.3062C1.7056 13.1563 1.81732 13.025 1.9672 13.013C2.04819 13.0061 3.96085 12.8267 3.92397 11.2296C3.90887 10.5766 4.09013 10.0544 4.46266 9.6775C5.04496 9.08834 5.87737 9.09055 5.91289 9.09138C6.06324 9.09309 6.18376 9.21636 6.18204 9.36675C6.18033 9.51603 6.05877 9.63593 5.90985 9.63593C5.9091 9.63593 5.90835 9.63593 5.9076 9.63593C5.8958 9.63593 5.26174 9.64041 4.84671 10.0637C4.58418 10.3314 4.4569 10.7194 4.46838 11.2171C4.48874 12.0983 4.06094 12.7846 3.23124 13.202C2.63342 13.5027 2.03606 13.5537 2.01095 13.5558C2.00351 13.5563 1.99611 13.5566 1.98877 13.5566Z",fill:"#D2D6DC"}),s.createElement("path",{d:"M0.834813 19.7487C0.823187 19.5988 0.935297 19.4678 1.08522 19.4562C1.16581 19.4496 3.06971 19.2768 3.02807 17.6868C3.011 17.0352 3.1904 16.5146 3.56121 16.1394C4.14076 15.5531 4.97192 15.5577 5.00687 15.5587C5.15722 15.5608 5.27734 15.6845 5.27516 15.8349C5.27301 15.9849 5.15117 16.106 4.99993 16.1032C4.99989 16.1032 4.99982 16.1032 4.99975 16.1032C4.98315 16.1032 4.35528 16.1074 3.9453 16.5255C3.68491 16.791 3.55946 17.177 3.57245 17.6725C3.59545 18.552 3.17051 19.2358 2.34353 19.6499C1.74807 19.948 1.15233 19.9971 1.12728 19.9991C0.976577 20.0107 0.846367 19.898 0.834813 19.7487Z",fill:"#D2D6DC"}),s.createElement("path",{d:"M9.62226 5.59508C8.99818 4.971 7.44969 5.50769 6.62421 6.33313C6.1713 6.78604 5.91828 7.34408 5.88477 7.85874V7.99721L7.15753 9.28601L7.35857 9.33258C7.87323 9.29906 8.43127 9.04605 8.88418 8.59314C9.70966 7.76766 10.2463 6.21916 9.62226 5.59508Z",fill:"#E3F2FF"}),s.createElement("path",{d:"M5.88516 7.85889L5.5611 8.69259C5.47325 8.91856 5.52723 9.17508 5.69865 9.3465L5.87139 9.51925C5.95823 9.60609 6.06693 9.66256 6.18243 9.68584C6.29486 9.70856 6.4137 9.70005 6.52509 9.65676L7.3588 9.3327L5.88516 7.85889Z",fill:"#91CAFF"}),s.createElement("path",{d:"M8.99894 12.6201C8.97018 12.3889 8.88805 12.1875 8.73945 12.0389C8.11537 11.4149 6.56687 11.9515 5.7414 12.777C5.28849 13.2299 5.03547 13.7879 5.00195 14.3026V14.4411L6.27493 15.7298L6.47597 15.7764C6.99063 15.7429 7.54867 15.4898 8.00158 15.0369C8.63034 14.4081 9.09073 13.3598 8.99894 12.6201Z",fill:"#E3F2FF"}),s.createElement("path",{d:"M5.00235 14.3027L4.67829 15.1364C4.59043 15.3624 4.64441 15.6189 4.81583 15.7904L4.98858 15.9631C5.07542 16.0499 5.18412 16.1064 5.29962 16.1297C5.41205 16.1524 5.53089 16.1439 5.64228 16.1006L6.47598 15.7766L5.00235 14.3027Z",fill:"#91CAFF"}))},label:"dueDatePage.IUI"},[String(r.ultrasound)]:{value:String(r.ultrasound),icon:e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let l=Object.assign({width:a,height:a},n);return s.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),s.createElement("g",{clipPath:"url(#clip0_5646_32454)"},s.createElement("path",{d:"M17.278 1.47119H2.7207C2.03035 1.47119 1.4707 2.03084 1.4707 2.72119V17.2785C1.4707 17.9689 2.03035 18.5285 2.7207 18.5285H17.278C17.9684 18.5285 18.528 17.9689 18.528 17.2785V2.72119C18.528 2.03084 17.9684 1.47119 17.278 1.47119Z",fill:"#65B5FF"}),s.createElement("path",{d:"M11.23 9.94794C12.1285 10.4395 11.7085 11.7187 10.9077 11.7734C10.1386 11.8261 9.79346 11.6067 9.12721 11.1589C8.74409 10.9014 8.11299 9.67872 7.93815 9.36872C7.74008 9.01332 7.58143 8.63733 7.46503 8.24747C7.31862 7.75122 7.71315 7.30122 8.03987 7.31731C8.09475 7.32086 8.14794 7.33765 8.19491 7.36625C8.24188 7.39485 8.28122 7.43441 8.30956 7.48153C8.3227 7.49619 8.33867 7.50803 8.3565 7.51636C8.37433 7.52469 8.39367 7.52933 8.41334 7.53C8.43301 7.53067 8.45261 7.52736 8.47097 7.52027C8.48933 7.51317 8.50607 7.50244 8.52018 7.48872C8.55856 7.44827 8.60864 7.42084 8.66339 7.41028C8.71814 7.39972 8.77482 7.40655 8.82549 7.42981C9.03081 7.56731 8.99503 7.80294 9.13081 8.11544C9.34088 8.4938 9.61306 8.83417 9.93596 9.12231C10.3217 9.44809 10.5785 9.59138 11.23 9.94794Z",fill:"#2B62CD"}),s.createElement("path",{d:"M19.5332 1.54781C19.5129 1.54783 19.4928 1.54386 19.4741 1.53611C19.4553 1.52836 19.4383 1.51699 19.424 1.50265C19.4096 1.48832 19.3982 1.47129 19.3904 1.45255C19.3827 1.43381 19.3787 1.41372 19.3787 1.39344V0.932812C19.3784 0.850311 19.3455 0.771271 19.2872 0.712933C19.2288 0.654596 19.1498 0.621695 19.0673 0.621406H18.6066C18.5665 0.62013 18.5285 0.603298 18.5006 0.574472C18.4726 0.545646 18.457 0.507087 18.457 0.466953C18.457 0.42682 18.4726 0.38826 18.5006 0.359434C18.5285 0.330608 18.5665 0.313776 18.6066 0.3125H19.0673C19.2317 0.312707 19.3894 0.378127 19.5057 0.494414C19.622 0.6107 19.6874 0.768359 19.6876 0.932812V1.39344C19.6876 1.43438 19.6713 1.47365 19.6424 1.5026C19.6134 1.53155 19.5742 1.54781 19.5332 1.54781Z",fill:"#2D87F3"}),s.createElement("path",{d:"M0.689531 1.54789C0.648588 1.54789 0.609323 1.53163 0.580372 1.50268C0.551421 1.47372 0.535156 1.43446 0.535156 1.39352V0.932891C0.535363 0.768356 0.600848 0.610626 0.717236 0.494326C0.833623 0.378027 0.991403 0.312661 1.15594 0.312578H1.61641C1.6371 0.31192 1.65772 0.315428 1.67703 0.322893C1.69635 0.330359 1.71397 0.34163 1.72884 0.356038C1.74371 0.370445 1.75554 0.387695 1.76361 0.406762C1.77169 0.425829 1.77585 0.446324 1.77585 0.467031C1.77585 0.487738 1.77169 0.508234 1.76361 0.527301C1.75554 0.546368 1.74371 0.563618 1.72884 0.578025C1.71397 0.592432 1.69635 0.603703 1.67703 0.611169C1.65772 0.618635 1.6371 0.622143 1.61641 0.621484H1.15594C1.07325 0.621484 0.993926 0.654258 0.935352 0.712626C0.876779 0.770995 0.843727 0.8502 0.843437 0.932891V1.39352C0.843438 1.43438 0.827238 1.47357 0.798388 1.50251C0.769538 1.53145 0.730393 1.54777 0.689531 1.54789Z",fill:"#2D87F3"}),s.createElement("path",{d:"M19.0673 19.4648H18.6066C18.5665 19.4636 18.5285 19.4467 18.5006 19.4179C18.4726 19.3891 18.457 19.3505 18.457 19.3104C18.457 19.2702 18.4726 19.2317 18.5006 19.2029C18.5285 19.174 18.5665 19.1572 18.6066 19.1559H19.0673C19.1498 19.1556 19.2288 19.1227 19.2872 19.0644C19.3455 19.0061 19.3784 18.927 19.3787 18.8445V18.3841C19.378 18.3634 19.3815 18.3427 19.389 18.3234C19.3965 18.3041 19.4077 18.2865 19.4221 18.2716C19.4365 18.2567 19.4538 18.2449 19.4729 18.2368C19.4919 18.2288 19.5124 18.2246 19.5331 18.2246C19.5538 18.2246 19.5743 18.2288 19.5934 18.2368C19.6125 18.2449 19.6297 18.2567 19.6441 18.2716C19.6585 18.2865 19.6698 18.3041 19.6773 18.3234C19.6847 18.3427 19.6882 18.3634 19.6876 18.3841V18.8441C19.6875 19.0086 19.6221 19.1664 19.5058 19.2828C19.3895 19.3991 19.2318 19.4646 19.0673 19.4648Z",fill:"#2D87F3"}),s.createElement("path",{d:"M1.40625 19.6875H0.940156C0.773755 19.6873 0.614228 19.6211 0.496565 19.5034C0.378901 19.3858 0.312707 19.2262 0.3125 19.0598V18.5938C0.3125 18.5523 0.328962 18.5126 0.358265 18.4833C0.387567 18.454 0.42731 18.4375 0.46875 18.4375C0.51019 18.4375 0.549933 18.454 0.579235 18.4833C0.608538 18.5126 0.625 18.5523 0.625 18.5938V19.0595C0.624979 19.1009 0.633115 19.1419 0.648942 19.1802C0.664769 19.2185 0.687977 19.2532 0.717242 19.2825C0.746507 19.3118 0.781256 19.3351 0.819503 19.3509C0.857751 19.3668 0.898749 19.375 0.940156 19.375H1.40625C1.44769 19.375 1.48743 19.3915 1.51674 19.4208C1.54604 19.4501 1.5625 19.4898 1.5625 19.5312C1.5625 19.5727 1.54604 19.6124 1.51674 19.6417C1.48743 19.671 1.44769 19.6875 1.40625 19.6875Z",fill:"#2D87F3"}),s.createElement("path",{d:"M3.95953 2.8125H2.65625C2.61481 2.8125 2.57507 2.79604 2.54576 2.76674C2.51646 2.73743 2.5 2.69769 2.5 2.65625C2.5 2.61481 2.51646 2.57507 2.54576 2.54576C2.57507 2.51646 2.61481 2.5 2.65625 2.5H3.95953C4.00097 2.5 4.04071 2.51646 4.07002 2.54576C4.09932 2.57507 4.11578 2.61481 4.11578 2.65625C4.11578 2.69769 4.09932 2.73743 4.07002 2.76674C4.04071 2.79604 4.00097 2.8125 3.95953 2.8125Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 14.9688H16.7285C16.6871 14.9688 16.6473 14.9523 16.618 14.923C16.5887 14.8937 16.5723 14.8539 16.5723 14.8125C16.5723 14.7711 16.5887 14.7313 16.618 14.702C16.6473 14.6727 16.6871 14.6562 16.7285 14.6562H17.3443C17.3857 14.6562 17.4255 14.6727 17.4548 14.702C17.4841 14.7313 17.5005 14.7711 17.5005 14.8125C17.5005 14.8539 17.4841 14.8937 17.4548 14.923C17.4255 14.9523 17.3857 14.9688 17.3443 14.9688Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 16.3027H16.7285C16.6871 16.3027 16.6473 16.2863 16.618 16.257C16.5887 16.2277 16.5723 16.1879 16.5723 16.1465C16.5723 16.105 16.5887 16.0653 16.618 16.036C16.6473 16.0067 16.6871 15.9902 16.7285 15.9902H17.3443C17.3857 15.9902 17.4255 16.0067 17.4548 16.036C17.4841 16.0653 17.5005 16.105 17.5005 16.1465C17.5005 16.1879 17.4841 16.2277 17.4548 16.257C17.4255 16.2863 17.3857 16.3027 17.3443 16.3027Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 13.6499H16.7285C16.6871 13.6499 16.6473 13.6334 16.618 13.6041C16.5887 13.5748 16.5723 13.5351 16.5723 13.4937C16.5723 13.4522 16.5887 13.4125 16.618 13.3832C16.6473 13.3539 16.6871 13.3374 16.7285 13.3374H17.3443C17.3857 13.3374 17.4255 13.3539 17.4548 13.3832C17.4841 13.4125 17.5005 13.4522 17.5005 13.4937C17.5005 13.5351 17.4841 13.5748 17.4548 13.6041C17.4255 13.6334 17.3857 13.6499 17.3443 13.6499Z",fill:"#2D87F3"}),s.createElement("path",{d:"M4.99063 3.84375H2.65625C2.61481 3.84375 2.57507 3.82729 2.54576 3.79799C2.51646 3.76868 2.5 3.72894 2.5 3.6875C2.5 3.64606 2.51646 3.60632 2.54576 3.57701C2.57507 3.54771 2.61481 3.53125 2.65625 3.53125H4.99063C5.03207 3.53125 5.07181 3.54771 5.10111 3.57701C5.13041 3.60632 5.14687 3.64606 5.14687 3.6875C5.14687 3.72894 5.13041 3.76868 5.10111 3.79799C5.07181 3.82729 5.03207 3.84375 4.99063 3.84375Z",fill:"#2D87F3"}),s.createElement("path",{d:"M4.99063 4.875H2.65625C2.61481 4.875 2.57507 4.85854 2.54576 4.82924C2.51646 4.79993 2.5 4.76019 2.5 4.71875C2.5 4.67731 2.51646 4.63757 2.54576 4.60826C2.57507 4.57896 2.61481 4.5625 2.65625 4.5625H4.99063C5.03207 4.5625 5.07181 4.57896 5.10111 4.60826C5.13041 4.63757 5.14687 4.67731 5.14687 4.71875C5.14687 4.76019 5.13041 4.79993 5.10111 4.82924C5.07181 4.85854 5.03207 4.875 4.99063 4.875Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 12.3843H16.7285C16.6871 12.3843 16.6473 12.3678 16.618 12.3385C16.5887 12.3092 16.5723 12.2695 16.5723 12.228C16.5723 12.1866 16.5887 12.1468 16.618 12.1175C16.6473 12.0882 16.6871 12.0718 16.7285 12.0718H17.3443C17.3857 12.0718 17.4255 12.0882 17.4548 12.1175C17.4841 12.1468 17.5005 12.1866 17.5005 12.228C17.5005 12.2695 17.4841 12.3092 17.4548 12.3385C17.4255 12.3678 17.3857 12.3843 17.3443 12.3843Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.3443 17.6562H16.7285C16.6871 17.6562 16.6473 17.6398 16.618 17.6105C16.5887 17.5812 16.5723 17.5414 16.5723 17.5C16.5723 17.4586 16.5887 17.4188 16.618 17.3895C16.6473 17.3602 16.6871 17.3438 16.7285 17.3438H17.3443C17.3857 17.3438 17.4255 17.3602 17.4548 17.3895C17.4841 17.4188 17.5005 17.4586 17.5005 17.5C17.5005 17.5414 17.4841 17.5812 17.4548 17.6105C17.4255 17.6398 17.3857 17.6562 17.3443 17.6562Z",fill:"#2D87F3"}),s.createElement("path",{d:"M17.0352 17.6563C16.9937 17.6563 16.954 17.6398 16.9247 17.6105C16.8954 17.5812 16.8789 17.5415 16.8789 17.5001V12.228C16.8789 12.1866 16.8954 12.1468 16.9247 12.1175C16.954 12.0882 16.9937 12.0718 17.0352 12.0718C17.0766 12.0718 17.1163 12.0882 17.1456 12.1175C17.1749 12.1468 17.1914 12.1866 17.1914 12.228V17.5001C17.1914 17.5415 17.1749 17.5812 17.1456 17.6105C17.1163 17.6398 17.0766 17.6563 17.0352 17.6563Z",fill:"#2D87F3"}),s.createElement("path",{d:"M8.60596 12.3197C8.54189 12.4053 8.46174 12.4775 8.37002 12.5324C8.13096 12.6807 7.05018 13.0533 5.9919 12.0152C5.72695 11.7747 5.47994 11.5151 5.25284 11.2385C5.07471 11.0041 4.83877 10.959 4.57627 10.5683C4.34659 10.2262 4.36846 9.61991 4.57627 9.35412C4.84502 9.01194 5.32627 8.84022 5.62627 9.49631C5.76534 9.80256 6.47002 10.476 7.0294 10.6262C7.09603 10.6424 7.16404 10.6523 7.23252 10.6558C7.85752 10.6952 8.57627 11.1307 8.74659 11.6512C8.77467 11.766 8.77661 11.8857 8.75227 12.0014C8.72793 12.1172 8.67794 12.2259 8.60596 12.3197Z",fill:"#2B62CD"}),s.createElement("path",{d:"M17.8215 7.60137C17.3465 10.2436 15.2621 10.3982 14.3965 11.2482C13.9965 11.642 14.0606 11.7092 13.9965 12.7201C13.9231 13.8951 13.2621 16.1139 11.0356 16.7654C8.77777 17.4279 6.96371 16.5029 6.00121 14.6982C5.14339 13.0904 4.21527 13.6154 3.00121 13.1811C2.42152 12.9717 2.00433 12.4811 2.01996 11.9748C2.03871 11.3217 2.40902 10.8404 3.37777 11.3217C4.04964 11.6545 4.69496 11.5936 5.30433 11.5201C5.63507 11.4688 5.96971 11.4468 6.30433 11.4545C6.96796 11.5169 7.60602 11.7417 8.16214 12.1092C8.31527 12.2061 8.42621 12.2889 8.48402 12.3342C8.0626 11.9665 7.71478 11.5222 7.45902 11.0248C7.44183 10.9936 7.2848 10.655 7.25589 10.592C6.96136 9.95137 7.39027 9.35606 7.83714 9.35606C7.87141 9.35549 7.9056 9.3597 7.93871 9.36855C8.05114 9.39698 8.14976 9.46457 8.21683 9.55918C8.23545 9.57848 8.25784 9.59375 8.28261 9.60403C8.30738 9.61431 8.334 9.61939 8.36082 9.61895C8.38763 9.61851 8.41407 9.61256 8.43849 9.60147C8.46291 9.59038 8.48479 9.57439 8.50277 9.55449C8.54371 9.50394 8.60167 9.47004 8.66579 9.45911C8.72992 9.44818 8.79583 9.46098 8.85121 9.49512C9.13871 9.66699 8.98871 10.0232 9.19808 10.4342C9.42152 10.8732 10.109 11.3389 10.634 11.2389C11.0293 11.1623 11.8606 10.6811 10.634 10.167C9.94808 9.88105 9.86683 9.48418 9.93558 9.12168C9.96058 8.99356 10.1621 8.41543 10.1653 8.39356C10.1996 8.1248 9.64652 7.69668 10.1653 7.31699C10.4215 7.12949 10.459 6.88262 10.5075 6.56855C10.7934 4.6998 12.02 3.47168 13.9825 3.47168C16.5262 3.47168 18.1418 5.82793 17.8215 7.60137Z",fill:"#2D87F3"}),s.createElement("path",{d:"M11.0678 7.4316C11.006 7.43496 10.9443 7.42333 10.888 7.3977C10.8317 7.37207 10.7824 7.33321 10.7443 7.28441C10.7305 7.26814 10.7201 7.24921 10.7139 7.22877C10.7076 7.20833 10.7056 7.18683 10.708 7.16559C10.7104 7.14436 10.7171 7.12384 10.7278 7.1053C10.7384 7.08677 10.7527 7.07062 10.7699 7.05784C10.787 7.04507 10.8066 7.03594 10.8274 7.03103C10.8482 7.02613 10.8698 7.02553 10.8908 7.0293C10.9118 7.03306 10.9319 7.0411 10.9497 7.05292C10.9675 7.06474 10.9827 7.08009 10.9943 7.09801C11.0256 7.1391 11.159 7.11504 11.2378 7.0802C11.2756 7.06321 11.3186 7.06193 11.3573 7.07666C11.3961 7.09138 11.4274 7.1209 11.4444 7.15871C11.4614 7.19653 11.4627 7.23954 11.4479 7.27829C11.4332 7.31705 11.4037 7.34836 11.3659 7.36535C11.272 7.40738 11.1706 7.42991 11.0678 7.4316Z",fill:"#2B62CD"}),s.createElement("path",{d:"M11.548 13.1983C11.5518 13.2185 11.5515 13.2392 11.5471 13.2592C11.5428 13.2792 11.5345 13.2981 11.5227 13.3149C11.5109 13.3316 11.4958 13.3458 11.4785 13.3567C11.4611 13.3675 11.4417 13.3748 11.4215 13.378C11.2165 13.4117 11.0089 13.4279 10.8012 13.4265C10.5169 13.4214 10.2349 13.3757 9.96367 13.2905C9.44418 13.1038 8.96486 12.8201 8.55117 12.4546C7.77477 11.8262 7.66367 11.4171 7.45898 11.0249C7.74314 11.4988 8.12768 11.9047 8.58555 12.214C9.03605 12.5485 9.53089 12.8188 10.0559 13.0171C10.4848 13.1224 10.9305 13.141 11.3668 13.0718C11.387 13.0677 11.4079 13.0678 11.4281 13.0721C11.4483 13.0763 11.4675 13.0846 11.4844 13.0964C11.5014 13.1082 11.5157 13.1233 11.5267 13.1409C11.5376 13.1584 11.5449 13.1779 11.548 13.1983Z",fill:"#2B62CD"}),s.createElement("path",{d:"M10.5484 8.85297C10.511 8.86675 10.4712 8.87312 10.4313 8.87172C10.2958 8.86506 10.164 8.82594 10.0469 8.75766C10.0858 8.62969 10.1177 8.54703 10.1419 8.46875C10.2299 8.5323 10.3369 8.56419 10.4453 8.55922C10.464 8.55169 10.4839 8.54798 10.504 8.54833C10.5241 8.54867 10.5439 8.55306 10.5623 8.56122C10.5807 8.56939 10.5972 8.58116 10.6109 8.59585C10.6247 8.61054 10.6353 8.62784 10.6422 8.64672C10.6561 8.68656 10.6541 8.73021 10.6366 8.76862C10.6192 8.80703 10.5876 8.83724 10.5484 8.85297Z",fill:"#2B62CD"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_5646_32454"},s.createElement("rect",{width:"20",height:"20",fill:"white"}))))},label:"dueDatePage.ultrasound"}},F=[String(r.lastPeriod),String(r.IVF),String(r.conception)],L={[b.L.Cambodia]:F,[b.L.Singapore]:F,[b.L.India]:F,[b.L.Indonesia]:[String(r.lastPeriod),String(r.IUI),String(r.IVF),String(r.ultrasound)],[b.L.Malaysia]:F,[b.L.Myanmar]:F,[b.L.PhilippinesEnglish]:F,[b.L.PhilippinesTagalog]:F,[b.L.Taiwan]:F,[b.L.Thailand]:F,[b.L.Vietnam]:[String(r.lastPeriod),String(r.IVF),String(r.IUI),String(r.ultrasound)]},O="yyyy-MM-dd",getDueDateLastPeriod=(e,t)=>({otherInfo:{method:r.lastPeriod+1,first_day:(0,v.Z)(e,O),measurement_date:null,insemination_date:null,cycle_length_days:t,conception_date:null,ivf_transfer_date:null,days_transfer:null}}),getDueDateConception=e=>({otherInfo:{method:r.conception+1,conception_date:(0,v.Z)(e,O),measurement_date:null,insemination_date:null,first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}),getDueDateIVF=(e,t)=>({otherInfo:{method:r.IVF+1,ivf_transfer_date:(0,v.Z)(e,O),measurement_date:null,insemination_date:null,days_transfer:t,conception_date:null,first_day:null,cycle_length_days:null}}),getDueDateIUI=e=>({otherInfo:{method:r.conception+1,insemination_date:(0,v.Z)(e,O),measurement_date:null,conception_date:null,first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}),getDueDateUltrasound=(e,t)=>{let[a,n]=t.split("|"),[l,o]=[Number(a),Number(n)];return{otherInfo:{method:r.conception+1,measurement_date:(0,v.Z)(e,O),conception_date:null,insemination_date:null,crl_value:l,msd_value:o,first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}},N=(0,s.createContext)({}),R=(0,s.createContext)({}),DefaultLayout$4=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(R);return s.createElement(k.H.FormRow,null,s.createElement(x.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.lastPeriod.lastPeriodLabel"))},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date})))},InlineLayout$4=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(R);return s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{width:300,label:e("dueDatePage.lastPeriod.lastPeriodLabel")},s.createElement(x.D,Object.assign({},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date,error:null}))),t.errors.lastPeriodDate&&s.createElement(k.H.Error,null,t.errors.lastPeriodDate))},MbLayout$4=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(R);return s.createElement(k.H.BorderBoxControl,{label:e("dueDatePage.lastPeriod.lastPeriodLabel"),rightSection:s.createElement(I.Z,null)},s.createElement(x.D,Object.assign({},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},rightSection:null,maxDate:new Date})))},ConceptionForm=({})=>{let{classes:e={}}=(0,s.useContext)(_.C),{formLayout:t,onSubmit:a,currentUrl:n,submitProps:l}=(0,s.useContext)(N),o=(0,d.rZ)(),{t:i}=(0,D.u)(),u=(0,f.c)({initialValues:{lastPeriodDate:new Date}}),m={onSubmit:u.onSubmit(e=>{let{lastPeriodDate:t}=e,n=`${S.Q.type}=${r.conception}&${S.Q.startDate}=${y()(t).format(S.A)}&${S.Q.additional}= `;a(getDueDateConception(t),n)})};return s.createElement(R.Provider,{value:{form:u}},s.createElement(k.H,Object.assign({formLayout:t},m),"inline"===t?s.createElement(InlineLayout$4,null):"mb"===o.other.template?s.createElement(MbLayout$4,null):s.createElement(DefaultLayout$4,null),s.createElement(k.H.FormRow,{className:e.submitWrapper},s.createElement(k.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:n,className:(0,c.default)("due-date-calculate-button",e.submitBtn),type:"submit"},l),i("dueDatePage.lastPeriod.calculate")))))},B=(0,s.createContext)({}),DefaultLayout$3=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(B);return s.createElement(k.H.FormRow,null,s.createElement(x.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.date_of_IUI_procedure"))},t.getInputProps("dateOfIUIProcedure"),{popoverProps:{withinPortal:!0},maxDate:new Date})))},InlineLayout$3=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(B);return s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{width:300,label:e("dueDatePage.date_of_IUI_procedure")},s.createElement(x.D,Object.assign({},t.getInputProps("dateOfIUIProcedure"),{popoverProps:{withinPortal:!0},maxDate:new Date,error:null}))))},MbLayout$3=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(B);return s.createElement(k.H.BorderBoxControl,{label:e("dueDatePage.date_of_IUI_procedure"),rightSection:s.createElement(I.Z,null)},s.createElement(x.D,Object.assign({},t.getInputProps("dateOfIUIProcedure"),{popoverProps:{withinPortal:!0},rightSection:null,maxDate:new Date})))},IUIForm=({})=>{let{formLayout:e,onSubmit:t,currentUrl:a,submitProps:n}=(0,s.useContext)(N),{classes:l={}}=(0,s.useContext)(_.C),o=(0,d.rZ)(),{t:i}=(0,D.u)(),u=(0,f.c)({initialValues:{dateOfIUIProcedure:new Date}}),m={onSubmit:u.onSubmit(e=>{let{dateOfIUIProcedure:a}=e,n=`${S.Q.type}=${r.IUI}&${S.Q.startDate}=${y()(a).format(S.A)}&${S.Q.additional}= `;t(getDueDateIUI(a),n)})};return s.createElement(B.Provider,{value:{form:u}},s.createElement(k.H,Object.assign({formLayout:e},m),"inline"===e?s.createElement(InlineLayout$3,null):"mb"===o.other.template?s.createElement(MbLayout$3,null):s.createElement(DefaultLayout$3,null),s.createElement(k.H.FormRow,{className:l.submitWrapper},s.createElement(k.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:a,className:(0,c.default)("due-date-calculate-button",l.submitBtn),type:"submit"},n),i("dueDatePage.lastPeriod.calculate")))))},j=(0,s.createContext)({}),DefaultLayout$2=()=>{let{t:e}=(0,D.u)(),{form:t,transferDateOptions:a}=(0,s.useContext)(j);return s.createElement(s.Fragment,null,s.createElement(k.H.FormRow,null,s.createElement(x.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.ivf.transferDate"))},t.getInputProps("IVFDate"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(k.H.FormRow,null,s.createElement(w.R.Group,Object.assign({},t.getInputProps("dayTransfer")),s.createElement(u.Z,null,a.map((e,t)=>s.createElement(w.R,{key:t,value:e.value,label:e.label}))))))},InlineLayout$2=()=>{let{t:e}=(0,D.u)(),{form:t,transferDateOptions:a}=(0,s.useContext)(j);return s.createElement(s.Fragment,null,s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{width:300,label:e("dueDatePage.ivf.transferDate")},s.createElement(x.D,Object.assign({},t.getInputProps("IVFDate"),{popoverProps:{withinPortal:!0},maxDate:new Date})))),s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{width:"none"},s.createElement(w.R.Group,Object.assign({},t.getInputProps("dayTransfer")),s.createElement(u.Z,null,a.map((e,t)=>s.createElement(w.R,{key:t,value:e.value,label:e.label})))))))},MbLayout$2=()=>{let{t:e}=(0,D.u)(),{form:t,transferDateOptions:a}=(0,s.useContext)(j);return s.createElement(s.Fragment,null,s.createElement(k.H.BorderBoxControl,{label:e("dueDatePage.ivf.transferDate"),rightSection:s.createElement(I.Z,null)},s.createElement(x.D,Object.assign({},t.getInputProps("IVFDate"),{popoverProps:{withinPortal:!0},maxDate:new Date,rightSection:null}))),s.createElement(w.R.Group,Object.assign({},t.getInputProps("dayTransfer")),s.createElement(u.Z,null,a.map((e,t)=>s.createElement(w.R,{key:t,value:e.value,label:e.label})))))},IVFForm=({})=>{var e;let{classes:t={}}=(0,s.useContext)(_.C),{formLayout:a,onSubmit:n,currentUrl:l,submitProps:o}=(0,s.useContext)(N),{t:i}=(0,D.u)(),u=(0,d.rZ)(),m=[{value:"3",label:i("dueDatePage.ivf.transferDateRadio",{number:3})},{value:"5",label:i("dueDatePage.ivf.transferDateRadio",{number:5})}],p=(0,f.c)({initialValues:{IVFDate:new Date,dayTransfer:null===(e=null==m?void 0:m[0])||void 0===e?void 0:e.value}}),g={onSubmit:p.onSubmit(e=>{let{IVFDate:t}=e,a=Number(e.dayTransfer),l=`${S.Q.type}=${r.IVF}&${S.Q.startDate}=${y()(t).format(S.A)}&${S.Q.additional}=${a}`;n(getDueDateIVF(t,Number(a)),l)})};return s.createElement(j.Provider,{value:{form:p,transferDateOptions:m}},s.createElement(k.H,Object.assign({formLayout:a},g),"inline"===a?s.createElement(InlineLayout$2,null):"mb"===u.other.template?s.createElement(MbLayout$2,null):s.createElement(DefaultLayout$2,null),s.createElement(k.H.FormRow,{className:t.submitWrapper},s.createElement(k.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:l,className:(0,c.default)("due-date-calculate-button",t.submitBtn),type:"submit"},o),i("dueDatePage.lastPeriod.calculate")))))},H=(0,s.createContext)({}),DefaultLayout$1=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(H),a=(0,s.useMemo)(()=>[...Array(21)].map((t,a)=>({label:e("dueDatePage.daysText",{number:a+20}),value:`${a+20}`})),[]);return s.createElement(s.Fragment,null,s.createElement(k.H.FormRow,null,s.createElement(x.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.lastPeriod.lastPeriodLabel"))},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(k.H.FormRow,null,s.createElement(w.I.Wrapper,{label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.lastPeriod.periodLengthLabel"))},s.createElement(w.S,Object.assign({placeholder:e("tools.inputPlaceholder",{content:e("dueDatePage.daysText",{number:30})}),data:a,withinPortal:!0},t.getInputProps("periodLength"))))))},InlineLayout$1=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(H),a=(0,s.useMemo)(()=>[...Array(21)].map((t,a)=>({label:e("dueDatePage.daysText",{number:a+20}),value:`${a+20}`})),[]);return s.createElement(s.Fragment,null,s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{label:e("dueDatePage.lastPeriod.lastPeriodLabel"),width:300},s.createElement(x.D,Object.assign({},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date})))),s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{label:e("dueDatePage.lastPeriod.periodLengthLabel"),width:300},s.createElement(w.S,Object.assign({placeholder:e("tools.inputPlaceholder",{content:e("dueDatePage.daysText",{number:30})}),data:a},t.getInputProps("periodLength"),{error:null,withinPortal:!0})))),t.errors.periodLength&&s.createElement(k.H.FormRow,null,s.createElement(k.H.Error,null,t.errors.periodLength)))},MbLayout$1=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)(H);return s.createElement(s.Fragment,null,s.createElement(k.H.BorderBoxControl,{label:e("dueDatePage.lastPeriod.lastPeriodLabel"),rightSection:s.createElement(I.Z,null)},s.createElement(x.D,Object.assign({rightSection:null},t.getInputProps("lastPeriodDate"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(k.H.BorderBoxControl,{label:e("dueDatePage.lastPeriod.periodLengthLabel"),rightSection:e("ovulationPage.dayUnit")},s.createElement(w.I.Number,Object.assign({min:20,max:40,placeholder:e("tools.inputPlaceholder",{content:"30"})},t.getInputProps("periodLength")))),t.errors.periodLength&&s.createElement(k.H.Error,null,t.errors.periodLength))},LastPeriodForm=({})=>{let{formLayout:e,onSubmit:t,currentUrl:a,submitProps:n}=(0,s.useContext)(N),{classes:l={}}=(0,s.useContext)(_.C),{t:o}=(0,D.u)(),i=(0,d.rZ)(),u="mb"===i.other.template,m=(0,f.c)({initialValues:{lastPeriodDate:new Date},validate:{periodLength:(0,C.U)(o("validation.error.requiredField"))}}),p={onSubmit:m.onSubmit(e=>{let{periodLength:a,lastPeriodDate:n}=e,l=`${S.Q.type}=${r.lastPeriod}&${S.Q.startDate}=${y()(n).format(S.A)}&${S.Q.additional}=${a}`;t(getDueDateLastPeriod(n,a),l)})};return s.createElement(H.Provider,{value:{form:m}},s.createElement(k.H,Object.assign({formLayout:e},p),"inline"===e?s.createElement(InlineLayout$1,null):u?s.createElement(MbLayout$1,null):s.createElement(DefaultLayout$1,null),s.createElement(k.H.FormRow,{className:l.submitWrapper},s.createElement(k.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:a,className:(0,c.default)("due-date-calculate-button",l.submitBtn),type:"submit"},n),o("dueDatePage.lastPeriod.calculate")))))},$=(0,s.createContext)({}),Info=e=>{var{isMarryBaby:t,size:a=24}=e,n=(0,i._)(e,["isMarryBaby","size"]);let l=Object.assign({width:a,height:a},n);return s.createElement("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00065 1.3335C4.32065 1.3335 1.33398 4.32016 1.33398 8.00016C1.33398 11.6802 4.32065 14.6668 8.00065 14.6668C11.6807 14.6668 14.6673 11.6802 14.6673 8.00016C14.6673 4.32016 11.6807 1.3335 8.00065 1.3335ZM8.00065 11.3335C7.63398 11.3335 7.33398 11.0335 7.33398 10.6668V8.00016C7.33398 7.6335 7.63398 7.3335 8.00065 7.3335C8.36732 7.3335 8.66732 7.6335 8.66732 8.00016V10.6668C8.66732 11.0335 8.36732 11.3335 8.00065 11.3335ZM7.33398 6.00016H8.66732V4.66683H7.33398V6.00016Z",fill:"#2D87F3"}))},DefaultLayout=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)($),a=s.createElement(P.T,{size:"p4",color:M.r.colors.gray400},"mm"),n=t.getInputProps("ultrasoundCRL"),l=t.getInputProps("ultrasoundMSD");return s.createElement(s.Fragment,null,s.createElement(k.H.FormRow,null,s.createElement(x.D,Object.assign({label:s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.date_of_ultrasound"))},t.getInputProps("dateOfUltrasound"),{popoverProps:{withinPortal:!0},maxDate:new Date}))),s.createElement(k.H.FormRow,null,s.createElement(m.k,{align:"center",gap:4,mb:4},s.createElement(P.T,{size:"p2",weight:"semiBold"},e("dueDatePage.validation.one_is_required")),s.createElement(p.u,{withinPortal:!0,withArrow:!0,width:300,multiline:!0,label:e("dueDatePage.ultrasound.tooltip")},s.createElement(m.k,null,s.createElement(Info,{size:16})))),s.createElement(m.k,{gap:8},s.createElement(w.I,Object.assign({placeholder:"CRL",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},n,{errorProps:{sx:{display:"none"}}})),s.createElement(w.I,Object.assign({placeholder:"MSD",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},l,{errorProps:{sx:{display:"none"}}}))),(t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)&&s.createElement(P.T,{size:"p4",color:M.r.colors.red500},t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)))},InlineLayout=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)($),a=s.createElement(P.T,{size:"p4",color:M.r.colors.gray400},"mm"),n=t.getInputProps("ultrasoundCRL"),l=t.getInputProps("ultrasoundMSD");return s.createElement(s.Fragment,null,s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{width:300,label:e("dueDatePage.date_of_ultrasound")},s.createElement(x.D,Object.assign({},t.getInputProps("dateOfUltrasound"),{popoverProps:{withinPortal:!0},maxDate:new Date,error:null})))),s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{width:300,label:s.createElement(m.k,{align:"center",gap:4},s.createElement("span",null,e("dueDatePage.validation.one_is_required")),s.createElement(p.u,{withinPortal:!0,withArrow:!0,width:300,multiline:!0,label:e("dueDatePage.ultrasound.tooltip")},s.createElement(m.k,null,s.createElement(Info,{size:16}))))},s.createElement(g.x,null,s.createElement(m.k,{gap:8},s.createElement(w.I,Object.assign({placeholder:"CRL",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},n,{errorProps:{sx:{display:"none"}}})),s.createElement(w.I,Object.assign({placeholder:"MSD",sx:{flex:1},rightSection:a,type:"number",min:0,step:.01},l,{errorProps:{sx:{display:"none"}}}))))),(t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)&&s.createElement(k.H.Error,null,t.errors.ultrasoundCRL||t.errors.ultrasoundMSD)))},MbLayout=()=>{let{t:e}=(0,D.u)(),{form:t}=(0,s.useContext)($);return s.createElement(k.H.BorderBoxControl,{label:e("dueDatePage.date_of_ultrasound"),rightSection:s.createElement(I.Z,null)},s.createElement(x.D,Object.assign({},t.getInputProps("dateOfUltrasound"),{popoverProps:{withinPortal:!0},rightSection:null,maxDate:new Date})))},UltrasoundForm=({})=>{let{classes:e={}}=(0,s.useContext)(_.C),{formLayout:t,onSubmit:a,currentUrl:n,submitProps:l}=(0,s.useContext)(N),o=(0,d.rZ)(),{t:i}=(0,D.u)(),u=(0,f.c)({initialValues:{dateOfUltrasound:new Date},validate:e=>{let t=Number(e.ultrasoundCRL),a=Number(e.ultrasoundMSD);if(!t&&!a)return{ultrasoundCRL:i("dueDatePage.validation.record_not_valid")};let n=t>=5&&t<=101,l=a>0&&a<=13;return n||l?{}:t&&!n?{ultrasoundCRL:i("dueDatePage.validation.record_not_valid")}:a&&!l?{ultrasoundMSD:i("dueDatePage.validation.crl")}:void 0}}),m={onSubmit:u.onSubmit(e=>{let{dateOfUltrasound:t,ultrasoundCRL:n,ultrasoundMSD:l}=e,o=`${n}|${l}`,i=`${S.Q.type}=${r.ultrasound}&${S.Q.startDate}=${y()(t).format(S.A)}&${S.Q.additional}=${o}`;a(getDueDateUltrasound(t,o),i)})};return s.createElement($.Provider,{value:{form:u}},s.createElement(k.H,Object.assign({formLayout:t},m),"inline"===t?s.createElement(InlineLayout,null):"mb"===o.other.template?s.createElement(MbLayout,null):s.createElement(DefaultLayout,null),s.createElement(k.H.FormRow,{className:e.submitWrapper},s.createElement(k.H.Submit,Object.assign({dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:n,className:(0,c.default)("due-date-calculate-button",e.submitBtn),type:"submit"},l),i("dueDatePage.lastPeriod.calculate")))))},FormSwitcher=()=>{let{calculatorType:e}=(0,s.useContext)(N);switch(e){case r.lastPeriod:return s.createElement(LastPeriodForm,null);case r.conception:return s.createElement(ConceptionForm,null);case r.IVF:return s.createElement(IVFForm,null);case r.IUI:return s.createElement(IUIForm,null);case r.ultrasound:return s.createElement(UltrasoundForm,null);default:return null}};(l=o||(o={}))[l.trackPeriod=0]="trackPeriod",l[l.conceive=1]="conceive",l[l.avoidPregnancy=2]="avoidPregnancy";let z=(0,s.forwardRef)((e,t)=>{var{label:a,icon:n}=e,l=(0,i._)(e,["label","icon"]);return s.createElement(g.x,Object.assign({ref:t,sx:{gap:"1rem",display:"flex",padding:"5px 6px",alignItems:"center","&[data-selected]":{backgroundColor:M.r.colors.gray100},"&[data-selected]:hover":{backgroundColor:M.r.colors.gray100},"&[data-hovered]":{backgroundColor:M.r.colors.gray100}},className:""},l),n,s.createElement(P.T,{size:"p4"},a))}),DueDateForm=e=>{var{locale:t,formLayout:a="default",submitProps:n,currentUrl:l,isMobile:o,onSubmit:d}=e,c=(0,i._)(e,["locale","formLayout","submitProps","currentUrl","isMobile","onSubmit"]);let{t:u}=(0,D.u)(),[m,p]=(0,s.useState)(r.lastPeriod),g=(0,s.useMemo)(()=>(null==L?void 0:L[t].map(e=>{let t=T[e],a=t.icon;return Object.assign(Object.assign({},t),{label:u(t.label),icon:s.createElement(a,{size:20})})}))||[],[t,u]),v=(0,s.useMemo)(()=>g.find(e=>e.value===String(m)),[m,g]);return s.createElement(N.Provider,{value:{calculatingMethods:g,submitProps:n,currentUrl:l,isMobile:o,formLayout:a,onSubmit:d,calculatorType:m,setCalculatorType:p}},s.createElement(k.H,Object.assign({component:"div",formLayout:a},c),"default"===a?s.createElement(k.H.FormRow,null,s.createElement(k.H.Control,null,s.createElement(w.S,{label:s.createElement(P.T,{size:"p2",weight:"semiBold"},u("dueDatePage.calculationMethod")),value:String(m),data:g,itemComponent:z,onChange:e=>p(Number(e)),icon:null==v?void 0:v.icon}))):s.createElement(k.H.FormRow,null,s.createElement(k.H.BorderInlineControl,{label:s.createElement(P.T,{size:"p2",weight:"semiBold"},u("dueDatePage.calculationMethod")),width:300},s.createElement(w.S,{value:String(m),data:g,itemComponent:z,onChange:e=>p(Number(e))}))),s.createElement(FormSwitcher,null)))}},HChT: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 M},d:function(){return getPostFormData},e:function(){return editPost},f:function(){return createPost},g:function(){return getDefaultFailNoti},h:function(){return deletePost},i:function(){return R},j:function(){return deleteComment},k:function(){return decodeCommentBody},l:function(){return likeUnlikeComment},m:function(){return likeUnlikePost},u:function(){return useImagePicker}});var n=a("q1tI"),l=a("9B3w"),r=a("iHoF"),o=a("F/Hd"),i=a("oKqh"),s=a("i8i4"),d=a("cMvO"),c=a("rBCA"),u=a("iBNF"),m=a("fbRC"),p=a("5JWB"),g=a("thIk"),v=a("uyts"),h=a("TUmP"),b=a("IQVP"),f=a("VeM9"),C=a("inbl"),E=a("a2sD"),y=a("XmEH"),w=a("rg4t"),x=a("t/pd"),P=a("D0vz"),D=a("Y6TQ"),k=a("XB+i"),I=a("/pFO");let useImagePicker=(e,t)=>{let[a,l]=(0,n.useState)(e||[]),r=(0,n.useMemo)(()=>(e||a).map(e=>"string"==typeof e?e:URL.createObjectURL(e)),[e,a]);return{onSelectImages:n=>{let r=n.target.files;if(r){if(t&&e){let n=e||a;t(n.concat(Array.from(r)))}else l(a=>{let n=e||a;return t&&t(n.concat(Array.from(r))),n.concat(Array.from(r))})}},onRemoveImage:a=>{t&&e?(e.splice(a,1),t(e.slice())):l(n=>{let l=e||n;return l.splice(a,1),t&&t(l.slice()),l.slice()})},onRemoveAllImages:()=>{t?t([]):l([])},imageSrcs:r,imageFiles:e||a}},getDefaultFailNoti=e=>({message:e("notification.failure"),type:"danger"}),likeUnlikePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,d.b)((0,d.e)(b.yy.POST.LIKE,{id:e,_locale:t}),"GET");return a}),deletePost=({id:e,locale:t})=>(0,m.a)(void 0,void 0,void 0,function*(){if(!e)return;let a=yield(0,d.b)((0,d.e)(b.yy.POST.DELETE,{id:e,_locale:t}),"DELETE");return a}),getPostFormData=({title:e,description:t,communityId:a,imageFiles:n,previewUrl:l,topicIds:r,locale:o,sanitizeFunction:s,categoryCommunityId:d,categoryTopicIds:c,introUrl:u,bannerUrl:p,scheduleTime:g,isAnonymous:v,isAskDoctor:b})=>(0,m.a)(void 0,void 0,void 0,function*(){let m=new FormData,C=(0,f.j)(t),E=(0,f.j)(e),y=(0,f.i)(C);if(m.append("title",E),m.append("description",(0,f.k)(C,s)),d?m.append("category_community",String(d)):a&&m.append("community_id",String(a)),m.append("is_anonymous",v?"1":"0"),m.append("is_question",b?"1":"0"),(null==l?void 0:l.title)&&m.append("preview_title",l.title),(null==l?void 0:l.description)&&m.append("preview_description",l.description),(null==l?void 0:l.url)&&m.append("preview_link",(0,i.c)(l.url)),(null==l?void 0:l.image)&&m.append("preview_image",(0,i.c)(l.image)),null==r||r.forEach(e=>{m.append("topics[]",String(e||""))}),null==c||c.forEach(e=>{m.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,f.u)(e,o))},2e3*t)})));null==e||e.filter(Boolean).slice(0,h.M).forEach((e,t)=>{m.append(`images[${t}]`,e)})}else m.append("images","");return null==y||y.forEach(e=>{m.append("mention_ids[]",e)}),m.append("intro_url",u||""),m.append("banner",p||""),g&&(m.append("post_type","scheduled"),m.append("schedule_datetime",g)),m}),createPost=({locale:e,formData:t,isArticleComment:a})=>(0,m.a)(void 0,void 0,void 0,function*(){let n=yield(0,d.b)((0,d.e)(a?b.yy.POST.CREATE_ARTICLE_COMMENT:b.yy.POST.CREATE,{_locale:e}),"POST",{data:t});return n}),editPost=({id:e,locale:t,formData:a})=>(0,m.a)(void 0,void 0,void 0,function*(){let n=yield(0,d.b)((0,d.e)(b.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,d.b)((0,d.e)(b.yy.POST.REPORT,{_locale:a,id:e}),"POST",{data:n})},_=c.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 ${u.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; } `} `,S=c.Z.div` cursor: pointer; display: flex; align-items: center; `,PopupFrame=({className:e,style:t,closeIcon:a,heading:l="",children:o,isOpen:i=!1,hasFullscreen:s=!1,disableClickOutside:d=!1,initExpand:c=!1,onExpandChange:u,onClose:m=()=>null})=>{let[p,g]=(0,n.useState)(c);return n.createElement(_,{className:e,style:t,isExpand:p,hasFullscreen:s},n.createElement(D.P,{type:"confirm",onClose:m,isOpen:i,closeIcon:a||n.createElement("img",{src:k.C,loading:"lazy"}),enableAnimation:!s,disableClickOutside:d},n.createElement("div",{className:"header"},n.createElement(r.H,{tag:"h5"},l),s&&n.createElement(S,{onClick:()=>{null==u||u(),g(!p)}},n.createElement(P.Z,{size:14,isExpand:p}))),n.createElement("div",{className:"content"},"function"==typeof o?o(p):o)))};var M="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 T=c.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: ${u.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: ${u.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:c,description:u,acceptText:m,cancelText:p,onAccept:g,onCancel:v,thumbnail:h,isThumbnailIcon:b,onClose:f,acceptBtnTracking:C,acceptBtnProps:E,cancelBtnProps:y})=>{let{data:{env:{isMarryBaby:w}}}=(0,n.useContext)(d.T),x="boolean"==typeof t?t:w,[P,D]=(0,n.useState)(!1);return((0,n.useEffect)(()=>((0,i.t)(!0),setTimeout(()=>D(!0),0),()=>(0,i.t)(!1)),[]),"undefined"==typeof window)?null:s.createPortal(n.createElement(T,{"data-is-marrybaby":x,className:e,style:a,"data-open":P},n.createElement(PopupFrame,{className:"popup-frame",isOpen:P,onClose:f},n.createElement("div",{className:"confirm-dialog",onClick:e=>e.stopPropagation()},n.createElement("div",{className:"confirm-content"},h&&n.createElement("div",{className:`thumbnail-container ${b?"is-icon":""}`},n.createElement("img",{className:"thumbnail",src:h,loading:"lazy"})),n.createElement(r.H,{className:"title",tag:"h2"},c),n.createElement(o.T,{className:"desc",size:"lg"},u),n.createElement("div",{className:"btn-group"},n.createElement(l.B,Object.assign({theme:x?"marryBaby":"helloSites",size:"md",color:"tertiary",onClick:()=>{null==g||g(),null==f||f()}},E,C),m),n.createElement(l.B,Object.assign({theme:x?"marryBaby":"helloSites",size:"md",onClick:()=>{null==v||v(),null==f||f()}},y),p)))),x&&h&&n.createElement("div",{className:`thumbnail-container is-mobile ${b?"is-icon":""}`},n.createElement("img",{className:"thumbnail",src:h,loading:"lazy"})))),(0,i.a)())},F=c.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: ${u.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: ${u.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 ${u.r.colors.gray200}; border-radius: ${u.r.borderRadius}; &:active, &:focus { border-color: ${u.r.colors.primaryBase}; box-shadow: 0px 0px 2px 2px ${u.r.colors.primary200}; } &:disabled { background-color: ${u.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: ${u.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: ${u.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: ${u.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: ${u.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; } } } `,L=(0,n.createContext)({}),getCommentFormBody=({postId:e,message:t,photos:a,link:n,locale:l,sanitizeFunction:r,replyingUserId:o,replyingUserName:i,replyingId:s})=>(0,m.a)(void 0,void 0,void 0,function*(){let d=new FormData,c=(0,f.k)(t.replace(/(\ )+/g," "),r),u=(0,f.i)(c);if(a&&a.length>0){let e=yield Promise.all(null==a?void 0:a.map(e=>(0,f.u)(e,l)));e.filter(Boolean).slice(0,h.M).forEach(e=>{d.append("images[]",e)})}return n&&d.append("link",n),null==u||u.forEach(e=>{d.append("mention_ids[]",e)}),d.append("post_id",e),s&&d.append("parent_id",s),o&&(u.unshift(o),c=`[mention+id="${o}"+name="${(i||"").replace('"',"'")}"]${c}`,d.append("parent_user_id",String(o))),d.append("content",c),d.append("content",c),d}),submitComment=(e,t)=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,d.b)((0,d.e)(b.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,m.a)(void 0,void 0,void 0,function*(){return(0,d.b)((0,d.e)(b.yy.COMMENT.REPLY,{_locale:t}),"POST",{data:e})}),likeUnlikeComment=({commentId:e,setLike:t=!1,locale:a})=>(0,m.a)(void 0,void 0,void 0,function*(){return(0,d.b)((0,d.e)(t?b.yy.COMMENT.LIKE:b.yy.COMMENT.UNLIKE,{_locale:a,id:e}),"GET")}),deleteComment=({id:e,locale:t})=>(0,d.b)((0,d.e)(b.yy.COMMENT.DELETE,{_locale:t,id:e}),"DELETE"),InputCommentBar=({isReply:e,className:t,onClose:a,replyToName:r,style:i,replyingId:s,replyingUser:c,onPostSuccess:u,post:b,isMarryBaby:f})=>{let{action:{pushNotifications:x,sanitizeFunction:P},data:{userInfo:D,locale:k,env:{isMarryBaby:I}}}=(0,n.useContext)(d.T),{t:_}=(0,g.u)(),{onSelectImages:S,onRemoveImage:T,imageSrcs:O,onRemoveAllImages:N,imageFiles:R}=useImagePicker(),[B,j]=(0,n.useState)(""),{trigger:H}=(0,n.useContext)(L),[$,z]=(0,n.useState)(!1),A=(0,n.useRef)(null),Z=(0,n.useRef)(null),U=(0,n.useRef)(null),[V,G]=(0,n.useState)([]),[Q,q]=(0,n.useState)([]),[W,Y]=(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=Z.current)||void 0===e||e.focus()},400)},[H]),n.createElement(F,{"data-is-reply":e,className:t,style:i},e&&n.createElement("div",{className:"reply-to-container"},n.createElement(o.T,{size:"p4"},n.createElement("span",{dangerouslySetInnerHTML:{__html:_("inputComment.replyTo",{name:`@${r||""}`})}})),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==D?void 0:D.id)?D.avatar:h.a,username:(null==D?void 0:D.name)||(null==D?void 0:D.username)}),n.createElement("input",{ref:A,onChange:S,type:"file",multiple:!0,accept:"image/png,image/jpeg",name:"images",style:{display:"none"}}),n.createElement(p.I,{value:B,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(w.R,{className:"textarea",html:B,onChange:j,onImagePickerClick:()=>{var e;return null===(e=A.current)||void 0===e?void 0:e.click()},bannedWords:Q,onPreviewUrlChange:Y,onInvalidUrlsChange:G,setEditorRef:e=>Z.current=e,isReplying:e}))}),n.createElement(l.B,{theme:("boolean"==typeof f?f:I)?"marryBaby":"helloSites",className:"send-button",size:"sm",onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){var t,n,l,r,o,i,d,m,p;if((null==b?void 0:b.id)&&!$){z(!0);try{let g=yield getCommentFormBody(Object.assign({message:B,photos:R,postId:String(b.id),link:null==W?void 0:W.url,sanitizeFunction:P,locale:k},e&&s?{replyingUserId:String((null==c?void 0:c.id)||(null===(t=null==b?void 0:b.author)||void 0===t?void 0:t.id)||""),replyingId:s,replyingUserName:(null==c?void 0:c.name)||(null==c?void 0:c.username)||""}:{})),h=yield e&&s?submitReply(g,k):submitComment(g,k),f=null==h?void 0:h.data;(null==f?void 0:f.id)&&!(null===(l=null===(n=null==h?void 0:h.messages)||void 0===n?void 0:n.moderation)||void 0===l?void 0:l.type)?(e=>{j(""),N(),a&&a();let t=(0,v.e)(e.data);"string"==typeof t.images&&(t.images=JSON.parse(t.images)),u&&u(t)})(h):(null===(o=null===(r=null==h?void 0:h.messages)||void 0===r?void 0:r.moderation)||void 0===o?void 0:o.type)==="banned"?(x({title:_("notification.comment.blocked.title"),message:_("notification.comment.blocked.message"),type:"danger"}),h.messages.moderation.words&&q(h.messages.moderation.words)):(null===(d=null===(i=null==h?void 0:h.messages)||void 0===i?void 0:i.moderation)||void 0===d?void 0:d.type)==="suspect"?(x({title:_("notification.comment.suspect.title"),message:_("notification.comment.suspect.message"),type:"warning"}),j(""),N(),a&&a()):(null===(m=null==h?void 0:h.messages)||void 0===m?void 0:m.find(e=>{var t;return!!(null===(t=null==e?void 0:e.includes)||void 0===t?void 0:t.call(e,"suspend"))}))?(x({message:_("notification.suspend.message"),type:"warning"}),j(""),N(),a&&a()):x({title:"",message:(null===(p=null==h?void 0:h.messages)||void 0===p?void 0:p[0])||_("notification.comment.somethingWrong"),type:"danger"})}catch(e){x({title:"",message:_("notification.comment.somethingWrong"),type:"danger"})}z(!1)}}),isLoading:$,isDisabled:!!(null==V?void 0:V.length)||$||!B||(null==B?void 0:B.length)<2||!B.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==V?void 0:V.length)?n.createElement("div",{className:"error-text"},_("notification.limitUrlDomain")):null,(!O||0===O.length)&&W&&n.createElement("div",{className:"link-preview-wrapper"},W.isFetching?n.createElement(E.L,null):n.createElement(n.Fragment,null,n.createElement(C.C,{title:W.title,url:W.url||"#",image:W.image,noRefetch:!0}),n.createElement("img",{src:M,className:"icon-close",onClick:()=>Y(null),loading:"lazy"}))),O&&O.length>0&&n.createElement("div",{className:"preview-images-container"},O.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:M,className:"icon-close-circle",onClick:()=>T(t),loading:"lazy"})))))},SharePopup=({trackingCategory:e,className:t,style:a,url:l,text:r,onClose:o})=>{let{data:{env:{isMarryBaby:s}}}=(0,n.useContext)(d.T),{t:c}=(0,g.u)(),[u,m]=(0,n.useState)(!1);return(0,n.useEffect)(()=>((0,i.t)(!0),setTimeout(()=>m(!0),0),()=>(0,i.t)(!1)),[]),n.createElement(x.h,null,n.createElement(O,{"data-is-marrybaby":s,className:t,style:a},n.createElement(PopupFrame,{className:"share-popup",isOpen:u,onClose:o,heading:c("bottomBar.share")},u&&n.createElement(I.r,{trackingCategory:e,shareUrl:l||("undefined"!=typeof window?window.location.href:""),title:r}))))},O=c.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 ${u.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; } } } `,N=c.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 R="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:r,onClose:i,postId:s})=>{let{data:{locale:c,env:{isMarryBaby:p}},action:{pushNotifications:v}}=(0,n.useContext)(d.T),{t:h}=(0,g.u)(),[b,f]=(0,n.useState)(!1);return n.createElement(N,{"data-is-marrybaby":p,className:e,style:t},n.createElement("ul",{className:"report-list"},n.createElement("li",{className:"report-item"},n.createElement("img",{src:R,loading:"lazy"}),n.createElement(o.T,{className:"__label",color:u.r.colors.gray800,size:"p4"},r))),n.createElement(l.B,{theme:p?"marryBaby":"helloSites",className:"report-submit",size:"lg",color:"primary",isLoading:b,onClick:()=>(0,m.a)(void 0,void 0,void 0,function*(){if(s&&!b){f(!0);try{let e=yield reportPost({id:s,reason:a,locale:c});(null==e?void 0:e.status)===1&&(v({message:"Post reported",type:"success"}),i&&i())}catch(e){}f(!1)}})},h("submit")))}}}]);