(self.webpackChunkhhgDiscoverV1=self.webpackChunkhhgDiscoverV1||[]).push([[7102],{i6Rr:function(e,t,r){"use strict";r.d(t,{H:function(){return u},a:function(){return c},b:function(){return s}});var n,i,o,s,a=r("Wbba");(n=o||(o={})).DUE_DATE="due-date-calculator",n.BMI="bmi",n.BMR="bmr",n.OVULATION="ovulation",n.IFRAME="IFRAME",n.PWG="pregnancy-weight-gain",n.THR="heart-rate",n.BABY_VACCINE="vaccination-tool",n.BABY_GROWTH="baby-growth-tracking",n.BABY_POOP="baby-poop-checking",(i=s||(s={})).DUE_DATE="DueDate",i.BMI="BMI",i.BMR="BMR",i.OVULATION="Ovulation",i.PWG="PregnancyWeightGain",i.THR="TargetHeartRate",i.BABY_VACCINE="BabyVaccine",i.BABY_GROWTH="BabyGrowth",i.BABY_POOP="BabyPoopChecking";let u={DUE_DATE:o.DUE_DATE,BMI:o.BMI,BMR:o.BMR,OVULATION:o.OVULATION,IFRAME:o.IFRAME,PWG:o.PWG,THR:o.THR,BABY_VACCINE:o.BABY_VACCINE,BABY_GROWTH:o.BABY_GROWTH,BABY_POOP:o.BABY_POOP},c={[u.DUE_DATE]:a.C.getAssetPath("health-tools/due-date-icon.svg")}},Xanp:function(e,t,r){"use strict";r.d(t,{a:function(){return u},b:function(){return l},c:function(){return c},d:function(){return isSupportProduct},g:function(){return getURLwithSSOTracking},i:function(){return d}});var n=r("i6Rr"),i=r("Z0qH"),o=r("D7zM"),s=r("HG5m"),a=r("4BRW");let u=[a.L.Indonesia,a.L.Malaysia].includes(i.l),c=[a.L.Vietnam].includes(i.l),l=[a.L.Vietnam].includes(i.l),d=[a.L.Malaysia].includes(i.l),isSupportProduct=e=>{let t=o.u.getState().setupSource||"discover",r=(null==e?void 0:e.find(e=>"discover"===e.name))&&"discover"===t,n=(null==e?void 0:e.find(e=>"together"===e.name))&&"community"===t,i=(null==e?void 0:e.find(e=>"care"===e.name))&&"care"===t;return r||n||i},getURLwithSSOTracking=(e,{source:t,botItem:r})=>{var i;if(!t&&!r)return null;try{let o=new URL(e.startsWith("localhost")?`http://${e}`:e),a={bmi:n.b.BMI,bmr:n.b.BMR,"due-date":n.b.DUE_DATE,ovulation:n.b.OVULATION,"baby-growth":n.b.BABY_GROWTH,"baby-vaccine":n.b.BABY_VACCINE,"pregnancy-weight-gain":n.b.PWG,"target-heart-rate":n.b.THR,"baby-poop-checking":n.b.BABY_POOP},u=a[t],c=window.location.href.includes("/health-tools");return u&&!c?(o.searchParams.set("embeddedType","healthTool"),o.searchParams.set("toolName",u)):(null===(i=null==r?void 0:r.extra_settings)||void 0===i?void 0:i.subot_type)===s.h.ristScreener&&(o.searchParams.set("embeddedType","riskScreener"),o.searchParams.set("toolName",String(r.id))),o}catch(e){return null}}},KYiY:function(e,t,r){var n;!function(){var t={initialize:function(){this._tasks=new Map},mutate:function(e,t){return create(this,"mutate",e,t)},measure:function(e,t){return create(this,"measure",e,t)},clear:function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)}};function create(e,t,r,n){var i,o=e._tasks,s=e.fastdom,a=new Promise(function(e,u){i=s[t](function(){o.delete(a);try{e(n?r.call(n):r())}catch(e){u(e)}},n)});return o.set(a,i),a}void 0!==(n=(function(){return t}).call(t,r,t,e))&&(e.exports=n)}()},Sn6X:function(e,t,r){var n;!function(t){"use strict";var debug=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function FastDom(){this.reads=[],this.writes=[],this.raf=i.bind(t),debug("initialized",this)}function scheduleFlush(e){e.scheduled||(e.scheduled=!0,e.raf(flush.bind(null,e)),debug("flush scheduled"))}function flush(e){debug("flush");var t,r=e.writes,n=e.reads;try{debug("flushing reads",n.length),e.runTasks(n),debug("flushing writes",r.length),e.runTasks(r)}catch(e){t=e}if(e.scheduled=!1,(n.length||r.length)&&scheduleFlush(e),t){if(debug("task errored",t.message),e.catch)e.catch(t);else throw t}}function remove(e,t){var r=e.indexOf(t);return!!~r&&!!e.splice(r,1)}FastDom.prototype={constructor:FastDom,runTasks:function(e){var t;for(debug("run tasks");t=e.shift();)t()},measure:function(e,t){debug("measure");var r=t?e.bind(t):e;return this.reads.push(r),scheduleFlush(this),r},mutate:function(e,t){debug("mutate");var r=t?e.bind(t):e;return this.writes.push(r),scheduleFlush(this),r},clear:function(e){return debug("clear",e),remove(this.reads,e)||remove(this.writes,e)},extend:function(e){if(debug("extend",e),"object"!=typeof e)throw Error("expected object");var t=Object.create(this);return function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};var o=t.fastdom=t.fastdom||new FastDom;void 0!==(n=(function(){return o}).call(o,r,o,e))&&(e.exports=n)}("undefined"!=typeof window?window:void 0!==this?this:globalThis)},yVya:function(e,t,r){"use strict";r.d(t,{A:function(){return function flattenChildren(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=[]),n.Children.toArray(e).reduce(function(e,o,s){return(0,i.isFragment)(o)?e.push.apply(e,flattenChildren(o.props.children,t+1,r.concat(o.key||s))):(0,n.isValidElement)(o)?e.push((0,n.cloneElement)(o,{key:r.concat(String(o.key)).join(".")})):("string"==typeof o||"number"==typeof o)&&e.push(o),e},[])}}});var n=r("+OUp"),i=r("Gqzy")},"+Vfk":function(e,t){"use strict";/** * @license React * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy");Symbol.for("react.offscreen"),Symbol.for("react.module.reference"),t.isFragment=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case o:case d:case f:return e;default:switch(e=e&&e.$$typeof){case c:case u:case l:case b:case h:case a:return e;default:return t}}case n:return t}}}(e)===i}},Gqzy:function(e,t,r){"use strict";e.exports=r("+Vfk")},"O/o9":function(e,t,r){"use strict";r.d(t,{Wx:function(){return useInView}});var n=r("+OUp"),i=Object.defineProperty,o=new Map,s=new WeakMap,a=0,u=void 0;function useInView({threshold:e,delay:t,trackVisibility:r,rootMargin:i,root:c,triggerOnce:l,skip:d,initialInView:f,fallbackInView:h,onChange:b}={}){var m;let[g,y]=n.useState(null),v=n.useRef(),[p,B]=n.useState({inView:!!f,entry:void 0});v.current=b,n.useEffect(()=>{let n;if(!d&&g)return n=function(e,t,r={},n=u){if(void 0===window.IntersectionObserver&&void 0!==n){let i=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}let{id:i,observer:c,elements:l}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?(r=e.root)?(s.has(r)||(a+=1,s.set(r,a.toString())),s.get(r)):"0":e[t]}`}).toString(),r=o.get(t);if(!r){let n;let i=new Map,s=new IntersectionObserver(t=>{t.forEach(t=>{var r;let o=t.isIntersecting&&n.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(r=i.get(t.target))||r.forEach(e=>{e(o,t)})})},e);n=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:s,elements:i},o.set(t,r)}return r}(r),d=l.get(e)||[];return l.has(e)||l.set(e,d),d.push(t),c.observe(e),function(){d.splice(d.indexOf(t),1),0===d.length&&(l.delete(e),c.unobserve(e)),0===l.size&&(c.disconnect(),o.delete(i))}}(g,(e,t)=>{B({inView:e,entry:t}),v.current&&v.current(e,t),t.isIntersecting&&l&&n&&(n(),n=void 0)},{root:c,rootMargin:i,threshold:e,trackVisibility:r,delay:t},h),()=>{n&&n()}},[Array.isArray(e)?e.toString():e,g,c,i,l,d,r,h,t]);let A=null==(m=p.entry)?void 0:m.target,w=n.useRef();g||!A||l||d||w.current===A||(w.current=A,B({inView:!!f,entry:void 0}));let O=[y,p.inView,p.entry];return O.ref=O[0],O.inView=O[1],O.entry=O[2],O}n.Component}}]);