"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)}}()}},14265:function(e,t,n){n.d(t,{L:function(){return a},V:function(){return o}});var r,i=n(38971),o={vaccine:"Vaccination",vaccine_package:"Vaccination Package",screener:"Health Screener",ivf:"IVF",egg_freezing:"Egg Freezing",weight_loss:"Weight Loss"},a=(r={vaccine:o.vaccine},(0,i.A)(r,"vaccine-package",o.vaccine_package),(0,i.A)(r,"screener",o.screener),(0,i.A)(r,"ivf",o.ivf),(0,i.A)(r,"egg-freezing",o.egg_freezing),(0,i.A)(r,"weight_loss",o.weight_loss),r)},60785:function(e,t,n){n.d(t,{F:function(){return f}});var r=n(2445),i=n(19250),o=n(54840),a=n(36814),c=n(32485),l=n.n(c),u=n(73419),s=n(32876),d=n.n(s),f=function(e){var t,n=e.customSize,a=(0,u.$)().locale,c=null===(t=o.L[a])||void 0===t?void 0:t.LOGO_TYPE;return(0,r.Y)(d(),{href:"/",children:(0,r.Y)("a",{href:"/",className:"block text-[0px]",children:(0,r.Y)(i.L,{customSize:n,type:c})})})};t.A=function(e){var t=e.className,n=e.customSize;return(0,r.Y)(a.a,{className:l()("p-4 sticky top-0 bg-white z-10",t),children:(0,r.Y)(f,{customSize:n})})}},9934:function(e,t,n){n.d(t,{A:function(){return w}});var r=n(53513),i=n(53455),o=n(2445),a=n(73884),c=n(35291),l=n(87923),u=n(1657),s=n(36814),d=n(94858),f=n(51387),p=n(48085),h=n(73827),m=n(30686),g=n(6442),v=n(42280),y=n(95204),b=function(e){var t=e.collapsed,n=void 0===t||t,r=e.content,i=e.className,a=e.style,c=(0,g.A)().formatMessage,l=(null===r||void 0===r?void 0:r.split("\n").filter(Boolean))||[];if(!l.length)return null;if(1===(null===l||void 0===l?void 0:l.length))return(0,o.Y)("p",{className:(0,d.A)(i,"payment__listItemDescription text-[13px] leading-5 tracking-[-0.3px] text-gray700 [&>b]: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))}))})]})},x=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 w=function(e){var t=e.loading,n=e.options,w=e.defaultValue,C=e.onChange,A=e.className,V=e.style,N=(0,v.Jf)(),k=N.selectedPaymentValue,E=N.setSelectedPaymentValue,Y=N.openOnlineBanking,I=N.setOpenOnlineBanking,P=N.selectedSubPaymentValue,D=N.setSelectedSubPaymentValue,S=(0,g.A)().formatMessage,H=(0,a.useMemo)((function(){var e,t=null===n||void 0===n?void 0:n.find((function(e){return k===_(e)}));return t&&(null===(e=t.sub_payment_methods)||void 0===e?void 0:e.length)?(P||I(!0),t.sub_payment_methods.filter((function(e){return e.is_active}))):[]}),[k]),L=(0,a.useMemo)((function(){return H.find((function(e){return e.code===P}))}),[P,H]),F=(0,a.useCallback)((function(e){E(e),D(""),null===C||void 0===C||C(e)}),[n,C]),M=(0,a.useCallback)((function(){I(!1),P||F("")}),[P,F]),R=(0,a.useCallback)((function(e){I(!1),D("".concat(e))}),[]);return t?(0,o.FD)(s.a,{className:(0,d.A)(A,"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:w,value:k,onChange:F,className:(0,d.A)(A,"payment__list","p-4 flex flex-col gap-2","border border-solid border-[rgba(0,0,0,0.1)] rounded-xl"),style:V,children:n.map((function(e,t){var r,i=e.logo,f=e.title,g=e.description,v=e.provider,x=i||(null===y.pf||void 0===y.pf?void 0:y.pf[v])||y.uY.HHG,w=_(e);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}),(0,o.Y)(b,{content:g,collapsed:w!==k})]}),(0,o.Y)(m.s,{value:w,checked:w===k,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)&&L&&(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===L||void 0===L?void 0:L.logo,className:"w-8 h-6"}),(0,o.Y)("p",{className:"m-0 flex-1 min-w-0",children:null===L||void 0===L?void 0:L.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 I(!0)},className:"flex items-center text-primary600 !text-[13px] !leading-5 tracking-[-0.3px] cursor-pointer",children:[S({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)(x.R,{open:Y,onOpen:M,options:H.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(P),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:R})]}):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)({}),y=(0,a.useRef)(null),b=(0,a.useState)(null),x=b[0],_=b[1],w=(0,a.useState)({w:1600,h:72}),C=w[0],A=w[1],V=(0,a.useCallback)((function(e){requestAnimationFrame((function(){var t,n=v.current[e],r=y.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:N(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)({},C),{active:x,className:"payment__tabsNav-svg"})),u]})},"".concat(d,"-").concat(n))}))})})})}):null}},42280:function(e,t,n){n.d(t,{Jf:function(){return c},Ou:function(){return l},Zb:function(){return u}});var r=n(53513),i=n(63538),o=n(44745),a=n(95204),c=(0,o.vt)()((function(e){return{currentStep:a.RZ.ONE,setCurrentStep:function(t){return e((function(){return{currentStep:t}}))},providers:[],setProviders:function(t){return e((function(){return{providers:t}}))},setPaymentResult:function(t){return e((function(){return{paymentResult:t}}))},computedPrice:a.vp,setComputedPrice:function(t){return e((function(){return{computedPrice:t}}))},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}}))}}})),l={loading:!1,isOpenVoucher:!1,openResult:!1,listVoucher:[],appliedVoucher:null,lastVoucherApplied:null,referralData:null,appliedReferralCode:"",voucherCount:1},u=(0,o.vt)((function(e){return(0,i.A)((0,r.A)({},l),{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)}})}))},95204:function(e,t,n){n.d(t,{FL:function(){return k},IL:function(){return y},J8:function(){return N},LJ:function(){return E},O7:function(){return s},OP:function(){return b},RZ:function(){return d},SE:function(){return Y},W:function(){return x},XS:function(){return p},Y$:function(){return P},b_:function(){return D},jX:function(){return V},km:function(){return C},kx:function(){return _},lW:function(){return A},pf:function(){return m},q:function(){return g},tz:function(){return I},uY:function(){return h},vp:function(){return f},w7:function(){return w},yi:function(){return v}});var r=n(24537),i=n(52194),o=n(66405),a=n(14265),c=n(27317),l=n(40959);function u(){var e=(0,r.A)(["\n .PhoneInputCountry {\n pointer-events: none;\n }\n .PhoneInputCountryIconCallingCode {\n font-size: 15px;\n line-height: 24px;\n font-weight: 500;\n }\n .mantine-Select-rightSection {\n svg {\n position: relative;\n bottom: -10px;\n }\n }\n div .PhoneInput .PhoneInputInput {\n font-weight: 500;\n line-height: 24px;\n font-size: 15px;\n }\n\n .form--phone_field .PhoneInputCountry {\n display: flex;\n gap: 4px;\n align-items: center;\n justify-content: flex-start;\n }\n\n .form--phone_field .PhoneInputCountry .PhoneInputCountryIcon {\n width: 100%;\n display: flex;\n gap: 4px;\n align-items: center;\n box-shadow: none;\n background: transparent;\n }\n"]);return u=function(){return e},e}var s,d={RESULT:0,ONE:1,TWO:2},f={original_price:0,final_price:0,voucher_discount_value:0,referral_discount_value:0,tax_amount:"0",tax_unit:"%",tax_computed:0,show_delivery_fee:!1,delivery_fee:0,delivery_fee_currency:"VND",prescription_required:!1,prescription_max_files:3},p="".concat(l.JpE,"/images/default-image.jpg"),h={"Golden Healthcare":i.C.getAssetPath("payment/GoldenHealthcare.jpg"),CIH:i.C.getAssetPath("payment/CIH.jpg"),HHG:i.C.getAssetPath("payment/HHG_short.jpg"),"Long Chau":i.C.getAssetPath("payment/LongChau.jpg"),"Nhi \u0110\u1ed3ng 315":i.C.getAssetPath("payment/NhiDong315.jpg"),"Sim Med":i.C.getAssetPath("payment/SIMMed.jpg"),VNVC:i.C.getAssetPath("payment/VCNV.jpg"),VinMec:i.C.getAssetPath("payment/VinMec.jpg"),"\u0110H Y D\u01b0\u1ee3c 1":i.C.getAssetPath("payment/YDuoc.jpg"),"Columbia Asia":i.C.getAssetPath("payment/ColumbiaAsia.jpg"),Qualitas:i.C.getAssetPath("payment/Qualitas.jpg")},m={MOMO:i.C.getAssetPath("payment/VTS_MoMo.png")},g=c.Ay.form.withConfig({componentId:"sc-440225ce-0"})(u()),v={backgroundImage:"url('".concat(i.C.getAssetPath("payment/referral_bg.jpg"),"')"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},y={backgroundImage:"url('".concat(i.C.getAssetPath("payment/referral_bg_desktop.jpg"),"')"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},b=function(e,t,n){var r=n.split("?")[0];if(r.includes("/payment"))return"".concat(r.split("/payment")[0],"/");if(r.endsWith("-".concat(t,"/")))return r;var i=l.y1A[l.HgX];return"vi-VN"!==l.HgX?"/".concat(null===i||void 0===i?void 0:i.VACCINATIONS,"/").concat(e,"-").concat(t,"/"):"/".concat(null===i||void 0===i?void 0:i.SERVICE,"/").concat(null===i||void 0===i?void 0:i.VACCINATIONS,"/").concat(e,"-").concat(t,"/")},x=function(e,t,n){var r=n.split("?")[0];if(r.includes("/payment"))return"".concat(r.split("/payment")[0],"/");if(r.endsWith("-".concat(t,"/")))return r;var i=l.y1A[l.HgX];return"vi-VN"!==l.HgX?"/".concat(null===i||void 0===i?void 0:i.HEALTH_SCREENER,"/").concat(e,"-").concat(t,"/"):"/".concat(null===i||void 0===i?void 0:i.SERVICE,"/").concat(null===i||void 0===i?void 0:i.HEALTH_SCREENER,"/").concat(e,"-").concat(t,"/")},_=function(e,t,n){var r=n.split("?")[0];if(r.includes("/payment"))return"".concat(r.split("/payment")[0],"/");if(r.endsWith("-".concat(t,"/")))return r;var i=l.y1A[l.HgX];return"/".concat(null===i||void 0===i?void 0:i.WEIGHT_LOSS,"/").concat(e,"-").concat(t,"/")},w=function(e,t,n){var r=n.split("?")[0];if(r.includes("/payment"))return"".concat(r.split("/payment")[0],"/");if(r.endsWith("-".concat(t,"/")))return r;var i=l.y1A[l.HgX];return"vi-VN"!==l.HgX?"/".concat(null===i||void 0===i?void 0:i.EGG_FREEZING,"/").concat(e,"-").concat(t,"/"):"/".concat(null===i||void 0===i?void 0:i.SERVICE,"/").concat(null===i||void 0===i?void 0:i.EGG_FREEZING,"/").concat(e,"-").concat(t,"/")},C=function(e,t,n){var r=n.split("?")[0];if(r.includes("/payment"))return"".concat(r.split("/payment")[0],"/");if(r.endsWith("-".concat(t,"/")))return r;var i=l.y1A[l.HgX];return"vi-VN"!==l.HgX?"/".concat(null===i||void 0===i?void 0:i.IVF,"/").concat(e,"-").concat(t,"/"):"/".concat(null===i||void 0===i?void 0:i.SERVICE,"/").concat(null===i||void 0===i?void 0:i.IVF,"/").concat(e,"-").concat(t,"/")};function A(e,t,n){navigator.clipboard?navigator.clipboard.writeText(e).then(t,n):function(e,t,n){var r=document.createElement("textarea");r.value=e,r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy"),t()}catch(i){n()}document.body.removeChild(r)}(e,t,n)}!function(e){e.VOUCHER="VOUCHER",e.REFERRAL="REFERRAL"}(s||(s={}));var V=function(e){return a.L[e.product_type]===a.V.weight_loss},N=function(e){return a.L[e.product_type]===a.V.screener},k=function(e){return a.L[e.product_type]===a.V.ivf},E=function(e){return a.L[e.product_type]===a.V.egg_freezing},Y=function(e,t){if(!e)return t({id:"booking.question.idPassport.required",defaultMessage:"Please enter your ID/Passport number"});if(l.HgX===o.L.Malaysia){if(!/^\d{6}-\d{2}-\d{4}$/.test(e)&&!/^[A-Za-z]\d{8}$/.test(e))return t({id:"booking.question.idPassport.invalid",defaultMessage:"Please enter a valid ID/Passport number (Format: XXXXXX-XX-XXXX for ID or A12345678 for Passport)"})}if(l.HgX===o.L.Vietnam){if(!/^\d{12}$/.test(e)&&!/^[A-Za-z]\d{7}$/.test(e))return t({id:"booking.question.idPassport.invalid",defaultMessage:"Please enter a valid ID/Passport number (Format: XXXXXX-XX-XXXX for ID or A12345678 for Passport)"})}return""},I=function(e,t){if(!e)return t({id:"common.error.requiredField"});if(e.length>200)return t({id:"booking.question.addressLine.maxLength",defaultMessage:"Address must not exceed {count} characters"},{count:200});if(l.HgX===o.L.Vietnam&&!/^[a-zA-Z0-9\s,\-/#a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1eade\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7i\xec\xed\u1ec9\u0129\u1ecbo\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edd\u1edb\u1edf\u1ee1\u1ee3u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1y\u1ef3\xfd\u1ef7\u1ef9\u1ef5A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eacE\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6I\xcc\xcd\u1ec8\u0128\u1ecaO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1edc\u1eda\u1ede\u1ee0\u1ee2U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0Y\u1ef2\xdd\u1ef6\u1ef8\u1ef4\u0111\u0110]+$/.test(e))return t({id:"booking.question.addressLine.invalid",defaultMessage:"Address can only contain letters, numbers, spaces, and these characters: , - / #"});return l.HgX!==o.L.Malaysia||/^[a-zA-Z0-9\s,\-/#]+$/.test(e)?"":t({id:"booking.question.addressLine.invalid",defaultMessage:"Address can only contain letters, numbers, spaces, and these characters: , - / #"})},P=function(e,t){if(!e)return t({id:"common.error.requiredField",defaultMessage:"This field is required"});if(e.length>100)return t({id:"booking.question.city.maxLength",defaultMessage:"City must not exceed {count} characters"},{count:100});if(l.HgX===o.L.Vietnam){if(!/^[a-zA-Z\sa\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1eade\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7i\xec\xed\u1ec9\u0129\u1ecbo\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edd\u1edb\u1edf\u1ee1\u1ee3u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1y\u1ef3\xfd\u1ef7\u1ef9\u1ef5A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eacE\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6I\xcc\xcd\u1ec8\u0128\u1ecaO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1edc\u1eda\u1ede\u1ee0\u1ee2U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0Y\u1ef2\xdd\u1ef6\u1ef8\u1ef4\u0111\u0110]+$/.test(e))return t({id:"booking.question.city.invalid",defaultMessage:"City can only contain letters and spaces"})}else if(!/^[a-zA-Z\s]+$/.test(e))return t({id:"booking.question.city.invalid",defaultMessage:"City can only contain letters and spaces"});return""},D=function(e,t){if(!e)return t({id:"common.error.requiredField",defaultMessage:"This field is required"});return/^\d{5}$/.test(e)?"":t({id:"booking.question.zipCode.invalid",defaultMessage:"Please enter a valid 5-digit postal code"})}},73:function(e,t,n){n.d(t,{Kt:function(){return a},dm:function(){return c}});var r,i=n(38971),o=n(66405),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")}}]);