bhl-forms 0.6.8 → 0.6.9

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