@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
@@ -8,7 +8,7 @@ import { A as Api } from './Api.js';
8
8
  import './Pagination.js';
9
9
  import './Payment.js';
10
10
  import './Payout.js';
11
- import { a as parseBusiness } from './payload-parsers.js';
11
+ import { c as config } from './config.js';
12
12
  import { a as BusinessFormServerErrors, b as BusinessFormClickActions } from './business-form-types.js';
13
13
  import { a as Business } from './Business.js';
14
14
  import { J as JustifiAnalytics } from './Analytics.js';
@@ -49,8 +49,8 @@ const BusinessForm = /*@__PURE__*/ proxyCustomElement(class BusinessForm extends
49
49
  try {
50
50
  const values = this.formController.values.getValue();
51
51
  const initialValues = this.formController.getInitialValues();
52
- const payload = parseBusiness(values, initialValues);
53
- const response = await this.api.patch(this.businessEndpoint, JSON.stringify(payload));
52
+ const payload = new Business(Object.assign(Object.assign({}, initialValues), values)).payload;
53
+ const response = await this.api.patch(this.businessEndpoint, payload);
54
54
  this.handleReponse(response);
55
55
  }
56
56
  catch (error) {
@@ -94,7 +94,7 @@ const BusinessForm = /*@__PURE__*/ proxyCustomElement(class BusinessForm extends
94
94
  if (!this.businessId)
95
95
  console.error(missingBusinessIdMessage);
96
96
  this.formController = new FormController(businessFormSchema);
97
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
97
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
98
98
  this.fetchData();
99
99
  }
100
100
  disconnectedCallback() {
@@ -122,7 +122,7 @@ const BusinessForm = /*@__PURE__*/ proxyCustomElement(class BusinessForm extends
122
122
  this.instantiateBusiness(response.data);
123
123
  }
124
124
  render() {
125
- return (h(StyledHost, { key: '8fb79d577c13246fcf3ec1ee8460713fee07d01a', exportparts: "label,input,input-invalid" }, h("form", { key: '1fe23a8cc8714aee257b6c73c6b7b096d684ea1c', onSubmit: this.validateAndSubmit }, h("div", { key: 'e501f6963ed5bfd9eb80f67df13108289db6eba7', class: "row gap-3" }, h("h1", { key: 'f81f22704bda1480c467b872cd3fd309505b0e94' }, this.title), h("form-alert", { key: '15b2ff75d4db6447bfd1892542e8e972ede0ac7e', text: this.errorMessage, hideAlert: this.hideErrors }), h("div", { key: 'fd6a375fd187426940df3f28262be7aec3fedbe5', class: "col-12 mb-4" }, h("justifi-business-core-info", { key: 'd16818a2124cb04dd5a5e84ea40639991fb04a80', formController: this.formController })), h("div", { key: 'd48b04718cf938484cf65cc956bf798f44ed17a7', class: "col-12 mb-4" }, h("justifi-legal-address-form", { key: '3a2bc6babfe8a0a265b2a7f9e7bea1abebd3eb43', formController: this.formController })), h("div", { key: '5c4d5d1fa1e2aba32f42c2bb9e97c0d796ecf709', class: "col-12 mb-4" }, h("justifi-additional-questions", { key: 'c888fb627380d05302cb106c5642e39b1f2652fa', formController: this.formController })), h("div", { key: '623e94d84976cfe29f4501a781c750d1bb537605', class: "col-12 mb-4" }, h("justifi-business-representative", { key: '594c893c0976b58a309679a031f6f1c787e66f48', formController: this.formController })), h("div", { key: '9fbc36ed183b1ebf171da14276092195c7aaf3a9', class: "col-12 d-flex flex-row-reverse" }, h("button", { key: 'a60da6fdda5193d3c41c589b00b040c05ae425ac', type: "submit", class: "btn btn-primary jfi-submit-button", disabled: this.disabledState, onClick: () => this.fireClickEvents({ name: BusinessFormClickActions.submit }) }, this.isLoading ? 'Loading...' : 'Submit'))))));
125
+ return (h(StyledHost, { key: 'e388e1e7658969f0e5687102a62345e2790da97a', exportparts: "label,input,input-invalid" }, h("form", { key: 'c22a562e57539e982a071b1906e5bf0bcc249e7d', onSubmit: this.validateAndSubmit }, h("div", { key: '44243cd965b448f5be9058880aa2deb32f4ce8dc', class: "row gap-3" }, h("h1", { key: 'd666ed8ddacc8ac05d7f42c2f4824208b92cdb3f' }, this.title), h("form-alert", { key: 'b1d4025078c4373a789609f2e14d309f0ee280fe', text: this.errorMessage, hideAlert: this.hideErrors }), h("div", { key: 'cdc1d597a5dbf9581182de302a453e4ea98bb28f', class: "col-12 mb-4" }, h("justifi-business-core-info", { key: '2333164de020eadf54da91cabdcbeb87a2fd1b75', formController: this.formController })), h("div", { key: '74eafa5c419f6d6fe2eb3eeb8521e12175f7ee3a', class: "col-12 mb-4" }, h("justifi-legal-address-form", { key: '1e5a373f95a77bf3aba1a9f3538b3a2ac3dbf716', formController: this.formController })), h("div", { key: 'ec9f6195f3674b426722463341445f0ed1746178', class: "col-12 mb-4" }, h("justifi-additional-questions", { key: '0adbc60492f4ad71e3877c446376999418b7dc15', formController: this.formController })), h("div", { key: 'cdfb8d0d40e9f888afd9c23cd97d33d861d16f62', class: "col-12 mb-4" }, h("justifi-business-representative", { key: '4d03ec95b7c2918494c9970b3e6a5826d4d69a10', formController: this.formController })), h("div", { key: '0682dba469e57a938b175499312de5d5c4f55a69', class: "col-12 d-flex flex-row-reverse" }, h("button", { key: '64791e2742ee129787094c7123e87c4262735556', type: "submit", class: "btn btn-primary jfi-submit-button", disabled: this.disabledState, onClick: () => this.fireClickEvents({ name: BusinessFormClickActions.submit }) }, this.isLoading ? 'Loading...' : 'Submit'))))));
126
126
  }
127
127
  static get style() { return JustifiBusinessFormStyle0; }
128
128
  }, [1, "justifi-business-form", {
@@ -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 CardForm = /*@__PURE__*/ proxyCustomElement(class CardForm extends HTMLEle
11
12
  this.cardFormTokenized = createEvent(this, "cardFormTokenize", 7);
12
13
  this.cardFormValidated = createEvent(this, "cardFormValidate", 7);
13
14
  this.validationMode = undefined;
14
- this.iframeOrigin = "";
15
+ this.iframeOrigin = config.iframeOrigin;
15
16
  this.singleLine = false;
16
17
  this.internalStyleOverrides = undefined;
17
18
  }
@@ -64,7 +65,7 @@ const CardForm = /*@__PURE__*/ proxyCustomElement(class CardForm extends HTMLEle
64
65
  return this.childRef.resize();
65
66
  }
66
67
  render() {
67
- return (h("justifi-payment-method-form", { key: 'cc0ad5d8a262ff5c8422d247caed469a8dea3488', ref: el => {
68
+ return (h("justifi-payment-method-form", { key: '58843b8a47f35d716845de11f6a66d8960bc0776', ref: el => {
68
69
  if (el) {
69
70
  this.childRef = el;
70
71
  }
@@ -5,6 +5,7 @@ import { A as Api } from './Api.js';
5
5
  import './Pagination.js';
6
6
  import './Payment.js';
7
7
  import './Payout.js';
8
+ import { c as config } from './config.js';
8
9
  import { J as JustifiAnalytics } from './Analytics.js';
9
10
  import { d as defineCustomElement$d } from './form-control-error-text2.js';
10
11
  import { d as defineCustomElement$c } from './form-control-help-text2.js';
@@ -76,7 +77,7 @@ const makeCheckoutComplete = ({ authToken, checkoutId, service }) => async ({ pa
76
77
  class CheckoutService {
77
78
  async fetchCheckout(authToken, checkoutId) {
78
79
  const endpoint = `checkouts/${checkoutId}`;
79
- return Api({ authToken, apiOrigin: "" }).get(endpoint);
80
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
80
81
  }
81
82
  async complete(authToken, checkoutId, payment) {
82
83
  const endpoint = `checkouts/${checkoutId}/complete`;
@@ -86,7 +87,7 @@ class CheckoutService {
86
87
  if (payment.payment_token) {
87
88
  payload.payment_token = payment.payment_token;
88
89
  }
89
- return Api({ authToken, apiOrigin: "" }).post(endpoint, JSON.stringify(payload));
90
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
90
91
  }
91
92
  }
92
93
 
@@ -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 { A as Api } from './Api.js';
3
4
  import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './ComponentError.js';
4
5
  import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
@@ -8,7 +9,7 @@ import { d as defineCustomElement$2 } from './gross-payment-chart-core2.js';
8
9
 
9
10
  class ReportsService {
10
11
  async fetchGrossVolumeChartData(accountId, authToken) {
11
- const api = Api({ authToken: authToken, apiOrigin: "" });
12
+ const api = Api({ authToken: authToken, apiOrigin: config.proxyApiOrigin });
12
13
  const endpoint = `account/${accountId}/reports/gross_volume`;
13
14
  return api.get(endpoint);
14
15
  }
@@ -3,6 +3,7 @@ import './Pagination.js';
3
3
  import { P as PaymentMethodTypes } from './Payment.js';
4
4
  import './Payout.js';
5
5
  import { l as loadFontsOnParent } from './utils2.js';
6
+ import { c as config } from './config.js';
6
7
  import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError.js';
7
8
  import { g as getErrorMessage } from './utils3.js';
8
9
  import { J as JustifiAnalytics } from './Analytics.js';
@@ -124,15 +125,15 @@ const PaymentForm = /*@__PURE__*/ proxyCustomElement(class PaymentForm extends H
124
125
  }
125
126
  }
126
127
  render() {
127
- return (h(StyledHost, { key: '8cb6e3903a0045fbffed5f17dc29aacc6b57ad7f' }, h("form", { key: '4e8f00c3d29c0db0bc99fd79da46abe7c40e3e30', class: "row gy-3" }, this.showPaymentMethodTypeSelector() && (h("div", { key: '344a1356f6f482493a35015c32f8e9a9b4cc8a80', class: "col-12" }, h("justifi-payment-method-selector", { key: '36b9dd7a9bc8336b4bef0d12f56c811effbc0a0b', selectedPaymentMethodType: this.getSelectedPaymentMethodType(), onPaymentMethodSelected: event => this.paymentMethodSelectedHandler(event) }))), h("div", { key: '225a260f817f9dd02a7f0a5b25562179ab80f7de', class: "col-12" }, h("justifi-payment-method-form", { key: '52e2bf20b265cc96ab556571a323370cc27ac278', "payment-method-form-type": this.getSelectedPaymentMethodType(), iframeOrigin: "", ref: el => {
128
+ return (h(StyledHost, { key: '38bd6cca38d9068fa9277a8568a98f261a4cc616' }, h("form", { key: 'fec19f5e2f11934e6783124c4c437a2d3947f596', class: "row gy-3" }, this.showPaymentMethodTypeSelector() && (h("div", { key: '18001f78e03336d01de8473a57e3e228e9fce201', class: "col-12" }, h("justifi-payment-method-selector", { key: '260ac1ade3ccfe6baf518eb856bdf4d380025620', selectedPaymentMethodType: this.getSelectedPaymentMethodType(), onPaymentMethodSelected: event => this.paymentMethodSelectedHandler(event) }))), h("div", { key: 'f6ade2336314e05f2bdce75df8577939efe33e3b', class: "col-12" }, h("justifi-payment-method-form", { key: 'ad8e5b121b8425175f7ac7f38ab24dfba1801a28', "payment-method-form-type": this.getSelectedPaymentMethodType(), iframeOrigin: config.iframeOrigin, ref: el => {
128
129
  if (el) {
129
130
  this.paymentMethodFormRef = el;
130
131
  }
131
- } })), h("div", { key: '433a8ac42c0eec9180e37da222da1dbb1112e48e', class: "col-12" }, h("justifi-billing-form", { key: '4f24f1c8b4083e2d9e5bb2272d32d20bb5cc225d', legend: "Billing Info", ref: el => {
132
+ } })), h("div", { key: '29f15f1cece3e07a569e514d08bf9996405699c6', class: "col-12" }, h("justifi-billing-form", { key: '9928924cc29bfa5c5e46ada294cb26da0c1d222b', legend: "Billing Info", ref: el => {
132
133
  if (el) {
133
134
  this.billingFormRef = el;
134
135
  }
135
- } })), h("slot", { key: '9397ae7fdd2677cd61a425fcf5818ae14fabbed0', name: 'insurance' }), h("div", { key: 'db9131f6f35165e69d3b59da7fa25b95f1e46168', class: "col-12" }, h(Button, { key: 'c280836cf6445a7132ff9202a09b6fdac8e29f77', variant: "primary", type: "submit", onClick: event => this.submit(event), disabled: !this.submitButtonEnabled || this.isLoading, isLoading: this.isLoading, "data-testid": "submit-button", style: { width: '100%' } }, this.submitButtonText || 'Submit')))));
136
+ } })), h("slot", { key: 'c36583ab34bc105b506df27aec02898455855cec', name: 'insurance' }), h("div", { key: 'cc38292ae8a59bc6f4624a8535e8b7c93e6f3a35', class: "col-12" }, h(Button, { key: 'e5fe0f50ee2322ab2a199a6229015c9daa198cc0', variant: "primary", type: "submit", onClick: event => this.submit(event), disabled: !this.submitButtonEnabled || this.isLoading, isLoading: this.isLoading, "data-testid": "submit-button", style: { width: '100%' } }, this.submitButtonText || 'Submit')))));
136
137
  }
137
138
  static get style() { return JustifiPaymentFormStyle0; }
138
139
  }, [1, "justifi-payment-form", {
@@ -3,6 +3,7 @@ import { J as JustifiAnalytics } from './Analytics.js';
3
3
  import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError.js';
4
4
  import { m as makeGetBusiness, e as makePostProvisioning } from './payment-provisioning-actions.js';
5
5
  import { B as BusinessService } from './business.service.js';
6
+ import { c as config } from './config.js';
6
7
  import { A as Api } from './Api.js';
7
8
  import { d as defineCustomElement$y } from './form-control-checkbox2.js';
8
9
  import { d as defineCustomElement$x } from './form-control-date2.js';
@@ -43,9 +44,9 @@ class ProvisionService {
43
44
  const endpoint = `entities/provisioning`;
44
45
  const payload = {
45
46
  business_id: businessId,
46
- product_category: product,
47
+ product_category: product
47
48
  };
48
- return Api({ authToken, apiOrigin: "" }).post(endpoint, JSON.stringify(payload));
49
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
49
50
  }
50
51
  }
51
52
 
@@ -4,6 +4,7 @@ import { A as Api } from './Api.js';
4
4
  import './Pagination.js';
5
5
  import './Payment.js';
6
6
  import './Payout.js';
7
+ import { c as config } from './config.js';
7
8
  import { C as CURRENCY_MASK } from './form-input-masks.js';
8
9
  import { S as StyledHost } from './styled-host.js';
9
10
  import { d as defineCustomElement$5 } from './form-control-error-text2.js';
@@ -95,11 +96,11 @@ const RefundForm = /*@__PURE__*/ proxyCustomElement(class RefundForm extends HTM
95
96
  if (!this.authToken) {
96
97
  console.warn('Warning: Missing auth-token.');
97
98
  }
98
- this.api = Api({ authToken: this.authToken, apiOrigin: "" });
99
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
99
100
  }
100
101
  render() {
101
102
  var _a;
102
- return (h(StyledHost, { key: '8d31f1a9bf936c9e11f8eca1dc55e614b9fa5939' }, h("h1", { key: 'be589740535ee8a5ab6d4af7151d7ae026f08002' }, "Refund"), this.refundInfoText && (h("div", { key: 'b1d40507dec53bac422f99a3d62678c78c0c2038', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: 'cc76014eef0d826bec5ec09355dc5fc747fd2070', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: 'c2efa0f2acdf3faaa6e2974d0535f48799e3cbbd', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: '68220114781378f6507651414c87532171bebb31', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: '075545e9837316fe160760e0dba9a5104654dd2b', class: "form-group" }, h("form-control-monetary", { key: 'c8ff8a822d2b74b2f80b33cd6cd2b42ceebbff11', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: '92093284e763466be5138ea6d788145d5d47bd87', class: "form-group" }, h("form-control-text", { key: 'ddf9e221d43d84ad7436261c5755e673224aa82e', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: '58abbbabce09d82da4032ef0e08e6cfac1433153', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '3e703ef633e0d45ba70425dc6d58bcd2d590ce1b', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
103
+ return (h(StyledHost, { key: 'd0d0962eaecab749aa1eb124e86701a2fb4dfd53' }, h("h1", { key: 'cb3071d89c291b1664e551fcf2808a64569ba5eb' }, "Refund"), this.refundInfoText && (h("div", { key: '01a6f4567f882d2eec492ef6d98db7d04747ecb4', class: "d-flex align-items-center flex-row gap-4 border-top border-bottom my-4 p-3", role: "alert" }, h("img", { key: '8ae5928aaf8ead35a7ad180a01bdde05ebec3d5f', src: "/info-icon.svg", alt: "Information", height: "30", width: "30" }), h("p", { key: '425a7dfe9d8b886b55fd0878f3989373733c1758', class: "m-0", innerHTML: this.refundInfoText }))), h("form", { key: '5516d2ac500611d2410b9b4c2a4d0d15e417b2d1', onSubmit: e => this.handleSubmit(e), class: "d-grid gap-4" }, h("div", { key: 'b67a7c56f070a5a25d91aa0cc77755b27d420fdc', class: "form-group" }, h("form-control-monetary", { key: '76b6cfdf2b39674434f4d880333dd5d5f603f0b6', name: "amount", label: "Refund Amount", defaultValue: ((_a = this.amount) === null || _a === void 0 ? void 0 : _a.toString()) || '', maskOptions: CURRENCY_MASK.DECIMAL, inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.amount })), h("div", { key: '5e581cdea69d2ce9dbad774214cd904923d199b3', class: "form-group" }, h("form-control-text", { key: '926ae888676a4089d3381bd4d650e6f84f6e206a', name: "notes", label: "Additional Notes", inputHandler: (name, value) => this.handleInput(name, value), errorText: this.errors.notes })), this.withButton && (h("div", { key: 'de5df506b7b64a69a16241f117bf9bea4fd79b57', class: "form-group d-flex flex-row-reverse" }, h("button", { key: '92ad4d43677587c2c20dc03c6f03a6cf1f20ac12', type: "submit", disabled: !!this.isSubmitting, class: "btn btn-primary ml-auto" }, this.submitButtonText))))));
103
104
  }
104
105
  static get style() { return JustifiRefundFormStyle0; }
105
106
  }, [1, "justifi-refund-form", {
@@ -3,6 +3,7 @@ import { A as Api } from './Api.js';
3
3
  import './Pagination.js';
4
4
  import './Payment.js';
5
5
  import './Payout.js';
6
+ import { c as config } from './config.js';
6
7
  import { g as getErrorMessage, a as getErrorCode } from './utils3.js';
7
8
  import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './ComponentError.js';
8
9
  import { J as JustifiAnalytics } from './Analytics.js';
@@ -11,11 +12,11 @@ import { d as defineCustomElement$2 } from './season-interruption-insurance-core
11
12
  class InsuranceService {
12
13
  async fetchQuote(authToken, payload) {
13
14
  const endpoint = 'insurance/quotes';
14
- return Api({ authToken, apiOrigin: "" }).post(endpoint, JSON.stringify(payload));
15
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
15
16
  }
16
17
  async toggleCoverage(authToken, quoteId, payload) {
17
18
  const endpoint = `insurance/quotes/${quoteId}/toggle`;
18
- return Api({ authToken, apiOrigin: "" }).post(endpoint, JSON.stringify(payload));
19
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).post(endpoint, payload);
19
20
  }
20
21
  }
21
22
 
@@ -3,7 +3,6 @@ import { a as addressSchema } from './business-address-schema.js';
3
3
  import { F as FormController } from './form.js';
4
4
  import { b as Address } from './Business.js';
5
5
  import { S as StateOptions } from './state-options.js';
6
- import { c as parseAddressInfo } from './payload-parsers.js';
7
6
  import { n as numberOnlyHandler } from './utils4.js';
8
7
  import { d as defineCustomElement$4 } from './form-control-error-text2.js';
9
8
  import { d as defineCustomElement$3 } from './form-control-help-text2.js';
@@ -72,8 +71,8 @@ const LegalAddressFormStepCore = /*@__PURE__*/ proxyCustomElement(class LegalAdd
72
71
  }
73
72
  ;
74
73
  get patchPayload() {
75
- let formValues = parseAddressInfo(this.formController.values.getValue());
76
- return JSON.stringify({ legal_address: formValues });
74
+ let formValues = new Address(this.formController.values.getValue()).payload;
75
+ return { legal_address: formValues };
77
76
  }
78
77
  componentWillLoad() {
79
78
  this.getBusiness && this.getData();
@@ -87,7 +86,7 @@ const LegalAddressFormStepCore = /*@__PURE__*/ proxyCustomElement(class LegalAdd
87
86
  render() {
88
87
  var _a, _b, _c, _d, _e, _f;
89
88
  const legalAddressDefaultValue = this.formController.getInitialValues();
90
- return (h("form", { key: 'ef8d88ebced702b5a0b89eaddb22320f24e7081f' }, h("fieldset", { key: '9f70633b36559e6f8de8d67f39a19df365116bcd' }, h("legend", { key: '6b6b0e42fd0f00a28d24bf9d1e4818e54264ff96' }, "Business Legal Address"), h("hr", { key: '8b7b1a9f0f9448c4fd3b918f20e7b51337d3e5ee' }), h("div", { key: 'f45b643ec057356d9a6e04a19829c562ec521bd2', class: 'row gy-3' }, h("div", { key: 'f115c4e4163126d2d8c998c8de775821e7fc0e65', class: 'col-12' }, h("form-control-text", { key: '066a1ea25ef086dda05e32cde738e7e77dcbb322', name: 'line1', label: 'Legal Address', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line1, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.line1 })), h("div", { key: 'e8432ea00cd5da5b08cc97efe8f3a9817a14b5b1', class: 'col-12' }, h("form-control-text", { key: '099ab7197940d5de8869682cbda41dc0d6ee0e1d', name: 'line2', label: 'Address Line 2', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line2, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.line2 })), h("div", { key: '9514757f732d6a445e48eb85d3654f79cf2320db', class: 'col-12' }, h("form-control-text", { key: '37db927ef6c735699a4954ad51d43f4666eea9a0', name: 'city', label: 'City', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.city, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.city })), h("div", { key: 'f3c82def0d67fcc0d7e4ca03e80afc166a36ffbb', class: 'col-12' }, h("form-control-select", { key: 'cbcfafe876997e0f9181cf117eeaf465ca424c68', name: 'state', label: 'State', options: StateOptions, inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.state, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.state })), h("div", { key: '4f32ffbe520d1fbe2406d41e7fb76a9f0f450299', class: 'col-12' }, h("form-control-text", { key: '5a2fcc4726b543e8ef6c5456e965cc479d91ce4e', name: 'postal_code', label: 'Postal Code', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.postal_code, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.postal_code, maxLength: 5, keyDownHandler: numberOnlyHandler })), h("div", { key: 'd4bdbfa4d3999bae59b812e84394bb4c0974d6b3', class: 'col-12' }, h("form-control-select", { key: '95eec216f50d119016c7627074bf29b9a21b1cd1', name: 'country', label: 'Country', options: [{ label: 'United States', value: 'USA' }], inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.country, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.country,
89
+ return (h("form", { key: '5a95fe5a130deded7e160e6fe4ba1d09e6a6aabc' }, h("fieldset", { key: '2011fac5c860b7beee5eaac28e697b284067f2e6' }, h("legend", { key: 'dbe411d80d10a71bc63f18fcdb58a40b124e8eaf' }, "Business Legal Address"), h("hr", { key: '4a91dd5e67e5770778d2dd59716e1e532d644ee9' }), h("div", { key: 'cd53516a98498ab82ab347a1f7c836be262b9fdb', class: 'row gy-3' }, h("div", { key: '14cd5fee5661681ccff95eabf8cd6f2d4cff2296', class: 'col-12' }, h("form-control-text", { key: 'e4b0a5e30fc1a35e5127a76710211874fb68898b', name: 'line1', label: 'Legal Address', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line1, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.line1 })), h("div", { key: '2c35da509732e73e2abb4365d6d9e2056d7ce771', class: 'col-12' }, h("form-control-text", { key: 'c8ae2a5c75d0fe8c5ddd46d9150590b8a4f99a5e', name: 'line2', label: 'Address Line 2', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line2, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.line2 })), h("div", { key: '07649ebd5a848eee63398965c30e8e30fcc88354', class: 'col-12' }, h("form-control-text", { key: 'cb25047c3458124f7d837b7948e807214f1a0a0a', name: 'city', label: 'City', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.city, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.city })), h("div", { key: 'ce3ddc5f3639503dbc02668aea7139ffff376545', class: 'col-12' }, h("form-control-select", { key: '00d18b4af1f415828b40404888a6c69d0611d0cc', name: 'state', label: 'State', options: StateOptions, inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.state, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.state })), h("div", { key: '1988bd739af107d9595f6fed897f257da13ac997', class: 'col-12' }, h("form-control-text", { key: '55144c39845d4cc36704170b73458f761f311d00', name: 'postal_code', label: 'Postal Code', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.postal_code, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.postal_code, maxLength: 5, keyDownHandler: numberOnlyHandler })), h("div", { key: 'cccba799a75280693f461f390121b13006877f35', class: 'col-12' }, h("form-control-select", { key: 'e49b21a781280fb2e9cc9f6b88ddcc6d7408c5f8', name: 'country', label: 'Country', options: [{ label: 'United States', value: 'USA' }], inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.country, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.country,
91
90
  // just for now so we skip handling country specificities
92
91
  disabled: true }))))));
93
92
  }
@@ -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 { d as defineCustomElement$7 } from './form-control-error-text2.js';
3
4
  import { d as defineCustomElement$6 } from './form-control-help-text2.js';
4
5
  import { d as defineCustomElement$5 } from './form-control-select2.js';
@@ -19,7 +20,7 @@ const NewPaymentMethod = /*@__PURE__*/ proxyCustomElement(class NewPaymentMethod
19
20
  this.onPaymentMethodOptionClick = () => {
20
21
  this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
21
22
  };
22
- this.iframeOrigin = "";
23
+ this.iframeOrigin = config.iframeOrigin;
23
24
  this.authToken = undefined;
24
25
  this.accountId = undefined;
25
26
  this.paymentMethodOption = undefined;
@@ -79,7 +80,7 @@ const NewPaymentMethod = /*@__PURE__*/ proxyCustomElement(class NewPaymentMethod
79
80
  }
80
81
  render() {
81
82
  var _a, _b, _c, _d;
82
- return (h("div", { key: '55a43467070e4981a6fda7b529f329122f33dda8', class: "payment-method" }, h("div", { key: 'b86a20d2e51883dab9f2c46e6787417d498af17e', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '900b836be24e83816d1e6c915855b11ba3b605ee', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: 'b1976293de17845cba7671606c50698b90878bcb', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
83
+ return (h("div", { key: '93c3e6d38d1e18be54006bf82cd6c8148df3518d', class: "payment-method" }, h("div", { key: '6dbb687fbd3e33a6095be7c39ec0974bcc4809b8', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '6c5be962cf5d357211c6716b53d0d8dd3fcf0bb0', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '796868afd192703a81d94897872dd9c0504cbc1e', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
83
84
  }
84
85
  }, [0, "justifi-new-payment-method", {
85
86
  "iframeOrigin": [1025, "iframe-origin"],
@@ -3,7 +3,6 @@ import { F as FormController } from './form.js';
3
3
  import { O as Owner } from './Business.js';
4
4
  import { b as BusinessFormClickActions } from './business-form-types.js';
5
5
  import { i as identitySchema } from './business-identity-schema.js';
6
- import { b as parseIdentityInfo } from './payload-parsers.js';
7
6
  import { B as Button } from './button.js';
8
7
  import { d as defineCustomElement$8 } from './form-control-date2.js';
9
8
  import { d as defineCustomElement$7 } from './form-control-error-text2.js';
@@ -144,12 +143,12 @@ const BusinessOwnerFormCore = /*@__PURE__*/ proxyCustomElement(class BusinessOwn
144
143
  }
145
144
  }
146
145
  get payload() {
147
- let formValues = parseIdentityInfo(this.formController.values.getValue());
146
+ let formValues = new Owner(this.formController.values.getValue()).payload;
148
147
  if (this.ownerId) {
149
- return JSON.stringify(formValues);
148
+ return formValues;
150
149
  }
151
150
  else {
152
- return JSON.stringify(Object.assign(Object.assign({}, formValues), { business_id: this.businessId }));
151
+ return Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
153
152
  }
154
153
  }
155
154
  get formTitle() {
@@ -180,7 +179,7 @@ const BusinessOwnerFormCore = /*@__PURE__*/ proxyCustomElement(class BusinessOwn
180
179
  this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors)));
181
180
  }
182
181
  render() {
183
- return (h("form", { key: 'b2e2aaced859260e9d2ef59bc3f8a0763d05872c', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '2a93ddb4c945be0ec081ce31d6d9eff4b302d622' }, h("legend", { key: 'ea9859e55099e3f8263024d884edfb48b3666eaa', class: "fw-semibold fs-5" }, this.formTitle), h("br", { key: 'f646c1ecc544c358d87e701aba8e151fcb96c54e' }), h("div", { key: '874bf4ebd7cef0afbdee96fa4d5679b6d683b0f0', class: "row gy-3" }, h("owner-form-inputs", { key: '866dbf0002ec1ac70d7942c6011c67f8cd144960', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }), h("div", { key: '15d907270ecf3d16769cedea39ba279d7ffb0748', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: '84c09ef594e7fa387e64a09014de81ed713cc765', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '1dafd97aa7b84644c9d011224a152ad7f99ce620', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: 'f1f31da4d147afcd01ef96acd01d63ee9497dd6b' }))));
182
+ return (h("form", { key: '27f0d989f017bd03b84cf8c994fa96f9a65aad08', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '2c793f1f8777181e5db0a4cae5b9994d9188685e' }, h("legend", { key: 'a8951fcd990c8136cf6672424869f5c96def3cef', class: "fw-semibold fs-5" }, this.formTitle), h("br", { key: 'faaf0cc27c448452a5172ad7fcfcf510ec586d2b' }), h("div", { key: '486638ad24414a05f84ada3f37a89d0cc12e7ffb', class: "row gy-3" }, h("owner-form-inputs", { key: 'bdfe7cb3305f31d93321319ef14eee3e5b331381', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }), h("div", { key: '9e5c63e0637e0bffe5ab77a1f73c203704115479', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: '85de4b69c697ebf96778f538b1535bd1fb2c43e7', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '1dd026432f19f84ae2142101191e511ebd62c2b3', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: '2570611bbe663e2e128f03806ecb036ce750c80b' }))));
184
183
  }
185
184
  static get watchers() { return {
186
185
  "isLoading": ["loadingWatcher"]
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "4.19.2-rc";
2
+ const version = "4.19.2";
3
3
  const description = "JustiFi Web Components";
4
4
  const collection = "dist/collection/collection-manifest.json";
5
5
  const main = "dist/index.cjs.js";
@@ -24,6 +24,7 @@ const scripts = {
24
24
  generate: "stencil generate",
25
25
  test: "TZ=utc stencil test --spec",
26
26
  "test:watch": "TZ=utc stencil test --spec --watchAll",
27
+ "test:e2e": "stencil test --e2e",
27
28
  "test:file": "stencil test --spec --watch --"
28
29
  };
29
30
  const dependencies = {
@@ -44,15 +45,16 @@ const devDependencies = {
44
45
  "@babel/preset-env": "^7.21.5",
45
46
  "@babel/preset-react": "^7.18.6",
46
47
  "@babel/preset-typescript": "^7.21.5",
47
- "@rollup/plugin-replace": "^5.0.7",
48
48
  "@stencil/sass": "^3.0.1",
49
49
  "@types/jest": "27.0.3",
50
+ "@types/node": "^20.1.4",
50
51
  "@types/react": "^18.0.37",
51
52
  "@types/react-dom": "^18.0.11",
52
53
  dotenv: "^16.3.1",
53
54
  jest: "^29.7.0",
54
55
  "jest-cli": "^29.7.0",
55
56
  "jest-environment-node": "^29.7.0",
57
+ puppeteer: "^21.0.0",
56
58
  "ts-jest": "^29.1.2"
57
59
  };
58
60
  const license = "MIT";
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { M as MapPaymentStatusToBadge, a as formatCurrency, g as formatDate, k as formatTime, s as snakeCaseToHumanReadable } from './utils2.js';
2
+ import { M as MapPaymentStatusToBadge, a as formatCurrency, e as formatDate, j as formatTime, s as snakeCaseToHumanReadable } from './utils2.js';
3
3
  import { L as LoadingState, E as ErrorState, b as EntityHeadInfo, c as EntityHeadInfoItem, D as DetailSectionTitle, a as DetailItem, C as CodeBlock } from './utils.js';
4
4
  import { S as StyledHost } from './styled-host.js';
5
5
  import { d as defineCustomElement$1 } from './details.js';
@@ -1,4 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { c as config } from './config.js';
2
3
  import { P as PaymentMethodTypes } from './Payment.js';
3
4
  import { d as defineCustomElement$2, P as PaymentMethodOption } from './saved-payment-method.js';
4
5
  import { d as defineCustomElement$a } from './form-control-error-text2.js';
@@ -31,7 +32,7 @@ const PaymentMethodOptions = /*@__PURE__*/ proxyCustomElement(class PaymentMetho
31
32
  this.insuranceToggled = undefined;
32
33
  this.authToken = undefined;
33
34
  this.accountId = undefined;
34
- this.iframeOrigin = "";
35
+ this.iframeOrigin = config.iframeOrigin;
35
36
  this.savedPaymentMethods = [];
36
37
  this.paymentAmount = undefined;
37
38
  this.selectedPaymentMethodId = undefined;
@@ -77,7 +78,7 @@ const PaymentMethodOptions = /*@__PURE__*/ proxyCustomElement(class PaymentMetho
77
78
  }
78
79
  render() {
79
80
  var _a;
80
- return (h(Host, { key: '7ee40a1bdc9ec15596e870b48cbe7b6bbc20537c' }, (_a = this.paymentMethodOptions) === null || _a === void 0 ? void 0 : _a.map((paymentMethodOption) => {
81
+ return (h(Host, { key: '86e309b90ab00f530dd803b00e5aab511f92300f' }, (_a = this.paymentMethodOptions) === null || _a === void 0 ? void 0 : _a.map((paymentMethodOption) => {
81
82
  const newCard = paymentMethodOption.id === PaymentMethodTypes.card;
82
83
  const newBankAccount = paymentMethodOption.id === PaymentMethodTypes.bankAccount;
83
84
  const isSelected = this.selectedPaymentMethodId === paymentMethodOption.id;
@@ -2,16 +2,17 @@ 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
 
6
7
  class PaymentService {
7
8
  async fetchPayments(accountId, authToken, params) {
8
- const api = Api({ authToken, apiOrigin: "" });
9
+ const api = Api({ authToken, apiOrigin: config.proxyApiOrigin });
9
10
  const endpoint = `account/${accountId}/payments`;
10
11
  return api.get(endpoint, params);
11
12
  }
12
13
  async fetchPayment(paymentId, authToken) {
13
14
  const endpoint = `payments/${paymentId}`;
14
- return Api({ authToken, apiOrigin: "" }).get(endpoint);
15
+ return Api({ authToken, apiOrigin: config.proxyApiOrigin }).get(endpoint);
15
16
  }
16
17
  }
17
18
 
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
2
2
  import { p as pagingDefaults } from './Pagination.js';
3
3
  import './Payment.js';
4
4
  import './Payout.js';
5
- import { g as formatDate, k as formatTime, a as formatCurrency, M as MapPaymentStatusToBadge } from './utils2.js';
5
+ import { e as formatDate, j as formatTime, a as formatCurrency, M as MapPaymentStatusToBadge } from './utils2.js';
6
6
  import { t as tableExportedParts, T as TableLoadingState, a as TableEmptyState, b as TableErrorState } from './exported-parts.js';
7
7
  import { S as StyledHost } from './styled-host.js';
8
8
  import { d as defineCustomElement$4 } from './form-control-date2.js';
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { m as MapPayoutStatusToBadge, a as formatCurrency, g as formatDate, k as formatTime } from './utils2.js';
2
+ import { k as MapPayoutStatusToBadge, a as formatCurrency, e as formatDate, j as formatTime } from './utils2.js';
3
3
  import { L as LoadingState, E as ErrorState, b as EntityHeadInfo, c as EntityHeadInfoItem, D as DetailSectionTitle, a as DetailItem, C as CodeBlock } from './utils.js';
4
4
  import { S as StyledHost } from './styled-host.js';
5
5
  import { d as defineCustomElement$1 } from './details.js';
@@ -2,7 +2,7 @@ import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/i
2
2
  import { p as pagingDefaults } from './Pagination.js';
3
3
  import './Payment.js';
4
4
  import { a as PayoutStatuses, b as PayoutStatusesSafeNames } from './Payout.js';
5
- import { g as formatDate, k as formatTime, a as formatCurrency } from './utils2.js';
5
+ import { e as formatDate, j as formatTime, a as formatCurrency } from './utils2.js';
6
6
  import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError.js';
7
7
  import { t as tableExportedParts, T as TableLoadingState, a as TableEmptyState, b as TableErrorState } from './exported-parts.js';
8
8
  import { S as StyledHost } from './styled-host.js';
@@ -1,5 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
2
- import { j as snakeToCamel } from './utils2.js';
2
+ import { c as config } from './config.js';
3
+ import { h as snakeToCamel } from './utils2.js';
3
4
 
4
5
  class PaymentMethodOption {
5
6
  constructor(paymentMethod) {
@@ -29,7 +30,7 @@ const SavedPaymentMethod = /*@__PURE__*/ proxyCustomElement(class SavedPaymentMe
29
30
  this.onPaymentMethodOptionClick = () => {
30
31
  this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
31
32
  };
32
- this.iframeOrigin = "";
33
+ this.iframeOrigin = config.iframeOrigin;
33
34
  this.paymentMethodOption = undefined;
34
35
  this.isSelected = undefined;
35
36
  }
@@ -43,7 +44,7 @@ const SavedPaymentMethod = /*@__PURE__*/ proxyCustomElement(class SavedPaymentMe
43
44
  ;
44
45
  render() {
45
46
  var _a, _b, _c, _d, _e;
46
- return (h(Fragment, { key: '247dafc3fe4011c5f6a2202690310eedfa5422c8' }, h("div", { key: '9cfb0b6ca9c10e5cc6173832bb8211ddb1d0ae5b', class: "payment-method" }, h("div", { key: 'd247cc4cf9f7bf43d7153134c66a921b5bfc49bc', class: "payment-method-header p-3", onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '180c3aa6c4153bccf7cb620b6df49cc288754cd2', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '6ec14d77e8171a1ddb37c686189878a7ebb4b4f4', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, CardBrandLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.brand], " *", (_e = this.paymentMethodOption) === null || _e === void 0 ? void 0 :
47
+ return (h(Fragment, { key: '9c2174123f1675d60bc48d8109821c0bc2ad7682' }, h("div", { key: '07bffce2603110d44f38ffb2f57a60f07faddb3b', class: "payment-method" }, h("div", { key: 'f489d3a05db45c2b2581bc8f0fc093afed453d91', class: "payment-method-header p-3", onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '70681612520aa621c39a017b72b25a7dd3211282', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: 'a58e14ae9d199b0e0eb01b4c0a4a8bd9c8fec41d', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, CardBrandLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.brand], " *", (_e = this.paymentMethodOption) === null || _e === void 0 ? void 0 :
47
48
  _e.acct_last_four)))));
48
49
  }
49
50
  }, [0, "justifi-saved-payment-method", {
@@ -1,4 +1,5 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
+ import { c as config } from './config.js';
2
3
  import { a as formatCurrency } from './utils2.js';
3
4
 
4
5
  const sezzleLogo = (h("img", { class: "sezzle-smart-button-logo-img", src: "https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg", alt: "Sezzle", style: {
@@ -42,7 +43,7 @@ const SezzlePaymentMethod = /*@__PURE__*/ proxyCustomElement(class SezzlePayment
42
43
  this.sezzleCheckout = checkout;
43
44
  this.installmentPlan = this.sezzleCheckout.getInstallmentPlan(amount);
44
45
  };
45
- this.iframeOrigin = "";
46
+ this.iframeOrigin = config.iframeOrigin;
46
47
  this.bnpl = undefined;
47
48
  this.clientId = undefined;
48
49
  this.accountId = undefined;
@@ -68,7 +69,7 @@ const SezzlePaymentMethod = /*@__PURE__*/ proxyCustomElement(class SezzlePayment
68
69
  }
69
70
  render() {
70
71
  var _a, _b, _c, _d, _e;
71
- return (h("div", { key: '1b4e4a142e1e59465e0db5515ee6b0a0b2aac146', class: "payment-method" }, h("script", { key: 'c835bc94836949e2362974eaeefca1f6a579a1a0', src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", { key: '051a0392e6353116423f706be48eb266daf12b84', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '6dd0d61f1b8788b45b008f5ac05f8a8b6a6591f2', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: 'caf3429bae616a016f58e141ac5c4493174cf3ef', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, h("div", { key: '0e4ea85fc6fc32a1c35fe0dac86f21ab7f86eb0a' }, "Buy now, pay later with ", sezzleLogo), this.installmentPlan && (h("small", { key: '3740565f14b87aa2e4af44b7e2b12d93d6e454c2' }, h("span", { key: 'ca9b6dff0042c41d378b101067d060092234fa7c' }, (_d = this.installmentPlan) === null || _d === void 0 ? void 0 : _d.installments.length), "\u00A0", h("span", { key: '14ab21fd2d9bd612f41d5cd3e175402593012619' }, this.installmentPlan.schedule, " payments of"), "\u00A0", h("span", { key: '25e08c1e711af0979e14bbb911aedb58f59bc180', class: "fw-bold" }, formatCurrency((_e = this.installmentPlan) === null || _e === void 0 ? void 0 : _e.installments[0].amountInCents))))))));
72
+ return (h("div", { key: '4deca512311cd98d358c7099141b15538857a4e5', class: "payment-method" }, h("script", { key: '94b232291153bba85efebb101e7e6e816857da96', src: "https://checkout-sdk.sezzle.com/checkout.min.js", async: true, ref: (el) => (this.scriptRef = el) }), h("div", { key: '7cd9052ae6613fe7f187f3a51b7d6ac7087fdeb1', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '1e15e6c2ddced23b049e2559da27532f9be94fb5', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '0a3637002ef373c05424d6769b070d9db0e66ce8', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, h("div", { key: '6398e2f00088edf8a1a3699e149760744dda4cb1' }, "Buy now, pay later with ", sezzleLogo), this.installmentPlan && (h("small", { key: 'bfd33da875aa5e9f5b649ac8fc7aa5758393b6e8' }, h("span", { key: 'c07fd5d32fe897a45a67140e2cb81b1f4d537c4a' }, (_d = this.installmentPlan) === null || _d === void 0 ? void 0 : _d.installments.length), "\u00A0", h("span", { key: '2b11e4aa6389a4b98cd003c031aed8f01ec8a4df' }, this.installmentPlan.schedule, " payments of"), "\u00A0", h("span", { key: '90cf3bfa1f0d36c8d4719f164d436407d7fc692b', class: "fw-bold" }, formatCurrency((_e = this.installmentPlan) === null || _e === void 0 ? void 0 : _e.installments[0].amountInCents))))))));
72
73
  }
73
74
  }, [0, "justifi-sezzle-payment-method", {
74
75
  "iframeOrigin": [1025, "iframe-origin"],
@@ -3971,21 +3971,6 @@ function snakeToCamel(str) {
3971
3971
  return '';
3972
3972
  return str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''));
3973
3973
  }
3974
- function flattenNestedObject(obj) {
3975
- const result = {};
3976
- for (const key in obj) {
3977
- if (typeof obj[key] === 'object' && obj[key] !== null) {
3978
- const nestedObj = flattenNestedObject(obj[key]);
3979
- for (const nestedKey in nestedObj) {
3980
- result[nestedKey] = nestedObj[nestedKey];
3981
- }
3982
- }
3983
- else {
3984
- result[key] = obj[key];
3985
- }
3986
- }
3987
- return result;
3988
- }
3989
3974
  function composeQueryParams(values) {
3990
3975
  const queryParams = values.map((value) => {
3991
3976
  if (value === values[0]) {
@@ -4024,4 +4009,4 @@ const isInRange = (num, min, max) => {
4024
4009
  return num >= min && num <= max;
4025
4010
  };
4026
4011
 
4027
- export { MapPaymentStatusToBadge as M, formatCurrency as a, formatDisplayDate as b, composeQueryParams as c, flattenNestedObject as d, isInRange as e, formatMediumDate as f, formatDate as g, formatTimeSeconds as h, isEmptyObject as i, snakeToCamel as j, formatTime as k, loadFontsOnParent as l, MapPayoutStatusToBadge as m, snakeCaseToHumanReadable as s };
4012
+ export { MapPaymentStatusToBadge as M, formatCurrency as a, formatDisplayDate as b, composeQueryParams as c, isInRange as d, formatDate as e, formatMediumDate as f, formatTimeSeconds as g, snakeToCamel as h, isEmptyObject as i, formatTime as j, MapPayoutStatusToBadge as k, loadFontsOnParent as l, snakeCaseToHumanReadable as s };