@hhgtech/hhg-components 1.21.66 → 1.21.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/build/babyGrowth.js +1 -1
  2. package/build/care.js +1 -1
  3. package/build/components/atoms/authorBadge/index.d.ts +11 -0
  4. package/build/components/atoms/authorBadge/index.styled.d.ts +1 -0
  5. package/build/components/atoms/babyGrowthChart/index.d.ts +1 -1
  6. package/build/components/atoms/index.d.ts +2 -0
  7. package/build/components.js +1 -1
  8. package/build/esm/babyGrowth.js +1 -1
  9. package/build/esm/care.js +1 -1
  10. package/build/esm/components.js +1 -1
  11. package/build/esm/index-24a9e671.js +1 -0
  12. package/build/esm/index-71c42246.js +1 -0
  13. package/build/esm/index-788cb7c8.js +1 -0
  14. package/build/esm/index-7e2b8a87.js +1 -0
  15. package/build/esm/index-b6575475.js +1 -0
  16. package/build/esm/index.js +1 -1
  17. package/build/esm/index.styled-48386363.js +1 -0
  18. package/build/esm/index.styled-66f12014.js +1 -0
  19. package/build/esm/mantine.js +1 -1
  20. package/build/esm/navigation.js +1 -1
  21. package/build/esm/theme-2bf6d1d3.js +1 -0
  22. package/build/esm/together.js +1 -1
  23. package/build/esm/types-7b2c62c9.js +1 -0
  24. package/build/esm/types-f9648df4.js +1 -0
  25. package/build/esm/useOutsideClick-3faddcd8.js +1 -0
  26. package/build/index-0ae67c7d.js +1 -0
  27. package/build/index-27945654.js +1 -0
  28. package/build/index-62048f19.js +1 -0
  29. package/build/{index-8b1987d5.js → index-740c6f7b.js} +1 -1
  30. package/build/index-fcf59317.js +1 -0
  31. package/build/index.js +1 -1
  32. package/build/{index.styled-27ff3b4a.js → index.styled-213d989f.js} +1 -1
  33. package/build/index.styled-356306df.js +1 -0
  34. package/build/mantine.js +1 -1
  35. package/build/navigation.js +1 -1
  36. package/build/{theme-6fd790c0.js → theme-f97a1fea.js} +1 -1
  37. package/build/together/components/molecules/cardAuthor/index.d.ts +0 -3
  38. package/build/together/components/molecules/index.d.ts +0 -1
  39. package/build/together.js +1 -1
  40. package/build/types-6873704a.js +1 -0
  41. package/build/types-f52d9375.js +1 -0
  42. package/build/useOutsideClick-9a358ff5.js +1 -0
  43. package/package.json +1 -1
  44. package/build/esm/index-012ca6e1.js +0 -1
  45. package/build/esm/index-588deadc.js +0 -1
  46. package/build/esm/index-610bb13c.js +0 -1
  47. package/build/esm/index-662016a1.js +0 -1
  48. package/build/esm/index-80c700a9.js +0 -1
  49. package/build/esm/index-c351a445.js +0 -1
  50. package/build/esm/index-c4d6f618.js +0 -1
  51. package/build/esm/index-eab6fcc2.js +0 -1
  52. package/build/esm/index.styled-520ccc61.js +0 -1
  53. package/build/esm/theme-508eb8b9.js +0 -1
  54. package/build/esm/types-11f30a38.js +0 -1
  55. package/build/esm/types-46861be0.js +0 -1
  56. package/build/esm/useOutsideClick-6004483a.js +0 -1
  57. package/build/index-1fcdf9ee.js +0 -1
  58. package/build/index-3422cf26.js +0 -1
  59. package/build/index-432eb60f.js +0 -1
  60. package/build/index-47c276bb.js +0 -1
  61. package/build/index-4f1436b1.js +0 -1
  62. package/build/index-8e49874a.js +0 -1
  63. package/build/index-b40a22ab.js +0 -1
  64. package/build/types-7b4a0dbd.js +0 -1
  65. package/build/types-fcbefc53.js +0 -1
  66. package/build/useOutsideClick-528bfd6c.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-4f1436b1.js"),t=require("react"),a=require("./Locale-11b51016.js"),r=require("./theme-696d81a9.js"),l=require("./index.styled-27ff3b4a.js"),n=require("date-fns"),o=require("./useTranslations-62f5bf8f.js");require("./gAssets.js");var i=require("./index-3422cf26.js"),d=require("./screenSizeContext-8f86eb30.js");require("react-range"),require("@mantine/core"),require("styled-components"),require("./index-d28c27ca.js"),require("./isProduction-32e6a55a.js"),require("lodash/debounce");var C=require("./useOutsideClick-528bfd6c.js"),c=require("./localizeNumberFormat-d34a738e.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./tslib.es6-e6f346c4.js"),require("./index-8b1987d5.js"),require("./translationsContext-0cab5713.js"),require("string-format"),require("./index-432eb60f.js"),require("./useScrollbarSize-586f6706.js"),require("react-dom"),require("recharts"),require("lodash"),require("vanilla-lazyload");var u=s(t),m=function(a){var n=a.name,i=a.onClose,d=a.onEdit,c=a.onSwitch,s=a.onAdd,m=a.onRemove,f=o.useTranslations().t,h=t.useRef();return C.useOutsideClick(h,i),u.default.createElement("div",{ref:h},u.default.createElement(e.StyledChildCardMenu,{width:250},u.default.createElement(l.Menu.Item,{onClick:d,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M12.7812 1.83301C12.2987 1.83301 11.8162 2.01676 11.4479 2.38509L10.6667 3.16634L13.3333 5.83301L14.1146 5.05176C14.8506 4.31576 14.8506 3.12176 14.1146 2.38509C13.7463 2.01676 13.2638 1.83301 12.7812 1.83301ZM9.66667 4.16634L2 11.833V14.4997H4.66667L12.3333 6.83301L9.66667 4.16634Z",fill:"#595959"}))},u.default.createElement(l.Text,{size:"p2",color:r.theme.colors.gray800},f("childCard.menu.edit",{name:n}))),u.default.createElement(l.Menu.Item,{onClick:c,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M8 2.5C4.9478 2.5 2.4204 4.79359 2.05078 7.7513C2.03763 7.83928 2.04222 7.929 2.06428 8.01518C2.08634 8.10136 2.12542 8.18226 2.17922 8.2531C2.23303 8.32394 2.30046 8.3833 2.37756 8.42768C2.45465 8.47206 2.53985 8.50057 2.62813 8.51152C2.71642 8.52247 2.806 8.51564 2.8916 8.49143C2.9772 8.46723 3.05709 8.42614 3.12657 8.37059C3.19605 8.31503 3.2537 8.24613 3.29615 8.16795C3.33859 8.08978 3.36496 8.00389 3.3737 7.91536C3.66141 5.61307 5.61354 3.83333 8 3.83333C9.34288 3.83333 10.5434 4.39987 11.3919 5.30339L10.0977 6.59766C9.96766 6.72766 9.96766 6.93901 10.0977 7.06901C10.1623 7.13434 10.248 7.16667 10.3333 7.16667H13.3333C13.5101 7.16667 13.6797 7.09643 13.8047 6.9714C13.9298 6.84638 14 6.67681 14 6.5V3.5C14 3.41467 13.967 3.32966 13.9023 3.26432C13.7723 3.13432 13.561 3.13432 13.431 3.26432L12.3359 4.35938C11.2437 3.21415 9.7037 2.5 8 2.5ZM13.2943 8.49089C13.1292 8.48959 12.9695 8.54959 12.8461 8.65928C12.7227 8.76896 12.6444 8.92053 12.6263 9.08464C12.3386 11.3869 10.3865 13.1667 8 13.1667C6.65713 13.1667 5.45884 12.5994 4.60938 11.6953L5.90234 10.4023C6.03234 10.2723 6.03234 10.061 5.90234 9.93099C5.83768 9.86566 5.752 9.83333 5.66667 9.83333H2.66667C2.48986 9.83333 2.32029 9.90357 2.19526 10.0286C2.07024 10.1536 2 10.3232 2 10.5V13.5C2 13.5853 2.03299 13.6703 2.09766 13.7357C2.22766 13.8657 2.43901 13.8657 2.56901 13.7357L3.66536 12.6393C4.75711 13.7836 6.29696 14.5 8 14.5C11.0522 14.5 13.5796 12.2064 13.9492 9.2487C13.9622 9.1548 13.955 9.05922 13.928 8.96833C13.9011 8.87745 13.8552 8.79334 13.7932 8.72163C13.7312 8.64991 13.6546 8.59224 13.5686 8.55245C13.4826 8.51266 13.3891 8.49167 13.2943 8.49089Z",fill:"#595959"}))},u.default.createElement(l.Text,{size:"p2",color:r.theme.colors.gray800},f("childCard.menu.switch"))),u.default.createElement(l.Menu.Item,{onClick:s,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9564 8.56545C15.7745 7.46727 14.9673 6.57273 13.9127 6.26C13.5273 5.44545 12.9818 4.73273 12.32 4.14364C11.1709 3.11818 9.65818 2.5 8 2.5C6.34182 2.5 4.82909 3.11818 3.68 4.14364C3.01091 4.73273 2.46545 5.45273 2.08727 6.26C1.03273 6.57273 0.225455 7.46 0.0436364 8.56545C0.0145455 8.71818 0 8.87818 0 9.04545C0 9.21273 0.0145455 9.37273 0.0436364 9.52545C0.225455 10.6236 1.03273 11.5182 2.08727 11.8309C2.46545 12.6382 3.01091 13.3509 3.66545 13.9327C4.81455 14.9655 6.33455 15.5909 8 15.5909C9.66545 15.5909 11.1855 14.9655 12.3418 13.9327C12.9964 13.3509 13.5418 12.6309 13.92 11.8309C14.9673 11.5182 15.7745 10.6309 15.9564 9.52545C15.9855 9.37273 16 9.21273 16 9.04545C16 8.87818 15.9855 8.71818 15.9564 8.56545ZM6.18182 7.04545C5.67974 7.04545 5.27273 7.45247 5.27273 7.95455C5.27273 8.45662 5.67974 8.86364 6.18182 8.86364C6.6839 8.86364 7.09091 8.45662 7.09091 7.95455C7.09091 7.45247 6.6839 7.04545 6.18182 7.04545ZM9.81818 7.04545C9.3161 7.04545 8.90909 7.45247 8.90909 7.95455C8.90909 8.45662 9.3161 8.86364 9.81818 8.86364C10.3203 8.86364 10.7273 8.45662 10.7273 7.95455C10.7273 7.45247 10.3203 7.04545 9.81818 7.04545ZM5.01821 10.5H10.9818C11.1128 10.5 11.2073 10.6455 11.1491 10.7691C10.5455 11.9109 9.36002 12.6818 8.00002 12.6818C6.64002 12.6818 5.45457 11.9109 4.85093 10.7691C4.78548 10.6455 4.88002 10.5 5.01821 10.5ZM12.9538 10.4875C12.9991 10.4938 13.0435 10.5 13.0909 10.5C13.8909 10.5 14.5455 9.84545 14.5455 9.04545C14.5455 8.24545 13.8909 7.59091 13.0909 7.59091C13.0435 7.59091 12.9991 7.5971 12.9538 7.60343C12.9297 7.60679 12.9053 7.6102 12.88 7.61273C12.7345 7.12545 12.5236 6.67455 12.2545 6.26C11.3455 4.87091 9.78182 3.95455 8 3.95455C6.21818 3.95455 4.65455 4.87091 3.74545 6.26C3.47636 6.67455 3.26545 7.12545 3.12 7.61273C3.09473 7.6102 3.07033 7.60679 3.0462 7.60343C3.0009 7.5971 2.95654 7.59091 2.90909 7.59091C2.10909 7.59091 1.45455 8.24545 1.45455 9.04545C1.45455 9.84545 2.10909 10.5 2.90909 10.5C2.95654 10.5 3.0009 10.4938 3.0462 10.4875C3.07033 10.4841 3.09473 10.4807 3.12 10.4782C3.26545 10.9655 3.47636 11.4164 3.74545 11.8309C4.65455 13.22 6.21818 14.1364 8 14.1364C9.78182 14.1364 11.3455 13.22 12.2545 11.8309C12.5236 11.4164 12.7345 10.9655 12.88 10.4782C12.9053 10.4807 12.9297 10.4841 12.9538 10.4875Z",fill:"#595959"}),u.default.createElement("path",{d:"M2.5 2V1C2.5 0.725 2.275 0.5 2 0.5C1.725 0.5 1.5 0.725 1.5 1V2H0.5C0.225 2 0 2.225 0 2.5C0 2.775 0.225 3 0.5 3H1.5V4C1.5 4.275 1.725 4.5 2 4.5C2.275 4.5 2.5 4.275 2.5 4V3H3.5C3.775 3 4 2.775 4 2.5C4 2.225 3.775 2 3.5 2H2.5Z",fill:"#595959"}))},u.default.createElement(l.Text,{size:"p2",color:r.theme.colors.gray800},f("childCard.menu.add"))),u.default.createElement(l.Menu.Item,{onClick:m,icon:u.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M6.66699 1.83301L6.00033 2.49967H3.33366C2.93366 2.49967 2.66699 2.76634 2.66699 3.16634C2.66699 3.56634 2.93366 3.83301 3.33366 3.83301H4.66699H11.3337H12.667C13.067 3.83301 13.3337 3.56634 13.3337 3.16634C13.3337 2.76634 13.067 2.49967 12.667 2.49967H10.0003L9.33366 1.83301H6.66699ZM3.33366 5.16634V13.833C3.33366 14.5663 3.93366 15.1663 4.66699 15.1663H11.3337C12.067 15.1663 12.667 14.5663 12.667 13.833V5.16634H3.33366ZM6.00033 6.49967C6.40033 6.49967 6.66699 6.76634 6.66699 7.16634V13.1663C6.66699 13.5663 6.40033 13.833 6.00033 13.833C5.60033 13.833 5.33366 13.5663 5.33366 13.1663V7.16634C5.33366 6.76634 5.60033 6.49967 6.00033 6.49967ZM10.0003 6.49967C10.4003 6.49967 10.667 6.76634 10.667 7.16634V13.1663C10.667 13.5663 10.4003 13.833 10.0003 13.833C9.60033 13.833 9.33366 13.5663 9.33366 13.1663V7.16634C9.33366 6.76634 9.60033 6.49967 10.0003 6.49967Z",fill:"#F44D2C"}))},u.default.createElement(l.Text,{size:"p2",color:r.theme.colors.red600},f("childCard.menu.remove",{name:n})))))},f=function(e,t){if(e)if(e.year<1){if(0===e.month)switch(e.week){case 0:case 1:return t("childCard.age.oneWeek");default:return t("childCard.age.week",{weeks:e.week})}if(1===e.month)return t("childCard.age.oneMonth");if(e.month>1)return t("childCard.age.months",{month:e.month})}else{if(1===e.year)return t("childCard.age.oneYear");if(0===e.month)return t("childCard.age.yearNoMonth",{year:e.year});if(e.month>0)return t("childCard.age.yearMonth",{year:e.year,month:e.month})}},h=function(e,t){return e&&"NaN"!==e?e+" "+(t||""):"--"};exports.BabyGrowthChart=e.BabyGrowthChart,exports.BabyGrowthChartPercentile=e.BabyGrowthChartPercentile,exports.BabyGrowthChartZScore=e.BabyGrowthChartZScore,exports.BabyGrowthChooseProfileDrawer=e.BabyGrowthChooseProfileDrawer,exports.BabyGrowthGender=e.BabyGrowthGender,exports.BabyGrowthProfileRadio=e.BabyGrowthProfileRadio,exports.BabyGrowthSwitch=e.BabyGrowthSwitch,Object.defineProperty(exports,"BabyGrowthSwitchChart",{enumerable:!0,get:function(){return e.BabyGrowthSwitchChart}}),exports.BabyGrowthTooltip=e.BabyGrowthTooltip,exports.LABELS_PERCENTILE=e.LABELS_PERCENTILE,exports.LABELS_Z_SCORE=e.LABELS_Z_SCORE,exports.divideChartData=e.divideChartData,exports.generateGrowthChart=e.generateGrowthChart,exports.generateXAxisTicks=e.generateXAxisTicks,exports.getAxisYDomain=e.getAxisYDomain,exports.paintAxis=e.paintAxis,exports.refineDataWithDot=e.refineDataWithDot,exports.refineDataWithLine=e.refineDataWithLine,exports.transformDataToChart=e.transformDataToChart,exports.BabyGrowthLegend=function(t){var n=t.legends,o=t.locale;return u.default.createElement(e.StyledBabyGrowthLegend,null,n.map((function(t,n){return u.default.createElement(e.StyledLegend,{key:n},u.default.createElement("span",{className:"dot",style:{backgroundColor:t.color}}),u.default.createElement(l.Text,{size:"n1",color:r.theme.colors.gray800},o===a.LOCALE.Indonesia?t["z-score"]:t.text))})))},exports.BabyGrowthRecord=function(t){var i=t.measurementDate,d=void 0===i?new Date:i,C=t.weight,s=t.height,m=t.head,E=t.onEdit,w=t.birthday,g=t.dateFormat,y=void 0===g?"dd/MM/yyyy":g,p=t.locale;void 0===p&&a.LOCALE.PhilippinesEnglish;var L=o.useTranslations().t;return u.default.createElement(e.StyledBabyGrowthRecord,{onClick:E},u.default.createElement("div",{className:"time"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M5.64421 0.666016C5.27621 0.666016 4.97754 0.964682 4.97754 1.33268V1.99935H4.31087C3.57754 1.99935 2.97754 2.59935 2.97754 3.33268V12.666C2.97754 13.3993 3.57754 13.9993 4.31087 13.9993H13.6442C14.3775 13.9993 14.9775 13.3993 14.9775 12.666V3.33268C14.9775 2.59935 14.3775 1.99935 13.6442 1.99935H12.9775V1.33268C12.9775 0.964682 12.6789 0.666016 12.3109 0.666016C11.9429 0.666016 11.6442 0.964682 11.6442 1.33268V1.99935H6.31087V1.33268C6.31087 0.964682 6.01221 0.666016 5.64421 0.666016ZM4.31087 5.33268H13.6442V11.9993C13.6442 12.3673 13.3455 12.666 12.9775 12.666H4.97754C4.60954 12.666 4.31087 12.3673 4.31087 11.9993V5.33268Z",fill:"#8C8C8C"})),u.default.createElement(l.Text,{size:"p3",color:r.theme.colors.gray600},"".concat(n.format(d,y)," (").concat(f(c.ageGenerate(w,d),L),")")),u.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"edit-button"},u.default.createElement("path",{d:"M12.7721 1.33398C12.2911 1.33398 11.8102 1.51773 11.443 1.88607L10.6643 2.66732L13.3224 5.33398L14.1011 4.55273C14.8348 3.81673 14.8348 2.62273 14.1011 1.88607C13.734 1.51773 13.253 1.33398 12.7721 1.33398ZM9.66748 3.66732L2.02539 11.334V14.0007H4.68351L12.3256 6.33398L9.66748 3.66732Z",fill:"#8C8C8C"}))),u.default.createElement("div",{className:"record"},u.default.createElement("div",{className:"record-item"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("path",{d:"M8.44401 9.86602C8.44401 9.57146 8.68279 9.33268 8.97734 9.33268C9.2719 9.33268 9.51068 9.57146 9.51068 9.86602V11.466C9.51068 11.7606 9.2719 11.9993 8.97734 11.9993C8.68279 11.9993 8.44401 11.7606 8.44401 11.466V9.86602Z",fill:"#8C8C8C"}),u.default.createElement("path",{d:"M8.17595 3.05319C7.96767 3.26147 7.96767 3.59916 8.17595 3.80744L8.83592 4.46741C9.0442 4.67569 9.38189 4.67569 9.59017 4.46741C9.79844 4.25913 9.79844 3.92144 9.59017 3.71316L8.9302 3.05319C8.72192 2.84491 8.38423 2.84492 8.17595 3.05319Z",fill:"#8C8C8C"}),u.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2941 3.66435C12.1261 1.98071 10.7053 0.666016 8.97738 0.666016C7.2495 0.666016 5.82868 1.9807 5.66067 3.66434L3.67054 3.86336C2.92499 3.93791 2.38724 4.61197 2.48017 5.35545L3.498 13.4981C3.5814 14.1653 4.1486 14.666 4.82104 14.666H13.1336C13.806 14.666 14.3732 14.1653 14.4567 13.4981L15.4745 5.35545C15.5674 4.61197 15.0297 3.93791 14.2841 3.86336L12.2941 3.66435ZM12.1607 4.991C11.7386 6.34768 10.473 7.33268 8.97738 7.33268C7.48176 7.33268 6.2162 6.34767 5.79403 4.99099L3.80321 5.19007L4.82104 13.3327L13.1336 13.3327L14.1514 5.19007L12.1607 4.991ZM10.9774 3.99935C10.9774 5.10392 10.0819 5.99935 8.97738 5.99935C7.87281 5.99935 6.97738 5.10392 6.97738 3.99935C6.97738 2.89478 7.87281 1.99935 8.97738 1.99935C10.0819 1.99935 10.9774 2.89478 10.9774 3.99935Z",fill:"#8C8C8C"})),u.default.createElement(l.Text,{size:"s3",color:r.theme.colors.gray800,type:"semiBold"},h(c.localizeNumberFormat(C),"kg"))),u.default.createElement("div",{className:"record-item"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("g",{clipPath:"url(#clip0_855_82991)"},u.default.createElement("path",{d:"M12.6055 13.9993L12.6055 1.99935C12.6055 1.26602 12.0055 0.666016 11.2721 0.666016L5.9388 0.666015C5.20547 0.666015 4.60547 1.26602 4.60547 1.99935L4.60547 13.9993C4.60547 14.7327 5.20547 15.3327 5.9388 15.3327L11.2721 15.3327C12.0055 15.3327 12.6055 14.7327 12.6055 13.9993ZM5.9388 13.9993L5.9388 1.99935L11.2721 1.99935L11.2721 3.33268L8.60547 3.33268L8.60547 4.66602L11.2721 4.66602L11.2721 5.99935L8.60547 5.99935L8.60547 7.33268L11.2721 7.33268L11.2721 8.66602L8.60547 8.66601L8.60547 9.99935L11.2721 9.99935L11.2721 11.3327L8.60547 11.3327L8.60547 12.666L11.2721 12.666L11.2721 13.9993L5.9388 13.9993Z",fill:"#8C8C8C"})),u.default.createElement("defs",null,u.default.createElement("clipPath",{id:"clip0_855_82991"},u.default.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(16.6055) rotate(90)"})))),u.default.createElement(l.Text,{size:"s3",color:r.theme.colors.gray800,type:"semiBold"},h(c.localizeNumberFormat(s),"cm"))),u.default.createElement("div",{className:"record-item"},u.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u.default.createElement("g",{clipPath:"url(#clip0_855_82994)"},u.default.createElement("path",{d:"M9.90072 7.83268C10.361 7.83268 10.734 7.45959 10.734 6.99935C10.734 6.53911 10.361 6.16602 9.90072 6.16602C9.44048 6.16602 9.06738 6.53911 9.06738 6.99935C9.06738 7.45959 9.44048 7.83268 9.90072 7.83268Z",fill:"#8C8C8C"}),u.default.createElement("path",{d:"M6.56771 7.83268C7.02795 7.83268 7.40104 7.45959 7.40104 6.99935C7.40104 6.53911 7.02795 6.16602 6.56771 6.16602C6.10747 6.16602 5.73438 6.53911 5.73438 6.99935C5.73438 7.45959 6.10747 7.83268 6.56771 7.83268Z",fill:"#8C8C8C"}),u.default.createElement("path",{d:"M15.528 7.56C15.3614 6.55333 14.6214 5.73333 13.6547 5.44667C13.3014 4.7 12.8014 4.04667 12.1947 3.50667C11.1414 2.56667 9.7547 2 8.2347 2C6.7147 2 5.32803 2.56667 4.2747 3.50667C3.66137 4.04667 3.16137 4.70667 2.8147 5.44667C1.84803 5.73333 1.10803 6.54667 0.941367 7.56C0.9147 7.7 0.901367 7.84667 0.901367 8C0.901367 8.15333 0.9147 8.3 0.941367 8.44C1.10803 9.44667 1.84803 10.2667 2.8147 10.5533C3.16137 11.2933 3.66137 11.9467 4.26137 12.48C5.3147 13.4267 6.70803 14 8.2347 14C9.76137 14 11.1547 13.4267 12.2147 12.48C12.8147 11.9467 13.3147 11.2867 13.6614 10.5533C14.6214 10.2667 15.3614 9.45333 15.528 8.44C15.5547 8.3 15.568 8.15333 15.568 8C15.568 7.84667 15.5547 7.7 15.528 7.56ZM12.9014 9.33333C12.8347 9.33333 12.7747 9.32 12.708 9.31333C12.5747 9.76 12.3814 10.1733 12.1347 10.5533C11.3014 11.8267 9.86803 12.6667 8.2347 12.6667C6.60137 12.6667 5.16803 11.8267 4.3347 10.5533C4.08803 10.1733 3.8947 9.76 3.76137 9.31333C3.6947 9.32 3.6347 9.33333 3.56803 9.33333C2.8347 9.33333 2.2347 8.73333 2.2347 8C2.2347 7.26667 2.8347 6.66667 3.56803 6.66667C3.6347 6.66667 3.6947 6.68 3.76137 6.68667C3.8947 6.24 4.08803 5.82667 4.3347 5.44667C5.16803 4.17333 6.60137 3.33333 8.2347 3.33333C9.86803 3.33333 11.3014 4.17333 12.1347 5.44667C12.3814 5.82667 12.5747 6.24 12.708 6.68667C12.7747 6.68 12.8347 6.66667 12.9014 6.66667C13.6347 6.66667 14.2347 7.26667 14.2347 8C14.2347 8.73333 13.6347 9.33333 12.9014 9.33333ZM8.2347 11.3333C9.5747 11.3333 10.728 10.5133 11.2347 9.33333H5.2347C5.74137 10.5133 6.8947 11.3333 8.2347 11.3333Z",fill:"#8C8C8C"})),u.default.createElement("defs",null,u.default.createElement("clipPath",{id:"clip0_855_82994"},u.default.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.234375)"})))),u.default.createElement(l.Text,{size:"s3",color:r.theme.colors.gray800,type:"semiBold"},h(c.localizeNumberFormat(m),"cm")))))},exports.ChildCard=function(n){var C=n.name,c=n.gender,s=n.age,h=n.isLoggedIn,E=void 0!==h&&h,w=n.showMenu,g=void 0!==w&&w,y=n.onEdit,p=n.onSwitch,L=n.onAdd,x=n.onRemove,v=n.className,b=n.siteType,B=o.useTranslations().t,M=t.useState(!1),G=M[0],Z=M[1],q="marryBaby"===b;return u.default.createElement(e.StyledChildCard,{className:v,"data-theme":b},q?u.default.createElement(u.default.Fragment,null,u.default.createElement("div",{"data-testid":"gender"},c===a.Gender.Boy?u.default.createElement(e.Icon.BabyBoyMB,{"data-testid":"boy",id:"boy"}):u.default.createElement(e.Icon.BabyGirlMB,{"data-testid":"girl",id:"girl"})),u.default.createElement("div",{className:"information"},u.default.createElement(e.MarryBabyText,{type:"subtitle-1",color:r.theme.mbColors.dark},d.startCase(C)||B("childCard.noName")),u.default.createElement("div",{className:"detail"},u.default.createElement("div",null,c===a.Gender.Boy?u.default.createElement(e.Icon.GenderBoy,null):u.default.createElement(e.Icon.GenderGirl,null),u.default.createElement(e.MarryBabyText,{type:"bodytext-2",color:r.theme.mbColors.gray},c)),u.default.createElement("div",null,u.default.createElement(e.Icon.Calendar,{size:16}),s&&u.default.createElement(e.MarryBabyText,{type:"bodytext-2",color:r.theme.mbColors.gray},f(s,B)))))):u.default.createElement(u.default.Fragment,null,u.default.createElement("div",{"data-testid":"gender"},c===a.Gender.Boy?u.default.createElement(e.Icon.Boy,{"data-testid":"boy",id:"boy"}):u.default.createElement(e.Icon.Girl,{"data-testid":"girl",id:"girl"})),u.default.createElement("div",{className:"information"},u.default.createElement(i.Heading,{tag:"h5",fontWeight:"bold",color:r.theme.colors.gray800},d.startCase(C)||B("childCard.noName")),u.default.createElement("div",{className:"detail"},u.default.createElement("div",null,c===a.Gender.Boy?u.default.createElement(e.Icon.GenderBoy,null):u.default.createElement(e.Icon.GenderGirl,null),u.default.createElement(l.Text,{size:"p3",color:r.theme.colors.gray800,style:{textTransform:"capitalize"}},c)),u.default.createElement("div",null,u.default.createElement(e.Icon.Calendar,{size:16}),s&&u.default.createElement(l.Text,{size:"p3",color:r.theme.colors.gray800},f(s,B)))))),g&&E&&u.default.createElement(e.StyledOption,null,u.default.createElement(e.Icon.Kebab,{onClick:function(){return Z((function(e){return!e}))}}),G&&u.default.createElement(m,{name:C,onClose:function(){return Z(!1)},onEdit:function(){Z(!1),y()},onSwitch:function(){Z(!1),p()},onAdd:function(){Z(!1),L()},onRemove:function(){Z(!1),x()}})))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-62048f19.js"),t=require("react"),a=require("./Locale-11b51016.js"),r=require("./theme-696d81a9.js"),l=require("./index.styled-213d989f.js"),n=require("date-fns"),o=require("./useTranslations-62f5bf8f.js");require("./gAssets.js");var i=require("./screenSizeContext-8f86eb30.js");require("react-range"),require("@mantine/core"),require("styled-components"),require("./index-d28c27ca.js"),require("./isProduction-32e6a55a.js"),require("lodash/debounce");var d=require("./useOutsideClick-9a358ff5.js"),C=require("./localizeNumberFormat-d34a738e.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./tslib.es6-e6f346c4.js"),require("./index-740c6f7b.js"),require("./translationsContext-0cab5713.js"),require("string-format"),require("./useScrollbarSize-586f6706.js"),require("react-dom"),require("recharts"),require("lodash"),require("vanilla-lazyload");var s=c(t),u=function(a){var n=a.name,i=a.onClose,C=a.onEdit,c=a.onSwitch,u=a.onAdd,m=a.onRemove,f=o.useTranslations().t,h=t.useRef();return d.useOutsideClick(h,i),s.default.createElement("div",{ref:h},s.default.createElement(e.StyledChildCardMenu,{width:250},s.default.createElement(l.Menu.Item,{onClick:C,icon:s.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("path",{d:"M12.7812 1.83301C12.2987 1.83301 11.8162 2.01676 11.4479 2.38509L10.6667 3.16634L13.3333 5.83301L14.1146 5.05176C14.8506 4.31576 14.8506 3.12176 14.1146 2.38509C13.7463 2.01676 13.2638 1.83301 12.7812 1.83301ZM9.66667 4.16634L2 11.833V14.4997H4.66667L12.3333 6.83301L9.66667 4.16634Z",fill:"#595959"}))},s.default.createElement(l.Text,{size:"p2",color:r.theme.colors.gray800},f("childCard.menu.edit",{name:n}))),s.default.createElement(l.Menu.Item,{onClick:c,icon:s.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("path",{d:"M8 2.5C4.9478 2.5 2.4204 4.79359 2.05078 7.7513C2.03763 7.83928 2.04222 7.929 2.06428 8.01518C2.08634 8.10136 2.12542 8.18226 2.17922 8.2531C2.23303 8.32394 2.30046 8.3833 2.37756 8.42768C2.45465 8.47206 2.53985 8.50057 2.62813 8.51152C2.71642 8.52247 2.806 8.51564 2.8916 8.49143C2.9772 8.46723 3.05709 8.42614 3.12657 8.37059C3.19605 8.31503 3.2537 8.24613 3.29615 8.16795C3.33859 8.08978 3.36496 8.00389 3.3737 7.91536C3.66141 5.61307 5.61354 3.83333 8 3.83333C9.34288 3.83333 10.5434 4.39987 11.3919 5.30339L10.0977 6.59766C9.96766 6.72766 9.96766 6.93901 10.0977 7.06901C10.1623 7.13434 10.248 7.16667 10.3333 7.16667H13.3333C13.5101 7.16667 13.6797 7.09643 13.8047 6.9714C13.9298 6.84638 14 6.67681 14 6.5V3.5C14 3.41467 13.967 3.32966 13.9023 3.26432C13.7723 3.13432 13.561 3.13432 13.431 3.26432L12.3359 4.35938C11.2437 3.21415 9.7037 2.5 8 2.5ZM13.2943 8.49089C13.1292 8.48959 12.9695 8.54959 12.8461 8.65928C12.7227 8.76896 12.6444 8.92053 12.6263 9.08464C12.3386 11.3869 10.3865 13.1667 8 13.1667C6.65713 13.1667 5.45884 12.5994 4.60938 11.6953L5.90234 10.4023C6.03234 10.2723 6.03234 10.061 5.90234 9.93099C5.83768 9.86566 5.752 9.83333 5.66667 9.83333H2.66667C2.48986 9.83333 2.32029 9.90357 2.19526 10.0286C2.07024 10.1536 2 10.3232 2 10.5V13.5C2 13.5853 2.03299 13.6703 2.09766 13.7357C2.22766 13.8657 2.43901 13.8657 2.56901 13.7357L3.66536 12.6393C4.75711 13.7836 6.29696 14.5 8 14.5C11.0522 14.5 13.5796 12.2064 13.9492 9.2487C13.9622 9.1548 13.955 9.05922 13.928 8.96833C13.9011 8.87745 13.8552 8.79334 13.7932 8.72163C13.7312 8.64991 13.6546 8.59224 13.5686 8.55245C13.4826 8.51266 13.3891 8.49167 13.2943 8.49089Z",fill:"#595959"}))},s.default.createElement(l.Text,{size:"p2",color:r.theme.colors.gray800},f("childCard.menu.switch"))),s.default.createElement(l.Menu.Item,{onClick:u,icon:s.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9564 8.56545C15.7745 7.46727 14.9673 6.57273 13.9127 6.26C13.5273 5.44545 12.9818 4.73273 12.32 4.14364C11.1709 3.11818 9.65818 2.5 8 2.5C6.34182 2.5 4.82909 3.11818 3.68 4.14364C3.01091 4.73273 2.46545 5.45273 2.08727 6.26C1.03273 6.57273 0.225455 7.46 0.0436364 8.56545C0.0145455 8.71818 0 8.87818 0 9.04545C0 9.21273 0.0145455 9.37273 0.0436364 9.52545C0.225455 10.6236 1.03273 11.5182 2.08727 11.8309C2.46545 12.6382 3.01091 13.3509 3.66545 13.9327C4.81455 14.9655 6.33455 15.5909 8 15.5909C9.66545 15.5909 11.1855 14.9655 12.3418 13.9327C12.9964 13.3509 13.5418 12.6309 13.92 11.8309C14.9673 11.5182 15.7745 10.6309 15.9564 9.52545C15.9855 9.37273 16 9.21273 16 9.04545C16 8.87818 15.9855 8.71818 15.9564 8.56545ZM6.18182 7.04545C5.67974 7.04545 5.27273 7.45247 5.27273 7.95455C5.27273 8.45662 5.67974 8.86364 6.18182 8.86364C6.6839 8.86364 7.09091 8.45662 7.09091 7.95455C7.09091 7.45247 6.6839 7.04545 6.18182 7.04545ZM9.81818 7.04545C9.3161 7.04545 8.90909 7.45247 8.90909 7.95455C8.90909 8.45662 9.3161 8.86364 9.81818 8.86364C10.3203 8.86364 10.7273 8.45662 10.7273 7.95455C10.7273 7.45247 10.3203 7.04545 9.81818 7.04545ZM5.01821 10.5H10.9818C11.1128 10.5 11.2073 10.6455 11.1491 10.7691C10.5455 11.9109 9.36002 12.6818 8.00002 12.6818C6.64002 12.6818 5.45457 11.9109 4.85093 10.7691C4.78548 10.6455 4.88002 10.5 5.01821 10.5ZM12.9538 10.4875C12.9991 10.4938 13.0435 10.5 13.0909 10.5C13.8909 10.5 14.5455 9.84545 14.5455 9.04545C14.5455 8.24545 13.8909 7.59091 13.0909 7.59091C13.0435 7.59091 12.9991 7.5971 12.9538 7.60343C12.9297 7.60679 12.9053 7.6102 12.88 7.61273C12.7345 7.12545 12.5236 6.67455 12.2545 6.26C11.3455 4.87091 9.78182 3.95455 8 3.95455C6.21818 3.95455 4.65455 4.87091 3.74545 6.26C3.47636 6.67455 3.26545 7.12545 3.12 7.61273C3.09473 7.6102 3.07033 7.60679 3.0462 7.60343C3.0009 7.5971 2.95654 7.59091 2.90909 7.59091C2.10909 7.59091 1.45455 8.24545 1.45455 9.04545C1.45455 9.84545 2.10909 10.5 2.90909 10.5C2.95654 10.5 3.0009 10.4938 3.0462 10.4875C3.07033 10.4841 3.09473 10.4807 3.12 10.4782C3.26545 10.9655 3.47636 11.4164 3.74545 11.8309C4.65455 13.22 6.21818 14.1364 8 14.1364C9.78182 14.1364 11.3455 13.22 12.2545 11.8309C12.5236 11.4164 12.7345 10.9655 12.88 10.4782C12.9053 10.4807 12.9297 10.4841 12.9538 10.4875Z",fill:"#595959"}),s.default.createElement("path",{d:"M2.5 2V1C2.5 0.725 2.275 0.5 2 0.5C1.725 0.5 1.5 0.725 1.5 1V2H0.5C0.225 2 0 2.225 0 2.5C0 2.775 0.225 3 0.5 3H1.5V4C1.5 4.275 1.725 4.5 2 4.5C2.275 4.5 2.5 4.275 2.5 4V3H3.5C3.775 3 4 2.775 4 2.5C4 2.225 3.775 2 3.5 2H2.5Z",fill:"#595959"}))},s.default.createElement(l.Text,{size:"p2",color:r.theme.colors.gray800},f("childCard.menu.add"))),s.default.createElement(l.Menu.Item,{onClick:m,icon:s.default.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("path",{d:"M6.66699 1.83301L6.00033 2.49967H3.33366C2.93366 2.49967 2.66699 2.76634 2.66699 3.16634C2.66699 3.56634 2.93366 3.83301 3.33366 3.83301H4.66699H11.3337H12.667C13.067 3.83301 13.3337 3.56634 13.3337 3.16634C13.3337 2.76634 13.067 2.49967 12.667 2.49967H10.0003L9.33366 1.83301H6.66699ZM3.33366 5.16634V13.833C3.33366 14.5663 3.93366 15.1663 4.66699 15.1663H11.3337C12.067 15.1663 12.667 14.5663 12.667 13.833V5.16634H3.33366ZM6.00033 6.49967C6.40033 6.49967 6.66699 6.76634 6.66699 7.16634V13.1663C6.66699 13.5663 6.40033 13.833 6.00033 13.833C5.60033 13.833 5.33366 13.5663 5.33366 13.1663V7.16634C5.33366 6.76634 5.60033 6.49967 6.00033 6.49967ZM10.0003 6.49967C10.4003 6.49967 10.667 6.76634 10.667 7.16634V13.1663C10.667 13.5663 10.4003 13.833 10.0003 13.833C9.60033 13.833 9.33366 13.5663 9.33366 13.1663V7.16634C9.33366 6.76634 9.60033 6.49967 10.0003 6.49967Z",fill:"#F44D2C"}))},s.default.createElement(l.Text,{size:"p2",color:r.theme.colors.red600},f("childCard.menu.remove",{name:n})))))},m=function(e,t){if(e)if(e.year<1){if(0===e.month)switch(e.week){case 0:case 1:return t("childCard.age.oneWeek");default:return t("childCard.age.week",{weeks:e.week})}if(1===e.month)return t("childCard.age.oneMonth");if(e.month>1)return t("childCard.age.months",{month:e.month})}else{if(1===e.year)return t("childCard.age.oneYear");if(0===e.month)return t("childCard.age.yearNoMonth",{year:e.year});if(e.month>0)return t("childCard.age.yearMonth",{year:e.year,month:e.month})}},f=function(e,t){return e&&"NaN"!==e?e+" "+(t||""):"--"};exports.BabyGrowthChart=e.BabyGrowthChart,exports.BabyGrowthChartPercentile=e.BabyGrowthChartPercentile,exports.BabyGrowthChartZScore=e.BabyGrowthChartZScore,exports.BabyGrowthChooseProfileDrawer=e.BabyGrowthChooseProfileDrawer,exports.BabyGrowthGender=e.BabyGrowthGender,exports.BabyGrowthProfileRadio=e.BabyGrowthProfileRadio,exports.BabyGrowthSwitch=e.BabyGrowthSwitch,Object.defineProperty(exports,"BabyGrowthSwitchChart",{enumerable:!0,get:function(){return e.BabyGrowthSwitchChart}}),exports.BabyGrowthTooltip=e.BabyGrowthTooltip,exports.LABELS_PERCENTILE=e.LABELS_PERCENTILE,exports.LABELS_Z_SCORE=e.LABELS_Z_SCORE,exports.divideChartData=e.divideChartData,exports.generateGrowthChart=e.generateGrowthChart,exports.generateXAxisTicks=e.generateXAxisTicks,exports.getAxisYDomain=e.getAxisYDomain,exports.paintAxis=e.paintAxis,exports.refineDataWithDot=e.refineDataWithDot,exports.refineDataWithLine=e.refineDataWithLine,exports.transformDataToChart=e.transformDataToChart,exports.BabyGrowthLegend=function(t){var n=t.legends,o=t.locale;return s.default.createElement(e.StyledBabyGrowthLegend,null,n.map((function(t,n){return s.default.createElement(e.StyledLegend,{key:n},s.default.createElement("span",{className:"dot",style:{backgroundColor:t.color}}),s.default.createElement(l.Text,{size:"n1",color:r.theme.colors.gray800},o===a.LOCALE.Indonesia?t["z-score"]:t.text))})))},exports.BabyGrowthRecord=function(t){var i=t.measurementDate,d=void 0===i?new Date:i,c=t.weight,u=t.height,h=t.head,E=t.onEdit,w=t.birthday,g=t.dateFormat,y=void 0===g?"dd/MM/yyyy":g,p=t.locale;void 0===p&&a.LOCALE.PhilippinesEnglish;var L=o.useTranslations().t;return s.default.createElement(e.StyledBabyGrowthRecord,{onClick:E},s.default.createElement("div",{className:"time"},s.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("path",{d:"M5.64421 0.666016C5.27621 0.666016 4.97754 0.964682 4.97754 1.33268V1.99935H4.31087C3.57754 1.99935 2.97754 2.59935 2.97754 3.33268V12.666C2.97754 13.3993 3.57754 13.9993 4.31087 13.9993H13.6442C14.3775 13.9993 14.9775 13.3993 14.9775 12.666V3.33268C14.9775 2.59935 14.3775 1.99935 13.6442 1.99935H12.9775V1.33268C12.9775 0.964682 12.6789 0.666016 12.3109 0.666016C11.9429 0.666016 11.6442 0.964682 11.6442 1.33268V1.99935H6.31087V1.33268C6.31087 0.964682 6.01221 0.666016 5.64421 0.666016ZM4.31087 5.33268H13.6442V11.9993C13.6442 12.3673 13.3455 12.666 12.9775 12.666H4.97754C4.60954 12.666 4.31087 12.3673 4.31087 11.9993V5.33268Z",fill:"#8C8C8C"})),s.default.createElement(l.Text,{size:"p3",color:r.theme.colors.gray600},"".concat(n.format(d,y)," (").concat(m(C.ageGenerate(w,d),L),")")),s.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"edit-button"},s.default.createElement("path",{d:"M12.7721 1.33398C12.2911 1.33398 11.8102 1.51773 11.443 1.88607L10.6643 2.66732L13.3224 5.33398L14.1011 4.55273C14.8348 3.81673 14.8348 2.62273 14.1011 1.88607C13.734 1.51773 13.253 1.33398 12.7721 1.33398ZM9.66748 3.66732L2.02539 11.334V14.0007H4.68351L12.3256 6.33398L9.66748 3.66732Z",fill:"#8C8C8C"}))),s.default.createElement("div",{className:"record"},s.default.createElement("div",{className:"record-item"},s.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("path",{d:"M8.44401 9.86602C8.44401 9.57146 8.68279 9.33268 8.97734 9.33268C9.2719 9.33268 9.51068 9.57146 9.51068 9.86602V11.466C9.51068 11.7606 9.2719 11.9993 8.97734 11.9993C8.68279 11.9993 8.44401 11.7606 8.44401 11.466V9.86602Z",fill:"#8C8C8C"}),s.default.createElement("path",{d:"M8.17595 3.05319C7.96767 3.26147 7.96767 3.59916 8.17595 3.80744L8.83592 4.46741C9.0442 4.67569 9.38189 4.67569 9.59017 4.46741C9.79844 4.25913 9.79844 3.92144 9.59017 3.71316L8.9302 3.05319C8.72192 2.84491 8.38423 2.84492 8.17595 3.05319Z",fill:"#8C8C8C"}),s.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2941 3.66435C12.1261 1.98071 10.7053 0.666016 8.97738 0.666016C7.2495 0.666016 5.82868 1.9807 5.66067 3.66434L3.67054 3.86336C2.92499 3.93791 2.38724 4.61197 2.48017 5.35545L3.498 13.4981C3.5814 14.1653 4.1486 14.666 4.82104 14.666H13.1336C13.806 14.666 14.3732 14.1653 14.4567 13.4981L15.4745 5.35545C15.5674 4.61197 15.0297 3.93791 14.2841 3.86336L12.2941 3.66435ZM12.1607 4.991C11.7386 6.34768 10.473 7.33268 8.97738 7.33268C7.48176 7.33268 6.2162 6.34767 5.79403 4.99099L3.80321 5.19007L4.82104 13.3327L13.1336 13.3327L14.1514 5.19007L12.1607 4.991ZM10.9774 3.99935C10.9774 5.10392 10.0819 5.99935 8.97738 5.99935C7.87281 5.99935 6.97738 5.10392 6.97738 3.99935C6.97738 2.89478 7.87281 1.99935 8.97738 1.99935C10.0819 1.99935 10.9774 2.89478 10.9774 3.99935Z",fill:"#8C8C8C"})),s.default.createElement(l.Text,{size:"s3",color:r.theme.colors.gray800,type:"semiBold"},f(C.localizeNumberFormat(c),"kg"))),s.default.createElement("div",{className:"record-item"},s.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("g",{clipPath:"url(#clip0_855_82991)"},s.default.createElement("path",{d:"M12.6055 13.9993L12.6055 1.99935C12.6055 1.26602 12.0055 0.666016 11.2721 0.666016L5.9388 0.666015C5.20547 0.666015 4.60547 1.26602 4.60547 1.99935L4.60547 13.9993C4.60547 14.7327 5.20547 15.3327 5.9388 15.3327L11.2721 15.3327C12.0055 15.3327 12.6055 14.7327 12.6055 13.9993ZM5.9388 13.9993L5.9388 1.99935L11.2721 1.99935L11.2721 3.33268L8.60547 3.33268L8.60547 4.66602L11.2721 4.66602L11.2721 5.99935L8.60547 5.99935L8.60547 7.33268L11.2721 7.33268L11.2721 8.66602L8.60547 8.66601L8.60547 9.99935L11.2721 9.99935L11.2721 11.3327L8.60547 11.3327L8.60547 12.666L11.2721 12.666L11.2721 13.9993L5.9388 13.9993Z",fill:"#8C8C8C"})),s.default.createElement("defs",null,s.default.createElement("clipPath",{id:"clip0_855_82991"},s.default.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(16.6055) rotate(90)"})))),s.default.createElement(l.Text,{size:"s3",color:r.theme.colors.gray800,type:"semiBold"},f(C.localizeNumberFormat(u),"cm"))),s.default.createElement("div",{className:"record-item"},s.default.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s.default.createElement("g",{clipPath:"url(#clip0_855_82994)"},s.default.createElement("path",{d:"M9.90072 7.83268C10.361 7.83268 10.734 7.45959 10.734 6.99935C10.734 6.53911 10.361 6.16602 9.90072 6.16602C9.44048 6.16602 9.06738 6.53911 9.06738 6.99935C9.06738 7.45959 9.44048 7.83268 9.90072 7.83268Z",fill:"#8C8C8C"}),s.default.createElement("path",{d:"M6.56771 7.83268C7.02795 7.83268 7.40104 7.45959 7.40104 6.99935C7.40104 6.53911 7.02795 6.16602 6.56771 6.16602C6.10747 6.16602 5.73438 6.53911 5.73438 6.99935C5.73438 7.45959 6.10747 7.83268 6.56771 7.83268Z",fill:"#8C8C8C"}),s.default.createElement("path",{d:"M15.528 7.56C15.3614 6.55333 14.6214 5.73333 13.6547 5.44667C13.3014 4.7 12.8014 4.04667 12.1947 3.50667C11.1414 2.56667 9.7547 2 8.2347 2C6.7147 2 5.32803 2.56667 4.2747 3.50667C3.66137 4.04667 3.16137 4.70667 2.8147 5.44667C1.84803 5.73333 1.10803 6.54667 0.941367 7.56C0.9147 7.7 0.901367 7.84667 0.901367 8C0.901367 8.15333 0.9147 8.3 0.941367 8.44C1.10803 9.44667 1.84803 10.2667 2.8147 10.5533C3.16137 11.2933 3.66137 11.9467 4.26137 12.48C5.3147 13.4267 6.70803 14 8.2347 14C9.76137 14 11.1547 13.4267 12.2147 12.48C12.8147 11.9467 13.3147 11.2867 13.6614 10.5533C14.6214 10.2667 15.3614 9.45333 15.528 8.44C15.5547 8.3 15.568 8.15333 15.568 8C15.568 7.84667 15.5547 7.7 15.528 7.56ZM12.9014 9.33333C12.8347 9.33333 12.7747 9.32 12.708 9.31333C12.5747 9.76 12.3814 10.1733 12.1347 10.5533C11.3014 11.8267 9.86803 12.6667 8.2347 12.6667C6.60137 12.6667 5.16803 11.8267 4.3347 10.5533C4.08803 10.1733 3.8947 9.76 3.76137 9.31333C3.6947 9.32 3.6347 9.33333 3.56803 9.33333C2.8347 9.33333 2.2347 8.73333 2.2347 8C2.2347 7.26667 2.8347 6.66667 3.56803 6.66667C3.6347 6.66667 3.6947 6.68 3.76137 6.68667C3.8947 6.24 4.08803 5.82667 4.3347 5.44667C5.16803 4.17333 6.60137 3.33333 8.2347 3.33333C9.86803 3.33333 11.3014 4.17333 12.1347 5.44667C12.3814 5.82667 12.5747 6.24 12.708 6.68667C12.7747 6.68 12.8347 6.66667 12.9014 6.66667C13.6347 6.66667 14.2347 7.26667 14.2347 8C14.2347 8.73333 13.6347 9.33333 12.9014 9.33333ZM8.2347 11.3333C9.5747 11.3333 10.728 10.5133 11.2347 9.33333H5.2347C5.74137 10.5133 6.8947 11.3333 8.2347 11.3333Z",fill:"#8C8C8C"})),s.default.createElement("defs",null,s.default.createElement("clipPath",{id:"clip0_855_82994"},s.default.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.234375)"})))),s.default.createElement(l.Text,{size:"s3",color:r.theme.colors.gray800,type:"semiBold"},f(C.localizeNumberFormat(h),"cm")))))},exports.ChildCard=function(n){var d=n.name,C=n.gender,c=n.age,f=n.isLoggedIn,h=void 0!==f&&f,E=n.showMenu,w=void 0!==E&&E,g=n.onEdit,y=n.onSwitch,p=n.onAdd,L=n.onRemove,x=n.className,v=n.siteType,b=o.useTranslations().t,B=t.useState(!1),M=B[0],G=B[1],Z="marryBaby"===v;return s.default.createElement(e.StyledChildCard,{className:x,"data-theme":v},Z?s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{"data-testid":"gender"},C===a.Gender.Boy?s.default.createElement(e.Icon.BabyBoyMB,{"data-testid":"boy",id:"boy"}):s.default.createElement(e.Icon.BabyGirlMB,{"data-testid":"girl",id:"girl"})),s.default.createElement("div",{className:"information"},s.default.createElement(e.MarryBabyText,{type:"subtitle-1",color:r.theme.mbColors.dark},i.startCase(d)||b("childCard.noName")),s.default.createElement("div",{className:"detail"},s.default.createElement("div",null,C===a.Gender.Boy?s.default.createElement(e.Icon.GenderBoy,null):s.default.createElement(e.Icon.GenderGirl,null),s.default.createElement(e.MarryBabyText,{type:"bodytext-2",color:r.theme.mbColors.gray},C)),s.default.createElement("div",null,s.default.createElement(e.Icon.Calendar,{size:16}),c&&s.default.createElement(e.MarryBabyText,{type:"bodytext-2",color:r.theme.mbColors.gray},m(c,b)))))):s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{"data-testid":"gender"},C===a.Gender.Boy?s.default.createElement(e.Icon.Boy,{"data-testid":"boy",id:"boy"}):s.default.createElement(e.Icon.Girl,{"data-testid":"girl",id:"girl"})),s.default.createElement("div",{className:"information"},s.default.createElement(e.Heading,{tag:"h5",fontWeight:"bold",color:r.theme.colors.gray800},i.startCase(d)||b("childCard.noName")),s.default.createElement("div",{className:"detail"},s.default.createElement("div",null,C===a.Gender.Boy?s.default.createElement(e.Icon.GenderBoy,null):s.default.createElement(e.Icon.GenderGirl,null),s.default.createElement(l.Text,{size:"p3",color:r.theme.colors.gray800,style:{textTransform:"capitalize"}},C)),s.default.createElement("div",null,s.default.createElement(e.Icon.Calendar,{size:16}),c&&s.default.createElement(l.Text,{size:"p3",color:r.theme.colors.gray800},m(c,b)))))),w&&h&&s.default.createElement(e.StyledOption,null,s.default.createElement(e.Icon.Kebab,{onClick:function(){return G((function(e){return!e}))}}),M&&s.default.createElement(u,{name:d,onClose:function(){return G(!1)},onEdit:function(){G(!1),g()},onSwitch:function(){G(!1),y()},onAdd:function(){G(!1),p()},onRemove:function(){G(!1),L()}})))};
package/build/care.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-7b4a0dbd.js"),r=require("./constants-ca5ea110.js");require("./tslib.es6-e6f346c4.js"),require("react"),require("./index-d28c27ca.js"),require("./isProduction-32e6a55a.js"),require("./cookieHelper-612b90fa.js"),require("./useTranslations-62f5bf8f.js"),require("./translationsContext-0cab5713.js"),require("string-format"),require("lodash/debounce"),require("./index.styled-27ff3b4a.js"),require("styled-components"),require("./theme-696d81a9.js"),require("./screenSizeContext-8f86eb30.js"),require("vanilla-lazyload"),require("lodash"),require("date-fns"),require("./Locale-11b51016.js"),require("./gAssets.js"),require("./index-432eb60f.js"),require("react-range"),require("@mantine/core"),require("react-loading-skeleton"),require("react-id-generator"),require("lodash/shuffle"),require("./useOutsideClick-528bfd6c.js"),exports.BookingSearchBar=e.BookingSearchBar,exports.CareTypes=e.types,exports.CareConstants=r.constants;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./types-6873704a.js"),r=require("./constants-ca5ea110.js");require("./tslib.es6-e6f346c4.js"),require("react"),require("./index-d28c27ca.js"),require("./isProduction-32e6a55a.js"),require("./cookieHelper-612b90fa.js"),require("./useTranslations-62f5bf8f.js"),require("./translationsContext-0cab5713.js"),require("string-format"),require("lodash/debounce"),require("./index.styled-213d989f.js"),require("styled-components"),require("./theme-696d81a9.js"),require("./screenSizeContext-8f86eb30.js"),require("vanilla-lazyload"),require("lodash"),require("date-fns"),require("./Locale-11b51016.js"),require("./gAssets.js"),require("./useOutsideClick-9a358ff5.js"),require("react-range"),require("@mantine/core"),require("react-loading-skeleton"),require("react-id-generator"),require("lodash/shuffle"),exports.BookingSearchBar=e.BookingSearchBar,exports.CareTypes=e.types,exports.CareConstants=r.constants;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Role } from 'src/together/interfaces/types';
3
+ export type AuthorBadgeProps = {
4
+ role: Role | string;
5
+ title?: string;
6
+ };
7
+ export declare const AuthorLabelTextMapping: {
8
+ [k in Role]?: string;
9
+ };
10
+ declare const AuthorBadge: ({ role, title }: AuthorBadgeProps) => JSX.Element;
11
+ export { AuthorBadge };
@@ -0,0 +1 @@
1
+ export declare const StyledAuthorBadge: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -22,5 +22,5 @@ export type AxisType = {
22
22
  };
