bhl-forms 0.7.3 → 0.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/bhl-forms.es.js +551 -543
  2. package/dist/bhl-forms.iife.js +4 -4
  3. package/dist/bhl-forms.modern.es.js +649 -649
  4. package/dist/bhl-forms.modern.iife.js +7 -7
  5. package/dist/bhl-forms.modern.umd.js +7 -7
  6. package/dist/bhl-forms.umd.js +4 -4
  7. package/dist/forms/accidentsAndInjuries.es.js +1461 -1151
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +138 -137
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/business.es.js +1434 -1149
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +1329 -1043
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +1528 -1378
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +2000 -1807
  22. package/dist/forms/civilLawsuit.iife.js +1 -1
  23. package/dist/forms/civilLawsuit.json +1 -1
  24. package/dist/forms/coins.es.js +138 -137
  25. package/dist/forms/coins.iife.js +1 -1
  26. package/dist/forms/contracts.es.js +1349 -1050
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +1832 -1711
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +1541 -1385
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +1833 -1678
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +2381 -2010
  39. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  40. package/dist/forms/generalHomeImprovement.json +1 -1
  41. package/dist/forms/generalHomeImprovementThankYou.es.js +1795 -2008
  42. package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
  43. package/dist/forms/generalHomeImprovementThankYou.json +1 -1
  44. package/dist/forms/generalLegal.es.js +3037 -2535
  45. package/dist/forms/generalLegal.iife.js +1 -1
  46. package/dist/forms/generalLegal.json +1 -1
  47. package/dist/forms/generalLegalJustAnswer.es.js +3216 -2872
  48. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  49. package/dist/forms/generalLegalJustAnswer.json +1 -1
  50. package/dist/forms/generalLegalPopUnder.es.js +3037 -2535
  51. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnder.json +1 -1
  53. package/dist/forms/generalLegalPopUnderSingle.es.js +3216 -2872
  54. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  56. package/dist/forms/generalLegalSingle.es.js +3216 -2872
  57. package/dist/forms/generalLegalSingle.iife.js +1 -1
  58. package/dist/forms/generalLegalSingle.json +1 -1
  59. package/dist/forms/generalLegalThankYou.es.js +2825 -2303
  60. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  61. package/dist/forms/generalLegalThankYou.json +1 -1
  62. package/dist/forms/generalLegalThankYouConsultation.es.js +3216 -2872
  63. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  64. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  65. package/dist/forms/harassmentAndDiscrimination.es.js +1425 -1120
  66. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  67. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  68. package/dist/forms/landlordTenant.es.js +1395 -1106
  69. package/dist/forms/landlordTenant.iife.js +1 -1
  70. package/dist/forms/landlordTenant.json +1 -1
  71. package/dist/forms/malpractice.es.js +1531 -1223
  72. package/dist/forms/malpractice.iife.js +1 -1
  73. package/dist/forms/malpractice.json +1 -1
  74. package/dist/forms/mechanics.es.js +702 -530
  75. package/dist/forms/mechanics.iife.js +1 -1
  76. package/dist/forms/mechanics.json +1 -1
  77. package/dist/forms/patentsAndIP.es.js +1830 -1652
  78. package/dist/forms/patentsAndIP.iife.js +1 -1
  79. package/dist/forms/patentsAndIP.json +1 -1
  80. package/dist/forms/realEstate.es.js +2852 -2405
  81. package/dist/forms/realEstate.iife.js +1 -1
  82. package/dist/forms/realEstate.json +1 -1
  83. package/dist/forms/repossession.es.js +1568 -1251
  84. package/dist/forms/repossession.iife.js +1 -1
  85. package/dist/forms/repossession.json +1 -1
  86. package/dist/forms/ssdi.es.js +635 -520
  87. package/dist/forms/ssdi.iife.js +1 -1
  88. package/dist/forms/ssdi.json +1 -1
  89. package/dist/forms/testForm.es.js +409 -371
  90. package/dist/forms/testForm.iife.js +1 -1
  91. package/dist/forms/testForm.json +1 -1
  92. package/dist/forms/testRedirects.es.js +421 -316
  93. package/dist/forms/testRedirects.iife.js +1 -1
  94. package/dist/forms/testRedirects.json +1 -1
  95. package/dist/forms/vets.es.js +138 -137
  96. package/dist/forms/vets.iife.js +1 -1
  97. package/dist/forms/willsAndTrusts.es.js +1428 -1112
  98. package/dist/forms/willsAndTrusts.iife.js +1 -1
  99. package/dist/forms/willsAndTrusts.json +1 -1
  100. package/dist/main.css +1 -1
  101. package/package.json +1 -1
@@ -6,96 +6,101 @@ function LegalRedirectUrl() {
6
6
  return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
7
7
  }
8
8
 
9
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
10
- const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
11
- const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
12
- const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
13
- const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
14
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
15
- const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
9
+ const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL =
10
+ '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
11
+ const DEFAULT_COMMENTS_LABEL_LEGAL = "Please briefly describe your legal issue in a few words:";
12
+ const DEFAULT_FINAL_HEADLINE_LEGAL = "Submit Your Case";
13
+ const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL =
14
+ '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
+ const DEFAULT_FINAL_SUBHEADLINE_LEGAL =
16
+ "You may benefit from speaking with a legal professional. Please verify your contact information.";
17
+ const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL =
18
+ '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
19
+ const TCPA_LANGUAGE_LEGAL =
20
+ "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
16
21
  const defaultLegalImprovementCrossSells = {
17
- 'Auto and Car Accidents': 'Injured in a Car Accident',
18
- 'Personal Injury': 'Personal or Workplace Injury',
19
- 'DUI and DWI': 'Involved in a DUI/DWI',
20
- 'Wills and Trusts': 'Need a Will or Trust',
21
- 'Power of Attorney': 'Update Power of Attorney',
22
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
22
+ "Auto and Car Accidents": "Injured in a Car Accident",
23
+ "Personal Injury": "Personal or Workplace Injury",
24
+ "DUI and DWI": "Involved in a DUI/DWI",
25
+ "Wills and Trusts": "Need a Will or Trust",
26
+ "Power of Attorney": "Update Power of Attorney",
27
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
23
28
  };
