@justifi/webcomponents 4.19.2-rc → 4.19.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 (240) hide show
  1. package/dist/cjs/{Analytics-66574423.js → Analytics-c866f471.js} +4 -3
  2. package/dist/cjs/{Api-3bc6e43f.js → Api-b98b256f.js} +3 -3
  3. package/dist/cjs/{Business-aacbe893.js → Business-aa799fec.js} +104 -9
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  5. package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-26b0eecb.js} +1 -1
  6. package/dist/cjs/{business-form-options-582467fe.js → business-form-options-5db0bd5e.js} +2 -2
  7. package/dist/cjs/{payload-parsers-1cbc3b57.js → business-identity-schema-503ecb77.js} +1 -47
  8. package/dist/cjs/{business.service-090a21e1.js → business.service-65b0dbc8.js} +7 -6
  9. package/dist/cjs/config-ff2dda66.js +15 -0
  10. package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
  11. package/dist/cjs/form-control-checkbox_9.cjs.entry.js +26 -26
  12. package/dist/cjs/{get-payout-csv-238e839a.js → get-payout-csv-b98b0651.js} +5 -4
  13. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  14. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +15 -14
  15. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -5
  16. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +3 -3
  17. package/dist/cjs/justifi-business-details.cjs.entry.js +6 -5
  18. package/dist/cjs/justifi-business-form.cjs.entry.js +14 -13
  19. package/dist/cjs/justifi-card-form.cjs.entry.js +6 -5
  20. package/dist/cjs/justifi-checkout-core.cjs.entry.js +4 -3
  21. package/dist/cjs/justifi-checkout.cjs.entry.js +6 -5
  22. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -4
  23. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +10 -9
  24. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +12 -11
  25. package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -4
  26. package/dist/cjs/justifi-payment-form.cjs.entry.js +8 -7
  27. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +2 -2
  28. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -6
  29. package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -4
  30. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
  31. package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -4
  32. package/dist/cjs/justifi-refund-form.cjs.entry.js +4 -3
  33. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +1 -1
  34. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -5
  35. package/dist/cjs/{package-0b65a049.js → package-0c613220.js} +4 -2
  36. package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
  37. package/dist/cjs/{payment.service-c92635c8.js → payment.service-33d6ac16.js} +4 -3
  38. package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
  39. package/dist/cjs/payout-details-core.cjs.entry.js +1 -1
  40. package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
  41. package/dist/cjs/{schema-validations-2733de42.js → schema-validations-0a7e46a3.js} +1 -1
  42. package/dist/cjs/{utils-89d86e29.js → utils-af1b60a9.js} +0 -16
  43. package/dist/collection/api/Api.js +3 -3
  44. package/dist/collection/api/Business.js +66 -7
  45. package/dist/collection/api/Identity.js +39 -3
  46. package/dist/collection/api/services/analytics.service.js +2 -1
  47. package/dist/collection/api/services/business.service.js +6 -5
  48. package/dist/collection/api/services/checkout.service.js +3 -2
  49. package/dist/collection/api/services/insurance.service.js +3 -2
  50. package/dist/collection/api/services/payment.service.js +3 -2
  51. package/dist/collection/api/services/payout.service.js +4 -3
  52. package/dist/collection/api/services/provision.service.js +4 -2
  53. package/dist/collection/api/services/reports.service.js +2 -1
  54. package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
  55. package/dist/collection/components/business-forms/business-form/business-form.js +5 -5
  56. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +4 -5
  57. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +3 -3
  58. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +4 -3
  59. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +3 -5
  60. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +3 -3
  61. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +3 -4
  62. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +4 -3
  63. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +3 -4
  64. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +4 -3
  65. package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
  66. package/dist/collection/components/card-form/card-form.js +4 -3
  67. package/dist/collection/components/checkout/checkout-core.js +4 -3
  68. package/dist/collection/components/checkout/new-payment-method.js +4 -3
  69. package/dist/collection/components/checkout/payment-method-options.js +4 -3
  70. package/dist/collection/components/checkout/saved-payment-method.js +4 -3
  71. package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
  72. package/dist/collection/components/payment-form/payment-form.js +4 -3
  73. package/dist/collection/components/refund-form/refund-form.js +3 -2
  74. package/dist/config.js +11 -0
  75. package/dist/docs.json +9 -9
  76. package/dist/esm/{Analytics-6f321899.js → Analytics-3e74964a.js} +4 -3
  77. package/dist/esm/{Api-b09a2f6a.js → Api-c8abc2e0.js} +3 -3
  78. package/dist/esm/{Business-e218b4f4.js → Business-b73d5055.js} +104 -9
  79. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  80. package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-a5583cf8.js} +1 -1
  81. package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-d790973e.js} +2 -2
  82. package/dist/esm/{payload-parsers-acb719d1.js → business-identity-schema-9e3269fb.js} +2 -44
  83. package/dist/esm/{business.service-37d0cc72.js → business.service-6f139c2b.js} +7 -6
  84. package/dist/esm/config-476c7241.js +13 -0
  85. package/dist/esm/form-alert_5.entry.js +2 -2
  86. package/dist/esm/form-control-checkbox_9.entry.js +21 -21
  87. package/dist/esm/{get-payout-csv-a702a0d9.js → get-payout-csv-383d96c1.js} +5 -4
  88. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  89. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +15 -14
  90. package/dist/esm/justifi-bank-account-form.entry.js +6 -5
  91. package/dist/esm/justifi-billing-form_2.entry.js +3 -3
  92. package/dist/esm/justifi-business-details.entry.js +6 -5
  93. package/dist/esm/justifi-business-form.entry.js +13 -12
  94. package/dist/esm/justifi-card-form.entry.js +6 -5
  95. package/dist/esm/justifi-checkout-core.entry.js +4 -3
  96. package/dist/esm/justifi-checkout.entry.js +6 -5
  97. package/dist/esm/justifi-gross-payment-chart.entry.js +5 -4
  98. package/dist/esm/justifi-new-payment-method_4.entry.js +10 -9
  99. package/dist/esm/justifi-owner-form_3.entry.js +11 -10
  100. package/dist/esm/justifi-payment-details.entry.js +5 -4
  101. package/dist/esm/justifi-payment-form.entry.js +8 -7
  102. package/dist/esm/justifi-payment-method-form.entry.js +2 -2
  103. package/dist/esm/justifi-payment-provisioning.entry.js +7 -6
  104. package/dist/esm/justifi-payments-list.entry.js +5 -4
  105. package/dist/esm/justifi-payout-details.entry.js +5 -4
  106. package/dist/esm/justifi-payouts-list.entry.js +5 -4
  107. package/dist/esm/justifi-refund-form.entry.js +4 -3
  108. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +1 -1
  109. package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -5
  110. package/dist/esm/{package-9f727069.js → package-925a0fdd.js} +4 -2
  111. package/dist/esm/payment-details-core.entry.js +1 -1
  112. package/dist/esm/{payment.service-9359fe15.js → payment.service-e4fb5953.js} +4 -3
  113. package/dist/esm/payments-list-core.entry.js +1 -1
  114. package/dist/esm/payout-details-core.entry.js +1 -1
  115. package/dist/esm/payouts-list-core.entry.js +1 -1
  116. package/dist/esm/{schema-validations-a83ff220.js → schema-validations-e725d701.js} +2 -2
  117. package/dist/esm/{utils-3c1dd2fa.js → utils-e66d8bca.js} +1 -16
  118. package/dist/module/Analytics.js +2 -1
  119. package/dist/module/Api.js +3 -3
  120. package/dist/module/Business.js +104 -9
  121. package/dist/module/business-additional-questions-form-step-core.js +3 -3
  122. package/dist/module/business-bank-account-form-step.js +4 -3
  123. package/dist/module/business-core-info-form-step-core.js +3 -5
  124. package/dist/module/business-document-upload-form-step.js +4 -3
  125. package/dist/module/business-document-upload-input-group.js +1 -1
  126. package/dist/module/business-documents-on-file.js +1 -1
  127. package/dist/module/business-form-options.js +1 -1
  128. package/dist/module/business-owners-form-step-core.js +3 -3
  129. package/dist/module/business-representative-form-step-core.js +3 -4
  130. package/dist/module/business-terms-conditions-form-step.js +4 -3
  131. package/dist/module/business.service.js +6 -5
  132. package/dist/module/checkout-core.js +3 -2
  133. package/dist/module/config.js +13 -0
  134. package/dist/module/get-payout-csv.js +4 -3
  135. package/dist/module/justifi-bank-account-form.js +3 -2
  136. package/dist/module/justifi-business-form.js +5 -5
  137. package/dist/module/justifi-card-form.js +3 -2
  138. package/dist/module/justifi-checkout.js +3 -2
  139. package/dist/module/justifi-gross-payment-chart.js +2 -1
  140. package/dist/module/justifi-payment-form.js +4 -3
  141. package/dist/module/justifi-payment-provisioning.js +3 -2
  142. package/dist/module/justifi-refund-form.js +3 -2
  143. package/dist/module/justifi-season-interruption-insurance.js +3 -2
  144. package/dist/module/legal-address-form-step-core.js +3 -4
  145. package/dist/module/new-payment-method.js +3 -2
  146. package/dist/module/owner-form-core2.js +4 -5
  147. package/dist/module/package.js +4 -2
  148. package/dist/module/payment-details-core2.js +1 -1
  149. package/dist/module/payment-method-options.js +3 -2
  150. package/dist/module/payment.service.js +3 -2
  151. package/dist/module/payments-list-core2.js +1 -1
  152. package/dist/module/payout-details-core2.js +1 -1
  153. package/dist/module/payouts-list-core2.js +1 -1
  154. package/dist/module/saved-payment-method.js +4 -3
  155. package/dist/module/sezzle-payment-method.js +3 -2
  156. package/dist/module/utils2.js +1 -16
  157. package/dist/types/api/Business.d.ts +87 -1
  158. package/dist/types/api/Identity.d.ts +45 -1
  159. package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +44 -1
  160. package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.d.ts +11 -1
  161. package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +11 -1
  162. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +24 -1
  163. package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +11 -1
  164. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
  165. package/dist/webcomponents/p-0052db77.js +1 -0
  166. package/dist/webcomponents/p-039183f1.entry.js +1 -0
  167. package/dist/webcomponents/p-08a39a65.entry.js +1 -0
  168. package/dist/webcomponents/{p-462dc522.entry.js → p-124c1ecd.entry.js} +1 -1
  169. package/dist/webcomponents/p-1647f06b.entry.js +1 -0
  170. package/dist/webcomponents/p-1815a43b.js +1 -0
  171. package/dist/webcomponents/p-1cb2a51c.entry.js +1 -0
  172. package/dist/webcomponents/{p-1a43e355.entry.js → p-1eee25f3.entry.js} +1 -1
  173. package/dist/webcomponents/p-20cee11b.entry.js +1 -0
  174. package/dist/webcomponents/{p-3fd13ca3.js → p-277aee05.js} +1 -1
  175. package/dist/webcomponents/p-2a5cc4ee.entry.js +1 -0
  176. package/dist/webcomponents/p-3b1340dc.js +1 -0
  177. package/dist/webcomponents/p-43eff822.entry.js +1 -0
  178. package/dist/webcomponents/p-4e01fec8.entry.js +1 -0
  179. package/dist/webcomponents/{p-89887332.js → p-5022f21c.js} +1 -1
  180. package/dist/webcomponents/p-55182a59.js +1 -0
  181. package/dist/webcomponents/{p-83125497.js → p-5e2c9ec8.js} +1 -1
  182. package/dist/webcomponents/p-5e7c60d8.js +1 -0
  183. package/dist/webcomponents/p-6ac806ff.entry.js +1 -0
  184. package/dist/webcomponents/p-6c2fc744.entry.js +1 -0
  185. package/dist/webcomponents/{p-62b32c4c.entry.js → p-721dcf51.entry.js} +1 -1
  186. package/dist/webcomponents/p-77e55bfc.entry.js +1 -0
  187. package/dist/webcomponents/{p-29c0b182.js → p-7d3be485.js} +1 -1
  188. package/dist/webcomponents/{p-52021fa1.entry.js → p-817da23c.entry.js} +1 -1
  189. package/dist/webcomponents/p-82cff30c.js +1 -0
  190. package/dist/webcomponents/p-8eb10f02.js +1 -0
  191. package/dist/webcomponents/p-8f9fb5c3.entry.js +1 -0
  192. package/dist/webcomponents/p-9649b022.entry.js +1 -0
  193. package/dist/webcomponents/p-9c076da2.entry.js +1 -0
  194. package/dist/webcomponents/p-ae263544.js +1 -0
  195. package/dist/webcomponents/p-af0aeba4.entry.js +1 -0
  196. package/dist/webcomponents/p-b1408dea.entry.js +1 -0
  197. package/dist/webcomponents/p-ba95679b.entry.js +1 -0
  198. package/dist/webcomponents/p-bd2bb302.entry.js +1 -0
  199. package/dist/webcomponents/p-d2af90c2.entry.js +1 -0
  200. package/dist/webcomponents/{p-4abc17f0.entry.js → p-d76002d5.entry.js} +1 -1
  201. package/dist/webcomponents/{p-8e541a32.entry.js → p-da1d174d.entry.js} +1 -1
  202. package/dist/webcomponents/{p-53e64f15.entry.js → p-e2b2213f.entry.js} +1 -1
  203. package/dist/webcomponents/{p-fe33151d.entry.js → p-eccf2e8e.entry.js} +1 -1
  204. package/dist/webcomponents/p-edab484a.entry.js +1 -0
  205. package/dist/webcomponents/p-f5b5e47b.js +1 -0
  206. package/dist/webcomponents/{p-d23e1960.entry.js → p-f844d67b.entry.js} +1 -1
  207. package/dist/webcomponents/webcomponents.esm.js +1 -1
  208. package/package.json +4 -2
  209. package/dist/collection/components/business-forms/utils/payload-parsers.js +0 -41
  210. package/dist/globals.d.ts +0 -2
  211. package/dist/module/payload-parsers.js +0 -43
  212. package/dist/types/components/business-forms/utils/payload-parsers.d.ts +0 -4
  213. package/dist/webcomponents/p-04a61500.entry.js +0 -1
  214. package/dist/webcomponents/p-0e1bc91e.js +0 -1
  215. package/dist/webcomponents/p-14fdc01c.entry.js +0 -1
  216. package/dist/webcomponents/p-17e4246f.entry.js +0 -1
  217. package/dist/webcomponents/p-2b79f265.entry.js +0 -1
  218. package/dist/webcomponents/p-30a493cd.entry.js +0 -1
  219. package/dist/webcomponents/p-32211b2f.entry.js +0 -1
  220. package/dist/webcomponents/p-3352353a.entry.js +0 -1
  221. package/dist/webcomponents/p-3c6a8a36.entry.js +0 -1
  222. package/dist/webcomponents/p-47d79529.js +0 -1
  223. package/dist/webcomponents/p-72d42a01.entry.js +0 -1
  224. package/dist/webcomponents/p-77cf6f75.entry.js +0 -1
  225. package/dist/webcomponents/p-7c0002c6.js +0 -1
  226. package/dist/webcomponents/p-85960c15.entry.js +0 -1
  227. package/dist/webcomponents/p-85fc69e5.js +0 -1
  228. package/dist/webcomponents/p-8a038cd9.js +0 -1
  229. package/dist/webcomponents/p-8e7d4df4.entry.js +0 -1
  230. package/dist/webcomponents/p-af244664.js +0 -1
  231. package/dist/webcomponents/p-b29f5084.entry.js +0 -1
  232. package/dist/webcomponents/p-b4b8b531.js +0 -1
  233. package/dist/webcomponents/p-ba5fae28.js +0 -1
  234. package/dist/webcomponents/p-bd2ecd23.entry.js +0 -1
  235. package/dist/webcomponents/p-c8c3a97d.entry.js +0 -1
  236. package/dist/webcomponents/p-cd37a87e.entry.js +0 -1
  237. package/dist/webcomponents/p-e14c133e.entry.js +0 -1
  238. package/dist/webcomponents/p-e789152a.entry.js +0 -1
  239. package/dist/webcomponents/p-ecdf60f6.entry.js +0 -1
  240. package/dist/webcomponents/p-f117d1d1.entry.js +0 -1
