bhl-forms 0.7.3 → 0.7.4

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