const t=(t,n,a)=>{if(0===n)return t/a;const r=n/12,m=Math.pow(1+r,a)-1;return t*(r*Math.pow(1+r,a)/m)},n=n=>[{months:12,apr:.18,payment:t(n,.18,12)},{months:24,apr:.12,payment:t(n,.12,24)},{months:36,apr:.15,payment:t(n,.15,36)}],a=(t,n,a)=>({displayPayment:`${new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(n)}/mo`,aprText:`${(100*a).toFixed(0)}% APR`});export{a as f,n as g};