24
29
  const CROSS_SELL_OPTION_MAP_LEGAL = {
25
30
  // Values can be a list or a map of value -> display value
26
- 'Auto and Car Accidents': {
27
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
28
- 'Wills and Trusts': 'Need a Will or Trust',
29
- 'Workers Compensation': 'Workplace Injury',
30
- 'Power of Attorney': 'Update Power of Attorney',
31
- 'Divorce and Separation': 'Need a Divorce or Separation',
32
- 'Child Custody': 'Need help with Child Custody',
31
+ "Auto and Car Accidents": {
32
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
33
+ "Wills and Trusts": "Need a Will or Trust",
34
+ "Workers Compensation": "Workplace Injury",
35
+ "Power of Attorney": "Update Power of Attorney",
36
+ "Divorce and Separation": "Need a Divorce or Separation",
37
+ "Child Custody": "Need help with Child Custody",
33
38
  },
34
39
  "Personal Injury": {
35
- 'DUI and DWI': 'Involved in a DUI/DWI',
36
- 'Wills and Trusts': 'Need a Will or Trust',
37
- 'Power of Attorney': 'Update Power of Attorney',
38
- 'Divorce and Separation': 'Need a Divorce or Separation',
39
- 'Child Custody': 'Need help with Child Custody',
40
+ "DUI and DWI": "Involved in a DUI/DWI",
41
+ "Wills and Trusts": "Need a Will or Trust",
42
+ "Power of Attorney": "Update Power of Attorney",
43
+ "Divorce and Separation": "Need a Divorce or Separation",
44
+ "Child Custody": "Need help with Child Custody",
40
45
  // TODO add one more?
41
46
  },
42
47
  "Workers Compensation": {
43
- 'DUI and DWI': 'Involved in a DUI/DWI',
44
- 'Wills and Trusts': 'Need a Will or Trust',
45
- 'Power of Attorney': 'Update Power of Attorney',
46
- 'Divorce and Separation': 'Need a Divorce or Separation',
47
- 'Child Custody': 'Need help with Child Custody',
48
+ "DUI and DWI": "Involved in a DUI/DWI",
49
+ "Wills and Trusts": "Need a Will or Trust",
50
+ "Power of Attorney": "Update Power of Attorney",
51
+ "Divorce and Separation": "Need a Divorce or Separation",
52
+ "Child Custody": "Need help with Child Custody",
48
53
  // TODO add one more?
49
54
  },
50
55
  "DUI and DWI": {
51
- 'Personal Injury': 'Personal or Workplace Injury',
52
- 'Wills and Trusts': 'Need a Will or Trust',
53
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
54
- 'Power of Attorney': 'Update Power of Attorney',
55
- 'Divorce and Separation': 'Need a Divorce or Separation',
56
- 'Child Custody': 'Need help with Child Custody',
56
+ "Personal Injury": "Personal or Workplace Injury",
57
+ "Wills and Trusts": "Need a Will or Trust",
58
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
59
+ "Power of Attorney": "Update Power of Attorney",
60
+ "Divorce and Separation": "Need a Divorce or Separation",
61
+ "Child Custody": "Need help with Child Custody",
57
62
  },
58
63
  "Wills and Trusts": {
59
- 'Auto and Car Accidents': 'Injured in a Car Accident',
60
- 'Personal Injury': 'Personal or Workplace Injury',
61
- 'DUI and DWI': 'Involved in a DUI/DWI',
62
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
63
- 'Divorce and Separation': 'Need a Divorce or Separation',
64
- 'Child Custody': 'Need help with Child Custody',
64
+ "Auto and Car Accidents": "Injured in a Car Accident",
65
+ "Personal Injury": "Personal or Workplace Injury",
66
+ "DUI and DWI": "Involved in a DUI/DWI",
67
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
68
+ "Divorce and Separation": "Need a Divorce or Separation",
69
+ "Child Custody": "Need help with Child Custody",
65
70
  },
66
71
  "Probate and Estates": {
67
- 'Auto and Car Accidents': 'Injured in a Car Accident',
68
- 'Personal Injury': 'Personal or Workplace Injury',
69
- 'DUI and DWI': 'Involved in a DUI/DWI',
70
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
71
- 'Divorce and Separation': 'Need a Divorce or Separation',
72
- 'Child Custody': 'Need help with Child Custody',
72
+ "Auto and Car Accidents": "Injured in a Car Accident",
73
+ "Personal Injury": "Personal or Workplace Injury",
74
+ "DUI and DWI": "Involved in a DUI/DWI",
75
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
76
+ "Divorce and Separation": "Need a Divorce or Separation",
77
+ "Child Custody": "Need help with Child Custody",
73
78
  },
74
79
  "Power of Attorney": {
75
- 'Auto and Car Accidents': 'Injured in a Car Accident',
76
- 'Personal Injury': 'Personal or Workplace Injury',
77
- 'DUI and DWI': 'Involved in a DUI/DWI',
78
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
79
- 'Divorce and Separation': 'Need a Divorce or Separation',
80
- 'Child Custody': 'Need help with Child Custody',
80
+ "Auto and Car Accidents": "Injured in a Car Accident",
81
+ "Personal Injury": "Personal or Workplace Injury",
82
+ "DUI and DWI": "Involved in a DUI/DWI",
83
+ "Social Security Disability and Insurance": "Interest in Disability Benefits",
84
+ "Divorce and Separation": "Need a Divorce or Separation",
85
+ "Child Custody": "Need help with Child Custody",
81
86
  },
82
87
  "Long Term Disability": {
83
- 'Auto and Car Accidents': 'Injured in a Car Accident',
84
- 'DUI and DWI': 'Involved in a DUI/DWI',
85
- 'Wills and Trusts': 'Need a Will or Trust',
86
- 'Power of Attorney': 'Update Power of Attorney',
87
- 'Divorce and Separation': 'Need a Divorce or Separation',
88
- 'Child Custody': 'Need help with Child Custody',
88
+ "Auto and Car Accidents": "Injured in a Car Accident",
89
+ "DUI and DWI": "Involved in a DUI/DWI",
90
+ "Wills and Trusts": "Need a Will or Trust",
91
+ "Power of Attorney": "Update Power of Attorney",
92
+ "Divorce and Separation": "Need a Divorce or Separation",
93
+ "Child Custody": "Need help with Child Custody",
89
94
  },
90
95
  "Social Security Disability and Insurance": {
91
- 'Auto and Car Accidents': 'Injured in a Car Accident',
92
- 'DUI and DWI': 'Involved in a DUI/DWI',
93
- 'Wills and Trusts': 'Need a Will or Trust',
94
- 'Power of Attorney': 'Update Power of Attorney',
95
- 'Divorce and Separation': 'Need a Divorce or Separation',
96
- 'Child Custody': 'Need help with Child Custody',
96
+ "Auto and Car Accidents": "Injured in a Car Accident",
97
+ "DUI and DWI": "Involved in a DUI/DWI",
98
+ "Wills and Trusts": "Need a Will or Trust",
99
+ "Power of Attorney": "Update Power of Attorney",
100
+ "Divorce and Separation": "Need a Divorce or Separation",
101
+ "Child Custody": "Need help with Child Custody",
97
102
  },
98
- '*': defaultLegalImprovementCrossSells,
103
+ "*": defaultLegalImprovementCrossSells,
99
104
  };
100
105
 
101
106
  // ------ Common Base Settings
@@ -104,32 +109,49 @@ const checkbox = (updates) => {
104
109
  if (updates.name && !updates.id) {
105
110
  updates.id = updates.name;
106
111
  }
107
- return merge({
108
- $formkit: 'checkbox',
109
- validation: 'required',
110
- validationMessages: {
111
- required: 'Field is required'
112
- }
113
- }, updates)
112
+ return merge(
113
+ {
114
+ $formkit: "checkbox",
115
+ validation: "required",
116
+ validationMessages: {
117
+ required: "Field is required",
118
+ },
119
+ },
120
+ updates
121
+ )
114
122
  };
115
123
 
116
124
  const sbsCheckbox = (updates) => {
117
- updates.legendClass = 'legend-left required';
118
- updates.fieldsetClass = '$reset side-by-side';
119
- updates.optionsClass = 't-pl-1';
120
- updates.innerClass = 't-flex t-items-center';
121
- updates.wrapperClass = 't-mb-3';
125
+ updates.legendClass = "legend-left required";
126
+ updates.fieldsetClass = "$reset side-by-side";
127
+ updates.optionsClass = "t-pl-1";
128
+ updates.innerClass = "t-flex t-items-center";
129
+ updates.wrapperClass = "t-mb-3";
122
130
  return checkbox(updates)
123
131
  };
124
132
 
125
133
  const col2Checkbox = (updates) => {
126
134
  if (!updates || !updates.legendClass) {
127
- updates.legendClass = 'required';
135
+ updates.legendClass = "required";
128
136
  }
129
- updates.fieldsetClass = '$reset';
130
- updates.optionsClass = 't-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
131
- updates.innerClass = 't-items-start';
132
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
137
+ updates.fieldsetClass = "$reset";
138
+ updates.optionsClass = "t-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
139
+ updates.innerClass = "t-items-start";
140
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
141
+ return checkbox(updates)
142
+ };
143
+
144
+ const verticalCol2Checkbox = (updates) => {
145
+ if (!updates || !updates.legendClass) {
146
+ updates.legendClass = "required t-w-[100%] t-text-center";
147
+ }
148
+ updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col";
149
+ updates.innerClass = "t-items-start";
150
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
151
+ updates.optionClass = "t-pl-4 md:t-pl-16 md:t-min-w-[200px]";
152
+ updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
153
+ updates.messagesClass = "t-flex t-justify-center";
154
+ updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
133
155
  return checkbox(updates)
134
156
  };
135
157
 
@@ -137,70 +159,121 @@ const radio = (updates) => {
137
159
  if (updates.name && !updates.id) {
138
160
  updates.id = updates.name;
139
161
  }
140
- return merge({
141
- $formkit: 'radio',
142
- validation: 'required',
143
- validationMessages: {
144
- required: 'Field is required'
162
+ return merge(
163
+ {
164
+ $formkit: "radio",
165
+ validation: "required",
166
+ validationMessages: {
167
+ required: "Field is required",
168
+ },
169
+ optionsClass: "t-pt-3 t-pl-1",
170
+ legendClass: "required",
145
171
  },
146
- optionsClass: 't-pt-3 t-pl-1',
147
- legendClass: 'required'
148
- }, updates)
172
+ updates
173
+ )
149
174
  };
150
175
 
151
176
  const col2Radio = (updates) => {
152
- updates.legendClass = 'required';
153
- updates.fieldsetClass = '$reset';
154
- updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
155
- updates.innerClass = 't-items-start';
156
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
177
+ updates.legendClass = "required";
178
+ updates.fieldsetClass = "$reset";
179
+ updates.optionsClass = "t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
180
+ updates.innerClass = "t-items-start";
181
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
182
+ return radio(updates)
183
+ };
184
+
185
+ // TODO: rename
186
+ const col2RadioCenter = (updates) => {
187
+ updates.legendClass = "required t-w-[100%] t-text-center";
188
+ if (typeof updates.fieldsetClass === "undefined") {
189
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
190
+ }
191
+ updates.innerClass = "t-items-start";
192
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
193
+ updates.optionClass = "t-pl-4 md:t-pl-8 md:t-min-w-[200px]";
194
+ updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
195
+ updates.messagesClass = "t-flex t-justify-center";
196
+ updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
157
197
  return radio(updates)
158
198
  };
159
199
 
160
200
  const sbs2ColRadio = (updates) => {
161
- updates.legendClass = 'legend-left-flex md:t-max-w-[40%] required';
162
- updates.fieldsetClass = '$reset side-by-side-flex';
163
- updates.optionsClass = 'md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125';
164
- updates.innerClass = 't-flex t-items-start';
165
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
201
+ updates.legendClass = "legend-left-flex md:t-max-w-[40%] required";
202
+ updates.fieldsetClass = "$reset side-by-side-flex";
203
+ updates.optionsClass = "md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125";
204
+ updates.innerClass = "t-flex t-items-start";
205
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
166
206
  return radio(updates)
167
207
  };
168
208
 
169
209
  const sbs2ItemRadio = (updates) => {
170
- updates.legendClass = 'legend-left t-pb-1 required';
171
- updates.fieldsetClass = '$reset side-by-side t-items-center';
172
- updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
173
- updates.innerClass = 't-flex t-items-center';
174
- updates.optionClass = 't-pr-1';
210
+ updates.legendClass = "legend-left t-pb-1 required";
211
+ updates.fieldsetClass = "$reset side-by-side t-items-center";
212
+ updates.optionsClass = "t-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center";
213
+ updates.innerClass = "t-flex t-items-center";
214
+ updates.optionClass = "t-pr-1";
175
215
  return radio(updates)
176
216
  };
177
217
 
178
218
  const sbsYesNoRadio = (updates) => {
179
- updates.options = ['Yes', 'No'];
219
+ updates.options = ["Yes", "No"];
180
220
  return sbs2ItemRadio(updates)
181
221
  };
182
222
 
223
+ const verticalButtonRadio = (updates) => {
224
+ updates.legendClass = "legend-left";
225
+ updates.fieldsetClass = "$reset t-flex t-justify-center t-flex-col-reverse t-items-center";
226
+ if (typeof updates.optionsClass === "undefined") {
227
+ updates.optionsClass = "t-flex t-flex-col sm:t-flex-row t-justify-center t-my-3";
228
+ }
229
+ updates.optionClass = "radiobtn t-my-2 sm:t-my-0 t-mx-2 md:t-mx-5";
230
+ updates.wrapperClass = "$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]";
231
+ updates.labelClass = "t-font-semibold t-text-[#1e448f] t-w-[100%]";
232
+ updates.decoratorIcon = false;
233
+ updates.messagesClass = "t-flex t-justify-center";
234
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
235
+ return radio(updates)
236
+ };
237
+
238
+ const verticalYesNoRadio = (updates) => {
239
+ updates.options = ["Yes", "No"];
240
+ updates.optionsClass = "t-flex t-justify-center t-my-3";
241
+ return verticalButtonRadio(updates)
242
+ };
243
+
183
244
  const select = (updates) => {
184
245
  if (updates.name && !updates.id) {
185
246
  updates.id = updates.name;
186
247
  }
187
- return merge({
188
- $formkit: 'select',
189
- placeholder: "Please Select",
190
- validation: 'required',
191
- validationMessages: {
192
- required: 'Field is required'
248
+ return merge(
249
+ {
250
+ $formkit: "select",
251
+ placeholder: "Please Select",
252
+ validation: "required",
253
+ validationMessages: {
254
+ required: "Field is required",
255
+ },
256
+ inputClass: "t-bg-white",
257
+ labelClass: "required",
193
258
  },
194
- inputClass: 't-bg-white',
195
- labelClass: 'required'
196
- }, updates)
259
+ updates
260
+ )
197
261
  };
198
262
 
199
263
  const sbsSelect = (updates) => {
200
- updates.labelClass = 'required';
201
- updates.wrapperClass = 'side-by-side t-items-center';
202
- updates.innerClass = 'select-height-content';
203
- updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
264
+ updates.labelClass = "required";
265
+ updates.wrapperClass = "side-by-side t-items-center";
266
+ updates.innerClass = "select-height-content";
267
+ updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
268
+ return select(updates)
269
+ };
270
+
271
+ const verticalSelect = (updates) => {
272
+ updates.labelClass = "required";
273
+ updates.wrapperClass = "t-flex t-justify-center";
274
+ updates.messagesClass = "t-flex t-justify-center";
275
+ updates.inputClass = "t-min-w-[150px] t-bg-white";
276
+ updates.helpClass = "t-mt-2.5 t-text-center";
204
277
  return select(updates)
205
278
  };
206
279
 
@@ -208,26 +281,29 @@ const text = (updates) => {
208
281
  if (updates.name && !updates.id) {
209
282
  updates.id = updates.name;
210
283
  }
211
- return merge({
212
- $formkit: 'text',
213
- validation: 'required',
214
- validationMessages: {
215
- required: 'Field is required'
284
+ return merge(
285
+ {
286
+ $formkit: "text",
287
+ validation: "required",
288
+ validationMessages: {
289
+ required: "Field is required",
290
+ },
291
+ labelClass: "required",
216
292
  },
217
- labelClass: 'required'
218
- }, updates)
293
+ updates
294
+ )
219
295
  };
220
296
 
221
297
  const sbsText = (updates) => {
222
- updates.wrapperClass = 'side-by-side t-items-center';
298
+ updates.wrapperClass = "side-by-side t-items-center";
223
299
  return text(updates)
224
300
  };
225
301
 
226
302
  const verticalText = (updates) => {
227
- updates.wrapperClass = 't-flex t-justify-center';
228
- updates.messagesClass = 't-flex t-justify-center';
229
- updates.inputClass = 't-text-center';
230
- updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
303
+ updates.wrapperClass = "t-flex t-justify-center";
304
+ updates.messagesClass = "t-flex t-justify-center";
305
+ updates.inputClass = "t-text-center";
306
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
231
307
  return text(updates)
232
308
  };
233
309
 
@@ -235,539 +311,807 @@ const textArea = (updates) => {
235
311
  if (updates.name && !updates.id) {
236
312
  updates.id = updates.name;
237
313
  }
238
- return merge({
239
- $formkit: 'textarea',
240
- rows: 5,
241
- maxlength: 500,
242
- validation: 'required',
243
- validationMessages: {
244
- required: 'Field is required'
314
+ return merge(
315
+ {
316
+ $formkit: "textarea",
317
+ rows: 5,
318
+ maxlength: 500,
319
+ validation: "required",
320
+ validationMessages: {
321
+ required: "Field is required",
322
+ },
323
+ innerClass: "t-max-w-xl",
324
+ labelClass: "required",
245
325
  },
246
- innerClass: 't-max-w-xl',
247
- labelClass: 'required'
248
- }, updates)
326
+ updates
327
+ )
249
328
  };
250
329
 
251
330
  const date = (updates) => {
252
331
  if (updates.name && !updates.id) {
253
332
  updates.id = updates.name;
254
333
  }
255
- return merge({
256
- $formkit: 'DatePicker',
257
- validation: 'required',
258
- validationMessages: {
259
- required: 'Field is required'
334
+ return merge(
335
+ {
336
+ $formkit: "DatePicker",
337
+ validation: "required",
338
+ validationMessages: {
339
+ required: "Field is required",
340
+ },
341
+ labelClass: "required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500",
342
+ innerClass:
343
+ "t-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500",
260
344
  },
261
- labelClass: 'required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500',
262
- innerClass: 't-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500'
263
- }, updates)
345
+ updates
346
+ )
264
347
  };
265
348
 
266
349
  const sbsDate = (updates) => {
267
- updates.wrapperClass = 'side-by-side t-items-center';
350
+ updates.wrapperClass = "side-by-side t-items-center";
268
351
  return date(updates)
269
352
  };
270
353
 
271
- const email = (scope) => sbsText({
272
- $formkit: 'email',
273
- name: scope ? scope + ':' + 'Email' : 'Email',
274
- label: 'Email Address:',
275
- placeholder: 'email@domain.com',
276
- autocomplete: 'email',
277
- 'data-tf-sensitive': 'false',
278
- validation: 'required|email',
279
- validationMessages: {
280
- required: 'Email is required',
281
- email: 'Invalid Email'
282
- }
283
- });
354
+ const verticalDate = (updates) => {
355
+ updates.wrapperClass = "t-flex t-justify-center";
356
+ updates.inputClass = "t-text-center";
357
+ updates.messagesClass = "t-flex t-justify-center";
358
+ return date(updates)
359
+ };
284
360
 
285
- const firstName = (scope) => sbsText({
286
- label: 'First Name:',
287
- placeholder: 'First',
288
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
289
- autocomplete: "given-name",
290
- validationMessages: {
291
- required: 'First Name is required'
292
- }
293
- });
361
+ const email = (scope, vertical, updates = {}) => {
362
+ const func = vertical ? verticalText : sbsText;
363
+ const label = vertical ? updates.label : "Email Address:";
364
+ return func({
365
+ $formkit: "email",
366
+ name: scope ? scope + ":" + "Email" : "Email",
367
+ label,
368
+ placeholder: "email@domain.com",
369
+ autocomplete: "email",
370
+ "data-tf-sensitive": "false",
371
+ validation: "required|email",
372
+ validationMessages: {
373
+ required: "Email is required",
374
+ email: "Invalid Email",
375
+ },
376
+ ...updates,
377
+ })
378
+ };
294
379
 
295
- const lastName = (scope) => sbsText({
296
- label: 'Last Name:',
297
- placeholder: 'Last',
298
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
299
- autocomplete: "family-name",
300
- validationMessages: {
301
- required: 'Last Name is required'
302
- }
303
- });
380
+ const firstName = (scope, vertical, updates = {}) => {
381
+ const func = vertical ? verticalText : sbsText;
382
+ const label = vertical ? updates.label : "First Name:";
383
+ return func({
384
+ label,
385
+ placeholder: "First",
386
+ name: scope ? scope + ":" + "First_Name" : "First_Name",
387
+ autocomplete: "given-name",
388
+ validationMessages: {
389
+ required: "First Name is required",
390
+ },
391
+ ...updates,
392
+ })
393
+ };
304
394
 
305
- const phone = (scope) => sbsText({
306
- $formkit: 'tel',
307
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
308
- label: 'Phone Number:',
309
- placeholder: '###-###-####',
310
- maxlength: 12,
311
- help: '10-digit phone number, hyphens optional',
312
- autocomplete: 'tel-national',
313
- 'data-tf-sensitive': 'false',
314
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
315
- validationMessages: {
316
- required: 'Field is required',
317
- matches: 'Invalid Phone Format, use ###-###-####',
318
- valid_phone: 'Invalid Phone Number'
319
- },
320
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
321
- });
395
+ const lastName = (scope, vertical, updates = {}) => {
396
+ const func = vertical ? verticalText : sbsText;
397
+ const label = vertical ? updates.label : "Last Name:";
398
+ return func({
399
+ label,
400
+ placeholder: "Last",
401
+ name: scope ? scope + ":" + "Last_Name" : "Last_Name",
402
+ autocomplete: "family-name",
403
+ validationMessages: {
404
+ required: "Last Name is required",
405
+ },
406
+ ...updates,
407
+ })
408
+ };
322
409
 
410
+ const phone = (scope, vertical, updates = {}) => {
411
+ const func = vertical ? verticalText : sbsText;
412
+ const label = vertical ? updates.label : "Phone Number:";
413
+ return func({
414
+ $formkit: "tel",
415
+ name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
416
+ label,
417
+ placeholder: "###-###-####",
418
+ maxlength: 12,
419
+ help: "10-digit phone number, hyphens optional",
420
+ autocomplete: "tel-national",
421
+ "data-tf-sensitive": "false",
422
+ validation: "required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone",
423
+ validationMessages: {
424
+ required: "Phone Number is required",
425
+ matches: "Invalid Phone Format, use ###-###-####",
426
+ valid_phone: "Invalid Phone Number",
427
+ },
428
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
429
+ ...updates,
430
+ })
431
+ };
323
432
 
324
433
  const zipcode = (scope, vertical, updates = {}) => {
325
434
  const func = vertical ? verticalText : sbsText;
326
- const label = vertical ? (updates.label) : 'Zip Code:';
327
- const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
435
+ const label = vertical ? updates.label : "Zip Code:";
436
+ const help = vertical ? updates.help ?? "We try to match you with local help" : null;
328
437
  return func({
329
438
  label,
330
439
  help,
331
- placeholder: '#####',
332
- name: scope ? scope + ':' + 'Zip' : 'Zip',
440
+ placeholder: "#####",
441
+ name: scope ? scope + ":" + "Zip" : "Zip",
333
442
  maxlength: 5,
334
443
  inputmode: "numeric",
335
- autocomplete: 'postal-code',
336
- validation: 'required|matches:/^[0-9]{5}$/',
444
+ autocomplete: "postal-code",
445
+ validation: "required|matches:/^[0-9]{5}$/",
337
446
  validationMessages: {
338
- required: 'Zip Code is required',
339
- matches: 'Invalid Zip Code'
447
+ required: "Zip Code is required",
448
+ matches: "Invalid Zip Code",
340
449
  },
341
- ...updates
450
+ ...updates,
342
451
  })
343
452
  };
344
453
 
345
454
  const applicantAge = (scope, vertical, updates = {}) => {
346
455
  const func = vertical ? verticalText : sbsText;
347
- const label = vertical ? (updates.label) : 'Age of Applicant?';
348
- const value = vertical ? (updates.value ?? "50") : null;
349
- return func(merge({
350
- label,
351
- placeholder: 'Age between 18 and 65',
352
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
353
- value,
354
- maxlength: 2,
355
- inputmode: "numeric",
356
- validation: "required|min:18,max:65",
357
- validationMessages: {
358
- required: 'Applicant Age is required',
359
- min: 'Invalid Age - must be between 18 and 65',
360
- max: 'Invalid Age - must be between 18 and 65',
361
- },
362
- ...updates
363
- }))
456
+ const label = vertical ? updates.label : "Age of Applicant?";
457
+ const value = vertical ? updates.value ?? "50" : null;
458
+ return func(
459
+ merge({
460
+ label,
461
+ placeholder: "Age between 18 and 65",
462
+ name: scope ? scope + ":" + "Applicant_Age" : "Applicant_Age",
463
+ value,
464
+ maxlength: 2,
465
+ inputmode: "numeric",
466
+ validation: "required|min:18,max:65",
467
+ validationMessages: {
468
+ required: "Applicant Age is required",
469
+ min: "Invalid Age - must be between 18 and 65",
470
+ max: "Invalid Age - must be between 18 and 65",
471
+ },
472
+ ...updates,
473
+ })
474
+ )
364
475
  };
365
476
 
366
- const atFault = (scope) => sbsYesNoRadio({
367
- name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
368
- label: 'Were You at Fault?'
369
- });
370
-
371
- const bankruptcyCrossSell = () => sbsCheckbox({
372
- label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
373
- help: "Note: you will be contacted separately by a bankruptcy/debt expert",
374
- name: 'CrossSell_Bankruptcy',
375
- id: 'CrossSell_Bankruptcy',
376
- if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
377
- validation: null,
378
- helpClass: "!t-text-sm"
379
- });
477
+ const atFault = (scope, vertical, updates = {}) => {
478
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
479
+ const label = vertical ? updates.label : "Were You at Fault?";
480
+ return func(
481
+ merge(
482
+ {
483
+ label,
484
+ name: scope ? scope + ":" + "At_Fault" : "At_Fault",
485
+ },
486
+ updates
487
+ )
488
+ )
489
+ };
380
490
 
381
- const bloodContentAlcoholTest = (scope) => sbsSelect({
382
- name: scope ? scope + ':' + 'Blood_Alcohol_Content_Test' : 'Blood_Alcohol_Content_Test',
383
- label: 'Blood Alcohol Content Measured by Test:',
384
- options: [
385
- "No Test",
386
- "0.00% - 0.04%",
387
- "0.05% - 0.08%",
388
- "0.09% - 0.12%",
389
- "0.13% - 0.16%",
390
- "0.17% - 0.20%",
391
- "More than 0.20%",
392
- "Don't know"
393
- ]
394
- });
491
+ const bankruptcyCrossSell = (scope) =>
492
+ sbsCheckbox({
493
+ label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
494
+ help: "Note: you will be contacted separately by a bankruptcy/debt expert",
495
+ name: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
496
+ id: scope ? scope + ":CrossSell_Bankruptcy" : "CrossSell_Bankruptcy",
497
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
498
+ validation: null,
499
+ helpClass: "!t-text-sm",
500
+ });
501
+
502
+ const bloodContentAlcoholTest = (scope, vertical, updates = {}) => {
503
+ const func = vertical ? verticalSelect : sbsSelect;
504
+ const label = vertical ? updates.label : "Blood Alcohol Content Measured by Test:";
505
+ return func(
506
+ merge(
507
+ {
508
+ label,
509
+ name: scope ? scope + ":" + "Blood_Alcohol_Content_Test" : "Blood_Alcohol_Content_Test",
510
+ options: [
511
+ "No Test",
512
+ "0.00% - 0.04%",
513
+ "0.05% - 0.08%",
514
+ "0.09% - 0.12%",
515
+ "0.13% - 0.16%",
516
+ "0.17% - 0.20%",
517
+ "More than 0.20%",
518
+ "Don't know",
519
+ ],
520
+ },
521
+ updates
522
+ )
523
+ )
524
+ };
395
525
 
396
- const causeOfInjury = (scope) => sbsSelect({
397
- name: scope ? scope + ':' + 'Cause_Of_Injury' : 'Cause_Of_Injury',
398
- label: 'Cause of Injury:',
399
- options: [
400
- "Traumatic Physical Injury (Accident)",
401
- "Repeated Trauma Injury",
402
- "Mental Injury",
403
- "Occupational Disease",
404
- "Not Sure"
405
- ]
406
- });
526
+ const causeOfInjury = (scope, vertical, updates = {}) => {
527
+ const func = vertical ? col2RadioCenter : sbsSelect;
528
+ const label = vertical ? updates.label : "Cause of Injury:";
529
+ return func(
530
+ merge(
531
+ {
532
+ label,
533
+ name: scope ? scope + ":" + "Cause_Of_Injury" : "Cause_Of_Injury",
534
+ options: [
535
+ "Traumatic Physical Injury (Accident)",
536
+ "Repeated Trauma Injury",
537
+ "Mental Injury",
538
+ "Occupational Disease",
539
+ "Not Sure",
540
+ ],
541
+ },
542
+ updates
543
+ )
544
+ )
545
+ };
407
546
 
408
- const childHome = (scope) => sbsSelect({
409
- name: scope ? scope + ':' + 'Child_Home' : 'Child_Home',
410
- label: 'With Whom Do the Children Currently Live?',
411
- options: [
412
- 'Mother',
413
- 'Father',
414
- 'Grandparents',
415
- 'Other'
416
- ]
417
- });
547
+ const childHome = (scope, vertical, updates = {}) => {
548
+ const func = vertical ? col2RadioCenter : sbsSelect;
549
+ const label = vertical ? updates.label : "With Whom Do the Children Currently Live?";
550
+ return func(
551
+ merge(
552
+ {
553
+ label,
554
+ name: scope ? scope + ":" + "Child_Home" : "Child_Home",
555
+ options: ["Mother", "Father", "Grandparents", "Other"],
556
+ },
557
+ updates
558
+ )
559
+ )
560
+ };
418
561
 
419
- const childPrimaryCaregiver = (scope) => sbsSelect({
420
- name: scope ? scope + ':' + 'Child_Primary_Caregiver' : 'Child_Primary_Caregiver',
421
- label: 'Who is the Primary Caregiver?',
422
- options: [
423
- 'Mother',
424
- 'Father',
425
- 'Other'
426
- ]
427
- });
562
+ const childPrimaryCaregiver = (scope, vertical, updates = {}) => {
563
+ const func = vertical ? verticalButtonRadio : sbsSelect;
564
+ const label = vertical ? updates.label : "Who is the Primary Caregiver?";
565
+ return func(
566
+ merge(
567
+ {
568
+ label,
569
+ name: scope ? scope + ":" + "Child_Primary_Caregiver" : "Child_Primary_Caregiver",
570
+ options: ["Mother", "Father", "Other"],
571
+ },
572
+ updates
573
+ )
574
+ )
575
+ };
428
576
 
429
- const childRelationship = (scope) => sbsSelect({
430
- name: scope ? scope + ':' + 'Child_Relationship' : 'Child_Relationship',
431
- label: 'Your Relationship to Child(ren):',
432
- options: [
433
- 'Father',
434
- 'Mother',
435
- 'Grandparent',
436
- 'Aunt/Uncle',
437
- 'Other'
438
- ]
439
- });
577
+ const childRelationship = (scope, vertical, updates = {}) => {
578
+ const func = vertical ? col2RadioCenter : sbsSelect;
579
+ const label = vertical ? updates.label : "Your Relationship to Child(ren):";
580
+ return func(
581
+ merge(
582
+ {
583
+ label,
584
+ name: scope ? scope + ":" + "Child_Relationship" : "Child_Relationship",
585
+ options: ["Father", "Mother", "Grandparent", "Aunt/Uncle", "Other"],
586
+ },
587
+ updates
588
+ )
589
+ )
590
+ };
440
591
 
441
- const claimStatus = (scope) => sbsSelect({
442
- name: scope ? scope + ':' + 'Claim_Status' : 'Claim_Status',
443
- label: "Status of Claim:",
444
- options: [
445
- "No action taken yet",
446
- "Demand for compensation made",
447
- "Lawsuit filed",
448
- "Other"
449
- ]
450
- });
592
+ const claimStatus = (scope, vertical, updates = {}) => {
593
+ const func = vertical ? col2RadioCenter : sbsSelect;
594
+ const label = vertical ? updates.label : "Status of Claim:";
595
+ return func(
596
+ merge(
597
+ {
598
+ label,
599
+ name: scope ? scope + ":" + "Claim_Status" : "Claim_Status",
600
+ options: ["No action taken yet", "Demand for compensation made", "Lawsuit filed", "Other"],
601
+ },
602
+ updates
603
+ )
604
+ )
605
+ };
451
606
 
452
- const comments = (updates, scope) => textArea(
453
- merge({
454
- name: scope ? scope + ':' + 'Comments' : 'Comments',
455
- label: 'Please briefly describe your situation in a few words:',
456
- placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
457
- }, updates)
458
- );
459
-
460
- const degreeOfInterest = (scope, help) => sbsSelect({
461
- name: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
462
- id: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
463
- label: 'How Likely Are You to Pay if Your Issue Could be Resolved?',
464
- help: help,
465
- options: [
466
- 'Definitely',
467
- 'Probably',
468
- 'Maybe',
469
- "Absolutely Can't Afford"
470
- ]
471
- });
607
+ // TODO: vertical not supported yet
608
+ const comments = (scope, vertical, updates) =>
609
+ textArea(
610
+ merge(
611
+ {
612
+ name: scope ? scope + ":" + "Comments" : "Comments",
613
+ label: "Please briefly describe your situation in a few words:",
614
+ placeholder:
615
+ 'For Example: "I would like help with child support payments" or "I need help with visitation rights"',
616
+ },
617
+ updates
618
+ )
619
+ );
472
620
 
473
- const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
621
+ const degreeOfInterest = (scope, vertical, updates = {}) => {
622
+ const func = vertical ? col2RadioCenter : sbsSelect;
623
+ const label = vertical ? updates.label : "How Likely Are You to Pay if Your Issue Could be Resolved?";
624
+ const help = vertical ? updates.help : "No payment necessary to speak with lawyers.";
625
+ return func(
626
+ merge(
627
+ {
628
+ name: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
629
+ id: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
630
+ label,
631
+ help,
632
+ options: ["Definitely", "Probably", "Maybe", "Absolutely Can't Afford"],
633
+ },
634
+ updates
635
+ )
636
+ )
637
+ };
474
638
 
475
- const disabilityConditionStopWork = (scope) => sbsYesNoRadio({
476
- name: scope ? scope + ':' + 'Disability_Condition_Stop_Work' : 'Disability_Condition_Stop_Work',
477
- label: 'Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?'
478
- });
639
+ const degreeOfInterestHelp = (scope, vertical, updates = {}) =>
640
+ degreeOfInterest(scope, vertical, merge(updates, { help: "No payment necessary to speak with lawyers." }));
479
641
 
480
- const disabilityWorkHistory = (scope) => sbsYesNoRadio({
481
- name: scope ? scope + ':' + 'Disability_Work_History' : 'Disability_Work_History',
482
- label: 'Have You Had a Full-Time Job Within the Past 5 Years?'
483
- });
642
+ const disabilityConditionStopWork = (scope, vertical, updates = {}) => {
643
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
644
+ const label = vertical
645
+ ? updates.label
646
+ : "Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?";
647
+ return func(
648
+ merge(
649
+ {
650
+ name: scope ? scope + ":" + "Disability_Condition_Stop_Work" : "Disability_Condition_Stop_Work",
651
+ label,
652
+ },
653
+ updates
654
+ )
655
+ )
656
+ };
484
657
 
485
- const doctorTreatment = (scope) => sbsYesNoRadio({
486
- name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
487
- label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
488
- });
658
+ const disabilityWorkHistory = (scope, vertical, updates = {}) => {
659
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
660
+ const label = vertical ? updates.label : "Have You Had a Full-Time Job Within the Past 5 Years?";
661
+ return func(
662
+ merge(
663
+ {
664
+ name: scope ? scope + ":" + "Disability_Work_History" : "Disability_Work_History",
665
+ label,
666
+ },
667
+ updates
668
+ )
669
+ )
670
+ };
489
671
 
490
- const employerType = () => sbsSelect({
491
- label: 'The Employer Is a:',
492
- name: 'Employer_Type',
493
- options: [
494
- "Sole proprietorship (mom and pop)",
495
- "Partnership",
496
- "Franchise",
497
- "Privately held company",
498
- "Public corporation",
499
- "Government Agency",
500
- "Don't know"
501
- ]
502
- });
672
+ const doctorTreatment = (scope, vertical, updates = {}) => {
673
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
674
+ const label = vertical ? updates.label : "Have You Recently Been Treated by a Doctor, Hospital or Clinic?";
675
+ return func(
676
+ merge(
677
+ {
678
+ name: scope ? scope + ":" + "Doctor_Treatment" : "Doctor_Treatment",
679
+ label,
680
+ },
681
+ updates
682
+ )
683
+ )
684
+ };
503
685
 
504
- const employeeAtCompany = (scope) => sbsYesNoRadio({
505
- name: scope ? scope + ':' + 'Employee_At_Company' : 'Employee_At_Company',
506
- label: 'Do you/they still work at the company?'
507
- });
686
+ const employerType = (scope, vertical, updates = {}) => {
687
+ const func = vertical ? col2RadioCenter : sbsSelect;
688
+ const label = vertical ? updates.label : "The Employer Is a:";
689
+ return func(
690
+ merge(
691
+ {
692
+ label,
693
+ name: scope ? scope + ":" + "Employer_Type" : "Employer_Type",
694
+ options: [
695
+ "Sole proprietorship (mom and pop)",
696
+ "Partnership",
697
+ "Franchise",
698
+ "Privately held company",
699
+ "Public corporation",
700
+ "Government Agency",
701
+ "Don't know",
702
+ ],
703
+ },
704
+ updates
705
+ )
706
+ )
707
+ };
508
708
 
509
- const estateLegalServicesNeeded = (scope) => sbsSelect({
510
- name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
511
- label: "Legal Services Needed for Your Estate:",
512
- options: [
513
- "Charitable Giving",
514
- "Contested Wills",
515
- "Drafting Wills or Trust",
516
- "Estate Administration",
517
- "Asset Protection",
518
- "Other"
519
- ]
520
- });
709
+ const employeeAtCompany = (scope, vertical, updates = {}) => {
710
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
711
+ const label = vertical ? updates.label : "Do You Still Work at the Company?";
712
+ return func(
713
+ merge(
714
+ {
715
+ name: scope ? scope + ":" + "Employee_At_Company" : "Employee_At_Company",
716
+ label,
717
+ },
718
+ updates
719
+ )
720
+ )
721
+ };
521
722
 
522
- const harassmentAndDiscriminationTOLP = () => col2Radio({
523
- label: 'Type of Help Needed:',
524
- name: 'Type_Of_Legal_Problem',
525
- id: 'Type_Of_Legal_Problem',
526
- options: [
527
- 'Sexual Harassment',
528
- 'Workplace Harassment',
529
- 'Non-Workplace Harassment',
530
- 'Workplace Discrimination',
531
- 'Non-Workplace Discrimination',
532
- 'Not Sure or Other'
533
- ]
534
- });
723
+ const estateLegalServicesNeeded = (scope, vertical, updates = {}) => {
724
+ const func = vertical ? col2RadioCenter : sbsSelect;
725
+ const label = vertical ? updates.label : "Legal Services Needed for Your Estate:";
726
+ return func(
727
+ merge(
728
+ {
729
+ name: scope ? scope + ":" + "Estate_Legal_Services_Needed" : "Estate_Legal_Services_Needed",
730
+ label,
731
+ options: [
732
+ "Charitable Giving",
733
+ "Contested Wills",
734
+ "Drafting Wills or Trust",
735
+ "Estate Administration",
736
+ "Asset Protection",
737
+ "Other",
738
+ ],
739
+ },
740
+ updates
741
+ )
742
+ )
743
+ };
535
744
 
536
- const haveAttorney = (scope) => sbsYesNoRadio({
537
- name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
538
- label: 'Already Working with An Attorney?'
539
- });
745
+ const harassmentAndDiscriminationTOLP = (scope, vertical, updates = {}) => {
746
+ const func = vertical ? col2RadioCenter : col2Radio;
747
+ const label = vertical ? updates.label : "Type of Help Needed:";
748
+ return func(
749
+ merge(
750
+ {
751
+ label,
752
+ id: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
753
+ name: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
754
+ options: [
755
+ "Sexual Harassment",
756
+ "Workplace Harassment",
757
+ "Non-Workplace Harassment",
758
+ "Workplace Discrimination",
759
+ "Non-Workplace Discrimination",
760
+ "Not Sure or Other",
761
+ ],
762
+ },
763
+ updates
764
+ )
765
+ )
766
+ };
540
767
 
541
- const haveChildren = (scope) => sbsYesNoRadio({
542
- name: scope ? scope + ':' + 'Have_Children' : 'Have_Children',
543
- label: 'Do You Have Children?'
544
- });
768
+ const haveAttorney = (scope, vertical, updates = {}) => {
769
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
770
+ const label = vertical ? updates.label : "Already Working with An Attorney?";
771
+ return func(
772
+ merge(
773
+ {
774
+ label,
775
+ name: scope ? scope + ":" + "Have_Attorney" : "Have_Attorney",
776
+ },
777
+ updates
778
+ )
779
+ )
780
+ };
545
781
 
546
- const incidentDate = (scope) => sbsDate({
547
- name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
548
- label: 'Date of Incident:',
549
- });
782
+ const haveChildren = (scope, vertical, updates = {}) => {
783
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
784
+ const label = vertical ? updates.label : "Do You Have Children?";
785
+ return func(
786
+ merge(
787
+ {
788
+ name: scope ? scope + ":" + "Have_Children" : "Have_Children",
789
+ label,
790
+ },
791
+ updates
792
+ )
793
+ )
794
+ };
550
795
 
551
- const lawyerPaymentMethod = (scope) => sbsSelect({
552
- name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
553
- label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
554
- help: 'No payment necessary to speak with lawyers.',
555
- options: [
556
- 'Cash',
557
- 'Check',
558
- 'Credit Card',
559
- 'Friend',
560
- 'Family',
561
- 'Other'
562
- ]
563
- });
796
+ const incidentDate = (scope, vertical, updates = {}) => {
797
+ const func = vertical ? verticalDate : sbsDate;
798
+ const label = vertical ? updates.label : "Date of Incident:";
799
+ return func(
800
+ merge(
801
+ {
802
+ label,
803
+ name: scope ? scope + ":" + "Incident_Date" : "Incident_Date",
804
+ },
805
+ updates
806
+ )
807
+ )
808
+ };
564
809
 
565
- const legalCrossSells$1 = () => col2Checkbox({
566
- id: 'Legal_CrossSells',
567
- name: 'Legal_CrossSells',
568
- help: 'Just hit "Next" if none apply',
569
- helpClass: 't-text-center !t-text-sm',
570
- validation: null,
571
- options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
572
- });
810
+ const lawyerPaymentMethod = (scope, vertical, updates = {}) => {
811
+ const func = vertical ? col2RadioCenter : sbsSelect;
812
+ const label = vertical ? updates.label : "How Will You Pay for Legal Fees if You Hire a Lawyer?";
813
+ const help = vertical ? updates.help : "No payment necessary to start a consultation.";
814
+ const options = vertical
815
+ ? {
816
+ Cash: "Cash",
817
+ "Credit Card": "Credit Card",
818
+ Family: "Family or Friend",
819
+ Other: "Other",
820
+ }
821
+ : ["Cash", "Check", "Credit Card", "Friend", "Family", "Other"];
822
+ return func(
823
+ merge(
824
+ {
825
+ label,
826
+ help,
827
+ name: scope ? scope + ":" + "Lawyer_Payment_Method" : "Lawyer_Payment_Method",
828
+ options,
829
+ fieldsetClass: vertical ? "$reset t-flex t-flex-col t-items-center" : undefined,
830
+ },
831
+ updates
832
+ )
833
+ )
834
+ };
573
835
 
574
- const maritalStatus = (scope) => sbsSelect({
575
- name: scope ? scope + ':' + 'Marital_Status' : 'Marital_Status',
576
- label: 'Marital Status:',
577
- options: [
578
- 'Unmarried, Living Together',
579
- 'Unmarried, Do Not Live Together',
580
- 'Married, Living Together',
581
- 'Separated',
582
- 'Divorced',
583
- 'Other'
584
- ]
585
- });
836
+ const legalCrossSells$1 = () =>
837
+ col2Checkbox({
838
+ id: "Legal_CrossSells",
839
+ name: "Legal_CrossSells",
840
+ help: 'Just hit "Next" if none apply',
841
+ helpClass: "t-text-center !t-text-sm",
842
+ validation: null,
843
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
844
+ });
845
+
846
+ const maritalStatus = (scope, vertical, updates = {}) => {
847
+ const func = vertical ? col2RadioCenter : sbsSelect;
848
+ const label = vertical ? updates.label : "Marital Status:";
849
+ return func(
850
+ merge(
851
+ {
852
+ label,
853
+ name: scope ? scope + ":" + "Marital_Status" : "Marital_Status",
854
+ options: [
855
+ "Unmarried, Living Together",
856
+ "Unmarried, Do Not Live Together",
857
+ "Married, Living Together",
858
+ "Separated",
859
+ "Divorced",
860
+ "Other",
861
+ ],
862
+ },
863
+ updates
864
+ )
865
+ )
866
+ };
586
867
 
868
+ const numEmployeesOfBusiness = (scope, vertical, updates = {}) => {
869
+ const func = vertical ? col2RadioCenter : sbsSelect;
870
+ const label = vertical ? updates.label : "Total Employees of Business? (estimated)";
871
+ return func(
872
+ merge(
873
+ {
874
+ label,
875
+ name: scope ? scope + ":" + "Num_Employees_Of_Business" : "Num_Employees_Of_Business",
876
+ options: ["1-5", "6-20", "21-50", "51-100", "101-500", "501-1,000", "More than 1,000"],
877
+ },
878
+ updates
879
+ )
880
+ )
881
+ };
587
882
 
588
- const numEmployeesOfBusiness = () => sbsSelect({
589
- label: 'Total Employees of Business? (estimated)',
590
- name: 'Num_Employees_Of_Business',
591
- options: [
592
- "1-5",
593
- "6-20",
594
- "21-50",
595
- "51-100",
596
- "101-500",
597
- "501-1,000",
598
- "More than 1,000"
599
- ]
600
- });
883
+ // XXX HERE
601
884
 
602
- const pendingCharges = (scope) => sbsYesNoRadio({
603
- name: scope ? scope + ':' + 'Pending_Charges' : 'Pending_Charges',
604
- label: 'Do you currently have any pending charges?'
605
- });
885
+ const pendingCharges = (scope, vertical, updates = {}) => {
886
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
887
+ const label = vertical ? updates.label : "Do you currently have any pending charges?";
888
+ return func(
889
+ merge(
890
+ {
891
+ name: scope ? scope + ":" + "Pending_Charges" : "Pending_Charges",
892
+ label,
893
+ },
894
+ updates
895
+ )
896
+ )
897
+ };
606
898
 
607
- const primaryInjury = (scope) => sbs2ColRadio({
608
- name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
609
- label: 'Primary Injury:',
610
- options: [
611
- "Anxiety",
612
- "Back or Neck Pain",
613
- "Broken Bones",
614
- "Cuts and Bruises",
615
- "Headaches",
616
- "Memory Loss",
617
- "Loss of Limb",
618
- "Not Sure or Other"
619
- ]
620
- });
899
+ const primaryInjury = (scope, vertical, updates = {}) => {
900
+ const func = vertical ? col2RadioCenter : sbs2ColRadio;
901
+ const label = vertical ? updates.label : "Primary Injury:";
902
+ return func(
903
+ merge(
904
+ {
905
+ label,
906
+ name: scope ? scope + ":" + "Primary_Injury" : "Primary_Injury",
907
+ options: [
908
+ "Anxiety",
909
+ "Back or Neck Pain",
910
+ "Broken Bones",
911
+ "Cuts and Bruises",
912
+ "Headaches",
913
+ "Memory Loss",
914
+ "Loss of Limb",
915
+ "Not Sure or Other",
916
+ ],
917
+ },
918
+ updates
919
+ )
920
+ )
921
+ };
621
922
 
622
- const priorAlcoholOffenses = (scope) => sbsYesNoRadio({
623
- name: scope ? scope + ':' + 'Prior_Alcohol_Offenses' : 'Prior_Alcohol_Offenses',
624
- label: 'Any Prior Alcohol Related Offenses?'
625
- });
923
+ const priorAlcoholOffenses = (scope, vertical, updates = {}) => {
924
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
925
+ const label = vertical ? updates.label : "Any Prior Alcohol Related Offenses?";
926
+ return func(
927
+ merge(
928
+ {
929
+ name: scope ? scope + ":" + "Prior_Alcohol_Offenses" : "Prior_Alcohol_Offenses",
930
+ label,
931
+ },
932
+ updates
933
+ )
934
+ )
935
+ };
626
936
 
627
- const policeReportFiled = (scope) => sbsYesNoRadio({
628
- name: scope ? scope + ':' + 'Police_Report_Filed' : 'Police_Report_Filed',
629
- label: 'Was a Police Report Filed?'
630
- });
937
+ const policeReportFiled = (scope, vertical, updates = {}) => {
938
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
939
+ const label = vertical ? updates.label : "Was a Police Report Filed?";
940
+ return func(
941
+ merge(
942
+ {
943
+ name: scope ? scope + ":" + "Police_Report_Filed" : "Police_Report_Filed",
944
+ label,
945
+ },
946
+ updates
947
+ )
948
+ )
949
+ };
631
950
 
632
- const roleInMatterProbate = (scope) => sbsSelect({
633
- name: scope ? scope + ':' + 'Role_In_Matter_Probate' : 'Role_In_Matter_Probate',
634
- label: "What Is Your Role in this Matter?",
635
- options: [
636
- "Preparing My Will",
637
- "Executor",
638
- "Heir",
639
- "Other"
640
- ]
641
- });
951
+ const roleInMatterProbate = (scope, vertical, updates = {}) => {
952
+ const func = vertical ? col2RadioCenter : sbsSelect;
953
+ const label = vertical ? updates.label : "What is Your Role in this Matter?";
954
+ return func(
955
+ merge(
956
+ {
957
+ label,
958
+ name: scope ? scope + ":" + "Role_In_Matter_Probate" : "Role_In_Matter_Probate",
959
+ options: ["Preparing My Will", "Executor", "Heir", "Other"],
960
+ },
961
+ updates
962
+ )
963
+ )
964
+ };
642
965
 
643
- const socialSecurityDisabilityReceivingBenefits = (scope) => sbsYesNoRadio({
644
- name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
645
- label: 'Are You Currently Receiving Social Security Disability Benefits?'
646
- });
966
+ const socialSecurityDisabilityReceivingBenefits = (scope, vertical, updates = {}) => {
967
+ const func = vertical ? verticalYesNoRadio : sbsYesNoRadio;
968
+ const label = vertical ? updates.label : "Are You Currently Receiving Social Security Disability Benefits?";
969
+ return func(
970
+ merge(
971
+ {
972
+ name: scope
973
+ ? scope + ":" + "Social_Security_Disability_Receiving_Benefits"
974
+ : "Social_Security_Disability_Receiving_Benefits",
975
+ label,
976
+ },
977
+ updates
978
+ )
979
+ )
980
+ };
647
981
 
648
982
  const TCPAConsent = (scope) => ({
649
- $formkit: 'checkbox',
650
- label: '$meta.tcpaLanguage',
651
- name: scope ? scope + ':' + 'TCPA_Opt_In' : 'TCPA_Opt_In',
652
- 'data-tf-sensitive': 'false',
653
- validation: 'required|accepted',
983
+ $formkit: "checkbox",
984
+ label: "$meta.tcpaLanguage",
985
+ // Necessary to get links to work in the tcpa language
986
+ __raw__sectionsSchema: {
987
+ label: { attrs: { innerHTML: "$label" } },
988
+ },
989
+ name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
990
+ "data-tf-sensitive": "false",
991
+ validation: "required|accepted",
654
992
  validationMessages: {
655
- required: 'Consent is required',
656
- accepted: 'Consent is required'
993
+ required: "Consent is required",
994
+ accepted: "Consent is required",
657
995
  },
658
996
  classes: {
659
- label: "t-text-xs t-text-slate-500 t-font-normal"
660
- }
997
+ label: "t-text-xs t-text-slate-500 t-font-normal",
998
+ },
661
999
  });
662
1000
 
663
- const typeOfAlcoholTest = (scope) => sbsSelect({
664
- name: scope ? scope + ':' + 'Type_Of_Alcohol_Test' : 'Type_Of_Alcohol_Test',
665
- label: 'Type of Alcohol Test Performed?',
666
- options: [
667
- "No Test",
668
- "Refused Test",
669
- "Breath Test",
670
- "Blood Test",
671
- "Urine Test",
672
- "Don't Know"
673
- ]
674
- });
1001
+ const typeOfAlcoholTest = (scope, vertical, updates = {}) => {
1002
+ const func = vertical ? col2RadioCenter : sbsSelect;
1003
+ const label = vertical ? updates.label : "Type of Alcohol Test Performed?";
1004
+ return func(
1005
+ merge(
1006
+ {
1007
+ label,
1008
+ name: scope ? scope + ":" + "Type_Of_Alcohol_Test" : "Type_Of_Alcohol_Test",
1009
+ options: ["No Test", "Refused Test", "Breath Test", "Blood Test", "Urine Test", "Don't Know"],
1010
+ },
1011
+ updates
1012
+ )
1013
+ )
1014
+ };
675
1015
 
676
- const typeOfAssets = (scope) => col2Checkbox({
677
- name: scope ? scope + ':' + 'Type_Of_Assets' : 'Type_Of_Assets',
678
- label: 'Type of Assets:',
679
- options: [
680
- "Business Interests",
681
- "Cash",
682
- "Life Insurance Policies",
683
- "Pensions/Retirement",
684
- "Personal Possessions",
685
- "Property",
686
- "Stock/Bonds"
687
- ]
688
- });
1016
+ const typeOfAssets = (scope, vertical, updates = {}) => {
1017
+ const func = vertical ? verticalCol2Checkbox : col2Checkbox;
1018
+ const label = vertical ? updates.label : "Type of Assets:";
1019
+ return func(
1020
+ merge(
1021
+ {
1022
+ label,
1023
+ name: scope ? scope + ":" + "Type_Of_Assets" : "Type_Of_Assets",
1024
+ options: [
1025
+ "Business Interests",
1026
+ "Cash",
1027
+ "Life Insurance Policies",
1028
+ "Pensions/Retirement",
1029
+ "Personal Possessions",
1030
+ "Property",
1031
+ "Stock/Bonds",
1032
+ ],
1033
+ },
1034
+ updates
1035
+ )
1036
+ )
1037
+ };
689
1038
 
690
- const valueOfAssets = (scope) => sbsSelect({
691
- name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
692
- label: 'Value of Your Assets?',
693
- options: [
694
- "Less than 50K",
695
- "50K to 100K",
696
- "100K to 250K",
697
- "250K to 500K",
698
- "500K to 1M",
699
- "More than 1M"
700
- ]
701
- });
1039
+ const valueOfAssets = (scope, vertical, updates = {}) => {
1040
+ const func = vertical ? col2RadioCenter : sbsSelect;
1041
+ const label = vertical ? updates.label : "Value of Your Assets?";
1042
+ return func(
1043
+ merge(
1044
+ {
1045
+ label,
1046
+ name: scope ? scope + ":" + "Value_Of_Assets" : "Value_Of_Assets",
1047
+ options: ["Less than 50K", "50K to 100K", "100K to 250K", "250K to 500K", "500K to 1M", "More than 1M"],
1048
+ },
1049
+ updates
1050
+ )
1051
+ )
1052
+ };
702
1053
 
703
- // ------ Question Groups
1054
+ // ------ Question Groups - TODO: move these go separate file groups.js
704
1055
 
705
1056
  // NOTE: name must be unique within a form!
706
1057
  const group = (name, updates) => {
707
- return merge({
708
- $cmp: 'FormKit',
709
- props: {
710
- type: 'group',
711
- key: name,
712
- id: name,
713
- name: name
714
- }
715
- }, updates)
1058
+ return merge(
1059
+ {
1060
+ $cmp: "FormKit",
1061
+ props: {
1062
+ type: "group",
1063
+ key: name,
1064
+ id: name,
1065
+ name: name,
1066
+ },
1067
+ },
1068
+ updates
1069
+ )
716
1070
  };
717
1071
 
718
- const defaultQuestions = () => [
719
- haveAttorney(),
720
- degreeOfInterestHelp()
721
- ];
1072
+ const defaultQuestions = () => [haveAttorney(), degreeOfInterestHelp()];
722
1073
 
723
- const AutoAndCarAccidentsQuestions = (condition, scope) => group(
724
- 'AutoAndCarAccidentsQuestions',
725
- {
726
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"'),
1074
+ const AutoAndCarAccidentsQuestions = (condition, scope) =>
1075
+ group("AutoAndCarAccidentsQuestions", {
1076
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"',
727
1077
  children: [
728
1078
  haveAttorney(scope),
729
1079
  incidentDate(scope),
730
1080
  atFault(scope),
731
1081
  primaryInjury(scope),
732
1082
  doctorTreatment(scope),
733
- policeReportFiled(scope)
734
- ]
735
- }
736
- );
1083
+ policeReportFiled(scope),
1084
+ ],
1085
+ });
737
1086
 
738
- const ChildCustodyQuestions = (condition, scope) => group(
739
- 'ChildCustodyQuestions',
740
- {
741
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"'),
1087
+ const ChildCustodyQuestions = (condition, scope) =>
1088
+ group("ChildCustodyQuestions", {
1089
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"',
742
1090
  children: [
743
1091
  haveAttorney(scope),
744
1092
  childRelationship(scope),
745
1093
  childHome(scope),
746
1094
  childPrimaryCaregiver(scope),
747
1095
  degreeOfInterest(scope),
748
- lawyerPaymentMethod(scope)
749
- ]
750
- }
751
- );
1096
+ lawyerPaymentMethod(scope),
1097
+ ],
1098
+ });
752
1099
 
753
- const DivorceQuestions = (condition, scope) => group(
754
- 'DivorceQuestions',
755
- {
756
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"'),
1100
+ const DivorceQuestions = (condition, scope) =>
1101
+ group("DivorceQuestions", {
1102
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"',
757
1103
  children: [
758
1104
  haveAttorney(scope),
759
1105
  maritalStatus(scope),
760
1106
  haveChildren(scope),
761
1107
  degreeOfInterest(scope),
762
- lawyerPaymentMethod(scope)
763
- ]
764
- }
765
- );
1108
+ lawyerPaymentMethod(scope),
1109
+ ],
1110
+ });
766
1111
 
767
- const DUIAndDWIQuestions = (condition, scope) => group(
768
- 'DUIAndDWIQuestions',
769
- {
770
- if: (condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"'),
1112
+ const DUIAndDWIQuestions = (condition, scope) =>
1113
+ group("DUIAndDWIQuestions", {
1114
+ if: condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"',
771
1115
  children: [
772
1116
  haveAttorney(scope),
773
1117
  incidentDate(scope),
@@ -775,156 +1119,129 @@ const DUIAndDWIQuestions = (condition, scope) => group(
775
1119
  typeOfAlcoholTest(scope),
776
1120
  bloodContentAlcoholTest(scope),
777
1121
  pendingCharges(scope),
778
- degreeOfInterestHelp(scope)
779
- ]
780
- }
781
- );
1122
+ degreeOfInterestHelp(scope),
1123
+ ],
1124
+ });
782
1125
 
783
- const SexualHarassmentQuestions = () => group(
784
- 'SexualHarassmentQuestions',
785
- {
786
- if: '$get(Type_Of_Legal_Problem).value == "Sexual Harassment"',
787
- children: defaultQuestions()
788
- }
789
- );
1126
+ const SexualHarassmentQuestions = (condition, scope) =>
1127
+ group("SexualHarassmentQuestions", {
1128
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Sexual Harassment"',
1129
+ children: defaultQuestions(),
1130
+ });
790
1131
 
791
- const WorkplaceHarassmentQuestions = () => group(
792
- 'WorkplaceHarassmentQuestions',
793
- {
794
- if: '$get(Type_Of_Legal_Problem).value == "Workplace Harassment"',
1132
+ const WorkplaceHarassmentQuestions = (condition, scope) =>
1133
+ group("WorkplaceHarassmentQuestions", {
1134
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Workplace Harassment"',
795
1135
  children: [
796
- haveAttorney(),
797
- numEmployeesOfBusiness(),
798
- employerType(),
799
- employeeAtCompany(),
800
- degreeOfInterestHelp()
801
- ]
802
- }
803
- );
1136
+ haveAttorney(scope),
1137
+ numEmployeesOfBusiness(scope),
1138
+ employerType(scope),
1139
+ employeeAtCompany(scope),
1140
+ degreeOfInterestHelp(scope),
1141
+ ],
1142
+ });
804
1143
 
805
- const NonWorkplaceHarassmentQuestions = () => group(
806
- 'NonWorkplaceHarassmentQuestions',
807
- {
808
- if: '$get(Type_Of_Legal_Problem).value == "Non-Workplace Harassment"',
809
- children: defaultQuestions()
810
- }
811
- );
1144
+ const NonWorkplaceHarassmentQuestions = (condition, scope) =>
1145
+ group("NonWorkplaceHarassmentQuestions", {
1146
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Non-Workplace Harassment"',
1147
+ children: defaultQuestions(),
1148
+ });
812
1149
 
813
- const WorkplaceDiscriminationQuestions = () => group(
814
- 'WorkplaceDiscriminationQuestions',
815
- {
816
- if: '$get(Type_Of_Legal_Problem).value == "Workplace Discrimination"',
1150
+ const WorkplaceDiscriminationQuestions = (condition, scope) =>
1151
+ group("WorkplaceDiscriminationQuestions", {
1152
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Workplace Discrimination"',
817
1153
  children: [
818
- haveAttorney(),
819
- numEmployeesOfBusiness(),
820
- employerType(),
821
- employeeAtCompany(),
822
- degreeOfInterestHelp()
823
- ]
824
- }
825
- );
1154
+ haveAttorney(scope),
1155
+ numEmployeesOfBusiness(scope),
1156
+ employerType(scope),
1157
+ employeeAtCompany(scope),
1158
+ degreeOfInterestHelp(scope),
1159
+ ],
1160
+ });
826
1161
 
827
- const NonWorkplaceDiscriminationQuestions = () => group(
828
- 'NonWorkplaceDiscriminationQuestions',
829
- {
830
- if: '$get(Type_Of_Legal_Problem).value == "Non-Workplace Discrimination"',
831
- children: defaultQuestions()
832
- }
833
- );
1162
+ const NonWorkplaceDiscriminationQuestions = (condition, scope) =>
1163
+ group("NonWorkplaceDiscriminationQuestions", {
1164
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Non-Workplace Discrimination"',
1165
+ children: defaultQuestions(),
1166
+ });
834
1167
 
835
- const PersonalInjuryQuestions = (condition, scope) => group(
836
- 'PersonalInjuryQuestions',
837
- {
838
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"'),
1168
+ const PersonalInjuryQuestions = (condition, scope) =>
1169
+ group("PersonalInjuryQuestions", {
1170
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"',
839
1171
  children: [
840
1172
  haveAttorney(scope),
841
1173
  incidentDate(scope),
842
1174
  claimStatus(scope),
843
1175
  atFault(scope),
844
1176
  primaryInjury(scope),
845
- doctorTreatment(scope)
846
- ]
847
- }
848
- );
1177
+ doctorTreatment(scope),
1178
+ ],
1179
+ });
849
1180
 
