"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8473],{91344:function(e,t,a){a.d(t,{$:function(){return NavHeader},A:function(){return Alert},B:function(){return Badge},C:function(){return Checkbox},D:function(){return DoctorInfo},E:function(){return THRCardEmbed},F:function(){return FileDropdown},G:function(){return Grid},H:function(){return BMRCardEmbed},I:function(){return IconText},J:function(){return PWGCardEmbed},K:function(){return DateRangePicker},L:function(){return Breadcrumbs},M:function(){return MobileBottomNavigation},N:function(){return ShareContainer},O:function(){return OvulationCardEmbed},P:function(){return Pagination},Q:function(){return ShareDrawer},R:function(){return Radio},S:function(){return ScrollList},T:function(){return Tag},U:function(){return nn},V:function(){return FixedBottomAdBlock},W:function(){return SurveyOrPremiumBanner},X:function(){return no},Y:function(){return ns},Z:function(){return SideBannerModal},_:function(){return UserProfileNavigation},a:function(){return Avatar},a0:function(){return UserStats},b:function(){return BorderHeading},c:function(){return Toggle},d:function(){return RateStars},e:function(){return GenderOptionControl},f:function(){return ArticleCard$1},g:function(){return ArticleCard},h:function(){return CategoryCard},i:function(){return CheckboxGroup},j:function(){return ProgressBar},k:function(){return th},l:function(){return tw},m:function(){return StatisticCard},n:function(){return tz},o:function(){return Tabs},p:function(){return SurveyQuestionCard},q:function(){return SurveyThankyouCard},r:function(){return FloatButtonGroup},s:function(){return CookieAcceptConfirm},t:function(){return MobileBottomNavigationIcon},u:function(){return SeoHead},v:function(){return ToolsBannerCard},w:function(){return DueDateCardEmbed},x:function(){return BMICardEmbed},y:function(){return BabyGrowthCardEmbed},z:function(){return BabyPoopEmbed}});var n,l,r,i,o,s,c,d,m,u,p,g,h,v,b,f=a(67294),y=a(54576),E=a(74024),x=a(7259),w=a(74706),C=a(13023),k=a(57264),B=a(22484),N=a(68622),S=a(10981),T=a(92935),D=a(15184),M=a(64523),I=a(58654),$=a(69876),z=a(96768),P=a(21017),A=a(71232),L=a(56817),O=a(97564),_=a(58404),j=a(64761),Z=a(72445),F=a(64577),R=a(88854),H=a(64002),W=a(17789),G=a(31194),V=a(26556),U=a(36380),Y=a.n(U),Q=a(37658),q=a(36965);a(47856);var K=a(29355),X=a(38575),J=a(10166),ee=a(23493),et=a.n(ee),ea=a(85453),en=a(50722),el=a(71438),er=a(70917),ei=a(51134),eo=a(86623),es=a(39238),ec=a(20760),ed=a(77349),em=a(313),eu=a(43703),ep=a(11640),eg=a(54559),eh=a(30890),ev=a(51085),eb=a(81743),ef=a(24257),ey=a(42699),eE=a(33913),ex=a(27484),ew=a.n(ex),eC=a(42394),ek=a(40650),eB=a(48104),eN=a(17495),eS=a(31770),eT=a(10456),eD=a(96749),eM=a(87536),eI=a(19078),e$=a(47533),ez=a(82824),eP=a(68206),eA=a(23318),eL=a(74360),eO=a(67707),e_=a(95826),ej=a(72728),eZ=a(34215),eF=a(85673),eR=a(96987),eH=a(5271),eW=a(90545),eG=a(77248),eV=a(75762),eU=a(38347),eY=a(31932),eQ=a(32951),eq=a(80912),eK=a(11224),eX=a(85564),eJ=a.n(eX),e0=a(45578),e1=a.n(e0),e2=a(75368),e3=a(90951),e5=a(83454);let Alert=({style:e,onClose:t,text:a,type:n,contentIcon:l,closeIcon:r,className:i,description:o})=>f.createElement("div",{className:`CHw-fZZ ${i||""}`,style:e,"data-alert-type":n},f.createElement("div",{className:"_03U6VRS"},f.createElement("div",{className:"icon-title"},l,f.createElement(y.T,{weight:"bold",size:"label1"},a)),f.createElement(y.T,{weight:"regular",size:"p3"},o)),f.createElement("div",{className:"EO828Vv",onClick:t},r)),e6={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},Avatar=({type:e="square",size:t,avatarImg:a,avatarUrl:n,firstLetter:l,backgroundColor:r,onClick:i,style:o,className:s,width:c,height:d,alt:m})=>{let u=t?e6[t]:void 0,[p,g]=(0,f.useState)(!1);(0,f.useEffect)(()=>{if(n){let e=document.createElement("img");e.setAttribute("src",n),e.addEventListener("error",()=>{g(!0)})}},[n,g]);let h=(!n&&!a||p)&&l;return f.createElement(E.b,{style:Object.assign(Object.assign({},o),{"--size":u?u+"px":void 0,"--width-prop":c?c+"px":void 0,"--height-prop":d?d+"px":void 0,"--background-color":r}),"data-has-max":!!(c&&d),"data-avatar-type":e,onClick:i,className:s,avatarUrl:n,"data-custom-size":!!t},a,n&&!p&&f.createElement(w.I,{src:n,alt:m||"avatar"}),h&&l)},Badge=({amount:e,type:t,size:a="medium",color:n="primary",icon:l,className:r})=>f.createElement(E.c,{"data-notification-type":t,"data-notification-size":a,"data-notification-color":n,"data-has-icon":!!l||void 0,notificationType:t,notificationSize:a,notificationColor:n,hasIcon:!!l,className:r},f.createElement("div",null,e&&f.createElement("span",null,e)," ",l&&f.createElement("div",null,l))),BorderHeading=({style:e,children:t,className:a,size:n="lg",type:l="bold",upperCase:r,as:i="h4",color:o})=>f.createElement(E.d,{style:Object.assign({color:o},e),className:a,"data-size":n,"data-type":l,"data-uppercase":r,as:i},t),ShareIconPathStyle=()=>f.createElement("style",null,".file-dropdown-path{fill:none;stroke:#595959;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}"),DefaultFileIcon=()=>f.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 12.17 14.83"},f.createElement("defs",null,f.createElement("clipPath",{id:"prefix__clip-path",transform:"translate(-1.92 -1.54)"},f.createElement("path",{fill:"none",d:"M0 .96h16v16H0z"}))),f.createElement("title",null,"File"),f.createElement("g",{clipPath:"url(#prefix__clip-path)"},f.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29H4a1.33 1.33 0 00-1.33 1.33v10.67A1.33 1.33 0 004 15.62h8a1.33 1.33 0 001.33-1.33V7z",transform:"translate(-1.92 -1.54)"}),f.createElement("path",{className:"file-dropdown-path",d:"M8.67 2.29V7h4.66",transform:"translate(-1.92 -1.54)"}))),DownloadIcon=()=>f.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},f.createElement("title",null,"download"),f.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M4.67 7.62L8 11l3.33-3.34M8 11V3",transform:"translate(-1.25 -2.21)"})),UploadIcon=()=>f.createElement("svg",{id:"prefix__Layer_1","data-name":"Layer 1",viewBox:"0 0 13.5 13.5"},f.createElement("title",null,"upload"),f.createElement("path",{className:"file-dropdown-path",d:"M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M11.33 6.29L8 3 4.67 6.29M8 3v8",transform:"translate(-1.25 -2.21)"})),FileDropdown=({className:e,value:t,options:a,onUploadSelected:n,id:l,placeholderIcon:r,placeholder:i,style:o})=>{let[s,c]=(0,f.useState)(!1),showDropdown=()=>c(!s),d=(0,f.useRef)(a.map(e=>"upload"===e.type&&f.createElement("input",{id:"uploader-dropdown-input-"+l+"-"+e.value,key:"uploader-dropdown-input-"+l+"-"+e.value,accept:e.fileAcceptedType,multiple:e.multiple,type:"file",style:{display:"none"},onChange:e=>{console.log("change"),n(e.target.files)}}))),onUpload=e=>{var t;null===(t=document.querySelector(e))||void 0===t||t.click()},onDownload=e=>{e&&window.open(e,"_blank")};return f.createElement(E.e,{className:e,"data-dropdown-open":!!s,id:l,"data-has-icons":!0,style:o,onBlur:()=>c(!1),tabIndex:0},f.createElement(ShareIconPathStyle,null),f.createElement(E.f,{onClick:showDropdown},r||f.createElement(DefaultFileIcon,null)," ",f.createElement("span",null,t&&t.value?t.label:i)),s&&f.createElement(E.g,{onClick:showDropdown,"data-has-icons":!0},a.map(e=>f.createElement(E.h,{key:`${l}-${e.value}`,"data-selected":t&&t.value===e.value||void 0,onClick:()=>"upload"===e.type?onUpload("#uploader-dropdown-input-"+l+"-"+e.value):onDownload(e.url)},f.createElement(E.i,null,e.icon||"download"===e.type?f.createElement(DownloadIcon,null):f.createElement(UploadIcon,null)),e.label))),f.createElement(f.Fragment,null,d.current))},Grid=({className:e,columns:t,columnsDesktop:a,gridTemplateColumns:n,gridTemplateColumnsDesktop:l,gap:r,children:i,justifyChildren:o,style:s,alignItems:c})=>f.createElement(E.j,{className:e,style:Object.assign({"--columns-count":t,"--columns-count-desktop":a,"--grid-template-columns":n,"--grid-template-columns-desktop":l,"--justify-children":o,"--grid-gap":r,"--align-items":c},s)},i),RenderPagiWithDots=({pagesAmount:e,activePage:t,handlePageChange:a,handleClick:n,href:l,queryPageName:r="page"})=>{let i=[...Array(e)].map((e,t)=>t+1),[o,s]=(0,f.useState)(t<=4?i.slice(0,5):t>=i.length-3?i.slice(i.length-5,i.length):i.slice(t-2,t+1));return(0,f.useEffect)(()=>{t<=4?s(i.slice(0,5)):t>=i.length-3?s(i.slice(i.length-5,i.length)):s(i.slice(t-2,t+1))},[t]),f.createElement(f.Fragment,null,t>4&&f.createElement(f.Fragment,null,f.createElement(E.m,{onClick:()=>a(1)},l?f.createElement("a",{href:l,onClick:n},1):1),f.createElement(E.m,null,"...")),o.map(e=>f.createElement(E.m,{key:`pagination+${e}`,"data-page-active":e===t||void 0,onClick:()=>a(e)},l?f.createElement("a",{href:(0,x.f)(l,e,r),onClick:n},e):e)),ta(i.length)},l?f.createElement("a",{href:(0,x.f)(l,i.length,r),onClick:n},i.length):i.length)))},Pagination=({className:e,pagesAmount:t,currentPage:a,onChange:n,onClick:l,style:r,href:i,queryPageName:o="page"})=>{let s=[...Array(t)].map((e,t)=>t+1),[c,d]=(0,f.useState)(a),m=(0,f.useMemo)(()=>i&&i.endsWith("&page=")?i.replace("&page=",""):i,[i]),u=t-1,handlePageChange=e=>{e<=t&&e>0&&(d(e),n(e))},handleClick=e=>{l&&l(e)};return(0,f.useEffect)(()=>{d(a)},[a]),f.createElement(E.k,{className:e,style:r},f.createElement(E.l,{className:"prev-page",onClick:()=>handlePageChange(c-1),"data-last-page":1===c||void 0},m?f.createElement("a",{href:(0,x.f)(m,c,o),onClick:handleClick},f.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},f.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):f.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},f.createElement("path",{d:"M5.5 9L1.5 5L5.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))),s.length>8?f.createElement(RenderPagiWithDots,{pagesAmount:t,activePage:c,handlePageChange:handlePageChange,handleClick:handleClick,href:m,queryPageName:o}):s.map(e=>f.createElement(E.m,{key:`pagination+${e}`,"data-page-active":e===c||void 0,onClick:()=>handlePageChange(e)},m?f.createElement("a",{href:(0,x.f)(m,e,o),onClick:handleClick},e):e)),f.createElement(E.l,{className:"next-page",onClick:()=>handlePageChange(c+1),"data-last-page":c===u+1||void 0},m?f.createElement("a",{href:(0,x.f)(m,c,o),onClick:handleClick},f.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},f.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):f.createElement("svg",{width:"7",height:"10",viewBox:"0 0 7 10",fill:"none"},f.createElement("path",{d:"M1.5 9L5.5 5L1.5 1",stroke:"#2D87F3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))))},Radio=({size:e="small",label:t,name:a,checked:n,value:l,className:r,isDisabled:i=!1,onChange:o,dataEventCategory:s,dataEventAction:c,dataEventLabel:d})=>{let m=!!c&&!!s&&!!d,u=m?{"data-event-category":s,"data-event-action":c,"data-event-label":d}:{};return f.createElement(w.R,Object.assign({size:"small"===e?"md":"lg",label:t,name:a,checked:n,value:l,className:r,disabled:i,onChange:e=>null==o?void 0:o(e.target.value)},u))},Tag=({type:e,children:t,style:a,isInline:n,isSquared:l=!1,className:r,isLight:i,hasMorePadding:o,isLink:s,isSelected:c,textProps:d={size:"sm"}})=>{let m=d.color?{"--text-props-color":d.color}:{};return f.createElement(E.n,{"data-is-squared":l||void 0,"data-tag-type":e,"data-is-light":i||void 0,"data-has-more-padding":o||void 0,"data-is-inline":n||void 0,style:Object.assign(Object.assign({},a),m),className:r,"data-is-selected":c||void 0,"data-is-link":s||void 0,tagType:e,isInline:n,tagHasMorePadding:o,tagIsLight:i,tagIsSquared:l,tagIsALink:s},f.createElement(C.T,Object.assign({},d),t))},Toggle=({className:e,id:t,onChange:a,checked:n,style:l,label:r})=>f.createElement(E.o,{className:e,style:l},f.createElement("input",{type:"checkbox",id:t,onChange:a,checked:n}),f.createElement("label",{htmlFor:t},f.createElement(E.p,null),r&&f.createElement(E.q,null,r))),Checkbox=({label:e,name:t,checked:a,className:n,isDisabled:l,onChange:r,value:i,isRectangle:o,inputDataTestId:s,siteType:c})=>f.createElement(E.r,{className:n,"data-disabled":l||void 0,"data-is-rectangle":o||void 0,"data-label-text":e,"data-theme":c},f.createElement("input",{type:"checkbox",checked:a,name:t,onChange:()=>r(i,!a),disabled:l,value:i,id:`${t}-${i}`,"data-label-text":e,"data-testid":s}),!o&&f.createElement("label",{htmlFor:`${t}-${i}`},e)),StarHalfIcon=e=>f.createElement("svg",Object.assign({},e,{viewBox:"0 0 24 24",fill:"none"}),f.createElement("path",{d:"m139.287 144.772 5.17 3.12c.38.23.85-.11.75-.54l-1.37-5.88 4.56-3.95c.33-.29.16-.84-.29-.88l-6.01-.51-2.35-5.54a.498.498 0 0 0-.92 0l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#E4E8EC"}),f.createElement("path",{d:"M139.289 144.771s.013-14.488 0-14.488a.49.49 0 0 0-.46.308l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z",fill:"#FFC326"})),StarIcon=e=>{var{isFull:t}=e,a=(0,k._)(e,["isFull"]);return f.createElement("svg",Object.assign({},a,{viewBox:"0 0 32 32",fill:"none"}),f.createElement("path",{d:"m16 23.027 6.893 4.16c.507.306 1.134-.147 1-.72l-1.826-7.84 6.08-5.267a.67.67 0 0 0-.387-1.173l-8.013-.68-3.134-7.387a.664.664 0 0 0-1.226 0l-3.133 7.387-8.014.68a.668.668 0 0 0-.373 1.173l6.08 5.267-1.827 7.84c-.133.573.493 1.026 1 .72z",fill:t?"#FFC326":"#D2D6DC"}))},RateStars=({gap:e=2,size:t=24,star:a,totalStars:n=5,onSelect:l,hideEmptyStars:r,style:i,className:o})=>{let s=Math.floor(a),c=a-s>=.5?1:0,[d,m]=(0,f.useState)(null),u=d||s,p=d?0:c;return f.createElement(E.s,{"data-selectable":!!l,style:Object.assign({"--gap":e,"--star-size":t},i),className:o},Array.from({length:r?s+c:n}).map((e,t)=>{let onMouseOver=()=>!!l&&m(t+1),onMouseLeave=()=>!!l&&m(null);return t+1<=u?f.createElement(StarIcon,{key:t,onClick:()=>null==l?void 0:l(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave,isFull:!0}):t+1===u+p?f.createElement(StarHalfIcon,{key:t,onClick:()=>null==l?void 0:l(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave}):f.createElement(StarIcon,{key:t,onClick:()=>null==l?void 0:l(t+1),onMouseOver:onMouseOver,onMouseLeave:onMouseLeave})}))},GenderOptionControl=e=>{var{label:t,availableValue:a,styles:n,isBaby:l,genderValue:r={male:"male",female:"female"}}=e,i=(0,k._)(e,["label","availableValue","styles","isBaby","genderValue"]);let{t:o}=(0,es.u)(),{classes:s,cx:c}=(0,E.u)(void 0,{name:"GenderOptionControl",styles:n}),[d,m]=(0,f.useState)(),u=(0,f.useRef)(null),p=(0,f.useMemo)(()=>[{value:r.male,label:l?o("gender.boy"):o("gender.male"),icon:S.C.getAssetPath(l?"health-tools/boy-icon.svg":"health-tools/male-icon.svg")},{value:r.female,label:l?o("gender.girl"):o("gender.female"),icon:S.C.getAssetPath(l?"health-tools/girl-icon.svg":"health-tools/female-icon.svg")}],[]);return(0,f.useEffect)(()=>{m(a)},[a]),f.createElement(M.x,{ref:u,className:s.root},f.createElement(I.Y.Group,Object.assign({className:"radio-group",label:f.createElement(y.T,{as:"label",size:"s4",weight:"semiBold"},t||(l?o("tools.selectBabyGender"):o("tools.selectGender"))),size:"lg"},i,{classNames:{error:s.groupErr}}),f.createElement($.k,{className:c(s.wrapper)},p.map(e=>f.createElement(I.Y,Object.assign({className:"gender-item",classNames:{root:s.itemRoot,labelWrapper:s.itemLabelWrapper,label:s.itemLabel,inner:s.itemInner},key:e.value,value:e.value},d&&e.value!==d&&{disabled:!0},{label:f.createElement($.k,{gap:(0,z.h)(8),align:"center",justify:"center",sx:{zIndex:0}},f.createElement("img",{src:e.icon,className:"gender-image",alt:"female",loading:"lazy"}),f.createElement(y.T,{size:"p3"},e.label))}))))))};var e4={expertName:"PiqKaXk",anchor:"HgbW6-m",card:"_6lkfLYy",author:"j7c-onH"};let CardAuthor=({avatarImg:e,authorName:t,authorLink:a,uploadTime:n,size:l})=>f.createElement("div",{className:e4.author},f.createElement("div",{className:"author"},f.createElement("div",{className:"avatar","data-size":l},e),f.createElement("div",{className:"poster","data-is-disabled-url":!a},f.createElement(y.T,{size:"lg"===l?"p3":"p4"},f.createElement("a",{href:a},f.createElement("span",{className:"name"},t),"•"," "),f.createElement("span",null,n))))),CardExpert=({isMobile:e,avatarImg:t,name:a,link:n,size:l="lg",specialty:r})=>f.createElement("div",{className:e4.author},f.createElement("div",{className:"author"},f.createElement("div",{className:"expert-avatar","data-size":l},t),f.createElement("div",{className:"expert","data-is-disabled-url":!n},e?f.createElement("a",{href:n},"lg"===l?f.createElement(f.Fragment,null,f.createElement(T.H,{tag:"h6",className:"expert__name",color:D.t.colors.gray600},a),f.createElement(y.T,{color:D.t.colors.gray500,size:"p3",className:"specialty"},r)):f.createElement(f.Fragment,null,f.createElement(T.H,{tag:"h6",className:"expert__name",color:D.t.colors.gray600},a))):f.createElement("a",{href:n},"lg"===l?f.createElement(f.Fragment,null,f.createElement(T.H,{tag:"h6",className:"expert__name",color:D.t.colors.gray600},a),f.createElement(y.T,{color:D.t.colors.gray500,size:"p3",className:"specialty"},r)):f.createElement(f.Fragment,null,f.createElement("h6",{color:D.t.colors.gray600,className:`${e4.expertName} expert__name`},a),f.createElement(y.T,{color:D.t.colors.gray500,size:"p4",className:"specialty"},r)))))),e7=(0,f.memo)(()=>f.createElement("div",{className:"shoppable"},f.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},f.createElement("rect",{width:"24",height:"24",rx:"12",fill:"#1B3250"}),f.createElement("path",{d:"M16.6667 8.00033H15.3333C15.3333 6.16033 13.84 4.66699 12 4.66699C10.16 4.66699 8.66667 6.16033 8.66667 8.00033H7.33333C6.6 8.00033 6 8.60033 6 9.33366V17.3337C6 18.067 6.6 18.667 7.33333 18.667H16.6667C17.4 18.667 18 18.067 18 17.3337V9.33366C18 8.60033 17.4 8.00033 16.6667 8.00033ZM12 6.00033C13.1067 6.00033 14 6.89366 14 8.00033H10C10 6.89366 10.8933 6.00033 12 6.00033ZM12 12.667C10.4467 12.667 9.14 11.607 8.77333 10.167C8.66 9.74699 8.98667 9.33366 9.42 9.33366C9.73333 9.33366 9.98667 9.56033 10.0733 9.86699C10.3067 10.7137 11.08 11.3337 12 11.3337C12.92 11.3337 13.6933 10.7137 13.9267 9.86699C14.0133 9.56033 14.2667 9.33366 14.58 9.33366C15.0133 9.33366 15.3333 9.74699 15.2267 10.167C14.86 11.607 13.5533 12.667 12 12.667Z",fill:"white"})))),ArticleCard$1=({articleLink:e,authorLink:t,authorName:a,avatarImg:n,banner:l,categoryLink:r,categoryName:i,className:o,dataEventActionForBanner:s,dataEventActionForBookmark:c,dataEventActionForCategory:d,dataEventActionForTitle:m,dataEventCategoryForBanner:u,dataEventCategoryForBookmark:p,dataEventCategoryForCategory:g,dataEventCategoryForTitle:h,dataEventLabelForBanner:v,dataEventLabelForBookmark:b,dataEventLabelForCategory:E,dataEventLabelForTitle:x,direction:w="horizontal",hasAffiliate:C,isBookmark:k=!1,isBookmarkDisplayed:N=!0,isMobile:D=!0,onBookmark:M,onClickCategoryName:I,section:$="normal",size:z="md",specialty:P,style:A,styleBanner:L,styleLabel:O,styleTitle:_,text:j,title:Z,type:F="author",uploadTime:R,articleLinkTarget:H,isPremium:W})=>{let handleClick=e=>{e.stopPropagation(),null==M||M()},G="lg"===z&&"expert"===F?"h4":"lg"===z&&"home"===$?D?"h4":"h3":"lg"===z?"h4":"h5",V=D||"home"!==$||"lg"!==z||"author"!==F?"c2":"c1";return f.createElement("article",{className:`${e4.card} ${o||""}`,"data-size":z,style:A,"data-direction":w,"data-is-expert":"expert"===F||void 0},f.createElement("div",{className:"banner",style:L},f.createElement("a",{className:e4.anchor,"data-event-category":u,"data-event-action":s,"data-event-label":v,href:e||"#",target:H},l),W&&f.createElement("img",{loading:"lazy",className:"premium",src:S.C.getAssetPath("premium-crown.svg")}),C&&f.createElement(e7,null)),f.createElement("div",{className:"content"},f.createElement("div",{className:"inner-content"},f.createElement(y.T,{style:O,className:"label",size:V,weight:"caption"},f.createElement("a",{className:e4.anchor,"data-event-category":g,"data-event-action":d,"data-event-label":E,href:r||"#",onClick:I},i),N&&f.createElement("a",{className:"bookmark",onClick:handleClick},k?f.createElement(B.Z,{size:18,isActive:!0,"data-event-category":p,"data-event-action":c,"data-event-label":b,activeColor:"#2ED69E"}):f.createElement(B.Z,{size:18,"data-event-category":p,"data-event-action":c,"data-event-label":b}))),f.createElement(T.H,{tag:G,style:_,className:"title",as:"lg"===z?"h2":"h3"},f.createElement("a",{className:e4.anchor,"data-event-category":h,"data-event-action":m,"data-event-label":x,href:e||"#",target:H},Z)),j&&f.createElement("a",{href:e||"#",target:H},f.createElement(y.T,{size:"lg"===z?"p3":"p4",className:"text"},j))),f.createElement("div",{className:"footer"},"author"===F?f.createElement(CardAuthor,{size:z,avatarImg:n,authorName:a,authorLink:t,uploadTime:R,handleClick:handleClick,isBookmarked:k,dataEventCategoryForBookmark:p,dataEventActionForBookmark:c,dataEventLabelForBookmark:b}):f.createElement(CardExpert,{size:z,isMobile:D,avatarImg:n,specialty:P,name:a,link:t,handleClick:handleClick,isBookmarked:k,dataEventCategoryForBookmark:p,dataEventActionForBookmark:c,dataEventLabelForBookmark:b}))))},_Horizontal=e=>{var t,a,n,{article:l,author:r,authorAvatar:i,badge:o="",hideDescription:s=!1,isBookmarked:c=!1,onBookmark:d,time:m,tracking:u}=e,p=(0,k._)(e,["article","author","authorAvatar","badge","hideDescription","isBookmarked","onBookmark","time","tracking"]);let{isMobile:g}=(0,w.u)();return console.log({article:l}),f.createElement(P.Z,Object.assign({padding:0,radius:0,sx:{display:"flex",flexDirection:"row",gap:24}},p),f.createElement(P.Z.Section,{w:"100%",h:"100%",miw:264,m:0,className:"pointer"},f.createElement("img",{src:(g?l.featureImageMobile:l.featureImage)||l.featureImage,alt:l.postName,style:{width:"100%"},loading:"lazy"})),f.createElement(P.Z.Section,null,f.createElement(A.Z,{position:"apart",mt:16,mb:4},f.createElement(w.A,{href:(null===(t=null==l?void 0:l.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},f.createElement(y.T,{size:"p4",color:"blue.6"},null===(a=null==l?void 0:l.primaryCategory)||void 0===a?void 0:a.displayName)),f.createElement(M.x,{sx:{cursor:"pointer"},role:"button",onClick:d},c?f.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==u?void 0:u.bookmark),f.createElement("path",{d:"M6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7Z",fill:"#595959"})):f.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==u?void 0:u.bookmark),f.createElement("path",{d:"M7 17.95L12 15.8L17 17.95V5.3C17 5.23333 16.9667 5.16667 16.9 5.1C16.8333 5.03333 16.7667 5 16.7 5H7.3C7.23333 5 7.16667 5.03333 7.1 5.1C7.03333 5.16667 7 5.23333 7 5.3V17.95ZM6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7ZM7 5H17H12H7Z",fill:"#595959"})))),f.createElement(y.T,{size:s?"s2":"s1",mb:8,weight:"semiBold",className:"pointer"},l.postTitle||l.postName||""),!s&&f.createElement(y.T,{size:"p2",mb:16,lineClamp:3,className:"pointer"},Y()(l.excerpt||l.description||(null===(n=l.postContent)||void 0===n?void 0:n.split("\r\n")[0])||"")),f.createElement($.k,{gap:12,align:"center"},f.createElement(w.a,{size:32,src:i,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:f.createElement("img",{loading:"lazy",src:o,alt:""})}},"A"),f.createElement(y.T,{size:"n1",c:"gray.6"},r," • ",m))))};var e8=(0,L.k)((e,{})=>({root:{},image:{},title:{},category:{},description:{},author:{}}));let e9={DEFAULT:648/440,NO_DESCRIPTION:1.5},_Vertical=e=>{var t,a,n,{article:l,author:r,authorAvatar:i,badge:o="",bannerImageWrapProps:s,hideDescription:c=!1,isBookmarked:d=!1,onBookmark:m,time:u,tracking:p,classNames:g,styles:h,unstyled:v,className:b}=e,E=(0,k._)(e,["article","author","authorAvatar","badge","bannerImageWrapProps","hideDescription","isBookmarked","onBookmark","time","tracking","classNames","styles","unstyled","className"]);let{isMobile:x}=(0,w.u)(),{classes:C,cx:B}=e8({},{name:"ArticleCard",classNames:g,styles:h,unstyled:v}),N=(0,f.useMemo)(()=>c?e9.NO_DESCRIPTION:e9.DEFAULT,[c]);return f.createElement(P.Z,Object.assign({className:B(C.root,b),padding:"lg",radius:0},E),f.createElement(P.Z.Section,{className:B(C.image,"pointer")},f.createElement(w.b,Object.assign({ratio:N},s),f.createElement("img",{src:(x?l.featureImageMobile:l.featureImage)||l.featureImage,alt:l.postName,style:{objectFit:"cover"}}))),f.createElement(P.Z.Section,null,f.createElement(A.Z,{position:"apart",mt:16,mb:4},f.createElement(w.A,{className:C.category,href:(null===(t=null==l?void 0:l.primaryCategory)||void 0===t?void 0:t.permalink)||"#"},f.createElement(y.T,{size:"p4",color:"blue.6"},null===(a=null==l?void 0:l.primaryCategory)||void 0===a?void 0:a.displayName)),f.createElement(M.x,{sx:{cursor:"pointer"},role:"button",onClick:m},d?f.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==p?void 0:p.bookmark),f.createElement("path",{d:"M6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7Z",fill:"#595959"})):f.createElement("svg",Object.assign({width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},null==p?void 0:p.bookmark),f.createElement("path",{d:"M7 17.95L12 15.8L17 17.95V5.3C17 5.23333 16.9667 5.16667 16.9 5.1C16.8333 5.03333 16.7667 5 16.7 5H7.3C7.23333 5 7.16667 5.03333 7.1 5.1C7.03333 5.16667 7 5.23333 7 5.3V17.95ZM6.775 19.7C6.475 19.8333 6.18733 19.8123 5.912 19.637C5.63733 19.4623 5.5 19.2083 5.5 18.875V5.3C5.5 4.8 5.675 4.375 6.025 4.025C6.375 3.675 6.8 3.5 7.3 3.5H16.7C17.2 3.5 17.625 3.675 17.975 4.025C18.325 4.375 18.5 4.8 18.5 5.3V18.875C18.5 19.2083 18.3623 19.4623 18.087 19.637C17.8123 19.8123 17.525 19.8333 17.225 19.7L12 17.45L6.775 19.7ZM7 5H17H12H7Z",fill:"#595959"})))),f.createElement(y.T,{className:B(C.title,"pointer"),size:c?"s2":"s1",mb:8,weight:"semiBold"},l.postTitle||l.postName||""),!c&&f.createElement(y.T,{className:B(C.description,"pointer"),size:"p2",mb:16,lineClamp:3},Y()(l.excerpt||l.description||(null===(n=l.postContent)||void 0===n?void 0:n.split("\r\n")[0])||"")),f.createElement($.k,{className:C.author,gap:12,align:"center"},f.createElement(w.a,{size:32,src:i,withIndicator:!0,indicatorConfig:{offset:5,size:18,label:f.createElement("img",{loading:"lazy",src:o,alt:""})}},"A"),f.createElement(y.T,{size:"n1",c:"gray.6"},r," • ",u))))},ArticleCard=e=>{var{variant:t="vertical"}=e,a=(0,k._)(e,["variant"]);return"horizontal"===t?f.createElement(_Horizontal,Object.assign({},a)):f.createElement(_Vertical,Object.assign({},a))},te=J.Z.a` display: flex; height: 125px; box-sizing: border-box; flex-direction: column; align-items: center; padding: 8px; border: 1px solid ${D.t.colors.neutral100}; background-color: white; border-radius: ${D.t.borderRadius}; box-shadow: 0px 5px 12px rgba(40, 74, 117, 0.08); cursor: pointer; text-decoration: none; & > .banner { width: 100%; height: 63px; text-align: center; } & > .content { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-align: center; word-break: break-word; } * { pointer-events: none; } `,CategoryCard=e=>{var{category:t,imgBanner:a,label:n,className:l,style:r,href:i="",dataEventCategory:o,dataEventAction:s,dataEventLabel:c}=e,d=(0,k._)(e,["category","imgBanner","label","className","style","href","dataEventCategory","dataEventAction","dataEventLabel"]);let m=(null==t?void 0:t.customizedUrl)||(null==t?void 0:t.permalink)||i||"";return f.createElement(te,Object.assign({"data-event-category":o,"data-event-action":s,"data-event-label":c,className:l,style:r,href:m},(null==t?void 0:t.customizedUrl)&&!(0,X.i)(t.customizedUrl)&&{target:"_blank"},{onClick:e=>{""===m&&e.preventDefault()}},d),f.createElement("div",{className:"banner"},a),f.createElement("div",{className:"content"},f.createElement(y.T,{className:"category_name",size:"sm",weight:"bold"},(null==t?void 0:t.displayName)||n||"")))},tt=J.Z.div` display: flex; &[data-type='vertical'] { flex-direction: column; div { margin-bottom: 20px; } } &[data-type='horizontal'] { flex-wrap: wrap; div { margin-right: 25px; } &[data-is-rectangle] { div { margin-right: 14px; } } } `,CheckboxGroup=({name:e,values:t=[],onChanges:a,options:n=[],className:l,type:r="vertical",isDisabled:i,isRectangle:o})=>{let onChange=(e,n)=>{let l=t.slice();if(n)l.push(e);else{let t=l.findIndex(t=>t===e);l.splice(t,1)}a&&a(l)};return f.createElement(tt,{className:l,"data-type":r,"data-is-rectangle":o||void 0},n.map((a,n)=>f.createElement(Checkbox,{label:a.label,name:e,key:`${n}-${a.value}`,checked:t.includes(a.value),value:a.value,isDisabled:i||a.disabled,onChange:!i&&onChange,isRectangle:o})))},ta=J.Z.div` display: flex; align-items: center; --font-weight-lg: ${D.t.sizes.fwBold}; --font-weight-md: ${D.t.sizes.fwRegular}; --font-weight-sm: ${D.t.sizes.fwRegular}; &[data-icon-position='left'] { & > *:first-child { margin-right: 8px; } & > *:last-child { width: calc(100% - 24px); } } &[data-icon-position='right'] { & > *:first-child { width: calc(100% - 24px); } & > *:last-child { margin-left: 8px; } } ${x.M.mbDown} { &[data-size='lg'] { font-size: 16px; line-height: 24px; font-weight: var(--font-weight-lg); } &[data-size='md'] { font-size: 14px; line-height: 22px; font-weight: var(--font-weight-md); } &[data-size='sm'] { font-size: 13px; line-height: 20px; font-weight: var(----font-weight-sm); } } `,IconText=({size:e,iconPosition:t,className:a,children:n,icon:l})=>f.createElement(ta,{className:a,"data-size":e,"data-icon-position":t},"left"===t&&l,n,"right"===t&&l),tn=J.Z.div` position: relative; width: 100%; & div[role='slider'] { -webkit-text-size-adjust: none; -webkit-user-select: none; &:focus { outline: none; } } `,tl=J.Z.div` position: absolute; top: 19px; width: 24px; height: 24px; color: ${D.t.colors.white}; border: 2px solid ${D.t.colors.white}; border-radius: 50%; transform: translateY(-50%) translateX(-50%); display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: ${D.t.colors.white}; color: ${D.t.colors.gray300}; border: 1px solid ${D.t.colors.gray300}; &[data-is-active='true'] { background-color: ${D.t.colors.primaryBase}; color: ${D.t.colors.white}; border: none; } `,tr=J.Z.div` display: flex; width: 100%; height: 36px; &[data-track-type='detail'] { margin-top: 0; } &[data-track-type='detail'][data-step-passed='true'] > div { border: 1px solid ${D.t.colors.primaryBase}; height: 0px; } &[data-track-type='detail'] > div { border: 1px solid ${D.t.colors.gray200}; height: 0px; } `,ti=J.Z.div` width: 100%; height: 5px; align-self: center; border-radius: 4px; background-color: ${D.t.colors.gray200}; `,to=J.Z.div` position: absolute; top: 32px; min-width: 100px; text-align: center; color: ${D.t.colors.gray500}; font-size: ${D.t.sizes.fsCaption2}; font-weight: ${D.t.sizes.fwBold}; &[data-step-passed='true'] { color: ${D.t.colors.gray800}; } `,ts=J.Z.div` display: flex; align-items: center; `,tc=J.Z.div` display: flex; align-items: center; font-size: ${D.t.sizes.fsCaption2}; font-weight: ${D.t.sizes.fwBold}; color: ${D.t.colors.gray500}; cursor: pointer; & > svg { height: 10px; width: 10px; margin: 0 14px; } & > svg > path { stroke: ${D.t.colors.gray500}; } &[data-selected='true'] { color: ${D.t.colors.primaryBase}; } `,td=J.Z.div` position: absolute; left: 0; top: 19px; height: 24px; cursor: pointer; transform: translateY(-50%); display: flex; align-items: center; padding: 8px; background-color: ${D.t.colors.white}; `,tm=J.Z.div` min-width: 24px; height: 24px; border: 2px solid ${D.t.colors.white}; border-radius: 50%; margin-right: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: ${D.t.colors.white}; color: ${D.t.colors.gray300}; border: 1px solid ${D.t.colors.gray300}; &[data-is-active='true'] { border: none; background-color: ${D.t.colors.primaryBase}; color: ${D.t.colors.white}; } `,tu=J.Z.div` display: flex; align-items: center; justify-content: center; & > svg { height: 20px; width: 20px; margin-right: 8px; & > path { stroke: ${D.t.colors.gray500}; } } `,tp=J.Z.div` color: ${D.t.colors.gray400}; font-size: ${D.t.sizes.fsCaption2}; font-weight: ${D.t.sizes.fwBold}; margin-right: 8px; flex: 0 0 auto; &[data-step-passed='true'] { color: ${D.t.colors.gray800}; } `,tg=J.Z.div` position: absolute; top: 32px; font-weight: ${D.t.sizes.fwRegular}; color: ${D.t.colors.gray400}; padding-right: 16px; `,ProgressBar=({type:e,numberOfStep:t,activeStep:a,labelPrefix:n,detailSteps:l,className:r,onChange:i})=>{let[o,s]=(0,f.useState)(0),Track=e=>{var{trackClassName:t}=e,a=(0,k._)(e,["trackClassName"]);return f.createElement(tr,Object.assign({},a,{className:t}),f.createElement(ti,null))},c=f.createElement(tn,{className:r+" progress-bar"},f.createElement(Track,null),f.createElement(({trackLength:e,activeStep:a,labelPrefix:n="Step",onChange:l})=>f.createElement(f.Fragment,null,Array.from({length:t},(e,t)=>t).map((r,i)=>f.createElement(tl,{"data-is-active":i===a,"data-label":i,style:{left:i*e/(t-1)},onClick:()=>{l&&l(i)},key:i},i+1,f.createElement(to,{"data-step-passed":i<=a},n+" "+(i+1))))),{trackLength:o,activeStep:a,labelPrefix:n,onChange:i})),d=f.createElement("svg",{"data-name":"Layer 1",viewBox:"0 0 5.5 9.5"},f.createElement("title",null,"chevron-right"),f.createElement("path",{d:"M.75 8.75l4-4-4-4",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),m=f.createElement(ts,null,l&&Array.from({length:l.length},(e,t)=>t).map((e,t)=>{var n;return f.createElement(tc,{key:t,"data-selected":t===a,onClick:()=>{i&&i(t)}},null===(n=l[t])||void 0===n?void 0:n.text," ",tf.createElement(f.Fragment,null,Array.from({length:e.length},(e,t)=>t).map((n,l)=>f.createElement(td,{key:l,style:{left:100/e.length*l+"%",width:100/e.length+"%"},onClick:()=>{a&&a(l)}},e[l].icon?f.createElement(tu,{onClick:()=>{a&&a(l)}},e[l].icon):f.createElement(tm,{"data-is-active":l===t,"data-label":n,onClick:()=>{a&&a(l)},key:l},l+1),f.createElement(tp,{"data-step-passed":l{let e=document.querySelector(".progress-bar");e&&s(e.offsetWidth)},1e3),[]);return(0,f.useEffect)(()=>{let e=document.querySelector(".progress-bar");return s(null==e?void 0:e.offsetWidth),window.addEventListener("resize",p,{passive:!0}),()=>{window.removeEventListener("resize",p)}},[]),"step-track"===e&&c||"breadcrumb"===e&&m||"detail-track"===e&&u},th=f.forwardRef(({id:e,value:t,options:a,className:n,isDisabled:l,size:r="small",direction:i="vertical",onChange:o,dataEventCategory:s,dataEventAction:c,dataEventLabel:d},m)=>{let[u,p]=(0,f.useState)(t);(0,f.useImperativeHandle)(m,()=>({reset(){p(t)}}));let g="vertical"===i?O.K:A.Z;return f.createElement(w.R.Group,{name:e,className:n,size:"small"===r?"md":"lg",value:String(u),defaultValue:t,onChange:e=>{p(e),null==o||o(e)}},f.createElement(g,{spacing:"xl"},a.map(e=>f.createElement(w.R,{key:e.value,value:e.value,label:e.label,disabled:l,"data-event-category":s,"data-event-action":c,"data-event-label":d}))))}),tv=J.Z.div` --menu-width: 240px; --menu-spacing: 28px 16px; width: var(--menu-width); height: 100vh; padding: var(--menu-spacing); background-color: ${D.t.colors.neutral50}; transition: ease-in-out 0.5s; &[data-is-collapsed] { --menu-width: 64px; --menu-spacing: 28px 8px; } `,tb=J.Z.div` display: flex; align-items: baseline; justify-content: space-between; svg { transition: 0.4s ease-in-out; } `,tf=J.Z.div` cursor: pointer; &[data-is-collapsed] { transform: rotate(180deg); } `,ty=J.Z.figure` display: flex; > img, svg, picture { width: 40px; height: 40px; margin-right: 1rem; border-radius: 6px; object-fit: cover; } > figcaption { p + p { margin-top: 2px; } } `,DoctorInfo=({name:e,description:t,image:a,isDescriptionHidden:n})=>f.createElement(ty,null,a,!n&&f.createElement("figcaption",null,f.createElement(y.T,{size:"p4",weight:"bold"},e),f.createElement(y.T,{size:"p4"},t))),tE=J.Z.div` display: flex; align-items: center; margin-top: 24px; margin-bottom: 36px; figcaption { white-space: nowrap; } &[data-is-collapsed='true'] { img { max-width: 2rem; max-height: 2rem; } } `,tx=J.Z.div` display: flex; align-items: center; padding: 9px 21px; margin-bottom: 4px; border-radius: 6px; &:not([data-is-link-active]) { cursor: pointer; } p { margin-left: 12px; } &[data-is-link-active] { background: ${D.t.colors.primaryBase}; } &[data-is-link-collapsed] { justify-content: center; margin-right: -14px; margin-left: -14px; } `;var tw=Object.freeze({__proto__:null,SideMenu:({isCollapsed:e,className:t,style:a,children:n})=>f.createElement(tv,{style:a,className:t,"data-is-collapsed":e||void 0},n),SideHeader:({isCollapsed:e,defaultLogo:t,onBackClick:a,customIcon:n})=>f.createElement(tb,null,f.createElement(ea.L,{type:e?"logomark":t||"hellocare",customSize:{width:e?"24px":"77px",height:"24px"}}),f.createElement(tf,{"data-is-collapsed":e||void 0,onClick:a},n||f.createElement("svg",{"data-name":"Layer 1",viewBox:"0 0 20 20",width:"20px",height:"20px"},f.createElement("path",{d:"M10 .75A9.25 9.25 0 1019.25 10 9.25 9.25 0 0010 .75z",fill:"none",stroke:"#d2d6dc",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),f.createElement("path",{d:"M11.44 6.53L8 10l3.48 3.47",fill:"none",stroke:"#737373",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})))),UserInfo:({isCollapsed:e,userName:t,role:a,avatar:n})=>f.createElement(tE,{"data-is-collapsed":e||void 0},f.createElement(DoctorInfo,{image:n,name:t,description:a,isDescriptionHidden:e})),MenuLink:({icon:e,isActive:t,children:a,isCollapsed:n,activeIcon:l,onLinkClick:r,textSize:i="base",textType:o="bold",textColorActive:s="#fff",textColor:c="#595959"})=>f.createElement(tx,{"data-is-link-active":t||void 0,onClick:r,"data-is-link-collapsed":n||void 0},t&&l?l:e,!n&&f.createElement(y.T,{size:i,weight:o,color:t?s:c},a))});let tC=J.Z.div` position: relative; width: 100%; > .container { display: flex; width: 100%; -ms-overflow-style: none; overflow-x: auto; scrollbar-width: none; &::-webkit-scrollbar { display: none; } .section { display: flex; width: 100%; flex-direction: column; flex-shrink: 0; margin: auto; > .grid-layout { display: grid; width: 100%; grid-row-gap: 8px; > .item-grid { width: 100%; > * { margin: 0 auto; } } } .progress-bar { display: grid; height: 15px; margin-bottom: 10px; .items-progress { position: relative; display: flex; width: 100%; align-items: center; justify-content: center; .icon-status { position: absolute; display: flex; } .line { width: 50%; height: 2px; background-color: ${D.t.colors.gray600}; } } } } } .bullet-nav { position: absolute; z-index: ${D.t.zIndexes.belowHeader}; bottom: -30px; left: 50%; display: flex; transform: translate(-50%, -50%); } .bullet-nav__link { display: block; width: 8px; height: 8px; padding: 0; margin-right: 8px; backface-visibility: hidden; background-color: #e4e8ec; border-radius: 50%; cursor: pointer; transition: all 0.3s; &.active { &[data-scheme='hellosites'] { background-color: ${D.t.colors.primary600}; } &[data-scheme='marrybaby'] { background-color: ${D.t.mbColors.pink}; } } } .arrow-left { position: absolute; z-index: 10; top: 50%; left: -35px; transform: translateY(-50%); &[data-event-category] > * { pointer-events: none; } } .arrow-right { position: absolute; z-index: 10; top: 50%; right: -35px; transform: translateY(-50%); &[data-event-category] > * { pointer-events: none; } } .image-gallery-wrapper { display: flex; position: relative; margin-top: 16px; justify-content: center; gap: 16px; .image-block { display: block; width: 100%; border: 2px solid transparent; border-radius: 4px; } .image-block.active { border-color: ${D.t.colors.primaryBase}; } img { height: 40px; width: auto; max-width: 100%; } } `,RenderIconStatus=({status:e})=>{if("inActive"===e);else if("active"===e)return f.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},f.createElement("circle",{cx:"6",cy:"6",r:"4",fill:"#2D87F3"}),f.createElement("circle",{cx:"6",cy:"6",r:"5.5",stroke:"#2D87F3"}));else if("done"===e)return f.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},f.createElement("path",{d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12Z",fill:"#00B16A"}),f.createElement("path",{d:"M8.76061 4.20029L4.80061 7.80029L3.00061 6.16392",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}));return f.createElement("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none"},f.createElement("circle",{cx:"3",cy:"3",r:"3",fill:"#ADB3BC"}))},ScrollList=({row:e=2,column:t=3,isDotsShown:a=!0,isImageGalleryShown:n=!1,mode:l="infinity",type:r="separated",distanceOverlappedLeft:i={amount:0,unit:"pixel"},children:o,className:s,isProgressShown:c=!1,statusChildren:d,isArrowShown:m=!1,classNameLeftArrow:u,classNameRightArrow:p,dataEventCategory:g,dataEventAction:h,dataEventLabel:v,onChangePage:b,page:y,customPageWidth:E,scheme:x="hellosites",arrowType:w="Discover"})=>{let C="number"==typeof y,[k,B]=(0,f.useState)(C?y:0),N=[];f.Children.map(o,(a,n)=>{n%(e*t)==0&&N.push([]),N[N.length-1].push(f.cloneElement(a))});let S=(0,f.useRef)(),T=(0,f.useRef)(0),scrollToPage=e=>{if(!S.current)return;let{clientWidth:t}=S.current,a=E||t,n="intertwined"===r?"percentage"===i.unit?e*a+i.amount/100*a*e:e*a+i.amount*a*e:e*a;S.current.scrollTo({top:0,left:n,behavior:"smooth"}),T.current=e,B(e)},handleClick=e=>{if(!S.current)return;let{clientWidth:t}=S.current,a=E||t,n="intertwined"===r?"percentage"===i.unit?e*a+i.amount/100*a*e:e*a+i.amount*a*e:e*a;S.current.scrollTo({top:0,left:n,behavior:"smooth"}),T.current=e,B(e),b&&b(e)};(0,f.useEffect)(()=>{"number"==typeof y&&scrollToPage(y)},[y]);let handleClickArrow=e=>{let t;if(!S.current)return;let{clientWidth:a}=S.current,n=E||a;t=0===k?0:k*n,"forward"===e&&(t===n*(N.length-1)?(B(N.length-1),t=n*(N.length-1),b&&b(N.length-1)):(B(k+1),t+=n,b&&b(k+1)),S.current.scrollTo({top:0,left:t,behavior:"smooth"})),"back"===e&&(0===t?(B(0),b&&b(0),t=0):(B(k-1),b&&b(k-1),t-=n),S.current.scrollTo({top:0,left:t,behavior:"smooth"}))},D=et()(()=>{if("infinity"===l){if(!S.current)return;let{clientWidth:e,scrollLeft:t}=S.current,a=E||e,n=Math.floor(t/a);B(n),b&&b(n)}},400);return(0,f.useEffect)(()=>{if("snapped"===l){let e,t,a,n,l,o,s=!1,c=S.current,start=(r,i)=>{s=!0,a=!1,n=!1,e=r-c.offsetLeft,t=i-c.offsetTop,l=c.scrollLeft},startMouse=e=>{start(e.pageX,e.pageY)},startTouch=e=>{start(e.touches[0].pageX,e.touches[0].pageY)},end=()=>{if(s=!1,a=!1,n=!1,!S.current)return;let{clientWidth:e}=S.current,t=E||e,l="ltr"===o?0!==T.current?T.current-1:T.current:"rtl"===o&&T.current{if(!s)return;let d=r-c.offsetLeft,m=i-c.offsetTop,u=d-e,p=m-t;!a&&!n&&(p>20||p<-20)&&(a=!0),!a&&(u>20||u<-20)&&(n=!0,c.scrollLeft=l-u,u>0&&(o="ltr"),u<0&&(o="rtl"),0===u&&(o="none"))},moveMouse=e=>{n&&e.preventDefault(),move(e.pageX,e.pageY)},moveTouch=e=>{n&&e.preventDefault(),move(e.touches[0].pageX,e.touches[0].pageY)};return null==c||c.addEventListener("mousedown",startMouse,{passive:!0}),null==c||c.addEventListener("touchstart",startTouch,{passive:!0}),window.addEventListener("mouseup",end,{passive:!0}),window.addEventListener("touchend",end,{passive:!0}),null==c||c.addEventListener("mousemove",moveMouse,{passive:!0}),null==c||c.addEventListener("touchmove",moveTouch,{passive:!0}),()=>{null==c||c.removeEventListener("mousedown",startMouse),null==c||c.removeEventListener("touchstart",startTouch),window.removeEventListener("mouseup",end),window.removeEventListener("touchend",end),null==c||c.removeEventListener("mousemove",moveMouse),null==c||c.removeEventListener("touchmove",moveTouch)}}},[]),f.createElement(tC,{className:s,"data-row":e,onScroll:D},m&&k>0&&f.createElement("div",{className:`${u} arrow-left`,onClick:()=>handleClickArrow("back"),"data-event-category":g,"data-event-action":h,"data-event-label":v},"Care"===w?f.createElement("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none"},f.createElement("g",{filter:"url(#filter0_dd_12599_34420)"},f.createElement("path",{d:"M7.00024 19C7.00024 10.1634 14.1637 3 23.0002 3V3C31.8368 3 39.0002 10.1634 39.0002 19V19C39.0002 27.8366 31.8368 35 23.0002 35V35C14.1637 35 7.00024 27.8366 7.00024 19V19Z",fill:"white"}),f.createElement("path",{d:"M20.9293 19L24.7503 15.179C25.1643 14.765 25.1643 14.093 24.7503 13.679C24.3363 13.265 23.6643 13.265 23.2503 13.679L18.6363 18.293C18.2453 18.684 18.2453 19.317 18.6363 19.707L23.2503 24.321C23.6643 24.735 24.3363 24.735 24.7503 24.321C25.1643 23.907 25.1643 23.235 24.7503 22.821L20.9293 19Z",fill:"#595959"}),f.createElement("path",{d:"M23.0002 34C14.716 34 8.00024 27.2843 8.00024 19H6.00024C6.00024 28.3888 13.6114 36 23.0002 36V34ZM38.0002 19C38.0002 27.2843 31.2845 34 23.0002 34V36C32.3891 36 40.0002 28.3888 40.0002 19H38.0002ZM23.0002 4C31.2845 4 38.0002 10.7157 38.0002 19H40.0002C40.0002 9.61116 32.3891 2 23.0002 2V4ZM23.0002 2C13.6114 2 6.00024 9.61116 6.00024 19H8.00024C8.00024 10.7157 14.716 4 23.0002 4V2Z",fill:"#DBDFE5"})),f.createElement("defs",null,f.createElement("filter",{id:"filter0_dd_12599_34420",x:"0.000244141",y:"0",width:"42",height:"42",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},f.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),f.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),f.createElement("feOffset",{dx:"-2",dy:"2"}),f.createElement("feGaussianBlur",{stdDeviation:"2.5"}),f.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.263201 0 0 0 0 0.335725 0 0 0 0 0.393257 0 0 0 0.123689 0"}),f.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_12599_34420"}),f.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),f.createElement("feOffset",{dx:"-1",dy:"1"}),f.createElement("feGaussianBlur",{stdDeviation:"1"}),f.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.264489 0 0 0 0 0.275745 0 0 0 0 0.28861 0 0 0 0.01 0"}),f.createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_12599_34420",result:"effect2_dropShadow_12599_34420"}),f.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_12599_34420",result:"shape"})))):f.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none"},f.createElement("path",{d:"M15.9996 28.2218C22.7497 28.2218 28.2218 22.7497 28.2218 15.9996C28.2218 9.24942 22.7497 3.77734 15.9996 3.77734C9.24942 3.77734 3.77734 9.24942 3.77734 15.9996C3.77734 22.7497 9.24942 28.2218 15.9996 28.2218Z",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M15.9997 11.1109L11.1108 15.9998L15.9997 20.8887",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M20.8886 15.999L11.1108 15.999",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),f.createElement("div",{ref:S,className:"container",style:{overflowX:"snapped"===l||m?"hidden":"scroll"}},N.map((a,n)=>{let l=0;for(let e=0;e{let r=l+t,i=d.find(e=>e.index===r);return f.createElement("div",{className:"items-progress",key:t},0===t&&0===n?f.createElement("div",{className:"line",style:{visibility:"hidden"}}):f.createElement("div",{className:"line"}),f.createElement("div",{className:"icon-status"},f.createElement(RenderIconStatus,{status:null==i?void 0:i.status})),n===N.length-1&&t===a.length-1?f.createElement("div",{className:"line",style:{visibility:"hidden"}}):f.createElement("div",{className:"line"}))})),f.createElement("div",{className:"grid-layout","data-index":n,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${e}, 1fr)`}},a.map((e,t)=>f.createElement(f.Fragment,{key:t},f.createElement("div",{className:"item-grid",key:t},e)))))})),m&&khandleClickArrow("forward"),"data-event-category":g,"data-event-action":h,"data-event-label":v}," ","Care"===w?f.createElement("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none"},f.createElement("g",{filter:"url(#filter0_dd_12597_34423)"},f.createElement("path",{d:"M7.00024 19C7.00024 10.1634 14.1637 3 23.0002 3C31.8368 3 39.0002 10.1634 39.0002 19C39.0002 27.8366 31.8368 35 23.0002 35C14.1637 35 7.00024 27.8366 7.00024 19Z",fill:"white"}),f.createElement("path",{d:"M24.0712 19L20.2502 15.179C19.8362 14.765 19.8362 14.093 20.2502 13.679C20.6642 13.265 21.3362 13.265 21.7502 13.679L26.3642 18.293C26.7552 18.684 26.7552 19.317 26.3642 19.707L21.7502 24.321C21.3362 24.735 20.6642 24.735 20.2502 24.321C19.8362 23.907 19.8362 23.235 20.2502 22.821L24.0712 19Z",fill:"#595959"}),f.createElement("path",{d:"M23.0002 34C14.716 34 8.00024 27.2843 8.00024 19H6.00024C6.00024 28.3888 13.6114 36 23.0002 36V34ZM38.0002 19C38.0002 27.2843 31.2845 34 23.0002 34V36C32.3891 36 40.0002 28.3888 40.0002 19H38.0002ZM23.0002 4C31.2845 4 38.0002 10.7157 38.0002 19H40.0002C40.0002 9.61116 32.3891 2 23.0002 2V4ZM23.0002 2C13.6114 2 6.00024 9.61116 6.00024 19H8.00024C8.00024 10.7157 14.716 4 23.0002 4V2Z",fill:"#DBDFE5"})),f.createElement("defs",null,f.createElement("filter",{id:"filter0_dd_12597_34423",x:"0.000244141",y:"0",width:"42",height:"42",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},f.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),f.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),f.createElement("feOffset",{dx:"-2",dy:"2"}),f.createElement("feGaussianBlur",{stdDeviation:"2.5"}),f.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.263201 0 0 0 0 0.335725 0 0 0 0 0.393257 0 0 0 0.123689 0"}),f.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_12597_34423"}),f.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),f.createElement("feOffset",{dx:"-1",dy:"1"}),f.createElement("feGaussianBlur",{stdDeviation:"1"}),f.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.264489 0 0 0 0 0.275745 0 0 0 0 0.28861 0 0 0 0.01 0"}),f.createElement("feBlend",{mode:"normal",in2:"effect1_dropShadow_12597_34423",result:"effect2_dropShadow_12597_34423"}),f.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_12597_34423",result:"shape"})))):f.createElement("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none"},f.createElement("path",{d:"M15.9996 28.2218C22.7497 28.2218 28.2218 22.7497 28.2218 15.9996C28.2218 9.24942 22.7497 3.77734 15.9996 3.77734C9.24942 3.77734 3.77734 9.24942 3.77734 15.9996C3.77734 22.7497 9.24942 28.2218 15.9996 28.2218Z",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M15.9998 20.8891L20.8887 16.0002L15.9998 11.1113",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M11.1109 16L20.8887 16",stroke:"hellosites"===x?"#2D87F3":"#e85388",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),a&&f.createElement("ul",{className:"bullet-nav"},N.map((e,t)=>f.createElement("li",{key:t,className:"bullet-nav__item "},f.createElement("p",{onClick:()=>handleClick(t),className:`bullet-nav__link scroll ${k==t?"active":null}`,"data-scheme":x})))),n&&f.createElement("div",{className:"image-gallery-wrapper","data-test":N.length},N.slice(0,3).map((e,t)=>f.createElement("div",{className:`image-block ${k==t?"active":null}`,key:t,onClick:()=>handleClick(t),"data-scheme":x},e))))},tk=J.Z.div` border-radius: ${D.t.borderRadius}; ${e=>e["data-is-in-card"]&&` padding: 12px; background-color: ${e["data-card-color"]};`} `,tB=J.Z.div` width: 13px; height: 13px; margin-right: 10px; background-color: ${e=>e["data-color"]}; border-radius: 50%; `,tN=J.Z.div` display: flex; align-items: center; color: ${D.t.colors.gray800}; font-size: ${D.t.sizes.fsParagraph4}; font-weight: ${D.t.sizes.fwRegular}; `,tS=J.Z.div` display: flex; align-items: center; margin-top: 4px; color: ${D.t.colors.gray800}; font-size: ${D.t.sizes.fsHeading2}; font-weight: ${D.t.sizes.fwSemiBold}; & > svg { width: 24px; height: 24px; margin-right: 12px; } &[data-size='small'] { margin-left: 23px; font-size: ${D.t.sizes.fsParagraph4}; font-weight: ${D.t.sizes.fwBold}; } `,StatisticCard=({type:e,description:t,value:a,withIcon:n,isInACard:l,cardColor:r,className:i})=>f.createElement(tk,{className:i,"data-size":e,"data-is-in-card":"big"===e&&l,"data-card-color":r},f.createElement(tN,null,"small"===e&&f.createElement(tB,{"data-color":r}),t),f.createElement(tS,{"data-size":e},"small"!==e&&n,a)),tT=J.Z.table` width: 100%; position: relative; `,tD=J.Z.td` padding: var(--vertical-spacing) var(--horizontal-spacing); vertical-align: middle; &[data-text-align='left'] { text-align: left; } &[data-text-align='right'] { text-align: right; } &[data-text-align='center'] { text-align: center; } `,tM=J.Z.tr` border-bottom: 1px solid ${D.t.colors.gray100}; &[data-is-active='true'] { background-color: ${D.t.colors.gray200}; } `,Row=({children:e,className:t,style:a,isActive:n,onRowClicked:l,rowId:r})=>f.createElement(tM,{className:t,"data-is-active":n,style:a,onClick:()=>{l&&l(r)}},e),tI=J.Z.thead` th { padding: var(--vertical-spacing) var(--horizontal-spacing); text-align: left; color: ${D.t.colors.gray500}; font-weight: ${D.t.sizes.fwBold}; } &[data-is-sticky] { th { position: sticky; top: 0; background: white; border-bottom: 2px solid ${D.t.colors.gray200}; } } `,t$=J.Z.tbody` position: relative; &[data-is-striped] { > tr:nth-child(odd) { background-color: ${D.t.colors.neutral50}; } } &[data-is-hoverable] { > tr:hover { background-color: ${D.t.colors.neutral100}; } } `;var tz=Object.freeze({__proto__:null,Table:({children:e,className:t,style:a,horizontalPadding:n,verticalPadding:l})=>f.createElement(tT,{className:t,style:Object.assign({"--horizontal-spacing":n||"19px","--vertical-spacing":l||"26px"},a)},e),Cell:({children:e,className:t,style:a,textAlign:n,isTableHead:l})=>f.createElement(tD,{className:t,style:a,"data-text-align":n||"left",as:l?"th":"td"},e),Head:({isSticky:e,children:t,className:a,style:n})=>f.createElement(tI,{className:a,"data-is-sticky":e||void 0,style:n},f.createElement(Row,null,t)),Row:Row,Body:({children:e,className:t,style:a,isHoverable:n,isStriped:l})=>f.createElement(t$,{className:t,style:a,"data-is-striped":l||void 0,"data-is-hoverable":n||void 0},e)}),tP=(0,L.k)(e=>{let t=(0,_.A)("itemLabel");return{root:{display:"inline-flex",maxWidth:"100%",borderBottom:`1px solid ${e.colors.neutral[1]}`,"-webkit-overflow-scrolling":"touch",overflowX:"auto",overflowY:"hidden","-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"},columnGap:e.spacing.lg},item:{display:"flex",alignItems:"center",paddingBottom:"4px","&:hover":{cursor:"pointer"},"&.active":{color:e.fn.primaryColor(),borderBottom:`3px solid ${e.fn.primaryColor()}`,bottom:"-1px",position:"relative",[`& .${t}`]:{}},"&[data-event-category] > *":{pointerEvents:"none"}},itemInner:{display:"flex",alignItems:"center"},label:{ref:t},icon:{marginRight:e.spacing.xs}}});let Tabs=({style:e,initialTab:t,tabContent:a,onChange:n,className:l,dataEventCategory:r,dataEventAction:i,dataEventLabel:o,id:s,styles:c})=>{let{classes:d,cx:m,theme:u}=tP(void 0,{name:"Tabs",styles:c}),[p,g]=(0,f.useState)(t||0);return(0,f.useEffect)(()=>{g(t)},[t]),f.createElement("ul",{style:e,className:m(d.root,l),role:"tablist",id:s},a.map((e,t)=>f.createElement("li",{className:`${d.item} ${p===t?"active":""} ${e.className}`,"aria-selected":p===t,role:"tab",onClick:()=>{g(t),n&&n(t)},onKeyDown:e=>{"Enter"===e.key&&(g(t),n&&n(t))},key:t,"data-event-category":e.dataEventCategory||r,"data-event-action":e.dataEventAction||i,"data-event-label":e.dataEventLabel||o,tabIndex:0,"data-testid":e.dataTestid},f.createElement("div",{className:d.itemInner},e.icon&&f.createElement("div",{className:d.icon},e.icon),f.createElement(y.T,{className:d.label,size:e.textSize||"sm",weight:e.textType||"bold",color:p===t?u.fn.primaryColor():e.textColor||u.colors.gray[4],dataEventCategory:e.dataEventCategory,dataEventAction:e.dataEventAction,dataEventLabel:e.dataEventLabel},e.name)))))},tA=J.Z.div` padding: 1rem; background: ${D.t.colors.neutral100}; .survey-inner-wrapper { padding: 1.25rem 1rem 1.5rem; background: ${D.t.colors.white}; border-radius: ${D.t.borderRadius}; .survey-header { border-bottom: 1px solid #dbdfe5; margin-bottom: 12px; .survey-header-text { color: ${D.t.colors.gray500}; } } .survey-contact-submit { width: 100%; margin-bottom: 1.5rem; } .term-policy-container { width: 70%; min-width: 210px; max-width: 100%; margin: 0 auto 1.5rem; text-align: center; } .survey-progress-wrapper { width: calc(100% + 2rem); height: 4px; margin-bottom: 1rem; margin-left: -1rem; background: #e4e8ec; .survey-progress { width: 100%; height: 100%; background: #00b16a; transform: scaleX(0); transform-origin: left; transition: transform ease-in-out 0.3s; } } .survey-button-wrapper { display: flex; justify-content: flex-end; button { justify-content: center; &[data-has-icon='true'] { svg { width: 10px; height: 10px; margin-right: 10px; vertical-align: unset; } } &.survey-next-button { &[data-has-icon='true'] { svg { margin-right: 0; margin-left: 10px; } } } } &[data-center='true'] { justify-content: center; button:only-child { width: 200px; max-width: 80%; } } .survey-prev-button { margin-right: 0.5rem; } } } `,tL=J.Z.div` position: relative; display: flex; align-items: center; cursor: pointer; input { position: relative; width: 20px; height: 20px; flex-shrink: 0; border: solid 1px ${D.t.colors.gray500}; margin-right: 8px; border-radius: 100%; cursor: inherit; transition: background 0.4s, border-color 0.4s, box-shadow 0.4s; &:hover, &:active { border-color: ${D.t.colors.primaryBase}; box-shadow: 0 0 2px 2px ${D.t.colors.primary600}; } &:checked { display: flex; align-items: center; justify-content: center; border-color: ${D.t.colors.primaryBase}; &:after { position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; //left: 3px; //position: absolute; //top: 4px; background-color: ${D.t.colors.primaryBase}; border-radius: 50%; content: ''; transform: translate(-50%, -50%); } } } label { width: calc(100% - 24px); cursor: inherit; font-weight: ${D.t.sizes.fwRegular}; } &[data-disabled='true'] { color: ${D.t.colors.gray300}; cursor: not-allowed; input { border-color: ${D.t.colors.gray300}; &:hover { border-color: ${D.t.colors.gray300}; box-shadow: none; } } } padding: 16px 20px; border: 0.5px solid transparent; background: #fafafa; border-radius: ${D.t.borderRadius}; &[data-checked='true'] { border: 0.5px solid #2d87f3; background: #f7f9fc; } input { border: solid 2px #737373; margin-right: 0; background: white; &[type='checkbox'] { &:checked { border: 0; background: ${D.t.colors.primaryBase} url("data:image/svg+xml,%3Csvg width='22' height='22' viewBox='0 0 22 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z' fill='%232D87F3' stroke='%232D87F3' stroke-width='2'/%3E%3Cpath d='M15.5714 8L9.67857 14L7 11.2727' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") no-repeat center center; &:after { display: none; } } } } &[data-has-image='true'] { position: relative; display: block; padding: 12px; input { position: absolute; top: 20px; right: 20px; } .choice-image-wrapper { position: relative; padding-top: 56.25%; margin-bottom: 0.75rem; img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: ${D.t.borderRadius}; object-fit: cover; } } } `,tO=J.Z.div` position: relative; width: 100%; padding-top: min(400px, 100%); .survey-thankyou-wrapper-inner { position: absolute; top: 0; left: 0; display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; .survey-thankyou-icon { width: 36%; max-height: 50%; margin-bottom: 1.5rem; } .survey-thankyou-title { margin-bottom: 1rem; text-align: center; } .survey-thankyou-subtitle { text-align: center; > * { text-align: center; } } } `,t_=J.Z.div` .survey-question-text-wrapper { margin-bottom: 24px; .survey-question-title { margin-bottom: 4px; } .survey-question-subtitle, .survey-question-description { color: ${D.t.colors.gray500}; } } .survey-question-image { width: 100%; margin-bottom: 12px; border-radius: ${D.t.borderRadius}; } .survey-question-answer-wrapper { margin-bottom: 1.5rem; .survey-question-options-wrapper { display: grid; grid-gap: 0.5rem; grid-template-columns: 1fr; &[data-has-image='true'] { grid-gap: 0.8rem; grid-template-columns: 1fr 1fr; } .survey-question-option-item { label { color: #262626; font-size: 16px; font-style: normal; font-weight: normal; line-height: 24px; } } } .survey-contact-input { margin-bottom: 1rem; &:first-child { margin-top: 1rem; } label { font-weight: 700; } input { margin-top: 6px; } } } `,SurveyRadio=({size:e="small",label:t,name:a,checked:n,value:l,className:r,isDisabled:i=!1,onChange:o,hasImage:s,inputType:c,image:d})=>f.createElement(tL,{"data-disabled":i,className:r,"data-size":e,"data-checked":n,onClick:()=>{o(l)},"data-has-image":s},s&&f.createElement("div",{className:"choice-image-wrapper"},d&&f.createElement("img",{src:d,loading:"lazy"})),f.createElement("label",{onClick:e=>{e.preventDefault()},htmlFor:`${a}-${l}`},t),f.createElement("input",{type:c,checked:n,name:a,id:`${a}-${l}`,value:l,readOnly:!0})),SurveyQuestionContent=({question:e,description:t,onOptionsChange:a,onTextOptionsChange:n,style:l,className:r})=>{let{type:i,title:o,subtitle:s,image:c,textOptions:d,options:m,name:u,is_multi_select:p}=e,g=!!(null==m?void 0:m.some(e=>e.image)),[h,v]=(0,f.useState)([]),[b,x]=(0,f.useState)(()=>(null==d?void 0:d.slice())||[]);return(0,f.useEffect)(()=>{a&&a(h.slice())},[!!a,h]),(0,f.useEffect)(()=>{n&&n(b)},[!!n,b]),f.createElement(t_,{className:r,style:l},f.createElement("div",{className:"survey-question-text-wrapper"},o&&f.createElement(T.H,{"data-nosubtitle":!s,className:"survey-question-title",tag:"h4"},o),s&&f.createElement(y.T,{className:"survey-question-subtitle",size:"p2"},s),t&&f.createElement(y.T,{className:"survey-question-description",size:"p2"},t)),c&&f.createElement("img",{src:c,className:"survey-question-image",loading:"lazy"}),f.createElement("div",{className:"survey-question-answer-wrapper"},"radio"===i&&f.createElement("div",{"data-has-image":g,className:"survey-question-options-wrapper"},m.map(e=>{var t;return f.createElement(SurveyRadio,{inputType:"radio",label:e.label,name:u,key:`${u}-${e.value}`,checked:(null===(t=h[0])||void 0===t?void 0:t.value)===e.value,value:e.value,onChange:e=>{v([m.find(t=>t.value===e)])},className:"survey-question-option-item",image:e.image,hasImage:g})})),"checkbox"===i&&f.createElement("div",{"data-has-image":g,className:"survey-question-options-wrapper"},m.map(e=>f.createElement(SurveyRadio,{inputType:"checkbox",label:e.label,name:u,key:`${u}-${e.value}`,checked:!!h.find(t=>t.value===e.value),value:e.value,onChange:()=>{let t=h.findIndex(t=>t.value===e.value);t>=0?v(e=>(e.splice(t,1),e.slice())):p?v(t=>t.concat(e).slice()):v([e])},className:"survey-question-option-item survey-option-radio",image:e.image,hasImage:g}))),"textbox"===i&&b.map((e,t)=>e.isTextArea?f.createElement(E.T,{key:t,placeholder:e.placeholder,height:"150px",value:e.value,onChange:e=>x(a=>(a[t].value=e,a.slice()))}):f.createElement(el.I,{key:t,value:e.value,name:e.name,size:"md",className:"survey-contact-input",label:e.label,placeholder:e.placeholder,onChange:e=>{x(a=>(a[t].value=e,a.slice()))},type:e.type}))))};(n=d||(d={}))[n.UNLIMITED=0]="UNLIMITED",n[n.EXACT_NUMBER=1]="EXACT_NUMBER",n[n.RANGE=2]="RANGE";let SurveyQuestionCard=({className:e,headerText:t,style:a,question:n,termAndPolicyText:l,prevText:r,nextText:i,isContactForm:o,isDisableNext:s,isDisablePrev:c,onPrevClick:m,onNextClick:u,isSubmitButton:p,isButtonCenter:g,progress:h,descriptionText:v})=>{var b,E,x;let[w,C]=(0,f.useState)([]),{is_multi_select:k,multi_select_option:B,from:N,to:S}=n,T=null==n?void 0:n.type,D="checkbox"===T&&(null===(b=n.options)||void 0===b?void 0:b.length)&&(!w||0===w.length||k&&B===d.RANGE&&(w.lengthS)||k&&B===d.EXACT_NUMBER&&w.length!==N)||"radio"===T&&(null===(E=n.options)||void 0===E?void 0:E.length)&&(!w||0===w.length)||"textbox"===T&&(null===(x=n.textOptions)||void 0===x?void 0:x.length)&&(w.length!e.value)),M="number"==typeof h?h>1?1:h<0?0:Number(h.toFixed(2)):-1,I=(0,f.useRef)(null),reportValidity=()=>"textbox"!==T||I.current.reportValidity();return f.createElement(tA,{className:e,style:a},f.createElement("div",{className:"survey-inner-wrapper"},t&&f.createElement("div",{className:"survey-header"},f.createElement(y.T,{className:"survey-header-text",size:"c2"},t)),f.createElement("form",{ref:I,onSubmit:e=>e.preventDefault()},f.createElement(SurveyQuestionContent,{question:n,description:v,onOptionsChange:e=>{C(e)},onTextOptionsChange:e=>{C(e)}})),o&&i&&f.createElement(en.B,{className:"survey-contact-submit",size:"lg",isDisabled:s||D,onClick:()=>reportValidity()&&u&&u(w)},i),l&&f.createElement("div",{className:"term-policy-container"},l),"number"==typeof h&&f.createElement("div",{className:"survey-progress-wrapper"},f.createElement("div",{className:"survey-progress",style:{transform:`scaleX(${M})`}})),(r||i)&&f.createElement("div",{"data-center":g,className:"survey-button-wrapper"},r&&f.createElement(en.B,{className:"survey-prev-button",size:"lg",color:c?"primary":"secondary",isDisabled:c,icon:f.createElement("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none"},f.createElement("path",{d:"M2.44677 4.99999L5.31252 2.13424C5.62302 1.82374 5.62302 1.31974 5.31252 1.00924C5.00202 0.698742 4.49802 0.698742 4.18752 1.00924L0.727018 4.46974C0.433768 4.76299 0.433768 5.23774 0.727018 5.53024L4.18752 8.99074C4.49802 9.30124 5.00202 9.30124 5.31252 8.99074C5.62302 8.68024 5.62302 8.17624 5.31252 7.86574L2.44677 4.99999Z",fill:c?"#fff":"#2D87F3"})),onClick:m},r),!o&&i&&f.createElement(en.B,{onClick:()=>reportValidity()&&u&&u(w),className:"survey-next-button",size:"lg",isDisabled:s||D},i," ",p?void 0:f.createElement("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none"},f.createElement("path",{d:"M3.80322 5.19994L0.937465 2.33419C0.626965 2.02369 0.626965 1.51969 0.937465 1.20919C1.24796 0.898693 1.75196 0.898693 2.06246 1.20919L5.52297 4.66969C5.81622 4.96294 5.81622 5.43769 5.52297 5.73019L2.06246 9.19069C1.75196 9.50119 1.24796 9.50119 0.937465 9.19069C0.626965 8.88019 0.626965 8.37619 0.937465 8.06569L3.80322 5.19994Z",fill:"#ffffff"}))))))},SurveyThankyouCard=({thankyou:e,thankyouSubtitle:t,className:a,style:n})=>f.createElement(tA,{className:a,style:n},f.createElement("div",{className:"survey-inner-wrapper"},f.createElement(tO,null,f.createElement("div",{className:"survey-thankyou-wrapper-inner"},f.createElement("svg",{viewBox:"0 0 122 122",fill:"none",className:"survey-thankyou-icon"},f.createElement("path",{d:"M61.5 122c33.137 0 60-26.863 60-60S94.637 2 61.5 2s-60 26.863-60 60 26.863 60 60 60Z",fill:D.t.colors.primary50}),f.createElement("ellipse",{cx:"61.5",cy:"110.36",rx:"48",ry:"3.36",fill:"#91CAFF"}),f.createElement("path",{d:"M82.905 72.666H101.5L87.597 40H35.403L21.5 72.666h18.595V91H83.08l-.174-18.334Z",fill:"#2C74DF"}),f.createElement("path",{d:"M74.4 15H39.863a5.364 5.364 0 0 0-5.363 5.363v52.214a5.364 5.364 0 0 0 5.363 5.363h43.273a5.364 5.364 0 0 0 5.363-5.363V21a6 6 0 0 0-6-6H74.4Z",fill:"#fff"}),f.createElement("path",{d:"M88.853 80.108H34.147a4.055 4.055 0 0 1-4.087-4.074v-10.65c0-2.27 1.81-4.074 4.087-4.074h54.706a4.055 4.055 0 0 1 4.087 4.074v10.65c0 2.27-1.81 4.074-4.087 4.074Z",fill:"#E4E8EC"}),f.createElement("path",{d:"M90.838 85.451H32.162a4.055 4.055 0 0 1-4.087-4.074v-10.65c0-2.27 1.81-4.074 4.087-4.074H90.78a4.055 4.055 0 0 1 4.087 4.074v10.65c.058 2.27-1.81 4.074-4.029 4.074Z",fill:"#fff"}),f.createElement("path",{d:"M103.748 75.492v30.263c0 1.92-1.576 3.492-3.503 3.492H23.003c-1.927 0-3.503-1.572-3.503-3.492V75.492c0-1.92 1.576-3.492 3.503-3.492h19.384c1.926 0 3.503 1.571 3.503 3.492v5.354c0 .35.233.582.584.582h30.3c.351 0 .585-.233.585-.582v-5.354c0-1.92 1.576-3.492 3.503-3.492h19.383c1.927 0 3.503 1.571 3.503 3.492Z",fill:"#45A4FF"}),f.createElement("path",{stroke:"#2C74DF",d:"M51.954 91.377v3.084c0 1.63 1.285 2.91 2.92 2.91h12.844c1.635 0 2.92-1.28 2.92-2.91v-3.084"}),f.createElement("path",{d:"M120.5 38.025c-2-.246-3.25 1.352-2.375 3.195l.25.737c.75 1.844-.375 3.441-2.375 3.195l-.75-.123c-2-.245-3.25 1.352-2.375 3.195l.375.738c.75 1.843-.375 3.44-2.375 3.195l-.75-.123c-1.5-.123-2.625.737-2.625 1.966",stroke:"#FE921D"}),f.createElement("path",{d:"M1.533 62c-.269 1.413 1.142 2.337 2.82 1.848l.672-.218c1.678-.543 3.089.38 2.82 1.848l-.134.544c-.269 1.413 1.141 2.337 2.82 1.848l.671-.218c1.68-.543 3.09.38 2.82 1.848l-.134.543c-.201 1.087.538 1.848 1.612 1.957M118 92a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM82 3.187l1.188 4.348 4.347-1.188L86.347 2 82 3.187Z",stroke:"#00B16A"}),f.createElement("path",{stroke:"#FE921D",d:"M17 28a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),f.createElement("path",{d:"M61.5 26.667c-7.364 0-13.333 5.97-13.333 13.333 0 7.364 5.969 13.333 13.333 13.333S74.833 47.364 74.833 40 68.864 26.667 61.5 26.667Zm7.61 10.276-9.334 9.333a1.33 1.33 0 0 1-1.885 0l-4-4a1.332 1.332 0 1 1 1.885-1.885l3.057 3.057 8.391-8.39a1.332 1.332 0 1 1 1.885 1.885Z",fill:"#00CB8A"})),e&&f.createElement(T.H,{className:"survey-thankyou-title",tag:"h3"},e),t&&f.createElement(y.T,{className:"survey-thankyou-subtitle",size:"p3"},t))))),tj=J.Z.div``,tZ=J.Z.div` width: 100vw; height: 100vh; position: fixed; bottom: 0; right: 0; background-color: ${D.t.colors.white}; opacity: 0.83; transition: display ${200}ms linear; [data-floatmenu-open='true'] & { animation: showBackgroundPanel ${200}ms linear 0s normal forwards; } [data-floatmenu-open='false'] & { animation: hideBackgroundPanel ${200}ms linear 0s normal forwards; } @keyframes showBackgroundPanel { 0% { opacity: 0; width: 100vw; height: 100vh; } 100% { opacity: 0.83; } } @keyframes hideBackgroundPanel { 0% { width: 100vw; height: 100vh; } 99% { width: 100vw; height: 100vh; } 100% { opacity: 0; width: 0; height: 0; } } `,tF=J.Z.div` position: fixed; right: 16px; bottom: 40px; `,tR=J.Z.div` display: flex; flex-direction: column; gap: 16px; transition: all ${200}ms ease-in-out; position: fixed; bottom: 112px; right: 16px; // scale [data-animation-type='scale'] & { transform-origin: 100% 100%; } [data-animation-type='scale'][data-floatmenu-open='true'] & { transform: scale(1); } [data-animation-type='scale'][data-floatmenu-open='false'] & { transform: scale(0); bottom: 46px; right: 36px; } `,tH=J.Z.div` border-radius: 50%; width: 56px; height: 56px; position: relative; cursor: pointer; margin-left: auto; transition: all 0.1s linear; -webkit-tap-highlight-color: transparent; [data-site-type='hb'] & { background-color: ${D.t.colors.primaryBase}; &:hover { background-color: ${D.t.colors.primaryHover}; } } [data-site-type='mb'] & { background-color: #2d87f3; &:hover { background-color: #2c74df; } } &:before { content: ''; width: 2px; height: 20px; background-color: ${D.t.colors.white}; border-radius: 2px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } &:after { content: ''; width: 20px; height: 2px; background-color: ${D.t.colors.white}; border-radius: 2px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } [data-floatmenu-open='true'] &:before, [data-floatmenu-open='true'] &:after { animation: toX ${200}ms linear 0s normal forwards; } [data-floatmenu-open='false'] &:before, [data-floatmenu-open='false'] &:after { animation: toPlus ${200}ms linear 0s normal forwards; } @keyframes toX { 0% { transform: translate(-50%, -50%) rotateZ(0deg); } 49% { transform: translate(-50%, -50%) rotateZ(0deg); } 50% { width: 2px; height: 2px; transform: translate(-50%, -50%) rotateZ(45deg); } 100% { transform: translate(-50%, -50%) rotateZ(45deg); } } @keyframes toPlus { 0% { transform: translate(-50%, -50%) rotateZ(45deg); } 49% { transform: translate(-50%, -50%) rotateZ(45deg); } 50% { width: 2px; height: 2px; transform: translate(-50%, -50%) rotateZ(0deg); } 100% { transform: translate(-50%, -50%) rotateZ(0deg); } } `,tW=J.Z.div` display: flex; gap: 8px; align-items: center; justify-content: flex-end; width: fit-content; margin-left: auto; [data-floatmenu-open='true'] { cursor: pointer; } [data-floatmenu-open='false'] { pointer-events: none; } [data-animation-type='zoom'] &, [data-animation-type='slide'] & { position: absolute; right: 0; width: max-content; } // slide [data-animation-type='slide'] & { transition: all ${200}ms ease-in; } [data-animation-type='slide'][data-floatmenu-open='true'] & { animation: showItem ${200}ms; } [data-animation-type='slide'][data-floatmenu-open='false'] & { bottom: -64px !important; animation: hideItemOnZoom ${250}ms normal forwards; } // zoom [data-animation-type='zoom'][data-floatmenu-open='false'] & { animation: hideItemOnZoom ${250}ms normal forwards; } @keyframes showItem { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes hideItemOnZoom { 0% { transform: translateX(0); opacity: 1; } 99% { transform: translateX(0); opacity: 0.5; } 100% { transform: translateX(calc(100% + 16px)); opacity: 0; } } `,tG=J.Z.div` font-size: 14px; // zoom [data-animation-type='zoom'] & { transition: transform ${200}ms ease-in-out; transform-origin: 100% 0; } [data-animation-type='zoom'][data-floatmenu-open='true'] & { transform: scale(1); } [data-animation-type='zoom'][data-floatmenu-open='false'] & { transform: scale(0); } // slide [data-animation-type='slide'] & { transition: opacity ${200}ms; } [data-animation-type='slide'][data-floatmenu-open='true'] & { opacity: 1; } [data-animation-type='slide'][data-floatmenu-open='false'] & { opacity: 0; } `,tV=J.Z.div` border-radius: 50%; box-shadow: 0px 16px 24px rgba(0, 0, 0, 0.06), 0px 2px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04); width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background-color: ${D.t.colors.white}; // zoom [data-animation-type='zoom'] & { transition: transform ${200}ms ease-in-out; } [data-animation-type='zoom'][data-floatmenu-open='true'] & { transform: scale(1); } [data-animation-type='zoom'][data-floatmenu-open='false'] & { transform: scale(0); } > img { width: 24px; height: 24px; object-fit: contain; } `,FloatButtonGroup=({items:e,className:t,style:a,backgroundPanelStyle:n,isOpen:l,onOpen:r,onClose:i,disableBackdropClick:o,siteType:s="hb",animationType:c="zoom",zIndex:d=300})=>{let[m,u]=(0,f.useState)(!!l);(0,f.useEffect)(()=>{u(!!l)},[l]);let handleClose=()=>{u(!1),i&&i()};return f.createElement(tj,{style:a,className:t,"data-floatmenu-open":m,"data-site-type":s,"data-animation-type":c},f.createElement(tZ,{className:"float-button-group__panel",style:Object.assign({zIndex:d},n),onClick:o?void 0:handleClose}),f.createElement(tF,{className:"float-button-group___content",style:{zIndex:d}},f.createElement(tR,null,e.map((t,a)=>f.createElement(tW,{className:`float-item-button-${a}`,style:Object.assign(Object.assign({},"zoom"===c&&{bottom:(e.length-1-a)*64,transitionDelay:`${200/e.length*(m?e.length-1-a:a)}ms`}),"slide"===c&&{bottom:(e.length-1-a)*64,transitionDelay:`${200/e.length*(m?a:e.length-1-a)}ms`}),key:a,onClick:()=>{t.onClick(),t.keepMenuOnClick||u(!1)}},f.createElement(tG,{style:Object.assign({},"zoom"===c&&{transitionDelay:`${200/e.length*(m?e.length-1-a:a)}ms`})},t.label),f.createElement(tV,{className:"float-item-button__icon-wrapper",style:Object.assign({},("zoom"===c||"slide"===c)&&{transitionDelay:`${200/e.length*(m?e.length-1-a:a)}ms`})},t.icon)))),f.createElement(tH,{onClick:m?handleClose:()=>{u(!0),r&&r()}})))},tU=J.Z.div` padding: 16px; width: 375px; word-wrap: break-word; word-break: break-word; ${x.M.mbDown} { width: 100%; } &[data-theme='helloSites'] { background: ${D.t.colors.secondaryBase}; box-shadow: 0px 8px 40px rgba(0, 0, 0, 0.1); } &[data-theme='marryBaby'] { border: none; background: ${D.t.mbColors.pink}; border-radius: 12px 12px 0 0; } &[data-is-open='false'] { display: none; } &[data-default-position='true'] { position: fixed; z-index: 1000; bottom: 0; right: 0; ${x.M.mbDown} { left: 0; right: unset; } } `,tY=J.Z.p` position: relative; padding-left: 24px; color: ${D.t.colors.white}; font-size: 14px; font-weight: 600; line-height: 22px; &[data-has-content='true'] { ::before { position: absolute; top: 0; bottom: 0; left: 0; width: 16px; height: 16px; margin: auto 0; content: url("data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.00001 1.33331C4.32001 1.33331 1.33334 4.31998 1.33334 7.99998C1.33334 11.68 4.32001 14.6666 8.00001 14.6666C11.68 14.6666 14.6667 11.68 14.6667 7.99998C14.6667 4.31998 11.68 1.33331 8.00001 1.33331ZM8.00001 11.3333C7.63334 11.3333 7.33334 11.0333 7.33334 10.6666V7.99998C7.33334 7.63331 7.63334 7.33331 8.00001 7.33331C8.36668 7.33331 8.66668 7.63331 8.66668 7.99998V10.6666C8.66668 11.0333 8.36668 11.3333 8.00001 11.3333ZM7.33334 5.99998H8.66668V4.66665H7.33334V5.99998Z' fill='white'/%3e%3c/svg%3e"); } } `,tQ=J.Z.p` margin-top: 2px; color: ${D.t.colors.white}; font-size: 12px; font-weight: 400; line-height: 18px; a { color: ${D.t.colors.white}; text-decoration: none; text-decoration-line: underline; } `,tq=J.Z.div` display: flex; align-items: center; margin-top: 8px; gap: 16px; `,tK=J.Z.div` padding: 7px 28px; background: ${D.t.colors.white}; border-radius: ${D.t.borderRadius}; color: ${D.t.colors.secondaryBase}; cursor: pointer; font-size: 12px; font-weight: 600; line-height: 18px; `,tX=J.Z.a` color: ${D.t.colors.white}; font-size: 12px; font-weight: 600; line-height: 22px; text-decoration: none; text-decoration-line: underline; `,CookieAcceptConfirm=({className:e,policiesUrl:t,onAcceptClick:a,translations:n={acceptButton:"Accept",policiesButton:"Our Policies"},title:l="",description:r="",theme:i="helloSites",isOpen:o=!0,useDefaultPosition:s=!0,trackingAttributes:c})=>f.createElement(tU,{className:e,"data-theme":i,"data-is-open":o,"data-default-position":s},f.createElement(tY,{"data-has-content":!!l},l),f.createElement(tQ,{dangerouslySetInnerHTML:{__html:r}}),f.createElement(tq,null,f.createElement(tK,{role:"button",tabIndex:0,onClick:a,"data-event-category":null==c?void 0:c.dataEventCategory,"data-event-action":null==c?void 0:c.dataEventAction,"data-event-label":null==c?void 0:c.dataEventLabel},n.acceptButton),f.createElement(tX,{href:t},n.policiesButton))),tJ=er.F4` from { transform: translateY(100%); visibility: visible; } to { transform: translateY(0); } `,t0=er.F4` from { transform: translate(0, 0); } to { visibility: hidden; transform: translate(0, 100%); } `,t1=J.Z.div` cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-items: center; gap: 4px; .mobile-navigation-label { font-weight: 500; font-size: 10px; line-height: 16px; color: ${D.t.colors.gray600}; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 60px; text-align: center; ${x.M.mbDown} { max-width: 60px; } } .mobile-navigation-icon { position: relative; height: 24px; &[data-no-label='true'] { border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0px; gap: 16px; width: 40px; height: 40px; } } &[data-is-special='true'] { display: flex; flex-direction: row; align-items: center; padding: 4px 12px 4px 6px; gap: 4px; min-width: 152px; height: 32px; /* Neutral/Neutral-50 */ background: ${D.t.colors.primary50}; border-radius: 20px; flex-grow: 1; .mobile-navigation-icon { &[data-no-label='true'] { width: 24px; height: 24px; } } .mobile-navigation-label { max-width: max-content; color: ${D.t.colors.primaryBase}; } } &[data-is-active='true'] { .mobile-navigation-label { color: ${D.t.colors.primaryBase}; } } &[data-is-disabled='true'] { opacity: 0.2; } `,t2=J.Z.div` z-index: 100; position: fixed; bottom: 0; left: 0; width: 100%; height: 100%; max-height: 56px; min-height: 56px; display: flex; height: 100%; align-items: center; justify-content: space-evenly; background-color: ${D.t.colors.white}; @supports (padding-bottom: env(safe-area-inset-bottom)) { min-height: calc(56px + env(safe-area-inset-bottom)); max-height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); } & > div { flex: 1; } a { text-decoration: none; } &[data-is-collapsed='true'] { animation: ${t0} 500ms ease-in-out forwards; } &[data-is-collapsed='false'] { animation: ${tJ} 500ms ease-in-out forwards; } &[data-template='health-tool'] { height: 44px; max-height: 44px; min-height: 44px; justify-content: space-between; & > div { flex: 0; } } `,t3=J.Z.span` position: absolute; left: 100%; transform: translate(-10px, calc(-50% + 3px)); background-color: ${D.t.colors.green800}; border-radius: 32px; border: 2px solid ${D.t.colors.white}; padding: 1px 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 20px; aspect-ratio: 1; &[data-no-label='true'] { left: 0; transform: translate(22px, -50%); } `;J.Z.div` position: absolute; top: 0; left: 0; height: 3px; background-color: ${D.t.colors.primaryBase}; transition: width 150ms linear; `,J.Z.div` a { text-decoration: none; } `;let MobileBottomNavigationIcon=e=>{var{badgeAmount:t,disabled:a=!1,hasBadge:n=!1,icon:l,isActive:r=!1,isSpecial:i=!1,label:o}=e,s=(0,k._)(e,["badgeAmount","disabled","hasBadge","icon","isActive","isSpecial","label"]);return f.createElement(t1,Object.assign({"data-is-special":i,"data-is-active":r,"data-is-disabled":a},s),f.createElement("div",{className:"mobile-navigation-icon","data-no-label":!o},n&&f.createElement(t3,{"data-no-label":!o},f.createElement(y.T,{size:"s5",weight:"semiBold",color:i?D.t.colors.primaryBase:D.t.colors.white},t)),l),o&&f.createElement("span",{className:"mobile-navigation-label"},o))},MobileBottomNavigation=e=>{var{children:t,isCollapsed:a=!1,template:n="homepage"}=e,l=(0,k._)(e,["children","isCollapsed","template"]);return f.createElement(t2,Object.assign({"data-is-collapsed":a,"data-template":n},l),t)};MobileBottomNavigation.Icon=MobileBottomNavigationIcon;let SeoHead=({SEOData:e={},locale:t="vi-VN",routerPathname:a,routerQuery:n,nextHead:l,siteType:r,seoCustom:i,userId:o,forcedCanonicalUrl:s})=>{var c,d,m,u,p,g,h,v,b,y,E,x;let{totalPages:w,currentPage:C,SEOTitle:k="",SEODescription:B="",SEOImage:N,seoType:S,SEOImageWidth:T,SEOImageHeight:D,customMetaData:M=[],isIndexable:I=!0,hasNoCanonical:$=!1}=e,z=I&&eo.i?"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1":"noindex",{NEXT_PUBLIC_BASE_API_URL:P}=e5.env,A=e.canonicalUrl||a;Object.keys(n).forEach(e=>{let t=n[e];t&&Array.isArray(t)&&(A=A.replace(`[...${e}]`,t.join("/")))});let L=t||"en-PH",O="helloSites"===r?Q.d[L]:"www.marrybaby.vn",_=A.endsWith("/")?"":"/",j=(0,f.useMemo)(()=>{var a,n,l,r,i,o,s;let c="";if(e.apiMetaData&&"string"==typeof e.apiMetaData){let d=null===(a=e.apiMetaData)||void 0===a?void 0:a.match(/(.*)<\/title>/),m=` - Page ${C} of ${w}`,u=C&&1!==C&&d?e.apiMetaData.replace(d[0],d[0].includes("-")?d[0].replace("-",m+" - "):`${d[1].concat(m)}`).replace(``,``):e.apiMetaData;if(!(c=(0,ei.ZP)(u,{trim:!0})).find(e=>{var t,a;return(null===(t=e.props)||void 0===t?void 0:t.property)==="og:image"||(null===(a=e.props)||void 0===a?void 0:a.property)==="og:image:secure_url"})){let a=`https://${O}/images/${t}.png`;c=[...c,f.createElement("meta",{key:"og:image",property:"og:image",content:(null===(n=e.openGraph)||void 0===n?void 0:n.image)||N||a||""}),f.createElement("meta",{key:"og:image:secure_url",property:"og:image:secure_url",content:(null===(l=e.openGraph)||void 0===l?void 0:l.image)||N||a}),f.createElement("meta",{key:"og:image:width",property:"og:image:width",content:(null===(r=e.openGraph)||void 0===r?void 0:r.imageWidth)&&String(null===(i=e.openGraph)||void 0===i?void 0:i.imageWidth)||T&&String(T)||"1200"}),f.createElement("meta",{key:"og:image:height",property:"og:image:height",content:(null===(o=e.openGraph)||void 0===o?void 0:o.imageHeight)&&String(null===(s=e.openGraph)||void 0===s?void 0:s.imageHeight)||D&&String(D)||"630"})]}}return c},[e.apiMetaData,e.openGraph,N,D,T,C,A,w,t,O]),Z=`https://${O}/images/${t}.png`;return f.createElement(l,null,f.createElement("link",{rel:"preconnect",href:"https://fonts.gstatic.com"}),"marryBaby"===r?f.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap",rel:"stylesheet"}):"km-KH"===t?f.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Battambang:wght@400;700&display=swap",rel:"stylesheet"}):"th-TH"===t?f.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wdth,wght@62.5..100,100..900&display=swap",rel:"stylesheet"}):f.createElement("link",{href:"https://fonts.googleapis.com/css2?family=Inter:wght@400..800&display=swap",rel:"stylesheet"}),f.createElement("link",{rel:"preconnect",href:P}),f.createElement("meta",{charSet:"UTF-8"}),f.createElement("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover"}),f.createElement("meta",{name:"google",content:"notranslate"}),f.createElement("meta",{name:"robots",content:z}),f.createElement("meta",{property:"fb:app_id",content:"653713035016537"}),M.map((e,t)=>f.createElement("meta",Object.assign({key:t},e))),f.createElement("meta",{name:"theme-color",content:"helloSites"===r?"#2c87f3":"#e85388"}),f.createElement("meta",{name:"page_type",content:"Home"}),f.createElement("meta",{name:"page_platform",content:"WEB"}),f.createElement("meta",{name:"page_language",content:L}),f.createElement("meta",{name:"ahrefs-site-verification",content:"46e7521a2b89a1013149c4685bbe02a1d36a4732fef98655142b829bc87cba4d"}),!j&&f.createElement(f.Fragment,null,"helloSites"===r?f.createElement("title",null,i?k:k+" - "+(null===(c=Q.L[t])||void 0===c?void 0:c.SITE_NAME)):f.createElement("title",null,k),!$&&f.createElement("link",{rel:"canonical",href:`https://${O}${A}`}),f.createElement("meta",{name:"description",content:B||(null===(d=e.openGraph)||void 0===d?void 0:d.description)}),e.schemaData&&f.createElement("script",{type:"application/ld+json",className:"yoast-schema-graph",dangerouslySetInnerHTML:{__html:e.schemaData}}),f.createElement("meta",{property:"og:locale",content:t}),f.createElement("meta",{property:"og:type",content:S||"website"}),f.createElement("meta",{property:"og:title",content:(null===(m=e.openGraph)||void 0===m?void 0:m.title)||k}),f.createElement("meta",{property:"og:description",content:(null===(u=e.openGraph)||void 0===u?void 0:u.description)||B}),f.createElement("meta",{property:"og:url",content:`https://${O}${A}`}),f.createElement("meta",{property:"og:site_name",content:`https://${O}`}),f.createElement("meta",{property:"og:image",content:(null===(p=e.openGraph)||void 0===p?void 0:p.image)||N||Z||""}),f.createElement("meta",{property:"og:image:secure_url",content:(null===(g=e.openGraph)||void 0===g?void 0:g.image)||N||Z}),f.createElement("meta",{property:"og:image:width",content:(null===(h=e.openGraph)||void 0===h?void 0:h.imageWidth)&&String(null===(v=e.openGraph)||void 0===v?void 0:v.imageWidth)||T&&String(T)||"1200"}),f.createElement("meta",{property:"og:image:height",content:(null===(b=e.openGraph)||void 0===b?void 0:b.imageHeight)&&String(null===(y=e.openGraph)||void 0===y?void 0:y.imageHeight)||D&&String(D)||"630"}),f.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),f.createElement("meta",{name:"twitter:title",content:(null===(E=e.twitter)||void 0===E?void 0:E.title)||k}),f.createElement("meta",{name:"twitter:description",content:B}),f.createElement("meta",{name:"twitter:image",content:(null===(x=e.twitter)||void 0===x?void 0:x.image)||N})),("helloSites"===r?Q.F[L]||[]:Q.F.marryBaby).map((e,t)=>"link"===e.type?f.createElement("link",{key:`favicon-${t}`,rel:e.rel,href:e.href,sizes:e.sizes}):"meta"===e.type?f.createElement("meta",{key:t,name:e.name,content:e.content}):null),Array.isArray(j)&&s?j.filter(e=>"canonical"!==e.props.name&&"canonical"!==e.props.rel):j,s&&f.createElement("link",{rel:"canonical",href:s}),!e.hasNoAmp&&"vi-VN"!==t&&f.createElement("link",{rel:"amphtml",href:`https://${O}${A}${_}?amp=1`}),o&&"undefined"!=typeof window?f.createElement("script",{dangerouslySetInnerHTML:{__html:`window.dataLayer = window.dataLayer || []; window.dataLayer.push({'userID': '${o}'});`}}):null)},t5=(0,ek.s)(J.Z.div` position: relative; width: 100%; height: 100%; background: ${e=>e.bgColor}; background-color: inherit; &[data-site='marryBaby'] { background-color: ${e=>e["data-banner-color"]||"#5EC08F"}; background-image: none; padding-bottom: 0; &[data-is-embedded='true'] { border-top-left-radius: 16px; border-top-right-radius: 16px; } } `,"hhgcomp-toolbanner-wrapper"),t6=J.Z.div` width: 100%; ${x.M.mbDown} { padding-bottom: 24px; } a { text-decoration: none; color: inherit; } &[data-site='marryBaby'] { a { text-decoration: underline; } ${x.M.mbDown} { padding-bottom: 0; } } ${x.M.tdDown} { height: auto; ${t5.classSelector} { .${"hhgcomp-toolbanner-inner"} { display: flex; align-items: center; ${x.M.mbDown} { justify-content: space-between; } .${"hhgcomp-toolbanner-iconcontainer"} { position: relative; right: -50px; bottom: -20px; width: 110px; min-width: 0; height: auto; min-height: 0; align-self: flex-end; margin-bottom: -20px; ${x.M.mbDown} { right: unset; } } } } } `,t4=J.Z.div` display: flex; flex-direction: row; align-items: center; padding: 16px 24px; gap: 16px; width: 100%; /* background-color: ; */ ${x.M.mbDown} { padding: 16px 0; } `,t7=J.Z.div` background: #ffffff; border-radius: 16px; width: 48px; height: 48px; position: relative; img { position: absolute; top: 50%; left: 50%; max-width: 24px; max-height: 24px; transform: translate(-50%, -50%); } `,t8=J.Z.div` display: flex; align-items: flex-start; flex-direction: column; justify-content: space-between; gap: 0; width: 100%; `,t9=J.Z.div` display: flex; align-items: flex-start; font-weight: 400; font-size: 12px; line-height: 18px; letter-spacing: -0.2px; color: #f3f3f3; > img { margin-top: 2px; margin-right: 4px; } &[data-is-mobile='false'] { > img { width: 16px; height: 16px; } } &[data-is-mobile='true'] { > img { width: 14px; height: 14px; } } `,ToolsBannerCard=({className:e,heading:t,color:a="blue",isMobile:n,bannerUrl:l,bannerUrlLarge:r,bannerColor:i,medicalReview:o={link:"#",reviewer:"",date:""},icon:s,style:c,siteType:d,isEmbeded:m})=>{var u,p;let{t:g}=(0,es.u)(),h=(0,j.rZ)(),v={pink:[8,6]},b=h.colors[a]||h.colors.blue,E=(null==o?void 0:o.reviewer)?f.createElement(y.T,{size:"label2",color:"#fff",as:"div",className:"embedded-review",sx:{a:{textUnderlineOffset:"2px",color:"#fff",textDecoration:"underline"}}},f.createElement("div",{dangerouslySetInnerHTML:{__html:g("toolPage.toolReviewer",{expert_name:`${o.reviewer.trim()}`,date:o.date})}})):null;return f.createElement(t6,{"data-is-mobile":n,style:c,"data-site":d},f.createElement(t5,{className:e,"data-banner-url":n?l:r||l,"data-is-mobile":n,"data-site":d,"data-banner-color":i,"data-is-embedded":m,bgColor:`linear-gradient(71deg, ${null==b?void 0:b[(null===(u=v[a])||void 0===u?void 0:u[0])||7]} -4.07%, ${null==b?void 0:b[(null===(p=v[a])||void 0===p?void 0:p[1])||4]} 90.13%)}`},"marryBaby"===d&&m?f.createElement(t4,null,f.createElement(t7,null,s),f.createElement(t8,null,f.createElement(T.H,{color:"white",tag:"h5",as:"h2"},t),o&&f.createElement(t9,{"data-is-mobile":n},E))):f.createElement($.k,{gap:(0,z.h)(24),align:"center",justify:"space-between",sx:{padding:`${(0,z.h)(13)} ${(0,z.h)(20)}`,gap:(0,z.h)(24)}},f.createElement(M.x,null,f.createElement(T.H,{tag:"h5",as:"h2",color:"#fff"},t),o&&f.createElement(y.T,{size:"n1",as:"div"},E)),f.createElement($.k,{justify:"center",align:"center",sx:e=>{var t,n;return{width:(0,z.h)(64),height:(0,z.h)(64),borderRadius:"50%",background:(null===(n=null===(t=e.colors)||void 0===t?void 0:t[a])||void 0===n?void 0:n[0])||e.colors.blue[0],flexShrink:0,img:{maxWidth:(0,z.h)(48),maxHeight:(0,z.h)(48)},[e.fn.smallerThan("sm")]:{width:(0,z.h)(56),height:(0,z.h)(56),img:{maxWidth:(0,z.h)(40),maxHeight:(0,z.h)(40)}}}}},s))))},ae=(0,J.Z)(eT.D)` border-color: ${D.t.mbColors.lightGray}; background-color: ${D.t.colors.white}; border-radius: 16px; transition: all 0.2s ease; &:hover { border-color: ${D.t.mbColors.pink}; box-shadow: none; } & > ul { z-index: ${ek.Z.menuSearchPopup}; max-height: 300px; overflow-y: auto; } ${e=>e.groupedWithLabel&&er.iv` & > div:first-child { color: ${D.t.mbColors.midGray}; font-size: 12px; } `} &[data-dropdown-open='true'] { border-color: ${D.t.mbColors.pink}; } `;(0,J.Z)(E.P)` & input, .mantine-Input-input { border-color: ${D.t.mbColors.lightGray}; background-color: ${D.t.colors.white}; border-radius: 16px; transition: all 0.2s ease; &:focus, &:hover { border-color: ${D.t.mbColors.pink}; box-shadow: none; } } & .displayIcon { pointer-events: none; } `;let at=(0,J.Z)(el.I)` & label { position: absolute; z-index: 1; top: 16px; left: 16px; color: ${D.t.mbColors.midGray}; pointer-events: none; transition: all 0.2s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; &[data-size='label2'] { font-size: 12px; } ${x.M.tdDown} { max-width: 220px; } } & input, .mantine-Input-input { ::placeholder { color: ${D.t.mbColors.gray}; font-size: 14px; } ::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: ${D.t.mbColors.gray}; font-size: 14px; } ::-moz-placeholder { /* Firefox 19+ */ color: ${D.t.mbColors.gray}; font-size: 14px; } :-ms-input-placeholder { /* IE 10+ */ color: ${D.t.mbColors.gray}; font-size: 14px; } :-moz-placeholder { /* Firefox 18- */ color: ${D.t.mbColors.gray}; font-size: 14px; } height: ${e=>"sm"===e.size?48:72}px !important; padding-top: 27px !important; border-color: ${D.t.mbColors.lightGray} !important; background-color: ${D.t.colors.white}; border-radius: 16px !important; transition: all 0.2s ease; padding-top: ${e=>e.value?"38px":"27px"} !important; &:focus, &:hover { border-color: ${D.t.mbColors.pink}; box-shadow: none; } } .mantine-Input-rightSection, .mantine-Input-leftSection { padding-top: 20px; } &[data-has-action-icon] { input, .mantine-Input-input { padding-top: ${e=>e.value?"38px":"27px"} !important; padding-bottom: ${e=>e.value?"16px":"27px"} !important; height: unset !important; } label { position: absolute; z-index: 1; top: 16px; padding-right: 46px; } } `,aa=J.Z.div` width: 100%; `,an=J.Z.div` #due-date-dropdown { z-index: 9; width: 100%; min-width: unset; max-width: unset; ${x.M.mbDown} { font-size: 14px; } ${x.M.tdUp} { font-size: 16px; &[data-is-side='true'] { font-size: 14px; } } color: ${D.t.colors.gray800}; > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } } display: flex; width: 100%; justify-content: space-between; `,al=(0,J.Z)(aa)` .due-date-input { width: 100%; min-width: unset; max-width: unset; color: ${D.t.colors.gray800}; } .due-date-calculate-button { margin-right: auto; margin-left: auto; } input { &[data-is-side='true'] { ${x.M.tdUp} { font-size: 14px; } } ${x.M.mbDown} { font-size: 14px; } ${x.M.tdUp} { font-size: 16px; } } `;J.Z.div` display: flex; align-items: right; & > p { display: inline-block; border-bottom: solid 1px ${D.t.colors.primaryBase}; margin-bottom: 24px; margin-left: auto; color: ${D.t.colors.primaryBase}; cursor: pointer; font-size: 11px; line-height: 16px; text-align: right; } `;let ar=J.Z.img` img& { width: 16px; height: 16px; } `;(0,J.Z)(ar)` margin-right: 4px; `,(l=m||(m={}))[l.lastPeriod=0]="lastPeriod",l[l.conception=1]="conception",l[l.IVF=2]="IVF";let ai="yyyy-MM-dd",getDueDateLastPeriod=(e,t)=>{let a=new Date(e);return a.setDate(a.getDate()+(272+(t-21))),{startDate:e,dueDate:a,otherInfo:{method:m.lastPeriod+1,first_day:(0,ec.Z)(e,ai),cycle_length_days:t,conception_date:null,ivf_transfer_date:null,days_transfer:null}}},getDueDateConception=e=>{let t=new Date(e);return t.setDate(t.getDate()+265),{startDate:e,dueDate:t,otherInfo:{method:m.conception+1,conception_date:(0,ec.Z)(e,ai),first_day:null,cycle_length_days:null,ivf_transfer_date:null,days_transfer:null}}},getDueDateIVF=(e,t)=>{let a=new Date(e);return a.setDate(a.getDate()+265-t),{startDate:e,dueDate:a,otherInfo:{method:m.IVF+1,ivf_transfer_date:(0,ec.Z)(e,ai),days_transfer:t,conception_date:null,first_day:null,cycle_length_days:null}}},DateToInputValue=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`,DueDateFormConception=({locale:e,onClick:t,siteType:a,pageUrl:n})=>{let{t:l}=(0,es.u)(),[r,i]=(0,f.useState)(new Date);return f.createElement(f.Fragment,null,f.createElement(al,{className:"input-form","data-is-side":!0},"marryBaby"===a?f.createElement(at,{label:l("dueDatePage.conceptionDate"),name:"date",size:"md",value:DateToInputValue(r),CustomInput:f.createElement(eB.D,{onChange:e=>{i(e)},placeholder:"dd/mm/yyyy",pickedDate:r,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:new Date(new Date().getTime()-24192e6)},customInput:e=>f.createElement(el.I,Object.assign({className:"due-date-input",name:"birthday",size:"md"},e,{value:r&&ew()(r).format(ek.b)}))}),actionIcon:f.createElement(N.Z,{size:32})}):f.createElement(el.I,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},l("dueDatePage.conceptionDate")),value:DateToInputValue(r),name:"date",size:"md",className:"due-date-input",CustomInput:f.createElement(eB.D,{customInput:e=>f.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:DateToInputValue(r)})),disabledDays:{before:new Date(new Date().getTime()-24192e6)},locale:e,pickedDate:r,displayDateFormat:eC.D,onChange:e=>{i(e)},placeholder:"placeholder"})})),f.createElement(w.B,{className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===a?"secondary":"primary",dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:n,onClick:()=>{t(getDueDateConception(r),`${Q.Q.type}=1&sd=${(0,ec.Z)(r,ai)}&${Q.Q.additional}= `)},role:"button"},l("dueDatePage.lastPeriod.calculate")))},DueDateFormIVF=({locale:e,onClick:t,siteType:a,pageUrl:n})=>{let{t:l}=(0,es.u)(),[r,i]=(0,f.useState)(new Date),[o,s]=(0,f.useState)("3");return f.createElement(f.Fragment,null,f.createElement(al,{className:"input-form","data-is-side":!0},"marryBaby"===a?f.createElement(at,{label:l("dueDatePage.ivf.transferDate"),name:"date",size:"md",value:DateToInputValue(r),CustomInput:f.createElement(eB.D,{onChange:e=>{i(e)},placeholder:"dd/mm/yyyy",pickedDate:r,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:new Date(new Date().getTime()-24192e6)},customInput:e=>f.createElement(el.I,Object.assign({className:"due-date-input",name:"birthday",size:"md"},e,{value:r&&ew()(r).format(ek.b)}))}),actionIcon:f.createElement(N.Z,{size:32})}):f.createElement(el.I,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray700,style:{marginBottom:"9px",flex:"1"}},l("dueDatePage.ivf.transferDate")),value:DateToInputValue(r),name:"date",size:"md",className:"due-date-input",CustomInput:f.createElement(eB.D,{customInput:e=>f.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:DateToInputValue(r)})),disabledDays:{before:new Date(new Date().getTime()-24192e6)},locale:e,pickedDate:r,displayDateFormat:eC.D,onChange:e=>{i(e)},placeholder:"placeholder"})})),f.createElement("div",{style:{width:"100%"}},f.createElement(th,{id:"radio-transfer-date",direction:"vertical",size:"small",value:o,onChange:e=>s(e),options:[{value:"3",label:l("dueDatePage.ivf.transferDateRadio",{number:3})},{value:"5",label:l("dueDatePage.ivf.transferDateRadio",{number:5})}]})),f.createElement(w.B,{className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===a?"secondary":"primary",dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:n,onClick:()=>{t(getDueDateIVF(r,Number(o)),`${Q.Q.type}=2&${Q.Q.startDate}=${(0,ec.Z)(r,ai)}&${Q.Q.additional}=${o}`)},role:"button"},l("dueDatePage.lastPeriod.calculate")))},DueDateFormLastPeriod=({locale:e,onClick:t,siteType:a,pageUrl:n})=>{let{t:l}=(0,es.u)(),[r,i]=(0,f.useState)(28),[o,s]=(0,f.useState)(new Date);return f.createElement(f.Fragment,null,f.createElement(al,{className:"input-form","data-is-side":!0},"marryBaby"===a?f.createElement(at,{label:l("dueDatePage.lastPeriod.lastPeriodLabel"),name:"date",size:"md",value:DateToInputValue(o),CustomInput:f.createElement(eB.D,{onChange:e=>{s(e)},placeholder:"dd/mm/yyyy",pickedDate:o,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:new Date(new Date().getTime()-24192e6)},customInput:e=>f.createElement(el.I,Object.assign({name:"birthday",size:"md"},e,{value:o&&ew()(o).format(ek.b)}))}),actionIcon:f.createElement(N.Z,{size:32})}):f.createElement(el.I,{className:"input-section due-date-input",label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},l("dueDatePage.lastPeriod.lastPeriodLabel")),value:DateToInputValue(o),name:"date",size:"md",CustomInput:f.createElement(eB.D,{customInput:e=>f.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:DateToInputValue(o)})),disabledDays:{before:new Date(new Date().getTime()-24192e6)},locale:e,pickedDate:o,displayDateFormat:eC.D,onChange:e=>{s(e)},placeholder:"placeholder"})})),f.createElement("div",{className:"slider-due-date","data-theme":"marryBaby"===a?"marryBaby":""},"marryBaby"===a?f.createElement(eN.M,{type:"bodytext-3",color:D.t.mbColors.midGray},l("dueDatePage.lastPeriod.periodLengthLabel")):f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600,style:{marginBottom:"0.5rem"}},l("dueDatePage.lastPeriod.periodLengthLabel")),f.createElement("div",{className:"slider-outer-wrapper"},"marryBaby"===a&&f.createElement(y.T,{size:"s3",weight:"semiBold",color:D.t.colors.gray600},r),f.createElement(eS.S,{containerStyle:{flex:1},min:20,max:40,step:1,labelAlwaysOn:"marryBaby"!==a,withControl:"marryBaby"!==a,onChange:i,value:r,label:"marryBaby"!==a?void 0:null}))),f.createElement(w.B,{dataEventCategory:"Health Tool",dataEventAction:"Due Date",dataEventLabel:n,className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===a?"secondary":"primary",onClick:()=>t(getDueDateLastPeriod(o,r),`${Q.Q.type}=0&${Q.Q.startDate}=${(0,ec.Z)(o,ai)}&${Q.Q.additional}=${r}`),role:"button"},l("dueDatePage.lastPeriod.calculate")))},ao=J.Z.div` &[data-is-side='true'] { width: 100%; margin-bottom: 0; } ${x.M.mbDown} { width: 100%; margin-bottom: 0; } margin-bottom: 24px; & > :not(:last-child) { margin-bottom: 8px; } .gender-selector { & > :not(:last-child) { margin-right: 16px; } & > div { width: calc(50% - 8px); ${x.M.mbUp} { max-width: 186px; justify-self: left; } } } `,as=J.Z.div` margin-bottom: 20px; width: 100%; & > :not(:last-child) { margin-bottom: 8px; } .gender-selector { & > div { width: calc(50% - 8px); } } `,ac=J.Z.div` width: 100%; display: flex; justify-content: center; ${x.M.mbUp} { padding: 0 16px; &[data-is-side='true'] { margin-top: 24px; } } ${x.M.mbDown} { margin-top: 24px; &[data-site='marryBaby'] { margin-top: 12px; } } & > :not(:last-child) { margin-bottom: 8px; } button { width: 100%; margin: auto; ${x.M.mbUp} { max-width: 200px; } } `,ad=J.Z.div` width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; .input-section { display: flex; flex-direction: column; } ${x.M.mbDown} { flex-direction: column; .input-section { width: 100%; } } `,am=J.Z.div` position: relative; width: calc(50% - 8px); &[data-is-side='true'] { .label { margin-bottom: 9px; } } ${x.M.mbDown} { .label { margin-bottom: 9px; } } margin-bottom: 24px; #weight-gain-dropdown { z-index: 9; width: 100%; min-width: unset; max-width: unset; color: ${D.t.colors.gray800}; & > ul { z-index: 1; max-height: 300px; overflow-y: scroll; } } `,au=J.Z.div` margin-bottom: 24px; width: 100%; ${x.M.mbUp} { padding: 0 16px; } .card { display: flex; align-items: center; justify-content: space-between; & > :not(:last-child) { margin-bottom: 8px; } .gender-selector { row-gap: 12px; & > :not(:last-child) { margin-right: 16px; } & > div { ${x.M.mbUp} { width: calc(18% - 4px); max-width: 186px; justify-self: left; } ${x.M.mbDown} { width: calc(31% - 8px); max-width: 109px; justify-self: left; } } } .gender-image { width: 23px; height: 36px; object-fit: contain; } } .note { display: flex; align-items: center; padding-top: 8px; padding-bottom: 16px; } `,DueDateCalculator=({onSubmitDueDate:e,locale:t,isSide:a,siteType:n})=>{let{t:l}=(0,es.u)(),[r,i]=(0,f.useState)(m.lastPeriod),o=[{value:m.lastPeriod,label:l("dueDatePage.lastPeriod")},{value:m.conception,label:l("dueDatePage.conceptionDate")},{value:m.IVF,label:l("dueDatePage.ivf")}],s=(0,f.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]);return f.createElement(ad,null,f.createElement(aa,{className:"input-form input-section","data-is-side":!0},"marryBaby"===n?f.createElement(ae,{groupedWithLabel:l("dueDatePage.calculationMethod"),options:o,placeholder:l("dueDatePage.lastPeriod"),id:"due-date-dropdown",size:"lg",value:o[r],onChange:e=>{i(e.value)}}):f.createElement(f.Fragment,null,f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},l("dueDatePage.calculationMethod")),f.createElement(an,{"data-is-side":a},f.createElement(eT.D,{options:o,placeholder:l("dueDatePage.lastPeriod"),id:"due-date-dropdown",size:"md",value:o[r],onChange:e=>{i(e.value)}})))),r===m.lastPeriod?f.createElement(DueDateFormLastPeriod,{locale:t,onClick:e,isSide:a,siteType:n,pageUrl:s}):null,r===m.conception?f.createElement(DueDateFormConception,{locale:t,onClick:e,isSide:a,siteType:n,pageUrl:s}):null,r===m.IVF?f.createElement(DueDateFormIVF,{locale:t,onClick:e,isSide:a,siteType:n,pageUrl:s}):null)},ap=(0,ek.s)(J.Z.form` margin: auto; ${x.M.mbUp} { width: 100%; padding: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; } ${x.M.mbDown} { padding: 16px; } .due-date-calculate-button { width: 100%; margin: 12px auto 0; ${x.M.mbUp} { max-width: 200px; } } &[data-is-side='true'] { ${x.M.mbUp} { padding: 24px 40px 0px 40px; } } .input-weight-form { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 0 16px; } .input-form { display: flex; ${x.M.mbUp} { margin-bottom: 24px; width: calc(50% - 8px); } &[data-is-side='true'] { ${x.M.mbUp} { margin-bottom: 8px; width: 100%; } } ${x.M.mbDown} { margin-bottom: 8px; } .label-text { overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; } } .input-form-pwg { display: flex; width: calc(50% - 8px); ${x.M.mbUp} { margin-bottom: 24px; } &[data-is-side='true'] { ${x.M.mbUp} { margin-bottom: 8px; } } ${x.M.mbDown} { margin-bottom: 8px; width: 100%; } .label-text { overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; } } .day-slider { width: 100%; ${x.M.mbUp} { width: calc(50% - 8px); &[data-is-side='true'] { width: 100%; } } } `,"hhgcomp-embedtoolcard-content"),ag=J.Z.div` padding: 0; background-color: white; border: 1px solid #e4e8ec; border-radius: 4px; &[data-site='marryBaby'] { background-color: ${D.t.mbColors.green}; border-radius: 16px; } .due-date-cal { ${ap.classSelector} { ${x.M.mbUp} { padding: 24px; } ${x.M.mbDown} { padding: 16px; } } display: table; width: 100%; .slider-due-date { margin-bottom: 12px; width: 100%; margin-left: 0px; margin-right: 0px; .slider-outer-wrapper { margin: 2rem -0.5rem 1rem; } &[data-theme='marryBaby'] { padding: 1rem; background: white; border-radius: 1rem; .slider-outer-wrapper { gap: 12px; display: flex; align-items: center; margin: 0.5rem; } } } .input-form { display: flex; ${x.M.mbUp} { width: calc(50% - 8px); margin-bottom: 24px; } &[data-is-side='true'] { ${x.M.mbUp} { margin-bottom: 12px; width: 100%; } } ${x.M.mbDown} { margin-bottom: 8px; } } } .heart-rate-cal { .slider-heart-rate { margin-bottom: 12px; width: 100%; margin-left: 0px; margin-right: 0px; .slider-outer-wrapper { margin: 2rem -0.5rem 1rem; } } } .ovulation-cal { display: flex; /* padding-top: 24px; */ justify-content: space-between; flex-wrap: wrap; .slider-ovulation { margin-bottom: 12px; /* width: 100%; */ margin-left: 0px; margin-right: 0px; .slider-outer-wrapper { margin: 2rem -0.5rem 1rem; } &[data-theme='marryBaby'] { padding: 1rem; background: white; border-radius: 1rem; .slider-outer-wrapper { gap: 12px; display: flex; align-items: center; margin: 0.5rem; } } } .input-form { display: flex; ${x.M.mbUp} { width: calc(50% - 8px); margin-bottom: 24px; &[data-is-side='true'] { margin-bottom: 12px; width: 100%; } } ${x.M.mbDown} { margin-bottom: 8px; } } } .pwg-view-mobile { &[data-is-side='true'] { display: flex; flex-wrap: wrap; justify-content: space-between; } ${x.M.mbDown} { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 16px 0; } .hide-asking-mobile { gap: 10px; &[data-is-side='true'] { ${x.M.mbUp} { display: none; } } ${x.M.mbDown} { display: none; } } .hide-asking-desk { gap: 10px; &[data-is-side='true'] { ${x.M.mbUp} { display: unset; } } ${x.M.mbUp} { display: none; } } } input[type='date']::after { width: 16px; height: 16px; background-image: url('https://hellobacsi.blog/svg/calendar.svg'); background-repeat: no-repeat; background-size: contain; content: ''; } `,ah=(0,J.Z)(th)` &[data-direction='horizontal'] div[data-type='circle'] { margin-right: 8px; } label { font-size: 14px; } `,DueDateCardEmbed=({isMobile:e,locale:t,onSubmitDueDate:a,dueDatePageInfo:n,expertUrl:l,isSide:r,siteType:i})=>{var o;let{t:s}=(0,es.u)();return f.createElement(ag,{"data-is-side":r,"data-site":i},f.createElement(ToolsBannerCard,{isSide:r,siteType:i,bannerColor:"marryBaby"===i&&D.t.mbColors.mint,isEmbeded:!0,color:"pink",icon:f.createElement("img",{alt:"health-tool-icon",src:(null==n?void 0:n.featured_image)||S.C.getAssetPath("health-tools/due-date-icon.svg"),loading:"lazy"}),heading:s("healthTools.dueDateCalculator"),medicalReview:{link:l,reviewer:null===(o=null==n?void 0:n.reviewed_by)||void 0===o?void 0:o.display_name,date:null==n?void 0:n.reviewed_date},isMobile:e}),f.createElement(ap,{onSubmit:e=>e.preventDefault(),className:"due-date-cal","data-is-side":r},f.createElement(DueDateCalculator,{siteType:i,locale:t,onSubmitDueDate:a,isSide:r})))},av=(0,f.createContext)({}),ab=(0,J.Z)(w.B)` margin: 0 auto 24px; ${x.M.mbUp} { max-width: 200px; margin: 24px auto; } `,af=(0,J.Z)(E.P)` &.bmi--input { + .bmi--input { margin-top: 24px; } .inputLabel { display: inline-block; margin-bottom: 5px; color: #595959; font-weight: bold; font-size: 12px; } .errorLabel { line-height: 1.3; } input[type='radio'] { padding: 0; } .bmi--input-radio_gender { width: 100%; gap: 16px; > div { ${x.M.mbDown} { width: calc(50% - 8px); } width: calc(33% - 8px); } & > div > div { display: flex; flex-direction: row; justify-content: center; align-content: center; gap: 8px; padding-block: 5px; } } .bmi-side-embed { > div { ${x.M.mbUp} { width: calc(50% - 8px); } } } .radio-group-item-heading { margin-top: 0; } } ${x.M.mbDown} { &.bmi--input { .bmi--input-radio_gender { > div { .gender-image { width: 40px; height: 40px; } } } } } `,ay=J.Z.div` width: 100%; `,aE=J.Z.div` margin-bottom: 1rem; display: flex; flex-direction: column; gap: 16px; input { font-size: 12px; ::placeholder { color: #8c8c8c; opacity: 1; } } .input-label { label { display: inline-block; margin-bottom: 9px; color: #595959; font-weight: bold; font-size: 12px; } } `,ax=J.Z.div` ${x.M.mbUp} { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 12px; > div { width: 100%; } &[data-is-side='true'] { ${x.M.mbUp} { display: flex; flex-direction: column; gap: 0px; } } } ${x.M.mbDown} { display: flex; flex-direction: column; gap: 0px; } `,BmiForm=({value:e,onChange:t,onSubmit:a,disabled:n,bmiGenerated:l,bmiUnit:r,locale:i,isSide:o})=>{var s,c,d,m;let[u,p]=(0,f.useState)(!1),{control:g,handleSubmit:h,setValue:v,watch:b}=(0,eM.cI)(),E=b(),{t:x}=(0,es.u)(),{gender:C=!1,age:B=!1,height:N=!1,weight:S=!1,objective:T=!0}=n||{},{getHealthToolLink:M}=(0,eI.u)(i),I=(0,f.useMemo)(()=>M(ek.H.OVULATION),[M]),$=(0,f.useMemo)(()=>[{value:"lose-weight",label:x("bmi.objective.loseWeight")},{value:"maintain-weight",label:x("bmi.objective.maintainWeight")},{value:"gain-weight",label:x("bmi.objective.gainWeight")}],[]),onInValid=()=>{p(!0)};return(0,f.useEffect)(()=>{Object.keys(e||{}).forEach(t=>{v(t,null==e?void 0:e[t],{shouldTouch:!1,shouldDirty:!1,shouldValidate:!1})})},[e]),(0,f.useEffect)(()=>{t&&t(E)},[E]),f.createElement(ay,null,f.createElement("form",{onSubmit:h(e=>(0,k.a)(void 0,void 0,void 0,function*(){let t=r.heightConvert(e.height),n=r.weightConvert(e.weight),l={gender:e.gender,age:e.age,height:t,weight:n,bmi:function({weight:e,height:t}){let a=t/100;return Math.round(e/(a*a)*10)/10}({height:t,weight:n})};T||(l.objective=e.objective),onInValid(),a&&a(l)}),onInValid)},!C&&f.createElement(aE,{"data-is-side":o},f.createElement(eM.Qr,{name:"gender",control:g,defaultValue:"male",render:({field:{onChange:e}})=>f.createElement(GenderOptionControl,{defaultValue:"male",onChange:t=>e(t),styles:e=>({root:!o&&{[e.fn.largerThan("sm")]:{width:"calc((100% - 24px) * 2/3 + 12px)"}},wrapper:{[e.fn.largerThan("sm")]:{gap:(0,z.h)(12)}}})})})),f.createElement(ax,{"data-is-side":o},!B&&f.createElement(aE,null,f.createElement(eM.Qr,{name:"age",control:g,rules:null===(s=l.age)||void 0===s?void 0:s.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>f.createElement(w.c.Number,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600},x("bmi.ageInput")," ",f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray300,as:"span"},x("bmi.ageInput.desc"))),placeholder:x("healthtool.placeholder.age"),name:e,value:t,onChange:a,error:u?null==n?void 0:n.message:"",min:0})})),!N&&f.createElement(aE,null,f.createElement(eM.Qr,{name:"height",control:g,rules:null===(c=l.height)||void 0===c?void 0:c.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>f.createElement(w.c.Number,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600},x("bmi.heightInput")," ",f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray300,as:"span"},x("bmi.heightInput.desc"))),placeholder:x("pwg.placeholder.height"),name:e,value:t,onChange:a,error:u?null==n?void 0:n.message:"",min:0})})),!S&&f.createElement(aE,null,f.createElement(eM.Qr,{name:"weight",control:g,rules:null===(d=l.weight)||void 0===d?void 0:d.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>f.createElement(w.c.Number,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600},x("bmi.weightInput")," ",f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray300,as:"span"},x("bmi.weightInput.desc"))),placeholder:x("pwg.placeholder.weight"),name:e,value:t,onChange:a,error:u?null==n?void 0:n.message:"",precision:1,min:0})})),!T&&f.createElement(aE,null,f.createElement(eM.Qr,{name:"objective",control:g,defaultValue:"lose-weight",rules:null===(m=l.objective)||void 0===m?void 0:m.rule,render:({field:{name:e,value:t,onChange:a},fieldState:{error:n}})=>f.createElement(af,{size:"md",name:e,label:l.objective.label,CustomInput:f.createElement(th,{id:"bmi-objective",className:"bmi-objective",direction:"vertical",size:"small",options:$,value:t,onChange:a}),errorMessage:u?null==n?void 0:n.message:"",className:"bmi--input bmi--input-objective"})}))),f.createElement("div",{style:{display:"flex"}},f.createElement(ab,{size:"lg",fullWidth:!0,className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMI",dataEventLabel:`https://${Q.d[i]}/${I}`,type:"submit"},x("bmi.submit")))))},Form$1=()=>{let{onSubmit:e,bmiGenerated:t,locale:a,bmiUnit:n,isSide:l}=(0,f.useContext)(av);return f.createElement(BmiForm,{onSubmit:e,bmiGenerated:t,locale:a,bmiUnit:n,isSide:l})},BMICardEmbed=({isMobile:e,onSubmit:t,bmiContent:a,isSide:n,bmiGenerated:l,bmiUnit:r,bmiLink:i,locale:o,children:s})=>{var c,d,m;let{t:u}=(0,es.u)();return f.createElement(av.Provider,{value:{isMobile:e,onSubmit:t,isSide:n,bmiGenerated:l,bmiUnit:r,bmiLink:i,locale:o}},s||f.createElement(ag,{"data-is-side":n},f.createElement(ToolsBannerCard,{isSide:n,icon:f.createElement("img",{alt:"health-tool-icon",src:(null==a?void 0:a.featured_image)||S.C.getAssetPath("health-tools/bmi.svg"),loading:"lazy"}),heading:u("bmi.heading"),medicalReview:{link:null===(c=null==a?void 0:a.reviewBy)||void 0===c?void 0:c.link,reviewer:null===(d=null==a?void 0:a.reviewBy)||void 0===d?void 0:d.reviewer,date:null===(m=null==a?void 0:a.reviewBy)||void 0===m?void 0:m.date},isMobile:e}),f.createElement(eD.C,null,f.createElement(ap,{as:"div","data-is-side":n},i&&f.createElement(Form$1,null)))))};BMICardEmbed.Form=Form$1;let aw=(0,f.createContext)({}),aC=(0,f.createContext)({});var ak=(0,L.k)(()=>({root:{}})),aB=(0,L.k)(e=>({root:{display:"flex",flexDirection:"column",gap:(0,z.h)(8)},row:{display:"flex",alignItems:"stretch",justifyContent:"space-between",gap:(0,z.h)(16)},labelWrapper:{flex:"1 1 0px",display:"flex",alignItems:"center",borderBottom:`1px solid ${e.colors.neutral[1]}`},label:{fontSize:(0,z.h)(14),color:e.colors.gray[6]},control:{width:(0,z.h)(180),flexShrink:1,"&.error":{"button, input":{borderColor:e.colors.red[7]}}},radioLabel:{fontSize:(0,z.h)(16)},radioRoot:{padding:`${(0,z.h)(10)} 0`,margin:0},bmiVal:{display:"inline-block"},inputWithUnit__wrapper:{position:"relative"},inputWithUnit__unit:{position:"absolute",top:0,right:0,bottom:0,paddingRight:(0,z.h)(10),display:"flex",alignItems:"center"},inputWithUnit__unitText:{color:e.colors.gray[6]},inputWithUnit__input:{input:{paddingRight:(0,z.h)(30),"::-webkit-inner-spin-button":{"-webkit-appearance":"none"}}},submitBtn:{},switchRoot:{padding:"16px 0"}}));let HorizonalForm=e=>{var{styles:t,classNames:a}=e,n=(0,k._)(e,["styles","classNames"]);let{t:l}=(0,es.u)(),{control:r,currentUrl:i,isEmptyThreeFields:o,isMarryBaby:s}=(0,f.useContext)(aC),{classes:c,cx:d}=aB(void 0,{name:"BabyGrowthForm__HorizonalForm",styles:t,classNames:a}),m={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return f.createElement(M.x,Object.assign({className:c.root},n),f.createElement(eM.Qr,{control:r,name:"gender",render:({field:{onChange:e,value:t}})=>f.createElement(M.x,{className:c.row},f.createElement(M.x,{className:c.labelWrapper},f.createElement("label",{className:c.label,htmlFor:"gender"},l("tools.selectBabyGender"))),f.createElement(w.R.Group,{onChange:e,value:t},f.createElement(A.Z,{mt:"xs"},f.createElement(w.R,{value:"boy",label:l("gender.boy"),classNames:{root:c.radioRoot,label:c.radioLabel}}),f.createElement(w.R,{value:"girl",label:l("gender.girl"),classNames:{label:c.radioLabel}}))))}),f.createElement(eM.Qr,{control:r,name:"birthday",render:({field:{onChange:e},fieldState:{error:t}})=>f.createElement(M.x,{className:c.row},f.createElement(M.x,{className:c.labelWrapper},f.createElement("label",{className:c.label,htmlFor:"birthday"},l("babyGrowth.input.birthday"))),f.createElement(ez.D,Object.assign({},m,{className:d(c.control,t?"error":""),onChange:e,maxDate:new Date})))}),f.createElement(M.x,{className:c.row},f.createElement(M.x,{className:c.labelWrapper},f.createElement("label",{className:c.label},"BMI")),f.createElement($.k,{align:"center",gap:"8px"},f.createElement(eM.Qr,{control:r,name:"bmi",render:({field:{value:e}})=>f.createElement(f.Fragment,null,f.createElement(y.T,{size:"p2"},f.createElement("span",{className:c.bmiVal},isNaN(Number(e))||"0"===e?"":e),l("babyGrowth.kg.m2")))}),f.createElement(eM.Qr,{control:r,name:"height",render:({field:{onChange:e,value:t},fieldState:{error:a}})=>f.createElement(M.x,{className:d(c.control,c.inputWithUnit__wrapper,o||(null==a?void 0:a.message)?"error":"")},f.createElement(el.I,{className:`${d(c.inputWithUnit__input)}`,name:"height",placeholder:l("babyGrowth.height"),size:"md",value:String(t),onChange:e,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}),f.createElement(M.x,{className:c.inputWithUnit__unit},f.createElement(y.T,{as:"span",size:"p2",className:c.inputWithUnit__unitText},l("babyGrowth.cm"))))}),f.createElement(eM.Qr,{control:r,name:"weight",render:({field:{onChange:e,value:t},fieldState:{error:a}})=>f.createElement(M.x,{className:d(c.control,c.inputWithUnit__wrapper,o||(null==a?void 0:a.message)?"error":"")},f.createElement(M.x,{className:c.inputWithUnit__unit},f.createElement(y.T,{as:"span",size:"p2",className:c.inputWithUnit__unitText},l("babyGrowth.kg"))),f.createElement(el.I,{className:`${d(c.inputWithUnit__input)}`,name:"weight",placeholder:l("babyGrowth.weight"),size:"md",value:String(t),onChange:e,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))}))),f.createElement(eM.Qr,{control:r,name:"head",render:({field:{onChange:e,value:t},fieldState:{error:a}})=>f.createElement(M.x,{className:c.row},f.createElement(M.x,{className:c.labelWrapper},f.createElement("label",{className:c.label,htmlFor:"head"}," ",l("babyGrowth.headCircumference"))),f.createElement(M.x,{className:d(c.inputWithUnit__wrapper,c.control,o||(null==a?void 0:a.message)?"error":"")},f.createElement(el.I,{className:`${d(c.inputWithUnit__input)}`,name:"head",placeholder:"0",size:"md",value:String(t),onChange:e,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}),f.createElement(M.x,{className:c.inputWithUnit__unit},f.createElement(y.T,{as:"span",size:"p2",className:c.inputWithUnit__unitText},l("babyGrowth.cm")))))}),f.createElement(eM.Qr,{control:r,name:"measurementDate",render:({field:{onChange:e}})=>f.createElement(M.x,{className:c.row},f.createElement(M.x,{className:c.labelWrapper},f.createElement("label",{className:c.label,htmlFor:"measurementDate"},l("babyGrowth.input.measurementDate"))),f.createElement(ez.D,Object.assign({},m,{className:c.control,defaultValue:new Date,onChange:e,maxDate:new Date})))}),f.createElement(M.x,{className:c.row},f.createElement(w.B,{className:c.submitBtn,size:"lg",type:"submit",variant:s?"secondary":"primary","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":i},l("babyGrowth.input.submit"))))},aN=J.Z.div` display: flex; flex-direction: column; gap: 16px; padding-block: 40px; &[data-theme='marryBaby'] { padding-block: 0; padding-top: 12px; } `,aS=J.Z.div` display: flex; flex-direction: column; gap: 6px; margin-top: auto; .error-input input { border: 1px solid ${D.t.colors.red700}; } `,aT=(0,J.Z)(eA.L)` display: inline-flex; padding-bottom: 6px; gap: 4px; `,aD=J.Z.div` display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; > div { width: 100%; } `,VerticalForm=()=>{let{t:e}=(0,es.u)(),{control:t,currentUrl:a,isEmptyThreeFields:n,isMarryBaby:l,siteType:r}=(0,f.useContext)(aC),i={placeholder:"DD/MM/YYYY",popoverProps:{withinPortal:!0}};return f.createElement(aN,{className:"form-wrapper","data-theme":r},f.createElement(eM.Qr,{control:t,name:"gender",render:({field:{onChange:e,value:t}})=>f.createElement(eP.B,{onChange:e,value:t,siteType:r})}),"marryBaby"===r?f.createElement(f.Fragment,null,f.createElement(eM.Qr,{control:t,name:"birthday",render:({field:{onChange:t,value:a},fieldState:{error:n}})=>f.createElement(aS,null,f.createElement(at,{label:e("babyGrowth.input.birthday"),name:"birthday",size:"md",value:String(a),CustomInput:f.createElement(ez.D,Object.assign({},i,{onChange:t,maxDate:new Date,className:(null==n?void 0:n.message)?"error-input":"",rightSection:f.createElement(N.Z,{size:32})}))}))}),f.createElement(aD,null,f.createElement(eM.Qr,{control:t,name:"height",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>f.createElement(aS,null,f.createElement(at,{label:`${e("babyGrowth.height")} ${e("babyGrowth.cm")}`,name:"height",size:"md",value:String(a),CustomInput:f.createElement(el.I,{className:n||(null==l?void 0:l.message)?"error-input":"",name:"height",size:"md",placeholder:"Nhập th\xf4ng tin",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()})}))}),f.createElement(eM.Qr,{control:t,name:"weight",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>f.createElement(aS,null,f.createElement(at,{label:`${e("babyGrowth.weight")} ${e("babyGrowth.kg")}`,name:"weight",size:"md",value:String(a),CustomInput:f.createElement(el.I,{className:n||(null==l?void 0:l.message)?"error-input":"",name:"weight",size:"md",placeholder:"Nhập th\xf4ng tin",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()})}))})),f.createElement(aD,null,f.createElement(eM.Qr,{control:t,name:"head",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>f.createElement(aS,null,f.createElement(at,{label:`${e("babyGrowth.headCircumference")} ${e("babyGrowth.cm")}`,name:"head",size:"md",value:String(a),CustomInput:f.createElement(el.I,{className:n||(null==l?void 0:l.message)?"error-input":"",name:"head",size:"md",value:String(a),onChange:t,type:"number",placeholder:"Nhập th\xf4ng tin",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()})}))}),f.createElement(eM.Qr,{control:t,name:"bmi",render:({field:{value:t}})=>f.createElement(aS,null,f.createElement(at,{label:`${e("babyGrowth.input.bmi")} ${e("babyGrowth.kg.m2")}`,name:"date",size:"md",value:String(t),CustomInput:f.createElement(el.I,{name:"bmi",size:"md",type:"number",value:String(t),isDisabled:!0,style:{color:"#9495A0"}})}))})),f.createElement(eM.Qr,{control:t,name:"measurementDate",render:({field:{onChange:t,value:a},fieldState:{error:n}})=>f.createElement(aS,null,f.createElement(at,{label:e("babyGrowth.input.measurementDate"),name:"date",size:"md",value:DateToInputValue(a),CustomInput:f.createElement(ez.D,Object.assign({},i,{defaultValue:new Date,maxDate:new Date,onChange:t,className:(null==n?void 0:n.message)?"error-input":"",rightSection:f.createElement(N.Z,{size:32})}))}))}),f.createElement(w.B,{size:"lg",type:"submit",variant:l?"secondary":"primary","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":a},e("babyGrowth.input.submit"))):f.createElement(f.Fragment,null,f.createElement(eM.Qr,{control:t,name:"birthday",render:({field:{onChange:t},fieldState:{error:a}})=>f.createElement(aS,null,f.createElement(aT,{size:"label1",htmlFor:"birthday"},f.createElement(y.T,{as:"label",size:"s4",weight:"semiBold"},e("babyGrowth.input.birthday"))),f.createElement(ez.D,Object.assign({},i,{onChange:t,maxDate:new Date,className:(null==a?void 0:a.message)?"error-input":""})))}),f.createElement(aD,null,f.createElement(eM.Qr,{control:t,name:"height",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>f.createElement(aS,null,f.createElement(aT,{size:"label1",htmlFor:"height"},f.createElement(y.T,{size:"s4",weight:"semiBold"},e("babyGrowth.height")),f.createElement(y.T,{as:"span",size:"n1",color:D.t.colors.gray400},e("babyGrowth.cm"))),f.createElement(el.I,{className:n||(null==l?void 0:l.message)?"error-input":"",name:"height",placeholder:"0",size:"md",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))}),f.createElement(eM.Qr,{control:t,name:"weight",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>f.createElement(aS,null,f.createElement(aT,{size:"label1",htmlFor:"weight"},f.createElement(y.T,{size:"s4",weight:"semiBold"},e("babyGrowth.weight")),f.createElement(y.T,{as:"span",size:"n1",color:D.t.colors.gray400},e("babyGrowth.kg"))),f.createElement(el.I,{className:n||(null==l?void 0:l.message)?"error-input":"",name:"weight",placeholder:"0",size:"md",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))})),f.createElement(aD,null,f.createElement(eM.Qr,{control:t,name:"head",render:({field:{onChange:t,value:a},fieldState:{error:l}})=>f.createElement(aS,null,f.createElement(aT,{size:"label1",htmlFor:"head"},f.createElement(y.T,{size:"s4",weight:"semiBold"},e("babyGrowth.headCircumference")),f.createElement(y.T,{as:"span",size:"n1",color:D.t.colors.gray400},e("babyGrowth.cm"))),f.createElement(el.I,{className:n||(null==l?void 0:l.message)?"error-input":"",name:"head",placeholder:"0",size:"md",value:String(a),onChange:t,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur()}))}),f.createElement(eM.Qr,{control:t,name:"bmi",render:({field:{value:t}})=>f.createElement(aS,null,f.createElement(aT,{size:"label1",htmlFor:"bmi"},f.createElement(y.T,{size:"s4",weight:"semiBold"},e("babyGrowth.input.bmi")),f.createElement(y.T,{as:"span",size:"n1",color:D.t.colors.gray400},e("babyGrowth.kg.m2"))),f.createElement(el.I,{name:"bmi",size:"md",type:"number",value:String(t),isDisabled:!0}))})),f.createElement(eM.Qr,{control:t,name:"measurementDate",render:({field:{onChange:t},fieldState:{error:a}})=>f.createElement(aS,null,f.createElement(aT,{size:"label1",htmlFor:"measurementDate"},f.createElement(y.T,{as:"label",size:"s4",weight:"semiBold"},e("babyGrowth.input.measurementDate"))),f.createElement(ez.D,Object.assign({},i,{defaultValue:new Date,onChange:t,maxDate:new Date,className:(null==a?void 0:a.message)?"error-input":""})))}),f.createElement(w.B,{size:"lg",type:"submit",variant:l?"secondary":"primary","data-event-category":"Health Tool","data-event-action":"Baby Growth","data-event-label":a},e("babyGrowth.input.submit"))))},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);return Number(localizeNumberFormat(a))}}catch(e){}return 0},aM=J.Z.div` padding: 36px; padding-top: 0; background-color: white; ${x.M.mbDown} { padding: 16px; padding-top: 0; } &[data-theme='marryBaby'] { background-color: ${D.t.mbColors.green}; padding: 24px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; ${x.M.mbDown} { padding: 16px; } } `,aI=(0,J.Z)(({onSubmit:e,onError:t,schema:a,siteType:n,layout:l="vertical",styles:r,classNames:i})=>{let{classes:o,theme:s}=ak(void 0,{name:"BabyGrowthForm",styles:r,classNames:i}),c="mb"===s.other.template,{control:d,setValue:m,watch:u,handleSubmit:p,formState:{isSubmitted:g}}=(0,eM.cI)({resolver:(0,e$.X)(a),mode:"onSubmit",defaultValues:{name:"",gender:q.G.Boy,measurementDate:new Date}}),h=u("weight"),v=u("height"),b=u("head"),y=(0,f.useMemo)(()=>g&&!h&&!v&&!b,[g,h,v,b]);(0,f.useEffect)(()=>{let e=bmiCalculate(v,h);m("bmi",String(e)||"0")},[h,v]);let E=(0,f.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]);return f.createElement(aC.Provider,{value:{isEmptyThreeFields:y,control:d,currentUrl:E,isMarryBaby:c,siteType:n}},f.createElement(M.x,{component:"form",onSubmit:p(e,t)},"vertical"===l?f.createElement(VerticalForm,null):f.createElement(HorizonalForm,{classNames:{root:o.root}})))})` padding-block: 0; `;(0,J.Z)(ToolsBannerCard)` padding-inline: 20px; img.embedded-icon { width: 140px; margin-left: 50%; align-self: center; } ${x.M.mbDown} { padding-inline: 0; img.embedded-icon { width: 125px; align-self: end; margin-left: 0; position: absolute; transform: translateY(50%); } .embedded-review { max-width: 200px; } } `;let Form=e=>{var t=(0,k._)(e,[]);let{formLayout:a,siteType:n,schema:l,onSubmit:r,onError:i}=(0,f.useContext)(aw);return f.createElement(aI,Object.assign({siteType:n,schema:l,onSubmit:r,onError:i,layout:a},t))},BabyGrowthCardEmbed=({isMobile:e,onSubmit:t,onError:a,schema:n,babyGrowthContent:l,siteType:r,children:i,formLayout:o})=>{var s,c,d;return f.createElement(aw.Provider,{value:{formLayout:o,siteType:r,schema:n,onSubmit:t,onError:a}},i||f.createElement(f.Fragment,null,f.createElement(ag,{"babyGrowthContent-is-mobile":e,"data-site":r},f.createElement(ToolsBannerCard,{siteType:r,bannerUrl:S.C.getAssetPath("embedToolBannerBlue.svg"),bannerUrlLarge:S.C.getAssetPath("embedToolBannerBlue.svg"),bannerColor:"marryBaby"===r&&D.t.mbColors.mint,isEmbeded:!0,icon:f.createElement("img",{className:"embedded-icon",alt:"health-tool-icon",src:(null==l?void 0:l.featuredImage)||S.C.getAssetPath("health-tools/toolsIconBabyGrowth.svg"),loading:"lazy"}),heading:(null==l?void 0:l.title)||"",medicalReview:{link:null===(s=null==l?void 0:l.reviewBy)||void 0===s?void 0:s.link,reviewer:null===(c=null==l?void 0:l.reviewBy)||void 0===c?void 0:c.reviewer.trim(),date:null===(d=null==l?void 0:l.reviewBy)||void 0===d?void 0:d.date},isMobile:e}),f.createElement(aM,{"data-theme":r},f.createElement(Form,{layout:o})))))};BabyGrowthCardEmbed.Form=Form;var a$=(0,L.k)((e,t)=>{let{isMarryBaby:a,isSide:n,direction:l}=t;return{root:Object.assign(Object.assign(Object.assign(Object.assign({position:"relative",display:"flex"},"auto"===l?{flexDirection:"row"}:{flexDirection:"column"===l?"column-reverse":"row"}),{gap:"8px",padding:"16px",borderRadius:a?"16px":"8px"}),!a&&{backgroundImage:`url(${S.C.getAssetPath("bgPattern/baby-poop.svg")})`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center"}),{backgroundColor:a?e.colors.toneGreen.toString():e.colors[e.primaryColor][0],[e.fn.smallerThan("sm")]:Object.assign({},"auto"===l?{flexDirection:"column-reverse"}:{}),[e.fn.smallerThan("md")]:{borderRadius:a?"12px":"8px"},[e.fn.largerThan("md")]:{padding:"32px",gap:"20px"}}),inner:{display:"flex",gap:"16px",flexDirection:"column",flex:1},content:{display:"flex",flexDirection:"column",gap:"16px"},reviewText:{display:"flex",gap:"4px",a:{color:e.colors.gray[6],fontWeight:"bold","&:not(:hover)":{textDecoration:"none"}}},reviewTextIcon:{flexShrink:0,width:"16px",height:"16px",[e.fn.largerThan("sm")]:{marginTop:"2px"}},thumbnail:Object.assign(Object.assign({img:{objectFit:"contain",objectPosition:"bottom",width:"100%",height:"100%"}},"column"===l?{width:"80%",alignSelf:"center"}:"row"===l?{width:"40%"}:{}),{[e.fn.smallerThan("sm")]:Object.assign({},"auto"===l?{width:"80%",alignSelf:"center"}:{}),[e.fn.largerThan("sm")]:Object.assign({},"auto"===l?{width:"40%"}:{})}),action:{display:"flex",justifyContent:a?"center":"flex-start"},btn:{minWidth:a?"auto":"143px",width:n||a?"100%":"auto",[e.fn.smallerThan("md")]:{width:"100%"}},sponsorLogo:Object.assign(Object.assign({position:"absolute",top:0,height:40,objectFit:"contain",objectPosition:"top"},"column"===l?{left:"16px",height:40}:"row"===l?{height:50,right:"40px"}:{left:"16px",height:40}),{[e.fn.largerThan("sm")]:Object.assign({},"auto"===l?{height:50,right:"40px",left:"unset"}:{})})}});let BabyPoopEmbed=({babyPoopPage:e,onClickFindOut:t,currentUrl:a,isSide:n,direction:l="auto",sponsorLogo:r})=>{let{t:i}=(0,es.u)(),o=(0,j.rZ)(),s="mb"===o.other.template,{classes:c}=a$({isMarryBaby:s,isSide:n,direction:l},{name:"BabyPoopEmbed"}),{reviewedBy:d,reviewedDate:m}=e||{};return f.createElement("div",{className:c.root},f.createElement("div",{className:c.inner},f.createElement(T.H,{tag:"h3",as:"h2",color:!s&&"#284A75"},e.title),f.createElement("div",{className:c.content,"data-is-side":n},f.createElement(y.T,{size:"p3",className:"description"},e.description),!!d&&f.createElement("div",{className:c.reviewText},f.createElement("img",{src:S.C.getAssetPath("reviewerCheck.svg"),alt:"check",className:c.reviewTextIcon,loading:"lazy"}),f.createElement(y.T,{size:"p4",color:D.t.colors.gray600},i("categoryPage.info.reviewed"),"\xa0",f.createElement("a",{href:d.profile_url},d.display_name),"\xa0",i("categoryPage.onDate",{date:m||""}))),f.createElement("div",{className:c.action},f.createElement(w.B,{className:c.btn,size:s?"lg":"md",variant:s?"secondary":"primary",onClick:t,dataEventCategory:"Health Tool",dataEventAction:"Baby Stool Inquiry",dataEventLabel:a,style:{visibility:t?"visible":"hidden"}},i("babyPoop.findOut"))))),f.createElement("div",{className:c.thumbnail},f.createElement("img",{src:s?S.C.getAssetPath("baby-poop.svg"):null==e?void 0:e.featuredImage,alt:e.title,loading:"lazy"})),r&&f.createElement("img",{loading:"lazy",src:r,alt:"sponsor",className:c.sponsorLogo}))},az=J.Z.div` display: flex; width: 100%; &[data-direction='vertical'] { flex-direction: column; } &[data-direction='horizontal'] { flex-wrap: wrap; } `,aP=J.Z.div` display: flex; padding: 8px; border-radius: ${D.t.borderRadius}; cursor: pointer; & > div { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: flex-start; } &[data-selected='true'] { border: 1px solid #2d87f3; background: white; .radio-group-item-heading { color: #2d87f3; } } &[data-selected='false'] { border: 1px solid #f2f2f2; box-shadow: 0px 5px 12px rgba(40, 74, 117, 0.08); .radio-group-item-heading { color: #262626; } } &[data-disabled='true'] { cursor: auto; } .radio-group-item-heading { margin-top: 8px; text-align: center; } .gender-image { width: 23px; height: 36px; object-fit: contain; } `,RadioImageGroupForTool=({value:e,options:t,className:a,direction:n="horizontal",onChange:l,isDisabled:r})=>{let[i,o]=(0,f.useState)(e),handleOnChange=e=>{!r&&(o(e),l&&l(e))};return f.createElement(az,{className:a,"data-direction":n},t.map((t,a)=>f.createElement(aP,{"data-selected":(e||i)===t.value,"data-disabled":r,key:`health-tool${a}`,onClick:()=>{handleOnChange(t.value)}},f.createElement("div",null,f.createElement("img",{src:(e||i)===t.value?t.imageActive:t.image,className:"gender-image",alt:"",loading:"lazy"}),t.label&&f.createElement(y.T,{weight:"bold",className:"radio-group-item-heading",size:"label1"},t.label)))))},aA=(0,J.Z)(w.B)` margin: 0 auto 24px; width: 100%; ${x.M.mbUp} { max-width: 200px; } `,aL=J.Z.div``,aO=J.Z.div` display: flex; flex-direction: column; gap: 16px; input { font-size: 12px; } .gender-option { gap: 16px; > div { width: calc(50% - 8px); } } .input-label { label { display: inline-block; margin-bottom: 9px; color: #595959; font-weight: bold; font-size: 12px; } } `,a_=J.Z.div` ${x.M.mbUp} { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; > div { width: 100%; } } ${x.M.mbDown} { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; } &[data-is-side='true'] { ${x.M.mbUp} { display: flex; flex-direction: column-reverse; gap: 0px; } } `,ThrForm=({info:e,className:t,style:a,onChange:n,errorMessage:l={},locale:r})=>{let{t:i}=(0,es.u)(),[o,s]=(0,f.useState)(new Date),[c,d]=(0,f.useState)({age:!1,rate:!1}),onAgeChanged=t=>{s(t),d(e=>Object.assign(Object.assign({},e),{age:!0}));let a=Object.assign(Object.assign({},e),{age:(0,ec.Z)(new Date(t),ai)});n&&n(a)};return(0,f.useEffect)(()=>{d({age:!1,rate:!1})},[l]),f.createElement(aL,{style:a,className:t},f.createElement(el.I,{className:"input-section due-date-input",label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600,style:{marginBottom:"9px",flex:"1"}},i("targetHeartRate.ageInput")),value:DateToInputValue(o),name:"date",size:"md",CustomInput:f.createElement(eB.D,{customInput:e=>f.createElement("input",Object.assign({type:"date",className:"due-date-input"},e,{value:DateToInputValue(o)})),disabledDays:{after:new Date((0,ed.Z)(new Date,0))},locale:r,pickedDate:o,displayDateFormat:"dd/MM/yyyy",onChange:e=>{onAgeChanged(e)},placeholder:"placeholder"}),errorMessage:c.age?"":l.age}))},THRCardEmbed=({isSide:e,locale:t,thrContent:a,isMobile:n,info:l,inputErrorMessage:r,onFormChange:i,onSubmit:o})=>{var s,c,d;let{t:m}=(0,es.u)(),{getHealthToolLink:u}=(0,eI.u)(t),p=(0,f.useMemo)(()=>u(ek.H.THR),[u]),[g,h]=(0,f.useState)(!1),[v,b]=(0,f.useState)("low_intensity"),[E,x]=(0,f.useState)("male"),[w,C]=(0,f.useState)(60),[k,B]=(0,f.useState)({idAge:0,minAge:0,maxAge:18,rangeMale:40,rangeFemale:40}),N=[{idAge:0,minAge:0,maxAge:18,rangeMale:40,rangeFemale:40},{idAge:1,minAge:18,maxAge:25,rangeMale:49,rangeFemale:54},{idAge:2,minAge:25,maxAge:35,rangeMale:49,rangeFemale:54},{idAge:3,minAge:35,maxAge:45,rangeMale:50,rangeFemale:54},{idAge:4,minAge:45,maxAge:55,rangeMale:50,rangeFemale:54},{idAge:5,minAge:55,maxAge:65,rangeMale:51,rangeFemale:54},{idAge:6,minAge:65,maxAge:120,rangeMale:50,rangeFemale:54}],T=[{value:"low_intensity",label:m("targetHeartRate.lowIntensity.title"),image:S.C.getAssetPath("/low.svg"),imageActive:S.C.getAssetPath("/low-active.svg"),content:m("targetHeartRate.lowIntensity.note")},{value:"moderate_intensity",label:m("targetHeartRate.moderateIntensity.title"),image:S.C.getAssetPath("/moderate.svg"),imageActive:S.C.getAssetPath("/moderate-active.svg"),content:m("targetHeartRate.moderateIntensity.note")},{value:"aerobic_zone",label:m("targetHeartRate.aerobicZone.title"),image:S.C.getAssetPath("/aerobic.svg"),imageActive:S.C.getAssetPath("/aerobic-active.svg"),content:m("targetHeartRate.aerobicZone.note")},{value:"vigorous_intensity",label:m("targetHeartRate.vigorousIntensity.title"),image:S.C.getAssetPath("/vigorous.svg"),imageActive:S.C.getAssetPath("/vigorous-active.svg"),content:m("targetHeartRate.vigorousIntensity.note")},{value:"maximum_intensity",label:m("targetHeartRate.maximumIntensity.title"),image:S.C.getAssetPath("/maximum.svg"),imageActive:S.C.getAssetPath("/maximum-active.svg"),content:m("targetHeartRate.maximumIntensity.note")}];return(0,f.useEffect)(()=>{let e=(new Date().getTime()-new Date(null==l?void 0:l.age).getTime())/1e3;e>=567648e3?h(!0):h(!1);let t=N.find(t=>e>=31536e3*t.minAge&&e<31536e3*t.maxAge)||N[0];B(t),C(60)},[null==l?void 0:l.age]),f.createElement(ag,{"data-is-side":e},f.createElement(ToolsBannerCard,{isSide:e,icon:f.createElement("img",{alt:"health-tool-icon",src:(null==a?void 0:a.featured_image)||S.C.getAssetPath("health-tools/target-heart-rate-icon.svg"),loading:"lazy"}),heading:m("targetHearRate.heading"),medicalReview:(null===(s=null==a?void 0:a.reviewedBy)||void 0===s?void 0:s.display_name)?{link:(0,eL.f)(null==a?void 0:a.reviewedBy),reviewer:null===(c=null==a?void 0:a.reviewedBy)||void 0===c?void 0:c.display_name,date:null==a?void 0:a.reviewedDate}:void 0,isMobile:n}),f.createElement(eD.C,null,f.createElement(ap,{className:"heart-rate-cal",onSubmit:e=>e.preventDefault(),"data-is-side":e},f.createElement(a_,{"data-is-side":e},f.createElement(aO,null,f.createElement(GenderOptionControl,{defaultValue:"male",onChange:e=>{x(e),C(60)},styles:t=>({root:!e&&{[t.fn.largerThan("sm")]:{width:"calc((100% - 24px) * 2/3 + 12px)"}},wrapper:{[t.fn.largerThan("sm")]:{gap:(0,z.h)(12)}}})}))),f.createElement(a_,null,f.createElement(ThrForm,{info:l,locale:t,errorMessage:r,onChange:i})),f.createElement("div",{className:"slider-heart-rate"},f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600},m("targetHeartRate.heartRateInput")),f.createElement("div",{className:"slider-outer-wrapper"},f.createElement(eS.S,{containerStyle:{flex:1},min:"male"===E?k.rangeMale:k.rangeFemale,max:200,step:1,value:w,withControl:!0,onChange:C}))),g&&f.createElement(aO,null,f.createElement(au,null,f.createElement(y.T,{size:"s4",style:{display:"inline-block",fontWeight:"bold",color:D.t.colors.gray600,marginBottom:"9px"}},m("targetHeartRate.selectActive")),f.createElement("div",{className:"card"},f.createElement(RadioImageGroupForTool,{options:T.map(e=>({value:e.value,label:e.label,image:e.image,imageActive:e.imageActive})),value:v,onChange:e=>{b(e)},className:"gender-selector"})),v&&f.createElement("div",{className:"note"},f.createElement("img",{style:{height:"16px",width:"16px"},src:S.C.getAssetPath("/infoIcon.svg"),alt:"",loading:"lazy"}),f.createElement(y.T,{size:"s4",color:"#595959"},null===(d=T[T.findIndex(e=>e.value==v)||0])||void 0===d?void 0:d.content)),!v&&f.createElement("span",{style:{color:"#e64728"}},r.intensity)))),f.createElement("div",{style:{display:"flex"}},f.createElement(aA,{size:"lg",onClick:()=>{o(E,v,[w])},dataEventCategory:"Health Tool",dataEventAction:"THR",dataEventLabel:`https://${Q.d[t]}/${p}`},m("bmi.submit")))))},aj=(0,J.Z)(w.B)` margin: 0 auto 24px; ${x.M.mbUp} { max-width: 200px; margin: 24px auto; } `,aZ=J.Z.div``,aF=J.Z.div` margin-bottom: 1rem; display: flex; flex-direction: column; gap: 16px; input { font-size: 12px; ::placeholder { color: #8c8c8c; opacity: 1; } } .gender-option { gap: 16px; > div { width: calc(50% - 8px); } } .input-label { label { display: inline-block; margin-bottom: 9px; color: #595959; font-weight: bold; font-size: 12px; } } `,aR=J.Z.div` ${x.M.mbUp} { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 12px; > div { width: 100%; } &[data-is-side='true'] { ${x.M.mbUp} { display: flex; flex-direction: column; gap: 0px; } } } ${x.M.mbDown} { display: flex; flex-direction: column; gap: 0px; } `,BmrInputForm=({info:e,className:t,style:a,onChange:n,errorMessage:l={},locale:r,onClick:i,isSide:o})=>{let{t:s}=(0,es.u)(),[c,d]=(0,f.useState)({age:!1,height:!1,weight:!1}),{getHealthToolLink:m}=(0,eI.u)(r),u=(0,f.useMemo)(()=>m(ek.H.OVULATION),[m]),[p,g]=(0,f.useState)("male"),checkValidInputIsANumber=(e,t)=>{""!==e&&(isNaN(e)||isNaN(parseFloat(e)))||t(e)},checkValidInputIsAnInterger=(e,t)=>{""!==e&&(isNaN(e)||isNaN(parseFloat(e))||e.includes("."))||t(e)},onAgeChanged=t=>{checkValidInputIsAnInterger(t,t=>{d(e=>Object.assign(Object.assign({},e),{age:!0}));let a=Object.assign(Object.assign({},e),{age:t});n&&n(a)})},onHeightChanged=t=>{checkValidInputIsANumber(t,t=>{d(e=>Object.assign(Object.assign({},e),{height:!0}));let a=Object.assign(Object.assign({},e),{height:t});n&&n(a)})},onWeightChanged=t=>{d(e=>Object.assign(Object.assign({},e),{weight:!0})),checkValidInputIsANumber(t,t=>{let a=Object.assign(Object.assign({},e),{weight:t});n&&n(a)})};return(0,f.useEffect)(()=>{n&&n(Object.assign(Object.assign({},e),{objective:"lose-fat",activeLevel:"sedentary"}))},[]),(0,f.useEffect)(()=>{d({age:!1,height:!1,weight:!1})},[l]),f.createElement(aZ,{style:a,className:t},f.createElement(aF,{"data-is-side":o},f.createElement(GenderOptionControl,{defaultValue:"male",onChange:e=>g(e),styles:e=>({root:!o&&{[e.fn.largerThan("sm")]:{width:"calc((100% - 24px) * 2/3 + 12px)"}},wrapper:{[e.fn.largerThan("sm")]:{gap:(0,z.h)(12)}}})})),f.createElement(aR,{"data-is-side":o},f.createElement(aF,null,f.createElement(w.c.Number,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600},s("bmi.ageInput")," ",f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray300,as:"span"},s("bmi.ageInput.desc"))),placeholder:s("healthtool.placeholder.age"),value:Number(e.age),onChange:e=>onAgeChanged(String(e)),error:c.age?"":l.age,min:0})),f.createElement(aF,null,f.createElement(w.c.Number,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600},s("bmi.heightInput")," ",f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray300,as:"span"},s("bmi.heightInput.desc"))),placeholder:s("pwg.placeholder.height"),value:Number(e.height),onChange:e=>onHeightChanged(String(e)),error:c.height?"":l.height,min:0})),f.createElement(aF,null,f.createElement(w.c.Number,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray600},s("bmi.weightInput")," ",f.createElement(y.T,{size:"s4",weight:"semiBold",color:D.t.colors.gray300,as:"span"},s("bmi.weightInput.desc"))),placeholder:s("pwg.placeholder.weight"),value:Number(e.weight),onChange:e=>onWeightChanged(String(e)),error:c.weight?"":l.weight,min:0,precision:1}))),f.createElement("div",{style:{display:"flex"}},f.createElement(aj,{size:"lg",fullWidth:!0,className:"bmi-btn bmi--btn-submit",dataEventCategory:"Health Tool",dataEventAction:"BMR",dataEventLabel:`https://${Q.d[r]}/${u}`,onClick:()=>{i(p)}},s("bmi.submit"))))},BMRCardEmbed=({isSide:e,locale:t,bmrContent:a,isMobile:n,info:l,inputErrorMessage:r,onFormChange:i,onSubmit:o})=>{var s,c,d;let{t:m}=(0,es.u)();return f.createElement(ag,{"data-is-side":e},f.createElement(ToolsBannerCard,{isSide:e,icon:f.createElement("img",{alt:"health-tool-icon",src:(null==a?void 0:a.featured_image)||S.C.getAssetPath("health-tools/bmr.svg"),loading:"lazy"}),heading:m("bmr.heading"),medicalReview:{link:null===(s=null==a?void 0:a.reviewBy)||void 0===s?void 0:s.link,reviewer:null===(c=null==a?void 0:a.reviewBy)||void 0===c?void 0:c.reviewer,date:null===(d=null==a?void 0:a.reviewBy)||void 0===d?void 0:d.date},isMobile:n}),f.createElement(eD.C,null,f.createElement(ap,{onSubmit:e=>e.preventDefault(),"data-is-side":e},f.createElement(as,null,f.createElement(BmrInputForm,{info:l,locale:t,errorMessage:r,onChange:i,onClick:o,isSide:e})))))},OvulationForm=({locale:e,onSubmit:t,isSide:a,siteType:n})=>{let{t:l}=(0,es.u)(),[r,i]=(0,f.useState)(new Date),[o,s]=(0,f.useState)(28),[c,d]=(0,f.useState)(7),m={cycle:o,periodDateStart:r,periodLength:c},u=(0,f.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]);return f.createElement(f.Fragment,null,f.createElement(al,{className:"input-form input-section","data-is-side":!0},"marryBaby"===n?f.createElement(at,{label:l("dueDatePage.lastPeriod.lastPeriodLabel"),name:"date",size:"md",value:DateToInputValue(r),CustomInput:f.createElement(eB.D,{onChange:e=>{i(e)},placeholder:"dd/mm/yyyy",pickedDate:r,displayDateFormat:"dd/MM/yyyy",disabledDays:{before:(0,ed.Z)(new Date,-45),after:new Date},customInput:e=>f.createElement(el.I,Object.assign({className:"due-date-input",name:"birthday",size:"md"},e,{value:r&&ew()(r).format(ek.b)}))}),actionIcon:f.createElement(N.Z,{size:32})}):f.createElement(el.I,{label:f.createElement(y.T,{size:"s4",weight:"semiBold",color:"#595959",style:{marginBottom:"9px",flex:"1"}},l("dueDatePage.lastPeriod.lastPeriodLabel")),value:DateToInputValue(r),size:"md",name:"date",className:"due-date-input",CustomInput:f.createElement(eB.D,{customInput:e=>f.createElement("input",Object.assign({},e,{type:"date",className:"due-date-input",value:DateToInputValue(r)})),locale:e,pickedDate:r,displayDateFormat:eC.D,onChange:e=>{i(e)},disabledDays:{before:(0,ed.Z)(new Date,-45),after:new Date},placeholder:"Chọn ng\xe0y"})})),f.createElement("div",{className:"slider-ovulation day-slider","data-theme":"marryBaby"===n?"marryBaby":"","data-is-side":a},"marryBaby"===n?f.createElement(eN.M,{type:"bodytext-3",color:D.t.mbColors.midGray},l("ovulationPage.cycleLength")):f.createElement(y.T,{size:"s4",weight:"semiBold",color:"#595959"},l("ovulationPage.cycleLength")+" ",f.createElement("span",{style:{minHeight:"36px"}},l("ovulationPage.dayUnit"))),f.createElement("div",{className:"slider-outer-wrapper"},"marryBaby"===n&&f.createElement(y.T,{size:"s3",weight:"semiBold",color:D.t.colors.gray600},o),f.createElement(eS.S,{containerStyle:{flex:1},min:21,max:45,step:1,value:o,onChange:s,labelAlwaysOn:"marryBaby"!==n,withControl:"marryBaby"!==n,label:"marryBaby"!==n?void 0:null}))),f.createElement("div",{className:"slider-ovulation day-slider","data-theme":"marryBaby"===n?"marryBaby":"","data-is-side":a},"marryBaby"===n?f.createElement(eN.M,{type:"bodytext-3",color:D.t.mbColors.midGray},l("ovulationPage.periodDuration")):f.createElement(y.T,{size:"s4",weight:"semiBold",color:"#595959"},l("ovulationPage.periodDuration")+" ",f.createElement(y.T,{size:"s4",weight:"semiBold",color:"#595959",style:{display:"inline",minHeight:"36px"}},l("ovulationPage.dayUnit"))),f.createElement("div",{className:"slider-outer-wrapper"},"marryBaby"===n&&f.createElement(y.T,{size:"s3",weight:"semiBold",color:D.t.colors.gray600},c),f.createElement(eS.S,{containerStyle:{flex:1},min:1,max:15,step:1,value:c,onChange:d,labelAlwaysOn:"marryBaby"!==n,withControl:"marryBaby"!==n,label:"marryBaby"!==n?void 0:null}))),f.createElement("div",{style:{width:"100%",display:"flex"}},f.createElement(w.B,{className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===n?"secondary":"primary",dataEventCategory:"Health Tool",dataEventAction:"Ovulation",dataEventLabel:u,onClick:()=>{localStorage.setItem("ovulationInfo",JSON.stringify(m)),t&&t({startDate:r,cycle:o,periodLength:c})},role:"button"},l("dueDatePage.lastPeriod.calculate"))))};(r=u||(u={}))[r.trackPeriod=0]="trackPeriod",r[r.conceive=1]="conceive",r[r.avoidPregnancy=2]="avoidPregnancy";let OvulationCalculator=({locale:e,onSubmitOvulation:t,isSide:a,siteType:n})=>{let{t:l}=(0,es.u)(),[r,i]=(0,f.useState)(u.trackPeriod),o=[{label:l("ovulationPage.trackPeriod"),value:u.trackPeriod},{label:l("ovulationPage.conceive"),value:u.conceive},{label:l("ovulationPage.avoidPregnancy"),value:u.avoidPregnancy}];return f.createElement(ad,null,f.createElement(aa,{className:"input-form input-section","data-is-side":!0},"marryBaby"===n?f.createElement(ae,{groupedWithLabel:l("dueDatePage.calculationMethod"),options:o,placeholder:l("dueDatePage.lastPeriod"),id:"due-date-dropdown",size:"lg",value:o[r],onChange:e=>{i(e.value)}}):f.createElement(f.Fragment,null,f.createElement(y.T,{size:"s4",weight:"semiBold",color:"#595959",style:{marginBottom:"9px",flex:"1"}},l("ovulationPage.objectives")),f.createElement(an,{"data-is-side":a},f.createElement(eT.D,{options:o,placeholder:l("ovulationPage.trackPeriod"),id:"due-date-dropdown",size:"md",value:o[r],onChange:e=>{i(e.value)}})))),f.createElement(OvulationForm,{siteType:n,locale:e,onSubmit:({startDate:e,cycle:a,periodLength:n})=>{t&&t({method:r,periodDateStart:e,cycle:a,periodLength:n})},isSide:a}))},OvulationCardEmbed=({onSubmitOvulation:e,locale:t,ovulationPageInfo:a,expertUrl:n,isSide:l=!1,siteType:r,isMobile:i})=>{var o;let{t:s}=(0,es.u)();return f.createElement(ag,{"data-is-side":l,"data-site":r},f.createElement(ToolsBannerCard,{isSide:l,bannerUrl:S.C.getAssetPath("embedToolBannerPink.svg"),siteType:r,bannerColor:"marryBaby"===r&&D.t.mbColors.mint,isEmbeded:!0,color:"pink",icon:f.createElement("img",{alt:"health-tool-icon",src:(null==a?void 0:a.featured_image)||S.C.getAssetPath("health-tools/ovulation-icon.svg"),loading:"lazy"}),heading:s("healthTools.ovulationCalculator"),medicalReview:{link:n,reviewer:null===(o=null==a?void 0:a.reviewed_by)||void 0===o?void 0:o.display_name,date:null==a?void 0:a.reviewed_date},isMobile:i}),f.createElement(ap,{onSubmit:e=>e.preventDefault(),className:"ovulation-cal","data-is-side":l},f.createElement(OvulationCalculator,{siteType:r,locale:t,onSubmitOvulation:e,isSide:l})))},PWGInputForm=({siteType:e,info:t,onChange:a,errorMessage:n={}})=>{let{t:l}=(0,es.u)(),[r,i]=(0,f.useState)({weightBefore:!1,height:!1,weight:!1}),[o,s]=(0,f.useState)(0),c=(0,f.useRef)(null);(0,f.useEffect)(()=>{var e;s(null===(e=c.current)||void 0===e?void 0:e.clientHeight)});let checkValidInputIsANumber=(e,t)=>{""!==e&&(isNaN(e)||isNaN(parseFloat(e)))||t(e)},onWeightBeforeChanged=e=>{checkValidInputIsANumber(e,e=>{i(e=>Object.assign(Object.assign({},e),{weightBefore:!0}));let n=Object.assign(Object.assign({},t),{weightBefore:e});a&&a(n)})},onHeightChanged=e=>{checkValidInputIsANumber(e,e=>{i(e=>Object.assign(Object.assign({},e),{height:!0}));let n=Object.assign(Object.assign({},t),{height:e});a&&a(n)})},onWeightChanged=e=>{checkValidInputIsANumber(e,e=>{i(e=>Object.assign(Object.assign({},e),{weight:!0}));let n=Object.assign(Object.assign({},t),{weight:e});a&&a(n)})};return(0,f.useEffect)(()=>{a&&a(Object.assign({},t))},[]),(0,f.useEffect)(()=>{i({weightBefore:!1,height:!1,weight:!1})},[n]),"marryBaby"===e?f.createElement(f.Fragment,null,f.createElement("div",{className:"input-form-pwg input-section"},f.createElement(at,{label:l("pregnancyWeightGain.heightInput"),name:"pwg-height",size:"md",value:null==t?void 0:t.height,CustomInput:f.createElement(el.I,{className:(null==r?void 0:r.height)?"":"error-input",name:"pwg-height",size:"md",placeholder:"Nhập th\xf4ng tin",value:null==t?void 0:t.height,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur(),errorMessage:(null==r?void 0:r.height)?"":null==n?void 0:n.height,showErrorMessage:!1,onChange:onHeightChanged})})),f.createElement("div",{className:"input-form-pwg input-section"},f.createElement(at,{label:l("pregnancyWeightGain.weightBeforeInput"),name:"pwg-weightBefore",size:"md",value:null==t?void 0:t.weightBefore,CustomInput:f.createElement(el.I,{className:(null==r?void 0:r.weightBefore)?"":"error-input",name:"pwg-weightBefore",size:"md",placeholder:"Nhập th\xf4ng tin",value:null==t?void 0:t.weightBefore,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur(),errorMessage:(null==r?void 0:r.weightBefore)?"":null==n?void 0:n.height,showErrorMessage:!1,onChange:onWeightBeforeChanged})})),f.createElement("div",{className:"input-form-pwg input-section"},f.createElement(at,{label:l("pregnancyWeightGain.weightInput"),name:"pwg-weight",size:"md",value:null==t?void 0:t.weight,CustomInput:f.createElement(el.I,{className:(null==r?void 0:r.weight)?"":"error-input",name:"pwg-weight",size:"md",placeholder:"Nhập th\xf4ng tin",value:null==t?void 0:t.weight,type:"number",onKeyDown:e=>["e","E","+","-"].includes(e.key)&&e.preventDefault(),onWheelCapture:e=>e.currentTarget.blur(),errorMessage:(null==r?void 0:r.weight)?"":null==n?void 0:n.weight,showErrorMessage:!1,onChange:onWeightChanged})}))):f.createElement(f.Fragment,null,f.createElement("div",{className:"input-form-pwg"},f.createElement(E.P,{placeholder:l("pwg.placeholder.height"),className:"input-section",label:f.createElement("span",{style:{color:D.t.colors.gray600,fontWeight:"bold",marginBottom:"9px"},className:"label-text"},l("pregnancyWeightGain.heightInput")," ",f.createElement("span",{style:{color:`${D.t.colors.gray300}`}},l("bmi.heightInput.desc"))),errorMessage:r.height?"":null==n?void 0:n.height,size:"sm",isNumerousKeyboard:!0,name:"pwg-height",value:null==t?void 0:t.height,onChange:onHeightChanged})),f.createElement("div",{className:"input-form-pwg"},f.createElement(E.P,{placeholder:l("pwg.placeholder.weight"),className:"input-section",label:f.createElement("span",{style:{color:D.t.colors.gray600,fontWeight:"bold",marginBottom:"9px"},ref:c,className:"label-text"},l("pregnancyWeightGain.weightBeforeInput")," ",f.createElement("span",{style:{color:`${D.t.colors.gray300}`}},l("pregnancyWeightGain.weightInput.desc"))),errorMessage:r.weightBefore?"":null==n?void 0:n.weightBefore,size:"sm",isNumerousKeyboard:!0,name:"pwg-weightBefore",onChange:onWeightBeforeChanged,value:null==t?void 0:t.weightBefore})),f.createElement("div",{className:"input-form-pwg"},f.createElement(E.P,{placeholder:l("pwg.placeholder.weight"),className:"input-section",label:f.createElement("span",{style:{color:D.t.colors.gray600,fontWeight:"bold",marginBottom:"9px",minHeight:o},className:"label-text"},l("pregnancyWeightGain.weightInput")," ",f.createElement("span",{style:{color:`${D.t.colors.gray300}`}},l("pregnancyWeightGain.weightInput.desc"))),errorMessage:r.weight?"":null==n?void 0:n.weight,size:"sm",isNumerousKeyboard:!0,name:"pwg-weight",value:null==t?void 0:t.weight,onChange:onWeightChanged})))},PWGCardEmbed=({locale:e,onClick:t,inputErrorMessage:a,pwgContent:n,onFormChange:l,info:r,isMobile:i,isSide:o=!1,siteType:s})=>{var c;let{t:d}=(0,es.u)(),[m,u]=(0,f.useState)("notwins"),[p,g]=(0,f.useState)({label:"1",value:1}),h=(0,f.useMemo)(()=>[...Array(40)].map((e,t)=>({label:`${t+1}`,value:`${t+1}`})),[]),{getHealthToolLink:v}=(0,eI.u)(e),b=(0,f.useMemo)(()=>v(ek.H.PWG),[v]);return f.createElement(ag,{"data-is-side":o,"data-site":s},f.createElement(ToolsBannerCard,{siteType:s,bannerColor:"marryBaby"===s&&D.t.mbColors.mint,isEmbeded:!0,color:"pink",icon:f.createElement("img",{alt:"health-tool-icon",src:(null==n?void 0:n.featuredImage)||S.C.getAssetPath("health-tools/pwg-icon.svg"),loading:"lazy"}),heading:d("pregnancyWeightGain.heading"),medicalReview:{link:(0,eL.f)(null==n?void 0:n.reviewedBy),reviewer:null===(c=null==n?void 0:n.reviewedBy)||void 0===c?void 0:c.display_name,date:null==n?void 0:n.reviewedDate},isMobile:i,isSide:o}),f.createElement(eD.C,null,f.createElement(ap,{onSubmit:e=>e.preventDefault(),className:"pwg-view-mobile","data-is-side":o},"marryBaby"!==s&&f.createElement(ao,{className:"hide-asking-mobile","data-is-side":o},f.createElement(y.T,{size:"s4",weight:"semiBold",style:{display:"block",color:D.t.colors.gray600},className:"label"},d("pregnancyWeightGain.havingTwins")),f.createElement(ah,{options:[{value:"twins",label:d("switchBtn.yes")},{value:"notwins",label:d("switchBtn.no")}],value:m,onChange:e=>u(e),className:"gender-selector",id:"twins-check",direction:"horizontal",size:"small"})),f.createElement(ad,null,f.createElement(am,{className:"input-section input-form-pwg","data-is-side":o},"marryBaby"===s?f.createElement(ae,{groupedWithLabel:d("pregnancyWeightGain.weekInput"),options:h,placeholder:"28 days",id:"due-date-dropdown",size:"lg",value:p,onChange:e=>g({label:e.label,value:e.value})}):f.createElement(f.Fragment,null,f.createElement(y.T,{size:"s4",weight:"semiBold",style:{display:"inline-block",marginBottom:"9px",color:D.t.colors.gray600}},d("pregnancyWeightGain.weekInput")),f.createElement(eT.D,{options:h,placeholder:String(p.label),id:"weight-gain-dropdown",size:"md",value:p,onChange:e=>g({label:e.label,value:e.value})}))),f.createElement(PWGInputForm,{siteType:s,info:r,errorMessage:a,onChange:l})),"marryBaby"!==s&&f.createElement(ao,{className:"hide-asking-desk","data-is-side":o},f.createElement(y.T,{size:"s4",weight:"semiBold",style:{display:"block",color:D.t.colors.gray600},className:"label"},d("pregnancyWeightGain.havingTwins")),f.createElement(ah,{options:[{value:"twins",label:d("switchBtn.yes")},{value:"notwins",label:d("switchBtn.no")}],value:m,onChange:e=>u(e),className:"gender-selector",id:"twins-check-mobile",direction:"horizontal",size:"small"})),"marryBaby"===s&&f.createElement(Checkbox,{name:"twins",label:d("pregnancyWeightGain.havingTwins"),checked:"twins"===m,siteType:"marryBaby",onChange:()=>{"twins"===m?u("notwins"):u("twins")},value:"twins"}),f.createElement(ac,{"data-is-side":o,"data-site":s},f.createElement(w.B,{dataEventCategory:"Health Tool",dataEventAction:"Embedded Pregnancy Weight Gain",dataEventLabel:`https://${Q.d["marryBaby"===s?"vi-VN_MB":e]}/${b}`,className:"due-date-calculate-button",size:"lg",variant:"marryBaby"===s?"secondary":"primary",onClick:()=>t(m,p.value),role:"button"},d("dueDatePage.lastPeriod.calculate"))))))},aH=J.Z.div` flex: 1; `,aW=J.Z.div` padding: 0 10px; `,aG=J.Z.div` display: flex; height: 80px; align-items: center; .calendar-month { font-size: 16px; flex: 1; text-align: center; strong { margin-left: 5px; } } ${x.M.mbDown} { height: 70px; } `,aV=J.Z.div` display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; `,aU=(0,J.Z)(aV)` margin-bottom: 8px; `;J.Z.div` height: 40px; width: 40px; display: flex; align-items: center; justify-content: center; `;let aY=J.Z.div` font-size: 14px; display: flex; justify-content: center; align-items: center; color: 1px solid ${D.t.colors.gray800}; font-weight: 300; `,aQ=J.Z.div` width: 18px; position: relative; &::before { content: ''; position: absolute; inset: 16px 0 0 0; width: 1px; left: 50%; right: 50%; background: ${D.t.colors.neutral100}; } `,aq=J.Z.div` margin: 0 auto; `,aK=J.Z.div` position: relative; `,aX=J.Z.div` position: relative; display: flex; justify-content: center; align-items: center; height: 34px; ${x.M.mbUp} { height: 38px; } &[data-is-disabled='true'] { opacity: 0.3; } &[data-in-range='true']:not([data-is-from='true'][data-is-to='true']) { background-color: ${D.t.colors.gray100}; } &:before { position: absolute; top: 0; bottom: 0; right: 0; background-color: ${D.t.colors.gray100}; } &[data-is-from='true'][data-in-range='true'][data-is-to='false'] { background-color: transparent; &:before { content: ''; left: 50%; right: 0; } } &[data-is-to='true'][data-in-range='true'][data-is-from='false'], &:hover[data-in-range='true']:is([data-has-range='false'] &) { background-color: transparent; &:before { content: ''; left: 0; right: 50%; } } `,aJ=J.Z.div` position: relative; font-weight: 600; ${x.M.mbDown} { width: 32px; height: 32px; } ${x.M.mbUp} { width: 36px; height: 36px; } display: flex; justify-content: center; align-items: center; cursor: pointer; [data-is-disabled='true'] & { cursor: not-allowed; } line-height: 1; color: 1px solid ${D.t.colors.gray800}; [data-is-selected='true'] &, [data-is-today='true'] &, [data-is-selected='false']:hover & { border-radius: 32px; } [data-is-selected='true'] & { background-color: ${D.t.colors.primaryBase}; color: white; } [data-is-selected='false']:hover & { background-color: ${D.t.colors.primary50}; } [data-is-today='true'][data-is-selected='false'] & { background-color: transparent; border-radius: 32px; border: 1px solid ${D.t.colors.primaryBase}; } `,a0={"en-PH":e_.Z,"vi-VN":eZ.default,"zh-TW":eF.default,"id-ID":ej.default};function DateRangePickerCalendar(e){let{value:t={from:null,to:null}}=e,[a,n]=(0,f.useState)(null),{isMobile:l}=(0,w.u)(),[r,i]=(0,f.useState)(()=>t),[o,s]=(0,f.useState)(()=>{var e;return(0,eu.Z)(null!==(e=t.from)&&void 0!==e?e:new Date)}),c=(0,f.useMemo)(()=>(0,ep.Z)(o,1),[o]),d=Object.assign(Object.assign({},e),{goToNextMonth:function(){s(e=>(0,ep.Z)(e,1))},goToPreviousMonth:function(){s(e=>(0,eg.Z)(e,1))},range:r,setRange:i,hoverDay:a,setHoverDay:n});return f.createElement(f.Fragment,null,f.createElement(DateRangePickerCalendarMonth,Object.assign({},d,{date:o})),!l&&f.createElement(aQ,null),!l&&f.createElement(DateRangePickerCalendarMonth,Object.assign({},d,{date:c})))}function DateRangePickerCalendarMonth({date:e,range:t,setRange:a,onChange:n,goToPreviousMonth:l,goToNextMonth:r,minDate:i,maxDate:o,close:s=()=>void 0,autoClose:c=!1,hoverDay:d,setHoverDay:m}){let{locale:u}=(0,es.u)(),p=(0,f.useMemo)(()=>{var e;return null!==(e=a0[u])&&void 0!==e?e:a0["en-PH"]},[u]),g=(0,f.useMemo)(()=>(0,ec.Z)(e,"MMMM",{locale:p}),[e,p]),h=(0,f.useMemo)(()=>p?[1,2,3,4,5,6,0].map(e=>p.localize.day(e,{width:"narrow"})):[],[p]);function renderDay(e,n){if(null===e)return f.createElement(aX,{key:`idx-${n}`,"data-empty":"true"});let l=e.getDate(),r=(0,ev.Z)(e),u=!!t.from&&(0,eb.Z)(t.from,e),p=!!t.to&&(0,eb.Z)(t.to,e),g=null!==d,h=!1;g&&t.from&&(0,em.Z)(t.from,d)&&!t.to?h=(0,ef.Z)(e,{start:t.from,end:d}):t.from&&t.to&&(h=(0,ef.Z)(e,{start:t.from,end:t.to}));let v=!1;return i&&o?v=!(0,ef.Z)(e,{start:i,end:o}):i?v=(0,em.Z)(e,i):o&&(v=(0,ey.Z)(e,o)),f.createElement(aX,{key:l,"data-is-today":r,"data-is-past":!r&&(0,eE.Z)(e),"data-is-selected":u||p,"data-is-disabled":v,"data-in-range":h,"data-is-from":u,"data-is-to":p,onMouseEnter:()=>{m(e)},onMouseLeave:()=>m(null),onClick:()=>{v||a(a=>(c&&t.from&&!t.to&&s(),a.from||a.to?a.from&&a.to?{from:e,to:null}:a.from?(0,em.Z)(e,a.from)?Object.assign(Object.assign({},a),{from:e}):Object.assign(Object.assign({},a),{to:e}):a:Object.assign(Object.assign({},a),{from:e})))}},f.createElement(aJ,{onClick:()=>void 0},f.createElement("p",null,l)))}return(0,f.useEffect)(()=>{t.from&&t.to&&n(t)},[t]),f.createElement(aH,{className:"calendar-wrapper"},f.createElement(aG,null,f.createElement(en.B,{onClick:l,size:"md",color:"ghost",icon:f.createElement("img",{src:S.C.getAssetPath("calendarArrowLeft.svg"),loading:"lazy"})}),f.createElement("div",{className:"calendar-month"},g,f.createElement("strong",null,(0,ec.Z)(e,"yyyy"))),f.createElement(en.B,{onClick:r,size:"md",color:"ghost",icon:f.createElement("img",{src:S.C.getAssetPath("calendarArrowRight.svg"),loading:"lazy"})})),f.createElement(aW,null,f.createElement("div",null,f.createElement(aU,null,h.map((e,t)=>f.createElement(aY,{key:`${e}-${t}`},e)))),f.createElement("div",null,function(){let a=e.getFullYear(),n=e.getMonth(),l=(0,eh.Z)(e),r=[];for(let e=1;e<=l;e++)r.push(new Date(a,n,e));let i=r[0]?r[0].getDay():0;if(1!==i){let e=0===i?6:i-1;for(let t=0;t{close()});let m=(0,f.useMemo)(()=>a.from&&a.to?(0,eb.Z)(a.from,a.to)?formatDate(a.from):`${formatDate(a.from)} - ${formatDate(a.to)}`:"",[a.from,a.to]);return f.createElement(a1,{className:[i,s&&"focused"].filter(Boolean).join(" "),ref:d},f.createElement("label",{htmlFor:t},f.createElement(E.P,{size:e,value:m,name:t,actionIcon:f.createElement("img",{src:S.C.getAssetPath("calendar.svg"),loading:"lazy"}),onFocus:()=>c(!0)})),s?f.createElement(a2,{onMouseDown:e=>{e.stopPropagation()}},f.createElement(DateRangePickerCalendar,{value:a,onChange:function(e){r&&r(e)},minDate:n,maxDate:l,close:close,autoClose:o})):null)}var a3={breadcrumb:"WUqzfRb",separator:"MnVGtSY",textLink:"NclbhXQ"};let BreadcrumbItem=({LinkComponent:e,page:t,isLast:a,onChangePage:n})=>{let{label:l,value:r,isDropdown:i,dropdownItems:o,dataEventCategory:s,dataEventAction:c,dataEventLabel:d}=t;return i?f.createElement(eT.D,{options:o,placeholder:"...",id:"",placeholderIcon:null,onChange:n,className:"collapsed-breadcrumb"}):f.createElement("div",{className:a3.textLink,title:"string"!=typeof l?r:l,"data-last":a},e&&f.createElement(e,{"data-event-category":s,"data-event-action":c,"data-event-label":d,href:r||"#"},l))},Breadcrumbs=({className:e,pages:t,size:a,LinkComponent:n="a",onChangePage:l,separator:r})=>{let i=(0,f.useMemo)(()=>t.map((e,a)=>{if(t.length>4){if(a>1&&a{let o=t+1===i.length;return f.createElement(f.Fragment,{key:t},f.createElement(BreadcrumbItem,{LinkComponent:n,page:e,isLast:o,onChangePage:l}),!o&&(e.separator||r||f.createElement("div",{className:a3.separator,"data-size":a})))}))},a5=J.Z.div` display: flex; gap: 20px; width: 100%; align-items: center; justify-content: center; .icon-group { display: flex; align-items: center; gap: 10px; a, svg { width: 32px; height: 32px; } .share { width: 32px; height: 32px; padding: 8px; &:hover { background-color: ${D.t.colors.neutral50}; } svg { margin: 0; width: 16px; height: 16px; } } } `,AttachIcon=()=>f.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},f.createElement("path",{d:"M6.86364 10.6666H5.22727C4.86912 10.6666 4.51448 10.5977 4.18359 10.4637C3.8527 10.3296 3.55205 10.1332 3.2988 9.8856C2.78734 9.3855 2.5 8.70722 2.5 7.99998C2.5 7.29274 2.78734 6.61446 3.2988 6.11436C3.81026 5.61426 4.50396 5.33331 5.22727 5.33331H6.86364M9.78374 5.33331H11.7727C12.1309 5.33331 12.4855 5.40229 12.8164 5.5363C13.1473 5.67031 13.4479 5.86674 13.7012 6.11436C13.9545 6.36198 14.1553 6.65596 14.2924 6.97949C14.4295 7.30303 14.5 7.64979 14.5 7.99998C14.5 8.35017 14.4295 8.69693 14.2924 9.02047C14.1553 9.344 13.9545 9.63798 13.7012 9.8856C13.4479 10.1332 13.1473 10.3296 12.8164 10.4637C12.4855 10.5977 12.1309 10.6666 11.7727 10.6666H9.78374",stroke:"#595959",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M6.5 8H10.5",stroke:"#595959",strokeLinecap:"round",strokeLinejoin:"round"})),ShareContainer=({url:e,onCopied:t,locale:a,siteType:n})=>{let{t:l}=(0,es.u)(),r=(0,eR.g)(e||"").filter(e=>!e.allowedLocales||e.allowedLocales.includes(a)),i=(0,f.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]);return f.createElement(a5,null,f.createElement(y.T,{size:"p3",color:D.t.colors.gray800},l("shareContainer.title")),f.createElement("div",{className:"icon-group"},r.map((e,t)=>f.createElement("a",{key:t,href:e.href,target:"_blank",rel:"noreferrer","data-event-category":"Health Tool","data-event-action":`Social Share - ${e.name}`,"data-event-label":i},e.icon)),f.createElement(en.B,{theme:n,size:"sm",type:"button",color:"tertiary",className:"share",style:{},icon:f.createElement(AttachIcon,null),onClick:()=>(0,k.a)(void 0,void 0,void 0,function*(){var a;yield null===(a=null==navigator?void 0:navigator.clipboard)||void 0===a?void 0:a.writeText(e),null==t||t()}),"data-event-category":"Health Tool","data-event-action":"Copy Link","data-event-label":i})))},a6=(0,J.Z)(eP.D)` padding-bottom: 24px; .share-container { display: flex; flex-direction: column; gap: 24px; } .icon-group { margin-top: 12px; display: flex; gap: 16px; img { border-radius: 8px; } } .input-group { margin-top: 8px; display: flex; gap: 8px; button { padding: 10px; &:hover { background-color: ${D.t.colors.neutral50}; } } svg { margin: 0; } a, svg:not(.copy) { width: 32px; height: 32px; } } `,CopyIcon=()=>f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:"copy"},f.createElement("path",{d:"M4 2.5C3.17125 2.5 2.5 3.17125 2.5 4V13.75C2.5 14.164 2.836 14.5 3.25 14.5C3.664 14.5 4 14.164 4 13.75V4H13.75C14.164 4 14.5 3.664 14.5 3.25C14.5 2.836 14.164 2.5 13.75 2.5H4ZM7 5.5C6.17125 5.5 5.5 6.17125 5.5 7V16C5.5 16.8287 6.17125 17.5 7 17.5H16C16.8287 17.5 17.5 16.8287 17.5 16V7C17.5 6.17125 16.8287 5.5 16 5.5H7ZM7 7H16V16H7V7Z",fill:"#595959"})),ShareDrawer=e=>{var{open:t,title:a,onClose:n,onCopied:l,onShared:r,url:i,locale:o}=e,s=(0,k._)(e,["open","title","onClose","onCopied","onShared","url","locale"]);let{t:c}=(0,es.u)(),d=(0,f.useCallback)(()=>(0,k.a)(void 0,void 0,void 0,function*(){var e;yield null===(e=null==navigator?void 0:navigator.clipboard)||void 0===e?void 0:e.writeText(i),null==l||l()}),[i,l]),m=(0,eR.g)(i||"").filter(e=>!e.allowedLocales||e.allowedLocales.includes(o));return((0,f.useEffect)(()=>{t&&navigator.share&&navigator.share({title:null!=a?a:"Read This Post",url:i}).then(()=>{null==r||r()}).catch(()=>{null==n||n()})},[i,a,r,t]),"undefined"!=typeof navigator&&navigator.share)?null:f.createElement(a6,Object.assign({title:c("share.title"),onClose:n,open:t,placement:"bottom"},s),f.createElement("div",{className:"share-container"},f.createElement("div",{className:"icon-container"},f.createElement(y.T,{weight:"semiBold",size:"s3",color:D.t.colors.gray600},c("share.title")),f.createElement("div",{className:"icon-group"},m.map((e,t)=>f.createElement("a",{key:t,href:e.href,target:"_blank",rel:"noreferrer"},e.icon)))),f.createElement("div",{className:"link-container"},f.createElement(y.T,{weight:"semiBold",size:"s3",color:D.t.colors.gray600},c("share.copyLink")),f.createElement("div",{className:"input-group"},f.createElement(el.I,{name:"link",size:"md",value:i,isDisabled:!0}),f.createElement(en.B,{size:"md",type:"button",color:"tertiary",icon:f.createElement(CopyIcon,null),onClick:d})))))},a4=J.Z.div` position: fixed; z-index: 48; bottom: 0; left: 50%; width: fit-content; max-width: 100%; background: none; transform: translateX(-50%); .close-sticky-button { position: absolute; display: flex; width: 16px; height: 16px; align-items: center; justify-content: center; background: #bfbfbf; border-radius: 50%; color: white; cursor: pointer; font-size: 12px; line-height: 12px; transform: translate(50%, -50%); top: 0; right: 0; } opacity: 0; pointer-events: none; &[data-visible='true'] { opacity: 1; pointer-events: auto; } `,a7=J.Z.div` display: flex; justify-content: center; align-items: center; flex-direction: column; max-width: 100%; width: fit-content; height: fit-content; margin-inline: auto; /* margin: 1rem auto; */ &[data-no-wrapper='false'] { border: 1px solid ${D.t.colors.neutral50}; background: ${D.t.colors.neutral50}; } &[data-no-wrapper='true'] { line-height: 0; } &[data-header-bottom='true'] { flex-direction: column-reverse; background: none; border: none; } `,a8=J.Z.div` width: 100%; padding: 0 5px 1.5px; display: flex; align-items: center; justify-content: center; gap: 5px; text-transform: capitalize; img { height: 12px; width: 12px; max-width: 12px; max-height: 12px; } &[data-header-bottom='true'] { background: ${D.t.colors.neutral50}; } span { font-size: 10px; line-height: 12px; color: ${D.t.colors.gray400}; font-weight: 400; } `,a9=J.Z.div` background-color: white; background-image: url(${S.C.getAssetPath("close-blue.svg")}); background-repeat: no-repeat; background-size: 10px; background-position: center; width: 12px; height: 12px; position: absolute; top: 1px; right: 1px; cursor: pointer; `,ne={},displayAd=({contentId:e,adUnitPath:t,size:a,divId:n,pos:l,sizeMapping:r,hideIfHasSubot:i,customTargetings:o,onSuccess:s})=>{if(!n||!document.getElementById(n))return console.error("divId is required");destroyAdSlot(n),window.googletag=window.googletag||{cmd:[]};let{googletag:c}=window;c.cmd.push(function(){let d=document.querySelector('meta[name="content_id"]'),m="string"==typeof e?e:null==d?void 0:d.content,u=c.defineSlot(t,a,n);if(u){try{o&&Object.keys(o).forEach(e=>{e&&(null==u||u.setTargeting(e,o[e]))})}catch(e){console.error(e)}ne[n]=u,u.setTargeting("Pos",l),u.addService(c.pubads()),m&&u.setTargeting("Content_ID",m),r&&u.defineSizeMapping(r),i&&document.getElementById("subot--container")&&u.setTargeting("chatbot",!0),c.display(n),null==s||s()}})},destroyAdSlot=e=>{if(ne[e]){window.googletag=window.googletag||{cmd:[]};let{googletag:t}=window;t.cmd.push(function(){t.destroySlots([ne[e]]),delete ne[e]})}},nt=["TopBanner","MidBanner1","MidBanner2","EndBanner","Sticky"],na=(0,f.forwardRef)(function({className:e,adUnitPath:t,size:a,divId:n,pos:l,sizeMapping:r,contentId:i,isHidden:o,hideIfHasSubot:s,isSticky:c,refreshInterval:d,customTargetings:m,style:u,adDefaultSize:p,noWrapper:g,showCloseBtn:h,onCloseAd:v,headerBottom:b,wrapperProps:y,locale:E,isMarryBaby:x},w){let C=d||(E===q.L.Vietnam&&l.some(e=>nt.includes(e))?30:void 0),{t:k}=(0,es.u)(),B=(0,f.useRef)(null),N=(0,f.useRef)(null),T=(0,f.useRef)(C);T.current=C;let[D,I]=(0,f.useState)(!1),adSlotChanged=()=>{T.current&&(null!==N.current&&clearInterval(N.current),N.current=window.setInterval(()=>{window.googletag=window.googletag||{cmd:[]};let{googletag:e}=window;e.cmd.push(function(){ne[n]&&e.pubads().refresh([ne[n]])})},1e3*T.current))};if((0,f.useEffect)(()=>()=>{destroyAdSlot(n),N.current&&clearInterval(N.current)},[]),(0,f.useEffect)(()=>{adSlotChanged()},[C]),(0,f.useEffect)(()=>{o||displayAd({contentId:i,adUnitPath:t,size:a,divId:n,pos:l,sizeMapping:r,hideIfHasSubot:s,customTargetings:m,onSuccess:adSlotChanged})},[o]),D)return null;let $=f.createElement("div",{style:{position:"relative",width:"fit-content",height:"fit-content",overflow:"hidden",maxWidth:"100%",display:"flex",alignItems:"center",justifyContent:"center"}},f.createElement("div",{ref:w,id:n}),h&&f.createElement(a9,{onClick:()=>{null==v||v(),I(!0)}}));if(c)return $;let z=p?p[0]:a?Array.isArray(a[0])?a[0][0]:a[0]:void 0,P=p?p[1]:a?Array.isArray(a[0])?a[0][1]:a[1]:void 0;return f.createElement(M.x,Object.assign({},y,{className:e}),f.createElement(a7,{ref:B,className:e,style:u,"data-no-wrapper":!!g,"data-header-bottom":!!b},g?$:f.createElement(f.Fragment,null,f.createElement(a8,{"data-header-bottom":!!b},f.createElement("img",{src:x?S.C.getAssetPath("adsIcon-mb.svg"):S.C.getAssetPath("adsIcon.svg"),alt:"",loading:"lazy"}),f.createElement("span",null,k("adBanner.title"))),f.createElement("div",{style:{minWidth:z||"100%",minHeight:P||"100%",position:"relative"}},$))))}),nn=(0,f.memo)(na,(e,t)=>e.adUnitPath===t.adUnitPath&&e.divId===t.divId&&e.className===t.className),FixedBottomAdBlock=({className:e,adUnitPath:t,divId:a,isMobile:n,contentId:l,customTargetings:r,locale:i,isMarryBaby:o})=>{let[s,c]=(0,f.useState)(!0),[d,m]=(0,f.useState)(!1),[u,p]=(0,f.useState)(!0),g=(0,f.useRef)(null),h=(0,f.useRef)((0,eH.Z)()),v=(0,f.useRef)(null),b=(0,f.useRef)(),y=(0,f.useRef)();return((0,f.useEffect)(()=>{let checkAdShowing=()=>{y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{var e;document.getElementById("subot--container")?c(!0):(c(!1),(null===(e=g.current)||void 0===e?void 0:e.clientHeight)?p(!1):p(!0)),checkAdShowing()},4e3)};return checkAdShowing(),()=>{b.current&&clearTimeout(b.current),y.current&&clearTimeout(y.current)}},[]),s||d)?null:f.createElement(a4,{key:n?"mobile":"desktop",ref:v,className:e,"data-visible":!u},t&&f.createElement(nn,{wrapperProps:{m:0},ref:g,adUnitPath:t,size:n?[[320,50],[320,100]]:[728,90],divId:(a||"div-gpt-ad-sticky")+(n?"-mobile":"")+l+String(h.current),pos:["Sticky"],contentId:l,hideIfHasSubot:n,customTargetings:r,adDefaultSize:n?[320,50]:[728,90],showCloseBtn:!0,onCloseAd:()=>m(!0),refreshInterval:60,locale:i,isMarryBaby:o}))},nl=[{title:"Health News & Current Affairs",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:S.C.getAssetPath("newsletter-prefer/newsletter-health.svg"),checked:!1,id:1},{title:"Educational Medical Hello Bacsi Content",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:S.C.getAssetPath("newsletter-prefer/newsletter-education.svg"),checked:!1,id:2},{title:"Hello Health Community Feed",description:"Covering the latest happenings in the health field, including medical breakthroughs, policies, and disease outbreaks",icon:S.C.getAssetPath("newsletter-prefer/newsletter-community.svg"),checked:!1,id:3}];(i=p||(p={})).DUE_DATE="due-date-calculator",i.BMI="bmi",i.BMR="bmr",i.OVULATION="ovulation",i.IFRAME="IFRAME",i.PWG="pregnancy-weight-gain",i.THR="heart-rate",i.BABY_VACCINE="vaccination-tool",i.BABY_GROWTH="baby-growth-tracking",i.BABY_POOP="baby-poop-checking";let nr={DUE_DATE:p.DUE_DATE,BMI:p.BMI,BMR:p.BMR,OVULATION:p.OVULATION,IFRAME:p.IFRAME,PWG:p.PWG,THR:p.THR,BABY_VACCINE:p.BABY_VACCINE,BABY_GROWTH:p.BABY_GROWTH,BABY_POOP:p.BABY_POOP},ni={[nr.DUE_DATE]:S.C.getAssetPath("health-tools/due-date-icon.svg")};(o=g||(g={})).Pregnant="pregnant",o.Parenting="parenting",(h||(h={})).Option="option",(s=v||(v={})).Button="button",s.Checkbox="checkbox",(c=b||(b={})).ShowTool="showTool",c.ShowPremiumModal="showPremiumModal",c.ShowOptionBanner="showOptionBanner",c.Hide="hide";let no={pregnancy:g.Pregnant,parenting:g.Parenting},ns={[g.Pregnant]:"pregnant",[g.Parenting]:"parent"},FLOW=(e,t)=>({[g.Pregnant]:{action:b.ShowOptionBanner,props:{heading:e("pnBanner.pregnancy.heading"),description:e("pnBanner.pregnancy.desc"),styleType:v.Button,thumbnail:{desktop:S.C.getAssetPath("newsletter/banner-option-pregnancy-desktop.png"),mobile:S.C.getAssetPath("newsletter/banner-option-pregnancy-mobile.png")},buttonProps:{variant:"white",styles:e=>({minWidth:(0,z.h)(80),[e.fn.largerThan("sm")]:{minWidth:(0,z.h)(120)}})},items:[{label:e("switchBtn.yes"),value:"yes",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Are you navigating the world of pregnancy - Yes Click",dataEventLabel:t}},{label:e("switchBtn.no"),value:"no",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Are you navigating the world of pregnancy - No Click",dataEventLabel:t}}]},submitHandler:{yes:{action:b.ShowTool,props:{value:nr.DUE_DATE}},no:{action:b.ShowPremiumModal}}},[g.Parenting]:{action:b.ShowOptionBanner,props:{heading:e("pnBanner.parenting.heading"),description:e("pnBanner.parenting.desc"),thumbnail:{desktop:S.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:S.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,styleType:v.Checkbox,items:[{label:e("pnBanner.toddlers"),value:"todders"},{label:e("pnBanner.teenager"),value:"teenager"}],submitBtnTracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the age range of your kids Click",dataEventLabel:t}},submitHandler:{todders:{action:b.ShowTool,props:{value:nr.BABY_VACCINE}},teenager:{action:b.ShowOptionBanner,props:{styleType:v.Button,heading:e("pnBanner.teenager.heading"),description:e("pnBanner.parenting.desc"),thumbnail:{desktop:S.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:S.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},buttonProps:{variant:"white"},items:[{label:e("childCard.boy"),value:"teenager.boy",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the gender of your kids - Boy Click",dataEventLabel:t}},{label:e("childCard.girl"),value:"teenager.girl",tracking:{dataEventCategory:"Focused Audience",dataEventAction:"What is the gender of your kids - Girl Click",dataEventLabel:t}}]}},"teenager.boy":{action:b.ShowPremiumModal},"teenager.girl":{action:b.ShowTool,activeTool:Q.R.HPV,props:{value:Q.R.HPV}},"todders|teenager":{action:b.ShowOptionBanner,props:{styleType:v.Button,heading:e("pnBanner.both.heading"),description:e("pnBanner.both.desc"),thumbnail:{desktop:S.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:S.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,buttonProps:{variant:"secondary"},styles:e=>({wrapper:{[e.fn.smallerThan("sm")]:{flexDirection:"column"}},button:{background:e.colors.blue[0]}}),items:[{label:e("pnBanner.vaccine.btnLabel"),activeTool:nr.BABY_VACCINE,isLink:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Baby Vaccine Click",dataEventLabel:t}},{label:e("pnBanner.pn.btnLabel"),value:"todders|teenager.showPN",isPNBtn:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Premium Newsletter Click",dataEventLabel:t}}]}},"todders|teenager.showPN":{action:b.ShowOptionBanner,props:{styleType:v.Button,heading:e("pnBanner.both.heading"),description:e("pnBanner.both.desc"),thumbnail:{desktop:S.C.getAssetPath("newsletter/banner-option-parenting-desktop.png"),mobile:S.C.getAssetPath("newsletter/banner-option-parenting-mobile.png")},hideDescOnMobile:!0,buttonProps:{variant:"secondary"},styles:e=>({wrapper:{[e.fn.smallerThan("sm")]:{flexDirection:"column"}},button:{background:e.colors.blue[0]}}),items:[{label:e("pnBanner.vaccine.btnLabel"),activeTool:nr.BABY_VACCINE,isLink:!0,tracking:{dataEventCategory:"Focused Audience",dataEventAction:"Experience our tools for parent - Baby Vaccine Click",dataEventLabel:t}}]}}}}}),TOOL_BANNERS_PROPS=e=>({[nr.DUE_DATE]:{heading:e("pnBanner.dueDateTool.heading"),description:e("pnBanner.dueDateTool.desc"),btnLabel:e("pnBanner.caclNow"),value:nr.DUE_DATE,dataEventAction:"Try our Due Date Calculator Click"},[nr.BABY_VACCINE]:{heading:e("pnBanner.vaccination.heading"),description:e("pnBanner.vaccination.desc"),btnLabel:e("pnBanner.caclNow"),value:nr.BABY_VACCINE,dataEventAction:"Try our Baby Vaccine Scheduler Click"},[nr.BABY_GROWTH]:{heading:"Baby Growth",description:e("pnBanner.vaccination.desc"),btnLabel:e("pnBanner.caclNow"),value:nr.BABY_GROWTH},[Q.R.HPV]:{heading:e("pnBanner.hpv.heading"),description:e("pnBanner.hpv.desc"),thumbnail:{desktop:S.C.getAssetPath("newsletter/banner-option-hpv-desktop.png"),mobile:S.C.getAssetPath("newsletter/banner-option-hpv-mobile.png")},isRiskScreener:!0,btnLabel:e("pnBanner.checkNow"),value:Q.R.HPV,hideDescOnMobile:!0,dataEventAction:"Keep safe from HPV virus Click"}}),nc=(0,f.createContext)({}),PnBannerEle=e=>{var t=(0,k._)(e,[]);let{locale:a}=(0,es.u)(),{type:n,isMobile:l,currentUrl:r,isMarketing:i,isLoggedIn:o,setShouldAcquisitionModalOpen:s}=(0,f.useContext)(nc);return f.createElement(Z.W,Object.assign({mih:{base:144,md:160},fluid:!0,p:0,sx:{borderRadius:4,cursor:"pointer"},onClick:()=>(0,k.a)(void 0,void 0,void 0,function*(){let e=i?(0,eW.g)(a)+"/dang-ky-nhan-tin/":`${window.location.href}?source=acquisition`;o?null==s||s():window.location.href=`${(0,eW.a)(a)}/?returnUrl=${encodeURIComponent(e)}`}),"data-event-category":"Newsletter","data-event-action":"Banner Click","data-event-label":r,className:"pointer-event-child-none"},t),f.createElement(w.I,{src:i?S.C.getAssetPath(`newsletter/${l?"Mobile":"Desktop"}_Marketing.png`):S.C.getAssetPath(`newsletter/${l?"Mobile":"Desktop"}_${n}.png`),style:{maxWidth:"100%"},alt:"newsletter banner"}))},nd={GET_NEWSLETTER_CATEGORIES:"api/v1/categories?site={website_url}",POST_SUBSCRIPTION:"api/v1/subscription?site={website_url}",GET_SUBSCRIPTION_CATEGORIES:"api/v1/categories?site={website_url}"};var nm=(0,L.k)(e=>({root:{},wrapper:{[e.fn.smallerThan("sm")]:{width:"70%"}},button:{[e.fn.smallerThan("sm")]:{height:"auto",minHeight:(0,z.h)(32),padding:`${(0,z.h)(6)} ${(0,z.h)(16)}`,textAlign:"center",width:"100%"}},buttonLabel:{whiteSpace:"normal"}}));let BannerLayout=({heading:e,description:t,thumbnail:a={desktop:"",mobile:""},hideDescOnMobile:n,children:l})=>{let{isMobile:r,minHeight:i}=(0,f.useContext)(nc);return f.createElement(M.x,{sx:()=>({borderRadius:(0,z.h)(8),background:"linear-gradient(180deg, #FAFDFF 0%, #E3F2FF 100%)"})},f.createElement(M.x,{sx:e=>({minHeight:(0,z.h)(i),borderRadius:"inherit",background:`url(${r?a.mobile:a.desktop})`,backgroundPosition:"center right",backgroundRepeat:"no-repeat",backgroundSize:"contain",padding:`${(0,z.h)(24)} ${(0,z.h)(16)}`,display:"flex",flexDirection:"column",justifyContent:"center",[e.fn.largerThan("sm")]:{padding:`${(0,z.h)(22)} ${(0,z.h)(32)}`}})},f.createElement(O.K,{spacing:(0,z.h)(16)},f.createElement(O.K,{spacing:(0,z.h)(4),sx:e=>({maxWidth:"60%",[e.fn.largerThan("sm")]:{maxWidth:"70%"}})},e&&f.createElement(T.H,{tag:"h4"},e),!(n&&r)&&t&&f.createElement(y.T,{size:"p4"},t)),f.createElement(M.x,null,l))))},BannerWithOptions=e=>{let{styleType:t=v.Button,items:a=[],buttonProps:n,styles:l,submitBtnTracking:r}=e,{classes:i}=nm(void 0,{name:"PremiumBannerWithOptions",styles:l}),{t:o,locale:s}=(0,es.u)(),{surveyType:c,articleId:d,handleClickOption:m,hasPremiumBanner:u,source:p,isMobile:g,setShowPNModal:h}=(0,f.useContext)(nc),b=(0,f.useMemo)(()=>u?a:a.filter(e=>!e.isPNBtn).filter(Boolean),[a]),{getHealthToolLink:y}=(0,eI.u)(s),E=(0,eG.c)({initialValues:{bannerOptions:[]}}),saveStep=e=>(0,k.a)(void 0,void 0,void 0,function*(){return yield(0,ek.d)((0,ek.g)(ek.P.HEALTH_TOOL.CREATE,{_locale:s,type:ns[c]}),"POST",{headers:{"Content-Type":"application/json"},data:{value:e,article:d,source:p}})}),x=(0,f.useCallback)(()=>f.createElement($.k,{gap:(0,z.h)(8),className:i.wrapper},b.map((e,t)=>f.createElement(M.x,{key:String(t),component:e.isLink?"a":"div",href:e.isRiskScreener?`https://${Q.d[s]}/bot/${Q.a[s][e.activeTool]}/`:e.isLink?y(e.activeTool):void 0},f.createElement(w.B,Object.assign({className:i.button,classNames:{label:i.buttonLabel},size:"sm"},e.tracking,n,{onClick:()=>{e.isLink||(e.isPNBtn&&h(!0),saveStep(e.value),m(e.value))}}),e.label)))),[b,E]),C=(0,f.useCallback)(()=>f.createElement($.k,null,f.createElement($.k,{align:"center",gap:(0,z.h)(24),sx:e=>({background:"white",borderRadius:(0,z.h)(8),padding:(0,z.h)(4),[e.fn.largerThan("sm")]:{paddingLeft:(0,z.h)(16)}})},f.createElement(w.d.Group,Object.assign({},E.getInputProps("bannerOptions",{type:"checkbox"})),f.createElement($.k,{gap:(0,z.h)(16)},b.map((e,t)=>f.createElement(w.d,{key:String(t),value:e.value,label:e.label,styles:{label:{cursor:"pointer"}}})))),f.createElement(w.B,Object.assign({size:"sm"},r,n,{disabled:0===E.getInputProps("bannerOptions").value.length,leftIcon:g?f.createElement(eU.I.ArrowRightTail,{size:18,useCurrentColor:!0}):void 0,onClick:()=>{let e=E.getInputProps("bannerOptions").value;saveStep(e.join("|")),m(e.join("|"))},styles:e=>({root:{[e.fn.smallerThan("sm")]:{width:(0,z.h)(38),minWidth:"auto",padding:0}}})}),!g&&o("pnBanner.submit")))),[b,E]);return f.createElement(BannerLayout,Object.assign({},e),t===v.Button?x():t===v.Checkbox?C():null)},ToolBanner=e=>{var t,a;let{t:n}=(0,es.u)(),{heading:l,description:r,thumbnail:i,btnLabel:o,value:s,isRiskScreener:c,hideDescOnMobile:d,dataEventAction:m}=e,{locale:u}=(0,es.u)(),{isMobile:p}=(0,f.useContext)(nc),{getHealthToolLink:g,allTools:h}=(0,eI.u)(u),v=(0,f.useMemo)(()=>{let e=c?`https://${eo.i?"":"discover."}${Q.d[u]}/bot/${Q.a[u][s]}`:g(s);return f.createElement("a",{href:e},f.createElement(w.B,{size:"sm","data-event-category":"Focused Audience","data-event-action":m,"data-event-label":e},o||n("pnBanner.caclNow")))},[h]);return"mainBanner"==(c?"mainBanner":"toolBanner")?f.createElement(BannerLayout,Object.assign({},Object.assign(Object.assign({},e),{thumbnail:e.thumbnail})),v):f.createElement($.k,{gap:(0,z.h)(7),align:"center",justify:"space-between",sx:e=>({borderRadius:(0,z.h)(8),background:e.colors.blue[0],minHeight:(0,z.h)(180),padding:`${(0,z.h)(24)} ${(0,z.h)(16)}`,[e.fn.largerThan("sm")]:{padding:`${(0,z.h)(34)} ${(0,z.h)(32)}`}})},f.createElement(O.K,{spacing:(0,z.h)(12)},f.createElement(O.K,{spacing:(0,z.h)(4)},l&&f.createElement(T.H,{tag:"h4"},l),!(p&&d)&&r&&f.createElement(y.T,{size:"p4"},r)),f.createElement($.k,{gap:(0,z.h)(8),sx:{button:{minWidth:(0,z.h)(120)}}},v)),f.createElement($.k,{align:"center",justify:"center",sx:e=>({width:(0,z.h)(96),height:(0,z.h)(96),borderRadius:"50%",background:"white",flexShrink:0,[e.fn.largerThan("sm")]:{width:(0,z.h)(112),height:(0,z.h)(112)},img:{maxWidth:(0,z.h)(64),[e.fn.largerThan("sm")]:{maxWidth:(0,z.h)(73)}}})},f.createElement("img",{alt:"health-tool-icon",src:i||(null===(a=null===(t=h.filter(e=>e.template===s))||void 0===t?void 0:t[0])||void 0===a?void 0:a.icon)||ni[s]||"",loading:"lazy"})))},HandlerBanner=()=>{var e,t,a;let{t:n}=(0,es.u)(),{state:l,Outside:r}=(0,f.useContext)(nc);return(null==l?void 0:l.action)===b.ShowTool?f.createElement(r,null,TOOL_BANNERS_PROPS(n)[null===(e=null==l?void 0:l.props)||void 0===e?void 0:e.value]?f.createElement(ToolBanner,Object.assign({},TOOL_BANNERS_PROPS(n)[null===(t=null==l?void 0:l.props)||void 0===t?void 0:t.value],{value:null===(a=null==l?void 0:l.props)||void 0===a?void 0:a.value})):null):(null==l?void 0:l.action)===b.ShowOptionBanner?f.createElement(r,null,f.createElement(BannerWithOptions,Object.assign({},null==l?void 0:l.props))):null},SideBannerModal=e=>{var{isMobile:t,children:a,desktopBanner:n=S.C.getAssetPath("friso/onboarding-banner.jpg"),mobileBanner:l=S.C.getAssetPath("friso/onboarding-banner-mobile.jpg"),modalRatio:r={width:937,height:536},mobileBannerRatio:i={width:750,height:480},desktopBannerRatio:o={width:420,height:536},closeProps:s}=e,c=(0,k._)(e,["isMobile","children","desktopBanner","mobileBanner","modalRatio","mobileBannerRatio","desktopBannerRatio","closeProps"]);let{width:d,height:m}=(0,K.n)(),u=d*i.height/i.width,[p,g]=(0,f.useState)(!1);return f.createElement(eq.M,Object.assign({styles:e=>({content:{flex:"auto",background:"transparent",[e.fn.smallerThan("sm")]:{maxHeight:"100%",height:"100%",position:"relative",borderRadius:0},[e.fn.largerThan("sm")]:{maxWidth:(0,z.h)(r.width),width:"100%",height:"100%",maxHeight:(0,z.h)(r.height),boxShadow:"none"}},body:{padding:0,width:"100%",height:"100%",[e.fn.largerThan("sm")]:{display:"flex",alignItems:"center"}},inner:{padding:0,[e.fn.smallerThan("sm")]:{display:"flex",alignItems:"flex-end"}}})},c),t?f.createElement(M.x,{sx:{position:"relative",width:"100%",height:"100%"},onTouchStart:()=>g(!0)},f.createElement(M.x,{className:"mobile-template",sx:{position:"absolute",height:`${(p?1:((m<=667?190:265)+u+74)/m)*100}%`,left:0,bottom:0,right:0,transition:"height 0.4s ease"}},f.createElement(M.x,{className:"mobile-template-wrapper",sx:{height:"100%",backgroundColor:"white",borderTopLeftRadius:p?0:(0,z.h)(12),borderTopRightRadius:p?0:(0,z.h)(12)}},f.createElement(M.x,{sx:{height:"100%",background:`url(${l})`,backgroundSize:"contain",backgroundRepeat:"no-repeat",backgroundPosition:"top center",overflowY:"auto",borderRadius:"inherit"}},f.createElement(w.B,Object.assign({variant:"white",leftIcon:f.createElement(eY.Z,null),sx:{position:"absolute",right:0,top:0,zIndex:1,padding:(0,z.h)(10)}},s,{onClick:()=>null==c?void 0:c.onClose()})),f.createElement(F.o,{ratio:(null==i?void 0:i.width)/(null==i?void 0:i.height),w:"100%"}),f.createElement(M.x,{className:"inner",sx:{padding:`${(0,z.h)(28)} ${(0,z.h)(16)} ${(0,z.h)(16)}`,background:"white"}},a))))):f.createElement(F.o,{className:"desktop-template",ratio:r.width/r.height,w:"100%",sx:{position:"relative","& > div":{justifyContent:"flex-end"}}},f.createElement(M.x,{sx:{width:"100%",height:"100%",justifyContent:"flex-end",alignItems:"stretch",borderRadius:(0,z.h)(8),background:"white",boxShadow:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"}},f.createElement("img",{alt:"",src:n,loading:"lazy",style:{borderTopLeftRadius:(0,z.h)(8),borderBottomLeftRadius:(0,z.h)(8),height:"100%",display:"block"}}),f.createElement(M.x,{sx:{position:"relative",height:"100%",width:`${(r.width-o.width)/r.width*100}%`}},f.createElement(w.B,Object.assign({variant:"white",leftIcon:f.createElement(eY.Z,null)},s,{onClick:()=>null==c?void 0:c.onClose(),sx:{position:"absolute",right:0,top:0,backgroundColor:"transparent"}})),f.createElement(M.x,{className:"side-banner-modal-container",sx:{height:"100%",padding:`${(0,z.h)(40)} ${(0,z.h)(24)} 0`}},a)))))},nu={UPDATE_SUBSCRIPTION:"user/subscription"},np=(0,f.createContext)({}),_NormalTopic=e=>{var{value:t,name:a}=e,n=(0,k._)(e,["value","name"]);return f.createElement(w.e,Object.assign({value:t,withIcon:!0},n,{buttonProps:{styles:()=>({leftIcon:{marginRight:(0,z.h)(6)},root:{paddingLeft:(0,z.h)(10),paddingRight:(0,z.h)(10)}})}}),a)},TopicSection=({topicsGroup:e,onTopicChange:t,isBlock:a=!1,selectedTopics:n=[],inputProps:l,labelProps:r,maxSelect:i=5,hasScroll:o,readonly:s})=>{let{action:{pushNotifications:c}}=(0,f.useContext)(ek.T),d=eJ()(e.map(e=>e.topics||[])),{t:m}=(0,es.u)(),[u,p]=(0,f.useState)([]);(0,f.useEffect)(()=>{p(n)},[n.length]),(0,f.useEffect)(()=>{null==t||t(u)},[u]);let onValueChange=e=>{if(e.length>5){c({type:"danger",title:m("pnTopicSection.maxSelectError.title",{maxSelect:i}),message:m("pnTopicSection.maxSelectError.desc")});return}s||p(()=>d.filter(t=>e.some(e=>t.catId===e)))};return f.createElement(O.K,{spacing:12},e.map((e,t)=>f.createElement(O.K,{key:String(t),spacing:12},e.label&&f.createElement(y.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold"},r),e.label),o?f.createElement(R.x,{w:"100%",offsetScrollbars:!0,scrollbarSize:4,p:16,m:-16,styles:{viewport:{margin:-16,padding:16}}},f.createElement(M.x,{w:800},f.createElement(H.A.Group,Object.assign({value:u.map(e=>e.catId),multiple:!0},l,{onChange:onValueChange}),f.createElement($.k,{gap:8,wrap:"wrap"},e.topics.map(t=>f.createElement(_NormalTopic,Object.assign({key:t.catId,value:t.catId,name:t.localName,isBlock:a},e.tracking))))))):f.createElement(H.A.Group,Object.assign({value:u.map(e=>e.catId),multiple:!0},l,{onChange:onValueChange}),f.createElement($.k,{gap:8,wrap:"wrap"},e.topics.map(t=>t.catId?f.createElement(_NormalTopic,Object.assign({key:t.catId,value:t.catId,name:t.localName,isBlock:a},e.tracking)):f.isValidElement(t.component)?t.component:null))))))},Layout=e=>{var{heading:t,children:a,stickyActions:n}=e,l=(0,k._)(e,["heading","children","stickyActions"]);let{isMobile:r}=(0,f.useContext)(np),i=f.createElement(O.K,{spacing:(0,z.h)(24),sx:{height:"100%"}},f.createElement(T.H,{tag:"h4",style:{textAlign:"center"}},t),f.createElement(M.x,null,a));return f.createElement(M.x,{sx:e=>({[e.fn.largerThan("sm")]:{position:"relative",height:"100%"}})},r?i:f.createElement(R.x,Object.assign({className:"layout-body",h:n?"calc(100% - 90px)":"100%"},l),i),n&&f.createElement($.k,{gap:(0,z.h)(8),sx:e=>({position:"absolute",left:0,right:0,bottom:0,padding:(0,z.h)(16),button:{flexGrow:1},justifyContent:"center",[e.fn.largerThan("sm")]:{padding:`${(0,z.h)(24)} 0`}})},n))},MainForm=()=>{let{t:e,locale:t}=(0,es.u)(),{data:{userInfo:a},action:{pushNotifications:n}}=(0,f.useContext)(ek.T),l=null==a?void 0:a.id,{currentUrl:r,isMobile:i,pnSuggestCategory:o=[],nextStep:s,formValues:c,setFormValues:d,onSubmit:m,submitLoading:u,selectCategory:p,setCategoryLibs:g,setSelectCategory:h,maxSelectCategory:v}=(0,f.useContext)(np),b=o.map(e=>e.catId),E=(0,eG.c)({validate:{name:(0,eV.U)(e("healthToolPNModal.mainForm.requireName"))},initialValues:Object.assign(Object.assign({},c),{fitnessTopics:b})}),[x,C]=(0,f.useState)([]),[B,N]=(0,f.useState)([]);(0,f.useEffect)(()=>{(0,k.a)(void 0,void 0,void 0,function*(){var e;try{let a=yield(0,ek.d)((0,ek.e)(nd.GET_SUBSCRIPTION_CATEGORIES,{_locale:t}),"get"),n=((null===(e=null==a?void 0:a.data)||void 0===e?void 0:e.subscription)||[]).filter(e=>!b.includes(e.catId));C(o),N(n),g([...o,...n])}catch(e){console.log(e)}})},[]),(0,f.useEffect)(()=>{l&&E.setFieldValue("name",(null==a?void 0:a.name)||"")},[l]);let onMore=()=>{""!==E.getInputProps("name").value?(d(E.getTransformedValues()),s()):E.validateField("name")},S=(0,f.useMemo)(()=>f.createElement(w.B,{variant:"tertiary",dataEventCategory:"Newsletter",dataEventAction:"More Category Click",dataEventLabel:r,leftIcon:f.createElement(eQ.Z,{size:16,color:"currentColor"}),onClick:onMore,styles:e=>({root:{borderRadius:(0,z.h)(6),padding:"2px 15px",height:(0,z.h)(40)},label:{fontSize:(0,z.h)(14),fontWeight:400,[e.fn.smallerThan("sm")]:{fontSize:(0,z.h)(12),lineHeight:(0,z.h)(16),height:(0,z.h)(40)}},leftIcon:{marginRight:"5px"}})},f.createElement(y.T,{size:i?"p3":"p4"},e("home.seeMore"))),[E]);return(0,f.useEffect)(()=>{E.setFieldValue("fitnessTopics",p.map(e=>e.catId))},[p]),f.createElement("form",{style:{height:"100%"},onSubmit:E.onSubmit(t=>{if(0===p.length)return n({type:"danger",title:e("newsletter.error.minTitle"),message:e("newsletter.error.minCotennt")}),!1;d(t),null==m||m(t.name)})},f.createElement(Layout,{heading:e("healthToolPNModal.heading"),stickyActions:f.createElement(f.Fragment,null,f.createElement(w.B,{fullWidth:!0,type:"submit",dataEventCategory:"Newsletter",dataEventAction:"Register Click",dataEventLabel:r,loading:u,sx:{maxWidth:(0,z.h)(240)}},e("healthToolPNModal.register")))},f.createElement(O.K,{spacing:(0,z.h)(16)},f.createElement(w.c,Object.assign({label:e("newsletter.welcome.description")},E.getInputProps("name"))),f.createElement(TopicSection,{topicsGroup:[...0===o.length&&0===B.length?[{topics:[{component:S}]}]:[],...o.length>0?[{label:e("healthToolPNModal.mainForm.tailorTopicsHeading"),topics:[...o,...0===B.length?[{component:S}]:[]]}]:[],...B.length>0?[{label:e("healthToolPNModal.findMore.chooseFav"),topics:[...B,...B.length>0?[{component:S}]:[]]}]:[]],selectedTopics:[...x],labelProps:{size:i?"p3":"p4",color:"gray.6"},onTopicChange:h,maxSelect:v}))))},ng=(0,f.forwardRef)(function(e,t){var{label:a}=e,n=(0,k._)(e,["label"]);return f.createElement("div",Object.assign({ref:t},n),f.createElement(A.Z,{noWrap:!0},f.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.97887 8.15493C2.97887 5.29627 5.29627 2.97887 8.15493 2.97887C11.0136 2.97887 13.331 5.29627 13.331 8.15493C13.331 11.0136 11.0136 13.331 8.15493 13.331C5.29627 13.331 2.97887 11.0136 2.97887 8.15493ZM8.15493 1.5C4.47951 1.5 1.5 4.47951 1.5 8.15493C1.5 11.8303 4.47951 14.8099 8.15493 14.8099C9.72615 14.8099 11.1702 14.2653 12.3086 13.3547L15.2376 16.2837C15.5264 16.5725 15.9946 16.5725 16.2833 16.2837C16.5721 15.9949 16.5721 15.5267 16.2833 15.238L13.3544 12.3091C14.2652 11.1705 14.8099 9.72634 14.8099 8.15493C14.8099 4.47951 11.8303 1.5 8.15493 1.5Z",fill:"#8C8C8C"})),f.createElement(y.T,{size:"p3"},a)))}),nh=(0,f.forwardRef)(function(e,t){var{label:a}=e,n=(0,k._)(e,["label"]);return f.createElement("div",Object.assign({ref:t},n),f.createElement(y.T,{size:"p3"},a))}),HistorySection=({history:e,onDelete:t})=>f.createElement($.k,{wrap:"wrap",gap:8},e1()(e,"catId").map(e=>f.createElement(W.C,{key:e.catId,rightSection:f.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",onClick:()=>null==t?void 0:t(e)},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 9C1.5 4.8525 4.8525 1.5 9 1.5C13.1475 1.5 16.5 4.8525 16.5 9C16.5 13.1475 13.1475 16.5 9 16.5C4.8525 16.5 1.5 13.1475 1.5 9ZM11.1677 12.2248C11.4602 12.5173 11.9327 12.5173 12.2252 12.2248C12.5101 11.9323 12.5101 11.4523 12.2252 11.1673L10.0577 8.99979L12.2252 6.83229C12.5177 6.53979 12.5177 6.0673 12.2252 5.7748C11.9327 5.4823 11.4602 5.4823 11.1677 5.7748L9.00015 7.9423L6.83265 5.7748C6.54015 5.4823 6.06765 5.4823 5.77515 5.7748C5.63471 5.91492 5.55579 6.10516 5.55579 6.30354C5.55579 6.50193 5.63471 6.69217 5.77515 6.83229L7.94265 8.99979L5.77515 11.1673C5.63471 11.3074 5.55579 11.4977 5.55579 11.696C5.55579 11.8944 5.63471 12.0847 5.77515 12.2248C6.06765 12.5173 6.54015 12.5173 6.83265 12.2248L9.00015 10.0573L11.1677 12.2248Z",fill:"#8C8C8C"})),styles:{root:{height:32,background:"#ffffff",padding:"5px 12px",border:`1px solid ${w.t.neutral[4]}`,borderRadius:32,textTransform:"unset"},rightSection:{height:18,cursor:"pointer"}}},f.createElement(y.T,{size:"p4"},e.localName)))),RecentlyViewedSection=({topics:e,onTopicChange:t,isBlock:a=!1,selectedTopics:n,labelProps:l,maxSelect:r=5})=>{let{action:{pushNotifications:i}}=(0,f.useContext)(ek.T),[o,s]=(0,f.useState)([]),{t:c}=(0,es.u)();return((0,f.useEffect)(()=>{s(n)},[n.length]),(0,f.useEffect)(()=>{t(o)},[o]),e&&0!==e.length)?f.createElement(O.K,{spacing:12,px:16,mx:-16},f.createElement(y.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold"},l),c("pnTopicSection.recentView")),f.createElement(H.A.Group,{value:o.map(e=>e.catId),onChange:t=>{if(a&&o.lengthe.filter(e=>t.some(t=>e.catId===t)))},multiple:!0},f.createElement($.k,{gap:8,wrap:"wrap"},e.map((e,t)=>f.createElement(_NormalTopic,{key:t,value:e.catId,name:e.localName,isBlock:a}))))):null},_TopicSlide=e=>{var{topic:t,active:a,onClick:n}=e,l=(0,k._)(e,["topic","active","onClick"]);return f.createElement(M.x,Object.assign({sx:e=>({position:"relative",cursor:"pointer",padding:2,borderRadius:8,boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 0px 1px rgba(0, 0, 0, 0.04)",minHeight:(0,z.h)(130),[e.fn.largerThan("sm")]:{minHeight:(0,z.h)(138)}}),onClick:()=>n(t,a)},l),a&&f.createElement(M.x,{id:"test",sx:{position:"absolute",top:2,right:2,width:20,height:20,zIndex:1}},f.createElement("svg",{id:"test",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.66699 9.99984C1.66699 5.39984 5.40033 1.6665 10.0003 1.6665C14.6003 1.6665 18.3337 5.39984 18.3337 9.99984C18.3337 14.5998 14.6003 18.3332 10.0003 18.3332C5.40033 18.3332 1.66699 14.5998 1.66699 9.99984ZM4.75066 10.5827L7.74232 13.5744C8.06732 13.8994 8.60066 13.8994 8.91732 13.5744L15.2423 7.2494C15.5673 6.9244 15.5673 6.3994 15.2423 6.0744C14.9173 5.7494 14.3923 5.7494 14.0673 6.0744L8.33399 11.8077L5.92566 9.40773C5.60066 9.08273 5.07566 9.08273 4.75066 9.40773C4.59461 9.56342 4.50692 9.7748 4.50692 9.99523C4.50692 10.2157 4.59461 10.427 4.75066 10.5827Z",fill:"#2D87F3"}),f.createElement("path",{d:"M7.74224 13.5772L4.75057 10.5856C4.59453 10.4299 4.50684 10.2185 4.50684 9.99808C4.50684 9.77765 4.59453 9.56627 4.75057 9.41058C5.07557 9.08558 5.60057 9.08558 5.92557 9.41058L8.33391 11.8106L14.0672 6.07725C14.3922 5.75225 14.9172 5.75225 15.2422 6.07725C15.5672 6.40225 15.5672 6.92725 15.2422 7.25225L8.91724 13.5772C8.60057 13.9022 8.06724 13.9022 7.74224 13.5772Z",fill:"white"}))),f.createElement(M.x,{sx:{borderRadius:"8px"}},f.createElement(w.b,{ratio:1.5,mb:10,sx:e=>({background:e.colors.neutral[0]})},f.createElement(M.x,null,f.createElement("img",{src:t.guid||"",alt:"cat",loading:"lazy",style:{maxHeight:"63px"}})))),f.createElement(y.T,{size:"p4",ta:"center",px:6,sx:{display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical",overflow:"hidden"}},t.localName||""))},TrendingCarousel=({topics:e,selectedTopics:t=[],onTopicChange:a,isBlock:n=!1,labelProps:l,pushNotifications:r,maxSelect:i=5})=>{let{t:o}=(0,es.u)(),[s,c]=(0,f.useState)([]),onSelect=(e,t)=>{if(t)c(t=>t.filter(t=>t.catId!==e.catId));else{if(n){r({type:"danger",title:o("pnTopicSection.maxSelectError.title",{maxSelect:i}),message:o("pnTopicSection.maxSelectError.desc")});return}c(t=>[...t,e])}};(0,f.useEffect)(()=>{c(t)},[t.length]),(0,f.useEffect)(()=>{a(s)},[s]);let[d,m]=(0,f.useState)(!1),[u,p]=(0,f.useState)(0),[g,h]=(0,f.useState)(0),v=(0,f.useRef)(null),handleMouseUp=()=>{m(!1)};return f.createElement(O.K,{spacing:10},f.createElement($.k,{justify:"space-between",align:"center",w:"100%"},f.createElement(y.T,Object.assign({size:"s5",color:"gray.4",weight:"semiBold",span:!0},l),o("pnTopicSection.trending"))),f.createElement(M.x,null,f.createElement(R.x,{type:"always",w:"100%",offsetScrollbars:!0,scrollbarSize:4,px:4,viewportRef:v,viewportProps:{onMouseDown:e=>{e.preventDefault(),v.current&&(m(!0),p(e.pageX-v.current.offsetLeft),h(v.current.scrollLeft))},onMouseUp:handleMouseUp,onMouseLeave:handleMouseUp,onMouseMove:e=>{if(e.preventDefault(),!d||!v.current)return;let t=e.pageX-v.current.offsetLeft;v.current.scrollLeft=g-(t-u)*2}},styles:{viewport:{paddingBottom:16}}},f.createElement(M.x,{w:{base:112*e.length+8*(e.length-1)+10}},f.createElement($.k,{gap:8},e.map((e,t)=>f.createElement(_TopicSlide,{key:t,topic:e,onClick:onSelect,active:s.some(t=>t.catId===e.catId),w:{base:112}})))))))},PremiumTopicSelect=e=>{var{isLoggedIn:t,maxSelect:a=5,values:n=[],labelProps:l,onChange:r}=e,i=(0,k._)(e,["isLoggedIn","maxSelect","values","labelProps","onChange"]);let{action:{pushNotifications:o}}=(0,f.useContext)(ek.T),[s,c]=(0,f.useState)(""),{t:d,locale:m}=(0,es.u)(),u=(0,f.useRef)(null),[p,g]=(0,f.useState)([]),[h,v]=(0,f.useState)([]),[b,E]=(0,f.useState)([]),[x,C]=(0,f.useState)([]),[B,N]=(0,f.useState)(null),[S,T]=(0,f.useState)([]);(0,f.useEffect)(()=>{(0,k.a)(void 0,void 0,void 0,function*(){var e,t;let a=yield(0,ek.d)((0,ek.e)(nd.GET_NEWSLETTER_CATEGORIES,{_locale:m}),"get"),l=(null===(e=null==a?void 0:a.data)||void 0===e?void 0:e.interested)||[],r=(null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.trending)||[],i=e1()([...l,...r],"catId"),o=i.map(e=>Object.assign(Object.assign({},e),{value:e.catId||"",label:e.localName||""}));if(T(o||[]),N((null==a?void 0:a.data)||null),n.length>0){let e=l.filter(e=>n.includes(e.catId)).map(e=>Object.assign(Object.assign({},e),{template:"interested"})),t=r.filter(e=>n.includes(e.catId)).map(e=>Object.assign(Object.assign({},e),{template:"trending"}));C(e),v(t)}})},[t]);let D=(0,f.useMemo)(()=>e1()([...p,...h,...x,...b],"catId"),[p,h,x,b]),[I,$]=(0,f.useState)(!1);(0,f.useEffect)(()=>{D.length>=a?$(!0):$(!1),null==r||r(D)},[D]);let onValueChange=e=>(0,k.a)(void 0,void 0,void 0,function*(){var t;let n="default";if(I)o({type:"danger",title:d("pnTopicSection.maxSelectError.title",{maxSelect:a}),message:d("pnTopicSection.maxSelectError.desc")});else{let a=[{key:"trending",array:null==B?void 0:B.trending},{key:"recently",array:null==B?void 0:B.recently},{key:"interested",array:null==B?void 0:B.interested}],l=a.find(t=>{var a;return null===(a=t.array)||void 0===a?void 0:a.some(t=>t.catId===e[0])});({trending:v,recently:E,interested:C,default:g})[n=(null==l?void 0:l.key)||"default"](t=>[...t,...S.filter(t=>e.some(e=>t.catId===e))].map(e=>Object.assign(Object.assign({},e),{template:n}))),null===(t=u.current)||void 0===t||t.blur()}return null});return f.createElement(O.K,Object.assign({spacing:(0,z.h)(16)},i),f.createElement(O.K,{spacing:(0,z.h)(8)},f.createElement(y.T,{size:"p3"},d("pnTopicSection.maxSelectError.detail",{max:a,maxTopic:D.length})),f.createElement(G.NU,{ref:u,maxSelectedValues:3,styles:{wrapper:{overflow:"initial !important"},separator:{padding:16},separatorLabel:{fontWeight:600,fontSize:12,lineHeight:"18px",textTransform:"uppercase",color:w.t.gray[4],"&::after":{display:"none"}},searchInput:{fontSize:"inherit"},input:{paddingRight:16}},nothingFound:f.createElement(y.T,{size:"s4",color:"gray.6"},d("pnTopicSection.notFound")),itemComponent:""===s?ng:nh,size:"lg",placeholder:d("pnTopicSection.plsEnterFavTopics"),data:S,onSearchChange:c,searchValue:s,icon:f.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.97183 10.8732C3.97183 7.0617 7.0617 3.97183 10.8732 3.97183C14.6848 3.97183 17.7746 7.0617 17.7746 10.8732C17.7746 14.6848 14.6848 17.7746 10.8732 17.7746C7.0617 17.7746 3.97183 14.6848 3.97183 10.8732ZM10.8732 2C5.97268 2 2 5.97268 2 10.8732C2 15.7738 5.97268 19.7465 10.8732 19.7465C12.9682 19.7465 14.8936 19.0205 16.4115 17.8063L20.3168 21.7116C20.7018 22.0966 21.3261 22.0966 21.7111 21.7116C22.0961 21.3266 22.0961 20.7023 21.7111 20.3173L17.8059 16.4121C19.0203 14.894 19.7465 12.9684 19.7465 10.8732C19.7465 5.97268 15.7738 2 10.8732 2Z",fill:"#595959"})),rightSection:f.createElement(f.Fragment,null),zIndex:500,searchable:!0,withinPortal:!0,onChange:e=>onValueChange(e),value:[]}),D&&D.length>0&&f.createElement(HistorySection,{history:D,onDelete:e=>{let t={trending:v,recently:E,interested:C,default:g},a=t[e.template]||t.default;a(t=>{let a=[...t],n=a.findIndex(t=>t.catId===e.catId);return a.splice(n,1),a})}})),f.createElement(M.x,{sx:e=>({position:"relative",height:(0,z.h)(175),[e.fn.largerThan("sm")]:{height:(0,z.h)(190)}})},f.createElement(M.x,{sx:{position:"absolute",top:0,right:0,left:0}},f.createElement(TrendingCarousel,{topics:((null==B?void 0:B.trending)||[]).map(e=>Object.assign(Object.assign({},e),{template:"trending"})),selectedTopics:h,onTopicChange:v,isBlock:I,labelProps:l}))),f.createElement(RecentlyViewedSection,{topics:((null==B?void 0:B.recently)||[]).map(e=>Object.assign(Object.assign({},e),{template:"recently"})),selectedTopics:b,onTopicChange:E,isBlock:I,labelProps:l}),f.createElement(TopicSection,{labelProps:l,topicsGroup:[{label:d("pnTopicSection.ppAlsoInterested"),topics:((null==B?void 0:B.interested)||[]).map(e=>Object.assign(Object.assign({},e),{template:"interested"}))}],selectedTopics:x,onTopicChange:C,isBlock:I}))},MoreTopics=()=>{let{t:e}=(0,es.u)(),{action:{pushNotifications:t}}=(0,f.useContext)(ek.T),{prevStep:a,formValues:n,submitLoading:l,onSubmit:r,selectCategory:i,maxSelectCategory:o,setSelectCategory:s,currentUrl:c,isLoggedIn:d}=(0,f.useContext)(np);return f.createElement(Layout,{heading:e("newsletter.topic.title"),type:"always",styles:{root:{paddingRight:(0,z.h)(25)}},stickyActions:f.createElement(f.Fragment,null,f.createElement(w.B,{fullWidth:!0,variant:"secondary",dataEventCategory:"Newsletter",dataEventAction:"Back Click",dataEventLabel:c,onClick:a},e("healthToolPNModal.back")),f.createElement(w.B,{fullWidth:!0,type:"submit",dataEventCategory:"Newsletter",dataEventAction:"Next Click",dataEventLabel:c,onClick:()=>{if(0===i.length)return t({type:"danger",title:e("newsletter.error.minTitle"),message:e("newsletter.error.minCotennt")}),!1;null==r||r(n.name)},loading:l},e("healthToolPNModal.next")))},f.createElement(PremiumTopicSelect,{isLoggedIn:d,maxSelect:o,values:n.fitnessTopics,onChange:s,labelProps:{size:"s5",sx:{textTransform:"uppercase"}}}))},Result=()=>{let{t:e}=(0,es.u)(),{close:t,selectCategory:a,onRegisterSuccess:n,currentUrl:l,finishLabelOnResult:r,disclaimerText:i}=(0,f.useContext)(np);return(0,f.useEffect)(()=>()=>{setTimeout(()=>{null==n||n()},400)},[]),f.createElement(Layout,{heading:e("healthToolPNModal.heading"),stickyActions:f.createElement(w.B,{fullWidth:!0,sx:{maxWidth:(0,z.h)(300)},dataEventCategory:"Newsletter",dataEventAction:"Continue Reading Click",dataEventLabel:l,onClick:()=>{t()}},r||e("healthToolPNModal.finish"))},f.createElement(O.K,null,f.createElement($.k,{gap:(0,z.h)(8),sx:e=>({background:e.colors.green[0],border:`1px solid ${e.colors.green[1]}`,borderRadius:(0,z.h)(8),padding:(0,z.h)(8)})},f.createElement(M.x,null,f.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},f.createElement("path",{d:"M9.99984 18.3334C14.6022 18.3334 18.3332 14.6025 18.3332 10.0001C18.3332 5.39771 14.6022 1.66675 9.99984 1.66675C5.39746 1.66675 1.6665 5.39771 1.6665 10.0001C1.6665 14.6025 5.39746 18.3334 9.99984 18.3334Z",fill:"#00B16A"}),f.createElement("path",{d:"M9.58558 12.6674C9.22944 12.668 8.87668 12.5983 8.54752 12.4623C8.21835 12.3264 7.91925 12.1268 7.66732 11.8751L6.68587 10.8931C6.55607 10.7587 6.48424 10.5787 6.48587 10.3919C6.48749 10.2051 6.56243 10.0263 6.69455 9.89422C6.82667 9.7621 7.00539 9.68716 7.19222 9.68554C7.37906 9.68391 7.55906 9.75574 7.69345 9.88554L8.67491 10.8675C8.79344 10.986 8.93415 11.08 9.08902 11.1442C9.24389 11.2083 9.40987 11.2413 9.5775 11.2413C9.74513 11.2413 9.91111 11.2083 10.066 11.1442C10.2208 11.08 10.3616 10.986 10.4801 10.8675L16.7033 5.24335C16.8443 5.12184 17.0272 5.06032 17.213 5.07195C17.3987 5.08358 17.5726 5.16744 17.6973 5.30558C17.8221 5.44373 17.8878 5.6252 17.8805 5.81118C17.8731 5.99717 17.7933 6.17291 17.6581 6.30081L11.4592 11.8998C11.2128 12.1448 10.9205 12.3387 10.5989 12.4705C10.2774 12.6022 9.93304 12.6692 9.58558 12.6674Z",fill:"white"}))),f.createElement(y.T,{size:"p3"},i||e("pnModal.disclaimer"))),f.createElement(T.H,{tag:"h5"},e("healthToolPNModal.yourPre")),a.length>0&&f.createElement(TopicSection,{topicsGroup:[{label:"",topics:a}],selectedTopics:a,readonly:!0})))},PremiumNewsletterModal=({isMobile:e,isLoggedIn:t,pnSuggestCategory:a=[],acquisitionInfo:n,currentUrl:l,opened:r,close:i,finishLabelOnResult:o,onRegisterSuccess:s,disclaimerText:c})=>{let{t:d,locale:m}=(0,es.u)(),{action:{pushNotifications:u}}=(0,f.useContext)(ek.T),p=S.C.getAssetPath("premiumNewsletter/side-banner-desktop.jpg"),g=S.C.getAssetPath("premiumNewsletter/side-banner-mobile.jpg"),[h,v]=(0,f.useState)([]),[b,y]=(0,f.useState)([]),[E,x]=(0,f.useState)(0),[w,C]=(0,f.useState)({name:"",fitnessTopics:[]}),[B,N]=(0,f.useState)(!1),lastStep=()=>x(2),T=(0,f.useCallback)(e=>(0,k.a)(void 0,void 0,void 0,function*(){try{N(!0),yield(0,ek.d)((0,ek.e)(nd.POST_SUBSCRIPTION,{website_url:(0,ek.f)(m)}),"post",{headers:{"Content-Type":"application/json"},method:"POST",data:{ga_client_id:eK.Z.get(Q.G),client_ip:window.clientIP||"",user_info:Object.assign(Object.assign({},n.userInfo),{name:e||w.name,type_subscription:1}),domain:Q.d[m||q.L.Vietnam],category:b,perferred:n.preferredTopics.map(({id:e})=>({id:e}))}}),N(!1),yield(0,ek.d)((0,ek.h)(nu.UPDATE_SUBSCRIPTION),"post",{headers:{"Content-Type":"application/json"},method:"PUT",data:{subscription:1}}),lastStep()}catch(e){console.log({err:e}),N(!1),u({title:d("notification.comment.somethingWrong"),message:"",type:"danger"})}}),[w,b]);return(0,f.useEffect)(()=>{[p,g].forEach(e=>{let t=new Image;t.src=e})},[]),f.createElement(np.Provider,{value:{currentUrl:l,isMobile:e,isLoggedIn:t,opened:r,close:i,pnSuggestCategory:a,nextStep:()=>x(e=>e<3?e+1:e),prevStep:()=>x(e=>e>0?e-1:e),lastStep,categoryLibs:h,setCategoryLibs:v,selectCategory:b,setSelectCategory:y,formValues:w,setFormValues:C,maxSelectCategory:5,submitLoading:B,onSubmit:T,onRegisterSuccess:s,finishLabelOnResult:o,disclaimerText:c}},f.createElement(SideBannerModal,{isMobile:e,desktopBanner:S.C.getAssetPath("premiumNewsletter/side-banner-desktop.jpg"),mobileBanner:S.C.getAssetPath("premiumNewsletter/side-banner-mobile.jpg"),modalRatio:{width:960,height:588},desktopBannerRatio:{width:384,height:588},opened:r,onClose:i,zIndex:305,closeProps:{dataEventCategory:"Newsletter",dataEventAction:"Close Click",dataEventLabel:l}},f.createElement(V.v,{active:E,onStepClick:x,styles:{root:{height:"100%"},content:{padding:0,height:"100%",width:"100%"},steps:{display:"none"}}},f.createElement(V.v.Step,null,f.createElement(MainForm,null)),f.createElement(V.v.Step,null,f.createElement(MoreTopics,null)),f.createElement(V.v.Step,null,f.createElement(Result,null)))))},SurveyBanner=()=>{let{locale:e}=(0,es.u)(),{isMobile:t,isLoggedIn:a,currentUrl:n,acquisitionInfo:l,categoryIds:r,state:i,setState:o,settings:s,submitHandler:c,subcribeHealthStatus:d,showPNModal:m,setShowPNModal:u,setIsBack:p}=(0,f.useContext)(nc),[g,h]=(0,f.useState)([]),[v,y]=(0,f.useState)(m);(0,f.useEffect)(()=>{(0,k.a)(void 0,void 0,void 0,function*(){var t,a;let n=yield(0,ek.d)((0,ek.e)(nd.GET_NEWSLETTER_CATEGORIES,{_locale:e}),"get"),l=(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.interested)||[],i=(null===(a=null==n?void 0:n.data)||void 0===a?void 0:a.trending)||[],o=[...l,...i];h(o.filter(e=>r.includes(Number(e.catId))))})},[]);let E=(0,f.useRef)([]);return(0,f.useEffect)(()=>{let e=(null==d?void 0:d.value)||"",t=e.split("|").filter(Boolean),a=e;E.current.push(d),t.length>1&&(null!==E.current[0]&&p(!0),Object.keys(c).map(e=>{let n=e.split("|");if(t.length===n.length){let l=0;t.map(e=>{n.includes(String(e))&&(l+=1)}),l===t.length&&(a=e)}}));let n=t.length>0?c[a]:s;o(n)},[d]),(0,f.useEffect)(()=>{y(m)},[m]),(null==i?void 0:i.action)!==b.Hide?f.createElement(f.Fragment,null,f.createElement(HandlerBanner,Object.assign({},s.props)),f.createElement(PremiumNewsletterModal,{acquisitionInfo:l,isMobile:t,isLoggedIn:a,currentUrl:n,pnSuggestCategory:g,opened:v,close:()=>{var e;y(!1),u(!1),setTimeout(()=>{var e;(null===(e=i.actionParams)||void 0===e?void 0:e.hideBannerWhenClose)&&o({action:b.Hide})},400),(null===(e=i.actionParams)||void 0===e?void 0:e.hideBannerWhenClose)&&o({action:b.Hide})},onRegisterSuccess:()=>y(!1)})):null},SurveyOrPremiumBanner=({type:e,articleId:t=0,categoryIds:a=[],isMarketing:n,isSurveyType:l,hasPremiumBanner:r,currentUrl:i,isMobile:o,subcribeHealthStatus:s,setShouldAcquisitionModalOpen:c,onValueChange:d,source:m="discover",Wrapper:u})=>{let{t:p}=(0,es.u)(),{data:{userInfo:g}}=(0,f.useContext)(ek.T),h=!!(null==g?void 0:g.id),[v,y]=(0,f.useState)(null),[E,x]=(0,f.useState)(),[w,C]=(0,f.useState)(""),[k,B]=(0,f.useState)(!1),[N,S]=(0,f.useState)(!1),T=(0,f.useMemo)(()=>no[e],[]),D=FLOW(p,i)[T],I=null==D?void 0:D.submitHandler,getMappingMultiValue=e=>{let t="",a=e.split("|");return 1===a.length?e:(Object.keys(I).map(e=>{let n=e.split("|");if(a.length===n.length){let l=0;a.map(e=>{n.includes(String(e))&&(l+=1)}),l===a.length&&(t=e)}}),t)},$=u||M.x,handleShowPNBannerFlowWhenLogin=()=>r&&(null==g?void 0:g.subscription)!==1?f.createElement(PnBannerEle,null):null;return(0,f.useEffect)(()=>{h&&y({userInfo:g,preferredTopics:nl,healthTopics:[]})},[h]),f.createElement(nc.Provider,{value:{settings:D,submitHandler:I,type:e,surveyType:T,value:w,setValue:C,isMobile:o,isLoggedIn:h,isMarketing:n,hasPremiumBanner:r,currentUrl:i,acquisitionInfo:v,categoryIds:a,subcribeHealthStatus:s,articleId:t,onValueChange:d,state:E,setState:x,handleClickOption:e=>{let t=getMappingMultiValue(e);if(t){let a=I[t];a.action===b.ShowPremiumModal?r?(B(!0),x(Object.assign(Object.assign({},E),{actionParams:{hideBannerWhenClose:a.action===b.ShowPremiumModal}}))):(x({action:b.Hide}),null==d||d(e)):(x(a),null==d||d(e))}},showPNModal:k,setShowPNModal:B,source:m,Outside:$,isBack:N,setIsBack:S,minHeight:180,setShouldAcquisitionModalOpen:c}},void 0!==s?h?l&&D?(()=>{let e=I[(null==s?void 0:s.value)||""];return(null==e?void 0:e.action)===b.ShowPremiumModal?handleShowPNBannerFlowWhenLogin():f.createElement(SurveyBanner,null)})():handleShowPNBannerFlowWhenLogin():r?f.createElement(PnBannerEle,null):null:null)},nv={myBooking:"booking",mySaved:"saved",myHealth:"health",myFamily:"family",myCommunity:"my-communities",eCom:"/shop/ho-so/quan-li-don-hang/"};function NavHeader({userInfo:e,onClickMyProfileButton:t,themeName:a="helloSites"}){let{t:n}=(0,es.u)(),l=(0,f.useMemo)(()=>{let t=(null==e?void 0:e.name)||(null==e?void 0:e.username);return t&&t.length?t[0].toUpperCase():"A"},[null==e?void 0:e.username,null==e?void 0:e.name]);return f.createElement("div",{className:"uJQBNNg",onClick:()=>{t&&t()}},f.createElement(Avatar,{className:"TfG3dM5",type:"rounded",size:"xl",avatarUrl:null==e?void 0:e.avatar,firstLetter:l,backgroundColor:"marryBaby"===a?D.t.mbColors.pink:D.t.colors.secondaryBase}),f.createElement("div",{className:"aMtjFNf"},f.createElement("div",{className:"cSz2RR-"},(null==e?void 0:e.name)||(null==e?void 0:e.username)),f.createElement("div",{className:"GyFm00F",style:{"--bg-hellosites":`url(${S.C.getAssetPath("userProfileNav/helloSites/icon-chevronRight.svg")})`,"--bg-marrybaby":`url(${S.C.getAssetPath("userProfileNav/marryBaby/icon-arrowRight.svg")})`}},n("userProfile.nav.header.viewProfile"))))}let nb={myHealth:D.t.mbColors.toneYellow,myCommunity:D.t.mbColors.toneBlue,mySaved:D.t.mbColors.toneGreen},nf={helloSites:{myBooking:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-myBooking.svg"),myCommunity:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-myCommunity.svg"),myFamily:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-myFamily.svg"),myHealth:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-myHealth.svg"),mySaved:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-mySaved.svg"),eCom:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-eCom.svg")},marryBaby:{mySaved:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-mySaved.svg"),myCommunity:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-myCommunity.svg"),myHealth:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-myHealth.svg")}},NavigationCard=({type:e,themeName:t,className:a,onClick:n=()=>void 0})=>{let{t:l}=(0,es.u)(),r=(0,f.useMemo)(()=>{var a,n;return(null===(n=null===(a=nf[t])||void 0===a?void 0:a[e])||void 0===n?void 0:n.call(a))||""},[e,t]),i=(0,f.useMemo)(()=>"marryBaby"!==t?"transparent":nb[e],[e,t]);return f.createElement("div",{onClick:function(){n(e)},className:`fVk18fq ${a}`},f.createElement("div",{className:"mx7T4V3",style:{backgroundColor:i,backgroundImage:`url("${r}")`}}),f.createElement("h3",{className:"v8TCvUb"},l(`userProfile.nav.card.${e}`)))},navMenuItemsHelloSites=()=>[{key:"userProfile.nav.menu.accountSettings",icon:S.C.getAssetPath("userProfileNav/helloSites/icon-settingsWheel.svg"),subMenu:[{key:"common.profileNavigator.newsletterSubscription",link:"subscriptions",disableLocale:["id-ID","ms-MY","km-KH","en-PH","tl-PH","th-TH","my-MM","zh-TW","hi-IN"]},{key:"userProfile.nav.menu.password",link:"password"},{key:"userProfile.nav.menu.disableAccount",link:"disable-account",disableLocale:["hi-IN"]}]},{key:"userProfile.nav.menu.help",icon:S.C.getAssetPath("userProfileNav/helloSites/icon-helpCircle.svg"),link:"help"}],navMenuItemsMarryBaby=()=>[{key:"userProfile.nav.menu.password",icon:S.C.getAssetPath("userProfileNav/marryBaby/icon-lock.svg"),link:"password"},{key:"userProfile.nav.menu.logout",icon:S.C.getAssetPath("userProfileNav/marryBaby/icon-logOut.svg"),link:"logout"}];var ny={navMenu:"gn6HmGG",navMenuItem:"FCx8FEM",navMenuItemContent:"zMiRxaE",navMenuItemIcon:"lZ2Z9MQ",navMenuItemDropdown:"rwm-agG",navFooterSubMenu:"qMOscoq"};let NavMenu=({themeName:e,locale:t,onClickItem:a})=>{let[n,l]=(0,f.useState)(""),r=(0,f.useMemo)(()=>"marryBaby"===e?navMenuItemsMarryBaby():navMenuItemsHelloSites(),[e]);function handleParentItemClick(e){e.subMenu?l(t=>t?"":e.key):a&&a(e)}return f.createElement("div",{className:ny.navMenu},r.map(e=>f.createElement(NavMenuItem,{key:e.key,item:e,openKey:n,onClickItem:handleParentItemClick,locale:t})))},NavMenuItem=({item:e,openKey:t,onClickItem:a,locale:n})=>{var l;let{t:r}=(0,es.u)();return(null===(l=e.disableLocale)||void 0===l?void 0:l.includes(n))?null:f.createElement("div",{className:`${ny.navMenuItem} nav-menu-item`,"data-is-open":t===e.key,key:e.key,"data-has-submenu":!!e.subMenu},f.createElement("div",{className:ny.navMenuItemContent,onClick:()=>a(e)},e.icon&&f.createElement("div",{className:ny.navMenuItemIcon,style:{backgroundImage:`url("${e.icon}")`}}),r(e.key),e.subMenu&&f.createElement("div",{className:ny.navMenuItemDropdown,style:{"--after-bg":`url(${S.C.getAssetPath("userProfileNav/helloSites/icon-chevronDown.svg")})`}})),e.subMenu&&f.createElement("div",{className:ny.navFooterSubMenu},e.subMenu.map(e=>f.createElement(NavMenuItem,{key:e.key,item:e,openKey:t,onClickItem:a,locale:n}))))};var nE={userStats:"_4y-O0w3",wrapper:"kO8iNgD",header:"a1d4E10",headerIcon:"Tdguxxf",headerTitle:"-mOxsaU",headerPoints:"yPeDBNZ"};let nx={helloSites:{member:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-rank-member.svg"),ambassador:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-rank-ambassador.svg"),doctor:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-rank-doctor.svg"),expert:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-rank-expert.svg"),influencer:()=>S.C.getAssetPath("userProfileNav/helloSites/icon-rank-influencer.svg")},marryBaby:{member:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-rank-member.svg"),ambassador:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-rank-ambassador.svg"),doctor:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-rank-doctor.svg"),expert:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-rank-expert.svg"),influencer:()=>S.C.getAssetPath("userProfileNav/marryBaby/icon-rank-influencer.svg")}},UserStats=({themeName:e,rank:t="member",numberOfPosts:a=0})=>{let{t:n}=(0,es.u)(),l=(0,f.useMemo)(()=>{var a,n;return(null===(n=null===(a=nx[e])||void 0===a?void 0:a[t])||void 0===n?void 0:n.call(a))||""},[t,e]);return f.createElement("div",{className:nE.userStats,"data-user-rank":t},f.createElement("div",{className:nE.wrapper},f.createElement("div",{className:nE.header},f.createElement("div",{className:nE.headerIcon,style:{backgroundImage:`url("${l}")`}}),f.createElement("h3",{className:nE.headerTitle},n(`userProfile.userRank.${t}`)),a>0&&f.createElement("p",{className:nE.headerPoints},a," ",n("userProfile.nav.header.count.posts")))))},UserProfileNavigation=({SSO_URL:e,UP_BASEPATH:t="user",themeName:a="helloSites",cardUrls:n=nv,enableCare:l,enableTogether:r,enableEcom:i,enableMySaved:o,userInfo:s,togetherApiDomain:c,userPostsNumber:d,onClickNavigationCard:m,onClickMyProfileButton:u,onClickMenuItem:p,onClickLogout:g,isUserProfileNavigatorMenuHidden:h=!1,isMyHealthEnabled:v=!1,locale:b})=>{let{t:y}=(0,es.u)(),[E,x]=(0,f.useState)(d||0),w="marryBaby"===a;(0,f.useEffect)(()=>{if(s&&void 0===d){let e=(0,e2.g)("hhg_user_token");e&&fetch((0,e3.n)((0,X.d)(b,w,c)),{headers:{Authorization:`Bearer ${e}`}}).then(e=>e.json()).then(e=>{var t,a,n;(null==e?void 0:e.status)===1&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pagination)&&x((null===(n=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.pagination)||void 0===n?void 0:n.total_items)||0)}).catch(e=>console.error("Error fetching post number",e))}},[b,null!==s,d,c,w]);let C=(0,f.useMemo)(()=>(w?["myHealth","myCommunity","mySaved"]:["myHealth","mySaved","myBooking","myCommunity","eCom"]).filter(e=>"myBooking"===e?l:"myCommunity"===e?r:"myHealth"===e?v:"eCom"===e?i:"mySaved"!==e||o),[w,v]),k=(0,f.useMemo)(()=>"marryBaby"===a?null:f.createElement(en.B,{color:"tertiary",icon:f.createElement("img",{src:S.C.getAssetPath("userProfileNav/helloSites/icon-logOut.svg"),width:15,height:15,loading:"lazy"}),size:"md",onClick:g,className:"XIyViFs"},y("userProfile.nav.menu.logout")),[a]),push=a=>{a.startsWith("http")||a.startsWith("/")?window.location.href=(0,e3.a)(a):e&&(window.location.href=(0,e3.a)(`${e}${t}/${a}`))},handleClickCardItem=e=>{let t=n[e];m?m(t):push(t)};return s?f.createElement("div",{className:"-AZt1au","data-theme":a},f.createElement(NavHeader,{userInfo:s,themeName:a,onClickMyProfileButton:()=>{u?u():push("profile")}}),f.createElement(UserStats,{themeName:a,rank:"member",numberOfPosts:E}),f.createElement("div",{className:"IvSIfCI"},C.map(e=>f.createElement(NavigationCard,{className:"eahCJov",key:e,themeName:a,type:e,onClick:handleClickCardItem}))),!h&&f.createElement(f.Fragment,null,f.createElement(NavMenu,{themeName:a,locale:b,onClickItem:e=>{"logout"===e.link&&g?g():e.link&&!e.subMenu&&(p?p(e.link):push(e.link))}}),k)):null}}}]);