23
23
  export declare const LABELS_Z_SCORE: Array<AxisType>;
24
24
  export declare const LABELS_PERCENTILE: Array<AxisType>;
25
- declare const BabyGrowthChart: ({ gender, type, duration, xLabel, x, y, toolTipLabel, isDivide, onIsPrevious, locale, riskLevel, withLine, lineData, }: BabyGrowthChartProps) => JSX.Element;
25
+ declare const BabyGrowthChart: ({ gender, type, duration, xLabel, x, y, toolTipLabel, isDivide, onIsPrevious, locale, riskLevel, withLine, lineData }: BabyGrowthChartProps) => JSX.Element;
26
26
  export { BabyGrowthChart };
@@ -37,5 +37,7 @@ export { Menu } from './menu';
37
37
  export type { MenuProps } from './menu';
38
38
  export type { Props as RadioImageGroupProps } from './radioImageGroup';
39
39
  export { RadioImageGroup } from './radioImageGroup';
40
+ export { AuthorBadge } from './authorBadge';
41
+ export type { AuthorBadgeProps } from './authorBadge';
40
42
  export { NewBabyProfileRadio } from './newBabyProfileRadio';
41
43
  export type { NewBabyProfileRadioProps } from './newBabyProfileRadio';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-b40a22ab.js"),r=require("./index-8e49874a.js"),o=require("./index-8b1987d5.js"),t=require("./index-47c276bb.js"),a=require("./index-1fcdf9ee.js"),i=require("./index-3422cf26.js"),s=require("./index-432eb60f.js"),n=require("./index.styled-27ff3b4a.js"),d=require("./index-4f1436b1.js");require("react"),require("./tslib.es6-e6f346c4.js"),require("./screenSizeContext-8f86eb30.js"),require("styled-components"),require("vanilla-lazyload"),require("lodash"),require("./theme-696d81a9.js"),require("react-id-generator"),require("keen-slider/react"),require("./gAssets.js"),require("./index-d28c27ca.js"),require("./isProduction-32e6a55a.js"),require("react-range"),require("date-fns"),require("./Locale-11b51016.js"),require("@mantine/core"),require("./translationsContext-0cab5713.js"),require("string-format"),require("lodash/debounce"),require("./useTranslations-62f5bf8f.js"),require("react-hook-form"),require("./useHealthToolCache-ae750aac.js"),require("./getDynamicHealthTool-1d292d71.js"),require("./core-97cd306c.js"),require("./theme-6fd790c0.js"),require("@mantine/dates"),require("@mantine/hooks"),require("@mantine/carousel"),require("./useOutsideClick-528bfd6c.js"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./getSocialList-19da0f19.js"),require("date-fns/locale/hi"),require("date-fns/locale/ms"),require("date-fns/locale/th"),require("./cookieHelper-612b90fa.js"),require("slugify"),require("react-day-picker/DayPickerInput"),require("react-dom"),require("smoothscroll-polyfill"),require("./types-2b3bdf79.js"),require("@hookform/resolvers/yup"),require("./constants-ca5ea110.js"),require("./useScrollbarSize-586f6706.js"),require("recharts"),exports.Alert=e.Alert,exports.AmpNextPage=e.AmpNextPage,exports.ArticleCard=e.ArticleCard,exports.BMICardEmbed=e.BMICardEmbed,exports.BMRCardEmbed=e.BMRCardEmbed,exports.BabyGrowthCardEmbed=e.BabyGrowthCardEmbed,exports.BabyPoopEmbed=e.BabyPoopEmbed,exports.Badge=e.Badge,exports.BorderHeading=e.BorderHeading,exports.Breadcrumbs=e.Breadcrumbs,exports.Carousel=e.Carousel,exports.CategoryCard=e.CategoryCard,exports.Checkbox=e.Checkbox,exports.CheckboxGroup=e.CheckboxGroup,exports.CookieAcceptConfirm=e.CookieAcceptConfirm,exports.DateRangePicker=e.DateRangePicker,exports.DueDateCardEmbed=e.DueDateCardEmbed,exports.FileDropdown=e.FileDropdown,exports.FloatButtonGroup=e.FloatButtonGroup,exports.Footer=e.Footer,exports.Grid=e.Grid,exports.IconText=e.IconText,exports.OvulationCardEmbed=e.OvulationCardEmbed,exports.PWGCardEmbed=e.PWGCardEmbed,exports.Pagination=e.Pagination,exports.Progress=e.Progress,exports.ProgressBar=e.ProgressBar,exports.RateStars=e.RateStars,exports.SeoHead=e.SeoHead,exports.Shadow=e.Shadow,exports.ShareContainer=e.ShareContainer,exports.ShareDrawer=e.ShareDrawer,exports.SideMenu=e.index,exports.StatisticCard=e.StatisticCard,exports.SurveyThankyouCard=e.SurveyThankyouCard,exports.THRCardEmbed=e.THRCardEmbed,exports.Table=e.index$1,exports.Tabs=e.Tabs,exports.Tag=e.Tag,exports.Toggle=e.Toggle,exports.UnderlinedLink=e.UnderlinedLink,exports.Uploader=e.Uploader,exports.Avatar=r.Avatar,exports.Dropdown=r.Dropdown,exports.Popup=r.Popup,exports.Button=o.Button,exports.Divider=t.Divider,exports.DatePicker=a.DatePicker,exports.DoctorInfo=a.DoctorInfo,exports.Flag=a.Flag,exports.LanguageSwitcher=a.LanguageSwitcher,exports.Logo=a.Logo,exports.MobileBottomNavigation=a.MobileBottomNavigation,exports.MobileBottomNavigationIcon=a.MobileBottomNavigationIcon,exports.NavigationLogoutPopup=a.NavigationLogoutPopup,exports.NavigationProfileButton=a.NavigationProfileButton,exports.NavigationV2=a.NavigationV2,exports.ProfilePopup=a.ProfilePopup,exports.Radio=a.Radio,exports.RadioGroup=a.RadioGroup,exports.ScrollList=a.ScrollList,exports.Slider=a.Slider,exports.SurveyQuestionCard=a.SurveyQuestionCard,exports.ToolsBannerCard=a.ToolsBannerCard,exports.UserProfileNavigation=a.UserProfileNavigation,exports.UserProfileNavigationHeader=a.NavHeader,exports.UserProfileNavigationStats=a.UserStats,exports.getNavMenuContent=a.getNavMenuContent,exports.getNavMenuContentWithCache=a.getNavMenuContentWithCache,exports.Heading=i.Heading,exports.Input=s.Input,exports.Container=n.Container,exports.Label=n.Label,exports.Menu=n.Menu,exports.PureInput=n.PureInput,exports.Text=n.Text,exports.TextArea=n.TextArea,exports.TextDivider=n.TextDivider,exports.Drawer=d.Drawer,exports.Icon=d.Icon,exports.Modal=d.Modal,exports.NewBabyProfileRadio=d.NewBabyProfileRadio,exports.RadioImageGroup=d.RadioImageGroup;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./index-0ae67c7d.js"),r=require("./index.styled-356306df.js"),o=require("./index-740c6f7b.js"),t=require("./index-27945654.js"),a=require("./index-fcf59317.js"),i=require("./index-62048f19.js"),s=require("./useOutsideClick-9a358ff5.js"),n=require("./index.styled-213d989f.js");require("react"),require("./tslib.es6-e6f346c4.js"),require("./screenSizeContext-8f86eb30.js"),require("styled-components"),require("vanilla-lazyload"),require("lodash"),require("./theme-696d81a9.js"),require("react-id-generator"),require("keen-slider/react"),require("./gAssets.js"),require("./index-d28c27ca.js"),require("./isProduction-32e6a55a.js"),require("react-range"),require("date-fns"),require("./Locale-11b51016.js"),require("@mantine/core"),require("./translationsContext-0cab5713.js"),require("string-format"),require("lodash/debounce"),require("./useTranslations-62f5bf8f.js"),require("react-hook-form"),require("./useHealthToolCache-ae750aac.js"),require("./getDynamicHealthTool-1d292d71.js"),require("./core-97cd306c.js"),require("./theme-f97a1fea.js"),require("@mantine/dates"),require("@mantine/hooks"),require("@mantine/carousel"),require("date-fns/locale/en-US"),require("date-fns/locale/id"),require("date-fns/locale/vi"),require("date-fns/locale/zh-TW"),require("./getSocialList-19da0f19.js"),require("date-fns/locale/hi"),require("date-fns/locale/ms"),require("date-fns/locale/th"),require("react-day-picker/DayPickerInput"),require("react-dom"),require("smoothscroll-polyfill"),require("./types-2b3bdf79.js"),require("./cookieHelper-612b90fa.js"),require("slugify"),require("@hookform/resolvers/yup"),require("./constants-ca5ea110.js"),require("./useScrollbarSize-586f6706.js"),require("recharts"),exports.Alert=e.Alert,exports.AmpNextPage=e.AmpNextPage,exports.ArticleCard=e.ArticleCard,exports.BMICardEmbed=e.BMICardEmbed,exports.BMRCardEmbed=e.BMRCardEmbed,exports.BabyGrowthCardEmbed=e.BabyGrowthCardEmbed,exports.BabyPoopEmbed=e.BabyPoopEmbed,exports.Badge=e.Badge,exports.BorderHeading=e.BorderHeading,exports.Breadcrumbs=e.Breadcrumbs,exports.Carousel=e.Carousel,exports.CategoryCard=e.CategoryCard,exports.Checkbox=e.Checkbox,exports.CheckboxGroup=e.CheckboxGroup,exports.CookieAcceptConfirm=e.CookieAcceptConfirm,exports.DateRangePicker=e.DateRangePicker,exports.DueDateCardEmbed=e.DueDateCardEmbed,exports.FileDropdown=e.FileDropdown,exports.FloatButtonGroup=e.FloatButtonGroup,exports.Footer=e.Footer,exports.Grid=e.Grid,exports.IconText=e.IconText,exports.OvulationCardEmbed=e.OvulationCardEmbed,exports.PWGCardEmbed=e.PWGCardEmbed,exports.Pagination=e.Pagination,exports.Progress=e.Progress,exports.ProgressBar=e.ProgressBar,exports.RateStars=e.RateStars,exports.SeoHead=e.SeoHead,exports.Shadow=e.Shadow,exports.ShareContainer=e.ShareContainer,exports.ShareDrawer=e.ShareDrawer,exports.SideMenu=e.index,exports.StatisticCard=e.StatisticCard,exports.SurveyThankyouCard=e.SurveyThankyouCard,exports.THRCardEmbed=e.THRCardEmbed,exports.Table=e.index$1,exports.Tabs=e.Tabs,exports.Tag=e.Tag,exports.Toggle=e.Toggle,exports.UnderlinedLink=e.UnderlinedLink,exports.Uploader=e.Uploader,exports.AuthorBadge=r.AuthorBadge,exports.Avatar=r.Avatar,exports.DatePicker=r.DatePicker,exports.DoctorInfo=r.DoctorInfo,exports.Dropdown=r.Dropdown,exports.Logo=r.Logo,exports.MobileBottomNavigation=r.MobileBottomNavigation,exports.MobileBottomNavigationIcon=r.MobileBottomNavigationIcon,exports.Popup=r.Popup,exports.Radio=r.Radio,exports.RadioGroup=r.RadioGroup,exports.ScrollList=r.ScrollList,exports.Slider=r.Slider,exports.SurveyQuestionCard=r.SurveyQuestionCard,exports.ToolsBannerCard=r.ToolsBannerCard,exports.Button=o.Button,exports.Divider=t.Divider,exports.Flag=a.Flag,exports.LanguageSwitcher=a.LanguageSwitcher,exports.NavigationLogoutPopup=a.NavigationLogoutPopup,exports.NavigationProfileButton=a.NavigationProfileButton,exports.NavigationV2=a.NavigationV2,exports.ProfilePopup=a.ProfilePopup,exports.UserProfileNavigation=a.UserProfileNavigation,exports.UserProfileNavigationHeader=a.NavHeader,exports.UserProfileNavigationStats=a.UserStats,exports.getNavMenuContent=a.getNavMenuContent,exports.getNavMenuContentWithCache=a.getNavMenuContentWithCache,exports.Drawer=i.Drawer,exports.Heading=i.Heading,exports.Icon=i.Icon,exports.Modal=i.Modal,exports.NewBabyProfileRadio=i.NewBabyProfileRadio,exports.RadioImageGroup=i.RadioImageGroup,exports.Input=s.Input,exports.Container=n.Container,exports.Label=n.Label,exports.Menu=n.Menu,exports.PureInput=n.PureInput,exports.Text=n.Text,exports.TextArea=n.TextArea,exports.TextDivider=n.TextDivider;
