"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4447],{l6P8:function(e,t,a){a.d(t,{C:function(){return Close},D:function(){return DrawerComponent},u:function(){return useDrawerDrag}});var n=a("q1tI"),l=a("Kz+G"),r=a("iuhU"),o=a("rSBk"),i=a("rBCA"),s=a("+7X0");let Close=e=>n.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},e),n.createElement("path",{d:"M3.99403 3.32695C3.86141 3.32698 3.73181 3.36657 3.62181 3.44065C3.5118 3.51472 3.42638 3.61992 3.37648 3.7428C3.32658 3.86567 3.31445 4.00064 3.34165 4.13044C3.36885 4.26024 3.43415 4.37898 3.52919 4.47148L7.05784 8.00013L3.52919 11.5288C3.46521 11.5902 3.41413 11.6638 3.37894 11.7452C3.34375 11.8266 3.32516 11.9142 3.32425 12.0029C3.32335 12.0916 3.34015 12.1796 3.37368 12.2617C3.40721 12.3438 3.45678 12.4185 3.5195 12.4812C3.58222 12.5439 3.65682 12.5935 3.73894 12.627C3.82106 12.6605 3.90904 12.6773 3.99774 12.6764C4.08643 12.6755 4.17405 12.6569 4.25547 12.6217C4.33689 12.5865 4.41047 12.5355 4.4719 12.4715L8.00054 8.94283L11.5292 12.4715C11.5906 12.5355 11.6642 12.5865 11.7456 12.6217C11.827 12.6569 11.9147 12.6755 12.0034 12.6764C12.092 12.6773 12.18 12.6605 12.2621 12.627C12.3443 12.5935 12.4189 12.5439 12.4816 12.4812C12.5443 12.4185 12.5939 12.3439 12.6274 12.2617C12.6609 12.1796 12.6777 12.0916 12.6768 12.0029C12.6759 11.9142 12.6573 11.8266 12.6222 11.7452C12.587 11.6638 12.5359 11.5902 12.4719 11.5288L8.94325 8.00013L12.4719 4.47148C12.5682 4.37784 12.634 4.25728 12.6607 4.1256C12.6873 3.99392 12.6735 3.85726 12.6212 3.73354C12.5688 3.60982 12.4803 3.5048 12.3672 3.43224C12.2542 3.35969 12.1218 3.32299 11.9875 3.32695C11.8143 3.33211 11.6499 3.4045 11.5292 3.52877L8.00054 7.05742L4.4719 3.52877C4.40977 3.46491 4.33548 3.41415 4.2534 3.37948C4.17132 3.34482 4.08313 3.32696 3.99403 3.32695Z"})),c=300,useDrawerDrag=(e=c)=>{let[t,a]=(0,n.useState)(!1),l=(0,n.useCallback)(()=>{a(!0)},[]),r=(0,n.useCallback)(()=>{setTimeout(()=>{a(!1)},e)},[e]);return{isDragging:t,handleDragStart:l,handleDragEnd:r}},d=(0,i.Z)(o.dy.Content)` position: fixed; z-index: ${s.Z-9e6+1}; inset: 0; background-color: #fff; outline: none !important; &::-webkit-scrollbar { width: 6px; height: 6px; } &::-webkit-scrollbar-track { background-color: transparent; } &::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.4); border-radius: 6px; } &[data-vaul-drawer-direction='bottom'] { border-top-left-radius: 8px; border-top-right-radius: 8px; } &[data-vaul-drawer-direction='top'] { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; } &[data-vaul-drawer-direction='left'] { border-top-right-radius: 8px; border-bottom-right-radius: 8px; } &[data-vaul-drawer-direction='right'] { border-top-left-radius: 8px; border-bottom-left-radius: 8px; } ${e=>e.isDragging&&` input { caret-color: transparent; } `} `,m=(0,i.Z)(o.dy.Overlay)` position: fixed; inset: 0; z-index: ${s.Z-9e6}; width: 100%; max-height: 100%; &[data-state='open'] { opacity: 0.6 !important; } `,DrawerComponent=e=>{let{open:t,onOpenChange:a,snapPoints:i,activeSnapPoint:c,setActiveSnapPoint:u,children:g,overlayClassName:p,className:h,fadeFromIndex:b=s.Z-9e6,onClose:v}=e,E=(0,l._)(e,["open","onOpenChange","snapPoints","activeSnapPoint","setActiveSnapPoint","children","overlayClassName","className","fadeFromIndex","onClose"]),[f,y]=(0,n.useState)(t),[C,x]=(0,n.useState)(i?null==i?void 0:i[0]:null),{isDragging:w,handleDragStart:S,handleDragEnd:k}=useDrawerDrag(),I=(0,n.useCallback)(e=>{y(e),null==a||a(e)},[a]),N=(0,n.useMemo)(()=>i&&i.length?C===i[i.length-1]:f,[C,i]),P=(0,n.useMemo)(()=>{let e={open:f,onOpenChange:I,fadeFromIndex:b};return i&&(null==i?void 0:i.length)&&(e.snapPoints=i,e.activeSnapPoint=C,e.setActiveSnapPoint=e=>{x(e),null==u||u(e)}),e},[f,I,C,x,u,i,b]);return(0,n.useEffect)(()=>{y(t)},[t]),(0,n.useEffect)(()=>{x(c)},[c]),n.createElement(o.dy.Root,Object.assign({onDrag:S,onRelease:k,onClose:v},E,P),n.createElement(o.dy.Portal,null,n.createElement(m,{className:(0,r.default)(p,"drawer__overlay",{drawer__overlay_full:N})}),n.createElement(d,{isDragging:w,className:(0,r.default)(h,"drawer__content",{drawer__content_full:N})},n.createElement(o.dy.Handle,{className:"drawer__handle"}),n.createElement(o.dy.Title,{style:{display:"none"}}),g)))}},HzgG:function(e,t,a){a.d(t,{C:function(){return Container}});var n=a("q1tI");let Container=({children:e,className:t,style:a,type:l})=>n.createElement("div",{className:`d76E4SH ${t||""}`,style:a,"data-type":l},e)},"mD/4":function(e,t,a){a.d(t,{M:function(){return v},N:function(){return NotificationsHandler},a:function(){return getHeadingStyles},g:function(){return getMantineThemeOverride},s:function(){return showNotification},t:function(){return k},u:function(){return useMantineLocale}});var n=a("Kz+G"),l=a("q1tI"),r=a("Wgwc"),o=a.n(r),i=a("NbaP"),s=a("INKa"),c=a("0Woy"),d=a("+7X0"),m=a("mYVa"),u=a("kSP5"),g=a("iBNF"),p=a("JIuZ"),h=a("YXre"),b=a("DGoB");let v={[i.L.Vietnam]:"vi",[i.L.Cambodia]:"km",[i.L.India]:"hi",[i.L.Indonesia]:"id",[i.L.Malaysia]:"ms",[i.L.Thailand]:"th",[i.L.Taiwan]:"zh-tw",[i.L.PhilippinesTagalog]:"tl-ph",[i.L.PhilippinesEnglish]:"en",[i.L.Myanmar]:"my",[i.L.Singapore]:"zh-cn"},E={[i.L.Vietnam]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"EdQk",23)),[i.L.Cambodia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"9mFM",23)),[i.L.India]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"sjup",23)),[i.L.Indonesia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"gydT",23)),[i.L.Malaysia]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"KjFU",23)),[i.L.Thailand]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"axPs",23)),[i.L.Taiwan]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"UIeI",23)),[i.L.Singapore]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"pHGr",23)),[i.L.PhilippinesTagalog]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"BmsB",23)),[i.L.PhilippinesEnglish]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"njAx",23)),[i.L.Myanmar]:()=>Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(9862),a.e(3800),a.e(8132),a.e(1375),a.e(4561),a.e(1193),a.e(2094),a.e(1797),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(1152),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(8639),a.e(7082),a.e(553),a.e(9309),a.e(7221),a.e(2853),a.e(8232),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341),a.e(3566)]).then(a.t.bind(a,"5EMu",23))},useMantineLocale=e=>{let[t,a]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(0,n.a)(void 0,void 0,void 0,function*(){var t;a(!1),yield null===(t=E[e])||void 0===t?void 0:t.call(E),o().locale(v[e]),a(!0)})},[e]),{isLoaded:t}},GlobalButtonStyle=()=>({Button:{defaultProps:{variant:"primary",size:"md"}}}),f={[h.C.NONE]:{hb:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],mb:["#FFE9F1","#F8CCDC","#F5B4CB","#F29CBA","#EE84AA","#EB6B99","#E85388","#D34C7C","#BE446F","#A93D63"],blue:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],gray:["#fafafa","#f2f2f2","#d9d9d9","#bfbfbf","#8c8c8c","#737373","#595959","#404040","#262626","#1a1a1a"],delftGray:["#F3F3F3","#EAEAEC","#D9DAE2","#B9BAC8","#9898A9","#7C7C8F","#5A5A72","#3E3F58","#202135","#0C0C12"],neutral:["#f7f9fc","#e4e8ec","#d2d6dc","#bfc5cc","#adb3bc","#9aa2ac","#87909c","#757f8c","#626d7c","#545E6C"],green:["#e0f8ee","#b3eed5","#7ce2b9","#2ed69e","#00CB8A","#00C076","#00B16A","#009E5C","#008C50","#006C39"],pink:["#fff1f6","#ffdce9","#fec7dc","#feb2cf","#fe9dc2","#fd87b4","#fd72a7","#fc5d9a","#fc488d","#e92d74"],violet:["#F5EDFF","#E7D2F7","#D8B7F0","#CA9CE8","#BB82E1","#AD67D9","#9E4CD1","#9031CA","#8116C2","#63059D"],yellow:["#fff8e2","#ffecb6","#ffe187","#ffd658","#ffcb37","#ffc326","#ffb521","#fea21e","#fe921d","#fc7419"],teal:["#e0f7fc","#b1ebf8","#7ddff3","#44d1ec","#00c7e6","#00bee0","#00aecd","#0099b2","#008599","#00626c"],indigol:["#CEDDF0","#ACC5E6","#95B3DA","#85A6CF","#6D91BE","#5F85B5","#4C77AC","#35639C","#284A75","#1B3250"],red:["#fae9e8","#feccbf","#FEAA96","#f44d2c","#ff6f4d","#ff5331","#f44d2c","#e64728","#d84023","#bf331b"],redViolet:["#F3EAEB","#E8D5D7","#DDC1C4","#D1ACB0","#C5979C","#BA8288","#AF6D74","#A35961","#97444D","#8C2F39"]},[h.C.LEADGEN]:{hb:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],mb:["#FFE9F1","#F8CCDC","#F5B4CB","#F29CBA","#EE84AA","#EB6B99","#E85388","#D34C7C","#BE446F","#A93D63"],blue:["#e3f2ff","#bcdeff","#91caff","#65b5ff","#45a4ff","#2b94ff","#2d87f3","#2c74df","#2b62cd","#2743ad"],gray:["#fafafa","#f2f2f2","#d9d9d9","#bfbfbf","#8c8c8c","#737373","#595959","#404040","#262626","#111111"],delftGray:["#F3F3F3","#EAEAEC","#D9DAE2","#B9BAC8","#9898A9","#7C7C8F","#5A5A72","#3E3F58","#202135","#0C0C12"],neutral:["#f7f9fc","#e4e8ec","#d2d6dc","#bfc5cc","#adb3bc","#9aa2ac","#87909c","#757f8c","#626d7c","#545E6C"],green:["#e0f8ee","#b3eed5","#7ce2b9","#2ed69e","#00CB8A","#00C076","#00B16A","#009E5C","#008C50","#006C39"],pink:["#fff1f6","#ffdce9","#fec7dc","#feb2cf","#fe9dc2","#fd87b4","#fd72a7","#fc5d9a","#fc488d","#e92d74"],violet:["#F5EDFF","#E7D2F7","#D8B7F0","#CA9CE8","#BB82E1","#AD67D9","#9E4CD1","#9031CA","#8116C2","#63059D"],yellow:["#fff8e2","#ffecb6","#ffe187","#ffd658","#ffcb37","#ffc326","#ffb521","#fea21e","#fe921d","#fc7419"],teal:["#e0f7fc","#b1ebf8","#7ddff3","#44d1ec","#00c7e6","#00bee0","#00aecd","#0099b2","#008599","#00626c"],indigol:["#CEDDF0","#ACC5E6","#95B3DA","#85A6CF","#6D91BE","#5F85B5","#4C77AC","#35639C","#284A75","#1B3250"],red:["#fae9e8","#feccbf","#FEAA96","#f44d2c","#ff6f4d","#ff5331","#f44d2c","#e64728","#d84023","#bf331b"],redViolet:["#F3EAEB","#E8D5D7","#DDC1C4","#D1ACB0","#C5979C","#BA8288","#AF6D74","#A35961","#97444D","#8C2F39"]}};function NotificationsHandler(){return l.createElement(s.T,{position:"top-right",zIndex:d.Z+5,autoClose:5e3})}let y={success:"green",danger:"red",warning:"yellow",info:"blue",firebase:"gray"},C={success:l.createElement(()=>l.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M10 18.333a8.333 8.333 0 1 0 0-16.666 8.333 8.333 0 0 0 0 16.666",fill:"#00B16A"}),l.createElement("path",{d:"m13.833 7.5-5.5 5-2.5-2.273",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),danger:l.createElement(()=>l.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10",fill:"#262626"}),l.createElement("path",{d:"m14.829 9.172-5.657 5.656m-.001-5.656 5.657 5.656",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),warning:l.createElement(()=>l.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1.66666C5.4 1.66666 1.66667 5.39999 1.66667 9.99999C1.66667 14.6 5.4 18.3333 10 18.3333C14.6 18.3333 18.3333 14.6 18.3333 9.99999C18.3333 5.39999 14.6 1.66666 10 1.66666ZM10 10.8333C9.54167 10.8333 9.16667 10.4583 9.16667 9.99999V6.66666C9.16667 6.20832 9.54167 5.83332 10 5.83332C10.4583 5.83332 10.8333 6.20832 10.8333 6.66666V9.99999C10.8333 10.4583 10.4583 10.8333 10 10.8333ZM9.16667 12.5V14.1667H10.8333V12.5H9.16667Z",fill:"#FE921D"})),null),info:l.createElement(()=>l.createElement("svg",{width:"20",height:"20",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.createElement("path",{d:"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12",fill:"#2D87F3"}),l.createElement("path",{d:"M8 11V8m0-3h.01",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),null),firebase:""},showNotification=e=>{var{type:t,title:a}=e,r=(0,n._)(e,["type","title"]);let o=C[t];c.N9.show(Object.assign(Object.assign({title:l.createElement("b",null,a),icon:o,withCloseButton:!0,closeButtonProps:{label:"Close alert"}},r),{styles:e=>{let a=y[t]||"blue";return{root:{backgroundColor:e.colors[a][0],borderColor:e.colors[a][0],"&::before":{backgroundColor:e.white}},title:{color:e.colors[a][8]},description:{color:e.black},closeButton:{color:e.black,"&:hover":{backgroundColor:e.colors[a][0]}},icon:{backgroundColor:"transparent",padding:0}}}}))},x={Container:{defaultProps:{sizes:{lg:(0,m.em)(p.S.LG)}}}},w={none:{default:[{size:"40px",lineHeight:"52px",letterSpacing:"-1.2px"},{size:"32px",lineHeight:"42px",letterSpacing:"-1px"},{size:"26px",lineHeight:"36px",letterSpacing:"-0.8px"},{size:"22px",lineHeight:"32px",letterSpacing:"-0.6px"},{size:"18px",lineHeight:"28px",letterSpacing:"-0.2px"},{size:"16px",lineHeight:"24px",letterSpacing:0}],mbDown:[{size:"26px",lineHeight:"34px",letterSpacing:"-0.9px"},{size:"24px",lineHeight:"32px",letterSpacing:"-0.8px"},{size:"20px",lineHeight:"26px",letterSpacing:"-0.7px"},{size:"18px",lineHeight:"26px",letterSpacing:"-0.6px"},{size:"16px",lineHeight:"24px",letterSpacing:"-0.2px"},{size:"14px",lineHeight:"22px",letterSpacing:"-0.2px"}]},leadgen:{default:[{size:"40px",lineHeight:"48px",letterSpacing:"-1.2px"},{size:"32px",lineHeight:"40px",letterSpacing:"-1px"},{size:"26px",lineHeight:"32px",letterSpacing:"-0.6px"},{size:"20px",lineHeight:"28px",letterSpacing:"-0.4px"},{size:"17px",lineHeight:"24px",letterSpacing:"-0.4px"},{size:"15px",lineHeight:"24px",letterSpacing:"-0.3px"}],mbDown:[{size:"26px",lineHeight:"34px",letterSpacing:"-0.9px"},{size:"24px",lineHeight:"32px",letterSpacing:"-0.8px"},{size:"20px",lineHeight:"26px",letterSpacing:"-0.7px"},{size:"18px",lineHeight:"26px",letterSpacing:"-0.6px"},{size:"16px",lineHeight:"24px",letterSpacing:"-0.2px"},{size:"14px",lineHeight:"22px",letterSpacing:"-0.2px"}]}},getHeadingStyles=e=>{let{version:t=h.C.NONE,mbDown:a}=e||{},n=w[t]||{};return Object.fromEntries((n[a?"mbDown":"default"]||[]).map((e,t)=>[`h${t+1}`,{fontSize:e.size,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing}]))},GlobalHeadingStyle=(e=h.C.NONE)=>({Title:{styles:{root:Object.assign(Object.assign({fontWeight:h.F.bold},getHeadingStyles({version:e})),{[`&${p.M.mbDown}`]:Object.assign({},getHeadingStyles({version:e,mbDown:!0}))})}}}),GlobalInputStyle=e=>{var t;return{InputWrapper:{styles:{label:{display:"inline-flex",gap:4,marginBottom:"0.25rem",fontWeight:600,fontSize:(0,m.h)(14),lineHeight:"22px",color:g.r.colors.gray600},description:{fontWeight:400,fontSize:"12px",lineHeight:"18px",color:g.r.colors.gray600,marginBottom:"0.25rem"},error:{marginTop:"0.25rem"}}},NumberInput:{defaultProps:{decimalSeparator:null===(t=d.I[e])||void 0===t?void 0:t.separator}},Input:{styles:(e,t,{size:a})=>({input:{border:`1px solid ${g.r.colors.gray200}`,transition:`all ${b.A} ease-in-out`,"&:not(.mantine-Textarea-input)":Object.assign({},(()=>{switch(a){case"lg":return{height:48,minHeight:"unset",fontSize:16,lineHeight:"24px"};case"md":return{height:40,minHeight:"unset",fontSize:(0,m.h)(14),lineHeight:"22px"};case"sm":return{height:32,minHeight:"unset",fontSize:(0,m.h)(14),lineHeight:"22px"}}})()),"&:hover":{border:`1px solid ${e.primaryColor}`},"&:focus":{boxShadow:`0px 0px 0px 2px ${e.colors[e.primaryColor][2]}`}},'&[data-invalid="true"]':{border:`1px solid ${g.r.colors.red600}`,color:"#000"}})}}},S={Radio:{defaultProps:{size:"sm",color:"blue.6"},styles:{radio:{backgroundColor:"transparent","&:checked":{backgroundColor:"transparent"}}}}},k=f[h.C.NONE],getMantineThemeOverride=(e,t="hb",a)=>{var n;return{defaultRadius:"hb"===t?8:16,cursorType:"pointer",colors:Object.assign(Object.assign(Object.assign({},null!==(n=f[a])&&void 0!==n?n:f[h.C.NONE]),g.r.colors),{toneYellow:"#fff9eb",toneGreen:"#f2fcf7",toneBlue:"#e0e9fb",tonePink:"#ffeaf1"}),primaryColor:t,primaryShade:6,fontFamily:(e===i.L.Cambodia?"Battambang":e===i.L.Thailand?"Noto Sans Thai":"Inter")+", -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif",breakpoints:{xs:(0,m.em)(p.B.BREAK_POINT_SMALL_MOBILE),sm:(0,m.em)(p.B.BREAK_POINT_MOBILE),md:(0,m.em)(p.B.BREAK_POINT_TABLET),lg:(0,m.em)(p.B.BREAK_POINT_PC),xl:(0,m.em)(p.B.BREAK_POINT_LGPC)},components:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},GlobalInputStyle(e)),S),GlobalButtonStyle()),GlobalHeadingStyle(a)),x),other:{template:t,customStyleType:a,defaultImage:u.C.getAssetPath("mb"===t?"default-image-mb.jpg":"default-image.jpg")}}}},bZ6y:function(e,t,a){a.d(t,{L:function(){return Logo}});var n=a("q1tI"),l=a("NbaP"),r=a("kSP5"),o=a("rBCA"),i=a("JIuZ"),s=a("pGve"),c=a("kuQP");let d=o.Z.div` position: relative; display: inline-flex; align-items: center; z-index: 0; .main-logo-icon { object-fit: contain; } &[data-logo-is-light] { > svg path { fill: #fff; } img { filter: brightness(0) invert(1); } } &[data-has-badge] { @supports (display: flex) and (gap: 1em) { gap: 0.5rem; } @supports not ((display: flex) and (gap: 1em)) { > img { margin-left: 0.25rem; } } } .common-logo-seasonal-left, .common-logo-seasonal-right { z-index: -1; max-width: unset; max-height: unset; pointer-events: none; } .common-logo-seasonal-left { position: absolute; top: 50%; left: 0; transform: translateY(-50%); pointer-events: none; } .common-logo-seasonal-right { position: absolute; top: 50%; right: 0; transform: translateY(-50%); } &[data-seasonal='christmas'] { padding-left: 37px; padding-right: 22px; .common-logo-seasonal-left { width: 125px; height: 56px; } .common-logo-seasonal-right { width: 23px; height: 17px; } ${i.M.mbDown} { padding-left: 30px; padding-right: 16px; .common-logo-seasonal-left { // width: 125px; height: 46px; } .common-logo-seasonal-right { // width: 23px; height: 12px; } } } &[data-seasonal='new-year'] { padding-right: 85px; .common-logo-seasonal-left { top: 35%; width: 100px; height: 56px; } .common-logo-seasonal-right { width: 85px; height: 54px; } ${i.M.mbDown} { padding-right: 0; .common-logo-seasonal-right { display: none; } } } &[data-seasonal='lunar-new-year'] { padding-left: 30px; padding-right: 35px; .common-logo-seasonal-left { width: 33px; height: 41px; } .common-logo-seasonal-right { width: 37px; height: 54px; } } &[data-seasonal='ramadan'] { &[data-type='hellosehat'] { padding-right: 35px; .common-logo-seasonal-left { width: 165px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 33px; height: unset; } } &[data-type='hellodoktor'] { padding-right: 66px; .common-logo-seasonal-left { width: 133px; height: unset; left: 6px; } .common-logo-seasonal-right { width: 63px; height: unset; } } } &[data-seasonal='hung-king'] { &[data-type='hellobacsi'] { .common-logo-seasonal-left { width: 134px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left { width: 145px; height: unset; left: 50%; top: 50%; transform: translate(-50%, -50%); } } } &[data-seasonal='vn-independent-day'] { &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { width: unset; height: 56px; left: 65%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.desktop-only { left: 50%; z-index: 1; } } &[data-type='hellobacsi'], &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { width: unset; height: 56px; left: 60%; top: 50%; transform: translate(-50%, -50%); } } &[data-type='marryBaby'] { .common-logo-seasonal-left.mobile-only { left: 40%; z-index: 1; } } } .desktop-only { ${i.M.mbDown} { display: none; } } .mobile-only { ${i.M.mbUp} { display: none; } } `,m=o.Z.img` height: 16px; width: unset; margin-bottom: 4px; margin-left: -3px; `,isChristmas=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=16&&t<=25},u={2023:[22,0],2024:[10,1],2025:[29,0],2026:[17,1],2027:[6,1],2028:[26,0],2029:[13,1],2030:[3,1],2031:[23,0],2032:[11,1],2033:[31,0],2034:[19,1],2035:[8,1],2036:[28,0],2037:[15,1],2038:[4,1],2039:[24,0],2040:[12,1]},g=[l.L.Vietnam,l.L.Taiwan,l.L.Indonesia,l.L.Malaysia],isLunarNewYear=e=>{let t=e.getFullYear(),a=u[t];if(!a)return!1;let n=new Date(t,a[1],a[0]),l=new Date(n);l.setDate(n.getDate()-7);let r=new Date(n);return r.setDate(n.getDate()+5),l<=e&&e<=r},isNewYear=e=>{let t=e.getDate(),a=e.getMonth();return 11===a&&t>=26||0===a&&t<=15},p=[{year:2024,start:[10,2],end:[8,3]},{year:2025,start:[1,2],end:[30,2]},{year:2026,start:[18,1],end:[19,2]},{year:2027,start:[8,1],end:[9,2]},{year:2028,start:[28,0],end:[26,1]},{year:2029,start:[16,0],end:[14,1]},{year:2030,start:[6,0],end:[4,1]},{year:2030,start:[26,11],end:[24,0,2031]},{year:2031,start:[15,11],end:[13,0,2032]},{year:2032,start:[4,11],end:[2,0,2033]}],isRamadan=e=>{let t=e.getFullYear(),a=p.filter(e=>e.year===t);return!!a.length&&a.some(a=>{let n=a.start[2]||t,l=new Date(n,a.start[1],a.start[0]),r=new Date(n,a.end[1],a.end[0]);return l<=e&&e<=r})},h={2024:[18,3],2025:[7,3],2026:[26,3],2027:[16,3],2028:[4,3],2029:[23,3],2030:[12,3],2031:[1,3],2032:[19,3],2033:[9,3],2034:[28,3],2035:[17,3]},isVNHungKing=e=>{let t=e.getFullYear(),a=h[t];if(!a)return!1;let n=new Date(t,a[1],a[0]),l=new Date(n);l.setDate(n.getDate()-1);let r=new Date(n);return r.setDate(n.getDate()+1),l<=e&&e<=r},isVN3004=e=>{let t=e.getFullYear(),a=new Date(t,3,30),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+2),n<=e&&e<=l},isLabourDay=e=>{let t=e.getFullYear(),a=new Date(t,4,1),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+1),n<=e&&e<=l},isVNIndependentDay=e=>{let t=e.getFullYear(),a=new Date(t,8,2),n=new Date(a);n.setDate(a.getDate()-1);let l=new Date(a);return l.setDate(a.getDate()+1),n<=e&&e<=l},Logo=({type:e,className:t,style:a,isLightLogo:o,customSize:i,badge:u,locale:p,dateForSeasonal:h,isPro:b})=>{let[v,E]=(0,n.useState)({isChristmas:!1,isLunarNewYear:!1,isNewYear:!1,isRamadan:!1,isVNHungKing:!1,isVN3004:!1,isLabourDay:!1,isVNIndependentDay:!1});return(0,n.useEffect)(()=>{if(!h||isNaN(new Date(h).getTime()))return;let e=new Date(h),t=isChristmas(e),a=g.includes(p)&&isLunarNewYear(e),n=!a&&isNewYear(e),r=isRamadan(e),o=p===l.L.Vietnam&&isVNHungKing(e),i=p===l.L.Vietnam&&isVN3004(e),s=p===l.L.Vietnam&&isLabourDay(e),c=p===l.L.Vietnam&&isVNIndependentDay(e);E({isChristmas:t,isLunarNewYear:a,isNewYear:n,isRamadan:r,isVNHungKing:o,isVN3004:i,isLabourDay:s,isVNIndependentDay:c})},[p,new Date(h).getDate()]),n.createElement(d,{className:t,style:a,"data-logo-is-light":o||void 0,"data-has-badge":!!u,"data-seasonal":v.isRamadan?"ramadan":v.isChristmas?"christmas":v.isLunarNewYear?"lunar-new-year":v.isNewYear?"new-year":v.isVNHungKing?"hung-king":v.isVN3004?"30-04":v.isLabourDay?"labour-day":v.isVNIndependentDay?"vn-independent-day":void 0,"data-type":e},v.isChristmas?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left xmas logo",src:r.C.getAssetPath("logo/xmas-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right xmas logo",src:r.C.getAssetPath("logo/xmas-right.png"),className:"common-logo-seasonal-right"})):v.isNewYear?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left new year logo",src:r.C.getAssetPath("logo/new-year-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right new year logo",src:r.C.getAssetPath("logo/new-year-right.png"),className:"common-logo-seasonal-right"})):v.isLunarNewYear?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left lunar new year logo",loading:"lazy",src:r.C.getAssetPath("logo/lunar-new-year-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right lunar new year logo",loading:"lazy",src:r.C.getAssetPath("logo/lunar-new-year-right.png"),className:"common-logo-seasonal-right"})):v.isRamadan&&"hellosehat"===e?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-sehat-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-sehat-right.png"),className:"common-logo-seasonal-right"})):v.isRamadan&&"hellodoktor"===e?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"left ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-doktor-left.png"),className:"common-logo-seasonal-left"}),n.createElement(c.I,{alt:"right ramadan logo",loading:"lazy",src:r.C.getAssetPath("logo/ramadan-doktor-right.png"),className:"common-logo-seasonal-right"})):v.isVNHungKing&&("hellobacsi"===e||"marryBaby"===e)?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"Hung King logo",loading:"lazy",src:r.C.getAssetPath("logo/hung-king-bg.png"),className:"common-logo-seasonal-left"})):v.isVNIndependentDay&&("hellobacsi"===e||"marryBaby"===e)?n.createElement(n.Fragment,null,n.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:r.C.getAssetPath("logo/vn-independence-desktop.png"),className:"common-logo-seasonal-left desktop-only"}),n.createElement(c.I,{alt:"VN Independent day logo",loading:"lazy",src:r.C.getAssetPath("logo/vn-independence-mobile.png"),className:"common-logo-seasonal-left mobile-only"})):null,n.createElement(s.L,{type:e,width:null==i?void 0:i.width,height:null==i?void 0:i.height,isLight:o}),b?n.createElement(m,{src:r.C.getAssetPath("logo/pro-suffix.svg")}):null,u)}},"/iio":function(e,t,a){a.d(t,{S:function(){return l}});var n=a("2wr/");let l=n.r},XQAR:function(e,t,a){a.d(t,{B:function(){return BabyVaccineForm}});var n,l,r=a("Kz+G"),o=a("q1tI"),i=a("iuhU"),s=a("8vDj"),c=a("cChf"),d=a("ZFu2"),m=a("3tAZ"),u=a("pMur"),g=a("FUIV"),p=a("w8hz"),h=a("+aod"),b=a("sO5b"),v=a("fkrl");let E=(0,o.createContext)({}),DefaultLayout=e=>{var t=(0,r._)(e,[]);let{t:a}=(0,g.u)(),{currentUrl:n,submitProps:l,form:s}=(0,o.useContext)(E),{classes:c={}}=(0,o.useContext)(p.C);return o.createElement(h.H,Object.assign({formLayout:"default"},t),o.createElement(h.H.FormRow,null,o.createElement(b.G,Object.assign({isBaby:!0},s.getInputProps("gender")))),o.createElement(h.H.FormRow,null,o.createElement(m.D,Object.assign({label:o.createElement(u.T,{size:"p2",weight:"semiBold"},a("babyGrowth.input.birthday")),placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age")))),o.createElement(h.H.FormRow,{className:c.submitWrapper},o.createElement(h.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",c.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,g.u)(),{currentUrl:n,submitProps:l,form:s}=(0,o.useContext)(E),{classes:c={}}=(0,o.useContext)(p.C);return o.createElement(h.H,Object.assign({formLayout:"inline"},t),o.createElement(h.H.FormRow,null,o.createElement(h.H.BorderInlineControl,{label:a("tools.selectBabyGender"),width:"none"},o.createElement(b.G,Object.assign({isBaby:!0,hideLabel:!0,type:"radio"},s.getInputProps("gender")))),s.errors.gender&&o.createElement(h.H.Error,null,s.errors.gender)),o.createElement(h.H.FormRow,null,o.createElement(h.H.BorderInlineControl,{label:a("babyGrowth.input.birthday")},o.createElement(m.D,Object.assign({placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0},maxDate:new Date},s.getInputProps("age"),{error:null}))),s.errors.age&&o.createElement(h.H.Error,null,s.errors.age)),o.createElement(h.H.FormRow,{className:c.submitWrapper},o.createElement(h.H.Submit,Object.assign({type:"submit",className:(0,i.default)("due-date-calculate-button",c.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,g.u)(),{currentUrl:n,submitProps:l,form:i}=(0,o.useContext)(E);return o.createElement(h.H,Object.assign({formLayout:"default"},t),o.createElement(h.H.Control,null,o.createElement(b.G,Object.assign({isBaby:!0},i.getInputProps("gender"),{error:null}))),i.errors.gender&&o.createElement(h.H.Error,null,i.errors.gender),o.createElement(h.H.FormRow,null,o.createElement(h.H.BorderBoxControl,{label:a("babyGrowth.input.birthday"),rightSection:o.createElement(v.Z,null)},o.createElement(m.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(h.H.Error,null,i.errors.age)),o.createElement(h.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:m}=(0,g.u)(),u=(0,s.rZ)(),p="mb"===u.other.template,h=(0,c.c)({validate:{gender:(0,d.U)(m("validation.error.requiredField")),age:(0,d.U)(m("validation.error.requiredField"))}}),b=Object.assign({onSubmit:h.onSubmit(l)},i);return o.createElement(E.Provider,{value:{submitProps:a,currentUrl:n,form:h}},"inline"===t?o.createElement(InlineLayout,Object.assign({},b)):p?o.createElement(MbLayout,Object.assign({formLayout:t},b)):o.createElement(DefaultLayout,Object.assign({},b)))}},"M6+b":function(e,t,a){a.d(t,{B:function(){return BmiForm},F:function(){return FitnessToolUnitPicker},H:function(){return H},N:function(){return NewsletterCheckbox},Q:function(){return Question1Label},a:function(){return Question2Label},b:function(){return Question2Description}});var n=a("Kz+G"),l=a("q1tI"),r=a("wUmw"),o=a("hR5a"),i=a("xPje"),s=a("/npG"),c=a("SPK5"),d=a("Eso5"),m=a("8vDj"),u=a("Zo/N"),g=a("mYVa"),p=a("lSJj"),h=a("TIp3"),b=a("OAL+"),v=a("iuhU"),E=a("C/sX"),f=a("H1c6"),y=a("pMur"),C=a("YXre"),x=a("FUIV"),w=a("+aod"),S=a("/ozO"),k=a("w8hz"),I=a("sO5b"),N=a("NbaP"),P=a("xrdX"),D=a("mx4j");let Question1Label=e=>{var{LabelWrapper:t}=e,a=(0,n._)(e,["LabelWrapper"]);let{t:r}=(0,x.u)(),o=t?{}:Object.assign({size:"p2"},a),i=t||y.T;return l.createElement(i,Object.assign({},o),r("bmi.question.weightLossSupport"))},Question2Label=e=>{var{LabelWrapper:t}=e,a=(0,n._)(e,["LabelWrapper"]);let{t:r}=(0,x.u)(),o=t?{}:Object.assign({size:"p2"},a),i=t||y.T;return l.createElement(i,Object.assign({},o),r("bmi.question.glp1Awareness"))},Question2Description=e=>{var{LabelWrapper:t}=e,a=(0,n._)(e,["LabelWrapper"]);let{t:r}=(0,x.u)(),o=t?{}:Object.assign({size:"p2"},a),i=t||y.T;return l.createElement(i,Object.assign({},o),r("bmi.question.glp1Awareness.desc"))},B=(0,l.createContext)({});var L=(0,s.k)(()=>({label:{marginTop:2,cursor:"pointer",userSelect:"none"}}));let NewsletterCheckbox=e=>{var{labelTextProps:t,checked:a,LabelWrapper:r,useCollapse:o=!0}=e,i=(0,n._)(e,["labelTextProps","checked","LabelWrapper","useCollapse"]);let{t:s}=(0,x.u)(),[m,u]=(0,l.useState)(!o),[g,p]=(0,l.useState)(!0),[h,b]=(0,l.useState)(a),v=r?{}:Object.assign({size:"p3"},t),E=r||y.T,{classes:C}=L(void 0,{name:"NewsletterCheckbox"});return l.createElement(c.k,{gap:8,align:"flex-start"},l.createElement(f.d,Object.assign({},i,{label:void 0,size:"sm",checked:h,onChange:e=>{g?p(!1):b(e.currentTarget.checked)},styles:{labelWrapper:{display:"none"}}})),l.createElement(d.x,null,l.createElement(E,Object.assign({},v,{onClick:()=>{o&&u(e=>!e)},className:C.label,lineClamp:m?void 0:1}),s("bmi.newsletter.label"))))},FitnessToolUnitPicker=({displayValue:e,field:t,onChange:a})=>{let n=(0,m.rZ)(),r=n.colors.gray[1],o="height"===t?[{label:"cm",system:"metric"},{label:"ft",system:"imperial"}]:[{label:"kg",system:"metric"},{label:"lbs",system:"imperial"}];return l.createElement(u.v,{position:"bottom-end",withinPortal:!0,offset:0,styles:{dropdown:{backgroundColor:n.white,border:`${(0,g.h)(1)} solid ${r}`,borderRadius:12,boxShadow:"0px 0px 1px 0px #0000000A,0px 2px 8px 0px #0000000A,0px 10px 16px 0px #0000000A",padding:(0,g.h)(4),minWidth:(0,g.h)(90)},item:{fontSize:n.fontSizes.sm,lineHeight:1.4,padding:`${(0,g.h)(6)} ${(0,g.h)(10)}`,borderRadius:n.radius.xs,color:n.colors.dark[9],"&[data-hovered]":{backgroundColor:"transparent"}}}},l.createElement(u.v.Target,null,l.createElement(p.k,{type:"button",sx:e=>({height:"100%",display:"flex",alignItems:"center",justifyContent:"flex-end",width:"100%",paddingRight:e.spacing.xs,gap:4})},l.createElement(h.x,{component:"span",size:"sm",sx:{lineHeight:1}},e),l.createElement(S.C,{style:{width:18,height:18}}))),l.createElement(u.v.Dropdown,null,o.map(r=>{let o=e===r.label;return l.createElement(u.v.Item,{key:r.label,onClick:()=>a(r.system,t),sx:{backgroundColor:o?n.colors.gray[1]:void 0,"&[data-hovered]":{backgroundColor:o?n.colors.gray[1]:"transparent"}}},r.label)})))},DefaultForm=e=>{var t,a,o,i,s,m,u;let{t:g,locale:p}=(0,x.u)(),{classes:h={}}=(0,l.useContext)(k.C),{control:E,bmiGenerated:y,linkTool:C,submitProps:S,withAdditionalQuestion:I,classes:D={},enableUnitPicker:L,unitSystem:T,unitHeight:A,unitWeight:O,onUnitChange:F}=(0,l.useContext)(B),j={body:{alignItems:"center"}};return l.createElement(w.H,Object.assign({formLayout:"default"},e),l.createElement(H,{isMobile:e.isMobile,gutter:4},l.createElement(b.K,{spacing:4,px:16},l.createElement(r.Qr,{name:"gender",control:E,rules:null===(t=y.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>l.createElement("div",null,l.createElement(H.GenderControl,{LabelWrapper:H.Label,error:void 0,onChange:e,gap:4}),(null==t?void 0:t.message)&&l.createElement(H.Error,{label:t.message}))}),l.createElement(r.Qr,{name:"age",control:E,rules:null===(a=y.age)||void 0===a?void 0:a.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(H.InputNumber,{label:l.createElement(H.Label,null,g("bmi.ageInput")),placeholder:g("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:a,min:0,rightSection:g("bmi.ageInput.desc"),classNames:{rightSection:D.inputRightSection}}),(null==n?void 0:n.message)&&l.createElement(H.Error,{label:n.message}))}),l.createElement(r.Qr,{name:"height",control:E,rules:null===(o=y.height)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(H.InputNumber,{label:l.createElement(H.Label,null,g("bmi.heightInput")),placeholder:g("tools.inputPlaceholder",{content:"imperial"===T?6:170}),name:e,value:t,onChange:a,min:0,precision:1,inputMode:"decimal",rightSection:L?l.createElement(FitnessToolUnitPicker,{displayValue:A,field:"height",onChange:F}):g("bmi.heightInput.desc"),rightSectionWidth:70,classNames:{rightSection:D.inputRightSection},styles:L?void 0:()=>({rightSection:{paddingRight:0}})}),(null==n?void 0:n.message)&&l.createElement(H.Error,{label:n.message}))}),l.createElement(r.Qr,{name:"weight",control:E,rules:null===(i=y.weight)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(H.InputNumber,{label:l.createElement(H.Label,null,g("bmi.weightInput")),placeholder:g("tools.inputPlaceholder",{content:"imperial"===T?130:60}),name:e,value:t,onChange:a,precision:1,inputMode:"decimal",min:0,rightSection:L?l.createElement(FitnessToolUnitPicker,{displayValue:O,field:"weight",onChange:F}):g("bmi.weightInput.desc"),rightSectionWidth:70,classNames:{rightSection:D.inputRightSection},styles:L?void 0:()=>({rightSection:{paddingRight:0}})}),(null==n?void 0:n.message)&&l.createElement(H.Error,{label:n.message}))})),I?l.createElement(l.Fragment,null,l.createElement(b.K,{spacing:4,px:16},l.createElement(r.Qr,{name:"question1",control:E,rules:null===(s=y.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(f.R.Group,{name:a,value:e,onChange:t,sx:{flex:1},label:l.createElement(Question1Label,{LabelWrapper:H.Label}),size:"lg"},l.createElement(c.k,{gap:"lg"},l.createElement(f.R,{size:"sm",value:"1",label:l.createElement(H.OptionLabel,null,g("switchBtn.yes")),styles:j}),l.createElement(f.R,{size:"sm",value:"0",label:l.createElement(H.OptionLabel,null,g("switchBtn.no")),styles:j}))),(null==n?void 0:n.message)&&l.createElement(H.Error,{label:n.message}))}),l.createElement(r.Qr,{name:"question2",control:E,rules:null===(m=y.question2)||void 0===m?void 0:m.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement("div",null,l.createElement(f.R.Group,{name:e,value:t,onChange:a,sx:{flex:1},label:l.createElement(Question2Label,{LabelWrapper:H.Label}),size:"lg",description:p!==N.L.Malaysia&&l.createElement(Question2Description,{LabelWrapper:H.SubLabel})},l.createElement(c.k,{gap:"lg"},l.createElement(f.R,{size:"sm",value:"1",label:l.createElement(H.OptionLabel,null,g("switchBtn.yes")),styles:j}),l.createElement(f.R,{size:"sm",value:"0",label:l.createElement(H.OptionLabel,null,g("switchBtn.no")),styles:j}))),(null==n?void 0:n.message)&&l.createElement(H.Error,{label:n.message}))})),l.createElement(d.x,{className:(0,v.default)(D.newsletterBlock,h.newsletterBlock)},l.createElement(b.K,{spacing:8,px:16,py:12},l.createElement(r.Qr,{name:"newsletter",control:E,rules:null===(u=y.newsletter)||void 0===u?void 0:u.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:o}=t,i=(0,n._)(t,["value","onChange","name"]);return l.createElement(NewsletterCheckbox,Object.assign({size:"sm",onChange:e=>r(e.currentTarget.checked),name:o,checked:!!a},i))}}),l.createElement(w.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[p]}/${C}`,type:"submit",fullWidth:!0},S),g("bmi.submit"))))):l.createElement(d.x,{px:16,sx:{paddingBottom:8}},l.createElement(w.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[p]}/${C}`,type:"submit",fullWidth:!0},S),g("bmi.submit")))))};var T=(0,s.k)(e=>({newsletterBlock:{backgroundColor:e.colors.neutral[0],borderBottomLeftRadius:"inherit",borderBottomRightRadius:"inherit",".bmi-btn":{marginTop:0}},inputRightSection:{fontSize:(0,g.h)(13),lineHeight:(0,g.h)(24),color:e.colors.gray[4],justifyContent:"flex-end",paddingRight:8,whiteSpace:"nowrap"}}));let InlineForm=e=>{var t,a,o,i,s,m,u,p;let{t:h,locale:E}=(0,x.u)(),{control:C,bmiGenerated:S,isTouched:D,linkTool:L,submitProps:T,withAdditionalQuestion:A,enableUnitPicker:H,unitSystem:O,unitHeight:F,unitWeight:j,onUnitChange:z}=(0,l.useContext)(B),{classes:R={},variant:M}=(0,l.useContext)(k.C),{classes:_={}}=(0,l.useContext)(B);return l.createElement(w.H,Object.assign({formLayout:"inline"},e),l.createElement(r.Qr,{name:"gender",control:C,rules:null===(t=S.gender)||void 0===t?void 0:t.rule,render:({field:{onChange:e},fieldState:{error:t}})=>l.createElement(w.H.FormRow,null,l.createElement(w.H.BorderInlineControl,{label:h("tools.selectGender"),width:"none",errorMess:D&&(null==t?void 0:t.message)},l.createElement(I.G,{type:"radio",hideLabel:!0,error:D?l.createElement(l.Fragment,null):"",onChange:e})))}),l.createElement(r.Qr,{name:"age",control:C,rules:null===(a=S.age)||void 0===a?void 0:a.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(w.H.FormRow,null,l.createElement(w.H.BorderInlineControl,{label:h("bmi.ageInput"),errorMess:D&&(null==n?void 0:n.message)},l.createElement(f.I.Number,{placeholder:h("tools.inputPlaceholder",{content:"25"}),name:e,value:t,onChange:a,error:D&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",min:0,rightSection:l.createElement(w.H.Unit,null,h("tools.yearsOld")),styles:()=>({rightSection:{width:"auto"}})})))}),l.createElement(r.Qr,{name:"height",control:C,rules:null===(o=S.height)||void 0===o?void 0:o.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(w.H.FormRow,null,l.createElement(w.H.BorderInlineControl,{label:h("bmi.heightInput"),errorMess:D&&(null==n?void 0:n.message)},l.createElement(f.I.Number,{placeholder:h("tools.inputPlaceholder",{content:"imperial"===O?6:170}),name:e,value:t,onChange:a,min:0,precision:1,inputMode:"decimal",error:D&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",rightSection:H?l.createElement(FitnessToolUnitPicker,{displayValue:F,field:"height",onChange:z}):l.createElement(w.H.Unit,{styles:{root:{paddingRight:0}}},h("bmi.heightInput.desc")),rightSectionWidth:70,styles:H?void 0:()=>({rightSection:{paddingRight:0}})})))}),l.createElement(r.Qr,{name:"weight",control:C,rules:null===(i=S.weight)||void 0===i?void 0:i.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(w.H.FormRow,null,l.createElement(w.H.BorderInlineControl,{label:h("bmi.weightInput"),errorMess:D&&(null==n?void 0:n.message)},l.createElement(f.I.Number,{placeholder:h("tools.inputPlaceholder",{content:"imperial"===O?130:60}),name:e,value:t,onChange:a,error:D&&(null==n?void 0:n.message)?l.createElement(l.Fragment,null):"",precision:1,inputMode:"decimal",min:0,rightSection:H?l.createElement(FitnessToolUnitPicker,{displayValue:j,field:"weight",onChange:z}):l.createElement(w.H.Unit,{styles:{root:{paddingRight:0}}},h("bmi.weightInput.desc")),rightSectionWidth:70,styles:H?void 0:()=>({rightSection:{paddingRight:0}})})))}),A?l.createElement(l.Fragment,null,l.createElement(r.Qr,{name:"question1",control:C,rules:null===(s=S.question1)||void 0===s?void 0:s.rule,render:({field:{value:e,onChange:t,name:a},fieldState:{error:n}})=>l.createElement(w.H.FormRow,null,l.createElement(f.R.Group,{name:a,value:e,onChange:t,sx:{flex:1},label:l.createElement(y.T,{size:"s4",weight:"semiBold",span:!0},h("bmi.question.weightLossSupport")),size:"lg"},l.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,g.h)(8)}},l.createElement(f.R,{size:"sm",value:"1",label:h("switchBtn.yes")}),l.createElement(f.R,{size:"sm",value:"0",label:h("switchBtn.no")}))),D&&(null==n?void 0:n.message)&&l.createElement(f.e,{label:n.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),l.createElement(r.Qr,{name:"question2",control:C,rules:null===(m=S.question2)||void 0===m?void 0:m.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>l.createElement(w.H.FormRow,null,l.createElement(f.R.Group,{name:e,value:t,onChange:a,sx:{flex:1},label:l.createElement(y.T,{size:"s4",weight:"semiBold",span:!0},h("bmi.question.glp1Awareness")),size:"lg",description:E!==N.L.Malaysia&&l.createElement(y.T,{style:{fontSize:"10px"},span:!0},h("bmi.question.glp1Awareness.desc"))},l.createElement(c.k,{gap:"lg",sx:{paddingTop:(0,g.h)(8)}},l.createElement(f.R,{size:"sm",value:"1",label:h("switchBtn.yes")}),l.createElement(f.R,{size:"sm",value:"0",label:h("switchBtn.no")}))),D&&(null==n?void 0:n.message)&&l.createElement(f.e,{label:n.message,textProps:{size:"p4"},sx:{marginTop:6}}))}),"gray"===M||"violet"===M?l.createElement(l.Fragment,null,l.createElement(r.Qr,{name:"newsletter",control:C,rules:null===(u=S.newsletter)||void 0===u?void 0:u.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:o}=t,i=(0,n._)(t,["value","onChange","name"]);return l.createElement(w.H.FormRow,null,l.createElement(f.d,Object.assign({size:"sm",label:l.createElement(y.T,{size:"p3"},h("bmi.newsletter.label")),onChange:e=>r(e.currentTarget.checked),name:o,checked:!!a},i)))}}),l.createElement(w.H.FormRow,{className:(0,v.default)(R.submitWrapper)},l.createElement(w.H.Submit,Object.assign({className:(0,v.default)("bmi-btn bmi--btn-submit",R.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[E]}/${L}`,type:"submit"},T),h("bmi.submit")))):l.createElement(w.H.FormRow,{py:16,className:(0,v.default)(_.newsletterBlock,R.newsletterBlock)},l.createElement(b.K,{spacing:16},l.createElement(r.Qr,{name:"newsletter",control:C,rules:null===(p=S.newsletter)||void 0===p?void 0:p.rule,render:e=>{var t=e.field,{value:a,onChange:r,name:o}=t,i=(0,n._)(t,["value","onChange","name"]);return l.createElement(NewsletterCheckbox,Object.assign({size:"sm",labelTextProps:{size:"p4"},onChange:e=>r(e.currentTarget.checked),name:o,checked:!!a,useCollapse:!1},i))}}),l.createElement(d.x,{className:(0,v.default)(R.submitWrapper)},l.createElement(w.H.Submit,Object.assign({className:(0,v.default)("bmi-btn bmi--btn-submit",R.submitBtn),dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[E]}/${L}`,type:"submit"},T),h("bmi.submit")))))):l.createElement(w.H.FormRow,{className:(0,v.default)(R.submitWrapper)},l.createElement(w.H.Submit,Object.assign({className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${P.v[E]}/${L}`,type:"submit"},T),h("bmi.submit"))))},BmiForm=e=>{var{value:t,onChange:a,onSubmit:s,bmiGenerated:c,bmiUnit:d,defaultUnitSystem:m,enableUnitPicker:u=!0,formLayout:g="default",submitProps:p,withAdditionalQuestion:h,isMobile:b}=e,v=(0,n._)(e,["value","onChange","onSubmit","bmiGenerated","bmiUnit","defaultUnitSystem","enableUnitPicker","formLayout","submitProps","withAdditionalQuestion","isMobile"]);let{classes:E}=T(void 0,{name:"BmiForm"}),{locale:f}=(0,x.u)(),[y,w]=(0,l.useState)(!1),S=(0,l.useMemo)(()=>m||"metric",[m]),[k,I]=(0,l.useState)(S),{control:N,handleSubmit:P,setValue:L,watch:A}=(0,r.cI)({defaultValues:{question1:void 0,question2:void 0,newsletter:!0}}),H=A(),{getHealthToolLink:O}=(0,o.u)(f),F=(0,l.useMemo)(()=>O(i.H.OVULATION),[O]),j="imperial"===k?"ft":"cm",z="imperial"===k?"lbs":"kg",convertHeightToCm=e=>"imperial"===k?30.48*e:e,convertWeightToKg=e=>"imperial"===k?.45359237*e:e,onInValid=()=>{w(!0)};(0,l.useEffect)(()=>{Object.keys(t||{}).forEach(e=>{L(e,null==t?void 0:t[e],{shouldTouch:!1,shouldDirty:!1,shouldValidate:!1})})},[t]),(0,l.useEffect)(()=>{a&&a(H)},[H]),(0,l.useEffect)(()=>{I(S)},[S]);let R=Object.assign({onSubmit:P(e=>(0,n.a)(void 0,void 0,void 0,function*(){let t="number"==typeof e.height?e.height:Number(e.height),a="number"==typeof e.weight?e.weight:Number(e.weight),n=u?Object.assign(Object.assign({},e),{bmi:(0,D.F)({height:convertHeightToCm(t),weight:convertWeightToKg(a)}),unit:k}):(()=>{let n=d.heightConvert(t),l=d.weightConvert(a);return Object.assign(Object.assign({},e),{height:n,weight:l,bmi:(0,D.F)({height:n,weight:l})})})();onInValid(),s&&s(n)}),onInValid)},v);return l.createElement(C.T,{variant:C.C.LEADGEN},l.createElement(B.Provider,{value:{control:N,bmiGenerated:c,isTouched:y,linkTool:F,submitProps:p,withAdditionalQuestion:h,classes:E,enableUnitPicker:u,unitSystem:k,unitHeight:j,unitWeight:z,onUnitChange:(e,t)=>{u&&e!==k&&(I(e),L("height","",{shouldDirty:!0,shouldValidate:!1}),L("weight","",{shouldDirty:!0,shouldValidate:!1}))}}},"inline"===g?l.createElement(InlineForm,Object.assign({},R)):l.createElement(DefaultForm,Object.assign({},R,{isMobile:b}))))},A=(0,l.createContext)({}),Error=e=>{let{errorLabelSize:t}=(0,l.useContext)(A);return l.createElement(f.e,Object.assign({textProps:{size:t},sx:{marginTop:5}},e))};var H=Object.assign(e=>{var t,a,r,o,i,s,{children:c,isMobile:d}=e,m=(0,n._)(e,["children","isMobile"]);let u=Object.assign({isMobile:d,labelSize:null!==(t=m.labelSize)&&void 0!==t?t:d?"p2":"s4",subLabelSize:null!==(a=m.subLabelSize)&&void 0!==a?a:"subText",optionLabelSize:null!==(r=m.optionLabelSize)&&void 0!==r?r:d?"p2":"s4",inputSize:null!==(o=m.inputSize)&&void 0!==o?o:d?"sm":"md",gutter:null!==(i=m.gutter)&&void 0!==i?i:d?4:12,errorLabelSize:null!==(s=m.errorLabelSize)&&void 0!==s?s:"p3"},m);return l.createElement(A.Provider,{value:u},c)},{Row:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{gutter:r}=(0,l.useContext)(A);return l.createElement(E.r,Object.assign({gutter:r},a),t)},Col:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);return l.createElement(E.r.Col,Object.assign({span:12},a),t)},SubLabel:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{subLabelSize:r}=(0,l.useContext)(A);return l.createElement(y.T,Object.assign({size:r},a),t)},Label:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{labelSize:r}=(0,l.useContext)(A);return l.createElement(y.T,Object.assign({size:r,weight:"semiBold"},a,{span:!0}),t)},OptionLabel:e=>{var{children:t}=e,a=(0,n._)(e,["children"]);let{optionLabelSize:r}=(0,l.useContext)(A);return l.createElement(y.T,Object.assign({size:r,weight:"regular"},a,{span:!0}),t)},Input:f.I,InputNumber:e=>{var{error:t}=e,a=(0,n._)(e,["error"]);let{inputSize:r}=(0,l.useContext)(A);return l.createElement("div",null,l.createElement(f.I.Number,Object.assign({size:r},a)),t&&l.createElement(Error,{label:t}))},GenderControl:e=>{let{inputSize:t}=(0,l.useContext)(A);return l.createElement(I.G,Object.assign({size:t},e))},Error})},Jvun:function(e,t,a){a.d(t,{P:function(){return PostContent},T:function(){return r},U:function(){return o},a:function(){return ProfileDetail},b:function(){return q}});var n,l,r,o,i=a("Kz+G"),s=a("q1tI"),c=a("Wgwc"),d=a.n(c),m=a("b97I"),u=a("PFel"),g=a("0aZv"),p=a("IQVP"),h=a("7m0Y"),b=a("vWP/"),v=a("/npG"),E=a("eito"),f=a("bpvy"),y=a("SPK5"),C=a("8vDj"),x=a("kSP5"),w=a("kuQP"),S=a("udpS"),k=a("7t6O"),I=a("FUIV"),N=a("iBNF"),P=a("Frvz"),D=a("h84G"),B=a("H1c6"),L=a("pMur"),T=a("VLju"),A=a("rBCA"),H=a("aZjv"),O=a("2RCU"),F=a("LB4I");let j=A.Z.div` padding: 0.5rem 1rem 1rem; line-height: 1.5; word-break: break-word; .post-content-replying { margin-right: 5px; cursor: pointer; display: inline-block; &.tag-only { margin-right: 0; } } .post-content { display: inline; white-space: pre-wrap; /* > *:first-child, */ > mention:first-child ~ * { &:not(ul), &:not(ol) { display: inline-block; } } > mention:first-child { margin-right: 5px; } &.has-see-more { *:last-child { &:not(ul), &:not(ol) { display: inline; } } } img { width: 100%; height: unset; } ul, ol { list-style-position: inside; padding-left: 1rem; display: block; } ol { list-style-type: decimal; } ul { list-style-type: disc; } mention { color: ${e=>e.mentionColor||"#1890ff"}; padding-right: 4px; :hover { text-decoration: underline; } } .markdown { white-space: normal; p, ul, ol { margin-top: 1em; &:first-child { margin-top: 0; } } li { margin-top: 0.5em; &:first-child { margin-top: 0; } } } } `,z=A.Z.span` overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: ${e=>e.line||1}; display: -webkit-box; -webkit-box-orient: vertical; &.post-content-show-all { display: block; } `,R=A.Z.span` padding-left: 2px; background-color: ${N.r.colors.white}; bottom: 8px; position: absolute; right: 0; z-index: 10; cursor: pointer; `;var M=(0,v.k)(e=>({root:{mention:{color:e.fn.primaryColor()},a:{"&,&:visited,&:focus":{color:e.fn.primaryColor()}},".create-post-link":{display:"inline",color:e.fn.primaryColor(),cursor:"pointer"}}}));let PostContent=e=>{var{trackingCategory:t,url:a,className:n,style:l,replyingTo:r,mentionedUser:o,description:c,disableShortenContent:d,mentions:m=[],maxChars:u=1e3,maxLines:g,hideShowAllBtn:p,styles:b,onClickCreatePostLink:v}=e,f=(0,i._)(e,["trackingCategory","url","className","style","replyingTo","mentionedUser","description","disableShortenContent","mentions","maxChars","maxLines","hideShowAllBtn","styles","onClickCreatePostLink"]);let{classes:y,theme:C}=M(void 0,{name:"PostContent",styles:b}),[x,w]=(0,s.useState)(!1),[k,N]=(0,s.useState)(!1),{t:P}=(0,I.u)(),{authActionWrapper:D}=(0,H.iV)(),[B,L]=(0,s.useState)(!1),T=(0,O.d)((0,O.b)(c||"","display"),m),{action:{sanitizeFunction:A}}=(0,s.useContext)(h.T),F=(0,s.useMemo)(()=>{let e=A(T||"");if(d||x)return{showContent:e,hasSeeMore:!1};let t=e.slice(0,u),a=u-((t.match(/<\/div>/g)||[]).length-1)*27,n=(t||"").slice(0,a<40?40:a),l=A(n.replace(/(<|<\/)( +|[a-zA-Z]*)$/gi,"")),r=l.lengths.createElement(s.Fragment,null,"... ",!p&&s.createElement(E.e,Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),D(()=>w(!0))},className:"see-more-text"},t?{"data-event-category":t,"data-event-action":"See More Post Click","data-event-label":a}:{}),P("post.seeMore"))),[p,a,t]),handleCreatePostClick=e=>{e.preventDefault(),null==v||v()},isEllipsisActive=e=>e.scrollHeight>e.clientHeight;return(0,s.useEffect)(()=>{var e;return null===(e=null==W?void 0:W.current)||void 0===e||e.querySelectorAll("[data-create-post]").forEach(e=>{e.addEventListener("click",handleCreatePostClick,{passive:!0})}),()=>{var e;null===(e=null==W?void 0:W.current)||void 0===e||e.querySelectorAll("[data-create-post]").forEach(e=>{e.removeEventListener("click",handleCreatePostClick,!1)})}},[d,x,T]),(0,s.useEffect)(()=>{$.current&&T&&g&&(isEllipsisActive($.current)?N(!0):N(!1))},[T,g]),s.createElement(s.Fragment,null,G&&s.createElement(S.P,{isOpen:B,onClose:()=>L(!1),expertId:String(null==o?void 0:o.partnerId)}),s.createElement(j,Object.assign({ref:W,className:`${y.root} ${n} no-replace-click`,style:l,mentionColor:C.fn.primaryColor()},f),_&&s.createElement(E.e,{onClick:()=>G&&L(!0),className:"post-content-replying"},"@",_),(null==c?void 0:c.startsWith("[mention+id="))&&s.createElement("span",{className:"post-content-replying tag-only",style:{color:C.fn.primaryColor()}},"@"),g?s.createElement(s.Fragment,null,s.createElement(z,{dangerouslySetInnerHTML:{__html:T},className:`post-content-line ${x?"post-content-show-all":""}`,line:g,ref:$}),k&&!x&&s.createElement(R,null,V())):s.createElement(s.Fragment,null,s.createElement("span",{dangerouslySetInnerHTML:{__html:F.showContent},className:`post-content ${F.hasSeeMore?"has-see-more":""}`}),F.hasSeeMore&&!x&&s.createElement("span",null,V()))))},CategoryText=({children:e,className:t=""})=>s.createElement("div",{className:`l5fL1xL ${t}`},e),Title=({children:e,className:t=""})=>s.createElement("div",{className:`L-aGKo7 ${t}`},e),Thumbnail=({src:e,defaultSrc:t=x.C.getAssetPath("logo/logomark.png"),ratio:a=1,size:n=80,radius:l=8,alt:r,className:o=""})=>s.createElement("div",{className:o},s.createElement("div",{className:"DZmf3s7",style:{width:`${n}px`,height:`${n*a}px`,borderRadius:`${l}px`}},s.createElement(w.I,{src:e,backupSrc:t,alt:r}))),CardArticle=({category:e,title:t,src:a,children:n,className:l=""})=>s.createElement("div",{className:`eaR8ATZ ${l}`},s.createElement(Thumbnail,{src:a}),s.createElement("div",{className:"xM-7K0a"},n||s.createElement("div",null,e&&s.createElement(CategoryText,null,e),t&&s.createElement(Title,null,t))));CardArticle.CategoryText=CategoryText,CardArticle.Title=Title;let ArticleCard=({featureImage:e,postTitle:t,author:a,categories:n,isReview:l,className:r=""})=>{var o;return s.createElement(CardArticle,{src:e,className:r},s.createElement(s.Fragment,null,s.createElement(CardArticle.CategoryText,null,null===(o=null==n?void 0:n[0])||void 0===o?void 0:o.name),s.createElement(CardArticle.Title,null,t),s.createElement(S.d,{avatarProps:Object.assign(Object.assign({},a),{size:32}),subTitle:s.createElement(s.Fragment,null,l?"Medically reviewed by Jobelle Ann Dela Cruz Bigalbal, MD":"Written by Jobelle Ann Dela Cruz Bigalbal, MD",s.createElement(S.d.SubDivider,null),"Dec 12, 2022")})))};var _={container:"SFSgnOz",header:"Tf3aoVa",heading:"TOt4QXl",headingIcon:"_5XYN1KT",accBodyGroup:"yE-tZRj",accBodyGroupItem:"LXiGuGT",accBodyGroupDesc:"r4rx-6v",subTitle:"XrHh8-C",subIcon:"c5-Yecd",group:"UBj6nWr",groupBody:"_2vptVBd",articleCardLink:"ZPDAwiR",relatedList:"_6wJn-NR",socialItem:"_21XDdFv",mbChevronWrapper:"LSyr3Zo"};let G=(0,s.createContext)({}),About=({className:e=""})=>{var t,a,n,l,r;let{t:o}=(0,I.u)(),{info:i,isMarryBaby:c,currentPageUrl:d}=(0,s.useContext)(G),m=null==i?void 0:i.data,u=[{type:k.S.LinkedIn,icon:x.C.getAssetPath("linkedin.svg"),url:null===(t=null==i?void 0:i.contact)||void 0===t?void 0:t.linkedin,eventAction:"Doctor Profile - Linkedin"},{type:k.S.Instagram,icon:x.C.getAssetPath("instagram.svg"),url:null===(a=null==i?void 0:i.contact)||void 0===a?void 0:a.instagram,eventAction:"Doctor Profile - Instagram"},{type:k.S.Facebook,icon:x.C.getAssetPath("facebook.svg"),url:null===(n=null==i?void 0:i.contact)||void 0===n?void 0:n.facebook,eventAction:"Doctor Profile - Facebook"},{type:k.S.Youtube,icon:x.C.getAssetPath("youtube.svg"),url:null===(l=null==i?void 0:i.contact)||void 0===l?void 0:l.youtube,eventAction:"Doctor Profile - Youtube"},{type:k.S.Tiktok,icon:x.C.getAssetPath("tiktok.svg"),url:null===(r=null==i?void 0:i.contact)||void 0===r?void 0:r.tiktok,eventAction:"Doctor Profile - TikTok"}],g=[...((null==i?void 0:i.experiences)||[]).length>0?[{key:"experience",heading:o("profilePanel.experience"),iconSrc:x.C.getAssetPath(c?"award-doc-mb.svg":"award-doc.svg"),eventAction:"Doctor Experience Click",panel:s.createElement("div",{className:_.accBodyGroup},null==i?void 0:i.experiences.map((e,t)=>s.createElement("div",{className:_.accBodyGroupItem,key:String(t)},s.createElement("div",{className:_.accBodyGroupTitle},e.title),s.createElement("div",{className:_.accBodyGroupDesc},s.createElement("p",null,e.organization),s.createElement("p",null,e.duration)))))}]:[],...((null==i?void 0:i.educations)||[]).length>0?[{key:"education",heading:o("profilePanel.education"),iconSrc:x.C.getAssetPath(c?"book-mb.svg":"book.svg"),eventAction:"Doctor Degree Click",panel:s.createElement("div",{className:_.accBodyGroup},null==i?void 0:i.educations.map((e,t)=>s.createElement("div",{className:_.accBodyGroupItem,key:String(t)},s.createElement("div",{className:_.accBodyGroupTitle},e.schoolName),s.createElement("div",{className:_.accBodyGroupDesc},s.createElement("p",null,e.study),s.createElement("p",null,e.completedYear)))))}]:[],...((null==i?void 0:i.awards)||[]).length>0?[{key:"awards",heading:o("profilePanel.awards"),iconSrc:x.C.getAssetPath(c?"award-mb.svg":"award.svg"),eventAction:"Doctor Award Click",panel:s.createElement("div",{className:_.accBodyGroup},null==i?void 0:i.awards.map((e,t)=>s.createElement("div",{className:_.accBodyGroupTitle,key:t},e.title)))}]:[]],p=(null==i?void 0:i.relatedPosts)||[],h=u.filter(e=>e.url);return s.createElement("div",{className:`${_.container} ${e}`,"data-is-marrybaby":c},g.length>0&&s.createElement(f.U,{defaultValue:g[0].key,chevron:c?s.createElement("div",{className:_.mbChevronWrapper},s.createElement(b.Z,{size:12,color:N.r.mbColors.midGray})):s.createElement(b.Z,{color:N.r.colors.gray400}),styles:{chevron:{"&[data-rotate]":{".minus-path":{display:"block"},".plus-path":{display:"none"}}},content:{display:"flex",flexDirection:"column",gap:"16px",padding:"0"},item:{border:0},control:{paddingLeft:0,"&:hover":{background:"transparent"},"*":{pointerEvents:"none"}}}},g.map(e=>s.createElement(f.U.Item,{key:e.key,value:e.key},s.createElement(f.U.Control,{"data-event-category":"Together","data-event-action":e.eventAction,"data-event-label":d},s.createElement("div",{className:_.header},s.createElement("div",{className:_.headingIcon},s.createElement("img",{src:e.iconSrc,loading:"lazy"})),s.createElement("div",{className:_.heading},e.heading))),s.createElement(f.U.Panel,null,e.panel)))),p.length>0&&s.createElement("div",{className:_.group},s.createElement("div",{className:_.subTitle},s.createElement("img",{className:_.subIcon,src:x.C.getAssetPath(c?"mb-logo.svg":"logo/circle-solid.svg"),loading:"lazy"}),o("profilePanel.publishedArticles")),s.createElement("div",{className:`${_.relatedList}`},null==i?void 0:i.relatedPosts.map(e=>s.createElement("a",{key:String(e.id),href:`${window.location.origin}${null==e?void 0:e.permalink}`,className:_.articleCardLink},s.createElement(ArticleCard,Object.assign({className:"article-card"},Object.assign(Object.assign({},e),!e.author&&{author:{displayName:null==m?void 0:m.name,avatar:null==m?void 0:m.avatar}}),{isReview:!0})))))),h.length>0&&s.createElement("div",{className:_.group},s.createElement("div",{className:_.subTitle},s.createElement("img",{className:_.subIcon,src:x.C.getAssetPath(c?"social-mb.svg":"social.svg"),loading:"lazy"}),o("profilePanel.socialLinks")),s.createElement("div",{className:_.groupBody},s.createElement(y.k,null,u.map((e,t)=>e.url&&s.createElement("div",{className:_.socialItem,key:t},s.createElement("a",{href:e.url,target:"_blank",rel:"noreferrer"},s.createElement("img",{src:e.icon,loading:"lazy",width:"32px","data-event-category":"Together","data-event-action":e.eventAction,"data-event-label":d}))))))))};var W={container:"GYUElSy",question:"_3C6QpT1",questionTitle:"_9M9VYL6",community:"_1RuSyv3",questionCard:"_1IG-eEp"};let PostCard$1=({post:e,className:t=""})=>{var a,n,l,r,o,i,c,d;let{t:m}=(0,I.u)(),{data:{userInfo:u,env:{togetherBasePath:g}}}=(0,s.useContext)(h.T),{authActionWrapper:p,authorProps:b,currentPageUrl:v}=(0,s.useContext)(G),E=`${window.location.origin}${g}/${null===(a=null==e?void 0:e.community)||void 0===a?void 0:a.slug}/${null==e?void 0:e.slug}/`;return s.createElement("div",{className:`${W.container} ${t}`},s.createElement("div",{className:W.header},s.createElement("div",{className:W.question},m("profilePanel.question")," ",s.createElement(B.b,{className:W.questionTitle,href:"#",onClick:()=>{(null==u?void 0:u.id)||null==p||p(()=>window.location.href=E,{_location:E})}},"#",null==e?void 0:e.title)),s.createElement("div",{className:W.community},null===(n=null==e?void 0:e.community)||void 0===n?void 0:n.name," - ",null==e?void 0:e.createdTime)),s.createElement("div",{className:W.questionCard},s.createElement(S.C,Object.assign({className:"card-author"},b,{role:"user",avatarIcon:s.createElement(P.Z,null),subLine:s.createElement(S.C.SubTextRow,null,s.createElement(S.C.SubText,null,null===(o=null===(r=null===(l=null==e?void 0:e.expertAnswer)||void 0===l?void 0:l.answer)||void 0===r?void 0:r[0])||void 0===o?void 0:o.createdTime))})),s.createElement(PostContent,{className:"post-content-wrapper",description:(null===(d=null===(c=null===(i=null==e?void 0:e.expertAnswer)||void 0===i?void 0:i.answer)||void 0===c?void 0:c[0])||void 0===d?void 0:d.content)||"",mentions:null==e?void 0:e.mentions,"data-testid":"Content of the Post"})),s.createElement(T.B,{variant:"secondary","data-event-category":"Together","data-event-action":"Doctor Reply Click","data-event-label":v,size:"md",onClick:()=>{(null==u?void 0:u.id)?window.location.href=E:null==p||p(()=>window.location.href=E,{_location:E})}},m("profilePanel.anserwing.viewFull")))};var $={container:"_8fd7YMs",thumb:"DomiQfw",content:"-b2qnfL"};let EmptyMessage=({message:e,buttonTxt:t,imgSrc:a,onBtnClick:n})=>{let{siteType:l,isMarryBaby:r}=(0,s.useContext)(G);return s.createElement("div",{className:$.container},s.createElement("div",{className:$.thumb},s.createElement("img",{src:a||x.C.getAssetPath(r?"comments-mb.svg":"comments.svg"),loading:"lazy"})),e&&s.createElement("div",{className:$.content},e),t&&s.createElement(F.B,{size:"md",theme:l,color:"secondary",onClick:n},t))},Answering=({id:e})=>{let{t}=(0,I.u)(),{data:{locale:a}}=(0,s.useContext)(h.T),{authorProps:n}=(0,s.useContext)(G),[l,r]=(0,s.useState)(null),[o,c]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{e&&(0,i.a)(void 0,void 0,void 0,function*(){var t;c(!0);let n=yield(0,h.c)((0,h.f)(p.yy.USER.LIST_ANSWERS,{_locale:a,id:e}),"GET"),l=((null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.replies)||[]).map(g.b);r(l),c(!1)})},[]),s.createElement("div",{className:"MrdoES3"},o?s.createElement(u.L,null):null!==l&&(l.length>0?l.map(e=>s.createElement(PostCard$1,{className:"post-card",key:e.id,post:e})):s.createElement(EmptyMessage,{message:t("profilePanel.emptyPostMess.content",{name:(null==n?void 0:n.name)||(null==n?void 0:n.username)})})))},QuestionCard=e=>{var t,a,n,l,{post:r}=e,o=(0,i._)(e,["post"]);let{data:{env:{togetherBasePath:c}}}=(0,s.useContext)(h.T);return s.createElement(s.Fragment,null,s.createElement("div",Object.assign({},o,{className:`toEutn7 ${(null==o?void 0:o.className)||""}`}),s.createElement(S.C,{className:"card-author",avatar:null===(t=null==r?void 0:r.author)||void 0===t?void 0:t.avatar,name:(null===(a=null==r?void 0:r.author)||void 0===a?void 0:a.name)||(null===(n=null==r?void 0:r.author)||void 0===n?void 0:n.username),isAnonymous:!!(null==r?void 0:r.isAnonymous),subLine:s.createElement(S.C.SubTextRow,null,s.createElement(S.C.SubText,null,null==r?void 0:r.createdTime))}),s.createElement(B.b,{href:`${window.location.origin}${c}/${null===(l=null==r?void 0:r.community)||void 0===l?void 0:l.slug}/${null==r?void 0:r.slug}/`,className:"drdisHs",rel:"noreferrer"},null==r?void 0:r.title)))};var V={accordion:"I-uIJ6E",header:"_41WRsj2",heading:"AcOGL93",headingIcon:"JD3dWJN",chevron:"L2Q9T6m",container:"h-pSmhX"};let Care=()=>{var e,t;let{t:a}=(0,I.u)(),{data:{locale:n,userInfo:l}}=(0,s.useContext)(h.T),{onSkipQuestion:r,countValues:o,setCountValues:c}=(0,s.useContext)(G),[d,m]=(0,s.useState)(),[b,v]=(0,s.useState)([]),[E,y]=(0,s.useState)(!1),C=null==l?void 0:l.id;(0,s.useEffect)(()=>{C&&(0,i.a)(void 0,void 0,void 0,function*(){var e;y(!0);let t=yield(0,h.e)((0,h.f)(p.yy.USER.LIST_QUESTION_NEED_REPLY,{_locale:n}),"GET"),a=[],l=Object.create({});((null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.communities)||[]).filter(e=>((null==e?void 0:e.question)||[]).length>0).map(e=>{l[e.id]=e.question.map(g.b),delete e.question,a.push((0,g.a)(e))}),v(a),m(l),y(!1)})},[]);let handleSkipQuestion=({id:e,communityId:t})=>{if(e&&t&&d){let a=Object.assign(Object.assign({},d),{[t]:[...((null==d?void 0:d[t])||[]).filter(t=>t.id!==e)]}),n=0;Object.keys(a).map(e=>n+=a[e].length||0),m(a),c(Object.assign(Object.assign({},o),{total_question:n})),null==r||r(n)}};return s.createElement("div",{className:V.container},E?s.createElement(u.L,null):(null==o?void 0:o.total_question)>0?b.length>0&&s.createElement(f.U,{className:V.accordion,defaultValue:String((null===(t=b[null===(e=Object.keys(b))||void 0===e?void 0:e[0]])||void 0===t?void 0:t.id)||""),styles:e=>({control:{padding:"16px",border:`1px solid ${e.colors.neutral[1]}`,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",'&[aria-expanded="false"]':{borderBottom:0}},chevron:{width:"32px",height:"32px"},content:{padding:0,border:`1px solid ${e.colors.neutral[1]}`,borderTop:0,borderBottom:0},label:{padding:0},item:{marginBottom:"16px"}}),chevron:s.createElement("div",{className:V.chevron},s.createElement(D.Z,{color:N.r.colors.gray600,size:20}))},b.map(e=>{let t=d&&(null==d?void 0:d[e.id])||[];return t.length>0&&s.createElement(f.U.Item,{key:e.id,value:String(e.id)},s.createElement(f.U.Control,null,s.createElement("div",{className:V.header},s.createElement("div",{className:V.headingIcon},s.createElement("img",{src:e.thumbnail,loading:"lazy"})),s.createElement("div",{className:V.heading},e.name))),s.createElement(f.U.Panel,null,s.createElement("div",{className:V.body},t.map(e=>s.createElement(QuestionCard,{className:"question-card",key:e.id,post:e,onSkip:handleSkipQuestion})))))})):s.createElement(EmptyMessage,{message:a("profilePanel.emptyCareMess.content"),imgSrc:x.C.getAssetPath("questions.svg")}))},PostCard=({post:e,className:t=""})=>{var a;let{data:{userInfo:n,env:{togetherBasePath:l}}}=(0,s.useContext)(h.T),{t:r}=(0,I.u)(),o=(0,C.rZ)(),{authActionWrapper:i,authorProps:c}=(0,s.useContext)(G),d=`${window.location.origin}${l}/${null===(a=null==e?void 0:e.community)||void 0===a?void 0:a.slug}/${null==e?void 0:e.slug}/`;return s.createElement("div",{className:`GA-zc-O ${t}`},s.createElement("div",{className:"IB049vj"},s.createElement("a",{"data-event-category":"Together","data-event-action":"Click Post","data-event-label":d,className:"_8I--vEV",href:d,onClick:e=>{(null==n?void 0:n.id)||(e.preventDefault(),null==i||i(()=>window.location.href=d,{_location:d}))}}),s.createElement(S.d,{className:"card-author",avatarProps:{avatar:null==c?void 0:c.avatar,size:32}},s.createElement(S.C.MainText,{className:"A18McWD"},null==e?void 0:e.title),s.createElement(S.C.SubTextRow,null,s.createElement(S.C.SubText,null,null==e?void 0:e.createdTime))),s.createElement(PostContent,{className:"post-content-wrapper",description:null==e?void 0:e.description,mentions:null==e?void 0:e.mentions,maxChars:200,"data-testid":"Content of the Post",hideShowAllBtn:!0}),s.createElement(L.T,{size:"p3",color:o.fn.primaryColor()},r("post.seeMore"))))},Posts=()=>{let{t:e}=(0,I.u)(),{data:{locale:t}}=(0,s.useContext)(h.T),{authorId:a,authorProps:n,isAuthorLogin:l,onCloseFromPost:r}=(0,s.useContext)(G),[o,c]=(0,s.useState)(null),[d,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{a&&(0,i.a)(void 0,void 0,void 0,function*(){var e;m(!0);let n=yield(0,h.c)((0,h.f)(p.yy.USER.LIST_POST,{_locale:t,id:a,isAnonymous:0}),"GET"),l=((null===(e=null==n?void 0:n.data)||void 0===e?void 0:e.posts)||[]).map(g.b);c(l),m(!1)})},[a]),s.createElement("div",{className:"TSMHoEM"},d?s.createElement(u.L,null):null!==o&&(o.length>0?o.map(e=>s.createElement(PostCard,{className:"post-card",key:e.id,post:e})):s.createElement(EmptyMessage,{message:e("profilePanel.emptyPostMess.content",{name:(null==n?void 0:n.name)||(null==n?void 0:n.username)||""}),buttonTxt:l&&e("profilePanel.createPost"),onBtnClick:()=>{null==r||r()}})))};var U={container:"_4Vekw96",info:"DIJdGcB",body:"aQSt4-Q"};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 q={experiences:[],relatedPosts:[],educations:[],awards:[],contact:{},data:{}},ProfileDetail=e=>{var t,{authorProps:a,selectedTab:n,authActionWrapper:l,onSkipQuestion:o,onCloseFromPost:c,hideQuestionTab:b,hideAnswerTab:v,showSkipQuestionTag:E,rolesToShowQuestionsTab:f=["expert"],currentPageUrl:y}=e,C=(0,i._)(e,["authorProps","selectedTab","authActionWrapper","onSkipQuestion","onCloseFromPost","hideQuestionTab","hideAnswerTab","showSkipQuestionTag","rolesToShowQuestionsTab","currentPageUrl"]);let{data:{locale:x,userInfo:w,env:{isMarryBaby:k}}}=(0,s.useContext)(h.T),{t:N}=(0,I.u)(),P=null==a?void 0:a.role,D=null==w?void 0:w.role,B=String(null==a?void 0:a.userId),[L,T]=(0,s.useState)(),[A,H]=(0,s.useState)(!1),[O,F]=(0,s.useState)(),j=(null==w?void 0:w._togetherUserId)===(null==a?void 0:a.userId),z=[...-1!==f.indexOf(P)?[{value:r.About,text:N("profilePanel.tabs.highlight"),content:s.createElement(About,{id:B,info:O}),dataEventCategory:"Together",dataEventAction:"Doctor Profile Click",dataEventLabel:y}]:[],{value:r.Posts,text:N("profilePanel.tabs.posts"),content:s.createElement(Posts,null),hasCountResult:!0,keyOfCountApi:"post",keyOfResult:"total_post"},...b||-1===f.indexOf(D)||(null==w?void 0:w._togetherUserId)!==(null==a?void 0:a.userId)?[]:[{value:r.Care,text:`${N("profilePanel.tabs.care")}`,content:s.createElement(Care,null),hasCountResult:!0,keyOfCountApi:"question",keyOfResult:"total_question",dataEventCategory:"Together",dataEventAction:"Doctor Questions Click",dataEventLabel:y}],...v||-1===f.indexOf(P)?[]:[{value:r.Answer,text:`${N("profilePanel.tabs.expertAnswer")}`,content:s.createElement(Answering,{id:B}),hasCountResult:!0,keyOfCountApi:"reply",keyOfResult:"total_reply",dataEventCategory:"Together",dataEventAction:"Doctor Reply Tab Click",dataEventLabel:y}]],[R,M]=(0,s.useState)(null),[_,W]=(0,s.useState)(null),$={value:String(_),dataList:R,onTabChange:e=>W(Number(e))},V=null==z?void 0:z.filter(e=>null==e?void 0:e.hasCountResult);(0,s.useEffect)(()=>{(0,i.a)(void 0,void 0,void 0,function*(){var e,t,a,l,o,i,s,c,d,m;H(!0);let u=yield Promise.all([(0,h.c)((0,h.f)(p.yy.USER.DETAIL,{_locale:x,id:B}),"GET"),...V.map(e=>(0,h.c)((0,h.f)(p.yy.USER.COUNT_TABS,{_locale:x,id:B,[e.keyOfCountApi]:1}),"GET"))]),[b]=u,v={data:null==b?void 0:b.data,experiences:((null===(t=null===(e=null==b?void 0:b.data)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.experiences)||[]).map(formatExperience),relatedPosts:((null===(a=null==b?void 0:b.data)||void 0===a?void 0:a.related_post)||[]).map(e=>(0,g.f)(e.post)),educations:((null===(o=null===(l=null==b?void 0:b.data)||void 0===l?void 0:l.fields)||void 0===o?void 0:o.educations)||[]).map(formatEducation),awards:(null===(s=null===(i=null==b?void 0:b.data)||void 0===i?void 0:i.fields)||void 0===s?void 0:s.awards_accreditations)||[],contact:(null===(d=null===(c=null==b?void 0:b.data)||void 0===c?void 0:c.fields)||void 0===d?void 0:d.contact)||{}};(null==b?void 0:b.status)===1&&F(v);let E=(null==v?void 0:v.relatedPosts)||[],f=Object.keys(v.contact).map(e=>{var t;return(null===(t=null==v?void 0:v.contact)||void 0===t?void 0:t[e])!==""}),y=[...(null==v?void 0:v.experiences)||[],...(null==v?void 0:v.educations)||[],...(null==v?void 0:v.awards)||[]],C=E.length>0||f.length>0||y.length>0,w={},S=V.map((e,t)=>{var a,n,l;let o=(null===(l=null===(n=null===(a=u[t+1])||void 0===a?void 0:a.data)||void 0===n?void 0:n.counting)||void 0===l?void 0:l[e.keyOfResult])||0;return o>0?(w[e.keyOfResult]=o,e):-1!==[r.Care,r.Posts].indexOf(e.value)?e:void 0}).filter(Boolean).map(e=>e.value),k=z.map(e=>{let t=Object.assign(Object.assign({},e),{text:e.text+(e.keyOfResult?` (${(null==w?void 0:w[e.keyOfResult])||"0"})`:"")});return t.hasCountResult?-1!==S.indexOf(t.value)?t:void 0:t.value===r.About?C&&t:t}).filter(Boolean);M(k),W(n||(null===(m=null==k?void 0:k[0])||void 0===m?void 0:m.value)),T(w),H(!1)})},[]);let q=null==O?void 0:O.data;return s.createElement(G.Provider,{value:{isMarryBaby:k,siteType:k?"marryBaby":"helloSites",authorId:String((null==a?void 0:a.userId)||""),authActionWrapper:l,onSkipQuestion:o,info:O,authorProps:a,onCloseFromPost:c,countValues:L,setCountValues:T,isAuthorLogin:j,showSkipQuestionTag:E,currentPageUrl:y}},s.createElement("div",Object.assign({},C,{className:`${U.container} ${(null==C?void 0:C.className)||""}`,"data-is-marrybaby":k}),A?s.createElement(u.L,null):s.createElement(s.Fragment,null,s.createElement(S.C,Object.assign({},a,{className:"card-author",showDetailPopup:!1,subLine:(null==a?void 0:a.role)==="expert"?(null==q?void 0:q.specialty)&&(null==q?void 0:q.organisation)&&s.createElement(S.C.SubTextRow,null,(null==q?void 0:q.specialty)&&s.createElement(s.Fragment,null,s.createElement(S.C.SubText,null,null==q?void 0:q.specialty),s.createElement(S.C.SubDivider,null)),s.createElement(S.C.SubText,null,null==q?void 0:q.organisation)):(null==q?void 0:q.created_at)&&s.createElement(S.C.SubTextRow,null,s.createElement(S.C.SubText,null,N("profilePanel.joined")," ",d()(null==q?void 0:q.created_at).toNow(!0)))})),"expert"===P&&s.createElement("div",{className:U.info,dangerouslySetInnerHTML:{__html:null===(t=null==O?void 0:O.data)||void 0===t?void 0:t.description}}),null!==R&&null!==_&&(R.length>0?s.createElement("div",{className:U.body},s.createElement(m.T,Object.assign({},$))):s.createElement(EmptyMessage,{message:N("profilePanel.emptyPostMess.content",{text:(null==a?void 0:a.name)||(null==a?void 0:a.username)||""})})))))}},bBpb:function(e,t,a){a.d(t,{L:function(){return Loading}});var n=a("q1tI"),l=a("LL6q"),r=a("FUIV");let Loading=({className:e,theme:t,hideText:a})=>{let{t:o}=(0,r.u)();return n.createElement("div",{className:`tliWyii ${e}`},n.createElement(l.I.Spinner,{isMarryBaby:"marryBaby"===t}),!a&&o("loading"))}},Y2dA:function(e,t,a){a.d(t,{P:function(){return PWGForm}});var n=a("Kz+G"),l=a("q1tI"),r=a("8vDj"),o=a("iuhU"),i=a("cChf"),s=a("ZFu2"),c=a("hR5a"),d=a("FUIV"),m=a("xPje"),u=a("H1c6"),g=a("pMur"),p=a("w8hz"),h=a("+aod"),b=a("Esnh"),v=a("xrdX");let E=(0,l.createContext)({}),DefaultForm=e=>{var t=(0,n._)(e,[]);let{t:a,locale:i}=(0,d.u)(),{linkTool:s,form:c,submitProps:m}=(0,l.useContext)(E),{classes:f={}}=(0,l.useContext)(p.C),y=(0,r.rZ)(),C="mb"===y.other.template;return l.createElement(h.H,Object.assign({formLayout:"default"},t),l.createElement(h.H.FormRow,null,l.createElement(u.I.Number,Object.assign({label:l.createElement(g.T,{size:"p2",weight:"semiBold"},a("pregnancyWeightGain.weekInput")),min:b.I.pregnantWeek.min,max:b.I.pregnantWeek.max,placeholder:`${b.I.pregnantWeek.min} - ${b.I.pregnantWeek.max}`},c.getInputProps("pregnantWeek")))),l.createElement(h.H.FormRow,null,l.createElement(u.I.Number,Object.assign({label:l.createElement(g.T,{size:"p2",weight:"semiBold"},a("pregnancyWeightGain.weightBeforeInput")),min:b.I.weight.min,max:b.I.weight.max,placeholder:a("tools.inputPlaceholder",{content:"50"})},c.getInputProps("lastWeight")))),l.createElement(h.H.FormRow,null,l.createElement(u.I.Number,Object.assign({label:l.createElement(g.T,{size:"p2",weight:"semiBold"},a("pregnancyWeightGain.heightInput")),min:b.I.height.min,max:b.I.height.max,placeholder:a("tools.inputPlaceholder",{content:"160"})},c.getInputProps("height")))),l.createElement(h.H.FormRow,null,l.createElement(u.I.Number,Object.assign({label:l.createElement(g.T,{size:"p2",weight:"semiBold"},a("pregnancyWeightGain.weightInput")),min:b.I.weight.min,max:b.I.weight.max,placeholder:a("tools.inputPlaceholder",{content:"50"})},c.getInputProps("weight")))),l.createElement(h.H.FormRow,null,l.createElement(h.H.Switching,Object.assign({label:l.createElement(g.T,{size:"p2",weight:"semiBold"},a("pregnancyWeightGain.havingTwins"))},c.getInputProps("hasTwin")))),l.createElement(h.H.FormRow,{className:f.submitWrapper},l.createElement(h.H.Submit,Object.assign({type:"submit",dataEventCategory:"Health Tool",dataEventAction:"Embedded Pregnancy Weight Gain",dataEventLabel:`https://${v.v[C?"vi-VN_MB":i]}/${s}`,className:(0,o.default)("due-date-calculate-button",f.submitBtn)},m),a("dueDatePage.lastPeriod.calculate"))))},InlineForm=e=>{var t=(0,n._)(e,[]);let{t:a,locale:i}=(0,d.u)(),{classes:s={}}=(0,l.useContext)(p.C),{linkTool:c,form:m,submitProps:g}=(0,l.useContext)(E),f=(0,r.rZ)(),y="mb"===f.other.template;return l.createElement(h.H,Object.assign({formLayout:"inline"},t),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:a("pregnancyWeightGain.weekInput")},l.createElement(u.I.Number,Object.assign({min:b.I.pregnantWeek.min,max:b.I.pregnantWeek.max,placeholder:`${b.I.pregnantWeek.min} - ${b.I.pregnantWeek.max}`,rightSection:l.createElement(h.H.Unit,null,a("pwgForm.week"))},m.getInputProps("pregnantWeek"))))),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:a("pregnancyWeightGain.weightBeforeInput")},l.createElement(u.I.Number,Object.assign({},m.getInputProps("lastWeight"),{min:b.I.weight.min,max:b.I.weight.max,placeholder:a("tools.inputPlaceholder",{content:"50"}),rightSection:l.createElement(h.H.Unit,null,a("babyGrowth.kg"))})))),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:a("pregnancyWeightGain.heightInput")},l.createElement(u.I.Number,Object.assign({},m.getInputProps("height"),{min:b.I.height.min,max:b.I.height.max,placeholder:a("tools.inputPlaceholder",{content:"160"}),rightSection:l.createElement(h.H.Unit,null,a("babyGrowth.cm"))})))),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:a("pregnancyWeightGain.weightInput")},l.createElement(u.I.Number,Object.assign({},m.getInputProps("weight"),{min:b.I.weight.min,max:b.I.weight.max,placeholder:a("tools.inputPlaceholder",{content:"50"}),rightSection:l.createElement(h.H.Unit,null,a("babyGrowth.kg"))})))),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderInlineControl,{label:a("pregnancyWeightGain.havingTwins"),width:"none"},l.createElement(h.H.Switching,Object.assign({},m.getInputProps("hasTwin"))))),l.createElement(h.H.FormRow,{className:s.submitWrapper},l.createElement(h.H.Submit,Object.assign({type:"submit",dataEventCategory:"Health Tool",dataEventAction:"Embedded Pregnancy Weight Gain",dataEventLabel:`https://${v.v[y?"vi-VN_MB":i]}/${c}`,className:(0,o.default)("due-date-calculate-button",s.submitBtn)},g),a("dueDatePage.lastPeriod.calculate"))))},MbLayout=e=>{var t=(0,n._)(e,[]);let{t:a,locale:o}=(0,d.u)(),{linkTool:i,form:s,submitProps:c}=(0,l.useContext)(E),m=(0,r.rZ)(),g="mb"===m.other.template;return l.createElement(h.H,Object.assign({formLayout:"inline"},t),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderBoxControl,{label:a("pregnancyWeightGain.weekInput"),rightSection:a("pregnancy.week")},l.createElement(u.I.Number,Object.assign({min:b.I.pregnantWeek.min,max:b.I.pregnantWeek.max,placeholder:`${b.I.pregnantWeek.min} - ${b.I.pregnantWeek.max}`},s.getInputProps("pregnantWeek")))),s.errors.pregnantWeek&&l.createElement(h.H.Error,null,s.errors.pregnantWeek)),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderBoxControl,{label:a("pregnancyWeightGain.weightBeforeInput"),rightSection:"kg"},l.createElement(u.I.Number,Object.assign({min:b.I.weight.min,max:b.I.weight.max},s.getInputProps("lastWeight"),{placeholder:a("tools.inputPlaceholder",{content:"50"})}))),s.errors.lastWeight&&l.createElement(h.H.Error,null,s.errors.lastWeight)),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderBoxControl,{label:a("pregnancyWeightGain.heightInput"),rightSection:"cm"},l.createElement(u.I.Number,Object.assign({min:b.I.height.min,max:b.I.height.max},s.getInputProps("height"),{placeholder:a("tools.inputPlaceholder",{content:"160"})}))),s.errors.height&&l.createElement(h.H.Error,null,s.errors.height)),l.createElement(h.H.FormRow,null,l.createElement(h.H.BorderBoxControl,{label:a("pregnancyWeightGain.weightInput"),rightSection:"kg"},l.createElement(u.I.Number,Object.assign({min:b.I.weight.min,max:b.I.weight.max},s.getInputProps("weight"),{placeholder:a("tools.inputPlaceholder",{content:"50"})}))),s.errors.weight&&l.createElement(h.H.Error,null,s.errors.weight)),l.createElement(h.H.Switching,Object.assign({label:a("pregnancyWeightGain.havingTwins")},s.getInputProps("hasTwin"))),l.createElement(h.H.Submit,Object.assign({type:"submit",dataEventCategory:"Health Tool",dataEventAction:"Embedded Pregnancy Weight Gain",dataEventLabel:`https://${v.v[g?"vi-VN_MB":o]}/${i}`,className:"due-date-calculate-button"},c),a("dueDatePage.lastPeriod.calculate")))},PWGForm=e=>{var{formLayout:t="default",submitProps:a,onSubmit:o}=e,u=(0,n._)(e,["formLayout","submitProps","onSubmit"]);let{t:g,locale:p}=(0,d.u)(),h=(0,r.rZ)(),b="mb"===h.other.template,v=(0,i.c)({validate:{pregnantWeek:(0,s.U)(g("validation.error.requiredField")),height:(0,s.U)(g("validation.error.requiredField")),weight:(e,t)=>e?Number(e)>=Number(t.lastWeight)?null:g("pregnancyWeightGain.weightInput.error"):g("validation.error.requiredField"),lastWeight:(e,t)=>e?Number(e)f(m.H.PWG),[f]),C=Object.assign({onSubmit:v.onSubmit(o)},u);return l.createElement(E.Provider,{value:{linkTool:y,form:v,submitProps:a}},"inline"===t?l.createElement(InlineForm,Object.assign({},C)):b?l.createElement(MbLayout,Object.assign({formLayout:t},C)):l.createElement(DefaultForm,Object.assign({},C)))}}}]);