850
- const PowerofAttorneyQuestions = (condition, scope) => group(
851
- 'PowerofAttorneyQuestions',
852
- {
853
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"'),
854
- children: [
855
- haveAttorney(scope),
856
- degreeOfInterestHelp(scope)
857
- ]
858
- }
859
- );
1181
+ const PowerofAttorneyQuestions = (condition, scope) =>
1182
+ group("PowerofAttorneyQuestions", {
1183
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"',
1184
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1185
+ });
860
1186
 
861
- const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) => group(
862
- 'SocialSecurityDisabilityAndInsuranceQuestions',
863
- {
864
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"'),
1187
+ const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) =>
1188
+ group("SocialSecurityDisabilityAndInsuranceQuestions", {
1189
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"',
865
1190
  children: [
866
1191
  haveAttorney(scope),
867
1192
  applicantAge(scope),
868
1193
  disabilityConditionStopWork(scope),
869
1194
  disabilityWorkHistory(scope),
870
1195
  socialSecurityDisabilityReceivingBenefits(scope),
871
- doctorTreatment(scope)
872
- ]
873
- }
874
- );
1196
+ doctorTreatment(scope),
1197
+ ],
1198
+ });
875
1199
 
876
- const WillsAndTrustsQuestions = (condition, scope) => group(
877
- 'WillsAndTrustsQuestions',
878
- {
879
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"'),
1200
+ const WillsAndTrustsQuestions = (condition, scope) =>
1201
+ group("WillsAndTrustsQuestions", {
1202
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"',
880
1203
  children: [
881
1204
  haveAttorney(scope),
882
1205
  valueOfAssets(scope),
883
1206
  typeOfAssets(scope),
884
1207
  roleInMatterProbate(scope),
885
1208
  estateLegalServicesNeeded(scope),
886
- degreeOfInterestHelp(scope)
887
- ]
888
- }
889
- );
1209
+ degreeOfInterestHelp(scope),
1210
+ ],
1211
+ });
890
1212
 
