bhl-forms 0.11.0 → 0.11.2

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 (119) hide show
  1. package/dist/bhl-forms.iife.js +1 -1
  2. package/dist/bhl-forms.modern.iife.js +4 -4
  3. package/dist/bhl-forms.modern.umd.js +4 -4
  4. package/dist/bhl-forms.umd.js +1 -1
  5. package/dist/forms/accidentsAndInjuries.es.js +152 -102
  6. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  7. package/dist/forms/accidentsAndInjuries.json +1 -1
  8. package/dist/forms/applianceRepairMinimal.es.js +6 -14
  9. package/dist/forms/applianceRepairMinimal.iife.js +1 -1
  10. package/dist/forms/applianceRepairMinimal.json +1 -1
  11. package/dist/forms/appraisals.es.js +1 -1
  12. package/dist/forms/appraisals.iife.js +1 -1
  13. package/dist/forms/appraisals.json +1 -1
  14. package/dist/forms/business.es.js +154 -104
  15. package/dist/forms/business.iife.js +1 -1
  16. package/dist/forms/business.json +1 -1
  17. package/dist/forms/childAndFamily.es.js +152 -102
  18. package/dist/forms/childAndFamily.iife.js +1 -1
  19. package/dist/forms/childAndFamily.json +1 -1
  20. package/dist/forms/childAndFamilySingle.es.js +154 -104
  21. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  22. package/dist/forms/childAndFamilySingle.json +1 -1
  23. package/dist/forms/civilLawsuit.es.js +154 -104
  24. package/dist/forms/civilLawsuit.iife.js +1 -1
  25. package/dist/forms/civilLawsuit.json +1 -1
  26. package/dist/forms/coins.es.js +1 -1
  27. package/dist/forms/coins.iife.js +1 -1
  28. package/dist/forms/coins.json +1 -1
  29. package/dist/forms/contracts.es.js +152 -102
  30. package/dist/forms/contracts.iife.js +1 -1
  31. package/dist/forms/contracts.json +1 -1
  32. package/dist/forms/criminal.es.js +154 -104
  33. package/dist/forms/criminal.iife.js +1 -1
  34. package/dist/forms/criminal.json +1 -1
  35. package/dist/forms/divorce.es.js +154 -104
  36. package/dist/forms/divorce.iife.js +1 -1
  37. package/dist/forms/divorce.json +1 -1
  38. package/dist/forms/employmentAndWorkplace.es.js +154 -104
  39. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  40. package/dist/forms/employmentAndWorkplace.json +1 -1
  41. package/dist/forms/foreclosure.es.js +154 -104
  42. package/dist/forms/foreclosure.iife.js +1 -1
  43. package/dist/forms/foreclosure.json +1 -1
  44. package/dist/forms/generalContractors.es.js +8 -8
  45. package/dist/forms/generalContractors.iife.js +1 -1
  46. package/dist/forms/generalContractors.json +1 -1
  47. package/dist/forms/generalHomeImprovement.es.js +8 -8
  48. package/dist/forms/generalHomeImprovement.iife.js +1 -1
  49. package/dist/forms/generalHomeImprovement.json +1 -1
  50. package/dist/forms/generalHomeImprovementThankYou.es.js +8 -8
  51. package/dist/forms/generalHomeImprovementThankYou.iife.js +1 -1
  52. package/dist/forms/generalHomeImprovementThankYou.json +1 -1
  53. package/dist/forms/generalLegal.es.js +152 -102
  54. package/dist/forms/generalLegal.iife.js +1 -1
  55. package/dist/forms/generalLegal.json +1 -1
  56. package/dist/forms/generalLegalJustAnswer.es.js +154 -104
  57. package/dist/forms/generalLegalJustAnswer.iife.js +1 -1
  58. package/dist/forms/generalLegalJustAnswer.json +1 -1
  59. package/dist/forms/generalLegalPopUnder.es.js +152 -102
  60. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  61. package/dist/forms/generalLegalPopUnder.json +1 -1
  62. package/dist/forms/generalLegalPopUnderSingle.es.js +154 -104
  63. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  64. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  65. package/dist/forms/generalLegalSingle.es.js +154 -104
  66. package/dist/forms/generalLegalSingle.iife.js +1 -1
  67. package/dist/forms/generalLegalSingle.json +1 -1
  68. package/dist/forms/generalLegalSingleMinimal.es.js +1325 -0
  69. package/dist/forms/generalLegalSingleMinimal.iife.js +1 -0
  70. package/dist/forms/generalLegalSingleMinimal.json +1 -0
  71. package/dist/forms/generalLegalThankYou.es.js +151 -101
  72. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  73. package/dist/forms/generalLegalThankYou.json +1 -1
  74. package/dist/forms/generalLegalThankYouConsultation.es.js +154 -104
  75. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  76. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  77. package/dist/forms/harassmentAndDiscrimination.es.js +148 -98
  78. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  79. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  80. package/dist/forms/landlordTenant.es.js +154 -104
  81. package/dist/forms/landlordTenant.iife.js +1 -1
  82. package/dist/forms/landlordTenant.json +1 -1
  83. package/dist/forms/malpractice.es.js +153 -103
  84. package/dist/forms/malpractice.iife.js +1 -1
  85. package/dist/forms/malpractice.json +1 -1
  86. package/dist/forms/mechanics.es.js +124 -74
  87. package/dist/forms/mechanics.iife.js +1 -1
  88. package/dist/forms/mechanics.json +1 -1
  89. package/dist/forms/patentsAndIP.es.js +154 -104
  90. package/dist/forms/patentsAndIP.iife.js +1 -1
  91. package/dist/forms/patentsAndIP.json +1 -1
  92. package/dist/forms/realEstate.es.js +148 -98
  93. package/dist/forms/realEstate.iife.js +1 -1
  94. package/dist/forms/realEstate.json +1 -1
  95. package/dist/forms/repossession.es.js +152 -102
  96. package/dist/forms/repossession.iife.js +1 -1
  97. package/dist/forms/repossession.json +1 -1
  98. package/dist/forms/ssdi.es.js +147 -97
  99. package/dist/forms/ssdi.iife.js +1 -1
  100. package/dist/forms/ssdi.json +1 -1
  101. package/dist/forms/testForm.es.js +120 -70
  102. package/dist/forms/testForm.iife.js +1 -1
  103. package/dist/forms/testForm.json +1 -1
  104. package/dist/forms/testRedirects.es.js +1 -1
  105. package/dist/forms/testRedirects.iife.js +1 -1
  106. package/dist/forms/vets.es.js +1 -1
  107. package/dist/forms/vets.iife.js +1 -1
  108. package/dist/forms/vets.json +1 -1
  109. package/dist/forms/willsAndTrusts.es.js +148 -98
  110. package/dist/forms/willsAndTrusts.iife.js +1 -1
  111. package/dist/forms/willsAndTrusts.json +1 -1
  112. package/dist/forms/windows.es.js +8 -8
  113. package/dist/forms/windows.iife.js +1 -1
  114. package/dist/forms/windows.json +1 -1
  115. package/dist/forms/workersCompensation.es.js +153 -103
  116. package/dist/forms/workersCompensation.iife.js +1 -1
  117. package/dist/forms/workersCompensation.json +1 -1
  118. package/dist/main.css +1 -1
  119. package/package.json +2 -2
