Full Code of thegrims/UsTaxes for AI

master 3bba83198751 cached
522 files
1.2 MB
398.0k tokens
670 symbols
1 requests
Download .txt
Showing preview only (1,407K chars total). Download the full file or copy to clipboard to get everything.
Repository: thegrims/UsTaxes
Branch: master
Commit: 3bba83198751
Files: 522
Total size: 1.2 MB

Directory structure:
gitextract_fz9tnrwo/

├── .codecov.yml
├── .dockerignore
├── .eslintignore
├── .eslintrc.js
├── .github/
│   ├── dependabot.yml
│   ├── pull_request_template.md
│   └── workflows/
│       ├── ci.yml
│       └── tauri-release.yml
├── .gitignore
├── .husky/
│   ├── husky.sh
│   └── pre-commit
├── .npmrc
├── .nvmrc
├── .prettierignore
├── .prettierrc.json
├── Dockerfile
├── LICENSE
├── README.md
├── craco.config.js
├── docker-compose.yml
├── docs/
│   ├── ARCHITECTURE.md
│   ├── CODE_OF_CONDUCT.md
│   └── CONTRIBUTING.md
├── notice.js
├── package.json
├── public/
│   ├── _redirects
│   ├── forms/
│   │   ├── Y2020/
│   │   │   └── states/
│   │   │       ├── AK/
│   │   │       │   └── README.md
│   │   │       ├── AL/
│   │   │       │   └── README.md
│   │   │       ├── AR/
│   │   │       │   └── README.md
│   │   │       ├── AZ/
│   │   │       │   └── README.md
│   │   │       ├── CA/
│   │   │       │   └── README.md
│   │   │       ├── CO/
│   │   │       │   └── README.md
│   │   │       ├── CT/
│   │   │       │   └── README.md
│   │   │       ├── DC/
│   │   │       │   └── README.md
│   │   │       ├── DE/
│   │   │       │   └── README.md
│   │   │       ├── FL/
│   │   │       │   └── README.md
│   │   │       ├── GA/
│   │   │       │   └── README.md
│   │   │       ├── HI/
│   │   │       │   └── README.md
│   │   │       ├── IA/
│   │   │       │   └── README.md
│   │   │       ├── ID/
│   │   │       │   └── README.md
│   │   │       ├── IL/
│   │   │       │   └── README.md
│   │   │       ├── IN/
│   │   │       │   └── README.md
│   │   │       ├── KS/
│   │   │       │   └── README.md
│   │   │       ├── KY/
│   │   │       │   └── README.md
│   │   │       ├── LA/
│   │   │       │   └── README.md
│   │   │       ├── MA/
│   │   │       │   └── README.md
│   │   │       ├── MD/
│   │   │       │   └── README.md
│   │   │       ├── ME/
│   │   │       │   └── README.md
│   │   │       ├── MI/
│   │   │       │   └── README.md
│   │   │       ├── MN/
│   │   │       │   └── README.md
│   │   │       ├── MO/
│   │   │       │   └── README.md
│   │   │       ├── MS/
│   │   │       │   └── README.md
│   │   │       ├── MT/
│   │   │       │   └── README.md
│   │   │       ├── NC/
│   │   │       │   └── README.md
│   │   │       ├── ND/
│   │   │       │   └── README.md
│   │   │       ├── NE/
│   │   │       │   └── README.md
│   │   │       ├── NH/
│   │   │       │   └── README.md
│   │   │       ├── NJ/
│   │   │       │   └── README.md
│   │   │       ├── NM/
│   │   │       │   └── README.md
│   │   │       ├── NV/
│   │   │       │   └── README.md
│   │   │       ├── NY/
│   │   │       │   └── README.md
│   │   │       ├── OH/
│   │   │       │   └── README.md
│   │   │       ├── OK/
│   │   │       │   └── README.md
│   │   │       ├── OR/
│   │   │       │   └── README.md
│   │   │       ├── PA/
│   │   │       │   └── README.md
│   │   │       ├── RI/
│   │   │       │   └── README.md
│   │   │       ├── SC/
│   │   │       │   └── README.md
│   │   │       ├── SD/
│   │   │       │   └── README.md
│   │   │       ├── TN/
│   │   │       │   └── README.md
│   │   │       ├── TX/
│   │   │       │   └── README.md
│   │   │       ├── UT/
│   │   │       │   └── README.md
│   │   │       ├── VA/
│   │   │       │   └── README.md
│   │   │       ├── VT/
│   │   │       │   └── README.md
│   │   │       ├── WA/
│   │   │       │   └── README.md
│   │   │       ├── WI/
│   │   │       │   └── README.md
│   │   │       ├── WV/
│   │   │       │   └── README.md
│   │   │       └── WY/
│   │   │           └── README.md
│   │   └── Y2021/
│   │       └── states/
│   │           ├── AK/
│   │           │   └── README.md
│   │           ├── AL/
│   │           │   └── README.md
│   │           ├── AR/
│   │           │   └── README.md
│   │           ├── AZ/
│   │           │   └── README.md
│   │           ├── CA/
│   │           │   └── README.md
│   │           ├── CO/
│   │           │   └── README.md
│   │           ├── CT/
│   │           │   └── README.md
│   │           ├── DC/
│   │           │   └── README.md
│   │           ├── DE/
│   │           │   └── README.md
│   │           ├── FL/
│   │           │   └── README.md
│   │           ├── GA/
│   │           │   └── README.md
│   │           ├── HI/
│   │           │   └── README.md
│   │           ├── IA/
│   │           │   └── README.md
│   │           ├── ID/
│   │           │   └── README.md
│   │           ├── IL/
│   │           │   └── README.md
│   │           ├── IN/
│   │           │   └── README.md
│   │           ├── KS/
│   │           │   └── README.md
│   │           ├── KY/
│   │           │   └── README.md
│   │           ├── LA/
│   │           │   └── README.md
│   │           ├── MA/
│   │           │   └── README.md
│   │           ├── MD/
│   │           │   └── README.md
│   │           ├── ME/
│   │           │   └── README.md
│   │           ├── MI/
│   │           │   └── README.md
│   │           ├── MN/
│   │           │   └── README.md
│   │           ├── MO/
│   │           │   └── README.md
│   │           ├── MS/
│   │           │   └── README.md
│   │           ├── MT/
│   │           │   └── README.md
│   │           ├── NC/
│   │           │   └── README.md
│   │           ├── ND/
│   │           │   └── README.md
│   │           ├── NE/
│   │           │   └── README.md
│   │           ├── NH/
│   │           │   └── README.md
│   │           ├── NJ/
│   │           │   └── README.md
│   │           ├── NM/
│   │           │   └── README.md
│   │           ├── NV/
│   │           │   └── README.md
│   │           ├── NY/
│   │           │   └── README.md
│   │           ├── OH/
│   │           │   └── README.md
│   │           ├── OK/
│   │           │   └── README.md
│   │           ├── OR/
│   │           │   └── README.md
│   │           ├── PA/
│   │           │   └── README.md
│   │           ├── RI/
│   │           │   └── README.md
│   │           ├── SC/
│   │           │   └── README.md
│   │           ├── SD/
│   │           │   └── README.md
│   │           ├── TN/
│   │           │   └── README.md
│   │           ├── TX/
│   │           │   └── README.md
│   │           ├── UT/
│   │           │   └── README.md
│   │           ├── VA/
│   │           │   └── README.md
│   │           ├── VT/
│   │           │   └── README.md
│   │           ├── WA/
│   │           │   └── README.md
│   │           ├── WI/
│   │           │   └── README.md
│   │           ├── WV/
│   │           │   └── README.md
│   │           └── WY/
│   │               └── README.md
│   ├── index.html
│   ├── manifest.json
│   └── robots.txt
├── scripts/
│   ├── build-netlify.sh
│   ├── env.ts
│   ├── formgen.ts
│   └── setup.ts
├── src/
│   ├── App.css
│   ├── App.tsx
│   ├── components/
│   │   ├── ConditionallyWrap.tsx
│   │   ├── CreatePDF.tsx
│   │   ├── DataPropagator.tsx
│   │   ├── FormContainer/
│   │   │   └── Context.tsx
│   │   ├── FormContainer.tsx
│   │   ├── GettingStarted.tsx
│   │   ├── HelpAndFeedback.tsx
│   │   ├── Main.tsx
│   │   ├── Menu.tsx
│   │   ├── NoMatchPage.tsx
│   │   ├── Patterns.ts
│   │   ├── Questions.tsx
│   │   ├── RefundBankAccount.tsx
│   │   ├── ResponsiveDrawer.tsx
│   │   ├── SaveToFile.tsx
│   │   ├── ScrollTop.tsx
│   │   ├── SkipToLinks.tsx
│   │   ├── Summary.tsx
│   │   ├── SummaryData.ts
│   │   ├── TaxPayer/
│   │   │   ├── Address.tsx
│   │   │   ├── PersonFields.tsx
│   │   │   ├── SpouseAndDependent.tsx
│   │   │   ├── TaxPayer.tsx
│   │   │   └── index.tsx
│   │   ├── UserSettings.tsx
│   │   ├── Y2021/
│   │   │   └── AdvanceChildTaxCredit.tsx
│   │   ├── YearDropDown.tsx
│   │   ├── YearStatusBar.tsx
│   │   ├── debug.tsx
│   │   ├── deductions/
│   │   │   ├── F1098eInfo.tsx
│   │   │   └── ItemizedDeductions.tsx
│   │   ├── income/
│   │   │   ├── F1099Info.tsx
│   │   │   ├── OtherInvestments.tsx
│   │   │   ├── PartnershipIncome.tsx
│   │   │   ├── RealEstate.tsx
│   │   │   ├── StockOptions.tsx
│   │   │   ├── W2JobInfo.tsx
│   │   │   └── assets/
│   │   │       ├── AssetSummary.tsx
│   │   │       ├── ConfigurableDataTable.tsx
│   │   │       ├── DataTableStyle.ts
│   │   │       ├── FilteredAssetsTable.tsx
│   │   │       └── TransactionImporter.tsx
│   │   ├── input/
│   │   │   ├── Currency.tsx
│   │   │   ├── DatePicker.tsx
│   │   │   ├── LabeledCheckbox.tsx
│   │   │   ├── LabeledDropdown.tsx
│   │   │   ├── LabeledInput.tsx
│   │   │   ├── LabeledRadio.tsx
│   │   │   ├── boxLabel.tsx
│   │   │   ├── index.ts
│   │   │   ├── styles.ts
│   │   │   └── types.ts
│   │   ├── pager.tsx
│   │   ├── payments/
│   │   │   └── EstimatedTaxes.tsx
│   │   └── savingsAccounts/
│   │       ├── IRA.tsx
│   │       └── healthSavingsAccounts.tsx
│   ├── core/
│   │   ├── data/
│   │   │   ├── anonymize.ts
│   │   │   ├── countries.ts
│   │   │   ├── index.ts
│   │   │   ├── locationPostalCodes.ts
│   │   │   ├── questions.ts
│   │   │   └── validate.ts
│   │   ├── irsForms/
│   │   │   ├── Form.ts
│   │   │   ├── index.ts
│   │   │   └── util.ts
│   │   ├── log.ts
│   │   ├── pdfFiller/
│   │   │   ├── Fill.ts
│   │   │   ├── fillPdf.ts
│   │   │   ├── index.ts
│   │   │   └── pdfHandler.ts
│   │   ├── stateForms/
│   │   │   ├── Form.ts
│   │   │   └── index.ts
│   │   ├── tests/
│   │   │   ├── LocalForms.ts
│   │   │   ├── arbitraries.ts
│   │   │   └── validation.test.ts
│   │   └── util.ts
│   ├── customTypes/
│   │   └── persistStore.d.ts
│   ├── data/
│   │   ├── csvImport.ts
│   │   ├── transactions.ts
│   │   └── urls.ts
│   ├── forms/
│   │   ├── F1040Base.ts
│   │   ├── StateForms.ts
│   │   ├── Y2020/
│   │   │   ├── data/
│   │   │   │   └── federal.ts
│   │   │   ├── irsForms/
│   │   │   │   ├── F1040.ts
│   │   │   │   ├── F1040Attachment.ts
│   │   │   │   ├── F1040v.ts
│   │   │   │   ├── F2441.ts
│   │   │   │   ├── F2555.ts
│   │   │   │   ├── F4136.ts
│   │   │   │   ├── F4137.ts
│   │   │   │   ├── F4563.ts
│   │   │   │   ├── F4797.ts
│   │   │   │   ├── F4952.ts
│   │   │   │   ├── F4972.ts
│   │   │   │   ├── F5695.ts
│   │   │   │   ├── F6168.ts
│   │   │   │   ├── F8582.ts
│   │   │   │   ├── F8814.ts
│   │   │   │   ├── F8853.ts
│   │   │   │   ├── F8863.ts
│   │   │   │   ├── F8888.ts
│   │   │   │   ├── F8889.ts
│   │   │   │   ├── F8910.ts
│   │   │   │   ├── F8919.ts
│   │   │   │   ├── F8936.ts
│   │   │   │   ├── F8949.ts
│   │   │   │   ├── F8959.ts
│   │   │   │   ├── F8960.ts
│   │   │   │   ├── F8962.ts
│   │   │   │   ├── F8995.ts
│   │   │   │   ├── F8995A.ts
│   │   │   │   ├── Main.ts
│   │   │   │   ├── Schedule1.ts
│   │   │   │   ├── Schedule2.ts
│   │   │   │   ├── Schedule3.ts
│   │   │   │   ├── Schedule8812.ts
│   │   │   │   ├── ScheduleA.ts
│   │   │   │   ├── ScheduleB.ts
│   │   │   │   ├── ScheduleC.ts
│   │   │   │   ├── ScheduleD.ts
│   │   │   │   ├── ScheduleE.ts
│   │   │   │   ├── ScheduleEIC.ts
│   │   │   │   ├── ScheduleR.ts
│   │   │   │   ├── ScheduleSE.ts
│   │   │   │   ├── TaxTable.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── worksheets/
│   │   │   │       ├── ChildTaxCreditWorksheet.ts
│   │   │   │       ├── Pub596Worksheet1.ts
│   │   │   │       ├── SDQualifiedAndCapGains.ts
│   │   │   │       ├── SDRateGainWorksheet.ts
│   │   │   │       ├── SDUnrecaptured1250.ts
│   │   │   │       ├── ScheduleDTaxWorksheet.ts
│   │   │   │       ├── SocialSecurityBenefits.ts
│   │   │   │       └── StudentLoanInterestWorksheet.ts
│   │   │   ├── stateForms/
│   │   │   │   ├── AK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AR/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AZ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── FL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── GA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── HI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ID/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IL/
│   │   │   │   │   ├── IL1040.ts
│   │   │   │   │   ├── IL1040ScheduleILEIC.ts
│   │   │   │   │   ├── IL1040V.ts
│   │   │   │   │   ├── ILWit.ts
│   │   │   │   │   └── Parameters.ts
│   │   │   │   ├── IN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── LA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ME/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ND/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NJ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NM/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OR/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── PA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── RI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TX/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── UT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WY/
│   │   │   │   │   └── Form.ts
│   │   │   │   └── index.ts
│   │   │   └── tests/
│   │   │       ├── ScheduleD.test.ts
│   │   │       ├── ScheduleEIC.test.ts
│   │   │       ├── f1040.test.ts
│   │   │       ├── f8889.test.ts
│   │   │       ├── f8949.test.ts
│   │   │       ├── fica.test.ts
│   │   │       ├── index.ts
│   │   │       └── states/
│   │   │           └── il.test.ts
│   │   ├── Y2021/
│   │   │   ├── data/
│   │   │   │   └── federal.ts
│   │   │   ├── irsForms/
│   │   │   │   ├── F1040.ts
│   │   │   │   ├── F1040Attachment.ts
│   │   │   │   ├── F1040v.ts
│   │   │   │   ├── F2439.ts
│   │   │   │   ├── F2441.ts
│   │   │   │   ├── F2555.ts
│   │   │   │   ├── F4136.ts
│   │   │   │   ├── F4137.ts
│   │   │   │   ├── F4563.ts
│   │   │   │   ├── F4797.ts
│   │   │   │   ├── F4952.ts
│   │   │   │   ├── F4972.ts
│   │   │   │   ├── F5695.ts
│   │   │   │   ├── F6168.ts
│   │   │   │   ├── F6251.ts
│   │   │   │   ├── F8582.ts
│   │   │   │   ├── F8814.ts
│   │   │   │   ├── F8853.ts
│   │   │   │   ├── F8863.ts
│   │   │   │   ├── F8888.ts
│   │   │   │   ├── F8889.ts
│   │   │   │   ├── F8910.ts
│   │   │   │   ├── F8919.ts
│   │   │   │   ├── F8936.ts
│   │   │   │   ├── F8949.ts
│   │   │   │   ├── F8959.ts
│   │   │   │   ├── F8960.ts
│   │   │   │   ├── F8962.ts
│   │   │   │   ├── F8995.ts
│   │   │   │   ├── F8995A.ts
│   │   │   │   ├── Main.ts
│   │   │   │   ├── Schedule1.ts
│   │   │   │   ├── Schedule2.ts
│   │   │   │   ├── Schedule3.ts
│   │   │   │   ├── Schedule8812.ts
│   │   │   │   ├── ScheduleA.ts
│   │   │   │   ├── ScheduleB.ts
│   │   │   │   ├── ScheduleC.ts
│   │   │   │   ├── ScheduleD.ts
│   │   │   │   ├── ScheduleE.ts
│   │   │   │   ├── ScheduleEIC.ts
│   │   │   │   ├── ScheduleR.ts
│   │   │   │   ├── ScheduleSE.ts
│   │   │   │   ├── TaxTable.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── worksheets/
│   │   │   │       ├── Pub596Worksheet1.ts
│   │   │   │       ├── QualifyingDependents.ts
│   │   │   │       ├── SDQualifiedAndCapGains.ts
│   │   │   │       ├── SDRateGainWorksheet.ts
│   │   │   │       ├── SDTaxWorksheet.ts
│   │   │   │       ├── SDUnrecaptured1250.ts
│   │   │   │       ├── ScheduleDTaxWorksheet.ts
│   │   │   │       ├── SocialSecurityBenefits.ts
│   │   │   │       └── StudentLoanInterestWorksheet.ts
│   │   │   ├── stateForms/
│   │   │   │   ├── AK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AR/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AZ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── FL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── GA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── HI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ID/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IL/
│   │   │   │   │   ├── IL1040.ts
│   │   │   │   │   ├── IL1040ScheduleILEIC.ts
│   │   │   │   │   ├── IL1040V.ts
│   │   │   │   │   ├── ILWit.ts
│   │   │   │   │   └── Parameters.ts
│   │   │   │   ├── IN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── LA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ME/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ND/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NJ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NM/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OR/
│   │   │   │   │   ├── Form.ts
│   │   │   │   │   ├── OR40.ts
│   │   │   │   │   ├── OR40N.ts
│   │   │   │   │   ├── OR40P.ts
│   │   │   │   │   ├── OR40V.ts
│   │   │   │   │   ├── ORASC.ts
│   │   │   │   │   ├── ORASCNP.ts
│   │   │   │   │   ├── ORWFHDC.ts
│   │   │   │   │   └── Parameters.ts
│   │   │   │   ├── PA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── RI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TX/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── UT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WY/
│   │   │   │   │   └── Form.ts
│   │   │   │   └── index.ts
│   │   │   └── tests/
│   │   │       ├── Schedule8812.test.ts
│   │   │       ├── ScheduleA.test.ts
│   │   │       ├── ScheduleD.test.ts
│   │   │       ├── ScheduleEIC.test.ts
│   │   │       ├── f1040.test.ts
│   │   │       ├── f6251.test.ts
│   │   │       ├── fica.test.ts
│   │   │       ├── index.ts
│   │   │       ├── states/
│   │   │       │   └── il.test.ts
│   │   │       ├── taxRates.test.ts
│   │   │       └── taxTable.csv
│   │   ├── YearForms.ts
│   │   ├── errors.ts
│   │   └── tests/
│   │       ├── CommonTests.ts
│   │       └── TestKit.ts
│   ├── index.css
│   ├── index.js
│   ├── log.ts
│   ├── pdfHandler.ts
│   ├── react-app-env.d.ts
│   ├── redux/
│   │   ├── TaxesState.ts
│   │   ├── actions.ts
│   │   ├── data.ts
│   │   ├── fs/
│   │   │   ├── Actions.ts
│   │   │   ├── FSReducer.ts
│   │   │   ├── Load.tsx
│   │   │   └── index.ts
│   │   ├── index.ts
│   │   ├── migration.ts
│   │   ├── reducer.ts
│   │   ├── store.ts
│   │   └── yearDispatch.ts
│   ├── serviceWorker.js
│   ├── setupTests.js
│   ├── testUtil.tsx
│   └── tests/
│       ├── MultipleYears.test.tsx
│       ├── Recover.test.ts
│       ├── arbitraries.ts
│       ├── common/
│       │   ├── DomMethods.ts
│       │   ├── FakePager.tsx
│       │   ├── Page.tsx
│       │   ├── PersonMethods.tsx
│       │   ├── TaxPayerMethods.tsx
│       │   └── YearsStatusBarMethods.tsx
│       ├── components/
│       │   ├── CreatePdf.test.tsx
│       │   ├── Menu.test.tsx
│       │   ├── Questions.test.tsx
│       │   ├── SpouseAndDependent/
│       │   │   ├── Dependent.test.tsx
│       │   │   ├── FilingStatus.test.tsx
│       │   │   ├── Methods.ts
│       │   │   ├── Pages.tsx
│       │   │   └── Spouse.test.tsx
│       │   ├── Taxpayer.test.tsx
│       │   └── income/
│       │       ├── F1099Info.test.tsx
│       │       └── W2JobInfo.test.tsx
│       ├── testdata/
│       │   ├── transactions_test1.csv
│       │   └── transactions_test2_error.csv
│       └── transactions/
│           ├── Transactions.test.tsx
│           └── arbitraries.ts
├── src-tauri/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── rustfmt.toml
│   ├── src/
│   │   ├── build.rs
│   │   ├── cmd.rs
│   │   └── main.rs
│   └── tauri.conf.json
├── tsconfig.json
└── tsconfig.path.json

================================================
FILE CONTENTS
================================================

================================================
FILE: .codecov.yml
================================================
coverage:
  status:
    project:
      default:
        # basic
        target: 70%
        threshold: 0%
        base: auto
        flags:
          - unit
        paths:
          - 'src'
        # advanced settings
        branches:
          - master
        if_ci_failed: ignore #error #success, failure, ignore
        informational: true
        only_pulls: false
        paths:
          - 'src'
    patch:
      default:
        # basic
        target: 70%
        threshold: 0%
        base: auto
        if_ci_failed: ignore #error #success, failure, ignore
        informational: true
        only_pulls: false
        paths:
          - 'src'


================================================
FILE: .dockerignore
================================================
# dependencies
/node_modules
/.pnp
.pnp.js

# misc
.DS_Store
.netlify
npm-debug.log*
yarn-debug.log*
yarn-error.log*

/.eslintcache

# vscode settings
/.vscode
/.husky/
/src/redux/validation.json


================================================
FILE: .eslintignore
================================================
serviceWorker.js

# don't worry about generated files
/src/core/data/validate-fns.js


================================================
FILE: .eslintrc.js
================================================
module.exports = {
  settings: {
    react: {
      version: 'detect'
    }
  },
  env: {
    browser: true,
    es2021: true,
    node: true
  },
  extends: [
    'plugin:react/recommended',
    'plugin:@typescript-eslint/recommended',
    'plugin:@typescript-eslint/recommended-requiring-type-checking',
    'prettier'
  ],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaFeatures: {
      jsx: true
    },
    ecmaVersion: 12,
    sourceType: 'module'
  },
  plugins: ['react', '@typescript-eslint', 'prettier'],
  rules: {
    'react/jsx-uses-react': 'off',
    'react/react-in-jsx-scope': 'off',
    '@typescript-eslint/no-unnecessary-condition': 'warn'
  },
  parserOptions: {
    project: ['./tsconfig.json', './.eslintrc.js']
  }
}


================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
  # regular updates for our established packages
  - package-ecosystem: "npm"
    directory: "/" # Location of package manifests
    schedule:
      interval: "daily"
    target-branch: "master"
    open-pull-requests-limit: 15
  - package-ecosystem: "cargo"
    directory: "/src-tauri/" # Location of package manifests
    schedule:
      interval: "daily"
    target-branch: "master"


================================================
FILE: .github/pull_request_template.md
================================================
<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/ustaxes/ustaxes/blob/master/.github/CONTRIBUTING.md#pull-request-guidelines
-->

**What kind of change does this PR introduce?** (delete not applicable)
- Bugfix
- Feature
- Docs
- Code style update
- Refactor
- Build-related changes
- Other, please describe:

<!-- 
If this PR resolves a specific issue include "Fixes #xxx" in the PR description so the issue is linked and automatically closed on merge.

Please sign all your commits. See https://github.com/ustaxes/UsTaxes/blob/master/docs/CONTRIBUTING.md#pull-request-guidelines for information on setting this up.

-->


================================================
FILE: .github/workflows/ci.yml
================================================
# Contains unit test, lint, dependabot automerge logic
name: CI
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

permissions:
  pull-requests: write
  contents: write

jobs:
  test:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: ['16']

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
      # installs dependencies
    - run: npm ci
      # build
    - name: Run ESLint
      run: npm run lint
    - name: Ensure project builds
      run: npm run build
      # run tests
    - name: Run jest unit tests
      run: npm run test:report
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v2
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        directory: ./coverage
        verbose: true

  dependabot-auto-merge:
    needs: [test]
    runs-on: ubuntu-latest
    if: ${{ github.actor == 'dependabot[bot]' }}
    steps:
      - name: Dependabot metadata
        id: metadata
        uses: dependabot/fetch-metadata@v1.1.1
        with:
          github-token: "${{ secrets.GITHUB_TOKEN }}"
      - name: Enable auto-merge for Dependabot PRs
        if: ${{(steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type ==  'version-update:semver-minor')}}
        run: gh pr merge --auto --squash "$PR_URL"
        env:
          PR_URL: ${{github.event.pull_request.html_url}}
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

================================================
FILE: .github/workflows/tauri-release.yml
================================================
name: "publish"
on:
  push:
    tags:
      - app-v*
jobs:
  publish-tauri:
    strategy:
      fail-fast: false
      matrix:
        platform: [macos-latest, ubuntu-latest, windows-latest]
    runs-on: ${{ matrix.platform }}
    steps:
    - uses: actions/checkout@v2
    - name: setup node
      uses: actions/setup-node@v2
      with:
        node-version: 16
    - name: Get the version
      id: get_version
      run: echo ::set-output name=VERSION::__VERSION__
      shell: bash
      ## https://github.com/tauri-apps/tauri/blob/76187298c1d52dc764c5192c6a770a65f44b82ab/.github/workflows/smoke-test-prod.yml
      ## Following that example, we cache directories for both cargo and node. 
      ## The cache action will check caches before these directories are required, and update the caches if necessary 
      ## at the end of the job (after cargo install and node install if those are necessary).
    - name: cache rust bin
      id: cache_rust_bin
      uses: actions/cache@v1
      with:
        path: ~/.cargo/bin/
        key: ${{ runner.OS }}-xbuild-bin-${{ hashFiles('**/Cargo.toml') }}
    - name: cache rust registry/index
      id: cache_rust_reg_index
      uses: actions/cache@v1
      with:
        path: ~/.cargo/registry/index
        key: ${{ runner.OS }}-xbuild-reg-index-${{ hashFiles('**/Cargo.toml') }}-
    - name: cache rust registry/cache
      id: cache_rust_reg_cache
      uses: actions/cache@v1
      with:
        path: ~/.cargo/registry/cache/
        key: ${{ runner.OS }}-xbuild-reg-cache-${{ hashFiles('**/Cargo.toml') }}-
    - name: install Rust stable
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        profile: minimal
    - name: install dependencies (ubuntu only)
      if: matrix.platform == 'ubuntu-latest'
      run: |
        sudo apt-get update
        sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
    - name: install app dependencies
      run: npm ci
    - name: build it
      run: npm run desktop-release
    - uses: tauri-apps/tauri-action@dev
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        releaseName: App v${{ steps.get_version.outputs.VERSION }}
        tagName: app-v${{ steps.get_version.outputs.VERSION }}
        releaseBody: "See the assets to download this version and install."
        releaseDraft: false
        prerelease: false


================================================
FILE: .gitignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Local Netlify folder
.netlify

/.eslintcache

# vscode settings
/.vscode
/.devcontainer/

/logs/
/src/core/data/validate-fns.js


================================================
FILE: .husky/husky.sh
================================================
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
  debug () {
    if [ "$HUSKY_DEBUG" = "1" ]; then
      echo "husky (debug) - $1"
    fi
  }

  readonly hook_name="$(basename "$0")"
  debug "starting $hook_name..."

  if [ "$HUSKY" = "0" ]; then
    debug "HUSKY env variable is set to 0, skipping hook"
    exit 0
  fi

  if [ -f ~/.huskyrc ]; then
    debug "sourcing ~/.huskyrc"
    . ~/.huskyrc
  fi

  export readonly husky_skip_init=1
  sh -e "$0" "$@"
  exitCode="$?"

  if [ $exitCode != 0 ]; then
    echo "husky - $hook_name hook exited with code $exitCode (error)"
  fi

  exit $exitCode
fi


================================================
FILE: .husky/pre-commit
================================================
#!/bin/sh
. "$(dirname "$0")/husky.sh"

# npm test
npx lint-staged


================================================
FILE: .npmrc
================================================
//.npmrc file
engine-strict = true