891
- const WorkersCompensationQuestions = (condition, scope) => group(
892
- 'WorkersCompensationQuestions',
893
- {
894
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"'),
1213
+ const WorkersCompensationQuestions = (condition, scope) =>
1214
+ group("WorkersCompensationQuestions", {
1215
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"',
895
1216
  children: [
896
1217
  haveAttorney(scope),
897
1218
  incidentDate(scope),
898
1219
  claimStatus(scope),
899
1220
  primaryInjury(scope),
900
1221
  causeOfInjury(scope),
901
- doctorTreatment(scope)
902
- ]
903
- }
904
- );
1222
+ doctorTreatment(scope),
1223
+ ],
1224
+ });
905
1225
 
906
- const NotSureOrOtherQuestions = () => group(
907
- 'NotSureOrOtherQuestions',
908
- {
909
- if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
910
- children: [
911
- haveAttorney(),
912
- degreeOfInterestHelp()
913
- ]
914
- }
915
- );
1226
+ const NotSureOrOtherQuestions = (condition, scope) =>
1227
+ group("NotSureOrOtherQuestions", {
1228
+ if: condition || '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
1229
+ children: [haveAttorney(scope), degreeOfInterestHelp(scope)],
1230
+ });
916
1231
 
917
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
918
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
1232
+ const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
1233
+ const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
919
1234
 
