bhl-forms 0.8.6 → 0.8.8

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