"use strict";(self.webpackChunkhhgHealthCareV1=self.webpackChunkhhgHealthCareV1||[]).push([[8796],{84655:function(e,t,n){n.d(t,{W:function(){return a}});var r=n(858),i=n(44898),o=n(83776),a={cached:{},clearCached:function(e){console.log(a.cached),Object.keys(a.cached).filter((function(t){return t.startsWith(e)})).forEach((function(e){console.log(e),a.cached[e]=void 0}))},withCached:function(){var e=(0,r.A)((function(e,t){var n,r,c;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:if("waitingTheFirstResponse"===a.cached[e])return[2,new Promise((function(t){var n=(new Date).getTime(),r=setInterval((function(){(new Date).getTime()-n>3e3&&clearInterval(r),"object"===typeof a.cached[e]&&(t(a.cached[e]),clearInterval(r))}),100)}))];if("object"===typeof a.cached[e])return[2,a.cached[e]];a.cached[e]="waitingTheFirstResponse",o.label=1;case 1:return o.trys.push([1,3,,4]),[4,t()];case 2:return n=o.sent(),a.cached[e]=n,setTimeout((function(){a.cached[e]=void 0}),18e5),[2,n];case 3:return r=o.sent(),a.cached[e]=void 0,c=(0,i.A)(r,Error)?r:new Error(String(r)),[2,Promise.reject(c)];case 4:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}()}},95287:function(e,t,n){n.d(t,{A:function(){return F},e:function(){return V}});var r=n(2445),i=n(73884),o=n(35291),a=n(22615),c=n(1784),l=n(78856),u=n(95507),s=n(4736),d=n(73419),f=n(12215),p=n.n(f),h=n(6442),m=n(80264),g=n(94270),v=n(24537),x=n(27317);function b(){var e=(0,v.A)(["\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px;\n border: 1px solid rgba(255, 255, 255, 0.45);\n border-radius: 6px;\n background: transparent;\n color: #fff;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: -0.2px;\n width: auto;\n position: relative;\n padding-right: 24px;\n\n svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n }\n\n svg:last-child {\n position: absolute;\n right: 5px;\n top: 8px;\n }\n\n &:hover {\n background: rgba(255, 255, 255, 0.1);\n }\n"]);return b=function(){return e},e}function y(){var e=(0,v.A)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 12px;\n"]);return y=function(){return e},e}function w(){var e=(0,v.A)(["\n display: flex;\n align-items: center;\n gap: 10px;\n"]);return w=function(){return e},e}function _(){var e=(0,v.A)(["\n font-size: 18px;\n line-height: 1;\n"]);return _=function(){return e},e}function Y(){var e=(0,v.A)(["\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.3px;\n color: ",";\n font-weight: 500;\n"]);return Y=function(){return e},e}var A=x.Ay.button.withConfig({componentId:"sc-93ed0fb8-0"})(b()),C=x.Ay.div.withConfig({componentId:"sc-93ed0fb8-1"})(y()),D=x.Ay.div.withConfig({componentId:"sc-93ed0fb8-2"})(w()),N=x.Ay.span.withConfig({componentId:"sc-93ed0fb8-3"})(_()),k=x.Ay.span.withConfig({componentId:"sc-93ed0fb8-4"})(Y(),(function(e){return e.$isSelected?"#2D87F3":"#111111"})),V=function(){var e=(0,s.useAppContext)(),t=e.state,n=e.dispatch,r=t.language,o=(0,i.useMemo)((function(){return(0,g.I$)(r)}),[r]),a=(0,i.useCallback)((function(e){e&&e!==r&&(p().set("lang",e,{expires:365}),n({type:m.Q.UPDATE_LANGUAGE,payload:{language:e}}))}),[n,r]);return{language:r,selectedOption:o,handleChangeLanguage:a}},F=function(){var e=(0,h.A)().formatMessage,t=V(),n=t.language,i=t.selectedOption,s=t.handleChangeLanguage;(0,d.$)().router;return n?(0,r.FD)(u.W,{position:"bottom-end",offset:8,shadow:"md",width:200,children:[(0,r.Y)(u.W.Target,{children:(0,r.FD)(A,{type:"button","aria-label":"Select language",children:[(0,r.Y)(l.A,{color:"#fff"}),(0,r.Y)("span",{children:i.shortCode}),(0,r.Y)(a.A,{color:"#fff"})]})}),(0,r.Y)(u.W.Dropdown,{sx:{padding:0,border:"none",borderRadius:"8px",overflow:"hidden"},children:g.fp.filter((function(e){return e.enabled})).map((function(t,i){var a=t.value===n;return(0,r.Y)(u.W.Item,{onClick:function(){return s(t.value)},sx:{backgroundColor:a?o.w.colors.blue50:"transparent",padding:"12px 14px",borderRadius:0,borderBottom:ib]:text-green600"),style:a,dangerouslySetInnerHTML:{__html:l[0]}});var u=c({id:"vaccination.payment.offers_number",defaultMessage:"{number} offers"},{number:l.length});return(0,o.FD)("div",{className:(0,d.A)(i,"payment__listItemDescription text-[13px] leading-5 tracking-[-0.3px] text-gray700"),style:a,children:[n&&(0,o.Y)("span",{className:"text-green600",children:u}),!n&&(0,o.Y)("ul",{className:"payment__listItemDescription-list mt-1",children:l.map((function(e,t){return(0,o.Y)("li",{dangerouslySetInnerHTML:{__html:e},className:(0,d.A)("[&>b]:text-green600 pl-5 relative [&~&]:mt-1","before:content-[''] before:w-[4px] before:h-[4px] before:bg-dark before:absolute before:top-[8px] before:left-[6px] before:rounded-[50%]")},"".concat(e,"-").concat(t))}))})]})},w=n(24360);function _(e){var t=e.provider,n=e.payment_via,r=e.payment_type,i=e.title;return"".concat(t,"-").concat(n,"-").concat(r,"-").concat(i)}var Y=function(e){var t=e.loading,n=e.options,Y=e.defaultValue,A=e.onChange,C=e.className,D=e.style,N=(0,g.$)(),k=(0,x.Jf)(),V=k.selectedPaymentValue,F=k.setSelectedPaymentValue,S=k.openOnlineBanking,O=k.setOpenOnlineBanking,E=k.selectedSubPaymentValue,L=k.setSelectedSubPaymentValue,I=(0,v.A)().formatMessage,M=(0,a.useMemo)((function(){var e,t=null===n||void 0===n?void 0:n.find((function(e){return V===_(e)}));return t&&(null===(e=t.sub_payment_methods)||void 0===e?void 0:e.length)?(E||O(!0),t.sub_payment_methods.filter((function(e){return e.is_active}))):[]}),[V]),R=(0,a.useMemo)((function(){return M.find((function(e){return e.code===E}))}),[E,M]),P=(0,a.useCallback)((function(e){F(e),L(""),null===A||void 0===A||A(e)}),[n,A]),T=(0,a.useCallback)((function(){O(!1),E||P("")}),[E,P]),z=(0,a.useCallback)((function(e){O(!1),L("".concat(e))}),[]);return t?(0,o.FD)(s.a,{className:(0,d.A)(C,"payment__list","p-4 flex flex-col gap-2","border border-solid border-[rgba(0,0,0,0.1)] rounded-xl"),children:[(0,o.FD)("label",{className:"payment__listItem flex justify-between py-2",children:[(0,o.Y)(f.E,{width:24,height:24,radius:3,mr:(0,p.D)(8)}),(0,o.FD)("div",{className:"flex-1 min-w-0",children:[(0,o.Y)(f.E,{width:"100%",height:18,radius:5}),(0,o.Y)(f.E,{width:"30%",height:16,radius:5,mt:4})]}),(0,o.Y)(f.E,{width:16,height:16,circle:!0,ml:(0,p.D)(12)})]}),(0,o.Y)(h.c,{color:"rgba(0,0,0,0.1)"}),(0,o.FD)("label",{className:"payment__listItem flex justify-between py-2",children:[(0,o.Y)(f.E,{width:24,height:24,radius:3,mr:(0,p.D)(8)}),(0,o.FD)("div",{className:"flex-1 min-w-0",children:[(0,o.Y)(f.E,{width:"100%",height:18,radius:5}),(0,o.Y)(f.E,{width:"30%",height:16,radius:5,mt:4})]}),(0,o.Y)(f.E,{width:16,height:16,circle:!0,ml:(0,p.D)(12)})]}),(0,o.Y)(h.c,{color:"rgba(0,0,0,0.1)"}),(0,o.FD)("label",{className:"payment__listItem flex justify-between py-2",children:[(0,o.Y)(f.E,{width:24,height:24,radius:3,mr:(0,p.D)(8)}),(0,o.FD)("div",{className:"flex-1 min-w-0",children:[(0,o.Y)(f.E,{width:"100%",height:18,radius:5}),(0,o.Y)(f.E,{width:"30%",height:16,radius:5,mt:4})]}),(0,o.Y)(f.E,{width:16,height:16,circle:!0,ml:(0,p.D)(12)})]})]}):n&&n.length?(0,o.FD)(o.FK,{children:[(0,o.Y)(m.s.Group,{defaultValue:Y,value:V,onChange:P,className:(0,d.A)(C,"payment__list","p-4 flex flex-col gap-2","border border-solid border-[rgba(0,0,0,0.1)] rounded-xl"),style:D,children:n.map((function(e,t){var r,i=e.logo,f=e.title,g=e.description,v=e.provider,x=i||(null===b.pf||void 0===b.pf?void 0:b.pf[v])||b.uY.HHG,w=_(e),Y=N.pathname.includes("teleconsultation")?e.discount:void 0;return(0,o.FD)(a.Fragment,{children:[(0,o.FD)("label",{className:"payment__listItem flex justify-between py-2 cursor-pointer",children:[(0,o.Y)("img",{src:x,alt:f,className:(0,d.A)("payment__listItemLogo","w-6 h-6 object-contain object-center mr-3")}),(0,o.FD)("div",{className:"payment__listItemContent flex-1 min-w-0 mr-4",children:[(0,o.Y)("p",{className:"payment__listItemTitle text-[15px] leading-6 tracking-[-0.3px] font-medium text-dark mb-0",children:f}),(null===Y||void 0===Y?void 0:Y.has_discount)||(null===Y||void 0===Y?void 0:Y.badge_label)||i.includes("CreditDebitCard")?(0,o.Y)(y,{content:"".concat((null===Y||void 0===Y?void 0:Y.badge_label)||g,""),collapsed:!1,className:"font-medium"}):(0,o.Y)(y,{content:g,collapsed:w!==V})]}),(0,o.Y)(m.s,{value:w,checked:w===V,styles:{root:{marginTop:(0,p.D)(2)},radio:{width:(0,p.D)(16),height:(0,p.D)(16)},icon:{color:c.w.colors.primary600}}})]}),!!(null===(r=e.sub_payment_methods)||void 0===r?void 0:r.length)&&R&&(0,o.FD)(s.a,{className:"bg-neutral50 rounded-xl flex items-center gap-2 flex-col lg:flex-row p-3 lg:p-4 -mt-2",children:[(0,o.FD)(s.a,{className:"flex gap-3 items-center flex-1 min-w-full w-full md:min-w-0 text-gray900 text-[13px] leading-5 tracking-[-0.3px] font-medium",children:[(0,o.Y)("img",{src:null===R||void 0===R?void 0:R.logo,className:"w-8 h-6"}),(0,o.Y)("p",{className:"m-0 flex-1 min-w-0",children:null===R||void 0===R?void 0:R.title})]}),(0,o.Y)(h.c,{color:"rgba(0,0,0,0.1)",className:"border-[rgba(0,0,0,0.1)] border-[0.7px] w-full lg:hidden"}),(0,o.FD)(l.b,{onClick:function(){return O(!0)},className:"flex items-center text-primary600 !text-[13px] !leading-5 tracking-[-0.3px] cursor-pointer",children:[I({id:"vaccination.payment.change_method",defaultMessage:"Change method"}),(0,o.Y)(u.A,{size:"1em",color:"currentColor"})]})]}),t!==n.length-1&&(0,o.Y)(h.c,{color:"rgba(0,0,0,0.1)"})]},"".concat(e.title,"-").concat(t))}))}),(0,o.Y)(w.R,{open:S,onOpen:T,options:M.map((function(e){var t=e.title,n=e.code,o=(0,i.A)(e,["title","code"]);return(0,r.A)({label:t,value:n},o)})),value:"".concat(E),itemRender:function(e){return(0,o.FD)(s.a,{className:"flex gap-3 items-center flex-1 min-w-full w-full md:min-w-0 text-gray900 text-[13px] leading-5 tracking-[-0.3px] font-medium",children:[(0,o.Y)("img",{src:null===e||void 0===e?void 0:e.logo,className:"w-8 h-6"}),(0,o.Y)("p",{className:"m-0 flex-1 min-w-0",children:null===e||void 0===e?void 0:e.label})]})},onChange:z})]}):null}},63231:function(e,t,n){n.d(t,{A:function(){return d}});var r=n(53513),i=n(63538),o=n(2445),a=n(73884),c=n(36814),l=n(94858),u=n(35291),s=function(e){var t=e||{},n=t.w,c=t.h,s=t.active,d=t.className,f=t.style,p=(0,a.useMemo)((function(){return{width:n+2,height:c+2,viewBox:"0 0 ".concat(n+2," ").concat(c+2),className:(0,l.A)(d,"absolute z-[-1] inset-x-[-32px] top-[-1px] pointer-events-none"),style:f,xmlns:"http://www.w3.org/2000/svg"}}),[n,c,d,f]),h=(0,a.useMemo)((function(){if(!s)return"M0 56 H".concat(n+1," V").concat(c," H0 Z");var e=s.w,t=s.h,r=s.x,i=s.y,o=12,a=4/3*(Math.sqrt(2)-1)*o;return"M0,".concat(i+c,"\n\t\t\tV").concat(i+t,"\n\t\t\tH").concat(r-o,"\n\t\t\tC").concat(r-o+a,",").concat(i+t," ").concat(r,",").concat(i+t-a," ").concat(r,",").concat(i+t-o,"\n\t\t\tV").concat(i+o+1,"\n\t\t\tC").concat(r,",").concat(i+o+1-a," ").concat(r+a,",").concat(i+1," ").concat(r+o,",").concat(i+1,"\n\t\t\tH").concat(r+e-o,"\n\t\t\tC").concat(r+e-a,",").concat(i+1," ").concat(r+e,",").concat(i+o+1-a," ").concat(r+e,",").concat(i+o+1,"\n\t\t\tV").concat(t-o,"\n\t\t\tC").concat(r+e,",").concat(i+t-a," ").concat(r+e+o-a,",").concat(i+t," ").concat(r+e+o,",").concat(i+t,"\n\t\t\tH").concat(n+2,"\n\t\t\tV").concat(c+2,"\n\t\t\tH0\n\t\t\tZ")}),[n,c,null===s||void 0===s?void 0:s.x,null===s||void 0===s?void 0:s.y,null===s||void 0===s?void 0:s.w,null===s||void 0===s?void 0:s.h]);return(0,o.FD)("svg",(0,i.A)((0,r.A)({},p),{children:[(0,o.Y)("path",{d:h,fill:"white",stroke:u.w.colors.neutral100,strokeWidth:"1"}),(0,o.FD)("defs",{children:[(0,o.FD)("linearGradient",{id:"line__gradient",x1:(null===s||void 0===s?void 0:s.x)||0,y1:1,x2:((null===s||void 0===s?void 0:s.x)||0)+((null===s||void 0===s?void 0:s.w)||0),y2:1,gradientUnits:"userSpaceOnUse",colorInterpolation:"linearRGB",children:[(0,o.Y)("stop",{offset:"0%",stopColor:u.w.colors.neutral100,stopOpacity:"0"}),(0,o.Y)("stop",{offset:"50%",stopColor:u.w.colors.primary600,stopOpacity:"0.5"}),(0,o.Y)("stop",{offset:"100%",stopColor:u.w.colors.neutral100,stopOpacity:"0"})]}),(0,o.FD)("radialGradient",{id:"ellipse__radial",cx:"50%",cy:"50%",r:"50%",gradientTransform:"translate(0.5,0.5) scale(1,0.6) translate(-0.5,-0.5)",children:[(0,o.Y)("stop",{offset:"0%",stopColor:u.w.colors.primary600,stopOpacity:"0.1"}),(0,o.Y)("stop",{offset:"100%",stopColor:"white",stopOpacity:"0"})]})]}),(0,o.Y)("line",{fill:"none",stroke:"url(#line__gradient)",strokeWidth:"1",x1:(null===s||void 0===s?void 0:s.x)||0,y1:1,x2:((null===s||void 0===s?void 0:s.x)||0)+((null===s||void 0===s?void 0:s.w)||0),y2:1}),(0,o.Y)("rect",{x:(null===s||void 0===s?void 0:s.x)||0,y:-"".concat(((null===s||void 0===s?void 0:s.h)||0)/2),width:(null===s||void 0===s?void 0:s.w)||0,height:(null===s||void 0===s?void 0:s.h)||0,fill:"url(#ellipse__radial)"})]}))},d=function(e){var t=e.tabs,n=e.defaultTab,u=e.currentTab,d=e.onChangeTab,f=e.className,p=e.style,h=(0,a.useState)(n||u),m=h[0],g=h[1],v=(0,a.useRef)({}),x=(0,a.useRef)(null),b=(0,a.useState)(null),y=b[0],w=b[1],_=(0,a.useState)({w:1600,h:72}),Y=_[0],A=_[1],C=(0,a.useCallback)((function(e){requestAnimationFrame((function(){var t,n=v.current[e],r=x.current,i=null===r||void 0===r||null===(t=r.children)||void 0===t?void 0:t[0];n&&r&&i&&r.offsetWidth=h&&"after:content-[''] after:absolute after:h-[1px] after:bg-neutral100 after:bottom-[0.5px]",{"text-gray700":d!==m},{"payment__tabsNav-nav-active text-blue600":d===m}),"data-testid":d,onClick:D(d),sx:function(){return{"&::after":{width:"".concat(g,"px"),right:"-".concat(g+16,"px")}}},children:[d===m&&(0,o.Y)(s,(0,i.A)((0,r.A)({},Y),{active:y,className:"payment__tabsNav-svg"})),u]})},"".concat(d,"-").concat(n))}))})})})}):null}},42280:function(e,t,n){n.d(t,{Jf:function(){return l},Ou:function(){return u},Zb:function(){return s},re:function(){return f}});var r=n(53513),i=n(63538),o=n(81539),a=n(44745),c=n(95204),l=(0,a.vt)()((function(e,t){return{currentStep:c.RZ.ONE,quantity:1,setCurrentStep:function(t){return e((function(){return{currentStep:t}}))},setQuantity:function(t){e((function(){return{quantity:t}}))},providers:[],setProviders:function(t){return e((function(){return{providers:t}}))},setPaymentResult:function(t){return e((function(){return{paymentResult:t}}))},computedPrice:c.vp,setComputedPrice:function(n){if(!t().computedPrice.unit_price||n.unit_price){var r=t().vaccinationDetail;r&&(r.max_product_quantity=n.max_product_quantity,r.quantity_supported=Number(!!n.quantity_supported)),e((function(){return{computedPrice:n,vaccinationDetail:r}}))}},setSelectedPaymentValue:function(t){return e((function(){return{selectedPaymentValue:t}}))},setVaccinationDetail:function(t){return e((function(){return{vaccinationDetail:t}}))},setOpenOnlineBanking:function(t){return e((function(){return{openOnlineBanking:t}}))},setSelectedSubPaymentValue:function(t){e((function(){return{selectedSubPaymentValue:t}}))}}})),u={loading:!1,isOpenVoucher:!1,openResult:!1,listVoucher:[],appliedVoucher:null,lastVoucherApplied:null,referralData:null,appliedReferralCode:"",voucherCount:1},s=(0,a.vt)((function(e){return(0,i.A)((0,r.A)({},u),{setLoading:function(t){e((function(){return{loading:t}}))},setIsOpenVoucher:function(t){e((function(){return{isOpenVoucher:t}}))},setOpenResult:function(t){e((function(){return{openResult:t}}))},setListVoucher:function(t){t.length?e((function(){return{listVoucher:t}})):e((function(){return{listVoucher:t,lastVoucherApplied:null}}))},setAppliedVoucher:function(t){e(t?function(){return{appliedVoucher:t,lastVoucherApplied:t}}:function(){return{appliedVoucher:t}})},setLastVoucherApplied:function(t){e((function(){return{lastVoucherApplied:t}}))},setReferralData:function(t){e((function(){return{referralData:t}}))},setAppliedReferralCode:function(t){e((function(){return{appliedReferralCode:t}}))},setVoucherStore:function(t,n){e(t,n)}})})),d={selectedOptionalCharge:[]},f=(0,a.vt)((function(e,t){return(0,i.A)((0,r.A)({},d),{toggleOptionalCharge:function(n){var r=t().selectedOptionalCharge,i=r.includes(n);e((function(){return{selectedOptionalCharge:i?r.filter((function(e){return e!==n})):(0,o.A)(r).concat([n])}}))},setSelectedOptionalCharge:function(t){e((function(){return{selectedOptionalCharge:t}}))},resetExtraChargeStore:function(){e((function(){return(0,r.A)({},d)}))},setExtraChargeStore:function(t,n){e(t,n)}})}))},73:function(e,t,n){n.d(t,{Kt:function(){return a},dm:function(){return c}});var r,i=n(38971),o=n(92793),a=(r={},(0,i.A)(r,o.L.Vietnam,"https://m.me/hellobacsi"),(0,i.A)(r,o.L.Malaysia,"https://m.me/HelloDoktorMY"),r),c=(0,i.A)({},o.L.Malaysia,"https://api.whatsapp.com/send/?phone=60163469577&text&type=phone_number&app_absent=0");(0,i.A)({},o.L.Vietnam,"https://zalo.me/3186943975751313634")}}]);