@@ -1 +1 @@
1
- import{S as e,c as a,d as C,e as c,I as d,a as E,f,g}from"./index-eab6fcc2.js";export{l as BabyGrowthChart,n as BabyGrowthChartPercentile,o as BabyGrowthChartZScore,B as BabyGrowthChooseProfileDrawer,b as BabyGrowthGender,k as BabyGrowthProfileRadio,h as BabyGrowthSwitch,i as BabyGrowthSwitchChart,j as BabyGrowthTooltip,L as LABELS_PERCENTILE,m as LABELS_Z_SCORE,r as divideChartData,q as generateGrowthChart,v as generateXAxisTicks,p as getAxisYDomain,w as paintAxis,t as refineDataWithDot,s as refineDataWithLine,u as transformDataToChart}from"./index-eab6fcc2.js";import y,{useRef as M,useState as x}from"react";import{L as Z,G as H}from"./Locale-69030fff.js";import{t as V}from"./theme-a50a1aa5.js";import{T as G,M as N}from"./index.styled-520ccc61.js";import{format as z}from"date-fns";import{u as S}from"./useTranslations-6caddf1f.js";import"./gAssets.js";import{H as _}from"./index-012ca6e1.js";import{n as D}from"./screenSizeContext-1852eabc.js";import"react-range";import"@mantine/core";import"styled-components";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"lodash/debounce";import{u as P}from"./useOutsideClick-6004483a.js";import{a as R,l as A}from"./localizeNumberFormat-77c129ef.js";import"./tslib.es6-dcf36680.js";import"./index-588deadc.js";import"./translationsContext-17d7ffe4.js";import"string-format";import"./index-610bb13c.js";import"./useScrollbarSize-99db33e1.js";import"react-dom";import"recharts";import"lodash";import"vanilla-lazyload";var I=function(t){var r=t.legends,l=t.locale;return y.createElement(e,null,r.map((function(e,t){return y.createElement(a,{key:t},y.createElement("span",{className:"dot",style:{backgroundColor:e.color}}),y.createElement(G,{size:"n1",color:V.colors.gray800},l===Z.Indonesia?e["z-score"]:e.text))})))},T=function(e){var t=e.name,a=e.onClose,r=e.onEdit,l=e.onSwitch,n=e.onAdd,o=e.onRemove,i=S().t,c=M();return P(c,a),y.createElement("div",{ref:c},y.createElement(C,{width:250},y.createElement(N.Item,{onClick:r,icon:y.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M12.7812 1.83301C12.2987 1.83301 11.8162 2.01676 11.4479 2.38509L10.6667 3.16634L13.3333 5.83301L14.1146 5.05176C14.8506 4.31576 14.8506 3.12176 14.1146 2.38509C13.7463 2.01676 13.2638 1.83301 12.7812 1.83301ZM9.66667 4.16634L2 11.833V14.4997H4.66667L12.3333 6.83301L9.66667 4.16634Z",fill:"#595959"}))},y.createElement(G,{size:"p2",color:V.colors.gray800},i("childCard.menu.edit",{name:t}))),y.createElement(N.Item,{onClick:l,icon:y.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M8 2.5C4.9478 2.5 2.4204 4.79359 2.05078 7.7513C2.03763 7.83928 2.04222 7.929 2.06428 8.01518C2.08634 8.10136 2.12542 8.18226 2.17922 8.2531C2.23303 8.32394 2.30046 8.3833 2.37756 8.42768C2.45465 8.47206 2.53985 8.50057 2.62813 8.51152C2.71642 8.52247 2.806 8.51564 2.8916 8.49143C2.9772 8.46723 3.05709 8.42614 3.12657 8.37059C3.19605 8.31503 3.2537 8.24613 3.29615 8.16795C3.33859 8.08978 3.36496 8.00389 3.3737 7.91536C3.66141 5.61307 5.61354 3.83333 8 3.83333C9.34288 3.83333 10.5434 4.39987 11.3919 5.30339L10.0977 6.59766C9.96766 6.72766 9.96766 6.93901 10.0977 7.06901C10.1623 7.13434 10.248 7.16667 10.3333 7.16667H13.3333C13.5101 7.16667 13.6797 7.09643 13.8047 6.9714C13.9298 6.84638 14 6.67681 14 6.5V3.5C14 3.41467 13.967 3.32966 13.9023 3.26432C13.7723 3.13432 13.561 3.13432 13.431 3.26432L12.3359 4.35938C11.2437 3.21415 9.7037 2.5 8 2.5ZM13.2943 8.49089C13.1292 8.48959 12.9695 8.54959 12.8461 8.65928C12.7227 8.76896 12.6444 8.92053 12.6263 9.08464C12.3386 11.3869 10.3865 13.1667 8 13.1667C6.65713 13.1667 5.45884 12.5994 4.60938 11.6953L5.90234 10.4023C6.03234 10.2723 6.03234 10.061 5.90234 9.93099C5.83768 9.86566 5.752 9.83333 5.66667 9.83333H2.66667C2.48986 9.83333 2.32029 9.90357 2.19526 10.0286C2.07024 10.1536 2 10.3232 2 10.5V13.5C2 13.5853 2.03299 13.6703 2.09766 13.7357C2.22766 13.8657 2.43901 13.8657 2.56901 13.7357L3.66536 12.6393C4.75711 13.7836 6.29696 14.5 8 14.5C11.0522 14.5 13.5796 12.2064 13.9492 9.2487C13.9622 9.1548 13.955 9.05922 13.928 8.96833C13.9011 8.87745 13.8552 8.79334 13.7932 8.72163C13.7312 8.64991 13.6546 8.59224 13.5686 8.55245C13.4826 8.51266 13.3891 8.49167 13.2943 8.49089Z",fill:"#595959"}))},y.createElement(G,{size:"p2",color:V.colors.gray800},i("childCard.menu.switch"))),y.createElement(N.Item,{onClick:n,icon:y.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9564 8.56545C15.7745 7.46727 14.9673 6.57273 13.9127 6.26C13.5273 5.44545 12.9818 4.73273 12.32 4.14364C11.1709 3.11818 9.65818 2.5 8 2.5C6.34182 2.5 4.82909 3.11818 3.68 4.14364C3.01091 4.73273 2.46545 5.45273 2.08727 6.26C1.03273 6.57273 0.225455 7.46 0.0436364 8.56545C0.0145455 8.71818 0 8.87818 0 9.04545C0 9.21273 0.0145455 9.37273 0.0436364 9.52545C0.225455 10.6236 1.03273 11.5182 2.08727 11.8309C2.46545 12.6382 3.01091 13.3509 3.66545 13.9327C4.81455 14.9655 6.33455 15.5909 8 15.5909C9.66545 15.5909 11.1855 14.9655 12.3418 13.9327C12.9964 13.3509 13.5418 12.6309 13.92 11.8309C14.9673 11.5182 15.7745 10.6309 15.9564 9.52545C15.9855 9.37273 16 9.21273 16 9.04545C16 8.87818 15.9855 8.71818 15.9564 8.56545ZM6.18182 7.04545C5.67974 7.04545 5.27273 7.45247 5.27273 7.95455C5.27273 8.45662 5.67974 8.86364 6.18182 8.86364C6.6839 8.86364 7.09091 8.45662 7.09091 7.95455C7.09091 7.45247 6.6839 7.04545 6.18182 7.04545ZM9.81818 7.04545C9.3161 7.04545 8.90909 7.45247 8.90909 7.95455C8.90909 8.45662 9.3161 8.86364 9.81818 8.86364C10.3203 8.86364 10.7273 8.45662 10.7273 7.95455C10.7273 7.45247 10.3203 7.04545 9.81818 7.04545ZM5.01821 10.5H10.9818C11.1128 10.5 11.2073 10.6455 11.1491 10.7691C10.5455 11.9109 9.36002 12.6818 8.00002 12.6818C6.64002 12.6818 5.45457 11.9109 4.85093 10.7691C4.78548 10.6455 4.88002 10.5 5.01821 10.5ZM12.9538 10.4875C12.9991 10.4938 13.0435 10.5 13.0909 10.5C13.8909 10.5 14.5455 9.84545 14.5455 9.04545C14.5455 8.24545 13.8909 7.59091 13.0909 7.59091C13.0435 7.59091 12.9991 7.5971 12.9538 7.60343C12.9297 7.60679 12.9053 7.6102 12.88 7.61273C12.7345 7.12545 12.5236 6.67455 12.2545 6.26C11.3455 4.87091 9.78182 3.95455 8 3.95455C6.21818 3.95455 4.65455 4.87091 3.74545 6.26C3.47636 6.67455 3.26545 7.12545 3.12 7.61273C3.09473 7.6102 3.07033 7.60679 3.0462 7.60343C3.0009 7.5971 2.95654 7.59091 2.90909 7.59091C2.10909 7.59091 1.45455 8.24545 1.45455 9.04545C1.45455 9.84545 2.10909 10.5 2.90909 10.5C2.95654 10.5 3.0009 10.4938 3.0462 10.4875C3.07033 10.4841 3.09473 10.4807 3.12 10.4782C3.26545 10.9655 3.47636 11.4164 3.74545 11.8309C4.65455 13.22 6.21818 14.1364 8 14.1364C9.78182 14.1364 11.3455 13.22 12.2545 11.8309C12.5236 11.4164 12.7345 10.9655 12.88 10.4782C12.9053 10.4807 12.9297 10.4841 12.9538 10.4875Z",fill:"#595959"}),y.createElement("path",{d:"M2.5 2V1C2.5 0.725 2.275 0.5 2 0.5C1.725 0.5 1.5 0.725 1.5 1V2H0.5C0.225 2 0 2.225 0 2.5C0 2.775 0.225 3 0.5 3H1.5V4C1.5 4.275 1.725 4.5 2 4.5C2.275 4.5 2.5 4.275 2.5 4V3H3.5C3.775 3 4 2.775 4 2.5C4 2.225 3.775 2 3.5 2H2.5Z",fill:"#595959"}))},y.createElement(G,{size:"p2",color:V.colors.gray800},i("childCard.menu.add"))),y.createElement(N.Item,{onClick:o,icon:y.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M6.66699 1.83301L6.00033 2.49967H3.33366C2.93366 2.49967 2.66699 2.76634 2.66699 3.16634C2.66699 3.56634 2.93366 3.83301 3.33366 3.83301H4.66699H11.3337H12.667C13.067 3.83301 13.3337 3.56634 13.3337 3.16634C13.3337 2.76634 13.067 2.49967 12.667 2.49967H10.0003L9.33366 1.83301H6.66699ZM3.33366 5.16634V13.833C3.33366 14.5663 3.93366 15.1663 4.66699 15.1663H11.3337C12.067 15.1663 12.667 14.5663 12.667 13.833V5.16634H3.33366ZM6.00033 6.49967C6.40033 6.49967 6.66699 6.76634 6.66699 7.16634V13.1663C6.66699 13.5663 6.40033 13.833 6.00033 13.833C5.60033 13.833 5.33366 13.5663 5.33366 13.1663V7.16634C5.33366 6.76634 5.60033 6.49967 6.00033 6.49967ZM10.0003 6.49967C10.4003 6.49967 10.667 6.76634 10.667 7.16634V13.1663C10.667 13.5663 10.4003 13.833 10.0003 13.833C9.60033 13.833 9.33366 13.5663 9.33366 13.1663V7.16634C9.33366 6.76634 9.60033 6.49967 10.0003 6.49967Z",fill:"#F44D2C"}))},y.createElement(G,{size:"p2",color:V.colors.red600},i("childCard.menu.remove",{name:t})))))},F=function(e,t){if(e)if(e.year<1){if(0===e.month)switch(e.week){case 0:case 1:return t("childCard.age.oneWeek");default:return t("childCard.age.week",{weeks:e.week})}if(1===e.month)return t("childCard.age.oneMonth");if(e.month>1)return t("childCard.age.months",{month:e.month})}else{if(1===e.year)return t("childCard.age.oneYear");if(0===e.month)return t("childCard.age.yearNoMonth",{year:e.year});if(e.month>0)return t("childCard.age.yearMonth",{year:e.year,month:e.month})}},W=function(e){var t=e.name,a=e.gender,r=e.age,l=e.isLoggedIn,n=void 0!==l&&l,o=e.showMenu,i=void 0!==o&&o,C=e.onEdit,m=e.onSwitch,s=e.onAdd,h=e.onRemove,g=e.className,p=e.siteType,w=S().t,u=x(!1),v=u[0],L=u[1],b="marryBaby"===p;return y.createElement(c,{className:g,"data-theme":p},b?y.createElement(y.Fragment,null,y.createElement("div",{"data-testid":"gender"},a===H.Boy?y.createElement(d.BabyBoyMB,{"data-testid":"boy",id:"boy"}):y.createElement(d.BabyGirlMB,{"data-testid":"girl",id:"girl"})),y.createElement("div",{className:"information"},y.createElement(E,{type:"subtitle-1",color:V.mbColors.dark},D(t)||w("childCard.noName")),y.createElement("div",{className:"detail"},y.createElement("div",null,a===H.Boy?y.createElement(d.GenderBoy,null):y.createElement(d.GenderGirl,null),y.createElement(E,{type:"bodytext-2",color:V.mbColors.gray},a)),y.createElement("div",null,y.createElement(d.Calendar,{size:16}),r&&y.createElement(E,{type:"bodytext-2",color:V.mbColors.gray},F(r,w)))))):y.createElement(y.Fragment,null,y.createElement("div",{"data-testid":"gender"},a===H.Boy?y.createElement(d.Boy,{"data-testid":"boy",id:"boy"}):y.createElement(d.Girl,{"data-testid":"girl",id:"girl"})),y.createElement("div",{className:"information"},y.createElement(_,{tag:"h5",fontWeight:"bold",color:V.colors.gray800},D(t)||w("childCard.noName")),y.createElement("div",{className:"detail"},y.createElement("div",null,a===H.Boy?y.createElement(d.GenderBoy,null):y.createElement(d.GenderGirl,null),y.createElement(G,{size:"p3",color:V.colors.gray800,style:{textTransform:"capitalize"}},a)),y.createElement("div",null,y.createElement(d.Calendar,{size:16}),r&&y.createElement(G,{size:"p3",color:V.colors.gray800},F(r,w)))))),i&&n&&y.createElement(f,null,y.createElement(d.Kebab,{onClick:function(){return L((function(e){return!e}))}}),v&&y.createElement(T,{name:t,onClose:function(){return L(!1)},onEdit:function(){L(!1),C()},onSwitch:function(){L(!1),m()},onAdd:function(){L(!1),s()},onRemove:function(){L(!1),h()}})))},O=function(e,t){return e&&"NaN"!==e?e+" "+(t||""):"--"},Y=function(e){var t=e.measurementDate,a=void 0===t?new Date:t,r=e.weight,l=e.height,n=e.head,o=e.onEdit,i=e.birthday,C=e.dateFormat,c=void 0===C?"dd/MM/yyyy":C,m=e.locale;void 0===m&&Z.PhilippinesEnglish;var s=S().t;return y.createElement(g,{onClick:o},y.createElement("div",{className:"time"},y.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M5.64421 0.666016C5.27621 0.666016 4.97754 0.964682 4.97754 1.33268V1.99935H4.31087C3.57754 1.99935 2.97754 2.59935 2.97754 3.33268V12.666C2.97754 13.3993 3.57754 13.9993 4.31087 13.9993H13.6442C14.3775 13.9993 14.9775 13.3993 14.9775 12.666V3.33268C14.9775 2.59935 14.3775 1.99935 13.6442 1.99935H12.9775V1.33268C12.9775 0.964682 12.6789 0.666016 12.3109 0.666016C11.9429 0.666016 11.6442 0.964682 11.6442 1.33268V1.99935H6.31087V1.33268C6.31087 0.964682 6.01221 0.666016 5.64421 0.666016ZM4.31087 5.33268H13.6442V11.9993C13.6442 12.3673 13.3455 12.666 12.9775 12.666H4.97754C4.60954 12.666 4.31087 12.3673 4.31087 11.9993V5.33268Z",fill:"#8C8C8C"})),y.createElement(G,{size:"p3",color:V.colors.gray600},"".concat(z(a,c)," (").concat(F(R(i,a),s),")")),y.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"edit-button"},y.createElement("path",{d:"M12.7721 1.33398C12.2911 1.33398 11.8102 1.51773 11.443 1.88607L10.6643 2.66732L13.3224 5.33398L14.1011 4.55273C14.8348 3.81673 14.8348 2.62273 14.1011 1.88607C13.734 1.51773 13.253 1.33398 12.7721 1.33398ZM9.66748 3.66732L2.02539 11.334V14.0007H4.68351L12.3256 6.33398L9.66748 3.66732Z",fill:"#8C8C8C"}))),y.createElement("div",{className:"record"},y.createElement("div",{className:"record-item"},y.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("path",{d:"M8.44401 9.86602C8.44401 9.57146 8.68279 9.33268 8.97734 9.33268C9.2719 9.33268 9.51068 9.57146 9.51068 9.86602V11.466C9.51068 11.7606 9.2719 11.9993 8.97734 11.9993C8.68279 11.9993 8.44401 11.7606 8.44401 11.466V9.86602Z",fill:"#8C8C8C"}),y.createElement("path",{d:"M8.17595 3.05319C7.96767 3.26147 7.96767 3.59916 8.17595 3.80744L8.83592 4.46741C9.0442 4.67569 9.38189 4.67569 9.59017 4.46741C9.79844 4.25913 9.79844 3.92144 9.59017 3.71316L8.9302 3.05319C8.72192 2.84491 8.38423 2.84492 8.17595 3.05319Z",fill:"#8C8C8C"}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2941 3.66435C12.1261 1.98071 10.7053 0.666016 8.97738 0.666016C7.2495 0.666016 5.82868 1.9807 5.66067 3.66434L3.67054 3.86336C2.92499 3.93791 2.38724 4.61197 2.48017 5.35545L3.498 13.4981C3.5814 14.1653 4.1486 14.666 4.82104 14.666H13.1336C13.806 14.666 14.3732 14.1653 14.4567 13.4981L15.4745 5.35545C15.5674 4.61197 15.0297 3.93791 14.2841 3.86336L12.2941 3.66435ZM12.1607 4.991C11.7386 6.34768 10.473 7.33268 8.97738 7.33268C7.48176 7.33268 6.2162 6.34767 5.79403 4.99099L3.80321 5.19007L4.82104 13.3327L13.1336 13.3327L14.1514 5.19007L12.1607 4.991ZM10.9774 3.99935C10.9774 5.10392 10.0819 5.99935 8.97738 5.99935C7.87281 5.99935 6.97738 5.10392 6.97738 3.99935C6.97738 2.89478 7.87281 1.99935 8.97738 1.99935C10.0819 1.99935 10.9774 2.89478 10.9774 3.99935Z",fill:"#8C8C8C"})),y.createElement(G,{size:"s3",color:V.colors.gray800,type:"semiBold"},O(A(r),"kg"))),y.createElement("div",{className:"record-item"},y.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("g",{clipPath:"url(#clip0_855_82991)"},y.createElement("path",{d:"M12.6055 13.9993L12.6055 1.99935C12.6055 1.26602 12.0055 0.666016 11.2721 0.666016L5.9388 0.666015C5.20547 0.666015 4.60547 1.26602 4.60547 1.99935L4.60547 13.9993C4.60547 14.7327 5.20547 15.3327 5.9388 15.3327L11.2721 15.3327C12.0055 15.3327 12.6055 14.7327 12.6055 13.9993ZM5.9388 13.9993L5.9388 1.99935L11.2721 1.99935L11.2721 3.33268L8.60547 3.33268L8.60547 4.66602L11.2721 4.66602L11.2721 5.99935L8.60547 5.99935L8.60547 7.33268L11.2721 7.33268L11.2721 8.66602L8.60547 8.66601L8.60547 9.99935L11.2721 9.99935L11.2721 11.3327L8.60547 11.3327L8.60547 12.666L11.2721 12.666L11.2721 13.9993L5.9388 13.9993Z",fill:"#8C8C8C"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0_855_82991"},y.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(16.6055) rotate(90)"})))),y.createElement(G,{size:"s3",color:V.colors.gray800,type:"semiBold"},O(A(l),"cm"))),y.createElement("div",{className:"record-item"},y.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y.createElement("g",{clipPath:"url(#clip0_855_82994)"},y.createElement("path",{d:"M9.90072 7.83268C10.361 7.83268 10.734 7.45959 10.734 6.99935C10.734 6.53911 10.361 6.16602 9.90072 6.16602C9.44048 6.16602 9.06738 6.53911 9.06738 6.99935C9.06738 7.45959 9.44048 7.83268 9.90072 7.83268Z",fill:"#8C8C8C"}),y.createElement("path",{d:"M6.56771 7.83268C7.02795 7.83268 7.40104 7.45959 7.40104 6.99935C7.40104 6.53911 7.02795 6.16602 6.56771 6.16602C6.10747 6.16602 5.73438 6.53911 5.73438 6.99935C5.73438 7.45959 6.10747 7.83268 6.56771 7.83268Z",fill:"#8C8C8C"}),y.createElement("path",{d:"M15.528 7.56C15.3614 6.55333 14.6214 5.73333 13.6547 5.44667C13.3014 4.7 12.8014 4.04667 12.1947 3.50667C11.1414 2.56667 9.7547 2 8.2347 2C6.7147 2 5.32803 2.56667 4.2747 3.50667C3.66137 4.04667 3.16137 4.70667 2.8147 5.44667C1.84803 5.73333 1.10803 6.54667 0.941367 7.56C0.9147 7.7 0.901367 7.84667 0.901367 8C0.901367 8.15333 0.9147 8.3 0.941367 8.44C1.10803 9.44667 1.84803 10.2667 2.8147 10.5533C3.16137 11.2933 3.66137 11.9467 4.26137 12.48C5.3147 13.4267 6.70803 14 8.2347 14C9.76137 14 11.1547 13.4267 12.2147 12.48C12.8147 11.9467 13.3147 11.2867 13.6614 10.5533C14.6214 10.2667 15.3614 9.45333 15.528 8.44C15.5547 8.3 15.568 8.15333 15.568 8C15.568 7.84667 15.5547 7.7 15.528 7.56ZM12.9014 9.33333C12.8347 9.33333 12.7747 9.32 12.708 9.31333C12.5747 9.76 12.3814 10.1733 12.1347 10.5533C11.3014 11.8267 9.86803 12.6667 8.2347 12.6667C6.60137 12.6667 5.16803 11.8267 4.3347 10.5533C4.08803 10.1733 3.8947 9.76 3.76137 9.31333C3.6947 9.32 3.6347 9.33333 3.56803 9.33333C2.8347 9.33333 2.2347 8.73333 2.2347 8C2.2347 7.26667 2.8347 6.66667 3.56803 6.66667C3.6347 6.66667 3.6947 6.68 3.76137 6.68667C3.8947 6.24 4.08803 5.82667 4.3347 5.44667C5.16803 4.17333 6.60137 3.33333 8.2347 3.33333C9.86803 3.33333 11.3014 4.17333 12.1347 5.44667C12.3814 5.82667 12.5747 6.24 12.708 6.68667C12.7747 6.68 12.8347 6.66667 12.9014 6.66667C13.6347 6.66667 14.2347 7.26667 14.2347 8C14.2347 8.73333 13.6347 9.33333 12.9014 9.33333ZM8.2347 11.3333C9.5747 11.3333 10.728 10.5133 11.2347 9.33333H5.2347C5.74137 10.5133 6.8947 11.3333 8.2347 11.3333Z",fill:"#8C8C8C"})),y.createElement("defs",null,y.createElement("clipPath",{id:"clip0_855_82994"},y.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.234375)"})))),y.createElement(G,{size:"s3",color:V.colors.gray800,type:"semiBold"},O(A(n),"cm")))))};export{I as BabyGrowthLegend,Y as BabyGrowthRecord,W as ChildCard};
1
+ import{S as e,c as a,d as C,e as c,I as d,a as E,H as f,f as g,g as y}from"./index-788cb7c8.js";export{l as BabyGrowthChart,n as BabyGrowthChartPercentile,o as BabyGrowthChartZScore,B as BabyGrowthChooseProfileDrawer,b as BabyGrowthGender,k as BabyGrowthProfileRadio,h as BabyGrowthSwitch,i as BabyGrowthSwitchChart,j as BabyGrowthTooltip,L as LABELS_PERCENTILE,m as LABELS_Z_SCORE,r as divideChartData,q as generateGrowthChart,v as generateXAxisTicks,p as getAxisYDomain,w as paintAxis,t as refineDataWithDot,s as refineDataWithLine,u as transformDataToChart}from"./index-788cb7c8.js";import M,{useRef as x,useState as Z}from"react";import{L as H,G as V}from"./Locale-69030fff.js";import{t as G}from"./theme-a50a1aa5.js";import{T as N,M as z}from"./index.styled-66f12014.js";import{format as S}from"date-fns";import{u as _}from"./useTranslations-6caddf1f.js";import"./gAssets.js";import{n as D}from"./screenSizeContext-1852eabc.js";import"react-range";import"@mantine/core";import"styled-components";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"lodash/debounce";import{u as P}from"./useOutsideClick-3faddcd8.js";import{a as R,l as A}from"./localizeNumberFormat-77c129ef.js";import"./tslib.es6-dcf36680.js";import"./index-b6575475.js";import"./translationsContext-17d7ffe4.js";import"string-format";import"./useScrollbarSize-99db33e1.js";import"react-dom";import"recharts";import"lodash";import"vanilla-lazyload";var I=function(t){var r=t.legends,l=t.locale;return M.createElement(e,null,r.map((function(e,t){return M.createElement(a,{key:t},M.createElement("span",{className:"dot",style:{backgroundColor:e.color}}),M.createElement(N,{size:"n1",color:G.colors.gray800},l===H.Indonesia?e["z-score"]:e.text))})))},T=function(e){var t=e.name,a=e.onClose,r=e.onEdit,l=e.onSwitch,n=e.onAdd,o=e.onRemove,i=_().t,c=x();return P(c,a),M.createElement("div",{ref:c},M.createElement(C,{width:250},M.createElement(z.Item,{onClick:r,icon:M.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{d:"M12.7812 1.83301C12.2987 1.83301 11.8162 2.01676 11.4479 2.38509L10.6667 3.16634L13.3333 5.83301L14.1146 5.05176C14.8506 4.31576 14.8506 3.12176 14.1146 2.38509C13.7463 2.01676 13.2638 1.83301 12.7812 1.83301ZM9.66667 4.16634L2 11.833V14.4997H4.66667L12.3333 6.83301L9.66667 4.16634Z",fill:"#595959"}))},M.createElement(N,{size:"p2",color:G.colors.gray800},i("childCard.menu.edit",{name:t}))),M.createElement(z.Item,{onClick:l,icon:M.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{d:"M8 2.5C4.9478 2.5 2.4204 4.79359 2.05078 7.7513C2.03763 7.83928 2.04222 7.929 2.06428 8.01518C2.08634 8.10136 2.12542 8.18226 2.17922 8.2531C2.23303 8.32394 2.30046 8.3833 2.37756 8.42768C2.45465 8.47206 2.53985 8.50057 2.62813 8.51152C2.71642 8.52247 2.806 8.51564 2.8916 8.49143C2.9772 8.46723 3.05709 8.42614 3.12657 8.37059C3.19605 8.31503 3.2537 8.24613 3.29615 8.16795C3.33859 8.08978 3.36496 8.00389 3.3737 7.91536C3.66141 5.61307 5.61354 3.83333 8 3.83333C9.34288 3.83333 10.5434 4.39987 11.3919 5.30339L10.0977 6.59766C9.96766 6.72766 9.96766 6.93901 10.0977 7.06901C10.1623 7.13434 10.248 7.16667 10.3333 7.16667H13.3333C13.5101 7.16667 13.6797 7.09643 13.8047 6.9714C13.9298 6.84638 14 6.67681 14 6.5V3.5C14 3.41467 13.967 3.32966 13.9023 3.26432C13.7723 3.13432 13.561 3.13432 13.431 3.26432L12.3359 4.35938C11.2437 3.21415 9.7037 2.5 8 2.5ZM13.2943 8.49089C13.1292 8.48959 12.9695 8.54959 12.8461 8.65928C12.7227 8.76896 12.6444 8.92053 12.6263 9.08464C12.3386 11.3869 10.3865 13.1667 8 13.1667C6.65713 13.1667 5.45884 12.5994 4.60938 11.6953L5.90234 10.4023C6.03234 10.2723 6.03234 10.061 5.90234 9.93099C5.83768 9.86566 5.752 9.83333 5.66667 9.83333H2.66667C2.48986 9.83333 2.32029 9.90357 2.19526 10.0286C2.07024 10.1536 2 10.3232 2 10.5V13.5C2 13.5853 2.03299 13.6703 2.09766 13.7357C2.22766 13.8657 2.43901 13.8657 2.56901 13.7357L3.66536 12.6393C4.75711 13.7836 6.29696 14.5 8 14.5C11.0522 14.5 13.5796 12.2064 13.9492 9.2487C13.9622 9.1548 13.955 9.05922 13.928 8.96833C13.9011 8.87745 13.8552 8.79334 13.7932 8.72163C13.7312 8.64991 13.6546 8.59224 13.5686 8.55245C13.4826 8.51266 13.3891 8.49167 13.2943 8.49089Z",fill:"#595959"}))},M.createElement(N,{size:"p2",color:G.colors.gray800},i("childCard.menu.switch"))),M.createElement(z.Item,{onClick:n,icon:M.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9564 8.56545C15.7745 7.46727 14.9673 6.57273 13.9127 6.26C13.5273 5.44545 12.9818 4.73273 12.32 4.14364C11.1709 3.11818 9.65818 2.5 8 2.5C6.34182 2.5 4.82909 3.11818 3.68 4.14364C3.01091 4.73273 2.46545 5.45273 2.08727 6.26C1.03273 6.57273 0.225455 7.46 0.0436364 8.56545C0.0145455 8.71818 0 8.87818 0 9.04545C0 9.21273 0.0145455 9.37273 0.0436364 9.52545C0.225455 10.6236 1.03273 11.5182 2.08727 11.8309C2.46545 12.6382 3.01091 13.3509 3.66545 13.9327C4.81455 14.9655 6.33455 15.5909 8 15.5909C9.66545 15.5909 11.1855 14.9655 12.3418 13.9327C12.9964 13.3509 13.5418 12.6309 13.92 11.8309C14.9673 11.5182 15.7745 10.6309 15.9564 9.52545C15.9855 9.37273 16 9.21273 16 9.04545C16 8.87818 15.9855 8.71818 15.9564 8.56545ZM6.18182 7.04545C5.67974 7.04545 5.27273 7.45247 5.27273 7.95455C5.27273 8.45662 5.67974 8.86364 6.18182 8.86364C6.6839 8.86364 7.09091 8.45662 7.09091 7.95455C7.09091 7.45247 6.6839 7.04545 6.18182 7.04545ZM9.81818 7.04545C9.3161 7.04545 8.90909 7.45247 8.90909 7.95455C8.90909 8.45662 9.3161 8.86364 9.81818 8.86364C10.3203 8.86364 10.7273 8.45662 10.7273 7.95455C10.7273 7.45247 10.3203 7.04545 9.81818 7.04545ZM5.01821 10.5H10.9818C11.1128 10.5 11.2073 10.6455 11.1491 10.7691C10.5455 11.9109 9.36002 12.6818 8.00002 12.6818C6.64002 12.6818 5.45457 11.9109 4.85093 10.7691C4.78548 10.6455 4.88002 10.5 5.01821 10.5ZM12.9538 10.4875C12.9991 10.4938 13.0435 10.5 13.0909 10.5C13.8909 10.5 14.5455 9.84545 14.5455 9.04545C14.5455 8.24545 13.8909 7.59091 13.0909 7.59091C13.0435 7.59091 12.9991 7.5971 12.9538 7.60343C12.9297 7.60679 12.9053 7.6102 12.88 7.61273C12.7345 7.12545 12.5236 6.67455 12.2545 6.26C11.3455 4.87091 9.78182 3.95455 8 3.95455C6.21818 3.95455 4.65455 4.87091 3.74545 6.26C3.47636 6.67455 3.26545 7.12545 3.12 7.61273C3.09473 7.6102 3.07033 7.60679 3.0462 7.60343C3.0009 7.5971 2.95654 7.59091 2.90909 7.59091C2.10909 7.59091 1.45455 8.24545 1.45455 9.04545C1.45455 9.84545 2.10909 10.5 2.90909 10.5C2.95654 10.5 3.0009 10.4938 3.0462 10.4875C3.07033 10.4841 3.09473 10.4807 3.12 10.4782C3.26545 10.9655 3.47636 11.4164 3.74545 11.8309C4.65455 13.22 6.21818 14.1364 8 14.1364C9.78182 14.1364 11.3455 13.22 12.2545 11.8309C12.5236 11.4164 12.7345 10.9655 12.88 10.4782C12.9053 10.4807 12.9297 10.4841 12.9538 10.4875Z",fill:"#595959"}),M.createElement("path",{d:"M2.5 2V1C2.5 0.725 2.275 0.5 2 0.5C1.725 0.5 1.5 0.725 1.5 1V2H0.5C0.225 2 0 2.225 0 2.5C0 2.775 0.225 3 0.5 3H1.5V4C1.5 4.275 1.725 4.5 2 4.5C2.275 4.5 2.5 4.275 2.5 4V3H3.5C3.775 3 4 2.775 4 2.5C4 2.225 3.775 2 3.5 2H2.5Z",fill:"#595959"}))},M.createElement(N,{size:"p2",color:G.colors.gray800},i("childCard.menu.add"))),M.createElement(z.Item,{onClick:o,icon:M.createElement("svg",{width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{d:"M6.66699 1.83301L6.00033 2.49967H3.33366C2.93366 2.49967 2.66699 2.76634 2.66699 3.16634C2.66699 3.56634 2.93366 3.83301 3.33366 3.83301H4.66699H11.3337H12.667C13.067 3.83301 13.3337 3.56634 13.3337 3.16634C13.3337 2.76634 13.067 2.49967 12.667 2.49967H10.0003L9.33366 1.83301H6.66699ZM3.33366 5.16634V13.833C3.33366 14.5663 3.93366 15.1663 4.66699 15.1663H11.3337C12.067 15.1663 12.667 14.5663 12.667 13.833V5.16634H3.33366ZM6.00033 6.49967C6.40033 6.49967 6.66699 6.76634 6.66699 7.16634V13.1663C6.66699 13.5663 6.40033 13.833 6.00033 13.833C5.60033 13.833 5.33366 13.5663 5.33366 13.1663V7.16634C5.33366 6.76634 5.60033 6.49967 6.00033 6.49967ZM10.0003 6.49967C10.4003 6.49967 10.667 6.76634 10.667 7.16634V13.1663C10.667 13.5663 10.4003 13.833 10.0003 13.833C9.60033 13.833 9.33366 13.5663 9.33366 13.1663V7.16634C9.33366 6.76634 9.60033 6.49967 10.0003 6.49967Z",fill:"#F44D2C"}))},M.createElement(N,{size:"p2",color:G.colors.red600},i("childCard.menu.remove",{name:t})))))},F=function(e,t){if(e)if(e.year<1){if(0===e.month)switch(e.week){case 0:case 1:return t("childCard.age.oneWeek");default:return t("childCard.age.week",{weeks:e.week})}if(1===e.month)return t("childCard.age.oneMonth");if(e.month>1)return t("childCard.age.months",{month:e.month})}else{if(1===e.year)return t("childCard.age.oneYear");if(0===e.month)return t("childCard.age.yearNoMonth",{year:e.year});if(e.month>0)return t("childCard.age.yearMonth",{year:e.year,month:e.month})}},W=function(e){var t=e.name,a=e.gender,r=e.age,l=e.isLoggedIn,n=void 0!==l&&l,o=e.showMenu,i=void 0!==o&&o,C=e.onEdit,m=e.onSwitch,s=e.onAdd,h=e.onRemove,w=e.className,p=e.siteType,u=_().t,y=Z(!1),v=y[0],L=y[1],b="marryBaby"===p;return M.createElement(c,{className:w,"data-theme":p},b?M.createElement(M.Fragment,null,M.createElement("div",{"data-testid":"gender"},a===V.Boy?M.createElement(d.BabyBoyMB,{"data-testid":"boy",id:"boy"}):M.createElement(d.BabyGirlMB,{"data-testid":"girl",id:"girl"})),M.createElement("div",{className:"information"},M.createElement(E,{type:"subtitle-1",color:G.mbColors.dark},D(t)||u("childCard.noName")),M.createElement("div",{className:"detail"},M.createElement("div",null,a===V.Boy?M.createElement(d.GenderBoy,null):M.createElement(d.GenderGirl,null),M.createElement(E,{type:"bodytext-2",color:G.mbColors.gray},a)),M.createElement("div",null,M.createElement(d.Calendar,{size:16}),r&&M.createElement(E,{type:"bodytext-2",color:G.mbColors.gray},F(r,u)))))):M.createElement(M.Fragment,null,M.createElement("div",{"data-testid":"gender"},a===V.Boy?M.createElement(d.Boy,{"data-testid":"boy",id:"boy"}):M.createElement(d.Girl,{"data-testid":"girl",id:"girl"})),M.createElement("div",{className:"information"},M.createElement(f,{tag:"h5",fontWeight:"bold",color:G.colors.gray800},D(t)||u("childCard.noName")),M.createElement("div",{className:"detail"},M.createElement("div",null,a===V.Boy?M.createElement(d.GenderBoy,null):M.createElement(d.GenderGirl,null),M.createElement(N,{size:"p3",color:G.colors.gray800,style:{textTransform:"capitalize"}},a)),M.createElement("div",null,M.createElement(d.Calendar,{size:16}),r&&M.createElement(N,{size:"p3",color:G.colors.gray800},F(r,u)))))),i&&n&&M.createElement(g,null,M.createElement(d.Kebab,{onClick:function(){return L((function(e){return!e}))}}),v&&M.createElement(T,{name:t,onClose:function(){return L(!1)},onEdit:function(){L(!1),C()},onSwitch:function(){L(!1),m()},onAdd:function(){L(!1),s()},onRemove:function(){L(!1),h()}})))},O=function(e,t){return e&&"NaN"!==e?e+" "+(t||""):"--"},Y=function(e){var t=e.measurementDate,a=void 0===t?new Date:t,r=e.weight,l=e.height,n=e.head,o=e.onEdit,i=e.birthday,C=e.dateFormat,c=void 0===C?"dd/MM/yyyy":C,m=e.locale;void 0===m&&H.PhilippinesEnglish;var s=_().t;return M.createElement(y,{onClick:o},M.createElement("div",{className:"time"},M.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{d:"M5.64421 0.666016C5.27621 0.666016 4.97754 0.964682 4.97754 1.33268V1.99935H4.31087C3.57754 1.99935 2.97754 2.59935 2.97754 3.33268V12.666C2.97754 13.3993 3.57754 13.9993 4.31087 13.9993H13.6442C14.3775 13.9993 14.9775 13.3993 14.9775 12.666V3.33268C14.9775 2.59935 14.3775 1.99935 13.6442 1.99935H12.9775V1.33268C12.9775 0.964682 12.6789 0.666016 12.3109 0.666016C11.9429 0.666016 11.6442 0.964682 11.6442 1.33268V1.99935H6.31087V1.33268C6.31087 0.964682 6.01221 0.666016 5.64421 0.666016ZM4.31087 5.33268H13.6442V11.9993C13.6442 12.3673 13.3455 12.666 12.9775 12.666H4.97754C4.60954 12.666 4.31087 12.3673 4.31087 11.9993V5.33268Z",fill:"#8C8C8C"})),M.createElement(N,{size:"p3",color:G.colors.gray600},"".concat(S(a,c)," (").concat(F(R(i,a),s),")")),M.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"edit-button"},M.createElement("path",{d:"M12.7721 1.33398C12.2911 1.33398 11.8102 1.51773 11.443 1.88607L10.6643 2.66732L13.3224 5.33398L14.1011 4.55273C14.8348 3.81673 14.8348 2.62273 14.1011 1.88607C13.734 1.51773 13.253 1.33398 12.7721 1.33398ZM9.66748 3.66732L2.02539 11.334V14.0007H4.68351L12.3256 6.33398L9.66748 3.66732Z",fill:"#8C8C8C"}))),M.createElement("div",{className:"record"},M.createElement("div",{className:"record-item"},M.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("path",{d:"M8.44401 9.86602C8.44401 9.57146 8.68279 9.33268 8.97734 9.33268C9.2719 9.33268 9.51068 9.57146 9.51068 9.86602V11.466C9.51068 11.7606 9.2719 11.9993 8.97734 11.9993C8.68279 11.9993 8.44401 11.7606 8.44401 11.466V9.86602Z",fill:"#8C8C8C"}),M.createElement("path",{d:"M8.17595 3.05319C7.96767 3.26147 7.96767 3.59916 8.17595 3.80744L8.83592 4.46741C9.0442 4.67569 9.38189 4.67569 9.59017 4.46741C9.79844 4.25913 9.79844 3.92144 9.59017 3.71316L8.9302 3.05319C8.72192 2.84491 8.38423 2.84492 8.17595 3.05319Z",fill:"#8C8C8C"}),M.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2941 3.66435C12.1261 1.98071 10.7053 0.666016 8.97738 0.666016C7.2495 0.666016 5.82868 1.9807 5.66067 3.66434L3.67054 3.86336C2.92499 3.93791 2.38724 4.61197 2.48017 5.35545L3.498 13.4981C3.5814 14.1653 4.1486 14.666 4.82104 14.666H13.1336C13.806 14.666 14.3732 14.1653 14.4567 13.4981L15.4745 5.35545C15.5674 4.61197 15.0297 3.93791 14.2841 3.86336L12.2941 3.66435ZM12.1607 4.991C11.7386 6.34768 10.473 7.33268 8.97738 7.33268C7.48176 7.33268 6.2162 6.34767 5.79403 4.99099L3.80321 5.19007L4.82104 13.3327L13.1336 13.3327L14.1514 5.19007L12.1607 4.991ZM10.9774 3.99935C10.9774 5.10392 10.0819 5.99935 8.97738 5.99935C7.87281 5.99935 6.97738 5.10392 6.97738 3.99935C6.97738 2.89478 7.87281 1.99935 8.97738 1.99935C10.0819 1.99935 10.9774 2.89478 10.9774 3.99935Z",fill:"#8C8C8C"})),M.createElement(N,{size:"s3",color:G.colors.gray800,type:"semiBold"},O(A(r),"kg"))),M.createElement("div",{className:"record-item"},M.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("g",{clipPath:"url(#clip0_855_82991)"},M.createElement("path",{d:"M12.6055 13.9993L12.6055 1.99935C12.6055 1.26602 12.0055 0.666016 11.2721 0.666016L5.9388 0.666015C5.20547 0.666015 4.60547 1.26602 4.60547 1.99935L4.60547 13.9993C4.60547 14.7327 5.20547 15.3327 5.9388 15.3327L11.2721 15.3327C12.0055 15.3327 12.6055 14.7327 12.6055 13.9993ZM5.9388 13.9993L5.9388 1.99935L11.2721 1.99935L11.2721 3.33268L8.60547 3.33268L8.60547 4.66602L11.2721 4.66602L11.2721 5.99935L8.60547 5.99935L8.60547 7.33268L11.2721 7.33268L11.2721 8.66602L8.60547 8.66601L8.60547 9.99935L11.2721 9.99935L11.2721 11.3327L8.60547 11.3327L8.60547 12.666L11.2721 12.666L11.2721 13.9993L5.9388 13.9993Z",fill:"#8C8C8C"})),M.createElement("defs",null,M.createElement("clipPath",{id:"clip0_855_82991"},M.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(16.6055) rotate(90)"})))),M.createElement(N,{size:"s3",color:G.colors.gray800,type:"semiBold"},O(A(l),"cm"))),M.createElement("div",{className:"record-item"},M.createElement("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M.createElement("g",{clipPath:"url(#clip0_855_82994)"},M.createElement("path",{d:"M9.90072 7.83268C10.361 7.83268 10.734 7.45959 10.734 6.99935C10.734 6.53911 10.361 6.16602 9.90072 6.16602C9.44048 6.16602 9.06738 6.53911 9.06738 6.99935C9.06738 7.45959 9.44048 7.83268 9.90072 7.83268Z",fill:"#8C8C8C"}),M.createElement("path",{d:"M6.56771 7.83268C7.02795 7.83268 7.40104 7.45959 7.40104 6.99935C7.40104 6.53911 7.02795 6.16602 6.56771 6.16602C6.10747 6.16602 5.73438 6.53911 5.73438 6.99935C5.73438 7.45959 6.10747 7.83268 6.56771 7.83268Z",fill:"#8C8C8C"}),M.createElement("path",{d:"M15.528 7.56C15.3614 6.55333 14.6214 5.73333 13.6547 5.44667C13.3014 4.7 12.8014 4.04667 12.1947 3.50667C11.1414 2.56667 9.7547 2 8.2347 2C6.7147 2 5.32803 2.56667 4.2747 3.50667C3.66137 4.04667 3.16137 4.70667 2.8147 5.44667C1.84803 5.73333 1.10803 6.54667 0.941367 7.56C0.9147 7.7 0.901367 7.84667 0.901367 8C0.901367 8.15333 0.9147 8.3 0.941367 8.44C1.10803 9.44667 1.84803 10.2667 2.8147 10.5533C3.16137 11.2933 3.66137 11.9467 4.26137 12.48C5.3147 13.4267 6.70803 14 8.2347 14C9.76137 14 11.1547 13.4267 12.2147 12.48C12.8147 11.9467 13.3147 11.2867 13.6614 10.5533C14.6214 10.2667 15.3614 9.45333 15.528 8.44C15.5547 8.3 15.568 8.15333 15.568 8C15.568 7.84667 15.5547 7.7 15.528 7.56ZM12.9014 9.33333C12.8347 9.33333 12.7747 9.32 12.708 9.31333C12.5747 9.76 12.3814 10.1733 12.1347 10.5533C11.3014 11.8267 9.86803 12.6667 8.2347 12.6667C6.60137 12.6667 5.16803 11.8267 4.3347 10.5533C4.08803 10.1733 3.8947 9.76 3.76137 9.31333C3.6947 9.32 3.6347 9.33333 3.56803 9.33333C2.8347 9.33333 2.2347 8.73333 2.2347 8C2.2347 7.26667 2.8347 6.66667 3.56803 6.66667C3.6347 6.66667 3.6947 6.68 3.76137 6.68667C3.8947 6.24 4.08803 5.82667 4.3347 5.44667C5.16803 4.17333 6.60137 3.33333 8.2347 3.33333C9.86803 3.33333 11.3014 4.17333 12.1347 5.44667C12.3814 5.82667 12.5747 6.24 12.708 6.68667C12.7747 6.68 12.8347 6.66667 12.9014 6.66667C13.6347 6.66667 14.2347 7.26667 14.2347 8C14.2347 8.73333 13.6347 9.33333 12.9014 9.33333ZM8.2347 11.3333C9.5747 11.3333 10.728 10.5133 11.2347 9.33333H5.2347C5.74137 10.5133 6.8947 11.3333 8.2347 11.3333Z",fill:"#8C8C8C"})),M.createElement("defs",null,M.createElement("clipPath",{id:"clip0_855_82994"},M.createElement("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.234375)"})))),M.createElement(N,{size:"s3",color:G.colors.gray800,type:"semiBold"},O(A(n),"cm")))))};export{I as BabyGrowthLegend,Y as BabyGrowthRecord,W as ChildCard};
package/build/esm/care.js CHANGED
@@ -1 +1 @@
1
- export{B as BookingSearchBar,t as CareTypes}from"./types-46861be0.js";export{c as CareConstants}from"./constants-a0a981fa.js";import"./tslib.es6-dcf36680.js";import"react";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"./cookieHelper-0e8521c3.js";import"./useTranslations-6caddf1f.js";import"./translationsContext-17d7ffe4.js";import"string-format";import"lodash/debounce";import"./index.styled-520ccc61.js";import"styled-components";import"./theme-a50a1aa5.js";import"./screenSizeContext-1852eabc.js";import"vanilla-lazyload";import"lodash";import"date-fns";import"./Locale-69030fff.js";import"./gAssets.js";import"./index-610bb13c.js";import"react-range";import"@mantine/core";import"react-loading-skeleton";import"react-id-generator";import"lodash/shuffle";import"./useOutsideClick-6004483a.js";
1
+ export{B as BookingSearchBar,t as CareTypes}from"./types-f9648df4.js";export{c as CareConstants}from"./constants-a0a981fa.js";import"./tslib.es6-dcf36680.js";import"react";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"./cookieHelper-0e8521c3.js";import"./useTranslations-6caddf1f.js";import"./translationsContext-17d7ffe4.js";import"string-format";import"lodash/debounce";import"./index.styled-66f12014.js";import"styled-components";import"./theme-a50a1aa5.js";import"./screenSizeContext-1852eabc.js";import"vanilla-lazyload";import"lodash";import"date-fns";import"./Locale-69030fff.js";import"./gAssets.js";import"./useOutsideClick-3faddcd8.js";import"react-range";import"@mantine/core";import"react-loading-skeleton";import"react-id-generator";import"lodash/shuffle";
@@ -1 +1 @@
1
- export{A as Alert,y as AmpNextPage,e as ArticleCard,s as BMICardEmbed,w as BMRCardEmbed,t as BabyGrowthCardEmbed,u as BabyPoopEmbed,B as Badge,a as BorderHeading,f as Breadcrumbs,k as Carousel,g as CategoryCard,C as Checkbox,h as CheckboxGroup,q as CookieAcceptConfirm,z as DateRangePicker,D as DueDateCardEmbed,F as FileDropdown,p as FloatButtonGroup,J as Footer,G as Grid,I as IconText,O as OvulationCardEmbed,x as PWGCardEmbed,P as Pagination,d as Progress,i as ProgressBar,R as RateStars,r as SeoHead,S as Shadow,E as ShareContainer,H as ShareDrawer,j as SideMenu,l as StatisticCard,o as SurveyThankyouCard,v as THRCardEmbed,m as Table,n as Tabs,T as Tag,b as Toggle,U as UnderlinedLink,c as Uploader}from"./index-c351a445.js";export{A as Avatar,D as Dropdown,P as Popup}from"./index-662016a1.js";export{B as Button}from"./index-588deadc.js";export{D as Divider}from"./index-80c700a9.js";export{D as DatePicker,c as DoctorInfo,F as Flag,f as LanguageSwitcher,L as Logo,M as MobileBottomNavigation,e as MobileBottomNavigationIcon,k as NavigationLogoutPopup,l as NavigationProfileButton,N as NavigationV2,P as ProfilePopup,R as Radio,a as RadioGroup,b as ScrollList,S as Slider,d as SurveyQuestionCard,T as ToolsBannerCard,U as UserProfileNavigation,i as UserProfileNavigationHeader,j as UserProfileNavigationStats,g as getNavMenuContent,h as getNavMenuContentWithCache}from"./index-c4d6f618.js";export{H as Heading}from"./index-012ca6e1.js";export{I as Input}from"./index-610bb13c.js";export{C as Container,L as Label,M as Menu,P as PureInput,T as Text,a as TextArea,b as TextDivider}from"./index.styled-520ccc61.js";export{D as Drawer,I as Icon,M as Modal,N as NewBabyProfileRadio,R as RadioImageGroup}from"./index-eab6fcc2.js";import"react";import"./tslib.es6-dcf36680.js";import"./screenSizeContext-1852eabc.js";import"styled-components";import"vanilla-lazyload";import"lodash";import"./theme-a50a1aa5.js";import"react-id-generator";import"keen-slider/react";import"./gAssets.js";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"react-range";import"date-fns";import"./Locale-69030fff.js";import"@mantine/core";import"./translationsContext-17d7ffe4.js";import"string-format";import"lodash/debounce";import"./useTranslations-6caddf1f.js";import"react-hook-form";import"./useHealthToolCache-74a46d69.js";import"./getDynamicHealthTool-831ea86d.js";import"./core-3b861395.js";import"./theme-508eb8b9.js";import"@mantine/dates";import"@mantine/hooks";import"@mantine/carousel";import"./useOutsideClick-6004483a.js";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./getSocialList-e91ed860.js";import"date-fns/locale/hi";import"date-fns/locale/ms";import"date-fns/locale/th";import"./cookieHelper-0e8521c3.js";import"slugify";import"react-day-picker/DayPickerInput";import"react-dom";import"smoothscroll-polyfill";import"./types-f57c9932.js";import"@hookform/resolvers/yup";import"./constants-a0a981fa.js";import"./useScrollbarSize-99db33e1.js";import"recharts";
1
+ export{A as Alert,y as AmpNextPage,e as ArticleCard,s as BMICardEmbed,w as BMRCardEmbed,t as BabyGrowthCardEmbed,u as BabyPoopEmbed,B as Badge,a as BorderHeading,f as Breadcrumbs,k as Carousel,g as CategoryCard,C as Checkbox,h as CheckboxGroup,q as CookieAcceptConfirm,z as DateRangePicker,D as DueDateCardEmbed,F as FileDropdown,p as FloatButtonGroup,J as Footer,G as Grid,I as IconText,O as OvulationCardEmbed,x as PWGCardEmbed,P as Pagination,d as Progress,i as ProgressBar,R as RateStars,r as SeoHead,S as Shadow,E as ShareContainer,H as ShareDrawer,j as SideMenu,l as StatisticCard,o as SurveyThankyouCard,v as THRCardEmbed,m as Table,n as Tabs,T as Tag,b as Toggle,U as UnderlinedLink,c as Uploader}from"./index-71c42246.js";export{a as AuthorBadge,A as Avatar,D as DatePicker,e as DoctorInfo,b as Dropdown,L as Logo,M as MobileBottomNavigation,g as MobileBottomNavigationIcon,P as Popup,R as Radio,c as RadioGroup,d as ScrollList,S as Slider,f as SurveyQuestionCard,T as ToolsBannerCard}from"./index.styled-48386363.js";export{B as Button}from"./index-b6575475.js";export{D as Divider}from"./index-7e2b8a87.js";export{F as Flag,L as LanguageSwitcher,d as NavigationLogoutPopup,e as NavigationProfileButton,N as NavigationV2,P as ProfilePopup,U as UserProfileNavigation,b as UserProfileNavigationHeader,c as UserProfileNavigationStats,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-24a9e671.js";export{D as Drawer,H as Heading,I as Icon,M as Modal,N as NewBabyProfileRadio,R as RadioImageGroup}from"./index-788cb7c8.js";export{I as Input}from"./useOutsideClick-3faddcd8.js";export{C as Container,L as Label,M as Menu,P as PureInput,T as Text,a as TextArea,b as TextDivider}from"./index.styled-66f12014.js";import"react";import"./tslib.es6-dcf36680.js";import"./screenSizeContext-1852eabc.js";import"styled-components";import"vanilla-lazyload";import"lodash";import"./theme-a50a1aa5.js";import"react-id-generator";import"keen-slider/react";import"./gAssets.js";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"react-range";import"date-fns";import"./Locale-69030fff.js";import"@mantine/core";import"./translationsContext-17d7ffe4.js";import"string-format";import"lodash/debounce";import"./useTranslations-6caddf1f.js";import"react-hook-form";import"./useHealthToolCache-74a46d69.js";import"./getDynamicHealthTool-831ea86d.js";import"./core-3b861395.js";import"./theme-2bf6d1d3.js";import"@mantine/dates";import"@mantine/hooks";import"@mantine/carousel";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import"./getSocialList-e91ed860.js";import"date-fns/locale/hi";import"date-fns/locale/ms";import"date-fns/locale/th";import"react-day-picker/DayPickerInput";import"react-dom";import"smoothscroll-polyfill";import"./types-f57c9932.js";import"./cookieHelper-0e8521c3.js";import"slugify";import"@hookform/resolvers/yup";import"./constants-a0a981fa.js";import"./useScrollbarSize-99db33e1.js";import"recharts";
@@ -0,0 +1 @@
1
+ import{_ as e,b as t,c as n,d as l}from"./tslib.es6-dcf36680.js";import a,{useRef as i,useState as r,useContext as o,useMemo as c,useEffect as s,useCallback as m}from"react";import{g as u}from"./core-3b861395.js";import{a6 as d,T as h,P as g,C as v}from"./index.styled-66f12014.js";import{bL as p,bM as E,bN as f,bO as w,bP as y,bQ as L,bR as b,bS as C,bT as k,bU as M,bV as P,bW as H,bX as A,bY as B,bZ as T,b_ as x,b$ as N,c0 as _,c1 as S,c2 as R,c3 as U,c4 as Z,c5 as V,c6 as F,c7 as D,c8 as I,c9 as O,ca as j,cb as z,cc as G,cd as W,ce as Y,cf as q,cg as K,ch as Q,ci as J,cj as X,ck as $,U as ee,cl as te,cm as ne,cn as le,co as ae,cp as ie,cq as re,cr as oe,cs as ce,ct as se,cu as me,cv as ue,cw as de,cx as he,cy as ge,cz as ve,cA as pe,cB as Ee,cC as fe,cD as we,cE as ye,cF as Le,cG as be,cH as Ce,cI as ke,cJ as Me,cK as Pe,cL as He,cM as Ae,cN as Be,cO as Te,cP as xe,cQ as Ne,cR as _e,cS as Se,cT as Re,cU as Ue,cV as Ze,cW as Ve,cX as Fe,cY as De,P as Ie,cZ as Oe,c_ as je,c$ as ze,d0 as Ge,d1 as We,d2 as Ye,d3 as qe,d4 as Ke,d5 as Qe,d6 as Je,d7 as Xe,d8 as $e,d9 as et,da as tt,db as nt,dc as lt,dd as at,de as it,df as rt,dg as ot,dh as ct,di as st,dj as mt,dk as ut,dl as dt,A as ht,dm as gt,dn as vt,dp as pt,dq as Et,dr as ft,ds as wt,L as yt,dt as Lt,du as bt,dv as Ct,dw as kt,dx as Mt,dy as Pt,dz as Ht}from"./index.styled-48386363.js";import"react-id-generator";import{formatDistanceToNow as At}from"date-fns";import"react-day-picker/DayPickerInput";import Bt from"lodash/debounce";import"react-dom";import{H as Tt}from"./index-788cb7c8.js";import{throttle as xt}from"lodash";import"keen-slider/react";import{CommonGAssets as Nt}from"./gAssets.js";import{j as _t,l as St}from"./screenSizeContext-1852eabc.js";import"react-range";import"styled-components";import{d as Rt,b as Ut,c as Zt}from"./getDynamicHealthTool-831ea86d.js";import"./Locale-69030fff.js";import{Portal as Vt}from"@mantine/core";import"./translationsContext-17d7ffe4.js";import Ft from"string-format";import{L as Dt,S as It,d as Ot,U as jt,C as zt,T as Gt}from"./index-9dd60ba6.js";import"react-hook-form";import"./theme-2bf6d1d3.js";import"@mantine/hooks";import"./isProduction-6fc0946c.js";import"date-fns/locale/en-US";import"date-fns/locale/id";import"date-fns/locale/vi";import"date-fns/locale/zh-TW";import{L as Wt}from"./constants-a0a981fa.js";import{u as Yt}from"./useTranslations-6caddf1f.js";import{B as qt}from"./index-b6575475.js";import{t as Kt}from"./theme-a50a1aa5.js";import{g as Qt}from"./cookieHelper-0e8521c3.js";var Jt=function(t){return a.createElement("img",e({src:Nt.getAssetPath("flags/cambodiaRound.png"),style:e({borderRadius:"50%"},t.style)},t))},Xt=function(t){return a.createElement("img",e({src:Nt.getAssetPath("flags/cambodiaSquare.png")},t))},$t=function(t){return a.createElement("svg",e({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e({borderRadius:"50%"},t.style)},t),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),a.createElement("path",{d:"M7.49953 0.327881C5.47199 0.850891 3.69346 1.98591 2.37793 3.53444L7.49953 6.6655V0.327881Z",fill:"#3F51B5"}),a.createElement("path",{d:"M2.30273 16.3824C3.62476 17.9749 5.4353 19.1399 7.50034 19.6729V13.2053L2.30273 16.3824Z",fill:"#3F51B5"}),a.createElement("path",{d:"M0.328125 12.5C0.334625 12.526 0.341125 12.5515 0.348125 12.5775L0.474128 12.5H0.328125Z",fill:"white"}),a.createElement("path",{d:"M17.7871 3.73445C16.4571 2.08391 14.6131 0.872891 12.499 0.327881V6.96651L17.7871 3.73445Z",fill:"#3F51B5"}),a.createElement("path",{d:"M12.499 19.6722C14.6506 19.1172 16.5196 17.8707 17.8546 16.1752L12.499 12.9021V19.6722Z",fill:"#3F51B5"}),a.createElement("path",{d:"M0.376626 7.31055C0.359125 7.37305 0.344125 7.43705 0.328125 7.50005H0.686632L0.376626 7.31055Z",fill:"white"}),a.createElement("path",{d:"M19.8745 8.50006C19.827 8.18506 19.7655 7.87555 19.6895 7.57104L18.1699 8.50006H19.8745Z",fill:"white"}),a.createElement("path",{d:"M0.686034 7.50024H0.327527C0.243026 7.82775 0.175524 8.16076 0.124023 8.50026H2.32207L0.686034 7.50024Z",fill:"white"}),a.createElement("path",{d:"M19.7197 12.3148C19.7832 12.0473 19.8337 11.7752 19.8752 11.5002H18.3867L19.7197 12.3148Z",fill:"white"}),a.createElement("path",{d:"M2.10956 11.5002H0.124023C0.175024 11.8398 0.243026 12.1728 0.327527 12.5003H0.47403L2.10956 11.5002Z",fill:"white"}),a.createElement("path",{d:"M8.50002 7.27665V0.124512C8.16051 0.175513 7.82751 0.243514 7.5 0.328016V6.66564L8.50002 7.27665Z",fill:"white"}),a.createElement("path",{d:"M11.5 12.2913V19.8759C11.8395 19.8249 12.1725 19.7569 12.5 19.6724V12.9023L11.5 12.2913Z",fill:"white"}),a.createElement("path",{d:"M7.5 13.205V19.6721C7.82751 19.7566 8.16051 19.8241 8.50002 19.8756V12.594L7.5 13.205Z",fill:"white"}),a.createElement("path",{d:"M11.5925 7.34715L11.7345 7.43415L12.5 6.96614V0.328016C12.1725 0.243514 11.8395 0.176013 11.5 0.124512V7.49865L11.5925 7.34715Z",fill:"white"}),a.createElement("path",{d:"M2.32251 8.50002H7.01761L8.50014 7.594V7.277L7.50011 6.66548L2.37852 3.53442C1.95151 4.03743 1.572 4.58144 1.24949 5.16296L5.02507 7.5H2.29701L0.650482 6.47648C0.54748 6.74949 0.455478 7.02699 0.375977 7.3105L0.686483 7.5L2.32251 8.50002Z",fill:"white"}),a.createElement("path",{d:"M11.7344 7.43419L13.4784 8.50021H18.171L19.6905 7.57119C19.528 6.92118 19.303 6.29767 19.02 5.70516L16.139 7.50019H13.4109L18.317 4.45013C18.1515 4.20313 17.9735 3.96562 17.7875 3.73462L12.4999 6.96618L11.7344 7.43419Z",fill:"white"}),a.createElement("path",{d:"M5.02448 7.50013L1.2494 5.16309C1.0169 5.58259 0.821394 6.0231 0.650391 6.47661L2.29642 7.50013H5.02448Z",fill:"#E53935"}),a.createElement("path",{d:"M16.1392 7.50024L19.0207 5.70521C18.8132 5.2702 18.5837 4.84819 18.3177 4.45068L13.4111 7.50024H16.1392Z",fill:"#E53935"}),a.createElement("path",{d:"M11.5 11.5002V12.2913L12.5 12.9023L17.8556 16.1758C18.2416 15.6853 18.5836 15.1593 18.8736 14.6008L15.4856 12.5003H18.2136L19.4432 13.2673C19.5507 12.9563 19.6432 12.6393 19.7197 12.3153L18.3871 11.5002H11.5Z",fill:"white"}),a.createElement("path",{d:"M13.4785 8.50019L11.7345 7.43417L11.5925 7.34717L11.5 7.49867V8.50019H13.4785Z",fill:"white"}),a.createElement("path",{d:"M8.49934 12.5943V11.5002H2.10921L0.473182 12.5003L0.34668 12.5778C0.522683 13.2383 0.762688 13.8713 1.06319 14.4708L4.16375 12.5003H6.89181L1.80071 15.7168C1.95971 15.9448 2.12471 16.1688 2.30172 16.3823L7.49932 13.2053L8.49934 12.5943Z",fill:"white"}),a.createElement("path",{d:"M7.01758 8.50026H8.50011V7.59424L7.01758 8.50026Z",fill:"white"}),a.createElement("path",{d:"M15.4854 12.5L18.8729 14.6C19.0949 14.173 19.2834 13.727 19.4429 13.2665L18.2134 12.5H15.4854Z",fill:"#E53935"}),a.createElement("path",{d:"M4.16501 12.5L1.06445 14.4705C1.28196 14.9045 1.52596 15.3216 1.80197 15.7166L6.89307 12.5H4.16501Z",fill:"#E53935"}),a.createElement("path",{d:"M13.4785 8.5H11.5V11.5001H18.3871H19.8757C19.9497 11.0095 20.0002 10.511 20.0002 10C20.0002 9.48902 19.9497 8.99051 19.8757 8.5H18.1711H13.4785Z",fill:"#E53935"}),a.createElement("path",{d:"M8.50017 11.5001V8.5H7.01764H2.32255H0.124502C0.050501 8.99051 0 9.48902 0 10C0 10.511 0.050501 11.0095 0.124502 11.5001H2.11004H8.50017Z",fill:"#E53935"}),a.createElement("path",{d:"M11.5001 19.8759V12.2912V11.5002V8.50016V7.49865V0.124502C11.0095 0.050501 10.511 0 10 0C9.48902 0 8.99051 0.050501 8.5 0.124502V7.27664V7.59365V8.50016V11.5002V12.5942V19.8759C8.99051 19.9499 9.48902 20.0004 10 20.0004C10.511 20.0004 11.0095 19.9499 11.5001 19.8759Z",fill:"#E53935"})))},en=function(t){return a.createElement("svg",e({viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"1",y:"5",width:"24",height:"16"},a.createElement("path",{d:"M1.08301 7.41675C1.08301 6.31218 1.97844 5.41675 3.08301 5.41675H22.9163C24.0209 5.41675 24.9163 6.31218 24.9163 7.41675V18.5834C24.9163 19.688 24.0209 20.5834 22.9163 20.5834H3.08301C1.97844 20.5834 1.08301 19.688 1.08301 18.5834V7.41675Z",fill:"#3F51B5"})),a.createElement("path",{d:"M1.08301 5.41675H24.9163V20.5834H1.08301V5.41675Z",fill:"#3F51B5"}),a.createElement("path",{d:"M1.08301 7.70041L12.3551 14.5899L14.05 11.8165L3.57901 5.41675H1.08301V7.70041Z",fill:"white"}),a.createElement("path",{d:"M24.9165 5.41675H22.9616L12.4912 11.816L14.1855 14.5899L24.9165 8.03083V5.41675Z",fill:"white"}),a.createElement("path",{d:"M14.1855 10.9802L12.4912 13.7536L23.6658 20.5834H24.9165V17.5387L14.1855 10.9802Z",fill:"white"}),a.createElement("path",{d:"M1.08301 17.8702V20.5834H2.87592L14.05 13.7541L12.3556 10.9802L1.08301 17.8702Z",fill:"white"}),a.createElement("path",{d:"M1.08301 10.8333H24.9163V15.1666H1.08301V10.8333Z",fill:"white"}),a.createElement("path",{d:"M10.833 5.41675H15.1663V20.5834H10.833V5.41675Z",fill:"white"}),a.createElement("path",{d:"M9.32609 10.8334L1.08301 5.79537V7.06504L7.24826 10.8334H9.32609ZM24.0004 5.41675L15.1376 10.8334H17.2149L24.9163 6.12687V5.41675H24.0004ZM17.9191 15.1667L24.9163 19.4432V18.1735L19.9964 15.1667H17.9191ZM8.62192 15.1667L1.08301 19.7742V20.5834H1.83701L10.6992 15.1667H8.62192ZM1.08301 11.9167H24.9163V14.0834H1.08301V11.9167Z",fill:"#E53935"}),a.createElement("path",{d:"M11.917 5.41675H14.0837V20.5834H11.917V5.41675Z",fill:"#E53935"})))},tn=function(t){return a.createElement("img",e({src:Nt.getAssetPath("flags/indiaRound.png"),style:e({borderRadius:"50%"},t.style)},t))},nn=function(t){return a.createElement("img",e({src:Nt.getAssetPath("flags/indiaSquare.png")},t))},ln=function(n){var l=n.isTesting,r=t(n,["isTesting"]),o=i("id-flag-round-mask-"+(l?1:Math.random()));return a.createElement("svg",e({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),a.createElement("mask",{id:o.current,style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),a.createElement("g",{mask:"url(#".concat(o.current,")")},a.createElement("rect",{width:"20",height:"10",fill:"#CE1126"}),a.createElement("rect",{y:"10",width:"20",height:"10",fill:"white"})))},an=function(n){var l=n.isTesting,r=t(n,["isTesting"]),o=i("id-flag-clip-"+(l?1:Math.random()));return a.createElement("svg",e({viewBox:"0 0 24 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),a.createElement("g",{clipPath:"url(#".concat(o.current,")")},a.createElement("rect",{y:"0.0166016",width:"24",height:"8",fill:"#CE1126"}),a.createElement("rect",{y:"8.0166",width:"24",height:"8",fill:"white"})),a.createElement("defs",null,a.createElement("clipPath",{id:o.current},a.createElement("rect",{width:"24",height:"16",rx:"2",fill:"white"}))))},rn=function(t){return a.createElement("svg",e({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e({borderRadius:"50%"},t.style)},t),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),a.createElement("rect",{y:"1",width:"20",height:"20",fill:"#CC0001"}),a.createElement("rect",{y:"16.106",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"16",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"18",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"14.0652",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"12.0242",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"9.9834",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"7.94263",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"5.90186",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"3.86084",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"2",width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{width:"20",height:"1.02041",fill:"white"}),a.createElement("rect",{y:"-1",width:"10",height:"12",fill:"#010066"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11387 3.86084C2.92711 3.86084 1.96387 5.23232 1.96387 6.92206C1.96387 8.6118 2.92711 9.98329 4.11387 9.98329C4.54263 9.98329 4.94211 9.80406 5.27763 9.4957C5.08225 9.59203 4.87256 9.64471 4.65427 9.64471C3.60193 9.64471 2.74786 8.42866 2.74786 6.93032C2.74786 5.43198 3.60193 4.21594 4.65427 4.21594C4.88682 4.21594 5.10959 4.27527 5.31571 4.38397C4.97256 4.0538 4.5589 3.86084 4.11387 3.86084Z",fill:"#FFCC00"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.67935 8.51573L6.7737 7.8407L7.04147 9.22221L6.43573 8.06657L6.24676 9.47313L6.0609 8.06576L5.4526 9.2188L5.72343 7.83844L4.81629 8.50957L5.49017 7.42963L4.46387 7.48593L5.40732 6.9203L4.46512 6.35062L5.4913 6.41133L4.81981 5.3285L5.72546 6.00353L5.45769 4.62202L6.06343 5.77766L6.25241 4.37109L6.43827 5.77847L7.04656 4.62543L6.77574 6.00579L7.68287 5.33466L7.00899 6.4146L8.0353 6.3583L7.09184 6.92392L8.03404 7.49361L7.00786 7.43289L7.67935 8.51573Z",fill:"#FFCC00"})))},on=function(t){return a.createElement("svg",e({viewBox:"0 0 24 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),a.createElement("rect",{width:"24",height:"16",rx:"2",fill:"#CC0001"}),a.createElement("rect",{y:"12.2712",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"12.1904",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"13.7144",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"10.7161",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"9.16138",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"7.60645",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"6.05127",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"4.49658",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"2.94141",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{y:"1.52393",width:"24",height:"0.777454",fill:"white"}),a.createElement("rect",{width:"24",height:"0.777454",fill:"white"}),a.createElement("path",{d:"M0 2C0 0.895431 0.895431 0 2 0H12V8.38095H0V2Z",fill:"#010066"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.93644 1.52393C3.51233 1.52393 2.35645 2.56887 2.35645 3.85629C2.35645 5.14371 3.51233 6.18865 4.93644 6.18865C5.45096 6.18865 5.93034 6.05209 6.33296 5.81716C6.09851 5.89054 5.84688 5.93068 5.58492 5.93068C4.32212 5.93068 3.29724 5.00417 3.29724 3.86258C3.29724 2.72099 4.32212 1.79448 5.58492 1.79448C5.86399 1.79448 6.13132 1.83968 6.37865 1.9225C5.96688 1.67094 5.47049 1.52393 4.93644 1.52393Z",fill:"#FFCC00"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.216 5.07041L8.12923 4.55611L8.45055 5.60869L7.72366 4.72819L7.49689 5.79987L7.27386 4.72758L6.5439 5.60609L6.86889 4.55439L5.78033 5.06572L6.58899 4.24291L5.35742 4.28581L6.48957 3.85485L5.35893 3.42081L6.59034 3.46707L5.78456 2.64205L6.87133 3.15636L6.55001 2.10378L7.2769 2.98427L7.50367 1.9126L7.7267 2.98488L8.45666 2.10638L8.13166 3.15808L9.22022 2.64674L8.41157 3.46955L9.64314 3.42666L8.51099 3.85761L9.64163 4.29165L8.41022 4.2454L9.216 5.07041Z",fill:"#FFCC00"}))},cn=function(t){return a.createElement("svg",e({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e({borderRadius:"50%"},t.style)},t),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),a.createElement("rect",{x:"-4",y:"-1",width:"28",height:"11",fill:"#FECB00"}),a.createElement("rect",{x:"-4",y:"10",width:"28",height:"10",fill:"#EA2839"}),a.createElement("rect",{x:"-4",y:"6.7041",width:"28",height:"6.47773",fill:"#34B233"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.56543 10.3272L10.1796 5.15527L11.7938 10.3272H8.56543Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5292 11.2775L7.18336 14.5129L8.91745 9.37991L11.5292 11.2775Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.75181 11.8648L5.33182 8.73143L10.7494 8.79447L9.75181 11.8648Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.6105 8.78962L15.0281 8.72658L10.6081 11.86L9.6105 8.78962Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4424 9.37686L13.1765 14.5098L8.83064 11.2744L11.4424 9.37686Z",fill:"white"})))},sn=function(t){return a.createElement("svg",e({viewBox:"0 0 24 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),a.createElement("rect",{width:"24",height:"16",rx:"2",fill:"#FECB00"}),a.createElement("rect",{y:"8.3811",width:"24",height:"7.61905",rx:"2",fill:"#EA2839"}),a.createElement("rect",{y:"5.86987",width:"24",height:"4.93542",fill:"#34B233"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.7705 8.63046L12.1541 4.68994L13.5377 8.63046H10.7705Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3108 9.35502L9.58574 11.8201L11.0721 7.90925L13.3108 9.35502Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7874 9.80216L7.99884 7.41482L12.6425 7.46285L11.7874 9.80216Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.6667 7.4589L16.3104 7.41087L12.5218 9.79821L11.6667 7.4589Z",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.2361 7.90629L14.7225 11.8171L10.9974 9.35207L13.2361 7.90629Z",fill:"white"}))},mn=function(t){return a.createElement("img",e({src:Nt.getAssetPath("flags/philippineRound.png"),style:e({borderRadius:"50%"},t.style)},t))},un=function(t){return a.createElement("img",e({src:Nt.getAssetPath("flags/philippineSquare.png")},t))},dn=function(t){return a.createElement("svg",e({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e({borderRadius:"50%"},t.style)},t),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#D8D8D8"}),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"white"})),a.createElement("rect",{width:"30",height:"20",fill:"#ED1E24"}),a.createElement("rect",{width:"15",height:"10",fill:"#2B2F84"}),a.createElement("circle",{cx:"7.49791",cy:"4.99913",r:"1.869",fill:"white"}),a.createElement("path",{d:"M7.93582 2.89402L7.49722 1.25732L7.05762 2.89812C7.28902 2.84212 7.64062 2.82912 7.93582 2.89402Z",fill:"white"}),a.createElement("path",{d:"M6.82515 2.95674L5.62695 1.75854L6.06655 3.39934C6.23895 3.23514 6.53695 3.04814 6.82515 2.95674Z",fill:"white"}),a.createElement("path",{d:"M5.89364 3.56677L4.25684 3.12817L5.45794 4.32927C5.52514 4.10107 5.68964 3.79007 5.89364 3.56677Z",fill:"white"}),a.createElement("path",{d:"M5.39266 4.56055L3.75586 4.99915L5.39666 5.43885C5.34066 5.20745 5.32756 4.85585 5.39266 4.56055Z",fill:"white"}),a.createElement("path",{d:"M5.45504 5.67188L4.25684 6.87007L5.89764 6.43047C5.73344 6.25807 5.54634 5.96007 5.45504 5.67188Z",fill:"white"}),a.createElement("path",{d:"M6.06555 6.60278L5.62695 8.23958L6.82815 7.03838C6.59975 6.97128 6.28875 6.80678 6.06555 6.60278Z",fill:"white"}),a.createElement("path",{d:"M7.05859 7.1041L7.49719 8.7409L7.93679 7.1001C7.70549 7.1561 7.35399 7.1692 7.05859 7.1041Z",fill:"white"}),a.createElement("path",{d:"M8.16992 7.04148L9.36812 8.23968L8.92852 6.59888C8.75622 6.76308 8.45822 6.95018 8.16992 7.04148Z",fill:"white"}),a.createElement("path",{d:"M9.10156 6.43145L10.7384 6.87005L9.53726 5.66895C9.47006 5.89725 9.30556 6.20825 9.10156 6.43145Z",fill:"white"}),a.createElement("path",{d:"M9.60263 5.43763L11.2394 4.99903L9.59863 4.55933C9.65463 4.79073 9.66763 5.14223 9.60263 5.43763Z",fill:"white"}),a.createElement("path",{d:"M9.54026 4.32637L10.7385 3.12817L9.09766 3.56777C9.26196 3.74007 9.44896 4.03807 9.54026 4.32637Z",fill:"white"}),a.createElement("path",{d:"M8.92959 3.39534L9.36819 1.75854L8.16699 2.95964C8.39529 3.02674 8.70629 3.19124 8.92959 3.39534Z",fill:"white"}))))},hn=function(t){return a.createElement("svg",e({viewBox:"0 0 24 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),a.createElement("rect",{width:"24",height:"16",rx:"2",fill:"#ED1E24"}),a.createElement("path",{d:"M0 2C0 0.89543 0.895431 0 2 0H15V10H0V2Z",fill:"#2B2F84"}),a.createElement("circle",{cx:"7.49791",cy:"4.99913",r:"1.869",fill:"white"}),a.createElement("path",{d:"M7.93582 2.89402L7.49722 1.25732L7.05762 2.89812C7.28902 2.84212 7.64062 2.82912 7.93582 2.89402Z",fill:"white"}),a.createElement("path",{d:"M6.82515 2.95674L5.62695 1.75854L6.06655 3.39934C6.23895 3.23514 6.53695 3.04814 6.82515 2.95674Z",fill:"white"}),a.createElement("path",{d:"M5.89364 3.56677L4.25684 3.12817L5.45794 4.32927C5.52514 4.10107 5.68964 3.79007 5.89364 3.56677Z",fill:"white"}),a.createElement("path",{d:"M5.39266 4.56055L3.75586 4.99915L5.39666 5.43885C5.34066 5.20745 5.32756 4.85585 5.39266 4.56055Z",fill:"white"}),a.createElement("path",{d:"M5.45504 5.67188L4.25684 6.87007L5.89764 6.43047C5.73344 6.25807 5.54634 5.96007 5.45504 5.67188Z",fill:"white"}),a.createElement("path",{d:"M6.06555 6.60278L5.62695 8.23958L6.82815 7.03838C6.59975 6.97128 6.28875 6.80678 6.06555 6.60278Z",fill:"white"}),a.createElement("path",{d:"M7.05859 7.1041L7.49719 8.7409L7.93679 7.1001C7.70549 7.1561 7.35399 7.1692 7.05859 7.1041Z",fill:"white"}),a.createElement("path",{d:"M8.16992 7.04148L9.36812 8.23968L8.92852 6.59888C8.75622 6.76308 8.45822 6.95018 8.16992 7.04148Z",fill:"white"}),a.createElement("path",{d:"M9.10156 6.43145L10.7384 6.87005L9.53726 5.66895C9.47006 5.89725 9.30556 6.20825 9.10156 6.43145Z",fill:"white"}),a.createElement("path",{d:"M9.60263 5.43763L11.2394 4.99903L9.59863 4.55933C9.65463 4.79073 9.66763 5.14223 9.60263 5.43763Z",fill:"white"}),a.createElement("path",{d:"M9.54026 4.32637L10.7385 3.12817L9.09766 3.56777C9.26196 3.74007 9.44896 4.03807 9.54026 4.32637Z",fill:"white"}),a.createElement("path",{d:"M8.92959 3.39534L9.36819 1.75854L8.16699 2.95964C8.39529 3.02674 8.70629 3.19124 8.92959 3.39534Z",fill:"white"}))},gn=function(t){return a.createElement("svg",e({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e({borderRadius:"50%"},t.style)},t),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),a.createElement("rect",{x:"-4",y:"-0.0166016",width:"28",height:"20",fill:"#ED1C24"}),a.createElement("rect",{x:"-4",y:"3.31665",width:"28",height:"13.3333",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-4 6.65015H24V13.3168H-4V6.65015Z",fill:"#241D4F"})))},vn=function(t){return a.createElement("svg",e({viewBox:"0 0 24 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),a.createElement("rect",{y:"0.983398",width:"24",height:"16",rx:"2",fill:"#ED1C24"}),a.createElement("rect",{y:"3.65039",width:"24",height:"10.6667",fill:"white"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 6.31689H24V11.6502H0V6.31689Z",fill:"#241D4F"}))},pn=function(t){return a.createElement("svg",e({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:e({borderRadius:"50%"},t.style)},t),a.createElement("g",null,a.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},a.createElement("circle",{cx:"10",cy:"10",r:"10",fill:"#C4C4C4"})),a.createElement("rect",{x:"-4",y:"-0.0166016",width:"28",height:"20",fill:"#DA251D"}),a.createElement("path",{d:"M11.7228 10.8677L14.2819 9.00839L11.1187 9.00839L10.1409 6L9.16316 9.00839L6 9.00839L8.5591 10.8677L7.58184 13.8766L10.1409 12.0168L12.7 13.8766L11.7228 10.8677Z",fill:"#FFEB3B"})))},En=function(t){return a.createElement("svg",e({viewBox:"0 0 24 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),a.createElement("g",null,a.createElement("clipPath",null,a.createElement("rect",{width:"24",height:"16",fill:"white"})),a.createElement("path",{d:"M2.01386e-10 2C0 0.895431 0.895431 -7.50368e-10 2 -1.67599e-09L22 -1.84359e-08C23.1046 -1.93615e-08 24 0.895431 24 2L24 14C24 15.1046 23.1046 16 22 16L2 16C0.89543 16 1.52092e-09 15.1046 1.4097e-09 14L2.01386e-10 2Z",fill:"#DA251D"}),a.createElement("path",{d:"M13.7823 8.92854L16.6663 6.8332L13.1016 6.8332L11.9997 3.44287L10.8978 6.8332L7.33301 6.8332L10.217 8.92854L9.11567 12.3195L11.9997 10.2235L14.8837 12.3195L13.7823 8.92854Z",fill:"#FFEB3B"})))},fn=function(e){var t,n,l=e.country,i=e.language,r=e.rounded,o=e.height,c=e.width,s=e.isTesting;switch(i){case"en":t=a.createElement(en,null),n=a.createElement($t,null);break;case"vi":t=a.createElement(En,null),n=a.createElement(pn,null);break;case"id":t=a.createElement(an,{isTesting:s}),n=a.createElement(ln,{isTesting:s});break;case"th":t=a.createElement(vn,null),n=a.createElement(gn,null);break;case"km":t=a.createElement(Xt,null),n=a.createElement(Jt,null);break;case"ms":t=a.createElement(on,null),n=a.createElement(rn,null);break;case"my":t=a.createElement(sn,null),n=a.createElement(cn,null);break;case"tl":t=a.createElement(un,null),n=a.createElement(mn,null);break;case"hi":t=a.createElement(nn,null),n=a.createElement(tn,null);break;case"zh":t=a.createElement(hn,null),n=a.createElement(dn,null)}if(!t&&!n)switch(l){case"VN":t=a.createElement(En,null),n=a.createElement(pn,null);break;case"ID":t=a.createElement(an,{isTesting:s}),n=a.createElement(ln,{isTesting:s});break;case"TH":t=a.createElement(vn,null),n=a.createElement(gn,null);break;case"KH":t=a.createElement(Xt,null),n=a.createElement(Jt,null);break;case"MY":t=a.createElement(on,null),n=a.createElement(rn,null);break;case"MM":t=a.createElement(sn,null),n=a.createElement(cn,null);break;case"PH":t=a.createElement(un,null),n=a.createElement(mn,null);break;case"IN":t=a.createElement(nn,null),n=a.createElement(tn,null);break;case"TW":t=a.createElement(hn,null),n=a.createElement(dn,null)}return a.createElement(d,{theme:{width:c,height:o}},r?n:t)},wn=function(e){var t=e.options,n=e.label,l=e.labelRenderer,i=e.selected,o=e.onChange,c=e.showSelected,s=void 0===c||c,m=e.style,u=void 0===m?{}:m,d=e.showIndicator,g=void 0===d||d,v=r(!1),L=v[0],b=v[1];return a.createElement(a.Fragment,null,a.createElement(p,null,a.createElement(E,{onClick:function(){return b((function(e){return!e}))}},n||(null==l?void 0:l(L))||null,a.createElement(f,{"data-is-open":L,style:u,"data-show-indicator":g},t.map((function(e,t){return a.createElement(w,{key:t,"data-selected":s&&i===e.value,onClick:function(t){i!==e.value&&(o(e.value),b((function(e){return!e}))),t.stopPropagation()}},a.createElement(h,{size:"p3"},e.label),s&&i===e.value&&a.createElement("img",{src:Nt.getAssetPath("check.svg"),alt:"check",className:"check-icon"}))}))))),L&&a.createElement(y,{onClick:function(){return b(!1)}}))},yn=function(e){var t,n,l=e.languageOptions,i=e.locale,r=null==l?void 0:l.find((function(e){return e.locale===i}));return(null==l?void 0:l.length)?a.createElement(wn,{options:l,selected:r.value,label:a.createElement(Ln,{locale:i,label:r.label||(null===(n=null===(t=i.split("-"))||void 0===t?void 0:t[0])||void 0===n?void 0:n.toUpperCase())}),onChange:function(e){"undefined"!=typeof window&&(window.location.href=e)},style:{width:100},showSelected:!0,showIndicator:!1}):null},Ln=function(e){var t,n,l,i=e.locale,r=e.label,o=e.href;return a.createElement(L,{href:o},a.createElement(fn,{country:null===(n=null===(t=null==i?void 0:i.split("-"))||void 0===t?void 0:t[1])||void 0===n?void 0:n.toUpperCase(),width:16,height:16,rounded:!0,language:null===(l=null==i?void 0:i.split("-"))||void 0===l?void 0:l[0]}),a.createElement("span",null,r))},bn=function(){return a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.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.9683 19.7465 14.8938 19.0204 16.4118 17.8061L20.3169 21.7112C20.702 22.0963 21.3262 22.0963 21.7112 21.7112C22.0963 21.3262 22.0963 20.702 21.7112 20.3169L17.8061 16.4118C19.0204 14.8938 19.7465 12.9683 19.7465 10.8732C19.7465 5.97268 15.7738 2 10.8732 2Z",fill:"#8C8C8C"}))},Cn=function(){var e=o(b),t=e.locale,n=e.configs.statics,l=e.siteType,i=Yt().t;return a.createElement(g,{className:"fake-search-input",name:"search-input-menu-service",size:"md",placeholder:"marryBaby"===l?i("navigation.search.input.placeholder"):i("home.search",{site:Dt[t||"en-PH"]?Dt[t||"en-PH"].SITE_NAME:""}),onChange:function(){},onKeyDown:function(e){return"Enter"===e.key&&(window.location.href="".concat(n.HOME_PAGE_URL,"/search/?s=").concat(e.target.value))},type:"search",onFocus:function(e){e.preventDefault()},displayIcon:a.createElement("a",{"data-event-category":"Search Button","data-event-action":"Click"},a.createElement(bn,null))})},kn=function(e){var t=e.hrefViewMore,n=e.titleBtnViewMore,l=e.UrlFE,i=e.onClosePopup,r=e.menuItems,c=e.headingTitle,s=o(b),m=s.siteType,u=s.isAmp;return a.createElement(C,null,a.createElement(k,null,a.createElement(Tt,{tag:"marryBaby"===m?"h5":"h6",as:"h2",fontWeight:"semibold"},c)),null==r?void 0:r.slice(0,6).map((function(e,t){var n=(null==e?void 0:e.link)?(null==e?void 0:e.link.startsWith("http"))?null==e?void 0:e.link:"".concat(l,"/").concat(null==e?void 0:e.link.split("/").filter(Boolean).join("/"),"/"):"/";return a.createElement(M,{className:"iconMenu","data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":n,"data-is-heading-category":!1,href:n,"data-theme":m,key:t,onClick:i},a.createElement("div",{className:"icon"},u?a.createElement("img",{alt:e.name,src:e.thumbnail||"/images/avatar.jpg",style:{width:32,height:32,maxWidth:32,maxHeight:32}}):a.createElement("img",{className:"lazy",alt:e.name,"data-src":e.thumbnail||"/images/avatar.jpg",style:{width:32,height:32,maxWidth:32,maxHeight:32}})),a.createElement("p",null,e.name),a.createElement(P,null,a.createElement("img",{src:Nt.getAssetPath("chevronRight.svg"),style:{width:"16px",height:"16px"}})))})),n&&a.createElement(H,{"data-theme":m,style:{textDecoration:"none"},href:t,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":t},a.createElement(A,{onClick:i,"data-theme":m,"data-is-heading-category":!1},n,a.createElement(B,null,a.createElement("img",{className:"svg",src:"marryBaby"===m?Nt.getAssetPath("chevronRightPink.svg"):Nt.getAssetPath("chevronRightActive.svg"),style:{width:"16px",height:"16px"}})))))},Mn=function(e){var t=e.title,n=e.link,l=e.description,i=e.cta,r=e.icon,c=o(b),s=c.siteType,m=c.isAmp;return a.createElement(T,{"data-theme":s},a.createElement(x,null,m?a.createElement("img",{src:"marryBaby"===s?Nt.getAssetPath("navMBSpotlightBgNoData.svg"):Nt.getAssetPath("navSpotlightBgNoData.svg"),alt:"",className:"bg-svg"}):a.createElement("img",{"data-src":"marryBaby"===s?Nt.getAssetPath("navMBSpotlightBgNoData.svg"):Nt.getAssetPath("navSpotlightBgNoData.svg"),alt:"",className:"bg-svg lazy"}),a.createElement(N,null,r&&a.createElement("img",{src:r,width:64,height:64}))),a.createElement("div",null,t&&a.createElement(_,null,t),l&&a.createElement(S,null,l),i&&a.createElement("div",null,a.createElement("a",{href:n},a.createElement(qt,{theme:s,className:"survey-contact-submit",size:"md"},i)))))},Pn=function(e){var t=e.title,n=e.viewMore,l=e.children,i=e.link,r=e.dataEventAction,c=void 0===r?"":r,s=o(b).siteType;return a.createElement(R,null,a.createElement(U,null,a.createElement(Tt,{tag:"marryBaby"===s?"h5":"h6",as:"h2",fontWeight:"semibold"},t),n&&a.createElement(Z,{"data-event-category":"Hamburger Navigation","data-event-action":c,"data-event-label":i,href:i,"data-theme":s},n,a.createElement("img",{src:"marryBaby"===s?Nt.getAssetPath("chevronRightPink.svg"):Nt.getAssetPath("chevronRightActive.svg"),style:{width:"16px",height:"16px"}}))),l)},Hn=function(e){var t,n=e.item,l=e.index,i=void 0===l?0:l,r=Yt().t,c=o(b),s=c.locale,m=c.configs.statics,u=c.isAmp;if(!n)return null;var d="".concat(m.CARE_URL_FE,"/").concat(null===(t=Wt[s])||void 0===t?void 0:t.HOSPITAL,"/").concat(n.slug,"-").concat(n.id);return a.createElement(V,{key:n.id,href:d,"data-event-category":"Hamburger Navigation","data-event-action":"Care Click ".concat(i+1),"data-event-label":d},u?a.createElement("img",{src:Nt.getAssetPath("navCareCardBg.svg"),alt:"",className:"bg-svg"}):a.createElement("img",{"data-src":Nt.getAssetPath("navCareCardBg.svg"),alt:"",className:"bg-svg lazy"}),a.createElement(F,null,a.createElement(D,null,u?a.createElement("img",{alt:n.name,src:n.logo||"/images/avatar.jpg"}):a.createElement("img",{className:"lazy",alt:n.name,"data-src":n.logo||"/images/avatar.jpg"}))),a.createElement(I,null,a.createElement(O,null,n.name),a.createElement(j,null,n.description),a.createElement(z,null,r("home.seeMore"),a.createElement("img",{src:Nt.getAssetPath("chevronRightActive.svg"),style:{width:"16px",height:"16px",marginTop:"3px",marginLeft:"5px"}}))))},An=function(e){var t=e.spotlights,n=void 0===t?[]:t,l=e.hrefViewMore,i=Yt().t;return a.createElement(Pn,{title:i("home.navigator.menu.spotlightHospitals")},0!==n.length?a.createElement(G,null,null==n?void 0:n.slice(0,3).map((function(e,t){return a.createElement(Hn,{key:t,index:t,item:e})}))):a.createElement(Mn,{title:i("home.navigator.menu.care.noDatas.title"),description:i("home.navigator.menu.care.noDatas.description"),link:l,cta:i("home.navigator.menu.care.noDatas.cta"),icon:Nt.getAssetPath("community.svg")}))},Bn=function(e){var t=e.item,n=e.index,l=void 0===n?0:n;if(!t)return null;var i=o(b).isAmp;return a.createElement(W,{key:t.id,href:t.link,"data-event-category":"Hamburger Navigation","data-event-action":"Spotlight Click ".concat(l+1),"data-event-label":t.link},a.createElement(Y,null,i?a.createElement("img",{alt:t.title,src:t.banner||"/images/notFound-min-small.jpg"}):a.createElement("img",{className:"lazy",alt:t.title,"data-src":t.banner||"/images/notFound-min-small.jpg"})),a.createElement(q,null,t.title))},Tn=function(e){var t=e.spotlightsList,n=void 0===t?[]:t,l=e.hrefViewMore,i=Yt().t,r=o(b).configs.statics;return a.createElement(Pn,{title:i("home.navigator.menu.spotlights"),viewMore:i("home.navigator.menu.spotlights.seeAll"),link:l,dataEventAction:"Spotlight See More Click"},0!==n.length?a.createElement(K,null,null==n?void 0:n.slice(0,4).map((function(e,t){return a.createElement(Bn,{key:t,index:t,item:{id:e.id,link:r.HOME_PAGE_URL+e.permalink,title:e.name,banner:e.image}})}))):a.createElement(Mn,{title:i("home.navigator.menu.category.noDatas.title"),description:i("home.navigator.menu.category.noDatas.description"),link:l,cta:i("home.navigator.menu.category.noDatas.cta"),icon:Nt.getAssetPath("Spotlight.svg")}))},xn=function(e){var t,n,l,i,r,c,s,m=e.post,u=e.index,d=void 0===u?0:u,h=o(b),g=h.siteType,v=h.locale,p=h.configs.statics,E=h.isAmp;if(!m)return null;var f=[p.TOGETHER_URL_FE,null===(t=m.community)||void 0===t?void 0:t.slug].join("/"),w=[f,m.slug].join("/"),y=m.createdAt,L=y?isNaN(new Date(y).getTime())?null:new Date(y):null,C=L?At(L,{locale:Q[v]}):y;return a.createElement(J,{href:w,"data-event-category":"Hamburger Navigation","data-event-action":"Together Click ".concat(d+1),"data-event-label":w},a.createElement(X,null,a.createElement($,null,a.createElement(ee,{avatar:null===(n=m.author)||void 0===n?void 0:n.avatar,username:(null===(l=m.author)||void 0===l?void 0:l.name)||(null===(i=m.author)||void 0===i?void 0:i.username),isLazy:!E}),a.createElement(te,null,a.createElement(ne,{"data-theme":g},null===(r=m.author)||void 0===r?void 0:r.name),a.createElement(le,null,a.createElement(ae,{"data-event-category":"Hamburger Navigation","data-event-action":"Topic Click ".concat(d+1),"data-event-label":f,onClick:function(e){e.preventDefault(),location.href=f},"data-theme":g},null===(c=m.community)||void 0===c?void 0:c.name),a.createElement(ie,null,"•"),a.createElement(re,{"data-theme":g},C)))),a.createElement(oe,null,m.title)),!!(null===(s=m.photos)||void 0===s?void 0:s.length)&&(E?a.createElement(ce,{src:m.photos[0]}):a.createElement(ce,{className:"lazy","data-src":m.photos[0]})))},Nn=function(e){var t=e.spotlights,n=void 0===t?[]:t,l=o(b).configs.statics,i=Yt().t;return a.createElement(Pn,{title:i("home.navigator.menu.trendingPosts"),viewMore:i("home.navigator.menu.trendingPosts.seeMore"),link:l.TOGETHER_URL_FE,dataEventAction:"Together See More Click"},0!==n.length?a.createElement(se,null,null==n?void 0:n.slice(0,4).map((function(e,t){return a.createElement(xn,{index:t,post:e,key:e.id})}))):a.createElement(Mn,{title:i("home.navigator.menu.together.noPosts.title"),description:i("home.navigator.menu.together.noPosts.description"),link:"".concat(l.HOME_PAGE_URL,"/community/"),cta:i("home.navigator.menu.together.noPosts.cta"),icon:Nt.getAssetPath("community.svg")}))},_n=function(e){var t=e.item,n=e.index,l=void 0===n?0:n,i=Yt().t,r=o(b),c=r.configs.statics,s=r.isAmp;if(!t)return null;var m=t.link?t.link.startsWith("http")?t.link:"".concat(c.HOME_PAGE_URL).concat(t.link):void 0;return a.createElement(me,{href:m,"data-event-category":"Hamburger Navigation","data-event-action":"Engage Click ".concat(l+1),"data-event-label":m},s?a.createElement("img",{src:Nt.getAssetPath("navToolCardBg.svg"),alt:"",className:"bg-svg"}):a.createElement("img",{"data-src":Nt.getAssetPath("navToolCardBg.svg"),alt:"",className:"bg-svg lazy"}),a.createElement(ue,null,a.createElement(de,null,t.title),a.createElement(he,null,t.subtitle),a.createElement(ge,null,i("home.seeMore"),a.createElement("img",{src:Nt.getAssetPath("chevronRightActive.svg"),style:{width:"16px",height:"16px",marginTop:"3px",marginLeft:"5px"}}))),a.createElement(ve,null,s?a.createElement("img",{alt:t.title,src:t.icon||"/images/avatar.jpg"}):a.createElement("img",{className:"lazy",alt:t.title,"data-src":t.icon||"/images/avatar.jpg"})))},Sn=function(e){var t=e.item,n=e.index,l=void 0===n?0:n,i=e.color,r=Yt().t,c=o(b),s=c.configs.statics,m=c.isAmp;if(!t)return null;var u=t.link?t.link.startsWith("http")?t.link:"".concat(s.HOME_PAGE_URL).concat(t.link):void 0,d=function(){return a.createElement(fe,null,m?a.createElement("img",{src:t.icon||"/images/avatar.jpg"}):a.createElement("img",{className:"lazy",alt:t.title,"data-src":t.icon||"/images/avatar.jpg"}))},h=function(){return a.createElement(we,null,a.createElement(ye,null,a.createElement(Le,null,t.title),a.createElement(be,null,t.subtitle)),a.createElement(Ce,null,a.createElement("div",{className:"mobile-only"},r("home.seeMore")),a.createElement("img",{src:Nt.getAssetPath("arrowRightGray.svg"),style:{width:"12px",height:"12px",marginTop:"2px",marginLeft:"5px"}})))};return a.createElement(pe,{href:u,"data-event-category":"Hamburger Navigation","data-event-action":"Engage Click ".concat(l+1),"data-event-label":u,"data-color":i},a.createElement("svg",{className:"bg-svg",width:"74",height:"121",viewBox:"0 0 74 121",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M58.5713 53.428C40.6466 70.0213 12.9929 71.0875 -7.00506 84.9856C-24.9277 97.4005 -38.3893 120.472 -60.213 120.346C-73.3615 120.271 -84.9289 110.925 -91.9303 99.8138C-101.443 84.7327 -103.994 64.0482 -93.916 49.3276C-81.8133 31.6505 -56.6933 28.1101 -41.7246 12.7895C-35.4351 6.35117 -31.2212 -1.90115 -24.8564 -8.25051C-7.17639 -25.9054 34.9604 -29.7543 56.852 -16.9562C80.9056 -2.89888 77.046 36.3304 58.5713 53.428Z",strokeWidth:"0"})),a.createElement("img",{"data-src":Nt.getAssetPath("navMBCardDotBg.svg"),className:"dot-svg lazy",alt:""}),a.createElement(Ee,null,a.createElement("div",{className:"mobile-only"},d()),a.createElement("div",{className:"desktop-only"},h())),a.createElement("div",{className:"mobile-only"},h()),a.createElement("div",{className:"desktop-only"},d()))},Rn=function(e){var t=e.hrefViewMore,n=e.spotlightHealthTools,l=void 0===n?[]:n,i=Yt().t,r=["pink","orange","green"],c=o(b).siteType;return a.createElement(Pn,{title:i("home.navigator.menu.spotlightTools")},0!==l.length&&a.createElement(ke,null,null==l?void 0:l.slice(0,3).map((function(e,t){return"marryBaby"===c?a.createElement(Sn,{key:t,index:t,item:e,color:r[t]}):a.createElement(_n,{key:t,index:t,item:e})}))),0===l.length&&a.createElement(Mn,{title:i("home.navigator.menu.healthTools.noDatas.title"),description:i("home.navigator.menu.healthTools.noDatas.description"),link:t,cta:i("home.navigator.menu.healthTools.noDatas.cta"),icon:Nt.getAssetPath("community.svg")}))},Un=function(e){var t,n,l=e.closePopup,i=e.menuItems,r=void 0===i?[]:i,c=o(b),s=c.siteType,m=c.ssrMenuContent,u=m.categories,d=m.healthTools,h=m.care,g=m.together,v=c.activeMenuService,p=c.configs,E=p.statics,f=p.enableSearchBar,w=c.isAmp,y=c.locale,L=Yt().t;return a.createElement(Me,{id:"categories-menu","data-is-amp":w},f?a.createElement(Pe,{"data-theme":s,onClick:function(){window.location.href="".concat(E.HOME_PAGE_URL,"/search")}},a.createElement(Cn,null)):null,a.createElement(He,null,a.createElement(kn,{UrlFE:E.HOME_PAGE_URL,titleBtnViewMore:L("home.navigator.menuItem.allCategories"),menuItems:r,headingTitle:L("home.navigator.menuItem.healthCategories"),onClosePopup:l}),"categories"===v&&a.createElement(Tn,{spotlightsList:(null==u?void 0:u.spotlights)||[],hrefViewMore:"".concat(E.HOME_PAGE_URL).concat("tl-PH"===y?"/fil":"","/spotlight/")}),"tools"===v&&a.createElement(Rn,{spotlightHealthTools:null==d?void 0:d.spotlights,hrefViewMore:"".concat(E.HOME_PAGE_URL).concat("tl-PH"===y?"/fil":"").concat((null===(t=It[y])||void 0===t?void 0:t.HEALTH_TOOLS)||"")}),"care"===v&&a.createElement(An,{spotlights:null==h?void 0:h.spotlights,hrefViewMore:"".concat(E.CARE_URL_FE,"/").concat(null===(n=Wt[y])||void 0===n?void 0:n.SPECIALTIES)}),"together"===v&&a.createElement(Nn,{spotlights:null==g?void 0:g.spotlights})))},Zn=function(e){var t=e.forceDisplay,n=e.mediaQueryKey,l=e.children,i=e.className,r=e.style,o=c((function(){return _t(n)}),[n]),s=o[0],m=o[1];return a.createElement(Ae,{lowerBound:t?0:s,upperBound:t?0:m,className:i,style:r},l)},Vn=function(e){var t=e.onCareHeaderClick,n=e.currentUrl,l=e.careUrlFe,i=e.btnName;return a.createElement(Be,null,t?a.createElement(qt,{className:"login-btn-mobile",size:"md",color:"primary",dataEventCategory:"Care",dataEventAction:"Navigation Bar Click",dataEventLabel:n,onClick:function(e){return t(e)}},i):a.createElement("a",{href:l,className:"care-button no-replace-click"},a.createElement(qt,{className:"login-btn-mobile",size:"md",color:"primary",dataEventCategory:"Care",dataEventAction:"Navigation Bar Click",dataEventLabel:n},i)))},Fn=function(e){var t=(e||{}).allowBgScroll,n=i();return{containerRef:n,onContainerFocus:function(){t||(document.documentElement.style.overflow="hidden")},onContainerBlur:function(){t||(document.documentElement.style.overflow="")},onButtonMouseDown:function(e){n.current&&(document.activeElement===n.current||n.current.contains(document.activeElement))&&(n.current.blur(),document.activeElement.blur(),e.preventDefault())},onClose:function(){n.current&&(document.activeElement===n.current||n.current.contains(document.activeElement))&&(n.current.blur(),document.activeElement.blur())}}},Dn=function(e){var t=e.item,n=e.menu,l=Fn({allowBgScroll:!0}),i=l.containerRef,o=l.onContainerFocus,c=l.onContainerBlur,m=l.onButtonMouseDown,u=l.onClose,d=function(){var e=r(!0),t=e[0],n=e[1];return s((function(){n(!1)}),[]),t}();return!t.popupType&&t.link?a.createElement(Te,{className:d?"":"menu-handler-".concat(t.id),tabIndex:0,as:"a",href:t.link,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":t.link},a.createElement(xe,{"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":t.link},t.name)):a.createElement(Te,{ref:i,className:d?"":"menu-handler-".concat(t.id),tabIndex:0,key:t.id,onBlur:c,onFocus:o,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":t.link},a.createElement(xe,{"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":t.link,onMouseDown:m},t.name,t.popupType&&a.createElement(Ne,null,a.createElement("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M11.5 7.5L9 10L6.5 7.5",stroke:"#202135",strokeWidth:"1.33",strokeLinecap:"round",strokeLinejoin:"round"})))),a.isValidElement(n)?a.cloneElement(n,{onClose:u}):null)},In=function(e){var t,n,l,a;return e?{termId:e.term_id||null,sponsor:e.sponsor?(a=e.sponsor,a?{title:a.title,logo:a.logo,link:a.link}:{}):null,isSponsored:e.is_sponsored||null,categoryName:e.cat_name||e.name||null,name:e.name||null,iconUrl:e.icon||"",slugName:e.category_nicename||null,description:e.description||null,featureImage:e.thumbnail||e.image||null,displayName:e.name||null,parent:e.parent||null,permalink:e.permalink||null,slug:e.slug||null,childCates:(null===(t=e.child_cates)||void 0===t?void 0:t.map((function(e){return In(e)})))||[],thumnailColor:e.thumnail_color||["#FFEAF1","#E0E9FB","#FFF9EB","#F2FCF7","#F3F3F3"][5*Math.random()|0],colorFeatureImage:e.color_feature_image||null,imageColor:e.image_color||null,textColor:e.text_color||null,catParent:(null===(n=e.cat_parent)||void 0===n?void 0:n.name)?{name:e.cat_parent.name,permalink:e.cat_parent.permalink}:{},metaTag:e.meta_tag||"",reviewedBy:e.reviewed_by?(l=e.reviewed_by,{postTitle:l.post_title,permalink:l.permalink}):null,reviewedDate:e.reviewed_date||"",faqs:e.faqs?e.faqs.map((function(e){return function(e){return{title:e.title,content:e.content}}(e)})):null}:{}},On=function(e){var t,n;if(!e)return{};var l=null===(t=e.link)||void 0===t?void 0:t.includes("/bot/"),a=null===(n=e.link)||void 0===n?void 0:n.startsWith("/fil/"),i=e.link?e.link.startsWith("http")||l?e.link:a?e.link.replace("/health-tools/","/").replace("/fil/","/fil/health-tools/"):"/health-tools".concat(e.link.replace("/health-tools/","/")):void 0;return{icon:e.icon,link:i,subtitle:e.subtitle,title:e.title}},jn=function(e){return e?{thumbnail:e.thumbnail,link:null==e?void 0:e.slug,subtitle:e.name,name:e.name,slug:e.slug}:{}},zn=function(e){return e?{id:e.id,name:e.name,logo:null==e?void 0:e.logo,description:e.about,slug:e.slug}:{}},Gn=function(e){var t,n,l=e.type,a=e.specialtySlug,i=e.locale;return"".concat(null===(t=Wt[i])||void 0===t?void 0:t.ALL,"/").concat((null===(n=Wt[i])||void 0===n?void 0:n[l])||"doctor","/").concat(null!=a?a:"")},Wn=function(e){return e?{id:e.ID,name:e.name,permalink:e.permalink,image:(null==e?void 0:e.small_banner)||(null==e?void 0:e.image)||"",imageMedium:(null==e?void 0:e.image_medium)||null,imageThumbnail:(null==e?void 0:e.image_thumbnail)||null,startDate:null==e?void 0:e.start_date,endDate:null==e?void 0:e.end_date}:{}},Yn=function(e){var t=new Date;if(null==e?void 0:e.startDate){var n=new Date(e.startDate);if(t.getTime()<n.getTime())return!1}if(null==e?void 0:e.endDate){var l=new Date(e.endDate);if(t.getTime()>l.getTime())return!1}return!0},qn=function(e){var t=e.onClosePopup;return a.createElement(Se,{className:"close-btn",onClick:t},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M18 6L6 18M18 18L6 6",stroke:"#3E3F58",strokeWidth:"1.3",strokeLinecap:"round"})))},Kn=function(e){var t=e.onClosePopup,n=e.isDisplay,l=e.children,i=e.isNavMenu,r=e.hideCloseBtn;return a.createElement(Re,{className:"top-menu-health-tools","data-is-display":!!n,"data-is-nav-menu":!!i},a.createElement(v,null,!r&&a.createElement(Ue,null,a.createElement(qn,{onClosePopup:t})),a.createElement(Ze,null,l)))},Qn=function(e){var t,n=e.careSpecialties,l=void 0===n?[]:n,i=e.isOpen,r=e.onClose,c=e.spotlights,s=void 0===c?[]:c,m=Yt().t,u=o(b),d=u.locale,h=u.configs.statics,g="".concat(h.CARE_URL_FE,"/").concat(null===(t=Wt[d])||void 0===t?void 0:t.SPECIALTIES);return a.createElement(Kn,{onClosePopup:r,isDisplay:i,isNavMenu:!0},a.createElement(kn,{headingTitle:m("home.navigator.menuItem.specialties"),hrefViewMore:g,UrlFE:h.CARE_URL_FE,onClosePopup:r,titleBtnViewMore:m("home.navigator.menuItem.allSpecialties"),menuItems:(null==l?void 0:l.map((function(e){return e?{name:String(e.name)||"",link:Gn({type:"DOCTOR",specialtySlug:e.slug,locale:d}),thumbnail:(null==e?void 0:e.thumbnail)||""}:{}})))||[]}),a.createElement(An,{spotlights:s,hrefViewMore:g}))},Jn=function(e){var t=e.categories,n=void 0===t?[]:t,l=e.spotlightsList,i=void 0===l?[]:l,r=e.onClose,c=e.isOpen,s=Yt().t,m=o(b),u=m.locale,d=m.configs.statics;return a.createElement(Kn,{onClosePopup:r,isDisplay:c,isNavMenu:!0},a.createElement(kn,{hrefViewMore:"".concat(d.HOME_PAGE_URL).concat("tl-PH"===u?"/fil":"","/categories/"),UrlFE:d.HOME_PAGE_URL,onClosePopup:r,titleBtnViewMore:s("home.navigator.menuItem.allCategories"),menuItems:(null==n?void 0:n.map((function(e){return e?{name:e.displayName||null,link:(null==e?void 0:e.permalink)||"/",thumbnail:e.iconUrl||null}:{}})))||[],headingTitle:s("home.navigator.menuItem.healthCategories")}),a.createElement(Tn,{spotlightsList:i,hrefViewMore:"".concat(d.HOME_PAGE_URL).concat("tl-PH"===u?"/fil":"","/spotlight/")}))},Xn=function(e){var t=e.communities,n=void 0===t?[]:t,l=e.onClose,i=e.isOpen,r=e.spotlights,c=void 0===r?[]:r,s=Yt().t,m=o(b).configs.statics;return a.createElement(Kn,{onClosePopup:l,isDisplay:i,isNavMenu:!0},a.createElement(kn,{hrefViewMore:m.TOGETHER_URL_FE,UrlFE:m.TOGETHER_URL_FE,onClosePopup:l,titleBtnViewMore:s("home.navigator.menuItem.allCommunities"),menuItems:(null==n?void 0:n.map((function(e){return e?{name:e.name||"",link:e.slug||"/",thumbnail:e.thumbnail||""}:{}})))||[],headingTitle:s("home.navigator.menuItem.allCommunitiesheadingTitle")}),a.createElement(Nn,{spotlights:c}))},$n=function(e){var t,n=e.locale,l=e.onClose,i=e.isOpen,r=e.spotlightHealthTools,c=void 0===r?[]:r,s=e.healthTools,m=void 0===s?[]:s,u=Yt().t,d=o(b).configs.statics,h="".concat(d.HOME_PAGE_URL).concat("tl-PH"===n?"/fil":"").concat((null===(t=It[n])||void 0===t?void 0:t.HEALTH_TOOLS)||"");return a.createElement(Kn,{onClosePopup:l,isDisplay:i,isNavMenu:!0},a.createElement(kn,{hrefViewMore:h,UrlFE:d.HOME_PAGE_URL,onClosePopup:l,headingTitle:u("home.navigator.menuItem.healthToolsList"),titleBtnViewMore:u("home.navigator.menuItem.allHealthTools"),menuItems:m.map((function(e){return{name:e.title,link:e.link?e.link.startsWith("http")?e.link:"".concat(d.HOME_PAGE_URL).concat(e.link):void 0,thumbnail:e.icon}}))}),a.createElement(Rn,{spotlightHealthTools:c,hrefViewMore:h}))};function el(e){var t=e.className,n=e.ampHidden,l=e.ampBindHiddenCondition;return a.createElement("div",{"data-amp-bind-hidden":l,hidden:n},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t},a.createElement("path",{d:"M18 6L6 18M18 18L6 6",stroke:"#3E3F58",strokeWidth:"1.3",strokeLinecap:"round"})))}function tl(e){var t=e.siteType,n=e.type,l=e.enableSearch,i=e.className,r=e.ampBindHiddenCondition;return"helloSites"===t?a.createElement("div",{"data-amp-bind-hidden":r},a.createElement("img",{"data-list-type":"Header","data-content-type":"Navigation","data-content-topic":"Hamburger",src:l?Nt.getAssetPath("hamburgerMenuNewWithSearch.svg"):Nt.getAssetPath("hamburgerMenuNew.svg"),style:{width:"24px",height:"24px"},alt:n,className:i})):a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.34961 15C3.34961 14.641 3.64062 14.35 3.99961 14.35L13.9996 14.35C14.3586 14.35 14.6496 14.641 14.6496 15C14.6496 15.359 14.3586 15.65 13.9996 15.65L3.99961 15.65C3.64062 15.65 3.34961 15.359 3.34961 15ZM3.34961 8.99999C3.34961 8.64101 3.64062 8.34999 3.99961 8.34999L19.9992 8.34999C20.3582 8.34999 20.6492 8.64101 20.6492 8.99999C20.6492 9.35898 20.3582 9.64999 19.9992 9.64999L3.99961 9.64999C3.64062 9.64999 3.34961 9.35898 3.34961 8.99999Z",fill:"#3E3F58"}))}var nl=function(e){var t=e.type,n=void 0===t?"home":t,l=e.menuItems,i=o(b),r=i.siteType,c=i.isAmp,s=i.configs.enableSearchBar,m=Fn(),u=m.containerRef,d=m.onContainerFocus,h=m.onContainerBlur,g=m.onButtonMouseDown,v=m.onClose;return a.createElement(Zn,{mediaQueryKey:"mbDown",forceDisplay:!!c||void 0},c&&a.createElement("amp-state",{id:"menu"},a.createElement("script",{type:"application/json",dangerouslySetInnerHTML:{__html:JSON.stringify({lightbox:"closed"})}})),a.createElement(Ve,null,a.createElement(Fe,{ref:u,on:"tap:discover-amp-lightbox",role:"button",tabIndex:0,onBlur:h,onFocus:d,isAmp:c},a.createElement(De,{onMouseDown:g,"data-event-category":"Hamburger Navigation","data-event-action":"Click","data-event-label":"Hamburger Navigation URL"},a.createElement(el,{className:"mobile-close-icon",ampHidden:c&&!0,ampBindHiddenCondition:"menu.lightbox == 'closed'"}),a.createElement(tl,{siteType:r,type:n,enableSearch:s,className:"mobile-hamburger-icon",ampBindHiddenCondition:"menu.lightbox == 'open'"})),!c&&a.createElement(Un,{menuItems:l,closePopup:v}))))},ll=function(e){var t=e.openLogoutPopup,n=e.onCloseHandler,l=e.onLogoutHandler,i=e.siteType,r=void 0===i?"helloSites":i,o=Yt().t;return s((function(){document.body.classList.toggle("noscroll",t)}),[t]),a.createElement(Vt,null,a.createElement(Ie,{type:"confirm",isOpen:t,closeIcon:a.createElement("img",{src:Nt.getAssetPath("closeLight.svg"),style:{width:24,height:24},alt:"close-icon"}),onClose:n},a.createElement(Oe,null,"helloSites"===r&&a.createElement("img",{src:Nt.getAssetPath("arrowDoor.svg"),className:"cancle-img",alt:"close-account"}),a.createElement("h2",null,o("helloSites"===r?"logout.popup.ask1":"logout.popup.ask.mb")),a.createElement("p",null,o("logout.popup.ask2")),a.createElement(je,{siteType:r},a.createElement(qt,{className:"logout-button",color:"tertiary",size:"lg",onClick:l},o("logout.popup.button.logout")),a.createElement(qt,{className:"cancel-button",color:"primary",size:"lg",onClick:n},o("logout.popup.button.cancel"))))))},al={myBooking:"booking",mySaved:"saved",myHealth:"health",myFamily:"family",myCommunity:"my-communities",eCom:"shop"};function il(e){var t=e.userInfo,n=e.onClickMyProfileButton,l=e.themeName,i=void 0===l?"helloSites":l,r=Yt().t,o=c((function(){var e=(null==t?void 0:t.name)||(null==t?void 0:t.username);return e&&e.length?e[0].toUpperCase():"A"}),[null==t?void 0:t.username,null==t?void 0:t.name]);return a.createElement(ze,{onClick:function(){n&&n()}},a.createElement(Ge,{type:"rounded",size:"xl",avatarUrl:null==t?void 0:t.avatar,firstLetter:o,backgroundColor:"marryBaby"===i?Kt.mbColors.pink:Kt.colors.secondaryBase}),a.createElement(We,null,a.createElement(Ye,null,(null==t?void 0:t.name)||(null==t?void 0:t.username)),a.createElement(qe,null,r("userProfile.nav.header.viewProfile"))))}var rl=function(e){var t=e.themeName,n=e.locale,l=e.onClickItem,i=r(""),o=i[0],s=i[1],m=Yt().t,u=c((function(){return"marryBaby"===t?[{key:"userProfile.nav.menu.password",icon:Nt.getAssetPath("userProfileNav/marryBaby/icon-lock.svg"),link:"password"},{key:"userProfile.nav.menu.logout",icon:Nt.getAssetPath("userProfileNav/marryBaby/icon-logOut.svg"),link:"logout"}]:[{key:"userProfile.nav.menu.accountSettings",icon:Nt.getAssetPath("userProfileNav/helloSites/icon-settingsWheel.svg"),subMenu:[{key:"userProfile.nav.menu.password",link:"password"},{key:"userProfile.nav.menu.disableAccount",link:"disable-account",disableLocale:["hi-IN"]}]},{key:"userProfile.nav.menu.help",icon:Nt.getAssetPath("userProfileNav/helloSites/icon-helpCircle.svg"),link:"help"}]}),[t]);return a.createElement(Ke,null,u.map((function e(t){var i;return(null===(i=t.disableLocale)||void 0===i?void 0:i.includes(n))?null:a.createElement(Qe,{className:"nav-menu-item","data-is-open":o===t.key,key:t.key,hasSubmenu:!!t.subMenu},a.createElement(Je,{onClick:function(){return function(e){e.subMenu?s((function(t){return t?"":e.key})):l&&l(e)}(t)}},t.icon&&a.createElement(Xe,{style:{backgroundImage:'url("'.concat(t.icon,'")')}}),m(t.key),t.subMenu&&a.createElement($e,null)),t.subMenu&&a.createElement(et,null,t.subMenu.map(e)))})))},ol={helloSites:{member:function(){return Nt.getAssetPath("userProfileNav/helloSites/icon-rank-member.svg")},ambassador:function(){return Nt.getAssetPath("userProfileNav/helloSites/icon-rank-ambassador.svg")},doctor:function(){return Nt.getAssetPath("userProfileNav/helloSites/icon-rank-doctor.svg")},expert:function(){return Nt.getAssetPath("userProfileNav/helloSites/icon-rank-expert.svg")},influencer:function(){return Nt.getAssetPath("userProfileNav/helloSites/icon-rank-influencer.svg")}},marryBaby:{member:function(){return Nt.getAssetPath("userProfileNav/marryBaby/icon-rank-member.svg")},ambassador:function(){return Nt.getAssetPath("userProfileNav/marryBaby/icon-rank-ambassador.svg")},doctor:function(){return Nt.getAssetPath("userProfileNav/marryBaby/icon-rank-doctor.svg")},expert:function(){return Nt.getAssetPath("userProfileNav/marryBaby/icon-rank-expert.svg")},influencer:function(){return Nt.getAssetPath("userProfileNav/marryBaby/icon-rank-influencer.svg")}}},cl=function(e){var t=e.themeName,n=e.rank,l=void 0===n?"member":n,i=e.numberOfPosts,r=void 0===i?0:i,o=Yt().t,s=c((function(){var e,n;return(null===(n=null===(e=ol[t])||void 0===e?void 0:e[l])||void 0===n?void 0:n.call(e))||""}),[l,t]);return a.createElement(tt,{"data-user-rank":l},a.createElement(nt,null,a.createElement(lt,null,a.createElement(at,{style:{backgroundImage:'url("'.concat(s,'")')}}),a.createElement(it,null,o("userProfile.userRank.".concat(l))),r>0&&a.createElement(rt,null,r," ",o("userProfile.nav.header.count.posts")))))},sl=function(t){var n=t.SSO_URL,l=t.UP_BASEPATH,i=void 0===l?"user":l,o=t.themeName,m=void 0===o?"helloSites":o,u=t.cardUrls,d=void 0===u?al:u,h=t.enableCare,g=t.enableTogether,v=t.enableEcom,p=t.userInfo,E=t.togetherApiDomain,f=t.userPostsNumber,w=t.onClickNavigationCard,y=t.onClickMyProfileButton,L=t.onClickMenuItem,b=t.onClickLogout,C=t.isUserProfileNavigatorMenuHidden,k=void 0!==C&&C,M=t.isMyHealthEnabled,P=void 0!==M&&M,H=t.locale,A=Yt().t,B=r(f||0),T=B[0],x=B[1],N="marryBaby"===m;s((function(){if(p&&void 0===f){var t=Qt("hhg_user_token");t&&fetch(function(t,n,l,a){return(l||"https://together.hellohealthgroup.com/")+"api/v1/"+Ft(_e.GET_USER_POSTS,e(e({},a),{websiteUrl:n?"https://marrybaby.vn":"https://".concat(Ot[t])}))}(H,N,E),{headers:{Authorization:"Bearer ".concat(t)}}).then((function(e){return e.json()})).then((function(e){var t,n,l;1===(null==e?void 0:e.status)&&(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.pagination)&&x((null===(l=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.pagination)||void 0===l?void 0:l.total_items)||0)})).catch((function(e){return console.error("Error fetching post number",e)}))}}),[H,null!==p,f,E,N]);var _=c((function(){return(N?["myHealth","myCommunity","mySaved"]:["myHealth","mySaved","myBooking","myCommunity","eCom"]).filter((function(e){return"myBooking"===e?h:"myCommunity"===e?g:"myHealth"===e?P:"eCom"!==e||v}))}),[N,P]),S=c((function(){return"marryBaby"===m?null:a.createElement(ot,{color:"tertiary",icon:a.createElement("img",{src:Nt.getAssetPath("userProfileNav/helloSites/icon-logOut.svg"),width:15,height:15}),size:"md",onClick:b},A("userProfile.nav.menu.logout"))}),[m]),R=function(e){window.location.href="".concat(n).concat(i,"/").concat(e)},U=function(e){var t=d[e];w?w(t):R(t)};return p?a.createElement(ct,{"data-theme":m},a.createElement(il,{userInfo:p,themeName:m,onClickMyProfileButton:function(){y?y():R("profile")}}),a.createElement(cl,{themeName:m,rank:"member",numberOfPosts:T}),a.createElement(st,null,_.map((function(e){return a.createElement(mt,{key:e,themeName:m,type:e,onClick:U})}))),!k&&a.createElement(a.Fragment,null,a.createElement(rl,{themeName:m,locale:H,onClickItem:function(e){"logout"===e.link&&b?b():e.link&&!e.subMenu&&(L?L(e.link):R(e.link))}}),S)):null},ml=function(e){var t=e.type,n=void 0===t?"lead":t,l=e.closeIcon,i=e.isOpen,r=void 0===i||i,o=e.onClose,c=e.children,s=e.enableAnimation,m=void 0===s||s,u=e.targetAvatar,d=e.id,h=e.className;return a.createElement(ut,{"data-open":r,"data-type":n,"data-animation":m,"data-target":u,id:d,className:h},a.createElement("div",{className:"popup-content"},!!l&&a.createElement("div",{className:"close-button",onClick:o},l),c))},ul=function(e){var t=e.SSO_URL,n=e.UP_BASEPATH,l=e.isOpen,i=e.targetAvatar,r=e.userInfo,o=e.enableCare,c=e.enableTogether,s=e.enableEcom,m=e.closePopup,u=e.siteType,d=void 0===u?"helloSites":u,h=e.dispatchLogout,g=e.userProfileRouterPush,v=e.isUserProfileNavigatorMenuHidden,p=e.isMyHealthEnabled,E=void 0!==p&&p,f=e.togetherApiDomain,w=e.locale,y=function(e){g?g("/".concat(e)):t&&(window.location.href="".concat(t).concat(n,"/").concat(e))},L=function(e){y(e),m()};return a.createElement(ml,{isOpen:l,type:"profile",enableAnimation:!0,targetAvatar:i,onClose:m},a.createElement(sl,{SSO_URL:t,UP_BASEPATH:n,themeName:d,userInfo:r,enableCare:o,enableTogether:c,enableEcom:s,onClickLogout:function(){h&&(h(),m())},onClickMenuItem:L,onClickNavigationCard:L,onClickMyProfileButton:function(){y("profile"),m()},isUserProfileNavigatorMenuHidden:v,isMyHealthEnabled:E,togetherApiDomain:f,locale:w}))},dl=function(t){var i=t.userInfo,o=t.siteType,c=t.isAmp,m=t.goToLogin,u=t.SSO_URL,d=t.currentUrl,g=t.isMinifyLogin,v=t.enableCare,p=t.enableTogether,E=t.enableEcom,f=t.isUserProfileNavigatorMenuHidden,w=t.UP_BASEPATH,y=t.isMyHealthEnabled,L=t.togetherApiDomain,b=t.onLogout,C=t.style,k=t.userProfileRouterPush,M=t.isLoading,P=t.locale,H=Yt().t,A=r(!1),B=A[0],T=A[1],x=(null==i?void 0:i.name)||(null==i?void 0:i.username),N=r(!1),_=N[0],S=N[1];s((function(){S(!0)}),[]);var R=Fn(),U=R.containerRef,Z=R.onContainerFocus,V=R.onContainerBlur,F=R.onButtonMouseDown,D=R.onClose;return M&&!c?a.createElement(qt,{size:"sm",color:"transparent",isLoading:!0}):(null==i?void 0:i.id)?a.createElement(a.Fragment,null,a.createElement(dt,{ref:U,href:c?"".concat(u,"user/profile"):void 0,style:C,tabIndex:0,onBlur:V,onFocus:Z},a.createElement("div",{onMouseDown:F},a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"user-close-icon"},a.createElement("path",{d:"M18 6L6 18M18 18L6 6",stroke:"#3E3F58",strokeWidth:"1.3",strokeLinecap:"round"})),a.createElement(ht,{type:"rounded",size:"medium",className:"user-avatar",avatarUrl:null==i?void 0:i.avatar,firstLetter:x&&x.length?x[0].toUpperCase():"A",backgroundColor:"marryBaby"===o?Kt.mbColors.pink:Kt.colors.secondaryBase,isAmp:c})),!c&&a.createElement(ul,{UP_BASEPATH:w,SSO_URL:u,dispatchLogout:function(){D(),T(!0)},isOpen:!1,isMyHealthEnabled:y,enableCare:v,enableTogether:p,enableEcom:E,closePopup:D,userInfo:i,siteType:o,isUserProfileNavigatorMenuHidden:f,togetherApiDomain:L,userProfileRouterPush:k,locale:P})),!c&&a.createElement(ll,{openLogoutPopup:B,onCloseHandler:function(){document.body.classList.toggle("noscroll",!1),T(!1)},siteType:o,onLogoutHandler:function(){return n(void 0,void 0,void 0,(function(){return l(this,(function(e){switch(e.label){case 0:return T(!1),document.body.classList.toggle("noscroll",!1),[4,b()];case 1:return e.sent(),[2]}}))}))}})):a.createElement(gt,{style:e({textDecoration:"none"},C),"data-event-category":"Sign Up","data-event-action":"Button Click","data-event-label":d,href:c?"".concat(u,"?returnUrl=").concat(d.replace("?amp=1","")):_?void 0:"".concat(u,"?returnUrl=").concat(d),"data-site-type":o},g?a.createElement(vt,{onClick:m},a.createElement("img",{"data-src":Nt.getAssetPath("lock.png"),className:"avatar lazy",alt:"avatar"})):a.createElement(a.Fragment,null,"helloSites"===o&&a.createElement("img",{className:"mobile-only",src:Nt.getAssetPath("login.svg"),style:{cursor:"pointer",height:24,width:24},onClick:m}),"marryBaby"===o&&a.createElement("div",{className:"mobile-only",onClick:m,style:{paddingLeft:16}},a.createElement(h,{size:"p3",color:Kt.mbColors.pink},H("navigation.loginJoin"))),a.createElement(qt,{className:"login-btn",size:"md",color:"tertiary",onClick:m,icon:a.createElement("img",{src:Nt.getAssetPath("login.svg"),width:18,height:18}),theme:o},H("navigation.loginJoin"))))};function hl(e){var t=e.goToLogin,n=o(b),l=n.siteType,i=n.isAmp,r=n.userState.userInfo,c=n.currentUrl,s=n.locale,m=n.onLogout,u=n.userProfileRouterPush,d=n.configs,h=d.enableNavCare,g=d.enableProfileMyHealth,v=d.enableNavTogether,p=d.enableProfileEcom,E=d.statics,f=d.enableProfileNavigatorMenu,w=n.isUserLoading;return a.createElement(dl,{userInfo:r,siteType:l,isAmp:i,goToLogin:t,SSO_URL:E.SSO_URL+"/",currentUrl:c,onLogout:m,UP_BASEPATH:jt,isMyHealthEnabled:g,enableCare:h,enableTogether:v,enableEcom:p,togetherApiDomain:E.TOGETHER_API+"/",isUserProfileNavigatorMenuHidden:!f,userProfileRouterPush:u,isLoading:w,locale:s})}var gl=function(e){var t,n,l,c,u,d=e.onTopBarAppears,h=e.type,g=void 0===h?"home":h,v=e.languageMenu,p=e.menuItems,E=e.setSitewideBannerClosed,f=e.sitewideBannerClosed,w=o(b),y=w.siteType,L=w.isAmp,C=w.isMobile,k=void 0!==C&&C,M=w.locale,P=w.sitewideBanner,H=w.sitewideBannerShown,A=void 0===H||H,B=w.sponsorComponent,T=w.onBookingClick,x=w.currentUrl,N=w.ssrMenuContent,_=N.categories,S=N.healthTools,R=N.care,U=N.together,Z=w.configs,V=Z.statics,F=Z.enableNavCareBooking,D=Z.enableSearchBar,I=Yt().t,O=V.SSO_URL,j=V.HOME_PAGE_URL,z=!!B,G=r(!1),W=G[0],Y=G[1],q=i(47),K=i(null),Q=i(!1),J="helloSites"===y?null===(t=Dt[M])||void 0===t?void 0:t.LOGO_TYPE:y,X="undefined"!=typeof window,$=m(xt((function(){if("home"===g&&X){if(!K.current)return;var e=K.current.getBoundingClientRect();e.top<=0&&window.scrollY>q.current&&window.scrollY>e.height+20&&!Q.current&&(Q.current=!0,Y(!0)),window.scrollY<q.current&&Q.current&&(Q.current=!1,Y(!1)),window.scrollY>=0&&(q.current=window.scrollY)}}),200),[]);s((function(){null==d||d(!W)}),[W]),s((function(){return window.addEventListener("scroll",$,{passive:!0}),function(){window.removeEventListener("scroll",$)}}),[]),s((function(){k&&$()}),[k]),s((function(){null==St||St.update(document.querySelectorAll("#site-header img"))}),[null===(n=null==_?void 0:_.items)||void 0===n?void 0:n.length,null===(l=null==S?void 0:S.items)||void 0===l?void 0:l.length,null===(c=null==R?void 0:R.items)||void 0===c?void 0:c.length,null===(u=null==U?void 0:U.items)||void 0===u?void 0:u.length,k]);var ee=A&&!!P&&!f;return a.createElement(pt,{"data-site-type":y,"data-sponsored":z,"data-sitewide-banner-shown":ee,"data-header-type":g,"data-collapsed":W,"data-with-search-input":"popup-sub-level"!==g,"data-is-displayed":!0,"data-is-amp":L,id:"site-header",ref:K},P?a.isValidElement(P)?a.cloneElement(P,{isCollapsed:W,setBannerClosed:E,isAmp:L,isMobile:k}):P:null,a.createElement(Et,{"data-site-type":y},a.createElement(ft,{"data-site-type":y},a.createElement(nl,{menuItems:p,type:g}),a.createElement("a",{href:j},a.createElement(wt,null,a.createElement(yt,{style:{display:"flex"},type:J,height:"27px",width:"121px",badge:"id-ID"===M&&(L?a.createElement("amp-img",{src:Nt.getAssetPath("sehat-badge.png"),width:"56",height:"23"}):a.createElement("img",{src:Nt.getAssetPath("sehat-badge.png"),width:"56",height:"23"})),dateForSeasonal:new Date,locale:M,key:"undefined"!=typeof window?"client":"server"}))),!L&&("marryBaby"===y?a.createElement(pl,{menuItems:p}):D&&a.createElement(vl,{siteType:y}))),a.createElement(Lt,{"data-site-type":y},!L&&("marryBaby"===y?D&&a.createElement(vl,{siteType:y}):a.createElement(pl,{menuItems:p})),a.createElement(bt,null,F&&!L&&a.createElement(Zn,{mediaQueryKey:"mbUp",forceDisplay:!L&&void 0},a.createElement(Vn,{careUrlFe:V.CARE_URL_FE,currentUrl:x,btnName:I("login.booking"),onCareHeaderClick:T})),v,a.createElement(hl,{goToLogin:function(){var e=window.location.href;window.location.href=O?"".concat(O,"?returnUrl=").concat(e):e}})))),B?a.isValidElement(B)?a.cloneElement(B,{isCollapsed:W,locale:M,isMobile:k,isAmp:L}):B:null)},vl=function(e){var t=e.siteType;return a.createElement(Zn,{mediaQueryKey:"mbUp",className:"marryBaby"===t?"marry-baby":""},a.createElement(Cn,null))},pl=function(e){var t=e.menuItems,n=o(b),l=n.siteType,i=n.locale,r=n.ssrMenuContent,c=r.categories,s=r.healthTools,m=r.care,u=r.together;return a.createElement(Zn,{mediaQueryKey:"mbUp",style:{height:"100%"}},a.createElement(Ct,{"data-site-type":l},null==t?void 0:t.map((function(e,t){return a.createElement(Dn,{key:t,item:e,menu:"categories"===e.popupType?a.createElement(Jn,{categories:null==c?void 0:c.items,spotlightsList:null==c?void 0:c.spotlights}):"tools"===e.popupType?a.createElement($n,{locale:i,healthTools:null==s?void 0:s.items,spotlightHealthTools:null==s?void 0:s.spotlights}):"together"===e.popupType?a.createElement(Xn,{communities:null==u?void 0:u.items,spotlights:null==u?void 0:u.spotlights}):"care"===e.popupType?a.createElement(Qn,{careSpecialties:null==m?void 0:m.items,spotlights:null==m?void 0:m.spotlights}):null})}))))},El=function(t){var n,l,u=t.isMobile,d=t.isAmp,h=void 0!==d&&d,g=t.locale,v=t.onTopBarAppears,p=t.languageOptions,E=t.ampSubBar,f=t.sponsorComponent,w=t.sitewideBanner,y=t.sitewideBannerShown,L=t.className,C=r(!1),k=C[0],M=C[1],P=function(){var e=Yt().t,t=o(b),n=t.siteType,l=t.locale,a=t.configs,i=a.enableNavCare,r=a.enableNavTogether,s=a.enableNavEcom,m=a.statics,u="marryBaby"===n,d=c((function(){var t,n=[{name:e("home.navigator.menuItem.discover"),id:"categories",link:"".concat(m.HOME_PAGE_URL).concat("tl-PH"===l?"/fil":"","/categories"),niceName:"",thumbnail:u?Nt.getAssetPath("categories-mb.svg"):Nt.getAssetPath("discover.png"),popupType:"categories"},{name:e("home.navigator.menuItem.healthTools"),id:"tools",link:"".concat(m.HOME_PAGE_URL).concat("tl-PH"===l?"/fil":"").concat((null===(t=It[l])||void 0===t?void 0:t.HEALTH_TOOLS)||""),thumbnail:u?Nt.getAssetPath("healthtools-mb.svg"):Nt.getAssetPath("healthTools.png"),popupType:"tools"}];return i&&n.push({name:e("home.navigator.menuItem.helloCare"),id:"care",link:m.HOME_PAGE_URL+"/care",thumbnail:Nt.getAssetPath("helloCare-thumbnail.png"),popupType:"zh-TW"===l?null:"care"}),r&&n.push({name:e("home.navigator.menuItem.helloTogether"),id:"together",link:m.TOGETHER_URL_FE+"/",thumbnail:u?Nt.getAssetPath("community-mb.svg"):Nt.getAssetPath("together.png"),popupType:"together"}),s&&n.push({name:e("home.navigator.menuItem.helloEcom"),id:"ecom",link:m.HOME_PAGE_URL+"/ecom",thumbnail:Nt.getAssetPath("helloCare-thumbnail.png"),popupType:"shop"}),n}),[l,i,r,s]);return d}();!function(){var t=o(b),n=t.isFirstLogin,l=t.userState.userInfo;s((function(){(null==l?void 0:l.id)&&(n?(null==l?void 0:l.email)&&""!==(null==l?void 0:l.email)?window.insider_object={user:e({uuid:null==l?void 0:l.id,email:null==l?void 0:l.email,gdpr_optin:!0,email_optin:!0,sign_up:!0},(null==l?void 0:l.name)?{name:null==l?void 0:l.name}:{})}:window.insider_object={user:e({uuid:null==l?void 0:l.id,sign_up:!0},(null==l?void 0:l.name)?{name:null==l?void 0:l.name}:{})}:(null==l?void 0:l.email)&&""!==(null==l?void 0:l.email)?window.insider_object={user:e({uuid:null==l?void 0:l.id,email:null==l?void 0:l.email,gdpr_optin:!0,email_optin:!0,log_in:!0},(null==l?void 0:l.name)?{name:null==l?void 0:l.name}:{})}:window.insider_object={user:e({uuid:null==l?void 0:l.id,log_in:!0},(null==l?void 0:l.name)?{name:null==l?void 0:l.name}:{})})}),[])}();var H=h&&{"next-page-hide":""},A=function(e){var t=e.hasSponsoredBanners,n=e.isSiteWide,l=e.isSponsored,a=e.isShowingSiteWideBanner,o=e.isMobile,u=e.showAmpSubBar,d=i(null),h=r(0),g=h[0],v=h[1],p=r(64),E=p[0],f=p[1],w=m(Bt((function(){var e,t,n,l,a=(null===(e=d.current)||void 0===e?void 0:e.clientHeight)||(null===(n=null===(t=d.current)||void 0===t?void 0:t.children[0])||void 0===n?void 0:n.clientHeight)||0;window.scrollY<=a+200&&(v(a),f((null===(l=d.current)||void 0===l?void 0:l.getBoundingClientRect().bottom)||g))}),200),[]);s((function(){return window.addEventListener("resize",w),window.addEventListener("scroll",w),w(),function(){window.removeEventListener("resize",w),window.removeEventListener("scroll",w)}}),[]),s((function(){w()}),[u,o,n,a,l,t,d.current]);var y=c((function(){var e=o?64:69;return a&&(e+=64),l&&(e+=40,t&&(e+=57)),u&&(e+=32),e}),[o,a,t,l,u]);return{defaultHeaderHeight:y,headerHeight:g||y,headerBottom:E,headerRef:d}}({isSiteWide:!!w&&!k,isShowingSiteWideBanner:y&&!!w&&!k,isSponsored:!!f,hasSponsoredBanners:!!(null===(l=null===(n=null==f?void 0:f.props)||void 0===n?void 0:n.sponsoredBy)||void 0===l?void 0:l.length),isMobile:u,showAmpSubBar:h&&!!E}),B=A.headerRef,T=A.defaultHeaderHeight,x=A.headerHeight,N=A.headerBottom;return a.createElement(Mt,{id:"navigation-v2",style:{"--default-header-height":T+"px","--header-height":"calc(".concat(x,"px - var(--amp-site-wide-closed), 64px)"),"--header-bottom":N+"px"},isAmp:h,className:"".concat(h&&y?"nav-open":""," ").concat(L)},a.createElement("section",e({className:h?"amp-header":void 0,"next-page-replace":"hhg-navigator","amp-fx":"float-in-top"},H,{ref:B,style:h?{overflow:"hidden"}:void 0}),a.createElement(gl,{menuItems:P,type:"home",onTopBarAppears:u?function(e){v&&v(e)}:void 0,languageMenu:a.createElement(yn,{languageOptions:p,locale:g}),setSitewideBannerClosed:M,sitewideBannerClosed:k}),u&&h&&void 0!==E&&a.createElement(a.Fragment,null,E)),h&&a.createElement("amp-lightbox",{id:"discover-amp-lightbox",layout:"nodisplay",style:{width:"100vw",maxWidth:"100vw"},on:"lightboxOpen:AMP.setState({menu: {lightbox: 'open'}});lightboxClose:AMP.setState({menu: {lightbox: 'closed'}})"},a.createElement("div",e({style:{position:"absolute",width:"100%",height:"100%"},role:"button",tabIndex:1},{on:"tap:discover-amp-lightbox.close"})),a.createElement(Un,{menuItems:P})))},fl=function(t){var n=e({siteType:"helloSites",projectType:"discover",locale:"vi-VN",activeMenuService:"categories",ssrMenuContent:{}},t);return a.createElement(kt,e({},n),a.createElement(El,e({},n)))},wl=function(e){return n(void 0,void 0,void 0,(function(){var t,n,a,i,r,o,c,s,m,u,d,h,g,v,p,E,f,w,y,L,b,C,k,M,P,H,A,B,T,x,N,_,S,R,U,Z;return l(this,(function(l){switch(l.label){case 0:t={},n="vi-VN_MB"===e,l.label=1;case 1:l.trys.push([1,14,,15]),a="tl-PH"===e?"lang=fil":"",l.label=2;case 2:return l.trys.push([2,4,,5]),[4,Promise.all([fetch("".concat(Zt(e),"/wp-json/api/categories").concat(a?"?"+a:"")).then((function(e){return e.json()})),fetch("".concat(Zt(e),"/wp-json/api/spotlights?per_page=10").concat(a?"&"+a:"")).then((function(e){return e.json()})),fetch("".concat(Zt(e),"/wp-json/api/").concat(n?"health-tools":"healthtools").concat(a?"?"+a:"")).then((function(e){return e.json()})),fetch("".concat(Zt(e),"/wp-json/api/").concat(n?"health-tools":"healthtools","/favorites").concat(a?"?"+a:"")).then((function(e){return e.json()}))])];case 3:return i=l.sent(),r=i[0],o=i[1],c=i[2],s=i[3],t.categories={items:(null===(f=null===(E=null==r?void 0:r.data)||void 0===E?void 0:E.map)||void 0===f?void 0:f.call(E,In))||[],spotlights:(null===(b=null===(L=null===(y=null===(w=null==o?void 0:o.data)||void 0===w?void 0:w.articles)||void 0===y?void 0:y.map)||void 0===L?void 0:L.call(y,Wn))||void 0===b?void 0:b.filter(Yn))||[]},t.healthTools={items:(null===(k=null===(C=null==c?void 0:c.data)||void 0===C?void 0:C.map)||void 0===k?void 0:k.call(C,On))||[],spotlights:(null===(P=null===(M=null==s?void 0:s.data)||void 0===M?void 0:M.map)||void 0===P?void 0:P.call(M,On))||[]},[3,5];case 4:return l.sent(),[3,5];case 5:if(!n&&!Gt.includes(e))return[3,9];l.label=6;case 6:return l.trys.push([6,8,,9]),[4,Promise.all([fetch("".concat(Ut(),"/api/v1/community?website_url=https://").concat(Ot[e])).then((function(e){return e.json()})),fetch("".concat(Ut(),"/api/v1/options?website_url=https://").concat(Ot[e],"&meta_key=popular_post")).then((function(e){return e.json()}))])];case 7:return m=l.sent(),u=m[0],d=m[1],t.together={items:(null===(B=null===(A=null===(H=null==u?void 0:u.data)||void 0===H?void 0:H.communities)||void 0===A?void 0:A.map)||void 0===B?void 0:B.call(A,Pt))||[],spotlights:(null===(N=null===(x=null===(T=null==d?void 0:d.data)||void 0===T?void 0:T.posts)||void 0===x?void 0:x.map)||void 0===N?void 0:N.call(x,Ht))||[]},[3,9];case 8:return l.sent(),[3,9];case 9:if(!zt.includes(e))return[3,13];l.label=10;case 10:return l.trys.push([10,12,,13]),[4,Promise.all([fetch(Rt()+"/api/specialties?_ishome=1&site=".concat(Ot[e])).then((function(e){return e.json()})),fetch(Rt()+"/api/search/?site=".concat(Ot[e],"&type=hospital&order_by=total_doctor")).then((function(e){return e.json()}))])];case 11:return h=l.sent(),g=h[0],v=h[1],t.care={items:(null===(R=null===(S=null===(_=null==g?void 0:g._data)||void 0===_?void 0:_.specialties)||void 0===S?void 0:S.map)||void 0===R?void 0:R.call(S,jn))||[],spotlights:(null===(Z=null===(U=null==v?void 0:v._data.searches)||void 0===U?void 0:U.map)||void 0===Z?void 0:Z.call(U,zn))||[]},[3,13];case 12:return l.sent(),[3,13];case 13:return[3,15];case 14:return p=l.sent(),console.error(p),[3,15];case 15:return[2,t]}}))}))},yl=function(e){return n(void 0,void 0,void 0,(function(){return l(this,(function(t){switch(t.label){case 0:return[4,u("nav-menu-content",(function(){return wl(e||"en-PH")}),(function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.categories)||void 0===t?void 0:t.items)||void 0===n?void 0:n.length)}))];case 1:return[2,t.sent()||{}]}}))}))};export{fn as F,yn as L,fl as N,ul as P,sl as U,yl as a,il as b,cl as c,ll as d,dl as e,wl as g};