920
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
1235
+ const isInput = (n) => {
1236
+ return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
1237
+ };
921
1238
 
922
1239
  const findLastInput = (n) => {
923
1240
  if (isInput(n)) {
924
1241
  return n
925
1242
  }
926
1243
  for (var i = n.children.length - 1; i >= 0; i--) {
927
- if (typeof n.children === 'string') {
1244
+ if (typeof n.children === "string") {
928
1245
  continue
929
1246
  }
930
1247
  const child = n.children[i];
@@ -940,126 +1257,138 @@ const findLastInput = (n) => {
940
1257
  };
941
1258
 
942
1259
  const secureIconDefault = {
943
- $el: 'div',
944
- if: '$activeStep === $lastStep()',
1260
+ $el: "div",
1261
+ if: "$activeStep === $lastStep()",
945
1262
  attrs: {
946
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
1263
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
947
1264
  },
948
1265
  children: [
949
1266
  {
950
- $el: 'img',
1267
+ $el: "img",
951
1268
  attrs: {
952
- loading: 'lazy',
953
- alt: '',
1269
+ loading: "lazy",
1270
+ alt: "",
954
1271
  style: {
955
- border: 0
1272
+ border: 0,
956
1273
  },
957
- width: '25',
958
- height: '25',
959
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
960
- }
1274
+ width: "25",
1275
+ height: "25",
1276
+ src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
1277
+ },
961
1278
  },
962
1279
  {
963
- $el: 'span',
964
- children: 'Secure & Encrypted',
1280
+ $el: "span",
1281
+ children: "Secure & Encrypted",
965
1282
  attrs: {
966
- class: 't-pl-2 t-pt-1 t-font-medium'
967
- }
968
- }
969
- ]
1283
+ class: "t-pl-2 t-pt-1 t-font-medium",
1284
+ },
1285
+ },
1286
+ ],
970
1287
  };
971
1288
 
972
1289
  function secureIcon(updates) {
973
- return merge(
974
- secureIconDefault,
975
- updates
976
- )
1290
+ return merge(secureIconDefault, updates)
977
1291
  }
978
1292
 
979
1293
  function questionsStepHeadline(updates) {
980
1294
  return {
981
- $el: 'h3',
982
- children: updates.headline || 'Tell Us About Your Situation',
1295
+ $el: "h3",
1296
+ children: updates.headline || "Tell Us About Your Situation",
983
1297
  attrs: {
984
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
985
- }
1298
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1",
1299
+ },
986
1300
  }
987
1301
  }
988
1302
 
989
1303
  function crossSellQuestionsStepHeadline(updates) {
990
1304
  return {
991
- $el: 'h3',
992
- children: updates.headline || 'Tell Us About Your Situation',
1305
+ $el: "h3",
1306
+ children: updates.headline || "Tell Us About Your Situation",
993
1307
  attrs: {
994
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
995
- }
1308
+ class: "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-4 t-pt-0 t-px-1",
1309
+ },
996
1310
  }
997
1311
  }
998
1312
 
