bhl-forms 0.7.3 → 0.7.5

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