================================================
FILE: .nvmrc
================================================
lts/*


================================================
FILE: .prettierignore
================================================
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.github

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Local Netlify folder
.netlify

/.eslintcache

# vscode settings
/.vscode
/.devcontainer/
/.husky/
tsconfig.json
.codecov.yml

# don't worry about src-tauri (rust code)

/src-tauri

# don't worry about generated files
/src/core/data/validate-fns.js


================================================
FILE: .prettierrc.json
================================================
{
  "trailingComma": "none",
  "tabWidth": 2,
  "semi": false,
  "singleQuote": true,
  "jsxSingleQuote": false,
  "printWidth": 80
}


================================================
FILE: Dockerfile
================================================
FROM rust:1.51-slim-buster

RUN mkdir -p /home/node/app

RUN useradd -rm -d /home/node -s /bin/bash -g root -G sudo -u 1001 node

RUN chown -R node /home/node

RUN apt-get update && apt-get -y upgrade && apt-get install -y curl

USER node
# Install nvm, node, npm
ARG NVM_DIR="/home/node/.nvm"
ARG NODE_VERSION=16.7.0
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.38.0/install.sh | bash
RUN . $NVM_DIR/nvm.sh && nvm install $NODE_VERSION --latest-npm
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

WORKDIR /home/node/app

ADD ./package.json ./package.json
ADD ./package-lock.json ./package-lock.json
ADD ./scripts ./scripts
RUN npm ci

ADD . .


================================================
FILE: LICENSE
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

================================================
FILE: README.md
================================================
<div align="center">
<h1><a href="//ustaxes.org">USTaxes</a></h1>

[![Netlify Status][netlify-badge]][netlify-url] [![Github Latest Release][release-badge]][github-release] [![discord-badge]][discord-url]

</div>

## What is UsTaxes?

UsTaxes is a free, open-source tax filing application that can be used to file the Federal 1040 form. It is available in both [web](https://ustaxes.org/) and [desktop][desktop-releases] versions. It is provided free of charge and requires no sharing of personal data.

**Interested in contributing? [Get Started](#user-content-get-started)**

## Supported Income data

Most income and deduction information from the following forms are supported for tax years 2020 and 2021.

- W2
- 1099-INT
- 1099-DIV
- 1099-B
- 1098-E
- 1099-R: support for normal distributions from IRA and pension accounts.
- SSA-1099

So far, this project can attach the following schedules to form 1040:

- Schedule 1 (as to Schedule E and 1098-E data only)
- Schedule 2
- Schedule 3 (as to excess FICA tax only)
- Schedule 8812
- Schedule B
- Schedule D
- Schedule E
- F1040-V
- F8949 (Uncovered Investment Transactions)
- F8889 (Health Savings Accounts)
- F8959 (Additional Medicare Tax)
- F8960 (Net Investment Income Tax)

## Supported Credits

- Credit for children and other dependents
- Earned income credit

## Supported states

### Implemented State returns

The states below have been implemented partially. See the `/src/stateForms/<state>/<relevant form>` file for details on unimplemented portions.

- Illinois

### Non-filing states

Users who only have wage income and live in the states below should be able to file taxes using this site, since they do not have state level income tax.

- Alaska
- Florida
- Nevada
- New Hampshire
- South Dakota
- Tennessee
- Texas
- Washington
- Wyoming

## Note on using this project

This project is built by a growing community. If you notice an error in the outputted PDF or any other error, please submit an issue on the Github issues tab. We appreciate your feedback!

## User Data

The project is available strictly via client side. Data is persisted to the site's localstorage so _no personal information ever leaves the user's computer._ For those who want extra security, the codebase can also be built as a [desktop application](#desktop-application).

## Contributing

Thank you for taking the time to contribute; let's make tax filing free for everyone! 🎉

To ensure the project is fun for every contributor, please review:

- [Code of conduct](docs/CODE_OF_CONDUCT.md)
- [Contributing guide](docs/CONTRIBUTING.md)
- [Project Architecture](docs/ARCHITECTURE.md)

## Get Started

This application can be run as either a web application or a [standalone desktop application](#user-content-desktop-application)

### Web application

This project runs on Node 16. To ensure you're on the proper version, we recommend [nvm](https://github.com/nvm-sh/nvm#installing-and-updating).

With `nvm` installed, you may select a version 16 node using:

```sh
nvm install 16
nvm use 16
```

To run,

```sh
npm ci          # install package dependencies
npm run start   # run app
```

Note: To avoid having to set your node versions, we suggest using a tool like [direnv](https://direnv.net). With the following configuration file as `.envrc` in project root:

```sh
export NVM_DIR="$HOME/.nvm"

. "$NVM_DIR/nvm.sh"  # This loads nvm
#. "$NVM_DIR/bash_completion"  # Optional, nvm bash completion

nvm install 16
nvm use 16
```

your environment will be set up every time you enter the project directory.

#### Docker

If preferred, a Docker alternative is available:

```sh
docker-compose build
docker-compose up
```

Open a browser to `http://localhost:3000`.

To stop and remove running containers, run `docker-compose down`.

### Desktop application

The desktop application is built with [Tauri][tauri-root]. In addition to the above steps, please [follow this reference for setting up your environment for Tauri][tauri-setup].

Once your environment is set up for Tauri, run, `npm run desktop`. To avoid a browser window being spawned in addition to the desktop window, just set the BROWSER environment variable as in: `BROWSER=none npm run desktop`.

To build executables, run `npm run desktop-release`.

## Getting help

Please reach out to us on our [discord][discord-url] if you run into any problems, or [file an issue][github-issues]. Thank you for your support!

[netlify-badge]: https://api.netlify.com/api/v1/badges/41efe456-a85d-4fed-9fcf-55fe4d5aa7fa/deploy-status
[netlify-url]: https://app.netlify.com/sites/peaceful-joliot-d51349/deploys
[cargo-docs]: https://doc.rust-lang.org/cargo/getting-started/installation.html
[discord-badge]: https://img.shields.io/discord/812156892343828500?logo=Discord
[discord-url]: https://discord.gg/dAaz472mPz
[github-release]: https://github.com/ustaxes/UsTaxes/releases/latest
[release-badge]: https://badgen.net/github/release/ustaxes/ustaxes
[desktop-releases]: https://github.com/ustaxes/UsTaxes/releases/
[github-issues]: https://github.com/ustaxes/ustaxes/issues
[tauri-setup]: https://tauri.studio/en/docs/getting-started/intro/#setting-up-your-environment
[tauri-root]: https://tauri.studio


================================================
FILE: craco.config.js
================================================
const path = require('path')
module.exports = {
  webpack: {
    alias: {
      ustaxes: path.resolve(__dirname, './src')
    }
  }
}


================================================
FILE: docker-compose.yml
================================================
version: '3.7'

services:
  app:
    build: .
    command: npm run start
    ports:
      - '3000:3000'
    volumes:
      - ./:/app


================================================
FILE: docs/ARCHITECTURE.md
================================================
# Project Architecture

Thank you for your interest in this project. The below should summarize the general design framework used in this project, and hopefully guide you in understanding the code and getting ready to contribute to the project. If anything at all is unclear please join the discord linked on the readme and feel free to ask any questions you might have.

## Project design

There are four main concerns separated in this project:

1. Data must be collected from users (react forms)
2. Collected data must be stored in a data model (via redux dispatched actions only)
3. Tax forms must access data model to calculate data required by each form
4. That calculated data must be must be rendered into a PDF file when the user exports their 1040 and attachments.

Data flows in only this one direction, from 1 to 4.

![Data flow](dataflow.svg)

Note the information in the datamodel is automatically synced to browser's LocalStorage so the data is available when the user closes and reopens the page.

### Data model

The root schema of data stored from form submissions is defined in [src/redux/data.ts](../src/redux/data.ts) as:

```ts
export interface Information {
  f1099s: Supported1099[]
  w2s: IncomeW2[]
  refund?: Refund
  taxPayer: TaxPayer
}
```

- **f1099s**: An array of all 1099s that have been added. Note this includes 1099-B which goes to Schedule D, 1099-INT which goes to Schedule B, and 1099-DIV which provides data that goes to both Schedule B and Schedule D. This confusion is not needed at this level of the data model. Later when PDFs are created, the correct data can be accessed by the code managing those schedules.
- **w2s**: All W-2s that have been added for both primary taxpayer and spouse
- **refund**: Direct deposit information
- **taxPayer**: Basic information about user's name, SSN, dependents, spouse

### PDF Export

Supported federal and state forms are included in the source control of this repository.

- [src/irsForms/](../src/irsForms/) includes ts models for all federal forms that can be filled by this project. The PDFs are also included in this project at [pubilc/forms](../public/forms). Each of these form definitions implements this interface:

```ts
type Field = string | number | boolean | undefined
export default interface Fill {
  fields: () => Field[]
}
```

This array of `fields` must line up exactly with the fields expected by the PDF that the data will be filled into. Getting this data to line up exactly is error prone and tedious. The only type checking we can do between the PDF and our data is to verify if a field expects a boolean value (checkbox), or a text + numeric value.

In order to help this error prone process, there's also a script that should be used to add a new form. See the guide for contributing a new form below.

- [src/stateForms](../src/stateForms) includes ts models for all state forms that can be filled. They also implement the same interface.

## Guide for contributing a new form implementation

- Add new data schema if needed
  - Interfaces in [src/redux/data](../src/redux/data.ts) may need to be expanded if you're collecting additional data from the user
- For a new UI form that needs its own page, add to routes in [Main.tsx](../src/components/Main.tsx)
- A UI form can push new data into the state using Redux actions. Define your new action in [src/redux/actions.ts](../src/redux/actions.ts), and add your state updates to [src/redux/reducer.ts](../src/redux/reducer.ts)
- If there is a new attachment to the 1040:

  - The blank form goes in `public/forms/`. The locations of all supported attachments and logic about what attachments are required, is in [fillPdf.ts](../src/pdfFiller/fillPdf.ts).
  - The data model for the PDF goes in [irsForms](../src/irsForms), and implements the `Form` interface as above. There is a script we use to generate a base implementation of the form. To generate this base implementation, run

  ```
  npm run formgen ./public/forms/<name-of-form>.pdf > ./src/irsForms/<name-of-form>.ts
  ```

  This will provide a function for each field in the PDF. At this point you should have a compilable file that needs the implementations for all those functions filled in.

[npm-install]: https://www.npmjs.com/get-npm
[tauri-root]: https://tauri.studio/
[rust-root]: https://www.rust-lang.org/
[webview2]: https://developer.microsoft.com/en-us/microsoft-edge/webview2/


================================================
FILE: docs/CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
  advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
  address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at grimshawaidan@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq


================================================
FILE: docs/CONTRIBUTING.md
================================================
# UsTaxes Contributing Guide

Before contributing please make sure to take a moment to read through the [Code of Conduct](CODE_OF_CONDUCT.md), as well as relevant documentation for the contribution you intend to make:

- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Guide](#development-guide)

## Maintaining team

- [Aidan Grimshaw](http://github.com/thegrims)
- [Zak Patterson](http://github.com/zakpatterson)

## Issue Reporting Guidelines

- The issue list of this repo is for bug reports and feature requests. Please come to the [Discord chat](https://discord.gg/dAaz472mPz) with general questions you may have.

- If your issue is resolved but still open, please close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.

- Generally, there are many features still remaining to produce a valid 1040 for most people. We hope you will view this project in light of your individual circumstances and expertise and contribute accordingly! For example, if you have a certain type of income or receive a certain credit or deduction, and those are not yet implemented, we would happily assist you in implementing those features.

## Pull Request Guidelines

- For code security, we require signed commits. If you haven't set up signed commits yet, please do the following:

  - Follow [this Github tutorial](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification)

  - To ensure all your commits are signed going forward, `git config --global commit.gpgsign true`,

  - If you have unsigned commits that you would like to sign, you can do so by rebasing. `git rebase master`, followed by `git commit --amend` to redo each commit on the branch.

- The only requirement is that your PR is well described and your intentions are clearly communicated.

- If adding new feature, provide some clear reason to add this feature.

- If fixing a bug:

  - If you are resolving a special issue, add `Fixes: #xxx` (#xxx is the issue id) in your PR body. When your PR is merged, the maintainer will move this information into the final commit message for our release log.
  - Provide detailed description of the bug in the PR, or link to an issue that does.

- These are just some formatting suggestions, we won't call you out for not following them:

  - Start commits with a capital letter and imperative mood, no period at the end.
  - Each commit first line should be max 50 characters, followed by a blank line.
  - Wrap following lines at 80 characters.
  - Include as much detail as you need in the following lines.
  - Github PR title style is the same as commit first line style.

- It's OK to have multiple small commits as you work on the PR - we apply squash merges to all PRs at the end. In particular, you are free to rebase your commits so long as your pull request is in draft status. As soon as you take it out of draft status, request a review, or receive a review on your pull request, please do not rebase or force push.

## Development Guide

### General Setup

First, [join our Discord server](https://discord.gg/dAaz472mPz) and let us know that you want to contribute. This way we can point you in the right direction and help ensure your contribution will be as helpful as possible.

1. To set up your machine for development, review the [Architecture doc](ARCHITECTURE.md), for required links to set up NPM 8 and Rust.

1. Next, fork and clone this repo.

1. Run `npm ci` to install the package versions referenced in `package-lock.json`. If your feature requires a new dependency, add it using `npm install <package-name>@<version>` to avoid affecting other dependencies in `package-lock.json`.

Try

- `npm run desktop` to try out the desktop application. Setting the environment variable `BROWSER=none` will stop the web browser from also loading for you.
- `npm run start` will serve the site locally on port 3000, so you can view it at `localhost:3000` in your browser.

#### Stack

This app uses Typescript React and Redux. The structure of this app should look familiar to you if you have used redux before, and it may seem opaque and confusing to you if you have not used Redux before. [Here is a great guide you can use to learn to about redux](https://redux.js.org/tutorials/fundamentals/part-1-overview)

#### State Management

In order to manage state between many different components and concerns in a project, we dispatch actions that update a piece of state in a global state object. Each of these actions is received by a reducer that applies that change to the state variable. All of this logic is contained in [src/redux](src/redux).

- `src/redux/actions.ts`: All the actions that can be sent to update our state
- `src/redux/data.ts`: No functionality, just type definitions for our global state variable.
- `src/redux/reducer.ts`: All logic for updating our global state.

### Directories Overview

- [`src/components`](../src/components) Contains React forms and **all UI**.
- [`src/data`](../src/data) Contains static data such as a list of states and a list of tax brackets
- [`src/irsForms`](../src/irsForms)
  - These are typescript model implementations of the actual IRS pdfs. Each form provides the data to be filled into the final PDF via an array where each index must match the expected index in the PDF. We use the convention that methods are named after the actual line referred to in the PDF. So `const l1 = (): number = ...` will be the function to call to get the numeric value needed on line 1 of that form.
  - Also, because the forms closely follow IRS published instructions and worksheets, the tax calculations are also coded in this directory.
- [`pdfFiller`](../src/pdfFiller): All the logic to actually fill form data into a PDF.
- [`redux`](../src/redux) All the types and logic to manage global state in the app.
- [`customTypes`](../src/customTypes) Special purpose definitions needed to give the typescript compiler more type information about some features of our dependencies we use. Ideally these needs would be provided by our dependencies and this folder can be deleted in the future.

## License

UsTaxes is a GPL-licensed open source project. We think this choice is important for a few reasons

- If anyone wants to use the software for any reason, they are welcome to.
- If anyone wants to sell the software, they can, but they have to provide all the source so users can build the project themselves.
- If someone wants to improve on the software and sell that, they can, but they also have to provide the source for all their improvements for free.

We believe this choice will help you know your contributions are valued and will be used responsibly.

## Financial Contribution

If you do not have time to contribute to UsTaxes directly but would like to financially offer support, we have not yet set up a framework to allow that. We promise however that any future financial contributions will be public and without preconditions. So "I would like to provide support to develop support for itemized deductions" is fine, and contributions will be allocated towards those working on that feature. But "I would like to support the project provided you take steps x and y" or conditioned on us providing advertising or selling other services will not be ok. If you have any questions about that feel free to private message one of the maintainers on our discord.

This Contributor guide was adapted from the Tauri project's [Contributing document](https://github.com/tauri-apps/tauri/blob/1d66d00506ea79cf803b0e0d025ece1730ffa242/.github/CONTRIBUTING.md)


================================================
FILE: notice.js
================================================
const notice = `
    ustaxes helps you build your tax return forms for free
    Copyright (C) 2021  Aidan Grimshaw and contributors

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
`

console.log(notice)


================================================
FILE: package.json
================================================
{
  "name": "ustaxes",
  "version": "0.1.21",
  "private": true,
  "dependencies": {
    "@date-io/date-fns": "^1.3.13",
    "@material-ui/core": "^4.12.4",
    "@material-ui/icons": "^4.11.3",
    "@material-ui/lab": "^4.0.0-alpha.61",
    "@material-ui/pickers": "^3.3.10",
    "@tauri-apps/api": "^1.1.0",
    "@tauri-apps/cli": "^1.1.1",
    "ajv": "^8.11.0",
    "date-fns": "^2.29.3",
    "lodash": "^4.17.21",
    "loglevel": "^1.8.0",
    "papaparse": "^5.3.2",
    "pdf-lib": "^1.17.1",
    "react": "^17.0.2",
    "react-data-table-component": "^7.5.3",
    "react-device-detect": "^2.2.2",
    "react-dom": "^17.0.2",
    "react-helmet": "^6.1.0",
    "react-hook-form": "^7.22.5",
    "react-number-format": "^4.9.4",
    "react-redux": "^8.0.4",
    "react-router": "^6.3.0",
    "react-router-dom": "^6.3.0",
    "react-scripts": "^4.0.3",
    "redux": "^4.2.0",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "rooks": "^7.4.0",
    "ts-json-schema-generator": "^1.0.0",
    "typescript": "^4.7.4"
  },
  "scripts": {
    "start": "node ./notice.js && ts-node ./scripts/env.ts && ts-node ./scripts/setup.ts && concurrently npm:dev",
    "dev": "craco start",
    "build": "ts-node ./scripts/env.ts && ts-node ./scripts/setup.ts && craco build",
    "test": "ts-node ./scripts/env.ts && ts-node ./scripts/setup.ts && craco test",
    "eject": "craco eject",
    "desktop-release": "tauri build",
    "desktop": "tauri dev",
    "test:report": "ts-node ./scripts/env.ts && npm run test -- --coverage .",
    "tauri": "ts-node ./scripts/env.ts && tauri",
    "schema-generate": "ts-node ./scripts/env.ts && node ./setup.js",
    "lint": "eslint ./src --ext ts,js,tsx,jsx --max-warnings=0 && prettier -c .",
    "lint:fix": "eslint ./src --fix --ext ts,js,tsx,jsx && prettier --write .",
    "prettier": "prettier --write .",
    "formgen": "ts-node ./scripts/formgen.ts",
    "prepare": "ts-node ./scripts/env.ts && husky install"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@craco/craco": "^6.4.5",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^12.1.5",
    "@testing-library/user-event": "^13.5.0",
    "@types/jest": "^29.1.1",
    "@types/lodash": "^4.14.186",
    "@types/node": "^18.7.23",
    "@types/papaparse": "^5.3.5",
    "@types/react": "^17.0.47",
    "@types/react-dom": "^18.0.5",
    "@types/react-helmet": "^6.1.5",
    "@types/react-redux": "^7.1.24",
    "@types/react-router-dom": "^5.3.3",
    "@types/redux-logger": "^3.0.9",
    "@typescript-eslint/eslint-plugin": "^5.38.1",
    "@typescript-eslint/parser": "^5.38.1",
    "concurrently": "^7.4.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-import": "^2.26.0",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-promise": "^6.0.1",
    "eslint-plugin-react": "^7.31.8",
    "fast-check": "^2.25.0",
    "husky": "^8.0.1",
    "lint-staged": "^13.0.3",
    "prettier": "2.7.1",
    "ts-node": "^10.9.1",
    "typescript-eslint": "0.0.1-alpha.0"
  },
  "lint-staged": {
    "**/*": "prettier --write --ignore-unknown .",
    "*.{ts,js,tsx,jsx}": "eslint ./src --cache --fix"
  },
  "jest": {
    "moduleNameMapper": {
      "^ustaxes/(.*)": "<rootDir>/src/$1"
    },
    "transformIgnorePatterns": [
      "/node_modules/(?!@tauri-apps)"
    ]
  },
  "engines": {
    "yarn": "please-use-npm"
  }
}


================================================
FILE: public/_redirects
================================================
/*  /index.html  200

================================================
FILE: public/forms/Y2020/states/AK/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/AL/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/AR/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/AZ/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/CA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/CO/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/CT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/DC/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/DE/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/FL/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/GA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/HI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/IA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/ID/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/IL/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/IN/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/KS/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/KY/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/LA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/MA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/MD/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/ME/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/MI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/MN/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/MO/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/MS/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/MT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/NC/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/ND/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/NE/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/NH/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/NJ/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/NM/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/NV/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/NY/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/OH/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/OK/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/OR/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/PA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/RI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/SC/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/SD/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/TN/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/TX/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/UT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/VA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/VT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/WA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/WI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/WV/README.md
================================================
TODO


================================================
FILE: public/forms/Y2020/states/WY/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/AK/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/AL/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/AR/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/AZ/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/CA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/CO/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/CT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/DC/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/DE/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/FL/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/GA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/HI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/IA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/ID/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/IL/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/IN/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/KS/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/KY/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/LA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/MA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/MD/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/ME/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/MI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/MN/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/MO/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/MS/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/MT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/NC/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/ND/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/NE/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/NH/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/NJ/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/NM/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/NV/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/NY/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/OH/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/OK/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/OR/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/PA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/RI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/SC/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/SD/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/TN/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/TX/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/UT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/VA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/VT/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/WA/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/WI/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/WV/README.md
================================================
TODO


================================================
FILE: public/forms/Y2021/states/WY/README.md
================================================
TODO


================================================
FILE: public/index.html
================================================
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="UsTaxes is an open source webapp for filing US federal income tax. All tax calculations are performed in the browser, so no personal information is stored on external servers!"
    />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <title>UsTaxes.org</title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>


================================================
FILE: public/manifest.json
================================================
{
  "short_name": "US Taxes",
  "name": "UsTaxes is an open source webapp for filing US federal income tax. All tax calculations are performed in the browser, so no personal information is stored on external servers!",
  "icons": [
    {
      "src": "favicon.ico",
      "sizes": "64x64 32x32 24x24 16x16",
      "type": "image/x-icon"
    },
    {
      "src": "logo192.png",
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": "logo512.png",
      "type": "image/png",
      "sizes": "512x512"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff"
}


================================================
FILE: public/robots.txt
================================================
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:


================================================
FILE: scripts/build-netlify.sh
================================================
#!/usr/bin/env bash

set -e

export CI=false 

npm run lint

npm run build


================================================
FILE: scripts/env.ts
================================================
import { exec } from 'child_process'

// fs.cp since 16.7
export const requiredNodeVersion = [16, 7]
export const requiredNpmVersion = [7, 0]

const showError = (...errLines: string[]): void => {
  const maxLineLen = 78
  const displayError = errLines.map((err) => {
    if (err.length > maxLineLen) {
      const words = err.split(' ')
      return words
        .reduce(
          (lines, word) => {
            if (lines.length + 1 + word.length > maxLineLen) {
              return [...lines, word]
            } else {
              return [...lines, lines[lines.length - 1] + ' ' + word]
            }
          },
          ['']
        )
        .join('\n')
    }
    return err
  })

  const lineLen = Math.min(
    maxLineLen,
    Math.max(...displayError.map((x) => x.length))
  )

  const line = (msg: string): string => `| ${msg}`.padEnd(lineLen + 2) + ' |'

  const border = `|${Array.from(Array(lineLen + 2))
    .map(() => '-')
    .join('')}|`

  console.error([border, ...displayError.map(line), border].join('\n'))
}

export const checkVersion = (): void => {
  const [M, m] = process.version
    .slice(1) // drop 'v'
    .split('.') // split into major and minor
    .map((x) => parseInt(x, 10))
  const [R, r] = requiredNodeVersion
  if (M < R || (M === R && m < r)) {
    const requiredStr = requiredNodeVersion.join('.')

    showError(
      'Required node version not found.',
      `Required: >= ${requiredStr}`,
      `Found:       ${process.version}`,
      'Consider using nvm: https://nvm.sh'
    )

    process.exit(1)
  }
}

const getNpmVersion = (): Promise<[number, number]> => {
  return new Promise((resolve, reject) => {
    exec('npm --version', (error, stdout) => {
      if (error) {
        reject(error)
      } else {
        const [major, minor] = stdout
          .trim()
          .split('.')
          .map((x) => parseInt(x, 10))
        resolve([major, minor])
      }
    })
  })
}

export const checkNpmVersion = async (): Promise<void> => {
  const [major, minor] = await getNpmVersion()
  const [R, r] = requiredNpmVersion

  if (major < R || (major === R && minor < r)) {
    const requiredStr = requiredNpmVersion.join('.')

    showError(
      'Required npm version not found.',
      `Required: >= ${requiredStr}`,
      `Found:       ${major}.${minor}`,
      'Consider using nvm: https://nvm.sh'
    )

    process.exit(1)
  }
}

const main = async (): Promise<void> => {
  await checkNpmVersion()
  checkVersion()
}

export default main

if (require.main === module) {
  main()
}


================================================
FILE: scripts/formgen.ts
================================================
import { PDFDocument, PDFField, PDFCheckBox } from 'pdf-lib'
import { readFile } from 'fs/promises'
import * as path from 'path'
import _ from 'lodash'

const loadFile = async (path: string): Promise<PDFDocument> => {
  const file = await readFile(path)
  const bytearray = file.slice(0, file.byteLength)
  return await PDFDocument.load(bytearray)
}

const normalizeName = (name: string): string =>
  name.replace(/[^a-zA-Z0-9]/g, '')

const fieldFunction = (field: PDFField, index: number): [string, string] => {
  const name = normalizeName(field.getName())
  const isNumeric = name.match(/^[0-9]+[a-z]*$/)
  const functionName = isNumeric ? `l${name}` : `f${index}`

  const returnType = (() => {
    if (isNumeric) return 'number'
    if (field instanceof PDFCheckBox) return 'boolean'
    return 'string'
  })()

  const fullReturnType = `${returnType}${
    field.isRequired() ? '' : ' | undefined'
  }`

  const defaultValue: string = (() => {
    if (field.isRequired()) {
      if (field instanceof PDFCheckBox) {
        return 'false'
      }
      return "''"
    }
    return 'undefined'
  })()

  // If the pdfField has a plain numeric name, we'll assume that
  // it corresponds to a numbered line on the return, and it will be given
  // a simple implementation like const l5 = (): number | undefined => ...
  // If a pdffield has a string name, then we'll provide a named implementation like
  // const spouseSocialNumber = () => ...
  // and an alias with the pdf index field number.
  const namedImplementation = `  /**
   * Index ${index}: ${field.getName()}
   */
  const ${isNumeric ? functionName : name} = (): ${fullReturnType} => {
    return ${defaultValue}
  }
`

  const alias = isNumeric
    ? undefined
    : `  const ${functionName} = (): ${fullReturnType} => this.${name}()
`

  const code: string = [namedImplementation, alias]
    .filter((x) => x !== undefined)
    .join('\n')

  return [code, functionName]
}

const buildSource = (doc: PDFDocument, formName: string): string => {
  const functions = doc.getForm().getFields().map(fieldFunction)
  const [impls, functionNames] = _.unzip(functions)
  const className = normalizeName(formName)

  return `import Form from '../Form'
import F1040 from '../../irsForms/F1040'
import { Field } from '../../pdfFiller'
import { displayNumber, sumFields } from '../../irsForms/util'
import { AccountType, FilingStatus, State } from '../../redux/data'
import { ValidatedInformation } from 'ustaxes/forms/F1040Base'

export class ${className} extends Form {
  info: ValidatedInformation
  f1040: F1040
  formName: string
  state: State

  constructor(f1040: F1040) {
    this.info = f1040.info
    this.f1040 = f1040
    this.formName = '${formName}'
    this.state = 'AK' // <-- Fill here
  }

${impls.join('\n')}

  const fields = (): Field[] => ([
${functionNames
  .map((name) =>
    name.startsWith('l')
      ? `    displayNumber(this.${name}())`
      : `    this.${name}()`
  )
  .join(',\n')}
  ])
}

const make${className} = (f1040: F1040): ${className} =>
  new ${className}(f1040)