999
1313
  function crossSellQuestionsStepSubHeadline(updates) {
1000
1314
  return {
1001
- $el: 'h5',
1002
- children: updates.subheadline || 'Tell us about your situation:',
1315
+ $el: "h5",
1316
+ children: updates.subheadline || "Tell us about your situation:",
1003
1317
  attrs: {
1004
- class: 't-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3'
1005
- }
1318
+ class: "t-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3",
1319
+ },
1006
1320
  }
1007
1321
  }
1008
1322
 
1009
1323
  function commentsStepHeadline(updates) {
1010
1324
  return {
1011
- $el: 'h3',
1012
- children: updates.headline || 'Additional Details',
1325
+ $el: "h3",
1326
+ children: updates.headline || "Additional Details",
1013
1327
  attrs: {
1014
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1015
- }
1328
+ class:
1329
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1330
+ " " +
1331
+ (updates.headlineClass || ""),
1332
+ },
1016
1333
  }
1017
1334
  }
1018
1335
 
1019
1336
  function commentsStepHeadlineLegal(updates) {
1020
1337
  return commentsStepHeadline({
1021
- headline: updates.headline || 'Additional Case Details',
1022
- headlineClass: updates.headlineClass
1338
+ headline: updates.headline || "Additional Case Details",
1339
+ headlineClass: updates.headlineClass,
1023
1340
  })
1024
1341
  }
1025
1342
 
1026
1343
  function firstAndLastStepHeadline(updates) {
1027
1344
  return {
1028
- $el: 'h3',
1029
- children: updates.headline || 'Please Provide a Contact Name',
1345
+ $el: "h3",
1346
+ children: updates.headline || "Please Provide a Contact Name",
1030
1347
  attrs: {
1031
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1032
- }
1348
+ class:
1349
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1350
+ " " +
1351
+ (updates.headlineClass || ""),
1352
+ },
1033
1353
  }
1034
1354
  }
1035
1355
 
1036
1356
  function legalCrossSellsStepHeadline(updates) {
1037
1357
  return {
1038
- $el: 'h3',
1039
- children: updates.headline || 'Do any of the following situations apply?',
1358
+ $el: "h3",
1359
+ children: updates.headline || "Do any of the following situations apply?",
1040
1360
  attrs: {
1041
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1042
- }
1361
+ class:
1362
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
1363
+ " " +
1364
+ (updates.headlineClass || ""),
1365
+ },
1043
1366
  }
1044
1367
  }
1045
1368
 
1046
1369
  function contactStepHeadline(updates) {
1047
1370
  return {
1048
- $el: 'h3',
1371
+ $el: "h3",
1049
1372
  children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
1050
1373
  attrs: {
1051
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
1052
- }
1374
+ class:
1375
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1" +
1376
+ " " +
1377
+ (updates.headlineClass || ""),
1378
+ },
1053
1379
  }
1054
1380
  }
1055
1381
 
1056
1382
  function contactStepSubHeadline(updates) {
1057
1383
  return {
1058
- $el: 'h5',
1384
+ $el: "h5",
1059
1385
  children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
1060
1386
  attrs: {
1061
- class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3' + ' ' + (updates.subheadlineClass || '')
1062
- }
1387
+ class:
1388
+ "t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3" +
1389
+ " " +
1390
+ (updates.subheadlineClass || ""),
1391
+ },
1063
1392
  }
1064
1393
  }
1065
1394
 
