"use strict";(self.webpackChunkhhgHealthCareV1=self.webpackChunkhhgHealthCareV1||[]).push([[8754],{84655:function(e,t,n){n.d(t,{W:function(){return r}});var a=n(858),i=n(83776),r={cached:{},clearCached:function(e){console.log(r.cached),Object.keys(r.cached).filter((function(t){return t.startsWith(e)})).forEach((function(e){console.log(e),r.cached[e]=void 0}))},withCached:function(){var e=(0,a.A)((function(e,t){var n,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:if("waitingTheFirstResponse"===r.cached[e])return[2,new Promise((function(t){var n=(new Date).getTime(),a=setInterval((function(){(new Date).getTime()-n>3e3&&clearInterval(a),"object"===typeof r.cached[e]&&(t(r.cached[e]),clearInterval(a))}),100)}))];if("object"===typeof r.cached[e])return[2,r.cached[e]];r.cached[e]="waitingTheFirstResponse",i.label=1;case 1:return i.trys.push([1,3,,4]),[4,t()];case 2:return n=i.sent(),r.cached[e]=n,setTimeout((function(){r.cached[e]=void 0}),18e5),[2,n];case 3:return a=i.sent(),r.cached[e]=void 0,[2,Promise.reject(a)];case 4:return[2]}}))}));return function(t,n){return e.apply(this,arguments)}}()}},48894:function(e,t,n){n.d(t,{F:function(){return h}});var a=n(858),i=n(53513),r=n(53455),o=n(83776),l=n(84886),c=n(94886),s=n.n(c),d=n(13306),u=n(40959),p=s().create({baseURL:"".concat(u.Yif,"api")});p.interceptors.request.use(l.HH,l.DV),p.interceptors.response.use(l.U1,l.DV);var f=function(){var e=(0,a.A)((function(e){var t,n,a,l,c,s,u,f,h,m,g,_,y,x;return(0,o.__generator)(this,(function(o){return t=e.source_type,n=void 0===t?d.Y1.VACCINATION:t,a=e.widget_type,l=void 0===a?d.xO.STANDALONE_CTA_BUTTON:a,c=e.article_id,s=void 0===c?"":c,u=e.article_name,f=void 0===u?"NA":u,h=e.category_id,m=void 0===h?"":h,g=e.category_name,_=void 0===g?"NA":g,y=e.area_code,x=(0,r.A)(e,["source_type","widget_type","article_id","article_name","category_id","category_name","area_code"]),[2,p.post("/collection/cta-submit",(0,i.A)({source_type:n,widget_type:l,article_id:s,article_name:f,category_id:m,category_name:_,area_code:(null===y||void 0===y?void 0:y.includes("+"))?y:"+".concat(y)},x)).then((function(e){return 200===e.status}))]}))}));return function(t){return e.apply(this,arguments)}}(),h={collectionSubmitCTA:f}},14265:function(e,t,n){n.d(t,{L:function(){return o},V:function(){return r}});var a,i=n(38971),r={vaccine:"Vaccination",vaccine_package:"Vaccination Package",screener:"Health Screener",ivf:"IVF",egg_freezing:"Egg Freezing",weight_loss:"Weight Loss"},o=(a={vaccine:r.vaccine},(0,i.A)(a,"vaccine-package",r.vaccine_package),(0,i.A)(a,"screener",r.screener),(0,i.A)(a,"ivf",r.ivf),(0,i.A)(a,"egg-freezing",r.egg_freezing),(0,i.A)(a,"weight_loss",r.weight_loss),a)},20394:function(e,t,n){n.d(t,{Y:function(){return C}});var a,i=n(38971),r=n(2445),o=n(73),l=n(35291),c=n(15762),s=n(55549),d=n(25403),u=n(26273),p=n(48085),f=n(36814),h=n(94858),m=n(88491),g=n(73419),_=n(6442),y=n(12034),x=(a={},(0,i.A)(a,u.L.Vietnam,{label:"Zalo",icon:s.C.getAssetPath("zalo-mini.png")}),(0,i.A)(a,u.L.Malaysia,{label:"WhatsApp",icon:s.C.getAssetPath("whatsapp.svg")}),a),v="CustomerSupport",b={root:{borderColor:"".concat(l.w.colors.gray200," !important")},label:{color:l.w.colors.gray700,fontSize:(0,p.D)(13),fontWeight:600,lineHeight:(0,p.D)(20),letterSpacing:(0,p.D)(-.3)}},C=function(e){var t=e.className,n=e.style,a=(0,m.d)().isMobile,i=(0,_.A)().formatMessage,l=(0,g.$)(),u=l.locale,p=l.push,C=(0,y.ZN)(),w=C.isOpenPopupCollection,Y=C.setIsOpenPopupCollection,N=C.onSubmitPopupCollection,k=o.Kt[u]||"",A=o.dm[u]||"",D=(null===x||void 0===x?void 0:x[u])||{},M=D.icon,F=D.label;return(0,r.Y)(r.FK,{children:(0,r.FD)(f.a,{className:(0,h.A)(v,"pt-6 pb-7 px-4 bg-white lg:pb-6 lg:rounded-b-2xl",t),style:n,children:[(0,r.Y)("h2",{className:"".concat(v,"__title text-[17px] leading-6 tracking-[-0.4px] text-dark font-semibold mb-4"),children:i({id:"vaccination.payment.customer_support_title",defaultMessage:"Customer Support"})}),(0,r.Y)("p",{className:"".concat(v,"__desc text-[13px] leading-5 tracking-[-0.3px] text-gray700 mb-4 lg:mb-5"),children:i({id:"vaccination.payment.customer_support_desc",defaultMessage:"For any questions or concerns regarding your booking, appointment scheduling, or cancellations, please contact the HelloBacsi customer care team via Zalo or Facebook Messenger."})}),(0,r.FD)("div",{className:"".concat(v,"__footer flex gap-2"),children:[!!k&&(0,r.Y)(d.B,{"data-testid":"customer_support_button_1",variant:"tertiary",size:"lg",className:"".concat(v,"__button_1 flex-1 min-w-0"),onClick:function(){return p(k)},styles:b,leftIcon:(0,r.Y)("img",{src:s.C.getAssetPath("messenger.png"),className:"w-[23px] h-[23px]"}),children:"Messenger"}),!!M&&!!F&&(0,r.Y)(d.B,{"data-testid":"customer_support_button_2",variant:"tertiary",size:"lg",className:"".concat(v,"__button_2 flex-1 min-w-0"),onClick:function(){"Zalo"!==F?p(A):Y(!0)},styles:b,leftIcon:(0,r.Y)("img",{src:M,className:"w-[23px] h-[23px] rounded-md"}),children:F})]}),(0,r.Y)(c.P,{onOpenChange:Y,isOpen:w,isMobile:a,onSubmit:N})]})})}},60785:function(e,t,n){n.d(t,{F:function(){return p}});var a=n(2445),i=n(64563),r=n(6533),o=n(36814),l=n(32485),c=n.n(l),s=n(73419),d=n(32876),u=n.n(d),p=function(e){var t,n=e.customSize,o=(0,s.$)().locale,l=null===(t=r.L[o])||void 0===t?void 0:t.LOGO_TYPE;return(0,a.Y)(u(),{href:"/",children:(0,a.Y)("a",{href:"/",className:"block text-[0px]",children:(0,a.Y)(i.L,{customSize:n,type:l})})})};t.A=function(e){var t=e.className,n=e.customSize;return(0,a.Y)(o.a,{className:c()("p-4 sticky top-0 bg-white z-10",t),children:(0,a.Y)(p,{customSize:n})})}},86706:function(e,t,n){n.d(t,{T:function(){return c}});var a=n(73884),i=n(84091),r=n(73419),o=n(6442),l=n(42280),c=function(){var e=(0,r.$)().locale,t=(0,o.A)().formatMessage,n=(0,l.Jf)(),c=n.vaccinationDetail,s=n.computedPrice,d=(c||{}).price_unit,u=void 0===d?"":d,p=(0,a.useCallback)((function(n,a,r){return"%"===n&&a?"".concat(r,"%"):a?(0,i.nd)(t,(0,i.$g)(a,e),u):""}),[u,e]),f=(0,a.useMemo)((function(){return(null===s||void 0===s?void 0:s.show_delivery_fee)?(0,i.nd)(t,(0,i.$g)(s.delivery_fee,e),s.delivery_fee_currency):""}),[s.delivery_fee,s.delivery_fee_currency,e]);return c?{displayTotalPrice:(0,i.nd)(t,(0,i.$g)(s.final_price,e),u),displayShippingFee:f,displayPriceWithUnit:(0,i.nd)(t,(0,i.$g)(s.original_price,e),u),displayDiscountPrice:s.voucher_discount_value+s.referral_discount_value>0?(0,i.nd)(t,(0,i.$g)(s.voucher_discount_value+s.referral_discount_value,e),u):"",displayDiscountReferral:(0,i.nd)(t,(0,i.$g)(s.referral_discount_value,e),u),displayTaxPrice:p(s.tax_unit,s.tax_computed,s.tax_amount),displayPricePayTenPercentage:(0,i.nd)(t,(0,i.$g)(Math.floor(.1*s.final_price)),u),displayPriceRemaining:(0,i.nd)(t,(0,i.$g)(s.final_price-Math.floor(.1*s.final_price)),u),getDisplayTaxPrice:p}:{displayTotalPrice:"",displayShippingFee:"",displayPriceWithUnit:"",displayDiscountPrice:"",displayDiscountReferral:"",displayTaxPrice:"",displayPricePayTenPercentage:"",displayPriceRemaining:"",getDisplayTaxPrice:p}}},4749:function(e,t,n){n.d(t,{Ai:function(){return ne},Ay:function(){return ie},ze:function(){return ae}});var a=n(40568),i=n(2445),r=n(73884),o=n(36814),l=n(51387),c=n(48085),s=n(84655),d=n(59850),u=n(84091),p=n(73419),f=n(6442),h=n(86706),m=n(42280),g=n(53513),_=n(53455),y=n(35291),x=n(66814),v=n(1657),b=n(94858),C=n(73827),w=n(30686),Y=n(95204),N=function(e){var t=e.collapsed,n=void 0===t||t,a=e.content,r=e.className,o=e.style,l=(0,f.A)().formatMessage,c=(null===a||void 0===a?void 0:a.split("\n").filter(Boolean))||[];if(!c.length)return null;if(1===(null===c||void 0===c?void 0:c.length))return(0,i.Y)("p",{className:(0,b.A)(r,"payment__listItemDescription text-[13px] leading-5 tracking-[-0.3px] text-gray700 [&>b]:text-green600"),style:o,dangerouslySetInnerHTML:{__html:c[0]}});var s=l({id:"vaccination.payment.offers_number",defaultMessage:"{number} offers"},{number:c.length});return(0,i.FD)("div",{className:(0,b.A)(r,"payment__listItemDescription text-[13px] leading-5 tracking-[-0.3px] text-gray700"),style:o,children:[n&&(0,i.Y)("span",{className:"text-green600",children:s}),!n&&(0,i.Y)("ul",{className:"payment__listItemDescription-list mt-1",children:c.map((function(e,t){return(0,i.Y)("li",{dangerouslySetInnerHTML:{__html:e},className:(0,b.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))}))})]})},k=n(63538),A=n(24537),D=n(85862),M=n(79677),F=n(23005),P=n(63343),E=n(278),S=n(50624),L=n(41145),O=n(88491),I=n(27317),B=function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/A|\xc1|\xc0|\xc3|\u1ea0|\xc2|\u1ea4|\u1ea6|\u1eaa|\u1eac|\u0102|\u1eae|\u1eb0|\u1eb4|\u1eb6/g,"A")).replace(/\xe0|\xe1|\u1ea1|\u1ea3|\xe3|\xe2|\u1ea7|\u1ea5|\u1ead|\u1ea9|\u1eab|\u0103|\u1eb1|\u1eaf|\u1eb7|\u1eb3|\u1eb5/g,"a")).replace(/E|\xc9|\xc8|\u1ebc|\u1eb8|\xca|\u1ebe|\u1ec0|\u1ec4|\u1ec6/,"E")).replace(/\xe8|\xe9|\u1eb9|\u1ebb|\u1ebd|\xea|\u1ec1|\u1ebf|\u1ec7|\u1ec3|\u1ec5/g,"e")).replace(/I|\xcd|\xcc|\u0128|\u1eca/g,"I")).replace(/\xec|\xed|\u1ecb|\u1ec9|\u0129/g,"i")).replace(/O|\xd3|\xd2|\xd5|\u1ecc|\xd4|\u1ed0|\u1ed2|\u1ed6|\u1ed8|\u01a0|\u1eda|\u1edc|\u1ee0|\u1ee2/g,"O")).replace(/\xf2|\xf3|\u1ecd|\u1ecf|\xf5|\xf4|\u1ed3|\u1ed1|\u1ed9|\u1ed5|\u1ed7|\u01a1|\u1edd|\u1edb|\u1ee3|\u1edf|\u1ee1/g,"o")).replace(/U|\xda|\xd9|\u0168|\u1ee4|\u01af|\u1ee8|\u1eea|\u1eee|\u1ef0/g,"U")).replace(/\xf9|\xfa|\u1ee5|\u1ee7|\u0169|\u01b0|\u1eeb|\u1ee9|\u1ef1|\u1eed|\u1eef/g,"u")).replace(/Y|\xdd|\u1ef2|\u1ef8|\u1ef4/g,"Y")).replace(/\u1ef3|\xfd|\u1ef5|\u1ef7|\u1ef9/g,"y")).replace(/\u0110/g,"D")).replace(/\u0111/g,"d")).replace(/\u0300|\u0301|\u0303|\u0309|\u0323/g,"")).replace(/\u02C6|\u0306|\u031B/g,"")},V=function(e){return(0,i.FD)("svg",(0,k.A)((0,g.A)({width:"192",height:"120",fill:"none",viewBox:"0 0 192 120"},e),{children:[(0,i.FD)("g",{clipPath:"url(#clip0_9731_13276)",children:[(0,i.FD)("g",{clipPath:"url(#clip1_9731_13276)",children:[(0,i.Y)("path",{opacity:"0.15",d:"M143.187 42.3193C143.187 42.3193 138.675 7.01269 112.053 32.3966C77.9267 64.935 54.9873 0.264187 29.6712 26.6622C15.8405 41.0832 52.3879 73.3357 27.9794 90.3089C3.57093 107.282 23.5171 119.989 23.5171 119.989H162.115C162.115 119.989 176.463 121.025 177.549 102.87C178.633 84.7145 161.955 84.4945 172.306 61.7748C182.657 39.0551 146.439 56.7804 143.187 42.3193Z",fill:"url(#paint0_linear_9731_13276)"}),(0,i.Y)("mask",{id:"mask0_9731_13276",maskUnits:"userSpaceOnUse",x:"15",y:"20",width:"163",height:"100",children:(0,i.Y)("path",{d:"M143.187 42.3193C143.187 42.3193 138.675 7.01269 112.053 32.3966C77.9267 64.935 54.9873 0.264187 29.6712 26.6622C15.8405 41.0832 52.3879 73.3357 27.9794 90.3089C3.57093 107.282 23.5171 119.989 23.5171 119.989H162.115C162.115 119.989 176.463 121.025 177.549 102.87C178.633 84.7145 161.955 84.4945 172.306 61.7748C182.657 39.0551 146.439 56.7804 143.187 42.3193Z",fill:"url(#paint1_linear_9731_13276)"})}),(0,i.FD)("g",{mask:"url(#mask0_9731_13276)",children:[(0,i.Y)("rect",{opacity:"0.45",x:"47.04",y:"18.24",width:"76.8",height:"68.16",fill:"url(#paint2_linear_9731_13276)"}),(0,i.Y)("path",{opacity:"0.45",d:"M42.8262 91.0101H128.187L125.17 95.4745C124.984 95.7505 124.672 95.9159 124.339 95.9159H46.6739C46.3408 95.9159 46.0294 95.7505 45.8429 95.4745L42.8262 91.0101Z",fill:"url(#paint3_linear_9731_13276)"}),(0,i.Y)("rect",{opacity:"0.45",x:"37.9199",y:"89.0479",width:"95.1722",height:"0.981156",fill:"url(#paint4_linear_9731_13276)"}),(0,i.Y)("rect",{x:"49.2041",y:"24.2914",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"29.1973",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"34.1031",width:"72.6056",height:"1.47174",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"39.0089",width:"72.6056",height:"1.47174",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"43.9146",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"48.8204",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"53.7261",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"58.632",width:"72.6056",height:"1.47174",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"63.5378",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"26.7444",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"31.6501",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"36.5559",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"41.4617",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"46.3674",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"51.2733",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"56.1791",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"61.0849",width:"72.6056",height:"1.47173",fill:"white"}),(0,i.Y)("rect",{x:"49.2041",y:"65.9907",width:"72.6056",height:"1.47174",fill:"white"}),(0,i.Y)("rect",{x:"52.1465",y:"24.2914",width:"0.490578",height:"49.5484",fill:"url(#paint5_linear_9731_13276)"}),(0,i.Y)("path",{d:"M51.5088 73.8507C51.5088 73.5737 51.7333 73.3492 52.0103 73.3492H52.7734C53.0503 73.3492 53.2749 73.5737 53.2749 73.8507V74.9547H51.5088V73.8507Z",fill:"url(#paint6_linear_9731_13276)"}),(0,i.Y)("path",{d:"M50.9563 75.3061C51.022 75.0971 51.2157 74.955 51.4347 74.955H53.3477C53.5667 74.955 53.7604 75.0971 53.8261 75.3061L54.3939 77.1128C54.4955 77.4359 54.2542 77.7646 53.9155 77.7646H50.8669C50.5282 77.7646 50.2869 77.4359 50.3885 77.1128L50.9563 75.3061Z",fill:"url(#paint7_linear_9731_13276)"})]}),(0,i.Y)("path",{d:"M23.3408 119.774H155.408",stroke:"#9CACCE",strokeWidth:"1.4307",strokeMiterlimit:"10"}),(0,i.Y)("path",{d:"M160.033 119.774H176.355",stroke:"#9CACCE",strokeWidth:"1.4307",strokeMiterlimit:"10"}),(0,i.Y)("path",{d:"M148.399 109.213C148.399 109.213 148.233 104.731 151.802 100.248",stroke:"#63D2A4",strokeWidth:"0.822414",strokeMiterlimit:"10"}),(0,i.Y)("path",{d:"M139.767 102.428C143.865 100.829 144.413 109.214 144.413 109.214",stroke:"#63D2A4",strokeWidth:"0.822414",strokeMiterlimit:"10"}),(0,i.Y)("path",{d:"M146.314 109.214L145.632 103.164",stroke:"#63D2A4",strokeWidth:"0.822414",strokeMiterlimit:"10"}),(0,i.Y)("path",{d:"M145.465 93.4348C145.465 93.4348 145.437 98.4198 146.432 99.5437C147.425 100.669 147.041 103.611 145.544 103.478C144.045 103.344 141.881 98.4768 145.465 93.4348Z",fill:"#B0E4CE"}),(0,i.Y)("path",{d:"M135.353 107.621C135.353 107.621 135.296 103.175 138.465 102.191C141.447 101.263 140.856 106.167 135.353 107.621Z",fill:"#B0E4CE"}),(0,i.Y)("path",{d:"M149.878 120.458H143.052C142.871 120.458 142.715 120.339 142.667 120.166L139.781 109.719C139.711 109.466 139.903 109.214 140.166 109.214H152.762C153.027 109.214 153.218 109.466 153.147 109.719L150.261 120.166C150.215 120.339 150.058 120.458 149.878 120.458Z",fill:"url(#paint8_linear_9731_13276)"}),(0,i.Y)("path",{d:"M151.252 104.567C149.49 104.788 148.351 102.757 149.376 101.307C149.42 101.243 149.47 101.179 149.519 101.112C151.186 98.975 153.384 97.601 157.723 99.1388C157.808 99.1682 157.788 99.2951 157.698 99.2951C156.544 99.308 153.638 99.5471 153.355 101.578C153.069 103.642 152.231 104.444 151.252 104.567Z",fill:"#B0E4CE"})]}),(0,i.Y)("path",{d:"M81.6393 82.7881L75.5474 113.358C75.1337 115.434 76.5095 117.495 78.5857 117.909L79.5164 118.094L109.156 124.001C111.232 124.414 113.293 123.039 113.706 120.962L121.125 83.7341L121.325 82.7318C121.739 80.6556 120.363 78.595 118.287 78.1812L95.3769 73.6159",fill:"url(#paint9_linear_9731_13276)"}),(0,i.Y)("path",{d:"M95.377 73.6158L93.0943 85.0707L81.6394 82.788L95.377 73.6158Z",fill:"url(#paint10_linear_9731_13276)"}),(0,i.Y)("path",{d:"M103.679 82.6669L111.214 112.914C111.726 114.968 110.45 117.092 108.395 117.603L107.474 117.833L78.1485 125.138C76.0943 125.65 73.9707 124.373 73.459 122.319L64.2829 85.4847L64.0358 84.493C63.5241 82.4388 64.8006 80.3152 66.8549 79.8035L89.5223 74.1566",fill:"url(#paint11_linear_9731_13276)"}),(0,i.Y)("path",{d:"M89.5225 74.1567L92.3459 85.4905L103.68 82.667L89.5225 74.1567Z",fill:"#9CACCE",stroke:"#9CACCE",strokeWidth:"1.70812",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.Y)("g",{filter:"url(#filter0_d_9731_13276)",children:(0,i.Y)("path",{d:"M114.847 85.3055V116.477C114.847 118.594 113.095 120.346 110.978 120.346H110.029H79.8065C77.6895 120.346 75.9375 118.594 75.9375 116.477V78.5165V77.4945C75.9375 75.3774 77.6895 73.6254 79.8065 73.6254H103.167",fill:"white"})}),(0,i.Y)("path",{d:"M103.166 73.6255V85.3056H114.846L103.166 73.6255Z",fill:"url(#paint12_linear_9731_13276)"}),(0,i.Y)("path",{d:"M119.339 115.684L108.964 109.284L110.433 106.905L120.802 113.314L119.339 115.684Z",fill:"url(#paint13_linear_9731_13276)"}),(0,i.Y)("path",{d:"M124.514 118.909L116.557 113.995C115.893 113.585 115.686 112.71 116.096 112.045C116.506 111.381 117.382 111.174 118.046 111.584L126.003 116.497C126.667 116.907 126.874 117.783 126.464 118.447C126.054 119.112 125.178 119.319 124.514 118.909Z",fill:"url(#paint14_linear_9731_13276)"}),(0,i.Y)("path",{d:"M124.152 119.428L113.915 113.107C113.678 112.96 113.604 112.648 113.749 112.404L115.365 109.787C115.512 109.549 115.824 109.475 116.068 109.621L126.305 115.942C126.543 116.089 126.617 116.4 126.471 116.645L124.856 119.262C124.702 119.501 124.39 119.575 124.152 119.428Z",fill:"url(#paint15_linear_9731_13276)"}),(0,i.Y)("path",{d:"M93.0732 84.5108C84.29 86.588 78.8553 95.3895 80.9324 104.173C83.0081 112.949 91.8111 118.391 100.588 116.315C109.371 114.238 114.806 105.436 112.729 96.6532C110.651 87.8699 101.85 82.4352 93.0732 84.5108ZM99.8978 113.368C92.846 115.036 85.7615 110.582 84.0687 103.424C82.3759 96.2661 86.7164 89.1173 93.7682 87.4496C100.82 85.7819 107.905 90.2357 109.597 97.3937C111.29 104.552 106.943 111.702 99.8978 113.368Z",fill:"url(#paint16_linear_9731_13276)"}),(0,i.Y)("ellipse",{cx:"96.8066",cy:"100.312",rx:"12.8038",ry:"12.9075",transform:"rotate(-13.3056 96.8066 100.312)",fill:"white"}),(0,i.Y)("path",{d:"M101.911 100.736C102.882 100.733 103.711 99.8974 103.708 98.9264C103.704 97.9555 102.869 97.1263 101.898 97.1298C100.927 97.1334 100.098 97.9687 100.101 98.9396C100.105 99.9799 100.871 100.74 101.911 100.736Z",fill:"url(#paint17_linear_9731_13276)"}),(0,i.Y)("path",{d:"M100.857 105.558L99.955 105.562C99.186 103.9 97.1725 103.283 95.5804 104.121C94.9572 104.401 94.4044 104.958 94.1293 105.583L93.2277 105.586C93.9827 103.433 96.4754 102.315 98.559 103.139C99.5315 103.552 100.436 104.381 100.857 105.558Z",fill:"url(#paint18_linear_9731_13276)"}),(0,i.Y)("path",{d:"M91.5957 100.787C92.5666 100.783 93.3958 99.948 93.3923 98.977C93.3887 98.0061 92.5535 97.1769 91.5825 97.1804C90.6115 97.184 89.7823 98.0193 89.7859 98.9902C89.859 100.03 90.6247 100.79 91.5957 100.787Z",fill:"url(#paint19_linear_9731_13276)"})]}),(0,i.FD)("defs",{children:[(0,i.FD)("filter",{id:"filter0_d_9731_13276",x:"52.0238",y:"56.5442",width:"79.9041",height:"87.7153",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,i.Y)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,i.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,i.Y)("feOffset",{dx:"-3.41624",dy:"3.41624"}),(0,i.Y)("feGaussianBlur",{stdDeviation:"10.2487"}),(0,i.Y)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,i.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.67451 0 0 0 0 0.721569 0 0 0 0 0.792157 0 0 0 0.5 0"}),(0,i.Y)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_9731_13276"}),(0,i.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_9731_13276",result:"shape"})]}),(0,i.FD)("linearGradient",{id:"paint0_linear_9731_13276",x1:"15.8398",y1:"20.16",x2:"85.0172",y2:"158.846",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#AACBFA"}),(0,i.Y)("stop",{offset:"1",stopColor:"#C4DFFB"})]}),(0,i.FD)("linearGradient",{id:"paint1_linear_9731_13276",x1:"15.8398",y1:"20.16",x2:"85.0172",y2:"158.846",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#AACBFA"}),(0,i.Y)("stop",{offset:"1",stopColor:"#C4DFFB"})]}),(0,i.FD)("linearGradient",{id:"paint2_linear_9731_13276",x1:"-24.24",y1:"160.8",x2:"39.5585",y2:"-2.45618",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#C5D2EC"}),(0,i.Y)("stop",{offset:"0.9964",stopColor:"#F1F7FE"})]}),(0,i.FD)("linearGradient",{id:"paint3_linear_9731_13276",x1:"-21.4081",y1:"89.515",x2:"16.553",y2:"174.13",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#C5D2EC"}),(0,i.Y)("stop",{offset:"0.9964",stopColor:"#F1F7FE"})]}),(0,i.FD)("linearGradient",{id:"paint4_linear_9731_13276",x1:"50.4188",y1:"89.0648",x2:"50.9681",y2:"97.8677",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B0BBCC"}),(0,i.Y)("stop",{offset:"1",stopColor:"#8D9EB7"})]}),(0,i.FD)("linearGradient",{id:"paint5_linear_9731_13276",x1:"51.7773",y1:"9.19098",x2:"53.026",y2:"9.19233",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B8C5E0"}),(0,i.Y)("stop",{offset:"0.9964",stopColor:"#C9D8E8"})]}),(0,i.FD)("linearGradient",{id:"paint6_linear_9731_13276",x1:"51.7407",y1:"73.3769",x2:"54.2847",y2:"73.8393",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B0BBCC"}),(0,i.Y)("stop",{offset:"1",stopColor:"#8D9EB7"})]}),(0,i.FD)("linearGradient",{id:"paint7_linear_9731_13276",x1:"50.7634",y1:"75.0035",x2:"56.9185",y2:"76.6015",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B0BBCC"}),(0,i.Y)("stop",{offset:"1",stopColor:"#8D9EB7"})]}),(0,i.FD)("linearGradient",{id:"paint8_linear_9731_13276",x1:"139.709",y1:"109.214",x2:"153.362",y2:"113.326",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#81A8FB"}),(0,i.Y)("stop",{offset:"1",stopColor:"#4F84F7"})]}),(0,i.FD)("linearGradient",{id:"paint9_linear_9731_13276",x1:"122.246",y1:"78.9702",x2:"79.9207",y2:"79.4292",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#81A8FB"}),(0,i.Y)("stop",{offset:"1",stopColor:"#4F84F7"})]}),(0,i.FD)("linearGradient",{id:"paint10_linear_9731_13276",x1:"104.692",y1:"71.8426",x2:"74.0161",y2:"69.7136",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#C5D2EC"}),(0,i.Y)("stop",{offset:"0.9964",stopColor:"#F1F7FE"})]}),(0,i.FD)("linearGradient",{id:"paint11_linear_9731_13276",x1:"62.9377",y1:"80.7793",x2:"105.237",y2:"79.2303",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#81A8FB"}),(0,i.Y)("stop",{offset:"1",stopColor:"#4F84F7"})]}),(0,i.FD)("linearGradient",{id:"paint12_linear_9731_13276",x1:"94.3767",y1:"70.0658",x2:"124.878",y2:"73.9731",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#C5D2EC"}),(0,i.Y)("stop",{offset:"0.9964",stopColor:"#F1F7FE"})]}),(0,i.FD)("linearGradient",{id:"paint13_linear_9731_13276",x1:"100.008",y1:"106.053",x2:"127.744",y2:"103.135",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#C5D2EC"}),(0,i.Y)("stop",{offset:"0.9964",stopColor:"#F1F7FE"})]}),(0,i.FD)("linearGradient",{id:"paint14_linear_9731_13276",x1:"108.019",y1:"110.572",x2:"131.735",y2:"107.625",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B8C5E0"}),(0,i.Y)("stop",{offset:"0.9964",stopColor:"#C9D8E8"})]}),(0,i.FD)("linearGradient",{id:"paint15_linear_9731_13276",x1:"118.764",y1:"108.831",x2:"121.457",y2:"120.218",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#FFB52E"}),(0,i.Y)("stop",{offset:"1",stopColor:"#E69603"})]}),(0,i.FD)("linearGradient",{id:"paint16_linear_9731_13276",x1:"93.0699",y1:"84.5116",x2:"100.591",y2:"116.314",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#FFB52E"}),(0,i.Y)("stop",{offset:"1",stopColor:"#E69603"})]}),(0,i.FD)("linearGradient",{id:"paint17_linear_9731_13276",x1:"100.569",y1:"97.1971",x2:"105.796",y2:"98.041",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B0BBCC"}),(0,i.Y)("stop",{offset:"1",stopColor:"#8D9EB7"})]}),(0,i.FD)("linearGradient",{id:"paint18_linear_9731_13276",x1:"94.2198",y1:"102.925",x2:"103.562",y2:"107.237",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B0BBCC"}),(0,i.Y)("stop",{offset:"1",stopColor:"#8D9EB7"})]}),(0,i.FD)("linearGradient",{id:"paint19_linear_9731_13276",x1:"90.2532",y1:"97.2477",x2:"95.4801",y2:"98.0916",gradientUnits:"userSpaceOnUse",children:[(0,i.Y)("stop",{stopColor:"#B0BBCC"}),(0,i.Y)("stop",{offset:"1",stopColor:"#8D9EB7"})]}),(0,i.Y)("clipPath",{id:"clip0_9731_13276",children:(0,i.Y)("rect",{width:"192",height:"120",fill:"white"})}),(0,i.Y)("clipPath",{id:"clip1_9731_13276",children:(0,i.Y)("rect",{width:"161.909",height:"99.89",fill:"white",transform:"translate(15.8398 20.16)"})})]})]}))};function T(){var e=(0,A.A)(["\n .resultIconContainer {\n margin-bottom: 16px;\n }\n\n .resultDescription {\n color: #8c8c8c;\n font-size: 15px;\n font-weight: 600;\n line-height: 24px;\n letter-spacing: -0.3px;\n }\n"]);return T=function(){return e},e}function R(){var e=(0,A.A)(["\n .drawer__handle {\n margin-block: 16px;\n width: 44px;\n height: 3px;\n background-color: #9aa2ac;\n }\n\n &.drawer__content[data-vaul-drawer-direction='bottom'] {\n max-height: calc(100% - var(--snap-point-height));\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n }\n\n ","\n"]);return R=function(){return e},e}function U(){var e=(0,A.A)(["\n .mantine-Modal-content {\n display: flex;\n flex-direction: column;\n overflow: hidden;\n max-width: 400px;\n max-height: 550px;\n }\n\n .mantine-Modal-header {\n padding: 16px 24px;\n .mantine-Modal-close {\n width: 24px;\n height: 24px;\n }\n }\n\n .mantine-Modal-body {\n display: flex;\n flex-direction: column;\n padding: 0;\n flex: 1;\n min-height: 0;\n }\n\n ","\n"]);return U=function(){return e},e}function j(){var e=(0,A.A)(["\n .mantine-TextInput-input[data-with-icon] {\n padding-left: 44px;\n border-radius: 16px;\n border-color: #e4e8ec;\n font-size: 13px;\n line-height: 20px;\n box-shadow: 0px 0px 1px 0px #0000000a, 0px 2px 8px 0px #0000000a,\n 0px 10px 16px 0px #0000000a;\n &:placeholder {\n color: #8c8c8c;\n }\n }\n\n .mantine-TextInput-icon {\n width: 44px;\n padding-left: 16px;\n justify-content: flex-start;\n }\n\n .mantine-TextInput-icon svg {\n width: 20px;\n height: 20px;\n }\n"]);return j=function(){return e},e}var H=(0,I.AH)(T()),G=(0,I.Ay)(M.D).withConfig({componentId:"sc-1d9050e0-0"})(R(),H),z=(0,I.Ay)(F.M).withConfig({componentId:"sc-1d9050e0-1"})(U(),H),Z=function(e){var t=e.defaultOpen,n=e.open,a=e.onOpen,l=e.options,c=(0,_.A)(e,["defaultOpen","open","onOpen","options"]),s=(0,O.d)().isMobile,d=(0,f.A)().formatMessage,u=(0,r.useState)(t),p=u[0],h=u[1],m=(0,r.useState)(.75),y=m[0],x=m[1],v=(0,r.useCallback)((function(){h(false),null===a||void 0===a||a(false)}),[p,a]),b=(0,i.Y)("h4",{className:"text-[15px] leading-6 tracking-[-0.3px] font-semibold lg:text-[17px] lg:tracking-[-0.4px]",children:d({id:"vaccination.payment.online_bank_title",defaultMessage:"Select Your Bank"})});return(0,r.useEffect)((function(){h(n)}),[n]),(null===l||void 0===l?void 0:l.length)?s?(0,i.Y)(G,{open:p,onClose:v,snapPoints:[.75,.95],activeSnapPoint:y,setActiveSnapPoint:x,className:"flex flex-col",overlayClassName:"!bg-[rgba(0,0,0,0.4)]",children:(0,i.FD)(o.a,{className:"flex flex-col flex-1 min-h-0",children:[(0,i.Y)(o.a,{className:"title flex items-center justify-center lg:justify-between py-3 px-6",children:b}),(0,i.Y)(J,(0,k.A)((0,g.A)({options:l},c),{onFocus:function(){p&&x(.95)},onBlur:function(){p&&x(.75)}}))]})}):(0,i.Y)(z,{opened:!!p,onClose:v,title:b,children:(0,i.Y)(J,(0,g.A)({options:l},c))}):null},W=(0,I.Ay)(x.I).withConfig({componentId:"sc-1d9050e0-2"})(j()),$="PaymentMethodOnlineBankingList",J=function(e){var t=e.options,n=e.defaultValue,a=e.value,l=e.onChange,c=e.itemRender,s=e.onBlur,d=e.onFocus,u=(0,f.A)().formatMessage,p=(0,r.useState)(n||a),h=p[0],m=p[1],g=(0,r.useState)(),_=g[0],y=g[1],x=(0,r.useState)(t||[]),v=x[0],C=x[1],w=(0,r.useState)(!1),Y=w[0],N=w[1],k=(0,r.useCallback)((function(e,t){return function(){m(e),null===l||void 0===l||l(e,t)}}),[l]),A=(0,r.useCallback)((function(e){if(y(e),!e)return C(t||[]),void N(!1);N(!0),setTimeout((function(){var n=(t||[]).filter((function(t){return function(e,t){return B(e).includes(B(t))}(t.label.toLocaleLowerCase(),e.toLocaleLowerCase())}));C(n),N(!1)}),400)}),[_,t]);return(0,r.useEffect)((function(){m(a)}),[a]),(0,r.useEffect)((function(){C(t||[])}),[t]),(0,i.FD)(o.a,{className:"".concat($," flex flex-col gap-4 flex-1 min-h-0 md:py-6"),children:[(0,i.Y)(o.a,{className:(0,b.A)("".concat($,"--header px-6")),children:(0,i.Y)(W,{size:"lg",icon:(0,i.Y)(E.A,{}),value:_,onChange:A,placeholder:u({id:"vaccination.payment.search_bank_placeholder",defaultMessage:"Search bank"}),onFocus:d,onBlur:s})}),(0,i.FD)(o.a,{className:"".concat($,"--body flex-1 min-h-0 relative overflow-auto scrollbar-custom"),children:[!!v.length&&(0,i.Y)(S.B,{className:"".concat($,"--list"),children:v.map((function(e,t){var n=e.value,a=e.label;return(0,i.Y)(S.B.Item,{className:(0,b.A)("".concat($,"--item"),"flex items-center justify-between py-3 px-6 cursor-pointer hover:bg-neutral50 transition",{selected:h===n}),onClick:k(n,e),children:c?c(e,t):a},"".concat(t,"-").concat(n))}))}),!v.length&&(0,i.Y)(o.a,{className:"h-full flex flex-col items-center justify-start py-12",children:(0,i.Y)(P.Q7,{icon:function(){return(0,i.Y)(V,{className:"text-[120px]"})},description:u({id:"common.noSearchResult"})})}),Y&&(0,i.Y)(L.P.div,{className:"absolute inset-0 z-[1] flex items-start justify-center py-12 bg-[rgba(255,255,255,0.5)]",initial:{opacity:0,pointerEvents:"none"},exit:{opacity:0,pointerEvents:"none"},animate:{opacity:1,pointerEvents:"auto"},children:(0,i.Y)(D.V7n,{fontSize:32})})]})]})};function K(e){var t=e.provider,n=e.payment_via,a=e.payment_type,i=e.title;return"".concat(t,"-").concat(n,"-").concat(a,"-").concat(i)}var q=function(e){var t=e.loading,n=e.options,a=e.defaultValue,s=e.onChange,d=e.className,u=e.style,p=(0,m.Jf)(),h=p.selectedPaymentValue,k=p.setSelectedPaymentValue,A=p.openOnlineBanking,D=p.setOpenOnlineBanking,M=p.selectedSubPaymentValue,F=p.setSelectedSubPaymentValue,P=(0,f.A)().formatMessage,E=(0,r.useMemo)((function(){var e,t=null===n||void 0===n?void 0:n.find((function(e){return h===K(e)}));return t&&(null===(e=t.sub_payment_methods)||void 0===e?void 0:e.length)?(M||D(!0),t.sub_payment_methods.filter((function(e){return e.is_active}))):[]}),[h]),S=(0,r.useMemo)((function(){return E.find((function(e){return e.code===M}))}),[M,E]),L=(0,r.useCallback)((function(e){k(e),F(""),null===s||void 0===s||s(e)}),[n,s]),O=(0,r.useCallback)((function(){D(!1),M||L("")}),[M,L]),I=(0,r.useCallback)((function(e){D(!1),F("".concat(e))}),[]);return t?(0,i.FD)(o.a,{className:(0,b.A)(d,"payment__list","p-4 flex flex-col gap-2","border border-solid border-[rgba(0,0,0,0.1)] rounded-xl"),children:[(0,i.FD)("label",{className:"payment__listItem flex justify-between py-2",children:[(0,i.Y)(l.E,{width:24,height:24,radius:3,mr:(0,c.D)(8)}),(0,i.FD)("div",{className:"flex-1 min-w-0",children:[(0,i.Y)(l.E,{width:"100%",height:18,radius:5}),(0,i.Y)(l.E,{width:"30%",height:16,radius:5,mt:4})]}),(0,i.Y)(l.E,{width:16,height:16,circle:!0,ml:(0,c.D)(12)})]}),(0,i.Y)(C.c,{color:"rgba(0,0,0,0.1)"}),(0,i.FD)("label",{className:"payment__listItem flex justify-between py-2",children:[(0,i.Y)(l.E,{width:24,height:24,radius:3,mr:(0,c.D)(8)}),(0,i.FD)("div",{className:"flex-1 min-w-0",children:[(0,i.Y)(l.E,{width:"100%",height:18,radius:5}),(0,i.Y)(l.E,{width:"30%",height:16,radius:5,mt:4})]}),(0,i.Y)(l.E,{width:16,height:16,circle:!0,ml:(0,c.D)(12)})]}),(0,i.Y)(C.c,{color:"rgba(0,0,0,0.1)"}),(0,i.FD)("label",{className:"payment__listItem flex justify-between py-2",children:[(0,i.Y)(l.E,{width:24,height:24,radius:3,mr:(0,c.D)(8)}),(0,i.FD)("div",{className:"flex-1 min-w-0",children:[(0,i.Y)(l.E,{width:"100%",height:18,radius:5}),(0,i.Y)(l.E,{width:"30%",height:16,radius:5,mt:4})]}),(0,i.Y)(l.E,{width:16,height:16,circle:!0,ml:(0,c.D)(12)})]})]}):n&&n.length?(0,i.FD)(i.FK,{children:[(0,i.Y)(w.s.Group,{defaultValue:a,value:h,onChange:L,className:(0,b.A)(d,"payment__list","p-4 flex flex-col gap-2","border border-solid border-[rgba(0,0,0,0.1)] rounded-xl"),style:u,children:n.map((function(e,t){var a,l=e.logo,s=e.title,d=e.description,u=e.provider,p=l||(null===Y.pf||void 0===Y.pf?void 0:Y.pf[u])||Y.uY.HHG,f=K(e);return(0,i.FD)(r.Fragment,{children:[(0,i.FD)("label",{className:"payment__listItem flex justify-between py-2 cursor-pointer",children:[(0,i.Y)("img",{src:p,alt:s,className:(0,b.A)("payment__listItemLogo","w-6 h-6 object-contain object-center mr-3")}),(0,i.FD)("div",{className:"payment__listItemContent flex-1 min-w-0 mr-4",children:[(0,i.Y)("p",{className:"payment__listItemTitle text-[15px] leading-6 tracking-[-0.3px] font-medium text-dark mb-0",children:s}),(0,i.Y)(N,{content:d,collapsed:f!==h})]}),(0,i.Y)(w.s,{value:f,checked:f===h,styles:{root:{marginTop:(0,c.D)(2)},radio:{width:(0,c.D)(16),height:(0,c.D)(16)},icon:{color:y.w.colors.primary600}}})]}),!!(null===(a=e.sub_payment_methods)||void 0===a?void 0:a.length)&&S&&(0,i.FD)(o.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,i.FD)(o.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,i.Y)("img",{src:null===S||void 0===S?void 0:S.logo,className:"w-8 h-6"}),(0,i.Y)("p",{className:"m-0 flex-1 min-w-0",children:null===S||void 0===S?void 0:S.title})]}),(0,i.Y)(C.c,{color:"rgba(0,0,0,0.1)",className:"border-[rgba(0,0,0,0.1)] border-[0.7px] w-full lg:hidden"}),(0,i.FD)(x.b,{onClick:function(){return D(!0)},className:"flex items-center text-primary600 !text-[13px] !leading-5 tracking-[-0.3px] cursor-pointer",children:[P({id:"vaccination.payment.change_method",defaultMessage:"Change method"}),(0,i.Y)(v.A,{size:"1em",color:"currentColor"})]})]}),t!==n.length-1&&(0,i.Y)(C.c,{color:"rgba(0,0,0,0.1)"})]},"".concat(e.title,"-").concat(t))}))}),(0,i.Y)(Z,{open:A,onOpen:O,options:E.map((function(e){var t=e.title,n=e.code,a=(0,_.A)(e,["title","code"]);return(0,g.A)({label:t,value:n},a)})),value:"".concat(M),itemRender:function(e){return(0,i.FD)(o.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,i.Y)("img",{src:null===e||void 0===e?void 0:e.logo,className:"w-8 h-6"}),(0,i.Y)("p",{className:"m-0 flex-1 min-w-0",children:null===e||void 0===e?void 0:e.label})]})},onChange:I})]}):null},X=function(e){var t=e||{},n=t.w,a=t.h,o=t.active,l=t.className,c=t.style,s=(0,r.useMemo)((function(){return{width:n+2,height:a+2,viewBox:"0 0 ".concat(n+2," ").concat(a+2),className:(0,b.A)(l,"absolute z-[-1] inset-x-[-32px] top-[-1px] pointer-events-none"),style:c,xmlns:"http://www.w3.org/2000/svg"}}),[n,a,l,c]),d=(0,r.useMemo)((function(){if(!o)return"M0 56 H".concat(n+1," V").concat(a," H0 Z");var e=o.w,t=o.h,i=o.x,r=o.y,l=12,c=4/3*(Math.sqrt(2)-1)*l;return"M0,".concat(r+a,"\n\t\t\tV").concat(r+t,"\n\t\t\tH").concat(i-l,"\n\t\t\tC").concat(i-l+c,",").concat(r+t," ").concat(i,",").concat(r+t-c," ").concat(i,",").concat(r+t-l,"\n\t\t\tV").concat(r+l+1,"\n\t\t\tC").concat(i,",").concat(r+l+1-c," ").concat(i+c,",").concat(r+1," ").concat(i+l,",").concat(r+1,"\n\t\t\tH").concat(i+e-l,"\n\t\t\tC").concat(i+e-c,",").concat(r+1," ").concat(i+e,",").concat(r+l+1-c," ").concat(i+e,",").concat(r+l+1,"\n\t\t\tV").concat(t-l,"\n\t\t\tC").concat(i+e,",").concat(r+t-c," ").concat(i+e+l-c,",").concat(r+t," ").concat(i+e+l,",").concat(r+t,"\n\t\t\tH").concat(n+2,"\n\t\t\tV").concat(a+2,"\n\t\t\tH0\n\t\t\tZ")}),[n,a,null===o||void 0===o?void 0:o.x,null===o||void 0===o?void 0:o.y,null===o||void 0===o?void 0:o.w,null===o||void 0===o?void 0:o.h]);return(0,i.FD)("svg",(0,k.A)((0,g.A)({},s),{children:[(0,i.Y)("path",{d:d,fill:"white",stroke:y.w.colors.neutral100,strokeWidth:"1"}),(0,i.FD)("defs",{children:[(0,i.FD)("linearGradient",{id:"line__gradient",x1:(null===o||void 0===o?void 0:o.x)||0,y1:1,x2:((null===o||void 0===o?void 0:o.x)||0)+((null===o||void 0===o?void 0:o.w)||0),y2:1,gradientUnits:"userSpaceOnUse",colorInterpolation:"linearRGB",children:[(0,i.Y)("stop",{offset:"0%",stopColor:y.w.colors.neutral100,stopOpacity:"0"}),(0,i.Y)("stop",{offset:"50%",stopColor:y.w.colors.primary600,stopOpacity:"0.5"}),(0,i.Y)("stop",{offset:"100%",stopColor:y.w.colors.neutral100,stopOpacity:"0"})]}),(0,i.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,i.Y)("stop",{offset:"0%",stopColor:y.w.colors.primary600,stopOpacity:"0.1"}),(0,i.Y)("stop",{offset:"100%",stopColor:"white",stopOpacity:"0"})]})]}),(0,i.Y)("line",{fill:"none",stroke:"url(#line__gradient)",strokeWidth:"1",x1:(null===o||void 0===o?void 0:o.x)||0,y1:1,x2:((null===o||void 0===o?void 0:o.x)||0)+((null===o||void 0===o?void 0:o.w)||0),y2:1}),(0,i.Y)("rect",{x:(null===o||void 0===o?void 0:o.x)||0,y:-"".concat(((null===o||void 0===o?void 0:o.h)||0)/2),width:(null===o||void 0===o?void 0:o.w)||0,height:(null===o||void 0===o?void 0:o.h)||0,fill:"url(#ellipse__radial)"})]}))},Q=function(e){var t=e.tabs,n=e.defaultTab,a=e.currentTab,l=e.onChangeTab,c=e.className,s=e.style,d=(0,r.useState)(n||a),u=d[0],p=d[1],f=(0,r.useRef)({}),h=(0,r.useRef)(null),m=(0,r.useState)(null),_=m[0],y=m[1],x=(0,r.useState)({w:1600,h:72}),v=x[0],C=x[1],w=(0,r.useCallback)((function(e){requestAnimationFrame((function(){var t,n=f.current[e],a=h.current,i=null===a||void 0===a||null===(t=a.children)||void 0===t?void 0:t[0];n&&a&&i&&a.offsetWidth=d&&"after:content-[''] after:absolute after:h-[1px] after:bg-neutral100 after:bottom-[0.5px]",{"text-gray700":l!==u},{"payment__tabsNav-nav-active text-blue600":l===u}),"data-testid":l,onClick:Y(l),sx:function(){return{"&::after":{width:"".concat(p,"px"),right:"-".concat(p+16,"px")}}},children:[l===u&&(0,i.Y)(X,(0,k.A)((0,g.A)({},v),{active:_,className:"payment__tabsNav-svg"})),a]})},"".concat(l,"-").concat(n))}))})})})}):null},ee=function(e){var t=e.icon,n=e.titleComponent,a=e.rightComponent,r=e.className,l=e.style;return t||n||a?(0,i.FD)(o.a,{className:(0,b.A)(r,"payment__warningBox","p-3 flex gap-2 items-center justify-between bg-yellow50","border border-solid border-yellow200 rounded-xl"),style:l,children:[!!t&&(0,i.Y)("img",{src:t,className:"payment__warningBoxIcon w-5 h-5 leading-none"}),!!n&&(0,i.Y)("div",{className:"payment__warningBoxContent flex-1 min-w-0 text-[13px] font-semibold leading-5 tracking-[-0.3px]",children:n}),!!a&&(0,i.Y)("p",{className:"payment__warningBoxPrice text-gray900 font-semibold text-[15px] leading-6 tracking-[-0.3px]",children:a})]}):null},te=n(40959),ne={ten_percent:"10_percent",one_hundred_percent:"100_percent",full_payment:"full_payment"};function ae(e){var t=(0,a.A)(e.split("-"),4);return{provider:t[0],paymentVia:t[1],paymentType:t[2],providerTitle:t[3]}}var ie=function(e){var t=e.loadingPrice,n=e.displayPricePayNow,a=e.displayPriceRemaining,g=(0,p.$)().locale,_=(0,f.A)().formatMessage,y=(0,r.useState)(!0),x=y[0],v=y[1],b=(0,r.useState)(),C=b[0],w=b[1],Y=(0,m.Jf)(),N=Y.providers,k=Y.setProviders,A=Y.selectedPaymentValue,D=Y.vaccinationDetail,M=(0,h.T)().displayTotalPrice,F=(0,r.useMemo)((function(){var e=N.filter((function(e){return"10_percent"===e.payment_type})),t=N.filter((function(e){return"full_payment"===e.payment_type})),n=N.filter((function(e){return"100_percent"===e.payment_type}));return{ten_percent:e,full_payment:t,one_hundred_percent:n}}),[N]),P=(0,r.useMemo)((function(){var e=[];return F.ten_percent.length&&e.push({label:F.ten_percent[0].display_label||_({id:"vaccination.payment.tabs.pay_10_percent",defaultMessage:"Pay 10% to Book"}),value:ne.ten_percent}),F.one_hundred_percent.length&&e.push({label:F.one_hundred_percent[0].display_label||_({id:"vaccination.payment.tabs.pay_100_percent",defaultMessage:"Pay 100%"}),value:ne.one_hundred_percent}),F.full_payment.length&&e.push({label:F.full_payment[0].display_label||_({id:"vaccination.payment.tabs.buy_now_pay_later",defaultMessage:"Buy Now Pay Later"}),value:ne.full_payment}),e}),[F.ten_percent,F.full_payment]);return(0,r.useEffect)((function(){var e;(null===D||void 0===D||null===(e=D.organization)||void 0===e?void 0:e.id)&&(v(!0),s.W.withCached(d.R.GET_VACCINATION_PAYMENT_PROVIDER,(function(){var e;return(0,u.px)((0,u.fK)(d.R.GET_VACCINATION_PAYMENT_PROVIDER,{locale:String(g),hospitalId:null===D||void 0===D||null===(e=D.organization)||void 0===e?void 0:e.id}),"GET")})).then((function(e){var t,n;(null===e||void 0===e||null===(t=e.data)||void 0===t||null===(n=t.items)||void 0===n?void 0:n.length)&&(k(e.data.items),v(!1))})))}),[D]),(0,r.useMemo)((function(){if(P.length){var e=null===P||void 0===P?void 0:P[0].value;A&&A.includes(ne.full_payment)&&(e=ne.full_payment),A&&A.includes(ne.ten_percent)&&(e=ne.ten_percent),A&&A.includes(ne.one_hundred_percent)&&(e=ne.one_hundred_percent),w(e)}}),[P,A]),(0,i.FD)("div",{id:"payment-method-step-1",className:"paymentMethod",children:[(0,i.Y)(Q,{tabs:P,currentTab:C,onChangeTab:w}),(0,i.FD)(o.a,{className:"pt-[14px] bg-white",children:[C==ne.ten_percent&&(0,i.FD)(o.a,{className:"px-4 pb-5 lg:pb-6",children:[(0,i.Y)(ee,{icon:"".concat(te.JpE,"/svg/coin.svg"),titleComponent:_({id:"vaccination.payment.warning.pay_now",defaultMessage:"Pay Now ({number})"},{number:"10%"}),rightComponent:t?(0,i.Y)(l.E,{width:"100%",height:(0,c.D)(24)}):n}),(0,i.Y)("p",{className:"mt-2 text-gray700 text-[13px] leading-5 tracking-[-0.3px]",children:_({id:"vaccination.payment.notice.remaining",defaultMessage:"You\u2019ll pay the remaining {percent} of the amount ({price}) at the clinic when you get the vaccine."},{percent:"90%",price:t?(0,i.Y)(l.E,{width:"50px"}):a})}),(0,i.Y)(q,{loading:x,options:F.ten_percent,className:"mt-4"})]}),C==ne.full_payment&&(0,i.Y)(o.a,{className:"px-4 pb-5 lg:pb-6",children:(0,i.Y)(q,{loading:x,options:F.full_payment})}),C==ne.one_hundred_percent&&(0,i.FD)(o.a,{className:"px-4 pb-5 lg:pb-6",children:[(0,i.Y)(ee,{icon:"".concat(te.JpE,"/svg/coin.svg"),titleComponent:_({id:"vaccination.payment.warning.pay_now",defaultMessage:"Pay Now ({number})"},{number:"100%"}),rightComponent:t?(0,i.Y)(l.E,{width:"100%",height:(0,c.D)(24)}):M,className:"mb-4"}),(0,i.Y)(q,{loading:x,options:F.one_hundred_percent})]})]})]})}},18754:function(e,t,n){n.d(t,{A:function(){return z}});var a=n(858),i=n(53513),r=n(63538),o=n(83776),l=n(2445),c=n(73884),s=n(35291),d=n(55549),u=n(25403),p=n(26273),f=n(86436),h=n(36814),m=n(94858),g=n(59850),_=n(14265),y=n(84091),x=n(32485),v=n.n(x),b=n(74353),C=n.n(b),w=n(88491),Y=n(72451),N=n(67722),k=function(e){var t,n=(0,Y.a)();if("success"===(null===e||void 0===e||null===(t=e.transaction)||void 0===t?void 0:t.status)){var a=n.getHref();if(a){var i,r=(0,N.VG)(a);r!==(null===e||void 0===e||null===(i=e.snapshot_order)||void 0===i?void 0:i.product_id)&&null!==r||n.resetHref()}}},A=n(73419),D=n(6442),M=n(36259),F=n(12034),P=n(92047),E=n(20394),S=n(60785),L=n(70254),O=n(42280),I=n(9655),B=n(95204),V=n(37639),T=n(40959),R=function(e){var t,n,s=e.vaccinationDetail,d=(0,D.A)().formatMessage,p=(0,w.d)().isMobileOrTablet,f=(0,A.$)().query,m=String(f.ref_id||""),x=(0,O.Jf)(),b=x.paymentResult,C=x.setPaymentResult,Y=(0,c.useState)(60),N=Y[0],B=Y[1],T=(0,c.useContext)(M.B).pushNotifications,R=(0,P.eZ)();k(b);var U=function(){var e=(0,a.A)((function(){var e,t,n,a,l,c,u,p,f,h,x,v,C,w,Y,N,k,A,D,M,F;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:if(X||!b||!J)return[2];t=(e=b||{}).snapshot_order,n=e.payment_via,a=e.payment_type,l=e.payment_provider,u=(c=t||{}).type,p=c.product_id,f=c.clinic_id,h=c.voucher_code,x=c.referral_code,v=c.customer_info,C="".concat(window.location.origin).concat(window.location.pathname),w=s.id,Y=null===l||void 0===l?void 0:l.toLowerCase(),u===_.V.vaccine_package&&(w=p),o.label=1;case 1:return o.trys.push([1,3,,4]),Q(!0),[4,(0,y.px)((0,y.fK)(g.R.GET_PAYMENT_URL,{provider:Y}),"POST",{data:(0,r.A)((0,i.A)({},b.snapshot_order),{ref_id:m,amount:J.amount,price_unit:s.price_unit,order_info:s.name,product_name:s.name,clinic_name:null===(N=s.hospital_branch)||void 0===N?void 0:N.name,hospital_name:null===(k=s.organization)||void 0===k?void 0:k.name,hospital_branch_name:null===(A=s.hospital_branch)||void 0===A?void 0:A.name,image:s.logo,type:u,provider:Y,return_url:C,product_id:w,payment_via:n,payment_type:a,clinic_id:f,voucher_code:h,referral_code:x,customer_info:v,sub_payment_method_code:null===b||void 0===b||null===(D=b.sub_payment_method)||void 0===D?void 0:D.code})})];case 2:if(M=o.sent(),!(F=M.data.url))throw new Error("");return window.location.href=F,Q(!1),[3,4];case 3:return o.sent(),T({message:d({id:"vaccination.payment.failed_desc",defaultMessage:"There was an issue with your {provider} transaction. Please try again or use another payment method."},{provider:b.payment_provider_title}),type:"danger"}),Q(!1),[3,4];case 4:return[2]}}))}));return function(){return e.apply(this,arguments)}}(),j=null===b||void 0===b||null===(t=b.transaction)||void 0===t?void 0:t.status,z=f.hhg_payment_token?String(f.hhg_payment_token):"",Z=function(){"default"===j&&z&&(Q(!0),(0,y.px)((0,y.fK)(g.R.GET_PAYMENT_RESULT,{hhgToken:z}),"GET").then((function(e){var t,n=null===e||void 0===e?void 0:e.data,a=null===n||void 0===n||null===(t=n.transaction)||void 0===t?void 0:t.status;b&&a&&"default"!==a&&C(n)})).finally((function(){Q(!1)})))},W=b||{},$=W.payment_provider_title,J=W.transaction,K=(W.user_referral||{}).code,q=(0,c.useState)(!1),X=q[0],Q=q[1],ee=(0,c.useState)(!1),te=ee[0],ne=ee[1],ae="success"===j,ie="failed"===j,re="default"===j,oe=ie&&(0,l.Y)(u.B,{size:"lg",fullWidth:!0,loading:X,onClick:U,children:(0,l.Y)("span",{className:"text-[15px] leading-6 tracking-[-0.3px] font-medium",children:d({id:"vaccination.payment.retry",defaultMessage:"Retry Payment"})})}),le=re&&(0,l.Y)(u.B,{size:"lg",fullWidth:!0,loading:X,onClick:Z,children:(0,l.Y)("span",{className:"text-[15px] leading-6 tracking-[-0.3px] font-medium pointer-events-none",children:d({id:"vaccination.payment.reload",defaultMessage:"Reload ({count})"},{count:N})})});return(0,c.useEffect)((function(){var e;if((null===b||void 0===b||null===(e=b.snapshot_order)||void 0===e?void 0:e.type)===_.V.vaccine_package){var t,n=null===b||void 0===b||null===(t=b.snapshot_order)||void 0===t?void 0:t.product_id.toString();(0,P.Gp)(n,((null===R||void 0===R?void 0:R[n])||0)-1)}}),[]),(0,c.useEffect)((function(){if("default"===j&&z){var e=setInterval((function(){B((function(e){var t=e-1;return 0===t&&Z(),t||60}))}),1e3);return function(){B(60),clearInterval(e)}}}),[j,z]),b&&J?(0,l.FD)(F.Ue,{value:{isOpenPopupCollection:te,setIsOpenPopupCollection:ne},children:[(0,l.FD)(h.a,{className:"bg-neutral50 min-h-screen",children:[(0,l.Y)(S.A,{className:"lg:mb-8 lg:border-b lg:border-solid lg:border-gray200 lg:py-6 lg:flex lg:justify-center",customSize:p?void 0:{width:"141px",height:"32px"}}),(0,l.FD)(h.a,{className:"max-w-[552px] mx-auto",children:[(0,l.FD)(h.a,{className:v()("flex flex-col gap-3 lg:gap-2",ie||re?"pb-[100px]":"pb-[50px] lg:pb-[40px]"),children:[(null===J||void 0===J?void 0:J.status)&&(0,l.Y)(H,{status:J.status,provider:$}),(0,l.FD)(h.a,{className:"bg-white p-4 pt-6 lg:pb-6",children:[(0,l.Y)("div",{className:"payment__productInfo",children:(0,l.Y)(L.Ay.Inner,{stepNumber:0,vaccinationDetail:s,className:"mt-0",showDeliveryFee:null===(n=b.snapshot_order)||void 0===n?void 0:n.show_delivery_fee})}),K&&ae&&(0,l.Y)(G,{paymentResult:b,vaccinationDetail:s,userReferral:b.user_referral,className:"mt-4 !px-0"})]}),(0,l.Y)(I.A,{paymentResult:b,vaccinationDetail:s,isFailed:ie,isSuccess:ae,isPending:re,action:!p&&(ie||re)&&(0,l.Y)(h.a,{className:"py-1","data-testid":ie?"retry-button":"reload-button",children:ie?oe:le})}),ae&&(0,l.Y)(E.Y,{})]}),ie&&p&&(0,l.Y)(h.a,{"data-testid":"retry-button",className:"fixed bottom-0 left-0 right-0 border-t border-solid border-neutral100 py-2 px-4 bg-white",children:oe}),re&&p&&(0,l.Y)(h.a,{"data-testid":"reload-button",className:"fixed bottom-0 left-0 right-0 border-t border-solid border-neutral100 py-2 px-4 bg-white",children:le})]})]}),(0,l.Y)(V.A,{className:"!top-4 !right-4 !left-4"})]}):null},U={success:d.C.getAssetPath("payment/payment_success.png"),failed:d.C.getAssetPath("payment/payment_failed.png"),default:d.C.getAssetPath("payment/payment_pending.png")},j={success:{title:{id:"vaccination.payment.success_title",defaultMessage:"Payment Successful"},description:{id:"vaccination.payment.success_desc",defaultMessage:"Your payment has been completed successfully. Thank you for your purchase!"}},failed:{title:{id:"vaccination.payment.failed_title",defaultMessage:"Payment Unsuccessful"},description:{id:"vaccination.payment.failed_desc",defaultMessage:"There was an issue with your {provider} transaction. Please try again or use another payment method."}},default:{title:{id:"vaccination.payment.pending_title",defaultMessage:"Pending Transaction"},description:{id:"vaccination.payment.pending_desc",defaultMessage:"Your payment is being processed. Please refresh to see the latest status"}}},H=function(e){var t=e.status,n=e.provider,a=e.className,i=e.style,r=(0,D.A)().formatMessage,o=(null===U||void 0===U?void 0:U[t])||U.failed,s=(0,c.useMemo)((function(){var e=j.failed.title,a=j.failed.description;if(t in j){var i=j[t];e=i.title,a=i.description}return{title:r(e),description:r(a,{provider:n})}}),[r,n,t]),d=s.title,u=s.description;return(0,l.Y)(l.FK,{children:(0,l.FD)("div",{className:(0,m.A)(a,"result","result-".concat(t),"bg-white p-4 text-center lg:rounded-t-2xl"),style:i,"data-testid":"result-message",children:[(0,l.Y)("img",{src:o,alt:"hhg",className:"result__icon leading-none w-auto h-[96px] mb-2 block mx-auto"}),(0,l.Y)("h4",{className:"result__title mb-0 font-semibold text-[22px] text-dark leading-8 tracking-[-0.6px]",children:d}),(0,l.Y)("p",{className:"result__description mt-2 mb-0 text-[13px] text-gray600 leading-5 tracking-[-0.3px] lg:text-[14px] lg:leading-[22px] lg:tracking-[-0.2px]",children:u})]})})},G=function(e){var t=e.paymentResult,n=e.vaccinationDetail,a=e.userReferral,i=e.className,r=e.style,o=(0,D.A)().formatMessage,u=(0,A.$)(),g=u.locale,x=u.asPath,v=(0,w.d)().isMobileOrTablet,b=(0,c.useContext)(M.B).pushNotifications,Y=null===a||void 0===a?void 0:a.code,N=n||{},k=N.name,F=(N.hospital_branch||{}).name,P=t.snapshot_order,E=P.type,S=P.product_id,L=P.product_package_name,O="percentage"===(null===a||void 0===a?void 0:a.discount_type)?"".concat(null===a||void 0===a?void 0:a.discount_value,"%"):(0,y.nd)(o,(0,y.$g)((null===a||void 0===a?void 0:a.discount_value)||0,g),n.price_unit),I=(0,c.useMemo)((function(){if(T.kUY)return"";var e="".concat(window.location.origin).concat(T.JpE).concat((0,B.OP)(n.slug,n.id,x),"payment?referral_code=").concat(Y);if(E===_.V.vaccine_package){var t=encodeURIComponent(L);e+="&pkg_name=".concat(t,"&pkg_id=").concat(S)}return e}),[Y,E,S,L,n]),V=(0,c.useMemo)((function(){var e=C()(1e3*((null===a||void 0===a?void 0:a.expires_at)||0)),t=C()(1e3*((null===a||void 0===a?void 0:a.created_at)||0)),n=function(e,t){var n=(t-e)/864e5;return Math.max(Math.round(n),1)}(Number(t),Number(e)),i=k;return E===_.V.vaccine_package&&L&&(i+=" - ".concat(L)),[o({id:"vaccination.share_sentence1"},{productName:i,clinicName:F}),o({id:"vaccination.share_sentence2"},{refCode:Y,refAmount:O,expiresLength:o({id:"vaccination.share_day_length"},{days:n}),createdAt:t.format("DD/MM/YYYY")}),o({id:"vaccination.share_sentence3"}),o({id:"vaccination.share_sentence4"})].join("\n")}),[o,a,O,Y,k,L]),R=function(e){(0,B.lW)(e||I,(function(){b({type:"success",message:o({id:"widget.integrations.document.copiedToClipboard",defaultMessage:"Copied to clipboard!"})})}),(function(){}))};return(0,l.Y)(h.a,{"data-testid":"referral-code-box",className:(0,m.A)(i,"px-4"),style:r,children:(0,l.FD)(h.a,{style:v?B.yi:B.IL,className:"py-[20px] rounded-lg lg:rounded-2xl bg-primary500",children:[(0,l.Y)("div",{className:"w-[196px] h-[78px] mx-auto relative",children:(0,l.Y)("img",{alt:"cash back 40%",className:"w-[320px] absolute top-[-15px] left-1/2 pointer-events-none",style:{transform:"translateX(-50%)"},src:d.C.getAssetPath(g===p.L.Vietnam?"payment/referral_title_bg_vi-VN.png":"payment/referral_title_bg.png")})}),(0,l.Y)("p",{className:"text-[15px] leading-6 font-semibold tracking-[-0.3px] px-9 text-white text-center",children:o({id:"vaccination.payment_referral_desc",defaultMessage:"Share this code with your friends and get {amount} cashback for every friend (max {count}) who gets vaccinated using it."},{amount:O,count:(null===a||void 0===a?void 0:a.usage_limit)||2})}),(0,l.FD)(h.a,{className:"px-6 flex gap-2 mt-[18px]",children:[(0,l.FD)(h.a,{className:"flex justify-between rounded bg-white/[0.64] flex-1 px-4 py-[10px] backdrop-blur-[24px] min-w-0",children:[(0,l.Y)("p",{className:"text-[15px] leading-6 font-semibold tracking-[-0.3px] text-gray700 text-ellipsis overflow-hidden whitespace-nowrap pr-1",children:Y}),(0,l.Y)(h.a,{className:"cursor-pointer",onClick:function(){return R()},children:(0,l.Y)(f.A,{color:s.w.colors.gray600,size:20})})]}),(0,l.Y)("button",{onClick:function(){if("undefined"!==typeof(null===navigator||void 0===navigator?void 0:navigator.share)){var e={url:I,title:n.name,text:V};navigator.share(e).then((function(){return console.log("Successful share")})).catch((function(e){console.log("Error sharing",e),R(V)}))}else R(V)},className:"bg-white rounded-xl text-[15px] leading-6 font-semibold tracking-[-0.3px] text-primaryBase px-[26px] py-[10px] w-auto whitespace-nowrap",children:o({id:"vaccination.payment_share",defaultMessage:"Share"})})]})]})})};R.Result=H,R.ResultIcon=U,R.ReferralCode=G;var z=R},70254:function(e,t,n){n.d(t,{UB:function(){return f},tn:function(){return h}});var a=n(2445),i=n(36814),r=n(32485),o=n.n(r),l=n(73419),c=n(32876),s=n.n(c),d=n(6442),u=n(42280),p=n(95204),f=function(e){var t=e.stepNumber,n=e.vaccinationDetail,r=e.className,c=void 0===r?"mt-4":r,d=e.showDeliveryFee,u=n.id,f=n.slug,h=n.logo,m=n.hospital_branch,g=n.name,_=n.display_name,y=(0,l.$)().asPath,x=(0,p.jX)(n),v=(0,p.OP)(f,u,y);return(0,a.FD)(i.a,{"data-testid":"product-info",className:o()("flex gap-3",c),children:[(0,a.FD)(i.a,{className:"flex-1",children:[(0,a.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] font-medium text-gray700 mb-2",children:_}),x?(0,a.Y)("span",{className:"text-[17px] tracking-[-0.4px] leading-6 font-semibold text-dark block",children:g}):(0,a.Y)(s(),{href:v,children:(0,a.Y)("a",{className:"text-[17px] tracking-[-0.4px] leading-6 font-semibold text-dark block cursor-pointer",children:g})}),t!==p.RZ.ONE&&!d&&(0,a.Y)("p",{className:"border-l-2 border-solid border-gray200 pl-2 text-[13px] leading-5 tracking-[-0.3px] text-gray700 mt-2",children:m.name})]}),(0,a.Y)(i.a,{className:"w-[72px] h-[72px] min-w-[72px]",children:(0,a.Y)("img",{src:h||p.XS,className:"block w-full h-full object-cover rounded-lg"})})]})},h=function(){var e=(0,d.A)().formatMessage,t=(0,u.Jf)().currentStep;return t>0?(0,a.FD)(i.a,{"data-testid":"step-bar",className:"flex gap-1 justify-between items-start text-center",children:[(0,a.FD)(i.a,{className:"flex-1",children:[(0,a.Y)(i.a,{className:"h-1 rounded bg-primaryBase mb-2"}),(0,a.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] font-semibold text-primaryBase lg:whitespace-nowrap lg:px-4",children:e({id:"vaccination.payment.step_select_payment",defaultMessage:"SELECT PAYMENT"})})]}),(0,a.FD)(i.a,{className:"flex-1",children:[(0,a.Y)(i.a,{className:o()("h-1 rounded mb-2",{"bg-primaryBase":2===t,"bg-neutral100":t<2})}),(0,a.Y)("p",{className:o()("text-[13px] leading-5 tracking-[-0.3px] font-semibold lg:whitespace-nowrap lg:px-4",2===t?"text-primaryBase":"text-gray300"),children:e({id:"vaccination.payment.step_review_confirm",defaultMessage:"REVIEW AND CONFIRM"})})]})]}):null},m=function(e){var t=e.stepNumber,n=e.vaccinationDetail,r=e.children,l=e.showDeliveryFee,c=(0,d.A)().formatMessage,s=t===p.RZ.RESULT;return(0,a.FD)(i.a,{className:o()("bg-white pb-5 px-4 pt-3",s?"pt-2.5 pb-0":"pt-3"),children:[(0,a.Y)(h,{}),r,s&&(0,a.Y)("p",{className:"text-[22px] leading-8 font-semibold tracking-[-0.6px] text-dark",children:s&&c({id:"vaccination.payment_summary",defaultMessage:"Payment summary"})}),(0,a.Y)(f,{stepNumber:t,vaccinationDetail:n,className:s?"pt-5":"mt-7",showDeliveryFee:l})]})};m.Inner=f,t.Ay=m},42280:function(e,t,n){n.d(t,{Jf:function(){return l},Ou:function(){return c},Zb:function(){return s}});var a=n(53513),i=n(63538),r=n(44745),o=n(95204),l=(0,r.vt)()((function(e){return{currentStep:o.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:o.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}}))}}})),c={loading:!1,isOpenVoucher:!1,openResult:!1,listVoucher:[],appliedVoucher:null,referralData:null,appliedReferralCode:"",count:1},s=(0,r.vt)((function(e){return(0,i.A)((0,a.A)({},c),{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){e((function(){return{listVoucher:t}}))},setAppliedVoucher:function(t){e((function(){return{appliedVoucher:t}}))},setReferralData:function(t){e((function(){return{referralData:t}}))},setAppliedReferralCode:function(t){e((function(){return{appliedReferralCode:t}}))},setVoucherStore:function(t,n){e(t,n)}})}))},9655:function(e,t,n){n.d(t,{Y:function(){return g}});var a,i=n(38971),r=n(2445),o=n(26273),l=n(36814),c=n(94858),s=n(84091),d=n(74353),u=n.n(d),p=n(73419),f=n(6442),h=n(86706),m=n(4749);n(40860),n(65826);var g=(a={},(0,i.A)(a,o.L.Vietnam,"vaccination.payment.product_price"),(0,i.A)(a,o.L.Malaysia,"vaccination.payment.product_price"),a);t.A=function(e){var t=e.paymentResult,n=e.vaccinationDetail,a=e.isFailed,i=e.isSuccess,d=e.isPending,_=e.className,y=e.style,x=e.action,v=(0,p.$)().locale,b=(0,f.A)().formatMessage,C=v===o.L.Vietnam?"vi":"en",w=t.payment_provider_title,Y=t.snapshot_order,N=t.sub_payment_method,k=(0,h.T)().getDisplayTaxPrice,A={default:b({id:"vaccination.payment.status_default",defaultMessage:"Pending"}),success:b({id:"vaccination.payment.success",defaultMessage:"Success"}),failed:b({id:"vaccination.payment.failed",defaultMessage:"Failed"})},D=(0,s.nd)(b,(0,s.$g)(Y.final_price,v),n.price_unit),M=(0,s.nd)(b,(0,s.$g)(Y.original_price,v),n.price_unit),F=k(Y.tax_unit,Y.tax_computed,Y.tax_amount),P=(0,s.nd)(b,(0,s.$g)(t.remain_amount,v),n.price_unit),E=(0,s.nd)(b,(0,s.$g)(t.transaction.amount,v),n.price_unit),S=Number((null===Y||void 0===Y?void 0:Y.referral_discount_value)||0)+Number((null===Y||void 0===Y?void 0:Y.voucher_discount_value)||0),L=S>0?(0,s.nd)(b,(0,s.$g)(S,v),n.price_unit):"",O=null===n||void 0===n?void 0:n.hospital_branch.name;return(0,r.FD)(l.a,{"data-testid":"transaction-info",className:(0,c.A)(_,"bg-white pt-6 px-4 pb-2 lg:pb-3"),style:y,children:[(0,r.FD)(l.a,{className:"pb-4 flex justify-between items-center",children:[(0,r.Y)("h2",{className:"text-[17px] leading-6 tracking-[-0.4px] text-dark font-semibold",children:b({id:"vaccination.payment.transaction_info",defaultMessage:"Transaction Info"})}),i&&(0,r.Y)("label",{className:"rounded-[40px] py-[3px] px-2 bg-green50 font-medium text-[12px] leading-4 tracking-[-0.2px] text-green600",children:A.success}),a&&(0,r.Y)("label",{className:"rounded-[40px] py-[3px] px-2 bg-red50 font-medium text-[12px] leading-4 tracking-[-0.2px] text-red700",children:A.failed}),d&&(0,r.Y)("label",{className:"rounded-[40px] py-[3px] px-2 bg-yellow50 font-medium text-[12px] leading-4 tracking-[-0.2px] text-yellow800",children:A.default})]}),(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:"vaccination.payment.date"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:u()(t.transaction.created_at).locale(C).format("DD MMM YYYY - HH:mm")})]}),(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:"vaccination.payment.transaction_id"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:t.transaction.transaction_id})]}),(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:(null===g||void 0===g?void 0:g[v])||g[o.L.Vietnam],defaultMessage:"Package price"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:M})]}),F&&(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:"vaccination.payment.tax"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:F})]}),L&&(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:"vaccination.payment.discount"})}),(0,r.FD)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-green600 font-medium",children:["-",L]})]}),(null===t||void 0===t?void 0:t.payment_type)===m.Ai.ten_percent&&(0,r.FD)(r.FK,{children:[(0,r.FD)(l.a,{className:"py-3 gap-2 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700 min-w-0",children:b({id:"vaccination.payment.pay_later",defaultMessage:"Pay later (at {hospital_name})"},{hospital_name:O})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium whitespace-nowrap",children:P})]}),(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:i?"vaccination.payment.already_paid_10_percentage":a?"vaccination.payment.failed_paid_10_percentage":"vaccination.payment.pending_paid_10_percentage"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:E})]})]}),m.Ai.full_payment===(null===t||void 0===t?void 0:t.payment_type)&&(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:"vaccination.payment.price_after_tax_discount",defaultMessage:"Package price after tax & discount"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:D})]}),m.Ai.one_hundred_percent===(null===t||void 0===t?void 0:t.payment_type)&&(0,r.FD)(l.a,{className:"py-3 flex justify-between border-b border-solid border-neutral100",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:i?"vaccination.payment.already_paid_100":a?"vaccination.payment.failed_paid_100_percentage":"vaccination.payment.pending_paid_100_percentage"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:D})]}),(0,r.FD)(l.a,{className:"py-3 flex justify-between",children:[(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-gray700",children:b({id:"vaccination.payment.method"})}),(0,r.Y)("p",{className:"text-[13px] leading-5 tracking-[-0.3px] text-dark font-medium",children:(null===N||void 0===N?void 0:N.title)?"".concat(b({id:"vaccination.payment.online_banking"})," - ").concat(null===N||void 0===N?void 0:N.title):w})]}),x]})}},95204:function(e,t,n){n.d(t,{IL:function(){return _},O7:function(){return s},OP:function(){return y},RZ:function(){return d},XS:function(){return p},jX:function(){return v},lW:function(){return x},pf:function(){return h},q:function(){return m},uY:function(){return f},vp:function(){return u},yi:function(){return g}});var a=n(24537),i=n(55549),r=n(14265),o=n(27317),l=n(40959);function c(){var e=(0,a.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 c=function(){return e},e}var s,d={RESULT:0,ONE:1,TWO:2},u={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"),f={"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")},h={MOMO:i.C.getAssetPath("payment/VTS_MoMo.png")},m=o.Ay.form.withConfig({componentId:"sc-9931771b-0"})(c()),g={backgroundImage:"url('".concat(i.C.getAssetPath("payment/referral_bg.jpg"),"')"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},_={backgroundImage:"url('".concat(i.C.getAssetPath("payment/referral_bg_desktop.jpg"),"')"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},y=function(e,t,n){var a=n.split("?")[0];if(a.includes("/payment"))return"".concat(a.split("/payment")[0],"/");if(a.endsWith("-".concat(t,"/")))return a;var i=l.y1A[l.HgX];return"/".concat(null===i||void 0===i?void 0:i.SERVICE,"/").concat(null===i||void 0===i?void 0:i.VACCINATIONS,"/").concat(e,"-").concat(t,"/")};function x(e,t,n){navigator.clipboard?navigator.clipboard.writeText(e).then(t,n):function(e,t,n){var a=document.createElement("textarea");a.value=e,a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy"),t()}catch(i){n()}document.body.removeChild(a)}(e,t,n)}!function(e){e.VOUCHER="VOUCHER",e.REFERRAL="REFERRAL"}(s||(s={}));var v=function(e){return r.L[e.product_type]===r.V.weight_loss}},12034:function(e,t,n){n.d(t,{Ue:function(){return p},ZN:function(){return u}});var a=n(53513),i=n(63538),r=n(2445),o=n(73884),l=n(48894),c=n(13306),s=n(6442),d=(0,o.createContext)({isOpenPopupCollection:!1,setIsOpenPopupCollection:function(){},onSubmitPopupCollection:function(){return new Promise((function(){return!0}))}}),u=function(){return(0,o.useContext)(d)},p=function(e){var t=e.value,n=e.children,o=(0,s.A)().formatMessage;return(0,r.Y)(d.Provider,{value:(0,i.A)((0,a.A)({},t),{onSubmitPopupCollection:function(e){var t=e.callingCode,n=e.countryCode,a=e.phone;return l.F.collectionSubmitCTA({area_code:t,country_code:n,cta_text:o({id:"common.contactVia",defaultMessage:"Contact {name}"},{name:c.so.Zalo}),phone_number:a,source_url:window.location.href,messaging_app:c.so.Zalo})}}),children:n})}},92047:function(e,t,n){n.d(t,{Gp:function(){return x},IL:function(){return m},eZ:function(){return y}});var a=n(53513),i=n(63538),r=n(73884),o=n(27516),l=n(84655),c=n(59850),s=n(14265),d=n(84091),u=n(73419),p=n(12215),f=n.n(p),h=n(28543),m=function(e){var t=e.vaccinationDetail,n=e.vaccinationPackages,p=t.id,f=t.hospital_branch,m=t.organization,g=f.id,_=m.id,y=(0,r.useState)(!0),x=y[0],b=y[1],C=(0,r.useState)(n||[]),w=C[0],Y=C[1],N=(0,u.$)().locale,k=o.y[N],A=(0,r.useCallback)((function(e){var t=e.clinic_id,n=e.product_id,r=e.hospital_id,o=e.product_type,u=void 0===o?s.V.vaccine_package:o,p=e.site;b(!0);var f={clinic_id:t,product_id:n,hospital_id:r,product_type:u,site:p};l.W.withCached(c.R.GET_VACCINATION_PACKAGES,(function(){return(0,d.px)((0,d.$k)(c.R.GET_VACCINATION_PACKAGES,f),"GET")})).then((function(e){var t=(e.data||{}).packages;if(t&&(null===t||void 0===t?void 0:t.length)){var n=v(t.map((function(e){var t=e.id;return"".concat(t)})));Y(t.map((function(e){return(0,i.A)((0,a.A)({},e),{stock:n[e.id]})})))}})).finally((function(){return b(!1)}))}),[]);return(0,r.useEffect)((function(){p&&g&&_&&h.LG.includes(N)?A({product_id:p,clinic_id:g,hospital_id:_,site:k}):b(!1)}),[p,g,_]),(0,r.useEffect)((function(){if(null===n||void 0===n?void 0:n.length){var e=v(n.map((function(e){var t=e.id;return"".concat(t)})));Y(n.map((function(t){return(0,i.A)((0,a.A)({},t),{stock:e[t.id]})})))}}),[n]),(0,r.useMemo)((function(){return{loading:x,setLoading:b,vaccinationPackages:w,setVaccinationPackages:Y,fetchVaccinationPackages:A}}),[x,b,w,Y,A])},g="VC_PKG_MG_NUM",_=function(e,t){return e+Math.floor(Math.random()*(t-e+1))};function y(){try{return JSON.parse(f().get(g)||"{}")||{}}catch(e){return{}}}function x(e,t){var n=y();return n[e]?n[e]=t>0?t:_(3,6):n[e]=_(3,6),f().set(g,JSON.stringify(n)),n}function v(e){var t=y(),n=!0,a=!1,i=void 0;try{for(var r,o=e[Symbol.iterator]();!(n=(r=o.next()).done);n=!0){var l=r.value;t[l]||(t[l]=_(3,6))}}catch(c){a=!0,i=c}finally{try{n||null==o.return||o.return()}finally{if(a)throw i}}return Object.keys(t).length&&f().set(g,JSON.stringify(t)),t}},37639:function(e,t,n){var a=n(24537),i=n(2445),r=n(73884),o=n(60304),l=n(35291),c=n(48085),s=n(63419),d=n(80264),u=n(36259),p=n(27317),f=n(40959),h=n(8758);function m(){var e=(0,a.A)(["\n &[data-alert-type='danger'] {\n background-color: ",";\n border: 1px solid ",";\n border-radius: ",";\n .mantine-Text-root {\n font-size: ",";\n font-weight: 500;\n line-height: ",";\n letter-spacing: -0.3px;\n }\n }\n"]);return m=function(){return e},e}var g=(0,p.Ay)(o.A).withConfig({componentId:"sc-c6c33622-0"})(m(),l.w.colors.red50,l.w.colors.red200,(0,c.D)(12),(0,c.D)(13),(0,c.D)(20));t.A=function(e){var t=e.className,n=(0,r.useContext)(u.B),a=n.state,o=void 0===a?{}:a,l=n.dispatch,c=o.notifications;return(0,i.Y)(s.cN,{className:t,children:(0,i.Y)("div",{style:{position:"sticky",top:81,width:"100%"},children:c.map((function(e,t){return(0,i.Y)(g,{closeIcon:(0,i.Y)(h.A,{className:"w-4 h-4 mt-[2px]"}),contentIcon:(0,i.Y)("img",{className:"content-icon",src:"".concat(f.JpE,"/svg/").concat(e.type,".svg"),alt:"content-icon"}),text:e.message,type:e.type,className:"alert-noti",onClose:function(){return t=e.id,void l({type:d.Q.CLEAR_NOTIFICATION,payload:{id:t}});var t}},"noti-".concat(t))}))})})}},73:function(e,t,n){n.d(t,{Kt:function(){return o},dm:function(){return l}});var a,i=n(38971),r=n(26273),o=(a={},(0,i.A)(a,r.L.Vietnam,"https://m.me/hellobacsi"),(0,i.A)(a,r.L.Malaysia,"https://m.me/HelloDoktorMY"),a),l=(0,i.A)({},r.L.Malaysia,"https://wa.me/60163469577");(0,i.A)({},r.L.Vietnam,"https://zalo.me/3186943975751313634")},28543:function(e,t,n){n.d(t,{LG:function(){return o},lL:function(){return i},zF:function(){return a}});var a,i,r=n(26273),o=[r.L.Vietnam,r.L.Malaysia];!function(e){e[e.available=1]="available",e[e.out_of_stock=0]="out_of_stock",e[e.limit=2]="limit"}(a||(a={})),function(e){e.PRICE="price",e.DISCOUNT="discount"}(i||(i={}))},67722:function(e,t,n){n.d(t,{$p:function(){return h},AQ:function(){return p},BB:function(){return l},HB:function(){return f},Hg:function(){return g},In:function(){return d},Sh:function(){return s},VG:function(){return _},Yp:function(){return u},fC:function(){return c},t2:function(){return m}});var a=n(40568),i=n(2543),r=n(6442),o=n(40959),l=function(e){return(e=null===e||void 0===e?void 0:e.replace("_",""))?e.charAt(0).toUpperCase()+e.slice(1):""},c=function(e,t){var n="",a=o.pTf[t].prefix,i=void 0===a?"":a,r=Array.from(e);if(!e)return"";var l=new RegExp("^\\".concat(i),"gi").test(e);return r.forEach((function(e,t){l&&tt?e.substring(0,t):e},p=function(e){return e?{years:parseInt("".concat(e/365)),months:parseInt("".concat(e/30)),weeks:parseInt("".concat(e/7))}:{years:0,months:0,weeks:0}};function f(e){if(e)try{new URL(e)&&window.open(e,"_blank")}catch(t){console.log("\ud83d\ude80 ~ handleDeepLink ~ error:",t)}}function h(e){if("no_age"===e||!e)return 0;var t=(0,a.A)(e.split("-"),2),n=t[0];return"month"!==t[1]?0:Number(n)}function m(e){if(!(0,i.isArray)(e)||0===e.length)return{comboMapByDisplayName:new Map,sortedList:[]};var t=function(e){var t=new Map,n=!0,a=!1,i=void 0;try{for(var r,o=e[Symbol.iterator]();!(n=(r=o.next()).done);n=!0){var l=r.value,c=l.age;c||(c="no_age");var s=t.get(c);s||t.set(c,s=[]),s.push(l)}}catch(d){a=!0,i=d}finally{try{n||null==o.return||o.return()}finally{if(a)throw i}}return t}(e),n=function(e){var t=new Map;return e.forEach((function(e,n){var a=new Map;e.forEach((function(e){var t=e.display_name;t||(t="no_name");var n=a.get(t);n||a.set(t,n=[]),n.push(e)})),t.set(n,Object.fromEntries(a))})),t}(t),a=Array.from(t.keys()).sort((function(e,t){return h(e)-h(t)}));return{resultData:Object.fromEntries(n),sortedList:a}}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return e.toString().padStart(t,"0")}var _=function(e){try{var t=new URL(e).pathname;if(new RegExp("/payment").test(t)){var n=t.replace("/payment","").split("/"),a=n[n.length-1].split("-"),i=a[a.length-1].trim();return Number(i)}return null}catch(r){return console.log("\ud83d\ude80 ~ getIdFromPaymentUrl ~ error:",r),null}}}}]);