export default make${className}
`
}

const generate = async (
  inFile: string,
  outFile: string | undefined = undefined
): Promise<void> => {
  const pdf = await loadFile(inFile)
  const name = path.parse(inFile).name
  const code = buildSource(pdf, name)
  if (outFile === undefined) {
    console.log(code)
  }
}

const help = () => {
  console.log(`
    Usage:
    npm run formgen <form-file>.pdf
  `)
}

const main = () => {
  const args = process.argv.slice(2)
  process.argv.forEach((a) => console.log(a))

  if (args.length < 1) {
    help()
    process.exit()
  }

  generate(args[0])
}

if (require.main === module) {
  main()
}


================================================
FILE: scripts/setup.ts
================================================
import { createGenerator } from 'ts-json-schema-generator'
import fs from 'fs'
import Ajv from 'ajv'

import standaloneCode from 'ajv/dist/standalone'

const config = {
  path: 'src/core/data/index.ts',
  tsconfig: 'tsconfig.json',
  type: '*' // Or <type-name> if you want to generate schema for that one type only
}

const indexSchema = {
  $id: '#/definitions/index',
  type: 'number',
  minimum: 0
}

const outputPath = 'src/core/data/validate-fns.js'

const schema = createGenerator(config).createSchema(config.type)

const ajv = new Ajv({
  schemas: [schema, indexSchema],
  allowUnionTypes: true,
  code: { source: true, esm: true }
})

const moduleCode = standaloneCode(ajv, {
  Index: '#/definitions/index',
  PersonRole: '#/definitions/PersonRole',
  ContactInfo: '#/definitions/ContactInfo',
  Address: '#/definitions/Address',
  AccountType: '#/definitions/AccountType',
  Employer: '#/definitions/Employer',
  FilingStatus: '#/definitions/FilingStatus',
  PrimaryPerson: '#/definitions/PrimaryPersonDateString',
  Spouse: '#/definitions/SpouseDateString',
  Person: '#/definitions/PersonDateString',
  Dependent: '#/definitions/DependentDateString',
  F1099IntData: '#/definitions/F1099IntData',
  F1099BData: '#/definitions/F1099BData',
  Income1099Int: '#/definitions/Income1099Int',
  Income1099B: '#/definitions/Income1099B',
  Supported1099: '#/definitions/Supported1099',
  IncomeW2: '#/definitions/IncomeW2',
  EstimatedTaxPayments: '#/definitions/EstimatedTaxPayments',
  Refund: '#/definitions/Refund',
  TaxPayer: '#/definitions/TaxPayerDateString',
  Information: '#/definitions/InformationDateString',
  Property: '#/definitions/Property',
  PropertyType: '#/definitions/PropertyType',
  F1098e: '#/definitions/F1098e',
  ItemizedDeductions: '#/definitions/ItemizedDeductions',
  Responses: '#/definitions/Responses',
  StateResidency: '#/definitions/StateResidency',
  HealthSavingsAccount: '#/definitions/HealthSavingsAccountDateString',
  Ira: '#/definitions/Ira',
  AssetType: '#/definitions/AssetType',
  AssetString: '#/definitions/AssetString',
  TaxYear: '#/definitions/TaxYear',

  EditHSAAction: '#/definitions/EditHSAAction',
  EditIRAAction: '#/definitions/EditIraAction',
  Credit: '#/definitions/Credit',
  EditCreditAction: '#/definitions/EditCreditAction'
})

fs.writeFileSync(outputPath, moduleCode)


================================================
FILE: src/App.css
================================================
body {
  height: 100vh;
}

.MuiGrid-container ~ .MuiGrid-container {
  margin-top: 8px;
}


================================================
FILE: src/App.tsx
================================================
import { ReactElement, useMemo } from 'react'
import Main from './components/Main'
import './App.css'
import { createTheme, ThemeProvider, useMediaQuery } from '@material-ui/core'

const App = (): ReactElement => {
  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')

  const theme = useMemo(
    () =>
      createTheme({
        palette: {
          secondary: prefersDarkMode
            ? {
                light: '#4f5b62',
                main: '#d5d5d5',
                dark: '#000a12',
                contrastText: '#ffffff'
              }
            : {
                light: '#4f5b62',
                main: '#263238',
                dark: '#000a12',
                contrastText: '#ffffff'
              },
          primary: {
            light: '#66ffa6',
            main: '#00e676',
            dark: '#00b248',
            contrastText: '#000000'
          }
        }
      }),
    [prefersDarkMode]
  )

  return (
    <div className="App">
      <ThemeProvider theme={theme}>
        <Main />
      </ThemeProvider>
    </div>
  )
}

export default App


================================================
FILE: src/components/ConditionallyWrap.tsx
================================================
import { PropsWithChildren, ReactNode, ReactElement } from 'react'

type ConditionallyWrapProps = PropsWithChildren<{
  condition: boolean
  wrapper: (children: ReactNode) => ReactElement
}>

const ConditionallyWrap = ({
  condition,
  wrapper,
  children
}: ConditionallyWrapProps): ReactElement =>
  condition ? wrapper(children) : <>{children}</>

export default ConditionallyWrap


================================================
FILE: src/components/CreatePDF.tsx
================================================
import { FormEvent, ReactElement, ReactNode, useEffect, useState } from 'react'
import { Helmet } from 'react-helmet'
import { usePager } from './pager'
import Alert from '@material-ui/lab/Alert'
import { useSelector } from 'react-redux'
import { Information, Asset, State, TaxYear } from 'ustaxes/core/data'
import { YearsTaxesState } from 'ustaxes/redux'

import yearFormBuilder from 'ustaxes/forms/YearForms'
import { intentionallyFloat, run, runAsync } from 'ustaxes/core/util'
import { Box, Button } from '@material-ui/core'
import Summary from './Summary'

import { savePDF } from 'ustaxes/pdfHandler'
import StateForm from 'ustaxes/core/stateForms/Form'
import Form from 'ustaxes/core/irsForms/Form'

export default function CreatePDF(): ReactElement {
  const [irsErrors, updateIrsErrors] = useState<string[]>([])
  const [stateErrors, updateStateErrors] = useState<string[]>([])
  const [irsForms, updateIrsForms] = useState<Form[]>([])
  const [stateForms, updateStateForms] = useState<StateForm[]>([])

  const year: TaxYear = useSelector(
    (state: YearsTaxesState) => state.activeYear
  )
  const info: Information = useSelector(
    (state: YearsTaxesState) => state[state.activeYear]
  )

  const assets: Asset<Date>[] = useSelector(
    (state: YearsTaxesState) => state.assets
  )

  useEffect(() => {
    const builder = yearFormBuilder(year, info, assets)
    const f1040Errors = builder.errors()

    updateIrsErrors(f1040Errors)
    if (f1040Errors.length > 0) {
      updateStateErrors(['Cannot build state return with IRS errors'])
      updateStateForms([])
      updateIrsForms([])
    } else {
      const irsRes = builder.f1040()
      const stateRes = builder.makeStateReturn()

      run(stateRes).fold(updateStateErrors, (stateForms) => {
        updateStateErrors([])
        updateStateForms(stateForms)
      })

      run(irsRes).fold(updateIrsErrors, (f1040Forms) => {
        updateIrsErrors([])
        updateIrsForms(f1040Forms)
      })
    }
  }, [info])

  const lastName = info.taxPayer.primaryPerson?.lastName
  const residency: State | undefined = info.stateResidencies[0]?.state

  const federalFileName = `${lastName ?? 'Tax'}-1040.pdf`
  const stateFileName = `${lastName ?? 'StateTax'}-${residency}.pdf`

  const { navButtons } = usePager()

  const federalReturn = async (e: FormEvent<Element>): Promise<void> => {
    e.preventDefault()
    const builder = yearFormBuilder(year, info, assets)

    const r1 = await runAsync(builder.f1040Bytes())
    const r2 = await r1.mapAsync((bytes) => savePDF(bytes, federalFileName))
    return r2.orThrow()
  }

  const stateReturn = async (): Promise<void> => {
    const builder = yearFormBuilder(year, info, assets)

    const r1 = await runAsync(builder.stateReturnBytes())
    const r2 = await r1.mapAsync((bytes) => savePDF(bytes, stateFileName))
    return r2.orThrow()
  }

  const printActions: ReactNode = (() => {
    if (irsErrors.length === 0) {
      return (
        <>
          <h2>Print Copy to File</h2>
          <h3>Federal</h3>
          <Box marginBottom={2}>
            <Button
              type="button"
              onClick={intentionallyFloat(federalReturn)}
              variant="contained"
              color="primary"
            >
              Create Federal 1040
            </Button>
          </Box>
          {(() => {
            if (info.stateResidencies.length > 0) {
              return <h3>State: {info.stateResidencies[0].state} </h3>
            }
          })()}
          <Box marginBottom={2}>
            {(() => {
              if (stateErrors.length === 0) {
                return (
                  <Button
                    type="button"
                    onClick={intentionallyFloat(stateReturn)}
                    variant="contained"
                    color="primary"
                  >
                    Create {residency} Return
                  </Button>
                )
              }
              return stateErrors.map((e) => (
                <Alert key={e} severity="info">
                  {e}
                </Alert>
              ))
            })()}
          </Box>
        </>
      )
    }
  })()

  return (
    <div>
      <Summary
        errors={irsErrors}
        stateErrors={stateErrors}
        irsForms={irsForms}
        stateForms={stateForms}
      />
      <form tabIndex={-1}>
        <Helmet>
          <title>Print Copy to File | Results | UsTaxes.org</title>
        </Helmet>
        {printActions}
        {navButtons}
      </form>
    </div>
  )
}


================================================
FILE: src/components/DataPropagator.tsx
================================================
import { ReactElement } from 'react'
import { useSelector } from 'react-redux'
import { YearsTaxesState } from 'ustaxes/redux'
import { Information, TaxYears } from 'ustaxes/core/data'
import _ from 'lodash'
import { enumKeys } from 'ustaxes/core/util'
import { useDispatch } from 'ustaxes/redux'
import { setInfo } from 'ustaxes/redux/actions'
import { Button } from '@material-ui/core'
import { Alert } from '@material-ui/lab'

const DataPropagator = (): ReactElement => {
  const wholeState = useSelector((state: YearsTaxesState) => state)
  const allYears = enumKeys(TaxYears)
  const yearIndex = _.indexOf(allYears, wholeState.activeYear)
  const dispatch = useDispatch()

  const currentYear: Information = wholeState[wholeState.activeYear]
  const priorYear: Information = wholeState[allYears[yearIndex - 1]]

  const canPropagate =
    yearIndex > 0 &&
    currentYear.taxPayer.primaryPerson?.firstName === undefined &&
    priorYear.taxPayer.primaryPerson?.firstName !== undefined

  const onClick = () => {
    if (canPropagate) {
      dispatch(setInfo(priorYear))
    }
  }

  if (canPropagate) {
    return (
      <div>
        <Alert severity="info">
          <p>
            You have data from the prior tax year but no data for the current
            tax year. Would you like to migrate your data from the prior year?
          </p>
          <Button onClick={onClick} variant="contained" color="primary">
            Migrate
          </Button>
        </Alert>
      </div>
    )
  }
  return <></>
}

export default DataPropagator


================================================
FILE: src/components/FormContainer/Context.tsx
================================================
import {
  createContext,
  useContext,
  PropsWithChildren,
  Context,
  ReactElement
} from 'react'

interface FormContainerProps {
  onSubmit?: () => void
}

const getProps = (): FormContainerProps => ({
  onSubmit: () => null
})

export const formContainerContext: Context<FormContainerProps> = createContext(
  getProps()
)

export const FormContainerProvider = ({
  onSubmit,
  children
}: PropsWithChildren<FormContainerProps>): ReactElement => {
  return (
    <formContainerContext.Provider value={{ onSubmit }}>
      {children}
    </formContainerContext.Provider>
  )
}

export const useFormContainer = (): FormContainerProps =>
  useContext(formContainerContext)


================================================
FILE: src/components/FormContainer.tsx
================================================
import { PropsWithChildren, ReactElement, useState } from 'react'
import {
  createStyles,
  makeStyles,
  useMediaQuery,
  IconButton,
  List,
  ListItem,
  ListItemIcon,
  ListItemSecondaryAction,
  ListItemText,
  Box,
  Button,
  Theme
} from '@material-ui/core'
import { Delete, Edit } from '@material-ui/icons'
import { DefaultValues, SubmitHandler, useFormContext } from 'react-hook-form'
import _ from 'lodash'
import { ReactNode } from 'react'
import { FormContainerProvider } from './FormContainer/Context'
import { intentionallyFloat } from 'ustaxes/core/util'

interface FormContainerProps {
  onDone: () => void
  onCancel?: () => void
}

export const FormContainer = ({
  onDone,
  onCancel,
  children
}: PropsWithChildren<FormContainerProps>): ReactElement => {
  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')

  return (
    <div>
      <FormContainerProvider onSubmit={onDone}>
        {children}
      </FormContainerProvider>
      <Box
        display="flex"
        justifyContent="flex-start"
        marginTop={2}
        marginBottom={3}
      >
        <Box marginRight={2}>
          <Button
            type="button"
            onClick={onDone}
            variant="contained"
            color="primary"
          >
            Save
          </Button>
        </Box>
        <Button
          type="button"
          onClick={onCancel}
          color={prefersDarkMode ? 'default' : 'secondary'}
          variant="contained"
        >
          Discard
        </Button>
      </Box>
    </div>
  )
}

interface MutableListItemProps {
  remove?: () => void
  onEdit?: () => void
  primary: string
  secondary?: string | ReactElement
  editing?: boolean
  icon?: ReactElement
  disableEdit?: boolean
}

export const MutableListItem = ({
  icon,
  primary,
  secondary,
  remove,
  onEdit,
  editing = false,
  disableEdit = false
}: MutableListItemProps): ReactElement => {
  const canEdit = !editing && !disableEdit && onEdit !== undefined
  const canDelete = remove !== undefined && !editing

  const editAction = (() => {
    if (canEdit) {
      return (
        <ListItemIcon>
          <IconButton onClick={onEdit} edge="end" aria-label="edit">
            <Edit />
          </IconButton>
        </ListItemIcon>
      )
    }
  })()

  const deleteAction = (() => {
    if (canDelete) {
      return (
        <ListItemSecondaryAction>
          <IconButton onClick={remove} edge="end" aria-label="delete">
            <Delete />
          </IconButton>
        </ListItemSecondaryAction>
      )
    }
  })()

  const status = editing ? 'editing' : undefined

  return (
    <ListItem>
      <ListItemIcon>{icon}</ListItemIcon>
      <ListItemText
        primary={<strong>{primary}</strong>}
        secondary={secondary}
      />
      {editAction}
      {deleteAction}
      {status}
    </ListItem>
  )
}

interface FormListContainerProps<A> {
  onSubmitAdd: SubmitHandler<A>
  onSubmitEdit: (index: number) => SubmitHandler<A>
  onCancel?: () => void

  // same default values passed to useForm
  defaultValues: DefaultValues<A>
  items: A[]
  disableEditing?: boolean
  removeItem?: (v: number) => void
  primary: (a: A) => string
  secondary?: (a: A) => string | ReactElement
  max?: number
  icon?: (a: A) => ReactElement
  grouping?: (a: A) => number
  groupHeaders?: (ReactNode | undefined)[]
}

const useStyles = makeStyles((theme: Theme) =>
  createStyles({
    buttonList: {
      margin: `${theme.spacing(2)}px 0 ${theme.spacing(3)}px`
    }
  })
)

export interface OpenableFormContainerProps<A> {
  onCancel?: () => void
  onSave: SubmitHandler<A>
  isOpen?: boolean
  defaultValues: DefaultValues<A>
  onOpenStateChange: (isOpen: boolean) => void
  allowAdd?: boolean
}

export const OpenableFormContainer = <A,>(
  props: PropsWithChildren<OpenableFormContainerProps<A>>
): ReactElement => {
  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')
  const { isOpen = false, allowAdd = true, defaultValues } = props
  const classes = useStyles()

  // Note useFormContext here instead of useForm reuses the
  // existing form context from the parent.
  const { reset, handleSubmit } = useFormContext()

  const closeForm = (): void => {
    props.onOpenStateChange(false)
    reset(defaultValues)
  }

  const onClose = (): void => {
    if (props.onCancel !== undefined) props.onCancel()
    closeForm()
  }

  const onSave: SubmitHandler<A> = (formData): void => {
    props.onSave(formData)
    closeForm()
  }

  const openAddForm = () => {
    props.onOpenStateChange(true)
  }

  return (
    <>
      {(() => {
        if (isOpen) {
          return (
            <FormContainer
              onDone={intentionallyFloat(handleSubmit(onSave))}
              onCancel={onClose}
            >
              {props.children}
            </FormContainer>
          )
        } else if (allowAdd) {
          return (
            <div className={classes.buttonList}>
              <Button
                type="button"
                onClick={openAddForm}
                color={prefersDarkMode ? 'default' : 'secondary'}
                variant="contained"
              >
                Add
              </Button>
            </div>
          )
        }
      })()}
    </>
  )
}

const FormListContainer = <A,>(
  props: PropsWithChildren<FormListContainerProps<A>>
): ReactElement => {
  const {
    children,
    items,
    icon,
    max,
    primary,
    defaultValues,
    secondary,
    disableEditing = false,
    removeItem,
    onSubmitAdd,
    onSubmitEdit,
    onCancel = () => {
      // default do nothing
    },
    grouping = () => 0,
    groupHeaders = []
  } = props
  const [isOpen, setOpen] = useState(false)
  const [editing, setEditing] = useState<number | undefined>(undefined)

  const allowAdd = max === undefined || items.length < max

  // Use the provided grouping function to split the input
  // array into an array of groups. Each group has a title
  // and a list of items, along with their original index.
  const groups: [ReactNode, [A, number][]][] = _.chain(items)
    .map<[A, number]>((x, n) => [x, n])
    .groupBy(([x]) => grouping(x))
    .toPairs()
    .map<[ReactNode, [A, number][]]>(([k, xs]) => [
      groupHeaders[parseInt(k)],
      xs
    ])
    .value()

  // Note useFormContext here instead of useForm reuses the
  // existing form context from the parent.
  const { reset } = useFormContext()

  const closeForm = (): void => {
    setEditing(undefined)
    setOpen(false)
    reset(defaultValues)
  }

  const cancel = (): void => {
    closeForm()
    onCancel()
  }

  const onSave: SubmitHandler<A> = (formData): void => {
    if (editing !== undefined) {
      onSubmitEdit(editing)(formData)
    } else {
      onSubmitAdd(formData)
    }
    closeForm()
  }

  const openEditForm = (n: number): (() => void) | undefined => {
    if (!disableEditing && editing === undefined) {
      return () => {
        setEditing(n)
        setOpen(true)
        reset(items[n])
      }
    }
  }

  const itemDisplay = (() => {
    if (items.length > 0) {
      return (
        <List dense={true}>
          {groups.map(([title, group], i) => (
            <div key={`group-${i}`}>
              {title}
              {group.map(([item, originalIndex], k) => (
                <MutableListItem
                  key={k}
                  primary={primary(item)}
                  secondary={
                    secondary !== undefined ? secondary(item) : undefined
                  }
                  onEdit={openEditForm(originalIndex)}
                  disableEdit={isOpen}
                  editing={editing === originalIndex}
                  remove={
                    removeItem !== undefined
                      ? () => removeItem(originalIndex)
                      : undefined
                  }
                  icon={icon !== undefined ? icon(item) : undefined}
                />
              ))}
            </div>
          ))}
        </List>
      )
    }
  })()

  return (
    <>
      {itemDisplay}
      <OpenableFormContainer
        allowAdd={allowAdd}
        defaultValues={defaultValues}
        onSave={onSave}
        isOpen={isOpen}
        onOpenStateChange={setOpen}
        onCancel={cancel}
      >
        {children}
      </OpenableFormContainer>
    </>
  )
}

export default FormContainer
export { FormListContainer }


================================================
FILE: src/components/GettingStarted.tsx
================================================
import { ReactElement } from 'react'
import { Helmet } from 'react-helmet'
import { Link, useMediaQuery } from '@material-ui/core'
import { StartButtons, SingleButtons } from './pager'
import { isWeb } from 'ustaxes/core/util'

const urls = {
  repo: 'https://github.com/ustaxes/UsTaxes',
  releases: 'https://github.com/ustaxes/UsTaxes/releases',
  issues: 'https://github.com/ustaxes/ustaxes/issues',
  twitter: 'https://twitter.com/ustaxesorg',
  discord: 'https://discord.gg/dAaz472mPz',
  aidan: 'https://github.com/thegrims',
  zak: 'https://github.com/zakpatterson',
  startPage: '/info'
}

const doubleButtons: ReactElement = (
  <StartButtons
    firstText={'Start Return In Browser'}
    firstUrl={urls.startPage}
    secondText={'Download Desktop Version'}
    secondUrl={urls.releases}
  />
)
const singleButtons: ReactElement = (
  <SingleButtons text={'Start Return'} url={urls.startPage} />
)

export default function GettingStarted(): ReactElement {
  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')

  return (
    <>
      <Helmet>
        <title>Getting Started | UsTaxes.org</title>
      </Helmet>
      <h1>UsTaxes.org</h1>
      <p>
        UsTaxes is an open source tax filing application that can be used to
        file the Form 1040 United States individual income tax return and some
        state individual income tax returns. UsTaxes is provided free of charge
        and requires no sharing of personal data.
      </p>
      <p>
        Interested in using UsTaxes? The income forms, return attachments,
        credits, and states of residency are provided below.
      </p>
      <h2>Supported Income Forms</h2>
      The following federal income forms are (mostly) supported:
      <ul>
        <li>W2</li>
        <li>1099-INT</li>
        <li>1099-DIV</li>
        <li>1099-B</li>
        <li>1098-E</li>
        <li>
          1099-R: support for normal distributions from IRA and pension
          accounts.
        </li>
        <li>SSA-1099</li>
      </ul>
      UsTaxes can attach the following to your 1040:
      <ul>
        <li>Schedule 1 (as related to Schedule E and Schedule SE only)</li>
        <li>Schedule 2</li>
        <li>Schedule 3 (as related to excess FICA only)</li>
        <li>Schedule 8812</li>
        <li>Schedule A</li>
        <li>Schedule B</li>
        <li>Schedule D</li>
        <li>Schedule E</li>
        <li>Schedule SE</li>
        <li>F1040-V</li>
        <li>F6251 (AMT; only supports exercise of incentive stock options)</li>
        <li>F8889 (Health Savings Accounts)</li>
        <li>F8949 (Uncovered Investment Transactions)</li>
        <li>F8959 (Additional Medicare Tax)</li>
        <li>F8960 (Net Investment Income Tax)</li>
        <li>F8995/F8995-A (Qualified Business Income Deduction)</li>
      </ul>
      These federal income tax credits are supported:
      <ul>
        <li>Credit for Children and Other Dependents</li>
        <li>Earned Income Tax Credit</li>
      </ul>
      <h2>State Income Tax</h2>
      <p>State tax returns are now in development.</p>
      <p>The following states are currently implemented:</p>
      <ul>
        <li>Illinois</li>
      </ul>
      Note the following states have no income tax filing:
      <ul>
        <li>Alaska</li>
        <li>Tennessee</li>
        <li>Wyoming</li>
        <li>Florida</li>
        <li>New Hampshire</li>
        <li>South Dakota</li>
        <li>Texas</li>
        <li>Washington</li>
        <li>Nevada</li>
      </ul>
      <p>
        <strong>10</strong>/51 states are supported. If your types of income and
        state residency are supported, you should be able to use UsTaxes to
        paper file your return!
      </p>
      <h2>Get Started</h2>
      {isWeb() ? doubleButtons : singleButtons}
      <h2>Get Involved!</h2>
      <p>
        The success of this project depends on user feedback. If you notice any
        issues at all with the project, please reach out to us!
      </p>
      <ul>
        <li>
          File an issue: <Link href={urls.issues}>GitHub Issues</Link>
        </li>
        <li>
          Message us on <Link href={urls.twitter}>Twitter</Link>
        </li>
        <li>
          Think you have something to contribute? Come to our{' '}
          <Link href={urls.discord}>Discord channel</Link>.
        </li>
      </ul>
      <p>
        UsTaxes is an open source project maintained by{' '}
        <Link href={urls.aidan}>Aidan Grimshaw</Link> and{' '}
        <Link href={urls.zak}>Zak Patterson</Link>.
      </p>
      <p>
        Contributions to the <Link href={urls.repo}>GitHub</Link> repository are
        welcome.
      </p>
      <a href="https://www.netlify.com">
        <img
          src={prefersDarkMode ? 'netlify-dark.svg' : 'netlify-light.svg'}
          alt="Deploys by Netlify"
        />
      </a>
    </>
  )
}


================================================
FILE: src/components/HelpAndFeedback.tsx
================================================
import { Button, Grid, TextField } from '@material-ui/core'
import { Alert } from '@material-ui/lab'
import { ReactElement, useEffect, useState } from 'react'
import { useSelector } from 'react-redux'
import { intentionallyFloat } from 'ustaxes/core/util'
import { USTState } from 'ustaxes/redux/store'
import anonymize from '../core/data/anonymize'

const HelpAndFeedback = (): ReactElement => {
  const state = useSelector((state: USTState) => state)
  const [anonymizedState, setAnonymizedState] = useState('')
  const [copied, doSetCopied] = useState(false)

  useEffect(() => {
    setAnonymizedState(JSON.stringify(anonymize(state), undefined, 2))
  }, [state])

  const setCopied = (): void => {
    doSetCopied(true)
    setTimeout(() => doSetCopied(false), 5000)
  }

  const copiedAlert = (() => {
    if (copied) {
      return (
        <Grid item>
          <Alert severity="info">Copied to clipboard</Alert>
        </Grid>
      )
    }
  })()

  const copyToClipboard = async () => {
    await navigator.clipboard.writeText(anonymizedState)
    setCopied()
  }

  return (
    <>
      <h2>Help and Feedback</h2>
      <p>Did you notice something wrong?</p>
      <p>
        Please email <strong>feedback@ustaxes.org</strong> with any questions or
        bugs. If your personal data might be helpful, please copy paste the
        below into the body of the email. Your data below should be properly
        anonymized.
      </p>
      <Grid container spacing={2} direction="column">
        <Grid item>
          <Button
            variant="contained"
            color="primary"
            onClick={intentionallyFloat(copyToClipboard)}
          >
            Copy to clipboard
          </Button>
        </Grid>
        {copiedAlert}
        <Grid item>
          <TextField
            disabled
            multiline
            minRows={40}
            maxRows={100}
            fullWidth
            value={JSON.stringify(anonymize(state), null, 2)}
          />
        </Grid>
      </Grid>{' '}
    </>
  )
}

export default HelpAndFeedback


================================================
FILE: src/components/Main.tsx
================================================
import { PropsWithChildren, ReactElement } from 'react'
import {
  createStyles,
  makeStyles,
  CssBaseline,
  Grid,
  Theme
} from '@material-ui/core'
import { Routes, Route, Navigate } from 'react-router-dom'
import { isMobileOnly as isMobile } from 'react-device-detect'
import { PagerProvider } from './pager'
import { StateLoader } from './debug'
import NoMatchPage from './NoMatchPage'
import SkipToLinks from './SkipToLinks'
import ScrollTop from './ScrollTop'
import Menu, { backPages, drawerSectionsForYear } from './Menu'
import { Section, SectionItem } from './ResponsiveDrawer'

import Urls from 'ustaxes/data/urls'
import DataPropagator from './DataPropagator'
import YearStatusBar from './YearStatusBar'
import { useSelector } from 'react-redux'
import { TaxYear } from 'ustaxes/core/data'
import { YearsTaxesState } from 'ustaxes/redux'

type Props = {
  isMobile: boolean
}

const useStyles = makeStyles<Theme, Props>((theme: Theme) =>
  createStyles({
    container: {
      display: 'flex'
    },
    content: ({ isMobile }) => ({
      padding: '1em 2em',
      [theme.breakpoints.up('sm')]: {
        borderRadius: '5px',
        boxShadow: 'rgba(0, 0, 0, 0.2) 0px 20px 30px',
        margin: theme.spacing(3),
        padding: '1em 2em'
      },
      width: isMobile ? '100%' : undefined
    }),
    // necessary for content to be below app bar
    toolbar: {
      ...theme.mixins.toolbar,
      [theme.breakpoints.up('sm')]: {
        display: 'none'
      }
    }
  })
)

export default function Main(): ReactElement {
  const activeYear: TaxYear = useSelector(
    (state: YearsTaxesState) => state.activeYear
  )

  const classes = useStyles({ isMobile })

  const steps: SectionItem[] = drawerSectionsForYear(activeYear).flatMap(
    (section: Section) => section.items
  )

  const allItems: SectionItem[] = [...steps, ...backPages]

  const Layout = ({
    showMenu = true,
    children
  }: PropsWithChildren<{ showMenu?: boolean }>) => (
    <>
      {showMenu ? <Menu /> : undefined}
      <Grid
        component="main"
        tabIndex={-1}
        container
        justifyContent="center"
        direction="row"
      >
        <Grid item sm={12} md={8} lg={6}>
          {showMenu ? (
            <Grid item className={classes.content}>
              {' '}
              <YearStatusBar />
            </Grid>
          ) : undefined}
          <Grid item className={classes.content}>
            {isMobile && showMenu ? (
              <div className={classes.toolbar} />
            ) : undefined}
            {children}
          </Grid>
        </Grid>
      </Grid>
    </>
  )

  return (
    <>
      <CssBaseline />
      <SkipToLinks />
      <div className={classes.container}>
        <StateLoader />
        <PagerProvider pages={steps}>
          <Routes>
            <Route path="/" element={<Navigate to={Urls.default} />} />
            {allItems.map((item) => (
              <Route
                key={item.title}
                path={item.url}
                element={
                  <Layout showMenu={!item.url.includes('start')}>
                    <DataPropagator />
                    {item.element}
                  </Layout>
                }
              />
            ))}
            <Route
              path="*"
              element={
                <Layout>
                  <NoMatchPage />
                </Layout>
              }
            />
          </Routes>
        </PagerProvider>
        {!isMobile && <ScrollTop />}
      </div>
    </>
  )
}


================================================
FILE: src/components/Menu.tsx
================================================
import { ReactElement, useState } from 'react'
import { useLocation } from 'react-router-dom'

import { useSelector } from 'react-redux'
import {
  createStyles,
  makeStyles,
  AppBar,
  IconButton,
  Slide,
  Theme,
  Toolbar,
  Typography
} from '@material-ui/core'
import CloseIcon from '@material-ui/icons/Close'
import MenuIcon from '@material-ui/icons/Menu'
import ResponsiveDrawer, {
  item,
  Section,
  SectionItem
} from './ResponsiveDrawer'

import W2JobInfo from './income/W2JobInfo'
import CreatePDF from './CreatePDF'
import PrimaryTaxpayer from './TaxPayer'
import RefundBankAccount from './RefundBankAccount'
import SpouseAndDependent from './TaxPayer/SpouseAndDependent'
import F1099Info from './income/F1099Info'
import EstimatedTaxes from './payments/EstimatedTaxes'
import RealEstate from './income/RealEstate'
import GettingStarted from './GettingStarted'
import F1098eInfo from './deductions/F1098eInfo'
import ItemizedDeductions from './deductions/ItemizedDeductions'
import Questions from './Questions'
import HelpAndFeedback from './HelpAndFeedback'
import UserSettings from './UserSettings'
import Urls from 'ustaxes/data/urls'

import { isMobileOnly as isMobile } from 'react-device-detect'
import HealthSavingsAccounts from './savingsAccounts/healthSavingsAccounts'
import IRA from './savingsAccounts/IRA'
import OtherInvestments from './income/OtherInvestments'
import { StockOptions } from './income/StockOptions'
import { PartnershipIncome } from './income/PartnershipIncome'
import { TaxYear } from 'ustaxes/core/data'
import { AdvanceChildTaxCredit } from './Y2021/AdvanceChildTaxCredit'
import { YearsTaxesState } from 'ustaxes/redux'

const useStyles = makeStyles((theme: Theme) =>
  createStyles({
    root: {
      flexGrow: 1,
      zIndex: theme.zIndex.drawer + 1,
      [theme.breakpoints.up('sm')]: {
        display: 'none'
      }
    },
    toolbar: {
      alignItems: 'center'
    },
    title: {
      position: 'absolute',
      width: '100%',
      textAlign: 'center',
      pointerEvents: 'none'
    },
    menuButton: {
      marginRight: theme.spacing(2),
      [theme.breakpoints.up('sm')]: {
        display: 'none'
      }
    },
    gutters: {
      margin: '0 12px',
      padding: 0
    }
  })
)

const getTitleAndPage = (currentUrl: string, year: TaxYear): string => {
  const backPage = backPages.find(({ url }) => url === currentUrl)
  if (backPage) return backPage.title

  const page = drawerSectionsForYear(year)
    .flatMap(({ title: sectionTitle, items }) =>
      items.map(({ title, url }) => ({ sectionTitle, title, url }))
    )
    .find(({ url }) => url === currentUrl)

  return `${page?.sectionTitle ?? ''} - ${page?.title ?? ''}`
}

export const backPages: SectionItem[] = [
  {
    title: 'User Settings',
    url: Urls.settings,
    element: <UserSettings />
  },
  {
    title: 'Help and Feedback',
    url: Urls.help,
    element: <HelpAndFeedback />
  }
]

export const drawerSections: Section[] = [
  {
    title: 'UsTaxes.org',
    items: [item('Getting Started', Urls.usTaxes.start, <GettingStarted />)]
  },
  {
    title: 'Personal',
    items: [
      item('Primary Taxpayer', Urls.taxPayer.info, <PrimaryTaxpayer />),
      item(
        'Spouse and Dependents',
        Urls.taxPayer.spouseAndDependent,
        <SpouseAndDependent />
      )
    ]
  },
  {
    title: 'Income',
    items: [
      item('Wages (W2)', Urls.income.w2s, <W2JobInfo />),
      item('Income (1099)', Urls.income.f1099s, <F1099Info />),
      item('Rental income', Urls.income.realEstate, <RealEstate />),
      item(
        'Other investments',
        Urls.income.otherInvestments,
        <OtherInvestments />
      ),
      item('Stock options', Urls.income.stockOptions, <StockOptions />),
      item(
        'Partnership Income',
        Urls.income.partnershipIncome,
        <PartnershipIncome />
      )
    ]
  },
  {
    title: 'Payments',
    items: [
      item('Estimated Taxes', Urls.payments.estimatedTaxes, <EstimatedTaxes />)
    ]
  },
  {
    title: 'Deductions',
    items: [
      item('Student Loan Interest', Urls.deductions.f1098es, <F1098eInfo />),
      item(
        'Itemized Deductions',
        Urls.deductions.itemized,
        <ItemizedDeductions />
      )
    ]
  },
  {
    title: 'Savings Accounts',
    items: [
      item(
        'Health Savings Account (HSA)',
        Urls.savingsAccounts.healthSavingsAccounts,
        <HealthSavingsAccounts />
      ),
      item(
        'Individual Retirement Arrangements (IRA)',
        Urls.savingsAccounts.ira,
        <IRA />
      )
    ]
  },
  {
    title: 'Results',
    items: [
      item('Refund Information', Urls.refund, <RefundBankAccount />),
      item('Informational Questions', Urls.questions, <Questions />),
      item('Review and Print', Urls.createPdf, <CreatePDF />)
    ]
  }
]

const yearSpecificPages: Partial<{ [k in TaxYear]: Section[] }> = {
  Y2021: [
    {
      title: 'Tax Year 2021',
      items: [
        item(
          'Advance Child Tax Credit (Letter 6419)',
          Urls.Y2021.credits,
          <AdvanceChildTaxCredit />
        )
      ]
    }
  ]
}

export const drawerSectionsForYear = (year: TaxYear): Section[] => [
  ...drawerSections.slice(0, -2),
  ...(yearSpecificPages[year] || []),
  drawerSections[drawerSections.length - 1]
]

const Menu = (): ReactElement => {
  const classes = useStyles()
  const [isOpen, setOpen] = useState(!isMobile)
  const activeYear: TaxYear = useSelector(
    (state: YearsTaxesState) => state.activeYear
  )

  const allSections = drawerSectionsForYear(activeYear)

  return (
    <>
      <AppBar position="fixed" className={classes.root}>
        <Toolbar
          className={classes.toolbar}
          classes={{ gutters: classes.gutters }}
        >
          <IconButton
            color="inherit"
            aria-label={`${isOpen ? 'close' : 'open'} drawer`}
            edge="start"
            onClick={() => setOpen((isOpen) => !isOpen)}
            className={classes.menuButton}
          >
            {isOpen ? <CloseIcon /> : <MenuIcon />}
          </IconButton>
          <Slide in={isOpen} direction={'right'}>
            <Typography className={classes.title}>Menu</Typography>
          </Slide>
          <Slide in={!isOpen} direction={'left'}>
            <Typography className={classes.title}>
              {getTitleAndPage(useLocation().pathname, activeYear)}
            </Typography>
          </Slide>
        </Toolbar>
      </AppBar>
      <ResponsiveDrawer
        sections={allSections}
        isOpen={isOpen}
        setOpen={setOpen}
      />
    </>
  )
}

export default Menu


================================================
FILE: src/components/NoMatchPage.tsx
================================================
import { ReactElement } from 'react'
import { Helmet } from 'react-helmet'
import { SingleButtons } from './pager'

export default function NoMatchPage(): ReactElement {
  return (
    <form tabIndex={-1}>
      <Helmet>
        <title>404 Page not found | UsTaxes.org</title>
      </Helmet>
      <h2>Page not found</h2>
      <p>
        We can&apos;t find the page you&apos;re looking for! Don&apos;t worry,
        your progress has been saved
      </p>
      <SingleButtons text={'Go Back Home'} url={'/'} />
    </form>
  )
}


================================================
FILE: src/components/Patterns.ts
================================================
import { TaxYear, TaxYears } from 'ustaxes/core/data'
import { daysInYear } from 'ustaxes/core/util'

export interface BasePattern {
  regexp?: RegExp
  description?: string
  format?: string
}

export interface NumericPattern extends BasePattern {
  readonly inputType: 'numeric'
  thousandSeparator?: boolean
  mask?: string
  prefix?: string
  allowEmptyFormatting?: boolean
  decimalScale?: number
  min?: number
  max?: number
}

export interface TextPattern extends BasePattern {
  readonly inputType: 'text'
}

export type PatternConfig = NumericPattern | TextPattern

// Convenience record syntax constructor for numeric patterns
const numeric = (
  regexp: RegExp,
  description: string,
  min: number | undefined = undefined,
  max: number | undefined = undefined,
  format: string | undefined = undefined,
  mask = '_',
  thousandSeparator = false,
  prefix = '',
  decimalScale: number | undefined = 0
): NumericPattern => ({
  inputType: 'numeric',
  regexp,
  description,
  decimalScale,
  min,
  max,
  format,
  mask,
  thousandSeparator,
  prefix
})

const text = (regexp: RegExp, description: string): TextPattern => ({
  inputType: 'text',
  regexp,
  description
})

export const isNumeric = (p: PatternConfig): p is NumericPattern =>
  p.inputType === 'numeric'
export const isText = (p: PatternConfig): p is TextPattern =>
  p.inputType === 'text'

export const Patterns = {
  number: numeric(/^\d+$/, 'Input should be a number'),
  year: numeric(
    /[12][0-9]{3}/,
    'Input should be a four digit year',
    1900,
    undefined,
    '####',
    '_'
  ),
  numMonths: numeric(/[0-9]{1,2}/, 'Input should be 0-12', 0, 12, '##', ''),
  numDays: (year: TaxYear): NumericPattern =>
    numeric(
      /[0-9]{1,3}/,
      `Input should be 0-${daysInYear(TaxYears[year])}`,
      0,
      daysInYear(TaxYears[year]),
      '###',
      ''
    ),
  name: text(/^[A-Za-z ]+$/i, 'Input should only include letters and spaces'),
  zip: numeric(
    /[0-9]{5}([0-9]{4})?/,
    'Input should be filled with 5 or 9 digits',
    undefined,
    undefined,
    '#####-####'
  ),
  ssn: numeric(
    /[0-9]{9}/,
    'Input should be filled with 9 digits',
    undefined,
    undefined,
    '###-##-####'
  ),
  ein: numeric(
    /[0-9]{9}/,
    'Input should be filled with 9 digits',
    undefined,
    undefined,
    '##-#######'
  ),
  currency: numeric(
    /[0-9]+(\.[0-9]{1,2})?/,
    'Input should be a numeric value',
    undefined,
    undefined,
    undefined,
    '_',
    true,
    '$',
    2
  ),
  bankAccount: numeric(
    /[0-9]{4,17}/,
    'Input should be filled with 4-17 digits',
    undefined,
    undefined,
    '#################',
    ''
  ),
  bankRouting: numeric(
    /[0-9]{9}/,
    'Input should be filled with 9 digits',
    undefined,
    undefined,
    '#########',
    '_'
  ),
  usPhoneNumber: numeric(
    /[2-9][0-9]{9}/,
    'Input should be 10 digits, not starting with 0 or 1',
    undefined,
    undefined,
    '(###) ###-####'
  ),
  plain: text(/.*/, '')
}


================================================
FILE: src/components/Questions.tsx
================================================
import { ReactElement, useEffect } from 'react'
import { Helmet } from 'react-helmet'
import { Grid, List, ListItem } from '@material-ui/core'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'
import { QuestionTagName, Responses } from 'ustaxes/core/data'
import { getRequiredQuestions } from 'ustaxes/core/data/questions'
import { LabeledCheckbox, LabeledInput } from './input'
import { answerQuestion } from 'ustaxes/redux/actions'
import { FormProvider, useForm } from 'react-hook-form'
import { usePager } from './pager'
import _ from 'lodash'
import { intentionallyFloat } from 'ustaxes/core/util'

const emptyQuestions: Responses = {
  CRYPTO: false,
  FOREIGN_ACCOUNT_EXISTS: false,
  FINCEN_114: false,
  FINCEN_114_ACCOUNT_COUNTRY: '',
  FOREIGN_TRUST_RELATIONSHIP: false,
  LIVE_APART_FROM_SPOUSE: false
}

const Questions = (): ReactElement => {
  const information = useSelector((state: TaxesState) => state.information)

  const stateAnswers: Responses = {
    ...emptyQuestions,
    ...information.questions
  }

  const methods = useForm<Responses>({ defaultValues: stateAnswers })

  const {
    handleSubmit,
    getValues,
    reset,
    formState: { isDirty }
  } = methods

  const currentValues = getValues()

  const { navButtons, onAdvance } = usePager()

  const questions = getRequiredQuestions({
    ...information,
    questions: {
      ...information.questions,
      ...currentValues
    }
  })

  const currentAnswers: Responses = { ...emptyQuestions, ...currentValues }

  // This form can be rerendered because the global state was modified by
  // another control.
  useEffect(() => {
    if (!isDirty && !_.isEqual(currentAnswers, stateAnswers)) {
      reset(stateAnswers)
    }
  }, [])

  const dispatch = useDispatch()

  const onSubmit = (responses: Responses): void => {
    // fix to remove unrequired answers:
    const qtags = questions.map((q) => q.tag)
    const unrequired = Object.keys(responses).filter(
      (rtag) => qtags.find((t) => t === (rtag as QuestionTagName)) === undefined
    )

    const newResponses = {
      ...responses,
      ...Object.fromEntries(unrequired.map((k) => [k, undefined]))
    }

    dispatch(answerQuestion(newResponses))
    onAdvance()
  }

  const page = (
    <form tabIndex={-1} onSubmit={intentionallyFloat(handleSubmit(onSubmit))}>
      <Helmet>
        <title>Informational Questions | Results | UsTaxes.org</title>
      </Helmet>
      <h2>Informational Questions</h2>
      <p>
        Based on your prior responses, responses to these questions are
        required.
      </p>
      <Grid container spacing={2}>
        <List>
          {questions.map((q, i) => (
            <ListItem key={i}>
              {(() => {
                if (q.valueTag === 'boolean') {
                  return <LabeledCheckbox name={q.tag} label={q.text} />
                }
                return <LabeledInput name={q.tag} label={q.text} />
              })()}
            </ListItem>
          ))}
        </List>
      </Grid>
      {navButtons}
    </form>
  )
  return <FormProvider {...methods}>{page}</FormProvider>
}

export default Questions


================================================
FILE: src/components/RefundBankAccount.tsx
================================================
import { ReactElement, useEffect } from 'react'
import { Helmet } from 'react-helmet'
import { useForm, FormProvider } from 'react-hook-form'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'
import { LabeledInput, LabeledRadio } from './input'
import { Patterns } from './Patterns'
import { saveRefundInfo } from 'ustaxes/redux/actions'
import _ from 'lodash'

import { Refund } from 'ustaxes/core/data'
import { usePager } from './pager'
import { Grid } from '@material-ui/core'
import { intentionallyFloat } from 'ustaxes/core/util'

const blankFormData: Partial<Refund> = {
  routingNumber: '',
  accountNumber: '',
  accountType: undefined
}

export default function RefundBankAccount(): ReactElement {
  const refund: Partial<Refund> =
    useSelector((state: TaxesState) => {
      return state.information.refund
    }) ?? {}

  const defaultValues: Partial<Refund> = {
    ...blankFormData,
    ...refund
  }

  const { navButtons, onAdvance } = usePager()

  const methods = useForm<Refund>({ defaultValues })
  const {
    handleSubmit,
    reset,
    getValues,
    formState: { isDirty }
  } = methods
  // const variable dispatch to allow use inside function
  const dispatch = useDispatch()

  const currentValues = {
    ...blankFormData,
    ...getValues()
  }

  // This form can be rerendered because the global state was modified by
  // another control.
  useEffect(() => {
    if (!isDirty && !_.isEqual(currentValues, defaultValues)) {
      return reset(defaultValues)
    }
  })

  // component functions
  const onSubmit = (formData: Refund): void => {
    dispatch(saveRefundInfo(formData))
    onAdvance()
  }

  return (
    <form tabIndex={-1} onSubmit={intentionallyFloat(handleSubmit(onSubmit))}>
      <FormProvider {...methods}>
        <Helmet>
          <title>Refund Information | Results | UsTaxes.org</title>
        </Helmet>
        <h2>Refund Information</h2>
        <Grid container spacing={2}>
          <LabeledInput
            label="Bank Routing number"
            patternConfig={Patterns.bankRouting}
            name="routingNumber"
          />

          <LabeledInput
            label="Bank Account number"
            patternConfig={Patterns.bankAccount}
            name="accountNumber"
          />
          <LabeledRadio<Refund>
            label="Account Type"
            name="accountType"
            values={[
              ['Checking', 'checking'],
              ['Savings', 'savings']
            ]}
          />
        </Grid>
        {navButtons}
      </FormProvider>
    </form>
  )
}


================================================
FILE: src/components/ResponsiveDrawer.tsx
================================================
import { Dispatch, Fragment, ReactElement, SetStateAction } from 'react'
import { NavLink, Link } from 'react-router-dom'
import { isMobileOnly as isMobile } from 'react-device-detect'
import {
  createStyles,
  makeStyles,
  useTheme,
  Divider,
  SwipeableDrawer,
  IconButton,
  List,
  ListItem,
  ListItemText,
  ListSubheader,
  Theme
} from '@material-ui/core'
import GitHubIcon from '@material-ui/icons/GitHub'
import TwitterIcon from '@material-ui/icons/Twitter'
import { HelpOutlineRounded, Settings } from '@material-ui/icons'
import Urls from 'ustaxes/data/urls'

const drawerWidth = 240

const useStyles = makeStyles<Theme, { isMobile: boolean }>((theme) =>
  createStyles({
    drawer: {
      [theme.breakpoints.up('sm')]: {
        width: drawerWidth,
        flexShrink: 0
      }
    },
    drawerBackdrop: ({ isMobile }) => ({
      top: isMobile ? '56px !important' : undefined,
      height: isMobile ? 'calc(100% - 56px)' : undefined
    }),
    drawerContainer: ({ isMobile }) => ({
      top: isMobile ? '56px !important' : 0
    }),
    drawerPaper: ({ isMobile }) => ({
      top: isMobile ? '56px !important' : undefined,
      width: isMobile ? '100%' : drawerWidth,
      height: isMobile ? 'calc(100% - 56px)' : undefined
    }),
    listSocial: {
      display: 'flex',
      justifyContent: 'flex-end',
      marginRight: theme.spacing(2)
    },
    listItemSocial: {
      flex: 0,
      padding: 0
    },
    list: {
      marginLeft: theme.spacing(0),
      paddingLeft: theme.spacing(0)
    },
    listItem: {
      marginLeft: theme.spacing(0),
      paddingLeft: theme.spacing(2)
    },
    sectionHeader: {
      marginLeft: theme.spacing(2)
    }
  })
)

export interface Section {
  title: string
  items: SectionItem[]
}

export interface SectionItem {
  title: string
  url: string
  element: ReactElement
}

export const item = (
  title: string,
  url: string,
  element: ReactElement
): SectionItem => ({
  title,
  url,
  element
})

export interface DrawerItemsProps {
  sections: Section[]
  isOpen: boolean
  setOpen: Dispatch<SetStateAction<boolean>>
}

function ResponsiveDrawer(props: DrawerItemsProps): ReactElement {
  const classes = useStyles({ isMobile })
  const theme = useTheme()

  const { sections, isOpen, setOpen } = props

  const drawer = (
    <>
      {/* {isMobile && <Toolbar />} */}
      {sections.map(({ title, items }) => (
        <Fragment key={`section ${title}`}>
          <List
            subheader={<ListSubheader disableSticky>{title}</ListSubheader>}
            className={classes.list}
          >
            {items.map((item) => (
              <ListItem
                button
                classes={{}}
                key={item.title}
                component={NavLink}
                selected={location.pathname === item.url}
                to={item.url}
              >
                <ListItemText primary={`${item.title}`} />
              </ListItem>
            ))}
          </List>
          <Divider />
        </Fragment>
      ))}
      <List className={classes.listSocial}>
        <ListItem className={classes.listItemSocial}>
          <Link to={Urls.help}>
            <IconButton color="secondary" aria-label="help, support, feedback">
              <HelpOutlineRounded />
            </IconButton>
          </Link>
          <IconButton
            color="secondary"
            aria-label="github, opens in new tab"
            component="a"
            href={`https://github.com/ustaxes/UsTaxes`}
            target="_blank"
            rel="noreferrer noopener"
          >
            <GitHubIcon />
          </IconButton>
        </ListItem>
        <ListItem className={classes.listItemSocial}>
          <IconButton
            color="secondary"
            aria-label="twitter, opens in new tab"
            component="a"
            href={`https://www.twitter.com/ustaxesorg`}
            target="_blank"
            rel="noreferrer noopener"
          >
            <TwitterIcon />
          </IconButton>
        </ListItem>
        <ListItem className={classes.listItemSocial}>
          <Link to={Urls.settings}>
            <IconButton color="secondary" aria-label="site user settings">
              <Settings />
            </IconButton>
          </Link>
        </ListItem>
      </List>
    </>
  )

  return (
    <nav className={classes.drawer} aria-label="primary">
      <SwipeableDrawer
        variant={!isMobile ? 'persistent' : undefined}
        anchor={theme.direction === 'rtl' ? 'right' : 'left'}
        open={isOpen}
        onOpen={() => setOpen(true)}
        onClose={() => setOpen(false)}
        classes={{
          root: classes.drawerContainer,
          paper: classes.drawerPaper
        }}
        ModalProps={{
          BackdropProps: {
            classes: { root: classes.drawerBackdrop }
          }
          // Disabling for the time being due to scroll position persisting
          // keepMounted: isMobile ? true : false // Better open performance on mobile.
        }}
      >
        {drawer}
      </SwipeableDrawer>
    </nav>
  )
}

