1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1636],{41636:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var o=r(95155),n=r(1488),i=r(80688),s=r(64924),a=r(13021),l=r(12115),c=r(93870),d=r(73321),m=r(9424),x=r(31871);function u(){let e=(0,d.useRouter)(),{num:t,setNum:r,loading:u,setLoading:g,successMessage:p,setSuccessMessage:f,leadId:b,bankKey:h,categoryID:y,productCode:w,setProductCode:k,urlData:C}=(0,l.useContext)(c.Context),j={utm_source:C?.utm_source||"",utm_medium:C?.medium||"",utm_campaign:C?.campaign||"",utm_refcode:C?.ref||""},[v,A]=(0,l.useState)(["","","","","",""]),[S,T]=(0,l.useState)(""),[O,W]=(0,l.useState)(!1),[I,D]=(0,l.useState)(""),[P,_]=(0,l.useState)(0),R=(0,l.useRef)([]),F=m.EP[h||"pnb-smc-online-trading"];(0,l.useEffect)(()=>{if(P>0){let e=setTimeout(()=>_(P-1),1e3);return()=>clearTimeout(e)}},[P]);let B=e=>{e.preventDefault();let t=e.clipboardData.getData("text").slice(0,6);if(!/^\d+$/.test(t))return;let r=t.split("");A([...r,...Array(6-r.length).fill("")]);let o=Math.min(t.length,5);R.current[o]?.focus()},E=async o=>{o.preventDefault();let n=v.join("");if(u)return;if(6!==n.length)return void T("Please enter a valid 6-digit OTP");let i="IOB"===w||"GRIOB"===w;g(!0);try{let o="IOB"===w?x.mV:"GRIOB"===w?x.F4:x.S,s=await o({mobile_number:t,otp:n,source:C?.utm_source||"web",medium:C?.medium||"",campaign:C?.campaign||"",partner_id:"smc",product_code:w},w,j);if(s?.data?.status==="success"){if(i){let o=await (0,x.J1)({mobileNo:t});g(!1),f("OTP verified successfully!");let n=o?.data?.data?.redirect;n&&window.open(n,"_blank"),A(["","","","","",""]);let i="GRIOB"===w?`/${h}/discount-brokerage`:`/${h}/full-service-brokerage`;setTimeout(()=>{f(""),r(""),e.push(i)},1500);return}let o=await (0,x.Ks)({mobileNo:t});g(!1);let n="string"==typeof y&&y.trim().toUpperCase().endsWith("FS")?`/${h}/full-service-brokerage`:`/${h}/discount-brokerage`;if(o?.data?.data?.redirect){window.open(o.data?.data?.redirect,"_blank"),A(["","","","","",""]),r(""),e.push(n);return}T(o?.error?.response?.data?.error||"Unable to complete verification. Please try again.")}else T(s?.error?.response?.data?.error||"Invalid OTP"),g(!1)}catch(e){console.error("OTP verification error:",e),T("An error occurred. Please try again."),g(!1)}},$=async()=>{if(!O&&!(P>0)){W(!0),T(""),D("");try{let e="IOB"===w||"GRIOB"===w?x.OD:x.wq,r=await e({mobile_number:t,source:"web",partner_id:"smc",product_code:w});r?.data?.status==="success"?(D("OTP has been resent successfully!"),_(60),A(["","","","","",""]),R.current[0]?.focus(),setTimeout(()=>D(""),3e3)):T(r?.error?.response?.data?.error||"Failed to resend OTP")}catch(e){console.error("Resend OTP error:",e),T("Failed to resend OTP. Please try again.")}finally{W(!1)}}};return(0,o.jsxs)(n.Ay,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100vw"},children:[(0,o.jsxs)(n.Ay,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100vw",py:"1rem",px:{xl:"5rem",lg:"4rem",xs:"1rem"},background:"white"},children:[(0,o.jsx)(n.Ay,{sx:{display:"flex",flexDirection:"row",gap:"1rem"},children:(0,o.jsx)(i.A,{component:"img",src:"/images/smcAce.png",alt:"banner",sx:{maxWidth:{xs:"4rem",md:"4rem",xl:"4rem"},height:"auto",objectFit:"contain"}})}),(0,o.jsxs)(n.Ay,{sx:{display:"flex",flexDirection:"row",gap:"1rem"},children:[(0,o.jsx)(i.A,{component:"img",src:`/images/${F.navImage}`,alt:"banner",sx:{maxWidth:{xs:"6rem",md:"7rem",xl:"8rem"},height:"auto",objectFit:"contain"}}),(0,o.jsx)(i.A,{sx:{width:"0.0625rem",height:"3.25rem",background:"#707070"}}),(0,o.jsx)(i.A,{component:"img",src:"/images/smchead.svg",alt:"banner",sx:{maxWidth:{xs:"6rem",md:"7rem",xl:"8rem"},height:"auto",objectFit:"contain"}})]})]}),(0,o.jsxs)(n.Ay,{sx:{display:"flex",flexDirection:{xs:"column",md:"row",lg:"row"},justifyContent:"space-between",alignItems:"center",width:"100vw",minHeight:{xs:"auto",md:"70vh"},py:{xs:"8vw",md:"5vw",xl:"3vw"},px:{xs:"5vw",md:"5vw",lg:"4vw",xl:"5vw"},backgroundImage:`url('/images/${F.bg}')`,backgroundSize:"cover",backgroundPosition:"center",maxWidth:"100%",gap:{xs:"2rem",md:"2rem"}},children:[(0,o.jsxs)(n.Ay,{sx:{display:"flex",flexDirection:"column",gap:{xs:"1.5rem",md:"2.5rem"},maxWidth:"600px",width:"100%",mb:{xs:"2rem",md:0}},children:[(0,o.jsx)(s.A,{sx:{textShadow:"-8px 8px 28px rgba(0, 0, 0, 0.06)",fontSize:{xs:"2rem",sm:"2.5rem",md:"3rem",xl:"3.5rem"},fontStyle:"normal",lineHeight:{xs:"normal",md:"1.2"},fontWeight:"700",justifyContent:{xs:"center",md:"flex-start"},textAlign:{xs:"center",md:"start"},background:F.primaryTextColor,backgroundClip:"text",WebkitBackgroun
1dClip:"text",WebkitTextFillColor:"transparent"},children:"Open Free Demat & Trading Account"}),(0,o.jsxs)(s.A,{component:"h1",sx:{fontSize:{xs:"1rem",sm:"1.5rem",md:"2rem",xl:"2.5rem"},fontWeight:{xs:"600",sm:"700"},lineHeight:{xs:"1.5rem",sm:"1.2"},justifyContent:{xs:"center",md:"flex-start"},textAlign:{xs:"center",md:"start"},background:F.textColor,backgroundClip:"text",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:[F.name," - SMC 3-in-1 Tie-Up"]}),(0,o.jsxs)(n.Ay,{sx:{display:"flex",flexDirection:"column",gap:"1rem",alignItems:{xs:"center",md:"flex-start"},position:"relative",paddingBottom:"2.5rem"},children:[(0,o.jsxs)(n.Ay,{sx:{display:"flex",gap:{xs:"0.5rem",sm:"0.75rem",md:"1rem"},justifyContent:{xs:"center",md:"flex-start"},flexWrap:"wrap"},children:[v.map((e,t)=>(0,o.jsx)(i.A,{component:"input",ref:e=>R.current[t]=e,type:"text",inputMode:"numeric",maxLength:1,value:e,onChange:e=>((e,t)=>{if(!/^\d*$/.test(t))return;let r=[...v];r[e]=t.slice(-1),A(r),T(""),t&&e<5&&R.current[e+1]?.focus()})(t,e.target.value),onKeyDown:e=>{"Backspace"===e.key&&!v[t]&&t>0&&R.current[t-1]?.focus()},onPaste:0===t?B:void 0,disabled:u,sx:{width:{xs:"2.5rem",sm:"2.5rem",md:"2rem"},height:{xs:"2.5rem",sm:"2.5rem",md:"3rem"},fontSize:{xs:"1rem",md:"1rem"},fontWeight:"600",textAlign:"center",border:S?"2px solid #f44336":"2px solid #ddd",borderRadius:"0.5rem",backgroundColor:"white",outline:"none",transition:"all 0.2s","&:focus":{borderColor:F.buttonColor||"#1976d2",boxShadow:`0 0 0 3px ${F.buttonColor}33`},"&:disabled":{backgroundColor:"#f5f5f5",cursor:"not-allowed"}}},t)),(0,o.jsx)(a.A,{onClick:e=>E(e),disabled:u||6!==v.join("").length,sx:{display:{xs:"none",md:"inline-flex"},padding:".5rem 1rem",alignItems:"center",justifyContent:"center",gap:"0.75rem",color:F.buttonText,borderRadius:"0.5rem",fontWeight:"500",fontSize:"1.125rem",textTransform:"uppercase",width:"fit-content","&:hover":{backgroundColor:F.buttonColor,opacity:.9},"&:disabled":{backgroundColor:"#ccc",color:"#666"},background:F.buttonColor,boxShadow:"-8px 8px 28px rgba(0, 0, 0, 0.06)"},children:u?"Verifying...":"VERIFY OTP"})]}),(0,o.jsx)(a.A,{onClick:e=>E(e),disabled:u||6!==v.join("").length,sx:{display:{xs:"inline-flex",md:"none"},padding:"0.875rem 1.5rem",alignItems:"center",justifyContent:"center",color:F.buttonText,borderRadius:"0.5rem",fontWeight:"600",fontSize:"1rem",textTransform:"uppercase",width:{xs:"80%",sm:"fit-content"},"&:hover":{backgroundColor:F.buttonColor,opacity:.9},"&:disabled":{backgroundColor:"#ccc",color:"#666"},background:F.buttonColor,boxShadow:"-8px 8px 28px rgba(0, 0, 0, 0.06)"},children:u?"Verifying...":"VERIFY OTP"}),(0,o.jsx)(a.A,{onClick:$,disabled:O||P>0,sx:{color:F.textColor||"#000",textDecoration:"underline",fontSize:"1rem",fontWeight:"500",width:"fit-content",padding:"0.5rem 0",alignSelf:{xs:"center",md:"flex-start"},"&:hover":{textDecoration:"underline",background:"transparent",opacity:.8},"&:disabled":{color:"#999",cursor:"not-allowed",opacity:.6}},children:O?"SENDING...":P>0?`RESEND OTP (${P})`:"RESEND OTP"}),S&&(0,o.jsx)(s.A,{sx:{color:"#f44336",fontSize:"0.875rem",fontWeight:"500",position:"absolute",bottom:0,left:0},children:S}),p&&(0,o.jsx)(s.A,{sx:{color:"green",fontSize:"0.875rem",fontWeight:"500",position:"absolute",bottom:0,left:0},children:p}),I&&(0,o.jsx)(s.A,{sx:{color:"green",fontSize:"0.875rem",fontWeight:"500",position:"absolute",bottom:0,left:0},children:I})]})]}),(0,o.jsx)(n.Ay,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:{xs:"100%",md:"auto"},flex:{md:1}},children:(0,o.jsx)(i.A,{component:"img",src:`/images/${F.bannerImage||"bank-illustration.png"}`,alt:"banking illustration",sx:{maxWidth:{xs:"90%",sm:"80%",md:"95%",lg:"75%",xl:"65%"},height:"auto",objectFit:"contain"}})})]})]})}r(95797)}}]);
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.