@@ -1081,19 +1410,19 @@ const TRUSTED_FORM_JS = `(function() {
1081
1410
 
1082
1411
  function trustedFormScript() {
1083
1412
  return {
1084
- $el: 'script',
1085
- if: '$activeStep === $lastStep()',
1086
- children: TRUSTED_FORM_JS
1413
+ $el: "script",
1414
+ if: "$activeStep === $lastStep()",
1415
+ children: TRUSTED_FORM_JS,
1087
1416
  }
1088
1417
  }
1089
1418
 
1090
1419
  const stepDefaults = (step, stepKey) => ({
1091
- $el: 'section',
1420
+ $el: "section",
1092
1421
  if: '$stepEnabled("' + step + '")',
1093
1422
  attrs: {
1094
1423
  hidden: '$activeStep !== "' + step + '"',
1095
- key: stepKey ? stepKey : step
1096
- }
1424
+ key: stepKey ? stepKey : step,
1425
+ },
1097
1426
  });
1098
1427
 
1099
1428
  function step(name, inputs, updates = {}) {
@@ -1116,27 +1445,24 @@ function step(name, inputs, updates = {}) {
1116
1445
  }
1117
1446
  }
1118
1447
 
1119
- return merge(
1120
- stepDefaults(name, stepKey),
1121
- {
1122
- children: [
1123
- {
1124
- $formkit: 'group',
1125
- id: name,
1126
- name: name,
1127
- nextStepMap: nextStepMap,
1128
- triggerRedirectMap: triggerRedirectMap,
1129
- autoFocus: autoFocus,
1130
- children: inputs
1131
- }
1132
- ]
1133
- }
1134
- )
1448
+ return merge(stepDefaults(name, stepKey), {
1449
+ children: [
1450
+ {
1451
+ $formkit: "group",
1452
+ id: name,
1453
+ name: name,
1454
+ nextStepMap: nextStepMap,
1455
+ triggerRedirectMap: triggerRedirectMap,
1456
+ autoFocus: autoFocus,
1457
+ children: inputs,
1458
+ },
1459
+ ],
1460
+ })
1135
1461
  }
1136
1462
 
1137
1463
  function contactInfo(updates = {}) {
1138
1464
  return step(
1139
- 'contactInfo',
1465
+ "contactInfo",
1140
1466
  [
1141
1467
  contactStepHeadline(updates),
1142
1468
  contactStepSubHeadline(updates),
@@ -1144,7 +1470,7 @@ function contactInfo(updates = {}) {
1144
1470
  email(updates.scope),
1145
1471
  phone(updates.scope),
1146
1472
  TCPAConsent(updates.scope),
1147
- secureIcon()
1473
+ secureIcon(),
1148
1474
  ],
1149
1475
  { nextOnEnter: false }
1150
1476
  )
@@ -1152,39 +1478,35 @@ function contactInfo(updates = {}) {
1152
1478
 
1153
1479
  function firstAndLastV2(updates = {}) {
1154
1480
  return step(
1155
- 'firstAndLast',
1156
- [
1157
- firstAndLastStepHeadline(updates),
1158
- firstName(),
1159
- lastName()
1160
- ],
1481
+ "firstAndLast",
1482
+ [firstAndLastStepHeadline(updates), firstName(updates.scope), lastName(updates.scope)],
1161
1483
  updates
1162
1484
  )
1163
1485
  }
1164
1486
 
1165
1487
  function commentsWithBankruptcy(updates = {}) {
1166
1488
  return step(
1167
- 'commentsWithBankruptcy',
1489
+ "commentsWithBankruptcy",
1168
1490
  [
1169
1491
  commentsStepHeadlineLegal(updates),
1170
- comments({
1171
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1492
+ comments(updates.scope, false, {
1493
+ label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1172
1494
  placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1173
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1174
- }, updates.scope),
1495
+ inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
1496
+ }),
1175
1497
  // TODO: needs scope support
1176
1498
  bankruptcyCrossSell(),
1177
1499
  {
1178
- $el: 'div',
1179
- if: '$get(CrossSell_Bankruptcy).value == true',
1500
+ $el: "div",
1501
+ if: "$get(CrossSell_Bankruptcy).value == true",
1180
1502
  children: [
1181
- comments({
1182
- label: 'Bankruptcy or debt details:',
1183
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1184
- inputClass: '!t-h-16'
1185
- }, 'CrossSell:Bankruptcy')
1503
+ comments("CrossSell:Bankruptcy", false, {
1504
+ label: "Bankruptcy or debt details:",
1505
+ placeholder: "Please describe your bankrtupcy or debt situation in a few words...",
1506
+ inputClass: "!t-h-16",
1507
+ }),
1186
1508
  ],
1187
- }
1509
+ },
1188
1510
  ],
1189
1511
  { nextOnEnter: false }
1190
1512
  )
@@ -1192,19 +1514,20 @@ function commentsWithBankruptcy(updates = {}) {
1192
1514
 
1193
1515
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1194
1516
  return step(
1195
- 'autoAndCarAccidentCrossSellQuestions',
1517
+ "autoAndCarAccidentCrossSellQuestions",
1196
1518
  [
1197
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1198
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1199
- AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1200
- comments(
1201
- {
1202
- label: 'Accident Description:',
1203
- placeholder: 'Please describe your accident in a few words...',
1204
- inputClass: '!t-h-16'
1205
- },
1206
- 'CrossSell:Auto_and_Car_Accidents'
1207
- )
1519
+ crossSellQuestionsStepHeadline({
1520
+ headline: "You May Be Entitled To Compensation",
1521
+ }),
1522
+ crossSellQuestionsStepSubHeadline({
1523
+ subheadline: "Tell us about your accident:",
1524
+ }),
1525
+ AutoAndCarAccidentsQuestions("true", "CrossSell:Auto_and_Car_Accidents"),
1526
+ comments("CrossSell:Auto_and_Car_Accidents", false, {
1527
+ label: "Accident Description:",
1528
+ placeholder: "Please describe your accident in a few words...",
1529
+ inputClass: "!t-h-16",
1530
+ }),
1208
1531
  ],
1209
1532
  updates
1210
1533
  )
@@ -1212,18 +1535,15 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1212
1535
 
1213
1536
  function childCustodyCrossSellQuestions(updates = {}) {
1214
1537
  return step(
1215
- 'childCustodyCrossSellQuestions',
1538
+ "childCustodyCrossSellQuestions",
1216
1539
  [
1217
- crossSellQuestionsStepHeadline({ headline: 'Child Custody Information' }),
1218
- ChildCustodyQuestions("true", 'CrossSell:Child_Custody'),
1219
- comments(
1220
- {
1221
- label: 'Description:',
1222
- placeholder: 'Please describe your situation in a few words...',
1223
- inputClass: '!t-h-16'
1224
- },
1225
- 'CrossSell:Child_Custody'
1226
- )
1540
+ crossSellQuestionsStepHeadline({ headline: "Child Custody Information" }),
1541
+ ChildCustodyQuestions("true", "CrossSell:Child_Custody"),
1542
+ comments("CrossSell:Child_Custody", false, {
1543
+ label: "Description:",
1544
+ placeholder: "Please describe your situation in a few words...",
1545
+ inputClass: "!t-h-16",
1546
+ }),
1227
1547
  ],
1228
1548
  updates
1229
1549
  )
@@ -1231,18 +1551,17 @@ function childCustodyCrossSellQuestions(updates = {}) {
1231
1551
 
1232
1552
  function divorceAndSeparationCrossSellQuestions(updates = {}) {
1233
1553
  return step(
1234
- 'divorceAndSeparationCrossSellQuestions',
1554
+ "divorceAndSeparationCrossSellQuestions",
1235
1555
  [
1236
- crossSellQuestionsStepHeadline({ headline: 'Divorce or Separation Information' }),
1237
- DivorceQuestions("true", 'CrossSell:Divorce_and_Separation'),
1238
- comments(
1239
- {
1240
- label: 'Description:',
1241
- placeholder: 'Please describe your situation in a few words...',
1242
- inputClass: '!t-h-16'
1243
- },
1244
- 'CrossSell:Divorce_and_Separation'
1245
- )
1556
+ crossSellQuestionsStepHeadline({
1557
+ headline: "Divorce or Separation Information",
1558
+ }),
1559
+ DivorceQuestions("true", "CrossSell:Divorce_and_Separation"),
1560
+ comments("CrossSell:Divorce_and_Separation", false, {
1561
+ label: "Description:",
1562
+ placeholder: "Please describe your situation in a few words...",
1563
+ inputClass: "!t-h-16",
1564
+ }),
1246
1565
  ],
1247
1566
  updates
1248
1567
  )
@@ -1250,18 +1569,15 @@ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1250
1569
 
1251
1570
  function duiAndDWICrossSellQuestions(updates = {}) {
1252
1571
  return step(
1253
- 'duiAndDWICrossSellQuestions',
1572
+ "duiAndDWICrossSellQuestions",
1254
1573
  [
1255
- crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1256
- DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1257
- comments(
1258
- {
1259
- label: 'Incident Description:',
1260
- placeholder: 'Please describe your incident in a few words...',
1261
- inputClass: '!t-h-16'
1262
- },
1263
- 'CrossSell:DUI_and_DWI'
1264
- )
1574
+ crossSellQuestionsStepHeadline({ headline: "About Your DUI/DWI" }),
1575
+ DUIAndDWIQuestions("true", "CrossSell:DUI_and_DWI"),
1576
+ comments("CrossSell:DUI_and_DWI", false, {
1577
+ label: "Incident Description:",
1578
+ placeholder: "Please describe your incident in a few words...",
1579
+ inputClass: "!t-h-16",
1580
+ }),
1265
1581
  ],
1266
1582
  updates
1267
1583
  )
@@ -1269,19 +1585,20 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1269
1585
 
1270
1586
  function ssdiCrossSellQuestions(updates = {}) {
1271
1587
  return step(
1272
- 'ssdiCrossSellQuestions',
1588
+ "ssdiCrossSellQuestions",
1273
1589
  [
1274
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1275
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1276
- SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1277
- comments(
1278
- {
1279
- label: 'Description:',
1280
- placeholder: 'Please describe your situation in a few words...',
1281
- inputClass: '!t-h-16'
1282
- },
1283
- 'CrossSell:Social_Security_Disability_and_Insurance'
1284
- )
1590
+ crossSellQuestionsStepHeadline({
1591
+ headline: "You May Be Entitled To Benefits",
1592
+ }),
1593
+ crossSellQuestionsStepSubHeadline({
1594
+ subheadline: "Tell us about your disability:",
1595
+ }),
1596
+ SocialSecurityDisabilityAndInsuranceQuestions("true", "CrossSell:Social_Security_Disability_and_Insurance"),
1597
+ comments("CrossSell:Social_Security_Disability_and_Insurance", false, {
1598
+ label: "Description:",
1599
+ placeholder: "Please describe your situation in a few words...",
1600
+ inputClass: "!t-h-16",
1601
+ }),
1285
1602
  ],
1286
1603
  updates
1287
1604
  )
@@ -1289,19 +1606,20 @@ function ssdiCrossSellQuestions(updates = {}) {
1289
1606
 
1290
1607
  function personalInjuryCrossSellQuestions(updates = {}) {
1291
1608
  return step(
1292
- 'personalInjuryCrossSellQuestions',
1609
+ "personalInjuryCrossSellQuestions",
1293
1610
  [
1294
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1295
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1296
- PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1297
- comments(
1298
- {
1299
- label: 'Injury Description:',
1300
- placeholder: 'Please describe your injury in a few words...',
1301
- inputClass: '!t-h-16'
1302
- },
1303
- 'CrossSell:Personal_Injury'
1304
- )
1611
+ crossSellQuestionsStepHeadline({
1612
+ headline: "You May Be Entitled To Compensation",
1613
+ }),
1614
+ crossSellQuestionsStepSubHeadline({
1615
+ subheadline: "Tell us about your injury:",
1616
+ }),
1617
+ PersonalInjuryQuestions("true", "CrossSell:Personal_Injury"),
1618
+ comments("CrossSell:Personal_Injury", false, {
1619
+ label: "Injury Description:",
1620
+ placeholder: "Please describe your injury in a few words...",
1621
+ inputClass: "!t-h-16",
1622
+ }),
1305
1623
  ],
1306
1624
  updates
1307
1625
  )
@@ -1309,18 +1627,17 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1309
1627
 
1310
1628
  function powerOfAttorneyCrossSellQuestions(updates = {}) {
1311
1629
  return step(
1312
- 'powerOfAttorneyCrossSellQuestions',
1630
+ "powerOfAttorneyCrossSellQuestions",
1313
1631
  [
1314
- crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1315
- PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1316
- comments(
1317
- {
1318
- label: 'Description:',
1319
- placeholder: 'Please describe your situation in a few words...',
1320
- inputClass: '!t-h-16'
1321
- },
1322
- 'CrossSell:Power_of_Attorney'
1323
- )
1632
+ crossSellQuestionsStepHeadline({
1633
+ headline: "Power of Attorney Information",
1634
+ }),
1635
+ PowerofAttorneyQuestions("true", "CrossSell:Power_of_Attorney"),
1636
+ comments("CrossSell:Power_of_Attorney", false, {
1637
+ label: "Description:",
1638
+ placeholder: "Please describe your situation in a few words...",
1639
+ inputClass: "!t-h-16",
1640
+ }),
1324
1641
  ],
1325
1642
  updates
1326
1643
  )
@@ -1328,18 +1645,15 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1328
1645
 
1329
1646
  function willsAndTrustsCrossSellQuestions(updates = {}) {
1330
1647
  return step(
1331
- 'willsAndTrustsCrossSellQuestions',
1648
+ "willsAndTrustsCrossSellQuestions",
1332
1649
  [
1333
- crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1334
- WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1335
- comments(
1336
- {
1337
- label: 'Description:',
1338
- placeholder: 'Please describe your situation in a few words...',
1339
- inputClass: '!t-h-16'
1340
- },
1341
- 'CrossSell:Wills_and_Trusts'
1342
- )
1650
+ crossSellQuestionsStepHeadline({ headline: "Will or Trust Information" }),
1651
+ WillsAndTrustsQuestions("true", "CrossSell:Wills_and_Trusts"),
1652
+ comments("CrossSell:Wills_and_Trusts", false, {
1653
+ label: "Description:",
1654
+ placeholder: "Please describe your situation in a few words...",
1655
+ inputClass: "!t-h-16",
1656
+ }),
1343
1657
  ],
1344
1658
  updates
1345
1659
  )
@@ -1347,38 +1661,32 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1347
1661
 
1348
1662
  function workersCompensationCrossSellQuestions(updates = {}) {
1349
1663
  return step(
1350
- 'workersCompensationCrossSellQuestions',
1664
+ "workersCompensationCrossSellQuestions",
1351
1665
  [
1352
- crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1353
- crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1354
- WorkersCompensationQuestions("true", 'CrossSell:Workers_Compensation'),
1355
- comments(
1356
- {
1357
- label: 'Injury Description:',
1358
- placeholder: 'Please describe your injury in a few words...',
1359
- inputClass: '!t-h-16'
1360
- },
1361
- 'CrossSell:Workers_Compensation'
1362
- )
1666
+ crossSellQuestionsStepHeadline({
1667
+ headline: "You May Be Entitled To Benefits",
1668
+ }),
1669
+ crossSellQuestionsStepSubHeadline({
1670
+ subheadline: "Tell us about your injury:",
1671
+ }),
1672
+ WorkersCompensationQuestions("true", "CrossSell:Workers_Compensation"),
1673
+ comments("CrossSell:Workers_Compensation", false, {
1674
+ label: "Injury Description:",
1675
+ placeholder: "Please describe your injury in a few words...",
1676
+ inputClass: "!t-h-16",
1677
+ }),
1363
1678
  ],
1364
1679
  updates
1365
1680
  )
1366
1681
  }
1367
1682
 
1368
1683
  function harassmentAndDiscriminationTOLPAndZip(updates = {}) {
1369
- return step(
1370
- 'harassmentAndDiscriminationTOLPAndZip',
1371
- [
1372
- harassmentAndDiscriminationTOLP(),
1373
- zipcode()
1374
- ],
1375
- updates
1376
- )
1684
+ return step("harassmentAndDiscriminationTOLPAndZip", [harassmentAndDiscriminationTOLP(), zipcode()], updates)
1377
1685
  }
1378
1686
 
1379
1687
  function harassmentAndDiscriminationTOLPQuestions(updates = {}) {
1380
1688
  return step(
1381
- 'TOLPQuestions',
1689
+ "TOLPQuestions",
1382
1690
  [
1383
1691
  questionsStepHeadline(updates),
1384
1692
  SexualHarassmentQuestions(),
@@ -1386,7 +1694,7 @@ function harassmentAndDiscriminationTOLPQuestions(updates = {}) {
1386
1694
  NonWorkplaceHarassmentQuestions(),
1387
1695
  WorkplaceDiscriminationQuestions(),
1388
1696
  NonWorkplaceDiscriminationQuestions(),
1389
- NotSureOrOtherQuestions()
1697
+ NotSureOrOtherQuestions(),
1390
1698
  ],
1391
1699
  updates
1392
1700
  )
@@ -1394,123 +1702,116 @@ function harassmentAndDiscriminationTOLPQuestions(updates = {}) {
1394
1702
 
1395
1703
  function legalCrossSells(updates = {}) {
1396
1704
  updates.nextOnInput = false;
1397
- updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1398
- return step(
1399
- 'legalCrossSells',
1400
- [
1401
- legalCrossSellsStepHeadline(updates),
1402
- legalCrossSells$1(),
1403
- ],
1404
- updates
1405
- )
1705
+ updates.stepKey = "$get(Type_Of_Legal_Problem).value";
1706
+ return step("legalCrossSells", [legalCrossSellsStepHeadline(updates), legalCrossSells$1()], updates)
1406
1707
  }
1407
1708
 
1408
1709
  const formNavigation = (updates = {}) => ({
1409
- $el: 'div',
1710
+ $el: "div",
1410
1711
  attrs: {
1411
- class: 'step-nav'
1712
+ class: "step-nav",
1412
1713
  },
1413
1714
  children: [
1414
1715
  {
1415
- $formkit: 'button',
1416
- name: 'back_button',
1417
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1418
- children: 'Back',
1716
+ $formkit: "button",
1717
+ name: "back_button",
1718
+ onClick: "$setPreviousStep($prevStepFunc($get(form)))",
1719
+ children: "Back",
1419
1720
  style: {
1420
- if: '$activeStep === $firstStep()',
1421
- then: 'visibility: hidden;'
1422
- }
1721
+ if: "$activeStep === $firstStep()",
1722
+ then: "visibility: hidden;",
1723
+ },
1423
1724
  },
1424
1725
  {
1425
- $formkit: 'button',
1426
- name: 'next_button',
1427
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1726
+ $formkit: "button",
1727
+ name: "next_button",
1728
+ onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
1428
1729
  children: {
1429
- if: '$activeStep === $firstStep()',
1430
- then: 'Start',
1431
- else: 'Next'
1730
+ if: "$activeStep === $firstStep()",
1731
+ then: "Start",
1732
+ else: "Next",
1432
1733
  },
1433
1734
  outerClass: {
1434
- if: '$activeStep === $lastStep()',
1435
- then: 't-hidden',
1436
- else: ''
1735
+ if: "$activeStep === $lastStep()",
1736
+ then: "t-hidden",
1737
+ else: "",
1437
1738
  },
1438
1739
  style: {
1439
- if: '$activeStep === $lastStep()',
1440
- then: 'display: none;'
1441
- }
1740
+ if: "$activeStep === $lastStep()",
1741
+ then: "display: none;",
1742
+ },
1442
1743
  },
1443
1744
  {
1444
- $formkit: 'submit',
1445
- name: 'submit_button',
1446
- label: updates.submitLabel || 'Submit',
1447
- if: '$activeStep === $lastStep()',
1745
+ $formkit: "submit",
1746
+ name: "submit_button",
1747
+ label: updates.submitLabel || "Submit",
1748
+ if: "$activeStep === $lastStep()",
1448
1749
  style: {
1449
- if: '$activeStep !== $lastStep()',
1450
- then: 'display: none;'
1451
- }
1452
- }
1453
- ]
1750
+ if: "$activeStep !== $lastStep()",
1751
+ then: "display: none;",
1752
+ },
1753
+ },
1754
+ ],
1454
1755
  });
1455
1756
 
1456
1757
  const formDetails = () => ({
1457
- $el: 'pre',
1758
+ $el: "pre",
1458
1759
  if: '$urlParam("fdbg", "") == 1',
1459
1760
  children: [
1460
1761
  {
1461
- $el: 'pre',
1462
- children: '$stringify( $get(form).value )',
1762
+ $el: "pre",
1763
+ children: "$stringify( $get(form).value )",
1463
1764
  attrs: {
1464
- class: 't-text-xs',
1465
- style: 'overflow: scroll'
1466
- }
1765
+ class: "t-text-xs",
1766
+ style: "overflow: scroll",
1767
+ },
1467
1768
  },
1468
1769
  {
1469
- $el: 'pre',
1470
- children: ['activeStep: ', '$activeStep'],
1770
+ $el: "pre",
1771
+ children: ["activeStep: ", "$activeStep"],
1471
1772
  attrs: {
1472
- class: 't-text-xs',
1473
- style: 'overflow: scroll'
1474
- }
1773
+ class: "t-text-xs",
1774
+ style: "overflow: scroll",
1775
+ },
1475
1776
  },
1476
1777
  {
1477
- $el: 'pre',
1478
- children: ['stepHistory: ', '$stepHistory'],
1778
+ $el: "pre",
1779
+ children: ["stepHistory: ", "$stepHistory"],
1479
1780
  attrs: {
1480
- class: 't-text-xs',
1481
- style: 'overflow: scroll'
1482
- }
1781
+ class: "t-text-xs",
1782
+ style: "overflow: scroll",
1783
+ },
1483
1784
  },
1484
1785
  {
1485
- $el: 'pre',
1486
- children: ['stepQueue: ', '$stepQueue'],
1786
+ $el: "pre",
1787
+ children: ["stepQueue: ", "$stepQueue"],
1487
1788
  attrs: {
1488
- class: 't-text-xs',
1489
- style: 'overflow: scroll'
1490
- }
1789
+ class: "t-text-xs",
1790
+ style: "overflow: scroll",
1791
+ },
1491
1792
  },
1492
1793
  {
1493
- $el: 'pre',
1494
- children: ['steps: ', '$stepKeys()'],
1794
+ $el: "pre",
1795
+ children: ["steps: ", "$stepKeys()"],
1495
1796
  attrs: {
1496
- class: 't-text-xs',
1497
- style: 'overflow: scroll'
1498
- }
1499
- }
1500
- ]
1797
+ class: "t-text-xs",
1798
+ style: "overflow: scroll",
1799
+ },
1800
+ },
1801
+ ],
1501
1802
  });
1502
1803
 
1503
1804
  const formPropDefaults = {
1504
- type: 'form',
1505
- id: 'form',
1506
- config: { validationVisibility: 'submit' },
1805
+ type: "form",
1806
+ id: "form",
1807
+ config: { validationVisibility: "submit" },
1507
1808
  onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
1508
- plugins: '$plugins',
1809
+ plugins: "$plugins",
1509
1810
  actions: false,
1510
- anchorElement: 'form-anchor',
1811
+ anchorElement: "form-anchor",
1511
1812
  useLocalStorage: true,
1512
1813
  prepop: {
1513
- fromURL: true
1814
+ fromURL: true,
1514
1815
  },
1515
1816
  errorCodes: {
1516
1817
  403: { message: "An Error Occurred", abort: false },
@@ -1518,13 +1819,11 @@ const formPropDefaults = {
1518
1819
  429: "An Error Occurred",
1519
1820
  504: { message: "An Error Occurred", abort: false },
1520
1821
  },
1521
- formClass: '!t-max-w-[40rem]'
1822
+ formClass: "!t-max-w-[40rem]",
1522
1823
  };
1523
1824
 
1524
1825
  function filterMapByKey(obj, keyList) {
1525
- return Object.fromEntries(
1526
- Object.entries(obj).filter(([key]) => keyList.includes(key))
1527
- );
1826
+ return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
1528
1827
  }
1529
1828
 
1530
1829
  // export function filteredNextStepsMapLegal(keyList) {
@@ -1534,10 +1833,7 @@ function filterMapByKey(obj, keyList) {
1534
1833
  // }
1535
1834
 
1536
1835
  function formProps(updates) {
1537
- const props = merge(
1538
- formPropDefaults,
1539
- updates
1540
- );
1836
+ const props = merge(formPropDefaults, updates);
1541
1837
  if (props.formId && !props.name) {
1542
1838
  props.name = props.formId;
1543
1839
  }
@@ -1547,13 +1843,10 @@ function formProps(updates) {
1547
1843
  const metaDefaults = {};
1548
1844
 
1549
1845
  function metaProps(updates) {
1550
- const data = merge(
1551
- metaDefaults,
1552
- updates
1553
- );
1846
+ const data = merge(metaDefaults, updates);
1554
1847
  return {
1555
- type: 'meta',
1556
- data
1848
+ type: "meta",
1849
+ data,
1557
1850
  }
1558
1851
  }
1559
1852
 
@@ -1573,191 +1866,194 @@ function defaultMetaPropsLegal(tolps = null) {
1573
1866
  defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1574
1867
  finalHeadlines: finalHeadlines,
1575
1868
  defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1576
- finalSubHeadlines: finalSubHeadlines
1869
+ finalSubHeadlines: finalSubHeadlines,
1577
1870
  })
1578
1871
  }
1579
1872
 
1580
- function dynamicSchemaNode(field = 'Type_Of_Legal_Problem') {
1873
+ function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
1581
1874
  return {
1582
- $cmp: 'FormKitSchema',
1583
- if: '$get(' + field + ').value',
1875
+ $cmp: "FormKitSchema",
1876
+ if: "$get(" + field + ").value",
1584
1877
  props: {
1585
- schema: '$meta.dynamicSchema',
1586
- data: '$buildData($meta)'
1587
- }
1878
+ schema: "$meta.dynamicSchema",
1879
+ data: "$buildData($meta)",
1880
+ },
1588
1881
  }
1589
1882
  }
1590
1883
 
1591
1884
  const formAnchorDefaults = {
1592
- $el: 'div',
1885
+ $el: "div",
1593
1886
  children: [
1594
1887
  {
1595
- $el: 'div',
1888
+ $el: "div",
1596
1889
  attrs: {
1597
- id: 'form-anchor',
1598
- class: 't-absolute',
1599
- style: { top: '-30px', left: 0 }
1600
- }
1601
- }
1890
+ id: "form-anchor",
1891
+ class: "t-absolute",
1892
+ style: { top: "-30px", left: 0 },
1893
+ },
1894
+ },
1602
1895
  ],
1603
1896
  attrs: {
1604
- class: 't-relative'
1605
- }
1897
+ class: "t-relative",
1898
+ },
1606
1899
  };
1607
1900
 
1608
1901
  function formAnchor(updates) {
1609
- return merge(
1610
- formAnchorDefaults,
1611
- updates
1612
- )
1902
+ return merge(formAnchorDefaults, updates)
1613
1903
  }
1614
1904
 
1615
1905
  function headlineDefaults(updates = {}) {
1616
1906
  return {
1617
- $el: 'h1',
1907
+ $el: "h1",
1618
1908
  attrs: {
1619
- class: 't-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3' + ' ' + (updates.headlineClass || '')
1620
- }
1909
+ class:
1910
+ "t-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
1911
+ " " +
1912
+ (updates.headlineClass || ""),
1913
+ },
1621
1914
  }
1622
1915
  }
1623
1916
 
1624
1917
  function headline(updates = {}) {
1625
- return merge(
1626
- headlineDefaults(updates),
1627
- updates
1628
- )
1918
+ return merge(headlineDefaults(updates), updates)
1629
1919
  }
1630
1920
 
1631
1921
  function defaultHeadline() {
1632
1922
  return headline({
1633
1923
  children: '$urlParam("hl", "Start Here For a Free Consultation")',
1634
- if: '$activeStep === $firstStep()'
1924
+ if: "$activeStep === $firstStep()",
1635
1925
  })
1636
1926
  }
1637
1927
 
1638
1928
  function subHeadlineDefaults(updates = {}) {
1639
1929
  return {
1640
- $el: 'h3',
1930
+ $el: "h3",
1641
1931
  attrs: {
1642
- class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
1643
- }
1932
+ class:
1933
+ "t-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10" +
1934
+ " " +
1935
+ (updates.subheadlineClass || ""),
1936
+ },
1644
1937
  }
1645
1938
  }
1646
1939
 
1647
1940
  function subHeadline(updates = {}) {
1648
- return merge(
1649
- subHeadlineDefaults(updates),
1650
- updates
1651
- )
1941
+ return merge(subHeadlineDefaults(updates), updates)
1652
1942
  }
1653
1943
 
1654
1944
  function defaultSubHeadline() {
1655
1945
  return subHeadline({
1656
1946
  children: '$urlParam("shl", "Our Service is Fast and Free!")',
1657
- if: '$activeStep === $firstStep()'
1947
+ if: "$activeStep === $firstStep()",
1658
1948
  })
1659
1949
  }
1660
1950
 
1661
1951
  const hiddenInputsBase = [
1662
1952
  {
1663
- $formkit: 'hidden',
1953
+ $formkit: "hidden",
1664
1954
  name: "gclid",
1665
- value: null
1955
+ value: null,
1666
1956
  },
1667
1957
  {
1668
- $formkit: 'hidden',
1958
+ $formkit: "hidden",
1669
1959
  name: "campaignid",
1670
- value: null
1960
+ value: null,
1671
1961
  },
1672
1962
  {
1673
- $formkit: 'hidden',
1963
+ $formkit: "hidden",
1674
1964
  name: "s",
1675
- value: null
1676
- }
1965
+ value: null,
1966
+ },
1677
1967
  ];
1678
1968
 
1679
1969
  const hiddenInputsLegal = [
1680
1970
  {
1681
- $formkit: 'hidden',
1971
+ $formkit: "hidden",
1682
1972
  name: "vertical",
1683
- value: "Legal"
1973
+ value: "Legal",
1684
1974
  },
1685
1975
  {
1686
- $formkit: 'hidden',
1976
+ $formkit: "hidden",
1687
1977
  name: "TCPA_Language",
1688
- value: "$meta.tcpaLanguage"
1978
+ value: "$meta.tcpaLanguage",
1689
1979
  },
1690
- ...hiddenInputsBase
1980
+ ...hiddenInputsBase,
1691
1981
  ];
1692
1982
 
1693
1983
  const legalRedirectMapDefaults = {
1694
- '*': LegalRedirectUrl()
1984
+ "*": LegalRedirectUrl(),
1695
1985
  };
1696
1986
 
1697
-
1698
1987
  function legalRedirectMap(updates) {
1699
- return merge(
1700
- legalRedirectMapDefaults,
1701
- updates
1702
- )
1988
+ return merge(legalRedirectMapDefaults, updates)
1703
1989
  }
1704
1990
 
1705
1991
  const TOLPCommentsPlaceholders = {
1706
- 'Adoption': 'Example: "I need help with adoption forms"',
1707
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1708
- 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1709
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
1710
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
1711
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1712
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
1713
- 'Child Custody': 'Example: "Need help getting custody"',
1714
- 'Child Support': 'Example: "Issues with child support payments"',
1715
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
1716
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1717
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
1718
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
1719
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1720
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
1721
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1722
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1723
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
1724
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
1725
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1726
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1727
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
1728
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
1729
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
1730
- 'Guardianship': 'Example: "I need help with guardianship documents"',
1731
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1732
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
1733
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
1734
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
1735
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
1736
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
1737
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
1738
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
1739
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
1740
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1741
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1742
- 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1743
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1744
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1745
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1746
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
1747
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1748
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1749
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1750
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1751
- 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1752
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1753
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1754
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
1755
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1756
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1757
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1758
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
1759
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
1760
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
1992
+ Adoption: 'Example: "I need help with adoption forms"',
1993
+ "Asbestos and Mesothelioma": 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1994
+ "Auto and Car Accidents":
1995
+ 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1996
+ Bankruptcy: 'Example: "I need help filing for bankruptcy"',
1997
+ "Birth Certificate and Name Change": 'Example: "Just married and would like to change my last name"',
1998
+ "Business Lawyers": 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1999
+ "Child Custody and Support": 'Example: "Need help getting custody" or "Issues with child support payments"',
2000
+ "Child Custody": 'Example: "Need help getting custody"',
2001
+ "Child Support": 'Example: "Issues with child support payments"',
2002
+ "Civil Rights and Discrimination": 'Example: "Police brutality" or "Coworker keeps harassing me"',
2003
+ "Civil Lawsuit":
2004
+ 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
2005
+ "File a Lawsuit": 'Example: "A contractor took my money and never completed the job"',
2006
+ "Defend a Lawsuit": 'Example: "I am being sued by a neighbor"',
2007
+ "Consumer Lawyers":
2008
+ 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
2009
+ "Copyrights and Trademarks": 'Example: "I would like to register a trademark or copyright a name"',
2010
+ "Criminal and Felony":
2011
+ 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
2012
+ "Debt and Collections": 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
2013
+ "Divorce and Separation": 'Example: "I would like to file for an uncontested divorce"',
2014
+ "DUI and DWI": 'Example: "I was arrested for DUI and need legal defense"',
2015
+ "Elder Law": 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
2016
+ "Employment and Workplace": 'Example: "I was injured while on the job" or "My company is discriminating against me"',
2017
+ Expungement: 'Example: "I would like to file for an expungement and clear my record"',
2018
+ "Family Issues": 'Example: "I need help with guardianship" or "I need a simple will created"',
2019
+ Foreclosure: 'Example: "I need help to avoid foreclosure on my house"',
2020
+ Guardianship: 'Example: "I need help with guardianship documents"',
2021
+ "Harassment and Discrimination": 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
2022
+ "Sexual Harassment": 'Example: "I am being sexually harassed by a coworker"',
2023
+ "Workplace Harassment": 'Example: "My coworker is being aggressive towards me"',
2024
+ "Non-Workplace Harassment": 'Example: "My neighbor is harassing me"',
2025
+ "Workplace Discrimination": 'Example: "I am being discriminated at work based on my age"',
2026
+ "Non-Workplace Discrimination": 'Example: "I am being discriminated against by a local official"',
2027
+ "Identity Theft": 'Example: "Someone stole my identity and I need help fixing the issue"',
2028
+ "Immigration and Visas": 'Example: "I need help filing for a visa" or "Help with a green card"',
2029
+ Insurance: 'Example: "I need help filing an insurance claim for damage to my house"',
2030
+ "Landlord and Tenant":
2031
+ 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
2032
+ "Lemon Law": 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
2033
+ "Long Term Disability":
2034
+ 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
2035
+ "Medical Malpractice": 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
2036
+ "Patents and Intellectual Property": 'Example: "I would like to file for a patent" or "I need to copyright a name"',
2037
+ "Personal Injury": 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
2038
+ "Power of Attorney": 'Example: "I need help with a limited or general power of attorney"',
2039
+ "Probate and Estates":
2040
+ 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
2041
+ "Product Liability": 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
2042
+ "Property Damage": 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
2043
+ "Real Estate":
2044
+ 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
2045
+ "Social Security Disability and Insurance":
2046
+ 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
2047
+ "Tax and IRS": 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
2048
+ "Traffic and Tickets":
2049
+ 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
2050
+ Unemployment: 'Example: "I need help filing for unemployment benefits"',
2051
+ "Victim of a Crime": 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
2052
+ "Wills and Trusts": 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
2053
+ "Workers Compensation": 'Example: "I was injured at work and would like to file for workers compensation benefits"',
2054
+ "Wrongful Death": 'Example: "A family member was killed on the job and we need legal representation"',
2055
+ "Wrongful Termination": 'Example: "I was fired by my employer without cause"',
2056
+ "Not Sure or Other": 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"',
1761
2057
  };
1762
2058
 
1763
2059
  const TOLPFinalHeadlines = {
@@ -1765,49 +2061,64 @@ const TOLPFinalHeadlines = {
1765
2061
  };
1766
2062
 
1767
2063
  const TOLPFinalSubHeadlines = {
1768
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
2064
+ Adoption: "You may benefit from speaking with an adoption professional. Please verify your contact information.",
1769
2065
  // 'Asbestos and Mesothelioma': '',
1770
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
1771
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
2066
+ "Auto and Car Accidents":
2067
+ "You may benefit from speaking with an accident professional. Please verify your contact information.",
2068
+ Bankruptcy: "You may benefit from speaking with a bankruptcy professional. Please verify your contact information.",
1772
2069
  // 'Birth Certificate and Name Change': '',
1773
2070
  // 'Business Lawyers': '',
1774
2071
  // 'Child Custody and Support': '',
1775
2072
  // 'Civil Rights and Discrimination': '',
1776
2073
  // 'Civil Lawsuit': '',
1777
2074
  // 'Consumer Lawyers': '',
1778
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
2075
+ "Copyrights and Trademarks":
2076
+ "You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.",
1779
2077
  // 'Criminal and Felony': '',
1780
2078
  // 'Debt and Collections': '',
1781
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
1782
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
1783
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
2079
+ "Divorce and Separation":
2080
+ "You may benefit from speaking with a divorce professional. Please verify your contact information.",
2081
+ "DUI and DWI": "You may benefit from speaking with a DUI professional. Please verify your contact information.",
2082
+ "Elder Law": "You may benefit from speaking with an elder law professional. Please verify your contact information.",
1784
2083
  // 'Employment and Workplace': '',
1785
2084
  // 'Expungement': '',
1786
2085
  // 'Family Issues': '',
1787
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
1788
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
2086
+ Foreclosure: "You may benefit from speaking with a foreclosure professional. Please verify your contact information.",
2087
+ Guardianship:
2088
+ "You may benefit from speaking with a guardianship professional. Please verify your contact information.",
1789
2089
  // 'Harassment and Discrimination': '',
1790
2090
  // 'Identity Theft': '',
1791
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
2091
+ "Immigration and Visas":
2092
+ "You may benefit from speaking with a immigration professional. Please verify your contact information.",
1792
2093
  // 'Insurance': '',
1793
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
2094
+ "Landlord and Tenant":
2095
+ "You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.",
1794
2096
  // 'Lemon Law': '',
1795
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
1796
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
1797
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
1798
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
2097
+ "Long Term Disability":
2098
+ "You may benefit from speaking with a disability legal professional. Please verify your contact information.",
2099
+ "Medical Malpractice":
2100
+ "You may benefit from speaking with a malpractice professional. Please verify your contact information.",
2101
+ "Patents and Intellectual Property":
2102
+ "You may benefit from speaking with a patent professional. Please verify your contact information.",
2103
+ "Personal Injury":
2104
+ "You may benefit from speaking with a personal injury professional. Please verify your contact information.",
1799
2105
  // 'Power of Attorney': '',
1800
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
2106
+ "Probate and Estates":
2107
+ "You may benefit from speaking with a probate and estate professional. Please verify your contact information.",
1801
2108
  // 'Product Liability': '',
1802
2109
  // 'Property Damage': '',
1803
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
1804
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
1805
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
2110
+ "Real Estate":
2111
+ "You may benefit from speaking with a real estate professional. Please verify your contact information.",
2112
+ "Social Security Disability and Insurance":
2113
+ "You may benefit from speaking with an SSDI professional. Please verify your contact information.",
2114
+ "Tax and IRS": "You may benefit from speaking with a tax professional. Please verify your contact information.",
1806
2115
  // 'Traffic and Tickets': '',
1807
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
2116
+ Unemployment:
2117
+ "You may benefit from speaking with an unemployment professional. Please verify your contact information.",
1808
2118
  // 'Victim of a Crime': '',
1809
2119
  // 'Wills and Trusts': '',
1810
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
2120
+ "Workers Compensation":
2121
+ "You may benefit from speaking with a workers compensation professional. Please verify your contact information.",
1811
2122
  // 'Wrongful Death': '',
1812
2123
  // 'Wrongful Termination': '',
1813
2124
  // 'Not Sure or Other': ''
@@ -1820,37 +2131,31 @@ const TOLPFinalSubHeadlines = {
1820
2131
 
1821
2132
  const nextStepsMapLegalLegacy = {
1822
2133
  values: {
1823
- '*': [
1824
- 'TOLPQuestions',
1825
- 'commentsWithBankruptcy',
1826
- 'legalCrossSells',
1827
- 'firstAndLast',
1828
- 'contactInfo',
1829
- ]
1830
- }
2134
+ "*": ["TOLPQuestions", "commentsWithBankruptcy", "legalCrossSells", "firstAndLast", "contactInfo"],
2135
+ },
1831
2136
  };
1832
2137
 
1833
2138
  const nextStepsMapLegalCrossSells = {
1834
2139
  values: {
1835
- 'Legal_CrossSells': {
1836
- 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
1837
- 'Personal Injury': ['personalInjuryCrossSellQuestions'],
1838
- 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
1839
- 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
1840
- 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
1841
- 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
1842
- 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
1843
- 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
1844
- 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
1845
- 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
1846
- 'Child Custody': ['childCustodyCrossSellQuestions'],
2140
+ Legal_CrossSells: {
2141
+ "Auto and Car Accidents": ["autoAndCarAccidentCrossSellQuestions"],
2142
+ "Personal Injury": ["personalInjuryCrossSellQuestions"],
2143
+ "Workers Compensation": ["workersCompensationCrossSellQuestions"],
2144
+ "DUI and DWI": ["duiAndDWICrossSellQuestions"],
2145
+ "Long Term Disability": ["longTermDisabilityCrossSellQuestions"],
2146
+ "Social Security Disability and Insurance": ["ssdiCrossSellQuestions"],
2147
+ Bankruptcy: ["bankruptcyCrossSellQuestions"],
2148
+ "Power of Attorney": ["powerOfAttorneyCrossSellQuestions"],
2149
+ "Wills and Trusts": ["willsAndTrustsCrossSellQuestions"],
2150
+ "Divorce and Separation": ["divorceAndSeparationCrossSellQuestions"],
2151
+ "Child Custody": ["childCustodyCrossSellQuestions"],
1847
2152
  },
1848
- '*': ['firstAndLast', 'contactInfo'],
2153
+ "*": ["firstAndLast", "contactInfo"],
1849
2154
  },
1850
-
2155
+
1851
2156
  // NOTE: this assumes a certain placement of the cross sell question
1852
2157
  // in the form flow.
1853
- appendSteps: ['firstAndLast', 'contactInfo'],
2158
+ appendSteps: ["firstAndLast", "contactInfo"],
1854
2159
  matchesAllowed: 1,
1855
2160
  };
1856
2161