export default ResponsiveDrawer


================================================
FILE: src/components/SaveToFile.tsx
================================================
import { Button, ButtonProps } from '@material-ui/core'
import { PropsWithChildren, ReactElement } from 'react'
import { useDispatch } from 'react-redux'
import { fsPersist } from 'ustaxes/redux/fs/Actions'

const SaveToFile = (props: PropsWithChildren<ButtonProps>): ReactElement => {
  const dispatch = useDispatch()

  const { children, ...rest } = props

  const onClick = () => dispatch(fsPersist())

  return (
    <Button {...rest} onClick={onClick}>
      {children}
    </Button>
  )
}

export default SaveToFile


================================================
FILE: src/components/ScrollTop.tsx
================================================
import { ReactElement } from 'react'
import { makeStyles, useScrollTrigger, Fab, Zoom } from '@material-ui/core'
import KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp'

const useStyles = makeStyles((theme) => ({
  root: {
    position: 'fixed',
    bottom: theme.spacing(2),
    right: theme.spacing(2)
  }
}))

const ScrollTop = (): ReactElement => {
  const classes = useStyles()
  const trigger = useScrollTrigger({
    target: window,
    disableHysteresis: true,
    threshold: 100
  })

  const handleClick = () => {
    window.scrollTo({ top: 0, behavior: 'smooth' })
  }

  return (
    <Zoom in={trigger}>
      <div onClick={handleClick} role="presentation" className={classes.root}>
        <Fab color="default" size="small" aria-label="scroll back to top">
          <KeyboardArrowUpIcon />
        </Fab>
      </div>
    </Zoom>
  )
}

export default ScrollTop


================================================
FILE: src/components/SkipToLinks.tsx
================================================
import { ReactElement } from 'react'
import {
  makeStyles,
  Link,
  Theme,
  Typography,
  useMediaQuery
} from '@material-ui/core'

type Props = {
  prefersDarkMode: boolean
}

const useStyles = makeStyles<Theme, Props>((theme: Theme) => ({
  root: {
    position: 'absolute',
    display: 'flex',
    top: 0,
    left: 0,
    zIndex: 1201
  },
  container: {
    alignItems: 'center',
    display: 'flex',
    overflow: 'hidden'
  },
  main: ({ prefersDarkMode }) => ({
    '&:not(:focus)': {
      position: 'absolute',
      clip: 'rect(1px, 1px, 1px, 1px)',
      overflow: 'hidden',
      padding: 0
    },
    '&:focus': {
      borderRadius: 2,
      color: prefersDarkMode ? 'white' : 'rgba(0, 0, 0, 0.54)',
      backgroundColor: prefersDarkMode ? '#303030' : 'white',
      border: `1px solid ${theme.palette.primary.main}`,
      cursor: 'pointer',
      display: 'inline-block',
      margin: 12,
      minHeight: 32,
      textAlign: 'center',
      width: 130,
      padding: 12
    }
  })
}))

const SkipToLinks = (): ReactElement => {
  const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)')

  const classes = useStyles({ prefersDarkMode })

  return (
    <div className={classes.root}>
      <div className={classes.container}>
        <Link
          className={classes.main}
          tabIndex={0}
          onClick={() => {
            document.getElementsByTagName('main')[0].focus()
          }}
          onKeyDown={(e) => {
            if (e.key === 'Enter') {
              document.getElementsByTagName('main')[0].focus()
            }
          }}
        >
          <Typography>Skip to main content</Typography>
        </Link>
      </div>
    </div>
  )
}

export default SkipToLinks


================================================
FILE: src/components/Summary.tsx
================================================
import { ReactElement } from 'react'
import {
  Avatar,
  Box,
  Grid,
  List,
  Typography,
  TableContainer,
  Table,
  TableBody,
  TableRow,
  TableCell,
  Accordion,
  AccordionSummary,
  AccordionDetails
} from '@material-ui/core'
import { YearsTaxesState } from 'ustaxes/redux'
import { TaxYear } from 'ustaxes/core/data'
import { Check, Close, ExpandMore } from '@material-ui/icons'
import Alert from '@material-ui/lab/Alert'
import { useSelector } from 'react-redux'
import { createSummary, SummaryData } from './SummaryData'
import { Currency } from './input'
import { displayRound } from 'ustaxes/core/irsForms/util'
import StateForm from 'ustaxes/core/stateForms/Form'
import Form from 'ustaxes/core/irsForms/Form'
interface BinaryStateListItemProps {
  active: boolean
  children: string | ReactElement | ReactElement[]
}

const BinaryStateListItem = ({
  active,
  children
}: BinaryStateListItemProps): ReactElement => {
  return (
    <Grid container spacing={3}>
      <Grid item style={{ margin: 'auto' }}>
        <Avatar>
          {active ? (
            <Check titleAccess="Eligible" />
          ) : (
            <Close titleAccess="Ineligible" />
          )}
        </Avatar>
      </Grid>
      <Grid item xs zeroMinWidth>
        {children}
      </Grid>
    </Grid>
  )
}

interface F1040SummaryProps {
  summary: SummaryData
}

const F1040Summary = ({ summary }: F1040SummaryProps): ReactElement => (
  <>
    {(() => {
      if (summary.amountOwed !== undefined && summary.amountOwed > 0) {
        return (
          <div>
            <Typography variant="body2" color="textSecondary">
              Amount Owed: <Currency value={-summary.amountOwed} />
            </Typography>
          </div>
        )
      }
      if (summary.refundAmount !== undefined && summary.refundAmount > 0) {
        return (
          <div>
            <Typography variant="body2" color="textSecondary">
              Refund Amount: <Currency value={summary.refundAmount} />
            </Typography>
          </div>
        )
      }
    })()}

    <h3>Credits</h3>
    <Grid container>
      <Grid item zeroMinWidth>
        <List>
          {summary.credits.map((credit) => (
            <BinaryStateListItem key={credit.name} active={credit.allowed}>
              <Typography variant="body2" color="textPrimary">
                {credit.name}
              </Typography>
              {(() => {
                if (credit.value !== undefined) {
                  return (
                    <Typography variant="body2" color="textSecondary">
                      Credit: <Currency value={credit.value} />
                    </Typography>
                  )
                }
                return <></>
              })()}
            </BinaryStateListItem>
          ))}
        </List>
      </Grid>
    </Grid>

    {(() => {
      if (summary.worksheets.length > 0) {
        return (
          <Grid container>
            <Grid item zeroMinWidth>
              <h3>Worksheets</h3>
              <List>
                {summary.worksheets.map((worksheet, idx) => (
                  <Accordion key={idx}>
                    <AccordionSummary expandIcon={<ExpandMore />}>
                      {worksheet.name}
                    </AccordionSummary>
                    <AccordionDetails>
                      <TableContainer>
                        <Table size="small">
                          <TableBody>
                            {worksheet.lines.map((line) => (
                              <TableRow key={line.line}>
                                <TableCell component="th">
                                  Line {line.line}
                                </TableCell>
                                <TableCell>
                                  {typeof line.value === 'number' ? (
                                    <Currency
                                      value={displayRound(line.value) ?? 0}
                                    />
                                  ) : (
                                    line.value
                                  )}
                                </TableCell>
                              </TableRow>
                            ))}
                          </TableBody>
                        </Table>
                      </TableContainer>
                    </AccordionDetails>
                  </Accordion>
                ))}
              </List>
            </Grid>
          </Grid>
        )
      }
      return <></>
    })()}
  </>
)

interface SummaryProps {
  errors: string[]
  stateErrors?: string[]
  irsForms: Form[]
  stateForms?: StateForm[]
}

const Summary = ({ errors, irsForms }: SummaryProps): ReactElement => {
  const year: TaxYear = useSelector(
    (state: YearsTaxesState) => state.activeYear
  )

  const summaryBody = (
    <>
      <h3>Federal</h3>
      {(() => {
        if (errors.length > 0) {
          return (
            <Box marginBottom={2}>
              {errors.map((error, i) => (
                <Alert key={i} severity="warning">
                  {error}
                </Alert>
              ))}
            </Box>
          )
        } else {
          const summary = createSummary(year, irsForms)
          if (summary === undefined) {
            return undefined
          }
          return <F1040Summary summary={summary} />
        }
      })()}
    </>
  )

  return (
    <div>
      <h2>Summary</h2>
      {summaryBody}
    </div>
  )
}

export default Summary


================================================
FILE: src/components/SummaryData.ts
================================================
import Form from 'ustaxes/core/irsForms/Form'
import { TaxYear } from 'ustaxes/core/data'
import F1040For2020 from 'ustaxes/forms/Y2020/irsForms/F1040'
import F1040For2021 from 'ustaxes/forms/Y2021/irsForms/F1040'

interface Credit {
  name: string
  value?: number
  notes?: string
  allowed: boolean
}

export interface WorksheetLine {
  line: number | string
  value: string | number | undefined
}
export interface WorksheetData {
  name: string
  lines: WorksheetLine[]
}

export interface SummaryData {
  credits: Credit[]
  worksheets: WorksheetData[]
  refundAmount?: number
  amountOwed?: number
}

interface SummaryCreator<A> {
  summary: (a: A) => SummaryData
}

const emptySummary = {
  credits: [],
  worksheets: []
}

export const SummaryCreatorFor2020: SummaryCreator<F1040For2020> = {
  summary: (f: F1040For2020): SummaryData => ({
    credits: [
      {
        name: 'Earned Income Credit',
        value: f.scheduleEIC.credit(),
        allowed: f.scheduleEIC.allowed()
      },
      {
        name: 'Children and Other Dependents',
        value: f.childTaxCreditWorksheet.credit(),
        allowed: f.childTaxCreditWorksheet.isAllowed()
      }
    ],
    worksheets: [],
    refundAmount: f.l35a(),
    amountOwed: f.l37()
  })
}

export const SummaryCreatorFor2021: SummaryCreator<F1040For2021> = {
  summary: (f: F1040For2021): SummaryData => ({
    credits: [
      {
        name: 'Earned income credit',
        value: f.scheduleEIC.credit(),
        allowed: f.scheduleEIC.allowed()
      }
    ],
    worksheets: [
      ...(f.qualifiedAndCapGainsWorksheet !== undefined
        ? [f.qualifiedAndCapGainsWorksheet.getSummaryData()]
        : [])
    ],
    refundAmount: f.l35a(),
    amountOwed: f.l37()
  })
}

export const createSummary = (
  year: TaxYear,
  forms: Form[]
): SummaryData | undefined => {
  const f1040 = forms.find((f) => f.tag === 'f1040')
  if (f1040 === undefined) {
    return undefined
  }

  switch (year) {
    case 'Y2019': {
      return emptySummary
    }
    case 'Y2020': {
      return SummaryCreatorFor2020.summary(f1040 as F1040For2020)
    }
    case 'Y2021': {
      return SummaryCreatorFor2021.summary(f1040 as F1040For2021)
    }
  }
}


================================================
FILE: src/components/TaxPayer/Address.tsx
================================================
import { ReactElement } from 'react'
import { useFormContext, useWatch } from 'react-hook-form'
import {
  LabeledCheckbox,
  LabeledInput,
  USStateDropDown
} from 'ustaxes/components/input'
import { CountryDropDown } from 'ustaxes/components/input/LabeledDropdown'
import { Patterns } from 'ustaxes/components/Patterns'

interface AddressProps {
  autofocus?: boolean
  checkboxText: string
  allowForeignCountry?: boolean
}

export default function AddressFields(props: AddressProps): ReactElement {
  const {
    autofocus,
    checkboxText = 'Check if you have a foreign address',
    allowForeignCountry = true
  } = props

  const { control } = useFormContext<{ isForeignCountry: boolean }>()

  const isForeignCountry = useWatch({
    name: 'isForeignCountry',
    control
  })

  const csz: ReactElement = (() => {
    if (!allowForeignCountry || !isForeignCountry) {
      return (
        <>
          <USStateDropDown
            label="State"
            name="address.state"
            required={!isForeignCountry}
          />
          <LabeledInput
            label="Zip"
            name="address.zip"
            patternConfig={Patterns.zip}
            required={!isForeignCountry}
          />
        </>
      )
    }
    return (
      <>
        <LabeledInput
          label="Province"
          name="address.province"
          required={isForeignCountry}
        />
        <LabeledInput
          name="address.postalCode"
          label="Postal Code"
          required={isForeignCountry}
        />
        <CountryDropDown
          name="address.foreignCountry"
          label="Country"
          required={isForeignCountry}
        />
      </>
    )
  })()

  return (
    <>
      <LabeledInput
        autofocus={autofocus}
        label="Address"
        name="address.address"
        required={true}
      />
      <LabeledInput label="Unit No" name="address.aptNo" required={false} />
      <LabeledInput
        label="City"
        name="address.city"
        patternConfig={Patterns.name}
      />
      {(() => {
        if (allowForeignCountry) {
          return (
            <LabeledCheckbox label={checkboxText} name="isForeignCountry" />
          )
        }
      })()}
      {csz}
    </>
  )
}


================================================
FILE: src/components/TaxPayer/PersonFields.tsx
================================================
import { PropsWithChildren, ReactElement } from 'react'
import {
  IconButton,
  List,
  ListItem,
  ListItemIcon,
  ListItemSecondaryAction
} from '@material-ui/core'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'
import {
  formatSSID,
  LabeledInput,
  LabeledCheckbox,
  DatePicker
} from 'ustaxes/components/input'
import { Patterns } from 'ustaxes/components/Patterns'
import { removeDependent } from 'ustaxes/redux/actions'
import { Person } from 'ustaxes/core/data'
import DeleteIcon from '@material-ui/icons/Delete'
import EditIcon from '@material-ui/icons/Edit'
import ListItemText from '@material-ui/core/ListItemText'
import PersonIcon from '@material-ui/icons/Person'

export const labels = {
  fname: 'First Name and Initial',
  lname: 'Last Name',
  dateOfBirth: 'Date of Birth',
  ssn: 'SSN / TIN'
}

export const PersonFields = ({
  children,
  autofocus
}: PropsWithChildren<{ autofocus?: boolean }>): ReactElement => {
  return (
    <>
      <LabeledInput
        autofocus={autofocus}
        label={labels.fname}
        name="firstName"
        required={true}
      />
      <LabeledInput label={labels.lname} name="lastName" required={true} />
      <LabeledInput
        label={labels.ssn}
        name="ssid"
        patternConfig={Patterns.ssn}
      />
      <LabeledCheckbox label="Is this person blind?" name="isBlind" />
      <DatePicker
        name="dateOfBirth"
        label={labels.dateOfBirth}
        required={true}
        minDate={new Date(1900, 0, 1)}
        maxDate={new Date()}
      />
      {children}
    </>
  )
}

interface PersonListItemProps {
  person: Person
  remove: () => void
  onEdit?: () => void
  editing?: boolean
}

export const PersonListItem = ({
  person,
  remove,
  onEdit,
  editing = false
}: PersonListItemProps): ReactElement => (
  <ListItem className={editing ? 'active' : ''}>
    <ListItemIcon>
      <PersonIcon />
    </ListItemIcon>
    <ListItemText
      primary={`${person.firstName} ${person.lastName}`}
      secondary={formatSSID(person.ssid)}
    />
    {(() => {
      if (editing) {
        return (
          <ListItemIcon>
            <IconButton onClick={onEdit} edge="end" aria-label="edit">
              <EditIcon />
            </IconButton>
          </ListItemIcon>
        )
      }
    })()}
    <ListItemSecondaryAction>
      <IconButton onClick={remove} edge="end" aria-label="delete">
        <DeleteIcon />
      </IconButton>
    </ListItemSecondaryAction>
  </ListItem>
)

interface ListDependentsProps {
  onEdit?: (index: number) => void
  editing?: number
}

export function ListDependents({
  onEdit = () => {
    /* default do nothing */
  },
  editing
}: ListDependentsProps): ReactElement {
  const dependents = useSelector(
    (state: TaxesState) => state.information.taxPayer.dependents
  )

  const dispatch = useDispatch()

  const drop = (i: number): void => dispatch(removeDependent(i))

  return (
    <List dense={true}>
      {dependents.map((p, i) => (
        <PersonListItem
          key={i}
          remove={() => drop(i)}
          person={p}
          editing={editing === i}
          onEdit={() => onEdit(i)}
        />
      ))}
    </List>
  )
}


================================================
FILE: src/components/TaxPayer/SpouseAndDependent.tsx
================================================
import { ReactElement, useEffect, useState } from 'react'
import { Helmet } from 'react-helmet'
import { useForm, FormProvider } from 'react-hook-form'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'
import { Patterns } from 'ustaxes/components/Patterns'
import {
  LabeledInput,
  LabeledCheckbox,
  formatSSID,
  GenericLabeledDropdown
} from 'ustaxes/components/input'
import {
  TaxPayer,
  Dependent,
  Spouse,
  PersonRole,
  FilingStatus,
  FilingStatusTexts,
  filingStatuses
} from 'ustaxes/core/data'
import {
  addDependent,
  addSpouse,
  editDependent,
  removeDependent,
  removeSpouse,
  saveFilingStatusInfo
} from 'ustaxes/redux/actions'
import { PersonFields } from './PersonFields'
import { FormListContainer } from 'ustaxes/components/FormContainer'
import { usePager } from 'ustaxes/components/pager'
import { Box, Grid } from '@material-ui/core'
import { Person } from '@material-ui/icons'
import { Alert } from '@material-ui/lab'
import { intentionallyFloat } from 'ustaxes/core/util'

interface UserPersonForm {
  firstName: string
  lastName: string
  ssid: string
  isBlind: boolean
  dateOfBirth?: Date
}

const blankUserPersonForm: UserPersonForm = {
  firstName: '',
  lastName: '',
  ssid: '',
  isBlind: false,
  dateOfBirth: undefined
}

interface UserDependentForm extends UserPersonForm {
  relationship: string
  isStudent: boolean
  numberOfMonths: string
}

const blankUserDependentForm: UserDependentForm = {
  ...blankUserPersonForm,
  relationship: '',
  isStudent: false,
  numberOfMonths: ''
}

const toDependent = (formData: UserDependentForm): Dependent<string> => {
  const { isStudent, numberOfMonths, ...rest } = formData
  if (formData.dateOfBirth === undefined) {
    throw new Error('Called with undefined date of birth')
  }

  return {
    ...rest,
    role: PersonRole.DEPENDENT,
    qualifyingInfo: {
      numberOfMonths: parseInt(numberOfMonths),
      isStudent
    },
    dateOfBirth: formData.dateOfBirth.toISOString()
  }
}

const toDependentForm = (dependent: Dependent): UserDependentForm => {
  const { qualifyingInfo, dateOfBirth, ...rest } = dependent

  return {
    ...rest,
    numberOfMonths: qualifyingInfo?.numberOfMonths.toString() ?? '',
    isStudent: qualifyingInfo?.isStudent ?? false,
    dateOfBirth
  }
}

interface UserSpouseForm extends UserPersonForm {
  isTaxpayerDependent: boolean
}

const blankUserSpouseForm = {
  ...blankUserPersonForm,
  isTaxpayerDependent: false
}

const toSpouse = (formData: UserSpouseForm): Spouse<string> => {
  if (formData.dateOfBirth === undefined) {
    throw new Error('Called with undefined date of birth')
  }

  return {
    ...formData,
    role: PersonRole.SPOUSE,
    dateOfBirth: formData.dateOfBirth.toISOString()
  }
}

const toSpouseForm = (spouse: Spouse): UserSpouseForm => ({
  ...spouse,
  dateOfBirth: new Date(spouse.dateOfBirth)
})

export const AddDependentForm = (): ReactElement => {
  const dependents = useSelector(
    (state: TaxesState) => state.information.taxPayer.dependents
  )

  const defaultValues = blankUserDependentForm

  const dispatch = useDispatch()

  const methods = useForm<UserDependentForm>({
    defaultValues
  })

  const onSubmitAdd = (formData: UserDependentForm): void => {
    dispatch(addDependent(toDependent(formData)))
  }

  const onSubmitEdit =
    (index: number) =>
    (formData: UserDependentForm): void => {
      dispatch(
        editDependent({
          index,
          value: toDependent(formData)
        })
      )
    }

  const page = (
    <FormListContainer<UserDependentForm>
      defaultValues={defaultValues}
      onSubmitAdd={onSubmitAdd}
      onSubmitEdit={onSubmitEdit}
      items={dependents.map((a) => toDependentForm(a))}
      primary={(a) => `${a.firstName} ${a.lastName}`}
      secondary={(a) => formatSSID(a.ssid)}
      icon={() => <Person />}
      removeItem={(i) => dispatch(removeDependent(i))}
    >
      <Grid container spacing={2}>
        <PersonFields />
        <LabeledInput
          label="Relationship to Taxpayer"
          name="relationship"
          patternConfig={Patterns.name}
        />
        <LabeledInput
          label="How many months did you live together this year?"
          patternConfig={Patterns.numMonths}
          name="numberOfMonths"
        />
        <LabeledCheckbox
          label="Is this person a full-time student?"
          name="isStudent"
        />
      </Grid>
    </FormListContainer>
  )

  return <FormProvider {...methods}>{page}</FormProvider>
}

export const SpouseInfo = (): ReactElement => {
  const defaultValues = blankUserSpouseForm
  const methods = useForm<UserSpouseForm>({
    defaultValues
  })
  const { getValues } = methods
  const dispatch = useDispatch()

  const spouse: Spouse | undefined = useSelector((state: TaxesState) => {
    return state.information.taxPayer.spouse
  })

  const onSubmit = (): void => {
    dispatch(addSpouse(toSpouse(getValues())))
  }

  const onSubmitEdit = (): (() => void) => onSubmit

  const page = (
    <FormListContainer
      defaultValues={defaultValues}
      items={spouse !== undefined ? [toSpouseForm(spouse)] : []}
      primary={(s) => `${s.firstName} ${s.lastName}`}
      secondary={(s) => formatSSID(s.ssid)}
      icon={() => <Person />}
      onSubmitAdd={onSubmit}
      onSubmitEdit={onSubmitEdit}
      max={1}
      removeItem={() => dispatch(removeSpouse)}
    >
      <Grid container spacing={2}>
        <PersonFields autofocus={true}>
          <LabeledCheckbox
            label="Check if your spouse is a dependent"
            name="isTaxpayerDependent"
          />
        </PersonFields>
      </Grid>
    </FormListContainer>
  )

  return <FormProvider {...methods}>{page}</FormProvider>
}