@@ -0,0 +1,1325 @@
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 = "Connect With The Legal Help You Deserve";
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 = "Get a no-obligation consultation with a legal expert.";
16
+ const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL =
17
+ '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
18
+ const TCPA_LANGUAGE_LEGAL =
19
+ "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.";
20
+
21
+ // ------ Common Base Settings
22
+
23
+ const ensureIds = (cfg) => {
24
+ if (cfg.name && !cfg.id) {
25
+ cfg.id = cfg.name;
26
+ }
27
+ return cfg
28
+ };
29
+
30
+ const radio = (updates) => {
31
+ ensureIds(updates);
32
+ return merge(
33
+ {
34
+ $formkit: "radio",
35
+ validation: "required",
36
+ validationMessages: {
37
+ required: "Field is required",
38
+ },
39
+ optionsClass: "t-pt-3 t-pl-1",
40
+ legendClass: "required",
41
+ },
42
+ updates
43
+ )
44
+ };
45
+
46
+ // TODO: rename
47
+ const col2RadioCenter = (updates) => {
48
+ updates.legendClass = "required t-w-[100%] t-text-center";
49
+ if (typeof updates.fieldsetClass === "undefined") {
50
+ updates.fieldsetClass = "$reset t-flex t-justify-center";
51
+ }
52
+ updates.innerClass = "t-items-start";
53
+ updates.wrapperClass = "$reset t-flex t-cursor-pointer t-mb-3";
54
+ updates.optionClass = "t-pl-4 md:t-pl-8 md:t-min-w-[200px]";
55
+ updates.optionsClass = "t-pl-4 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2";
56
+ updates.messagesClass = "t-flex t-justify-center";
57
+ updates.helpClass = "t-mt-0 t-mb-4 !t-text-sm t-text-center";
58
+ return radio(updates)
59
+ };
60
+
61
+ const select = (updates) => {
62
+ ensureIds(updates);
63
+ return merge(
64
+ {
65
+ $formkit: "select",
66
+ placeholder: "Please Select",
67
+ validation: "required",
68
+ validationMessages: {
69
+ required: "Field is required",
70
+ },
71
+ inputClass: "t-bg-white",
72
+ labelClass: "required",
73
+ },
74
+ updates
75
+ )
76
+ };
77
+
78
+ const sbsSelect = (updates) => {
79
+ updates.labelClass = "required";
80
+ updates.wrapperClass = "side-by-side t-items-center";
81
+ updates.innerClass = "select-height-content";
82
+ updates.helpClass = "t-mt-2.5 md:t-text-right md:t-mt-[-5px]";
83
+ return select(updates)
84
+ };
85
+
86
+ const verticalSelect = (updates) => {
87
+ updates.labelClass = "required";
88
+ updates.wrapperClass = "t-flex t-justify-center";
89
+ updates.messagesClass = "t-flex t-justify-center";
90
+ updates.inputClass = "t-min-w-[150px] t-bg-white " + (updates.inputClass || "");
91
+ updates.helpClass = "t-mt-2.5 t-text-center";
92
+ return select(updates)
93
+ };
94
+
95
+ const text = (updates) => {
96
+ ensureIds(updates);
97
+ return merge(
98
+ {
99
+ $formkit: "text",
100
+ validation: "required",
101
+ validationMessages: {
102
+ required: "Field is required",
103
+ },
104
+ labelClass: "required",
105
+ },
106
+ updates
107
+ )
108
+ };
109
+
110
+ const sbsText = (updates) => {
111
+ updates.wrapperClass = "side-by-side t-items-center";
112
+ return text(updates)
113
+ };
114
+
115
+ const verticalText = (updates) => {
116
+ updates.wrapperClass = "t-flex t-justify-center";
117
+ updates.messagesClass = "t-flex t-justify-center";
118
+ updates.inputClass = "t-text-center";
119
+ updates.helpClass = "t-mt-2.5 !t-text-sm t-text-center";
120
+ return text(updates)
121
+ };
122
+
123
+ const textArea = (updates) => {
124
+ ensureIds(updates);
125
+ return merge(
126
+ {
127
+ $formkit: "textarea",
128
+ rows: 5,
129
+ maxlength: 500,
130
+ validation: "required",
131
+ validationMessages: {
132
+ required: "Field is required",
133
+ },
134
+ innerClass: "t-max-w-xl",
135
+ labelClass: "required",
136
+ },
137
+ updates
138
+ )
139
+ };
140
+
141
+ const emailFL = (scope, updates = {}) => {
142
+ return text({
143
+ $formkit: "FloatingLabelText",
144
+ name: scope ? scope + ":" + "Email" : "Email",
145
+ placeholder: "Email Address",
146
+ autocomplete: "email",
147
+ "data-tf-sensitive": "false",
148
+ validation: "required|email",
149
+ validationMessages: {
150
+ required: "Email is required",
151
+ email: "Invalid Email",
152
+ },
153
+ inputClass: "t-text-center",
154
+ wrapperClass: "t-flex t-justify-center",
155
+ ...updates,
156
+ })
157
+ };
158
+
159
+ const firstNameFL = (scope, updates = {}) => {
160
+ return text({
161
+ $formkit: "FloatingLabelText",
162
+ placeholder: "First Name",
163
+ name: scope ? scope + ":" + "First_Name" : "First_Name",
164
+ autocomplete: "given-name",
165
+ validationMessages: {
166
+ required: "First Name is required",
167
+ },
168
+ inputClass: "t-text-center",
169
+ ...updates,
170
+ })
171
+ };
172
+
173
+ const lastNameFL = (scope, updates = {}) => {
174
+ return text({
175
+ $formkit: "FloatingLabelText",
176
+ placeholder: "Last Name",
177
+ name: scope ? scope + ":" + "Last_Name" : "Last_Name",
178
+ autocomplete: "family-name",
179
+ validationMessages: {
180
+ required: "Last Name is required",
181
+ },
182
+ inputClass: "t-text-center",
183
+ ...updates,
184
+ })
185
+ };
186
+
187
+ const fullNameFLMobileCol = (scope, updates = {}) => {
188
+ return {
189
+ $el: "div",
190
+ attrs: {
191
+ class: "t-flex t-flex-col sm:t-flex-row t-flex-wrap t-gap-x-[2%] t-justify-center sm:!t-max-w-[70%]",
192
+ },
193
+ children: [
194
+ firstNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
195
+ lastNameFL(scope, { outerClass: "sm:!t-max-w-[49%]", ...updates }),
196
+ ],
197
+ }
198
+ };
199
+
200
+ const phoneFL = (scope, updates = {}) => {
201
+ return text({
202
+ $formkit: "FloatingLabelText",
203
+ datatype: "tel",
204
+ name: scope ? scope + ":" + "Primary_Phone" : "Primary_Phone",
205
+ placeholder: updates.placeholder || "Phone Number",
206
+ maxlength: 14,
207
+ help: updates.help || null,
208
+ autocomplete: "tel-national",
209
+ "data-tf-sensitive": "false",
210
+ validation: "required|matches:/^[0-9]{3}[0-9]{3}[0-9]{4}$/|valid_phone",
211
+ validationMessages: {
212
+ required: "Phone Number is required",
213
+ matches: "Invalid Phone Format, use (XXX) YYY-ZZZZ",
214
+ valid_phone: "Invalid Phone Number",
215
+ },
216
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]",
217
+ inputClass: "t-text-center",
218
+ wrapperClass: "t-flex t-justify-center",
219
+ ...updates,
220
+ })
221
+ };
222
+
223
+ const zipcode$1 = (scope, vertical, updates = {}) => {
224
+ const func = vertical ? verticalText : sbsText;
225
+ const label = vertical ? updates.label : "Zip Code:";
226
+ const help = vertical ? updates.help ?? "We try to match you with local help" : null;
227
+ return func({
228
+ label,
229
+ help,
230
+ placeholder: "#####",
231
+ name: scope ? scope + ":" + "Zip" : "Zip",
232
+ maxlength: 5,
233
+ inputmode: "numeric",
234
+ autocomplete: "postal-code",
235
+ validation: "required|matches:/^[0-9]{5}$/",
236
+ validationMessages: {
237
+ required: "Zip Code is required",
238
+ matches: "Invalid Zip Code",
239
+ },
240
+ ...updates,
241
+ })
242
+ };
243
+
244
+ // TODO: vertical not supported yet
245
+ const comments = (scope, vertical, updates) =>
246
+ textArea(
247
+ merge(
248
+ {
249
+ name: scope ? scope + ":" + "Comments" : "Comments",
250
+ label: "Please briefly describe your situation in a few words:",
251
+ placeholder:
252
+ 'For Example: "I would like help with child support payments" or "I need help with visitation rights"',
253
+ },
254
+ updates
255
+ )
256
+ );
257
+
258
+ const degreeOfInterest$1 = (scope, vertical, updates = {}) => {
259
+ const func = vertical ? col2RadioCenter : sbsSelect;
260
+ const label = vertical ? updates.label : "How Likely Are You to Pay if Your Issue Could be Resolved?";
261
+ const help = vertical ? updates.help : "No payment necessary to speak with lawyers.";
262
+ return func(
263
+ merge(
264
+ {
265
+ name: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
266
+ id: scope ? scope + ":" + "Degree_Of_Interest" : "Degree_Of_Interest",
267
+ label,
268
+ help,
269
+ options: ["Definitely", "Probably", "Maybe", "Absolutely Can't Afford"],
270
+ },
271
+ updates
272
+ )
273
+ )
274
+ };
275
+
276
+ const TOLPOptions = [
277
+ "Adoption",
278
+ "Asbestos and Mesothelioma",
279
+ "Auto and Car Accidents",
280
+ "Bankruptcy",
281
+ "Birth Certificate and Name Change",
282
+ "Business Lawyers",
283
+ "Child Custody",
284
+ "Child Support",
285
+ "Civil Rights and Discrimination",
286
+ "Consumer Lawyers",
287
+ "Copyrights and Trademarks",
288
+ "Criminal and Felony",
289
+ "Debt and Collections",
290
+ "Defend a Lawsuit",
291
+ "Divorce and Separation",
292
+ "DUI and DWI",
293
+ "Elder Law",
294
+ "Employment and Workplace",
295
+ "Expungement",
296
+ "Family Issues",
297
+ "File a Lawsuit",
298
+ "Foreclosure",
299
+ "Guardianship",
300
+ "Harassment and Discrimination",
301
+ "Identity Theft",
302
+ "Immigration and Visas",
303
+ "Insurance",
304
+ "Landlord and Tenant",
305
+ "Lemon Law",
306
+ "Long Term Disability",
307
+ "Medical Malpractice",
308
+ "Non-Workplace Discrimination",
309
+ "Non-Workplace Harassment",
310
+ "Patents and Intellectual Property",
311
+ "Personal Injury",
312
+ "Power of Attorney",
313
+ "Probate and Estates",
314
+ "Product Liability",
315
+ "Property Damage",
316
+ "Real Estate",
317
+ "Sexual Harassment",
318
+ "Social Security Disability and Insurance",
319
+ "Tax and IRS",
320
+ "Traffic and Tickets",
321
+ "Unemployment",
322
+ "Victim of a Crime",
323
+ "Wills and Trusts",
324
+ "Workers Compensation",
325
+ "Workplace Discrimination",
326
+ "Workplace Harassment",
327
+ "Wrongful Death",
328
+ "Wrongful Termination",
329
+ "Not Sure or Other",
330
+ ];
331
+
332
+ const generalTOLP$1 = (scope, vertical, updates = {}) => {
333
+ const func = vertical ? verticalSelect : sbsSelect;
334
+ const label = vertical ? updates.label : "Type of Help Needed:";
335
+ return func(
336
+ merge(
337
+ {
338
+ label,
339
+ name: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
340
+ id: scope ? scope + ":" + "Type_Of_Legal_Problem" : "Type_Of_Legal_Problem",
341
+ options: TOLPOptions,
342
+ },
343
+ updates
344
+ )
345
+ )
346
+ };
347
+
348
+ const TCPAConsent = (scope, updates = {}) => ({
349
+ $formkit: "checkbox",
350
+ label: "$meta.tcpaLanguage",
351
+ // Necessary to get links to work in the tcpa language
352
+ __raw__sectionsSchema: {
353
+ label: { attrs: { innerHTML: "$label" } },
354
+ },
355
+ name: scope ? scope + ":" + "TCPA_Opt_In" : "TCPA_Opt_In",
356
+ "data-tf-sensitive": "false",
357
+ validation: "required|accepted",
358
+ validationMessages: {
359
+ required: "Consent is required",
360
+ accepted: "Consent is required",
361
+ },
362
+ classes: {
363
+ outer: updates.outerClass ? updates.outerClass : "",
364
+ wrapper: updates.wrapperClass ? updates.wrapperClass : "",
365
+ messages: updates.messagesClass ? updates.messagesClass : "",
366
+ label:
367
+ "!t-text-[0.7rem] t-text-slate-500 t-font-normal !t-leading-[0.9rem]" +
368
+ (updates.labelClass ? " " + updates.labelClass : ""),
369
+ },
370
+ });
371
+
372
+ const NEXT_ON_ENTER = "$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
373
+ const NEXT_ON_INPUT = "$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))";
374
+
375
+ const isInput = (n) => {
376
+ return n.type !== "group" && n.type !== "section" && n.type !== "form" && n.$formkit !== "hidden" && !n.children
377
+ };
378
+
379
+ const findLastInput = (n) => {
380
+ if (isInput(n)) {
381
+ return n
382
+ }
383
+ for (var i = n.children.length - 1; i >= 0; i--) {
384
+ if (typeof n.children === "string") {
385
+ continue
386
+ }
387
+ const child = n.children[i];
388
+ if (isInput(child)) {
389
+ return child
390
+ }
391
+ const res = findLastInput(child);
392
+ if (res) {
393
+ return res
394
+ }
395
+ }
396
+ return null
397
+ };
398
+
399
+ const secureIconDefault = {
400
+ $el: "div",
401
+ if: "$activeStep === $lastStep()",
402
+ attrs: {
403
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500",
404
+ },
405
+ children: [
406
+ {
407
+ $el: "img",
408
+ attrs: {
409
+ loading: "lazy",
410
+ alt: "",
411
+ style: {
412
+ border: 0,
413
+ },
414
+ width: "25",
415
+ height: "25",
416
+ src: "https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg",
417
+ },
418
+ },
419
+ {
420
+ $el: "span",
421
+ children: "Secure & Encrypted",
422
+ attrs: {
423
+ class: "t-pl-2 t-pt-1 t-font-medium",
424
+ },
425
+ },
426
+ ],
427
+ };
428
+
429
+ function secureIcon(updates = {}) {
430
+ return merge(secureIconDefault, updates)
431
+ }
432
+
433
+ function secureIconStandalone(updates = {}) {
434
+ return {
435
+ if: "$activeStep === $lastStep()",
436
+ style: {
437
+ if: "$activeStep !== $lastStep()",
438
+ then: "display: none;",
439
+ },
440
+ children: [
441
+ secureIcon({
442
+ attrs: {
443
+ class: "t-flex t-justify-center t-items-center t-text-sm t-text-gray-500 t-pb-4 sm:t-pb-8",
444
+ },
445
+ ...updates,
446
+ }),
447
+ ],
448
+ }
449
+ }
450
+
451
+ function verticalStepHeadline(updates) {
452
+ return {
453
+ $el: "h3",
454
+ children: updates.headline || "Tell Us About Your Situation",
455
+ attrs: {
456
+ class:
457
+ "t-flex t-justify-center t-text-center t-text-xl t-font-bold t-text-dark t-pb-5 t-pt-0 t-px-1" +
458
+ " " +
459
+ (updates.headlineClass || ""),
460
+ },
461
+ }
462
+ }
463
+
464
+ function commentsStepHeadline(updates) {
465
+ return {
466
+ $el: "h3",
467
+ children: updates.headline || "Additional Details",
468
+ attrs: {
469
+ class:
470
+ "t-flex t-justify-center t-text-center t-text-lg sm:t-text-xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
471
+ " " +
472
+ (updates.headlineClass || ""),
473
+ },
474
+ }
475
+ }
476
+
477
+ function firstAndLastStepHeadline(updates) {
478
+ return {
479
+ $el: "h3",
480
+ children: updates.headline || "Please Provide a Contact Name",
481
+ attrs: {
482
+ class:
483
+ "t-flex t-justify-center t-text-center t-text-xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1" +
484
+ " " +
485
+ (updates.headlineClass || ""),
486
+ },
487
+ }
488
+ }
489
+
490
+ function contactStepHeadline(updates) {
491
+ return {
492
+ $el: "h3",
493
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
494
+ attrs: {
495
+ class:
496
+ "t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-4 t-px-1" +
497
+ " " +
498
+ (updates.headlineClass || "") +
499
+ " f-contact-info-headline",
500
+ },
501
+ }
502
+ }
503
+
504
+ function contactStepSubHeadline(updates) {
505
+ return {
506
+ $el: "h5",
507
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
508
+ attrs: {
509
+ class:
510
+ "t-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-6 t-pt-0 t-px-3" +
511
+ " " +
512
+ (updates.subheadlineClass || "") +
513
+ " f-contact-info-subheadline",
514
+ },
515
+ }
516
+ }
517
+
518
+ const TRUSTED_FORM_JS = `(function() {
519
+ if (window.xxTrustedFormLoaded) {
520
+ return
521
+ }
522
+ var vid = '';
523
+ if (typeof window.zar !== 'undefined') {
524
+ vid = window.zar.getVID();
525
+ }
526
+ window.xxTrustedFormLoaded = true;
527
+ var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
528
+ var tf = document.createElement('script');
529
+ tf.type = 'text/javascript'; tf.async = true;
530
+ 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();
531
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
532
+ })();`;
533
+
534
+ function trustedFormScript() {
535
+ return {
536
+ $el: "script",
537
+ if: "$activeStep === $lastStep()",
538
+ children: TRUSTED_FORM_JS,
539
+ }
540
+ }
541
+
542
+ const stepDefaults = (step, stepKey) => ({
543
+ $el: "section",
544
+ if: '$stepEnabled("' + step + '")',
545
+ attrs: {
546
+ hidden: '$activeStep !== "' + step + '"',
547
+ key: stepKey ? stepKey : step,
548
+ },
549
+ });
550
+
551
+ function step(name, inputs, updates = {}) {
552
+ const {
553
+ nextOnEnter = true,
554
+ nextOnInput = false,
555
+ stepKey = undefined,
556
+ nextStepMap = undefined,
557
+ triggerRedirectMap = undefined,
558
+ autoFocus = undefined,
559
+ } = updates;
560
+
561
+ if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
562
+ const lastInput = findLastInput(inputs[inputs.length - 1]);
563
+ if (lastInput && nextOnEnter === true) {
564
+ lastInput.onKeypress = NEXT_ON_ENTER;
565
+ }
566
+ if (lastInput && nextOnInput === true) {
567
+ lastInput.onInput = NEXT_ON_INPUT;
568
+ }
569
+ }
570
+
571
+ return merge(stepDefaults(name, stepKey), {
572
+ children: [
573
+ {
574
+ $formkit: "group",
575
+ id: name,
576
+ name: name,
577
+ nextStepMap: nextStepMap,
578
+ triggerRedirectMap: triggerRedirectMap,
579
+ autoFocus: autoFocus,
580
+ children: inputs,
581
+ },
582
+ ],
583
+ })
584
+ }
585
+
586
+ // Single question step
587
+ function sqstep(name, input, defaultHeadline, updates = {}) {
588
+ if (typeof updates.nextOnInput === "undefined") {
589
+ updates.nextOnInput = true;
590
+ }
591
+
592
+ return step(
593
+ name,
594
+ [
595
+ verticalStepHeadline({
596
+ headline: updates.headline ?? defaultHeadline,
597
+ headlineClass: updates.headlineClass,
598
+ }),
599
+ ...(Array.isArray(input) ? input : [input]),
600
+ ],
601
+ updates
602
+ )
603
+ }
604
+
605
+ function commentsLegal(updates = {}) {
606
+ const mergedUpdates = { ...updates, nextOnEnter: false };
607
+
608
+ return step(
609
+ "comments",
610
+ [
611
+ commentsStepHeadline(updates),
612
+ comments(updates.scope, false, {
613
+ label: typeof updates.label === "undefined" ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
614
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
615
+ // TODO: this is a mess
616
+ inputClass: typeof updates.inputClass === "undefined" ? "!t-h-32" : updates.inputClass,
617
+ innerClass: typeof updates.innerClass === "undefined" ? "t-max-w-xl" : updates.innerClass,
618
+ wrapperClass: typeof updates.wrapperClass === "undefined" ? undefined : updates.wrapperClass,
619
+ }),
620
+ ],
621
+ mergedUpdates
622
+ )
623
+ }
624
+
625
+ function contactInfoV2(updates = {}) {
626
+ return step(
627
+ "contactInfo",
628
+ [
629
+ contactStepHeadline(updates),
630
+ contactStepSubHeadline(updates),
631
+ trustedFormScript(),
632
+ {
633
+ $el: "div",
634
+ attrs: {
635
+ class: "t-flex t-flex-col t-justify-center t-items-center",
636
+ },
637
+ children: [
638
+ emailFL(updates.scope, {
639
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
640
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
641
+ }),
642
+ phoneFL(updates.scope, {
643
+ outerClass: "!t-max-w-[95%] !t-w-[96%] sm:!t-w-[70%]",
644
+ innerClass: "!t-w-[98%] !t-max-w-[98%] sm:!t-w-[100%] sm:!t-max-w-[100%]",
645
+ }),
646
+ ],
647
+ },
648
+ TCPAConsent(updates.scope, {
649
+ outerClass: "!t-flex !t-flex-col !t-justify-center !t-items-center",
650
+ wrapperClass: "t-w-[95%] sm:t-w-[80%]",
651
+ messagesClass: "t-w-[95%] sm:t-w-[80%]",
652
+ }),
653
+ ],
654
+ { nextOnEnter: false }
655
+ )
656
+ }
657
+
658
+ function firstAndLastV4(updates = {}) {
659
+ return step(
660
+ "firstAndLast",
661
+ [
662
+ firstAndLastStepHeadline({
663
+ headline: updates.headline ?? "Who is looking for help?",
664
+ headlineClass: updates.headlineClass,
665
+ }),
666
+ {
667
+ $el: "div",
668
+ attrs: {
669
+ class: "t-flex t-flex-col t-justify-center t-items-center t-pt-3",
670
+ },
671
+ children: [fullNameFLMobileCol(updates.scope)],
672
+ },
673
+ ],
674
+ updates
675
+ )
676
+ }
677
+
678
+ function zipcode(updates = {}) {
679
+ return sqstep("zipcode", zipcode$1(updates.scope, true, updates.input), "Please verify your Zip Code", updates)
680
+ }
681
+
682
+ function generalTOLP(updates = {}) {
683
+ return step("generalTOLP", [generalTOLP$1(updates.scope, true, updates.input)], updates)
684
+ }
685
+
686
+ function degreeOfInterest(updates = {}) {
687
+ return sqstep(
688
+ "degreeOfInterest",
689
+ degreeOfInterest$1(updates.scope, true, updates.input),
690
+ "Could you pay if your issue could be resolved?",
691
+ updates
692
+ )
693
+ }
694
+
695
+ const formNavigationNoFinalBack = (updates = {}) => ({
696
+ $el: "div",
697
+ attrs: {
698
+ class: {
699
+ if: "$activeStep === $firstStep()",
700
+ then: "step-nav " + (updates.firstStepButtonClass || "!t-justify-center sm:!t-justify-between"),
701
+ else: {
702
+ if: "$activeStep === $lastStep()",
703
+ then: "step-nav !t-justify-center ",
704
+ else: "step-nav !t-justify-between",
705
+ },
706
+ },
707
+ },
708
+ children: [
709
+ {
710
+ $formkit: "button",
711
+ name: "back_button",
712
+ onClick: "$setPreviousStep($prevStepFunc($get(form)))",
713
+ children: "Back",
714
+ outerClass: {
715
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
716
+ then: "t-hidden sm:t-block",
717
+ else: "",
718
+ },
719
+ style: {
720
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
721
+ then: "display: none;",
722
+ },
723
+ classes: {
724
+ input: (updates.inputClass || "") + " f-navigation-input",
725
+ },
726
+ },
727
+ {
728
+ $formkit: "button",
729
+ name: "next_button",
730
+ onClick: "$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))",
731
+ children: {
732
+ if: "$activeStep === $firstStep()",
733
+ then: updates.startText || "Start",
734
+ else: "Next",
735
+ },
736
+ outerClass: {
737
+ if: "$activeStep === $lastStep()",
738
+ then: "t-hidden",
739
+ else: "",
740
+ },
741
+ style: {
742
+ if: "$activeStep === $lastStep()",
743
+ then: "display: none;",
744
+ },
745
+ classes: {
746
+ input: (updates.inputClass || "") + " f-navigation-input",
747
+ },
748
+ },
749
+ {
750
+ $formkit: "submit",
751
+ name: "submit_button",
752
+ label: updates.submitLabel || "Submit",
753
+ if: "$activeStep === $lastStep()",
754
+ style: {
755
+ if: "$activeStep !== $lastStep()",
756
+ then: "display: none;",
757
+ },
758
+ classes: {
759
+ input: (updates.inputClass || "") + " f-navigation-input !t-w-60",
760
+ outer: "!t-mt-0 !t-mb-0",
761
+ },
762
+ },
763
+ ],
764
+ });
765
+
766
+ const formDetails = () => ({
767
+ $el: "pre",
768
+ if: '$urlParam("fdbg", "") == 1',
769
+ children: [
770
+ {
771
+ $el: "pre",
772
+ children: "$stringify( $get(form).value )",
773
+ attrs: {
774
+ class: "t-text-xs",
775
+ style: "overflow: scroll",
776
+ },
777
+ },
778
+ {
779
+ $el: "pre",
780
+ children: ["activeStep: ", "$activeStep"],
781
+ attrs: {
782
+ class: "t-text-xs",
783
+ style: "overflow: scroll",
784
+ },
785
+ },
786
+ {
787
+ $el: "pre",
788
+ children: ["stepHistory: ", "$stepHistory"],
789
+ attrs: {
790
+ class: "t-text-xs",
791
+ style: "overflow: scroll",
792
+ },
793
+ },
794
+ {
795
+ $el: "pre",
796
+ children: ["stepQueue: ", "$stepQueue"],
797
+ attrs: {
798
+ class: "t-text-xs",
799
+ style: "overflow: scroll",
800
+ },
801
+ },
802
+ {
803
+ $el: "pre",
804
+ children: ["steps: ", "$stepKeys()"],
805
+ attrs: {
806
+ class: "t-text-xs",
807
+ style: "overflow: scroll",
808
+ },
809
+ },
810
+ ],
811
+ });
812
+
813
+ const formPropDefaults = {
814
+ type: "form",
815
+ id: "form",
816
+ config: { validationVisibility: "submit" },
817
+ onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
818
+ plugins: "$plugins",
819
+ actions: false,
820
+ anchorElement: "form-anchor",
821
+ useLocalStorage: true,
822
+ prepop: {
823
+ fromURL: true,
824
+ },
825
+ errorCodes: {
826
+ 403: { message: "An Error Occurred", abort: false },
827
+ 409: { abort: false },
828
+ 429: "An Error Occurred",
829
+ 504: { message: "An Error Occurred", abort: false },
830
+ },
831
+ formClass: "!t-max-w-[40rem]",
832
+ };
833
+
834
+ function filterMapByKey(obj, keyList) {
835
+ return Object.fromEntries(Object.entries(obj).filter(([key]) => keyList.includes(key)))
836
+ }
837
+
838
+ // export function filteredNextStepsMapLegal(keyList) {
839
+ // const res = { Type_Of_Legal_Problem: filterMapByKey(nextStepsMapGeneralLegal["Type_Of_Legal_Problem"], keyList) }
840
+ // res["*"] = nextStepsMapGeneralLegal["*"]
841
+ // return res
842
+ // }
843
+
844
+ function formProps(updates) {
845
+ const props = merge(formPropDefaults, updates);
846
+ if (props.formId && !props.name) {
847
+ props.name = props.formId;
848
+ }
849
+ return props
850
+ }
851
+
852
+ const metaDefaults = {};
853
+
854
+ function metaProps(updates) {
855
+ const data = merge(metaDefaults, updates);
856
+ return {
857
+ type: "meta",
858
+ data,
859
+ }
860
+ }
861
+
862
+ function defaultMetaPropsLegal(tolps = null) {
863
+ let commentsPlaceholders = TOLPCommentsPlaceholders;
864
+ let finalHeadlines = TOLPFinalHeadlines;
865
+ let finalSubHeadlines = TOLPFinalSubHeadlines;
866
+ if (tolps) {
867
+ commentsPlaceholders = filterMapByKey(TOLPCommentsPlaceholders, tolps);
868
+ finalHeadlines = filterMapByKey(TOLPFinalHeadlines, tolps);
869
+ finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
870
+ }
871
+ return metaProps({
872
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
873
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
874
+ commentsPlaceholders: commentsPlaceholders,
875
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
876
+ finalHeadlines: finalHeadlines,
877
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
878
+ finalSubHeadlines: finalSubHeadlines,
879
+ })
880
+ }
881
+
882
+ function dynamicSchemaNode(field = "Type_Of_Legal_Problem") {
883
+ return {
884
+ $cmp: "FormKitSchema",
885
+ if: "$get(" + field + ").value",
886
+ props: {
887
+ schema: "$meta.dynamicSchema",
888
+ data: "$buildData($meta)",
889
+ },
890
+ }
891
+ }
892
+
893
+ const formAnchorDefaults = {
894
+ $el: "div",
895
+ children: [
896
+ {
897
+ $el: "div",
898
+ attrs: {
899
+ id: "form-anchor",
900
+ class: "t-absolute",
901
+ style: { top: "-30px", left: 0 },
902
+ },
903
+ },
904
+ ],
905
+ attrs: {
906
+ class: "t-relative",
907
+ },
908
+ };
909
+
910
+ function formAnchor(updates) {
911
+ return merge(formAnchorDefaults, updates)
912
+ }
913
+
914
+ const progressBarDefaults = {
915
+ $el: "div",
916
+ attrs: {
917
+ class: "t-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center",
918
+ style: {
919
+ if: "$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())",
920
+ then: "display: none",
921
+ },
922
+ },
923
+ children: [
924
+ {
925
+ $el: "div",
926
+ attrs: {
927
+ class: "t-flex t-justify-center",
928
+ },
929
+ children: [
930
+ {
931
+ $el: "span",
932
+ attrs: {
933
+ id: "progress-bar-text",
934
+ class: "t-text-sm t-mb-1",
935
+ },
936
+ children: ["0% Complete"],
937
+ },
938
+ ],
939
+ },
940
+ {
941
+ $el: "div",
942
+ attrs: {
943
+ class: "t-bg-gray-100 t-w-9/12 t-rounded",
944
+ },
945
+ children: [
946
+ {
947
+ $el: "div",
948
+ attrs: {
949
+ id: "progress-bar",
950
+ class:
951
+ "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]",
952
+ style: {
953
+ transition: "width 0.5s ease",
954
+ },
955
+ },
956
+ },
957
+ ],
958
+ },
959
+ ],
960
+ };
961
+
962
+ function progressBar(updates) {
963
+ return merge(progressBarDefaults, updates)
964
+ }
965
+
966
+ function headlineDefaults(updates = {}) {
967
+ return {
968
+ $el: "h1",
969
+ attrs: {
970
+ class:
971
+ "t-flex t-justify-center t-text-center t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3" +
972
+ " " +
973
+ (updates.headlineClass || "") +
974
+ " f-first-headline",
975
+ },
976
+ }
977
+ }
978
+
979
+ function headline(updates = {}) {
980
+ return merge(headlineDefaults(updates), updates)
981
+ }
982
+
983
+ function subHeadlineDefaults(updates = {}) {
984
+ return {
985
+ $el: "h3",
986
+ attrs: {
987
+ class:
988
+ "t-flex t-justify-center t-text-center t-text-[1.1rem] md:t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10 t-pb-3" +
989
+ " " +
990
+ (updates.subheadlineClass || "") +
991
+ " f-first-subheadline",
992
+ },
993
+ }
994
+ }
995
+
996
+ function subHeadline(updates = {}) {
997
+ return merge(subHeadlineDefaults(updates), updates)
998
+ }
999
+
1000
+ function defaultSubHeadline() {
1001
+ return subHeadline({
1002
+ children: '$urlParam("shl", "Our Service is Fast and Free!")',
1003
+ if: "$activeStep === $firstStep()",
1004
+ })
1005
+ }
1006
+
1007
+ const hiddenInputsBase = [
1008
+ {
1009
+ $formkit: "hidden",
1010
+ name: "gclid",
1011
+ value: null,
1012
+ },
1013
+ {
1014
+ $formkit: "hidden",
1015
+ name: "campaignid",
1016
+ value: null,
1017
+ },
1018
+ {
1019
+ $formkit: "hidden",
1020
+ name: "s",
1021
+ value: null,
1022
+ },
1023
+ ];
1024
+
1025
+ const hiddenInputsLegal = [
1026
+ {
1027
+ $formkit: "hidden",
1028
+ name: "vertical",
1029
+ value: "Legal",
1030
+ },
1031
+ {
1032
+ $formkit: "hidden",
1033
+ name: "TCPA_Language",
1034
+ value: "$meta.tcpaLanguage",
1035
+ },
1036
+ ...hiddenInputsBase,
1037
+ ];
1038
+
1039
+ const legalRedirectMapDefaults = {
1040
+ "*": LegalRedirectUrl(),
1041
+ };
1042
+
1043
+ function legalRedirectMap(updates) {
1044
+ return merge(legalRedirectMapDefaults, updates)
1045
+ }
1046
+
1047
+ const TOLPCommentsPlaceholders = {
1048
+ Adoption: 'Example: "I need help with adoption forms"',
1049
+ "Asbestos and Mesothelioma": 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1050
+ "Auto and Car Accidents":
1051
+ 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1052
+ Bankruptcy: 'Example: "I need help filing for bankruptcy"',
1053
+ "Birth Certificate and Name Change": 'Example: "Just married and would like to change my last name"',
1054
+ "Business Lawyers": 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1055
+ "Child Custody and Support": 'Example: "Need help getting custody" or "Issues with child support payments"',
1056
+ "Child Custody": 'Example: "Need help getting custody"',
1057
+ "Child Support": 'Example: "Issues with child support payments"',
1058
+ "Civil Rights and Discrimination": 'Example: "Police brutality" or "Coworker keeps harassing me"',
1059
+ "Civil Lawsuit":
1060
+ 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1061
+ "File a Lawsuit": 'Example: "A contractor took my money and never completed the job"',
1062
+ "Defend a Lawsuit": 'Example: "I am being sued by a neighbor"',
1063
+ "Consumer Lawyers":
1064
+ 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1065
+ "Copyrights and Trademarks": 'Example: "I would like to register a trademark or copyright a name"',
1066
+ "Criminal and Felony":
1067
+ 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1068
+ "Debt and Collections": 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1069
+ "Divorce and Separation": 'Example: "I would like to file for an uncontested divorce"',
1070
+ "DUI and DWI": 'Example: "I was arrested for DUI and need legal defense"',
1071
+ "Elder Law": 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1072
+ "Employment and Workplace": 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1073
+ Expungement: 'Example: "I would like to file for an expungement and clear my record"',
1074
+ "Family Issues": 'Example: "I need help with guardianship" or "I need a simple will created"',
1075
+ Foreclosure: 'Example: "I need help to avoid foreclosure on my house"',
1076
+ Guardianship: 'Example: "I need help with guardianship documents"',
1077
+ "Harassment and Discrimination": 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1078
+ "Sexual Harassment": 'Example: "I am being sexually harassed by a coworker"',
1079
+ "Workplace Harassment": 'Example: "My coworker is being aggressive towards me"',
1080
+ "Non-Workplace Harassment": 'Example: "My neighbor is harassing me"',
1081
+ "Workplace Discrimination": 'Example: "I am being discriminated at work based on my age"',
1082
+ "Non-Workplace Discrimination": 'Example: "I am being discriminated against by a local official"',
1083
+ "Identity Theft": 'Example: "Someone stole my identity and I need help fixing the issue"',
1084
+ "Immigration and Visas": 'Example: "I need help filing for a visa" or "Help with a green card"',
1085
+ Insurance: 'Example: "I need help filing an insurance claim for damage to my house"',
1086
+ "Landlord and Tenant":
1087
+ 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1088
+ "Lemon Law": 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1089
+ "Long Term Disability":
1090
+ 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1091
+ "Medical Malpractice": 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1092
+ "Patents and Intellectual Property": 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1093
+ "Personal Injury": 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1094
+ "Power of Attorney": 'Example: "I need help with a limited or general power of attorney"',
1095
+ "Probate and Estates":
1096
+ 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1097
+ "Product Liability": 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1098
+ "Property Damage": 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1099
+ "Real Estate":
1100
+ 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1101
+ "Social Security Disability and Insurance":
1102
+ 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1103
+ "Tax and IRS": 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1104
+ "Traffic and Tickets":
1105
+ 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1106
+ Unemployment: 'Example: "I need help filing for unemployment benefits"',
1107
+ "Victim of a Crime": 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1108
+ "Wills and Trusts": 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1109
+ "Workers Compensation": 'Example: "I broke my arm at work and need help getting compensation"',
1110
+ "Wrongful Death": 'Example: "A family member was killed on the job and we need legal representation"',
1111
+ "Wrongful Termination": 'Example: "I was fired by my employer without cause"',
1112
+ "Not Sure or Other": 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"',
1113
+ };
1114
+
1115
+ const TOLPFinalHeadlines = {
1116
+ Adoption: "Connect With Adoption Professionals Today",
1117
+ "Auto and Car Accidents": "Connect With Accident Professionals Today",
1118
+ Bankruptcy: "Take Control of Your Financial Future",
1119
+ "Birth Certificate and Name Change": "Start Your Change Today",
1120
+ "Business Lawyers": "Connect With Business Professionals Today",
1121
+ "Child Custody": "Connect With Custody Professionals Today",
1122
+ "Child Support": "Connect With Child Support Professionals",
1123
+ // 'Child Custody and Support': '',
1124
+ "Civil Rights and Discrimination": "Stand Up For Your Rights",
1125
+ "Civil Lawsuit": "Connect With Lawsuit Professionals Today",
1126
+ // "Consumer Lawyers": "",
1127
+ "Copyrights and Trademarks": "Protect Your Intellectual Property",
1128
+ // "Criminal and Felony": "Connect With Legal Help",
1129
+ "Debt and Collections": "Connect With Debt Professionals Today",
1130
+ "Divorce and Separation": "Connect With Divorce Professionals Today",
1131
+ "DUI and DWI": "Defend Against DUI Charges",
1132
+ "Elder Law": "Connect With Elder Law Professionals",
1133
+ // "Employment and Workplace": "Connect With Legal Help",
1134
+ Expungement: "Clear Your Record",
1135
+ "Family Issues": "Connect With Family Legal Help",
1136
+ Foreclosure: "Fight to Keep Your Home",
1137
+ Guardianship: "Connect With Guardianship Professionals",
1138
+ // "Harassment and Discrimination": "Connect With Legal Help",
1139
+ // "Identity Theft": "Connect With Legal Help",
1140
+ "Immigration and Visas": "Get Immigration Legal Help",
1141
+ Insurance: "Get Insurance Legal Help",
1142
+ // "Landlord and Tenant": "Connect With Legal Help",
1143
+ "Lemon Law": "Connect With Lemon Law Professionals",
1144
+ "Long Term Disability": "Connect With Disability Professionals",
1145
+ "Medical Malpractice": "Hold Negligent Providers Accountable",
1146
+ "Patents and Intellectual Property": "Connect With IP Professionals Today",
1147
+ "Personal Injury": "Maximize Your Injury Compensation",
1148
+ // "Power of Attorney": "Connect With Legal Help",
1149
+ "Probate and Estates": "Manage Probate with Expert Guidance",
1150
+ "Product Liability": "Get Justice for Faulty Products",
1151
+ // 'Property Damage': 'Connect With Legal Help',
1152
+ "Real Estate": "Connect With Real Estate Professionals",
1153
+ "Sexual Harassment": "Stand Up Against Sexual Harassment",
1154
+ "Social Security Disability and Insurance": "Get the Benefits You Deserve",
1155
+ "Tax and IRS": "Connect With Tax Legal Help",
1156
+ "Traffic and Tickets": "Protect Your Record Today",
1157
+ Unemployment: "Connect With Unemployment Professionals",
1158
+ "Victim of a Crime": "Seek Justice as a Crime Victim",
1159
+ "Wills and Trusts": "Plan Your Estate with Confidence",
1160
+ "Workers Compensation": "Maximize Your Workers' Comp Benefits",
1161
+ "Wrongful Death": "Seek Justice for a Loved One",
1162
+ "Wrongful Termination": "Fight Back Against Unfair Firing Today",
1163
+ // 'Not Sure or Other': ''
1164
+ // 'Workplace Harassment': '',
1165
+ // 'Non-Workplace Harassment': '',
1166
+ // 'Workplace Discrimination': '',
1167
+ // 'Non-Workplace Discrimination': '',
1168
+ };
1169
+
1170
+ const TOLPFinalSubHeadlines = {
1171
+ // Adoption: "You may benefit from speaking with an adoption professional. Please verify your contact information.",
1172
+ // // 'Asbestos and Mesothelioma': '',
1173
+ // "Auto and Car Accidents":
1174
+ // "You may benefit from speaking with an accident professional. Please verify your contact information.",
1175
+ // Bankruptcy: "You may benefit from speaking with a bankruptcy professional. Please verify your contact information.",
1176
+ // // 'Birth Certificate and Name Change': '',
1177
+ // // 'Business Lawyers': '',
1178
+ // // 'Child Custody and Support': '',
1179
+ // // 'Civil Rights and Discrimination': '',
1180
+ // // 'Civil Lawsuit': '',
1181
+ // // 'Consumer Lawyers': '',
1182
+ // "Copyrights and Trademarks":
1183
+ // "You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.",
1184
+ // // 'Criminal and Felony': '',
1185
+ // // 'Debt and Collections': '',
1186
+ // "Divorce and Separation":
1187
+ // "You may benefit from speaking with a divorce professional. Please verify your contact information.",
1188
+ // "DUI and DWI": "You may benefit from speaking with a DUI professional. Please verify your contact information.",
1189
+ // "Elder Law": "You may benefit from speaking with an elder law professional. Please verify your contact information.",
1190
+ // // 'Employment and Workplace': '',
1191
+ // // 'Expungement': '',
1192
+ // // 'Family Issues': '',
1193
+ // Foreclosure: "You may benefit from speaking with a foreclosure professional. Please verify your contact information.",
1194
+ // Guardianship:
1195
+ // "You may benefit from speaking with a guardianship professional. Please verify your contact information.",
1196
+ // // 'Harassment and Discrimination': '',
1197
+ // // 'Identity Theft': '',
1198
+ // "Immigration and Visas":
1199
+ // "You may benefit from speaking with a immigration professional. Please verify your contact information.",
1200
+ // // 'Insurance': '',
1201
+ // "Landlord and Tenant":
1202
+ // "You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.",
1203
+ // // 'Lemon Law': '',
1204
+ // "Long Term Disability":
1205
+ // "You may benefit from speaking with a disability legal professional. Please verify your contact information.",
1206
+ // "Medical Malpractice":
1207
+ // "You may benefit from speaking with a malpractice professional. Please verify your contact information.",
1208
+ // "Patents and Intellectual Property":
1209
+ // "You may benefit from speaking with a patent professional. Please verify your contact information.",
1210
+ // "Personal Injury":
1211
+ // "You may benefit from speaking with a personal injury professional. Please verify your contact information.",
1212
+ // // 'Power of Attorney': '',
1213
+ // "Probate and Estates":
1214
+ // "You may benefit from speaking with a probate and estate professional. Please verify your contact information.",
1215
+ // // 'Product Liability': '',
1216
+ // // 'Property Damage': '',
1217
+ // "Real Estate":
1218
+ // "You may benefit from speaking with a real estate professional. Please verify your contact information.",
1219
+ // "Social Security Disability and Insurance":
1220
+ // "You may benefit from speaking with an SSDI professional. Please verify your contact information.",
1221
+ // "Tax and IRS": "You may benefit from speaking with a tax professional. Please verify your contact information.",
1222
+ // // 'Traffic and Tickets': '',
1223
+ // Unemployment:
1224
+ // "You may benefit from speaking with an unemployment professional. Please verify your contact information.",
1225
+ // // 'Victim of a Crime': '',
1226
+ // // 'Wills and Trusts': '',
1227
+ // "Workers Compensation":
1228
+ // "You may benefit from speaking with a workers compensation professional. Please verify your contact information.",
1229
+ // // 'Wrongful Death': '',
1230
+ // // 'Wrongful Termination': '',
1231
+ // // 'Not Sure or Other': ''
1232
+ // // 'Sexual Harassment': '',
1233
+ // // 'Workplace Harassment': '',
1234
+ // // 'Non-Workplace Harassment': '',
1235
+ // // 'Workplace Discrimination': '',
1236
+ // // 'Non-Workplace Discrimination': '',
1237
+ };
1238
+
1239
+ const nextStepsLegalMinimalDefault = ["comments", "degreeOfInterest", "zipcode", "firstAndLast", "contactInfo"];
1240
+
1241
+ const nextStepsLegalMinimalNoDOI = ["comments", "zipcode", "firstAndLast", "contactInfo"];
1242
+
1243
+ const nextStepsMapGeneralLegalMinimal = {
1244
+ values: {
1245
+ Type_Of_Legal_Problem: {
1246
+ "Auto and Car Accidents": nextStepsLegalMinimalNoDOI,
1247
+ "Long Term Disability": nextStepsLegalMinimalNoDOI,
1248
+ "Personal Injury": nextStepsLegalMinimalNoDOI,
1249
+ "Social Security Disability and Insurance": nextStepsLegalMinimalNoDOI,
1250
+ "Workers Compensation": nextStepsLegalMinimalNoDOI,
1251
+ "Wrongful Death": nextStepsLegalMinimalNoDOI,
1252
+ },
1253
+ "*": nextStepsLegalMinimalDefault,
1254
+ },
1255
+ };
1256
+
1257
+ const meta = defaultMetaPropsLegal();
1258
+
1259
+ meta.data.dynamicSchema = [
1260
+ degreeOfInterest(),
1261
+ zipcode(),
1262
+ commentsLegal({
1263
+ label: null,
1264
+ headline: "Please describe your issue:",
1265
+ headlineClass: "!t-text-dark",
1266
+ wrapperClass: "t-flex t-justify-center",
1267
+ innerClass: "t-w-full",
1268
+ }),
1269
+ firstAndLastV4({
1270
+ headlineClass: "!t-text-dark",
1271
+ }),
1272
+ ];
1273
+
1274
+ const schema = [
1275
+ meta,
1276
+ formAnchor(),
1277
+ {
1278
+ $cmp: "FormKit",
1279
+ props: formProps({
1280
+ formId: "generalLegalSingleSimple",
1281
+ redirectMap: legalRedirectMap(),
1282
+ }),
1283
+ children: [
1284
+ progressBar(),
1285
+ headline({
1286
+ children: '$urlParam("hl", "Need Legal Help? Start Here!")',
1287
+ if: "$activeStep === $firstStep()",
1288
+ }),
1289
+ defaultSubHeadline(),
1290
+ ...hiddenInputsLegal,
1291
+ {
1292
+ $el: "div",
1293
+ attrs: {
1294
+ class: "form-body",
1295
+ },
1296
+ children: [
1297
+ generalTOLP({
1298
+ nextOnInput: false,
1299
+ nextStepMap: nextStepsMapGeneralLegalMinimal,
1300
+ headlineClass: "t-text-lg",
1301
+ input: {
1302
+ placeholder: "Select a Category",
1303
+ innerClass: "!t-max-w-[275px] md:!t-max-w-xl",
1304
+ inputClass: "t-text-center",
1305
+ },
1306
+ }),
1307
+ dynamicSchemaNode(),
1308
+ contactInfoV2({
1309
+ subheadlineClass: "!t-text-base",
1310
+ }),
1311
+ formNavigationNoFinalBack({
1312
+ startText: "Start Now",
1313
+ submitLabel: "Get Help Now",
1314
+ inputClass: "!t-font-extrabold",
1315
+ firstStepButtonClass: "!t-justify-center",
1316
+ }),
1317
+ secureIconStandalone(),
1318
+ formDetails(),
1319
+ ],
1320
+ },
1321
+ ],
1322
+ },
1323
+ ];
1324
+
1325
+ export { schema as default };