PageSourceSearch

https://www.nivabupa.com/articles_pages/_next/static/chunks/9073-04d27f82fe7cbef5.js

js nivabupa.com collected 2026-09-24 11:16:00 UTC 59,559 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9073],{2814:e=>{e.exports={input:"BMICalculator_input__W8QyT",label:"BMICalculator_label__k7ubr"}},29073:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>ey});var n=a(37876),s=a(85490),r=a(57940),i=a(56023),o=a(74429),l=a(78827),c=a(96187),d=a(88849),u=a(40590),m=a(72304),h=a(89099),p=a(14232),x=a(53790),b=a(97938),g=a(21727),f=a(76091),w=a(94751),y=a(3291),v=a(54587),N=a.n(v),j=a(62538);let C=/^[a-zA-Z. ]+$/,S=/([0-9])\1{6,}/,E=(e,t)=>RegExp(`^\\d{${e},${t}}$`),O={[o.AS.REASSUREV2]:{max:100,min:18},[o.AS.SENIOR_FIRST]:{max:76,min:61},[o.AS.ASPIRE]:{max:66,min:18},[o.AS.HEALTH_RECHARGE]:{max:66,min:18},[o.AS.ASPIRE_SAVER]:{max:66,min:18},default:{max:101,min:18}},T=e=>{let{hideProgressBar:t,multi:a,productType:v,isds:T,initData:A,newDesignConfig:I,showOTP:q=!1}=e,[k,M]=(0,p.useState)(1),[L,R]=(0,p.useState)(!1),[P,F]=(0,p.useState)(!1),[D,$]=(0,p.useState)(!1),[_,G]=(0,p.useState)(!0),H=void 0==A?"true":"false",z=e=>{switch(e){case"0":default:return"start";case"1":return"phonenumber-next";case"2":return"name-next";case"3":return"dob-next";case"4":return"office-health-confirmation-next"}},V=e=>{switch(e){case"2":return"name-back-button";case"3":return"dob-back-button";case"4":return"office-health-confirmation-back-button";default:return"back-button"}};function Y(){let e=localStorage.getItem("homeInfo");if(e)try{let t=JSON.parse(e);t?.insuranceType==="Travel"?em.push("/travel-insurance.html"):t?.insuranceType==="Corporate"&&em.push("/corporate-group-health-insurance.html")}catch(e){}}let[B,W]=(0,c.M)("true"==H?o.cY.GET_QUOTE_FORM:o.cY.TELE_QUOTE_FORM,{...A,country:g.G_},"true"==H),U=v&&Object.hasOwn(O,v)?O[v]:O.default,Q=(0,p.useMemo)(()=>{let e=B?.dob?(0,l.QO)(B?.dob):0;return e<=100?e:0},[B?.dob]),{data:J}=(0,d.Ct)(),[Z,K]=(0,p.useState)(59),X=(0,p.useRef)(null),{trigger:ee,isMutating:et,data:ea,reset:en}=(0,d.En)({onSuccess:e=>{if(ec(""),e?.success&&(X.current&&(clearInterval(X.current),K(59)),X.current=setInterval(()=>{K(e=>e>0?e-1:(X.current&&clearInterval(X.current),60))},1e3),"OTPCredential"in window)){let e=new AbortController;setTimeout(()=>{e.abort()},12e4),navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then(e=>{let t=e?.code;t&&ec(t)}).catch(e=>{})}}}),{trigger:es,isMutating:er,data:ei,reset:eo}=(0,d.pz)({onSuccess:()=>{ec("")}}),[el,ec]=(0,p.useState)(""),{trigger:ed,isMutating:eu}=(0,d.j4)({onSuccess:e=>{e.success&&3===k&&(window.dataLayer&&window.dataLayer.push({event:"Health Insurance Form - Customer DOB",click_text:"DOB Filled",dob:B.dob,age:(0,l.QO)(B?.dob),currentPage:window.location.href,nextPage:`${window.location.host}/health-insurance-plan/summary`}),window.dataLayer&&window.dataLayer.push({event:"Virtual Page Path",vpv:"vpv/health-insurance/customer-dob"}),em.push({pathname:"/health-insurance-plan/summary",query:{multi:a||(A&&"aspire-saver"!=v?"true":"false"),productType:v,retailFlag:H,isRelog:em.query.isRelog,copay:em.query.copay}}))},onError:()=>{$(!0)}}),em=(0,h.useRouter)(),{cid:eh,utm_source:ep,utm_campaign:ex,utm_term:eb,utm_medium:eg,lang:ef,utm_adgroup:ew}
1=em.query,ey={ipAddress:J?.ip,campaignId:eh,utmLeadFields:{utmSource:ep,utmCampaign:ex,utmTerm:eb,utmMedium:eg,utmAdgroup:ew},channel:B.channel||"Retail",subChannel:B.subChannel||"Website",department:B.department||"SWebsite",subDepartment:B.subDepartment||"Website",agentName:B.agentName||"",language:"english"},ev=()=>{$(!1)},eN=(e,t)=>{let a=t||B?.country,n=e||B?.phoneNumber,s={country:{isd:a?.ISD||"+91",name:a?.country||"India"}};a?.ISD==="+91"?s.phoneNumber=n:s.intPhoneNumber=n,ed({data:{...ey,forms:s}},{onSuccess:e=>{if(e?.success&&e?.quoteId&&e?.dialerId){sessionStorage.setItem(o.cY.QUOTE_ID,e.quoteId),sessionStorage.setItem(o.cY.DIALER_ID,e.dialerId);let t=localStorage.getItem("homeInfo"),a="";null!==t&&(a=JSON.parse(t).insuranceType),Y(),"Health"===a&&M(e=>e+1)}}})};(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t,country:a,fromSticky:n}=e.detail||{};if(!t)return;let s=t.replace(/\D/g,"");W(e=>({...e,phoneNumber:s,country:a||e.country})),eN(s,a||B?.country),F(!0),R(!1)};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[eN,em.isReady,em.query]);let ej=()=>{2==k&&B?.phoneNumber.length&&F(!0),M(e=>e-1),L&&R(!1)};(0,p.useEffect)(()=>{localStorage.setItem("homeInfo",JSON.stringify({insuranceType:"Health"}))},[]),(0,p.useEffect)(()=>{$(!1)},[L,P]);let{locale:eC}=(0,h.useRouter)(),eS="en"===eC?f.A:"hi"===eC?w.A:y.A;return(0,n.jsxs)("div",{className:`${!t||!I?"md:mt-8 mt-0":""} flex flex-col bg-white items-center justify-between w-full gap-6`,children:[!t&&(0,n.jsx)(r.A,{activeStep:Math.min(k,3),totalSteps:3,placeholder:["Mobile","Name","Date of birth"]}),(0,n.jsxs)("div",{className:`p-5 border-2 border-gray-300 rounded-md ${I?"bg-white flex flex-row md:px-5 md:py-2 px-2 py-2 justify-between":t?"bg-gray-200 relative rounded-md mt-8 flex flex-col gap-3 shadow-xl":"bg-[#F3F7F8] rounded-md mt-8 flex flex-col gap-3 shadow-xl"}   `,children:[1===k&&(0,n.jsxs)(n.Fragment,{children:[!I&&(0,n.jsx)("label",{className:`text-nivabupa-black md:text-lg font-medium ${t&&"relative"}`,htmlFor:"mobile-number",children:eS["Mobile Number"]}),t&&!I&&(0,n.jsx)(x.A,{className:"absolute -inset-x-[6px] -inset-y-2 md:h-5 md:w-5"}),(0,n.jsxs)("div",{className:"flex flex-col md:flex-row flex-wrap gap-4 md:gap-0",children:[(0,n.jsx)(b.A,{success:P,isLoading:et,isds:T,inputValue:B?.phoneNumber,countryValue:B?.country||g.G_,onMobileChange:e=>{let t=e.target.value,a=Number(B?.country?.maximum),n=Number(B?.country?.minimum);if(ei&&eo(),ea&&en(),!(t.length>a)){if(W(e=>({...e,phoneNumber:t})),t.length!=a&&P&&F(!1),B?.country?.ISD=="+91"&&(S.test(t)||["1","2","3","4"].includes(t.charAt(0))))return void R(!0);if(t.length==a){if(W(e=>({...e,phoneNumber:t})),!E(n,a).test(t))return void R(!0);window.dataLayer&&window.dataLayer.push({event:"Health Insurance Form - Customer Contact",click_text:"Contact Filled",currentPage:window.location.href,nextPage:window.location.href}),window.dataLayer&&window.dataLayer.push({event:"Virtual Page Path",vpv:"vpv/health-insurance/customer-contact"}),window.lmSMTObj&&window.lmSMTObj.track(`${"/"==window.location.pathname||"/v1"==window.location.pathname||"/v0"==window.location.pathname?"healthHomepageLead":"healthGetQuoteLead"}`,{name:"health insurance",stepName:`${"/"==window.location.pathname||"/v1"==window.location.pathname||"/v0"==window.location.pathname?"Health Homepage Lead":"Health GetQuote Lead"}`,customUrl:window.location.href}),window.lmSMTObj&&window.lmSMTObj.identify("",{phone:`+91${t}`}),q?ee({phoneNumber:t}):eN(t)}L&&R(!1)}},onCountryChange:e=>{F(!1),W(t=>({...t,country:e,phoneNumber:""}))},isMask:A?.channel=="Tele Caller",onMobileReset:()=>{W(e=>({...e,phoneNumber:""}))},newDesignConfig:I}),q&&!ea&&(0,n.jsx)("div",{className:"p-4",children:(0,n.jsx)("button",{className:"whitespace-nowrap p-2 text-sm bg-nivabupa-blue-dark text-white w-max rounded-lg",disabled:et,onClick:()=>{E(Number(B?.country?.minimum),Number(B?.country?.maximum)).test(B?.phoneNumber)?ee({phoneNumber:B?.phoneNumber,resend:!0}):R(!0)},children:"Send OTP"})})]}),ea?.success&&!ei?.success&&(0,n.jsxs)("div",{className:"max-w-[356px] w-full flex flex-row bg-white text-sm p-2",children:[(0,n.jsx)("input",{className:"p-2 w-full placeholder:text-sm outline-none",type:"text",placeholder:"Enter OTP, sent on your mobile",value:el,onChange:e=>{let t=e.target.value;isNaN(t)||t.length>4||(4==t.length&&es({otp:t,phoneNumber:B?.phoneNumber},{onSuccess:e=>{e?.success&&eN()}}),ec(t))},autoComplete:"one-time-code"}),er&&(0,n.jsx)("div",{className:"p-2",children:(0,n.jsx)(i.A,{})}),60!=Z?(0,n.jsx)("div",{className:"p-2",children:Z}):(0,n.jsx)("div",{className:"py-2",children:(0,n.jsx)("button",{className:"whitespace-nowrap p-2 bg-nivabupa-blue-dark text-white w-max rounded-lg",disabled:et,onClick:()=>ee({phoneNumber:B?.phoneNumber,resend:!0}),children:"Resend OTP"})})]}),ei?.success==!1&&(0,n.jsx)("span",{className:"text-red-700 text-xs",children:ei?.msg}),L&&(0,n.jsx)("span",{className:"text-red-700 text-xs",children:eS["Please enter valid mobile number"]}),D&&(0,n.jsx)(s.A,{className:"bg-red-100 max-w-[400px] text-red-700",content:(0,n.jsxs)("button",{className:"text-sm ",onClick:()=>{ed({...ey,forms:{phoneNumber:B?.phoneNumber}})},children:[eS["Something went wrong."],(0,n.jsx)("wbr",{}),eS["Click here to Retry."]]}),onClose:ev})]}),2===k&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("label",{className:"text-nivabupa-black md:text-lg font-medium my-auto text-base",htmlFor:"name",children:eS.Name}),(0,n.jsxs)("div",{className:"flex flex-row items-center bg-white p-2 md:max-w-[350px] max-w-[250px]",children:[(0,n.jsx)("input",{id:"name",autoFocus:!0,value:B?.name,className:"w-full h-full uppercase placeholder:capitalize placeholder:text-nivabupa-black placeholder:opacity-50 outline-none placeholder:font-normal placeholder:text-sm",type:"text",placeholder:"Enter Your Name",required:!0,minLength:1,onChange:e=>{let t=e.target.value;if(W(e=>({...e,name:t})),!C.test(t)){R(!0),F(!1);return}t.length>=1?F(!0):F(!1),L&&R(!1)}}),P&&(0,n.jsx)(u.A,{className:"text-green-700 h-[24px] w-[24px]"})]}),L&&(0,n.jsx)("span",{className:"text-red-700 text-xs",children:eS["Please enter valid name"]}),D&&(0,n.jsx)(s.A,{className:"bg-red-100 max-w-[400px] text-red-700",content:(0,n.jsx)("span",{children:"Something went wrong."}),onClose:ev})]}),3===k&&(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("label",{className:"text-nivabupa-black text-md font-medium",htmlFor:"dob",children:"Date of Birth"}),(0,n.jsxs)("div",{className:"bg-white p-2 max-w-[276px] flex flex-row gap-4",children:[(0,n.jsx)("input",{id:"dob",autoFocus:!0,className:"placeholder:text-nivabupa-black placeholder:opacity-50 outline-none placeholder:font-normal placeholder:text-sm",type:"date",placeholder:B?.dob?"":"dd/mm/yyyy",required:!0,onChange:e=>{let t=e.target.value;t&&e.target.placeholder&&(e.target.placeholder="");let a=(0,l.QO)(t);a>
1=U.max||a<U.min?R(!0):L&&R(!1),W(e=>({...e,dob:t}))},value:B?.dob,min:(0,l.Wy)(U.max).add(1,"day").format("YYYY-MM-DD"),max:(0,l.Wy)(U.min).format("YYYY-MM-DD")}),Q>0&&(0,n.jsxs)("span",{id:"age",className:"ml-auto text-black text-sm bg-nivabupa-background rounded-md py-1 px-2 text-center",children:[Q," Years"]})]}),L&&(0,n.jsx)("span",{className:"text-red-700 text-xs",children:`Please enter DOB between ${U.min}-${U.max-1} age.`}),D&&(0,n.jsx)(s.A,{className:"bg-red-100 max-w-[400px] text-red-700",content:(0,n.jsx)("span",{children:"Something went wrong."}),onClose:ev})]})]}),(0,n.jsx)("div",{children:(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:_,onClickCheckBox:e=>G(e)})}),(0,n.jsxs)("div",{className:`flex flex-row justify-between ${I?"items-center gap-3":""}`,id:1===k?V(String(k)):"",children:[1===k||I?1!==k&&I&&(0,n.jsx)("button",{className:"h-full p-2 text-nivabupa-ethinosHomeOrange rounded-md border border-solid border-nivabupa-ethinosHomeOrange hover:text-white hover:bg-nivabupa-ethinosHomeOrange",onClick:ej,id:V(String(k)),children:(0,n.jsx)(e=>{let{id:t,size:a}=e;return(0,n.jsx)("svg",{stroke:"currentColor",fill:"none","stroke-width":"2",viewBox:"0 0 24 24","stroke-linecap":"round","stroke-linejoin":"round",id:t,width:a,height:"34",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{id:t,d:"m15 18-6-6 6-6"})})},{size:23,id:V(String(k))})}):(0,n.jsxs)("button",{className:"flex flex-row items-center gap-1.5 mt-7 py-2 px-4 bg-nivabupa-blue-dark rounded-lg  text-white",onClick:ej,id:V(String(k)),children:[(0,n.jsx)(m.A,{className:"h-[24px] w-[24px]"}),(0,n.jsx)("span",{id:V(String(k)),className:"font-bold text-sm md:text-base",children:eS.BACK})]}),(0,n.jsx)("button",{className:`flex flex-row items-center gap-1.5 md:px-4 px-4 rounded-xl text-white ml-auto disabled:opacity-50  ${I?"md:h-[54px] h-[39px] 0 md:mr-7 mr-4 bg-nivabupa-ethinosHomeOrange ":"mt-7 py-2 bg-nivabupa-blue-dark"}`,disabled:(()=>{if(1==k&&(!E(Number(B?.country?.minimum),Number(B?.country?.maximum)).test(B?.phoneNumber)||q&&!ei?.success))return!0;let e=B?.name;return!(2!=k||e&&e?.length!==0&&C.test(e))||3===k&&(Q>=U.max||Q<U.min)||eu||L})(),onClick:()=>{let e={country:{isd:B?.country?.ISD,name:B?.country?.country}};B?.country?.ISD=="+91"?e.phoneNumber=B?.phoneNumber:e.intPhoneNumber=B?.phoneNumber,1==k&&(window.dataLayer&&window.dataLayer.push({event:"Health Insurance Form - Customer Contact",click_text:"Contact Filled",currentPage:window.location.href,nextPage:window.location.href}),window.dataLayer&&window.dataLayer.push({event:"Virtual Page Path",vpv:"vpv/health-insurance/customer-contact"}),window.lmSMTObj&&window.lmSMTObj.track(`${"/"==window.location.pathname||"/v1"==window.location.pathname||"/v0"==window.location.pathname?"healthHomepageLead":"healthGetQuoteLead"}`,{name:"health insurance",stepName:`${"/"==window.location.pathname||"/v1"==window.location.pathname||"/v0"==window.location.pathname?"Health Homepage Lead":"Health GetQuote Lead"}`,customUrl:window.location.href}),window.lmSMTObj&&window.lmSMTObj.identify("",{phone:`+91${B.phoneNumber}`}),ed({data:{...ey,forms:{...e}}},{onSuccess:e=>{if(e?.success&&e?.quoteId&&e?.dialerId){sessionStorage.setItem(o.cY.QUOTE_ID,e.quoteId),sessionStorage.setItem(o.cY.DIALER_ID,e.dialerId);let t=localStorage.getItem("homeInfo"),a="";null!==t&&(a=JSON.parse(t).insuranceType),Y(),"Health"===a&&M(e=>e+1)}}}));let t=sessionStorage.getItem(o.cY.QUOTE_ID),a=sessionStorage.getItem(o.cY.DIALER_ID);e.name=B?.name?.toUpperCase()||"",e.dateOfBirth=B?.dob||"",2==k&&(window.dataLayer&&window.dataLayer.push({event:"Health Insurance Form - Customer Name",click_text:"Name Filled",currentPage:window.location.href,nextPage:window.location.href}),window.dataLayer&&window.dataLayer.push({event:"Virtual Page Path",vpv:"vpv/health-insurance/customer-name"}),window.lmSMTObj&&window.lmSMTObj.track(`${("/"==window.location.pathname||"/v1"==window.location.pathname||window.location.pathname,"healthUserName")}`,{name:"health insurance",stepName:`${("/"==window.location.pathname||"/v1"==window.location.pathname||window.location.pathname,"Health User Name")}`,customUrl:window.location.href}),window.lmSMTObj&&window.lmSMTObj.identify("",{name:B.name},{phone:`+91${B.phoneNumber}`}),ed({data:{...ey,forms:{...e}},quoteId:t,dialerId:a},{onSuccess:e=>{e?.success&&(W(t=>({city:t.city||e.prefillCity,...t})),M(e=>e+1))}})),3==k&&(window.lmSMTObj&&window.lmSMTObj.track("healthDobDetails",{name:"health insurance",stepName:"Form Submitted",dob:B.dob,customUrl:window.location.href}),ed({data:{...ey,forms:{...e}},quoteId:t,dialerId:a},{onSuccess:e=>{if(e?.success){let e={multi:"false",productType:"reassurev3",retailFlag:H,isRelog:em.query.isRelog,copay:em.query.copay};em.push({pathname:"/health-insurance-plan/summary",query:e})}}}))},id:z(String(k)),children:eu?(0,n.jsx)(i.A,{}):(0,n.jsxs)(n.Fragment,{children:[I?(0,n.jsxs)("div",{id:z(String(k)),className:"md:h-full md:w-full h-[10px] w-[8px] flex flex-row items-center",children:[(0,n.jsx)(N(),{src:"/ethinos-home-page/svgs
1/right-chevron.svg",width:10,height:15,alt:"right chevron",className:"md:hidden flex",id:z(String(k))}),(0,n.jsx)("span",{id:z(String(k)),className:"font-bold text-sm md:text-base uppercase md:flex hidden",children:1==k?"start now":"next"})]}):(0,n.jsx)("span",{id:z(String(k)),className:"font-bold text-sm md:text-base uppercase",children:1==k?"start now":"next"}),!I&&(0,n.jsx)(e=>{let{id:t,size:a}=e;return(0,n.jsx)("svg",{stroke:"currentColor",fill:"none","stroke-width":"2",viewBox:"0 0 24 24","stroke-linecap":"round","stroke-linejoin":"round",id:t,width:a,height:a,xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{id:t,d:"m9 18 6-6-6-6"})})},{size:24,id:z(String(k))})]})})]})]})};a(57287);var A=a(86132);a(98800),N(),N(),N(),N();var I=a(62273),q=a(45050),k=a(74188),M=a(17183),L=a(95844),R=a(87936);let P=e=>{let{formName:t,getQuoteForm:a,isds:s,otp:r,time:o,showOTP:l,errors:c,onMobileChange:d,handleOTP:u,onMobileReset:m,onCountryChange:h,initData:x,onGetOTP:g,onViewPlan:f,isLoading:w}=e,y=a?.phoneNumber,v=!a?.phoneNumber||!!c.phone||!!c.otp,N=l&&(4!==r.length||!!c.otp),C=v||N,[S,E]=(0,p.useState)(!0);return(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t,country:a}=e.detail||{};t&&(a&&h(a),d({target:{value:t}}))};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[d]),(0,n.jsx)("section",{className:"bg-white",children:(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(b.A,{id:(0,I.$C)("mobile-number-input",t),isds:s,inputValue:a?.phoneNumber,countryValue:a?.country||"India",onMobileChange:d,onCountryChange:h,isMask:x?.channel=="Tele Caller",onMobileReset:m,newDesignConfig:!1,isLeadForm:!0,corporateLeadForm:!0}),c.phone&&(0,n.jsx)("span",{className:"text-xs text-red-700 pl-2",children:c.phone}),l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(q.E,{id:(0,I.$C)("otp-label",t),htmlFor:(0,I.$C)("otp-input",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Enter the verification code"}),(0,n.jsxs)(q.E,{size:"xs",color:"dimmed",children:["[OTP has been sent to ",y.slice(0,5)+"••••","]"]}),(0,n.jsx)(k.Y,{align:"center",mb:"sm",children:(0,n.jsx)(M.c,{id:(0,I.$C)("otp-input",t),length:4,value:r,onChange:u,size:"lg",type:"number"})}),c.otp&&(0,n.jsx)("span",{className:"text-xs text-red-700",children:c.otp}),(0,n.jsx)(q.E,{size:"xs",color:"dimmed",mb:"sm",children:o>0?(0,n.jsxs)(n.Fragment,{children:["Resend the code in ",o,"s"]}):(0,n.jsx)(L.M,{id:(0,I.$C)("resend-otp-button",t),component:"button",size:"xs",onClick:g,children:"Resend code"})})]}),(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:S,onClickCheckBox:e=>E(e)}),(0,n.jsx)(R.$,{id:(0,I.$C)(l?"get-quote-button":"get-otp-button",t),fullWidth:!0,disabled:C||w,onClick:l?f:g,className:`hover:opacity-90 transition-opacity ${C||w?"bg-orange-300 text-white cursor-not-allowed":"bg-nivabupa-ethinosHomeOrange text-white rounded-md w-full px-10 py-3 hover:opacity-90 transition-opacity"}`,children:w?(0,n.jsx)(i.A,{}):l?"Get Quote":"Get OTP"})]})})};var F=a(73209),D=a(31408),$=a(81312),_=a(1850),G=a(74022),H=a.n(G),z=a(36199),V=a.n(z);let Y=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),B=e=>{let{formName:t,isds:a,cities:s,getQuoteForm:r,onMobileChange:o,onMobileReset:l,onPortChange:c,onCountryChange:d,initData:u,errors:m,isLoading:h,onViewPlan:x,onNameChange:g,onDateChange:f,onDateChangeMobile:w,constraint:y,onCityChange:v}=e,N=()=>{let{phoneNumber:e,name:t,dob:a,city:n,port:s}=r||{};return!e||!t?.trim()||!a||!n||!s||!!m.phone||!!m.name||!!m.dob||!!m.city||!!m.port},[C,S]=(0,p.useState)(!0),E=(0,p.useMemo)(()=>[...s?.cities||[]].sort((e,t)=>e.localeCompare(t)).map(e=>({value:e.toLowerCase(),label:Y(e)})),[s]);return(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t}=e.detail||{};t&&o({target:{value:t}})};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[]),(0,n.jsx)("section",{className:"bg-white",children:(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{id:(0,I.$C)("mobile-number-label",t),htmlFor:(0,I.$C)("mobile-number-input",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Mobile Number"}),(0,n.jsx)(b.A,{id:(0,I.$C)("mobile-number-input",t),isds:a,inputValue:r?.phoneNumber,countryValue:r?.country||"India",onMobileChange:o,onCountryChange:d,isMask:u?.channel=="Tele Caller",onMobileReset:l,newDesignConfig:!1,isLeadForm:!0}),m.phone&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:m.phone})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(q.E,{id:(0,I.$C)("name-label",t),htmlFor:(0,I.$C)("name-input",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Name"}),(0,n.jsx)(D.k,{id:(0,I.$C)("name-input",t),placeholder:"Enter your name",size:"sm",radiu
1s:"md",className:"rounded-md text-base",classNames:H(),value:r?.name,onChange:g,styles:{input:{outline:"none",boxShadow:"none","&:focus":{outline:"none",boxShadow:"none"}}}}),m.name&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:m.name})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{id:(0,I.$C)("dob-label",t),htmlFor:(0,I.$C)("dob-input",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Date of Birth"}),(0,n.jsx)("div",{className:"flex items-center gap-2 border border-gray-300 rounded-[4px] px-3 py-2.5 bg-white",children:(0,n.jsx)("input",{id:(0,I.$C)("dob-input",t),type:"date",autoFocus:!0,className:"flex-1 text-md font-normal outline-none border-none bg-transparent text-base",required:!0,onChange:f,value:r?.dob,min:(0,F.Wy)(y.max).add(1,"day").format("YYYY-MM-DD"),max:(0,F.Wy)(y.min).format("YYYY-MM-DD")})}),m.dob&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:m.dob})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(q.E,{id:(0,I.$C)("location-label",t),htmlFor:(0,I.$C)("location-select",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Location"}),(0,n.jsx)($.l,{id:(0,I.$C)("location-select",t),placeholder:"Select City",size:"sm",radius:"md",value:r?.city||"",data:E,onChange:e=>v(e||""),nothingFoundMessage:"No city found",error:m.city||void 0,searchable:!0,allowDeselect:!1,className:"text-base",classNames:H()})]}),(0,n.jsx)("div",{children:(0,n.jsx)(_.s.Group,{id:(0,I.$C)("port-policy-group",t),label:"Do you want to port your policy?",value:r?.port||"",onChange:c,error:m.port||void 0,children:(0,n.jsxs)("div",{className:"flex flex-row mt-4 gap-10 w-full",children:[(0,n.jsx)(_.s,{id:(0,I.$C)("port-policy-yes-radio",t),value:"Yes",label:"Yes",variant:"outline",color:"#FFAF14",classNames:V(),className:"rounded-md w-[50%] text-base"}),(0,n.jsx)(_.s,{id:(0,I.$C)("port-policy-no-radio",t),value:"No",label:"No",variant:"outline",color:"#FFAF14",classNames:V(),className:"rounded-md w-[50%] text-base"})]})})}),(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:C,onClickCheckBox:e=>S(e)}),(0,n.jsx)("div",{className:"w-full my-2",children:(0,n.jsx)("button",{id:(0,I.$C)("get-quote-button",t),disabled:N()||h,type:"submit","aria-label":"Get insurance quote",className:`rounded-md w-full px-10 py-2 font-semibold transition-opacity ${N()||h?"bg-orange-300 text-white cursor-not-allowed":"bg-nivabupa-ethinosHomeOrange text-white hover:opacity-90"}`,onClick:x,children:h?(0,n.jsx)(i.A,{}):"Get Quote"})})]})})},W=e=>{let{formName:t,isds:a,getQuoteForm:s,onMobileChange:r,onCountryChange:o,initData:l,onDateChange:c,onDateChangeMobile:d,onMobileReset:u,constraint:m,isLoading:h,errors:x,onNameChange:g,onViewPlan:f}=e,[w,y]=(0,p.useState)(!1),v=!s?.phoneNumber||!s?.name?.trim()||!s?.dob||!!x.phone||!!x.name||!!x.dob,N=(0,p.useRef)(null),[C,S]=(0,p.useState)(!0);return((0,p.useEffect)(()=>{y(!0)},[]),(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t}=e.detail||{};t&&r({target:{value:t}})};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[r]),w)?(0,n.jsx)("section",{className:"bg-white",children:(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{htmlFor:(0,I.$C)("mobile-number-input",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Mobile Number"}),(0,n.jsx)(b.A,{isds:a,inputValue:s?.phoneNumber,countryValue:s?.country||"India",onMobileChange:r,onCountryChange:o,isMask:l?.channel=="Tele Caller",onMobileReset:u,newDesignConfig:!1,isLeadForm:!0}),x.phone&&(0,n.jsx)(q.E,{component:"div",size:"xs",color:"red",children:x.phone})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{htmlFor:(0,I.$C)("name-input",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Name"}),(0,n.jsx)(D.k,{placeholder:"Enter your name",size:"sm",radius:"md",classNames:H(),className:"rounded-md text-base",value:s?.name,onChange:g,styles:{input:{fontSize:"1rem",outline:"none",boxShadow:"none","&:focus":{outline:"none",boxShadow:"none"}}}}
1),x.name&&(0,n.jsx)(q.E,{component:"div",size:"xs",color:"red",children:x.name})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{htmlFor:(0,I.$C)("dob-input",t),component:"label",fw:600,size:"sm",className:"mb-2",children:"Date of Birth"}),(0,n.jsx)("div",{className:"flex items-center gap-2 border border-gray-300 rounded-[4px] px-3 py-2.5 bg-white",children:(0,n.jsx)("input",{type:"date",className:"flex-1 text-base font-normal outline-none border-none bg-transparent",required:!0,onChange:c,value:s?.dob,min:(0,F.Wy)(m.max).add(1,"day").format("YYYY-MM-DD"),max:(0,F.Wy)(m.min).format("YYYY-MM-DD"),ref:N})}),x.dob&&(0,n.jsx)(q.E,{size:"xs",color:"red",component:"div",children:x.dob})]}),(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:C,onClickCheckBox:e=>S(e)}),(0,n.jsx)("div",{className:"w-full my-2",children:(0,n.jsx)("button",{type:"submit",disabled:v||h,className:`rounded-md w-full px-10 py-2 font-semibold transition-opacity ${v||h?"bg-orange-300 text-white cursor-not-allowed":"bg-nivabupa-ethinosHomeOrange text-white hover:opacity-90"}`,onClick:f,children:h?(0,n.jsx)(i.A,{}):"Get Quote"})})]})}):(0,n.jsx)("section",{className:"bg-white",suppressHydrationWarning:!0,children:(0,n.jsxs)("div",{className:"flex flex-col gap-3",suppressHydrationWarning:!0,children:[(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{component:"label",fw:600,size:"sm",className:"mb-2",children:"Mobile Number"}),(0,n.jsx)("div",{className:"border border-gray-300 rounded-md px-3 py-2.5 bg-white h-10"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{component:"label",fw:600,size:"sm",className:"mb-2",children:"Name"}),(0,n.jsx)("div",{className:"border border-gray-300 rounded-md px-3 py-2.5 bg-white h-10"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,n.jsx)(q.E,{component:"label",fw:600,size:"sm",className:"mb-2",children:"Date of Birth"}),(0,n.jsx)("div",{className:"border border-gray-300 rounded-[4px] px-3 py-2.5 bg-white h-10"})]}),(0,n.jsx)("div",{className:"w-full my-2",children:(0,n.jsx)("button",{type:"button",disabled:!0,className:"bg-orange-300 text-white cursor-not-allowed rounded-md w-full px-10 py-3",children:"Get Quote"})})]})})};var U=a(2814),Q=a.n(U);let J=e=>{let{formName:t,getQuoteForm:a,isds:s,otp:r,time:o,showOTP:l,errors:c,onMobileChange:d,onNameChange:u,handleOTP:m,onMobileReset:h,onCountryChange:x,initData:g,onGetOTP:f,onViewPlan:w,handleBackspace:y,isLoading:v}=e,[N,C]=(0,p.useState)(!1),[S,E]=(0,p.useState)(!0),O=a?.phoneNumber,T=!a?.phoneNumber||!a?.name?.trim()||!!c.name||!!c.phone||!!c.otp,A=l&&(4!==r.length||!!c.otp),P=T||A;return((0,p.useEffect)(()=>{C(!0)},[]),(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t,country:a}=e.detail||{};!t||(d({target:{value:t}}),a&&x(a))};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[]),(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t}=e.detail||{};t&&d({target:{value:t}})};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[d]),N)?(0,n.jsx)("section",{className:"bg-white",children:(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(q.E,{fw:600,size:"sm",className:"mb-2",children:"Mobile Numbers"}),(0,n.jsx)(b.A,{id:(0,I.$C)(t,"mobile-number-input"),isds:s,inputValue:a?.phoneNumber,countryValue:a?.country||"India",onMobileChange:d,onCountryChange:x,isMask:g?.channel=="Tele Caller",onMobileReset:h,newDesignConfig:!1,isLeadForm:!0}),c.phone&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:c.phone}),(0,n.jsx)(q.E,{fw:600,size:"sm",className:"mb-2",children:"Name"}),(0,n.jsx)(D.k,{id:(0,I.$C)(t,"name-input"),placeholder:"Enter your name",size:"sm",radius:"md",classNames:Q(),value:a?.name,className:"rounded-md focus:outline-none focus:ring-0 text-base",onChange:u}),c.name&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:c.name}),l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(q.E,{fw:600,size:"sm",className:"mb-2",children:"Enter the verification code"}),(0,n.jsxs)(q.E,{size:"xs",color:"dimmed",children:["[OTP has been sent to ",O.slice(0,5)+"••••","]"]}),(0,n.jsx)(k.Y,{align:"center",mb:"sm",children:(0,n.jsx)(M.c,{id:(0,I.$C)(t,"otp-input"),type:"number",length:4,value:r,onChange:m,size:"lg",onKeyDown:e=>{"Backspace"===e.key&&(e.preventDefault(),y())}})}),c.otp&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:c.otp}),(0,n.jsx)(q.E,{size:"xs",color:"dimmed",mb:"sm",children:o>0?(0,n.jsxs)(n.Fragment,{children:["Resend the code in ",o,"s"]}):(0,n.jsx)(L.M,{component:"button",size:"xs",onClick:f,id:(0,I.$C)(t,"resend-otp-button"),children:"Resend code"})})]}),(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:S,onClickCheckBox:e=>E(e)}),(0,n.jsx)(R.$,{id:(0,I.$C)(t,l?"get-quote-button":"get-otp-button"),fullWidth:!0,disabled:P||v,onClick:l?w:f,className:`hover:opacity-90 transition-opacity ${P||v?"bg-orange-300 text-white cursor-not-allowed":"bg-nivabupa-ethinosHomeOrange text-white rounded-md w-full px-10 py-3 hover:opacity-90 transition-opacity"}`,children:v?(0,n.jsx)(i.A,{}):l?"Get Quote":"Get OTP"})]})}):(0,n.jsx)("section",{className:"bg-white",suppressHydrationWarning:!0,children:(0,n.jsxs)("div",{className:"flex flex-col gap-2",suppressHydrationWarning:!0,children:[(0,n.jsx)(q.E,{fw:600,size:"sm",className:"mb-2",children:"Mobile Numbers"}),(0,n.jsx)("div",{className:"border border-gray-300 rounded-md px-3 py-2.5 bg-white h-10"}),(0,n.jsx)(q.E,{fw:600,size:"sm",className:"mb-2",children:"Name"}),(0,n.jsx)("div",{className:"border border-gray-300 rounded-md px-3 py-2.5 bg-white h-10"}),(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:S,onClickCheckBox:e=>E(e)}),(0,n.jsx)("button",{type:"button",disabled:!0,className:"bg-orange-300 text-white cursor-not-allowed rounded-md w-full px-10 py-3",children:"Get OTP"})]})})};function Z(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}var K=a(35881),X=a(74661),ee=a(98477),et=a(95062),ea=a.n(et);let en=e=>{let{closeModal:t,partnerLogo:a,isParentComponentBAA:s}=e,[r,i]=(0,p.useState)({imgSrc:"",imgAlt:"Partner Logo"});return(0,p.useEffect)(()=>{s||i({imgSrc:a?.data?.attributes?.url||"",imgAlt:a?.data?.attributes?.name||"Partner Logo"})},[s,a]),(0,ee.createPortal)((0,n.jsx)("div",{className:"fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-[99999]",onClick:e=>{e.target===e.currentTarget&&t()},children:(0,n.jsxs)("div",{className:"bg-gradient-to-b from-orange-100 to-white max-w-full w-11/12 sm:max-w-[600px] px-5 pt-5 pb-12 rounded-xl shadow-lg relative",children:[(0,n.jsx)("button",{className:"absolute top-2 right-3 text-[#00B0F6] w-[20px] h-[20px] rounded-full flex justify-center items-center text-xs",onClick:t,children:"X"}),!s&&(0,n.jsxs)("div",{className:"flex justify-between w-full",children:[(0,n.jsx)(N(),{alt:"avatar",src:"/home-page-images/logo-bar-images/Niva-Bupa-Logo.svg",fill:!0,className:"w-[85px] h-auto relative"}),r.imgSrc&&(0,n.jsx)(N(),{alt:r.imgAlt,src:r.imgSrc,fill:!0,className:"max-h-[90px] h-auto max-w-[150px] relative"})]}),(0,n.jsxs)("div",{className:"w-full mt-5",children:[(0,n.jsx)("div",{className:"flex flex-col items-center",children:(0,n.jsx)("img",{src:"/aem-to-react/thank-you-page/become-agents-thank-you.png",alt:"Thank You",className:"md:w-[280px] w-[100px]"})}),(0,n.jsx)("div",{className:"text-center flex flex-col gap-2 mt-4",children:s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-2xl font-semibold",children:"Thankyou for your interest!"}),(0,n.jsx)("p",{className:"text-sm text-[#303030]",children:"We have received your application"}),(0,n.jsx)("p",{className:"text-sm text-[#303030]",children:"We will get in touch with you Thank y
1ou, Have a Nice Day!"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-2xl font-semibold",children:"Thank you for your interest!"}),(0,n.jsx)("p",{className:"text-sm text-[#303030]",children:"We have received your details"}),(0,n.jsx)("p",{className:"text-sm text-[#303030]",children:"Our health insurance advisor will get in touch with you!"})]})})]})]})}),document.body)};en.propTypes={closeModal:ea().func.isRequired,partnerLogo:ea().shape({data:ea().shape({attributes:ea().shape({url:ea().string,name:ea().string})})}),isParentComponentBAA:ea().bool};let es=e=>{let{formName:t,getQuoteForm:a,isds:s,errors:r,onNameChange:o,onCityChange:l,onMobileChange:c,onMobileReset:d,onCountryChange:u,initData:m,onViewPlan:h,isLoading:x,partnerLogo:g=null,parentComponent:f,cities:w=[]}=e,[y,v]=(0,p.useState)(1),[N,C]=(0,p.useState)(!0),[S,E]=(0,p.useState)(!1),O=(0,p.useRef)(!1),T=(0,p.useRef)(a?.phoneNumber||""),A=(0,p.useRef)({step1:!1,step2:!1,step3:!1}),k=a?.phoneNumber?.length>=10&&!r.phone,M=a?.name?.trim().length>=3&&!r.name,L=!!a?.city&&!r.city,P=(0,p.useMemo)(()=>[...w?.cities||[]].sort((e,t)=>e.localeCompare(t)).map(e=>({value:e.toLowerCase(),label:Y(e)})),[w]);(0,p.useEffect)(()=>{a?.phoneNumber!==T.current&&a?.phoneNumber&&(O.current=!0)},[a?.phoneNumber]),(0,p.useEffect)(()=>{if(1===y&&k&&a?.phoneNumber?.length===10&&O.current&&!A.current.step1){h(),A.current.step1=!0;let e=setTimeout(()=>{v(2)},300);return()=>clearTimeout(e)}},[y,k,a?.phoneNumber]),(0,p.useEffect)(()=>{a?.phoneNumber&&a?.phoneNumber!==""||(O.current=!1,A.current.step1=!1)},[a?.phoneNumber]),(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t}=e.detail||{};t&&c({target:{value:t}})};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[]);let F=()=>{k&&!A.current.step1&&(h(),A.current.step1=!0),v(2)},_=()=>{M&&(h(),A.current.step2=!0,v(3))},G=()=>{L&&!x&&(h(),A.current.step3=!0,E(!0))},z="#FFD100",V=s.filter(e=>"+91"==e.ISD);return(0,n.jsxs)("section",{className:"w-full",children:[(()=>{switch(y){case 1:return(0,n.jsxs)("div",{className:"flex flex-col gap-4 animate-in fade-in duration-500",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(q.E,{fw:600,size:"sm",className:"mb-1",children:"Mobile Number"}),(0,n.jsx)(b.A,{id:(0,I.$C)("mobile-number-input",t),isds:V,inputValue:a?.phoneNumber,countryValue:a?.country||"India",onMobileChange:c,onCountryChange:u,isMask:m?.channel==="Tele Caller",onMobileReset:d,newDesignConfig:!1,isLeadForm:!0}),r.phone&&(0,n.jsx)("span",{className:"text-xs text-red-700 pl-2",children:r.phone})]}),(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:N,onClickCheckBox:e=>C(e)}),(0,n.jsx)("div",{className:"flex flex-row justify-center items-center gap-3",children:(0,n.jsx)(R.$,{size:"md",disabled:!k,onClick:F,className:"rounded-xl bg-nivabupa-ethinosHomeOrange hover:bg-nivabupa-ethinosHomeOrange text-white",styles:{root:{height:"48px",paddingInline:"2rem"}},children:"START NOW"})})]});case 2:return(0,n.jsxs)("div",{className:"flex flex-col gap-4 animate-in slide-in-from-right-4 duration-300",children:[(0,n.jsx)(D.k,{id:(0,I.$C)("full-name-input",t),label:"Full Name",placeholder:"Enter your name",value:a?.name||"",onChange:o,size:"md",radius:"md",classNames:H(),autoFocus:!0}),r.name&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:r.name}),(0,n.jsxs)("div",{className:"flex flex-row justify-center items-center gap-3",children:[(0,n.jsx)(R.$,{variant:"outline",onClick:()=>v(1),className:"rounded-xl",styles:{root:{height:"48px",paddingInline:"0.75rem",borderWidth:"2px",borderColor:z,backgroundColor:"transparent"}},children:(0,n.jsx)("span",{style:{color:z,fontSize:"20px",fontWeight:"bold"},children:"<"})}),(0,n.jsx)("button",{disabled:!M,onClick:_,className:"flex flex-row items-center justify-center gap-1.5 px-8 rounded-xl text-white font-semibold disabled:opacity-50 h-[48px] w-auto bg-nivabupa-ethinosHomeOrange",children:"NEXT"})]})]});case 3:return(0,n.jsxs)("div",{className:"flex flex-col gap-4 animate-in slide-in-from-right-4 duration-300",children:[(0,n.jsx)($.l,{id:(0,I.$C)("location-select",t),label:"City",placeholder:"Select City",size:"sm",radiu
1s:"md",value:a?.city||"",data:P,onChange:e=>l(e||""),nothingFoundMessage:"No city found",searchable:!0,allowDeselect:!1,className:"text-base",classNames:H()}),r.city&&(0,n.jsx)(q.E,{size:"xs",color:"red",children:r.city}),(0,n.jsxs)("div",{className:"flex flex-row justify-center items-center gap-3",children:[(0,n.jsx)(R.$,{variant:"outline",onClick:()=>v(2),className:"rounded-xl",styles:{root:{height:"48px",paddingInline:"0.75rem",borderWidth:"2px",borderColor:z,backgroundColor:"transparent"}},children:(0,n.jsx)("span",{style:{color:z,fontSize:"20px",fontWeight:"bold"},children:"<"})}),(0,n.jsx)(R.$,{id:(0,I.$C)("agent-submit-button",t),disabled:!L||x,onClick:G,className:"rounded-xl bg-nivabupa-ethinosHomeOrange hover:bg-nivabupa-ethinosHomeOrange disabled:bg-orange-300 text-white",styles:{root:{height:"48px",paddingInline:"1.5rem"}},children:x?(0,n.jsx)(i.A,{}):"SUBMIT"})]})]});default:return null}})(),S&&(0,n.jsx)(en,{closeModal:()=>{E(!1),v(1)},partnerLogo:g,isParentComponentBAA:!0})]})},er=e=>{let{multi:t,productType:a,initData:s,leadFormType:r,isds:i}=e,c=(0,h.useRouter)(),{cid:u,utm_source:m,utm_campaign:x,utm_term:b,utm_medium:f,utm_adgroup:w}=c.query,y=void 0==s?"true":"false",[v,N]=(0,p.useState)(!1),[j,C]=(0,p.useState)(""),[S,E]=(0,p.useState)(!1),[O,T]=(0,p.useState)(""),A=r===X.q.BECOMEAGENT,q={...s,name:"",phoneNumber:"",dob:"",city:"",port:"",country:g.G_,subDepartment:s?.agent!==""?s?.agent:""};!y&&q.phoneNumber&&(q.phoneNumber=((parseInt(q.phoneNumber)-931)/77).toString());let[k,M]=function(e,t){let[a,n]=(0,p.useState)(()=>(function(e,t){try{let a=window.localStorage.getItem(e);if(!a)return t;let n=JSON.parse(a);if(null==n)return t;if(Z(t)&&Z(n))return{...t,...n};return n}catch(e){return t}})(e,t));return(0,p.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(a))}catch(e){}},[e,a]),[a,n]}("true"===y?o.cY.GET_QUOTE_FORM:o.cY.TELE_QUOTE_FORM,q);(0,p.useEffect)(()=>{A&&M({...q,phoneNumber:"",country:g.G_})},[A]);let L=a&&Object.hasOwn(I.Pu,a)?I.Pu[a]:I.Pu.default,[R,F]=(0,p.useState)({}),[D,$]=(0,p.useState)({}),_=(0,p.useMemo)(()=>{let e=k?.dob?(0,l.QO)(k?.dob):0;return e<=100?e:0},[k?.dob]),{data:G}=(0,d.Ct)(),[H,z]=(0,p.useState)(59),V=(0,p.useRef)(null),{trigger:Y,isMutating:U,data:Q,reset:ee}=(0,d.En)({onSuccess:e=>{if(C(""),e?.success&&(V.current&&(clearInterval(V.current),z(59)),V.current=setInterval(()=>{z(e=>e>0?e-1:(V.current&&clearInterval(V.current),60))},1e3),"OTPCredential"in window)){let e=new AbortController;setTimeout(()=>{e.abort()},12e4),navigator.credentials.get({otp:{transport:["sms"]},signal:e.signal}).then(e=>{let t=e?.code;t&&C(t)}).catch(e=>{})}}}),{trigger:et,isMutating:ea,data:en,reset:er}=(0,d.pz)(),{trigger:ei,isMutating:eo}=(0,d.j4)({onSuccess:e=>{},onError:e=>{}}),{data:el,isLoading:ec,error:ed}=(0,d.lh)({}),eu=eo||U||ea,em={ipAddress:G?.ip,campaignId:u,utmLeadFields:{utmSource:m,utmCampaign:x,utmTerm:b,utmMedium:f,utmAdgroup:w},channel:k.channel||"Retail",subChannel:k.subChannel||"Website",department:k.department||"SWebsite",subDepartment:k.subDepartment||"Website",agentName:k.agentName||"",language:"english",productId:""},eh={utmLeadFields:{utmSource:m||"",utmCampaign:x||"",utmTerm:b||"",utmMedium:f||"",utmAdgroup:w||""},channel:"New Business",subChannel:"Website",source:"Website",department:"SWebsite",subDepartment:"Website",language:"english",campaignId:S?"CSG Verified":"CSG Non Verified",productId:"CSG"},ep={campaignId:"become_an_agent_website",source:"Web Form",utmLeadFields:{utmSource:m||"",utmCampaign:x||"",utmTerm:b||"",utmMedium:f||"",utmAdgroup:w||""},subChannel:"Website",subDepartment:"Website",channel:"Agency",firstName:k.name?k.name.toUpperCase():"Agent Name",agentName:k.agentName||"",ipAddress:G?.ip,flag:!0,department:"",becomeAnAgent:!0},ex=()=>{M(e=>({...e,phoneNumber:""}))},eb=e=>{D.phone||$(e=>({...e,phone:!0}));let t=String(e.target.value??"").replace(/\D/g,""),a=Number(k?.country?.maximum??10),n=Number(k?.country?.minimum??1);(en&&er(),Q&&ee(),v&&t!==O&&(N(!1),C(""),V.current&&(clearInterval(V.current),V.current=null),z(59)),t.length>a)?F(e=>({...e,phone:void 0})):(M(e=>({...e,phoneNumber:t})),T(t),t.length)?t.length<n?F(e=>({...e,phone:`Please enter at least ${n} digits mobile number`})):t.length<=a&&(k?.country?.ISD==="+91"&&(I.Ie.test(t)||["1","2","3","4"].includes(t.charAt(0)))||t.length>=n&&t.length<=a&&!(0,I.ml)(n,a).test(t)?F(e=>({...e,phone:"Please enter the valid mobile number"})):F(e=>({...e,phone:void 0}
1))):F(e=>({...e,phone:"Mobile number is required."}))};(0,p.useEffect)(()=>{if(k&&Object.keys(D).length>0){let e=(e=>{let t={};e.name?.trim()&&I.VU.test(e.name)||(t.name="Please enter a valid name.");let a=Number(e?.country?.maximum??10),n=Number(e?.country?.minimum??10),s=String(e.phoneNumber??"").trim();if(s?s.length>a?t.phone=`Please enter no more than ${a} digits mobile number.`:s.length<n?t.phone=`Please enter at least ${n} digits mobile number.`:e?.country?.ISD==="+91"?(s.length!==a||I.Ie.test(s)||["1","2","3","4"].includes(s.charAt(0)))&&(t.phone="Please enter a valid mobile number."):(0,I.ml)(n,a).test(s)||(t.phone="Please enter a valid mobile number."):t.phone="Mobile number is required.",r===X.q.THREE||r===X.q.FIVE)if(e.dob){let a=(0,l.QO)(e.dob);(a<L.min||a>=L.max)&&(t.dob=`Please enter dob between ${L.min} & ${L.max-1}`)}else t.dob="Please select a valid date";return r!==X.q.FIVE&&r!==X.q.BECOMEAGENT||e.city?.trim()||(t.city="Please select your city"),t})(k),t={};for(let a of Object.keys(e))D[a]&&(t[a]=e[a]);F(t)}},[k,r,D]),(0,p.useEffect)(()=>{k?.phoneNumber&&!O&&T(k.phoneNumber)},[k?.phoneNumber]);let eg=async e=>{if((D.otp||$(e=>({...e,otp:!0})),C(e),F(e=>({...e,otp:void 0})),/^\d*$/.test(e))&&4===e.length)try{let t=await et({otp:e,phoneNumber:k.phoneNumber});t?.success?(E(!0),ef(!0)):F(e=>({...e,otp:t?.message||"Incorrect OTP. Please try again."}))}catch(t){let e=t?.data?.message||t?.response?.data?.message||t?.message||"Network error, please retry";F(t=>({...t,otp:e}))}},ef=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a={country:{isd:k?.country?.ISD,name:k?.country?.country},isGodsEyeServiceCall:!1};k?.country?.ISD==="+91"?a.phoneNumber=k?.phoneNumber:a.intPhoneNumber=k?.phoneNumber,eh.campaignId=e?"CSG Verified":"CSG Non Verified";let n={[X.q.CORPORATE]:eh,[X.q.BECOMEAGENT]:ep}[r]||em,s=r===X.q.BECOMEAGENT?{...a,name:k?.name?.toUpperCase()||"Agent Name",city:k?.city||""}:{...a,name:k?.name?.toUpperCase()||"",dateOfBirth:k?.dob||"",city:k?.city||"",port:k?.port||"",getQuickQuoteForm:{adultsDob:[],ageOfEldestMember:_,childsDob:[],dateofBirthOfEldestMember:k.dob,familyCombination:"1A",geography:k?.city||"",noOfAdults:1,noOfChildren:0,noOfMembers:1,planType:"individual",showModal:!0,protabiltyDetails:{}}};ei({data:{...n,forms:s,cookies:{ga:(0,K.Ri)("_ga")}}},{onSuccess:async e=>{if(e?.success&&e?.quoteId&&e?.dialerId){if(sessionStorage.setItem(o.cY.QUOTE_ID,e.quoteId),sessionStorage.setItem(o.cY.DIALER_ID,e.dialerId),t||r===X.q.BECOMEAGENT)return;let n={multi:"false",productType:"reassurev3",retailFlag:y,isRelog:c.query.isRelog,copay:c.query.copay};if(r===X.q.CORPORATE){let e=await fetch("/api/corporate-insurance/get-encrypted-phonenumber",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:(a.phoneNumber||k.phoneNumber).toString()})}),t=await e.json();c.push(`https://instasaral.nivabupa.com/abacusplus/?phoneNumber=${t.encryptedText}`)}else c.push({pathname:"/health-insurance-plan/summary",query:n})}},onError:e=>{}})},ew=e=>{M(t=>({...t,country:e,phoneNumber:""})),$(e=>({...e,phone:!1})),F(e=>{let{phone:t,otp:a,...n}=e;return n}),v&&(N(!1),C(""),V.current&&clearInterval(V.current),z(59)),T("")},ey=e=>{D.name||$(e=>({...e,name:!0}));let t=e.target.value.trimStart();F(e=>({...e,name:void 0})),M(e=>({...e,name:t})),t&&I.VU.test(t)?F(e=>{let{name:t,...a}=e;return a}):F(e=>({...e,name:"Please enter a valid name."}))},ev=e=>{D.dob||$(e=>({...e,dob:!0}));let t=e.target.value;M(e=>({...e,dob:t}))},eN=e=>{D.city||$(e=>({...e,city:!0}));let t=e.trim().toLowerCase();M(e=>({...e,city:t}))};(0,p.useEffect)(()=>{localStorage.setItem("homeInfo",JSON.stringify({insuranceType:"Health"}))},[]);let ej=async()=>{let e=k?.phoneNumber??"",t=Number(k?.country?.maximum??10),a=Number(k?.country?.minimum??1);if(!e||e.length<a||e.length>t)return void F(e=>({...e,phone:`Please enter a valid phone number between ${a} and ${t} digits`}));if(!(0,I.ml)(a,t).test(e))return void F(e=>({...e,phone:"Invalid phone number"}));F(e=>({...e,phone:void 0}));try{let t=await Y({phoneNumber:e});if(t?.success)N(!0),T(e),z(60),ef(!1,!0),V.current&&clearInterval(V.current),V.current=setInterval(()=>{z(e=>e>0?e-1:(clearInterval(V.current),0))},1e3),t.message&&F(e=>({...e,phone:t.message}));else{let e=t?.message||"Failed to send OTP. Try again.";F(t=>({...t,phone:e}))}}catch(e){F(e=>({...e,phone:"Network error. Please retry."}))}},eC={[X.L[X.q.TWO]]:(0,n.jsx)(J,{showOTP:v,isds:i,onCountryChange:ew,onMobileReset:ex,initData:s,onMobileChange:eb,onGetOTP:ej,otp:j,getQuoteForm:k,onViewPlan:ef,time:H,handleOTP:eg,onNameChange:ey,errors:R,isLoading:eu,formName:"two-lead-form",handleBackspace:()=>{C(e=>e.slice(0,-1))}}),[X.L[X.q.THREE]]:(0,n.jsx)(W,{isds:i,onCountryChange:ew,onMobileReset:ex,initData:s,onMobileChange:eb,getQuoteForm:k,onViewPlan:ef,errors:R,onNameChange:ey,isLoading:eu,constraint:L,onDateChange:ev,onDateChangeMobile:e=>{D.dob||$(e=>({...e,dob:!0})),M(t=>({...t,dob:e}))},formName:"tw-lead-form"}),[X.L[X.q.FIVE]]:(0,n.jsx)(B,{isds:i,onCountryChange:ew,onMobileReset:ex,initData:s,onMobileChange:eb,getQuoteForm:k,isLoading:eu,onViewPlan:ef,errors:R,onNameChange:ey,onDateChange:ev,constraint:L,cities:el,onCityChange:eN,onPortChange:e=>{D.port||$(e=>({...e,port:!0})),M(t=>({...t,port:e}))},formName:"five-lead-form"}),[X.L[X.q.CORPORATE]]:(0,n.jsx)(P,{showOTP:v,isds:i,onCountryChange:ew,onMobileReset:ex,initData:s,onMobileChange:eb,onGetOTP:ej,otp:j,getQuoteForm:k,onViewPlan:ef,time:H,handleOTP:eg,errors:R,isLoading:eu,formName:"corporate-lead-form"}),[X.L[X.q.BECOMEAGENT]]:(0,n.jsx)(es,{onNameChange:ey,onMobileChange:eb,isds:i,onCountryChange:ew,onMobileReset:ex,getQuoteForm:k,onViewPlan:ef,errors:R,isLoading:eu,cities:el,initData:s,onCityChange:eN,formName:"become-an-agent-lead-form"})}[r]||null;return(0,n.jsx)(n.Fragment,{children:eC})};var ei=a(51868),eo=a(89482),el=a(99742);class ec{static logFile(e,t,a){e.writeFile(a,t,e=>{})}static async getTravelServicesData(e){let t=JSON.stringify({quoteId:e});try{let e=await fetch("/api/TravelServices/getInitData",{method:"POST",body:t}),a=await e.json();return{status:!0,data:a}}catch(e){return{status:!1}}}static async getTravelServicesPaymentLink(e){let t=JSON.stringify(e);try{let a,n=await fetch("/api/TravelServices/pushData",{method:"POST",body:t});return e.pmlClicked,a=await n.json(),{status:!0,data:a}}catch(e){return{status:!1}}}static getHostname(){let e="LOCAL"===el.env.MONGO_CONFIG,t="UAT"===el.env.MONGO_CONFIG;return e?"http://localhost:3000/":t?el.env.HOST_NAME_UAT:el.env.HOST_NAME_PROD}static async getcountries(){return(await eo.A.post("/api/TravelServices/getData",{data:"countires"})).data}static async generateOnlineLeadForTravel(e){try{let t=await eo.A.post("/api/TravelServices/createOnlineLeads",{data:e});return t.data.acknowledged&&await localStorage.setItem("travelLeadID",t.data.insertedId),{status:!0}}catch(e){return{status:!1}}}static async updateOnlineLeadForTravel(e){e.travelLeadID=await localStorage.getItem("travelLeadID");try{return(await eo.A.post("/api/TravelServices/createOnlineLeads",{data:e,case:"2"})).data.acknowledged,{status:!0}}catch(e){return{status:!1}}}static async fetchTravelPlans(){let e=await localStorage.getItem("travelLeadID");try{let t=await eo.A.post("/api/TravelServices/fetchTravelPlans",{travelLeadID:e});return{status:!0,data:t.data}}catch(e){return{status:!1}}}static async fetchredirectUrl(e,t,a,n){let s=await localStorage.getItem("travelLeadID");try{let r=await eo.A.post("/api/TravelServices/fetchTravelPlans",{travelLeadID:s,coverage:e,plan:t,pedOpted:!a,selectedValues:n,case:2});return{status:!0,data:r.data}}catch(e){return{status:!1}}}static getZonesForTravel(e,t){let a=1/0,n=null;
1return e.forEach(e=>{let s=t[e];s&&parseInt(s.Priority)<a&&(a=parseInt(s.Priority),n=s)}),n}static async generateOnlineLeadForTravelV2(e){try{let t=await eo.A.post("/api/TravelServices/createOnlineLeadsV2",{data:e});return t.data.acknowledged&&await localStorage.setItem("travelLeadID",t.data.insertedId),{status:!0}}catch(e){return{status:!1}}}static async checkApplicationStatus(e){try{let t=await eo.A.post("/api/telecallerInt/fetchStatus",e);return{status:!0,data:t.data.msg}}catch(e){return{status:!1,data:e.message}}}static async getPinCodes(){try{let e=await eo.A.get("/api/TravelServices/getAvailablePinCodes");return{status:!0,data:e.data}}catch(e){return{status:!1,data:[]}}}static getDesieseIndexes(e){let t=0,a={};return e.forEach(e=>{let n=e.split("_")[2];a[n]||(a[n]=t,t+=1)}),a}static returnMedicalFormJson(e){if(!e||0==Object.keys(e).length)return{};let t={};return Object.keys(e).forEach(a=>{let n=e[a],s=Object.keys(n),r=this.getDesieseIndexes(s);s.forEach(e=>{let a=e.split("_"),s=a[0],i=a[1],o=a[3],l=r[a[2]]-1;t[s]||(t[s]={}),t[s][i]||(t[s][i]=[]),t[s][i][l]||(t[s][i][l]={}),n[e]&&(t[s][i][l][o]=n[e],t[s][i][l].dieseseName=a[2])})}),JSON.stringify(t,null,4),t}static transformInputData(e){let t=!1;Object.keys(e).forEach(e=>{e.includes("question")&&!t&&(t=!0)}),t&&(e=this.returnMedicalFormJson(e));let a={question1:{},question2:{},question3:{},question4:{},question5:{},question6:{},question7:{},question8:{},question9:{},question10:{},question11:{},question12:{},question13:{},question14:{},question15:{},question16:{},question17:{},question18:{},question19:{},question20:{}};for(let t in Object.keys(e).forEach(t=>{let n=e[t];Object.keys(n).forEach(e=>{let s=n[e],r=0;s.forEach(n=>{if(n){let s=n.dieseseName;Object.keys(n).forEach(r=>{a[e][`${t}_${e}_${s}_${r}`]=n[r]}),r++}})})}),a)0===Object.keys(a[t]).length&&(a[t]="");return a}static transormAspireSaverToHRMedQuestions(e,t){let a=Object.keys(e=JSON.parse(JSON.stringify(e))),n={};a.forEach(e=>{n[e]={}});let s=[],r=t?{question1:"question1",question2:"question2",question3:"question3",question4:"question3",question5:"question5",question6:"question6",question8:"question4"}:{question2:"question3",question3:"question3",question4:"question4",question5:"question5",question6:"question6",question7:"question1",question8:"question2",question9:"question1"};return a.forEach(t=>{Object.keys(e[t]).forEach(a=>{if(Object.keys(r).includes(a)){let i=r[a];Object.keys(n[t]).includes(i)?e[t][a].forEach(e=>{n[t][i].push(e)}):(n[t][i]=e[t][a],s.push(i))}})}),n}static async createPaymentUrl(e,t,a){let n=this.getHostname(),s=await fetch("/api/CommonPaymentServiceNew",{method:"POST",body:JSON.stringify({host:n,applicationId:e,amount:t,return_url:"payments/redirect-status",encryptedApplicationId:a,productId:"travel_101",quoteId:e,isComboCase:!1,isPrepayment:!0})});return{status:!0,url:await s.json()}}static async createDialerLead(e){return{status:!0,data:(await eo.A.post("/api/TravelServices/dialerLeadEntry",e)).data}}}var ed=a(27434),eu=a(95306);let em=/([0-9])\1{6,}/,eh=(e,t)=>RegExp(`^\\d{${e},${t}}$`),ep=()=>{let[e,t]=(0,p.useState)(!1),[a,s]=(0,p.useState)(!1),[r,l]=(0,p.useState)(!1),[c,d]=(0,p.useState)(""),[u,m]=(0,p.useState)(!1),[x,b]=(0,p.useState)(!1),[f,w]=(0,p.useState)(""),[y,v]=(0,p.useState)(!0),C=(0,h.useRouter)(),[S,E]=(0,ei.M)({key:o.cY.TRAVEL_FORM});(0,p.useEffect)(()=>{S?.mobileNumber&&d(S.mobileNumber)},[]);let O=async e=>{try{var a,n;b(!0),w(""),m(!0);let r=((a={...S,mobileNumber:e}).extraParameters={cid:(n=C.query).cid||"",bc:n.bc||"511151",BL:n.BL||"NOC - NOIDA",AI:n.AI||"NA",AN:n.AN||"NA",RMC:n.RMC||"000P111042",RMN:n.RMN||"Ankur Kharbanda",C:n.C||"Online",AP:n.AP||"NA",PML:n.PML||"",utm_source:n.utm_source||"",utm_campaign:n.utm_campaign||"",utm_term:n.utm_term||"",utm_medium:n.utm_medium||""},a);if(!await ec.generateOnlineLeadForTravelV2(r)){w("Failed to generate lead. Try again."),t(!0);return}s(!0),await C.push("/travel-insurance.html")}catch(e){w("Failed to generate lead. Please try again."),t(!0)}finally{b(!1),m(!1)}},T=async n=>{let r=n.target.value;if(!(r.length>10)){if(d(r),w(""),E(e=>({...e,mobileNumber:r})),10!==r.length&&a&&s(!1),em.test(r)||["1","2","3","4"].includes(r.charAt(0)))return void t(!0);e&&t(!1),10===r.length&&(eh(10,10).test(r)?(m(!0),await O(r)):t(!0))}};(0,p.useEffect)(()=>
1{l(!1)},[e,a]);let I=async()=>{eh(10,10).test(c)?(m(!0),await O(c)):t(!0)};return(0,p.useEffect)(()=>{let e=e=>{let{phoneNumber:t}=e.detail||{};t&&T({target:{value:t}})};return window.addEventListener("sticky-prefill-quote",e),()=>{window.removeEventListener("sticky-prefill-quote",e)}},[C.isReady,C.query]),(0,n.jsx)("div",{className:"",id:"travel-insurance-mobile-number-input",children:(0,n.jsxs)("div",{className:"flex flex-col gap-8 mt-5 bg-white items-center xs:justify-between justify-center w-full",id:"travel-insurance-mobile-number-input",children:[(0,n.jsx)("div",{className:`p-5 bg-white md:px-0 px-0 py-2 justify-between w-full relative rounded-md flex flex-col gap-3 border-2 ${e?"border-red-500":"border-gray-300"}`,id:"travel-insurance-mobile-number-input",children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex gap-1 md:flex-row md:gap-0 md:p-2 relative justify-between mb-0 md:mb-0",id:"travel-insurance-mobile-number-input",children:[(0,n.jsx)(eu.G,{value:g.G_,disabled:!0,children:e=>{let{value:t}=e;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"relative rounded-lg text-nivabupa-black",id:"travel-insurance-mobile-country-dropdown",children:(0,n.jsxs)("div",{className:"flex flex-row items-center bg-white",id:"travel-insurance-mobile-country-dropdown",children:[(0,n.jsxs)("div",{className:"ml-2 flex flex-row items-center gap-1",children:[(0,n.jsx)(ed.A,{countryName:t.country}),(0,n.jsx)("div",{id:"country-code",className:"py-2 pl-2 rounded-l-md",children:`${t?.ISD}`})]}),(0,n.jsx)(A.yQ,{className:"ml-2 h-4 w-4 text-black"})]})})})}}),(0,n.jsx)("div",{className:"flex flex-row md:gap-4 gap-1 items-center",id:"travel-insurance-mobile-number-input",children:(0,n.jsx)("div",{className:"flex flex-row items-center bg-white p-3 max-w-[320px] rounded-sm relative",id:"travel-insurance-mobile-number-input",children:(0,n.jsx)("input",{id:"travel-insurance-mobile-number-input",autoFocus:!0,className:"w-full h-full placeholder:text-nivabupa-black placeholder:opacity-50 outline-none placeholder:font-normal placeholder:text-sm",type:"tel",placeholder:"Enter Mobile Number",required:!0,value:c,onChange:e=>{e.target.value=e.target.value.replace(/\D/g,""),T(e)},disabled:x})})})]}),e&&(0,n.jsx)("span",{className:"text-xs text-red-700",id:"travel-insurance-mobile-number-input-error",children:f||"Please enter valid mobile number"})]})}),(0,n.jsx)(j.A,{activeStep:1,isCheckedTerms:y,onClickCheckBox:e=>v(e)}),(0,n.jsx)("div",{className:"flex flex-row justify-between w-[93px] items-center md:gap-3 gap-2",id:"travel-insurance-start-now-btn",children:(0,n.jsx)("button",{className:"flex flex-row w-full items-center md:px-0 px-0 rounded-lg text-white ml-auto disabled:opacity-50 md:h-[54px] h-[39px] bg-nivabupa-ethinosHomeOrange",onClick:I,disabled:!eh(10,10).test(c)||x||u,id:"travel-insurance-start-now-btn",children:(0,n.jsx)("div",{className:"h-full w-full justify-center flex flex-row items-center",id:"travel-insurance-start-now-btn",children:x?(0,n.jsx)(i.A,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(N(),{src:"/ethinos-home-page/svgs/right-chevron.svg",width:10,height:15,alt:"right chevron",className:"hidden",id:"travel-insurance-start-now-btn"}),(0,n.jsx)("span",{className:"text-xs font-normal capitalize md:text-base md:flex",id:"travel-insurance-start-now-btn",children:"start now"})]})})})})]})})},ex=e=>{let{leadFormType:t,isds:a}=e;switch(t){case X.q.TWO:case X.q.THREE:case X.q.CORPORATE:case X.q.FIVE:case X.q.BECOMEAGENT:return(0,n.jsx)(er,{isds:a,leadFormType:t});case X.q.TRAVEL:return(0,n.jsx)(ep,{});case X.q.SINGLE:default:return(0,n.jsx)(T,{hideProgressBar:!0,newDesignConfig:!0,isds:a})}};var eb=a(89704),eg=a(79021),ef=a(46787),ew=a(99742);function ey(e){let t,a,{isds:s,leadFormType:r,stripText:i,stripIcon:o}=e,{leadFormHeadingHealth:l,leadFormHeadingTravel:c,leadFormHeadingCorporate:d,leadFormHeadingBecomeAnAgent:u,leadFormOfferHealth:m,leadFormOfferTravel:h,leadFormOfferCorporate:p,leadFormOfferBecomeAnAgent:x}=(0,ef.A)();if((r===X.q.SINGLE||r===X.q.TWO||r===X.q.THREE||r===X.q.FIVE)&&l)t=l;else if(r===X.q.TRAVEL&&c)t=c;else if(r===X.q.CORPORATE&&d)t=d;else if(r===X.q.BECOMEAGENT&&u)t=u;else switch(r){case X.q.TRAVEL:t="Secure Your Trip in Minutes";break;case X.q.CORPORATE:t="Get Group Coverage for Your Company";break;case X.q.SINGLE:case X.q.TWO:case X.q.THREE:case X.q.FIVE:default:t="Start Your Health Insurance Today"}if((r===X.q.SINGLE||r===X.q.TWO||r===X.q.THREE||r===X.q.FIVE)&&m)a=m;else if(r===X.q.TRAVEL&&h)a=h;else if("corporate"===r&&p)a=p;else if(r===X.q.BECOMEAGENT&&x)a=x;else switch(r){case X.q.TRAVEL:a="Stay protected against medical emergencie
1s, trip delays, and lost baggage worldwide.";break;case"corporate":case X.q.CORPORATE:a="Get flexible corporate insurance policies tailored to your company's unique needs.";break;case X.q.SINGLE:case X.q.TWO:case X.q.THREE:case X.q.FIVE:default:a="Get right coverage, right premium and the right protection instantly."}let b=i;if(!i)switch(r){case X.q.SINGLE:case X.q.TWO:case X.q.THREE:case X.q.FIVE:b=""}let g={LOCAL:ew.env.DOMAIN_LOCAL||null,UAT:ew.env.DOMAIN_UAT||null,STAGING:ew.env.DOMAIN_STAGING||null,PROD:ew.env.DOMAIN_PROD||null}[(ew.env.MONGO_CONFIG||"PROD").toUpperCase()]||null,f=g&&o?`https://${g}${o}`:o||"";return(0,n.jsxs)(eb.t,{h:"fit-content",shadow:"xl",radius:"md",withBorder:!0,children:[(0,n.jsx)("div",{className:"bg-nivabupa-blue-ethinosPlanRecommendation h-14 flex justify-center items-center font-bold text-lg rounded-t-md text-white",children:t}),b&&(0,n.jsxs)("div",{className:"bg-[#ffaf1433] text-center p-2 text-sm flex flex-row items-center justify-center prose-p:text-sm gap-1",children:[f&&(0,n.jsx)("img",{height:24,width:24,src:f,alt:"strip icon",loading:"lazy"}),b]}),(0,n.jsxs)(eg.B,{p:"xl",children:[(0,n.jsxs)("p",{children:[" ",a]}),(0,n.jsx)("div",{className:"flex flex-col gap-4 mb-2 ",children:(0,n.jsx)("div",{className:"flex flex-row items-center relative w-full",children:(0,n.jsx)(ex,{isds:s,leadFormType:r})})})]})]})}},36199:e=>{e.exports={icon:"RadioForm_icon__1C8w9",input:"RadioForm_input__zIdxM",label:"RadioForm_label__QZeYF"}},62273:(e,t,a)=>{"use strict";a.d(t,{$C:()=>l,Ie:()=>r,Pu:()=>o,VU:()=>s,ml:()=>i});var n=a(74429);let s=/^[a-zA-Z. ]+$/,r=/([0-9])\1{6,}/,i=(e,t)=>RegExp(`^\\d{${e},${t}}$`),o={[n.AS.BHARAT]:{max:66,min:18},[n.AS.REASSUREV2]:{max:100,min:18},[n.AS.REASSURE]:{max:100,min:18},[n.AS.SENIOR_FIRST]:{max:76,min:61},[n.AS.ASPIRE]:{max:66,min:18},[n.AS.HEALTH_RECHARGE]:{max:66,min:18},[n.AS.ASPIRE_SAVER]:{max:66,min:18},[n.AS.HEALTH_PREMIA]:{max:66,min:18},[n.AS.GO_ACTIVE]:{max:66,min:18},[n.AS.HEARTBEAT]:{max:66,min:18},[n.AS.HEALTH_PULSE]:{max:66,min:18},default:{max:100,min:18}},l=(e,t)=>
1`${t}-${e}`},74022:e=>{e.exports={input:"LeadForm_input__MOS7G",label:"LeadForm_label__wx80l"}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.