export const FilingStatusDropdown = (): ReactElement => {
  const dispatch = useDispatch()

  const onSubmit = (formData: { filingStatus: FilingStatus }): void => {
    dispatch(saveFilingStatusInfo(formData.filingStatus))
    onAdvance()
  }
  const taxPayer: TaxPayer | undefined = useSelector((state: TaxesState) => {
    return state.information.taxPayer
  })

  const allowedFilingStatuses = filingStatuses(taxPayer)

  const { onAdvance, navButtons } = usePager()

  const defaultValues: { filingStatus: FilingStatus | '' } = {
    filingStatus: (() => {
      if (
        taxPayer.filingStatus !== undefined &&
        allowedFilingStatuses.includes(taxPayer.filingStatus)
      ) {
        return taxPayer.filingStatus
      }
      return ''
    })()
  }

  const methods = useForm({
    defaultValues
  })

  const [error, setError] = useState<ReactElement | undefined>(undefined)

  const {
    handleSubmit,
    getValues,
    reset,
    watch,
    formState: { isDirty }
  } = methods

  const currentFilingStatus = getValues().filingStatus

  const newValue = watch()

  useEffect(() => {
    // Handle state updates outside this control
    if (!isDirty && currentFilingStatus !== defaultValues.filingStatus) {
      reset(defaultValues)
    }
    // Handle other state updates that cause current
    // value to be invalid
    else if (
      currentFilingStatus !== '' &&
      !allowedFilingStatuses.includes(currentFilingStatus)
    ) {
      reset({})
      setError(
        <Box paddingTop={2}>
          <Alert severity="warning">
            Filing status was set to {FilingStatusTexts[currentFilingStatus]}{' '}
            which is no longer allowed due to your inputs. Make another
            selection.
          </Alert>
        </Box>
      )
    } else if (currentFilingStatus !== '' || newValue.filingStatus !== '') {
      setError(undefined)
    }
  }, [defaultValues.filingStatus, currentFilingStatus])

  return (
    <FormProvider {...methods}>
      <form tabIndex={-1} onSubmit={intentionallyFloat(handleSubmit(onSubmit))}>
        <Box marginBottom={2}>
          <GenericLabeledDropdown<FilingStatus, { filingStatus: FilingStatus }>
            label="Filing Status"
            dropDownData={allowedFilingStatuses}
            valueMapping={(x) => x}
            keyMapping={(x, i) => i}
            textMapping={(status) => FilingStatusTexts[status]}
            name="filingStatus"
          />
        </Box>
        {error}
        {navButtons}
      </form>
    </FormProvider>
  )
}

const SpouseAndDependent = (): ReactElement => (
  <>
    <Helmet>
      <title>Family Information | Personal | UsTaxes.org</title>
    </Helmet>
    <h2>Family Information</h2>
    <h3>Spouse Information</h3>
    <SpouseInfo />

    <h3>Dependent Information</h3>
    <AddDependentForm />

    <FilingStatusDropdown />
  </>
)

export default SpouseAndDependent


================================================
FILE: src/components/TaxPayer/TaxPayer.tsx
================================================
import { ReactElement, useEffect } from 'react'
import { Helmet } from 'react-helmet'
import { FormProvider, useForm } from 'react-hook-form'
import _ from 'lodash'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'

import {
  savePrimaryPersonInfo,
  saveStateResidencyInfo,
  saveContactInfo
} from 'ustaxes/redux/actions'
import {
  Address,
  ContactInfo,
  PersonRole,
  PrimaryPerson,
  State,
  StateResidency,
  TaxPayer
} from 'ustaxes/core/data'
import { PersonFields } from './PersonFields'
import { usePager } from 'ustaxes/components/pager'
import {
  LabeledCheckbox,
  USStateDropDown,
  LabeledInput
} from 'ustaxes/components/input'
import AddressFields from './Address'
import { Grid } from '@material-ui/core'
import { Patterns } from 'ustaxes/components/Patterns'
import { intentionallyFloat } from 'ustaxes/core/util'

interface TaxPayerUserForm {
  firstName: string
  lastName: string
  ssid: string
  contactPhoneNumber?: string
  contactEmail?: string
  role: PersonRole
  address: Address
  isForeignCountry: boolean
  isTaxpayerDependent: boolean
  stateResidency?: State
  isBlind: boolean
  dateOfBirth?: Date
}

const defaultTaxpayerUserForm: TaxPayerUserForm = {
  firstName: '',
  lastName: '',
  ssid: '',
  contactPhoneNumber: '',
  contactEmail: '',
  role: PersonRole.PRIMARY,
  isForeignCountry: false,
  address: {
    address: '',
    city: '',
    aptNo: '',
    state: undefined,
    zip: undefined
  },
  isTaxpayerDependent: false,
  isBlind: false,
  dateOfBirth: undefined
}

const asPrimaryPerson = (formData: TaxPayerUserForm): PrimaryPerson<string> => {
  if (formData.dateOfBirth === undefined) {
    throw new Error('Called with undefined date of birth')
  }
  return {
    address: formData.address,
    firstName: formData.firstName,
    lastName: formData.lastName,
    ssid: formData.ssid.replace(/-/g, ''),
    isTaxpayerDependent: formData.isTaxpayerDependent,
    role: PersonRole.PRIMARY,
    dateOfBirth: formData.dateOfBirth.toISOString(),
    isBlind: formData.isBlind
  }
}

const asContactInfo = (formData: TaxPayerUserForm): ContactInfo => ({
  contactPhoneNumber: formData.contactPhoneNumber,
  contactEmail: formData.contactEmail
})

const asTaxPayerUserForm = (person: PrimaryPerson): TaxPayerUserForm => ({
  ...person,
  isForeignCountry: person.address.foreignCountry !== undefined,
  role: PersonRole.PRIMARY,
  dateOfBirth: new Date(person.dateOfBirth)
})

export default function PrimaryTaxpayer(): ReactElement {
  // const variable dispatch to allow use inside function
  const dispatch = useDispatch()

  const { onAdvance, navButtons } = usePager()

  const taxPayer: TaxPayer | undefined = useSelector((state: TaxesState) => {
    return state.information.taxPayer
  })

  const stateResidency: StateResidency[] = useSelector(
    (state: TaxesState) => state.information.stateResidencies
  )

  const newTpForm: TaxPayerUserForm = {
    ...defaultTaxpayerUserForm,
    ...(taxPayer.primaryPerson !== undefined
      ? {
          ...asTaxPayerUserForm(taxPayer.primaryPerson),
          contactPhoneNumber: taxPayer.contactPhoneNumber,
          contactEmail: taxPayer.contactEmail,
          stateResidency:
            stateResidency[0]?.state ?? taxPayer.primaryPerson.address.state
        }
      : {})
  }

  const methods = useForm<TaxPayerUserForm>({
    defaultValues: newTpForm
  })

  const {
    handleSubmit,
    getValues,
    reset,
    formState: { isDirty }
  } = methods

  // This form can be rerendered because the global state was modified by
  // another control.
  const currentValues = { ...defaultTaxpayerUserForm, ...getValues() }

  useEffect(() => {
    if (!isDirty && !_.isEqual(currentValues, newTpForm)) {
      return reset(newTpForm)
    }
  })

  const onSubmit = (form: TaxPayerUserForm): void => {
    dispatch(savePrimaryPersonInfo(asPrimaryPerson(form)))
    dispatch(saveContactInfo(asContactInfo(form)))
    dispatch(saveStateResidencyInfo({ state: form.stateResidency as State }))
    onAdvance()
  }

  const page = (
    <form tabIndex={-1} onSubmit={intentionallyFloat(handleSubmit(onSubmit))}>
      <Helmet>
        <title>Primary Taxpayer Information | Personal | UsTaxes.org</title>
      </Helmet>
      <h2>Primary Taxpayer Information</h2>
      <Grid container spacing={2}>
        <PersonFields />
        <LabeledInput
          label="Contact phone number"
          patternConfig={Patterns.usPhoneNumber}
          name="contactPhoneNumber"
        />
        <LabeledInput
          label="Contact email address"
          required={true}
          name="contactEmail"
        />
        <LabeledCheckbox
          label="Check if you are a dependent"
          name="isTaxpayerDependent"
        />
        <AddressFields checkboxText="Do you have a foreign address?" />
        <USStateDropDown label="Residency State" name="stateResidency" />
      </Grid>
      {navButtons}
    </form>
  )
  return <FormProvider {...methods}>{page}</FormProvider>
}


================================================
FILE: src/components/TaxPayer/index.tsx
================================================
import TaxPayer from './TaxPayer'
export default TaxPayer


================================================
FILE: src/components/UserSettings.tsx
================================================
import { Check } from '@material-ui/icons'
import { ReactElement, useState } from 'react'
import { useDispatch } from 'react-redux'
import { fsRecover } from 'ustaxes/redux/fs/Actions'
import { LoadRaw } from 'ustaxes/redux/fs/Load'
import SaveToFile from './SaveToFile'

const UserSettings = (): ReactElement => {
  const dispatch = useDispatch()
  const [done, setDone] = useState(false)

  return (
    <>
      <h2>User Settings</h2>
      <h3>Save data</h3>
      <p>Save your data for backup or to import into desktop application</p>
      <SaveToFile variant="contained" color="primary">
        Save data to file
      </SaveToFile>
      <h3>Load data</h3>
      <p>
        Load your saved data from a file. Warning, this will overwrite present
        state.
      </p>
      <LoadRaw
        startIcon={done ? <Check /> : undefined}
        accept="*.json"
        handleData={(state) => {
          if (!done) {
            dispatch(fsRecover(state))
            setDone(true)
          }
        }}
        variant="contained"
        color="primary"
      >
        Load
      </LoadRaw>
    </>
  )
}

export default UserSettings


================================================
FILE: src/components/Y2021/AdvanceChildTaxCredit.tsx
================================================
import { ReactElement } from 'react'
import { Grid } from '@material-ui/core'
import { FormProvider, useForm } from 'react-hook-form'
import { Credit, CreditType, Person, PersonRole } from 'ustaxes/core/data'
import { useDispatch, useSelector } from 'ustaxes/redux'
import { addCredit, editCredit } from 'ustaxes/redux/actions'
import { FormListContainer } from '../FormContainer'
import { Currency, GenericLabeledDropdown, LabeledInput } from '../input'
import { usePager } from '../pager'
import { Patterns } from '../Patterns'

interface CreditUserInput {
  recipient: PersonRole
  amount: string
}

const blankCreditUserInput: Partial<CreditUserInput> = {
  amount: ''
}

const toCredit = (u: CreditUserInput): Credit => {
  const amount = parseFloat(u.amount)
  return {
    type: CreditType.AdvanceChildTaxCredit,
    amount,
    recipient: u.recipient
  }
}

const toCreditUserInput = (c: Credit): CreditUserInput => {
  return {
    ...blankCreditUserInput,
    ...c,
    amount: c.amount.toFixed(2)
  }
}

export const AdvanceChildTaxCredit = (): ReactElement => {
  const defaultValues = blankCreditUserInput
  const credits = useSelector(({ information }) => information.credits)
  const taxPayer = useSelector(({ information }) => information.taxPayer)
  const spouse = taxPayer.spouse

  const blank = { firstName: '', lastName: '' }
  const { firstName: primaryFirst, lastName: primaryLast } =
    taxPayer.primaryPerson ?? blank
  const { firstName: spouseFirst, lastName: spouseLast } =
    taxPayer.spouse ?? blank

  const primaryName = `${primaryFirst} ${primaryLast}`
  const spouseName = `${spouseFirst} ${spouseLast}`

  const { navButtons, onAdvance } = usePager()

  const advanceChildTaxCredits = credits
    .map<[number, Credit]>((c, i) => [i, c])
    .filter(([, c]) => c.type === CreditType.AdvanceChildTaxCredit)

  const dispatch = useDispatch()

  const methods = useForm<CreditUserInput>({
    defaultValues
  })

  const onSubmitAdd = (formData: CreditUserInput): void => {
    dispatch(addCredit(toCredit(formData)))
  }

  const onSubmitEdit =
    (index: number) =>
    (formData: CreditUserInput): void => {
      dispatch(editCredit({ index, value: toCredit(formData) }))
    }

  // People for recipient selector
  const people: Person[] = [taxPayer.primaryPerson, spouse].flatMap((p) =>
    p !== undefined ? [p as Person] : []
  )

  return (
    <FormProvider {...methods}>
      <h2>Advance Child Tax Credit Payments</h2>
      <p>
        Enter the advance Child Tax Credit payments you received, if any,
        indicated on Letter 6419.
      </p>
      <FormListContainer<CreditUserInput>
        defaultValues={defaultValues}
        primary={(c) =>
          c.recipient === PersonRole.PRIMARY ? primaryName : spouseName
        }
        secondary={(c) => <Currency value={parseFloat(c.amount)} />}
        items={advanceChildTaxCredits.map(([, c]) => toCreditUserInput(c))}
        onSubmitAdd={onSubmitAdd}
        onSubmitEdit={onSubmitEdit}
      >
        <Grid container direction="column" spacing={2}>
          <LabeledInput
            label="Amount"
            name="amount"
            patternConfig={Patterns.currency}
          />
          <GenericLabeledDropdown
            dropDownData={people}
            label="Recipient"
            required={true}
            valueMapping={(p: Person, i: number) =>
              [PersonRole.PRIMARY, PersonRole.SPOUSE][i]
            }
            name="recipient"
            keyMapping={(p: Person, i: number) => i}
            textMapping={(p) => `${p.firstName} ${p.lastName}`}
          />
        </Grid>
      </FormListContainer>
      <form onSubmit={onAdvance}>{navButtons}</form>
    </FormProvider>
  )
}


================================================
FILE: src/components/YearDropDown.tsx
================================================
import { Button, Grid } from '@material-ui/core'
import { ReactElement } from 'react'
import { FormProvider, useForm } from 'react-hook-form'
import { useSelector } from 'react-redux'
import { setActiveYear } from 'ustaxes/redux/actions'
import { YearsTaxesState, useDispatch } from 'ustaxes/redux'
import { enumKeys, intentionallyFloat } from 'ustaxes/core/util'
import { GenericLabeledDropdown } from './input'
import { TaxYear, TaxYears } from 'ustaxes/core/data'

interface YearForm {
  year: TaxYear
}

interface YearDropProps {
  onDone?: () => void
}

const YearDropDown = (props: YearDropProps): ReactElement => {
  const {
    onDone = () => {
      // default do nothing
    }
  } = props
  const year = useSelector((state: YearsTaxesState) => state.activeYear)
  const methods = useForm<YearForm>({
    defaultValues: { year }
  })

  const { handleSubmit, watch } = methods

  const selected = watch('year')
  const dirty = selected !== year

  const dispatch = useDispatch()

  const onSubmit = ({ year }: YearForm) => {
    dispatch(setActiveYear(year))
    onDone()
  }

  return (
    <FormProvider {...methods}>
      <Grid container spacing={1} alignItems="center">
        <GenericLabeledDropdown<TaxYear, YearForm>
          dropDownData={enumKeys(TaxYears)}
          name="year"
          label="Select Tax Year"
          valueMapping={(x) => x}
          keyMapping={(x) => x}
          textMapping={(x) => `${TaxYears[x]}`}
          sizes={{ xs: 9 }}
        />
        <Grid item>
          <Button
            variant="contained"
            color={dirty ? 'primary' : 'secondary'}
            onClick={intentionallyFloat(handleSubmit(onSubmit))}
          >
            Update
          </Button>
        </Grid>
      </Grid>
    </FormProvider>
  )
}

export default YearDropDown


================================================
FILE: src/components/YearStatusBar.tsx
================================================
import { Link } from '@material-ui/core'
import { ReactElement, useState } from 'react'
import { useSelector } from 'react-redux'
import { YearsTaxesState } from 'ustaxes/redux'
import { TaxYears } from 'ustaxes/core/data'
import YearDropDown from './YearDropDown'

const YearStatusBar = (): ReactElement => {
  const year = useSelector((state: YearsTaxesState) => state.activeYear)
  const [isOpen, setOpen] = useState(false)

  const openButton = (
    <Link
      href=""
      data-testid="year-dropdown-button"
      onClick={(e) => {
        e.preventDefault()
        setOpen(true)
      }}
    >
      {TaxYears[year]}
    </Link>
  )

  return (
    <div>
      <h3>Editing Information for {isOpen ? TaxYears[year] : openButton}</h3>
      {isOpen ? <YearDropDown onDone={() => setOpen(false)} /> : undefined}
    </div>
  )
}

export default YearStatusBar


================================================
FILE: src/components/debug.tsx
================================================
import { ReactElement } from 'react'
import { IconButton, makeStyles } from '@material-ui/core'
import { Star } from '@material-ui/icons'
import fc from 'fast-check'
import { useDispatch, YearsTaxesState } from 'ustaxes/redux'
import { setInfo } from 'ustaxes/redux/actions'
import { Information, TaxYears } from 'ustaxes/core/data'
import * as arbitraries from 'ustaxes/core/tests/arbitraries'
import * as prand from 'pure-rand'
import { useSelector } from 'react-redux'

const useStyles = makeStyles(() => ({
  root: {
    position: 'absolute',
    top: '0px',
    right: '30px'
  },
  button: {}
}))

export const StateLoader = (): ReactElement => {
  if (process.env.NODE_ENV === 'production') {
    return <></>
  }
  const dispatch = useDispatch()
  const year = useSelector((state: YearsTaxesState) => state.activeYear)

  const classes = useStyles()

  const gen = new fc.Random(prand.mersenne(new Date().getMilliseconds()))

  const information = arbitraries.forYear(TaxYears[year]).information()

  const generator = (): Information =>
    information.noShrink().generate(gen).value

  return (
    <div className={classes.root}>
      <IconButton
        className={classes.button}
        onClick={() => dispatch(setInfo(generator()))}
      >
        <Star />
        Seed random state
      </IconButton>
    </div>
  )
}


================================================
FILE: src/components/deductions/F1098eInfo.tsx
================================================
import { ReactElement } from 'react'
import { Helmet } from 'react-helmet'
import { FormProvider, useForm } from 'react-hook-form'
import SchoolIcon from '@material-ui/icons/School'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'
import { add1098e, edit1098e, remove1098e } from 'ustaxes/redux/actions'
import { usePager } from 'ustaxes/components/pager'
import { Currency, LabeledInput } from 'ustaxes/components/input'
import { F1098e } from 'ustaxes/core/data'
import { Patterns } from 'ustaxes/components/Patterns'
import { FormListContainer } from 'ustaxes/components/FormContainer'
import { Grid } from '@material-ui/core'
import { intentionallyFloat } from 'ustaxes/core/util'

const showInterest = (a: F1098e): ReactElement => {
  return <Currency value={a.interest} />
}

interface F1098EUserInput {
  lender: string
  interest: string | number
}

const blankUserInput: F1098EUserInput = {
  lender: '',
  interest: ''
}

const toUserInput = (f: F1098e): F1098EUserInput => ({
  ...blankUserInput,
  lender: f.lender,
  interest: f.interest
})

const toF1098e = (f: F1098EUserInput): F1098e => {
  return {
    lender: f.lender,
    interest: Number(f.interest)
  }
}

export default function F1098eInfo(): ReactElement {
  const f1098es = useSelector((state: TaxesState) => state.information.f1098es)

  const defaultValues: F1098EUserInput = blankUserInput

  const { onAdvance, navButtons } = usePager()

  const methods = useForm<F1098EUserInput>({ defaultValues })
  const { handleSubmit } = methods

  const dispatch = useDispatch()

  const onAdd1098e = (formData: F1098EUserInput): void => {
    dispatch(add1098e(toF1098e(formData)))
  }

  const onEdit1098e =
    (index: number) =>
    (formData: F1098EUserInput): void => {
      dispatch(edit1098e({ value: toF1098e(formData), index }))
    }

  const form: ReactElement | undefined = (
    <FormListContainer
      defaultValues={defaultValues}
      onSubmitAdd={onAdd1098e}
      onSubmitEdit={onEdit1098e}
      items={f1098es.map((a) => toUserInput(a))}
      removeItem={(i) => dispatch(remove1098e(i))}
      primary={(f) => f.lender}
      secondary={(f) => showInterest(toF1098e(f))}
      icon={() => <SchoolIcon />}
    >
      <p>Input data from 1098-E</p>
      <Grid container spacing={2}>
        <LabeledInput
          autofocus={true}
          label="Enter name of Lender"
          required={true}
          name="lender"
        />
        <LabeledInput
          label="Student Interest Paid"
          patternConfig={Patterns.currency}
          name="interest"
        />
      </Grid>
    </FormListContainer>
  )

  return (
    <FormProvider {...methods}>
      <form
        tabIndex={-1}
        onSubmit={intentionallyFloat(handleSubmit(onAdvance))}
      >
        <Helmet>
          <title>1098-E Information | Deductions | UsTaxes.org</title>
        </Helmet>
        <h2>1098-E Information</h2>
        {form}
        {navButtons}
      </form>
    </FormProvider>
  )
}


================================================
FILE: src/components/deductions/ItemizedDeductions.tsx
================================================
import { ReactElement, ReactNode } from 'react'
import { Helmet } from 'react-helmet'
import { FormProvider, useForm } from 'react-hook-form'
import { useDispatch, useSelector, TaxesState } from 'ustaxes/redux'
import { setItemizedDeductions } from 'ustaxes/redux/actions'
import { usePager } from 'ustaxes/components/pager'
import { LabeledInput, LabeledCheckbox } from 'ustaxes/components/input'
import { ItemizedDeductions } from 'ustaxes/core/data'
import { Patterns } from 'ustaxes/components/Patterns'
import { Grid, Box } from '@material-ui/core'
import { Alert } from '@material-ui/lab'
import { intentionallyFloat } from 'ustaxes/core/util'

interface ItemizedDeductionUserInput {
  medicalAndDental: string | number
  stateAndLocalTaxes: string | number
  isSalesTax: boolean
  stateAndLocalRealEstateTaxes: string | number
  stateAndLocalPropertyTaxes: string | number
  interest8a: string | number
  interest8b: string | number
  interest8c: string | number
  interest8d: string | number
  investmentInterest: string | number
  charityCashCheck: string | number
  charityOther: string | number
}

const blankUserInput: ItemizedDeductionUserInput = {
  medicalAndDental: '',
  stateAndLocalTaxes: '',
  isSalesTax: false,
  stateAndLocalRealEstateTaxes: '',
  stateAndLocalPropertyTaxes: '',
  interest8a: '',
  interest8b: '',
  interest8c: '',
  interest8d: '',
  investmentInterest: '',
  charityCashCheck: '',
  charityOther: ''
}

const toUserInput = (f: ItemizedDeductions): ItemizedDeductionUserInput => ({
  ...blankUserInput,
  medicalAndDental: f.medicalAndDental,
  stateAndLocalTaxes: f.stateAndLocalTaxes,
  isSalesTax: f.isSalesTax,
  stateAndLocalRealEstateTaxes: f.stateAndLocalRealEstateTaxes,
  stateAndLocalPropertyTaxes: f.stateAndLocalPropertyTaxes,
  interest8a: f.interest8a,
  interest8b: f.interest8b,
  interest8c: f.interest8c,
  interest8d: f.interest8d,
  investmentInterest: f.investmentInterest,
  charityCashCheck: f.charityCashCheck,
  charityOther: f.charityOther
})

const toItemizedDeductions = (
  f: ItemizedDeductionUserInput
): ItemizedDeductions => {
  return {
    medicalAndDental: Number(f.medicalAndDental),
    stateAndLocalTaxes: Number(f.stateAndLocalTaxes),
    isSalesTax: f.isSalesTax,
    stateAndLocalPropertyTaxes: Number(f.stateAndLocalPropertyTaxes),
    stateAndLocalRealEstateTaxes: Number(f.stateAndLocalRealEstateTaxes),
    interest8a: Number(f.interest8a),
    interest8b: Number(f.interest8b),
    interest8c: Number(f.interest8c),
    interest8d: Number(f.interest8d),
    investmentInterest: Number(f.investmentInterest),
    charityCashCheck: Number(f.charityCashCheck),
    charityOther: Number(f.charityOther)
  }
}

