@hhgtech/hhg-components 1.20.69 → 1.20.71
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/care/components/organisms/bookingSearchBar/mobileTopbar/index.styled.d.ts +1 -1
- package/build/care/components/organisms/bookingSearchBar/resultSection/index.styled.d.ts +1 -1
- package/build/care/components/organisms/bookingSearchBar/resultSectionItem/index.styled.d.ts +1 -1
- package/build/care.js +1 -1
- package/build/components/atoms/heading/index.d.ts +1 -1
- package/build/components/atoms/icons/Reply.d.ts +4 -0
- package/build/components/atoms/icons/index.d.ts +1 -0
- package/build/components/atoms/text/index.d.ts +2 -1
- package/build/components/mantine/index.d.ts +2 -0
- package/build/components/mantine/loadingOverlay/index.d.ts +5 -0
- package/build/components/mantine/slider/index.d.ts +1 -1
- package/build/components.js +1 -1
- package/build/esm/babyGrowth.js +1 -1
- package/build/esm/care.js +1 -1
- package/build/esm/components.js +1 -1
- package/build/esm/{index-165a5c19.js → index-0d69362e.js} +1 -1
- package/build/esm/{index-2974be22.js → index-247c4e21.js} +1 -1
- package/build/esm/{index-647168d7.js → index-7fa64351.js} +1 -1
- package/build/esm/{index-df77c2b7.js → index-9c00ddee.js} +1 -1
- package/build/esm/{index-36cf9f36.js → index-a1df367b.js} +1 -1
- package/build/esm/index-c9da804a.js +1 -0
- package/build/esm/{index-4f138882.js → index-d009b597.js} +1 -1
- package/build/esm/index-dc96c2db.js +1 -0
- package/build/esm/{index-2e5247a0.js → index-fe9820b2.js} +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/{index.styled-161c1f98.js → index.styled-a87311b3.js} +1 -1
- package/build/esm/index.styled-b9f4b7d1.js +1 -0
- package/build/esm/mantine.js +1 -1
- package/build/esm/navigation.js +1 -1
- package/build/esm/navigationLayout_deprecated.js +1 -1
- package/build/esm/together.js +1 -1
- package/build/esm/{types-b626b817.js → types-7076aa18.js} +1 -1
- package/build/esm/types-9bdaa5f2.js +1 -0
- package/build/esm/{utils-35b39570.js → utils-53a64f38.js} +1 -1
- package/build/{index-d3426232.js → index-09f4bf8c.js} +1 -1
- package/build/{index-ce142826.js → index-36a2c232.js} +1 -1
- package/build/{index-e15ec8a9.js → index-79ca5c8f.js} +1 -1
- package/build/index-86fb3a3a.js +1 -0
- package/build/index-b0b1dce7.js +1 -0
- package/build/{index-7d762a8e.js → index-bf74d101.js} +1 -1
- package/build/{index-fa15aaf3.js → index-c2b118f9.js} +1 -1
- package/build/{index-f3af2c39.js → index-e799f383.js} +1 -1
- package/build/{index-1afc28c9.js → index-f2654ea8.js} +1 -1
- package/build/index.js +1 -1
- package/build/{index.styled-46ca912c.js → index.styled-26e09df8.js} +1 -1
- package/build/index.styled-6d954724.js +1 -0
- package/build/mantine.js +1 -1
- package/build/navigation.js +1 -1
- package/build/navigationLayout_deprecated.js +1 -1
- package/build/together/components/atoms/cardReactions/index.d.ts +4 -1
- package/build/together/components/atoms/cardReactions/index.styled.d.ts +4 -2
- package/build/together/components/organisms/cardPost/index.d.ts +1 -0
- package/build/together.js +1 -1
- package/build/{types-36c1f773.js → types-c9e3bda5.js} +1 -1
- package/build/types-d01e823f.js +1 -0
- package/build/{utils-c05996cf.js → utils-e2a4fdad.js} +1 -1
- package/package.json +1 -1
- package/build/esm/index-7dd85542.js +0 -1
- package/build/esm/index-d9efeaea.js +0 -1
- package/build/esm/index.styled-3d119631.js +0 -1
- package/build/esm/types-a75b9971.js +0 -1
- package/build/index-9b91ee37.js +0 -1
- package/build/index-c21b1491.js +0 -1
- package/build/index.styled-343a2168.js +0 -1
- package/build/types-df667ff7.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("./index.styled-343a2168.js"),r=require("./tslib.es6-f7929e76.js"),o=require("./screenSizeContext-6726a3b5.js"),a=require("styled-components"),n=require("./cookieHelper-612b90fa.js"),i=require("slugify"),l=require("string-format");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c,u,_=s(e),d=s(a),p=s(i),E=s(l),m={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},T=d.default.div(c||(c=r.__makeTemplateObject(["\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}),o.MediaQueries.mbDown,o.MediaQueries.mbDown,o.MediaQueries.mbUp),h=d.default.div(u||(u=r.__makeTemplateObject(["\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"]))),g={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},b={"id-ID":{"kalkulator-bmi":g.BMI,"kebutuhan-kalori":g.BMR,"kalkulator-hari-perkiraan-lahir":g.DUE_DATE,"kalkulator-masa-subur-2":g.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":g.PWG,"kalkulator-detak-jantung-saat-olahraga":g.THR},"ms-MY":{"kalkulator-bmi":g.BMI,"kalkulator-bmr":g.BMR,"kalkulator-tarikh-bersalin":g.DUE_DATE,"kalkulator-kesuburan":g.OVULATION,"kalkulator-tambah-berat-badan-hamil":g.PWG,"target-heart-rate-calculator":g.THR},"vi-VN":{"cach-tinh-chi-so-bmi":g.BMI,"tinh-chi-so-bmr":g.BMR,"cong-cu-tinh-ngay-du-sinh":g.DUE_DATE,"tinh-ngay-rung-trung":g.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":g.PWG,"cong-cu-do-nhip-tim":g.THR},"zh-TW":{"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"due-date-calculator":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnancy-weight-gain-calculator":g.PWG,"target-heart-rate-calculator":g.THR},"en-PH":{"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"due-date-calculator":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnancy-weight-gain-calculator":g.PWG,"target-heart-rate-calculator":g.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":g.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":g.BMR,"เครื่องมือคำนวณกำหนดคลอด":g.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":g.OVULATION,"เครื่องคำนวณน้ำหนักตัว":g.PWG,"เครื่องวัดอัตราการเต้น":g.THR},"hi-IN":{"bmi-calculator-en":g.BMI,"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"delivery-date-calculator":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnancy-weight-gain-calculator":g.PWG,"target-heart-rate-calculator":g.THR},"km-KH":{"គណនា-bmi":g.BMI,"គណនា-bmr":g.BMR,"គណនាថ្ងៃសម្រាលកូន":g.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":g.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":g.PWG,"គណនារកចង្វាក់បេះដូងល្អ":g.THR},"my-MM":{"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"due-date-calendar":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnaancy-weight-calculator":g.PWG,"target-heartrate":g.THR,"pregnancy-weight-calculator":g.PWG,"target-heart-rate":g.THR}},A={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"}},v={"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"}},O=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DEFAULT_AVATAR_IMG:"/images/avatar.jpg",DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:"/images/default-image.jpg",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:g,LOCALE_HEALTH_TOOLS:b,BEARER_TOKEN_COOKIE:"hhg_user_token",TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:"together_admin_token",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:A,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:v}),f={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"},I=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||R,a=0;for(;a<e.length;){var n=e.indexOf("=",a);if(-1===n)break;var i=e.indexOf(";",a);if(-1===i)i=e.length;else if(i<n){a=e.lastIndexOf(";",n-1)+1;continue}var l=e.slice(a,n).trim();if(void 0===r[l]){var s=e.slice(n+1,i).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),r[l]=x(s,o)}a=i+1}return r},L=function(e,t,r){var o=r||{},a=o.encode||y;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!S.test(e))throw new TypeError("argument name is invalid");var n=a(t);if(n&&!S.test(n))throw new TypeError("argument val is invalid");var i=e+"="+n;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(o.domain){if(!S.test(o.domain))throw new TypeError("option domain is invalid");i+="; Domain="+o.domain}if(o.path){if(!S.test(o.path))throw new TypeError("option path is invalid");i+="; Path="+o.path}if(o.expires){var s=o.expires;if(!function(e){return"[object Date]"===w.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+s.toUTCString()}o.httpOnly&&(i+="; HttpOnly");o.secure&&(i+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i},w=Object.prototype.toString,S=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function R(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function y(e){return encodeURIComponent(e)}function x(e,t){try{return t(e)}catch(t){return e}}var P={parse:I,serialize:L},D={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},G=e.createContext({data:D,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}});exports.GlobalData=D;var C={"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"},N={"vi-VN":"marrybaby.vn"},k=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",M=function(e){var t=exports.GlobalData.env.isMarryBaby;return"https://".concat(t?N[e]:C[e])},U=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},H=function(e){var t=exports.GlobalData.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(r?t?"fe.":"discover.":t?"www.":"").concat(C[e])},B=function(e,t,o){var a="";o&&(a=Object.keys(o).map((function(e){return e+"="+o[e]})).join("&"));var n=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).togetherBaseApiUrl,i=void 0===n?"":n,l=E.default(e,r.__assign(r.__assign({},(null==t?void 0:t._locale)?{website_url:M(String(t._locale))}:{}),t));return l+="".concat(l.includes("?")?"&":"?").concat(a),i+"api/v1/"+U(l)},F=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},V=function(e,t,o,a){return void 0===a&&(a=!1),r.__awaiter(void 0,void 0,void 0,(function(){var n,i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,fetch(a?e:(_=e,encodeURI(_).replace(/%5B/g,"[").replace(/%5D/g,"]")),r.__assign({method:t},F(o))).then((function(e){return e.json()}))];case 1:return(n=u.sent())?[2,n]:[3,3];case 2:return i=u.sent(),console.log(i),console.log({url:e,status:null===(l=null==i?void 0:i.response)||void 0===l?void 0:l.status,statusText:null===(s=null==i?void 0:i.response)||void 0===s?void 0:s.statusText}),[2,(null===(c=null==i?void 0:i.response)||void 0===c?void 0:c.data)||null];case 3:return[2,null]}var _}))}))},K=function(e,t,o,a){return r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),i=P.parse(a||""),l=i.hhg_user_token,(s=l||n.getCookie("hhg_user_token"))&&s.length?[4,fetch(e,r.__assign(r.__assign({method:t},F(o)),{headers:{Authorization:"Bearer "+s}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=u.sent())return[2,c];u.label=2;case 2:return[3,4];case 3:return u.sent(),[2,null];case 4:return[2,null]}}))}))};function Y(e,t,r){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}var W=function(e,t,r,o){return r&&t?"".concat(r,"-").concat(t):"".concat(p.default(e||"",{lower:!0,locale:o||k}),"-").concat(t)};exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.Avatar=function(r){var o=r.type,a=void 0===o?"square":o,n=r.size,i=r.avatarImg,l=r.avatarUrl,s=r.firstLetter,c=r.backgroundColor,u=r.onClick,d=r.style,p=r.className,E=r.isAmp,T=void 0!==E&&E,h=r.width,g=r.height,b=n?m[n]:void 0,A=e.useState(!1),v=A[0],O=A[1];e.useEffect((function(){if(l){var e=document.createElement("img");e.setAttribute("src",l),e.addEventListener("error",(function(){O(!0)}))}}),[l,O]);var f=(!l&&!i||v)&&s;return _.default.createElement(t.StyledAvatar,{style:d,"data-avatar-type":a,onClick:u,className:p,size:T?void 0:b,backgroundColor:c,avatarUrl:l,"data-is-amp":T,width:h,height:g},i,l&&!v&&_.default.createElement("img",{src:l}),f&&s)},exports.BEARER_TOKEN_COOKIE="hhg_user_token",exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG="/images/avatar.jpg",exports.DEFAULT_IMG="/images/default-image.jpg",exports.DISCOVER_PATHS={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",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}"},exports.DefaultComponentGlobalContextData=D,exports.HEALTH_TOOL_TYPE=g,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=f,exports.Popup=function(e){var t=e.type,r=void 0===t?"lead":t,o=e.closeIcon,a=e.isOpen,n=void 0===a||a,i=e.onClose,l=e.children,s=e.className,c=void 0===s?"":s,u=e.enableAnimation,d=void 0===u||u;return _.default.createElement(_.default.Fragment,null,_.default.createElement(T,{"data-open":n,"data-type":r,"data-animation":d},_.default.createElement("div",{className:"".concat(c||""," popup-content")},!!o&&_.default.createElement("div",{className:"close-button",onClick:i},o),l)),_.default.createElement(h,{"data-open":n,onClick:i}))},exports.REPORT_REASON_MAP=A,exports.TogetherComponentGlobalContext=G,exports.TogetherComponentGlobalContextProvider=function(t){var r=t.locale,o=void 0===r?"vi-VN":r,a=t.children,n=t.userInfo,i=t.router,l=t.env,s=void 0===l?{isMarryBaby:!1,togetherBasePath:"/community"}:l,c=t.sanitizeFunction,u=void 0===c?function(e){return e}:c,d=t.pushNotifications,p=void 0===d?function(){return!1}:d,E=e.useState(),m=E[0],T=E[1];return exports.GlobalData={userInfo:n,locale:o,togetherUserId:m,router:i,env:s},e.useEffect((function(){(null==n?void 0:n.id)&&K(B(f.PROFILE,{_locale:o}),"GET").then((function(e){var t;T(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==n?void 0:n.id]),_.default.createElement(G.Provider,{value:{data:{userInfo:n,locale:o,togetherUserId:m,router:i,env:s},action:{pushNotifications:p,sanitizeFunction:u}}},a)},exports.callApi=V,exports.callApiWithAdminAuth=function(e,t,o,a){return r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),i=P.parse(a||""),l=i.together_admin_token,(s=l||n.getCookie("together_admin_token"))&&s.length?[4,fetch(e,r.__assign(r.__assign({method:t},F(o)),{headers:{Authorization:"Bearer "+s}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=u.sent())return[2,c];u.label=2;case 2:return[3,4];case 3:return u.sent(),[2,null];case 4:return[2,null]}}))}))},exports.callApiWithAuth=K,exports.callApiWithOptionalAuth=function(e,t,o,a){return void 0===t&&(t="GET"),r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c,u,_,d,p,E,m,T,h,g,b;return r.__generator(this,(function(A){switch(A.label){case 0:if(A.trys.push([0,7,,8]),i="string"==typeof e?e:e.url,l="string"==typeof e?e:e.backupUrl,s=P.parse(a||""),c=s.hhg_user_token,!(u=c||n.getCookie("hhg_user_token"))||!u.length)return[3,5];A.label=1;case 1:return A.trys.push([1,3,,4]),[4,fetch(i,r.__assign(r.__assign({method:t},F(o)),{headers:{Authorization:"Bearer "+u}})).then((function(e){return e.json()}))];case 2:return _=A.sent(),(null===(E=null==_?void 0:_.messages)||void 0===E?void 0:E.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,V(l||i,t,o)]:_?[2,_]:[3,4];case 3:return d=A.sent(),console.log({status:null===(m=null==d?void 0:d.response)||void 0===m?void 0:m.status,statusText:null===(T=null==d?void 0:d.response)||void 0===T?void 0:T.statusText}),[2,V(l||i,t,o)];case 4:return[3,6];case 5:return[2,V(l||i,t,o)];case 6:return[3,8];case 7:return p=A.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,(null===(b=null==p?void 0:p.response)||void 0===b?void 0:b.data)||null];case 8:return[2,null]}}))}))},exports.constants=O,exports.domainLocales=C,exports.getApiPath=B,exports.getCareDoctorUrl=function(e){var t,r=e.name,o=e.id,a=e.locale;return"/care/".concat(null===(t=v[a||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(W(r,o))},exports.getCareHospitalUrl=function(e){var t,r=e.name,o=e.id,a=e.slug,n=e.locale;return"/care/".concat(null===(t=v[n||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(W(r,o,a))},exports.getCarePath=function(e,t){var o=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).careBaseApiUrl;return((void 0===o?"":o)||"https://service-health-care.hellohealthgroup.com/")+U(E.default(e,r.__assign({},t)))},exports.getCurrentBaseUrl=H,exports.getCurrentHref=function(e,t,r){return"undefined"!=typeof window?window.location.href:"".concat(H(e)).concat(t).concat(r)},exports.getDiscoverApiPath=function(e,t){var o=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).discoverBaseApiUrl;return(void 0===o?"":o)+"wp-json/api/"+U(E.default(e,r.__assign({},t)))},exports.getUrlToSignUp=function(e,t,r){void 0===r&&(r="/community");var o=e||("undefined"!=typeof window?window.location.href:"/"),a="undefined"!=typeof window?window.location.origin:"";return a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/")),function(e,t){var r=exports.GlobalData.env.publicSSO,o=e||window.location.href;return t&&Object.keys(t).map((function(e){Y(o,e,t[e])})),Y(o,"source","communities"),r?"".concat(r,"?returnUrl=").concat(encodeURIComponent(o.toString())):o}("".concat(a).concat(r,"/on-boarding?return=").concat(encodeURIComponent(o)),t)};
|
|
1
|
+
"use strict";var e=require("react"),t=require("./index.styled-6d954724.js"),r=require("./tslib.es6-f7929e76.js"),o=require("./screenSizeContext-6726a3b5.js"),a=require("styled-components"),n=require("./cookieHelper-612b90fa.js"),i=require("slugify"),l=require("string-format");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c,u,_=s(e),d=s(a),p=s(i),E=s(l),m={xs:28,small:32,medium:40,large:48,xl:64,xxl:80,xxxl:96},T=d.default.div(c||(c=r.__makeTemplateObject(["\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}),o.MediaQueries.mbDown,o.MediaQueries.mbDown,o.MediaQueries.mbUp),h=d.default.div(u||(u=r.__makeTemplateObject(["\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"]))),g={DUE_DATE:"DUE_DATE",BMI:"BMI",BMR:"BMR",OVULATION:"OVULATION",IFRAME:"IFRAME",PWG:"PWG",THR:"THR"},b={"id-ID":{"kalkulator-bmi":g.BMI,"kebutuhan-kalori":g.BMR,"kalkulator-hari-perkiraan-lahir":g.DUE_DATE,"kalkulator-masa-subur-2":g.OVULATION,"kalkulator-kenaikan-berat-badan-ibu-hamil":g.PWG,"kalkulator-detak-jantung-saat-olahraga":g.THR},"ms-MY":{"kalkulator-bmi":g.BMI,"kalkulator-bmr":g.BMR,"kalkulator-tarikh-bersalin":g.DUE_DATE,"kalkulator-kesuburan":g.OVULATION,"kalkulator-tambah-berat-badan-hamil":g.PWG,"target-heart-rate-calculator":g.THR},"vi-VN":{"cach-tinh-chi-so-bmi":g.BMI,"tinh-chi-so-bmr":g.BMR,"cong-cu-tinh-ngay-du-sinh":g.DUE_DATE,"tinh-ngay-rung-trung":g.OVULATION,"cong-cu-tinh-can-nang-khi-mang-thai":g.PWG,"cong-cu-do-nhip-tim":g.THR},"zh-TW":{"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"due-date-calculator":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnancy-weight-gain-calculator":g.PWG,"target-heart-rate-calculator":g.THR},"en-PH":{"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"due-date-calculator":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnancy-weight-gain-calculator":g.PWG,"target-heart-rate-calculator":g.THR},"th-TH":{"เครื่องคำนวณหา-ค่าดัชนี":g.BMI,"เครื่องคำนวณอัตราการเผาผลาญพลังงาน-bmr":g.BMR,"เครื่องมือคำนวณกำหนดคลอด":g.DUE_DATE,"เครื่องคำนวณการตกไข่-ovulation-calculat":g.OVULATION,"เครื่องคำนวณน้ำหนักตัว":g.PWG,"เครื่องวัดอัตราการเต้น":g.THR},"hi-IN":{"bmi-calculator-en":g.BMI,"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"delivery-date-calculator":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnancy-weight-gain-calculator":g.PWG,"target-heart-rate-calculator":g.THR},"km-KH":{"គណនា-bmi":g.BMI,"គណនា-bmr":g.BMR,"គណនាថ្ងៃសម្រាលកូន":g.DUE_DATE,"គណនាថ្ងៃមេជីវិតញីទុំធ្លាក់":g.OVULATION,"គណនាទម្ងន់ស្ត្រីពពោះ":g.PWG,"គណនារកចង្វាក់បេះដូងល្អ":g.THR},"my-MM":{"bmi-calculator":g.BMI,"bmr-calculator":g.BMR,"due-date-calendar":g.DUE_DATE,"ovulation-calculator":g.OVULATION,"pregnaancy-weight-calculator":g.PWG,"target-heartrate":g.THR,"pregnancy-weight-calculator":g.PWG,"target-heart-rate":g.THR}},A={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"}},v={"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"}},O=Object.freeze({__proto__:null,POST_DATE_FORMAT:"dd/MM/yyyy",NORMAL_DATE_FORMAT:"YYYY-MM-DD",DEFAULT_AVATAR_IMG:"/images/avatar.jpg",DEFAULT_RESULT_IMG:"/images/default.png",DEFAULT_IMG:"/images/default-image.jpg",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:g,LOCALE_HEALTH_TOOLS:b,BEARER_TOKEN_COOKIE:"hhg_user_token",TOGETHER_DISCLAIMER_COOKIE:"hhg_together_disclaimer",BEARER_ADMIN_TOKEN_COOKIE:"together_admin_token",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:A,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:v}),f={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"},I=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");var r={},o=(t||{}).decode||R,a=0;for(;a<e.length;){var n=e.indexOf("=",a);if(-1===n)break;var i=e.indexOf(";",a);if(-1===i)i=e.length;else if(i<n){a=e.lastIndexOf(";",n-1)+1;continue}var l=e.slice(a,n).trim();if(void 0===r[l]){var s=e.slice(n+1,i).trim();34===s.charCodeAt(0)&&(s=s.slice(1,-1)),r[l]=x(s,o)}a=i+1}return r},L=function(e,t,r){var o=r||{},a=o.encode||y;if("function"!=typeof a)throw new TypeError("option encode is invalid");if(!S.test(e))throw new TypeError("argument name is invalid");var n=a(t);if(n&&!S.test(n))throw new TypeError("argument val is invalid");var i=e+"="+n;if(null!=o.maxAge){var l=o.maxAge-0;if(isNaN(l)||!isFinite(l))throw new TypeError("option maxAge is invalid");i+="; Max-Age="+Math.floor(l)}if(o.domain){if(!S.test(o.domain))throw new TypeError("option domain is invalid");i+="; Domain="+o.domain}if(o.path){if(!S.test(o.path))throw new TypeError("option path is invalid");i+="; Path="+o.path}if(o.expires){var s=o.expires;if(!function(e){return"[object Date]"===w.call(e)||e instanceof Date}(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");i+="; Expires="+s.toUTCString()}o.httpOnly&&(i+="; HttpOnly");o.secure&&(i+="; Secure");if(o.priority){switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":i+="; Priority=Low";break;case"medium":i+="; Priority=Medium";break;case"high":i+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(o.sameSite){switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return i},w=Object.prototype.toString,S=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function R(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function y(e){return encodeURIComponent(e)}function x(e,t){try{return t(e)}catch(t){return e}}var P={parse:I,serialize:L},D={locale:"vi-VN",env:{isMarryBaby:!1,togetherBasePath:"/community"},router:{basePath:"",asPath:"/"}},G=e.createContext({data:D,action:{pushNotifications:function(e){return e},sanitizeFunction:function(e){return e}}});exports.GlobalData=D;var C={"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"},N={"vi-VN":"marrybaby.vn"},k=process.env.NEXT_PUBLIC_DEPLOY_LOCALE||"vi-VN",M=function(e){var t=exports.GlobalData.env.isMarryBaby;return"https://".concat(t?N[e]:C[e])},U=function(e){var t=e.indexOf("?");return t>=0?e.slice(0,t+1)+e.slice(t+1).replace(/[^=&]+=(&|$)/g,"").replace(/&$/,""):e},H=function(e){var t=exports.GlobalData.env.isMarryBaby;if("undefined"!=typeof window)return window.location.origin;var r="staging"===process.env.NEXT_PUBLIC_DEPLOY_ENV;return"development"===process.env.NEXT_PUBLIC_DEPLOY_ENV?"http://localhost:3000":"https://".concat(r?t?"fe.":"discover.":t?"www.":"").concat(C[e])},B=function(e,t,o){var a="";o&&(a=Object.keys(o).map((function(e){return e+"="+o[e]})).join("&"));var n=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).togetherBaseApiUrl,i=void 0===n?"":n,l=E.default(e,r.__assign(r.__assign({},(null==t?void 0:t._locale)?{website_url:M(String(t._locale))}:{}),t));return l+="".concat(l.includes("?")?"&":"?").concat(a),i+"api/v1/"+U(l)},F=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},V=function(e,t,o,a){return void 0===a&&(a=!1),r.__awaiter(void 0,void 0,void 0,(function(){var n,i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,fetch(a?e:(_=e,encodeURI(_).replace(/%5B/g,"[").replace(/%5D/g,"]")),r.__assign({method:t},F(o))).then((function(e){return e.json()}))];case 1:return(n=u.sent())?[2,n]:[3,3];case 2:return i=u.sent(),console.log(i),console.log({url:e,status:null===(l=null==i?void 0:i.response)||void 0===l?void 0:l.status,statusText:null===(s=null==i?void 0:i.response)||void 0===s?void 0:s.statusText}),[2,(null===(c=null==i?void 0:i.response)||void 0===c?void 0:c.data)||null];case 3:return[2,null]}var _}))}))},K=function(e,t,o,a){return r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),i=P.parse(a||""),l=i.hhg_user_token,(s=l||n.getCookie("hhg_user_token"))&&s.length?[4,fetch(e,r.__assign(r.__assign({method:t},F(o)),{headers:{Authorization:"Bearer "+s}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=u.sent())return[2,c];u.label=2;case 2:return[3,4];case 3:return u.sent(),[2,null];case 4:return[2,null]}}))}))};function Y(e,t,r){var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+r+"$2"):e+a+t+"="+r}var W=function(e,t,r,o){return r&&t?"".concat(r,"-").concat(t):"".concat(p.default(e||"",{lower:!0,locale:o||k}),"-").concat(t)};exports.ADMIN_PATHS={SEARCH_USER:"admin/profile/search?website_url={website_url}&name={name}",COMMENT:{IMAGE_UPLOAD:"admin/comment/image/upload?website_url={website_url}"}},exports.Avatar=function(r){var o=r.type,a=void 0===o?"square":o,n=r.size,i=r.avatarImg,l=r.avatarUrl,s=r.firstLetter,c=r.backgroundColor,u=r.onClick,d=r.style,p=r.className,E=r.isAmp,T=void 0!==E&&E,h=r.width,g=r.height,b=n?m[n]:void 0,A=e.useState(!1),v=A[0],O=A[1];e.useEffect((function(){if(l){var e=document.createElement("img");e.setAttribute("src",l),e.addEventListener("error",(function(){O(!0)}))}}),[l,O]);var f=(!l&&!i||v)&&s;return _.default.createElement(t.StyledAvatar,{style:d,"data-avatar-type":a,onClick:u,className:p,size:T?void 0:b,backgroundColor:c,avatarUrl:l,"data-is-amp":T,width:h,height:g},i,l&&!v&&_.default.createElement("img",{src:l}),f&&s)},exports.BEARER_TOKEN_COOKIE="hhg_user_token",exports.CARE_PATHS={GET_DOCTOR_INFO:"api/doctors/{doctorId}?site={website_url}",GET_HOSPITAL_INFO:"api/hospital/branch/{hospital_branch_id}?site={website_url}"},exports.DEFAULT_AVATAR_IMG="/images/avatar.jpg",exports.DEFAULT_IMG="/images/default-image.jpg",exports.DISCOVER_PATHS={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",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}"},exports.DefaultComponentGlobalContextData=D,exports.HEALTH_TOOL_TYPE=g,exports.MAX_IMAGE_UPLOADS=20,exports.PATHS=f,exports.Popup=function(e){var t=e.type,r=void 0===t?"lead":t,o=e.closeIcon,a=e.isOpen,n=void 0===a||a,i=e.onClose,l=e.children,s=e.className,c=void 0===s?"":s,u=e.enableAnimation,d=void 0===u||u;return _.default.createElement(_.default.Fragment,null,_.default.createElement(T,{"data-open":n,"data-type":r,"data-animation":d},_.default.createElement("div",{className:"".concat(c||""," popup-content")},!!o&&_.default.createElement("div",{className:"close-button",onClick:i},o),l)),_.default.createElement(h,{"data-open":n,onClick:i}))},exports.REPORT_REASON_MAP=A,exports.TogetherComponentGlobalContext=G,exports.TogetherComponentGlobalContextProvider=function(t){var r=t.locale,o=void 0===r?"vi-VN":r,a=t.children,n=t.userInfo,i=t.router,l=t.env,s=void 0===l?{isMarryBaby:!1,togetherBasePath:"/community"}:l,c=t.sanitizeFunction,u=void 0===c?function(e){return e}:c,d=t.pushNotifications,p=void 0===d?function(){return!1}:d,E=e.useState(),m=E[0],T=E[1];return exports.GlobalData={userInfo:n,locale:o,togetherUserId:m,router:i,env:s},e.useEffect((function(){(null==n?void 0:n.id)&&K(B(f.PROFILE,{_locale:o}),"GET").then((function(e){var t;T(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)}))}),[null==n?void 0:n.id]),_.default.createElement(G.Provider,{value:{data:{userInfo:n,locale:o,togetherUserId:m,router:i,env:s},action:{pushNotifications:p,sanitizeFunction:u}}},a)},exports.callApi=V,exports.callApiWithAdminAuth=function(e,t,o,a){return r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c;return r.__generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),i=P.parse(a||""),l=i.together_admin_token,(s=l||n.getCookie("together_admin_token"))&&s.length?[4,fetch(e,r.__assign(r.__assign({method:t},F(o)),{headers:{Authorization:"Bearer "+s}})).then((function(e){return e.json()}))]:[3,2];case 1:if(c=u.sent())return[2,c];u.label=2;case 2:return[3,4];case 3:return u.sent(),[2,null];case 4:return[2,null]}}))}))},exports.callApiWithAuth=K,exports.callApiWithOptionalAuth=function(e,t,o,a){return void 0===t&&(t="GET"),r.__awaiter(void 0,void 0,void 0,(function(){var i,l,s,c,u,_,d,p,E,m,T,h,g,b;return r.__generator(this,(function(A){switch(A.label){case 0:if(A.trys.push([0,7,,8]),i="string"==typeof e?e:e.url,l="string"==typeof e?e:e.backupUrl,s=P.parse(a||""),c=s.hhg_user_token,!(u=c||n.getCookie("hhg_user_token"))||!u.length)return[3,5];A.label=1;case 1:return A.trys.push([1,3,,4]),[4,fetch(i,r.__assign(r.__assign({method:t},F(o)),{headers:{Authorization:"Bearer "+u}})).then((function(e){return e.json()}))];case 2:return _=A.sent(),(null===(E=null==_?void 0:_.messages)||void 0===E?void 0:E.find((function(e){return"Unauthenticated"===(null==e?void 0:e.toLowerCase())})))?[2,V(l||i,t,o)]:_?[2,_]:[3,4];case 3:return d=A.sent(),console.log({status:null===(m=null==d?void 0:d.response)||void 0===m?void 0:m.status,statusText:null===(T=null==d?void 0:d.response)||void 0===T?void 0:T.statusText}),[2,V(l||i,t,o)];case 4:return[3,6];case 5:return[2,V(l||i,t,o)];case 6:return[3,8];case 7:return p=A.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,(null===(b=null==p?void 0:p.response)||void 0===b?void 0:b.data)||null];case 8:return[2,null]}}))}))},exports.constants=O,exports.domainLocales=C,exports.getApiPath=B,exports.getCareDoctorUrl=function(e){var t,r=e.name,o=e.id,a=e.locale;return"/care/".concat(null===(t=v[a||"vi-VN"])||void 0===t?void 0:t.DOCTOR,"/").concat(W(r,o))},exports.getCareHospitalUrl=function(e){var t,r=e.name,o=e.id,a=e.slug,n=e.locale;return"/care/".concat(null===(t=v[n||"vi-VN"])||void 0===t?void 0:t.HOSPITAL,"/").concat(W(r,o,a))},exports.getCarePath=function(e,t){var o=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).careBaseApiUrl;return((void 0===o?"":o)||"https://service-health-care.hellohealthgroup.com/")+U(E.default(e,r.__assign({},t)))},exports.getCurrentBaseUrl=H,exports.getCurrentHref=function(e,t,r){return"undefined"!=typeof window?window.location.href:"".concat(H(e)).concat(t).concat(r)},exports.getDiscoverApiPath=function(e,t){var o=((null===exports.GlobalData||void 0===exports.GlobalData?void 0:exports.GlobalData.env)||{}).discoverBaseApiUrl;return(void 0===o?"":o)+"wp-json/api/"+U(E.default(e,r.__assign({},t)))},exports.getUrlToSignUp=function(e,t,r){void 0===r&&(r="/community");var o=e||("undefined"!=typeof window?window.location.href:"/"),a="undefined"!=typeof window?window.location.origin:"";return a||e&&(e.startsWith("http://")||e.startsWith("https://"))&&(a=e.split("/").slice(0,3).join("/")),function(e,t){var r=exports.GlobalData.env.publicSSO,o=e||window.location.href;return t&&Object.keys(t).map((function(e){Y(o,e,t[e])})),Y(o,"source","communities"),r?"".concat(r,"?returnUrl=").concat(encodeURIComponent(o.toString())):o}("".concat(a).concat(r,"/on-boarding?return=").concat(encodeURIComponent(o)),t)};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,$ as a,a0 as t,a1 as l,a2 as n,a3 as c,a4 as o,a5 as i,a6 as r,a7 as d,a8 as s,a9 as m,aa as h,ab as v,ac as u,ad as f,ae as p,af as g,ag as z,ah as E,ai as w,aj as y,ak as M,T as C,al as b}from"./index.styled-3d119631.js";import{b as x,_ as H}from"./tslib.es6-5532bd7b.js";import A,{useRef as F,useState as B,useEffect as V}from"react";import{u as _}from"./useTranslations-ad4d9d26.js";import"lodash/debounce";import"./index-58ae0705.js";import"date-fns";import"./screenSizeContext-d6e9a094.js";import"styled-components";import{t as k}from"./theme-a50a1aa5.js";import"./Locale-69030fff.js";import{I as S}from"./index-4f138882.js";import{u as j}from"./useScrollbarSize-99db33e1.js";import{createPortal as N}from"react-dom";import{S as R,a as D,b as L}from"./index.styled-161c1f98.js";var G={Ask:e,BarChart:a,Booking:t,Bookmark:l,Boy:function(e){var a=e.size,t=void 0===a?40:a,l=x(e,["size"]);return A.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"none",viewBox:"0 0 40 40"},l),A.createElement("circle",{cx:"20",cy:"20",r:"20",fill:"#2D87F3"}),A.createElement("path",{fill:"#fff",d:"M20.002 30.973c-2.616 0-4.945-.607-6.734-1.755-1.82-1.166-3.058-2.884-3.604-4.992-.045 0-.09.003-.136.003-.758 0-1.486-.3-2.023-.834a2.843 2.843 0 010-4.029 2.868 2.868 0 012.194-.83c.577-2.321 1.83-4.42 3.567-5.952C15.16 10.918 17.552 10 20.002 10s4.84.918 6.733 2.587c1.737 1.53 2.99 3.628 3.567 5.952a2.868 2.868 0 012.194.83 2.843 2.843 0 010 4.028 2.868 2.868 0 01-2.16.831c-.546 2.106-1.782 3.826-3.602 4.992-1.79 1.146-4.118 1.753-6.732 1.753z"}),A.createElement("path",{fill:"#2D87F3",d:"M17.95 13.19h-.014a.525.525 0 00-.524.509c0 .015-.059 1.466-2.006 1.927a.525.525 0 00-.389.63.523.523 0 00.633.386c2.18-.516 2.793-2.134 2.812-2.917a.519.519 0 00-.313-.491.527.527 0 00-.2-.044zM20.591 12.874a.524.524 0 00-.326.663c.004.014.455 1.396-1.212 2.5a.521.521 0 00.19.936.526.526 0 00.39-.066c1.866-1.236 1.878-2.966 1.625-3.708a.521.521 0 00-.464-.352.529.529 0 00-.203.027zM23.292 13.4a.525.525 0 00-.735.749c.008.007.787.783.35 2.119a.523.523 0 00.898.508.523.523 0 00.098-.183c.641-1.946-.56-3.142-.611-3.192zM15.977 21.818a1.365 1.365 0 000-1.936 1.38 1.38 0 00-1.945 0 1.365 1.365 0 000 1.936 1.38 1.38 0 001.945 0zM25.445 22.172a1.368 1.368 0 10-.682-2.652 1.369 1.369 0 10.682 2.652zM22.837 22.755a.532.532 0 00-.66.338c-.005.012-.414 1.222-2.124 1.222-1.71 0-2.12-1.21-2.124-1.222a.523.523 0 00-.998.316c.026.08.656 1.947 3.123 1.947s3.097-1.867 3.122-1.947a.52.52 0 00-.339-.654z"}))},Calendar:function(e){var a=e.size,t=void 0===a?20:a,l=e.color,n=void 0===l?"#595959":l,c=x(e,["size","color"]);return A.createElement("svg",H({width:t,height:t,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.8337 2.50065H16.667C17.5837 2.50065 18.3337 3.25065 18.3337 4.16732V17.5006C18.3337 18.4173 17.5837 19.1673 16.667 19.1673H3.33366C2.41699 19.1673 1.66699 18.4173 1.66699 17.5006V4.16732C1.66699 3.25065 2.41699 2.50065 3.33366 2.50065H4.16699V1.66732C4.16699 1.20898 4.54199 0.833984 5.00033 0.833984C5.45866 0.833984 5.83366 1.20898 5.83366 1.66732V2.50065H14.167V1.66732C14.167 1.20898 14.542 0.833984 15.0003 0.833984C15.4587 0.833984 15.8337 1.20898 15.8337 1.66732V2.50065ZM4.16699 17.5007H15.8337C16.292 17.5007 16.667 17.1257 16.667 16.6673V6.66732H3.33366V16.6673C3.33366 17.1257 3.70866 17.5007 4.16699 17.5007Z",fill:n}))},Community:n,EditSpecial:c,Family:o,Font:i,GenderBoy:function(e){var a=e.size,t=void 0===a?16:a,l=x(e,["size"]);return A.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"none",viewBox:"0 0 16 16"},l),A.createElement("g",{fill:"#595959",clipPath:"url(#clip0_408_8625)"},A.createElement("path",{d:"M15.325 1.199a.602.602 0 00-.038-.151v-.005h-.001a.618.618 0 00-.107-.168.623.623 0 00-.117-.105l-.004-.002a.6.6 0 00-.175-.078.609.609 0 00-.161-.024h-4.278a.611.611 0 000 1.223h2.802L9.6 5.535a5.469 5.469 0 00-3.433-1.203 5.506 5.506 0 00-5.5 5.5c0 3.033 2.468 5.5 5.5 5.5 3.033 0 5.5-2.467 5.5-5.5 0-1.262-.425-2.46-1.203-3.433l3.648-3.647v2.802a.611.611 0 001.222 0V1.277c0-.012-.003-.025-.004-.037a.617.617 0 00-.004-.041zM6.166 14.11A4.282 4.282 0 011.89 9.833a4.282 4.282 0 017.303-3.028 4.282 4.282 0 01-3.026 7.305z"}),A.createElement("path",{fillRule:"evenodd",d:"M15.287 1.048a.602.602 0 01.042.192l.002.016a.156.156 0 01.002.021v4.278a.611.611 0 01-1.222 0V2.753L10.463 6.4a5.469 5.469 0 011.203 3.433c0 3.033-2.467 5.5-5.5 5.5a5.506 5.506 0 01-5.5-5.5c0-3.033 2.468-5.5 5.5-5.5 1.263 0 2.46.425 3.433 1.203l3.647-3.647h-2.802a.611.611 0 010-1.223h4.278a.609.609 0 01.197.036.6.6 0 01.14.067h.003a.623.623 0 01.14.135h.001a.618.618 0 01.083.138v.003l.001.003zm.064-.02c.021.053.033.107.04.162m-.04-.162a.695.695 0 00-.096-.165l-.001-.002c-.008-.009-.016-.02-.026-.03A.69.69 0 0015.1.715m-.2-.089A.675.675 0 0014.722.6h-4.278a.678.678 0 000 1.355h2.641L9.594 5.447a5.535 5.535 0 00-3.428-1.18A5.573 5.573 0 00.6 9.832 5.573 5.573 0 006.166 15.4a5.573 5.573 0 005.567-5.567c0-1.257-.417-2.45-1.18-3.427l3.491-3.492v2.641a.678.678 0 001.356 0V1.277a.202.202 0 00-.003-.027v-.004l-.001-.01a.743.743 0 00-.005-.046M1.955 9.833a4.216 4.216 0 004.211 4.211 4.216 4.216 0 002.979-7.191 4.216 4.216 0 00-7.19 2.98zm7.237-3.028a4.282 4.282 0 00-7.304 3.028 4.282 4.282 0 004.278 4.278 4.282 4.282 0 003.026-7.306z",clipRule:"evenodd"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_408_8625"},A.createElement("path",{fill:"#fff",d:"M0 0H16V16H0z"}))))},GenderChooseBoy:function(e){var a=F("svg-".concat(Math.random()));return A.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",fill:"none",viewBox:"0 0 21 20"},e),A.createElement("g",{clipPath:"url(#".concat(a.current,")")},A.createElement("path",{fill:"#45A4FF",d:"M11.203 7.633l1.914 1.914 6.397-6.397L17.6 1.235l-6.397 6.398z"}),A.createElement("path",{fill:"#45A4FF",d:"M8.083 5.334a7.333 7.333 0 100 14.667 7.333 7.333 0 000-14.667zm0 11.96a4.626 4.626 0 110-9.253 4.626 4.626 0 010 9.252z"}),A.createElement("path",{fill:"#2D87F3",d:"M7.508 8.077a4.626 4.626 0 100 9.181 4.627 4.627 0 010-9.181zM8.083 5.334a7.43 7.43 0 00-.575.022 7.334 7.334 0 010 14.622 7.333 7.333 0 10.575-14.644zM19.88 2.785v-.78L18.744.872h-.78l-2.707 2.707h1.55c.2 0 .364.163.364.365v1.55l2.707-2.708z"}),A.createElement("path",{fill:"#45A4FF",d:"M18.043 0h-4.585a.365.365 0 00-.364.365v1.978c0 .201.163.364.364.364h4.22c.201 0 .365.163.365.365v4.22c0 .2.163.364.364.364h1.978a.365.365 0 00.365-.364V.365A.365.365 0 0020.385 0h-2.342z"})),A.createElement("defs",null,A.createElement("clipPath",{id:a.current},A.createElement("path",{fill:"#fff",d:"M0 0H20V20H0z",transform:"translate(.75)"}))))},GenderChooseGirl:function(e){return A.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",fill:"none",viewBox:"0 0 21 20"},e),A.createElement("path",{fill:"#FE9DC2",d:"M13.748 15.546h-1.503a.321.321 0 01-.321-.322v-3.7H9.577v3.7a.321.321 0 01-.322.322H7.753a.321.321 0 00-.321.321v1.704c0 .178.144.322.321.322h1.502c.178 0 .322.144.322.321v1.465c0 .178.144.321.321.321h1.704a.321.321 0 00.322-.321v-1.465c0-.177.144-.321.321-.321h1.503a.321.321 0 00.321-.322v-1.704a.322.322 0 00-.321-.321z"}),A.createElement("path",{fill:"#FC488D",d:"M9.576 11.523v2.151a7.466 7.466 0 002.347 0v-2.15H9.576z"}),A.createElement("path",{fill:"#FE9DC2",d:"M10.75 0a6.357 6.357 0 100 12.715A6.357 6.357 0 0010.75 0zm0 10.368a4.01 4.01 0 110-8.021 4.01 4.01 0 010 8.021z"}),A.createElement("path",{fill:"#FC488D",d:"M10.157 2.391a4.01 4.01 0 100 7.934 4.011 4.011 0 010-7.934zM10.75 0c-.2 0-.398.01-.593.028a6.358 6.358 0 010 12.66A6.357 6.357 0 1010.75 0z"}))},GenderGirl:function(e){var a=e.size,t=void 0===a?16:a,l=x(e,["size"]);return A.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"none",viewBox:"0 0 16 16"},l),A.createElement("path",{fill:"#595959",d:"M11.445 8.979a4.875 4.875 0 000-6.888 4.879 4.879 0 00-6.89 0 4.875 4.875 0 000 6.888 4.849 4.849 0 002.872 1.39V12H6.28a.573.573 0 100 1.147h1.147v1.614a.573.573 0 001.146 0v-1.614H9.72a.573.573 0 100-1.146H8.573v-1.63a4.849 4.849 0 002.872-1.391zm-6.08-.81a3.728 3.728 0 010-5.268 3.73 3.73 0 015.27 0 3.728 3.728 0 010 5.267 3.73 3.73 0 01-5.27 0z"}),A.createElement("path",{fill:"#595959",fillRule:"evenodd",d:"M5.366 8.168a3.73 3.73 0 005.268 0 3.728 3.728 0 000-5.267 3.73 3.73 0 00-5.268 0 3.728 3.728 0 000 5.267zm6.15-6.148a4.975 4.975 0 010 7.03 4.948 4.948 0 01-2.843 1.407V11.9H9.72a.673.673 0 110 1.346H8.673v1.514a.673.673 0 01-1.346 0v-1.514H6.28a.673.673 0 110-1.346h1.046v-1.443A4.948 4.948 0 014.484 9.05a4.975 4.975 0 010-7.029 4.979 4.979 0 017.032 0zm-4.09 8.35a4.849 4.849 0 01-2.871-1.391 4.875 4.875 0 010-6.888 4.879 4.879 0 016.89 0 4.875 4.875 0 010 6.888 4.849 4.849 0 01-2.872 1.39V12H9.72a.573.573 0 110 1.147H8.573v1.614a.573.573 0 01-1.146 0v-1.614H6.28a.573.573 0 110-1.146h1.147v-1.63zm-1.99-7.398a3.628 3.628 0 000 5.126 3.63 3.63 0 005.128 0 3.628 3.628 0 000-5.126 3.63 3.63 0 00-5.128 0z",clipRule:"evenodd"}))},Girl:function(e){var a=e.size,t=void 0===a?40:a,l=x(e,["size"]);return A.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"none",viewBox:"0 0 24 24"},l),A.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"#FC5D9A"}),A.createElement("path",{fill:"#fff",d:"M18.283 11.759c-.034 0-.068 0-.102.003-.346-1.394-1.099-2.652-2.14-3.57a6.132 6.132 0 00-3.726-1.544v-.532a2.062 2.062 0 001.617-.634 1.178 1.178 0 000-1.638 1.13 1.13 0 00-1.626 0c-.116.119-.218.25-.305.392a2.212 2.212 0 00-.308-.393 1.13 1.13 0 00-1.625 0 1.179 1.179 0 000 1.638 2.06 2.06 0 001.5.639c.041 0 .08 0 .117-.004v.533a6.143 6.143 0 00-3.726 1.543c-1.042.918-1.793 2.177-2.14 3.572a1.72 1.72 0 00-1.317.498 1.706 1.706 0 000 2.417c.323.32.76.5 1.215.5.027 0 .054 0 .081-.002a4.968 4.968 0 002.162 2.996c1.073.69 2.47 1.053 4.04 1.053 1.57 0 2.967-.364 4.04-1.053a4.987 4.987 0 002.162-2.998 1.72 1.72 0 001.295-.499 1.705 1.705 0 000-2.417c-.322-.32-.759-.5-1.214-.5zm-5.527-7.477a.5.5 0 01.724 0 .55.55 0 010 .763 1.446 1.446 0 01-1.165.446 1.834 1.834 0 01-.004-.077v-.09c.01-.392.168-.764.445-1.042zm-2.238.762a.55.55 0 010-.763.501.501 0 01.724 0c.276.278.435.65.444 1.042v.09c0 .027-.002.053-.004.078a1.45 1.45 0 01-1.164-.447z"}),A.createElement("path",{fill:"#FC5D9A",d:"M9.586 13.68a.819.819 0 000-1.161.828.828 0 00-1.167 0 .819.819 0 000 1.162c.323.32.845.32 1.167 0zM15.267 13.894a.821.821 0 10-.41-1.592.821.821 0 10.41 1.592zM13.704 14.242a.32.32 0 00-.282.045.314.314 0 00-.114.159c-.002.007-.248.733-1.274.733-1.027 0-1.272-.726-1.275-.733a.314.314 0 10-.598.19c.016.046.394 1.168 1.873 1.168s1.858-1.12 1.873-1.168a.313.313 0 00-.203-.394zM12.402 7.713a.315.315 0 00-.53.24.313.313 0 00.1.218c.253.248.466.533.632.845.316.61.298 1.118-.056 1.551-.403.493-.865.449-1.104.378-.33-.096-.598-.351-.625-.595-.03-.263.058-.585.318-.71.165-.077.337-.039.486.11a.315.315 0 00.538-.22.313.313 0 00-.092-.222c-.336-.337-.797-.426-1.204-.232-.473.226-.737.752-.671 1.343.055.494.495.957 1.072 1.128.151.045.308.067.465.068.491 0 .958-.228 1.305-.652.514-.63.558-1.402.127-2.234a4.11 4.11 0 00-.761-1.016z"}))},Heart:r,Home:d,Kebab:function(e){var a=e.size,t=void 0===a?20:a,l=x(e,["size"]);return A.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:"none",viewBox:"0 0 20 20"},l),A.createElement("path",{fill:"#000",fillOpacity:"0.54",fillRule:"evenodd",d:"M10 6.667c.916 0 1.666-.75 1.666-1.666 0-.917-.75-1.667-1.666-1.667-.917 0-1.667.75-1.667 1.667 0 .916.75 1.666 1.667 1.666zm0 1.667c-.917 0-1.667.75-1.667 1.667 0 .916.75 1.666 1.667 1.666.916 0 1.666-.75 1.666-1.666 0-.917-.75-1.667-1.666-1.667zm-1.667 6.667c0-.917.75-1.667 1.667-1.667.916 0 1.666.75 1.666 1.667 0 .916-.75 1.666-1.666 1.666-.917 0-1.667-.75-1.667-1.666z",clipRule:"evenodd"}))},Like:s,MyCommunity:m,PlusSpecial:h,Recalculate:v,Scale:u,Share:f,Stethoscope:p,FullScreen:g,GroupPeople:z,GroupPeopleSolid:E,Activities:w},P=function(e){var a=e.value,t=e.options,l=e.className,n=e.direction,c=void 0===n?"horizontal":n,o=e.onChange,i=e.isDisabled,r=B(a),d=r[0],s=r[1];return A.createElement(y,{className:l,"data-direction":c},t.map((function(e,t){return A.createElement(M,{"data-selected":(a||d)===e.value,"data-disabled":i,key:t,onClick:function(){var a;a=e.value,i||(s(a),o&&o(a))}},A.createElement("div",null,e.content,e.label&&A.createElement(C,{type:"bold",color:(a||d)===e.value?"#2D87F3":"black",className:"radio-group-item-heading",size:"label1"},e.label)))})))},I=function(e){var a=e.isActive,t=e.onChange,l=e.value,n=void 0===l?"":l,c=e.onInputChange,o=_().t;return A.createElement(b,{onClick:function(){return t("new")}},A.createElement("div",{className:"title"},A.createElement(C,{size:"p2",color:k.colors.gray800},o("chooseBaby.new")),A.createElement("div",{className:a?"radio active":"radio"})),A.createElement(S,{name:"name",value:n,size:"md",placeholder:o("chooseBaby.placeholder"),type:"text",onChange:c}))},T=function(){document.querySelectorAll('.hhg-modal[data-open="true"]').length<1&&document.body.classList.remove("hhc-modal-show")},q=function(){document.querySelectorAll('.hhg-modal[data-open="true"]').length<1&&(document.body.style.overflow="",document.body.style.paddingRight="",document.body.classList.remove("hhc-disabled-scroll"))},O=function(e){var a=e.type,t=void 0===a?"lead":a,l=e.closeIcon,n=e.isOpen,c=void 0===n||n,o=e.onClose,i=e.children,r=e.className,d=void 0===r?"":r,s=e.animationType,m=void 0===s?"slideTop":s,h=e.isStaticBackdrop,v=void 0!==h&&h;e.style;var u=B(!1),f=u[0],p=u[1],g=F(null),z=j().width;if(!g.current&&f&&(g.current=document.createElement("div")),V((function(){return p(!0),function(){p(!1),T(),q()}}),[]),V((function(){if(f){var e=((a=document.getElementById("hhg-modals"))||((a=document.createElement("div")).setAttribute("id","hhg-modals"),document.body.append(a)),a);return e.appendChild(g.current),function(){e.removeChild(g.current)}}var a}),[f]),V((function(){c?document.body.classList.add("hhc-modal-show"):T()}),[c]),V((function(){c?(document.body.style.overflow="hidden",document.body.style.paddingRight=z+"px",document.body.classList.add("hhc-disabled-scroll")):q()}),[c,z]),!f)return null;var E=["hhg-modal__wrapper",d,m].filter((function(e){return e})).join(" ");return N(A.createElement(R,{className:E,"data-open":c,"data-type":t},!v&&A.createElement(D,{"data-open":c,onClick:o,"data-type":t}),!v&&"video"===t&&!!l&&A.createElement("div",{className:"hhg-modal__close",onClick:o},l),A.createElement(L,{className:"hhg-modal","data-open":c},A.createElement("div",{className:"video"===t?"hhg-modal__video":"hhg-modal__content"},!!l&&"video"!==t&&A.createElement("div",{className:"hhg-modal__close",onClick:o},l),i))),g.current)};export{G as I,O as M,I as N,P as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t}from"./tslib.es6-5532bd7b.js";import a from"react";import{V as e}from"./index.styled-3d119631.js";var o=function(o){var n,i=o.as,d=o.tag,r=o.className,s=o.children,l=o.title,c=o.color,g=o.style,m=o.fontWeight,v=o.dataEventCategory,h=o.dataEventAction,f=o.dataEventLabel,b=i||d;return a.createElement(e,{title:l,style:t(t({},c?(n={},n["--custom-heading-color"]=c,n):void 0),g),"data-tag":d,"data-font-weight":m||void 0,"data-event-category":v,"data-event-action":h,"data-event-label":f,as:b,className:r,headingFontWeight:m,headingTag:d},s)};export{o as H};
|