@@ -7,7 +7,8 @@ class Owner {
7
7
  this.dob_day = filterNumber(owner.dob_day);
8
8
  this.dob_month = filterNumber(owner.dob_month);
9
9
  this.dob_year = owner.dob_year;
10
- this.dob_full = constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
10
+ this.dob_full =
11
+ constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
11
12
  this.documents = owner.documents;
12
13
  this.email = owner.email;
13
14
  this.id = owner.id;
@@ -22,6 +23,23 @@ class Owner {
22
23
  this.title = owner.title;
23
24
  this.updated_at = owner.updated_at;
24
25
  }
26
+ // Getter method to return the payload in the desired shape
27
+ get payload() {
28
+ return {
29
+ address: new Address(this.address || {}).payload,
30
+ dob_day: this.dob_day || '',
31
+ dob_month: this.dob_month || '',
32
+ dob_year: this.dob_year || '',
33
+ email: this.email || '',
34
+ identification_number: this.identification_number || undefined,
35
+ is_owner: this.is_owner || false,
36
+ metadata: this.metadata || null,
37
+ name: this.name || '',
38
+ phone: this.phone || '',
39
+ platform_account_id: this.platform_account_id || null,
40
+ title: this.title || '',
41
+ };
42
+ }
25
43
  }
26
44
  class Representative {
27
45
  constructor(representative) {
@@ -30,7 +48,8 @@ class Representative {
30
48
  this.dob_day = filterNumber(representative.dob_day);
31
49
  this.dob_month = filterNumber(representative.dob_month);
32
50
  this.dob_year = representative.dob_year;
33
- this.dob_full = constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
51
+ this.dob_full =
52
+ constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
34
53
  this.documents = representative.documents;
35
54
  this.email = representative.email;
36
55
  this.id = representative.id;
@@ -45,6 +64,23 @@ class Representative {
45
64
  this.title = representative.title;
46
65
  this.updated_at = representative.updated_at;
47
66
  }
67
+ // Getter method to return the payload in the desired shape
68
+ get payload() {
69
+ return {
70
+ address: new Address(this.address || {}).payload,
71
+ dob_day: this.dob_day || '',
72
+ dob_month: this.dob_month || '',
73
+ dob_year: this.dob_year || '',
74
+ email: this.email || '',
75
+ is_owner: this.is_owner || false,
76
+ identification_number: this.identification_number || undefined,
77
+ metadata: this.metadata || null,
78
+ name: this.name || '',
79
+ phone: this.phone || '',
80
+ platform_account_id: this.platform_account_id || null,
81
+ title: this.title || '',
82
+ };
83
+ }
48
84
  }
49
85
 
50
86
  var BusinessClassification;
@@ -70,16 +106,42 @@ class Address {
70
106
  this.created_at = address.created_at;
71
107
  this.updated_at = address.updated_at;
72
108
  }
109
+ get payload() {
110
+ return {
111
+ platform_account_id: this.platform_account_id || '',
112
+ line1: this.line1 || '',
113
+ line2: this.line2 || '',
114
+ postal_code: this.postal_code || '',
115
+ city: this.city || '',
116
+ state: this.state || '',
117
+ country: this.country || '',
118
+ };
119
+ }
73
120
  }
74
121
  class AdditionalQuestions {
75
122
  constructor(additionalQuestions) {
76
123
  this.business_revenue = additionalQuestions.business_revenue;
77
124
  this.business_payment_volume = additionalQuestions.business_payment_volume;
78
- this.business_when_service_received = additionalQuestions.business_when_service_received;
79
- this.business_recurring_payments = additionalQuestions.business_recurring_payments;
80
- this.business_recurring_payments_percentage = additionalQuestions.business_recurring_payments_percentage;
125
+ this.business_when_service_received =
126
+ additionalQuestions.business_when_service_received;
127
+ this.business_recurring_payments =
128
+ additionalQuestions.business_recurring_payments;
129
+ this.business_recurring_payments_percentage =
130
+ additionalQuestions.business_recurring_payments_percentage;
81
131
  this.business_seasonal = additionalQuestions.business_seasonal;
82
- this.business_other_payment_details = additionalQuestions.business_other_payment_details;
132
+ this.business_other_payment_details =
133
+ additionalQuestions.business_other_payment_details;
134
+ }
135
+ get payload() {
136
+ return {
137
+ business_revenue: this.business_revenue || '',
138
+ business_payment_volume: this.business_payment_volume || '',
139
+ business_when_service_received: this.business_when_service_received || '',
140
+ business_recurring_payments: this.business_recurring_payments || '',
141
+ business_recurring_payments_percentage: this.business_recurring_payments_percentage || '',
142
+ business_seasonal: this.business_seasonal || '',
143
+ business_other_payment_details: this.business_other_payment_details || '',
144
+ };
83
145
  }
84
146
  }
85
147
  class CoreBusinessInfo {
@@ -94,10 +156,23 @@ class CoreBusinessInfo {
94
156
  this.phone = coreBusinessInfo.phone;
95
157
  this.date_of_incorporation = coreBusinessInfo.date_of_incorporation;
96
158
  }
159
+ get payload() {
160
+ return {
161
+ classification: this.classification || '',
162
+ legal_name: this.legal_name || '',
163
+ doing_business_as: this.doing_business_as || '',
164
+ industry: this.industry || '',
165
+ tax_id: this.tax_id || '',
166
+ website_url: this.website_url || '',
167
+ email: this.email || '',
168
+ phone: this.phone || '',
169
+ date_of_incorporation: this.date_of_incorporation || '',
170
+ };
171
+ }
97
172
  }
98
173
  class Business {
99
174
  constructor(business) {
100
- this.additional_questions = Object.assign({}, new AdditionalQuestions(business.additional_questions || {}));
175
+ this.additional_questions = new AdditionalQuestions(business.additional_questions || {});
101
176
  this.associated_accounts = business.associated_accounts;
102
177
  this.classification = business.classification;
103
178
  this.bank_accounts = business.bank_accounts;
@@ -107,20 +182,40 @@ class Business {
107
182
  this.email = business.email;
108
183
  this.id = business.id;
109
184
  this.industry = business.industry;
110
- this.legal_address = Object.assign({}, new Address(business.legal_address || {}));
185
+ this.legal_address = new Address(business.legal_address || {});
111
186
  this.legal_name = business.legal_name;
112
187
  this.metadata = business.metadata;
113
188
  this.owners = business.owners;
114
189
  this.phone = business.phone;
115
190
  this.platform_account_id = business.platform_account_id;
116
191
  this.product_categories = business.product_categories;
117
- this.representative = Object.assign({}, new Representative(business.representative || {}));
192
+ this.representative = new Representative(business.representative || {});
118
193
  this.tax_id = business.tax_id;
119
194
  this.terms_conditions_accepted = business.terms_conditions_accepted;
120
195
  this.updated_at = business.updated_at;
121
196
  this.website_url = business.website_url;
122
197
  this.date_of_incorporation = business.date_of_incorporation;
123
198
  }
199
+ get payload() {
200
+ return {
201
+ additional_questions: new AdditionalQuestions(this.additional_questions)
202
+ .payload,
203
+ classification: this.classification || '',
204
+ doing_business_as: this.doing_business_as || '',
205
+ email: this.email || '',
206
+ industry: this.industry || '',
207
+ legal_address: new Address(this.legal_address).payload,
208
+ legal_name: this.legal_name || '',
209
+ metadata: this.metadata || {},
210
+ owners: this.owners.map((owner) => ({ id: owner.id })),
211
+ phone: this.phone || '',
212
+ platform_account_id: this.platform_account_id || '',
213
+ representative: new Representative(this.representative).payload,
214
+ tax_id: this.tax_id || '',
215
+ website_url: this.website_url || '',
216
+ date_of_incorporation: this.date_of_incorporation || '',
217
+ };
218
+ }
124
219
  }
125
220
 
126
221
  export { AdditionalQuestions as A, BusinessClassification as B, CoreBusinessInfo as C, Owner as O, Representative as R, Business as a, Address as b };
@@ -72,8 +72,8 @@ const AdditionalQuestionsFormStepCore = /*@__PURE__*/ proxyCustomElement(class A
72
72
  }
73
73
  ;
74
74
  get patchPayload() {
75
- let formValues = this.formController.values.getValue();
76
- return JSON.stringify({ additional_questions: formValues });
75
+ let formValues = new AdditionalQuestions(this.formController.values.getValue()).payload;
76
+ return { additional_questions: formValues };
77
77
  }
78
78
  componentWillLoad() {
79
79
  this.getBusiness && this.getData();
@@ -87,7 +87,7 @@ const AdditionalQuestionsFormStepCore = /*@__PURE__*/ proxyCustomElement(class A
87
87
  render() {
88
88
  var _a, _b, _c, _d, _e, _f, _g;
89
89
  const additionalQuestionsDefaultValue = this.formController.getInitialValues();
90
- return (h("form", { key: 'f5a3d2826c65e84e90325000973c5cdc2922c643' }, h("fieldset", { key: '8dfecfc242e62ca523c3950b9f29e159ee8debc5' }, h("legend", { key: '192071e8d05c1d075ad79678890b47fe116577d2' }, "Additional Questions"), h("hr", { key: 'e2b7369711b4ba285522200233c5112ad5320a74' }), h("div", { key: '3ef5edae7215eb35835cfc6dd373c311ba7446a5', class: 'row gy-3' }, h("div", { key: '6af600e3612b03b505c0d2c1ddbfdb9520b9df9d', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '8afb46cdad6b2ceab63227bd6f659f7f8b2a9153', name: 'business_revenue', label: 'What is the business\u2019 estimated annual revenue from its primary business activities?', inputHandler: this.inputHandler, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: 'ae94caaafd45e4c46899d802337ce0a3a8d5b3aa', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '6b86e3a15934a15ecfbf7a1ac369c8ed9ee2f6a4', name: 'business_payment_volume', label: "What is the business' annual credit card & ACH volume anticipated to process?", inputHandler: this.inputHandler, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: '4b8fe3214082368c111183fcb1b76abf2c1ba5a1', class: 'col-12' }, h("form-control-select", { key: '88e5c2593bc1b55a797e1d67e103759c5e2e29e8', name: 'business_when_service_received', label: 'On average, how long after paying will your customers typically receive their goods or services?', inputHandler: this.inputHandler, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.business_when_service_received, options: businessServiceReceivedOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_when_service_received })), h("div", { key: 'a914e7114fd6fd4e44136ba8b986c20d1984dba8', class: 'col-12' }, h("form-control-select", { key: '38c9934952884a6d1dc70f4ebd61f03a87bd8091', name: 'business_recurring_payments', label: 'Does your business offer recurring payments?', inputHandler: this.inputHandler, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.business_recurring_payments, options: recurringPaymentsOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments })), h("div", { key: '7a6d2a527e7486cff7dfa1d594e2f0378e66b583', class: 'col-12' }, h("form-control-text", { key: '6e445ff593a7970967040ae5bfd3b8056e17c129', name: 'business_recurring_payments_percentage', label: 'What percent of revenue is generated from each recurring payment type offered?', inputHandler: this.inputHandler, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.business_recurring_payments_percentage, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments_percentage })), h("div", { key: 'cf00fad8a096be8e28ef12bde563ead6f8b5ef6d', class: 'col-12' }, h("form-control-select", { key: '7cf9edd70b0ceaf25d2fd5947ecaf2760e76dd75', name: 'business_seasonal', label: 'Is this business seasonal?', inputHandler: this.inputHandler, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.business_seasonal, options: seasonalBusinessOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_seasonal })), h("div", { key: 'ceb6355fef7bae249330e0f39758be1812ff8cbe', class: 'col-12' }, h("form-control-text", { key: '689edc0fb02f926112c529301366e31d6d130aa6', name: 'business_other_payment_details', label: 'Is there anything else you would like us to know about how your customers pay the business?', inputHandler: this.inputHandler, errorText: (_g = this.errors) === null || _g === void 0 ? void 0 : _g.business_other_payment_details, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_other_payment_details }))))));
90
+ return (h("form", { key: '275b193388d360ab6dacfb70ea9e06d68d68cbf8' }, h("fieldset", { key: '740ce0b08ad00efa1345f69cf977e64283307533' }, h("legend", { key: '7f531cdf699ad93234bbdd5d9336ee782e770597' }, "Additional Questions"), h("hr", { key: 'cb81b0b4dc9e6a52ff9bf70571a200fee50e8146' }), h("div", { key: '9100fdb4857a5a9a2b42f0188cfac075974afbeb', class: 'row gy-3' }, h("div", { key: 'ee0885251b8e49cb33359a42897097552e9d0ff9', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '555b00e0b6728dca26a42813991f35dec41e2577', name: 'business_revenue', label: 'What is the business\u2019 estimated annual revenue from its primary business activities?', inputHandler: this.inputHandler, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: '689ecc46bffe9cfe7190428e191802332485f139', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '19a4269b31af12f9e07655c9dc0d9db1de46caa2', name: 'business_payment_volume', label: "What is the business' annual credit card & ACH volume anticipated to process?", inputHandler: this.inputHandler, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: 'f6eebbdd589cf4eb506d3d94502a027e639889d9', class: 'col-12' }, h("form-control-select", { key: '112bb7ee88335d9b8e8f9300ff190f164b750b39', name: 'business_when_service_received', label: 'On average, how long after paying will your customers typically receive their goods or services?', inputHandler: this.inputHandler, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.business_when_service_received, options: businessServiceReceivedOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_when_service_received })), h("div", { key: '49864b5aeca86d221cc12690e2f9976fe9ee86ef', class: 'col-12' }, h("form-control-select", { key: 'a07159d8e7e49b9b1df5bcf2dcede994d0059595', name: 'business_recurring_payments', label: 'Does your business offer recurring payments?', inputHandler: this.inputHandler, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.business_recurring_payments, options: recurringPaymentsOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments })), h("div", { key: '3a03321d7dd9202c290443d756105bb2565a3e55', class: 'col-12' }, h("form-control-text", { key: '319a5fcb7ac6e975c41cfd5b19d5de0e98504f5d', name: 'business_recurring_payments_percentage', label: 'What percent of revenue is generated from each recurring payment type offered?', inputHandler: this.inputHandler, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.business_recurring_payments_percentage, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments_percentage })), h("div", { key: 'e108f26d04e7f9510f89ab09daab53e86f5c30e1', class: 'col-12' }, h("form-control-select", { key: '45fb9296592415ddb947b55e3c7c73d198b96fac', name: 'business_seasonal', label: 'Is this business seasonal?', inputHandler: this.inputHandler, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.business_seasonal, options: seasonalBusinessOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_seasonal })), h("div", { key: '0b40ac8429c07279acb3d360124853a608a01664', class: 'col-12' }, h("form-control-text", { key: '880e00acdfa51f95b643f1ecc8d6fccba1167e6c', name: 'business_other_payment_details', label: 'Is there anything else you would like us to know about how your customers pay the business?', inputHandler: this.inputHandler, errorText: (_g = this.errors) === null || _g === void 0 ? void 0 : _g.business_other_payment_details, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_other_payment_details }))))));
91
91
  }
92
92
  }, [0, "justifi-additional-questions-form-step-core", {
93
93
  "getBusiness": [16],
@@ -7,6 +7,7 @@ import { A as Api } from './Api.js';
7
7
  import './Pagination.js';
8
8
  import './Payment.js';
9
9
  import './Payout.js';
10
+ import { c as config } from './config.js';
10
11
  import { n as numberOnlyHandler } from './utils4.js';
11
12
  import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError.js';
12
13
  import { d as defineCustomElement$4 } from './form-control-error-text2.js';
@@ -91,7 +92,7 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
91
92
  try {
92
93
  const formValues = this.formController.values.getValue();
93
94
  const payload = Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
94
- const response = await this.api.post(this.bankAccountEndpoint, JSON.stringify(payload));
95
+ const response = await this.api.post(this.bankAccountEndpoint, payload);
95
96
  this.handleResponse(response, onSuccess);
96
97
  }
97
98
  catch (error) {
@@ -147,7 +148,7 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
147
148
  ;
148
149
  componentWillLoad() {
149
150
  this.formController = new FormController(businessBankAccountSchema(this.allowOptionalFields));
150
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
151
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
151
152
  if (this.businessId && this.authToken) {
152
153
  this.fetchData();
153
154
  }
@@ -160,7 +161,7 @@ const BusinessBankAccountFormStep = /*@__PURE__*/ proxyCustomElement(class Busin
160
161
  }
161
162
  render() {
162
163
  const bankAccountDefaultValue = this.formController.getInitialValues();
163
- return (h("form", { key: 'bc16efe8af48103ce07d8f5c6ecb040bbb957868' }, h("fieldset", { key: 'aaada7411cd43e678be3fe14bd60462e39f54527' }, h("legend", { key: '165b78cff91b553a37e7f070a40c4941db2929df' }, "Bank Account Info"), h("hr", { key: '006315c63bd21554dfa30d763122b9c9f259aba9' }), h("div", { key: 'f080fa734567a23c43ee7123bf2718aad5f1efa1', class: "row gy-3" }, h("div", { key: '674fab37279d21761f6e588338ebdcdb9e5520aa', class: "col-12" }, h("form-control-text", { key: '68f1a9aa2200e204c4db2a36eb5f4f168ab18bab', name: "bank_name", label: "Bank Name", defaultValue: bankAccountDefaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '085f33f93096bd9ecba304715ea1c3ec879396b4', class: "col-12" }, h("form-control-text", { key: 'c684ee2722f992ed61c51f87fd2c234c7278eb21', name: "nickname", label: "Nickname", defaultValue: bankAccountDefaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'c0afbdb31f2faa8f73158e659b232230099e8b9f', class: "col-12" }, h("form-control-text", { key: '3d0e3ca9794beed0c542b6ca18a01eebec48366f', name: "account_owner_name", label: "Account Owner Name", defaultValue: bankAccountDefaultValue.account_owner_name, errorText: this.errors.account_owner_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '40fd8191645312efaadc633061451bd744f2a31a', class: "col-12" }, h("form-control-select", { key: '40e40cc75dcaf8ef9ba47bdf109eb14798f28436', name: "account_type", label: "Account Type", options: bankAccountTypeOptions, defaultValue: bankAccountDefaultValue.account_type, errorText: this.errors.account_type, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '2af9c012bca9d413a5eb5b3b27f685f88137888b', class: "col-12" }, h("form-control-text", { key: '6386c601520152cb758dfe30ea7c6a8cdb1b249a', name: "account_number", label: "Account Number", defaultValue: bankAccountDefaultValue.account_number, maxLength: 17, errorText: this.errors.account_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled })), h("div", { key: '8dac645db4cb8f18f4cdd138a02bc2467d2fcdd4', class: "col-12" }, h("form-control-text", { key: 'b8abe9231edd0fd07c21c9b3874e8f4f792a1eda', name: "routing_number", label: "Routing Number", defaultValue: bankAccountDefaultValue.routing_number, maxLength: 9, errorText: this.errors.routing_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled }))))));
164
+ return (h("form", { key: 'c2bdcd5ab6301d1a39e4d774df101281c41e2002' }, h("fieldset", { key: '7f6b607be5b7bc5fcd0dc1687adaa1ad00d7d2e9' }, h("legend", { key: '91b68746c65bb68f4fbd2eef151258e6915f8e35' }, "Bank Account Info"), h("hr", { key: '5eceedbf59faef10757c9e2b04d4dc4cd6b88a9b' }), h("div", { key: 'd3185db7fceb9851ccb44c1c89f8cbe5a37c24e0', class: "row gy-3" }, h("div", { key: '625caf0e9b93c244d94c69174ffff57126d39fa1', class: "col-12" }, h("form-control-text", { key: 'ddf3206b09047dfea56df850babe6c8f92ed33ee', name: "bank_name", label: "Bank Name", defaultValue: bankAccountDefaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'd7d498353eec8e1947ce748aa35cbee63e793817', class: "col-12" }, h("form-control-text", { key: 'a80050dcd088db0209c2e5da65b310d7fc7877f5', name: "nickname", label: "Nickname", defaultValue: bankAccountDefaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'ea5578470e0e4d0fd5b973807475a02c7764c9c8', class: "col-12" }, h("form-control-text", { key: 'dd8c77b43ddfca61cfd5ed39ce6e142654f18d9f', name: "account_owner_name", label: "Account Owner Name", defaultValue: bankAccountDefaultValue.account_owner_name, errorText: this.errors.account_owner_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'cb3256226c5fdfa5ff2a02c456a6c384e06d16a6', class: "col-12" }, h("form-control-select", { key: 'a865f48350a0ae6b6a2a540dc2d54de72a8af074', name: "account_type", label: "Account Type", options: bankAccountTypeOptions, defaultValue: bankAccountDefaultValue.account_type, errorText: this.errors.account_type, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'aa9062a25dade06db1f175d4233f2e5bb4e7ecd7', class: "col-12" }, h("form-control-text", { key: '1a87920e4df50178625446c770e4182d918664c7', name: "account_number", label: "Account Number", defaultValue: bankAccountDefaultValue.account_number, maxLength: 17, errorText: this.errors.account_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled })), h("div", { key: 'c72858a29aa1289b367c0eb89d6cc0eded23346d', class: "col-12" }, h("form-control-text", { key: 'b7fb93bcf16c01689245d5aca11142b013fe6adc', name: "routing_number", label: "Routing Number", defaultValue: bankAccountDefaultValue.routing_number, maxLength: 9, errorText: this.errors.routing_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled }))))));
164
165
  }
165
166
  }, [0, "justifi-business-bank-account-form-step", {
166
167
  "authToken": [1, "auth-token"],
@@ -4,8 +4,6 @@ import { F as FormController } from './form.js';
4
4
  import { C as CoreBusinessInfo } from './Business.js';
5
5
  import { a as businessClassificationOptions } from './business-form-options.js';
6
6
  import { P as PHONE_MASKS } from './form-input-masks.js';
7
- import { p as parseCoreInfo } from './payload-parsers.js';
8
- import { d as flattenNestedObject } from './utils2.js';
9
7
  import { n as numberOnlyHandler } from './utils4.js';
10
8
  import { d as defineCustomElement$6 } from './form-control-date2.js';
11
9
  import { d as defineCustomElement$5 } from './form-control-error-text2.js';
@@ -77,8 +75,8 @@ const BusinessCoreInfoFormStepCore = /*@__PURE__*/ proxyCustomElement(class Busi
77
75
  }
78
76
  ;
79
77
  get patchPayload() {
80
- let formValues = parseCoreInfo(flattenNestedObject(this.formController.values.getValue()));
81
- return JSON.stringify(formValues);
78
+ let formValues = new CoreBusinessInfo(this.formController.values.getValue()).payload;
79
+ return formValues;
82
80
  }
83
81
  componentWillLoad() {
84
82
  this.getBusiness && this.getData();
@@ -91,7 +89,7 @@ const BusinessCoreInfoFormStepCore = /*@__PURE__*/ proxyCustomElement(class Busi
91
89
  }
92
90
  render() {
93
91
  const coreInfoDefaultValue = this.formController.getInitialValues();
94
- return (h("form", { key: 'c91c42a7b3d48789f2304f6f3e7b9cab228e7e86' }, h("fieldset", { key: '159f23468da4ed60e89be108c3640c3e4f19a32a' }, h("legend", { key: '7666498459afce82b88114c880dba4f697ec422e' }, "General Info"), h("hr", { key: 'f9d253d811ba1f9b7438888f5c2e9813fb6371a9' }), h("div", { key: '9bc73f86956d81ed4028cabb4ec083e7524ad973', class: 'row gy-3' }, h("div", { key: '86bc9d41f88ee46e727a11b6371ecdb7d9dac6f3', class: 'col-12' }, h("form-control-text", { key: '2f470cdd65f25993a2671f1ab1938a214acfa625', name: 'legal_name', label: 'Legal Name', defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { key: '38af9153a77c6f121a2f1af626a325a525b8be36', class: 'col-12' }, h("form-control-text", { key: '5912ab4555f9522f973ef67240249fb44e89bcab', name: 'doing_business_as', label: 'Doing Business As (DBA)', defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { key: 'a48d44f28b473c3873aa16468a01f45f46e99c5e', class: 'col-12 col-md-8' }, h("form-control-select", { key: '7fa00ac1122a43fd1645dd81c6d9fbaf6b10131d', name: 'classification', label: 'Business Classification', options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { key: 'cd4e235392581af33d79d0eeb7a950fe51291bb4', class: 'col-12 col-md-4' }, h("form-control-date", { key: '43f65e71b7ea53fb82f8a97d4160b3df9b1ceacf', name: 'date_of_incorporation', label: 'Date of Incorporation', defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { key: '37ba3bc3731eec0281ab6c4ae942649ac25e4eba', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'b48172d98fd70130fe60c47f31b077e8644ed2e7', name: 'industry', label: 'Industry', defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler })), h("div", { key: '3212bfe272b22b896ef6602f639b2779ace36857', class: 'col-12 col-md-6' }, h("form-control-text", { key: '523a2e4b1df12723e936f224ad1518d657acc38e', name: 'tax_id', label: 'Tax ID (EIN or SSN)', defaultValue: coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, maxLength: 9 })), h("div", { key: '4018cec1595a3c2b92d92faaec10c6c917364721', class: 'col-12' }, h("form-control-text", { key: 'f5dfb03af25b7eeeb1720191acff2fff510b8114', name: 'website_url', label: 'Website URL', defaultValue: coreInfoDefaultValue.website_url, errorText: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { key: '3dbe9c55e93c35b68d6783f4dd73dab45970289b', class: 'col-12 col-md-6' }, h("form-control-text", { key: '5de21e1a7c0647b4fe6e66b51a32288c96ae82a7', name: 'email', label: 'Email Address', defaultValue: coreInfoDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '93c06e619ea76c69eb7723c3d050edfb0539635d', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: '4dc5a4ee1bb04075ee20d58e87fec1711b0683a8', name: 'phone', label: 'Phone Number', defaultValue: coreInfoDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
92
+ return (h("form", { key: 'ab0ae9821e19c2a2d1e87ce16b23cfe56bafb31b' }, h("fieldset", { key: 'eec949b50436218cee02c6410c34959a6b10ebf8' }, h("legend", { key: '34b37dddcb967275ddd3d561dd2931b74103c0ce' }, "General Info"), h("hr", { key: 'af37f3171790265c3b7d22d2328c31842c5a12ea' }), h("div", { key: 'ba4780eec04a8b34f644895913e99ea49c587f81', class: 'row gy-3' }, h("div", { key: '8109ee7485afc5a5ee3e38c947ef9387cab5daa4', class: 'col-12' }, h("form-control-text", { key: '885bc9f67fc4738cb5abc6165bf1f6f5b3382a90', name: 'legal_name', label: 'Legal Name', defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { key: '453b4e25b812015a50f72e76159111818d0065f5', class: 'col-12' }, h("form-control-text", { key: 'a63ec6c1e936ab1104b92e6fdd5f6a350559009c', name: 'doing_business_as', label: 'Doing Business As (DBA)', defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { key: '8a39b25c7d9c414569e22e73a98d7b136b0623dd', class: 'col-12 col-md-8' }, h("form-control-select", { key: '41d6d3a45431953746e86a5aea6ebb0a39674009', name: 'classification', label: 'Business Classification', options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { key: 'd98e5f2ee6e7d3ddc23ba5501db4f698cc88ba40', class: 'col-12 col-md-4' }, h("form-control-date", { key: '4ea36622261e3a649b934700ee676c062789c519', name: 'date_of_incorporation', label: 'Date of Incorporation', defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { key: '8617887e16cbc3a40b0c1ab56597d7098c7ac62f', class: 'col-12 col-md-6' }, h("form-control-text", { key: '9357ddb686194100fe705111bbc965c2956dddb4', name: 'industry', label: 'Industry', defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler })), h("div", { key: '968b0f492f354279736b531295a1e4813a5de0b0', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'd082445d9f876794e525839fb35457f114e89dac', name: 'tax_id', label: 'Tax ID (EIN or SSN)', defaultValue: coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, maxLength: 9 })), h("div", { key: 'a0e041bb3fa323e378d2b9730dd9055c9ecf1dfc', class: 'col-12' }, h("form-control-text", { key: '4994efe8c6cb5faf84accd0f2965b508d084144e', name: 'website_url', label: 'Website URL', defaultValue: coreInfoDefaultValue.website_url, errorText: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { key: '0f7f1548e704095aaef9d4fccd7c81284ff7bbed', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'e1cffd24b03e5e3655649b68900c74fcc89513c5', name: 'email', label: 'Email Address', defaultValue: coreInfoDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '1732635477c58d1f57aa5b8dc0c560ae0c215501', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: '04979d08463efc69557b782fda772702935349a7', name: 'phone', label: 'Phone Number', defaultValue: coreInfoDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
95
93
  }
96
94
  }, [0, "justifi-business-core-info-form-step-core", {
97
95
  "businessId": [1, "business-id"],
@@ -3,6 +3,7 @@ import { c as create$3, F as FormController } from './form.js';
3
3
  import { B as BusinessFormStep } from './business-form-types.js';
4
4
  import { a as Business } from './Business.js';
5
5
  import { A as Api } from './Api.js';
6
+ import { c as config } from './config.js';
6
7
  import { B as voidedCheckValidation, C as governmentIdValidation, D as ss4Validation, E as otherDocumentValidation, F as balanceSheetValidation, G as bankStatementValidation, H as profitAndLossStatementValidation } from './schema-validations.js';
7
8
  import { a as EntityDocument, b as EntityDocumentStorage } from './Document.js';
8
9
  import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError.js';
@@ -79,7 +80,7 @@ const BusinessDocumentFormStep = /*@__PURE__*/ proxyCustomElement(class Business
79
80
  this.formLoading.emit(true);
80
81
  const payload = docData.record_data;
81
82
  try {
82
- const response = await this.api.post(this.documentEndpoint, JSON.stringify(payload));
83
+ const response = await this.api.post(this.documentEndpoint, payload);
83
84
  return this.handleDocRecordResponse(docData, response);
84
85
  }
85
86
  catch (error) {
@@ -178,7 +179,7 @@ const BusinessDocumentFormStep = /*@__PURE__*/ proxyCustomElement(class Business
178
179
  return 'entities/document';
179
180
  }
180
181
  componentWillLoad() {
181
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
182
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
182
183
  if (this.businessId && this.authToken) {
183
184
  this.fetchData();
184
185
  }
@@ -211,7 +212,7 @@ const BusinessDocumentFormStep = /*@__PURE__*/ proxyCustomElement(class Business
211
212
  return (h("justifi-business-document-upload-input-group", { paymentVolume: this.paymentVolume, inputHandler: this.inputHandler, storeFiles: this.storeFiles, errors: this.errors }));
212
213
  }
213
214
  render() {
214
- return (h("form", { key: '4905c2dacbca9b1390fd7e316993be5d33117ee5' }, h("fieldset", { key: '22dc71452b1917be0d9dc237b1ac27739b922e65' }, h("legend", { key: '7c705b2b00a13f7fe690b2e5169dd1809934f892' }, "Document Uploads"), h("p", { key: 'e0ad37456d88496a589c1c79e8e3e9a0fc101577' }, "Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."), h("hr", { key: '4ac6afc1c6ce6c6e81d4fcf05ee1c5c58b66f520' }), this.documentsOnFile, h("div", { key: 'bf8aa49a47a2d53f5c0a1179474d8dd885a5a363', class: "d-flex flex-column" }, this.formInputs))));
215
+ return (h("form", { key: '38bb9070ca04f773ec092ebb14ce8ad20f33d8cf' }, h("fieldset", { key: '9c736d11200bb9c5a37c1319f3bfb349b7a5e93f' }, h("legend", { key: '92ed2fb864e85e38532af364518c25ef4bd275a5' }, "Document Uploads"), h("p", { key: 'f5803df74a5d0bc4e544c6cc968333f2a3f77385' }, "Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."), h("hr", { key: '0c696d1bdb614bdacb3cbadeee66c95149efda68' }), this.documentsOnFile, h("div", { key: '7919205dfda677526d810a9fa1507ed8a55eafb8', class: "d-flex flex-column" }, this.formInputs))));
215
216
  }
216
217
  }, [0, "justifi-business-document-upload-form-step", {
217
218
  "authToken": [1, "auth-token"],
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { E as EntityDocumentType } from './Document.js';
3
- import { e as isInRange } from './utils2.js';
3
+ import { d as isInRange } from './utils2.js';
4
4
  import { d as defineCustomElement$3 } from './form-control-error-text2.js';
5
5
  import { d as defineCustomElement$2 } from './form-control-file2.js';
6
6
  import { d as defineCustomElement$1 } from './form-control-help-text2.js';
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { s as snakeCaseToHumanReadable, g as formatDate, h as formatTimeSeconds } from './utils2.js';
2
+ import { s as snakeCaseToHumanReadable, e as formatDate, g as formatTimeSeconds } from './utils2.js';
3
3
 
4
4
  const BusinessDocumentsOnFile = /*@__PURE__*/ proxyCustomElement(class BusinessDocumentsOnFile extends HTMLElement {
5
5
  constructor() {
@@ -22,7 +22,7 @@ const businessClassificationOptions = [
22
22
  value: BusinessClassification.public_company,
23
23
  },
24
24
  {
25
- label: 'Limited',
25
+ label: 'Limited Liability Company (LLC)',
26
26
  value: BusinessClassification.limited,
27
27
  },
28
28
  {
@@ -54,7 +54,7 @@ const BusinessOwnersFormStepCore = /*@__PURE__*/ proxyCustomElement(class Busine
54
54
  let submittedData;
55
55
  this.formLoading.emit(true);
56
56
  this.patchBusiness({
57
- payload: JSON.stringify({ owners: this.ownersPayload }),
57
+ payload: { owners: this.ownersPayload },
58
58
  onSuccess: (response) => {
59
59
  submittedData = response;
60
60
  onSuccess();
@@ -128,9 +128,9 @@ const BusinessOwnersFormStepCore = /*@__PURE__*/ proxyCustomElement(class Busine
128
128
  this.ownersPayload = updatedOwners;
129
129
  }
130
130
  render() {
131
- return (h("div", { key: '5958d46ae5bc3abb7a82f5c67c597be46898284e' }, h("legend", { key: 'e10085a37e93b96901187e0a926127167ca6dbc5' }, "Owners"), h("hr", { key: 'eb7f84185271c80b87397e49f2ee5c6e20faad99' }), h("div", { key: '0f791f3d3f6c7f6aa363004d0618bd90e16f185b', class: 'row gy-3' }, this.ownersPayload.map((owner) => {
131
+ return (h("div", { key: 'f2358952d2d28841fb8e6bc66e9846eb2cdcc97e' }, h("legend", { key: 'ab3f7e6758cc50760681a9fdd07f8e137da65980' }, "Owners"), h("hr", { key: '57828746f9991da89e77a1f96b51f6df2d33d666' }), h("div", { key: '4f7f58bf1b5d40079228eef118946e17b407db63', class: 'row gy-3' }, this.ownersPayload.map((owner) => {
132
132
  return (h("justifi-owner-form", { key: owner.id, authToken: this.authToken, businessId: this.businessId, ownerId: owner.id, removeOwner: this.removeOwnerForm, newFormOpen: this.newFormOpen, ownersLength: this.ownersPayload.length, allowOptionalFields: this.allowOptionalFields, ref: (ref) => this.matchRef(ref, owner.id) }));
133
- })), h("div", { key: 'd1f6414e9213d9600eaea7e9c1e033d250f8e49a', class: 'd-flex justify-content-start' }, h("div", { key: 'fd96248f6dddfa0d973744d11e3f1f121353e398', class: 'gap-2' }, h(Button, { key: '514e549632c8f11b4b51c061949b026734ae0113', variant: 'primary', onClick: () => this.addOwnerForm(true), hidden: !this.showAddOwnerButton }, "Add Owner")))));
133
+ })), h("div", { key: '88dad43cc24d7c1e1220acb6b7791c2172074d61', class: 'd-flex justify-content-start' }, h("div", { key: '9359481d78e5c3ba9599d2fce5837c5fdfe1d6f0', class: 'gap-2' }, h(Button, { key: '04ee1c49c34567b079432df8fb2b1b298fb7d7a3', variant: 'primary', onClick: () => this.addOwnerForm(true), hidden: !this.showAddOwnerButton }, "Add Owner")))));
134
134
  }
135
135
  static get watchers() { return {
136
136
  "ownersPayload": ["ownersWatcher"]
@@ -1,6 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { R as Representative } from './Business.js';
3
- import { b as parseIdentityInfo } from './payload-parsers.js';
4
3
  import { F as FormController } from './form.js';
5
4
  import { i as identitySchema } from './business-identity-schema.js';
6
5
  import { d as defineCustomElement$8 } from './form-control-date2.js';
@@ -70,8 +69,8 @@ const BusinessRepresentativeFormStepCore = /*@__PURE__*/ proxyCustomElement(clas
70
69
  this.formController.validateAndSubmit(() => this.sendData(onSuccess));
71
70
  }
72
71
  get patchPayload() {
73
- let formValues = parseIdentityInfo(this.formController.values.getValue());
74
- return JSON.stringify({ representative: formValues });
72
+ let formValues = new Representative(this.formController.values.getValue()).payload;
73
+ return { representative: formValues };
75
74
  }
76
75
  componentWillLoad() {
77
76
  this.getBusiness && this.getData();
@@ -83,7 +82,7 @@ const BusinessRepresentativeFormStepCore = /*@__PURE__*/ proxyCustomElement(clas
83
82
  });
84
83
  }
85
84
  render() {
86
- return (h("justifi-business-representative-form-inputs", { key: 'bfe9944ea9fc78fda577944f2c968ab9decf7f00', representativeDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }));
85
+ return (h("justifi-business-representative-form-inputs", { key: '855736c2c1565b0b9e2cf57131a72298ccc889d5', representativeDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }));
87
86
  }
88
87
  }, [0, "justifi-business-representative-form-step-core", {
89
88
  "getBusiness": [16],
@@ -1,6 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { c as create$3, d as create$7, F as FormController } from './form.js';
3
3
  import { B as BusinessFormStep } from './business-form-types.js';
4
+ import { c as config } from './config.js';
4
5
  import { A as Api } from './Api.js';
5
6
  import './Pagination.js';
6
7
  import './Payment.js';
@@ -51,7 +52,7 @@ const BusinessTermsConditionsFormStep = /*@__PURE__*/ proxyCustomElement(class B
51
52
  this.sendData = async (onSuccess) => {
52
53
  this.formLoading.emit(true);
53
54
  try {
54
- const payload = JSON.stringify(this.termsPayload);
55
+ const payload = this.termsPayload;
55
56
  const response = await this.api.post(this.termsConditionsEndpoint, payload);
56
57
  this.handleResponse(response, onSuccess);
57
58
  }
@@ -94,7 +95,7 @@ const BusinessTermsConditionsFormStep = /*@__PURE__*/ proxyCustomElement(class B
94
95
  };
95
96
  }
96
97
  async componentWillLoad() {
97
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
98
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
98
99
  this.formController = new FormController(businessTermsConditionsSchema(this.allowOptionalFields));
99
100
  if (this.businessId && this.authToken) {
100
101
  this.fetchData();
@@ -130,7 +131,7 @@ const BusinessTermsConditionsFormStep = /*@__PURE__*/ proxyCustomElement(class B
130
131
  });
131
132
  }
132
133
  render() {
133
- return (h("form", { key: 'e7eb6730d5b975ae91057a5218ed062a23d3f0ef' }, h("fieldset", { key: '9dc69375e2c988dc11c4e76f757bde1fe18febea' }, h("legend", { key: '0202cf805071e011f0c087f244c0a43191632b7c' }, "Terms and Conditions"), h("hr", { key: 'a38e7b058d4269406c929abf4f57ddcdc16aa4fd' }), h("justifi-business-terms-conditions-text", { key: '8b87b016198c87c3c52c3e280353489573aff90c' }), h("br", { key: '6c7107e3975a40e44ba4375025ebea0e811630fe' }), h("div", { key: '3667f0455c95bc0d22472598eb2ca3cd7093b9d5', class: "row-gy-3" }, h("div", { key: '1169946dc47b48cd2f8f1a2adfa9ff9b149447f1', class: "col-12" }, h("form-control-checkbox", { key: '66942238443b1e27bb3902ddeba0f6fce973b319', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText }))))));
134
+ return (h("form", { key: 'a292e2b1b69d152009000d9e7009e5ab07698bc8' }, h("fieldset", { key: '30843e9ed0029f64abcf076512af82974dd99598' }, h("legend", { key: '6453679a074056668bdd93cb91d2d725b73fb0da' }, "Terms and Conditions"), h("hr", { key: '6a44c1128e3dceb770b16533aa61fb5e81f5dda2' }), h("justifi-business-terms-conditions-text", { key: '714c9f81c1d1f91712a276259acf4eb6734b40d4' }), h("br", { key: '5e955908e53af5ade77fca9f2a47e8a9d10e7ad8' }), h("div", { key: '7c6ca9d2634c7cc6988292ffedf86b64c3865557', class: "row-gy-3" }, h("div", { key: 'e8f01c4bdcc07e0063e3b8f5f1acbabc9b3310f7', class: "col-12" }, h("form-control-checkbox", { key: 'e09eeb02dc30a9461e958bf43685d2c58f4a608f', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText }))))));
134
135
  }
135
136
  }, [0, "justifi-business-terms-conditions-form-step", {
136
137
  "authToken": [1, "auth-token"],
@@ -1,27 +1,28 @@
1
+ import { c as config } from './config.js';
1
2
  import { A as Api } from './Api.js';
2
3
 
3
4
  class BusinessService {
4
5
  async fetchBusiness(businessId, authToken) {
5
6
  const endpoint = `entities/business/${businessId}`;
6
- return Api({ authToken, apiOrigin: "" }).get(endpoint);
7
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
7
8
  }
8
9
  async patchBusiness(authToken, businessId, payload) {
9
10
  const endpoint = `entities/business/${businessId}`;
10
- return Api({ authToken, apiOrigin: "" }).patch(endpoint, payload);
11
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).patch(endpoint, payload);
11
12
  }
12
13
  }
13
14
  class IdentityService {
14
15
  async fetchIdentity(identityId, authToken) {
15
16
  const endpoint = `entities/identity/${identityId}`;
16
- return Api({ authToken, apiOrigin: "" }).get(endpoint);
17
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
17
18
  }
18
19
  async patchIdentity(authToken, identityId, payload) {
19
20
  const endpoint = `entities/identity/${identityId}`;
20
- return Api({ authToken, apiOrigin: "" }).patch(endpoint, payload);
21
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).patch(endpoint, payload);
21
22
  }
22
23
  async postIdentity(authToken, payload) {
23
24
  const endpoint = `entities/identity`;
24
- return Api({ authToken, apiOrigin: "" }).post(endpoint, payload);
25
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
25
26
  }
26
27
  }
27
28
 
@@ -1,5 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { a as formatCurrency } from './utils2.js';
3
+ import { c as config } from './config.js';
3
4
  import { a as ComponentErrorSeverity } from './ComponentError.js';
4
5
  import { i as insuranceValuesOn, v as validateInsuranceValues, a as insuranceValues } from './insurance-state.js';
5
6
  import { B as Button } from './button.js';
@@ -57,7 +58,7 @@ const CheckoutCore = /*@__PURE__*/ proxyCustomElement(class CheckoutCore extends
57
58
  });
58
59
  this.renderState = 'error';
59
60
  };
60
- this.iframeOrigin = "";
61
+ this.iframeOrigin = config.iframeOrigin;
61
62
  this.authToken = undefined;
62
63
  this.getCheckout = undefined;
63
64
  this.complete = undefined;
@@ -153,7 +154,7 @@ const CheckoutCore = /*@__PURE__*/ proxyCustomElement(class CheckoutCore extends
153
154
  return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h(Skeleton, { height: "24px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("div", { class: "jfi-payment-description" }, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", { class: "jfi-payment-total" }, h("span", { class: "jfi-payment-total-label" }, "Total"), "\u00A0", h("span", { class: "jfi-payment-total-amount" }, formatCurrency(+((_b = this.checkout) === null || _b === void 0 ? void 0 : _b.total_amount)))))));
154
155
  }
155
156
  render() {
156
- return (h(StyledHost, { key: '085e3582c88e06c650d0ad52407982f9d0f713d5' }, h("div", { key: '15ff263db1588472d8338599b39336c6be74e629', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '19115dc64b5d232fa47c4976da5b1b450204d5c7', class: "col-12" }, h("h2", { key: 'f995a6510cec38c9742f095952e9d9ad54c4a95a', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: 'd14ce872c6fa7be272f279c02a571fa005828678', class: "col-12" }, h("slot", { key: '5dd8c141deeecdb1689f34728c491ac985b047b0', name: "insurance" })), h("div", { key: '33d821b9cb8fb975911b3c5dccd72bf6d6a9333a', class: "col-12 mt-4" }, h("h2", { key: '2c1be6ad9636a3cc9bbd2fd0b61b2e15444a66ab', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'ebdced7b60f3b5a390067f5eb685533360988f01', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: 'eb110ff64cf495542e732e8065b23167394bc5e2', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: 'a2960051d744f1069a52b91090adaa90ed7053f3', class: "col-12" }, h("div", { key: '03f01d243ebfa1268ca6c24b076b133e14709bd6', class: "d-flex justify-content-end" }, h(Button, { key: '01dd57ac8cb2c6e496d70421e21fd70533e6b5f6', type: "submit", variant: "primary", onClick: (e) => this.submit(e), disabled: this.isLoading, isLoading: this.isLoading, style: { width: '100%' } }, "Pay"))))));
157
+ return (h(StyledHost, { key: 'e322f280a57bb0baab61174bca21f0a7e9afa3c1' }, h("div", { key: '4ad8cc4f6243de8ddc03fb184ac4e960a04280eb', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '7f13e26b36790558c8eb455f4d5ab3d0952b4e62', class: "col-12" }, h("h2", { key: 'c5e4b6fc30f51821537915f3ce5d4830ed3f8da9', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: '164b7a2cc51d871ad4a92044d0f7240e376bd4b3', class: "col-12" }, h("slot", { key: 'a98b7c6a0bb9e4d1b102e832ee7aa43218432298', name: "insurance" })), h("div", { key: '415d3aac64b4190f54d785695c50a92ce02a76c2', class: "col-12 mt-4" }, h("h2", { key: '6d7f0df1165ec359877459a8bada855ef353c3b3', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'be8495d792cf065d2cbc7d3b46648c887951e313', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: '5c9d8baffb50b0b10e9911463f307581cad7619c', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: '9351832b69a8e5285cae35534299b51193248719', class: "col-12" }, h("div", { key: '5b0e382836c858369caf93a287272922024ce72b', class: "d-flex justify-content-end" }, h(Button, { key: 'f76d37000f7b026e97f083e7cf817bed8f84f34f', type: "submit", variant: "primary", onClick: (e) => this.submit(e), disabled: this.isLoading, isLoading: this.isLoading, style: { width: '100%' } }, "Pay"))))));
157
158
  }
158
159
  static get style() { return JustifiCheckoutCoreStyle0 + JustifiCheckoutCoreStyle1; }
159
160
  }, [1, "justifi-checkout-core", {
@@ -0,0 +1,13 @@
1
+ const config = {
2
+ iframeOrigin: 'https://js.justifi.ai/v2',
3
+ proxyApiOrigin: 'https://wc-proxy.justifi.ai',
4
+ proxyAuthToken: 'eyJraWQiOiJqdXN0aWZpLWUyNDgyMmU3ODE1MmEzZjRkMjU1IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2F1dGguanVzdGlmaS5haS8iLCJhenAiOiJvYXNfMmlsWHBqOHQ2WVlEQ0xWU0FiVFczMiIsInN1YiI6Im9hc18yaWxYcGo4dDZZWURDTFZTQWJUVzMyQHNlc3Npb25zIiwiYXVkIjoiaHR0cHM6Ly9hcGkuanVzdGlmaS5haS92MSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyIsInBlcm1pc3Npb25zIjpbeyJyb2xlIjoicmVhZDphY2NvdW50IiwicmVzb3VyY2VfaWQiOiJhY2NfNUV0OWlYclNTQVpSMktTb3VRR0FXaSJ9LHsicm9sZSI6InJlYWQ6YnVzaW5lc3MiLCJyZXNvdXJjZV9pZCI6ImJpel8zYmg2OWJxMXJrM2RtWE5vQUtWb251In1dLCJleHAiOjE3MTE1NTk0MTQsImlhdCI6MTcwMzc4MzQxNCwicGxhdGZvcm1fYWNjb3VudF9pZCI6ImFjY18zcmVOYjRhTll5MmlXRFpRVmN6bXg0In0.oPOoDYxzrnpE8PRUaz-FCU4KqnSuNbFTeDkl3AtMscjUkIctP1OIFh-ZGBjbH5eVH5noXCbaiin0j92dS7jx4gLpxuYT2Q8gpZbuIsT7fa58elvGeRkUUJ-AC5ueZxlv90yPWMm0OIbyrV7XZhuwYyKbV-ZczEbl2JpvBMe40CM-LdClQV66d_-Kw9a23SabBVfYgP5V-5OsagOIESvzZoO-27tGlNkV2a-hxqddDCOZv0HvRYAtp5S7EQrmRdEBu5gCNbf1eRFG424hxZUFVr2LdetYuKQLxJjDdUjf86ZwEUecrEaDSupiN1VC3CitdOwBVf6-R_N0VpN4VLVD5g',
5
+ exampleAccountId: 'acc_5Et9iXrSSAZR2KSouQGAWi',
6
+ exampleBusinessId: 'biz_3bh69bq1rk3dmXNoAKVonu',
7
+ examplePaymentId: 'py_1NNeEnf4FbelxDCQN2RHcE',
8
+ examplePayoutId: 'po_17745yESnHyEgWNeunmhmR',
9
+ privateApiOrigin: '',
10
+ privateAuthToken: '',
11
+ };
12
+
13
+ export { config as c };
@@ -2,22 +2,23 @@ import { A as Api } from './Api.js';
2
2
  import './Pagination.js';
3
3
  import './Payment.js';
4
4
  import './Payout.js';
5
+ import { c as config } from './config.js';
5
6
  import { a as ComponentErrorSeverity } from './ComponentError.js';
6
7
  import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
7
8
 
8
9
  class PayoutService {
9
10
  async fetchPayouts(accountId, authToken, params) {
10
- const api = Api({ authToken, apiOrigin: "" });
11
+ const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
11
12
  const endpoint = `account/${accountId}/payouts`;
12
13
  return api.get(endpoint, params);
13
14
  }
14
15
  async fetchPayout(payoutId, authToken) {
15
- const api = Api({ authToken, apiOrigin: "" });
16
+ const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
16
17
  const endpoint = `payouts/${payoutId}`;
17
18
  return api.get(endpoint);
18
19
  }
19
20
  async fetchCSV(payoutId, authToken) {
20
- const api = Api({ authToken, apiOrigin: "" });
21
+ const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
21
22
  const endpoint = `reports/payouts/${payoutId}`;
22
23
  return api.get(endpoint);
23
24
  }
@@ -1,4 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
+ import { c as config } from './config.js';
2
3
  import { J as JustifiAnalytics } from './Analytics.js';
3
4
  import { d as defineCustomElement$2 } from './payment-method-form.js';
4
5
 
@@ -11,7 +12,7 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class BankAccountForm e
11
12
  this.bankAccountFormTokenized = createEvent(this, "bankAccountFormTokenize", 7);
12
13
  this.bankAccountFormValidated = createEvent(this, "bankAccountFormValidate", 7);
13
14
  this.validationMode = undefined;
14
- this.iframeOrigin = "";
15
+ this.iframeOrigin = config.iframeOrigin;
15
16
  this.internalStyleOverrides = undefined;
16
17
  }
17
18
  readyHandler(event) {
@@ -63,7 +64,7 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class BankAccountForm e
63
64
  return this.childRef.resize();
64
65
  }
65
66
  render() {
66
- return (h("justifi-payment-method-form", { key: '646e392c1a9ed38e73780ed6a01b6f019767794c', ref: el => {
67
+ return (h("justifi-payment-method-form", { key: 'e2fa64d199a6c550329c9797a6951335e7c12bc6', ref: el => {
67
68
  if (el) {
68
69
  this.childRef = el;
69
70
  }