export const ItemizedDeductionsInfo = (): ReactElement => {
  const itemizedDeductions: ItemizedDeductions | undefined = useSelector(
    (state: TaxesState) => {
      return state.information.itemizedDeductions
    }
  )

  const defaultValues: ItemizedDeductionUserInput = {
    ...blankUserInput,
    ...(itemizedDeductions !== undefined ? toUserInput(itemizedDeductions) : {})
  }

  const { onAdvance, navButtons } = usePager()

  const methods = useForm<ItemizedDeductionUserInput>({ defaultValues })
  const { handleSubmit, watch } = methods

  const dispatch = useDispatch()

  const onSubmit = (form: ItemizedDeductionUserInput): void => {
    dispatch(setItemizedDeductions(toItemizedDeductions(form)))
    onAdvance()
  }

  const charityCashCheck: string | number = watch('charityCashCheck')

  const charityWarning: ReactNode = (() => {
    if (Number(charityCashCheck || 0) > 0) {
      return (
        <div>
          <Box marginBottom={3}>
            <Alert className="inner" severity="warning">
              See Pub. 526 to figure the amount of your deduction if any of the
              following applies.
              <br />
              1. Your cash contributions or contributions of ordinary income
              property are more than 30% of the amount on Form 1040 or 1040-SR,
              line 11.
              <br />
              2. Your gifts of capital gain property are more than 20% of the
              amount on Form 1040 or 1040-SR, line 11.
              <br />
              3. You gave gifts of property that increased in value or gave
              gifts of the use of property.
            </Alert>
          </Box>
        </div>
      )
    }
  })()

  // Limit charity to $500
  const currencyMax500Pattern = Object.assign({}, Patterns.currency)
  currencyMax500Pattern.max = 500

  const form: ReactElement | undefined = (
    <div>
      <p>Medical and Dental Expenses</p>
      <Grid container spacing={2}>
        <LabeledInput
          label="Medical and Dental Expenses"
          patternConfig={Patterns.currency}
          name="medicalAndDental"
          required={false}
        />
      </Grid>
      <p>Taxes You Paid</p>
      <Grid container spacing={2}>
        <LabeledInput
         
Download .txt
gitextract_fz9tnrwo/

├── .codecov.yml
├── .dockerignore
├── .eslintignore
├── .eslintrc.js
├── .github/
│   ├── dependabot.yml
│   ├── pull_request_template.md
│   └── workflows/
│       ├── ci.yml
│       └── tauri-release.yml
├── .gitignore
├── .husky/
│   ├── husky.sh
│   └── pre-commit
├── .npmrc
├── .nvmrc
├── .prettierignore
├── .prettierrc.json
├── Dockerfile
├── LICENSE
├── README.md
├── craco.config.js
├── docker-compose.yml
├── docs/
│   ├── ARCHITECTURE.md
│   ├── CODE_OF_CONDUCT.md
│   └── CONTRIBUTING.md
├── notice.js
├── package.json
├── public/
│   ├── _redirects
│   ├── forms/
│   │   ├── Y2020/
│   │   │   └── states/
│   │   │       ├── AK/
│   │   │       │   └── README.md
│   │   │       ├── AL/
│   │   │       │   └── README.md
│   │   │       ├── AR/
│   │   │       │   └── README.md
│   │   │       ├── AZ/
│   │   │       │   └── README.md
│   │   │       ├── CA/
│   │   │       │   └── README.md
│   │   │       ├── CO/
│   │   │       │   └── README.md
│   │   │       ├── CT/
│   │   │       │   └── README.md
│   │   │       ├── DC/
│   │   │       │   └── README.md
│   │   │       ├── DE/
│   │   │       │   └── README.md
│   │   │       ├── FL/
│   │   │       │   └── README.md
│   │   │       ├── GA/
│   │   │       │   └── README.md
│   │   │       ├── HI/
│   │   │       │   └── README.md
│   │   │       ├── IA/
│   │   │       │   └── README.md
│   │   │       ├── ID/
│   │   │       │   └── README.md
│   │   │       ├── IL/
│   │   │       │   └── README.md
│   │   │       ├── IN/
│   │   │       │   └── README.md
│   │   │       ├── KS/
│   │   │       │   └── README.md
│   │   │       ├── KY/
│   │   │       │   └── README.md
│   │   │       ├── LA/
│   │   │       │   └── README.md
│   │   │       ├── MA/
│   │   │       │   └── README.md
│   │   │       ├── MD/
│   │   │       │   └── README.md
│   │   │       ├── ME/
│   │   │       │   └── README.md
│   │   │       ├── MI/
│   │   │       │   └── README.md
│   │   │       ├── MN/
│   │   │       │   └── README.md
│   │   │       ├── MO/
│   │   │       │   └── README.md
│   │   │       ├── MS/
│   │   │       │   └── README.md
│   │   │       ├── MT/
│   │   │       │   └── README.md
│   │   │       ├── NC/
│   │   │       │   └── README.md
│   │   │       ├── ND/
│   │   │       │   └── README.md
│   │   │       ├── NE/
│   │   │       │   └── README.md
│   │   │       ├── NH/
│   │   │       │   └── README.md
│   │   │       ├── NJ/
│   │   │       │   └── README.md
│   │   │       ├── NM/
│   │   │       │   └── README.md
│   │   │       ├── NV/
│   │   │       │   └── README.md
│   │   │       ├── NY/
│   │   │       │   └── README.md
│   │   │       ├── OH/
│   │   │       │   └── README.md
│   │   │       ├── OK/
│   │   │       │   └── README.md
│   │   │       ├── OR/
│   │   │       │   └── README.md
│   │   │       ├── PA/
│   │   │       │   └── README.md
│   │   │       ├── RI/
│   │   │       │   └── README.md
│   │   │       ├── SC/
│   │   │       │   └── README.md
│   │   │       ├── SD/
│   │   │       │   └── README.md
│   │   │       ├── TN/
│   │   │       │   └── README.md
│   │   │       ├── TX/
│   │   │       │   └── README.md
│   │   │       ├── UT/
│   │   │       │   └── README.md
│   │   │       ├── VA/
│   │   │       │   └── README.md
│   │   │       ├── VT/
│   │   │       │   └── README.md
│   │   │       ├── WA/
│   │   │       │   └── README.md
│   │   │       ├── WI/
│   │   │       │   └── README.md
│   │   │       ├── WV/
│   │   │       │   └── README.md
│   │   │       └── WY/
│   │   │           └── README.md
│   │   └── Y2021/
│   │       └── states/
│   │           ├── AK/
│   │           │   └── README.md
│   │           ├── AL/
│   │           │   └── README.md
│   │           ├── AR/
│   │           │   └── README.md
│   │           ├── AZ/
│   │           │   └── README.md
│   │           ├── CA/
│   │           │   └── README.md
│   │           ├── CO/
│   │           │   └── README.md
│   │           ├── CT/
│   │           │   └── README.md
│   │           ├── DC/
│   │           │   └── README.md
│   │           ├── DE/
│   │           │   └── README.md
│   │           ├── FL/
│   │           │   └── README.md
│   │           ├── GA/
│   │           │   └── README.md
│   │           ├── HI/
│   │           │   └── README.md
│   │           ├── IA/
│   │           │   └── README.md
│   │           ├── ID/
│   │           │   └── README.md
│   │           ├── IL/
│   │           │   └── README.md
│   │           ├── IN/
│   │           │   └── README.md
│   │           ├── KS/
│   │           │   └── README.md
│   │           ├── KY/
│   │           │   └── README.md
│   │           ├── LA/
│   │           │   └── README.md
│   │           ├── MA/
│   │           │   └── README.md
│   │           ├── MD/
│   │           │   └── README.md
│   │           ├── ME/
│   │           │   └── README.md
│   │           ├── MI/
│   │           │   └── README.md
│   │           ├── MN/
│   │           │   └── README.md
│   │           ├── MO/
│   │           │   └── README.md
│   │           ├── MS/
│   │           │   └── README.md
│   │           ├── MT/
│   │           │   └── README.md
│   │           ├── NC/
│   │           │   └── README.md
│   │           ├── ND/
│   │           │   └── README.md
│   │           ├── NE/
│   │           │   └── README.md
│   │           ├── NH/
│   │           │   └── README.md
│   │           ├── NJ/
│   │           │   └── README.md
│   │           ├── NM/
│   │           │   └── README.md
│   │           ├── NV/
│   │           │   └── README.md
│   │           ├── NY/
│   │           │   └── README.md
│   │           ├── OH/
│   │           │   └── README.md
│   │           ├── OK/
│   │           │   └── README.md
│   │           ├── OR/
│   │           │   └── README.md
│   │           ├── PA/
│   │           │   └── README.md
│   │           ├── RI/
│   │           │   └── README.md
│   │           ├── SC/
│   │           │   └── README.md
│   │           ├── SD/
│   │           │   └── README.md
│   │           ├── TN/
│   │           │   └── README.md
│   │           ├── TX/
│   │           │   └── README.md
│   │           ├── UT/
│   │           │   └── README.md
│   │           ├── VA/
│   │           │   └── README.md
│   │           ├── VT/
│   │           │   └── README.md
│   │           ├── WA/
│   │           │   └── README.md
│   │           ├── WI/
│   │           │   └── README.md
│   │           ├── WV/
│   │           │   └── README.md
│   │           └── WY/
│   │               └── README.md
│   ├── index.html
│   ├── manifest.json
│   └── robots.txt
├── scripts/
│   ├── build-netlify.sh
│   ├── env.ts
│   ├── formgen.ts
│   └── setup.ts
├── src/
│   ├── App.css
│   ├── App.tsx
│   ├── components/
│   │   ├── ConditionallyWrap.tsx
│   │   ├── CreatePDF.tsx
│   │   ├── DataPropagator.tsx
│   │   ├── FormContainer/
│   │   │   └── Context.tsx
│   │   ├── FormContainer.tsx
│   │   ├── GettingStarted.tsx
│   │   ├── HelpAndFeedback.tsx
│   │   ├── Main.tsx
│   │   ├── Menu.tsx
│   │   ├── NoMatchPage.tsx
│   │   ├── Patterns.ts
│   │   ├── Questions.tsx
│   │   ├── RefundBankAccount.tsx
│   │   ├── ResponsiveDrawer.tsx
│   │   ├── SaveToFile.tsx
│   │   ├── ScrollTop.tsx
│   │   ├── SkipToLinks.tsx
│   │   ├── Summary.tsx
│   │   ├── SummaryData.ts
│   │   ├── TaxPayer/
│   │   │   ├── Address.tsx
│   │   │   ├── PersonFields.tsx
│   │   │   ├── SpouseAndDependent.tsx
│   │   │   ├── TaxPayer.tsx
│   │   │   └── index.tsx
│   │   ├── UserSettings.tsx
│   │   ├── Y2021/
│   │   │   └── AdvanceChildTaxCredit.tsx
│   │   ├── YearDropDown.tsx
│   │   ├── YearStatusBar.tsx
│   │   ├── debug.tsx
│   │   ├── deductions/
│   │   │   ├── F1098eInfo.tsx
│   │   │   └── ItemizedDeductions.tsx
│   │   ├── income/
│   │   │   ├── F1099Info.tsx
│   │   │   ├── OtherInvestments.tsx
│   │   │   ├── PartnershipIncome.tsx
│   │   │   ├── RealEstate.tsx
│   │   │   ├── StockOptions.tsx
│   │   │   ├── W2JobInfo.tsx
│   │   │   └── assets/
│   │   │       ├── AssetSummary.tsx
│   │   │       ├── ConfigurableDataTable.tsx
│   │   │       ├── DataTableStyle.ts
│   │   │       ├── FilteredAssetsTable.tsx
│   │   │       └── TransactionImporter.tsx
│   │   ├── input/
│   │   │   ├── Currency.tsx
│   │   │   ├── DatePicker.tsx
│   │   │   ├── LabeledCheckbox.tsx
│   │   │   ├── LabeledDropdown.tsx
│   │   │   ├── LabeledInput.tsx
│   │   │   ├── LabeledRadio.tsx
│   │   │   ├── boxLabel.tsx
│   │   │   ├── index.ts
│   │   │   ├── styles.ts
│   │   │   └── types.ts
│   │   ├── pager.tsx
│   │   ├── payments/
│   │   │   └── EstimatedTaxes.tsx
│   │   └── savingsAccounts/
│   │       ├── IRA.tsx
│   │       └── healthSavingsAccounts.tsx
│   ├── core/
│   │   ├── data/
│   │   │   ├── anonymize.ts
│   │   │   ├── countries.ts
│   │   │   ├── index.ts
│   │   │   ├── locationPostalCodes.ts
│   │   │   ├── questions.ts
│   │   │   └── validate.ts
│   │   ├── irsForms/
│   │   │   ├── Form.ts
│   │   │   ├── index.ts
│   │   │   └── util.ts
│   │   ├── log.ts
│   │   ├── pdfFiller/
│   │   │   ├── Fill.ts
│   │   │   ├── fillPdf.ts
│   │   │   ├── index.ts
│   │   │   └── pdfHandler.ts
│   │   ├── stateForms/
│   │   │   ├── Form.ts
│   │   │   └── index.ts
│   │   ├── tests/
│   │   │   ├── LocalForms.ts
│   │   │   ├── arbitraries.ts
│   │   │   └── validation.test.ts
│   │   └── util.ts
│   ├── customTypes/
│   │   └── persistStore.d.ts
│   ├── data/
│   │   ├── csvImport.ts
│   │   ├── transactions.ts
│   │   └── urls.ts
│   ├── forms/
│   │   ├── F1040Base.ts
│   │   ├── StateForms.ts
│   │   ├── Y2020/
│   │   │   ├── data/
│   │   │   │   └── federal.ts
│   │   │   ├── irsForms/
│   │   │   │   ├── F1040.ts
│   │   │   │   ├── F1040Attachment.ts
│   │   │   │   ├── F1040v.ts
│   │   │   │   ├── F2441.ts
│   │   │   │   ├── F2555.ts
│   │   │   │   ├── F4136.ts
│   │   │   │   ├── F4137.ts
│   │   │   │   ├── F4563.ts
│   │   │   │   ├── F4797.ts
│   │   │   │   ├── F4952.ts
│   │   │   │   ├── F4972.ts
│   │   │   │   ├── F5695.ts
│   │   │   │   ├── F6168.ts
│   │   │   │   ├── F8582.ts
│   │   │   │   ├── F8814.ts
│   │   │   │   ├── F8853.ts
│   │   │   │   ├── F8863.ts
│   │   │   │   ├── F8888.ts
│   │   │   │   ├── F8889.ts
│   │   │   │   ├── F8910.ts
│   │   │   │   ├── F8919.ts
│   │   │   │   ├── F8936.ts
│   │   │   │   ├── F8949.ts
│   │   │   │   ├── F8959.ts
│   │   │   │   ├── F8960.ts
│   │   │   │   ├── F8962.ts
│   │   │   │   ├── F8995.ts
│   │   │   │   ├── F8995A.ts
│   │   │   │   ├── Main.ts
│   │   │   │   ├── Schedule1.ts
│   │   │   │   ├── Schedule2.ts
│   │   │   │   ├── Schedule3.ts
│   │   │   │   ├── Schedule8812.ts
│   │   │   │   ├── ScheduleA.ts
│   │   │   │   ├── ScheduleB.ts
│   │   │   │   ├── ScheduleC.ts
│   │   │   │   ├── ScheduleD.ts
│   │   │   │   ├── ScheduleE.ts
│   │   │   │   ├── ScheduleEIC.ts
│   │   │   │   ├── ScheduleR.ts
│   │   │   │   ├── ScheduleSE.ts
│   │   │   │   ├── TaxTable.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── worksheets/
│   │   │   │       ├── ChildTaxCreditWorksheet.ts
│   │   │   │       ├── Pub596Worksheet1.ts
│   │   │   │       ├── SDQualifiedAndCapGains.ts
│   │   │   │       ├── SDRateGainWorksheet.ts
│   │   │   │       ├── SDUnrecaptured1250.ts
│   │   │   │       ├── ScheduleDTaxWorksheet.ts
│   │   │   │       ├── SocialSecurityBenefits.ts
│   │   │   │       └── StudentLoanInterestWorksheet.ts
│   │   │   ├── stateForms/
│   │   │   │   ├── AK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AR/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AZ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── FL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── GA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── HI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ID/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IL/
│   │   │   │   │   ├── IL1040.ts
│   │   │   │   │   ├── IL1040ScheduleILEIC.ts
│   │   │   │   │   ├── IL1040V.ts
│   │   │   │   │   ├── ILWit.ts
│   │   │   │   │   └── Parameters.ts
│   │   │   │   ├── IN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── LA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ME/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ND/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NJ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NM/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OR/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── PA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── RI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TX/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── UT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WY/
│   │   │   │   │   └── Form.ts
│   │   │   │   └── index.ts
│   │   │   └── tests/
│   │   │       ├── ScheduleD.test.ts
│   │   │       ├── ScheduleEIC.test.ts
│   │   │       ├── f1040.test.ts
│   │   │       ├── f8889.test.ts
│   │   │       ├── f8949.test.ts
│   │   │       ├── fica.test.ts
│   │   │       ├── index.ts
│   │   │       └── states/
│   │   │           └── il.test.ts
│   │   ├── Y2021/
│   │   │   ├── data/
│   │   │   │   └── federal.ts
│   │   │   ├── irsForms/
│   │   │   │   ├── F1040.ts
│   │   │   │   ├── F1040Attachment.ts
│   │   │   │   ├── F1040v.ts
│   │   │   │   ├── F2439.ts
│   │   │   │   ├── F2441.ts
│   │   │   │   ├── F2555.ts
│   │   │   │   ├── F4136.ts
│   │   │   │   ├── F4137.ts
│   │   │   │   ├── F4563.ts
│   │   │   │   ├── F4797.ts
│   │   │   │   ├── F4952.ts
│   │   │   │   ├── F4972.ts
│   │   │   │   ├── F5695.ts
│   │   │   │   ├── F6168.ts
│   │   │   │   ├── F6251.ts
│   │   │   │   ├── F8582.ts
│   │   │   │   ├── F8814.ts
│   │   │   │   ├── F8853.ts
│   │   │   │   ├── F8863.ts
│   │   │   │   ├── F8888.ts
│   │   │   │   ├── F8889.ts
│   │   │   │   ├── F8910.ts
│   │   │   │   ├── F8919.ts
│   │   │   │   ├── F8936.ts
│   │   │   │   ├── F8949.ts
│   │   │   │   ├── F8959.ts
│   │   │   │   ├── F8960.ts
│   │   │   │   ├── F8962.ts
│   │   │   │   ├── F8995.ts
│   │   │   │   ├── F8995A.ts
│   │   │   │   ├── Main.ts
│   │   │   │   ├── Schedule1.ts
│   │   │   │   ├── Schedule2.ts
│   │   │   │   ├── Schedule3.ts
│   │   │   │   ├── Schedule8812.ts
│   │   │   │   ├── ScheduleA.ts
│   │   │   │   ├── ScheduleB.ts
│   │   │   │   ├── ScheduleC.ts
│   │   │   │   ├── ScheduleD.ts
│   │   │   │   ├── ScheduleE.ts
│   │   │   │   ├── ScheduleEIC.ts
│   │   │   │   ├── ScheduleR.ts
│   │   │   │   ├── ScheduleSE.ts
│   │   │   │   ├── TaxTable.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── worksheets/
│   │   │   │       ├── Pub596Worksheet1.ts
│   │   │   │       ├── QualifyingDependents.ts
│   │   │   │       ├── SDQualifiedAndCapGains.ts
│   │   │   │       ├── SDRateGainWorksheet.ts
│   │   │   │       ├── SDTaxWorksheet.ts
│   │   │   │       ├── SDUnrecaptured1250.ts
│   │   │   │       ├── ScheduleDTaxWorksheet.ts
│   │   │   │       ├── SocialSecurityBenefits.ts
│   │   │   │       └── StudentLoanInterestWorksheet.ts
│   │   │   ├── stateForms/
│   │   │   │   ├── AK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AR/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── AZ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── CT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── DE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── FL/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── GA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── HI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ID/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── IL/
│   │   │   │   │   ├── IL1040.ts
│   │   │   │   │   ├── IL1040ScheduleILEIC.ts
│   │   │   │   │   ├── IL1040V.ts
│   │   │   │   │   ├── ILWit.ts
│   │   │   │   │   └── Parameters.ts
│   │   │   │   ├── IN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── KY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── LA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ME/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MO/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MS/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── MT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── ND/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NE/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NJ/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NM/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── NY/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OH/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OK/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── OR/
│   │   │   │   │   ├── Form.ts
│   │   │   │   │   ├── OR40.ts
│   │   │   │   │   ├── OR40N.ts
│   │   │   │   │   ├── OR40P.ts
│   │   │   │   │   ├── OR40V.ts
│   │   │   │   │   ├── ORASC.ts
│   │   │   │   │   ├── ORASCNP.ts
│   │   │   │   │   ├── ORWFHDC.ts
│   │   │   │   │   └── Parameters.ts
│   │   │   │   ├── PA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── RI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SC/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── SD/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TN/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── TX/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── UT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── VT/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WA/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WI/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WV/
│   │   │   │   │   └── Form.ts
│   │   │   │   ├── WY/
│   │   │   │   │   └── Form.ts
│   │   │   │   └── index.ts
│   │   │   └── tests/
│   │   │       ├── Schedule8812.test.ts
│   │   │       ├── ScheduleA.test.ts
│   │   │       ├── ScheduleD.test.ts
│   │   │       ├── ScheduleEIC.test.ts
│   │   │       ├── f1040.test.ts
│   │   │       ├── f6251.test.ts
│   │   │       ├── fica.test.ts
│   │   │       ├── index.ts
│   │   │       ├── states/
│   │   │       │   └── il.test.ts
│   │   │       ├── taxRates.test.ts
│   │   │       └── taxTable.csv
│   │   ├── YearForms.ts
│   │   ├── errors.ts
│   │   └── tests/
│   │       ├── CommonTests.ts
│   │       └── TestKit.ts
│   ├── index.css
│   ├── index.js
│   ├── log.ts
│   ├── pdfHandler.ts
│   ├── react-app-env.d.ts
│   ├── redux/
│   │   ├── TaxesState.ts
│   │   ├── actions.ts
│   │   ├── data.ts
│   │   ├── fs/
│   │   │   ├── Actions.ts
│   │   │   ├── FSReducer.ts
│   │   │   ├── Load.tsx
│   │   │   └── index.ts
│   │   ├── index.ts
│   │   ├── migration.ts
│   │   ├── reducer.ts
│   │   ├── store.ts
│   │   └── yearDispatch.ts
│   ├── serviceWorker.js
│   ├── setupTests.js
│   ├── testUtil.tsx
│   └── tests/
│       ├── MultipleYears.test.tsx
│       ├── Recover.test.ts
│       ├── arbitraries.ts
│       ├── common/
│       │   ├── DomMethods.ts
│       │   ├── FakePager.tsx
│       │   ├── Page.tsx
│       │   ├── PersonMethods.tsx
│       │   ├── TaxPayerMethods.tsx
│       │   └── YearsStatusBarMethods.tsx
│       ├── components/
│       │   ├── CreatePdf.test.tsx
│       │   ├── Menu.test.tsx
│       │   ├── Questions.test.tsx
│       │   ├── SpouseAndDependent/
│       │   │   ├── Dependent.test.tsx
│       │   │   ├── FilingStatus.test.tsx
│       │   │   ├── Methods.ts
│       │   │   ├── Pages.tsx
│       │   │   └── Spouse.test.tsx
│       │   ├── Taxpayer.test.tsx
│       │   └── income/
│       │       ├── F1099Info.test.tsx
│       │       └── W2JobInfo.test.tsx
│       ├── testdata/
│       │   ├── transactions_test1.csv
│       │   └── transactions_test2_error.csv
│       └── transactions/
│           ├── Transactions.test.tsx
│           └── arbitraries.ts
├── src-tauri/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── rustfmt.toml
│   ├── src/
│   │   ├── build.rs
│   │   ├── cmd.rs
│   │   └── main.rs
│   └── tauri.conf.json
├── tsconfig.json
└── tsconfig.path.json
Download .txt
SYMBOL INDEX (670 symbols across 305 files)

FILE: src-tauri/src/build.rs
  function main (line 3) | fn main() {

FILE: src-tauri/src/cmd.rs
  type Cmd (line 5) | pub enum Cmd {

FILE: src-tauri/src/main.rs
  function main (line 6) | fn main() {

FILE: src/components/ConditionallyWrap.tsx
  type ConditionallyWrapProps (line 3) | type ConditionallyWrapProps = PropsWithChildren<{

FILE: src/components/CreatePDF.tsx
  function CreatePDF (line 18) | function CreatePDF(): ReactElement {

FILE: src/components/FormContainer.tsx
  type FormContainerProps (line 23) | interface FormContainerProps {
  type MutableListItemProps (line 69) | interface MutableListItemProps {
  type FormListContainerProps (line 131) | interface FormListContainerProps<A> {
  type OpenableFormContainerProps (line 157) | interface OpenableFormContainerProps<A> {

FILE: src/components/FormContainer/Context.tsx
  type FormContainerProps (line 9) | interface FormContainerProps {

FILE: src/components/GettingStarted.tsx
  function GettingStarted (line 30) | function GettingStarted(): ReactElement {

FILE: src/components/Main.tsx
  type Props (line 26) | type Props = {
  function Main (line 55) | function Main(): ReactElement {

FILE: src/components/NoMatchPage.tsx
  function NoMatchPage (line 5) | function NoMatchPage(): ReactElement {

FILE: src/components/Patterns.ts
  type BasePattern (line 4) | interface BasePattern {
  type NumericPattern (line 10) | interface NumericPattern extends BasePattern {
  type TextPattern (line 21) | interface TextPattern extends BasePattern {
  type PatternConfig (line 25) | type PatternConfig = NumericPattern | TextPattern

FILE: src/components/RefundBankAccount.tsx
  function RefundBankAccount (line 21) | function RefundBankAccount(): ReactElement {

FILE: src/components/ResponsiveDrawer.tsx
  type Section (line 67) | interface Section {
  type SectionItem (line 72) | interface SectionItem {
  type DrawerItemsProps (line 88) | interface DrawerItemsProps {
  function ResponsiveDrawer (line 94) | function ResponsiveDrawer(props: DrawerItemsProps): ReactElement {

FILE: src/components/SkipToLinks.tsx
  type Props (line 10) | type Props = {

FILE: src/components/Summary.tsx
  type BinaryStateListItemProps (line 27) | interface BinaryStateListItemProps {
  type F1040SummaryProps (line 54) | interface F1040SummaryProps {
  type SummaryProps (line 154) | interface SummaryProps {

FILE: src/components/SummaryData.ts
  type Credit (line 6) | interface Credit {
  type WorksheetLine (line 13) | interface WorksheetLine {
  type WorksheetData (line 17) | interface WorksheetData {
  type SummaryData (line 22) | interface SummaryData {
  type SummaryCreator (line 29) | interface SummaryCreator<A> {

FILE: src/components/TaxPayer/Address.tsx
  type AddressProps (line 11) | interface AddressProps {
  function AddressFields (line 17) | function AddressFields(props: AddressProps): ReactElement {

FILE: src/components/TaxPayer/PersonFields.tsx
  type PersonListItemProps (line 62) | interface PersonListItemProps {
  type ListDependentsProps (line 102) | interface ListDependentsProps {
  function ListDependents (line 107) | function ListDependents({

FILE: src/components/TaxPayer/SpouseAndDependent.tsx
  type UserPersonForm (line 37) | interface UserPersonForm {
  type UserDependentForm (line 53) | interface UserDependentForm extends UserPersonForm {
  type UserSpouseForm (line 94) | interface UserSpouseForm extends UserPersonForm {

FILE: src/components/TaxPayer/TaxPayer.tsx
  type TaxPayerUserForm (line 33) | interface TaxPayerUserForm {
  function PrimaryTaxpayer (line 96) | function PrimaryTaxpayer(): ReactElement {

FILE: src/components/Y2021/AdvanceChildTaxCredit.tsx
  type CreditUserInput (line 12) | interface CreditUserInput {

FILE: src/components/YearDropDown.tsx
  type YearForm (line 11) | interface YearForm {
  type YearDropProps (line 15) | interface YearDropProps {

FILE: src/components/deductions/F1098eInfo.tsx
  type F1098EUserInput (line 19) | interface F1098EUserInput {
  function F1098eInfo (line 42) | function F1098eInfo(): ReactElement {

FILE: src/components/deductions/ItemizedDeductions.tsx
  type ItemizedDeductionUserInput (line 14) | interface ItemizedDeductionUserInput {

FILE: src/components/income/F1099Info.tsx
  type F1099UserInput (line 79) | interface F1099UserInput {
  function F1099Info (line 226) | function F1099Info(): ReactElement {

FILE: src/components/income/OtherInvestments.tsx
  type AssetUserInput (line 32) | interface AssetUserInput {

FILE: src/components/income/PartnershipIncome.tsx
  type ScheduleK1Form1065UserInput (line 35) | interface ScheduleK1Form1065UserInput {

FILE: src/components/income/RealEstate.tsx
  type PropertyAddForm (line 39) | interface PropertyAddForm {
  function RealEstate (line 142) | function RealEstate(): ReactElement {

FILE: src/components/income/StockOptions.tsx
  type F3921UserInput (line 29) | interface F3921UserInput {

FILE: src/components/income/W2JobInfo.tsx
  type IncomeW2UserInput (line 41) | interface IncomeW2UserInput {
  function W2JobInfo (line 166) | function W2JobInfo(): ReactElement {

FILE: src/components/income/assets/AssetSummary.tsx
  type AssetSummaryProps (line 8) | interface AssetSummaryProps {
  type Row (line 13) | type Row = {

FILE: src/components/income/assets/ConfigurableDataTable.tsx
  type ColumnHeaderDropProps (line 11) | interface ColumnHeaderDropProps {
  type ColumnDef (line 51) | interface ColumnDef {
  type ConfigurableDataTableProps (line 56) | interface ConfigurableDataTableProps {

FILE: src/components/income/assets/DataTableStyle.ts
  type DarkModeProps (line 4) | type DarkModeProps = {

FILE: src/components/income/assets/FilteredAssetsTable.tsx
  type CloseYear (line 17) | type CloseYear = TaxYear | 'none' | 'all'
  type AssetFilter (line 18) | interface AssetFilter {
  type Row (line 30) | type Row = WithIndex<Asset<Date>>
  type SelectionEvent (line 69) | type SelectionEvent<T> = {
  type WithIndex (line 75) | type WithIndex<A> = {
  type DisplayAssetsProps (line 79) | interface DisplayAssetsProps {

FILE: src/components/income/assets/TransactionImporter.tsx
  type PortfolioTableProps (line 30) | interface PortfolioTableProps {

FILE: src/components/input/Currency.tsx
  function Currency (line 15) | function Currency(props: CurrencyProps): ReactElement {

FILE: src/components/input/DatePicker.tsx
  function DatePicker (line 13) | function DatePicker<TFormValues>(

FILE: src/components/input/LabeledCheckbox.tsx
  function LabeledCheckbox (line 13) | function LabeledCheckbox<TFormValues>(

FILE: src/components/input/LabeledDropdown.tsx
  function GenericLabeledDropdown (line 13) | function GenericLabeledDropdown<A, TFormValues>(

FILE: src/components/input/LabeledInput.tsx
  function LabeledInput (line 13) | function LabeledInput<TFormValues>(

FILE: src/components/input/LabeledRadio.tsx
  function LabeledRadio (line 15) | function LabeledRadio<A>(props: LabeledRadioProps<A>): ReactElement {

FILE: src/components/input/types.ts
  type BaseDropdownProps (line 5) | interface BaseDropdownProps<TFormValues> {
  type CurrencyProps (line 11) | interface CurrencyProps {
  type SizeList (line 17) | interface SizeList {
  type LabeledDropdownProps (line 24) | interface LabeledDropdownProps<A, TFormValues>
  type LabeledInputProps (line 36) | interface LabeledInputProps<TFormValues> {
  type LabeledFormProps (line 51) | interface LabeledFormProps<TFormValues> {
  type LabeledCheckboxProps (line 58) | type LabeledCheckboxProps<TFormValues> = LabeledFormProps<TFormValues>
  type LabeledRadioProps (line 60) | interface LabeledRadioProps<TFormValues>
  type DatePickerProps (line 65) | interface DatePickerProps<TFormValues>

FILE: src/components/pager.tsx
  type PagerProps (line 13) | interface PagerProps {
  type PagerProviderProps (line 24) | interface PagerProviderProps<A> {
  type Page (line 28) | interface Page {
  type PagerButtonsProps (line 74) | interface PagerButtonsProps {
  type StartButtonsProps (line 129) | interface StartButtonsProps {
  type SingleButtonsProps (line 171) | interface SingleButtonsProps {

FILE: src/components/payments/EstimatedTaxes.tsx
  type EstimatedTaxesUserInput (line 20) | interface EstimatedTaxesUserInput {
  function EstimatedTaxes (line 50) | function EstimatedTaxes(): ReactElement {

FILE: src/components/savingsAccounts/IRA.tsx
  type IraUserInput (line 30) | interface IraUserInput {
  function IRA (line 109) | function IRA(): ReactElement {

FILE: src/components/savingsAccounts/healthSavingsAccounts.tsx
  type HSAUserInput (line 34) | interface HSAUserInput {
  function HealthSavingsAccounts (line 82) | function HealthSavingsAccounts(): ReactElement {

FILE: src/core/data/index.ts
  type TaxYears (line 3) | enum TaxYears {
  type TaxYear (line 9) | type TaxYear = keyof typeof TaxYears
  type PersonRole (line 11) | enum PersonRole {
  type Person (line 27) | interface Person<D = Date> {
  type PersonDateString (line 37) | type PersonDateString = Person<string>
  type QualifyingInformation (line 39) | interface QualifyingInformation {
  type Dependent (line 44) | interface Dependent<D = Date> extends Person<D> {
  type DependentDateString (line 49) | type DependentDateString = Dependent<string>
  type Address (line 51) | interface Address {
  type PrimaryPerson (line 62) | interface PrimaryPerson<D = Date> extends Person<D> {
  type PrimaryPersonDateString (line 66) | type PrimaryPersonDateString = PrimaryPerson<string>
  type Spouse (line 68) | interface Spouse<D = Date> extends Person<D> {
  type SpouseDateString (line 72) | type SpouseDateString = Spouse<string>
  type Employer (line 74) | interface Employer {
  type AccountType (line 80) | enum AccountType {
  type Refund (line 85) | interface Refund {
  type IncomeW2 (line 91) | interface IncomeW2 {
  type EstimatedTaxPayments (line 107) | interface EstimatedTaxPayments {
  type Income1099Type (line 112) | enum Income1099Type {
  type F1099BData (line 120) | interface F1099BData {
  type F1099IntData (line 127) | interface F1099IntData {
  type F1099DivData (line 131) | interface F1099DivData {
  type PlanType1099 (line 141) | enum PlanType1099 {
  type F1099RData (line 162) | interface F1099RData {
  type F1099SSAData (line 169) | interface F1099SSAData {
  type Income1099 (line 176) | interface Income1099<T, D> {
  type W2Box12Code (line 182) | enum W2Box12Code {
  type W2Box12Info (line 246) | type W2Box12Info<A = number> = { [key in W2Box12Code]?: A }
  type HealthSavingsAccount (line 248) | interface HealthSavingsAccount<D = Date> {
  type HealthSavingsAccountDateString (line 259) | type HealthSavingsAccountDateString = HealthSavingsAccount<string>
  type IraPlanType (line 261) | enum IraPlanType {
  type IraPlanName (line 276) | type IraPlanName = keyof typeof IraPlanType
  type Ira (line 286) | interface Ira {
  type FilingStatus (line 306) | enum FilingStatus {
  type FilingStatusName (line 314) | type FilingStatusName = keyof typeof FilingStatus
  type ContactInfo (line 343) | interface ContactInfo {
  type TaxPayer (line 348) | interface TaxPayer<D = Date> extends ContactInfo {
  type TaxPayerDateString (line 355) | type TaxPayerDateString = TaxPayer<string>
  type Income1099Int (line 357) | type Income1099Int = Income1099<Income1099Type.INT, F1099IntData>
  type Income1099B (line 358) | type Income1099B = Income1099<Income1099Type.B, F1099BData>
  type Income1099Div (line 359) | type Income1099Div = Income1099<Income1099Type.DIV, F1099DivData>
  type Income1099R (line 360) | type Income1099R = Income1099<Income1099Type.R, F1099RData>
  type Income1099SSA (line 361) | type Income1099SSA = Income1099<Income1099Type.SSA, F1099SSAData>
  type Supported1099 (line 363) | type Supported1099 =
  type PropertyType (line 370) | enum PropertyType {
  type PropertyTypeName (line 380) | type PropertyTypeName = keyof typeof PropertyType
  type PropertyExpenseType (line 382) | enum PropertyExpenseType {
  type PropertyExpenseTypeName (line 400) | type PropertyExpenseTypeName = keyof typeof PropertyExpenseType
  type Property (line 402) | interface Property {
  type F1098e (line 414) | interface F1098e {
  type F3921 (line 419) | interface F3921 {
  type ScheduleK1Form1065 (line 428) | interface ScheduleK1Form1065 {
  type ItemizedDeductions (line 446) | interface ItemizedDeductions {
  type State (line 461) | type State =
  type StateResidency (line 516) | interface StateResidency {
  type QuestionTag (line 522) | interface QuestionTag {
  type QuestionTagName (line 531) | type QuestionTagName = keyof QuestionTag
  type ValueTag (line 544) | type ValueTag = 'string' | 'boolean'
  type Responses (line 546) | type Responses = Partial<QuestionTag> // Defines usable tag names for ea...
  type CreditType (line 548) | enum CreditType {
  type Credit (line 553) | interface Credit {
  type Information (line 559) | interface Information<D = Date> {
  type InformationDateString (line 577) | type InformationDateString = Information<string>
  type AssetType (line 596) | type AssetType = 'Security' | 'Real Estate'
  type Asset (line 597) | interface Asset<D = Date> {
  type SoldAsset (line 611) | type SoldAsset<D> = Asset<D> & {
  type AssetString (line 620) | type AssetString = Asset<string>
  type ArrayItemEditAction (line 624) | interface ArrayItemEditAction<A> {
  type EditDependentAction (line 629) | type EditDependentAction = ArrayItemEditAction<DependentDateString>
  type EditW2Action (line 630) | type EditW2Action = ArrayItemEditAction<IncomeW2>
  type EditEstimatedTaxesAction (line 631) | type EditEstimatedTaxesAction = ArrayItemEditAction<EstimatedTaxPayments>
  type Edit1099Action (line 632) | type Edit1099Action = ArrayItemEditAction<Supported1099>
  type EditPropertyAction (line 633) | type EditPropertyAction = ArrayItemEditAction<Property>
  type Edit1098eAction (line 634) | type Edit1098eAction = ArrayItemEditAction<F1098e>
  type EditHSAAction (line 635) | type EditHSAAction = ArrayItemEditAction<HealthSavingsAccountDateString>
  type EditIraAction (line 636) | type EditIraAction = ArrayItemEditAction<Ira>
  type EditAssetAction (line 637) | type EditAssetAction = ArrayItemEditAction<Asset<Date>>
  type EditF3921Action (line 638) | type EditF3921Action = ArrayItemEditAction<F3921>
  type EditScheduleK1Form1065Action (line 639) | type EditScheduleK1Form1065Action =
  type EditCreditAction (line 641) | type EditCreditAction = ArrayItemEditAction<Credit>

FILE: src/core/data/questions.ts
  type Question (line 9) | interface Question {
  function q (line 17) | function q(
  function qr (line 26) | function qr(

FILE: src/core/irsForms/Form.ts
  type FormTag (line 3) | type FormTag = string

FILE: src/core/pdfFiller/fillPdf.ts
  function fillPDF (line 12) | function fillPDF(pdf: PDFDocument, fieldValues: Field[]): PDFDocument {

FILE: src/core/pdfFiller/index.ts
  type RadioSelect (line 1) | interface RadioSelect {
  type Field (line 4) | type Field = string | number | boolean | RadioSelect | undefined
  type RenderedField (line 5) | type RenderedField = string | boolean | RadioSelect | undefined

FILE: src/core/pdfFiller/pdfHandler.ts
  type FileDownloader (line 5) | interface FileDownloader<T> {
  type PDFDownloader (line 9) | type PDFDownloader = FileDownloader<PDFDocument>

FILE: src/core/stateForms/Form.ts
  class FormMethods (line 19) | class FormMethods {
    method constructor (line 22) | constructor(form: Form) {

FILE: src/core/tests/arbitraries.ts
  class Arbitraries (line 435) | class Arbitraries {
    method constructor (line 438) | constructor(currentYear: number) {

FILE: src/core/util.ts
  type Piece (line 20) | interface Piece {
  type Piecewise (line 24) | type Piecewise = Piece[]
  type Left (line 56) | interface Left<E> {
  type Right (line 61) | interface Right<A> {
  type Either (line 66) | type Either<E, A> = Left<E> | Right<A>
  class EitherMethods (line 82) | class EitherMethods<E, A> {
    method constructor (line 85) | constructor(e: Either<E, A>) {

FILE: src/data/csvImport.ts
  type DateFormat (line 4) | type DateFormat =
  type CsvConfig (line 12) | interface CsvConfig<K> {
  type Parsed (line 20) | type Parsed<Row> = Either<ParseError[], Row[]>

FILE: src/data/transactions.ts
  type Security (line 3) | interface Security {
  type Side (line 7) | type Side = 'BUY' | 'SELL'
  type Transaction (line 10) | interface Transaction {
  type Position (line 21) | interface Position {
  type Portfolio (line 32) | interface Portfolio {
  type TransactionError (line 140) | interface TransactionError {

FILE: src/forms/F1040Base.ts
  type ValidatedTaxpayer (line 20) | type ValidatedTaxpayer = TaxPayer & {
  type ValidatedInformation (line 25) | interface ValidatedInformation extends Information {
  method constructor (line 81) | constructor(info: ValidatedInformation) {

FILE: src/forms/StateForms.ts
  type StateFormError (line 6) | enum StateFormError {
  type StateForms (line 13) | type StateForms<F> = {

FILE: src/forms/Y2020/data/federal.ts
  constant CURRENT_YEAR (line 4) | const CURRENT_YEAR = 2020
  type TaggedAmount (line 6) | interface TaggedAmount {
  type Brackets (line 11) | interface Brackets {
  type Deductions (line 15) | interface Deductions {
  type Rates (line 20) | interface Rates {
  type FederalBrackets (line 24) | interface FederalBrackets {
  type Point (line 185) | type Point = [number, number]
  type EICDef (line 262) | interface EICDef {
  constant EIC (line 274) | const EIC: EICDef = {
  type SocialSecurityBenefitsDef (line 297) | interface SocialSecurityBenefitsDef {

FILE: src/forms/Y2020/irsForms/F1040.ts
  class F1040 (line 59) | class F1040 extends F1040Base {
    method constructor (line 107) | constructor(info: ValidatedInformation, assets: Asset<Date>[] = []) {
    method f8949s (line 147) | get f8949s(): F8949[] {

FILE: src/forms/Y2020/irsForms/F1040Attachment.ts
  method constructor (line 7) | constructor(f1040: F1040) {
  method constructor (line 19) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/F1040v.ts
  class F1040V (line 5) | class F1040V extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F2441.ts
  class F2441 (line 8) | class F2441 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F2555.ts
  class F2555 (line 8) | class F2555 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F4136.ts
  class F4136 (line 9) | class F4136 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F4137.ts
  class F4137 (line 5) | class F4137 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F4563.ts
  class F4563 (line 9) | class F4563 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F4797.ts
  class F4797 (line 9) | class F4797 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F4952.ts
  class F4952 (line 9) | class F4952 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F4972.ts
  class F4972 (line 8) | class F4972 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F5695.ts
  class F5695 (line 8) | class F5695 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F6168.ts
  class F6168 (line 7) | class F6168 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8582.ts
  class F8582 (line 8) | class F8582 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8814.ts
  class F8814 (line 5) | class F8814 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8853.ts
  class F8853 (line 6) | class F8853 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8863.ts
  class F8863 (line 6) | class F8863 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8888.ts
  class F8888 (line 8) | class F8888 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8889.ts
  type ContributionType (line 9) | type ContributionType = 'self-only' | 'family'
  type PerMonthContributionType (line 10) | type PerMonthContributionType = {
  class F8889 (line 15) | class F8889 extends F1040Attachment {
    method constructor (line 26) | constructor(f1040: F1040, person: Person) {

FILE: src/forms/Y2020/irsForms/F8910.ts
  class F8910 (line 8) | class F8910 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8919.ts
  class F8919 (line 5) | class F8919 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8936.ts
  class F8936 (line 5) | class F8936 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8949.ts
  type EmptyLine (line 7) | type EmptyLine = [
  type Line (line 18) | type Line =
  constant NUM_SHORT_LINES (line 46) | const NUM_SHORT_LINES = 14
  constant NUM_LONG_LINES (line 47) | const NUM_LONG_LINES = 14
  class F8949 (line 56) | class F8949 extends F1040Attachment {
    method constructor (line 62) | constructor(f1040: F1040, index = 0) {

FILE: src/forms/Y2020/irsForms/F8959.ts
  class F8959 (line 8) | class F8959 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8960.ts
  class F8960 (line 7) | class F8960 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8962.ts
  class F8962 (line 9) | class F8962 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8995.ts
  class F8995 (line 8) | class F8995 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/F8995A.ts
  class F8995A (line 3) | class F8995A extends F8995 {}

FILE: src/forms/Y2020/irsForms/Schedule1.ts
  class Schedule1 (line 8) | class Schedule1 extends F1040Attachment {
    method constructor (line 14) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/Schedule2.ts
  class Schedule2 (line 7) | class Schedule2 extends F1040Attachment {
    method constructor (line 12) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/Schedule3.ts
  class Schedule3 (line 44) | class Schedule3 extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/Schedule8812.ts
  class Schedule8812 (line 6) | class Schedule8812 extends F1040Attachment {
    method ssWithholding (line 50) | ssWithholding(): number {

FILE: src/forms/Y2020/irsForms/ScheduleA.ts
  class ScheduleA (line 6) | class ScheduleA extends F1040Attachment {
    method deductions (line 10) | deductions(): number {

FILE: src/forms/Y2020/irsForms/ScheduleB.ts
  type PayerAmount (line 7) | interface PayerAmount {
  class ScheduleB (line 12) | class ScheduleB extends F1040Attachment {
    method constructor (line 20) | constructor(f1040: F1040, index = 0) {

FILE: src/forms/Y2020/irsForms/ScheduleC.ts
  class ScheduleC (line 8) | class ScheduleC extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/ScheduleD.ts
  class ScheduleD (line 11) | class ScheduleD extends F1040Attachment {
    method constructor (line 21) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/ScheduleE.ts
  type Cell (line 13) | type Cell = number | undefined
  type MatrixRow (line 14) | type MatrixRow = [Cell, Cell, Cell]
  class ScheduleE (line 39) | class ScheduleE extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/ScheduleEIC.ts
  type PrecludesEIC (line 15) | type PrecludesEIC<F> = (f: F) => boolean
  class ScheduleEIC (line 44) | class ScheduleEIC extends F1040Attachment {
    method constructor (line 55) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/ScheduleR.ts
  class ScheduleR (line 5) | class ScheduleR extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/ScheduleSE.ts
  class ScheduleSE (line 5) | class ScheduleSE extends F1040Attachment {

FILE: src/forms/Y2020/irsForms/worksheets/ChildTaxCreditWorksheet.ts
  class ChildTaxCreditWorksheet (line 6) | class ChildTaxCreditWorksheet {
    method constructor (line 10) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/worksheets/Pub596Worksheet1.ts
  class Pub596Worksheet1 (line 6) | class Pub596Worksheet1 {
    method constructor (line 9) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/worksheets/SDQualifiedAndCapGains.ts
  type TestData (line 7) | interface TestData {
  type Bracket (line 18) | type Bracket = [number, number]
  type Cutoffs (line 19) | type Cutoffs = { [key in FilingStatus]: Bracket }
  class QualDivAndCGWorksheetReference (line 28) | class QualDivAndCGWorksheetReference {
    method constructor (line 32) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/irsForms/worksheets/SDRateGainWorksheet.ts
  class SDRateGainWorksheet (line 1) | class SDRateGainWorksheet {

FILE: src/forms/Y2020/irsForms/worksheets/SDUnrecaptured1250.ts
  class SDUnrecaptured1250 (line 1) | class SDUnrecaptured1250 {

FILE: src/forms/Y2020/irsForms/worksheets/ScheduleDTaxWorksheet.ts
  type TestData (line 5) | interface TestData {
  type Bracket (line 17) | type Bracket = [number, number, number]
  type Cutoffs (line 18) | type Cutoffs = { [key in FilingStatus]: Bracket }
  class LTCGQualDivReference (line 27) | class LTCGQualDivReference {
    method constructor (line 31) | constructor(data: TestData) {

FILE: src/forms/Y2020/irsForms/worksheets/SocialSecurityBenefits.ts
  class SocialSecurityBenefitsWorksheet (line 6) | class SocialSecurityBenefitsWorksheet {
    method constructor (line 10) | constructor(state: Information, f1040: F1040) {

FILE: src/forms/Y2020/irsForms/worksheets/StudentLoanInterestWorksheet.ts
  class StudentLoanInterestWorksheet (line 5) | class StudentLoanInterestWorksheet {
    method constructor (line 9) | constructor(f1040: F1040, f1098es: F1098e[]) {

FILE: src/forms/Y2020/stateForms/AK/Form.ts
  class AKForm (line 1) | class AKForm {}

FILE: src/forms/Y2020/stateForms/AL/Form.ts
  class ALForm (line 1) | class ALForm {}

FILE: src/forms/Y2020/stateForms/AR/Form.ts
  class ARForm (line 1) | class ARForm {}

FILE: src/forms/Y2020/stateForms/AZ/Form.ts
  class AZForm (line 1) | class AZForm {}

FILE: src/forms/Y2020/stateForms/CA/Form.ts
  class CAForm (line 1) | class CAForm {}

FILE: src/forms/Y2020/stateForms/CO/Form.ts
  class COForm (line 1) | class COForm {}

FILE: src/forms/Y2020/stateForms/CT/Form.ts
  class CTForm (line 1) | class CTForm {}

FILE: src/forms/Y2020/stateForms/DC/Form.ts
  class DCForm (line 1) | class DCForm {}

FILE: src/forms/Y2020/stateForms/DE/Form.ts
  class DEForm (line 1) | class DEForm {}

FILE: src/forms/Y2020/stateForms/FL/Form.ts
  class FLForm (line 1) | class FLForm {}

FILE: src/forms/Y2020/stateForms/GA/Form.ts
  class GAForm (line 1) | class GAForm {}

FILE: src/forms/Y2020/stateForms/HI/Form.ts
  class HIForm (line 1) | class HIForm {}

FILE: src/forms/Y2020/stateForms/IA/Form.ts
  class IAForm (line 1) | class IAForm {}

FILE: src/forms/Y2020/stateForms/ID/Form.ts
  class IDForm (line 1) | class IDForm {}

FILE: src/forms/Y2020/stateForms/IL/IL1040.ts
  class IL1040 (line 12) | class IL1040 extends Form {
    method constructor (line 22) | constructor(f1040: F1040) {

FILE: src/forms/Y2020/stateForms/IL/IL1040ScheduleILEIC.ts
  class IL1040scheduleileeic (line 8) | class IL1040scheduleileeic extends Form {
    method constructor (line 17) | constructor(info: ValidatedInformation, f1040: F1040) {
    method primary (line 26) | get primary(): PrimaryPerson | undefined {

FILE: src/forms/Y2020/stateForms/IL/IL1040V.ts
  class IL1040V (line 8) | class IL1040V extends Form {
    method constructor (line 17) | constructor(info: ValidatedInformation, f1040: F1040, il1040: IL1040) {

FILE: src/forms/Y2020/stateForms/IL/ILWit.ts
  type FormType (line 8) | type FormType =
  type WithholdingForm (line 22) | interface WithholdingForm {
  class ILWIT (line 53) | class ILWIT extends Form {
    method constructor (line 64) | constructor(f1040: F1040, subFormIndex = 0) {
    method primary (line 72) | get primary(): PrimaryPerson | undefined {

FILE: src/forms/Y2020/stateForms/IN/Form.ts
  class INForm (line 1) | class INForm {}

FILE: src/forms/Y2020/stateForms/KS/Form.ts
  class KSForm (line 1) | class KSForm {}

FILE: src/forms/Y2020/stateForms/KY/Form.ts
  class KYForm (line 1) | class KYForm {}

FILE: src/forms/Y2020/stateForms/LA/Form.ts
  class LAForm (line 1) | class LAForm {}

FILE: src/forms/Y2020/stateForms/MA/Form.ts
  class MAForm (line 1) | class MAForm {}

FILE: src/forms/Y2020/stateForms/MD/Form.ts
  class MDForm (line 1) | class MDForm {}

FILE: src/forms/Y2020/stateForms/ME/Form.ts
  class MEForm (line 1) | class MEForm {}

FILE: src/forms/Y2020/stateForms/MI/Form.ts
  class MIForm (line 1) | class MIForm {}

FILE: src/forms/Y2020/stateForms/MN/Form.ts
  class MNForm (line 1) | class MNForm {}

FILE: src/forms/Y2020/stateForms/MO/Form.ts
  class MOForm (line 1) | class MOForm {}

FILE: src/forms/Y2020/stateForms/MS/Form.ts
  class MSForm (line 1) | class MSForm {}

FILE: src/forms/Y2020/stateForms/MT/Form.ts
  class MTForm (line 1) | class MTForm {}

FILE: src/forms/Y2020/stateForms/NC/Form.ts
  class NCForm (line 1) | class NCForm {}

FILE: src/forms/Y2020/stateForms/ND/Form.ts
  class NDForm (line 1) | class NDForm {}

FILE: src/forms/Y2020/stateForms/NE/Form.ts
  class NEForm (line 1) | class NEForm {}

FILE: src/forms/Y2020/stateForms/NH/Form.ts
  class NHForm (line 1) | class NHForm {}

FILE: src/forms/Y2020/stateForms/NJ/Form.ts
  class NJForm (line 1) | class NJForm {}

FILE: src/forms/Y2020/stateForms/NM/Form.ts
  class NMForm (line 1) | class NMForm {}

FILE: src/forms/Y2020/stateForms/NV/Form.ts
  class NVForm (line 1) | class NVForm {}

FILE: src/forms/Y2020/stateForms/NY/Form.ts
  class NYForm (line 1) | class NYForm {}

FILE: src/forms/Y2020/stateForms/OH/Form.ts
  class OHForm (line 1) | class OHForm {}

FILE: src/forms/Y2020/stateForms/OK/Form.ts
  class OKForm (line 1) | class OKForm {}

FILE: src/forms/Y2020/stateForms/OR/Form.ts
  class ORForm (line 1) | class ORForm {}

FILE: src/forms/Y2020/stateForms/PA/Form.ts
  class PAForm (line 1) | class PAForm {}

FILE: src/forms/Y2020/stateForms/RI/Form.ts
  class RIForm (line 1) | class RIForm {}

FILE: src/forms/Y2020/stateForms/SC/Form.ts
  class SCForm (line 1) | class SCForm {}

FILE: src/forms/Y2020/stateForms/SD/Form.ts
  class SDForm (line 1) | class SDForm {}

FILE: src/forms/Y2020/stateForms/TN/Form.ts
  class TNForm (line 1) | class TNForm {}

FILE: src/forms/Y2020/stateForms/TX/Form.ts
  class TXForm (line 1) | class TXForm {}

FILE: src/forms/Y2020/stateForms/UT/Form.ts
  class UTForm (line 1) | class UTForm {}

FILE: src/forms/Y2020/stateForms/VA/Form.ts
  class VAForm (line 1) | class VAForm {}

FILE: src/forms/Y2020/stateForms/VT/Form.ts
  class VTForm (line 1) | class VTForm {}

FILE: src/forms/Y2020/stateForms/WA/Form.ts
  class WAForm (line 1) | class WAForm {}

FILE: src/forms/Y2020/stateForms/WI/Form.ts
  class WIForm (line 1) | class WIForm {}

FILE: src/forms/Y2020/stateForms/WV/Form.ts
  class WVForm (line 1) | class WVForm {}

FILE: src/forms/Y2020/stateForms/WY/Form.ts
  class WYForm (line 1) | class WYForm {}

FILE: src/forms/Y2020/tests/fica.test.ts
  type Constructor (line 26) | type Constructor<T> = new (...args: any[]) => T
  function hasAttachment (line 27) | function hasAttachment<FormType>(

FILE: src/forms/Y2020/tests/index.ts
  class FormTestInfo2020 (line 7) | class FormTestInfo2020 extends FormTestInfo<F1040> {

FILE: src/forms/Y2021/data/federal.ts
  constant CURRENT_YEAR (line 4) | const CURRENT_YEAR = 2021
  type TaggedAmount (line 6) | interface TaggedAmount {
  type Brackets (line 11) | interface Brackets {
  type Deductions (line 15) | interface Deductions {
  type Rates (line 20) | interface Rates {
  type FederalBrackets (line 24) | interface FederalBrackets {
  type Point (line 241) | type Point = [number, number]
  type EICDef (line 318) | interface EICDef {
  constant EIC (line 330) | const EIC: EICDef = {
  type SocialSecurityBenefitsDef (line 353) | interface SocialSecurityBenefitsDef {

FILE: src/forms/Y2021/irsForms/F1040.ts
  class F1040 (line 62) | class F1040 extends F1040Base {
    method constructor (line 113) | constructor(info: ValidatedInformation, assets: Asset<Date>[]) {
    method f8949s (line 166) | get f8949s(): F8949[] {

FILE: src/forms/Y2021/irsForms/F1040Attachment.ts
  method constructor (line 7) | constructor(f1040: F1040) {
  method constructor (line 19) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/irsForms/F1040v.ts
  class F1040V (line 5) | class F1040V extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F2439.ts
  class F2439 (line 9) | class F2439 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F2441.ts
  class F2441 (line 8) | class F2441 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F2555.ts
  class F2555 (line 8) | class F2555 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F4136.ts
  class F4136 (line 9) | class F4136 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F4137.ts
  class F4137 (line 5) | class F4137 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F4563.ts
  class F4563 (line 9) | class F4563 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F4797.ts
  class F4797 (line 9) | class F4797 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F4952.ts
  class F4952 (line 9) | class F4952 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F4972.ts
  class F4972 (line 8) | class F4972 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F5695.ts
  class F5695 (line 8) | class F5695 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F6168.ts
  class F6168 (line 8) | class F6168 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F6251.ts
  type Part3 (line 6) | type Part3 = Partial<{
  class F6251 (line 38) | class F6251 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8582.ts
  class F8582 (line 9) | class F8582 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8814.ts
  class F8814 (line 5) | class F8814 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8853.ts
  class F8853 (line 6) | class F8853 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8863.ts
  class F8863 (line 6) | class F8863 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8888.ts
  class F8888 (line 8) | class F8888 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8889.ts
  type ContributionType (line 10) | type ContributionType = 'self-only' | 'family'
  type PerMonthContributionType (line 11) | type PerMonthContributionType = {
  class F8889 (line 16) | class F8889 extends F1040Attachment {
    method constructor (line 35) | constructor(f1040: F1040, person: Person) {

FILE: src/forms/Y2021/irsForms/F8910.ts
  class F8910 (line 8) | class F8910 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8919.ts
  class F8919 (line 5) | class F8919 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8936.ts
  class F8936 (line 5) | class F8936 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8949.ts
  type EmptyLine (line 7) | type EmptyLine = [
  type Line (line 18) | type Line =
  constant NUM_SHORT_LINES (line 46) | const NUM_SHORT_LINES = 14
  constant NUM_LONG_LINES (line 47) | const NUM_LONG_LINES = 14
  class F8949 (line 56) | class F8949 extends F1040Attachment {
    method constructor (line 62) | constructor(f1040: F1040, index = 0) {

FILE: src/forms/Y2021/irsForms/F8959.ts
  class F8959 (line 7) | class F8959 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8960.ts
  class F8960 (line 7) | class F8960 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8962.ts
  class F8962 (line 9) | class F8962 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8995.ts
  function getF8995PhaseOutIncome (line 6) | function getF8995PhaseOutIncome(filingStatus: FilingStatus): number {
  function ifNumber (line 16) | function ifNumber(
  class F8995 (line 23) | class F8995 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/F8995A.ts
  function ifNumber (line 8) | function ifNumber(
  class F8995A (line 15) | class F8995A extends F8995 {

FILE: src/forms/Y2021/irsForms/Schedule1.ts
  class Schedule1 (line 7) | class Schedule1 extends F1040Attachment {
    method constructor (line 12) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/irsForms/Schedule2.ts
  class Schedule2 (line 6) | class Schedule2 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/Schedule3.ts
  class Schedule3 (line 8) | class Schedule3 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/Schedule8812.ts
  type Part1b (line 9) | type Part1b = { allowed: boolean } & Partial<{
  type Part1c (line 21) | type Part1c = { allowed: boolean } & Partial<{
  type Part2a (line 32) | type Part2a = { allowed: boolean } & Partial<{
  type Part2b (line 48) | type Part2b = { allowed: boolean } & Partial<{
  type Part3 (line 58) | type Part3 = { allowed: boolean } & Partial<{
  class Schedule8812 (line 75) | class Schedule8812 extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/ScheduleA.ts
  class ScheduleA (line 22) | class ScheduleA extends F1040Attachment {
    method constructor (line 27) | constructor(f1040: F1040) {
    method deductions (line 46) | deductions(): number {

FILE: src/forms/Y2021/irsForms/ScheduleB.ts
  type PayerAmount (line 7) | interface PayerAmount {
  class ScheduleB (line 12) | class ScheduleB extends F1040Attachment {
    method constructor (line 20) | constructor(f1040: F1040, index = 0) {

FILE: src/forms/Y2021/irsForms/ScheduleC.ts
  class ScheduleC (line 8) | class ScheduleC extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/ScheduleD.ts
  class ScheduleD (line 12) | class ScheduleD extends F1040Attachment {
    method constructor (line 25) | constructor(f1040: F1040) {
    method aggregated (line 34) | get aggregated(): F1099BData {

FILE: src/forms/Y2021/irsForms/ScheduleE.ts
  type Cell (line 13) | type Cell = number | undefined
  type MatrixRow (line 14) | type MatrixRow = [Cell, Cell, Cell]
  class ScheduleE (line 39) | class ScheduleE extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/ScheduleEIC.ts
  type PrecludesEIC (line 15) | type PrecludesEIC<F> = (f: F) => boolean
  class ScheduleEIC (line 38) | class ScheduleEIC extends F1040Attachment {
    method constructor (line 46) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/irsForms/ScheduleR.ts
  class ScheduleR (line 5) | class ScheduleR extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/ScheduleSE.ts
  class ScheduleSE (line 6) | class ScheduleSE extends F1040Attachment {

FILE: src/forms/Y2021/irsForms/worksheets/Pub596Worksheet1.ts
  class Pub596Worksheet1 (line 6) | class Pub596Worksheet1 {
    method constructor (line 9) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/irsForms/worksheets/QualifyingDependents.ts
  class QualifyingDependents (line 10) | class QualifyingDependents {
    method constructor (line 14) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/irsForms/worksheets/SDQualifiedAndCapGains.ts
  type Bracket (line 8) | type Bracket = [number, number]
  type Cutoffs (line 9) | type Cutoffs = { [key in FilingStatus]: Bracket }
  class QualDivAndCGWorksheet (line 18) | class QualDivAndCGWorksheet extends Worksheet {

FILE: src/forms/Y2021/irsForms/worksheets/SDRateGainWorksheet.ts
  class SDRateGainWorksheet (line 1) | class SDRateGainWorksheet {

FILE: src/forms/Y2021/irsForms/worksheets/SDTaxWorksheet.ts
  class SDTaxWorksheet (line 3) | class SDTaxWorksheet extends Worksheet {

FILE: src/forms/Y2021/irsForms/worksheets/SDUnrecaptured1250.ts
  class SDUnrecaptured1250 (line 1) | class SDUnrecaptured1250 {

FILE: src/forms/Y2021/irsForms/worksheets/ScheduleDTaxWorksheet.ts
  type TestData (line 5) | interface TestData {
  type Bracket (line 17) | type Bracket = [number, number, number]
  type Cutoffs (line 18) | type Cutoffs = { [key in FilingStatus]: Bracket }
  class LTCGQualDivReference (line 27) | class LTCGQualDivReference {
    method constructor (line 31) | constructor(data: TestData) {

FILE: src/forms/Y2021/irsForms/worksheets/SocialSecurityBenefits.ts
  class SocialSecurityBenefitsWorksheet (line 6) | class SocialSecurityBenefitsWorksheet extends Worksheet {

FILE: src/forms/Y2021/irsForms/worksheets/StudentLoanInterestWorksheet.ts
  class StudentLoanInterestWorksheet (line 5) | class StudentLoanInterestWorksheet {
    method constructor (line 9) | constructor(f1040: F1040, f1098es: F1098e[]) {

FILE: src/forms/Y2021/stateForms/AK/Form.ts
  class AKForm (line 1) | class AKForm {}

FILE: src/forms/Y2021/stateForms/AL/Form.ts
  class ALForm (line 1) | class ALForm {}

FILE: src/forms/Y2021/stateForms/AR/Form.ts
  class ARForm (line 1) | class ARForm {}

FILE: src/forms/Y2021/stateForms/AZ/Form.ts
  class AZForm (line 1) | class AZForm {}

FILE: src/forms/Y2021/stateForms/CA/Form.ts
  class CAForm (line 1) | class CAForm {}

FILE: src/forms/Y2021/stateForms/CO/Form.ts
  class COForm (line 1) | class COForm {}

FILE: src/forms/Y2021/stateForms/CT/Form.ts
  class CTForm (line 1) | class CTForm {}

FILE: src/forms/Y2021/stateForms/DC/Form.ts
  class DCForm (line 1) | class DCForm {}

FILE: src/forms/Y2021/stateForms/DE/Form.ts
  class DEForm (line 1) | class DEForm {}

FILE: src/forms/Y2021/stateForms/FL/Form.ts
  class FLForm (line 1) | class FLForm {}

FILE: src/forms/Y2021/stateForms/GA/Form.ts
  class GAForm (line 1) | class GAForm {}

FILE: src/forms/Y2021/stateForms/HI/Form.ts
  class HIForm (line 1) | class HIForm {}

FILE: src/forms/Y2021/stateForms/IA/Form.ts
  class IAForm (line 1) | class IAForm {}

FILE: src/forms/Y2021/stateForms/ID/Form.ts
  class IDForm (line 1) | class IDForm {}

FILE: src/forms/Y2021/stateForms/IL/IL1040.ts
  class IL1040 (line 12) | class IL1040 extends Form {
    method constructor (line 22) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/stateForms/IL/IL1040ScheduleILEIC.ts
  class IL1040scheduleileeic (line 8) | class IL1040scheduleileeic extends Form {
    method constructor (line 17) | constructor(f1040: F1040) {
    method primary (line 26) | get primary(): PrimaryPerson | undefined {
    method spouse (line 30) | get spouse(): Spouse | undefined {

FILE: src/forms/Y2021/stateForms/IL/IL1040V.ts
  class IL1040V (line 8) | class IL1040V extends Form {
    method constructor (line 17) | constructor(f1040: F1040, il1040: IL1040) {

FILE: src/forms/Y2021/stateForms/IL/ILWit.ts
  type FormType (line 7) | type FormType =
  type WithholdingForm (line 21) | interface WithholdingForm {
  class ILWIT (line 52) | class ILWIT extends Form {
    method constructor (line 63) | constructor(f1040: F1040, subFormIndex = 0) {

FILE: src/forms/Y2021/stateForms/IN/Form.ts
  class INForm (line 1) | class INForm {}

FILE: src/forms/Y2021/stateForms/KS/Form.ts
  class KSForm (line 1) | class KSForm {}

FILE: src/forms/Y2021/stateForms/KY/Form.ts
  class KYForm (line 1) | class KYForm {}

FILE: src/forms/Y2021/stateForms/LA/Form.ts
  class LAForm (line 1) | class LAForm {}

FILE: src/forms/Y2021/stateForms/MA/Form.ts
  class MAForm (line 1) | class MAForm {}

FILE: src/forms/Y2021/stateForms/MD/Form.ts
  class MDForm (line 1) | class MDForm {}

FILE: src/forms/Y2021/stateForms/ME/Form.ts
  class MEForm (line 1) | class MEForm {}

FILE: src/forms/Y2021/stateForms/MI/Form.ts
  class MIForm (line 1) | class MIForm {}

FILE: src/forms/Y2021/stateForms/MN/Form.ts
  class MNForm (line 1) | class MNForm {}

FILE: src/forms/Y2021/stateForms/MO/Form.ts
  class MOForm (line 1) | class MOForm {}

FILE: src/forms/Y2021/stateForms/MS/Form.ts
  class MSForm (line 1) | class MSForm {}

FILE: src/forms/Y2021/stateForms/MT/Form.ts
  class MTForm (line 1) | class MTForm {}

FILE: src/forms/Y2021/stateForms/NC/Form.ts
  class NCForm (line 1) | class NCForm {}

FILE: src/forms/Y2021/stateForms/ND/Form.ts
  class NDForm (line 1) | class NDForm {}

FILE: src/forms/Y2021/stateForms/NE/Form.ts
  class NEForm (line 1) | class NEForm {}

FILE: src/forms/Y2021/stateForms/NH/Form.ts
  class NHForm (line 1) | class NHForm {}

FILE: src/forms/Y2021/stateForms/NJ/Form.ts
  class NJForm (line 1) | class NJForm {}

FILE: src/forms/Y2021/stateForms/NM/Form.ts
  class NMForm (line 1) | class NMForm {}

FILE: src/forms/Y2021/stateForms/NV/Form.ts
  class NVForm (line 1) | class NVForm {}

FILE: src/forms/Y2021/stateForms/NY/Form.ts
  class NYForm (line 1) | class NYForm {}

FILE: src/forms/Y2021/stateForms/OH/Form.ts
  class OHForm (line 1) | class OHForm {}

FILE: src/forms/Y2021/stateForms/OK/Form.ts
  class OKForm (line 1) | class OKForm {}

FILE: src/forms/Y2021/stateForms/OR/Form.ts
  class ORForm (line 1) | class ORForm {}

FILE: src/forms/Y2021/stateForms/OR/OR40.ts
  class OR40 (line 11) | class OR40 extends Form {
    method constructor (line 21) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/stateForms/OR/OR40N.ts
  class OR40N (line 7) | class OR40N extends Form {
    method constructor (line 15) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/stateForms/OR/OR40P.ts
  class OR40P (line 7) | class OR40P extends Form {
    method constructor (line 15) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/stateForms/OR/OR40V.ts
  class OR40V (line 8) | class OR40V extends Form {
    method constructor (line 17) | constructor(f1040: F1040, or40: OR40) {

FILE: src/forms/Y2021/stateForms/OR/ORASC.ts
  class ORASC (line 7) | class ORASC extends Form {
    method constructor (line 15) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/stateForms/OR/ORASCNP.ts
  class ORASCNP (line 7) | class ORASCNP extends Form {
    method constructor (line 15) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/stateForms/OR/ORWFHDC.ts
  class ORWFHDC (line 7) | class ORWFHDC extends Form {
    method constructor (line 15) | constructor(f1040: F1040) {

FILE: src/forms/Y2021/stateForms/PA/Form.ts
  class PAForm (line 1) | class PAForm {}

FILE: src/forms/Y2021/stateForms/RI/Form.ts
  class RIForm (line 1) | class RIForm {}

FILE: src/forms/Y2021/stateForms/SC/Form.ts
  class SCForm (line 1) | class SCForm {}

FILE: src/forms/Y2021/stateForms/SD/Form.ts
  class SDForm (line 1) | class SDForm {}

FILE: src/forms/Y2021/stateForms/TN/Form.ts
  class TNForm (line 1) | class TNForm {}

FILE: src/forms/Y2021/stateForms/TX/Form.ts
  class TXForm (line 1) | class TXForm {}

FILE: src/forms/Y2021/stateForms/UT/Form.ts
  class UTForm (line 1) | class UTForm {}

FILE: src/forms/Y2021/stateForms/VA/Form.ts
  class VAForm (line 1) | class VAForm {}

FILE: src/forms/Y2021/stateForms/VT/Form.ts
  class VTForm (line 1) | class VTForm {}

FILE: src/forms/Y2021/stateForms/WA/Form.ts
  class WAForm (line 1) | class WAForm {}

FILE: src/forms/Y2021/stateForms/WI/Form.ts
  class WIForm (line 1) | class WIForm {}

FILE: src/forms/Y2021/stateForms/WV/Form.ts
  class WVForm (line 1) | class WVForm {}

FILE: src/forms/Y2021/stateForms/WY/Form.ts
  class WYForm (line 1) | class WYForm {}

FILE: src/forms/Y2021/tests/fica.test.ts
  function hasAdditionalMedicareTax (line 70) | function hasAdditionalMedicareTax(f1040: F1040): boolean {
  type Constructor (line 76) | type Constructor<T> = new (...args: any[]) => T
  function hasAttachment (line 77) | function hasAttachment<FormType>(

FILE: src/forms/Y2021/tests/index.ts
  class FormTestInfo2021 (line 7) | class FormTestInfo2021 extends FormTestInfo<F1040> {

FILE: src/forms/YearForms.ts
  type CreateFormConfig (line 26) | interface CreateFormConfig {
  class YearCreateForm (line 38) | class YearCreateForm {
    method constructor (line 44) | constructor(
  class CreateForms (line 134) | class CreateForms {
    method constructor (line 138) | constructor(year: TaxYear) {

FILE: src/forms/errors.ts
  type F1040Error (line 1) | enum F1040Error {

FILE: src/forms/tests/CommonTests.ts
  class CommonTests (line 26) | class CommonTests<F1040 extends F1040Base> {
    method constructor (line 30) | constructor(testKit: TestKit, formTestInfo: FormTestInfo<F1040>) {

FILE: src/forms/tests/TestKit.ts
  class TestKit (line 20) | class TestKit {
    method constructor (line 25) | constructor(year: TaxYear) {
  type Access (line 166) | interface Access<A, B> {

FILE: src/pdfHandler.ts
  function savePDF (line 4) | async function savePDF(

FILE: src/redux/TaxesState.ts
  class TaxesStateMethods (line 4) | class TaxesStateMethods {
    method constructor (line 7) | constructor(ts: YearsTaxesState) {

FILE: src/redux/actions.ts
  type ActionName (line 47) | enum ActionName {
  type Save (line 100) | interface Save<T, R> {
  type SaveRefundInfo (line 106) | type SaveRefundInfo = Save<typeof ActionName.SAVE_REFUND_INFO, Refund>
  type SavePrimaryPersonInfo (line 107) | type SavePrimaryPersonInfo = Save<
  type SaveFilingStatusInfo (line 111) | type SaveFilingStatusInfo = Save<
  type SaveContactInfo (line 115) | type SaveContactInfo = Save<typeof ActionName.SAVE_CONTACT_INFO, Contact...
  type SaveStateResidencyInfo (line 116) | type SaveStateResidencyInfo = Save<
  type AddDependent (line 120) | type AddDependent = Save<typeof ActionName.ADD_DEPENDENT, DependentDateS...
  type EditDependent (line 121) | type EditDependent = Save<typeof ActionName.EDIT_DEPENDENT, EditDependen...
  type RemoveDependent (line 122) | type RemoveDependent = Save<typeof ActionName.REMOVE_DEPENDENT, number>
  type AddSpouse (line 123) | type AddSpouse = Save<typeof ActionName.ADD_SPOUSE, SpouseDateString>
  type RemoveSpouse (line 124) | type RemoveSpouse = Save<typeof ActionName.REMOVE_SPOUSE, Record<string,...
  type AddW2 (line 125) | type AddW2 = Save<typeof ActionName.ADD_W2, IncomeW2>
  type EditW2 (line 126) | type EditW2 = Save<typeof ActionName.EDIT_W2, EditW2Action>
  type RemoveW2 (line 127) | type RemoveW2 = Save<typeof ActionName.REMOVE_W2, number>
  type AddEstimatedTaxes (line 128) | type AddEstimatedTaxes = Save<
  type EditEstimatedTaxes (line 132) | type EditEstimatedTaxes = Save<
  type RemoveEstimatedTaxes (line 136) | type RemoveEstimatedTaxes = Save<typeof ActionName.REMOVE_ESTIMATED_TAX,...
  type AddHSA (line 137) | type AddHSA = Save<typeof ActionName.ADD_HSA, HealthSavingsAccountDateSt...
  type EditHSA (line 138) | type EditHSA = Save<typeof ActionName.EDIT_HSA, EditHSAAction>
  type RemoveHSA (line 139) | type RemoveHSA = Save<typeof ActionName.REMOVE_HSA, number>
  type Add1099 (line 140) | type Add1099 = Save<typeof ActionName.ADD_1099, Supported1099>
  type Edit1099 (line 141) | type Edit1099 = Save<typeof ActionName.EDIT_1099, Edit1099Action>
  type Remove1099 (line 142) | type Remove1099 = Save<typeof ActionName.REMOVE_1099, number>
  type AddProperty (line 143) | type AddProperty = Save<typeof ActionName.ADD_PROPERTY, Property>
  type EditProperty (line 144) | type EditProperty = Save<typeof ActionName.EDIT_PROPERTY, EditPropertyAc...
  type RemoveProperty (line 145) | type RemoveProperty = Save<typeof ActionName.REMOVE_PROPERTY, number>
  type AnswerQuestion (line 146) | type AnswerQuestion = Save<typeof ActionName.ANSWER_QUESTION, Responses>
  type Add1098e (line 147) | type Add1098e = Save<typeof ActionName.ADD_1098e, F1098e>
  type Edit1098e (line 148) | type Edit1098e = Save<typeof ActionName.EDIT_1098e, Edit1098eAction>
  type Remove1098e (line 149) | type Remove1098e = Save<typeof ActionName.REMOVE_1098e, number>
  type SetItemizedDeductions (line 150) | type SetItemizedDeductions = Save<
  type SetInfo (line 154) | type SetInfo = Save<typeof ActionName.SET_INFO, InformationDateString>
  type SetActiveYear (line 155) | type SetActiveYear = Save<typeof ActionName.SET_ACTIVE_YEAR, TaxYear>
  type AddIRA (line 156) | type AddIRA = Save<typeof ActionName.ADD_IRA, Ira>
  type EditIRA (line 157) | type EditIRA = Save<typeof ActionName.EDIT_IRA, EditIraAction>
  type RemoveIRA (line 158) | type RemoveIRA = Save<typeof ActionName.REMOVE_IRA, number>
  type AddAsset (line 159) | type AddAsset = Save<typeof ActionName.ADD_ASSET, Asset<Date>>
  type AddAssets (line 160) | type AddAssets = Save<typeof ActionName.ADD_ASSETS, Asset<Date>[]>
  type EditAsset (line 161) | type EditAsset = Save<typeof ActionName.EDIT_ASSET, EditAssetAction>
  type RemoveAsset (line 162) | type RemoveAsset = Save<typeof ActionName.REMOVE_ASSET, number>
  type RemoveAssets (line 163) | type RemoveAssets = Save<typeof ActionName.REMOVE_ASSETS, number[]>
  type AddF3921 (line 164) | type AddF3921 = Save<typeof ActionName.ADD_F3921, F3921>
  type EditF3921 (line 165) | type EditF3921 = Save<typeof ActionName.EDIT_F3921, EditF3921Action>
  type RemoveF3921 (line 166) | type RemoveF3921 = Save<typeof ActionName.REMOVE_F3921, number>
  type AddScheduleK1Form1065 (line 167) | type AddScheduleK1Form1065 = Save<
  type EditScheduleK1Form1065 (line 171) | type EditScheduleK1Form1065 = Save<
  type RemoveScheduleK1Form1065 (line 175) | type RemoveScheduleK1Form1065 = Save<
  type AddCredit (line 179) | type AddCredit = Save<typeof ActionName.ADD_CREDIT, Credit>
  type EditCredit (line 180) | type EditCredit = Save<typeof ActionName.EDIT_CREDIT, EditCreditAction>
  type RemoveCredit (line 181) | type RemoveCredit = Save<typeof ActionName.REMOVE_CREDIT, number>
  type Actions (line 183) | type Actions =
  type SignalAction (line 234) | type SignalAction = (year: TaxYear) => Actions
  type ActionCreator (line 235) | type ActionCreator<A> = (formData: A) => SignalAction
  function signalAction (line 237) | function signalAction<T extends ActionName>(

FILE: src/redux/data.ts
  type TaxesState (line 9) | type TaxesState = { information: Information }
  type YearsTaxesState (line 11) | type YearsTaxesState<D = Date> = { [K in TaxYear]: Information<D> } & {

FILE: src/redux/fs/Actions.ts
  type FSActionName (line 1) | type FSActionName = 'fs/persist' | 'fs/recover'
  type FSAction (line 3) | interface FSAction {
  type FSPersist (line 7) | interface FSPersist extends FSAction {
  type FSRecover (line 11) | interface FSRecover extends FSAction {

FILE: src/redux/fs/FSReducer.ts
  type PersistActions (line 7) | type PersistActions = FSPersist | FSRecover

FILE: src/redux/fs/Load.tsx
  type LoadProps (line 6) | interface LoadProps<S> {
  type Accept (line 10) | interface Accept {

FILE: src/redux/migration.ts
  type QualifyingInformationV0 (line 14) | interface QualifyingInformationV0 {
  type DependentV0 (line 20) | interface DependentV0 extends Omit<Person, 'isBlind' | 'dateOfBirth'> {
  type PrimaryPersonV0 (line 25) | type PrimaryPersonV0 = Omit<PrimaryPerson, 'isBlind' | 'dateOfBirth'>
  type SpouseV0 (line 27) | type SpouseV0 = Omit<Spouse, 'isBlind' | 'dateOfBirth'>
  type USTStateV0 (line 29) | type USTStateV0 = {
  function migrateDependent (line 40) | function migrateDependent(p: DependentV0): Dependent {
  function migratePrimaryOrSpouse (line 55) | function migratePrimaryOrSpouse(p: Spouse | PrimaryPerson) {

FILE: src/redux/reducer.ts
  constant DEFAULT_TAX_YEAR (line 8) | const DEFAULT_TAX_YEAR: TaxYear = 'Y2021'

FILE: src/redux/store.ts
  type SerializedState (line 26) | type SerializedState = { [K in TaxYear]: Information } & {
  type USTSerializedState (line 31) | type USTSerializedState = NonNullable<PersistedState> & SerializedState
  type USTState (line 32) | type USTState = NonNullable<PersistedState> & YearsTaxesState
  type InfoStore (line 141) | type InfoStore = Store<YearsTaxesState, FSAction & Actions> & {
  type PersistedStore (line 145) | type PersistedStore = Store<

FILE: src/serviceWorker.js
  function registerValidSW (line 23) | function registerValidSW(swUrl, config) {
  function checkValidServiceWorker (line 67) | function checkValidServiceWorker(swUrl, config) {
  function register (line 97) | function register(config) {
  function unregister (line 131) | function unregister() {

FILE: src/tests/MultipleYears.test.tsx
  class TestForm (line 31) | class TestForm extends TestPage {
    method constructor (line 37) | constructor(state: YearsTaxesState) {

FILE: src/tests/common/DomMethods.ts
  class DomMethods (line 1) | class DomMethods {
    method constructor (line 4) | constructor(dom: () => HTMLElement) {

FILE: src/tests/common/FakePager.tsx
  class PagerMethods (line 19) | class PagerMethods extends DomMethods {

FILE: src/tests/common/Page.tsx
  type TestRenderResult (line 9) | type TestRenderResult = RenderResult<typeof Queries, HTMLElement>
  method constructor (line 18) | constructor(state: YearsTaxesState) {
  method renderComponent (line 23) | renderComponent(): ReactElement {

FILE: src/tests/common/PersonMethods.tsx
  class PersonMethods (line 6) | class PersonMethods extends DomMethods {

FILE: src/tests/common/TaxPayerMethods.tsx
  class TaxPayerMethods (line 7) | class TaxPayerMethods extends DomMethods {

FILE: src/tests/common/YearsStatusBarMethods.tsx
  class YearStatusBarMethods (line 13) | class YearStatusBarMethods extends DomMethods {

FILE: src/tests/components/CreatePdf.test.tsx
  class CreatePDFTestPage (line 21) | class CreatePDFTestPage extends TestPage {
    method constructor (line 23) | constructor(state: YearsTaxesState) {

FILE: src/tests/components/SpouseAndDependent/Methods.ts
  class SpouseMethods (line 6) | class SpouseMethods extends PersonMethods {
  class DependentMethods (line 16) | class DependentMethods extends PersonMethods {
  class FilingStatusMethods (line 35) | class FilingStatusMethods extends DomMethods {

FILE: src/tests/components/SpouseAndDependent/Pages.tsx
  class SpouseTestPage (line 13) | class SpouseTestPage extends TestPage {
    method constructor (line 16) | constructor(state: YearsTaxesState) {
  class SpouseAndDependentTestPage (line 30) | class SpouseAndDependentTestPage extends TestPage {
    method constructor (line 36) | constructor(state: YearsTaxesState) {

FILE: src/tests/components/Taxpayer.test.tsx
  class TaxPayerTestPage (line 29) | class TaxPayerTestPage extends TestPage {
    method constructor (line 34) | constructor(state: YearsTaxesState) {
  type Person (line 52) | interface Person {
  type Pager (line 55) | interface Pager {
  type TaxPayer (line 59) | interface TaxPayer {
Condensed preview — 522 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,384K chars).
[
  {
    "path": ".codecov.yml",
    "chars": 656,
    "preview": "coverage:\n  status:\n    project:\n      default:\n        # basic\n        target: 70%\n        threshold: 0%\n        base: "
  },
  {
    "path": ".dockerignore",
    "chars": 196,
    "preview": "# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# misc\n.DS_Store\n.netlify\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n/."
  },
  {
    "path": ".eslintignore",
    "chars": 85,
    "preview": "serviceWorker.js\n\n# don't worry about generated files\n/src/core/data/validate-fns.js\n"
  },
  {
    "path": ".eslintrc.js",
    "chars": 758,
    "preview": "module.exports = {\n  settings: {\n    react: {\n      version: 'detect'\n    }\n  },\n  env: {\n    browser: true,\n    es2021:"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 729,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 651,
    "preview": "<!--\nPlease make sure to read the Pull Request Guidelines:\nhttps://github.com/ustaxes/ustaxes/blob/master/.github/CONTRI"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 1603,
    "preview": "# Contains unit test, lint, dependabot automerge logic\nname: CI\non:\n  push:\n    branches: [ master ]\n  pull_request:\n   "
  },
  {
    "path": ".github/workflows/tauri-release.yml",
    "chars": 2417,
    "preview": "name: \"publish\"\non:\n  push:\n    tags:\n      - app-v*\njobs:\n  publish-tauri:\n    strategy:\n      fail-fast: false\n      m"
  },
  {
    "path": ".gitignore",
    "chars": 441,
    "preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
  },
  {
    "path": ".husky/husky.sh",
    "chars": 600,
    "preview": "#!/bin/sh\nif [ -z \"$husky_skip_init\" ]; then\n  debug () {\n    if [ \"$HUSKY_DEBUG\" = \"1\" ]; then\n      echo \"husky (debug"
  },
  {
    "path": ".husky/pre-commit",
    "chars": 67,
    "preview": "#!/bin/sh\n. \"$(dirname \"$0\")/husky.sh\"\n\n# npm test\nnpx lint-staged\n"
  },
  {
    "path": ".npmrc",
    "chars": 34,
    "preview": "//.npmrc file\nengine-strict = true"
  },
  {
    "path": ".nvmrc",
    "chars": 6,
    "preview": "lts/*\n"
  },
  {
    "path": ".prettierignore",
    "chars": 569,
    "preview": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pn"
  },
  {
    "path": ".prettierrc.json",
    "chars": 134,
    "preview": "{\n  \"trailingComma\": \"none\",\n  \"tabWidth\": 2,\n  \"semi\": false,\n  \"singleQuote\": true,\n  \"jsxSingleQuote\": false,\n  \"prin"
  },
  {
    "path": "Dockerfile",
    "chars": 670,
    "preview": "FROM rust:1.51-slim-buster\n\nRUN mkdir -p /home/node/app\n\nRUN useradd -rm -d /home/node -s /bin/bash -g root -G sudo -u 1"
  },
  {
    "path": "LICENSE",
    "chars": 34522,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C)"
  },
  {
    "path": "README.md",
    "chars": 5209,
    "preview": "<div align=\"center\">\n<h1><a href=\"//ustaxes.org\">USTaxes</a></h1>\n\n[![Netlify Status][netlify-badge]][netlify-url] [![Gi"
  },
  {
    "path": "craco.config.js",
    "chars": 134,
    "preview": "const path = require('path')\nmodule.exports = {\n  webpack: {\n    alias: {\n      ustaxes: path.resolve(__dirname, './src'"
  },
  {
    "path": "docker-compose.yml",
    "chars": 133,
    "preview": "version: '3.7'\n\nservices:\n  app:\n    build: .\n    command: npm run start\n    ports:\n      - '3000:3000'\n    volumes:\n   "
  },
  {
    "path": "docs/ARCHITECTURE.md",
    "chars": 4415,
    "preview": "# Project Architecture\n\nThank you for your interest in this project. The below should summarize the general design frame"
  },
  {
    "path": "docs/CODE_OF_CONDUCT.md",
    "chars": 3358,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "docs/CONTRIBUTING.md",
    "chars": 7694,
    "preview": "# UsTaxes Contributing Guide\n\nBefore contributing please make sure to take a moment to read through the [Code of Conduct"
  },
  {
    "path": "notice.js",
    "chars": 830,
    "preview": "const notice = `\n    ustaxes helps you build your tax return forms for free\n    Copyright (C) 2021  Aidan Grimshaw and c"
  },
  {
    "path": "package.json",
    "chars": 3663,
    "preview": "{\n  \"name\": \"ustaxes\",\n  \"version\": \"0.1.21\",\n  \"private\": true,\n  \"dependencies\": {\n    \"@date-io/date-fns\": \"^1.3.13\","
  },
  {
    "path": "public/_redirects",
    "chars": 20,
    "preview": "/*  /index.html  200"
  },
  {
    "path": "public/forms/Y2020/states/AK/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/AL/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/AR/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/AZ/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/CA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/CO/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/CT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/DC/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/DE/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/FL/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/GA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/HI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/IA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/ID/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/IL/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/IN/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/KS/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/KY/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/LA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/MA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/MD/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/ME/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/MI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/MN/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/MO/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/MS/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/MT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/NC/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/ND/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/NE/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/NH/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/NJ/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/NM/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/NV/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/NY/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/OH/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/OK/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/OR/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/PA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/RI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/SC/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/SD/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/TN/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/TX/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/UT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/VA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/VT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/WA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/WI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/WV/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2020/states/WY/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/AK/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/AL/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/AR/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/AZ/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/CA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/CO/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/CT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/DC/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/DE/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/FL/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/GA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/HI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/IA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/ID/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/IL/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/IN/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/KS/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/KY/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/LA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/MA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/MD/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/ME/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/MI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/MN/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/MO/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/MS/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/MT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/NC/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/ND/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/NE/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/NH/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/NJ/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/NM/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/NV/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/NY/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/OH/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/OK/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/OR/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/PA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/RI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/SC/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/SD/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/TN/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/TX/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/UT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/VA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/VT/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/WA/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/WI/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/WV/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/forms/Y2021/states/WY/README.md",
    "chars": 5,
    "preview": "TODO\n"
  },
  {
    "path": "public/index.html",
    "chars": 1859,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"icon\" href=\"%PUBLIC_URL%/favicon.i"
  },
  {
    "path": "public/manifest.json",
    "chars": 643,
    "preview": "{\n  \"short_name\": \"US Taxes\",\n  \"name\": \"UsTaxes is an open source webapp for filing US federal income tax. All tax calc"
  },
  {
    "path": "public/robots.txt",
    "chars": 67,
    "preview": "# https://www.robotstxt.org/robotstxt.html\nUser-agent: *\nDisallow:\n"
  },
  {
    "path": "scripts/build-netlify.sh",
    "chars": 75,
    "preview": "#!/usr/bin/env bash\n\nset -e\n\nexport CI=false \n\nnpm run lint\n\nnpm run build\n"
  },
  {
    "path": "scripts/env.ts",
    "chars": 2542,
    "preview": "import { exec } from 'child_process'\n\n// fs.cp since 16.7\nexport const requiredNodeVersion = [16, 7]\nexport const requir"
  },
  {
    "path": "scripts/formgen.ts",
    "chars": 3709,
    "preview": "import { PDFDocument, PDFField, PDFCheckBox } from 'pdf-lib'\nimport { readFile } from 'fs/promises'\nimport * as path fro"
  },
  {
    "path": "scripts/setup.ts",
    "chars": 2342,
    "preview": "import { createGenerator } from 'ts-json-schema-generator'\nimport fs from 'fs'\nimport Ajv from 'ajv'\n\nimport standaloneC"
  },
  {
    "path": "src/App.css",
    "chars": 90,
    "preview": "body {\n  height: 100vh;\n}\n\n.MuiGrid-container ~ .MuiGrid-container {\n  margin-top: 8px;\n}\n"
  },
  {
    "path": "src/App.tsx",
    "chars": 1098,
    "preview": "import { ReactElement, useMemo } from 'react'\nimport Main from './components/Main'\nimport './App.css'\nimport { createThe"
  },
  {
    "path": "src/components/ConditionallyWrap.tsx",
    "chars": 384,
    "preview": "import { PropsWithChildren, ReactNode, ReactElement } from 'react'\n\ntype ConditionallyWrapProps = PropsWithChildren<{\n  "
  },
  {
    "path": "src/components/CreatePDF.tsx",
    "chars": 4555,
    "preview": "import { FormEvent, ReactElement, ReactNode, useEffect, useState } from 'react'\nimport { Helmet } from 'react-helmet'\nim"
  },
  {
    "path": "src/components/DataPropagator.tsx",
    "chars": 1553,
    "preview": "import { ReactElement } from 'react'\nimport { useSelector } from 'react-redux'\nimport { YearsTaxesState } from 'ustaxes/"
  },
  {
    "path": "src/components/FormContainer/Context.tsx",
    "chars": 676,
    "preview": "import {\n  createContext,\n  useContext,\n  PropsWithChildren,\n  Context,\n  ReactElement\n} from 'react'\n\ninterface FormCon"
  },
  {
    "path": "src/components/FormContainer.tsx",
    "chars": 8420,
    "preview": "import { PropsWithChildren, ReactElement, useState } from 'react'\nimport {\n  createStyles,\n  makeStyles,\n  useMediaQuery"
  },
  {
    "path": "src/components/GettingStarted.tsx",
    "chars": 4873,
    "preview": "import { ReactElement } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { Link, useMediaQuery } from '@materia"
  },
  {
    "path": "src/components/HelpAndFeedback.tsx",
    "chars": 2072,
    "preview": "import { Button, Grid, TextField } from '@material-ui/core'\nimport { Alert } from '@material-ui/lab'\nimport { ReactEleme"
  },
  {
    "path": "src/components/Main.tsx",
    "chars": 3540,
    "preview": "import { PropsWithChildren, ReactElement } from 'react'\nimport {\n  createStyles,\n  makeStyles,\n  CssBaseline,\n  Grid,\n  "
  },
  {
    "path": "src/components/Menu.tsx",
    "chars": 6652,
    "preview": "import { ReactElement, useState } from 'react'\nimport { useLocation } from 'react-router-dom'\n\nimport { useSelector } fr"
  },
  {
    "path": "src/components/NoMatchPage.tsx",
    "chars": 534,
    "preview": "import { ReactElement } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { SingleButtons } from './pager'\n\nexpo"
  },
  {
    "path": "src/components/Patterns.ts",
    "chars": 3009,
    "preview": "import { TaxYear, TaxYears } from 'ustaxes/core/data'\nimport { daysInYear } from 'ustaxes/core/util'\n\nexport interface B"
  },
  {
    "path": "src/components/Questions.tsx",
    "chars": 3151,
    "preview": "import { ReactElement, useEffect } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { Grid, List, ListItem } fr"
  },
  {
    "path": "src/components/RefundBankAccount.tsx",
    "chars": 2577,
    "preview": "import { ReactElement, useEffect } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useForm, FormProvider } f"
  },
  {
    "path": "src/components/ResponsiveDrawer.tsx",
    "chars": 5141,
    "preview": "import { Dispatch, Fragment, ReactElement, SetStateAction } from 'react'\nimport { NavLink, Link } from 'react-router-dom"
  },
  {
    "path": "src/components/SaveToFile.tsx",
    "chars": 522,
    "preview": "import { Button, ButtonProps } from '@material-ui/core'\nimport { PropsWithChildren, ReactElement } from 'react'\nimport {"
  },
  {
    "path": "src/components/ScrollTop.tsx",
    "chars": 889,
    "preview": "import { ReactElement } from 'react'\nimport { makeStyles, useScrollTrigger, Fab, Zoom } from '@material-ui/core'\nimport "
  },
  {
    "path": "src/components/SkipToLinks.tsx",
    "chars": 1735,
    "preview": "import { ReactElement } from 'react'\nimport {\n  makeStyles,\n  Link,\n  Theme,\n  Typography,\n  useMediaQuery\n} from '@mate"
  },
  {
    "path": "src/components/Summary.tsx",
    "chars": 5530,
    "preview": "import { ReactElement } from 'react'\nimport {\n  Avatar,\n  Box,\n  Grid,\n  List,\n  Typography,\n  TableContainer,\n  Table,\n"
  },
  {
    "path": "src/components/SummaryData.ts",
    "chars": 2207,
    "preview": "import Form from 'ustaxes/core/irsForms/Form'\nimport { TaxYear } from 'ustaxes/core/data'\nimport F1040For2020 from 'usta"
  },
  {
    "path": "src/components/TaxPayer/Address.tsx",
    "chars": 2254,
    "preview": "import { ReactElement } from 'react'\nimport { useFormContext, useWatch } from 'react-hook-form'\nimport {\n  LabeledCheckb"
  },
  {
    "path": "src/components/TaxPayer/PersonFields.tsx",
    "chars": 3205,
    "preview": "import { PropsWithChildren, ReactElement } from 'react'\nimport {\n  IconButton,\n  List,\n  ListItem,\n  ListItemIcon,\n  Lis"
  },
  {
    "path": "src/components/TaxPayer/SpouseAndDependent.tsx",
    "chars": 8665,
    "preview": "import { ReactElement, useEffect, useState } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useForm, FormPr"
  },
  {
    "path": "src/components/TaxPayer/TaxPayer.tsx",
    "chars": 5011,
    "preview": "import { ReactElement, useEffect } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { FormProvider, useForm } f"
  },
  {
    "path": "src/components/TaxPayer/index.tsx",
    "chars": 58,
    "preview": "import TaxPayer from './TaxPayer'\nexport default TaxPayer\n"
  },
  {
    "path": "src/components/UserSettings.tsx",
    "chars": 1146,
    "preview": "import { Check } from '@material-ui/icons'\nimport { ReactElement, useState } from 'react'\nimport { useDispatch } from 'r"
  },
  {
    "path": "src/components/Y2021/AdvanceChildTaxCredit.tsx",
    "chars": 3726,
    "preview": "import { ReactElement } from 'react'\nimport { Grid } from '@material-ui/core'\nimport { FormProvider, useForm } from 'rea"
  },
  {
    "path": "src/components/YearDropDown.tsx",
    "chars": 1811,
    "preview": "import { Button, Grid } from '@material-ui/core'\nimport { ReactElement } from 'react'\nimport { FormProvider, useForm } f"
  },
  {
    "path": "src/components/YearStatusBar.tsx",
    "chars": 866,
    "preview": "import { Link } from '@material-ui/core'\nimport { ReactElement, useState } from 'react'\nimport { useSelector } from 'rea"
  },
  {
    "path": "src/components/debug.tsx",
    "chars": 1336,
    "preview": "import { ReactElement } from 'react'\nimport { IconButton, makeStyles } from '@material-ui/core'\nimport { Star } from '@m"
  },
  {
    "path": "src/components/deductions/F1098eInfo.tsx",
    "chars": 2999,
    "preview": "import { ReactElement } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { FormProvider, useForm } from 'react-"
  },
  {
    "path": "src/components/deductions/ItemizedDeductions.tsx",
    "chars": 7860,
    "preview": "import { ReactElement, ReactNode } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { FormProvider, useForm } f"
  },
  {
    "path": "src/components/income/F1099Info.tsx",
    "chars": 13567,
    "preview": "import { ReactElement } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { Link } from 'react-router-dom'\nimpor"
  },
  {
    "path": "src/components/income/OtherInvestments.tsx",
    "chars": 6270,
    "preview": "import { ReactElement, useState } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useForm, FormProvider } fr"
  },
  {
    "path": "src/components/income/PartnershipIncome.tsx",
    "chars": 10390,
    "preview": "import { ReactElement, ReactNode } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useForm, FormProvider } f"
  },
  {
    "path": "src/components/income/RealEstate.tsx",
    "chars": 9322,
    "preview": "import { ReactElement } from 'react'\nimport { Message, useForm, useWatch, FormProvider } from 'react-hook-form'\nimport {"
  },
  {
    "path": "src/components/income/StockOptions.tsx",
    "chars": 5942,
    "preview": "import { ReactElement, ReactNode } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useForm, FormProvider } f"
  },
  {
    "path": "src/components/income/W2JobInfo.tsx",
    "chars": 10324,
    "preview": "import { Fragment, ReactElement, ReactNode, useState } from 'react'\nimport _ from 'lodash'\nimport { useDispatch, useSele"
  },
  {
    "path": "src/components/income/assets/AssetSummary.tsx",
    "chars": 3496,
    "preview": "import { useMediaQuery } from '@material-ui/core'\nimport { ReactElement } from 'react'\nimport DataTable, { TableColumn }"
  },
  {
    "path": "src/components/income/assets/ConfigurableDataTable.tsx",
    "chars": 4171,
    "preview": "import { Grid, TextField, useMediaQuery } from '@material-ui/core'\nimport { Alert } from '@material-ui/lab'\nimport { Rea"
  },
  {
    "path": "src/components/income/assets/DataTableStyle.ts",
    "chars": 1268,
    "preview": "import { createStyles, makeStyles, Theme } from '@material-ui/core'\nimport { createTheme } from 'react-data-table-compon"
  },
  {
    "path": "src/components/income/assets/FilteredAssetsTable.tsx",
    "chars": 8147,
    "preview": "import { Button, Grid, useMediaQuery } from '@material-ui/core'\nimport { ReactElement, useMemo, useState } from 'react'\n"
  },
  {
    "path": "src/components/income/assets/TransactionImporter.tsx",
    "chars": 13491,
    "preview": "import { ReactElement, useState } from 'react'\nimport { Button, Grid, useMediaQuery } from '@material-ui/core'\nimport { "
  },
  {
    "path": "src/components/input/Currency.tsx",
    "chars": 998,
    "preview": "import { ReactElement } from 'react'\nimport { CurrencyProps } from './types'\nimport NumberFormat from 'react-number-form"
  },
  {
    "path": "src/components/input/DatePicker.tsx",
    "chars": 2874,
    "preview": "import { ReactElement } from 'react'\nimport { FormControl, Grid } from '@material-ui/core'\nimport { Controller, useFormC"
  },
  {
    "path": "src/components/input/LabeledCheckbox.tsx",
    "chars": 1422,
    "preview": "import { ReactElement } from 'react'\nimport {\n  Checkbox,\n  FormControl,\n  FormControlLabel,\n  FormGroup,\n  Grid\n} from "
  },
  {
    "path": "src/components/input/LabeledDropdown.tsx",
    "chars": 3808,
    "preview": "import { useEffect, useRef, ReactElement } from 'react'\nimport _ from 'lodash'\nimport { useForkRef } from 'rooks'\nimport"
  },
  {
    "path": "src/components/input/LabeledInput.tsx",
    "chars": 5629,
    "preview": "import { useEffect, useRef, KeyboardEvent, ReactElement } from 'react'\nimport { useForkRef } from 'rooks'\nimport { Input"
  },
  {
    "path": "src/components/input/LabeledRadio.tsx",
    "chars": 1501,
    "preview": "import { ReactElement } from 'react'\nimport {\n  FormControl,\n  FormControlLabel,\n  FormLabel,\n  Grid,\n  Radio,\n  RadioGr"
  },
  {
    "path": "src/components/input/boxLabel.tsx",
    "chars": 194,
    "preview": "import { ReactElement } from 'react'\n\nconst boxLabel = (box: string, description: string): ReactElement => (\n  <>\n    <s"
  },
  {
    "path": "src/components/input/index.ts",
    "chars": 1054,
    "preview": "import Currency from './Currency'\nimport LabeledInput from './LabeledInput'\nimport { LabeledCheckbox } from './LabeledCh"
  },
  {
    "path": "src/components/input/styles.ts",
    "chars": 374,
    "preview": "import { createStyles, makeStyles, Theme } from '@material-ui/core'\n\nconst useStyles = makeStyles(({ palette: { type: th"
  },
  {
    "path": "src/components/input/types.ts",
    "chars": 1732,
    "preview": "import { ReactElement } from 'react'\nimport { Path, RegisterOptions } from 'react-hook-form'\nimport { PatternConfig } fr"
  },
  {
    "path": "src/components/pager.tsx",
    "chars": 4182,
    "preview": "import {\n  createContext,\n  useContext,\n  PropsWithChildren,\n  ReactElement,\n  ReactNode\n} from 'react'\nimport { useMedi"
  },
  {
    "path": "src/components/payments/EstimatedTaxes.tsx",
    "chars": 3581,
    "preview": "import { ReactElement } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { usePager } from 'u"
  },
  {
    "path": "src/components/savingsAccounts/IRA.tsx",
    "chars": 10196,
    "preview": "import { ReactElement } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useYearSelector, useYearDispatch } f"
  },
  {
    "path": "src/components/savingsAccounts/healthSavingsAccounts.tsx",
    "chars": 6857,
    "preview": "import { ReactElement } from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useSelector } from 'react-redux'\nimp"
  },
  {
    "path": "src/core/data/anonymize.ts",
    "chars": 3997,
    "preview": "import { YearsTaxesState } from 'ustaxes/redux'\nimport {\n  F3921,\n  Ira,\n  Supported1099,\n  Dependent,\n  Employer,\n  F10"
  },
  {
    "path": "src/core/data/countries.ts",
    "chars": 4418,
    "preview": "const countries: string[] = [\n  'Afghanistan',\n  'Åland Islands',\n  'Albania',\n  'Algeria',\n  'American Samoa',\n  'Andor"
  },
  {
    "path": "src/core/data/index.ts",
    "chars": 19397,
    "preview": "import { enumKeys } from '../util'\n\nexport enum TaxYears {\n  Y2019 = 2019,\n  Y2020 = 2020,\n  Y2021 = 2021\n}\n\nexport type"
  },
  {
    "path": "src/core/data/locationPostalCodes.ts",
    "chars": 1273,
    "preview": "import { State } from '.'\n\nconst locationPostalCodes: Array<[string, State]> = [\n  ['Alabama', 'AL'],\n  ['Alaska', 'AK']"
  },
  {
    "path": "src/core/data/questions.ts",
    "chars": 2138,
    "preview": "import {\n  FilingStatus,\n  Income1099Type,\n  Information,\n  QuestionTagName,\n  ValueTag\n} from '.'\n\nexport interface Que"
  },
  {
    "path": "src/core/data/validate.ts",
    "chars": 4085,
    "preview": "/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\nimport { DefinedError, ValidateFunction } from 'ajv'\nim"
  },
  {
    "path": "src/core/irsForms/Form.ts",
    "chars": 528,
    "preview": "import Fill from '../pdfFiller/Fill'\n\nexport type FormTag = string\n\n/**\n * Base interface for what every form implementa"
  }
]

// ... and 322 more files (download for full content)

About this extraction

This page contains the full source code of the thegrims/UsTaxes GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 522 files (1.2 MB), approximately 398.0k tokens, and a symbol index with 670 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!