"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1657],{slYB:function(e,t,a){a.d(t,{U:function(){return UserAvatar}});var r=a("T/vS"),l=a("q1tI"),n=a("GAI/"),o=a("rBCA"),i=a("iBNF");let h=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:s,size:c}=e,m=(0,r.a)(e,["className","isMarryBaby","style","avatar","username","size"]);let{data:{env:{isMarryBaby:u}}}=(0,l.useContext)(n.T),[d,p]=(0,l.useState)(!1);return l.createElement(h,Object.assign({"data-is-marrybaby":"boolean"==typeof a?a:u,className:t,style:o,size:c},m),i&&!d?l.createElement("img",{loading:"lazy",src:i,className:"avatar",alt:"avatar",onError:()=>{d||p(!0)}}):l.createElement("div",{className:"avatar avatar-default"},s&&(null==s?void 0:s.length)>0?s[0].toUpperCase():"A"))}},HC5J:function(e,t,a){a.d(t,{C:function(){return n},F:function(){return o},G:function(){return GlobalTextStyleNew},T:function(){return TemplateProvider},a:function(){return s},u:function(){return useTemplateVariant}});var r,l,n,o,i=a("mYVa"),h=a("q1tI");(r=n||(n={})).LEADGEN="leadgen",r.NONE="none",(l=o||(o={}))[l.regular=400]="regular",l[l.halfBold=500]="halfBold",l[l.semiBold=600]="semiBold",l[l.bold=700]="bold";let s={[n.NONE]:{fontSize:{base:[(0,i.h)(16),(0,i.h)(16)],lg:[(0,i.h)(18),(0,i.h)(16)],md:[(0,i.h)(18),(0,i.h)(16)],sm:[(0,i.h)(16),(0,i.h)(14)],xs:[(0,i.h)(14),(0,i.h)(12)],s1:[(0,i.h)(22),(0,i.h)(18)],s2:[(0,i.h)(18),(0,i.h)(16)],s3:[(0,i.h)(16),(0,i.h)(14)],s4:[(0,i.h)(14),(0,i.h)(12)],s5:[(0,i.h)(12),(0,i.h)(12)],p1:[(0,i.h)(18),(0,i.h)(16)],p2:[(0,i.h)(16),(0,i.h)(16)],p3:[(0,i.h)(16),(0,i.h)(14)],p4:[(0,i.h)(14),(0,i.h)(12)],p5:[(0,i.h)(12),(0,i.h)(12)],c1:[(0,i.h)(16),(0,i.h)(14)],c2:[(0,i.h)(14),(0,i.h)(12)],n1:[(0,i.h)(12),(0,i.h)(12)],label1:[(0,i.h)(14),(0,i.h)(14)],label2:[(0,i.h)(12),(0,i.h)(12)],h1:[(0,i.h)(40),(0,i.h)(26)],h2:[(0,i.h)(32),(0,i.h)(24)],h3:[(0,i.h)(26),(0,i.h)(20)],h4:[(0,i.h)(22),(0,i.h)(18)],h5:[(0,i.h)(18),(0,i.h)(16)],h5New:[(0,i.h)(20),(0,i.h)(18)],h6:[(0,i.h)(16),(0,i.h)(14)],title1:[(0,i.h)(17),(0,i.h)(17)],title2:[(0,i.h)(15),(0,i.h)(15)],body2:[(0,i.h)(15),(0,i.h)(15)]},lineHeight:{base:[(0,i.h)(24),(0,i.h)(24)],lg:[(0,i.h)(32),(0,i.h)(28)],md:[(0,i.h)(32),(0,i.h)(28)],sm:[(0,i.h)(24),(0,i.h)(22)],xs:[(0,i.h)(24),(0,i.h)(18)],s1:[(0,i.h)(32),(0,i.h)(26)],s2:[(0,i.h)(28),(0,i.h)(24)],s3:[(0,i.h)(24),(0,i.h)(24)],s4:[(0,i.h)(22),(0,i.h)(18)],s5:[(0,i.h)(18),(0,i.h)(18)],p1:[(0,i.h)(28),(0,i.h)(28)],p2:[(0,i.h)(24),(0,i.h)(24)],p3:[(0,i.h)(24),(0,i.h)(22)],p4:[(0,i.h)(22),(0,i.h)(18)],c1:[(0,i.h)(24),(0,i.h)(22)],c2:[(0,i.h)(22),(0,i.h)(18)],n1:[(0,i.h)(18),(0,i.h)(18)],label1:[(0,i.h)(22),(0,i.h)(22)],label2:[(0,i.h)(18),(0,i.h)(18)],h1:[(0,i.h)(52),(0,i.h)(34)],h2:[(0,i.h)(42),(0,i.h)(32)],h3:[(0,i.h)(36),(0,i.h)(26)],h4:[(0,i.h)(32),(0,i.h)(26)],h5:[(0,i.h)(28),(0,i.h)(24)],h5New:[(0,i.h)(28),(0,i.h)(24)],h6:[(0,i.h)(24),(0,i.h)(22)],title1:[(0,i.h)(24),(0,i.h)(24)],title2:[(0,i.h)(24),(0,i.h)(24)],body2:[(0,i.h)(24),(0,i.h)(24)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.2,-.2],p2:[0,-.2],p3:[0,-.2],p4:[-.2,0],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.8,-.7],h4:[-.6,-.6],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3]},fontWeightBySize:{s1:o.semiBold,s2:o.semiBold,s3:o.semiBold,s4:o.semiBold,h1:o.bold,h2:o.bold,h3:o.bold,h4:o.bold,h5:o.bold,h5New:o.semiBold,h6:o.bold},fontWeight:o},[n.LEADGEN]:{fontSize:{base:[(0,i.h)(16),(0,i.h)(16)],lg:[(0,i.h)(18),(0,i.h)(16)],md:[(0,i.h)(18),(0,i.h)(16)],sm:[(0,i.h)(16),(0,i.h)(14)],xs:[(0,i.h)(14),(0,i.h)(12)],s1:[(0,i.h)(22),(0,i.h)(18)],s2:[(0,i.h)(18),(0,i.h)(16)],s3:[(0,i.h)(16),(0,i.h)(14)],s4:[(0,i.h)(14),(0,i.h)(12)],s5:[(0,i.h)(12),(0,i.h)(12)],p1:[(0,i.h)(17),(0,i.h)(17)],p2:[(0,i.h)(15),(0,i.h)(15)],p3:[(0,i.h)(13),(0,i.h)(13)],p4:[(0,i.h)(14),(0,i.h)(12)],p5:[(0,i.h)(12),(0,i.h)(12)],c1:[(0,i.h)(12),(0,i.h)(12)],c2:[(0,i.h)(11),(0,i.h)(11)],n1:[(0,i.h)(12),(0,i.h)(12)],label1:[(0,i.h)(14),(0,i.h)(14)],label2:[(0,i.h)(12),(0,i.h)(12)],h1:[(0,i.h)(40),(0,i.h)(26)],h2:[(0,i.h)(32),(0,i.h)(24)],h3:[(0,i.h)(26),(0,i.h)(22)],h4:[(0,i.h)(22),(0,i.h)(20)],h5:[(0,i.h)(18),(0,i.h)(16)],h5New:[(0,i.h)(20),(0,i.h)(18)],h6:[(0,i.h)(16),(0,i.h)(14)],title1:[(0,i.h)(17),(0,i.h)(17)],title2:[(0,i.h)(15),(0,i.h)(15)],body2:[(0,i.h)(15),(0,i.h)(15)],overline:[(0,i.h)(11),(0,i.h)(11)],subText:[(0,i.h)(10),(0,i.h)(10)]},lineHeight:{base:[(0,i.h)(24),(0,i.h)(24)],lg:[(0,i.h)(32),(0,i.h)(28)],md:[(0,i.h)(32),(0,i.h)(28)],sm:[(0,i.h)(24),(0,i.h)(22)],xs:[(0,i.h)(24),(0,i.h)(18)],s1:[(0,i.h)(32),(0,i.h)(26)],s2:[(0,i.h)(28),(0,i.h)(24)],s3:[(0,i.h)(24),(0,i.h)(24)],s4:[(0,i.h)(22),(0,i.h)(18)],s5:[(0,i.h)(18),(0,i.h)(18)],p1:[(0,i.h)(28),(0,i.h)(28)],p2:[(0,i.h)(24),(0,i.h)(24)],p3:[(0,i.h)(20),(0,i.h)(20)],p4:[(0,i.h)(22),(0,i.h)(18)],c1:[(0,i.h)(16),(0,i.h)(16)],c2:[(0,i.h)(22),(0,i.h)(18)],n1:[(0,i.h)(18),(0,i.h)(18)],label1:[(0,i.h)(22),(0,i.h)(22)],label2:[(0,i.h)(18),(0,i.h)(18)],h1:[(0,i.h)(48),(0,i.h)(34)],h2:[(0,i.h)(40),(0,i.h)(32)],h3:[(0,i.h)(32),(0,i.h)(32)],h4:[(0,i.h)(32),(0,i.h)(28)],h5:[(0,i.h)(28),(0,i.h)(24)],h5New:[(0,i.h)(28),(0,i.h)(24)],h6:[(0,i.h)(24),(0,i.h)(22)],title1:[(0,i.h)(24),(0,i.h)(24)],title2:[(0,i.h)(24),(0,i.h)(24)],body2:[(0,i.h)(24),(0,i.h)(24)],overline:[(0,i.h)(12),(0,i.h)(12)],subText:[(0,i.h)(12),(0,i.h)(12)]},letterSpacing:{lg:[-.2,0],md:[-.2,0],sm:[0,-.2],s1:[-.6,-.6],s2:[-.4,-.2],s3:[0,-.2],s4:[0,-.2],p1:[-.4,-.4],p2:[-.3,-.3],p3:[-.3,-.3],p4:[-.2,0],c1:[-.2,-.2],c2:[-.2,-.2],label1:[0,-.2],h1:[-1.2,-.9],h2:[-1,-.8],h3:[-.6,-.6],h4:[-.6,-.4],h5:[-.2,-.2],h5New:[-.4,-.4],h6:[0,-.2],n1:[-.2,-.2],title1:[-.4,-.4],title2:[-.3,-.3],body2:[-.3,-.3],overline:[-.2,-.2],subText:[-.2,-.2]},fontWeightBySize:{s1:o.semiBold,s2:o.semiBold,s3:o.semiBold,s4:o.semiBold,h1:o.bold,h2:o.bold,h3:o.bold,h4:o.bold,h5:o.bold,h5New:o.semiBold,h6:o.bold},fontWeight:o}},GlobalTextStyleNew=e=>({[n.LEADGEN]:{h1:{fontSize:(0,i.h)(40),lineHeight:(0,i.h)(48),letterSpacing:"-1.2px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(26),lineHeight:(0,i.h)(32),letterSpacing:"-0.6px"}},h2:{fontSize:(0,i.h)(32),lineHeight:(0,i.h)(40),letterSpacing:"-1px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(20),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"}},h3:{fontSize:(0,i.h)(26),lineHeight:(0,i.h)(32),letterSpacing:"-0.6px",[e.fn.smallerThan("sm")]:{fontSize:(0,i.h)(20),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"}},p1:{fontSize:(0,i.h)(17),lineHeight:(0,i.h)(28),letterSpacing:"-0.4px"},p2:{fontSize:(0,i.h)(15),lineHeight:(0,i.h)(24),letterSpacing:"-0.3px"}}}),c=(0,h.createContext)(n.NONE),TemplateProvider=({variant:e=n.NONE,children:t})=>h.createElement(c.Provider,{value:e},t),useTemplateVariant=()=>(0,h.useContext)(c)},M1TX:function(e,t,a){a.d(t,{F:function(){return Footer}});var r=a("q1tI"),l=a("mpds"),n=a("Wgwc"),o=a.n(n),i=a("SPK5"),h=a("OAL+"),s=a("Eso5"),c=a("dDw1"),m=a("un+D"),u=a("FfBq"),d=a("rBCA"),p=a("iBNF"),g=a("xrdX"),b=a("su2a"),y=a("h12z");let x=d.Z.footer` background-color: #1b3250; .inner { padding: 64px 24px 98px 24px; margin: 0 auto; } .newsletter { padding: 24px 0; } .footer-logo { max-width: 132px; max-height: 32px; &[data-is-sehat='true'] { max-width: 250px; } img { object-fit: contain; } } .social { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; > .icons { display: flex; gap: 16px; } } hr { height: 1px; border: none; margin: 16px 0 16px 0; background: ${p.r.colors.neutral500}; opacity: 0.1; outline: none; } .footer-menu-column { min-width: 168px; } .footer-menu-title { margin-bottom: 16px; } .footer-menu-link { display: block; } .footer-menu-link-wrapper { display: flex; flex-direction: column; gap: 12px; } .copyright { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; .copyright-content { color: ${p.r.colors.neutral500}; font-size: 12px; } .copyright-image-wrapper { flex-shrink: 0; flex-wrap: wrap; display: flex; gap: 16px; justify-content: flex-end; .copyright-image { align-self: flex-start; img { height: 32px; } } } } .otherSites { display: flex; gap: 16px; align-items: center; padding: 19px 0; border-top: 1px solid ${p.r.colors.neutral100}1a; border-bottom: 1px solid ${p.r.colors.neutral100}1a; .flags { display: flex; gap: 12px; } } .signupButton { display: none; border: none; margin-top: 16px; outline: none; text-transform: uppercase; } ${m.M.mbDown} { .inner { padding: 64px 0; } .social { flex-direction: column; gap: 10px; align-items: start; } hr { margin-top: 0px; } .copyright { align-items: center; text-align: center; } .copyright-image-wrapper { justify-content: center; max-width: unset; } .otherSites { flex-direction: column; padding: 24px 0; .linkTitle { text-align: center; } .flags { flex-wrap: wrap; justify-content: center; } } .footer-menu-title { margin-bottom: 12px; } .footer-menu { display: grid; grid-template-columns: repeat(2, 1fr); > .footer-menu-column { padding: 24px 0; } > .footer-menu-column:first-child { grid-column-start: 1; grid-column-end: 3; border-top: 1px solid ${p.r.colors.neutral100}1a; border-bottom: 1px solid ${p.r.colors.neutral100}1a; > .footer-menu-link-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); } } } .otherSites { margin-bottom: 24px; } } ${m.M.mbUp} { .newsletter > p { max-width: 360px; } .hrMobile { display: none; } .copyright { gap: 24px; flex-direction: row-reverse; align-items: center; justify-content: space-between; } .otherSites { margin-bottom: 40px; } .columns { display: flex; flex-direction: row; width: 100%; gap: 16px; margin-bottom: 40px; > div:nth-child(1) { display: flex; flex-direction: column; flex: 1; } > div:nth-child(2) { display: flex; flex-direction: row; gap: 24px; } } } `,f=d.Z.img` width: 32px; height: 32px; ${m.M.mbDown} { width: 24px; height: 24px; } .country-flag { width: 100%; height: 100%; } `,Flag=({url:e,dataEventCategory:t,dataEventAction:a,dataEventLabel:l})=>r.createElement(f,{loading:"lazy",className:"country-flag",src:e,alt:"Country Flag","data-event-category":t,"data-event-action":a,"data-content-label":l}),FooterMenuColumn=({title:e,items:t,locale:a,index:l})=>{let{isMobile:n}=(0,u.u)();return r.createElement("div",{className:"footer-menu-column"},e?r.createElement(c.T,{size:n?"s4":"s3",className:"footer-menu-title",weight:n?"regular":"semiBold",color:"neutral.6"},e):null,r.createElement("div",{className:"footer-menu-link-wrapper"},null==t?void 0:t.map((e,t)=>r.createElement(c.T,{size:n?"p3":"p4",as:"a","data-event-category":"Footer","data-event-action":e.title,"data-event-label":`https://${g.v[a]}${e.url}`,className:"footer-menu-link",href:e.url,key:t,color:"#fff",weight:n&&0===l?"semiBold":"regular"},e.title))))},DiscoverFooter=({className:e,footerInfo:t,locale:a})=>{var n,i,h,s,m,d,p,g,b,y,f;let{isMobile:v}=(0,u.u)(),E=null==t?void 0:t.menu,w=(null===(i=null===(n=null==t?void 0:t.general)||void 0===n?void 0:n.verified)||void 0===i?void 0:i.filter(Boolean))||[];return r.createElement(x,{className:e},r.createElement(l.C,null,r.createElement("div",{className:"inner"},r.createElement("a",{href:"/"},r.createElement("img",{loading:"lazy",className:"footer-logo",src:null===(h=null==t?void 0:t.general)||void 0===h?void 0:h.logo,alt:"Logo","data-is-sehat":"id-ID"===a})),r.createElement("div",{className:"columns"},r.createElement("div",{className:"newsletter"},r.createElement(c.T,{size:v?"s3":"s4",weight:"semiBold",color:"neutral.0"},null===(s=null==t?void 0:t.general)||void 0===s?void 0:s.content),r.createElement("div",{className:"social"},r.createElement(c.T,{size:"p4",color:"neutral.6"},null===(m=null==t?void 0:t.social)||void 0===m?void 0:m.title),r.createElement("div",{className:"icons"},null===(p=null===(d=null==t?void 0:t.social)||void 0===d?void 0:d.socials)||void 0===p?void 0:p.map((e,t)=>r.createElement("a",{key:t,"data-event-category":"Footer","data-event-action":`Follow us - ${e.name}`,"data-content-label":e.url,href:e.url},r.createElement("img",{loading:"lazy","data-event-category":"Footer","data-event-action":`Follow us - ${e.name}`,"data-content-label":e.url,src:e.icon,alt:"Logo Social",className:"social-icon",width:"24",height:"24"})))))),r.createElement("div",{className:"footer-menu"},E&&r.createElement(r.Fragment,null,null==E?void 0:E.map((e,t)=>r.createElement(FooterMenuColumn,{title:e.menu_title,items:e.items,locale:a,key:t,index:t}))))),r.createElement("div",{className:"otherSites"},r.createElement(c.T,{size:"p4",className:"linkTitle",color:"neutral.6",weight:"regular"},null===(g=null==t?void 0:t.branch)||void 0===g?void 0:g.title),r.createElement("div",{className:"flags"},null===(y=null===(b=null==t?void 0:t.branch)||void 0===b?void 0:b.branch)||void 0===y?void 0:y.map((e,t)=>r.createElement("a",{href:e.url,key:t,"data-event-category":"Footer","data-event-action":e.name,"data-event-label":e.url},r.createElement(Flag,{url:e.flag,dataEventCategory:"Footer",dataEventAction:e.name,dataEventLabel:e.url}))))),r.createElement("div",{className:"copyright"},r.createElement("div",{className:"copyright-image-wrapper"},w.length?w.map((e,t)=>r.createElement("a",{href:e.url,key:t,className:"copyright-image"},r.createElement("img",{loading:"lazy",src:e.image,alt:"DMCA Icon"}))):null),r.createElement(c.T,{size:"n1",className:"copyright-content",as:"div",color:"neutral.6",weight:"regular"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null===(f=null==t?void 0:t.general)||void 0===f?void 0:f.copyright.replace(/{currentYear}/gi,o()().get("year").toString())}}))))))},v=d.Z.footer` position: relative; overflow: hidden; .icons { margin-top: 12px; margin-bottom: 20px; > a:not(:last-child) { margin-right: 16px; } } a { text-decoration: none; } `,E=d.Z.div` position: relative; padding: 80px 0 40px; margin: auto 68px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid ${p.r.colors.neutral200}; ${m.M.tdDown} { margin: auto 16px; flex-wrap: wrap; row-gap: 32px; column-gap: 16px; } ${m.M.mbDown} { margin: auto 0; } `,w=d.Z.div` display: flex; justify-content: space-between; gap: 12px; flex-direction: column; ${m.M.mbDown} { flex: 1 1 160px; } .title { padding-bottom: 4px; } `,N=d.Z.div` display: flex; justify-content: space-between; gap: 12px; flex-direction: column; `,F=d.Z.div` background-color: #{map-get($mbColors, 'dark')}; padding: 16px 0; position: relative; img { width: 89px; height: 32px; } .content { display: flex; align-items: center; justify-content: space-between; gap: 174px; margin: auto 68px; ${m.M.tdDown} { margin: auto 16px; } ${m.M.mbDown} { flex-direction: column-reverse; gap: 16px; align-items: flex-start; margin: auto 0; } } .verify { display: flex; align-items: flex-start; gap: 8px; } `,B=d.Z.div` padding: 40px 0; ${m.M.mbUp} { margin: auto 68px; } `,I=d.Z.div` display: flex; gap: 16px; .social-logo { width: 28px; } `,MarryBabyFooter=({logoType:e="marryBaby",footerMenu:t,background:a})=>{var n;if(!t)return null;let{general:m,menu:u,socials:d}=t;return r.createElement(v,{style:{backgroundColor:a||"none"}},r.createElement(l.C,null,r.createElement(E,null,null==u?void 0:u.map(({menu_title:e,items:t},a)=>r.createElement(w,{key:`mbf${a}`},r.createElement(y.M,{className:"title",type:"subtitle-1",color:p.r.mbColors.pink},e),null==t?void 0:t.map(({title:e,url:t},a)=>r.createElement("a",{"data-event-category":"Footer","data-event-action":"Click","data-event-label":`${t}`,className:"link",href:t,key:`footer-links-${a}`},r.createElement(N,{key:`mbitem${a}`},r.createElement(y.M,{type:"bodytext-2",color:p.r.mbColors.gray},e)))))))),r.createElement(l.C,null,r.createElement(B,null,r.createElement(i.k,{gap:"24px",sx:e=>({[e.fn.largerThan("sm")]:{".info-item":{flexGrow:1,width:"50%"}},[e.fn.smallerThan("sm")]:{flexDirection:"column"}})},r.createElement(h.K,{spacing:"24px",className:"info-item"},r.createElement(b.L,{className:"logo",type:e}),r.createElement(c.T,{size:"p4",as:"div"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null==m?void 0:m.content}})),r.createElement(I,null,null==d?void 0:d.map(({icon:e,name:t,url:a},l)=>r.createElement("a",{key:`social${l}`,target:"_blank",rel:"noreferrer","data-event-category":"Footer","data-event-action":`Follow us - ${t}`,"data-content-label":t,href:a},r.createElement("img",{className:"social-logo",loading:"lazy",src:e,alt:t}))))),r.createElement(s.x,{className:"info-item",sx:{paddingTop:"7px"}},r.createElement(c.T,{size:"p4",as:"div"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null==m?void 0:m.information}})))))),r.createElement(F,null,r.createElement(l.C,null,r.createElement("div",{className:"content"},r.createElement(c.T,{size:"p5",color:"#fff",as:"div"},r.createElement("div",{dangerouslySetInnerHTML:{__html:null==m?void 0:m.copyright.replace(/{currentYear}/gi,o()().get("year").toString())}})),r.createElement("div",{className:"verify"},null===(n=null==m?void 0:m.verified)||void 0===n?void 0:n.map(({image:e,url:t},a)=>r.createElement("img",{loading:"lazy",key:`imgMbFt${a}`,src:e,alt:t})))))))},Footer=({locale:e,footerInfo:t,siteType:a,background:l})=>"helloSites"===a?r.createElement(DiscoverFooter,{locale:e,footerInfo:t||{}}):r.createElement(MarryBabyFooter,{footerMenu:t,background:l})},"5fd6":function(e,t,a){a.d(t,{B:function(){return BabyGrowthForm}});var r=a("T/vS"),l=a("q1tI"),n=a("/npG"),o=a("mYVa"),i=a("8vDj"),h=a("iuhU"),s=a("cChf"),c=a("ZFu2"),m=a("SMDy"),u=a("mrUg"),d=a("dDw1"),p=a("iBNF"),g=a("Z+18"),b=a("cHPQ"),y=a("Cafw"),x=a("w8P6"),f=a("pSDa"),v=a("375z"),E=a("fkrl");let w=(0,l.createContext)({}),DefaultForm=e=>{let{t,locale:a}=(0,g.u)(),{classes:r={}}=(0,l.useContext)(b.C),{form:n,currentUrl:o,submitProps:i}=(0,l.useContext)(w),h={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return l.createElement(x.H,Object.assign({formLayout:"default"},e),l.createElement(x.H.FormRow,null,l.createElement(x.H.Control,null,l.createElement(f.G,Object.assign({isBaby:!0,genderValue:{male:"boy",female:"girl"}},n.getInputProps("gender"),{error:null}))),n.errors.gender&&l.createElement(x.H.Error,null,n.errors.gender)),l.createElement(x.H.FormRow,null,l.createElement(m.I.Wrapper,{label:l.createElement(d.T,{size:"p2",weight:"semiBold"},t("babyGrowth.input.birthday"))},l.createElement(u.D,Object.assign({},h,{maxDate:new Date},n.getInputProps("birthday"),{error:null,onChange:e=>{e&&n.validateField("measurementDate"),n.getInputProps("birthday").onChange(e)}}))),n.errors.birthday&&l.createElement(x.H.Error,null,n.errors.birthday)),l.createElement(x.H.FormRow,null,l.createElement(m.I.Number,Object.assign({label:l.createElement(d.T,{size:"p2",weight:"semiBold"},t("babyGrowth.height"),l.createElement(d.T,{size:"p2",weight:"semiBold",color:p.r.colors.gray300,as:"span"},` (${t("babyGrowth.cm")})`))},n.getInputProps("height"),{placeholder:t("babyGrowth.height"),min:y.I.height.min,max:y.I.height.max,onChange:e=>{n.setFieldValue("height",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),l.createElement(x.H.FormRow,null,l.createElement(m.I.Number,Object.assign({label:l.createElement(d.T,{size:"p2",weight:"semiBold"},t("babyGrowth.weight"),l.createElement(d.T,{size:"p2",weight:"semiBold",color:p.r.colors.gray300,as:"span"},` (${t("babyGrowth.kg")})`))},n.getInputProps("weight"),{placeholder:t("babyGrowth.weight"),min:y.I.weight.min,max:y.I.weight.max,onChange:e=>{n.setFieldValue("weight",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),a!==v.L.Vietnam&&l.createElement(x.H.FormRow,null,l.createElement(m.I.Number,Object.assign({label:l.createElement(d.T,{size:"p2",weight:"semiBold"},t("babyGrowth.head"),l.createElement(d.T,{size:"p2",weight:"semiBold",color:p.r.colors.gray300,as:"span"},` (${t("babyGrowth.cm")})`))},n.getInputProps("head"),{placeholder:t("babyGrowth.head"),onChange:e=>{n.setFieldValue("head",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.checkMesureVal&&l.createElement(x.H.Error,null,n.errors.checkMesureVal),l.createElement(x.H.FormRow,null,l.createElement(m.I.Wrapper,{label:l.createElement(d.T,{size:"p2",weight:"semiBold"},t("babyGrowth.input.measurementDate"))},l.createElement(u.D,Object.assign({},h,{defaultValue:new Date},n.getInputProps("measurementDate"),{maxDate:new Date,error:null}))),n.errors.measurementDate&&l.createElement(x.H.Error,null,n.errors.measurementDate)),l.createElement(x.H.FormRow,{className:r.submitWrapper},l.createElement(x.H.Submit,Object.assign({className:r.submitBtn,type:"submit","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":o},i),t("babyGrowth.input.submit"))))};var N=(0,n.k)(e=>({root:{display:"flex",flexDirection:"column",gap:(0,o.h)(8)},bmiVal:{display:"inline-block"},unitText:{color:e.colors.gray[6]},submitBtn:{}}));let localizeNumberFormat=(e,t=2)=>Intl.NumberFormat(void 0,{maximumFractionDigits:t}).format(e),bmiCalculate=(e=0,t=0)=>{try{if(e&&t){let a=Number(t)/Math.pow(Number(e)/100,2);if(isNaN(a))return 0;return Number(localizeNumberFormat(a))}}catch(e){}return 0},InlineForm=e=>{var{styles:t,classNames:a}=e,n=(0,r.a)(e,["styles","classNames"]);let{t:o,locale:s}=(0,g.u)(),{form:c,currentUrl:p,submitProps:E}=(0,l.useContext)(w),{classes:F={}}=(0,l.useContext)(b.C),B=(0,i.rZ)(),{classes:I}=N(void 0,{name:"BabyGrowthForm__InlineForm",styles:t,classNames:a}),k={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return l.createElement(x.H,Object.assign({formLayout:"inline"},n),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:o("tools.selectBabyGender")},l.createElement(f.G,Object.assign({type:"radio",hideLabel:!0,isBaby:!0,genderValue:{male:"boy",female:"girl"}},c.getInputProps("gender")))),c.errors.gender&&l.createElement(x.H.Error,null,c.errors.gender)),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:o("babyGrowth.input.birthday")},l.createElement(u.D,Object.assign({},k,{maxDate:new Date},c.getInputProps("birthday"),{error:null,onChange:e=>{e&&c.validateField("measurementDate"),c.getInputProps("birthday").onChange(e)}}))),c.errors.birthday&&l.createElement(x.H.Error,null,c.errors.birthday)),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:"BMI",styles:{control:{"&:first-child":{width:"auto"}}}},l.createElement(d.T,{size:"p3"},l.createElement("span",{className:I.bmiVal},c.getInputProps("height").value&&c.getInputProps("weight").value&&bmiCalculate(Number(c.getInputProps("height").value),Number(c.getInputProps("weight").value))),"(",o("babyGrowth.kg.m2"),")"),l.createElement(m.I.Number,Object.assign({},c.getInputProps("height"),{placeholder:o("babyGrowth.height"),min:y.I.height.min,max:y.I.height.max,onChange:e=>{c.setFieldValue("height",e),c.setFieldValue("checkMesureVal",!c.values.checkMesureVal)},rightSection:l.createElement(x.H.Unit,null,o("babyGrowth.cm"))})),l.createElement(m.I.Number,Object.assign({},c.getInputProps("weight"),{placeholder:o("babyGrowth.weight"),min:y.I.weight.min,max:y.I.weight.max,onChange:e=>{c.setFieldValue("weight",e),c.setFieldValue("checkMesureVal",!c.values.checkMesureVal)},rightSection:l.createElement(x.H.Unit,null,o("babyGrowth.kg"))}))),("mb"===B.other.template||s!==v.L.Vietnam)&&l.createElement(x.H.BorderInlineControl,{label:o("babyGrowth.head")},l.createElement(m.I.Number,Object.assign({},c.getInputProps("head"),{placeholder:o("babyGrowth.head"),onChange:e=>{c.setFieldValue("head",e),c.setFieldValue("checkMesureVal",!c.values.checkMesureVal)},rightSection:l.createElement(x.H.Unit,null,o("babyGrowth.cm"))}))),c.errors.checkMesureVal&&l.createElement(x.H.Error,null,c.errors.checkMesureVal)),l.createElement(x.H.FormRow,null,l.createElement(x.H.BorderInlineControl,{label:o("babyGrowth.input.measurementDate")},l.createElement(u.D,Object.assign({},k,{maxDate:new Date},c.getInputProps("measurementDate"),{error:null}))),c.errors.measurementDate&&l.createElement(x.H.Error,null,c.errors.measurementDate)),l.createElement(x.H.FormRow,{className:F.submitWrapper},l.createElement(x.H.Submit,Object.assign({type:"submit","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":p,className:(0,h.default)(I.submitBtn,F.submitBtn)},E),o("babyGrowth.input.submit"))))},MbLayout=e=>{var t=(0,r.a)(e,[]);let{t:a}=(0,g.u)(),{form:n,currentUrl:o,submitProps:i}=(0,l.useContext)(w),h={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return l.createElement(x.H,Object.assign({formLayout:"default"},t),l.createElement(x.H.FormRow,null,l.createElement(x.H.Control,null,l.createElement(f.G,Object.assign({isBaby:!0,genderValue:{male:"boy",female:"girl"}},n.getInputProps("gender"),{error:null}))),n.errors.gender&&l.createElement(x.H.Error,null,n.errors.gender)),l.createElement(x.H.BorderBoxControl,{label:a("babyGrowth.input.birthday"),rightSection:l.createElement(E.Z,null)},l.createElement(u.D,Object.assign({},h,{maxDate:new Date},n.getInputProps("birthday"),{error:null,rightSection:null,onChange:e=>{e&&n.validateField("measurementDate"),n.getInputProps("birthday").onChange(e)}}))),n.errors.birthday&&l.createElement(x.H.Error,null,n.errors.birthday),l.createElement(x.H.BorderBoxControl,{label:a("babyGrowth.height"),rightSection:a("babyGrowth.cm")},l.createElement(m.I.Number,Object.assign({},n.getInputProps("height"),{placeholder:a("tools.inputPlaceholder",{content:"160"}),min:y.I.height.min,max:y.I.height.max,onChange:e=>{n.setFieldValue("height",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.height&&l.createElement(x.H.Error,null,n.errors.height),l.createElement(x.H.BorderBoxControl,{label:a("babyGrowth.weight"),rightSection:a("babyGrowth.kg")},l.createElement(m.I.Number,Object.assign({},n.getInputProps("weight"),{placeholder:a("tools.inputPlaceholder",{content:"50"}),min:y.I.weight.min,max:y.I.weight.max,onChange:e=>{n.setFieldValue("weight",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.weight&&l.createElement(x.H.Error,null,n.errors.weight),l.createElement(x.H.BorderBoxControl,{label:a("babyGrowth.head"),rightSection:a("babyGrowth.cm")},l.createElement(m.I.Number,Object.assign({},n.getInputProps("head"),{placeholder:a("tools.inputPlaceholder",{content:"50"}),onChange:e=>{n.setFieldValue("head",e),n.setFieldValue("checkMesureVal",!n.values.checkMesureVal)}}))),n.errors.checkMesureVal&&l.createElement(x.H.Error,null,n.errors.checkMesureVal),l.createElement(x.H.BorderBoxControl,{label:a("babyGrowth.input.measurementDate"),rightSection:l.createElement(E.Z,null)},l.createElement(m.I.Wrapper,null,l.createElement(u.D,Object.assign({},h,{defaultValue:new Date},n.getInputProps("measurementDate"),{maxDate:new Date,rightSection:null,error:null})))),n.errors.measurementDate&&l.createElement(x.H.Error,null,n.errors.measurementDate),l.createElement(x.H.Submit,Object.assign({type:"submit","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":o},i),a("babyGrowth.input.submit")))},BabyGrowthForm=e=>{var{onSubmit:t,formLayout:a="default",submitProps:n,currentUrl:o}=e,h=(0,r.a)(e,["onSubmit","formLayout","submitProps","currentUrl"]);let{t:m}=(0,g.u)(),u=(0,i.rZ)(),d=(0,s.c)({initialValues:{measurementDate:new Date},validate:{gender:(0,c.U)(m("validation.error.requiredField")),birthday:(0,c.U)(m("validation.error.requiredField")),measurementDate:(e,t)=>t.birthday?t.birthday instanceof Date&&e instanceof Date&&t.birthday.getTime()<=e.getTime()?null:m("babyGrowth.error.measurementDateLowerThanBirthday",{name:""}):null,checkMesureVal:(e,t)=>void 0===t.head&&void 0===t.height&&void 0===t.weight||t.head||t.height||t.weight?null:m("babyGrowth.error.atLeastOneOf")},validateInputOnChange:["checkMesureVal"]}),p=Object.assign({onSubmit:d.onSubmit(e=>null==t?void 0:t(Object.assign(Object.assign({},e),{bmi:bmiCalculate(Number(d.getInputProps("height").value),Number(d.getInputProps("weight").value)).toString()})))},h);return l.createElement(w.Provider,{value:{submitProps:n,currentUrl:o,form:d}},"default"===a?"mb"===u.other.template?l.createElement(MbLayout,Object.assign({formLayout:a},p)):l.createElement(DefaultForm,Object.assign({},p)):l.createElement(InlineForm,Object.assign({},p)))}}}]);