"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8224,8370],{37043:function(e,t,i){i.d(t,{G:function(){return PremiumContentBanner}});var n=i(35944),l=i(92935),o=i(13023),a=i(50722),r=i(40254),d=i(86896),c=i(50667),s=i(20868),u=i(10166),p=i(15184),h=i(74376),m=i(7259);let v=(0,u.Z)("div",{target:"evyl24r0"})("&[data-portal='false']{/* position:absolute;*/\n width:100%;padding:32px 24px;position:relative;}&[data-portal='true']{position:fixed;bottom:0;left:0;right:0;z-index:",Number(p.t.zIndexes.zIndex100)-1,";transform:translate3d(0,100%,0);animation:",h.s," 500ms linear 2s forwards;padding-bottom:32px;}background:",null===p.t||void 0===p.t?void 0:p.t.colors.white,";display:flex;flex-direction:column;justify-content:center;align-items:center;gap:24px;min-height:150px;text-align:center;&::before{content:'';position:absolute;bottom:100%;height:100px;left:0;background-image:linear-gradient(180deg,#fff0,#fff);width:100%;opacity:0;animation:",h.h," 500ms ease-in-out 2s forwards;}.btn{span{width:max-content;}}.close-btn{cursor:pointer;position:absolute;top:8px;right:8px;background:#ffffff;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;}",m.M.mbDown,"{/* bottom:44px;*/\n &[data-portal='false']{width:auto;}&[data-portal='true']{bottom:56px;border-bottom:2px solid ",null===p.t||void 0===p.t?void 0:p.t.colors.primaryBase,";}&::before{height:60px;}align-items:center;flex-direction:column;text-align:center;padding:16px;gap:12px;.btn{align-self:center;}}"),_PremiumContentBanner=e=>{let{haveClose:t=!1,onClose:i,...r}=e,{formatMessage:u}=(0,d.Z)(),toSSO=async()=>{(0,c.p0)(window.location.href)},p=(0,s.U)();return(0,n.BX)(v,{...r,children:[t&&(0,n.tZ)("div",{className:"close-btn",role:"button",onClick:i,tabIndex:0,children:(0,n.tZ)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,n.tZ)("path",{d:"M3.99403 3.32719C3.86141 3.32723 3.73181 3.36681 3.62181 3.44089C3.5118 3.51497 3.42638 3.62017 3.37648 3.74304C3.32658 3.86592 3.31445 4.00088 3.34165 4.13068C3.36885 4.26049 3.43415 4.37923 3.52919 4.47173L7.05784 8.00037L3.52919 11.529C3.46521 11.5904 3.41413 11.664 3.37894 11.7454C3.34375 11.8269 3.32516 11.9145 3.32425 12.0032C3.32335 12.0919 3.34015 12.1799 3.37368 12.262C3.40721 12.3441 3.45678 12.4187 3.5195 12.4814C3.58222 12.5441 3.65682 12.5937 3.73894 12.6272C3.82106 12.6608 3.90904 12.6776 3.99774 12.6767C4.08643 12.6758 4.17405 12.6572 4.25547 12.622C4.33689 12.5868 4.41047 12.5357 4.4719 12.4717L8.00054 8.94308L11.5292 12.4717C11.5906 12.5357 11.6642 12.5868 11.7456 12.622C11.827 12.6572 11.9147 12.6758 12.0034 12.6767C12.092 12.6776 12.18 12.6608 12.2622 12.6272C12.3443 12.5937 12.4189 12.5441 12.4816 12.4814C12.5443 12.4187 12.5939 12.3441 12.6274 12.262C12.6609 12.1799 12.6777 12.0919 12.6768 12.0032C12.6759 11.9145 12.6573 11.8269 12.6222 11.7454C12.587 11.664 12.5359 11.5904 12.4719 11.529L8.94325 8.00037L12.4719 4.47173C12.5682 4.37808 12.634 4.25752 12.6607 4.12584C12.6873 3.99416 12.6735 3.85751 12.6212 3.73378C12.5688 3.61006 12.4803 3.50504 12.3672 3.43249C12.2542 3.35993 12.1218 3.32323 11.9875 3.32719C11.8143 3.33235 11.6499 3.40474 11.5292 3.52902L8.00054 7.05766L4.4719 3.52902C4.40977 3.46515 4.33548 3.41439 4.2534 3.37973C4.17132 3.34506 4.08313 3.3272 3.99403 3.32719V3.32719Z",fill:"#595959"})})}),(0,n.BX)("svg",{width:"60",height:"60",viewBox:"0 0 60 60",fill:"none",children:[(0,n.tZ)("circle",{cx:"30",cy:"30",r:"30",fill:"white"}),(0,n.tZ)("circle",{cx:"30",cy:"30",r:"24",fill:"#FFF8E2"}),(0,n.tZ)("circle",{cx:"30",cy:"30",r:"16",fill:"#FE921D"}),(0,n.tZ)("path",{d:"M30 21C29.7348 21 29.4804 21.1054 29.2929 21.2929C29.1054 21.4804 29 21.7348 29 22C28.9998 22.1592 29.0376 22.3162 29.1103 22.4579C29.183 22.5995 29.2885 22.7218 29.418 22.8145L26.3457 27.1152L20.9473 25.3164C20.9818 25.2145 20.9996 25.1076 21 25C21 24.7348 20.8946 24.4804 20.7071 24.2929C20.5196 24.1054 20.2652 24 20 24C19.7348 24 19.4804 24.1054 19.2929 24.2929C19.1054 24.4804 19 24.7348 19 25C19 25.2652 19.1054 25.5196 19.2929 25.7071C19.4804 25.8946 19.7348 26 20 26C20.073 25.9995 20.1457 25.991 20.2168 25.9746L21.6523 32.4336C21.8553 33.3486 22.6665 34 23.6035 34H36.3945C37.3315 34 38.1447 33.3486 38.3477 32.4336L39.7832 25.9766C39.8544 25.9923 39.9271 26.0001 40 26C40.2652 26 40.5196 25.8946 40.7071 25.7071C40.8946 25.5196 41 25.2652 41 25C41 24.7348 40.8946 24.4804 40.7071 24.2929C40.5196 24.1054 40.2652 24 40 24C39.7348 24 39.4804 24.1054 39.2929 24.2929C39.1054 24.4804 39 24.7348 39 25C39.0004 25.1076 39.0182 25.2145 39.0527 25.3164L33.6543 27.1152L30.5801 22.8125C30.7096 22.7202 30.8153 22.5984 30.8884 22.4571C30.9614 22.3158 30.9997 22.1591 31 22C31 21.7348 30.8946 21.4804 30.7071 21.2929C30.5196 21.1054 30.2652 21 30 21ZM23 36C22.448 36 22 36.448 22 37C22 37.552 22.448 38 23 38H37C37.552 38 38 37.552 38 37C38 36.448 37.552 36 37 36H23Z",fill:"white"})]}),(0,n.BX)("div",{children:[(0,n.tZ)(l.H,{tag:"h4",children:u({id:"premiumBanner.title",defaultMessage:"Get to the end of the story"})}),(0,n.tZ)(o.T,{size:"p4",children:u({id:"premiumBanner.content",defaultMessage:"This article is available for the HelloBacsi member only. Please login or join now for getting the end of the story."})})]}),(0,n.tZ)(a.B,{color:"primary",size:"md",className:"btn pointer-event-child-none",onClick:()=>toSSO(),"data-event-category":"Reading Full Text","data-event-action":"Click","data-event-label":p,children:u({id:"premiumBanner.button",defaultMessage:"Log in / Join Now"})})]})},PremiumContentBanner=e=>{let{isPortal:t=!0,...i}=e;return t?(0,n.tZ)(r.h,{children:(0,n.tZ)(_PremiumContentBanner,{"data-portal":t,...i})}):(0,n.tZ)(_PremiumContentBanner,{"data-portal":t,...i})}},18370:function(e,t,i){i.r(t),i.d(t,{EmbeddedSpotlight:function(){return EmbeddedSpotlight},EmbeddedSpotlightSection:function(){return EmbeddedSpotlightSection}});var n=i(35944),l=i(67294),o=i(92935),a=i(90786),r=i(54576),d=i(74706),c=i(86896),s=i(97627),u=i(94189),p=i(45683),h=i(2251),m=i(83015),v=i(95386),g=i(24612),f=i(82729),b=i(15184),Z=i(72660);function _templateObject(){let e=(0,f._)(["\n display: flex;\n align-items: center;\n justify-content: center;\n img {\n width: 100%;\n border-radius: ",";\n }\n"]);return _templateObject=function(){return e},e}let y=Z.ZP.a.withConfig({componentId:"sc-71046403-0"})(_templateObject(),b.t.borderRadius),EmbeddedSpotlight=e=>{let{id:t}=e,[i,o]=(0,l.useState)(null);return((0,l.useEffect)(()=>{if(t){let fetchSpotlight=async()=>{let e=await(0,s.d)(p.y.SPOTLIGHT.GET_SPOTLIGHT_LANDING,{params:{slug:t}});if(null==e?void 0:e.data){let t=(0,u.CC)(null==e?void 0:e.data),i=new Date,n=(null==t?void 0:t.startDate)?new Date(null==t?void 0:t.startDate):new Date,l=(null==t?void 0:t.endDate)?new Date(t.endDate):new Date;i.getTime()>=n.getTime()&&i.getTime()<=l.getTime()&&o(t)}};fetchSpotlight()}},[t]),null==i?void 0:i.id)?(0,n.tZ)(EmbeddedSpotlightSection,{spotlights:[{permalink:i.permalink||"",bannerDesktop:i.image||"",bannerMobile:i.image||""}]}):null},C={root:{marginBottom:24},indicators:{bottom:"auto",top:"calc(100% + 16px)"},indicator:{width:"8px",height:"8px",borderWidth:0,opacity:1,backgroundColor:"#d2d6dc","&[data-active]":{backgroundColor:"#2d87f3"}},controls:{padding:0,left:-16,right:-16},control:{width:32,height:32,borderColor:"#DBDFE5","&[data-inactive]":{opacity:0,cursor:"default"}}},EmbeddedSpotlightSection=e=>{let{spotlights:t=[]}=e,i=(0,m.d)(),{formatMessage:l}=(0,c.Z)();return(null==t?void 0:t.length)?(0,n.BX)("div",{style:{contentVisibility:"auto",containIntrinsicSize:"500px"},children:[(0,n.BX)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[(0,n.tZ)(o.H,{tag:"h3",children:l({id:"home.recommendSpotlight",defaultMessage:"Spotlight"})}),(0,n.tZ)("a",{href:"/spotlight/",children:(0,n.BX)(r.T,{size:"s3",weight:"semiBold",color:"#2D87F3",style:{display:"flex",alignItems:"center"},children:[l({id:"home.seeAll"})," ",(0,n.tZ)(a._Qn,{width:"18px",height:"18px"})]})})]}),1===t.length?(0,n.tZ)(SpotlightCard,{permalink:t[0].permalink,bannerDesktop:t[0].bannerDesktop,bannerMobile:t[0].bannerMobile}):i||2!==t.length?(0,n.tZ)(n.HY,{children:(0,n.tZ)(d.n,{withControls:!i,withIndicators:!0,styles:i?{root:{marginBottom:20},indicators:{borderRadius:4,bottom:"auto",top:"calc(100% + 16px)",width:"100%",backgroundColor:"#F1F2F4"},indicator:{width:"".concat(Math.round(100/(t.length+2)),"%"),height:4,backgroundColor:"unset","&[data-active]":{width:"".concat(Math.round(100/(t.length+2)*3),"%"),backgroundColor:"#C3CBD4"}}}:C,children:t.map((e,t)=>(0,n.tZ)(d.n.Slide,{children:(0,n.tZ)(SpotlightCard,{permalink:e.permalink,bannerDesktop:e.bannerDesktop,bannerMobile:e.bannerMobile})},String(t)))})}):(0,n.BX)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gridGap:8},children:[(0,n.tZ)(SpotlightCard,{permalink:t[0].permalink,bannerDesktop:t[0].bannerDesktop,bannerMobile:t[0].bannerMobile}),(0,n.tZ)(SpotlightCard,{permalink:t[1].permalink,bannerDesktop:t[1].bannerDesktop,bannerMobile:t[1].bannerMobile})]})]}):null},SpotlightCard=e=>{let{permalink:t,bannerDesktop:i,bannerMobile:l}=e,{locale:o}=(0,v.h)(),a=(0,m.d)();return(0,n.tZ)(y,{href:t||"#",children:(0,n.tZ)("img",{loading:"lazy",src:(a?l:i)||i||l||g.YS,alt:"","data-event-category":"Spotlight","data-event-action":"Click 1","data-event-label":"https://".concat(h.domainLocales[o]).concat(t)})})}},51284:function(e,t,i){i.d(t,{J:function(){return checkAvaiableSpotlight}});let checkAvaiableSpotlight=e=>{let t=new Date;if(null==e?void 0:e.startDate){let i=new Date(e.startDate);if(t.getTime()i.getTime())return!1}return!0}},78224:function(e,t,i){i.r(t),i.d(t,{ArticleContents:function(){return eS}});var n=i(35944),l=i(67294),o=i(36965),a=i(36380),r=i.n(a),d=i(76248),c=i(74363),s=i(13810),u=i(51284),p=i(95386),h=i(30326),m=i(98926),v=i(79364);let g=(0,l.createContext)({articleCategories:[],articleLink:"",articleId:"",adUnitPath:"",adUnitPathMobile:"",articleContentId:"",unifiedProfileSubot:{id:"",class:""}}),ArticleContentProvider=e=>{let{children:t,...i}=e;return(0,n.tZ)(g.Provider,{value:i,children:t})};var f=i(50722),b=i(64523),Z=i(86896),y=i(12237),C=i(37043),x=i(39139),w=i(69597),k=i(97627),I=i(94189),M=i(45683),B=i(83015),A=i(13023),T=i(74706),S=i(2251),_=i(24612),L=i(82729),P=i(15184),D=i(7259),N=i(72660),j=i(20877);function _templateObject(){let e=(0,L._)(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 24px;\n isolation: isolate;\n margin-block: 16px;\n\n max-width: 700px;\n /* max-height: 414px; */\n\n /* White */\n\n background: #ffffff;\n /* Neutral/Neutral-100 */\n\n border: 1px solid ",";\n border-radius: 8px;\n "," {\n padding: 16px;\n margin-inline: -16px;\n border-radius: 0;\n }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,L._)(["\n max-height: 326px;\n &[data-size='sm'][data-direction='horizontal'] {\n padding: 16px 0 0;\n }\n .banner {\n height: auto;\n max-height: unset;\n }\n"]);return _templateObject1=function(){return e},e}let z=N.ZP.div.withConfig({componentId:"sc-924f950c-0"})(_templateObject(),null===P.t||void 0===P.t?void 0:P.t.colors.neutral100,D.M.mbDown),E=(0,N.ZP)(j.ArticleCardWrapper).withConfig({componentId:"sc-924f950c-1"})(_templateObject1()),_Desktop=e=>{let{title:t,articles:i,...l}=e,{locale:o}=(0,p.h)(),{formatMessage:a}=(0,Z.Z)();return i.length<=2?(0,n.BX)(z,{...l,children:[(0,n.tZ)(A.T,{size:"s2",type:"semiBold",children:t||a({id:"articlePage.relatedPostsSectionTitle",defaultMessage:"Related Articles"})}),i.map(e=>{var t;return(0,n.tZ)(E,{article:e,disabledBadge:!0,type:"author",size:"sm",banner:(0,n.tZ)("img",{src:e.featureImageMobile||e.featureImage||e.featureImageMobileXs||_.YS,alt:e.postTitle,style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}),categoryLink:e.category.permalink,articleLink:e.permalink,categoryName:null===(t=e.category)||void 0===t?void 0:t.displayName,title:e.postTitle,text:e.excerpt,styleLabel:{color:e.category.textColor},uploadTime:e.modifiedTime,hasAffiliate:e.hasAffiliate,dataEventCategoryForTitle:"Further Article",dataEventActionForTitle:"Article Title Click",dataEventLabelForTitle:"https://".concat(S.domainLocales[o]).concat(e.permalink),dataEventCategoryForBanner:"Further Article",dataEventActionForBanner:"Article Image Click",dataEventLabelForBanner:"https://".concat(S.domainLocales[o]).concat(e.permalink)},e.id)})]}):(0,n.BX)(z,{style:{gap:"14px"},...l,children:[(0,n.tZ)(A.T,{size:"s2",type:"semiBold",children:t||a({id:"articlePage.relatedPostsSectionTitle",defaultMessage:"Related Articles"})}),i.length>0&&(0,n.tZ)(T.n,{slidesToShow:2.2,slideGap:16,controlSize:40,controlsOffset:10,slidesToScroll:1,styles:{root:{width:"100%"}},children:i.map((e,t)=>{var i;return(0,n.tZ)(T.n.Slide,{children:(0,n.tZ)(E,{article:e,disabledBadge:!0,type:"author",size:"sm",banner:(0,n.tZ)("img",{src:e.featureImageMobile||e.featureImage||e.featureImageMobileXs||_.YS,alt:e.postTitle,style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}),categoryLink:e.category.permalink,articleLink:e.permalink,direction:"vertical",categoryName:null===(i=e.category)||void 0===i?void 0:i.displayName,title:e.postTitle,text:e.excerpt,styleLabel:{color:e.category.textColor},uploadTime:e.modifiedTime,hasAffiliate:e.hasAffiliate,dataEventCategoryForTitle:"Further Article",dataEventActionForTitle:"Article Title Click",dataEventLabelForTitle:"https://".concat(S.domainLocales[o]).concat(e.permalink),dataEventCategoryForBanner:"Further Article",dataEventActionForBanner:"Article Image Click",dataEventLabelForBanner:"https://".concat(S.domainLocales[o]).concat(e.permalink)})},t)})})]})},_Mobile=e=>{let{title:t,articles:i,...l}=e,{locale:o}=(0,p.h)(),{formatMessage:a}=(0,Z.Z)();return 1>=((null==i?void 0:i.length)||0)?(0,n.BX)(z,{...l,children:[(0,n.tZ)(A.T,{size:"s2",type:"semiBold",children:t||a({id:"articlePage.relatedPostsSectionTitle",defaultMessage:"Related Articles"})}),i.map(e=>{var t;return(0,n.tZ)(E,{article:e,disabledBadge:!0,type:"author",size:"sm",banner:(0,n.tZ)("img",{src:e.featureImageMobile||e.featureImage||e.featureImageMobileXs||_.YS,alt:e.postTitle,style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}),categoryLink:e.category.permalink,articleLink:e.permalink,categoryName:null===(t=e.category)||void 0===t?void 0:t.displayName,title:e.postTitle,text:e.excerpt,styleLabel:{color:e.category.textColor},uploadTime:e.modifiedTime,hasAffiliate:e.hasAffiliate,dataEventCategoryForTitle:"Further Article",dataEventActionForTitle:"Article Title Click",dataEventLabelForTitle:"https://".concat(S.domainLocales[o]).concat(e.permalink),dataEventCategoryForBanner:"Further Article",dataEventActionForBanner:"Article Image Click",dataEventLabelForBanner:"https://".concat(S.domainLocales[o]).concat(e.permalink)},e.id)})]}):(0,n.BX)(z,{style:{gap:"12px"},...l,children:[(0,n.tZ)(A.T,{size:"s2",type:"semiBold",children:t||a({id:"articlePage.relatedPostsSectionTitle",defaultMessage:"Related Articles"})}),i.length>0&&(0,n.tZ)(T.n,{slidesToShow:1.2,slideGap:18,controlSize:40,controlsOffset:10,slidesToScroll:1,styles:{root:{width:"100%"}},children:i.map((e,t)=>{var i;return(0,n.tZ)(T.n.Slide,{children:(0,n.tZ)(E,{article:e,disabledBadge:!0,type:"author",size:"sm",banner:(0,n.tZ)("img",{src:e.featureImageMobile||e.featureImage||e.featureImageMobileXs||_.YS,alt:e.postTitle,style:{width:"100%",height:"100%",objectFit:"cover"},loading:"lazy"}),categoryLink:e.category.permalink,articleLink:e.permalink,direction:"vertical",categoryName:null===(i=e.category)||void 0===i?void 0:i.displayName,title:e.postTitle,text:e.excerpt,styleLabel:{color:e.category.textColor},uploadTime:e.modifiedTime,hasAffiliate:e.hasAffiliate,dataEventCategoryForTitle:"Further Article",dataEventActionForTitle:"Article Title Click",dataEventLabelForTitle:"https://".concat(S.domainLocales[o]).concat(e.permalink),dataEventCategoryForBanner:"Further Article",dataEventActionForBanner:"Article Image Click",dataEventLabelForBanner:"https://".concat(S.domainLocales[o]).concat(e.permalink)})},t)})})]})},RelatedArticleCarousel=e=>{let{ids:t,...i}=e,o=(0,B.d)(),[a,r]=(0,l.useState)([]);return((0,l.useEffect)(()=>{(async()=>{let e=await(0,k.d)(M.y.ARTICLE.GET_ARTICLES,{params:{ids:t||""}}).then(e=>{var t,i;return null==e?void 0:null===(i=e.data)||void 0===i?void 0:null===(t=i.posts)||void 0===t?void 0:t.map(I.qP)});r(e||[])})()},[t]),o)?(0,n.tZ)(_Mobile,{articles:a,...i}):(0,n.tZ)(_Desktop,{articles:a,...i})};var F=i(92935),X=i(69469),O=i(97564),R=i(82623),H=i(8949),U=i(20868),V=i(67841),G=i(69876),W=i(41715),Y=i(54777),q=i(54576);let K=l.memo(e=>{let{hasPromotion:t,originalPrice:i,promotionPrice:l}=e;return(0,n.BX)(G.k,{gap:8,align:"center",children:[(0,n.tZ)(q.T,{...t?{size:"p4",color:P.t.colors.gray400,style:{textDecoration:"line-through"}}:{size:"s2",color:P.t.colors.red600,type:"semiBold"},weight:"semiBold",children:i}),t&&l&&(0,n.tZ)(q.T,{size:"s2",color:P.t.colors.red600,weight:"semiBold",children:l})]})}),_NormalButton=e=>{var t,i,l,o,a,r,d,c,s,u,p,h;let{product:m,position:v=0,...g}=e,{formatMessage:f}=(0,Z.Z)();return(0,n.tZ)(V.z,{fullWidth:!0,variant:"filled",size:"md",color:"#2D87F3",onClick:()=>{var e,t;return window.open(null==m?void 0:null===(t=m.channel)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.url,"_blank")},"data-event-category":"Affiliates","data-event-action":"Click Shop Now","data-product-position":"p".concat(v),"data-product-ui":"Slide","data-event-label":null==m?void 0:null===(i=m.channel)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.url,"data-product-channel":null==m?void 0:null===(o=m.channel)||void 0===o?void 0:null===(l=o[0])||void 0===l?void 0:l.name,"data-product-sku":null==m?void 0:m.sku,"data-product-brand":null==m?void 0:null===(r=m.brand)||void 0===r?void 0:null===(a=r[0])||void 0===a?void 0:a.name,"data-product-name":null==m?void 0:m.postName,"data-product-price":(null==m?void 0:m.priceRange)||(null==m?void 0:null===(c=m.channel)||void 0===c?void 0:null===(d=c[0])||void 0===d?void 0:d.price),"data-product-category":null==m?void 0:null===(u=m.productCat)||void 0===u?void 0:null===(s=u[0])||void 0===s?void 0:s.name,className:"pointer-event-child-none",styles:{root:{paddingBlock:"10px",minHeight:42,height:"unset"},label:{whiteSpace:"initial",textAlign:"center",overflow:"initial",lineHeight:1.2}},...g,children:f({id:"affiliate.collapseButton.shopAtVendor",defaultMessage:"{customText} at {vendor}"},{vendor:null==m?void 0:null===(h=m.channel)||void 0===h?void 0:null===(p=h[0])||void 0===p?void 0:p.name,customText:(null==m?void 0:m.ctaButton)||f({id:"affiliate.vendors.showNow",defaultMessage:"Shop Now"})})})},J=[o.L.Vietnam,o.L.Indonesia],_DropdownItem=e=>{var t,i,o;let{channel:a,product:r}=e,{locale:d}=(0,p.h)(),{formatMessage:c}=(0,Z.Z)(),s=(0,l.useMemo)(()=>!!(null==a?void 0:a.discount_price),[null==a?void 0:a.discount_price]),u=(0,l.useMemo)(()=>new Intl.NumberFormat(d,{style:"currency",currency:r.currencyUnit.code||"VND",...J.includes(d)?{minimumFractionDigits:0,maximumFractionDigits:0}:{}}),[d,null==r?void 0:null===(t=r.currencyUnit)||void 0===t?void 0:t.code]),h=(0,l.useMemo)(()=>{if(s){let e=parseInt(null==a?void 0:a.discount_price);return u.format(e)}return null},[s]);return(0,n.BX)(G.k,{gap:16,justify:"stretch",children:[(0,n.tZ)(b.x,{sx:{width:40,height:40,flexShrink:0},children:(0,n.tZ)("img",{loading:"lazy",src:null==a?void 0:a.icon,alt:""})}),(0,n.BX)(O.K,{spacing:4,w:"100%",children:[(0,n.BX)(G.k,{justify:"space-between",children:[(0,n.tZ)(F.H,{tag:"h6",fontWeight:"bold",color:P.t.colors.gray800,children:null==a?void 0:a.name}),(0,n.tZ)("a",{href:a.url,target:"_blank","data-event-category":"Affiliates","data-event-action":"Click Shop Now","data-product-ui":"Slide","data-event-label":null==a?void 0:a.url,"data-product-channel":null==a?void 0:a.name,"data-product-sku":null==r?void 0:r.sku,"data-product-brand":null==r?void 0:null===(o=r.brand)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.name,"data-product-name":null==r?void 0:r.postName,"data-product-price":null==a?void 0:a.price,className:"pointer-event-child-none",children:(0,n.tZ)(A.T,{size:"s4",color:P.t.colors.primaryBase,type:"semiBold",children:c({id:"affiliate.vendors.showNow",defaultMessage:"Shop Now"})})})]}),(0,n.tZ)(K,{hasPromotion:s,originalPrice:u.format(Number(null==a?void 0:a.price)),promotionPrice:h})]})]})},_DropdownButton=e=>{var t,i,o,a,r,d,c,s,u,p,h,m,v;let{product:g,position:f=0,...b}=e,{formatMessage:y}=(0,Z.Z)(),[C,x]=(0,l.useState)(!1);return(0,n.BX)(W.J,{opened:C,onChange:x,width:"target",position:"bottom",withArrow:!0,shadow:"md",radius:8,withinPortal:!0,styles:{dropdown:{border:"1px solid ".concat(P.t.colors.neutral100)}},children:[(0,n.tZ)(W.J.Target,{children:(0,n.tZ)(V.z,{variant:"filled",fullWidth:!0,size:"md",color:"#2D87F3",onClick:()=>{x(e=>!e)},rightIcon:(0,n.tZ)("svg",{width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",children:(0,n.tZ)("path",{d:"M9.49975 10.5532L6.634 7.68746C6.3235 7.37696 5.8195 7.37696 5.509 7.68746C5.1985 7.99796 5.1985 8.50196 5.509 8.81246L8.9695 12.273C9.26275 12.5662 9.7375 12.5662 10.03 12.273L13.4905 8.81246C13.801 8.50196 13.801 7.99796 13.4905 7.68746C13.18 7.37696 12.676 7.37696 12.3655 7.68746L9.49975 10.5532Z",fill:"white"})}),"data-event-category":"Affiliates","data-event-action":"Click To Expand","data-product-position":"p".concat(f),"data-product-ui":"Slide","data-event-label":null==g?void 0:null===(i=g.channel)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.url,"data-product-channel":null==g?void 0:null===(a=g.channel)||void 0===a?void 0:null===(o=a[0])||void 0===o?void 0:o.name,"data-product-sku":null==g?void 0:g.sku,"data-product-brand":null==g?void 0:null===(d=g.brand)||void 0===d?void 0:null===(r=d[0])||void 0===r?void 0:r.name,"data-product-name":null==g?void 0:g.postName,"data-product-price":(null==g?void 0:g.priceRange)||(null==g?void 0:null===(s=g.channel)||void 0===s?void 0:null===(c=s[0])||void 0===c?void 0:c.price),"data-product-category":null==g?void 0:null===(p=g.productCat)||void 0===p?void 0:null===(u=p[0])||void 0===u?void 0:u.name,className:"pointer-event-child-none",styles:{root:{paddingBlock:"10px",minHeight:42,height:"unset",pointerEvents:"initial"},label:{whiteSpace:"initial",textAlign:"center",overflow:"initial",lineHeight:1.2},rightIcon:{...C&&{transform:"rotate(180deg)"}}},...b,children:C?y({id:"affiliate.collapseButton.collapse",defaultMessage:"Collapse"}):y({id:"affiliate.collapseButton.showNow",defaultMessage:"{customText} ({number} vendors)"},{number:null===(h=g.channel)||void 0===h?void 0:h.filter(e=>!e["non-available"]).length,customText:(null==g?void 0:g.ctaButton)||y({id:"affiliate.vendors.showNow",defaultMessage:"Shop Now"})})})}),(0,n.tZ)(W.J.Dropdown,{children:(0,n.tZ)(O.K,{children:null===(v=g.channel)||void 0===v?void 0:null===(m=v.filter(e=>!e["non-available"]))||void 0===m?void 0:m.map((e,t)=>(0,n.BX)(l.Fragment,{children:[t>0&&(0,n.tZ)(Y.i,{variant:"dashed"}),(0,n.tZ)(_DropdownItem,{channel:e,product:g})]},e.name))})})]})},AffiliateButton=e=>{let{product:t,...i}=e,l=(null==t?void 0:t.channel)||[],o=l.filter(e=>e.name&&e.icon&&e.url),a=o.length>1,r={...t,chanel:o};return a?(0,n.tZ)(_DropdownButton,{product:r,...i}):(0,n.tZ)(_NormalButton,{product:r,...i})};function index_styled_templateObject(){let e=(0,L._)(["\n &.active {\n border: 2px solid #2685f1;\n }\n border-radius: 4px;\n height: 48px;\n overflow: hidden;\n background-color: #ffffff;\n"]);return index_styled_templateObject=function(){return e},e}function index_styled_templateObject1(){let e=(0,L._)(["\n display: flex;\n flex-direction: column;\n gap: 24px;\n\n img {\n width: 100%;\n object-fit: contain;\n }\n .carousel-main {\n img {\n min-height: 210px;\n\n display: flex;\n height: 210px;\n background-color: #ffffff;\n }\n }\n .carousel-thumb {\n height: 48px;\n }\n"]);return index_styled_templateObject1=function(){return e},e}function _templateObject2(){let e=(0,L._)(["\n padding: 5px 8px;\n\n /* Gray/Gray-200 */\n border: 1px solid ",";\n border-radius: ",";\n color: ",";\n"]);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,L._)(["\n width: 100%;\n .pros-cons {\n ul {\n list-style-type: disc;\n list-style-position: inside;\n padding-left: 8px;\n color: ",";\n }\n }\n"]);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,L._)(["\n padding: 4px 6px;\n position: absolute;\n right: 0px;\n top: 0px;\n background: ",";\n border-radius: ",";\n"]);return _templateObject4=function(){return e},e}let Q=N.ZP.div.withConfig({componentId:"sc-477004fd-0"})(index_styled_templateObject()),$=N.ZP.div.withConfig({componentId:"sc-477004fd-1"})(index_styled_templateObject1()),ee=N.ZP.div.withConfig({componentId:"sc-477004fd-2"})(_templateObject2(),null===P.t||void 0===P.t?void 0:P.t.colors.gray200,e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.borderRadius},null===P.t||void 0===P.t?void 0:P.t.colors.gray500),et=N.ZP.div.withConfig({componentId:"sc-477004fd-3"})(_templateObject3(),null===P.t||void 0===P.t?void 0:P.t.colors.gray700),ei=N.ZP.div.withConfig({componentId:"sc-477004fd-4"})(_templateObject4(),null===P.t||void 0===P.t?void 0:P.t.colors.red500,e=>{var t;return null===(t=e.theme)||void 0===t?void 0:t.borderRadius}),AffiliateDiscountBadge=e=>{let{discount:t,multiple:i}=e,{formatMessage:o}=(0,Z.Z)(),a=(0,l.useMemo)(()=>Number.isInteger(t)?t:null==t?void 0:t.toFixed(0),[t]);return t?(0,n.tZ)(ei,{children:(0,n.tZ)(A.T,{size:"label2",type:"bold",color:"#ffffff",children:i?o({id:"affiliate.promotion.bestDiscount",defaultMessage:"Up to {promotionDiscount}"},{promotionDiscount:"- ".concat(a," %")}):"- ".concat(a," %")})}):null},AffiliateThumbnail=e=>{let{index:t,image:i,selected:l,onClick:o}=e;return(0,n.tZ)(Q,{className:l?"active":"",onClick:()=>o(t),children:(0,n.tZ)("img",{loading:"lazy",src:i,alt:""})})},AffiliateCarousel=e=>{let{product:t,discount:i}=e,o=t.gallery||[],[a,r]=(0,l.useState)(0),[d,c]=(0,l.useState)(null),[s,u]=(0,l.useState)(null),p=(0,B.d)(),h=(0,l.useCallback)(e=>{d&&s&&s.clickAllowed()&&d.scrollTo(e)},[d,s]),m=(0,l.useCallback)(()=>{d&&s&&(r(d.selectedScrollSnap()),s.scrollTo(d.selectedScrollSnap()))},[d,s,r]);return(0,l.useEffect)(()=>{d&&(m(),d.on("select",m),d.on("reInit",m))},[d,m]),(0,n.BX)($,{children:[(0,n.tZ)("div",{className:"carousel-main",children:(0,n.tZ)(T.n,{getEmblaApi:c,slidesToShow:1,withControls:!1,initialSlide:a,height:"100%",sx:{flex:1},draggable:o.length>1&&!p,children:o.map(e=>(0,n.tZ)(T.n.Slide,{children:(0,n.BX)("div",{style:{position:"relative"},children:[!!i&&(0,n.tZ)(AffiliateDiscountBadge,{discount:i,multiple:(null==t?void 0:t.channel.length)>1}),(0,n.tZ)("img",{loading:"lazy",src:e,alt:""})]})},e))},String(p))}),o.length>1&&(0,n.tZ)("div",{className:"carousel-thumb",children:(0,n.tZ)(T.n,{getEmblaApi:u,dragFree:!p,draggable:!p,slidesToShow:4,slideGap:8,mx:"auto",withControls:!1,children:o.map((e,t)=>(0,n.tZ)(T.n.Slide,{children:(0,n.tZ)(AffiliateThumbnail,{image:e,selected:t===a,index:t,onClick:h})},e))},String(p))})]})};var en=i(72445),el=i(27484),eo=i.n(el),ea=i(61902);let copyToClipboard_copyToClipboard=async(e,t,i)=>{try{var n,l,o;if(null===(n=navigator)||void 0===n?void 0:n.clipboard)await(null===(o=navigator)||void 0===o?void 0:null===(l=o.clipboard)||void 0===l?void 0:l.writeText(e));else{let t=document.createElement("textarea");t.style.display="none",t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}catch(e){null==i||i(e)}finally{t()}},_DiscountInformation=e=>{var t,i,l,o,a,r;let{product:d}=e,{formatMessage:c}=(0,Z.Z)();return(0,n.tZ)(en.W,{fluid:!0,p:0,children:(0,n.BX)(O.K,{spacing:16,children:[(0,n.tZ)(F.H,{tag:"h6",children:null==d?void 0:null===(l=d.channel)||void 0===l?void 0:null===(i=l[0])||void 0===i?void 0:null===(t=i.promotion)||void 0===t?void 0:t.name}),(0,n.BX)(O.K,{spacing:8,children:[(0,n.BX)(O.K,{spacing:2,children:[(0,n.tZ)(A.T,{size:"s5",type:"semiBold",color:P.t.colors.gray600,children:c({id:"affiliate.promotion.endDate",defaultMessage:"End Date"})}),(0,n.tZ)(A.T,{size:"n1",color:P.t.colors.gray500,children:eo()().format(_.tD)})]}),(0,n.tZ)(Y.i,{color:P.t.colors.neutral100}),(0,n.BX)(O.K,{spacing:2,children:[(0,n.tZ)(A.T,{size:"s5",type:"semiBold",color:P.t.colors.gray600,children:c({id:"affiliate.promotion.condition",defaultMessage:"Condition"})}),(0,n.tZ)(A.T,{size:"n1",color:P.t.colors.gray500,dangerouslySetInnerHTML:{__html:null==d?void 0:null===(r=d.channel)||void 0===r?void 0:null===(a=r[0])||void 0===a?void 0:null===(o=a.promotion)||void 0===o?void 0:o.description}})]})]})]})})},AffiliateDiscount=e=>{var t,i,o,a,r,d,c,s,u,p,h,m,v,g,b;let{product:y}=e,{formatMessage:C}=(0,Z.Z)(),[x,w]=(0,l.useState)(!1);return(0,n.BX)(G.k,{gap:12,mt:8,mb:16,align:"center",children:[(0,n.BX)(W.J,{opened:x,onChange:w,withinPortal:!0,offset:10,withArrow:!0,styles:{dropdown:{border:"1px solid ".concat(P.t.colors.neutral100),borderRadius:"6px",padding:"16px",paddingBottom:"24px",backgroundColor:P.t.colors.neutral50,boxShadow:"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)"}},children:[(0,n.tZ)(W.J.Target,{children:(0,n.BX)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",onClick:()=>w(e=>!e),children:[(0,n.tZ)("path",{d:"M1.83337 8.00004C1.83337 4.59618 4.59618 1.83337 8.00004 1.83337C11.4039 1.83337 14.1667 4.59618 14.1667 8.00004C14.1667 11.4039 11.4039 14.1667 8.00004 14.1667C4.59618 14.1667 1.83337 11.4039 1.83337 8.00004Z",stroke:"#8C8C8C"}),(0,n.tZ)("path",{d:"M8.00004 11.3334C7.63337 11.3334 7.33337 11.0334 7.33337 10.6667V8.00004C7.33337 7.63337 7.63337 7.33337 8.00004 7.33337C8.36671 7.33337 8.66671 7.63337 8.66671 8.00004V10.6667C8.66671 11.0334 8.36671 11.3334 8.00004 11.3334Z",fill:"#8C8C8C"}),(0,n.tZ)("path",{d:"M8.66671 5.99996H7.33337V4.66663H8.66671V5.99996Z",fill:"#8C8C8C"})]})}),(0,n.tZ)(W.J.Dropdown,{children:(0,n.tZ)(_DiscountInformation,{product:y})})]}),(0,n.BX)(ee,{children:[(0,n.BX)(A.T,{as:"span",size:"label2",color:P.t.colors.gray500,children:[C({id:"affiliate.promotion.discountCode",defaultMessage:"Discount Code"}),":"," "]}),(0,n.tZ)(A.T,{as:"span",size:"n1",color:P.t.colors.gray500,type:"bold",children:null==y?void 0:null===(o=y.channel)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:null===(t=i.promotion)||void 0===t?void 0:t.code})]}),(0,n.tZ)(f.B,{size:"sm",color:"transparent",onClick:()=>{var e,t,i;copyToClipboard_copyToClipboard(null==y?void 0:null===(i=y.channel)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:null===(e=t.promotion)||void 0===e?void 0:e.code,()=>{(0,ea.showNotification)({type:"success",title:"Success",message:C({id:"common.copySuccess",defaultMessage:"Link copied successfully"})}),e=>{(0,ea.showNotification)({type:"danger",message:(null==e?void 0:e.message)||"",title:C({id:"notification.comment.somethingWrong",defaultMessage:"Something went wrong."})})}})},"data-event-category":"Affiliates","data-event-action":"Copy Promotion Code","data-event-label":"".concat(null==y?void 0:null===(d=y.channel)||void 0===d?void 0:null===(r=d[0])||void 0===r?void 0:null===(a=r.promotion)||void 0===a?void 0:a.name,": ").concat(null==y?void 0:null===(u=y.channel)||void 0===u?void 0:null===(s=u[0])||void 0===s?void 0:null===(c=s.promotion)||void 0===c?void 0:c.code),"data-product-channel":null==y?void 0:null===(h=y.channel)||void 0===h?void 0:null===(p=h[0])||void 0===p?void 0:p.name,"data-product-sku":null==y?void 0:y.sku,"data-product-brand":null==y?void 0:y.brand,"data-product-name":null==y?void 0:y.postName,"data-product-price":(null==y?void 0:y.priceRange)||(null===(v=y.channel)||void 0===v?void 0:null===(m=v[0])||void 0===m?void 0:m.price),"data-product-category":null==y?void 0:null===(b=y.productCat)||void 0===b?void 0:null===(g=b[0])||void 0===g?void 0:g.name,className:"pointer-event-child-none",icon:(0,n.tZ)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,n.tZ)("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:"#262626"})})})]})},_BrandName=e=>{let{brand:t}=e;return(0,n.tZ)(A.T,{size:"c2",color:P.t.colors.gray400,type:"bold",children:null==t?void 0:t.map((e,t)=>(0,n.BX)(l.Fragment,{children:[t>0&&", ",(0,n.tZ)("a",{href:null==e?void 0:e.permalink,className:"no-replace-click",target:"_blank",children:null==e?void 0:e.name},t)]},e.termId))})},er=[m.MV.Vietnam,m.MV.Indonesia],Affiliate=e=>{var t,i,o,a,r,d,c,s,u,h,m,v,g,f,b,y,C;let{product:x,showProsCons:w=!1,position:k=0}=e,{formatMessage:I}=(0,Z.Z)(),M=(0,B.d)(),{locale:T}=(0,p.h)(),S=(0,U.U)(),_=(0,l.useMemo)(()=>new Intl.NumberFormat(T,{style:"currency",currency:x.currencyUnit.code||"VND",...er.includes(T)?{minimumFractionDigits:0,maximumFractionDigits:0}:{}}),[T,null==x?void 0:null===(t=x.currencyUnit)||void 0===t?void 0:t.code]),L=Number(null==x?void 0:null===(o=x.channel)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.price.replace(/[^\d]/g,"")),D=Number(null==x?void 0:null===(r=x.channel)||void 0===r?void 0:null===(a=r[0])||void 0===a?void 0:a.discount_price.replace(/[^\d]/g,"")),N=(0,l.useMemo)(()=>{var e,t;return!!(null==x?void 0:null===(t=x.channel)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.discount_price)&&L>D},[null==x?void 0:null===(c=x.channel)||void 0===c?void 0:null===(d=c[0])||void 0===d?void 0:d.discount_price,L]),j=(0,l.useMemo)(()=>{if(!N||null===L)return 0;let e=x.channel.map(e=>(Number(e.price.replace(/[^\d]/g,""))-Number(e.discount_price.replace(/[^\d]/g,"")))/Number(e.price.replace(/[^\d]/g,""))*100);return Math.max(...e)},[N]),z=(0,l.useMemo)(()=>{if(j){var e,t;let i=Number(null==x?void 0:null===(t=x.channel)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.discount_price);return _.format(i)}return null},[j]),E=(0,l.useMemo)(()=>{var e,t;if(!(null==x?void 0:x.priceRange.includes("~")))return null==x?void 0:x.priceRange;let i=[...null==x?void 0:null===(e=x.channel)||void 0===e?void 0:e.map(e=>Number(e.discount_price)),...null==x?void 0:null===(t=x.channel)||void 0===t?void 0:t.map(e=>Number(e.price))].filter(e=>0!==e);return"".concat(_.format(Math.min(...i))," - ").concat(_.format(Math.max(...i)))},[null==x?void 0:x.channel]);return(0,n.BX)(et,{children:[(0,n.BX)(X.M,{cols:2,"data-event-category":"Affiliates","data-event-action":"Impression","data-event-label":S,"data-product-sku":null==x?void 0:x.sku,"data-product-brand":null==x?void 0:null===(u=x.brand)||void 0===u?void 0:null===(s=u[0])||void 0===s?void 0:s.name,"data-product-name":null==x?void 0:x.postName,"data-product-price":null==x?void 0:null===(m=x.channel)||void 0===m?void 0:null===(h=m[0])||void 0===h?void 0:h.price,breakpoints:[{maxWidth:"md",cols:1}],children:[(0,n.tZ)(AffiliateCarousel,{discount:j,product:x}),(0,n.BX)(O.K,{mt:M?16:0,justify:"center",children:[(0,n.BX)(O.K,{spacing:4,children:[(0,n.tZ)(_BrandName,{brand:x.brand}),(0,n.tZ)(A.T,{size:"s2",type:"semiBold",children:null==x?void 0:x.postTitle}),E&&(0,n.tZ)(K,{hasPromotion:N&&!E.includes("-"),originalPrice:E,promotionPrice:E.includes("-")?void 0:z})]}),N&&(null==x?void 0:null===(f=x.channel)||void 0===f?void 0:null===(g=f[0])||void 0===g?void 0:null===(v=g.promotion)||void 0===v?void 0:v.code)&&(0,n.tZ)(AffiliateDiscount,{product:x}),(null==x?void 0:x.channel)&&(0,n.tZ)(AffiliateButton,{product:x,mt:N&&(null==x?void 0:null===(C=x.channel)||void 0===C?void 0:null===(y=C[0])||void 0===y?void 0:null===(b=y.promotion)||void 0===b?void 0:b.code)?0:16,position:k})]})]}),w&&x.pros&&x.cons&&(0,n.tZ)(R.X,{mt:M?"md":"xl",className:"pros-cons",w:"100%",radius:"md",p:M?"md":"xl",withBorder:!0,styles:{borderColor:"#E4E8EC"},children:(0,n.BX)(H.a,{spacing:"sm",center:!0,children:[(0,n.tZ)(H.a.Item,{icon:(0,n.BX)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,n.tZ)("path",{d:"M9.99996 18.3333C14.6023 18.3333 18.3333 14.6023 18.3333 9.99996C18.3333 5.39759 14.6023 1.66663 9.99996 1.66663C5.39759 1.66663 1.66663 5.39759 1.66663 9.99996C1.66663 14.6023 5.39759 18.3333 9.99996 18.3333Z",fill:"#00B16A"}),(0,n.tZ)("path",{d:"M9.58582 12.6672C9.22968 12.6678 8.87693 12.5981 8.54776 12.4621C8.2186 12.3261 7.91949 12.1265 7.66757 11.8748L6.68611 10.8929C6.55631 10.7585 6.48449 10.5785 6.48611 10.3917C6.48773 10.2048 6.56268 10.0261 6.69479 9.89398C6.82691 9.76186 7.00563 9.68692 7.19247 9.68529C7.3793 9.68367 7.5593 9.75549 7.6937 9.8853L8.67515 10.8672C8.79368 10.9858 8.9344 11.0798 9.08927 11.1439C9.24413 11.2081 9.41012 11.2411 9.57774 11.2411C9.74537 11.2411 9.91136 11.2081 10.0662 11.1439C10.2211 11.0798 10.3618 10.9858 10.4803 10.8672L16.7035 5.2431C16.8445 5.1216 17.0274 5.06008 17.2132 5.07171C17.399 5.08334 17.5728 5.16719 17.6976 5.30534C17.8223 5.44348 17.888 5.62495 17.8807 5.81094C17.8734 5.99692 17.7936 6.17266 17.6584 6.30057L11.4594 11.8995C11.2131 12.1445 10.9207 12.3385 10.5992 12.4702C10.2777 12.602 9.93329 12.6689 9.58582 12.6672Z",fill:"white"})]}),children:(0,n.tZ)(A.T,{size:"s2",type:"semiBold",children:I({id:"affiliate.pros",defaultMessage:"Pros"})})}),(0,n.tZ)(A.T,{size:"p3",color:P.t.colors.gray700,dangerouslySetInnerHTML:{__html:x.pros||""},className:"pros-cons"}),(0,n.tZ)(H.a.Item,{icon:(0,n.BX)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,n.tZ)("path",{d:"M9.99996 18.3333C14.6023 18.3333 18.3333 14.6023 18.3333 9.99996C18.3333 5.39759 14.6023 1.66663 9.99996 1.66663C5.39759 1.66663 1.66663 5.39759 1.66663 9.99996C1.66663 14.6023 5.39759 18.3333 9.99996 18.3333Z",fill:"#F44D2C"}),(0,n.tZ)("path",{d:"M13.1088 13.7501C12.9445 13.7501 12.7806 13.6875 12.6551 13.5623L6.43827 7.34524C6.18757 7.09454 6.18757 6.68861 6.43827 6.43817C6.68896 6.18773 7.0949 6.18747 7.34533 6.43817L13.5624 12.6552C13.8131 12.9059 13.8131 13.3119 13.5624 13.5623C13.4369 13.6875 13.273 13.7501 13.1088 13.7501Z",fill:"white"}),(0,n.tZ)("path",{d:"M6.89168 13.75C6.72746 13.75 6.5635 13.6874 6.43802 13.5622C6.18733 13.3115 6.18733 12.9055 6.43802 12.6551L12.6551 6.43802C12.9058 6.18733 13.3117 6.18733 13.5622 6.43802C13.8126 6.68872 13.8129 7.09465 13.5622 7.34509L7.34535 13.5622C7.22013 13.6874 7.05591 13.75 6.89168 13.75Z",fill:"white"})]}),children:(0,n.tZ)(A.T,{size:"s2",type:"semiBold",children:I({id:"affiliate.cons",defaultMessage:"Cons"})})}),(0,n.tZ)(A.T,{size:"p3",color:P.t.colors.gray700,dangerouslySetInnerHTML:{__html:x.cons||""},className:"pros-cons"})]})})]})};function embeddedAffiliate_index_styled_templateObject(){let e=(0,L._)(["\n position: relative;\n z-index: 10;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n padding: 24px;\n gap: 24px;\n background-color: ",";\n border-radius: 8px;\n .title {\n color: ",";\n }\n .affiliate-carousel {\n > .mantine-Carousel-indicators {\n top: calc(100% + 8px);\n .mantine-Carousel-indicator {\n width: 8px;\n height: 8px;\n border-width: 0;\n opacity: 1;\n background-color: ",";\n\n &[data-active] {\n background-color: ",";\n }\n }\n }\n\n > .mantine-Carousel-control {\n opacity: 1;\n\n &[data-inactive] {\n opacity: 0;\n cursor: 'default';\n }\n }\n > .mantine-Carousel-controls {\n width: calc(100% + 70px);\n margin-left: -35px;\n }\n }\n"]);return embeddedAffiliate_index_styled_templateObject=function(){return e},e}let ed=(0,N.ZP)(en.W).withConfig({componentId:"sc-989f175d-0"})(embeddedAffiliate_index_styled_templateObject(),null===P.t||void 0===P.t?void 0:P.t.colors.neutral50,null===P.t||void 0===P.t?void 0:P.t.colors.secondaryBase,null===P.t||void 0===P.t?void 0:P.t.colors.neutral200,null===P.t||void 0===P.t?void 0:P.t.colors.primaryBase),EmbeddedAffiliate=e=>{var t;let{affiliates:i,position:o}=e,[a,r]=(0,l.useState)([]),{locale:d="en-PH"}=(0,p.h)(),c=(0,B.d)(),s=null==i?void 0:null===(t=i.productId)||void 0===t?void 0:t.split(","),fetchProductDetail=async e=>{var t,i;let n=await(0,k.d)(M.y.COMMON.GET_AFFILIATE_PRODUCT,{params:{productId:e}});if(null==n?void 0:null===(t=n.data)||void 0===t?void 0:t[0]){let e=(0,I.nx)(null==n?void 0:null===(i=n.data)||void 0===i?void 0:i[0],d);return e}};return(0,l.useEffect)(()=>{Promise.all((s||[]).map(async e=>{let t=await fetchProductDetail(e);return t})).then(e=>r(e.filter(e=>!!(null==e?void 0:e.id)&&(null==e?void 0:e.id)!==0)))},[]),a.length>0?(0,n.BX)(ed,{fluid:!0,my:16,children:[i.title&&(0,n.tZ)(b.x,{sx:{borderLeft:"5px solid ".concat(P.t.colors.primaryBase),paddingLeft:12},children:(0,n.tZ)(F.H,{tag:"h5",className:"title",children:i.title})}),a.length>1?(0,n.tZ)(T.n,{slidesToShow:1,slidesToScroll:1,draggable:c,mx:"auto",height:"100%",maw:"100%",withControls:!c,withIndicators:c,controlsOffset:0,controlSize:32,className:"affiliate-carousel",children:a.map(e=>(0,n.tZ)(T.n.Slide,{children:(0,n.tZ)(Affiliate,{product:e,position:o})},e.id))},a.length):a.map(e=>(0,n.tZ)(Affiliate,{product:e,showProsCons:!0,position:o},e.id))]}):null};var ec=i(50568),es=i(53707),eu=i(21692);let AfterImageAd=()=>{let{locale:e}=(0,p.h)(),{currentArticle:t}=(0,v.WM)(e=>({currentArticle:e.currentArticle}),d.X),{articleId:i,customTargetings:o,adUnitPath:a}=(0,l.useContext)(g);return _.nT.includes(e)&&String(null==t?void 0:t.id)===i?(0,n.tZ)("div",{children:(0,n.tZ)(x.AdBlock,{className:"article-mobile-ad ad-afterimage",divId:"div-gpt-ad-afterimage-".concat(i),adUnitPath:a,size:[1,1],pos:["AfterImage"],contentId:i,customTargetings:o,noWrapper:!0,style:{lineHeight:0,margin:"0 auto"}})}):null};var ep=i(54685),eh=i(17303),em=i(78232),ev=i(22387);let eg=(0,l.memo)(function(e){let{primaryCategory:t}=e,i=(0,U.U)(),{locale:a}=(0,p.h)(),r=(0,l.useMemo)(()=>{if(a!==o.L.Vietnam)return null;let e=null==t?void 0:t.permalink,i="";Object.entries(_.po[a]).every(t=>{let[n,l]=t;return null==e||!e.includes(l)||(i=n,!1)});let n="general";return Object.entries(ev.p).every(e=>{let[t,l]=e;return!l.includes(i)||(n=t,!1)}),{template:n}},[t,a]);return(0,n.tZ)(em.Z,{children:(0,n.tZ)(ep.e,{href:"https://hellobacsivn.page.link/app","data-event-category":"App Banner","data-event-action":"Article Position 25%","data-event-label":i,children:(0,n.tZ)(eh._,{type:null==r?void 0:r.template,my:16})})})},(e,t)=>{var i,n;return(null===(i=e.primaryCategory)||void 0===i?void 0:i.permalink)===(null===(n=t.primaryCategory)||void 0===n?void 0:n.permalink)});var ef=i(29238),eb=i(20254);let eZ=(0,l.memo)(function(e){let{html:t}=e,i=(0,l.useMemo)(()=>t&&(0,ef.sanitize)(t,{ADD_ATTR:["name","target","data-url"],ADD_TAGS:["iframe"]}),[t]);return i?(0,n.tZ)(em.Z,{children:(0,n.tZ)(eb.Y1,{className:"body-content article-content-wrapper","data-size":"small",dangerouslySetInnerHTML:{__html:i}})}):null},(e,t)=>e.html===t.html);var ey=i(20374),eC=i(3319);let ContentItemInterscrollerAd=()=>{var e,t;let{locale:i}=(0,p.h)(),{articleId:a,customTargetings:r,isMobile:d,articleLink:c,adUnitPathMobile:s}=(0,l.useContext)(g),u=c.split("/").filter(Boolean).join("/"),h=null===(t=ey.Oy["Interscroller - InRead"])||void 0===t?void 0:null===(e=t[i])||void 0===e?void 0:e.includes(u);return(0,n.tZ)(em.Z,{children:(0,n.tZ)(eC.Y,{articleId:String(a),placeholderSize:[300,250],children:(0,n.tZ)(x.AdBlock,{className:"article-mobile-ad",adUnitPath:s,size:[...h?[[300,250],[300,600],[320,640]]:[[300,250],[300,600]],...eu.d.includes(i)?[[1,1]]:[]],divId:"div-gpt-ad-midbanner1-"+a,pos:["MidBanner1"],contentId:a,isHidden:!d,customTargetings:r,adDefaultSize:[300,250],...i===o.L.Vietnam?{onlyRefreshInview:!0,refreshInterval:30}:{}})})})};var ex=i(27932);let ContentItemMgidAdMobile=()=>{var e,t,i;let{locale:o}=(0,p.h)(),{currentArticle:a}=(0,v.WM)(e=>({currentArticle:e.currentArticle}),d.X),{articleId:r,customTargetings:c,articleLink:s}=(0,l.useContext)(g),u=h.T[o]||{},m=u.mobileInArticle,f=!c||!(null===(e=c.Is_Sponsored)||void 0===e?void 0:e[0])&&!(null===(t=c.Is_Expert_Article)||void 0===t?void 0:t[0])&&!(null===(i=c.Is_Affiliate)||void 0===i?void 0:i[0]);return f&&m?(0,n.tZ)(em.Z,{children:(0,n.tZ)(ex.k,{divId:m.divId,script:m.script,initMgid:String(null==a?void 0:a.id)===String(r),articlePath:s})}):null},ContentItemMgidAdDesktop=()=>{var e,t,i;let{locale:o}=(0,p.h)(),{currentArticle:a}=(0,v.WM)(e=>({currentArticle:e.currentArticle}),d.X),{articleId:r,customTargetings:c,articleLink:s}=(0,l.useContext)(g),u=h.T[o]||{},m=u.desktopInArticle,f=!c||!(null===(e=c.Is_Sponsored)||void 0===e?void 0:e[0])&&!(null===(t=c.Is_Expert_Article)||void 0===t?void 0:t[0])&&!(null===(i=c.Is_Affiliate)||void 0===i?void 0:i[0]);return f&&m?(0,n.tZ)(em.Z,{children:(0,n.tZ)(ex.k,{divId:m.divId,script:m.script,initMgid:String(null==a?void 0:a.id)===String(r),articlePath:s})}):null};function readMoreButton_index_styled_templateObject(){let e=(0,L._)(["\n 0% {\n transform: translateY(-15px);\n opacity: 0\n }\n\n 70%,\n to {\n transform: translateY(0);\n opacity: 1\n }\n"]);return readMoreButton_index_styled_templateObject=function(){return e},e}function readMoreButton_index_styled_templateObject1(){let e=(0,L._)(["\n text-align: center;\n position: relative;\n cursor: pointer;\n * {\n pointer-events: none;\n }\n &::before {\n content: '';\n position: absolute;\n bottom: 100%;\n height: 200px;\n left: 0;\n background-image: linear-gradient(180deg, #fff0, #fff);\n width: 100%;\n }\n .content {\n cursor: pointer;\n color: #33333380;\n text-align: center;\n margin: 0 5px 20px;\n vertical-align: middle;\n transform: perspective(1px) translateZ(0);\n box-shadow: 0 0 1px transparent;\n position: relative;\n display: inline-block;\n border: none;\n font-size: 19px;\n background: url() no-repeat top;\n background-color: #0000;\n background-size: 26px 17px;\n padding-bottom: 0;\n padding-top: 40px;\n }\n .arrow {\n top: 22px;\n span {\n animation: "," 1s ease-in-out infinite;\n background: url(/images/double-arrow.png);\n width: 24px;\n height: 24px;\n top: 15px;\n opacity: 1;\n background-size: contain;\n background-repeat: no-repeat;\n display: block;\n right: 0;\n left: 0;\n margin: auto;\n position: absolute;\n }\n }\n"]);return readMoreButton_index_styled_templateObject1=function(){return e},e}let ew=(0,N.F4)(readMoreButton_index_styled_templateObject()),ek=N.ZP.div.withConfig({componentId:"sc-ad149c18-0"})(readMoreButton_index_styled_templateObject1(),ew),ReadMoreButton=e=>{let{onClick:t}=e,{formatMessage:i}=(0,Z.Z)(),l=(0,U.U)();return(0,n.tZ)(ek,{onClick:t,"data-event-category":"Continue Reading","data-event-action":"Click","data-event-label":l,children:(0,n.BX)("button",{className:"content",children:[(0,n.tZ)("span",{className:"arrow",children:(0,n.tZ)("span",{})}),(0,n.tZ)(A.T,{size:"s3",color:P.t.colors.primaryBase,type:"semiBold",children:i({id:"continueReading",defaultMessage:"Continue Reading"})})]})})};function readMore_templateObject(){let e=(0,L._)(["\n position: relative;\n width: 100%;\n .inner-wrapper {\n transition: all 0.5s ease-in-out;\n &[data-show='true'] {\n transform: translateY(100vh);\n opacity: 0;\n pointer-events: none;\n position: absolute;\n width: 100%;\n }\n }\n"]);return readMore_templateObject=function(){return e},e}let ReadMore=e=>{let{isShowAll:t,onReadMoreClick:i}=e;return(0,n.tZ)(eI,{children:(0,n.tZ)("div",{className:"inner-wrapper","data-show":t,children:(0,n.tZ)(ReadMoreButton,{onClick:i})})})},eI=N.ZP.div.withConfig({componentId:"sc-397ed0ee-0"})(readMore_templateObject());var eM=i(17563);let ContentItemVideoList=e=>{let{injectVideo:t}=e,i=(0,l.useMemo)(()=>{var e,i;if(t)return t.url.length>1?null===(e=t.url)||void 0===e?void 0:e.map(e=>({title:"",videoUrl:e.trim()})):null===(i=t.url)||void 0===i?void 0:i.map(e=>{let i=eM.parseUrl(e),n=eM.stringifyUrl({url:i.url.replace("http://","https://"),query:{...i.query,..."1"===t.isAutoPlay?{autoplay:1,mute:1}:{}}});return{title:"",videoUrl:n}})},[t]);return(null==i?void 0:i.length)?(0,n.tZ)(em.Z,{children:(0,n.tZ)(eb.d3,{title:(0,n.tZ)(F.H,{tag:"h5",style:{marginBottom:"8px",paddingLeft:"16px",borderLeft:"5px solid ".concat(P.t.colors.primaryBase)},children:t.title}),description:t.description,videos:i,isAutoPlay:(null==i?void 0:i.length)===1&&"1"===t.isAutoPlay})}):null};var eB=i(65146);let ArticleContentItem=e=>{let{content:t,isHidden:i,isPremiumHidden:a,article:r,isShowAll:u,onReadMoreClick:h}=e,{formatMessage:m}=(0,Z.Z)(),{setIsCommentPopupOpen:k}=(0,v.WM)(e=>({setIsCommentPopupOpen:e.setIsCommentPopupOpen}),d.X),{locale:I}=(0,p.h)(),M=(0,U.U)(),B=i||a,{isShowAllPremium:A,isMobile:T,faqs:S,articleCategories:_,articleLink:L,articleId:P,customTargetings:D,adUnitPathMobile:N,adUnitPath:j}=(0,l.useContext)(g),{html:z,injectedSlug:E,injectedHealthTool:F,injectedSpotlight:X,injectedCommunity:O,injectAffiliate:R,injectFAQs:H,subotInline:V,subotInlineRevamp:G,injectCareRecommendation:W,injectRecommendation:Y,injectCarousel:q,isPremium:K,relatedArticles:J,injectVideo:Q,injectedSkuList:$,injectedProductTitle:ee,is25Percent:et,is59Percent:ei,is5Percent:en,is50Percent:el,is80Percent:eo,is15Percent:ea,isReadMore:er}=t,ed=null==F?void 0:F.split("."),ec=null==ed?void 0:ed[0],es=(null==ed?void 0:ed[1])==="withResult",ep=I===o.L.Vietnam&&(!!s.f[(null==r?void 0:r.permalink)||""]||!!c.InlineDynamicSpotlighthMap[(null==r?void 0:r.permalink)||""]);return(0,n.BX)(n.HY,{children:[er&&(0,n.tZ)(ReadMore,{isShowAll:u,onReadMoreClick:h}),z&&(0,n.tZ)(eZ,{html:z}),!T&&el&&(0,n.tZ)(ContentItemMgidAdDesktop,{}),T&&ei&&(0,n.tZ)(ContentItemMgidAdMobile,{}),et&&T&&I===o.L.Vietnam&&(0,n.tZ)(eg,{primaryCategory:null==r?void 0:r.primaryCategory}),!ep&&(0,n.BX)(n.HY,{children:[K&&!A&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(C.G,{isPortal:!1})}),E&&!B&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eB.cC,{slug:E,articleType:1,isMobile:T})}),J&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(RelatedArticleCarousel,{title:J.title,ids:J.ids})}),ec&&!B?(0,n.tZ)(em.Z,{children:(0,n.BX)(eb.jx,{transparentStyle:es,children:["bmi"===ec&&(0,n.tZ)(eB.il,{articleCategories:_,positionType:"article",showUserResult:es}),"bmr"===ec&&(0,n.tZ)(eB.t,{articleCategories:_,positionType:"article",showUserResult:es}),"pregnancy-weight-gain"===ec&&(0,n.tZ)(eB.qW,{showUserResult:es}),"heart-rate"===ec&&(0,n.tZ)(eB.pd,{showUserResult:es}),"ovulation"===ec&&(0,n.tZ)(eB._c,{showUserResult:es}),"due-date"===ec&&(0,n.tZ)(eB._O,{showUserResult:es}),"vaccination-tool"===ec&&(0,n.tZ)(eB.my,{showUserResult:es}),"baby-poop-tool"===ec&&(0,n.tZ)(eB.E8,{}),"child-growth-chart"===ec&&(0,n.tZ)(eB.QD,{showUserResult:es})]})}):null,(null==O?void 0:O.id)&&!B&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(y.Z,{offset:1e3,children:(0,n.tZ)(eB.XX,{titleMember:(null==O?void 0:O.titleMember)||"",titleGuest:(null==O?void 0:O.titleGuest)||"",descriptionMember:(null==O?void 0:O.descriptionMember)||"",descriptionGuest:(null==O?void 0:O.descriptionGuest)||"",community:{community:null==O?void 0:O.id},articleId:P,actionButton:(0,n.tZ)(f.B,{size:"md",color:"primary",className:"ask",onClick:()=>{k(!0)},"data-event-category":"Together","data-event-action":"Ask Doctor Click","data-event-label":M,isBlock:T,children:m({id:"mobileBar.askDoctor",defaultMessage:"Ask Doctor"})})})})}),X&&!B&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eB.Xl,{id:null==X?void 0:X.id})}),W&&!B&&W.type?(0,n.tZ)(em.Z,{children:(0,n.tZ)("div",{style:{marginTop:"16px",contentVisibility:"auto",containIntrinsicSize:"500px"},children:(0,n.tZ)(eB.sB,{isMobile:T,type:W.type,dataId:W.dataId,dataTitle:W.dataTitle,dataDescription:W.dataDescription})})}):null,(null==R?void 0:R.productId)&&!B&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(EmbeddedAffiliate,{affiliates:R,position:R.position})}),H&&S&&!B&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eB.bG,{isMobile:T,posts:S})}),Q&&(0,n.tZ)(ContentItemVideoList,{injectVideo:Q}),Y&&!B&&Y.titleData&&Y.contentData&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eB.Qp,{title:Y.titleData,content:Y.contentData})}),q&&!B&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eB.Kf,{isMobile:T,id:null==q?void 0:q.id})}),$&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(b.x,{sx:{margin:"24px 0"},children:(0,n.tZ)(w.f,{heading:ee,skuList:$,layout:["wide-horizon","horizon","vertical"],sx:e=>({[e.fn.smallerThan("sm")]:{margin:"0 -16px",borderRadius:0}})})})})]}),en&&T&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eC.Y,{articleId:String(null==r?void 0:r.id),placeholderSize:[300,250],children:(0,n.tZ)(x.AdBlock,{className:"article-mobile-ad",adUnitPath:N,size:[[300,250],[300,600]],divId:"div-gpt-ad-topbanner-"+P,pos:["TopBanner"],contentId:P,isHidden:!T,customTargetings:D,adDefaultSize:[300,250],...I===o.L.Vietnam?{onlyRefreshInview:!0,refreshInterval:30}:{}})})}),(ea&&T||et&&!T)&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eC.Y,{articleId:String(null==r?void 0:r.id),children:(0,n.tZ)("div",{children:(0,n.tZ)(x.AdBlock,{adUnitPath:j,size:[1,1],pos:["video"],contentId:P,noWrapper:!0,wrapperProps:{m:"0.75rem 0"},divId:"div-gpt-ad-video-"+P+"-oop",customTargetings:D,className:"sh-player"},"div-gpt-ad-video-"+P+"-oop")})})}),(et&&T||en&&!T)&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eC.Y,{articleId:String(null==r?void 0:r.id),children:(0,n.tZ)(AfterImageAd,{})})}),el&&T&&(0,n.tZ)(ContentItemInterscrollerAd,{}),eo&&T&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(eC.Y,{articleId:String(null==r?void 0:r.id),placeholderSize:[300,250],children:(0,n.tZ)(x.AdBlock,{className:"article-mobile-ad",adUnitPath:N,size:[[300,250],[300,600],...eu.d.includes(I)?[[1,1]]:[]],divId:"div-gpt-ad-midbanner2-"+P,pos:["MidBanner2"],contentId:P,isHidden:!T,customTargetings:D,adDefaultSize:[300,250],...I===o.L.Vietnam?{onlyRefreshInview:!0,refreshInterval:30}:{}})})}),!ep&&(0,n.BX)(n.HY,{children:[!!V&&!B&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(y.Z,{offset:800,children:(0,n.tZ)(eB.N,{id:V.subotId,articleLink:L,isMobile:T})})}),!!(null==G?void 0:G.subotId)&&!B&&(0,n.tZ)(SubotInlineRevampWrapper,{subotId:G.subotId,articleLink:L,isMobile:T})]})]})},SubotInlineRevampWrapper=e=>{let{subotId:t,articleLink:i,isMobile:l}=e,{state:o}=(0,es.b)(),a=null==o?void 0:o.userInfo;return(0,n.tZ)(y.Z,{offset:800,children:(0,n.BX)(em.Z,{children:[(0,n.tZ)(ec.a,{}),(0,n.tZ)(eB.oh,{id:t,articleLink:i,isMobile:l,userInfo:a})]})})};var eA=i(20948),eT=i(18370);let eS=(0,l.memo)(e=>{var t,i,a,g;let{formattedPostContents:f,adUnitPath:b,articleId:Z,articleLink:y,isMobile:C,faqs:x,customTargetings:w,turnOffIvsPlayer:k,articleCategories:I,isLoggedIn:M,articleIsPremium:B,adUnitPathMobile:A,newsletter:T,articleContentId:S,article:_,unifiedProfileSubot:L,collectingAction:P}=e,{currentArticle:D}=(0,v.WM)(e=>({currentArticle:e.currentArticle}),d.X),N=(0,p.h)(),{locale:j}=N,z=j===o.L.Vietnam&&(!!s.f[_.permalink]||!!c.InlineDynamicSpotlighthMap[(null==_?void 0:_.permalink)||""]),E=(0,l.useRef)(""),{contentWithAd:F,endContents:X}=(0,l.useMemo)(()=>{let e=f.reduce((e,t)=>{let{html:i,injectedSlug:n}=t;if(i.includes("{var i,n,o,a,r,d,c,s,u,p,h,m,v,g,f,b,Z,y,C,x,w,k,I,M,B,A,T,S;if((Object.keys(l).length>1||l.html)&&(t.push(l),l={html:""}),e.includes('class="flat-after-first-paragraph')&&(t.push(l),(l={html:""}).isPremium=!0,l.isFirstParagraph=!0,t.push(l),l={html:""}),e.includes('class="percentages-5-of-article')){l.html=e,l.is5Percent=!0,t.push(l),l={html:""},z&&t.push({html:"",isReadMore:!0});return}if(e.includes('class="percentages-15-of-article')){l.html=e,l.is15Percent=!0,t.push(l),l={html:""};return}if(e.includes('class="percentages-25-of-article')){l.html=e,l.is25Percent=!0,t.push(l),l={html:""};return}if(e.includes('class="percentages-50-of-article')){l.html=e,l.is50Percent=!0,t.push(l),l={html:""};return}if(e.includes('class="percentages-59-of-article')){l.html=e,l.is59Percent=!0,t.push(l),l={html:""};return}if(e.includes('class="percentages-80-of-article')){l.html=e,l.is80Percent=!0,t.push(l),l={html:""};return}if(e.includes('class="percentages-100-of-article')){l.html=e,l.is100Percent=!0,t.push(l),l={html:""};return}if(e.includes("[embed-health-tool-")){let t=(null===(i=/\[embed-health-tool-(.*?)]/gi.exec(e))||void 0===i?void 0:i[1])||"";l.injectedHealthTool=t,E.current=t;return}if(e.includes("data-sku=")){let t=null===(n=/data-sku="(.*?)"/gi.exec(e))||void 0===n?void 0:n[1],i=null===(o=/data-title="(.*?)"/gi.exec(e))||void 0===o?void 0:o[1];l.injectedSkuList=t,l.injectedProductTitle=i;return}if(e&&(l.html+=e),e.includes('data-embed-type="community"')){let t=parseInt((null===(a=/data-id="(.*?)"/gi.exec(e))||void 0===a?void 0:a[1])||"");if(!isNaN(t)){let i=(null===(r=/data-title-member="(.*?)"/gi.exec(e))||void 0===r?void 0:r[1])||"",n=(null===(d=/data-title-guest="(.*?)"/gi.exec(e))||void 0===d?void 0:d[1])||"",o=(null===(c=/data-desc-member="(.*?)"/gi.exec(e))||void 0===c?void 0:c[1])||"",a=(null===(s=/data-desc-guest="(.*?)"/gi.exec(e))||void 0===s?void 0:s[1])||"";l.injectedCommunity={titleMember:i,titleGuest:n,descriptionMember:o,descriptionGuest:a,id:isNaN(t)?null:t};return}}if(e.includes('data-embed-type="spotlight"')){let t=parseInt((null===(u=/data-id="(.*?)"/gi.exec(e))||void 0===u?void 0:u[1])||"");l.injectedSpotlight={id:isNaN(t)?null:t};return}if(e.includes("article-yoast-faqs")){l.html=l.html.replace("[article-yoast-faqs]",""),l.injectFAQs=!0;return}if(e.includes('data-embed-type="affiliate"')){let t=(null===(p=/data-id="(.*?)"/gi.exec(e))||void 0===p?void 0:p[1])||"";if(t){let i=(null===(h=/data-new-tab="(.*?)"/gi.exec(e))||void 0===h?void 0:h[1])==="true",n=(null===(m=/data-nofollow="(.*?)"/gi.exec(e))||void 0===m?void 0:m[1])==="true",o=(null===(v=/data-sponsored="(.*?)"/gi.exec(e))||void 0===v?void 0:v[1])==="true",a=(null===(g=/data-title="(.*?)"/gi.exec(e))||void 0===g?void 0:g[1])||"",r=Number((null===(f=/data-postion="(.*?)"/gi.exec(e))||void 0===f?void 0:f[1])||0);l.injectAffiliate={productId:t,openNewTab:i,noFollow:n,sponsored:o,title:a,position:r};return}}if(e.includes('data-embed-type="care"')){let t=(null===(b=/data-type="(.*?)"/gi.exec(e))||void 0===b?void 0:b[1])||"";if(t){let i=(null===(Z=/data-id="(.*?)"/gi.exec(e))||void 0===Z?void 0:Z[1])||"",n=(null===(y=/data-title="(.*?)"/gi.exec(e))||void 0===y?void 0:y[1])||"",o=(null===(C=/data-description="(.*?)"/gi.exec(e))||void 0===C?void 0:C[1])||"";l.injectCareRecommendation={type:t,dataId:i,dataTitle:n,dataDescription:o};return}}if(e.includes('data-embed-type="subot"')){let t=parseInt((null===(x=/data-id="(.*?)"/gi.exec(e))||void 0===x?void 0:x[1])||"");l.subotInline={subotId:t};return}if(e.includes('data-embed-type="subot-revamp"')){let t=parseInt((null===(w=/data-id="(.*?)"/gi.exec(e))||void 0===w?void 0:w[1])||"");l.subotInlineRevamp={subotId:t};return}if(e.includes('data-embed-type="related-articles"')){let t=(null===(k=/data-articles="(.*?)"/gi.exec(e))||void 0===k?void 0:k[1])||"",i=(null===(I=/data-title="(.*?)"/gi.exec(e))||void 0===I?void 0:I[1])||"";l.relatedArticles={ids:t,title:i};return}if(e.includes('data-embed-type="carousel"')){let t=parseInt((null===(M=/data-id="(.*?)"/gi.exec(e))||void 0===M?void 0:M[1])||"");l.injectCarousel={id:t};return}if(e.includes('data-embed-type="video-embeb"')){let t=(null===(B=/data-title="(.*?)"/gi.exec(e))||void 0===B?void 0:B[1])||"",i=(null===(A=/data-description="(.*?)"/gi.exec(e))||void 0===A?void 0:A[1])||"",n=(null===(T=/data-url="(.*?)"/gi.exec(e))||void 0===T?void 0:T[1])||"",o=(null===(S=/data-autoplay="(.*?)"/gi.exec(e))||void 0===S?void 0:S[1])||"";l.injectVideo={title:t,description:i,url:n.split(","),isAutoPlay:o};return}}),t.push(l),t[t.length-1]&&(t[t.length-1].injectedSlug=n),e.concat(t)}return e.push(t),e},[]),t=e.map(e=>{var t;return{...e,html:(null===(t=e.html)||void 0===t?void 0:t.trim().replace(/^(\s| )*

<\/p>/g,"").replace(/

<\/p>(\s| )*$/g,""))||""}}).filter(e=>!!(null==e?void 0:e.html)||Object.keys(e).length>1),i=[];for(let e=0;e"html"===e?n.html&&(r()(n.html)||n.html.includes("{delete n[e]}),i.unshift(n),Object.keys(t[t.length-e-1]).forEach(i=>{l.includes(i)||delete t[t.length-e-1][i]});break}i.unshift(n),delete t[t.length-e-1]}return{contentWithAd:t,endContents:i}},[f]),{normalContents:O,premiumContents:R,readMoreContents:H}=(0,l.useMemo)(()=>{let e=[],t=[],i=[],n=F.findIndex(e=>null==e?void 0:e.isPremium),l=F.findIndex(e=>null==e?void 0:e.isReadMore);return B&&-1!==n?(t=F.slice(n+1),e=F.slice(0,n+1)):-1!==l?(i=F.slice(l+1),e=F.slice(0,l+1)):e=F,{normalContents:e,premiumContents:t,readMoreContents:i}},[F,B]),[U,V]=(0,l.useState)(!1),G=(0,l.useMemo)(()=>O.concat(R).concat(X).reduce((e,t)=>{var i;return(null==t?void 0:null===(i=t.injectedSpotlight)||void 0===i?void 0:i.id)&&e.push(t.injectedSpotlight.id),e},[]),[O,R,X]),W=!B||!(null==R?void 0:R.length)||M,Y=h.T[j]||{},q=Y.desktopEndArticle,K=Y.mobileEndArticle,J=!w||!(null===(t=w.Is_Sponsored)||void 0===t?void 0:t[0])&&!(null===(i=w.Is_Expert_Article)||void 0===i?void 0:i[0])&&!(null===(a=w.Is_Affiliate)||void 0===a?void 0:a[0]),Q=(null==P?void 0:P.filter(e=>e.name===m.F_.SUBOT))||[];return(0,n.BX)(ArticleContentProvider,{isShowAll:!0,isShowAllPremium:W,isMobile:C,faqs:x,articleCategories:I,articleLink:y,turnOffIvsPlayer:k,articleId:Z,customTargetings:w,adUnitPath:b,adUnitPathMobile:A,articleContentId:S,unifiedProfileSubot:L,children:[(0,n.tZ)("div",{className:"unique-content-wrapper",style:{background:"white"},children:(0,n.tZ)(em.Z,{children:O.filter(Boolean).map((e,t)=>{var i;return(0,n.tZ)(ArticleContentItem,{content:{...e,...!!(null==P?void 0:P.length)&&{...Q.length>0&&(null==e?void 0:e.is59Percent)&&j!==o.L.Taiwan?{subotInlineRevamp:{subotId:null==Q?void 0:null===(i=Q[0])||void 0===i?void 0:i.id}}:void 0}},newsletter:T,article:_,onReadMoreClick:()=>V(!0),isShowAll:U},t)})})}),(0,n.BX)(eb.KA,{"data-hidden":!U||!W,children:[!!H.length&&(0,n.tZ)("div",{className:"unique-content-wrapper",style:{background:"white"},children:(0,n.tZ)(em.Z,{children:H.map((e,t)=>e&&(0,n.tZ)(ArticleContentItem,{content:e,isHidden:!U,isShowAll:U},t))})}),!!(null==R?void 0:R.length)&&(0,n.tZ)("div",{className:B?"paywall":"",children:(0,n.tZ)("div",{className:"unique-content-wrapper",style:{background:"white"},children:(0,n.tZ)(em.Z,{children:R.map((e,t)=>e&&(0,n.tZ)(ArticleContentItem,{content:e,isPremiumHidden:!W,newsletter:T,article:_},t))})})})]}),J&&!C&&q&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(ex.k,{divId:q.divId,script:q.script,initMgid:String(null==D?void 0:D.id)===String(Z),articlePath:null==_?void 0:_.permalink})}),J&&C&&K&&(0,n.tZ)(em.Z,{children:(0,n.tZ)(ex.k,{divId:K.divId,script:K.script,initMgid:String(null==D?void 0:D.id)===String(Z),articlePath:null==_?void 0:_.permalink})}),!!(null===(g=_.embedSpotlights)||void 0===g?void 0:g.length)&&(0,n.tZ)(eT.EmbeddedSpotlightSection,{spotlights:_.embedSpotlights.filter(e=>!G.includes(e.id)).filter(u.J).map(e=>({permalink:e.permalink,bannerDesktop:e.image||"",bannerMobile:e.image||""}))}),(null==X?void 0:X.length)>0&&(0,n.tZ)("div",{className:"unique-content-wrapper",children:(0,n.tZ)(em.Z,{children:X.map((e,t)=>{var i;return e&&(0,n.tZ)(ArticleContentItem,{article:_,content:{...e,...!!(null==P?void 0:P.length)&&{...Q.length>0&&0===t&&j===o.L.Taiwan?{subotInlineRevamp:{subotId:null==Q?void 0:null===(i=Q[0])||void 0===i?void 0:i.id}}:void 0}}},t)})})})]})},(e,t)=>{var i,n;return e.formattedPostContents===t.formattedPostContents&&e.isMobile===t.isMobile&&e.isLoggedIn===t.isLoggedIn&&e.adUnitPath===t.adUnitPath&&e.adUnitPathMobile===t.adUnitPathMobile&&(null===(i=e.collectingAction)||void 0===i?void 0:i.map(e=>e.id).join("-"))===(null===(n=t.collectingAction)||void 0===n?void 0:n.map(e=>e.id).join("-"))})},21692:function(e,t,i){i.d(t,{d:function(){return l}});var n=i(36965);let l=[n.L.Thailand,n.L.Taiwan,n.L.India,n.L.Indonesia,n.L.Malaysia,n.L.PhilippinesEnglish,n.L.PhilippinesTagalog,n.L.Cambodia,n.L.Myanmar,n.L.Vietnam]}}]);