let spenderKind="";const ageBreakdown={age03:{costPerPlate:175,glutenFreeMod:1.39,meatlesslMod:.62,thriftyMod:.6526,costConsciousMod:.8597,generousMod:1.2153},age48:{costPerPlate:233,glutenFreeMod:1.39,meatlesslMod:.71,thriftyMod:.6159,costConsciousMod:.8304,generousMod:1.1859},age911:{costPerPlate:311,glutenFreeMod:1.39,meatlesslMod:.79,thriftyMod:.5819,costConsciousMod:.7642,generousMod:1.1654},age1218:{costPerPlate:319,glutenFreeMod:1.39,meatlesslMod:.79,thriftyMod:.6084,costConsciousMod:.8111,generousMod:1.1982},age1950:{costPerPlate:323,glutenFreeMod:1.39,meatlesslMod:.79,thriftyMod:.6267,costConsciousMod:.8063,generousMod:1.2489},age5170:{costPerPlate:312,glutenFreeMod:1.39,meatlesslMod:.79,thriftyMod:.6168,costConsciousMod:.8008,generousMod:1.2046},age71:{costPerPlate:306,glutenFreeMod:1.39,meatlesslMod:.78,thriftyMod:.6216,costConsciousMod:.8034,generousMod:1.2176}},weeklyToMonthly=4.3333;document.addEventListener("DOMContentLoaded",(function(){let e=document.getElementById("household").value;document.getElementById("household").addEventListener("change",(function(t){if(e=t.target.value,0==e)t.target.parentNode.classList.remove("arrow"),document.querySelector(".household-wrap-arrow").style.display="none",document.querySelector(".household-wrap-arrow-prev").style.display="none";else{t.target.parentNode.classList.add("arrow"),document.querySelector(".household-wrap-arrow").style.display="block",document.querySelector(".household-wrap-arrow-prev").style.display="block";var o=setInterval((function(){const e=document.querySelector(".household-wrap-arrow span"),t=document.querySelector(".household-wrap-arrow-prev span"),r=document.querySelector(".calc-household-wrap").offsetTop+2,n=document.querySelector(".calc-household-wrap").offsetHeight-15;e.parentElement.style.top=r+"px",e.parentElement.style.height=n+"px",e.addEventListener("click",a),e.addEventListener("keypress",a),t.parentElement.style.top=r+"px",t.parentElement.style.height=n+"px",t.addEventListener("click",s),t.addEventListener("keypress",s),clearInterval(o)}),10)}const r=document.querySelectorAll(".calc-person");for(i=0;i .active").classList.remove("active"),e.target.classList.add("active");let t=document.querySelector(".slider-spender > .active").classList.value;t=t.replace(" active",""),document.querySelector(".type-budget").textContent=t,t=".slider-text ."+t,document.querySelector(".slider-text .active").classList.remove("active"),document.querySelector(t).classList.add("active"),updateCalculations(),e.target.blur()}},a=function(e){!0===a11yClick(e)&&(e.preventDefault(),document.querySelector(".calc-household-wrap").scrollLeft+=427,e.target.blur())},s=function(e){!0===a11yClick(e)&&(e.preventDefault(),document.querySelector(".calc-household-wrap").scrollLeft-=427,e.target.blur())};const n=document.querySelectorAll(".slider-spender > div");for(const e of n)e.addEventListener("click",r),e.addEventListener("mouseup",r),e.addEventListener("keypress",r)}));const updateCalculations=()=>{const e=document.querySelectorAll(".calc-person.active");let t=0,o=0,r=document.querySelector(".slider-spender .active").dataset.spender;for(i=0;i