// Builds wa_i645_campaign_statements.json (dataset statements) and .csv (curated table) from the // 2026 voters' pamphlet p.14 (IP26-645) and the Governor's 3/30/2026 signing release. Quotes are verbatim. const fs=require("fs"),crypto=require("crypto"); const VP="vp-2026-ip26-645-p14", GOV="gov-release-2026-03-30"; const yesSp=["Committee for the argument for Initiative 645 (Sen. Chris Gildon and five co-authors)","Authors of the official voters' pamphlet argument for I-645"]; const noSp=["Committee for the argument against Initiative 645 (WEA President Janie White and five co-authors)","Authors of the official voters' pamphlet argument against I-645"]; const S=[ ["yes-rejected-ten-times","yes","Vote Yes: Repeal the Income Tax, Make Olympia Keep Its Word","Over the last 90 years, Washingtonians have rejected an income tax ten times because they knew it would threaten economic growth, discourage investment, and reach beyond the people originally targeted.","assertion"], ["yes-rejected-limits","yes","Taxes Always Expand","But lawmakers rejected opportunities to permanently limit its reach, giving Olympia the ability to expand the income tax to everyone.","assertion"], ["yes-80-transfers","yes","A History of Broken Promises","80 times in the last five years Olympia has moved money from dedicated accounts to the general fund.","assertion"], ["yes-early-learning","yes","A History of Broken Promises","The capital gains tax was promised to support early learning and childcare, yet those commitments were delayed, reduced, or cancelled.","assertion"], ["yes-pensions-raid","yes","A History of Broken Promises","First responders spent careers relying on promises about their retirements, only to watch the legislature raid their pensions to plug holes in the general fund.","assertion"], ["yes-preserves-relief","yes","Closing paragraph","Voting Yes repeals the new income tax before it begins, preserves the Working Families Tax Credit, paid family leave, and small-business tax relief.","assertion"], ["yes-rebuttal-expand","yes","Rebuttal of argument against","Without I-645, Olympia can expand the income tax to reach into your paycheck with the simple stroke of a pen. No public vote and no permission required, any time they want.","assertion"], ["yes-rebuttal-diapers","yes","Rebuttal of argument against","This was never about schools or diapers, that's a scare tactic.","assertion"], ["yes-rebuttal-record-revenues","yes","Rebuttal of argument against","Washington has record revenues.","assertion"], ["yes-rebuttal-everyone","yes","Rebuttal of argument against","An income tax on anyone will become an income tax on everyone.","prediction"], ["no-upside-down","no","Opening paragraph","Washington has one of the nation’s most upside-down tax systems, where working and middle class families pay a far higher tax rate than the wealthiest.","assertion"], ["no-opening-effects","no","Opening paragraph","I-645 is fiscally irresponsible, slashing billions in funding for education and healthcare, increasing taxes on 460,000 hard-working families, and jeopardizing tax cuts for thousands of small businesses.","assertion"], ["no-heywood-millions","no","Vote No: Stop a Tax Break for the Wealthiest","Hedge fund mogul Brian Heywood has spent millions backing I-645 because he wants a tax cut for the top 1%, while sticking working and middle class families and small businesses with higher costs.","assertion"], ["no-460000-families","no","Vote No: Stop a Tax Break for the Wealthiest","I-645 could mean higher taxes for thousands of small businesses, force families to pay sales tax for basic household items like diapers, and raise taxes for 460,000 Washington families – just so those making over a million dollars in a year get a tax break.","assertion"], ["no-13-billion-cuts","no","Vote No: Stop Cuts to Schools, Healthcare, and Childcare","This measure cuts funding for K-12 public schools, healthcare, childcare, and other important public services by $13 billion over four years.","assertion"], ["no-school-lunches","no","Vote No: Stop Cuts to Schools, Healthcare, and Childcare","That means larger class sizes, higher costs for healthcare and childcare, and the elimination of free school lunches for many children.","assertion"], ["no-rebuttal-final-say","no","Rebuttal of argument for","Any attempt to expand it to those of us making under a million would be decided on the ballot - voters always have the final say.","assertion"], ["no-rebuttal-hole","no","Rebuttal of argument for","I-645 blows a $13 billion hole in the budget - don’t believe lies that we can keep tax cuts for working families and small businesses but eliminate the tax on the wealthy few that pays for them.","assertion"] ]; const ctx={yes:"Part of the official argument for Initiative 645 printed on page 14 of the 2026 Washington state voters' pamphlet, under the heading shown in this statement's table row. The statement was written by the committee appointed to write the argument for the measure.", no:"Part of the official argument against Initiative 645 printed on page 14 of the 2026 Washington state voters' pamphlet, under the heading shown in this statement's table row. The statement was written by the committee appointed to write the argument against the measure."}; const statements=S.map(([id,side,head,quote,type])=>{const sp=side=="yes"?yesSp:noSp;return {id,speaker:sp[0],speakerRole:sp[1],date:"2026-09-17",venue:`2026 Washington voters' pamphlet, Initiative Measure IP26-645, p. 14, ${side=="yes"?"argument for":"argument against"}: "${head}"`,quote,context:ctx[side],claimType:type,sourceId:VP}}); statements.push({id:"governor-460000-families",speaker:"Office of Governor Bob Ferguson",speakerRole:"Governor of Washington (press office)",date:"2026-03-30",venue:"Press release, \"Governor Ferguson signs Millionaires' Tax into law\"",quote:"Expansion of the Working Families Tax Credit to 460,000 new working families.",context:"A bullet in the governor's list of what ESSB 6346 does, published the day he signed the bill. It describes households newly eligible for the Working Families Tax Credit, an expansion that the Budget and Policy Center says begins in 2029. It is the earliest official use of the 460,000 figure we found.",claimType:"assertion",sourceId:GOV}); const esc=v=>'"'+String(v).replace(/"/g,'""')+'"'; const rows=[["statement_id","side","pamphlet_section","quote","claim_type","source_id"].join(",")]; statements.forEach(s=>{const side=s.id.startsWith("yes")?"yes":s.id.startsWith("no")?"no":"official";const head=(S.find(x=>x[0]==s.id)||[])[2]||"(press release)";rows.push([s.id,side,head,s.quote,s.claimType,s.sourceId].map(esc).join(","))}); const csv=rows.join("\n")+"\n";fs.writeFileSync("wa_i645_campaign_statements.csv",csv,"utf8"); fs.writeFileSync("wa_i645_campaign_statements.json",JSON.stringify(statements,null,1),"utf8"); const b=Buffer.from(csv,"utf8");console.log(JSON.stringify({bytes:b.length,sha256:"sha256:"+crypto.createHash("sha256").update(b).digest("hex"),n:statements.length}));