@hhgtech/hhg-components 1.21.95 → 1.21.97
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.
- package/build/babyGrowth.js +1 -1
- package/build/cache.js +1 -1
- package/build/components/molecules/babyGrowthForm/index.d.ts +2 -8
- package/build/components/molecules/embeddedHeathToolCards/baby-growth/index.d.ts +4 -7
- package/build/components/molecules/embeddedHeathToolCards/baby-growth/index.styled.d.ts +1 -12
- package/build/components.js +1 -1
- package/build/core-27ea44f3.js +1 -0
- package/build/esm/babyGrowth.js +1 -1
- package/build/esm/cache.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/core-1fde1dd9.js +1 -0
- package/build/esm/{getDynamicHealthTool-896e1eee.js → getDynamicHealthTool-e6a9e58e.js} +1 -1
- package/build/esm/hooks.js +1 -1
- package/build/esm/index-99b6b6e7.js +1 -0
- package/build/esm/index-b38b4414.js +1 -0
- package/build/esm/{index-87e38c6b.js → index-b6596b44.js} +1 -1
- package/build/esm/{index-8c26a26e.js → index-daa27462.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/misc.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-66a3e835.js → types-b2cab8d0.js} +1 -1
- package/build/esm/{useHealthToolCache-9718433c.js → useHealthToolCache-2988152d.js} +1 -1
- package/build/{getDynamicHealthTool-13ad1a92.js → getDynamicHealthTool-4685189a.js} +1 -1
- package/build/hooks.js +1 -1
- package/build/{index-7fdfde3d.js → index-172132d9.js} +1 -1
- package/build/index-1e746189.js +1 -0
- package/build/index-36bf1435.js +1 -0
- package/build/index-61a4c652.js +1 -0
- package/build/index.js +1 -1
- package/build/misc.js +1 -1
- package/build/navigation.js +1 -1
- package/build/together.js +1 -1
- package/build/{types-363e7431.js → types-8ec2c991.js} +1 -1
- package/build/{useHealthToolCache-8b136374.js → useHealthToolCache-9f85e97a.js} +1 -1
- package/package.json +1 -1
- package/build/core-97cd306c.js +0 -1
- package/build/esm/core-341c626a.js +0 -1
- package/build/esm/index-b410592e.js +0 -1
- package/build/esm/index-b584877c.js +0 -1
- package/build/index-01e64289.js +0 -1
- package/build/index-1520bb07.js +0 -1
- package/build/index-dd5749ba.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,d as n,e as i}from"./tslib.es6-44f7e5ec.js";import o,{useState as r,useEffect as a,createContext as l,useContext as s}from"react";import d from"styled-components";import{M as u}from"./utils-11febb09.js";import{g as c}from"./cookieHelper-0e8521c3.js";import m from"slugify";import p from"string-format";var _,v,h,g=d.div(_||(_=e(["\n background-color: var(--background-color, transparent);\n color: white;\n cursor: pointer;\n img {\n --width: var(--width-prop, 40px);\n --height: var(--height-prop, 40px);\n width: var(--width);\n height: var(--height);\n }\n &[data-has-max='true'] {\n img {\n max-width: var(--width);\n max-height: var(--height);\n }\n }\n\n &[data-avatar-type='square'] {\n img {\n --width: var(--width-prop, 72px);\n --height: var(--height-prop, 72px);\n border-radius: 6px;\n }\n }\n\n &[data-avatar-type='rounded'] {\n img {\n border-radius: 50%;\n }\n }\n\n &[data-is-amp='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: 40px;\n height: 40px;\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: 20px;\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n\n &[data-custom-size='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: var(--size);\n height: var(--size);\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: calc(var(--size) / 2);\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n"],["\n background-color: var(--background-color, transparent);\n color: white;\n cursor: pointer;\n img {\n --width: var(--width-prop, 40px);\n --height: var(--height-prop, 40px);\n width: var(--width);\n height: var(--height);\n }\n &[data-has-max='true'] {\n img {\n max-width: var(--width);\n max-height: var(--height);\n }\n }\n\n &[data-avatar-type='square'] {\n img {\n --width: var(--width-prop, 72px);\n --height: var(--height-prop, 72px);\n border-radius: 6px;\n }\n }\n\n &[data-avatar-type='rounded'] {\n img {\n border-radius: 50%;\n }\n }\n\n &[data-is-amp='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: 40px;\n height: 40px;\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: 20px;\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n\n &[data-custom-size='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: var(--size);\n height: var(--size);\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: calc(var(--size) / 2);\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n"]))),E={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},f=function(e){var n=e.type,i=void 0===n?"square":n,l=e.size,s=e.avatarImg,d=e.avatarUrl,u=e.firstLetter,c=e.backgroundColor,m=e.onClick,p=e.style,_=e.className,v=e.isAmp,h=void 0!==v&&v,f=e.width,b=e.height,T=l?E[l]:void 0,y=r(!1),w=y[0],A=y[1];a((function(){if(d){var e=document.createElement("img");e.setAttribute("src",d),e.addEventListener("error",(function(){A(!0)}))}}),[d,A]);var O=(!d&&!s||w)&&u;return o.createElement(g,{style:t(t({},p),{"--size":!h&&T?T+"px":void 0,"--width-prop":f?f+"px":void 0,"--height-prop":b?b+"px":void 0,"--background-color":c}),"data-has-max":!(!f||!b),"data-avatar-type":i,onClick:m,className:_,avatarUrl:d,"data-is-amp":h,"data-custom-size":!!l},s,d&&!w&&o.createElement("img",{src:d}),O&&u)},b=d.div(v||(v=e(["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"],["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200}),u.mbDown,u.mbDown,u.mbUp),T=d.div(h||(h=e(["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"],["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"]))),y=function(e){var t=e.type,n=void 0===t?"lead":t,i=e.closeIcon,r=e.isOpen,a=void 0===r||r,l=e.onClose,s=e.children,d=e.className,u=void 0===d?"":d,c=e.enableAnimation,m=void 0===c||c;return o.createElement(o.Fragment,null,o.createElement(b,{"data-open":a,"data-type":n,"data-animation":m},o.createElement("div",{className:"".concat(u||""," popup-content")},!!i&&o.createElement("div",{className:"close-button",onClick:l},i),s)),o.createElement(T,{"data-open":a,onClick:l}))},w="DD/MM/YYYY",A="/images/avatar.jpg",O="/images/default-image.jpg",I={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},L={"id-ID":{"kalkulator-bmi":I.BMI,"kebutuhan-kalori":I.BMR,"kalkulator-hari-perkiraan-lahir":I.DUE_DATE,"kalkulator-masa-subur-2":I.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":I.PWG,"kalkulator-detak-jantung-saat-olahraga":I.THR},"ms-MY":{"kalkulator-bmi":I.BMI,"kalkulator-bmr":I.BMR,"kalkulator-tarikh-bersalin":I.DUE_DATE,"kalkulator-kesuburan":I.OVULATION,"kalkulator-tambah-berat-badan-hamil":I.PWG,"target-heart-rate-calculator":I.THR},"vi-VN":{"cach-tinh-chi-so-bmi":I.BMI,"tinh-chi-so-bmr":I.BMR,"cong-cu-tinh-ngay-du-sinh":I.DUE_DATE,"tinh-ngay-rung-trung":I.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":I.PWG,"cong-cu-do-nhip-tim":I.THR},"zh-TW":{"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"due-date-calculator":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnancy-weight-gain-calculator":I.PWG,"target-heart-rate-calculator":I.THR},"en-PH":{"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"due-date-calculator":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnancy-weight-gain-calculator":I.PWG,"target-heart-rate-calculator":I.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":I.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":I.BMR,"เครื่องมือคำนวณกำหนดคลอด":I.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":I.OVULATION,"เครื่องคำนวณน้ำหนักตัว":I.PWG,"เครื่องวัดอัตราการเต้น":I.THR},"hi-IN":{"bmi-calculator-en":I.BMI,"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"delivery-date-calculator":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnancy-weight-gain-calculator":I.PWG,"target-heart-rate-calculator":I.THR},"km-KH":{"គណនា-bmi":I.BMI,"គណនា-bmr":I.BMR,"គណនាថ្ងៃសម្រាលកូន":I.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":I.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":I.PWG,"គណនារកចង្វាក់បេះដូងល្អ":I.THR},"my-MM":{"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"due-date-calendar":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnaancy-weight-calculator":I.PWG,"target-heartrate":I.THR,"pregnancy-weight-calculator":I.PWG,"target-heart-rate":I.THR}},S="hhg_user_token",R="together_admin_token",k={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},x=20,P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},D=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:w,DEFAULT_AVATAR_IMG:A,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:O,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:I,LOCALE_HEALTH_TOOLS:L,BEARER_TOKEN_COOKIE:S,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:R,Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:k,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P}),C=function(e){return e?{displayName:e.display_name||null,avatar:e.avatar||null,thumbnailAvatar:e.avatar_thumbnail||null,profileUrl:e.profile_url||null,description:e.description||null,metaTag:e.meta_tag||""}:{}},N=function(e){return e?{id:e.ID||null,name:e.name||null,specialty:e.specialty||null,avatar:e.avatar||null,permalink:e.permalink||null,thumbnailAvatar:e.avatar_thumbnail||null}:{}},G=function(e){var n,i,o,r;return e?{id:e.ID,postName:e.post_name,sponsor:e.sponsor?U(e.sponsor):null,isSponsored:e.is_sponsored||null,postTitle:e.post_title||"",postModified:e.post_modified||"",postDate:e.post_date||"",modifiedTime:e.modified_time||"",permalink:e.permalink||"",featureImage:e.image||null,featureImageMobile:e.image_medium||null,featureImageMobileXs:e.image_thumbnail||null,author:C(e.author),reviewer:e.reviewed_by&&C(e.reviewed_by)||null,articleReviewed:(null==e?void 0:e.reviewed)?t(t({},null==e?void 0:e.reviewed),{author:M(null===(n=null==e?void 0:e.reviewed)||void 0===n?void 0:n.author),editor:M(null===(i=null==e?void 0:e.reviewed)||void 0===i?void 0:i.editor),expert:M(null===(o=null==e?void 0:e.reviewed)||void 0===o?void 0:o.expert),fact_check:M(null===(r=null==e?void 0:e.reviewed)||void 0===r?void 0:r.fact_check)}):null,category:H(e.category),postContent:e.post_content||null,sections:e.sections||null,categories:(e.categories||[]).map(H),sources:e.sources||null,description:e.description||null,excerpt:e.excerpt||null,expert:N(e.expert),metaTag:e.meta_tag||null}:{}},M=function(e){return void 0!==e&&e?t(t({},e),{profile_url:(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?"/expert/".concat(null==e?void 0:e.slug):"/author/".concat(null==e?void 0:e.slug):e.profile_url}):null},U=function(e){return e?{title:e.title,logo:e.logo,link:e.link}:{}},B=function(e){return{postTitle:e.post_title,permalink:e.permalink}},H=function(e){var t,n;return e?{termId:e.term_id||null,sponsor:e.sponsor?U(e.sponsor):null,isSponsored:e.is_sponsored||null,categoryName:e.cat_name||null,name:e.name||null,iconUrl:e.icon||"",slugName:e.category_nicename||null,description:e.description||null,featureImage: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 H(e)})))||[],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?B(e.reviewed_by):null,reviewedDate:e.reviewed_date||"",faqs:e.faqs?e.faqs.map((function(e){return F(e)})):null}:{}},F=function(e){return{title:e.title,content:e.content}},z=function(e){return e?{icon:e.icon,link:e.link.startsWith("http")?e.link:"/health-tools"+e.link,subtitle:e.subtitle,title:e.title}:{}},j=function(e){return e?{topicCount:e.topics_count||0,postCount:e.posts_count||0,memberCount:e.members_count||0,thumbnail:e.thumbnail||"",coverImage:e.cover_image||"",mobileCoverImage:e.mobile_cover_image||"",name:e.name||"",description:e.description||"",slug:e.slug||"",id:e.id||0,joined:Boolean(e.joined),isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},V=function(e){var t,n,i,o;return e?{id:e.id||0,name:e.name||"",image:e.thumbnail||"",slug:e.slug||"",url:"/"+(null===(t=e.community)||void 0===t?void 0:t.slug)+"/"+(null==e?void 0:e.slug)||"",description:e.description||"",joined:e.joined||!1,postCount:e.count_posts||0,memberCount:e.count_members||0,communityId:String(null===(n=e.community)||void 0===n?void 0:n.id),communitySlug:null===(i=e.community)||void 0===i?void 0:i.slug,communityName:null===(o=e.community)||void 0===o?void 0:o.name,order:e.order||0,isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},K=function(e){var t,n,i,o,r,a,l,s,d,u,c,m,p,_,v,h,g,E,f,b,T;return e?{id:e.id,topics:(null===(t=e.topics)||void 0===t?void 0:t.map((function(t){var n,i,o,r;return{id:t.id||0,name:t.name||"",slug:t.slug||"",url:"/"+(null===(n=e.community)||void 0===n?void 0:n.slug)+"/"+t.slug,communityId:String(null===(i=e.community)||void 0===i?void 0:i.id),communitySlug:(null===(o=e.community)||void 0===o?void 0:o.slug)||"",communityName:(null===(r=e.community)||void 0===r?void 0:r.name)||"",isHidden:Boolean(t.is_hidden),isActive:!0}})))||[],community:{id:(null===(n=e.community)||void 0===n?void 0:n.id)||0,name:(null===(i=e.community)||void 0===i?void 0:i.name)||"",slug:(null===(o=e.community)||void 0===o?void 0:o.slug)||"",isActive:!0,isHidden:Boolean(null===(r=e.community)||void 0===r?void 0:r.is_hidden)},slug:e.slug||"",author:{id:(null===(a=e.user)||void 0===a?void 0:a.id)||0,username:(null===(l=e.user)||void 0===l?void 0:l.user_name)||"",email:(null===(s=e.user)||void 0===s?void 0:s.email)||"",name:(null===(d=e.user)||void 0===d?void 0:d.name)||"",avatar:(null===(u=e.user)||void 0===u?void 0:u.avatar)||"",role:(null===(c=e.user)||void 0===c?void 0:c.role)?null===(p=null===(m=e.user)||void 0===m?void 0:m.role)||void 0===p?void 0:p.toLowerCase():"",type:(null===(_=e.user)||void 0===_?void 0:_.type)||"",partnerId:(null===(v=e.user)||void 0===v?void 0:v.partner_id)?String(null===(h=e.user)||void 0===h?void 0:h.partner_id):"",title:(null===(g=e.user)||void 0===g?void 0:g.title)||"",doctorId:(null===(E=e.user)||void 0===E?void 0:E.doctor_id)?String(null===(f=e.user)||void 0===f?void 0:f.doctor_id):"",hospitalId:(null===(b=e.user)||void 0===b?void 0:b.hospital_id)?String(null===(T=e.user)||void 0===T?void 0:T.hospital_id):""},previewUrl:{title:e.preview_title||"",url:e.preview_link||"",image:e.preview_image||"",description:e.preview_description||""},createdAt:e.created_at||"",scheduleDateTime:e.schedule_datetime||"",photos:e.images||[],description:e.description||"",commentsCount:e.comments_count||0,likesCount:e.likes_count||0,title:e.name||"",isPin:!!e.is_pin,pinDate:e.pin_date||"",liked:e.liked||!1,bookmarked:Boolean(e.bookmarked)||!1,mentions:e.mentions||[],commented:Boolean(e.commented)||!1,introUrl:e.intro_url||"",bannerImage:e.banner_image||""}:{}},Y=function(e){return e?{disclaimer:e.disclaimer,featuredImage:e.featured_image,info:e.info||[],reviewedBy:e.reviewed_by?{id:e.reviewed_by.ID,permalink:e.reviewed_by.permalink,name:e.reviewed_by.name,postTitle:e.reviewed_by.post_title}:null,reviewedDate:e.reviewed_date}:{}},W=function(e){var t,n,i,o,r,a,l,s,d,u,c,m,p,_,v,h,g,E,f,b,T,y,w,A,O,I,L,S,R,k,x,P;return e?{content:e.content,countLikes:e.likes_count,countReplies:e.replies_count,createdAt:e.created_at,createdTime:e.created_time,id:String(e.id),images:e.image||[],link:e.link||null,replies:e.replies&&e.replies.length>0?e.replies.map(W):[],author:{id:(null===(t=e.user)||void 0===t?void 0:t.id)||0,username:(null===(n=e.user)||void 0===n?void 0:n.user_name)||"",name:(null===(i=e.user)||void 0===i?void 0:i.name)||"",role:(null===(o=e.user)||void 0===o?void 0:o.role)?null===(a=null===(r=e.user)||void 0===r?void 0:r.role)||void 0===a?void 0:a.toLowerCase():"",avatar:(null===(l=e.user)||void 0===l?void 0:l.avatar)||"",type:(null===(s=e.user)||void 0===s?void 0:s.type)||"",email:(null===(d=e.user)||void 0===d?void 0:d.email)||"",partnerId:(null===(u=e.user)||void 0===u?void 0:u.partner_id)?String(null===(c=e.user)||void 0===c?void 0:c.partner_id):"",title:(null===(m=e.user)||void 0===m?void 0:m.title)||"",doctorId:(null===(p=e.user)||void 0===p?void 0:p.doctor_id)?String(null===(_=e.user)||void 0===_?void 0:_.doctor_id):"",hospitalId:(null===(v=e.user)||void 0===v?void 0:v.hospital_id)?String(null===(h=e.user)||void 0===h?void 0:h.hospital_id):""},liked:!!e.liked,mentionedUser:e.mentioned?{id:(null===(g=e.mentioned)||void 0===g?void 0:g.id)||0,username:(null===(E=e.mentioned)||void 0===E?void 0:E.user_name)||"",name:(null===(f=e.mentioned)||void 0===f?void 0:f.name)||"",role:(null===(b=e.mentioned)||void 0===b?void 0:b.role)?null===(y=null===(T=e.mentioned)||void 0===T?void 0:T.role)||void 0===y?void 0:y.toLowerCase():"",avatar:(null===(w=e.mentioned)||void 0===w?void 0:w.avatar)||"",type:(null===(A=e.mentioned)||void 0===A?void 0:A.type)||"",email:(null===(O=e.mentioned)||void 0===O?void 0:O.email)||"",partnerId:(null===(I=e.mentioned)||void 0===I?void 0:I.partner_id)?String(null===(L=e.mentioned)||void 0===L?void 0:L.partner_id):"",doctorId:(null===(S=e.mentioned)||void 0===S?void 0:S.doctor_id)?String(null===(R=e.mentioned)||void 0===R?void 0:R.doctor_id):"",hospitalId:(null===(k=e.mentioned)||void 0===k?void 0:k.hospital_id)?String(null===(x=e.mentioned)||void 0===x?void 0:x.hospital_id):"",title:(null===(P=e.mentioned)||void 0===P?void 0:P.title)||""}:null,mentions:e.mentions||[]}:{}},q=function(e){return void 0!==e&&e?(null==e?void 0:e.turn_off_profile)?"":(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?"/expert/".concat(null==e?void 0:e.slug):"/author/".concat(null==e?void 0:e.slug):(null==e?void 0:e.profile_url)||(null==e?void 0:e.permalink)||"#":""},X=function(e){var t,n,i;return e&&e.information?{information:null!==(t=e.information.map((function(e){return{title:e.title,description:e.description}})))&&void 0!==t?t:[],reviewBy:{reviewer:(null===(n=e.reviewed_by)||void 0===n?void 0:n.display_name)||(null===(i=e.reviewed_by)||void 0===i?void 0:i.name)||"",date:e.reviewed_date||"",link:q(null==e?void 0:e.reviewed_by)},metaTag:e.meta_tag||"",title:e.title||"",description:e.description||"",disclaimer:e.disclaimer||"",is_sponsored:e.is_sponsored||!1,sponsor:e.sponsor,featuredImage:e.featured_image||""}:{}},$=Object.freeze({__proto__:null,formatAuthor:C,formatArticleExpert:N,formatArticle:G,formatUserProfile:M,formatBMIResult:function(e){var t,n,i,o,r,a,l,s,d;return e&&e.status?{status:null==e?void 0:e.status,comparison:null!==(t=null==e?void 0:e.comparison)&&void 0!==t?t:"",assessmentData:[{tab:"tools.condition",content:null!==(n=null==e?void 0:e.condition)&&void 0!==n?n:""},{tab:"tools.risks",content:null!==(i=null==e?void 0:e.risk)&&void 0!==i?i:""},{tab:"tools.suggestion",content:null!==(o=null==e?void 0:e.suggestion)&&void 0!==o?o:""}],chartData:(null===(r=null==e?void 0:e.chart_data)||void 0===r?void 0:r.length)>0?null==e?void 0:e.chart_data:[],disclaimer:null!==(a=null==e?void 0:e.disclaimer)&&void 0!==a?a:"",illustrator:null!==(l=null==e?void 0:e.illustrator)&&void 0!==l?l:"",faqs:null!==(s=null==e?void 0:e.faqs)&&void 0!==s?s:[],suggestedArticlesLink:null!==(d=null==e?void 0:e.suggested_articles_link)&&void 0!==d?d:""}:{}},formatSponsor:U,formatReviewedCategory:B,formatCategory:H,formatCategoryApi:function(e){return e?{categoryInfo:H(e.data.category)||null,explainersPosts:(e.data.explainers_posts||[]).map(G),subCategories:(e.data.sub_categories||[]).map(H)}:{}},formatFaqsCategory:F,formatHealthTool:z,formatHealthToolTypeCategory:function(e){var t,n;return e?{termId:(null==e?void 0:e.term_id)||0,name:(null==e?void 0:e.name)||"",healthTools:null!==(n=null===(t=null==e?void 0:e.health_tools)||void 0===t?void 0:t.map((function(e){return z(e)})))&&void 0!==n?n:[]}:{}},formatCommunity:j,formatTopic:V,formatPost:K,formatPostPagination:function(e){return e?{currentPage:e.current||0,lastPage:e.last||0,total:e.total_items||0}:{}},formatNotification:function(e){var t,n,i;return e?{time:e.created_at,content:e.content,postId:String(e.post_id),fromUser:{name:null===(t=e.from_user)||void 0===t?void 0:t.name,id:null===(n=e.from_user)||void 0===n?void 0:n.id,avatar:null===(i=e.from_user)||void 0===i?void 0:i.avatar},toUserId:String(e.to_user_id),postSlug:e.post_slug||"",communitySlug:e.community_slug||""}:{}},formatSpotlightsList:function(e){return e?e.map((function(e){return{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}})):[]},formatOvulationInfo:Y,formatSuggestedArticle:function(e){return e?{postId:e.post_id||null,categoryId:e.category_id||null,postUrl:e.post_url||null,postReviewed:e.post_reviewed||null,postPageviews:e.post_pageviews||null,postRank:e.post_rank||null,isPin:e.is_pin||null,frequency:e.frequency||null,topic:e.topic||null}:{}},formatTopicHealthTool:function(e){return e?{id:e.tool_id||null,topicFrequency:e.frequency||null,topicId:e.topic_id||null,topicName:e.topic_name||null,isPinned:!!e.is_pin||null,toolLink:e.tool_link||""}:{}},formatComment:W,formatReportedPostToPostDetail:function(e){return e?{name:e.title,description:e.description,images:e.images,likes_count:e.count_likes,comments_count:e.count_comments,topics:[],slug:e.post_slug,id:e.post_id,is_pin:e.is_pin,pin_date:"",post_type:e.post_type,schedule_datetime:e.schedule_datetime,is_active:e.is_active,preview_title:e.preview_title||"",preview_image:e.preview_image||"",preview_description:e.preview_description||"",preview_link:e.preview_link||"",user:e.user,created_at:"",created_time:"",community:{id:e.community_id,name:e.community_name,slug:e.community_slug,description:""}}:{}},formatTopicSubot:function(e){return e?{chatBotId:e.subot_id,isPinned:e.is_pin,topicId:e.topic_id,topicFrequency:e.frequency}:{}},formatSiteWideBanner:function(e,t){return void 0!==e&&e?{content:(null==e?void 0:e.content)||"",icon:(null==e?void 0:e.icon)||"",type:t||"other"}:null},formatPWGContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?M(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatUserProfileUrl:q,formatTHRContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?M(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatBabyGrowthContent:X}),J={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info"},Z={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},Q={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},ee={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},te=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var n={},i=(t||{}).decode||re,o=0;for(;o<e.length;){var r=e.indexOf("=",o);if(-1===r)break;var a=e.indexOf(";",o);if(-1===a)a=e.length;else if(a<r){o=e.lastIndexOf(";",r-1)+1;continue}var l=e.slice(o,r).trim();if(void 0===n[l]){var s=e.slice(r+1,a).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),n[l]=le(s,i)}o=a+1}return n},ne=function(e,t,n){var i=n||{},o=i.encode||ae;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!oe.test(e))throw new TypeError("argument name is invalid");var r=o(t);if(r&&!oe.test(r))throw new TypeError("argument val is invalid");var a=e+"="+r;if(null!=i.maxAge){var l=i.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(l)}if(i.domain){if(!oe.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!oe.test(i.path))throw new TypeError("option path is invalid");a+="; Path="+i.path}if(i.expires){var s=i.expires;if(!function(e){return"[object Date]"===ie.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+s.toUTCString()}i.httpOnly&&(a+="; HttpOnly");i.secure&&(a+="; Secure");if(i.priority){switch("string"==typeof i.priority?i.priority.toLowerCase():i.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(i.sameSite){switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},ie=Object.prototype.toString,oe=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function re(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function ae(e){return encodeURIComponent(e)}function le(e,t){try{return t(e)}catch(t){return e}}var se={parse:te,serialize:ne},de={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},ue=l({data:de,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}}),ce=de,me=function(e){var t=e.locale,n=void 0===t?"vi-VN":t,i=e.children,l=e.userInfo,s=e.router,d=e.env,u=void 0===d?{isMarryBaby:!1,togetherBasePath:"/community"}:d,c=e.sanitizeFunction,m=void 0===c?function(e){return e}:c,p=e.pushNotifications,_=void 0===p?function(){return!1}:p,v=r(),h=v[0],g=v[1];return ce={userInfo:l,locale:n,togetherUserId:h,router:s,env:u},a((function(){(null==l?void 0:l.id)&&Oe(fe(J.PROFILE,{_locale:n}),"GET").then((function(e){var t;g(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==l?void 0:l.id]),o.createElement(ue.Provider,{value:{data:{userInfo:l,locale:n,togetherUserId:h,router:s,env:u},action:{pushNotifications:_,sanitizeFunction:m}}},i)},pe={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},_e={"vi-VN":"marrybaby.vn"},ve=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",he=function(e){var t=ce.env.isMarryBaby;return"https://".concat(t?_e[e]:pe[e])},ge=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},Ee=function(e){var t=ce.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var n="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(n?t?"fe.":"discover.":t?"www.":"").concat(pe[e])},fe=function(e,n,i){var o="";i&&(o=Object.keys(i).map((function(e){return e+"="+i[e]})).join("&"));var r=((null==ce?void 0:ce.env)||{}).togetherBaseApiUrl,a=void 0===r?"":r,l=p(e,t(t({},(null==n?void 0:n._locale)?{website_url:he(String(n._locale))}:{}),n));return l+="".concat(l.includes("?")?"&":"?").concat(o),a+"api/v1/"+ge(l)},be=function(e,n){var i=((null==ce?void 0:ce.env)||{}).discoverBaseApiUrl;return(void 0===i?"":i)+"wp-json/api/"+ge(p(e,t({},n)))},Te=function(e,n){var i=((null==ce?void 0:ce.env)||{}).careBaseApiUrl;return((void 0===i?"":i)||"https://service-health-care.hellohealthgroup.com/")+ge(p(e,t({},n)))},ye=function(e){return(null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e},we=function(e,o,r,a){return void 0===a&&(a=!1),n(void 0,void 0,void 0,(function(){var n,l,s,d,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,fetch(a?e:(c=e,encodeURI(c).replace(/%5B/g,"[").replace(/%5D/g,"]")),t(t({method:o},ye(r)),{headers:t({},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 1:return(n=i.sent())?[2,n]:[3,3];case 2:return l=i.sent(),console.log(l),console.log({url:e,status:null===(s=null==l?void 0:l.response)||void 0===s?void 0:s.status,statusText:null===(d=null==l?void 0:l.response)||void 0===d?void 0:d.statusText}),[2,(null===(u=null==l?void 0:l.response)||void 0===u?void 0:u.data)||null];case 3:return[2,null]}var c}))}))},Ae=function(e,o,r,a){return void 0===o&&(o="GET"),n(void 0,void 0,void 0,(function(){var n,l,s,d,u,m,p,_,v,h,g,E,f,b;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,7,,8]),n="string"==typeof e?e:e.url,l="string"==typeof e?e:e.backupUrl,s=se.parse(a||""),d=s[S],!(u=d||c(S))||!u.length)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,fetch(n,t(t({method:o},ye(r)),{headers:t({Authorization:"Bearer "+u},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 2:return m=i.sent(),(null===(v=null==m?void 0:m.messages)||void 0===v?void 0:v.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,we(l||n,o,r)]:m?[2,m]:[3,4];case 3:return p=i.sent(),console.log({status:null===(h=null==p?void 0:p.response)||void 0===h?void 0:h.status,statusText:null===(g=null==p?void 0:p.response)||void 0===g?void 0:g.statusText}),[2,we(l||n,o,r)];case 4:return[3,6];case 5:return[2,we(l||n,o,r)];case 6:return[3,8];case 7:return _=i.sent(),console.log({status:null===(E=null==_?void 0:_.response)||void 0===E?void 0:E.status,statusText:null===(f=null==_?void 0:_.response)||void 0===f?void 0:f.statusText}),[2,(null===(b=null==_?void 0:_.response)||void 0===b?void 0:b.data)||null];case 8:return[2,null]}}))}))},Oe=function(e,o,r,a){return n(void 0,void 0,void 0,(function(){var n,l,s,d;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),n=se.parse(a||""),l=n[S],(s=l||c(S))&&s.length?[4,fetch(e,t(t({method:o},ye(r)),{headers:t({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(d=i.sent())return[2,d];i.label=2;case 2:return[3,4];case 3:return i.sent(),[2,null];case 4:return[2,null]}}))}))},Ie=function(e,o,r,a){return n(void 0,void 0,void 0,(function(){var n,l,s,d;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),n=se.parse(a||""),l=n[R],(s=l||c(R))&&s.length?[4,fetch(e,t(t({method:o},ye(r)),{headers:t({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(d=i.sent())return[2,d];i.label=2;case 2:return[3,4];case 3:return i.sent(),[2,null];case 4:return[2,null]}}))}))};function Le(e,t,n){var i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+n+"$2"):e+o+t+"="+n}var Se,Re=function(e,t,n){void 0===n&&(n="/community");var i=e||("undefined"!=typeof window?window.location.href:"/"),o="undefined"!=typeof window?window.location.origin:"";return o||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(o=e.split("/").slice(0,3).join("/")),function(e,t){var n=ce.env.publicSSO,i=e||window.location.href;return t&&Object.keys(t).map((function(e){Le(i,e,t[e])})),Le(i,"source","communities"),n?"".concat(n,"?returnUrl=").concat(encodeURIComponent(i.toString())):i}("".concat(o).concat(n,"/on-boarding?return=").concat(encodeURIComponent(i)),t)},ke=function(e,t,n,i){return n&&t?"".concat(n,"-").concat(t):"".concat(m(e||"",{lower:!0,locale:i||ve}),"-").concat(t)},xe=function(e){var t,n=e.name,i=e.id,o=e.locale;return"/care/".concat(null===(t=P[o||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(ke(n,i))},Pe=function(e){var t,n=e.name,i=e.id,o=e.slug,r=e.locale;return"/care/".concat(null===(t=P[r||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(ke(n,i,o))},De=d.div(Se||(Se=e(["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"],["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"])),(function(e){return e.theme.colors.secondaryBase}),(function(e){return e.theme.mbColors.pink})),Ce=function(e){var t=e.className,n=e.isMarryBaby,i=e.style,l=e.avatar,d=e.username,u=e.isLazy,c=s(ue).data.env.isMarryBaby,m="boolean"==typeof n?n:c,p=r(!1),_=p[0],v=p[1];return a((function(){var e=new Image;e.onerror=function(){v(!0)},e.src=l}),[]),o.createElement(De,{"data-is-marrybaby":m,className:t,style:i},l&&!_?o.createElement("img",{src:u?void 0:l,"data-src":u?l:void 0,className:"avatar ".concat(u?"lazy":""),alt:"avatar",onError:function(){v(!0)}}):o.createElement("div",{className:"avatar avatar-default"},d&&(null==d?void 0:d.length)>0?d[0].toUpperCase():"A"))};export{f as A,S as B,Z as C,de as D,W as E,Ae as F,ce as G,I as H,x as M,y as P,k as R,ue as T,Ce as U,me as a,w as b,D as c,$ as d,we as e,X as f,be as g,Q as h,q as i,Y as j,j as k,K as l,Re as m,O as n,fe as o,J as p,Te as q,pe as r,Pe as s,xe as t,Ee as u,ee as v,Ie as w,Oe as x,V as y,A as z};
|
|
1
|
+
import{_ as e,a as t,d as n,e as i}from"./tslib.es6-44f7e5ec.js";import o,{useState as r,useEffect as a,createContext as l,useContext as s}from"react";import d from"styled-components";import{M as u}from"./utils-11febb09.js";import{g as c}from"./cookieHelper-0e8521c3.js";import m from"slugify";import p from"string-format";var _,v,h,g=d.div(_||(_=e(["\n background-color: var(--background-color, transparent);\n color: white;\n cursor: pointer;\n img {\n --width: var(--width-prop, 40px);\n --height: var(--height-prop, 40px);\n width: var(--width);\n height: var(--height);\n }\n &[data-has-max='true'] {\n img {\n max-width: var(--width);\n max-height: var(--height);\n }\n }\n\n &[data-avatar-type='square'] {\n img {\n --width: var(--width-prop, 72px);\n --height: var(--height-prop, 72px);\n border-radius: 6px;\n }\n }\n\n &[data-avatar-type='rounded'] {\n img {\n border-radius: 50%;\n }\n }\n\n &[data-is-amp='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: 40px;\n height: 40px;\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: 20px;\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n\n &[data-custom-size='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: var(--size);\n height: var(--size);\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: calc(var(--size) / 2);\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n"],["\n background-color: var(--background-color, transparent);\n color: white;\n cursor: pointer;\n img {\n --width: var(--width-prop, 40px);\n --height: var(--height-prop, 40px);\n width: var(--width);\n height: var(--height);\n }\n &[data-has-max='true'] {\n img {\n max-width: var(--width);\n max-height: var(--height);\n }\n }\n\n &[data-avatar-type='square'] {\n img {\n --width: var(--width-prop, 72px);\n --height: var(--height-prop, 72px);\n border-radius: 6px;\n }\n }\n\n &[data-avatar-type='rounded'] {\n img {\n border-radius: 50%;\n }\n }\n\n &[data-is-amp='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: 40px;\n height: 40px;\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: 20px;\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n\n &[data-custom-size='true'] {\n display: flex;\n overflow: hidden;\n overflow: hidden;\n width: var(--size);\n height: var(--size);\n align-items: center;\n justify-content: center;\n background-size: cover;\n font-size: calc(var(--size) / 2);\n font-weight: bold;\n &[data-avatar-type='square'] {\n border-radius: 6px;\n }\n &[data-avatar-type='rounded'] {\n border-radius: 50%;\n img {\n --width: 100%;\n --height: 100%;\n }\n }\n img {\n object-fit: cover;\n }\n }\n"]))),E={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},f=function(e){var n=e.type,i=void 0===n?"square":n,l=e.size,s=e.avatarImg,d=e.avatarUrl,u=e.firstLetter,c=e.backgroundColor,m=e.onClick,p=e.style,_=e.className,v=e.isAmp,h=void 0!==v&&v,f=e.width,b=e.height,T=l?E[l]:void 0,y=r(!1),w=y[0],A=y[1];a((function(){if(d){var e=document.createElement("img");e.setAttribute("src",d),e.addEventListener("error",(function(){A(!0)}))}}),[d,A]);var O=(!d&&!s||w)&&u;return o.createElement(g,{style:t(t({},p),{"--size":!h&&T?T+"px":void 0,"--width-prop":f?f+"px":void 0,"--height-prop":b?b+"px":void 0,"--background-color":c}),"data-has-max":!(!f||!b),"data-avatar-type":i,onClick:m,className:_,avatarUrl:d,"data-is-amp":h,"data-custom-size":!!l},s,d&&!w&&o.createElement("img",{src:d}),O&&u)},b=d.div(v||(v=e(["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"],["\n position: fixed;\n left: 50%;\n\n padding: 0 16px 32px;\n background-color: ",";\n border-radius: 6px;\n box-shadow: 0px 4px 8px ",";\n transform: translate(-50%, -50%);\n transition: all 0.5s ease-in-out;\n visibility: hidden;\n\n &[data-open='true'] {\n z-index: 200;\n top: 50%;\n opacity: 1;\n visibility: visible;\n }\n\n &[data-open='false'] {\n top: -50%;\n }\n\n &[data-type='lead'] {\n width: 332px;\n height: 460px;\n\n div {\n top: -15px;\n right: -15px;\n }\n }\n\n &[data-type='form'] {\n width: 496px;\n height: 548px;\n "," {\n width: 340px;\n }\n }\n\n &[data-type='confirm'] {\n "," {\n width: calc(100% - 32px);\n }\n "," {\n width: 100%;\n max-width: 407px;\n }\n }\n\n .popup-content {\n position: relative;\n z-index: 111;\n height: 100%;\n padding: 16px;\n }\n\n .close-button {\n position: absolute;\n top: 16px;\n right: 0;\n cursor: pointer;\n\n img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n }\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200}),u.mbDown,u.mbDown,u.mbUp),T=d.div(h||(h=e(["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"],["\n position: fixed;\n z-index: 110;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n align-items: center;\n background: rgba(38, 38, 38, 0.3);\n\n &[data-open='false'] {\n display: none;\n }\n"]))),y=function(e){var t=e.type,n=void 0===t?"lead":t,i=e.closeIcon,r=e.isOpen,a=void 0===r||r,l=e.onClose,s=e.children,d=e.className,u=void 0===d?"":d,c=e.enableAnimation,m=void 0===c||c;return o.createElement(o.Fragment,null,o.createElement(b,{"data-open":a,"data-type":n,"data-animation":m},o.createElement("div",{className:"".concat(u||""," popup-content")},!!i&&o.createElement("div",{className:"close-button",onClick:l},i),s)),o.createElement(T,{"data-open":a,onClick:l}))},w="DD/MM/YYYY",A="/images/avatar.jpg",O="/images/default-image.jpg",I={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},L={"id-ID":{"kalkulator-bmi":I.BMI,"kebutuhan-kalori":I.BMR,"kalkulator-hari-perkiraan-lahir":I.DUE_DATE,"kalkulator-masa-subur-2":I.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":I.PWG,"kalkulator-detak-jantung-saat-olahraga":I.THR},"ms-MY":{"kalkulator-bmi":I.BMI,"kalkulator-bmr":I.BMR,"kalkulator-tarikh-bersalin":I.DUE_DATE,"kalkulator-kesuburan":I.OVULATION,"kalkulator-tambah-berat-badan-hamil":I.PWG,"target-heart-rate-calculator":I.THR},"vi-VN":{"cach-tinh-chi-so-bmi":I.BMI,"tinh-chi-so-bmr":I.BMR,"cong-cu-tinh-ngay-du-sinh":I.DUE_DATE,"tinh-ngay-rung-trung":I.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":I.PWG,"cong-cu-do-nhip-tim":I.THR},"zh-TW":{"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"due-date-calculator":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnancy-weight-gain-calculator":I.PWG,"target-heart-rate-calculator":I.THR},"en-PH":{"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"due-date-calculator":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnancy-weight-gain-calculator":I.PWG,"target-heart-rate-calculator":I.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":I.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":I.BMR,"เครื่องมือคำนวณกำหนดคลอด":I.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":I.OVULATION,"เครื่องคำนวณน้ำหนักตัว":I.PWG,"เครื่องวัดอัตราการเต้น":I.THR},"hi-IN":{"bmi-calculator-en":I.BMI,"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"delivery-date-calculator":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnancy-weight-gain-calculator":I.PWG,"target-heart-rate-calculator":I.THR},"km-KH":{"គណនា-bmi":I.BMI,"គណនា-bmr":I.BMR,"គណនាថ្ងៃសម្រាលកូន":I.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":I.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":I.PWG,"គណនារកចង្វាក់បេះដូងល្អ":I.THR},"my-MM":{"bmi-calculator":I.BMI,"bmr-calculator":I.BMR,"due-date-calendar":I.DUE_DATE,"ovulation-calculator":I.OVULATION,"pregnaancy-weight-calculator":I.PWG,"target-heartrate":I.THR,"pregnancy-weight-calculator":I.PWG,"target-heart-rate":I.THR}},S="hhg_user_token",R="together_admin_token",k={report_scam:{label:"morePopover.report.scam",reportReasonText:"morePopover.report.scam"},report_sex:{label:"morePopover.report.sex",reportReasonText:"morePopover.report.sex"},report_offensive:{label:"morePopover.report.offensive",reportReasonText:"morePopover.report.offensive"},report_violence:{label:"morePopover.report.violence",reportReasonText:"morePopover.report.violence"},report_prohibited:{label:"morePopover.report.prohibited",reportReasonText:"morePopover.report.prohibited"},report_spam:{label:"morePopover.report.spam",reportReasonText:"morePopover.report.spam"},report_falseNews:{label:"morePopover.report.falseNews",reportReasonText:"morePopover.report.falseNews"},report_other:{label:"morePopover.report.other",reportReasonText:"morePopover.report.other"}},x=20,P={"en-PH":{ALL:"all",HOSPITAL:"hospital",SERVICE:"service",DOCTOR:"doctor",SEARCH:"search",SPECIALTIES:"specialties",CURRENT:"current-location"},"vi-VN":{ALL:"tat-ca",HOSPITAL:"benh-vien",SERVICE:"dich-vu",DOCTOR:"bac-si",SEARCH:"tim-kiem",SPECIALTIES:"chuyen-khoa",CURRENT:"vi-tri-hien-tai"},"id-ID":{ALL:"semua",HOSPITAL:"rumah-sakit",SERVICE:"layanan",DOCTOR:"dokter",SEARCH:"cari",SPECIALTIES:"spesialisasi",CURRENT:"posisi-saya-saat-ini"}},D=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DUE_DATE_FORMAT:w,DEFAULT_AVATAR_IMG:A,DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:O,BMI_LEVELS:["underweight","healthy","overweight","obese_level_1","obese_level_2"],BMR_LEVELS:["low","normal","high"],CORAL_TOKEN_COOKE:"coral_together_user_token",HEALTH_TOOL_TYPE:I,LOCALE_HEALTH_TOOLS:L,BEARER_TOKEN_COOKIE:S,TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:R,Z_INDEX:{adBlock:48,articleAdContainer:47,headerContainerHome:99,headerContainerPopup:200,headerContainerPopupSUbLevel:300,menuSearchInputPopup:5,menuSearchInputDisplayIcon:6,menuSearchPopup:200},BmrActiveLevels:[{value:"sedentary",icon:"bmr-sedentary",name:"bmr.activeLevel.sedentary",description:"bmr.activeLevel.sedentary.description"},{value:"lightly-active",icon:"bmr-light",name:"bmr.activeLevel.lightlyActive",description:"bmr.activeLevel.lightlyActive.description"},{value:"moderately-active",icon:"bmr-moderately",name:"bmr.activeLevel.moderatelyActive",description:"bmr.activeLevel.moderatelyActive.description"},{value:"intensely-active",icon:"bmr-intensively",name:"bmr.activeLevel.intenselyActive",description:"bmr.activeLevel.intenselyActive.description"},{value:"extremely-active",icon:"bmr-extremely",name:"bmr.activeLevel.extremelyActive",description:"bmr.activeLevel.extremelyActive.description"}],LEAD_CAMPAIGN_CODE:"lmoct7xfr5sv4fv",LEAD_TOKEN_COOKIE:"hhg-id",GA_TOKEN_COOKIE:"_ga",GOOGLE_CALENDAR_AUTH_CLIENT_ID:"1038242799566-esoq4ij201ve5qfp266nbca44scpo3c6.apps.googleusercontent.com",FIND_CARE_IFRAME_URL:"https://www.appsheet.com/start/4ba34ebe-3cb6-4c16-8dd4-d074025a5bb6#appName=DependentDropdowns-2711103&group=%5B%5D&page=card&sort=%5B%5D&table=Menu&view=Menu",REPORT_REASON_MAP:k,MB_SOCIAL_LINKS:{LINKEDIN:"https://www.linkedin.com/company/hello-health-group/",FACEBOOK:"https://www.facebook.com/marry.baby.vn",INSTAGRAM:"https://www.instagram.com/marrybaby.vn/",TWITTER:"",YOUTUBE:"https://www.youtube.com/channel/UCeZybTkY1VzJ3N7LvPGdKbg",ZALO:"http://zalo.me/806483414530291942"},INTERNAL_ROLES:["admin","moderator","local-admin"],EXTERNAL_ROLES:["ambassador","expert","sponsor","guide","influencer"],INTERNAL_PROFILE_ROLES:["moderator","local-admin"],EXTERNAL_PROFILE_ROLES:["expert","ambassador","sponsor"],RoleDataMap:{moderator:{text:"Moderator",fid:"cardAuthor.moderator",background:"#fe921d"},admin:{text:"Admin",fid:"cardAuthor.admin",background:"#2b62cd"},"local-admin":{text:"Local admin",fid:"cardAuthor.localAdmin",background:"#2b62cd"},expert:{text:"Expert",fid:"cardAuthor.expert",background:"#ff6f4d"},sponsor:{text:"Sponsor",fid:"cardAuthor.sponsor",background:"#00c7e6"},ambassador:{text:"Ambassador",fid:"cardAuthor.ambassador",background:"#00CB8A"}},MAX_IMAGE_UPLOADS:20,LOCALISED_SLUGS:P}),C=function(e){return e?{displayName:e.display_name||null,avatar:e.avatar||null,thumbnailAvatar:e.avatar_thumbnail||null,profileUrl:e.profile_url||null,description:e.description||null,metaTag:e.meta_tag||""}:{}},N=function(e){return e?{id:e.ID||null,name:e.name||null,specialty:e.specialty||null,avatar:e.avatar||null,permalink:e.permalink||null,thumbnailAvatar:e.avatar_thumbnail||null}:{}},G=function(e){var n,i,o,r;return e?{id:e.ID,postName:e.post_name,sponsor:e.sponsor?U(e.sponsor):null,isSponsored:e.is_sponsored||null,postTitle:e.post_title||"",postModified:e.post_modified||"",postDate:e.post_date||"",modifiedTime:e.modified_time||"",permalink:e.permalink||"",featureImage:e.image||null,featureImageMobile:e.image_medium||null,featureImageMobileXs:e.image_thumbnail||null,author:C(e.author),reviewer:e.reviewed_by&&C(e.reviewed_by)||null,articleReviewed:(null==e?void 0:e.reviewed)?t(t({},null==e?void 0:e.reviewed),{author:M(null===(n=null==e?void 0:e.reviewed)||void 0===n?void 0:n.author),editor:M(null===(i=null==e?void 0:e.reviewed)||void 0===i?void 0:i.editor),expert:M(null===(o=null==e?void 0:e.reviewed)||void 0===o?void 0:o.expert),fact_check:M(null===(r=null==e?void 0:e.reviewed)||void 0===r?void 0:r.fact_check)}):null,category:H(e.category),postContent:e.post_content||null,sections:e.sections||null,categories:(e.categories||[]).map(H),sources:e.sources||null,description:e.description||null,excerpt:e.excerpt||null,expert:N(e.expert),metaTag:e.meta_tag||null}:{}},M=function(e){return void 0!==e&&e?t(t({},e),{profile_url:(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?"/expert/".concat(null==e?void 0:e.slug):"/author/".concat(null==e?void 0:e.slug):e.profile_url}):null},U=function(e){return e?{title:e.title,logo:e.logo,link:e.link}:{}},B=function(e){return{postTitle:e.post_title,permalink:e.permalink}},H=function(e){var t,n;return e?{termId:e.term_id||null,sponsor:e.sponsor?U(e.sponsor):null,isSponsored:e.is_sponsored||null,categoryName:e.cat_name||null,name:e.name||null,iconUrl:e.icon||"",slugName:e.category_nicename||null,description:e.description||null,featureImage: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 H(e)})))||[],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?B(e.reviewed_by):null,reviewedDate:e.reviewed_date||"",faqs:e.faqs?e.faqs.map((function(e){return F(e)})):null}:{}},F=function(e){return{title:e.title,content:e.content}},z=function(e){return e?{icon:e.icon,link:e.link.startsWith("http")?e.link:"/health-tools"+e.link,subtitle:e.subtitle,title:e.title}:{}},j=function(e){return e?{topicCount:e.topics_count||0,postCount:e.posts_count||0,memberCount:e.members_count||0,thumbnail:e.thumbnail||"",coverImage:e.cover_image||"",mobileCoverImage:e.mobile_cover_image||"",name:e.name||"",description:e.description||"",slug:e.slug||"",id:e.id||0,joined:Boolean(e.joined),isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},V=function(e){var t,n,i,o;return e?{id:e.id||0,name:e.name||"",image:e.thumbnail||"",slug:e.slug||"",url:"/"+(null===(t=e.community)||void 0===t?void 0:t.slug)+"/"+(null==e?void 0:e.slug)||"",description:e.description||"",joined:e.joined||!1,postCount:e.count_posts||0,memberCount:e.count_members||0,communityId:String(null===(n=e.community)||void 0===n?void 0:n.id),communitySlug:null===(i=e.community)||void 0===i?void 0:i.slug,communityName:null===(o=e.community)||void 0===o?void 0:o.name,order:e.order||0,isActive:null===e.is_active||void 0===e.is_active||Boolean(e.is_active),mappedCategoryId:e.mapped_category_id||0,discoverCategory:e.discover_category?{categoryId:e.discover_category.category_id||0,name:e.discover_category.name||""}:null,isHidden:Boolean(e.is_hidden)}:{}},K=function(e){var t,n,i,o,r,a,l,s,d,u,c,m,p,_,v,h,g,E,f,b,T;return e?{id:e.id,topics:(null===(t=e.topics)||void 0===t?void 0:t.map((function(t){var n,i,o,r;return{id:t.id||0,name:t.name||"",slug:t.slug||"",url:"/"+(null===(n=e.community)||void 0===n?void 0:n.slug)+"/"+t.slug,communityId:String(null===(i=e.community)||void 0===i?void 0:i.id),communitySlug:(null===(o=e.community)||void 0===o?void 0:o.slug)||"",communityName:(null===(r=e.community)||void 0===r?void 0:r.name)||"",isHidden:Boolean(t.is_hidden),isActive:!0}})))||[],community:{id:(null===(n=e.community)||void 0===n?void 0:n.id)||0,name:(null===(i=e.community)||void 0===i?void 0:i.name)||"",slug:(null===(o=e.community)||void 0===o?void 0:o.slug)||"",isActive:!0,isHidden:Boolean(null===(r=e.community)||void 0===r?void 0:r.is_hidden)},slug:e.slug||"",author:{id:(null===(a=e.user)||void 0===a?void 0:a.id)||0,username:(null===(l=e.user)||void 0===l?void 0:l.user_name)||"",email:(null===(s=e.user)||void 0===s?void 0:s.email)||"",name:(null===(d=e.user)||void 0===d?void 0:d.name)||"",avatar:(null===(u=e.user)||void 0===u?void 0:u.avatar)||"",role:(null===(c=e.user)||void 0===c?void 0:c.role)?null===(p=null===(m=e.user)||void 0===m?void 0:m.role)||void 0===p?void 0:p.toLowerCase():"",type:(null===(_=e.user)||void 0===_?void 0:_.type)||"",partnerId:(null===(v=e.user)||void 0===v?void 0:v.partner_id)?String(null===(h=e.user)||void 0===h?void 0:h.partner_id):"",title:(null===(g=e.user)||void 0===g?void 0:g.title)||"",doctorId:(null===(E=e.user)||void 0===E?void 0:E.doctor_id)?String(null===(f=e.user)||void 0===f?void 0:f.doctor_id):"",hospitalId:(null===(b=e.user)||void 0===b?void 0:b.hospital_id)?String(null===(T=e.user)||void 0===T?void 0:T.hospital_id):""},previewUrl:{title:e.preview_title||"",url:e.preview_link||"",image:e.preview_image||"",description:e.preview_description||""},createdAt:e.created_at||"",scheduleDateTime:e.schedule_datetime||"",photos:e.images||[],description:e.description||"",commentsCount:e.comments_count||0,likesCount:e.likes_count||0,title:e.name||"",isPin:!!e.is_pin,pinDate:e.pin_date||"",liked:e.liked||!1,bookmarked:Boolean(e.bookmarked)||!1,mentions:e.mentions||[],commented:Boolean(e.commented)||!1,introUrl:e.intro_url||"",bannerImage:e.banner_image||""}:{}},Y=function(e){return e?{disclaimer:e.disclaimer,featuredImage:e.featured_image,info:e.info||[],reviewedBy:e.reviewed_by?{id:e.reviewed_by.ID,permalink:e.reviewed_by.permalink,name:e.reviewed_by.name,postTitle:e.reviewed_by.post_title}:null,reviewedDate:e.reviewed_date}:{}},W=function(e){var t,n,i,o,r,a,l,s,d,u,c,m,p,_,v,h,g,E,f,b,T,y,w,A,O,I,L,S,R,k,x,P;return e?{content:e.content,countLikes:e.likes_count,countReplies:e.replies_count,createdAt:e.created_at,createdTime:e.created_time,id:String(e.id),images:e.image||[],link:e.link||null,replies:e.replies&&e.replies.length>0?e.replies.map(W):[],author:{id:(null===(t=e.user)||void 0===t?void 0:t.id)||0,username:(null===(n=e.user)||void 0===n?void 0:n.user_name)||"",name:(null===(i=e.user)||void 0===i?void 0:i.name)||"",role:(null===(o=e.user)||void 0===o?void 0:o.role)?null===(a=null===(r=e.user)||void 0===r?void 0:r.role)||void 0===a?void 0:a.toLowerCase():"",avatar:(null===(l=e.user)||void 0===l?void 0:l.avatar)||"",type:(null===(s=e.user)||void 0===s?void 0:s.type)||"",email:(null===(d=e.user)||void 0===d?void 0:d.email)||"",partnerId:(null===(u=e.user)||void 0===u?void 0:u.partner_id)?String(null===(c=e.user)||void 0===c?void 0:c.partner_id):"",title:(null===(m=e.user)||void 0===m?void 0:m.title)||"",doctorId:(null===(p=e.user)||void 0===p?void 0:p.doctor_id)?String(null===(_=e.user)||void 0===_?void 0:_.doctor_id):"",hospitalId:(null===(v=e.user)||void 0===v?void 0:v.hospital_id)?String(null===(h=e.user)||void 0===h?void 0:h.hospital_id):""},liked:!!e.liked,mentionedUser:e.mentioned?{id:(null===(g=e.mentioned)||void 0===g?void 0:g.id)||0,username:(null===(E=e.mentioned)||void 0===E?void 0:E.user_name)||"",name:(null===(f=e.mentioned)||void 0===f?void 0:f.name)||"",role:(null===(b=e.mentioned)||void 0===b?void 0:b.role)?null===(y=null===(T=e.mentioned)||void 0===T?void 0:T.role)||void 0===y?void 0:y.toLowerCase():"",avatar:(null===(w=e.mentioned)||void 0===w?void 0:w.avatar)||"",type:(null===(A=e.mentioned)||void 0===A?void 0:A.type)||"",email:(null===(O=e.mentioned)||void 0===O?void 0:O.email)||"",partnerId:(null===(I=e.mentioned)||void 0===I?void 0:I.partner_id)?String(null===(L=e.mentioned)||void 0===L?void 0:L.partner_id):"",doctorId:(null===(S=e.mentioned)||void 0===S?void 0:S.doctor_id)?String(null===(R=e.mentioned)||void 0===R?void 0:R.doctor_id):"",hospitalId:(null===(k=e.mentioned)||void 0===k?void 0:k.hospital_id)?String(null===(x=e.mentioned)||void 0===x?void 0:x.hospital_id):"",title:(null===(P=e.mentioned)||void 0===P?void 0:P.title)||""}:null,mentions:e.mentions||[]}:{}},q=function(e){return void 0!==e&&e?(null==e?void 0:e.turn_off_profile)?"":(null==e?void 0:e.slug)?["expert","medical"].includes((null==e?void 0:e.role)||"")?"/expert/".concat(null==e?void 0:e.slug):"/author/".concat(null==e?void 0:e.slug):(null==e?void 0:e.profile_url)||(null==e?void 0:e.permalink)||"#":""},X=Object.freeze({__proto__:null,formatAuthor:C,formatArticleExpert:N,formatArticle:G,formatUserProfile:M,formatBMIResult:function(e){var t,n,i,o,r,a,l,s,d;return e&&e.status?{status:null==e?void 0:e.status,comparison:null!==(t=null==e?void 0:e.comparison)&&void 0!==t?t:"",assessmentData:[{tab:"tools.condition",content:null!==(n=null==e?void 0:e.condition)&&void 0!==n?n:""},{tab:"tools.risks",content:null!==(i=null==e?void 0:e.risk)&&void 0!==i?i:""},{tab:"tools.suggestion",content:null!==(o=null==e?void 0:e.suggestion)&&void 0!==o?o:""}],chartData:(null===(r=null==e?void 0:e.chart_data)||void 0===r?void 0:r.length)>0?null==e?void 0:e.chart_data:[],disclaimer:null!==(a=null==e?void 0:e.disclaimer)&&void 0!==a?a:"",illustrator:null!==(l=null==e?void 0:e.illustrator)&&void 0!==l?l:"",faqs:null!==(s=null==e?void 0:e.faqs)&&void 0!==s?s:[],suggestedArticlesLink:null!==(d=null==e?void 0:e.suggested_articles_link)&&void 0!==d?d:""}:{}},formatSponsor:U,formatReviewedCategory:B,formatCategory:H,formatCategoryApi:function(e){return e?{categoryInfo:H(e.data.category)||null,explainersPosts:(e.data.explainers_posts||[]).map(G),subCategories:(e.data.sub_categories||[]).map(H)}:{}},formatFaqsCategory:F,formatHealthTool:z,formatHealthToolTypeCategory:function(e){var t,n;return e?{termId:(null==e?void 0:e.term_id)||0,name:(null==e?void 0:e.name)||"",healthTools:null!==(n=null===(t=null==e?void 0:e.health_tools)||void 0===t?void 0:t.map((function(e){return z(e)})))&&void 0!==n?n:[]}:{}},formatCommunity:j,formatTopic:V,formatPost:K,formatPostPagination:function(e){return e?{currentPage:e.current||0,lastPage:e.last||0,total:e.total_items||0}:{}},formatNotification:function(e){var t,n,i;return e?{time:e.created_at,content:e.content,postId:String(e.post_id),fromUser:{name:null===(t=e.from_user)||void 0===t?void 0:t.name,id:null===(n=e.from_user)||void 0===n?void 0:n.id,avatar:null===(i=e.from_user)||void 0===i?void 0:i.avatar},toUserId:String(e.to_user_id),postSlug:e.post_slug||"",communitySlug:e.community_slug||""}:{}},formatSpotlightsList:function(e){return e?e.map((function(e){return{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}})):[]},formatOvulationInfo:Y,formatSuggestedArticle:function(e){return e?{postId:e.post_id||null,categoryId:e.category_id||null,postUrl:e.post_url||null,postReviewed:e.post_reviewed||null,postPageviews:e.post_pageviews||null,postRank:e.post_rank||null,isPin:e.is_pin||null,frequency:e.frequency||null,topic:e.topic||null}:{}},formatTopicHealthTool:function(e){return e?{id:e.tool_id||null,topicFrequency:e.frequency||null,topicId:e.topic_id||null,topicName:e.topic_name||null,isPinned:!!e.is_pin||null,toolLink:e.tool_link||""}:{}},formatComment:W,formatReportedPostToPostDetail:function(e){return e?{name:e.title,description:e.description,images:e.images,likes_count:e.count_likes,comments_count:e.count_comments,topics:[],slug:e.post_slug,id:e.post_id,is_pin:e.is_pin,pin_date:"",post_type:e.post_type,schedule_datetime:e.schedule_datetime,is_active:e.is_active,preview_title:e.preview_title||"",preview_image:e.preview_image||"",preview_description:e.preview_description||"",preview_link:e.preview_link||"",user:e.user,created_at:"",created_time:"",community:{id:e.community_id,name:e.community_name,slug:e.community_slug,description:""}}:{}},formatTopicSubot:function(e){return e?{chatBotId:e.subot_id,isPinned:e.is_pin,topicId:e.topic_id,topicFrequency:e.frequency}:{}},formatSiteWideBanner:function(e,t){return void 0!==e&&e?{content:(null==e?void 0:e.content)||"",icon:(null==e?void 0:e.icon)||"",type:t||"other"}:null},formatPWGContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?M(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatUserProfileUrl:q,formatTHRContent:function(e){return e?{disclaimer:e.disclaimer,info:e.info||[],reviewedBy:e.reviewed_by?M(e.reviewed_by):null,reviewedDate:e.reviewed_date,metaTag:e.meta_tag}:{}},formatBabyGrowthContent:function(e){var t,n,i;return e&&e.information?{information:null!==(t=e.information.map((function(e){return{title:e.title,description:e.description}})))&&void 0!==t?t:[],reviewBy:{reviewer:(null===(n=e.reviewed_by)||void 0===n?void 0:n.display_name)||(null===(i=e.reviewed_by)||void 0===i?void 0:i.name)||"",date:e.reviewed_date||"",link:q(null==e?void 0:e.reviewed_by)},metaTag:e.meta_tag||"",title:e.title||"",description:e.description||"",disclaimer:e.disclaimer||"",is_sponsored:e.is_sponsored||!1,sponsor:e.sponsor,featuredImage:e.featured_image||""}:{}}}),$={BASE_API_PATH:"/",PROFILE:"profile?website_url={website_url}",SEARCH_USER:"profile/search?website_url={website_url}&name={name}",FETCH_PREVIEW:"fetch/preview?website_url={website_url}",FETCH_POST_OR_TOPIC:"fetch/{slug}?website_url={website_url}&community_slug={communitySlug}",POST:{LIST:"post?website_url={website_url}&slug={slug}&pin={pin}&page={page}&community_id={communityId}&topic_id={topicId}&sort_by={sort}&id={id}",DETAIL_BY_ID_OR_SLUG:"post/{idSlug}?website_url={website_url}",CREATE:"post/create?website_url={website_url}",LIKE:"post/{id}/like?website_url={website_url}",DELETE:"post/{id}/delete?website_url={website_url}",REPORT:"post/{id}/report?website_url={website_url}",UPDATE:"post/{id}/update?website_url={website_url}",FOLLOW:"post/{id}/follow?website_url={website_url}",CREATE_ARTICLE_COMMENT:"article-comment/create?website_url={website_url}"},COMMENT:{LIST:"comment?website_url={website_url}&post_id={postId}&page={page}&sort_by={sort}&items_per_page={perPage}&_without_reply={withoutReply}",CREATE:"comment/create?website_url={website_url}",REPLY:"comment/reply?website_url={website_url}",DELETE:"comment/{id}/delete?website_url={website_url}",LIKE:"comment/{id}/like?website_url={website_url}",UNLIKE:"comment/{id}/unlike?website_url={website_url}",IMAGE_UPLOAD:"comment/image/upload?website_url={website_url}"},COMMUNITY:{LIST:"community?website_url={website_url}&page={page}",DETAIL_BY_ID_OR_SLUG:"community/{idSlug}?website_url={website_url}",JOIN:"community/join?website_url={website_url}",LEAVE:"community/leave?website_url={website_url}"},TOPIC:{LIST:"topic?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}&page={page}",DETAIL_BY_ID_OR_SLUG:"topic/{idSlug}?website_url={website_url}&community_slug={communitySlug}&community_id={communityId}",HEALTH_TOOLS:"tools?topic_id={topicId}&website_url={website_url}",SUBOTS:"subots?topic_id={topicId}&website_url={website_url}",SUGGESTED_POSTS:"suggested-posts?topic_id={topicId}&website_url={website_url}&page={page}",JOIN:"topic/join?website_url={website_url}",LEAVE:"topic/leave?website_url={website_url}"},BOOKMARK:{LIST:"bookmark?user_id={userId}&website_url={website_url}",CREATE:"bookmark/create?website_url={website_url}",DELETE:"bookmark/delete?website_url={website_url}"},UPLOAD_IMAGE:"auth/comment/image/upload?website_url={website_url}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info"},J={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},Z={BASE_API_PATH:"/",GET_SEARCH_ARTICLES:"search?s={keyword}&page={page}",GET_ALL_CATEGORIES:"categories?type=all",GET_HOMEPAGE_POSTS:"home/trending-post?type={type}",GET_HOMEPAGE_LATEST_POSTS:"articles?page=1&_islatest=1",GET_ARTICLE_DETAIL:"article/{slug}?skip_ids={skipIds}&_isrelated={isRelated}",GET_CATEGORY_DETAIL:"category/{slug}",GET_CATEGORY_OR_ARTICLE_DETAIL:"fetch/{fullSlug}",GET_PREVIEW_ARTICLE:"fetch/{fullSlug}?preview_nonce={nonce}&preview=true",GET_ARTICLE_OF_CATEGORY:"articles?category_id={categoryId}&page={currentPage}",GET_PAGE_STATIC:"page/{slug}",GET_ALL_HEALTH_TOOLS:"healthtools",GET_ALL_MARRYBABY_HEALTH_TOOLS:"health-tools",GET_HEALTH_TOOLS_BY_CATEGORY:"healthtools?_hasgroup=1",GET_AUTHOR:"author/{slug}",GET_ALL_EXPERTS:"experts",GET_ALL_EXPERTS_PAGING:"experts?page={page}",GET_EXPERT:"expert/{slug}",GET_EXPERT_POST:"expert/article?page={page}",POST_ARTICLE_FEEDBACK:"article/feedback/{id}",GET_AZ_DRUGS:"category/a-z/{category}",GET_HOMEPAGE_MEDICAL_REVIEWED:"home/medical-reviewed",GET_ARTICLES_BY_IDS:"articles?ids={ids}",GET_ARTICLE_OF_CATEGORY_NO_EXPLAINERS:"articles?category_id={categoryId}&page={currentPage}&skip_ids={ids}",GET_EXPERT_OF_CATEGORY:"category/expert/?id={id}",GET_DUE_DATE_INFO:"health-tools/due-date-calculator/info",GET_DUE_DATE_ALL_WEEKS:"health-tools/due-date-calculator/all",GET_DUE_DATE_SUGGESTED_ARTICLES:"health-tools/due-date-calculator/result?from_week={from}&to_week={to}",GET_PROFILE:"user/profile",GET_ADMIN_PROFILE:"GET_ADMIN_PROFILE",GET_FEATURE:"feature",POST_NEW_FEATURE:"feature/update",CREATE_BOOKMARK:"bookmark/create",DELETE_BOOKMARK:"bookmark/delete",DELETE_ALL_BOOKMARK:"bookmark/delete-all",GET_ALL_BOOKMARK:"bookmark",SSO_USER_PROFILE:"user",SSO_USER_BOOKMARKS:"user/bookmarks",SSO_USER_PASSWORD:"user/settings/password",SSO_USER_EMAIL:"user/settings/update-email",SSO_CLOSE_ACCOUNT:"user/settings/close-account",SSO_HELP:"user/settings/help",GET_HEALTH_TOOL_OVULATION_INFO:"health-tools/ovulation-calculator/info",GET_HEALTH_TOOL_OVULATION_SUGGESTED_ARTICLES:"health-tools/ovulation-calculator/result?method={method}",GET_HEALTH_TOOL_BMI_INFO:"health-tools/bmi-calculator/info",GET_HEALTH_TOOL_BMI_RESULT:"health-tools/bmi-calculator/result?gender={gender}&bmi={bmi}&age={age}",GET_HEALTH_TOOL_BMR_INFO:"health-tools/bmr-calculator/info",GET_HEALTH_TOOL_BMR_RESULT:"health-tools/bmr-calculator/result?kcals={kcals}&gender={gender}&age={age}",GET_HEALTH_TOOL_PWG_INFO:"health-tools/preweight-gain-calculator/info",GET_HEALTH_TOOL_THR_INFO:"health-tools/target-heart-rate/info",GET_HEALTH_TOOL_BABY_GROWTH_INFO:"health-tools/baby-growth-tracking/info",POST_UPDATE_LOCATION:"tracking/geo/",GET_SIDIS_DUE_DATE:"frontend/tools/due_date",GET_SIDIS_OVULATION:"frontend/tools/ovulation",GET_SIDIS_BMI:"frontend/tools/bmi",GET_SIDIS_BMR:"frontend/tools/bmr",POST_LOGOUT:"user/logout",OVULATION_CREATE_EVENT:"ovulation/event?method={method}&day={day}&cycle={cycle}&period={period}&token={token}&user_id={user_id}",GET_ALL_SPOTLIGHT:"spotlights?per_page={perPage}&order_by={orderBy}",SSO_UPDATE_FIRST_TIME_BOOKMARK:"bookmark/update-first-time",POST_COMMENT_NOTIFICATION:"comment/notification",GET_ABOUT_US_DATA:"about",POST_LEAD_IMPRESSION:"campaign/{campaignCode}/impression",POST_LEAD_POPUP_EXIT:"campaign/{campaignCode}/popup_exit",POST_LEAD_LEAD:"campaign/{campaignCode}/lead",POST_SSO_VERIFY_TOKEN:"verify-id-token",GET_LANDING_PAGE_FIRST_NODE:"landing_page/bot",GET_LANDING_PAGE_NEXT_NODE:"landing_page/messages",POST_LANDING_PAGE_IMPRESSION:"landing_page/impressions",POST_LANDING_PAGE_CLICK:"landing_page/clicks",FETCH_URL_DATA:"preview",GET_SPOTLIGHT_LANDING:"spotlight/{slug}",GET_FOOTER_INFO:"footer",CHECK_SSO_EMAIL:"member/check-email",GET_HOMEPAGE_SITEWIDE_BANNER:"home/sitewide-banner",GET_DYNAMIC_FOOTER:"menu/footer",GET_EXPERTS:"experts?page={page}&number={perPage}&s={search}",GET_EXPERT_BY_ID:"expert/{id}"},Q={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},ee=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var n={},i=(t||{}).decode||oe,o=0;for(;o<e.length;){var r=e.indexOf("=",o);if(-1===r)break;var a=e.indexOf(";",o);if(-1===a)a=e.length;else if(a<r){o=e.lastIndexOf(";",r-1)+1;continue}var l=e.slice(o,r).trim();if(void 0===n[l]){var s=e.slice(r+1,a).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),n[l]=ae(s,i)}o=a+1}return n},te=function(e,t,n){var i=n||{},o=i.encode||re;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!ie.test(e))throw new TypeError("argument name is invalid");var r=o(t);if(r&&!ie.test(r))throw new TypeError("argument val is invalid");var a=e+"="+r;if(null!=i.maxAge){var l=i.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(l)}if(i.domain){if(!ie.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!ie.test(i.path))throw new TypeError("option path is invalid");a+="; Path="+i.path}if(i.expires){var s=i.expires;if(!function(e){return"[object Date]"===ne.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+s.toUTCString()}i.httpOnly&&(a+="; HttpOnly");i.secure&&(a+="; Secure");if(i.priority){switch("string"==typeof i.priority?i.priority.toLowerCase():i.priority){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(i.sameSite){switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},ne=Object.prototype.toString,ie=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function oe(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function re(e){return encodeURIComponent(e)}function ae(e,t){try{return t(e)}catch(t){return e}}var le={parse:ee,serialize:te},se={"vi-VN":"hellobacsi.com","id-ID":"hellosehat.com","ms-MY":"hellodoktor.com","km-KH":"hellokrupet.com","en-PH":"hellodoctor.com.ph","th-TH":"hellokhunmor.com","my-MM":"hellosayarwon.com","zh-TW":"helloyishi.com.tw","hi-IN":"helloswasthya.com"},de={"vi-VN":"marrybaby.vn"},ue=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",ce=function(e){var t=ke.env.isMarryBaby;return"https://".concat(t?de[e]:se[e])},me=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},pe=function(e){var t=ke.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var n="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(n?t?"fe.":"discover.":t?"www.":"").concat(se[e])},_e=function(e,n,i){var o="";i&&(o=Object.keys(i).map((function(e){return e+"="+i[e]})).join("&"));var r=((null==ke?void 0:ke.env)||{}).togetherBaseApiUrl,a=void 0===r?"":r,l=p(e,t(t({},(null==n?void 0:n._locale)?{website_url:ce(String(n._locale))}:{}),n));return l+="".concat(l.includes("?")?"&":"?").concat(o),a+"api/v1/"+me(l)},ve=function(e,n){var i=((null==ke?void 0:ke.env)||{}).discoverBaseApiUrl;return(void 0===i?"":i)+"wp-json/api/"+me(p(e,t({},n)))},he=function(e,n){var i=((null==ke?void 0:ke.env)||{}).careBaseApiUrl;return((void 0===i?"":i)||"https://service-health-care.hellohealthgroup.com/")+me(p(e,t({},n)))},ge=function(e){return(null==e?void 0:e.data)&&(e.data instanceof FormData?e.body=e.data:"object"==typeof e.data&&(e.body=JSON.stringify(e.data)),delete e.data),e},Ee=function(e,o,r,a){return void 0===a&&(a=!1),n(void 0,void 0,void 0,(function(){var n,l,s,d,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,fetch(a?e:(c=e,encodeURI(c).replace(/%5B/g,"[").replace(/%5D/g,"]")),t(t({method:o},ge(r)),{headers:t({},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 1:return(n=i.sent())?[2,n]:[3,3];case 2:return l=i.sent(),console.log(l),console.log({url:e,status:null===(s=null==l?void 0:l.response)||void 0===s?void 0:s.status,statusText:null===(d=null==l?void 0:l.response)||void 0===d?void 0:d.statusText}),[2,(null===(u=null==l?void 0:l.response)||void 0===u?void 0:u.data)||null];case 3:return[2,null]}var c}))}))},fe=function(e,o,r,a){return void 0===o&&(o="GET"),n(void 0,void 0,void 0,(function(){var n,l,s,d,u,m,p,_,v,h,g,E,f,b;return i(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,7,,8]),n="string"==typeof e?e:e.url,l="string"==typeof e?e:e.backupUrl,s=le.parse(a||""),d=s[S],!(u=d||c(S))||!u.length)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,fetch(n,t(t({method:o},ge(r)),{headers:t({Authorization:"Bearer "+u},null==r?void 0:r.headers)})).then((function(e){return e.json()}))];case 2:return m=i.sent(),(null===(v=null==m?void 0:m.messages)||void 0===v?void 0:v.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,Ee(l||n,o,r)]:m?[2,m]:[3,4];case 3:return p=i.sent(),console.log({status:null===(h=null==p?void 0:p.response)||void 0===h?void 0:h.status,statusText:null===(g=null==p?void 0:p.response)||void 0===g?void 0:g.statusText}),[2,Ee(l||n,o,r)];case 4:return[3,6];case 5:return[2,Ee(l||n,o,r)];case 6:return[3,8];case 7:return _=i.sent(),console.log({status:null===(E=null==_?void 0:_.response)||void 0===E?void 0:E.status,statusText:null===(f=null==_?void 0:_.response)||void 0===f?void 0:f.statusText}),[2,(null===(b=null==_?void 0:_.response)||void 0===b?void 0:b.data)||null];case 8:return[2,null]}}))}))},be=function(e,o,r,a){return n(void 0,void 0,void 0,(function(){var n,l,s,d;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),n=le.parse(a||""),l=n[S],(s=l||c(S))&&s.length?[4,fetch(e,t(t({method:o},ge(r)),{headers:t({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(d=i.sent())return[2,d];i.label=2;case 2:return[3,4];case 3:return i.sent(),[2,null];case 4:return[2,null]}}))}))},Te=function(e,o,r,a){return n(void 0,void 0,void 0,(function(){var n,l,s,d;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),n=le.parse(a||""),l=n[R],(s=l||c(R))&&s.length?[4,fetch(e,t(t({method:o},ge(r)),{headers:t({Authorization:"Bearer "+s},null==r?void 0:r.headers)})).then((function(e){return e.json()}))]:[3,2];case 1:if(d=i.sent())return[2,d];i.label=2;case 2:return[3,4];case 3:return i.sent(),[2,null];case 4:return[2,null]}}))}))};function ye(e,t,n){var i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+n+"$2"):e+o+t+"="+n}var we,Ae=function(e,t,n){void 0===n&&(n="/community");var i=e||("undefined"!=typeof window?window.location.href:"/"),o="undefined"!=typeof window?window.location.origin:"";return o||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(o=e.split("/").slice(0,3).join("/")),function(e,t){var n=ke.env.publicSSO,i=e||window.location.href;return t&&Object.keys(t).map((function(e){ye(i,e,t[e])})),ye(i,"source","communities"),n?"".concat(n,"?returnUrl=").concat(encodeURIComponent(i.toString())):i}("".concat(o).concat(n,"/on-boarding?return=").concat(encodeURIComponent(i)),t)},Oe=function(e,t,n,i){return n&&t?"".concat(n,"-").concat(t):"".concat(m(e||"",{lower:!0,locale:i||ue}),"-").concat(t)},Ie=function(e){var t,n=e.name,i=e.id,o=e.locale;return"/care/".concat(null===(t=P[o||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(Oe(n,i))},Le=function(e){var t,n=e.name,i=e.id,o=e.slug,r=e.locale;return"/care/".concat(null===(t=P[r||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(Oe(n,i,o))},Se={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},Re=l({data:Se,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}}),ke=Se,xe=function(e){var t=e.locale,n=void 0===t?"vi-VN":t,i=e.children,l=e.userInfo,s=e.router,d=e.env,u=void 0===d?{isMarryBaby:!1,togetherBasePath:"/community"}:d,c=e.sanitizeFunction,m=void 0===c?function(e){return e}:c,p=e.pushNotifications,_=void 0===p?function(){return!1}:p,v=r(),h=v[0],g=v[1];return ke={userInfo:l,locale:n,togetherUserId:h,router:s,env:u},a((function(){(null==l?void 0:l.id)&&be(_e($.PROFILE,{_locale:n}),"GET").then((function(e){var t;g(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==l?void 0:l.id]),o.createElement(Re.Provider,{value:{data:{userInfo:l,locale:n,togetherUserId:h,router:s,env:u},action:{pushNotifications:_,sanitizeFunction:m}}},i)},Pe=d.div(we||(we=e(["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"],["\n width: 40px;\n height: 40px;\n flex-shrink: 0;\n cursor: pointer;\n font-size: 20px;\n\n img {\n border-radius: 50%;\n }\n\n .avatar {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n\n .avatar-default {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ",";\n border-radius: 50%;\n color: white;\n font-size: 1em;\n font-weight: bold;\n line-height: 1;\n }\n\n &[data-is-marrybaby='true'] {\n .avatar-default {\n background-color: ",";\n }\n }\n"])),(function(e){return e.theme.colors.secondaryBase}),(function(e){return e.theme.mbColors.pink})),De=function(e){var t=e.className,n=e.isMarryBaby,i=e.style,l=e.avatar,d=e.username,u=e.isLazy,c=s(Re).data.env.isMarryBaby,m="boolean"==typeof n?n:c,p=r(!1),_=p[0],v=p[1];return a((function(){var e=new Image;e.onerror=function(){v(!0)},e.src=l}),[]),o.createElement(Pe,{"data-is-marrybaby":m,className:t,style:i},l&&!_?o.createElement("img",{src:u?void 0:l,"data-src":u?l:void 0,className:"avatar ".concat(u?"lazy":""),alt:"avatar",onError:function(){v(!0)}}):o.createElement("div",{className:"avatar avatar-default"},d&&(null==d?void 0:d.length)>0?d[0].toUpperCase():"A"))};export{f as A,S as B,J as C,Se as D,fe as E,ke as G,I as H,x as M,y as P,k as R,Re as T,De as U,xe as a,w as b,D as c,X as d,Y as e,q as f,j as g,K as h,Ae as i,O as j,Ee as k,_e as l,$ as m,he as n,se as o,Le as p,Ie as q,ve as r,Z as s,pe as t,Q as u,Te as v,be as w,V as x,A as y,W as z};
|
package/build/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{i as Types}from"./index-62c22dbe.js";export{i as Constants}from"./index-9dd60ba6.js";export{A as Alert,X as AmpNextPage,i as ArticleCard,K as BMICardEmbed,Q as BMRCardEmbed,L as BabyGrowthCardEmbed,N as BabyPoopEmbed,B as Badge,a as BorderHeading,j as Breadcrumbs,q as Carousel,k as CategoryCard,C as Checkbox,l as CheckboxGroup,y as CookieAcceptConfirm,D as DatePicker,Y as DateRangePicker,u as DoctorInfo,J as DueDateCardEmbed,F as FileDropdown,x as FloatButtonGroup,G as Grid,I as IconText,M as MobileBottomNavigation,z as MobileBottomNavigationIcon,V as OvulationCardEmbed,W as PWGCardEmbed,P as Pagination,h as Progress,m as ProgressBar,R as Radio,n as RadioGroup,g as RateStars,p as ScrollList,E as SeoHead,S as Shadow,Z as ShareContainer,_ as ShareDrawer,o as SideMenu,b as Slider,r as StatisticCard,v as SurveyQuestionCard,w as SurveyThankyouCard,O as THRCardEmbed,s as Table,t as Tabs,T as Tag,e as TextArea,f as TextDivider,c as Toggle,H as ToolsBannerCard,U as UnderlinedLink,d as Uploader}from"./index-
|
|
1
|
+
export{i as Types}from"./index-62c22dbe.js";export{i as Constants}from"./index-9dd60ba6.js";export{A as Alert,X as AmpNextPage,i as ArticleCard,K as BMICardEmbed,Q as BMRCardEmbed,L as BabyGrowthCardEmbed,N as BabyPoopEmbed,B as Badge,a as BorderHeading,j as Breadcrumbs,q as Carousel,k as CategoryCard,C as Checkbox,l as CheckboxGroup,y as CookieAcceptConfirm,D as DatePicker,Y as DateRangePicker,u as DoctorInfo,J as DueDateCardEmbed,F as FileDropdown,x as FloatButtonGroup,G as Grid,I as IconText,M as MobileBottomNavigation,z as MobileBottomNavigationIcon,V as OvulationCardEmbed,W as PWGCardEmbed,P as Pagination,h as Progress,m as ProgressBar,R as Radio,n as RadioGroup,g as RateStars,p as ScrollList,E as SeoHead,S as Shadow,Z as ShareContainer,_ as ShareDrawer,o as SideMenu,b as Slider,r as StatisticCard,v as SurveyQuestionCard,w as SurveyThankyouCard,O as THRCardEmbed,s as Table,t as Tabs,T as Tag,e as TextArea,f as TextDivider,c as Toggle,H as ToolsBannerCard,U as UnderlinedLink,d as Uploader}from"./index-b38b4414.js";export{A as Avatar,D as DefaultComponentGlobalContextData,G as GlobalData,P as Popup,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,d as TogetherDataTransforms,U as UserAvatar}from"./index-daa27462.js";export{B as Button}from"./index-697f7291.js";export{A as AuthorBadge,D as Divider,a as Dropdown}from"./index-2058993e.js";export{F as Flag,L as LanguageSwitcher,d as NavigationLogoutPopup,f as NavigationProfileButton,N as NavigationV2,e as ProfilePopup,P as PureInput,U as UserProfileNavigation,b as UserProfileNavigationHeader,c as UserProfileNavigationStats,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-b6596b44.js";export{H as Heading}from"./index-78966445.js";export{I as Input}from"./index-fac4e2c1.js";export{L as Label}from"./index-64080428.js";export{C as Container,L as Logo}from"./index-34929038.js";export{T as Text}from"./index-d5a60b16.js";export{D as Drawer,I as Icon,M as Menu,a as Modal,N as NewBabyProfileRadio,R as RadioImageGroup}from"./index-99b6b6e7.js";export{C as CustomReferenceDot}from"./index-182c57d1.js";export{P as PillCarousel}from"./index-90e0d8f5.js";export{Footer}from"./footer.js";export{u as useTranslations}from"./useTranslations-b3eb31ef.js";export{M as MEASURE_ELEMENT_CLASS,u as useScrollbarSize}from"./useScrollbarSize-99db33e1.js";export{u as useFbDataLayer}from"./useFbDataLayer-378a3308.js";export{u as useHealthToolsCache}from"./useHealthToolCache-2988152d.js";export{T as TranslationsProvider,t as translationsMap}from"./translationsProvider-3b337b3a.js";export{T as TranslationsContext,d as defaultTranslations}from"./translationsContext-e7808c8f.js";export{g as CardAuthor,C as CardLink,y as CardPost,z as CardPostPopoverMore,b as CardReactions,A as CardReply,B as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,D as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,q as ShareBox,S as SharePopup,x as SocialLinkPreview,p as SubmitReportForm,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-b2cab8d0.js";export{B as BookingSearchBar,t as CareTypes}from"./types-db7696af.js";export{c as CareConstants}from"./constants-a0a981fa.js";export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-ec8c08da.js";export{h as fadeIn,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./animation-1f84197a.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-0e8521c3.js";export{l as lazyLoadInstance}from"./lazyLoad-59e8ff6d.js";import"react";import"styled-components";export{t as theme}from"./theme-13d11d67.js";export{S as ScreenSizeContext,b as ScreenSizeContextProvider,a as abbreviateNumber,f as formatPill,g as getWindowSizeGroups}from"./dataTransform-bd799f5a.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-2d333f69.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,m as makeParams,b as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-11febb09.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-e6a9e58e.js";export{g as getSocialList}from"./getSocialList-8f93036b.js";import"./Locale-69030fff.js";import"./isProduction-6fc0946c.js";import"./tslib.es6-44f7e5ec.js";import"./defaultClassWrapper-4144361d.js";import"lodash/throttle";import"keen-slider/react";import"./gAssets.js";import"react-hook-form";import"./index-0a46fd2d.js";import"@mantine/core";import"@mantine/hooks";import"@hookform/resolvers/yup";import"dayjs";import"date-fns";import"react-range";import"./types-f57c9932.js";import"react-day-picker/DayPickerInput";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"slugify";import"string-format";import"./core-1fde1dd9.js";import"dayjs/plugin/relativeTime";import"lodash/debounce";import"react-dom";import"./FullScreen-7153b23e.js";import"./index-1f8da9eb.js";import"./index-35b7f615.js";import"@mantine/carousel";import"innertext";import"react-contenteditable";import"react-loading-skeleton";import"lodash/shuffle";import"vanilla-lazyload";
|
package/build/esm/misc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-ec8c08da.js";export{h as fadeIn,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./animation-1f84197a.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-0e8521c3.js";export{l as lazyLoadInstance}from"./lazyLoad-59e8ff6d.js";import"react";import"styled-components";export{t as theme}from"./theme-13d11d67.js";export{S as ScreenSizeContext,b as ScreenSizeContextProvider,a as abbreviateNumber,f as formatPill,g as getWindowSizeGroups}from"./dataTransform-bd799f5a.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-2d333f69.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,m as makeParams,b as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-11febb09.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-
|
|
1
|
+
export{a as ageGenerate,c as convertLocalizedStringToNumber,l as localizeNumberFormat}from"./localizeNumberFormat-ec8c08da.js";export{h as fadeIn,a as slideInDown,b as slideInLeft,c as slideInRight,s as slideInUp,e as slideOutDown,f as slideOutLeft,g as slideOutRight,d as slideOutUp}from"./animation-1f84197a.js";export{d as deleteCookie,g as getCookie,s as setCookie}from"./cookieHelper-0e8521c3.js";export{l as lazyLoadInstance}from"./lazyLoad-59e8ff6d.js";import"react";import"styled-components";export{t as theme}from"./theme-13d11d67.js";export{S as ScreenSizeContext,b as ScreenSizeContextProvider,a as abbreviateNumber,f as formatPill,g as getWindowSizeGroups}from"./dataTransform-bd799f5a.js";export{d as getCareApiDomain,g as getCurrentBaseUrl,a as getCurrentSsoUrl,c as getDiscoverApiDomain,b as getTogetherApiDomain}from"./routing-2d333f69.js";export{B as Breakpoints,M as MediaQueries,f as formatUrlWithPageParam,g as getBoundariesFromMediaQueryKey,a as getPopupWrapperDom,m as makeParams,b as safeEncodeURI,s as startCase,t as toggleNoScroll}from"./utils-11febb09.js";export{f as formatHealthTool,g as getDynamicHealthTool,a as getDynamicHealthToolWithCache}from"./getDynamicHealthTool-e6a9e58e.js";export{g as getSocialList}from"./getSocialList-8f93036b.js";import"dayjs";import"./tslib.es6-44f7e5ec.js";import"vanilla-lazyload";import"lodash/throttle";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"./core-1fde1dd9.js";import"./Locale-69030fff.js";import"./gAssets.js";
|
package/build/esm/navigation.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./tslib.es6-44f7e5ec.js";import"react";import"./core-
|
|
1
|
+
import"./tslib.es6-44f7e5ec.js";import"react";import"./core-1fde1dd9.js";export{N as NavigationV2,g as getNavMenuContent,a as getNavMenuContentWithCache}from"./index-b6596b44.js";import"./index-9dd60ba6.js";import"./routing-2d333f69.js";import"./index-daa27462.js";import"./isProduction-6fc0946c.js";import"./gAssets.js";import"styled-components";import"./index-d5a60b16.js";import"./theme-13d11d67.js";import"./utils-11febb09.js";import"./constants-a0a981fa.js";import"./useTranslations-b3eb31ef.js";import"./translationsContext-e7808c8f.js";import"string-format";import"./index-64080428.js";import"./index-78966445.js";import"./index-697f7291.js";import"./defaultClassWrapper-4144361d.js";import"dayjs";import"dayjs/plugin/relativeTime";import"./index-34929038.js";import"./Locale-69030fff.js";import"lodash/throttle";import"@mantine/core";import"./cookieHelper-0e8521c3.js";import"./lazyLoad-59e8ff6d.js";import"vanilla-lazyload";import"lodash/debounce";import"slugify";
|
package/build/esm/together.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as CardAuthor,C as CardLink,y as CardPost,z as CardPostPopoverMore,b as CardReactions,A as CardReply,B as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,D as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,q as ShareBox,S as SharePopup,x as SocialLinkPreview,p as SubmitReportForm,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-
|
|
1
|
+
export{g as CardAuthor,C as CardLink,y as CardPost,z as CardPostPopoverMore,b as CardReactions,A as CardReply,B as CardReplyPopover,h as CreateNewPostContent,i as CreatePostDescription,j as CreatePostTitle,s as ImagePreviewPopup,I as InputCommentBar,e as LabelPin,d as LabelSortPin,f as LabelSorting,L as Loading,D as PopoverMenu,P as PopupDanger,l as PopupDoctor,k as PopupExpert,o as PopupFrame,m as PopupHospital,r as PostContent,w as PostImagePreview,v as PostSingleImageViewPopup,q as ShareBox,S as SharePopup,x as SocialLinkPreview,p as SubmitReportForm,c as TagTopic,T as TogetherAuthConfigContext,a as TogetherAuthConfigContextProvider,t as TogetherTypes,n as TopicSelectList,u as useTogetherAuthRequiredAction}from"./types-b2cab8d0.js";export{D as DefaultComponentGlobalContextData,G as GlobalData,T as TogetherComponentGlobalContext,a as TogetherComponentGlobalContextProvider,c as TogetherConstants,d as TogetherDataTransforms,U as UserAvatar}from"./index-daa27462.js";import"react";import"./index-d5a60b16.js";import"./tslib.es6-44f7e5ec.js";import"./theme-13d11d67.js";import"./utils-11febb09.js";import"styled-components";import"./translationsContext-e7808c8f.js";import"string-format";import"./index-697f7291.js";import"./index-2058993e.js";import"./useTranslations-b3eb31ef.js";import"innertext";import"./index-fac4e2c1.js";import"./index-64080428.js";import"lodash/debounce";import"react-contenteditable";import"./index-78966445.js";import"./cookieHelper-0e8521c3.js";import"dayjs";import"dayjs/plugin/relativeTime";import"./index-9dd60ba6.js";import"./isProduction-6fc0946c.js";import"./gAssets.js";import"@mantine/core";import"./FullScreen-7153b23e.js";import"./lazyLoad-59e8ff6d.js";import"vanilla-lazyload";import"./defaultClassWrapper-4144361d.js";import"react-dom";import"slugify";
|