bhl-forms 0.7.3 → 0.7.4

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