"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9709],{UO6m:function(e,t,a){a.d(t,{a:function(){return abbreviateNumber}});let abbreviateNumber=e=>{let t=String(e);if(e>=1e3){let a;let r=["","k","m","b","t"],n=(""+e).length,o=Math.floor(n/3),i=6===n;if(i)a=Math.round(e/1e3);else for(let t=2;t>=1;t--){a=parseFloat((0!=o?e/Math.pow(1e3,o):e).toPrecision(t));let r=(a+"").replace(/[^a-zA-Z 0-9]+/g,"");if(r.length<=2)break}a&&a%1!=0?a=a.toFixed(1):i&&a&&a/1e3>=1&&(o+=1,a/=1e3),t=a+(6===n?r[o-1]:r[o])}return t}},SoOY:function(e,t,a){a.d(t,{TG:function(){return ep}});var r=a("q1tI"),n=a("Eso5"),o=a("aDCK"),i=a("C/sX"),l=a("nWfB"),s=a("7Ci/"),c=a("SPK5"),d=a("mYVa"),m=a("OAL+"),u=a("RZSM"),p=a("6HDN"),h=a("v7JE"),g=a("gC6A"),v=a("F/Hd"),b=a("G5av"),f=a("nCpW"),E=a("jaE6"),y=a("oKqh"),w=a("4h+C"),x=a("U80/"),k=a("Tabs"),C=a("rBCA"),M=a("fbRC"),S=a("thIk"),P=a("M2mm"),$=a("qZBo"),F=a("Bzx3"),B=a("Shco"),_=a("iHoF"),I=a("i8i4"),A=a("iBNF"),O=a("Aeci"),N=a("6wKP"),z=a("SZ3Q"),L=a("DzJC"),Z=a.n(L),D=a("izct"),T=a("9B3w"),j=a("25AQ"),U=a("yVya");a("xXM3"),a("Wgwc");var W=a("yNk5");let H=(0,r.createContext)({currentStep:0,setCurrentStep:()=>!1,setMaxStep:()=>!1,nextStep:()=>!1,prevStep:()=>!1,isMarryBaby:!1,siteType:"helloSites",sharedData:{},setSharedData:()=>!1}),[q,R,V]=(0,x.W)(),G=(0,C.Z)(n.x)`
.phone-input {
width: 100%;
margin-bottom: 32px;
${y.M.mbDown} {
margin-bottom: 16px;
}
.PhoneInput {
margin-bottom: 16px;
}
.PhoneInputCountry {
border-radius: 4px 0 0 4px;
}
.PhoneInputInput {
border-radius: 0 4px 4px 0;
}
}
`,DynamicForm=e=>{var{inputOrder:t=["phone"],withSimilac:a=!1,customTerms:n="",formContext:i}=e,l=(0,M._)(e,["inputOrder","withSimilac","customTerms","formContext"]);let{t:s}=(0,S.u)(),c=i||R(),d={phone:e=>{var{label:t,name:n="phone"}=e,i=(0,M._)(e,["label","name"]);return r.createElement(o.I.Wrapper,{className:a?"input-control":"phone-input",withAsterisk:!0,label:t||a?r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},t||s("onboarding.similac.input.phone")):void 0},r.createElement(p.P,Object.assign({defaultCountry:w.M[W.env.UNIFY_LOCALE]||"VN"},c.getInputProps(n),i)),r.createElement(o.I.Error,{size:"md"},c.errors.phone))},full_name:e=>{var{label:t,name:a="name"}=e,n=(0,M._)(e,["label","name"]);return r.createElement(p.I,Object.assign({label:r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},t||s("onboarding.formEmail.yourName")),withAsterisk:!0},c.getInputProps(a),n))},email:e=>{var{label:t,name:a="email"}=e,n=(0,M._)(e,["label","name"]);return r.createElement(p.I,Object.assign({label:r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},t||s("onboarding.formEmail.yourEmail")),withAsterisk:!0},c.getInputProps(a),n))},dob:e=>{var{label:t,name:a="dob"}=e,n=(0,M._)(e,["label","name"]);return r.createElement($.D,Object.assign({label:r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},t||s("onboarding.formEmail.yourBirthday")),placeholder:"DD/MM/YYYY"},c.getInputProps(a),n))},gender:e=>{var{label:t,name:a="gender"}=e,n=(0,M._)(e,["label","name"]);return r.createElement(p.R.Group,Object.assign({className:"radio-group",label:r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},t||s("tools.selectGender"))},c.getInputProps(a),n),r.createElement(p.R,{value:"0",label:s("onboarding.formEmail.genderMale")}),r.createElement(p.R,{value:"1",label:s("onboarding.formEmail.genderFemale")}))},otp:({name:e="otp"})=>r.createElement("div",{className:"otp-input"},r.createElement(p.O,Object.assign({enterKeyHint:void 0,nonce:void 0},c.getInputProps(e))),r.createElement(o.I.Error,null,c.errors.otp)),password:({label:e,name:t="password"})=>r.createElement(p.I.Password,Object.assign({label:r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},e||s("onboarding.updatePassword.password")),withAsterisk:!0,rightSection:r.createElement(B.V,null)},c.getInputProps(t))),confirm_password:({label:e,name:t="confirmPassword"})=>r.createElement(p.I.Password,Object.assign({label:r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},e||s("onboarding.updatePassword.confirmPassword")),withAsterisk:!0,rightSection:r.createElement(B.V,null)},c.getInputProps(t))),term:({name:e="term",className:t=""})=>n?r.createElement("div",{style:{marginBottom:16},className:t},r.createElement(p.d,Object.assign({label:r.createElement(v.T,{size:"p4",as:"span",sx:{a:{color:"#2d87f3",fontWeight:"bold",letterSpacing:0}}},n)},c.getInputProps(e,{type:"checkbox"}),{error:null})),r.createElement(o.I.Error,{size:"md"},c.getInputProps("term",{type:"checkbox"}).error)):null,address:e=>{var{label:t,className:a="",name:n="address"}=e,o=(0,M._)(e,["label","className","name"]);return r.createElement(F.A,Object.assign({className:`${a} input-control`,label:r.createElement(v.T,{size:"s4",weight:"semiBold",as:"span"},t||s("onboarding.similac.input.address"))},c.getInputProps(n),o))}},m=t.map(e=>{var t;let a="string"==typeof e?{inputType:e}:e;return null===(t=d[a.inputType])||void 0===t?void 0:t.call(d,a)});return r.createElement(G,Object.assign({},l),m)},frisoOnboardingSchema=e=>P.Ry().shape({phone:P.Z_().required(e("onboarding.updatePhone.error")).default(""),name:P.Z_().required(e("onboarding.errorMessage.requiredName")),email:P.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:P.nK().required(e("onboarding.similac.address.error")),term:P.Xg().oneOf([!0],e("validation.error.requiredField"))});var Y=(0,r.forwardRef)((e,t)=>{var{inputOrder:a,onSubmit:o,validateSchema:i,defaultValues:l,isActive:s,customTerms:c,customFormTexts:d}=e,m=(0,M._)(e,["inputOrder","onSubmit","validateSchema","defaultValues","isActive","customTerms","customFormTexts"]);let{nextStep:u,setSharedData:p,sharedData:h}=(0,r.useContext)(H),{t:g}=(0,S.u)(),b=V({initialValues:{term:!1,phone:(null==h?void 0:h.phone)||(null==l?void 0:l.phone)||"",email:(null==h?void 0:h.email)||(null==l?void 0:l.email)||"",name:(null==h?void 0:h.name)||(null==l?void 0:l.name)||""},validate:i||(0,k.X)(frisoOnboardingSchema(g))}),onSubmit=e=>(0,M.a)(void 0,void 0,void 0,function*(){try{yield null==o?void 0:o(e),p(t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name})),u()}catch(e){console.error(e)}}),onError=e=>{console.log(e)},handleSubmitForm=()=>{var e;return null===(e=b.onSubmit(onSubmit,onError))||void 0===e?void 0:e()};return(0,r.useImperativeHandle)(t,()=>({submitForm:handleSubmitForm})),r.createElement(n.x,Object.assign({"data-active":s},m),r.createElement(n.x,{sx:e=>({display:"flex",flexDirection:"column",gap:"16px",[e.fn.largerThan("md")]:{gap:"24px"}})},r.createElement(n.x,{sx:{textAlign:"center"}},r.createElement(_.H,{tag:"h4",as:"h2"},null==d?void 0:d.heading),r.createElement(v.T,{size:"p3"},null==d?void 0:d.description)),r.createElement(q,{form:b},r.createElement("form",{className:"friso-form",style:{width:"100%"},onSubmit:b.onSubmit(onSubmit,onError)},r.createElement(n.x,{sx:{".friso-form":{display:"flex",flexWrap:"wrap",gap:"8px",".input-control":{width:"100%",marginBottom:0},".phone-input":{marginBottom:"0 !important",".PhoneInput":{marginBottom:"0 !important"}}}}},r.createElement(DynamicForm,{inputOrder:a,customTerms:c,className:"friso-form"}))))))});let X=C.Z.div`
position: fixed;
inset: 0;
z-index: 1000;
background: white;
overflow-y: auto;
`,K=C.Z.div`
height: 100%;
${y.M.lgPcUp} {
display: table;
width: 100%;
height: calc(100% - 25px);
}
`,J=C.Z.div`
padding: 16px;
${y.M.mbUp} {
padding: 48px 24px 24px;
}
&[data-similac='true'][data-has-banner='true'] {
${y.M.mbDown} {
background: white;
border-top-left-radius: 1rem;
border-top-right-radius: 1rem;
margin-top: -1rem;
}
}
`,Q=C.Z.div`
width: 640px;
padding: 16px 16px 0 16px;
display: none;
${y.M.mbUp} {
width: 640px;
display: table-cell;
}
`,ee=C.Z.div`
background-color: ${A.r.colors.primary50};
border-radius: 12px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
&[data-is-marry-baby='true'] {
background-color: ${A.r.mbColors.tonePink};
}
`,et=C.Z.div`
margin-top: 40px;
padding: 24px 40px;
`,ea=C.Z.div`
width: 100%;
display: block;
img {
width: 100%;
height: auto;
}
&.similac {
min-width: 1px;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
${y.M.mbUp} {
position: sticky;
top: 0;
height: 100vh;
}
}
`,er=C.Z.div`
margin-top: 70px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
&.similac {
margin-top: 16px;
}
`,en=(0,C.Z)(s.W)`
&.hhg-comp-onboarding-container.hhg-comp-onboarding-container {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
width: 100%;
max-width: 520px;
}
.header {
margin-bottom: 32px;
text-align: center;
${y.M.mbDown} {
margin-bottom: 16px;
}
}
.input-control {
width: 100%;
}
.radio-group,
.input-control {
margin-bottom: 16px;
}
.form {
width: 100%;
}
/* .form-error {
margin-top: 32px;
font-size: 14px;
}
.field-error {
margin-top: 10px;
font-size: 14px;
} */
.form-button {
width: 100%;
}
`,eo=C.Z.img`
margin-bottom: 38px;
`,Onboarding$1=e=>{var t,{heading:a,description:n,children:o,className:i,imgSrc:s,hiddenLogo:c=!1}=e,d=(0,M._)(e,["heading","description","children","className","imgSrc","hiddenLogo"]);let{isMarryBaby:m,siteType:u}=(0,r.useContext)(H);return r.createElement(en,Object.assign({},d,{className:`hhg-comp-onboarding-container ${i}`,size:"sm"}),!c&&r.createElement(N.L,{type:m?u:(null===(t=h.L[W.env.UNIFY_LOCALE])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi"}),r.createElement(er,{className:c?"similac":""},s&&r.createElement(eo,{src:s,loading:"lazy"}),(a||n)&&r.createElement("div",{className:"header"},a&&r.createElement(l.D,{order:3},a),n&&r.createElement(v.T,{size:"p3",mt:8,color:A.r.colors.gray600},n)),o))},ei=(0,C.Z)(Onboarding$1)`
.phone-input {
width: 100%;
margin-bottom: 32px;
${y.M.mbDown} {
margin-bottom: 16px;
}
.PhoneInput {
margin-bottom: 16px;
}
.PhoneInputCountry {
border-radius: 4px 0 0 4px;
}
.PhoneInputInput {
border-radius: 0 4px 4px 0;
}
}
&:not([data-active='true']) {
display: none !important;
}
`,onboardingSchema=e=>P.Ry().shape({phone:P.Z_().required(e("onboarding.updatePhone.error")).default("")}),el=(0,C.Z)(Onboarding$1)`
.otp-input {
margin-bottom: 36px;
${y.M.mbDown} {
margin-bottom: 20px;
}
.otpContainer {
margin-bottom: 16px;
}
}
.resend {
display: flex;
gap: 6px;
margin-bottom: 32px;
${y.M.mbDown} {
margin-bottom: 16px;
}
a {
text-decoration: underline;
cursor: pointer;
}
}
.phone-description {
margin-left: 2px;
margin-top: 2px;
}
.otp-description-edit-icon {
cursor: pointer;
vertical-align: bottom;
/* height: 100%; */
margin-bottom: 3px;
margin-left: 3px;
}
`,otpSchema=e=>P.Ry().shape({otp:P.Z_().required(e("onboarding.otpForm.error")).length(6,e("onboarding.otpForm.error")).default("")}),onboardingEmailSchema=e=>P.Ry().shape({email:P.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),name:P.Z_().required(e("onboarding.errorMessage.requiredName"))}),es=C.Z.div`
margin-top: 70px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
&.similac {
margin-top: 16px;
}
`,ec=(0,C.Z)(s.W)`
&.hhg-comp-onboarding-container.hhg-comp-onboarding-container {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
width: 100%;
max-width: 520px;
}
.header {
margin-bottom: 32px;
text-align: center;
${y.M.mbDown} {
margin-bottom: 16px;
}
}
.input-control {
width: 100%;
}
.radio-group,
.input-control {
margin-bottom: 16px;
}
.form {
width: 100%;
}
/* .form-error {
margin-top: 32px;
font-size: 14px;
}
.field-error {
margin-top: 10px;
font-size: 14px;
} */
.form-button {
width: 100%;
}
`,ed=C.Z.img`
margin-bottom: 38px;
`,OnboardingUI=e=>{var t,{heading:a,description:n,children:o,className:i,imgSrc:s,hiddenLogo:c=!1}=e,d=(0,M._)(e,["heading","description","children","className","imgSrc","hiddenLogo"]);let{isMarryBaby:m,siteType:u}=(0,r.useContext)(H);return r.createElement(ec,Object.assign({},d,{className:`hhg-comp-onboarding-container ${i}`,size:"sm"}),!c&&r.createElement(N.L,{type:m?u:(null===(t=h.L[W.env.UNIFY_LOCALE])||void 0===t?void 0:t.LOGO_TYPE)||"hellobacsi"}),r.createElement(es,{className:c?"similac":""},s&&r.createElement(ed,{src:s,loading:"lazy"}),r.createElement("div",{className:"header"},r.createElement(l.D,{order:3},a),r.createElement(v.T,{size:"p3",mt:8,color:A.r.colors.gray600},n)),o))},em=(0,C.Z)(Onboarding$1)`
.phone-input {
width: 100%;
margin-bottom: 32px;
${y.M.mbDown} {
margin-bottom: 16px;
}
.PhoneInput {
margin-bottom: 16px;
}
.PhoneInputCountry {
border-radius: 4px 0 0 4px;
}
.PhoneInputInput {
border-radius: 0 4px 4px 0;
}
}
&:not([data-active='true']) {
display: none !important;
}
`,similacOnboardingSchema=(e,t)=>P.Ry().shape({phone:P.Z_().required(e("onboarding.updatePhone.error")).default(""),name:P.Z_().required(e("onboarding.errorMessage.requiredName")),email:P.Z_().required(e("onboarding.errorMessage.requiredEmail")).email(e("onboarding.errorMessage.invalidEmail")).default(""),address:P.nK().required(e("onboarding.similac.address.error")),term:t?P.Xg():P.Xg().oneOf([!0],e("validation.error.requiredField"))}),eu=(0,C.Z)(Onboarding$1)`
.phone-input {
width: 100%;
margin-bottom: 32px;
${y.M.mbDown} {
margin-bottom: 16px;
}
.PhoneInput {
margin-bottom: 16px;
}
.PhoneInputCountry {
border-radius: 4px 0 0 4px;
}
.PhoneInputInput {
border-radius: 0 4px 4px 0;
}
}
&:not([data-active='true']) {
display: none !important;
}
`,onboardingUpdatePasswordSchema=e=>P.Ry().shape({password:P.Z_().required(e("onboarding.errorMessage.requiredPassword")).min(8,e("onboarding.errorMessage.minLength",{length:8})).matches(/.*[A-Z].*/,e("onboarding.errorMessage.passWithPattern")).default(""),confirmPassword:P.Z_().required(e("onboarding.errorMessage.requiredConfirmPassword")).oneOf([P.iH("password"),null],e("onboarding.errorMessage.passNotMatch")).default("")}),ep={Provider:({children:e,siteType:t,setSharedData:a})=>{let[n,o]=(0,r.useState)(0),[i,l]=(0,r.useState)(0),[s,c]=(0,r.useState)({});return(0,r.useEffect)(()=>{null==a||a(s)},[s,a]),r.createElement(H.Provider,{value:{currentStep:n,setCurrentStep:o,setMaxStep:l,nextStep:()=>n+1<=i&&o(n+1),prevStep:()=>n-1>=0&&o(n-1),siteType:t,isMarryBaby:"marryBaby"===t,sharedData:s,setSharedData:c}},e)},Modal:e=>{var{children:t,withSimilac:a,banner:n,withPortal:o}=e,s=(0,M._)(e,["children","withSimilac","banner","withPortal"]);let{isMobile:c}=(0,O.u)(),{isMarryBaby:d}=(0,r.useContext)(H),{t:m}=(0,S.u)();if(o&&"undefined"==typeof window)return null;let u=r.createElement(X,Object.assign({},s),r.createElement(K,null,r.createElement(i.r,{sx:{[y.M.mbDown]:{margin:0},".mantine-Grid-col":{[y.M.mbDown]:{padding:0}}}},r.createElement(i.r.Col,{span:("object"==typeof n||a)&&!c?6:12,order:a?2:1,orderMd:a?1:2,sx:{zIndex:a?99:void 0}},r.createElement(J,{"data-similac":a,"data-has-banner":"object"==typeof n},t)),n&&"object"==typeof n&&!a&&r.createElement(i.r.Col,{span:c?12:6,order:1,orderMd:2},r.createElement(Q,null,r.createElement(ee,{"data-is-marry-baby":d},r.createElement(et,null,n.heading&&r.createElement(l.D,{order:1,mb:24},n.heading),n.description&&r.createElement(v.T,{size:"p1",color:A.r.colors.gray800},m("onboarding.welcomeScreen.content"))),r.createElement(ea,null,n.imgSrc?r.createElement("img",{src:n.imgSrc,loading:"lazy"}):n.imgComponent?n.imgComponent:null)))),n&&"object"==typeof n&&a&&(n.imgSrc||n.imgComponent)&&r.createElement(i.r.Col,{span:"auto",order:1,orderMd:2},r.createElement(ea,{className:"similac"},n.imgSrc?r.createElement("img",{src:n.imgSrc,loading:"lazy"}):n.imgComponent?n.imgComponent:null)))));return o?(0,I.createPortal)(u,(0,y.a)()):u},Form:({onClose:e,onSubmit:t,canSkip:a=!0,customFormTexts:n,isActive:o,submitProps:i,submitLabel:l,skipProps:s,isWhatsApp:c})=>{let{t:d}=(0,S.u)(),{sharedData:m,setSharedData:u,nextStep:p}=(0,r.useContext)(H),h=V({initialValues:{phone:(null==m?void 0:m.phone)||""},validate:(0,k.X)(onboardingSchema(d))});return r.createElement(ei,{heading:(null==n?void 0:n.heading)||d("onboarding.updatePhone.heading"),description:(null==n?void 0:n.description)||d(c?"onboarding.updateWhatsapp.description":"onboarding.updatePhone.description"),"data-active":o},r.createElement(q,{form:h},r.createElement("form",{onSubmit:h.onSubmit(e=>(0,M.a)(void 0,void 0,void 0,function*(){try{u(t=>Object.assign(Object.assign({},t),{phone:e.phone}));let a=yield null==t?void 0:t(e.phone);a||p()}catch(e){console.error(e)}}),e=>{console.log(e)})},r.createElement(DynamicForm,{inputOrder:["phone"]}),r.createElement(b.B,Object.assign({variant:"primary",fullWidth:!0,size:"lg"},c&&{leftIcon:r.createElement(z.I.WhatsApp,{size:18,useCurrentColor:!0})},i,{type:"submit","data-event-category":c?"OTP":"Sign Up","data-event-action":c?"Whatsapp - Fill phone and continue Click":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"}),l||d(c?"onboarding.updateWhatsapp.submitLabel":"onboarding.button.continue")),a&&r.createElement(b.B,Object.assign({variant:"ghost",fullWidth:!0,size:"lg"},c&&{dataEventCategory:"OTP",dataEventAction:"Whatsapp - Skip fill phone Click",dataEventLabel:"undefined"!=typeof window?window.location.href:""},s,{onClick:e,type:"button"}),d("onboarding.button.skip")))))},OtpForm:{Email:({onSubmit:e,email:t,onResendCode:a,otpError:n,onClose:o,loading:i,canSkip:l})=>{let{sharedData:{email:s,retryEmailCount:c},setSharedData:d,prevStep:m,siteType:u,isMarryBaby:p,nextStep:h}=(0,r.useContext)(H),g=t||s||"",[v,b]=(0,r.useState)(30),y=(0,f.Y)(()=>b(e=>e-1),1e3),[x,C]=(0,E.C)(0,{min:0,max:3}),P=(0,r.useRef)(!0),{t:$}=(0,S.u)();(0,r.useEffect)(()=>(y.start(),y.stop),[]),(0,r.useEffect)(()=>{0===v&&(y.stop(),P.current=!1)},[v]);let F=V({initialValues:{otp:""},validate:(0,k.X)(otpSchema($))});(0,r.useEffect)(()=>{n&&F.setFieldError("otp",n)},[n]);let B=(0,r.useMemo)(()=>Z()(()=>{P.current||(C.increment(),b(30),null==a||a(g),y.start(),P.current=!0)},1e3,{trailing:!1}),[g,a,y]);return r.createElement(el,{heading:$("onboarding.otpForm.heading"),description:r.createElement(r.Fragment,null,r.createElement("span",{dangerouslySetInnerHTML:{__html:$("onboarding.otpForm.descriptionEmail",{email:`${(0,w.h)(g)}`})}}),!(c>=2)&&r.createElement("svg",{onClick:()=>{c>=2||(d(e=>Object.assign(Object.assign({},e),{retryEmailCount:e.retryEmailCount+1})),m())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},r.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},r.createElement(q,{form:F},r.createElement("form",{onSubmit:F.onSubmit(t=>(0,M.a)(void 0,void 0,void 0,function*(){try{C.increment();let a=yield null==e?void 0:e(t.otp);a||h()}catch(e){console.error(e)}}),e=>{console.log(e)})},r.createElement(DynamicForm,{inputOrder:["otp"]}),r.createElement("div",{className:"resend"},r.createElement(D.T,{size:"p4",color:A.r.colors.gray400},$("onboarding.otpForm.notReceiveOTP")),r.createElement(D.T,{as:"a",size:"p4",color:p?A.r.mbColors.pink:A.r.colors.primaryBase,onClick:B},0===v?$("onboarding.otpForm.resendCode"):$("onboarding.otpForm.resendCodeWithSeconds",{seconds:v}))),r.createElement(T.B,{theme:u,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i,"data-event-category":"Sign Up","data-event-action":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},$("onboarding.button.continue")),l&&x>=3&&r.createElement(T.B,{theme:u,color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},$("onboarding.button.skip")))))},Phone:({onSubmit:e,phone:t,onResendCode:a,otpError:n,onClose:o,loading:i,canSkip:l,isWhatsApp:s})=>{let{sharedData:{phone:m,retryPhoneCount:u},setSharedData:p,prevStep:h,siteType:b,isMarryBaby:y,nextStep:w}=(0,r.useContext)(H),x=t||m||"",[C,P]=(0,r.useState)(30),$=(0,f.Y)(()=>P(e=>e-1),1e3),[F,B]=(0,E.C)(0,{min:0,max:3}),_=(0,r.useRef)(!0),{t:I}=(0,S.u)();(0,r.useEffect)(()=>($.start(),$.stop),[]),(0,r.useEffect)(()=>{0===C&&($.stop(),_.current=!1)},[C]);let O=V({initialValues:{otp:""},validate:(0,k.X)(otpSchema(I))});(0,r.useEffect)(()=>{n&&O.setFieldError("otp",n)},[n]);let N=(0,r.useMemo)(()=>Z()(()=>{_.current||(B.increment(),P(30),null==a||a(x),$.start(),_.current=!0)},1e3,{trailing:!1}),[x,a,$]),z=`${x.slice(0,-3).replace(/./g,"x").concat(x.slice(-3))}`;return r.createElement(el,{heading:s?r.createElement(c.k,{align:"center",justify:"center",gap:(0,d.h)(8)},r.createElement("img",{style:{width:(0,d.h)(24)},loading:"lazy",src:g.C.getAssetPath("whatsapp.svg"),alt:"whatsapp"}),r.createElement("span",null,I("onboarding.otpWhatsapps.heading"))):I("onboarding.otpForm.heading"),description:r.createElement(r.Fragment,null,r.createElement("span",{dangerouslySetInnerHTML:{__html:I(s?"onboarding.otpWhatsapps.description":"onboarding.otpForm.description",{phone:z})}}),!(u>=2)&&r.createElement("svg",{onClick:()=>{u>=2||(p(e=>Object.assign(Object.assign({},e),{retryPhoneCount:e.retryPhoneCount+1})),h())},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:"otp-description-edit-icon"},r.createElement("path",{d:"M12.7812 1.33337C12.2987 1.33337 11.8162 1.51712 11.4479 1.88546L10.6667 2.66671L13.3333 5.33337L14.1146 4.55212C14.8506 3.81612 14.8506 2.62212 14.1146 1.88546C13.7463 1.51712 13.2638 1.33337 12.7812 1.33337ZM9.66667 3.66671L2 11.3334V14H4.66667L12.3333 6.33337L9.66667 3.66671Z",fill:"#ADB3BC"})))},r.createElement(q,{form:O},r.createElement("form",{onSubmit:O.onSubmit(t=>(0,M.a)(void 0,void 0,void 0,function*(){try{B.increment();let a=yield null==e?void 0:e(t.otp);a||w()}catch(e){console.error(e)}}),e=>{console.log(e)})},r.createElement(DynamicForm,{inputOrder:["otp"]}),r.createElement("div",{className:"resend"},r.createElement(v.T,{size:"p4",color:A.r.colors.gray400},I("onboarding.otpForm.notReceiveOTP")),r.createElement(v.T,{as:"a",size:"p4",color:y?A.r.mbColors.pink:A.r.colors.primaryBase,onClick:N},0===C?I("onboarding.otpForm.resendCode"):I("onboarding.otpForm.resendCodeWithSeconds",{seconds:C}))),r.createElement(T.B,{theme:b,color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i,"data-event-category":s?"OTP":"Sign Up","data-event-action":s?"Whatsapp - OTP verified Click":"Confirm Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},I("onboarding.button.continue")),l&&F>=3&&r.createElement(T.B,{theme:b,color:"ghost",isBlock:!0,size:"lg",onClick:o,type:"button"},I("onboarding.button.skip")))))}},PersonalInfoForm:({onClose:e,onSubmit:t,canSkip:a,loading:n,errorMessage:o,initialData:i})=>{let{t:l,locale:s}=(0,S.u)(),{siteType:c,isMarryBaby:d,setSharedData:m,nextStep:u}=(0,r.useContext)(H),p=V({validate:(0,k.X)(onboardingEmailSchema(l))});return(0,r.useEffect)(()=>{p.setValues(Object.assign(Object.assign({gender:"0"},i),(null==i?void 0:i.birthday)&&{birthday:new Date(i.birthday)}))},[i]),(0,r.useEffect)(()=>{o&&p.setFieldError("email",o)},[o]),r.createElement(OnboardingUI,{heading:l("onboarding.formEmail.heading"),description:l("onboarding.formEmail.description",{site:d?"Marry Baby":h.L[s].SITE_NAME_FORMATTED})},r.createElement(q,{form:p},r.createElement("form",{className:"form",onSubmit:p.onSubmit(e=>(0,M.a)(void 0,void 0,void 0,function*(){m(t=>Object.assign(Object.assign({},t),e));let a=yield null==t?void 0:t(Object.assign(Object.assign({},e),{birthday:e.birthday&&(0,j.Z)(e.birthday,"yyyy-MM-dd")}));a||u()}),e=>{console.log({fieldErrors:e})})},r.createElement(DynamicForm,{inputOrder:["full_name","email","dob","gender"]}),r.createElement(T.B,{color:"primary",isBlock:!0,size:"lg",type:"submit",theme:c,isLoading:n,disabled:n},l("onboarding.button.continue")),a&&r.createElement(T.B,{theme:c,color:"ghost",isBlock:!0,size:"lg",onClick:e,type:"button"},l("onboarding.button.skip")))))},ResultScreen:e=>{var{onClose:t}=e,a=(0,M._)(e,["onClose"]);let{t:n}=(0,S.u)(),{siteType:o}=(0,r.useContext)(H);return r.createElement(OnboardingUI,Object.assign({},a),r.createElement(T.B,{theme:o,size:"lg",onClick:t,className:"form-button"},n("onboarding.button.continue")))},SimilacForm:e=>{var{onClose:t,onSubmit:a,canSkip:n=!0,customFormTexts:o,customTerms:i,defaultValues:l,isActive:s}=e,c=(0,M._)(e,["onClose","onSubmit","canSkip","customFormTexts","customTerms","defaultValues","isActive"]);let{t:d}=(0,S.u)(),{nextStep:m,setSharedData:u,sharedData:p}=(0,r.useContext)(H),{isMobile:h}=(0,O.u)(),g=V({initialValues:{term:!1,phone:(null==p?void 0:p.phone)||(null==l?void 0:l.phone)||"",email:(null==p?void 0:p.email)||(null==l?void 0:l.email)||"",name:(null==p?void 0:p.name)||(null==l?void 0:l.name)||""},validate:(0,k.X)(similacOnboardingSchema(d,!i))}),v=(null==l?void 0:l.email)?["full_name","phone","address","term"]:["full_name","email","phone","address","term"];return r.createElement(em,Object.assign({heading:(null==o?void 0:o.heading)||d("onboarding.updatePhone.heading"),description:(null==o?void 0:o.description)||d("onboarding.updatePhone.description"),hiddenLogo:h,"data-active":s},c),r.createElement(q,{form:g},r.createElement("form",{style:{width:"100%"},onSubmit:g.onSubmit(e=>(0,M.a)(void 0,void 0,void 0,function*(){try{yield null==a?void 0:a(e),u(t=>Object.assign(Object.assign({},t),{phone:e.phone,email:e.email,name:e.name})),m()}catch(e){console.error(e)}}),e=>{console.log(e)})},r.createElement(DynamicForm,{inputOrder:v,withSimilac:!0,customTerms:i}),r.createElement(b.B,{fullWidth:!0,size:"lg",type:"submit","data-event-category":"Sign Up","data-event-action":"Update Phone Number","data-event-label":"undefined"!=typeof window?window.location.href:"",className:"pointer-event-child-none"},d("onboarding.button.continue")),n&&r.createElement(b.B,{variant:"ghost",fullWidth:!0,size:"lg",onClick:t,type:"button"},d("onboarding.button.skip")))))},FrisoForm:Y,UpdatePasswordForm:({onClose:e,onSubmit:t,canSkip:a,errorMessage:n,loading:i})=>{let{t:l}=(0,S.u)(),{nextStep:s}=(0,r.useContext)(H),c=V({initialValues:{password:"",confirmPassword:""},validate:(0,k.X)(onboardingUpdatePasswordSchema(l))});return r.createElement(OnboardingUI,{heading:l("onboarding.updatePassword.heading"),description:l("onboarding.updatePassword.description")},r.createElement(q,{form:c},r.createElement("form",{className:"form",onSubmit:c.onSubmit(e=>(0,M.a)(void 0,void 0,void 0,function*(){yield t((null==e?void 0:e.password)||""),n||s()}),e=>{console.log({fieldErrors:e})})},r.createElement(DynamicForm,{inputOrder:["password","confirm_password"]}),r.createElement(T.B,{color:"primary",isBlock:!0,size:"lg",type:"submit",isLoading:i,disabled:i},l("onboarding.button.continue")),a&&r.createElement(T.B,{color:"ghost",isBlock:!0,size:"lg",onClick:e},l("onboarding.button.skip")),n&&r.createElement(o.I.Error,{className:"form-error"},n))))},StepRenderer:({children:e,onStepChange:t})=>{let{currentStep:a,setMaxStep:n}=(0,r.useContext)(H),o=r.Children.count(e);return(0,r.useEffect)(()=>{null==t||t(a)},[a]),(0,r.useEffect)(()=>{n(o-1)},[o]),r.createElement(r.Fragment,null,(0,U.Z)(e).map((e,t)=>{let n=t===a;return r.createElement(r.Fragment,{key:t},r.isValidElement(e)?e.props.alwaysRender||n?r.cloneElement(e,{isActive:t===a,stepIndex:t}):null:n?e:null)}))},ThankYou:e=>{var{onClose:t,thanksPageInfo:a,isActive:n}=e,o=(0,M._)(e,["onClose","thanksPageInfo","isActive"]);let{t:i}=(0,S.u)(),{isMobile:l}=(0,O.u)();return r.createElement(eu,Object.assign({heading:"",description:"",hiddenLogo:l,"data-active":n},o),r.createElement(s.W,{fluid:!0},r.createElement(m.K,{align:"center",spacing:8,w:"100%",ta:"center"},r.createElement(u.o,{ratio:1,w:{base:120,md:160}},r.createElement("svg",{width:"160",height:"160",viewBox:"0 0 160 160",fill:"none"},r.createElement("mask",{id:"mask0_4580_96805",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"160",height:"160"},r.createElement("circle",{cx:"80",cy:"80",r:"80",fill:"url(#paint0_radial_4580_96805)"})),r.createElement("g",{mask:"url(#mask0_4580_96805)",fill:"#E0F8EE"},r.createElement("path",{d:"m71.594.46 5.382 37.677c.035 0 .106 0 .141-.035l5.242 36.901 5.207-36.936h.07l5.207-37.043A81 81 0 0 0 80.002 0c-2.85 0-5.664.141-8.408.46m59.556 18.08a79.7 79.7 0 0 0-17.977-11.336L97.87 41.068c.035 0 .07.036.07.036L82.46 75.286z"}),r.createElement("path",{d:"M46.439 64.833 82.11 75.321h-.14l.352.106h.035l.035-.035.035.035h-.035l.035.035h.035l.14.071-.105-.07 35.849 10.523c0 .035 0 .035-.035.07l39.789 11.76a81.6 81.6 0 0 0 1.9-17.48c0-1.66-.071-3.355-.141-4.98h-40.035v.071l-37.362.035v-.035l.176-.035-.14.07.316-.106h-.176l72.858-21.717a81 81 0 0 0-9.885-19.35L82.639 75.285h-.14l.07-.07-.106.07.035-.212-.07.141v.036l-.035.035v-.035h-.07v-.036l-.07-.141.034.177-.07-.036.035.036h-.14l-66.35-42.834A80.5 80.5 0 0 0 4.854 52.615zm35.884 10.559v.035l-.106-.07z"}),r.createElement("path",{d:"M57.803 46.93 82.29 75.25 66.774 41.105 50.556 5.614c-6.895 2.72-13.298 6.392-19.103 10.842zm56.074 48.872L82.531 75.568l24.451 28.286c-.036 0-.036.035-.071.035l29.094 33.758a81.7 81.7 0 0 0 14.037-18.468zM82.32 75.427v.036h.036zh.036z"}),r.createElement("path",{d:"m82.286 75.462.035-.035h-.035l-.142.07zm-.07.106L50.941 95.944c-.035-.036-.035-.071-.07-.106L11.328 121.51c4.151 6.991 9.358 13.277 15.374 18.68l35.884-41.74zM46.438 86.056l35.849-10.664-82.146.106A72 72 0 0 0 0 80.3c0 6.498.774 12.818 2.216 18.892zq0 .052 0 0M82.25 75.71 47 153.467c7.282 3.319 15.127 5.544 23.395 6.533zm.21 0 11.892 83.619a78.2 78.2 0 0 0 22.586-7.769zm-.14-.142.036.283.07-.283-.07-.07z"})),r.createElement("path",{d:"m124.694 61.2.292.973c.097.486.486.778.973.972l.972.292-.972.39c-.39.096-.779.485-.876.874l-.389 1.07-.389-1.07a1.9 1.9 0 0 0-.875-.875l-.973-.292.973-.291c.389-.098.681-.487.875-.876z",fill:"#2D87F3"}),r.createElement("path",{d:"m104.744 34.286.171.571c.058.286.286.457.572.572l.571.17-.571.23a.77.77 0 0 0-.514.514l-.229.628-.229-.628a1.1 1.1 0 0 0-.514-.515l-.571-.17.571-.172c.229-.057.4-.286.514-.515z",fill:"#00B16A"}),r.createElement("path",{d:"m118.345 38 .743 2.4c.343 1.086 1.2 1.943 2.229 2.229l2.4.742-2.458.858c-1.028.342-1.771 1.142-2.114 2.114l-.857 2.457-.971-2.571c-.343-.972-1.143-1.715-2.115-2.058l-2.343-.8 2.286-.8c.972-.342 1.714-1.085 2.114-2z",fill:"#FFB521"}),r.createElement("path",{d:"m41.885 98.857.171.572c.057.285.286.457.572.571l.57.171-.57.229a.77.77 0 0 0-.515.514l-.228.629-.229-.629a1.12 1.12 0 0 0-.514-.514l-.572-.171.572-.172c.228-.057.4-.285.514-.514z",fill:"#00B16A"}),r.createElement("path",{d:"m64.572 125.314.742 2.4c.343 1.086 1.2 1.943 2.23 2.229l2.4.743-2.458.857c-1.029.343-1.772 1.143-2.114 2.114l-.858 2.457-.97-2.571c-.344-.972-1.144-1.715-2.115-2.057l-2.343-.8 2.286-.8c.971-.343 1.714-1.086 2.114-2z",fill:"#FFB521"}),r.createElement("path",{d:"m80.97 120.343.287.971c.114.457.514.8.914.914l1.028.286-1.028.343c-.4.114-.743.457-.857.857l-.343 1.029-.4-1.086c-.172-.4-.457-.743-.857-.857l-.972-.343.972-.343c.4-.114.685-.457.857-.8z",fill:"#2D87F3"}),r.createElement("path",{d:"m130.307 98.286.222.757c.09.356.401.623.713.712l.801.223-.801.267a1 1 0 0 0-.668.668l-.267.801-.312-.846c-.133-.311-.356-.579-.668-.668l-.757-.267.757-.267c.312-.09.535-.356.668-.623z",fill:"#00B16A"}),r.createElement("path",{d:"m36.592 64 .223.757c.089.356.4.623.712.712l.802.223-.802.267a1 1 0 0 0-.668.668l-.267.802-.312-.846c-.133-.312-.356-.58-.668-.668l-.757-.268.757-.267c.312-.089.535-.356.668-.623z",fill:"#FFB521"}),r.createElement("path",{d:"m67.382 26.857.291.973c.098.486.487.778.973.973l.973.291-.973.39c-.389.097-.778.486-.875.875l-.39 1.07-.388-1.07a1.9 1.9 0 0 0-.876-.876l-.973-.291.973-.292c.39-.098.681-.487.876-.876z",fill:"#2D87F3"}),r.createElement("path",{d:"M80.001 108.572c15.78 0 28.572-12.792 28.572-28.572S95.781 51.43 80.001 51.43 51.43 64.22 51.43 80 64.222 108.572 80 108.572",fill:"#00B16A"}),r.createElement("path",{d:"M78.58 89.145a9.28 9.28 0 0 1-6.576-2.717l-3.365-3.366a2.444 2.444 0 0 1 3.455-3.455l3.365 3.367a4.377 4.377 0 0 0 6.189 0l21.336-19.283a2.445 2.445 0 0 1 3.408.213 2.44 2.44 0 0 1-.134 3.412L85.005 86.514a9.05 9.05 0 0 1-6.424 2.632",fill:"#fff"}),r.createElement("defs",null,r.createElement("radialGradient",{id:"paint0_radial_4580_96805",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(90 0 80)scale(80)"},r.createElement("stop",null),r.createElement("stop",{offset:"1"}))))),r.createElement(_.H,{tag:"h3"},null==a?void 0:a.title),r.createElement(v.T,{size:"p3",color:"gray.6"},null==a?void 0:a.description),r.createElement(b.B,{mt:{base:16,md:24},fullWidth:l,size:"lg",onClick:t},i("similac.thankYou.done")))))}}},Hcbr:function(e,t,a){a.d(t,{P:function(){return r}});let r={GET_CITIES_LIST:"api/lists/cities?keyword={keyword}&country_id={countryId}&site={domain}&_nopaging={noPaging}&client={client}&hospital_active={hospitalActive}",GET_CITY:"api/lists/cities?ids={ids}&site={domain}&longitude={longitude}&latitude={latitude}",GET_HOME_SEARCH:"api/search/?_home=1&city_id={city}&keyword={keyword}&site={domain}&latitude={lat}&longitude={lng}",GET_SEARCH_V2:"api/v2/search/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}&specialty_id={specialty_id}&client_slug={client_slug}&msd={msd}&skip_booking={skipBooking}",GET_CITY_BY_IP:"api/geobyip?site={domain}&latitude={lat}&longitude={lng}&_nopaging={noPaging}&client={client}&hospital_active={hospitalActive}",GET_DOCTOR_DETAIL:"api/doctors/{id}?site={site}",GET_HOSPITAL_DETAIL:"api/hospital/branch/{id}?site={site}",GET_SERVICE_DETAIL:"api/hospital/service/{id}?site={site}",GET_SEARCH_SPECIALTY:"api/v2/specialties/?site={domain}&type={searchType}&keyword={keyword}&city_id={city}&latitude={lat}&longitude={lng}&msd={msd}",GET_SEARCH_POPULAR_KEY:"api/search/keywords?site={domain}&sort_by={sort_by}&sort_order={sort_order}&type={searchType}"}},VeM9:function(e,t,a){a.d(t,{A:function(){return c},L:function(){return s},a:function(){return removeEdittedBannedWord},b:function(){return decodePostUrl},c:function(){return reformatUrl},d:function(){return decodeMention},e:function(){return escapeRegExp},f:function(){return fixMalformedMention},g:function(){return getUrlsFromEditorString},h:function(){return highlightBadWords},i:function(){return getMentionIdsFromString},j:function(){return removeBannedWordWrapper},k:function(){return encodePostContent},r:function(){return removeFontFormat},u:function(){return uploadAndGetSrc},w:function(){return wrapAnchorAroundUrls},y:function(){return youtubeVidIdGetter}});var r=a("fbRC"),n=a("IQVP"),o=a("cMvO");let i={edit:/]*)data-url="true"[^<>]*>(.*?)<\/mocka>/gim,url:/((?:=")|(?:data-url="true">)|)(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gim,encodedUrl:/\[a\+href="/([^<"]+)"(?:\+text=\"([^<"]+)")?\]/gim,editorMention:/]*data-id="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,editorFullMention:/]*data-id="([^<"]+)" [^\>]*data-name="([^<"]+)"[^>]*>([^<]+)<\/mention>/gim,savedMention:/\[mention\+id="([^<"]+)"([^\]]*)\]/gim,rawUrl:/^(https?:\/\/(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,optionalProtocol:/^((https?:\/\/)?(www\.)?(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))$/gim,encodedUrl2:/]*href="/([^>"]+)"[^>]*>([^<]+)<\/a>/gim},l=/]*data-bad-word="[^\"]*" [^\>]*data-error="true"[^\>]*>(.*?)<\/mocka>/gim,encodePostUrl=(e,t=e=>e)=>{var a;return t(null===(a=e.replace(/(\ )+/g," ").replace(/(\&)+/g,"&"))||void 0===a?void 0:a.replace(/(\u200c|)+/g,"").replace(i.url,(e,t,a)=>'="'!==t&&'data-url="true">'!==t?`${a}`:e).replace(i.edit,(e,t,a)=>{var r;let n=null===(r=t.match(/data-href="/([^"]*)"/im))||void 0===r?void 0:r[1];return n?`${a}`:`${a}`}))},encodeMention=e=>e.replace(i.editorMention,(e,t,a)=>`[mention+id="${t}"+name="${a}"]`),getAnchorHtml=({url:e,text:t,method:a})=>{let r=t.indexOf(t.trimStart()),n=t.trimEnd().length,o=t.substring(0,r),i=t.substring(r,n),l=t.substring(n);return"edit"===a?`${o}${i}${l}`:"display"===a&&(e.startsWith("http://")||e.startsWith("https://"))?`${o}${i}${l}`:t},decodePostUrl=(e,t)=>e.replace(i.encodedUrl,(e,a,r)=>{let n=r||a;return getAnchorHtml({text:n,url:a,method:t})}).replace(i.encodedUrl2,(e,a,r)=>{let n=r||a;return getAnchorHtml({text:n,url:a,method:t})}),decodeMention=(e,t=[])=>e.replace(i.savedMention,(e,a,r)=>{let n=t.find(e=>String(e.id)===a);if(!n){if(!r)return"";let e="";return r.replace(/\+name="([^<"]+)"/i,(t,a)=>(e=a,t)),`${e}`}return`${n.name}`}),getUrlsFromString=e=>{let t=[];return e.replace(/(\&)+/g,"&").replace(i.url,(e,a,r)=>('="'!==a&&'data-url="true">'!==a&&t.push(r),e)),t},s=30,getMentionIdsFromString=(e,t)=>{let a=[];return(e.replace(i.editorMention,(e,t)=>(a.push(t),e)).replace(i.savedMention,(e,t)=>(a.push(t),e)),t)?a:Array.from(new Set(a)).slice(0,s)},getUrlsFromEditorString=e=>{var t;return[...getUrlsFromString(e),...(null===(t=e.match(i.edit))||void 0===t?void 0:t.map(e=>{var t,a;let r=null===(t=e.match(/data-href="/([^"]*)"/im))||void 0===t?void 0:t[1],n=null===(a=e.match(/>(.*?)<\/mocka>/im))||void 0===a?void 0:a[1];return r||n}))||[]].filter(e=>!!e)},escapeRegExp=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),wrapAnchorAroundUrls=e=>{var t,a;return null===(a=null===(t=e.replace(/(\ )+/g," "))||void 0===t?void 0:t.replace(/(\u200c|)+/g,""))||void 0===a?void 0:a.replace(i.edit,(e,t,a)=>{var r;let n=null===(r=t.match(/data-href="/([^"]*)"/im))||void 0===r?void 0:r[1];return!n||n===a||a.match(i.rawUrl)?a:n?`${a}`:`${a}`}).replace(i.url,(e,t,a)=>{if('="'!==t&&'data-url="true">'!==t){let e=a.toLowerCase(),t=e.startsWith("http")?"":" https://",r=`${t}${e}`;return getAnchorHtml({text:r,url:r,method:"edit"})}return e}).replace(i.encodedUrl2,(e,t,a)=>getAnchorHtml({text:a||t,url:t,method:"edit"}))},removeEdittedBannedWord=e=>e.replace(l,(e,t)=>{let a=document.createElement("div");a.innerHTML=e;let r=a.firstChild;return(null==r?void 0:r.innerText)!==(null==r?void 0:r.getAttribute("data-bad-word"))?t:e}),removeBannedWordWrapper=e=>e.replace(l,"$1"),removeFontFormat=e=>e.replace(/]*>(.+)<\/font>/gim,(e,t)=>t.replace(/]*>(.+)<\/u>/gim,"$1")),encodePostContent=(e,t=e=>e)=>encodePostUrl(encodeMention(removeBannedWordWrapper(e)),t),c=["hellobacsi.com","hellosehat.com","hellodoktor.com","hellokrupet.com","hellodoctor.com.ph","hellokhunmor.com","hellosayarwon.com","helloyishi.com.tw","helloswasthya.com","marrybaby.vn"],reformatUrl=e=>e.match(i.optionalProtocol)?e.startsWith("https://")||e.startsWith("http://")?e:`https://${e}`:"",highlightBadWords=(e,t)=>{let a=t.filter(Boolean);if(e&&a.length>0){let t=removeBannedWordWrapper(e);return t.replace(RegExp(`\\b(${a.map(e=>escapeRegExp(e)).join("|")})\\b`,"gi"),(e,t)=>{let a=document.createElement("mocka");return a.setAttribute("data-bad-word",t),a.setAttribute("data-error","true"),a.innerText=t,`${a.outerHTML}`})}return e},fixMalformedMention=e=>e.replace(i.editorFullMention,(e,t,a,r)=>{if(r!==a){let e=a.split(" "),n=e.findIndex((t,a)=>{let n=e.slice(0,a+1).join(" ");return!r.startsWith(n)});if(0===n)return`@${r}`;{let a=(n<0?e:e.slice(0,n)).join(" "),o=r.slice(a.length).trim();return console.log(n,a,o),`${a} ${o} `}}return e}),youtubeVidIdGetter=e=>{var t;return e.includes("youtu")&&(null===(t=/(.*?)(^|\/|v=)([a-z0-9_-]{11})(.*)?/gim.exec(e))||void 0===t?void 0:t[3])||""},uploadAndGetSrc=(e,t,i)=>"string"==typeof e?Promise.resolve(e):(0,r.a)(void 0,void 0,void 0,function*(){var r;let l=new FormData;if(e.type.startsWith("image/gif"))l.append("image",e);else{let t=yield Promise.all([a.e(2138),a.e(9467),a.e(4467),a.e(6966),a.e(5243),a.e(8132),a.e(1375),a.e(4561),a.e(1448),a.e(5465),a.e(1217),a.e(5480),a.e(731),a.e(2050),a.e(2008),a.e(8469),a.e(8214),a.e(1482),a.e(6817),a.e(467),a.e(5951),a.e(9357),a.e(747),a.e(5675),a.e(6753),a.e(4802),a.e(3046),a.e(5745),a.e(3437),a.e(252),a.e(6839),a.e(9424),a.e(5702),a.e(8922),a.e(6399),a.e(553),a.e(2902),a.e(4969),a.e(3257),a.e(6611),a.e(7538),a.e(6894),a.e(5341)]).then(a.bind(a,"xsNn")),r=yield t.default(e,{maxSizeMB:.4,maxWidthOrHeight:1536,useWebWorker:!0});l.append("image",r)}let s=i?o.q:o.b,c=yield s((0,o.e)(i?n.qf.COMMENT.IMAGE_UPLOAD:n.yy.COMMENT.IMAGE_UPLOAD,{_locale:t}),"POST",{data:l});return(null===(r=null==c?void 0:c.data)||void 0===r?void 0:r.image)||""})},QHxc:function(e,t,a){a.d(t,{l:function(){return ProfileNavigation}});var r=a("q1tI"),n=a("v7JE"),o=a("6HDN"),i=a("gC6A"),l=a("F/Hd"),s=a("thIk"),c=a("5/p/"),d=a("i6hl"),m=a("AeFk"),u=a("rBCA"),p=a("iBNF");a("xXM3"),a("Wgwc");let NavBookingIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M2.5 6.5a3.2 3.2 0 0 1 3.2-3.2h7.9a3.2 3.2 0 0 1 3.19 3.2v4.72a3.2 3.2 0 0 1-3.2 3.2H5.7a3.2 3.2 0 0 1-3.19-3.2V6.49Z",fill:"#E3F2FF"}),r.createElement("path",{d:"M2.5 5.68A2.38 2.38 0 0 1 4.88 3.3h9.52a2.38 2.38 0 0 1 2.39 2.38z",fill:"#2D87F3"}),r.createElement("path",{d:"M13.6 2.5h-.03c-.36 0-.65.3-.65.65V4.2c0 .36.3.65.65.65h.03c.36 0 .65-.3.65-.65V3.15a.65.65 0 0 0-.65-.65M5.27 4.86h.03c.36 0 .65-.3.65-.65V3.15a.65.65 0 0 0-.65-.65h-.03c-.36 0-.65.3-.65.65V4.2c0 .36.3.65.65.65Z",fill:"#2743AD"}),r.createElement("path",{d:"M5.56 8.17h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m2.7 0h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m2.7 0h-.5a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m2.87 0h-.49a.4.4 0 0 0-.4.4v.59c0 .22.18.4.4.4h.49a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.41m-8.3 2.52h-.5a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4m2.7 0h-.5a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4m2.7 0h-.49a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Zm2.87 0h-.49a.4.4 0 0 0-.4.4v.58c0 .23.18.4.4.4h.5a.4.4 0 0 0 .4-.4v-.58a.4.4 0 0 0-.4-.4Z",fill:"#2D87F3"}),r.createElement("path",{d:"M16 16.8a3.17 3.17 0 1 0 0-6.36 3.17 3.17 0 0 0 0 6.35Z",fill:"#FE921D"}),r.createElement("path",{d:"M15.78 13.62v-1.36a.21.21 0 0 1 .42 0v1.26l.48.4a.21.21 0 0 1-.01.33.21.21 0 0 1-.26-.01l-.55-.46-.02-.01a.2.2 0 0 1-.06-.15",fill:"#fff"})),NavCommunityIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M7.06 4.97h-2.3a3.12 3.12 0 0 0-3.1 3.1v.43a3.12 3.12 0 0 0 3.1 3.1h1.39s1.47 1.11 1.5.97c.03-.22-.23-.99-.23-.99a3.13 3.13 0 0 0 2.72-3.09v-.41a3.12 3.12 0 0 0-3.08-3.11m-2.7 3.55a.23.23 0 1 1 0-.46.23.23 0 0 1 0 .46m1.35.4a.33.33 0 1 1 0-.66.33.33 0 0 1 0 .65Zm1.57-.05",fill:"#2D87F3"}),r.createElement("path",{d:"M12.88 9.52a3.53 3.53 0 0 0-1.35 6.8s-.23 1.03-.2 1.25c.03.14 1.55-.99 1.55-.99a3.53 3.53 0 0 0 0-7.06m-1.33 4.24a.48.48 0 1 1 0-.97.48.48 0 0 1 0 .97m1.58.04a.33.33 0 1 1 0-.66.33.33 0 0 1 0 .66m1.34-.39a.23.23 0 1 1 0-.46.23.23 0 0 1 0 .46",fill:"#FFB521"}),r.createElement("path",{d:"M16.45 1.67h-3.87a1.88 1.88 0 0 0-1.88 2.06l.22 2.29a1.88 1.88 0 0 0 1.73 1.7s-.17.94-.14 1.16c.02.14 1.66-1.13 1.66-1.13l1.92-.03a1.88 1.88 0 0 0 1.86-1.59l.36-2.29a1.88 1.88 0 0 0-1.86-2.17M13.1 5.23a.48.48 0 1 1 .34-.14c-.1.1-.22.14-.34.14m1.57.05a.33.33 0 1 1 .23-.1.33.33 0 0 1-.23.1m1.34-.4a.23.23 0 1 1 .1-.01.2.2 0 0 1-.1.02Z",fill:"#91CAFF"})),NavDotIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("rect",{x:"8.333",y:"8.333",width:"3.333",height:"3.333",rx:"1.667",fill:"#2D87F3"})),NavEshopIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"m3.18 7.06 1.6 1.6 4.33-4.69a.72.72 0 0 0-.03-.99l-.22-.22a.72.72 0 0 0-.99-.02zm13.64 0-1.6 1.6-4.33-4.69a.72.72 0 0 1 .02-.99l.23-.22a.72.72 0 0 1 .99-.02z",fill:"#2743AD"}),r.createElement("path",{d:"M15.04 16.7H4.9a.78.78 0 0 1-.77-.7l-.7-6.67h13.09l-.7 6.67a.78.78 0 0 1-.78.7",fill:"#2D87F3"}),r.createElement("path",{d:"M6.23 15.7a.23.23 0 0 1-.23-.22l-.3-4.46a.23.23 0 1 1 .47-.04l.3 4.47a.23.23 0 0 1-.22.25zm2.39 0a.23.23 0 0 1-.23-.23L8.3 11a.23.23 0 1 1 .47 0l.07 4.46a.23.23 0 0 1-.22.24h-.01Zm5.15 0h-.02a.23.23 0 0 1-.2-.16.2.2 0 0 1-.02-.09l.3-4.47a.24.24 0 0 1 .25-.22.23.23 0 0 1 .22.26l-.3 4.46a.23.23 0 0 1-.23.22m-2.39 0a.23.23 0 0 1-.23-.23l.07-4.47a.24.24 0 0 1 .24-.23.23.23 0 0 1 .23.23l-.08 4.47a.23.23 0 0 1-.23.23",fill:"#2743AD"}),r.createElement("path",{d:"M16.04 18.12a2.01 2.01 0 1 0 0-4.03 2.01 2.01 0 0 0 0 4.03",fill:"#FE921D"}),r.createElement("path",{d:"M16.97 15.87h-.7v-.7a.23.23 0 0 0-.46 0v.7h-.7a.23.23 0 1 0 0 .47h.7v.69a.23.23 0 1 0 .47 0v-.7h.69a.23.23 0 1 0 0-.46",fill:"#fff"}),r.createElement("path",{d:"M16.58 9.48H3.42a.8.8 0 0 1-.78-.7l-.13-1.1a.8.8 0 0 1 .78-.88h13.42a.8.8 0 0 1 .78.88l-.13 1.1a.8.8 0 0 1-.78.7",fill:"#BCDEFF"})),NavHelpIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M10 1.667c-4.595 0-8.333 3.738-8.333 8.333 0 4.595 3.738 8.333 8.333 8.333 4.595 0 8.333-3.738 8.333-8.333 0-4.595-3.738-8.333-8.333-8.333Zm0 13.194a.695.695 0 1 1 0-1.39.695.695 0 0 1 0 1.39Zm1.1-4.415a.698.698 0 0 0-.405.631v.312a.694.694 0 1 1-1.39 0v-.312c0-.81.477-1.553 1.213-1.893.707-.326 1.218-1.19 1.218-1.615 0-.956-.778-1.736-1.736-1.736s-1.736.78-1.736 1.736a.694.694 0 1 1-1.389 0A3.129 3.129 0 0 1 10 4.444a3.129 3.129 0 0 1 3.125 3.125c0 .939-.814 2.318-2.026 2.877Z",fill:"#FF6F4D"})),NavLogOutIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M11.116 1.72 5.488.85a1.898 1.898 0 0 0-2.155 1.856v14.588a1.898 1.898 0 0 0 2.158 1.855l5.625-.869a1.865 1.865 0 0 0 1.592-1.855V3.575a1.87 1.87 0 0 0-1.592-1.855",fill:"#2D87F3"}),r.createElement("path",{d:"M17.642 9.584a.6.6 0 0 1-.232.472l-1.964 1.518a.446.446 0 0 1-.719-.353v-.51l-2.118-.01a.225.225 0 0 1-.223-.225v-1.8a.225.225 0 0 1 .224-.225l2.12.002-.004-.506a.446.446 0 0 1 .719-.354l1.965 1.52a.6.6 0 0 1 .232.471",fill:"#FF6F4D"}),r.createElement("path",{d:"M17.642 9.584a.6.6 0 0 1-.232.472l-1.964 1.518a.446.446 0 0 1-.719-.353v-.51l-2.118-.01a.225.225 0 0 1-.223-.225v-1.8a.225.225 0 0 1 .224-.225l2.12.002-.004-.506a.446.446 0 0 1 .719-.354l1.965 1.52a.6.6 0 0 1 .232.471m-7.603-.908v1.802c0 .124.1.225.224.225h1.257c.124 0 .225-.1.225-.225V8.676c0-.124-.1-.224-.225-.224h-1.257c-.124 0-.224.1-.224.224m-.673 1.809a.224.224 0 0 1-.225.225h-.407a.61.61 0 0 1-.609-.61V9.069a.61.61 0 0 1 .61-.61h.406a.224.224 0 0 1 .225.225z",fill:"#FF6F4D"})),NavMyHealthIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M6.114 3.333a4.64 4.64 0 0 1 3.565 1.708.412.412 0 0 0 .642 0 4.64 4.64 0 0 1 3.565-1.708c2.646 0 4.447 2.302 4.447 5.142 0 1.698-.904 4.446-2.675 6.102-2.522 2.358-4.665 2.965-5.392 3.11a1.3 1.3 0 0 1-.53 0c-.728-.146-2.871-.752-5.393-3.11-1.772-1.656-2.676-4.404-2.676-6.102 0-2.84 1.801-5.142 4.447-5.142",fill:"#FF6F4D"}),r.createElement("path",{d:"M13.298 11.226v-.829a1.205 1.205 0 0 0-1.202-1.204h-.208a.26.26 0 0 1-.261-.259v-.208a1.205 1.205 0 0 0-1.201-1.204h-.832A1.205 1.205 0 0 0 8.39 8.726v.205a.26.26 0 0 1-.259.261h-.207a1.2 1.2 0 0 0-1.202 1.202v.834a1.204 1.204 0 0 0 1.202 1.201h.207a.26.26 0 0 1 .259.262v.205A1.205 1.205 0 0 0 9.594 14.1h.832a1.204 1.204 0 0 0 1.201-1.204v-.208a.26.26 0 0 1 .261-.258h.208a1.205 1.205 0 0 0 1.202-1.204",fill:"#fff"})),NavSaveIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M4.767 17.236a1.36 1.36 0 0 0 1.256.188l4.097-1.397a.37.37 0 0 1 .28 0l4.097 1.397q.22.071.45.075c.29.002.573-.09.807-.263a1.43 1.43 0 0 0 .6-1.171V3.935A1.417 1.417 0 0 0 14.946 2.5H5.573a1.416 1.416 0 0 0-1.406 1.434v12.13a1.43 1.43 0 0 0 .6 1.172",fill:"#00CB8A"})),NavSettingsIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M17.339 8.075a2.177 2.177 0 0 1-1.717-2.944 1.02 1.02 0 0 0-.305-1.15 8.2 8.2 0 0 0-2.445-1.417 1.03 1.03 0 0 0-1.16.323 2.173 2.173 0 0 1-3.423 0 1.03 1.03 0 0 0-1.161-.323A8.2 8.2 0 0 0 4.85 3.842a1.03 1.03 0 0 0-.322 1.183 2.167 2.167 0 0 1-1.806 2.978 1.03 1.03 0 0 0-.9.828 8 8 0 0 0-.05 2.861 1.03 1.03 0 0 0 .906.861 2.166 2.166 0 0 1 1.767 3.061 1.01 1.01 0 0 0 .283 1.211A8.2 8.2 0 0 0 7.15 18.22q.17.059.35.061a1.02 1.02 0 0 0 .833-.433 2.15 2.15 0 0 1 1.778-.934 2.18 2.18 0 0 1 1.745.878 1.02 1.02 0 0 0 1.2.339 8.3 8.3 0 0 0 2.222-1.328 1.03 1.03 0 0 0 .3-1.172 2.167 2.167 0 0 1 1.739-2.995 1.03 1.03 0 0 0 .872-.844 8 8 0 0 0 .144-1.405q0-.749-.138-1.484a1.02 1.02 0 0 0-.856-.828m-4.561 2.312a2.778 2.778 0 1 1-5.556 0 2.778 2.778 0 0 1 5.556 0",fill:"#2D87F3"})),NavUserIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e),r.createElement("path",{d:"M10 19.167A9.167 9.167 0 1 0 10 .833a9.167 9.167 0 0 0 0 18.334",fill:"#BCDEFF"}),r.createElement("path",{d:"M17.356 15.463a9.188 9.188 0 0 0-14.716-.005 9.155 9.155 0 0 0 14.716.005",fill:"#2D87F3"}),r.createElement("path",{d:"M10 10.591a3.548 3.548 0 1 0 0-7.096 3.548 3.548 0 0 0 0 7.096",fill:"#2D87F3"})),VaccinationIcon=e=>r.createElement("svg",Object.assign({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r.createElement("path",{d:"M1.11848 19.1667C1.19427 19.1666 1.26693 19.1365 1.32049 19.0829L4.30733 16.0962C4.36096 16.0426 4.3911 15.9699 4.39111 15.8941C4.39113 15.8183 4.36103 15.7455 4.30743 15.6919C4.25383 15.6383 4.18112 15.6081 4.1053 15.6081C4.02948 15.6081 3.95675 15.6382 3.90313 15.6918L0.916285 18.6787C0.876281 18.7186 0.849035 18.7696 0.837994 18.825C0.826954 18.8805 0.832614 18.938 0.854261 18.9903C0.875908 19.0425 0.912567 19.0872 0.9596 19.1186C1.00663 19.15 1.06193 19.1667 1.11848 19.1667Z",fill:"#626D7C"}),r.createElement("path",{d:"M7.71853 15.4925H7.72043L15.3384 7.87534L12.1272 4.66228L4.45021 12.3366C5.39488 13.2971 7.71853 15.4925 7.71853 15.4925Z",fill:"#2D87F3"}),r.createElement("path",{d:"M3.18097 14.9702L5.02953 16.8187C5.19838 16.9989 5.43172 17.1049 5.67851 17.1135C5.9253 17.122 6.16544 17.0325 6.34638 16.8645L7.71851 15.4923L4.50736 12.2793L3.13524 13.6514C2.96661 13.8324 2.87671 14.073 2.88529 14.3203C2.89386 14.5675 3.00021 14.8013 3.18097 14.9702Z",fill:"#BCDEFF"}),r.createElement("path",{d:"M17.7683 3.58334L16.4183 2.2333L13.5601 5.09143L14.9102 6.44147L17.7683 3.58334Z",fill:"#2B62CD"}),r.createElement("path",{d:"M7.71889 15.7783C7.77545 15.7783 7.83074 15.7616 7.87778 15.7301C7.92481 15.6987 7.96147 15.6541 7.98312 15.6018C8.00476 15.5496 8.01042 15.4921 7.99938 15.4366C7.98834 15.3811 7.9611 15.3302 7.92109 15.2902L4.70861 12.0779C4.65452 12.0268 4.58261 11.9988 4.50818 11.9998C4.43375 12.0009 4.36267 12.0309 4.31005 12.0836C4.25742 12.1362 4.22741 12.2073 4.22639 12.2817C4.22538 12.3562 4.25343 12.4281 4.3046 12.4821L7.51689 15.6944C7.54337 15.721 7.57485 15.7421 7.60952 15.7565C7.64419 15.7709 7.68136 15.7783 7.71889 15.7783Z",fill:"#BCDEFF"}),r.createElement("path",{d:"M9.48781 11.3095C9.54746 11.3096 9.60653 11.2978 9.66161 11.2749C9.71669 11.252 9.76669 11.2184 9.80874 11.1761L9.83847 11.1462L9.86819 11.1758C9.95336 11.2609 10.0689 11.3088 10.1893 11.3088C10.3098 11.3088 10.4253 11.2609 10.5104 11.1758L10.8535 10.8327C10.8957 10.7905 10.9291 10.7404 10.952 10.6853C10.9748 10.6302 10.9866 10.5711 10.9866 10.5114C10.9866 10.4517 10.9748 10.3926 10.952 10.3375C10.9291 10.2824 10.8957 10.2323 10.8535 10.1901L10.8232 10.1625L10.8531 10.1326C10.9382 10.0474 10.9861 9.93182 10.9861 9.81135C10.9861 9.69087 10.9382 9.57533 10.8531 9.49014L10.51 9.14711C10.4679 9.10487 10.4179 9.07136 10.3628 9.0485C10.3077 9.02563 10.2486 9.01386 10.1889 9.01386C10.1293 9.01386 10.0702 9.02563 10.0151 9.0485C9.96 9.07136 9.90995 9.10487 9.86781 9.14711L9.83808 9.17664L9.80836 9.14692C9.72313 9.06179 9.6076 9.01397 9.48715 9.01397C9.36669 9.01397 9.25116 9.06179 9.16594 9.14692L8.8229 9.48995C8.73774 9.57511 8.6899 9.69062 8.6899 9.81106C8.6899 9.9315 8.73774 10.047 8.8229 10.1322L8.85282 10.1621L8.82329 10.1918C8.73826 10.2771 8.69052 10.3925 8.69052 10.5129C8.69052 10.6333 8.73826 10.7488 8.82329 10.8341L9.16632 11.1771C9.2085 11.2193 9.25863 11.2528 9.31381 11.2755C9.36899 11.2982 9.42813 11.3098 9.48781 11.3095Z",fill:"white"}),r.createElement("path",{d:"M12.6184 3.4438L16.5573 7.38277C16.8001 7.6255 16.8001 8.01905 16.5573 8.26178C16.3146 8.50451 15.921 8.50451 15.6783 8.26178L11.7393 4.32281C11.4966 4.08008 11.4966 3.68653 11.7393 3.4438C11.9821 3.20107 12.3756 3.20107 12.6184 3.4438Z",fill:"#BCDEFF"}),r.createElement("path",{d:"M16.4563 1.22324L18.7767 3.54364C18.9921 3.75907 18.9921 4.10834 18.7767 4.32376C18.5613 4.53918 18.212 4.53918 17.9966 4.32376L15.6762 2.00336C15.4608 1.78793 15.4608 1.43866 15.6762 1.22324C15.8916 1.00782 16.2409 1.00782 16.4563 1.22324Z",fill:"#BCDEFF"})),h=u.Z.div`
padding: 16px;
border-radius: 16px;
background-color: white;
hr {
border-color: ${p.r.colors.neutral100};
border-bottom-width: 0px;
border-style: solid;
}
.profile-nav-item-group {
background-color: white;
border-radius: 8px;
}
`,g=u.Z.div`
display: block;
border: 1px solid transparent;
transition: all 300ms linear;
cursor: pointer;
position: relative;
${e=>e.hasSubmenu&&m.iv`
cursor: pointer;
`}
&[data-is-open='true'] {
& + div {
margin-top: 8px;
}
}
border-left-width: 0;
border-right-width: 0;
&[data-is-open='true'] {
& + div {
margin-top: 0;
}
.nav-menu-item:last-child {
border-bottom-color: ${p.r.colors.neutral100};
}
}
.nav-menu-item {
background-color: ${p.r.colors.neutral50};
}
.nav-menu-item {
padding-left: 38px;
}
`,v=u.Z.div`
display: flex;
align-items: center;
height: 48px;
border: 1px solid transparent;
transition: all 300ms;
border-radius: 8px;
&:hover {
background-color: ${p.r.colors.neutral150};
}
&[data-active='true'] {
background-color: ${p.r.colors.blue50};
}
`,b=u.Z.div`
margin-left: auto;
svg {
fill: ${p.r.colors.gray600};
transition: transform 300ms;
}
&[data-is-open='true'] svg {
transform: rotate(180deg);
}
`,f=u.Z.div`
overflow: hidden;
max-height: 0;
transition: max-height 0.3s ease-out;
[data-is-open='true'] & {
max-height: 500px;
transition-timing-function: ease-in;
}
`,E={helloSites:{member:()=>i.C.getAssetPath("userProfileNav/helloSites/icon-rank-member.svg"),ambassador:()=>i.C.getAssetPath("userProfileNav/helloSites/icon-rank-ambassador.svg"),doctor:()=>i.C.getAssetPath("userProfileNav/helloSites/icon-rank-doctor.svg"),expert:()=>i.C.getAssetPath("userProfileNav/helloSites/icon-rank-expert.svg"),influencer:()=>i.C.getAssetPath("userProfileNav/helloSites/icon-rank-influencer.svg")},marryBaby:{member:()=>i.C.getAssetPath("userProfileNav/marryBaby/icon-rank-member.svg"),ambassador:()=>i.C.getAssetPath("userProfileNav/marryBaby/icon-rank-ambassador.svg"),doctor:()=>i.C.getAssetPath("userProfileNav/marryBaby/icon-rank-doctor.svg"),expert:()=>i.C.getAssetPath("userProfileNav/marryBaby/icon-rank-expert.svg"),influencer:()=>i.C.getAssetPath("userProfileNav/marryBaby/icon-rank-influencer.svg")}},Rank=({rank:e,siteType:t="helloSites"})=>{let a=(0,r.useMemo)(()=>{var a,r;return(null===(r=null===(a=E[t])||void 0===a?void 0:a[e])||void 0===r?void 0:r.call(a))||""},[e,t]),{t:n}=(0,s.u)();return r.createElement("div",{style:{display:"inline-flex",height:"fit-content",alignItems:"center",padding:"5px 12px",gap:"4px",borderRadius:16,border:`1px solid ${"helloSites"===t?p.r.colors.blue100:p.r.colors.mb100}`}},r.createElement("img",{src:a,alt:e,style:{height:16,width:16}}),r.createElement(l.T,{size:"s5",color:"gray.8",weight:"semiBold"},n(`userProfile.userRank.${e}`)))},UserInfoSection=({siteType:e="helloSites",userInfo:t})=>(null==t?void 0:t.id)?r.createElement(r.Fragment,null,r.createElement("div",{style:{display:"flex",width:"100%",justifyContent:"space-between"}},r.createElement(o.A,{src:t.avatar,alt:t.name,size:48,style:{marginBottom:8}}),r.createElement(Rank,{rank:"member",siteType:e})),r.createElement(l.T,{size:"s3",weight:"semiBold",color:"gray.8",style:{marginBottom:4}},t.name),r.createElement(l.T,{size:"n1",weight:"regular",color:"helloSites"===e?"hb.6":"mb.6"},"@",t.username),r.createElement("hr",null)):null,ProfileNavigation=({className:e,activeItem:t,navMenuItems:a,style:o,onLogout:i,siteType:l="helloSites",userInfo:c,onNavigate:m,configs:u={}})=>{let{enableProfileFindMyBooking:p=!1}=u,{locale:g}=(0,s.u)(),[v,b]=(0,r.useState)(),f="string"==typeof t?t:v,E=(0,d.n)((0,d.a)(g,"marryBaby"===l)+"/"),y=(0,d.n)((0,d.g)(g,"marryBaby"===l)+"/"),w=a||[[{key:"userProfile.nav.header.viewProfile",icon:r.createElement(NavUserIcon,{width:"24",height:"24"}),value:"profile",tracking:{action:"Profile Click"},link:`${E}user/profile/`},{key:"userProfile.nav.card.myHealth",icon:r.createElement(NavMyHealthIcon,{width:"24",height:"24"}),value:"myHealth",tracking:{action:"My Health Click"},link:`${E}user/health/`},{key:"userProfile.nav.card.mySaved",icon:r.createElement(NavSaveIcon,{width:"24",height:"24"}),iconColor:"green_300",value:"saved",tracking:{action:"Bookmarks Click"},link:`${E}user/saved/`},!!p&&{key:"navigation.find_my_booking",icon:r.createElement(VaccinationIcon,{width:"24",height:"24"}),value:"find_my_booking",tracking:{action:"Find My Booking"},link:`${y}care/find-my-booking`},{key:"userProfile.nav.card.myBooking",icon:r.createElement(NavBookingIcon,{width:"24",height:"24"}),value:"booking",disabled:!n.C.includes(g),tracking:{action:"Manage Booking Click"},link:`${E}user/booking/`},{key:"userProfile.nav.card.myCommunity",icon:r.createElement(NavCommunityIcon,{width:"24",height:"24"}),value:"myCommunities",disabled:!n.c.includes(g),tracking:{action:"Community Click"},link:`${E}user/my-communities/`}],...n.E.includes(g)?[[{key:"userProfile.nav.card.eCom",icon:r.createElement(NavEshopIcon,{width:"24",height:"24"}),value:"eCom",disabled:!n.E.includes(g),subMenu:[{key:"userProfile.nav.card.ecom.manageOrders",value:"eCom-manageOrders",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),link:`${y}shop/ho-so/quan-li-don-hang/`,tracking:{action:"Order Management Click"}},{key:"userProfile.nav.card.ecom.DeliveryAddress",value:"eCom-manageAddress",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),link:`${y}shop/ho-so/dia-chi-giao-hang/`,tracking:{action:"Address Management Click"}},{key:"userProfile.nav.card.ecom.voucher",value:"eCom-voucher",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),link:`${y}shop/ho-so/khuyen-mai/`,tracking:{action:"Voucher Click"}}]}]]:[],[{key:"userProfile.nav.menu.accountSettings",icon:r.createElement(NavSettingsIcon,{width:"24",height:"24"}),subMenu:[{key:"userProfile.nav.menu.password",value:"password",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),tracking:{action:"Set Password Click"},link:`${E}user/password/`},{key:"userProfile.nav.menu.disableAccount",value:"disable-account",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),tracking:{action:"Disable Account Click"},link:`${E}user/disable-account/`},...n.D.includes(g)?[{key:"userProfile.nav.menu.dataPrivacy",value:"data-privacy",icon:r.createElement(NavDotIcon,{width:"24",height:"24"}),tracking:{action:"Data Privacy Click"},link:`${E}user/data-privacy/`}]:[]]}],[{key:"userProfile.nav.menu.help",icon:r.createElement(NavHelpIcon,{width:"24",height:"24"}),value:"help",link:`${E}user/help`,tracking:{action:"Support Click"}},{key:"userProfile.nav.menu.logout",icon:r.createElement(NavLogOutIcon,{width:"24",height:"24"}),value:"logout",tracking:{action:"Sign Out Click"}}]];return r.createElement(h,{className:e,style:o},r.createElement(UserInfoSection,{userInfo:c,siteType:l}),w.map((e,t)=>r.createElement(r.Fragment,{key:t},r.createElement("div",{className:"profile-nav-item-group",key:t},e.map(e=>e?r.createElement(NavMenuItem,{key:e.key,item:e,activeKey:f||"",onLogout:i,onClick:()=>b(t=>t===e.key?void 0:e.key),siteType:l,onNavigate:m}):null)),t!==w.length-1&&r.createElement("hr",null))))},NavMenuItem=({item:e,activeKey:t,forceOpen:a,onLogout:n,onClick:o,siteType:i="helloSites",onNavigate:d})=>{var m,u;let[p,h]=(0,r.useState)(!1),E=(0,r.useMemo)(()=>"undefined"!=typeof window?window.location.href:"",[]);if(e.disabled)return null;let{t:y}=(0,s.u)(),w=null===(m=e.subMenu)||void 0===m?void 0:m.some(e=>e.key===t),x=t===e.key;(0,r.useEffect)(()=>{(w||x)&&h(!0)},[w,x]);let k="boolean"==typeof a?a:p;return r.createElement(g,{as:e.subMenu?void 0:"a","data-is-open":k,key:e.key,hasSubmenu:!!e.subMenu,onClick:()=>{null==o||o(),e.subMenu&&!a?h(e=>!e):"logout"===e.value?null==n||n():e.link&&(d?d(e.link):window.location.href=e.link)},"data-event-category":"Ecommerce","data-event-action":(null===(u=null==e?void 0:e.tracking)||void 0===u?void 0:u.action)||"","data-event-label":E},r.createElement(v,{"data-active":x},e.icon,r.createElement(l.T,{size:"p3",style:{marginLeft:e.icon?24:48,transition:"color 300ms"},color:x?"helloSites"===i?"hb.6":"mb.6":"gray.8"},y(e.key)),e.subMenu&&r.createElement(b,{"data-is-open":k},r.createElement(c.C,{width:14}))),e.subMenu&&r.createElement(f,null,e.subMenu.map(e=>r.createElement(NavMenuItem,{key:e.key,item:e,activeKey:t,onLogout:n,siteType:i}))))}},e6Kn:function(e,t,a){a.d(t,{k:function(){return ProgressBar}});var r=a("fbRC"),n=a("q1tI"),o=a("DzJC"),i=a.n(o),l=a("rBCA"),s=a("iBNF");let c=l.Z.div`
position: relative;
width: 100%;
& div[role='slider'] {
-webkit-text-size-adjust: none;
-webkit-user-select: none;
&:focus {
outline: none;
}
}
`,d=l.Z.div`
position: absolute;
top: 19px;
width: 24px;
height: 24px;
color: ${s.r.colors.white};
border: 2px solid ${s.r.colors.white};
border-radius: 50%;
transform: translateY(-50%) translateX(-50%);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
background-color: ${s.r.colors.white};
color: ${s.r.colors.gray300};
border: 1px solid ${s.r.colors.gray300};
&[data-is-active='true'] {
background-color: ${s.r.colors.primaryBase};
color: ${s.r.colors.white};
border: none;
}
`,m=l.Z.div`
display: flex;
width: 100%;
height: 36px;
&[data-track-type='detail'] {
margin-top: 0;
}
&[data-track-type='detail'][data-step-passed='true'] > div {
border: 1px solid ${s.r.colors.primaryBase};
height: 0px;
}
&[data-track-type='detail'] > div {
border: 1px solid ${s.r.colors.gray200};
height: 0px;
}
`,u=l.Z.div`
width: 100%;
height: 5px;
align-self: center;
border-radius: 4px;
background-color: ${s.r.colors.gray200};
`,p=l.Z.div`
position: absolute;
top: 32px;
min-width: 100px;
text-align: center;
color: ${s.r.colors.gray500};
font-size: ${s.r.sizes.fsCaption2};
font-weight: ${s.r.sizes.fwBold};
&[data-step-passed='true'] {
color: ${s.r.colors.gray800};
}
`,h=l.Z.div`
display: flex;
align-items: center;
`,g=l.Z.div`
display: flex;
align-items: center;
font-size: ${s.r.sizes.fsCaption2};
font-weight: ${s.r.sizes.fwBold};
color: ${s.r.colors.gray500};
cursor: pointer;
& > svg {
height: 10px;
width: 10px;
margin: 0 14px;
}
& > svg > path {
stroke: ${s.r.colors.gray500};
}
&[data-selected='true'] {
color: ${s.r.colors.primaryBase};
}
`,v=l.Z.div`
position: absolute;
left: 0;
top: 19px;
height: 24px;
cursor: pointer;
transform: translateY(-50%);
display: flex;
align-items: center;
padding: 8px;
background-color: ${s.r.colors.white};
`,b=l.Z.div`
min-width: 24px;
height: 24px;
border: 2px solid ${s.r.colors.white};
border-radius: 50%;
margin-right: 8px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
background-color: ${s.r.colors.white};
color: ${s.r.colors.gray300};
border: 1px solid ${s.r.colors.gray300};
&[data-is-active='true'] {
border: none;
background-color: ${s.r.colors.primaryBase};
color: ${s.r.colors.white};
}
`,f=l.Z.div`
display: flex;
align-items: center;
justify-content: center;
& > svg {
height: 20px;
width: 20px;
margin-right: 8px;
& > path {
stroke: ${s.r.colors.gray500};
}
}
`,E=l.Z.div`
color: ${s.r.colors.gray400};
font-size: ${s.r.sizes.fsCaption2};
font-weight: ${s.r.sizes.fwBold};
margin-right: 8px;
flex: 0 0 auto;
&[data-step-passed='true'] {
color: ${s.r.colors.gray800};
}
`,y=l.Z.div`
position: absolute;
top: 32px;
font-weight: ${s.r.sizes.fwRegular};
color: ${s.r.colors.gray400};
padding-right: 16px;
`,ProgressBar=({type:e,numberOfStep:t,activeStep:a,labelPrefix:o,detailSteps:l,className:s,onChange:w})=>{let[x,k]=(0,n.useState)(0),Track=e=>{var{trackClassName:t}=e,a=(0,r._)(e,["trackClassName"]);return n.createElement(m,Object.assign({},a,{className:t}),n.createElement(u,null))},C=n.createElement(c,{className:s+" progress-bar"},n.createElement(Track,null),n.createElement(({trackLength:e,activeStep:a,labelPrefix:r="Step",onChange:o})=>n.createElement(n.Fragment,null,Array.from({length:t},(e,t)=>t).map((i,l)=>n.createElement(d,{"data-is-active":l===a,"data-label":l,style:{left:l*e/(t-1)},onClick:()=>{o&&o(l)},key:l},l+1,n.createElement(p,{"data-step-passed":l<=a},r+" "+(l+1))))),{trackLength:x,activeStep:a,labelPrefix:o,onChange:w})),M=n.createElement("svg",{"data-name":"Layer 1",viewBox:"0 0 5.5 9.5"},n.createElement("title",null,"chevron-right"),n.createElement("path",{d:"M.75 8.75l4-4-4-4",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),S=n.createElement(h,null,l&&Array.from({length:l.length},(e,t)=>t).map((e,t)=>{var r;return n.createElement(g,{key:t,"data-selected":t===a,onClick:()=>{w&&w(t)}},null===(r=l[t])||void 0===r?void 0:r.text," ",tn.createElement(n.Fragment,null,Array.from({length:e.length},(e,t)=>t).map((r,o)=>n.createElement(v,{key:o,style:{left:100/e.length*o+"%",width:100/e.length+"%"},onClick:()=>{a&&a(o)}},e[o].icon?n.createElement(f,{onClick:()=>{a&&a(o)}},e[o].icon):n.createElement(b,{"data-is-active":o===t,"data-label":r,onClick:()=>{a&&a(o)},key:o},o+1),n.createElement(E,{"data-step-passed":o{let e=document.querySelector(".progress-bar");e&&k(e.offsetWidth)},1e3),[]);return(0,n.useEffect)(()=>{let e=document.querySelector(".progress-bar");return k(null==e?void 0:e.offsetWidth),window.addEventListener("resize",$,{passive:!0}),()=>{window.removeEventListener("resize",$)}},[]),"step-track"===e&&C||"breadcrumb"===e&&S||"detail-track"===e&&P}}}]);