1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6169],{788:(e,t,a)=>{a.d(t,{c:()=>n});var r=a(95155);a(12115);var l=a(49498);let n=e=>{let{results:t,className:a}=e;return(0,r.jsx)("div",{className:(0,l.cn)("mt-5 space-y-4 bg-[var(--rv-bg-page)] p-5 rounded-2xl border border-[var(--rv-border)]",a),children:t.map((e,a)=>{let n="number"==typeof e.value&&e.value<0;return(0,r.jsxs)("div",{className:"last:mb-0",children:[(0,r.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center px-2 mb-2",children:[(0,r.jsx)("p",{className:"text-[var(--rv-text-muted)] opacity-80 text-sm md:text-base font-medium",children:e.label}),(0,r.jsx)("p",{className:(0,l.cn)("font-bold text-lg md:text-xl",(e.type,"text-[var(--rv-primary)]"),n&&"text-red-600"),children:"percentage"===e.type?e.value.toFixed(2)+"%":"number"==typeof e.value?"â¹"+Math.floor(e.value).toLocaleString("en-IN"):e.value})]}),a<t.length-1&&(0,r.jsx)("div",{className:"h-[1px] w-full bg-[var(--rv-text)] opacity-50"})]},a)})})}},5210:(e,t,a)=>{a.d(t,{A:()=>i});var r=a(95155),l=a(23399),n=a(12115);let s=e=>new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:0}).format(e),o=()=>{let e=getComputedStyle(document.documentElement),t=(t,a)=>e.getPropertyValue(t).trim()||a;return{text:t("--rv-text","#111827"),muted:t("--rv-text-muted","#6b7280"),border:t("--rv-border","#e5e7eb"),surface:t("--rv-bg-surface","#ffffff"),invested:t("--rv-chart-invested",t("--rv-primary","#d8a517")),returnColor:t("--rv-chart-return",t("--rv-secondary","#ffffff")),growth:t("--rv-chart-growth",t("--rv-secondary","#ffffff"))}},i=e=>{let{years:t,Intrested:a,principalBarAmount:i,balance:c}=e,[u,d]=(0,n.useState)(o);(0,n.useEffect)(()=>{let e=()=>d(o());e();let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),t.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[]);let m=(0,n.useMemo)(()=>({backgroundColor:"transparent",textStyle:{color:u.text},tooltip:{trigger:"axis",backgroundColor:u.surface,borderColor:u.border,textStyle:{color:u.text},valueFormatter:e=>s(e),axisPointer:{type:"shadow"}},legend:{orient:"horizontal",top:"top",left:"center",itemGap:20,padding:[10,10],type:"scroll",textStyle:{fontSize:14,color:u.text}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0}
1,xAxis:[{type:"category",data:t,axisLine:{lineStyle:{color:u.border}},axisTick:{lineStyle:{color:u.border}},axisLabel:{color:u.muted}}],yAxis:[{type:"value",axisLabel:{formatter:e=>s(e),color:u.muted},splitLine:{lineStyle:{color:u.border}}},{type:"value",axisLabel:{formatter:e=>s(e),color:u.muted},splitLine:{show:!1}}],series:[{name:"Future Monthly Expense",type:"line",smooth:!0,yAxisIndex:1,data:a,itemStyle:{color:u.returnColor},lineStyle:{color:u.returnColor,width:3},symbol:"circle",symbolSize:8},{name:"Future Yearly Expense",type:"bar",stack:"Ad",emphasis:{focus:"series"},data:i,itemStyle:{color:u.invested},barWidth:"50%"},{name:"Retirement Corpus Value",type:"line",smooth:!0,yAxisIndex:1,data:c,itemStyle:{color:u.growth},lineStyle:{color:u.growth,width:3},symbol:"triangle",symbolSize:8}]}),[a,i,c,u]);return(0,r.jsx)("div",{className:"col-12 ",children:(0,r.jsx)("div",{className:"w-auto mt-5 position-relative overflow-hidden bar-graph rounded-lg bg-[var(--rv-bg-surface)] border border-[var(--rv-border)] p-4",id:"echarts-containers",children:(0,r.jsx)(l.A,{option:m,style:{height:"400px",width:"100%"}})})})}},12579:(e,t,a)=>{a.d(t,{A:()=>n});var r=a(12115);let l="/logo.png";function n(){let[e,t]=(0,r.useState)(l);return(0,r.useEffect)(()=>{t(localStorage.getItem("custom-logo")||l);let e=()=>{t(localStorage.getItem("custom-logo")||l)};return window.addEventListener("logo-updated",e),()=>{window.removeEventListener("logo-updated",e)}},[]),e}},22479:(e,t,a)=>{a.d(t,{E:()=>n});var r=a(95155),l=a(49498);function n(e){let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,l.cn)("animate-pulse rounded-md bg-primary/10",t),...a})}},36169:(e,t,a)=>{a.r(t),a.d(t,{default:()=>h});var r=a(95155),l=a(12115),n=a(20063),s=a(37065),o=a(15330),i=a(70225),c=a(36496),u=a(34416),d=a(22479),m=a(46469),p=a(788),x=a(12579),b=a(5210);function h(){(0,n.useRouter)();let e=(0,x.A)(),[t,a]=(0,l.useState)(30),[h,v]=(0,l.useState)(60),[g,y]=(0,l.useState)(85),[f,j]=(0,l.useState)(4e4),[N,w]=(0,l.useState)(7),[S,E]=(0,l.useState)(14),[M,A]=(0,l.useState)(7),[R,C]=(0,l.useState)(5),[k,F]=(0,l.useState)(null),[L,I]=(0,l.useState)([]),[P,T]=(0,l.useState)(!0),[V,z]=(0,l.useState)(!0),[_,G]=(0,l.useState)(),Y=async()=>{if(!k)return;let a={labels:["Future Monthly Expenses","Required Corpus At Retirement","Planning Through SIP","Planning Through Lump Sum"],totalInvestment:k.totalMonthlyExpenses,futureValue:k.totalLumpsumCorpus,sipInvestment:k.totalThroughSip,lumpsumInvestment:k.totalThroughLumpsum,inputs:[{label:"Current Age (Years)",value:t},{label:"Retirement Age (Years)",value:h},{label:"Life Expectancy (Years)",value:g},{label:"Current Monthly Expenses (â¹)",value:f},{label:"Inflation Rate (%)",value:N},{label:"Pre-Retirement Return (%)",value:S},{label:"Post-Retirement Return (%)",value:M}]};(0,c.F7)(a,"Retirement Planning","2023-01-01","2023-12-31","chartGraph","barGraph",_,e)};(0,l.useEffect)(()=>{(async()=>{try{let e=await o.A.get("".concat(i.Q,"/api/admin/site-settings"));200===e.status&&G(e.data[0])}catch(e){console.log(e)}})()},[]);let D=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&T(!0);try{let e=await o.A.get("".concat(i.Q,"/api/calculators/retirement-plan?currentAge=").concat(t,"&retirementAge=").concat(h,"&lifeExpectancy=").concat(g,"¤tlyMonth=").concat(f,"&inflationRate=").concat(N,"&preRetirementReturn=").concat(S,"&postRetirementReturn=").concat(M));if(200===e.status){let t=e.data,a=t.totalMonthlyExpenses,r=t.totalLumpsumCorpus,l=t.totalThroughSip,n=t.totalThroughLumpsum,s=t.chartData;F({totalMonthlyExpenses:Number(null==a?void 0:a.toFixed(2)),totalLumpsumCorpus:Number(null==r?void 0:r.toFixed(2)),totalThroughSip:Number(null==l?void 0:l.toFixed(2)),totalThroughLumpsum:Number(null==n?void 0:n.toFixed(2))}),I(s),T(!1)}}catch(e){console.log(e)}finally{e&&T(!1)}};return(0,l.useEffect)(()=>{V?(D(!0),z(!1)):D()},[t,h,g,f,N,S,M]),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto flex flex-col gap-5 md:gap-8",children:[(0,r.jsx)(u.default,{title:"Retirement Planning Calculator",subtitle:"Future Income Planning",onDownload:Y,activeCalculator:"Retirement Planning Calculator"}),P?(0,r.jsxs)("div",{className:"grid lg:grid-cols-2 grid-cols-1 gap-4 animate-pulse p-4",children:[(0,r.jsx)("div",{className:"border border-[var(--rv-primary)] rounded-3xl bg-[var(--rv-bg-page)] p-5 space-y-5",children:[...Array(6)].map((e,t)=>(0,r.jsxs)("div",{children:[(0,r.jsx)(d.E,{className:"h-6 w-1/3 mb-2"}),(0,r.jsx)(d.E,{className:"h-10 w-full"})]},t))}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(d.E,{className:"h-72 w-full rounded-2xl"}),(0,r.jsx)(d.E,{className:"h-80 w-full rounded-2xl"})]})]}):(0,r.jsxs)("div",{className:"grid lg:grid-cols-2 grid-cols-1 gap-6 mb-4",children:[(0,r.jsx)("div",{className:"col-span-1 border border-[var(--rv-primary)] rounded-3xl bg-[var(--rv-bg-page)] p-2 md:p-5 shadow-md",children:(0,r.jsxs)("div",{className:"container mx-auto
1sticky top-4 z-10",children:[(0,r.jsxs)("div",{className:"mt-5 mb-10 space-y-5",children:[(0,r.jsx)(m.A,{label:"Current Age (Y)",min:18,max:Math.min(h-1,60),step:1,value:t,setValue:a}),(0,r.jsx)(m.A,{label:"Retirement Age (Y)",min:Math.max(t+1,40),max:Math.min(g-1,80),step:1,value:h,setValue:v}),(0,r.jsx)(m.A,{label:"Life Expectancy (Y)",min:Math.max(h+1,60),max:100,step:1,value:g,setValue:y}),(0,r.jsx)(m.A,{label:"Monthly Expenses (â¹)",min:5e3,max:1e9,step:1e3,value:f,setValue:j}),(0,r.jsx)(m.A,{label:"Inflation Rate (%)",min:1,max:20,step:.1,value:N,setValue:w}),(0,r.jsx)(m.A,{label:"Pre-Retirement Return (%)",min:1,max:100,step:.1,value:S,setValue:E}),(0,r.jsx)(m.A,{label:"Post-Retirement Return (%)",min:1,max:100,step:.1,value:M,setValue:A})]}),k&&(0,r.jsx)(p.c,{results:[{label:"Future Monthly Expenses",value:k.totalMonthlyExpenses},{label:"Required Corpus At Retirement",value:k.totalLumpsumCorpus},{label:"Planning Through SIP",value:k.totalThroughSip},{label:"Planning Through Lump Sum",value:k.totalThroughLumpsum}]})]})}),(0,r.jsxs)("div",{className:"col-span-1 space-y-6",children:[(0,r.jsx)("div",{className:"border border-[var(--rv-primary)] rounded-3xl overflow-hidden bg-[var(--rv-bg-page)] shadow-md",id:"chartGraph",children:(0,r.jsx)(s.F,{piedata:{totalInvestment:Number(f),futureValue:Number((null==k?void 0:k.totalMonthlyExpenses)||0)},title:"Future & Current Monthly Expenses Breakup",customLabels:{invested:"Current Monthly Expenses",return:"Future Monthly Expenses"},chartConfig1:{invested:{label:"Monthly Expenses",color:"var(--rv-primary)"},return:{label:"Future Monthly Expenses",color:"var(--rv-secondary)"}}})}),(0,r.jsx)("div",{className:" overflow-hidden bg-[var(--rv-bg-page)] shadow-md ",id:"barGraph",children:(0,r.jsx)(b.A,{years:L.years,Intrested:L.interested,principalBarAmount:L.principal,balance:L.balance})})]})]})]})})}},46469:(e,t,a)=>{a.d(t,{A:()=>d});var r=a(95155),l=a(88661),n=a.n(l);a(12115);var s=a(49498);let o=["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],i=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"],c=e=>0===e?"":e<20?o[e]:e<100?"".concat(i[Math.floor(e/10)]).concat(e%10?" ".concat(o[e%10]):""):"".concat(o[Math.floor(e/100)]," hundred").concat(e%100?" ".concat(c(e%100)):""),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/â¹|amount|investment|cost|expense|wealth|savings|emi|sip|lumpsum/i.test(e)},d=e=>{let{label:t,min:a,max:l,step:o,value:i,setValue:d,className:m}=e,p=e=>e||0===e?e.toLocaleString("en-IN"):"",x=e=>Math.min(Math.max(e,"number"==typeof a?a:0),"number"==typeof l?l:Number.MAX_SAFE_INTEGER),b="number"==typeof a?a:0,h=u(t)&&Number(i)<b,v=x(isNaN(i)?b:i),g=u(t)?(e=>{let t=Math.floor(Math.abs(Number(e)));if(!Number.isFinite(t))return"";if(0===t)return"zero";let a=[],r=Math.floor(t/1e7),l=Math.floor(t%1e7/1e5),n=Math.floor(t%1e5/1e3),s=t%1e3;return r&&a.push("".concat(c(r)," crore")),l&&a.push("".concat(c(l)," lakh")),n&&a.push("".concat(c(n)," thousand")),s&&a.push(c(s)),a.join(" ")})(i):"";return(0,r.jsxs)("div",{className:"jsx-dd67dc0c9c4b29ba "+((0,s.cn)("mt-5",m)||""),children:[(0,r.jsxs)("div",{className:"jsx-dd67dc0c9c4b29ba grid grid-cols-3 items-start gap-4 mb-2",children:[(0,r.jsx)("div",{className:"jsx-dd67dc0c9c4b29ba min-w-0 col-span-2",children:(0,r.jsx)("span",{className:"jsx-dd67dc0c9c4b29ba block text-[var(--rv-text)] font-medium",children:t})}),(0,r.jsx)("input",{type:"text",value:p(i),onChange:e=>{let t=parseFloat(e.target.value.replace(/,/g,"").replace(/[^\d.]/g,""));isNaN(t)?d(0):d(Math.min(Math.max(t,0),"number"==typeof l?l:Number.MAX_SAFE_INTEGER))},className:"jsx-dd67dc0c9c4b29ba font-semibold bg-[var(--rv-bg-page)] text-[var(--rv-text)] w-auto border border-[var(--rv-border-light)] px-2 py-2 rounded-lg text-right focus:outline-none focus:ring-1 focus:ring-[var(--rv-primary)] col-span-1"}),(0,r.jsx)("div",{className:"jsx-dd67dc0c9c4b29ba col-span-3 flex flex-col items-end",children:h?(0,r.jsxs)("p",{className:"jsx-dd67dc0c9c4b29ba text-xs leading-5 capitalize text-red-600 text-right",children:["Minimum amount to be ",p(b)]}):g?(0,r.jsx)("p",{className:"jsx-dd67dc0c9c4b29ba text-xs capitalize leading-5 text-[var(--rv-text)] text-right",children:g}):null})]}),(0,r.jsx)("input",{type:"range",min:a,max:l,step:o,value:v,onCh
1ange:e=>d(x(parseFloat(e.target.value))),style:{"--progress":"".concat((v-a)/(l-a)*100,"%")},className:"jsx-dd67dc0c9c4b29ba customRange w-full"}),(0,r.jsx)(n(),{id:"dd67dc0c9c4b29ba",children:".customRange.jsx-dd67dc0c9c4b29ba{-webkit-appearance:none;height:6px;background:var(--rv-gray);border-radius:5px;background-image:linear-gradient(var(--rv-primary),var(--rv-primary));background-size:var(--progress)100%;background-repeat:no-repeat}.customRange.jsx-dd67dc0c9c4b29ba::-webkit-slider-thumb{-webkit-appearance:none;height:18px;width:18px;border-radius:50%;background:var(--rv-primary);cursor:pointer;box-shadow:0 0 2px 0 rgba(0,0,0,.5);transition:background.3s ease-in-out}.customRange.jsx-dd67dc0c9c4b29ba::-webkit-slider-runnable-track{-webkit-appearance:none;box-shadow:none;border:none;background:transparent}"})]})}},70225:(e,t,a)=>{a.d(t,{Q:()=>r});let r="https://shared.redvisionassets.com".replace(/\/$/,"")}}]);
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.