@justifi/webcomponents 6.11.0 → 6.12.0

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 (871) hide show
  1. package/dist/cjs/{check-pkg-version-Di4JmtKX.js → Analytics-DZCXB2Za.js} +1 -44
  2. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  3. package/dist/cjs/{justifi-additional-questions-form-step_9.cjs.entry.js → additional-questions-form-step_9.cjs.entry.js} +22 -22
  4. package/dist/cjs/{form-alert_5.cjs.entry.js → additional-questions_5.cjs.entry.js} +26 -26
  5. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +203 -0
  6. package/dist/cjs/bank-account-document-form-inputs_9.cjs.entry.js +37 -37
  7. package/dist/cjs/bank-account-form.cjs.entry.js +8 -4
  8. package/dist/cjs/card-form.cjs.entry.js +8 -4
  9. package/dist/cjs/check-pkg-version-CUhnNGii.js +47 -0
  10. package/dist/cjs/checkouts-list-core.cjs.entry.js +1 -1
  11. package/dist/cjs/custom-popper_2.cjs.entry.js +4 -4
  12. package/dist/cjs/{form-control-number-masked_3.cjs.entry.js → form-address-fields_3.cjs.entry.js} +23 -23
  13. package/dist/cjs/form-control-checkbox.cjs.entry.js +4 -4
  14. package/dist/cjs/form-control-date.cjs.entry.js +4 -4
  15. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +7 -7
  16. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +4 -4
  17. package/dist/cjs/form-control-monetary.cjs.entry.js +4 -4
  18. package/dist/cjs/form-control-number_3.cjs.entry.js +11 -11
  19. package/dist/cjs/form-control-radio.cjs.entry.js +4 -4
  20. package/dist/cjs/form-control-select_2.cjs.entry.js +8 -8
  21. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  22. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  23. package/dist/cjs/internal-button.cjs.entry.js +18 -0
  24. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +24 -24
  25. package/dist/cjs/{justifi-apple-pay_8.cjs.entry.js → justifi-apple-pay_11.cjs.entry.js} +337 -31
  26. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +46 -0
  27. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +44 -0
  28. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +24 -0
  29. package/dist/cjs/justifi-billing-form.cjs.entry.js +24 -0
  30. package/dist/cjs/justifi-business-details.cjs.entry.js +6 -5
  31. package/dist/cjs/justifi-business-form.cjs.entry.js +7 -6
  32. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +24 -0
  33. package/dist/cjs/justifi-card-form.cjs.entry.js +44 -0
  34. package/dist/cjs/justifi-checkout.cjs.entry.js +8 -9
  35. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +4 -4
  36. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -6
  37. package/dist/cjs/justifi-config-provider.cjs.entry.js +2 -2
  38. package/dist/cjs/justifi-details.cjs.entry.js +3 -3
  39. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +3 -3
  40. package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -6
  41. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +14 -13
  42. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -5
  43. package/dist/cjs/justifi-order-terminals.cjs.entry.js +7 -6
  44. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
  45. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +3 -3
  46. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -6
  47. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -6
  48. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +4 -4
  49. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -6
  50. package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -5
  51. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -6
  52. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -4
  53. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -6
  54. package/dist/cjs/justifi-refund-payment.cjs.entry.js +6 -5
  55. package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +18 -0
  56. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +3 -3
  57. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -5
  58. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  59. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +5 -5
  60. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -6
  61. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +3 -3
  62. package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -6
  63. package/dist/cjs/loader.cjs.js +1 -1
  64. package/dist/cjs/{package-D8NG-zuY.js → package-CJg8qLYd.js} +1 -1
  65. package/dist/cjs/payment-details-core.cjs.entry.js +8 -8
  66. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  67. package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
  68. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  69. package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
  70. package/dist/cjs/radio-list-item.cjs.entry.js +21 -0
  71. package/dist/cjs/save-new-payment-method.cjs.entry.js +25 -0
  72. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  73. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +1 -1
  74. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  75. package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
  76. package/dist/cjs/webcomponents.cjs.js +1 -1
  77. package/dist/collection/collection-manifest.json +58 -52
  78. package/dist/collection/components/business-details/{business-details.js → justifi-business-details.js} +1 -1
  79. package/dist/collection/components/business-details/representative-details/representative-details.js +1 -1
  80. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +2 -2
  81. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +3 -3
  82. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +3 -3
  83. package/dist/collection/components/business-forms/business-form/{business-form.js → justifi-business-form.js} +2 -2
  84. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +2 -2
  85. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +2 -2
  86. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +2 -2
  87. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +3 -3
  88. package/dist/collection/components/business-forms/owner-form/owner-form.js +3 -3
  89. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/{business-additional-questions-form-step.js → additional-questions-form-step.js} +1 -1
  90. package/dist/collection/components/business-forms/payment-provisioning/bank-account/{bank-account-document-inputs.js → bank-account-document-form-inputs.js} +1 -1
  91. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +1 -1
  92. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  93. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +1 -1
  94. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +1 -1
  95. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  96. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +2 -2
  97. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +4 -4
  98. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +2 -2
  99. package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +2 -2
  100. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +3 -3
  101. package/dist/collection/components/business-forms/payment-provisioning/{payment-provisioning.js → justifi-payment-provisioning.js} +2 -2
  102. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +2 -2
  103. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +2 -2
  104. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +2 -2
  105. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +9 -9
  106. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -2
  107. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +11 -16
  108. package/dist/collection/components/{modular-checkout/sub-components → checkout/billing-form}/bank-account-billing-form-simple.js +16 -35
  109. package/dist/collection/components/{modular-checkout/sub-components → checkout/billing-form}/billing-form-full.js +19 -37
  110. package/dist/collection/components/checkout/billing-form/billing-form.js +5 -35
  111. package/dist/collection/components/{modular-checkout/sub-components → checkout/billing-form}/card-billing-form-simple.js +16 -35
  112. package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +140 -0
  113. package/dist/collection/components/checkout/card-form/card-form.js +11 -16
  114. package/dist/collection/components/checkout/{checkout.js → justifi-checkout.js} +3 -24
  115. package/dist/collection/components/checkout/{saved-payment-method.js → justifi-saved-payment-method.js} +2 -2
  116. package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +73 -0
  117. package/dist/collection/components/checkout/{save-new-payment-method.js → save-new-payment-method/save-new-payment-method.js} +23 -6
  118. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  119. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +3 -3
  120. package/dist/collection/components/checkouts-list/{checkouts-list.js → justifi-checkouts-list.js} +2 -2
  121. package/dist/collection/components/config-provider/{config-provider.js → justifi-config-provider.js} +1 -1
  122. package/dist/collection/components/dispute-management/dispute-management-core.js +2 -2
  123. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +2 -2
  124. package/dist/collection/components/dispute-management/dispute-response/{additional-statement.js → justifi-additional-statement.js} +2 -2
  125. package/dist/collection/components/dispute-management/dispute-response/{cancellation-policy.js → justifi-cancellation-policy.js} +2 -2
  126. package/dist/collection/components/dispute-management/dispute-response/{customer-details.js → justifi-customer-details.js} +2 -2
  127. package/dist/collection/components/dispute-management/dispute-response/{dispute-response.js → justifi-dispute-response.js} +5 -4
  128. package/dist/collection/components/dispute-management/dispute-response/{duplicate-charge.js → justifi-duplicate-charge.js} +2 -2
  129. package/dist/collection/components/dispute-management/dispute-response/{electronic-evidence.js → justifi-electronic-evidence.js} +2 -2
  130. package/dist/collection/components/dispute-management/dispute-response/{product-or-service.js → justifi-product-or-service.js} +2 -2
  131. package/dist/collection/components/dispute-management/dispute-response/{refund-policy.js → justifi-refund-policy.js} +2 -2
  132. package/dist/collection/components/dispute-management/dispute-response/{shipping-details.js → justifi-shipping-details.js} +2 -2
  133. package/dist/collection/components/dispute-management/{dispute-management.js → justifi-dispute-management.js} +2 -2
  134. package/dist/collection/components/dispute-management/{dispute-notification.js → justifi-dispute-notification.js} +3 -3
  135. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  136. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  137. package/dist/collection/components/gross-payment-chart/{gross-payment-chart.js → justifi-gross-payment-chart.js} +1 -1
  138. package/dist/collection/components/insurance/season-interruption/{season-interruption-insurance.js → justifi-season-interruption-insurance.js} +1 -1
  139. package/dist/collection/components/modular-checkout/{modular-checkout.js → justifi-modular-checkout.js} +41 -3
  140. package/dist/collection/components/modular-checkout/sub-components/{apple-pay.js → justifi-apple-pay.js} +8 -11
  141. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +95 -0
  142. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +69 -0
  143. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +83 -0
  144. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +83 -0
  145. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +69 -0
  146. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +12 -0
  147. package/dist/collection/components/modular-checkout/sub-components/{google-pay.js → justifi-google-pay.js} +1 -1
  148. package/dist/collection/components/modular-checkout/sub-components/{plaid-payment-method.js → justifi-plaid-payment-method.js} +2 -2
  149. package/dist/collection/components/modular-checkout/sub-components/{saved-payment-methods.js → justifi-saved-payment-methods.js} +1 -1
  150. package/dist/collection/components/modular-checkout/sub-components/{sezzle-payment-method.js → justifi-sezzle-payment-method.js} +1 -1
  151. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  152. package/dist/collection/components/order-terminals/{order-terminals.js → justifi-order-terminals.js} +2 -2
  153. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  154. package/dist/collection/components/payment-details/{payment-details.js → justifi-payment-details.js} +1 -1
  155. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  156. package/dist/collection/components/payment-transactions-list/{payment-transactions-list.js → justifi-payment-transactions-list.js} +2 -2
  157. package/dist/collection/components/payments-list/{payments-list-filters.js → justifi-payments-list-filters.js} +3 -3
  158. package/dist/collection/components/payments-list/{payments-list.js → justifi-payments-list.js} +2 -2
  159. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  160. package/dist/collection/components/payout-details/{payout-details.js → justifi-payout-details.js} +1 -1
  161. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  162. package/dist/collection/components/payout-transactions-list/{payout-transactions-list.js → justifi-payout-transactions-list.js} +2 -2
  163. package/dist/collection/components/payouts-list/{payouts-list-filters.js → justifi-payouts-list-filters.js} +3 -3
  164. package/dist/collection/components/payouts-list/{payouts-list.js → justifi-payouts-list.js} +2 -2
  165. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  166. package/dist/collection/components/refund-payment/{refund-payment.js → justifi-refund-payment.js} +1 -1
  167. package/dist/collection/components/terminal-orders-list/{terminal-orders-list-filters.js → justifi-terminal-orders-list-filters.js} +4 -4
  168. package/dist/collection/components/terminal-orders-list/{terminal-orders-list.js → justifi-terminal-orders-list.js} +2 -2
  169. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  170. package/dist/collection/components/terminals-list/{terminals-list-filters.js → justifi-terminals-list-filters.js} +2 -2
  171. package/dist/collection/components/terminals-list/{terminals-list.js → justifi-terminals-list.js} +2 -2
  172. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  173. package/dist/collection/components/tokenize-payment-method/{internal-tokenize-payment-method.js → justifi-tokenize-payment-method.js} +73 -37
  174. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  175. package/dist/collection/ui-components/details/{details.js → justifi-details.js} +2 -2
  176. package/dist/collection/ui-components/form/form-control-checkbox.js +3 -3
  177. package/dist/collection/ui-components/form/form-control-date.js +3 -3
  178. package/dist/collection/ui-components/form/form-control-file-v2.js +2 -2
  179. package/dist/collection/ui-components/form/form-control-file.js +3 -3
  180. package/dist/collection/ui-components/form/form-control-monetary.js +3 -3
  181. package/dist/collection/ui-components/form/form-control-number-masked.js +3 -3
  182. package/dist/collection/ui-components/form/form-control-number.js +3 -3
  183. package/dist/collection/ui-components/form/form-control-radio.js +3 -3
  184. package/dist/collection/ui-components/form/form-control-select.js +3 -3
  185. package/dist/collection/ui-components/form/form-control-text.js +3 -3
  186. package/dist/collection/ui-components/form/form-control-textarea.js +3 -3
  187. package/dist/collection/ui-components/form/form-helpers/form-control-tooltip/form-control-tooltip.js +1 -1
  188. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  189. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  190. package/dist/collection/ui-components/index.js +1 -1
  191. package/dist/collection/ui-components/internal-button.js +192 -0
  192. package/dist/collection/ui-components/radio-list-item.js +153 -0
  193. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +20 -2
  194. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +2 -2
  195. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +1 -5
  196. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  197. package/dist/docs.json +10905 -10441
  198. package/dist/esm/{check-pkg-version-Dn83YYz_.js → Analytics-C2EVi4Am.js} +4 -46
  199. package/dist/esm/{Api-CLZVsXZg.js → Api-DI0-itk3.js} +1 -1
  200. package/dist/esm/{Plaid-DOdR_CNb.js → Plaid-vwPGZ5y4.js} +1 -1
  201. package/dist/esm/additional-questions-details_5.entry.js +5 -5
  202. package/dist/esm/{justifi-additional-questions-form-step_9.entry.js → additional-questions-form-step_9.entry.js} +22 -22
  203. package/dist/esm/{form-alert_5.entry.js → additional-questions_5.entry.js} +23 -23
  204. package/dist/esm/{badge-guwZ0VTf.js → badge-B_DdhQ3Q.js} +1 -1
  205. package/dist/esm/bank-account-billing-form-simple_4.entry.js +198 -0
  206. package/dist/esm/bank-account-document-form-inputs_9.entry.js +43 -43
  207. package/dist/esm/bank-account-form.entry.js +12 -8
  208. package/dist/esm/business-details-core.entry.js +3 -3
  209. package/dist/esm/{business.service-DSolii9Q.js → business.service-M3YvwC-d.js} +2 -2
  210. package/dist/esm/{button-CdXktiZq.js → button-B-Agn8yQ.js} +1 -1
  211. package/dist/esm/card-form.entry.js +12 -8
  212. package/dist/esm/check-pkg-version-qIHmWcbI.js +45 -0
  213. package/dist/esm/{checkout.service-BTXHVtxI.js → checkout.service-DdIBmfsp.js} +2 -2
  214. package/dist/esm/{checkout.store-iNkW80yV.js → checkout.store-C1TdhFf6.js} +1 -1
  215. package/dist/esm/checkouts-list-core.entry.js +8 -8
  216. package/dist/esm/{checkouts-table-Bf6gjMf8.js → checkouts-table-4iLy6mvH.js} +3 -3
  217. package/dist/esm/custom-popper_2.entry.js +5 -5
  218. package/dist/esm/{dispute.service-CpDEYnHy.js → dispute.service-BzzA0DeT.js} +2 -2
  219. package/dist/esm/{form-control-number-masked_3.entry.js → form-address-fields_3.entry.js} +23 -23
  220. package/dist/esm/form-control-checkbox.entry.js +7 -7
  221. package/dist/esm/form-control-date.entry.js +6 -6
  222. package/dist/esm/{form-control-error-text-JYoDicr0.js → form-control-error-text-DMKhr8QA.js} +1 -1
  223. package/dist/esm/form-control-file-v2_2.entry.js +8 -8
  224. package/dist/esm/{form-control-help-text-DxL7yVgi.js → form-control-help-text-CsdCuw5-.js} +1 -1
  225. package/dist/esm/form-control-monetary-provisioning.entry.js +7 -7
  226. package/dist/esm/form-control-monetary.entry.js +8 -8
  227. package/dist/esm/form-control-number_3.entry.js +13 -13
  228. package/dist/esm/form-control-radio.entry.js +5 -5
  229. package/dist/esm/form-control-select_2.entry.js +9 -9
  230. package/dist/esm/{get-payment-details-VEzqfeuZ.js → get-payment-details-CN7gUjBc.js} +1 -1
  231. package/dist/esm/{get-subaccounts-DUdsxExJ.js → get-subaccounts-Mwx-aVcG.js} +2 -2
  232. package/dist/esm/gross-payment-chart-core.entry.js +5 -5
  233. package/dist/esm/{header-1-CU8Erek9.js → header-1-bRxxOyI-.js} +1 -1
  234. package/dist/esm/{header-3-BwJ-9MsW.js → header-3-E533c0A3.js} +1 -1
  235. package/dist/esm/hidden-input_2.entry.js +7 -7
  236. package/dist/esm/{insurance-state-gsU4kKgc.js → insurance-state-obAKb1XR.js} +1 -1
  237. package/dist/esm/internal-button.entry.js +16 -0
  238. package/dist/esm/justifi-additional-statement_8.entry.js +18 -18
  239. package/dist/esm/{justifi-apple-pay_8.entry.js → justifi-apple-pay_11.entry.js} +338 -35
  240. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +44 -0
  241. package/dist/esm/justifi-bank-account-form.entry.js +42 -0
  242. package/dist/esm/justifi-billing-form-full.entry.js +22 -0
  243. package/dist/esm/justifi-billing-form.entry.js +22 -0
  244. package/dist/esm/justifi-business-details.entry.js +11 -10
  245. package/dist/esm/justifi-business-form.entry.js +14 -13
  246. package/dist/esm/justifi-card-billing-form-simple.entry.js +22 -0
  247. package/dist/esm/justifi-card-form.entry.js +42 -0
  248. package/dist/esm/justifi-checkout.entry.js +12 -13
  249. package/dist/esm/justifi-checkouts-list-filters.entry.js +7 -7
  250. package/dist/esm/justifi-checkouts-list.entry.js +14 -13
  251. package/dist/esm/justifi-config-provider.entry.js +2 -2
  252. package/dist/esm/justifi-details.entry.js +5 -5
  253. package/dist/esm/justifi-dispute-management-core.entry.js +3 -3
  254. package/dist/esm/justifi-dispute-management.entry.js +10 -9
  255. package/dist/esm/justifi-dispute-notification_3.entry.js +18 -17
  256. package/dist/esm/justifi-gross-payment-chart.entry.js +10 -9
  257. package/dist/esm/justifi-order-terminals.entry.js +13 -12
  258. package/dist/esm/justifi-payment-details.entry.js +12 -11
  259. package/dist/esm/justifi-payment-provisioning-core.entry.js +7 -7
  260. package/dist/esm/justifi-payment-provisioning.entry.js +10 -9
  261. package/dist/esm/justifi-payment-transactions-list.entry.js +13 -12
  262. package/dist/esm/justifi-payments-list-filters.entry.js +6 -6
  263. package/dist/esm/justifi-payments-list.entry.js +14 -13
  264. package/dist/esm/justifi-payout-details.entry.js +11 -10
  265. package/dist/esm/justifi-payout-transactions-list.entry.js +13 -12
  266. package/dist/esm/justifi-payouts-list-filters.entry.js +7 -7
  267. package/dist/esm/justifi-payouts-list.entry.js +15 -14
  268. package/dist/esm/justifi-refund-payment.entry.js +13 -12
  269. package/dist/esm/justifi-save-new-payment-method.entry.js +16 -0
  270. package/dist/esm/justifi-saved-payment-method.entry.js +4 -4
  271. package/dist/esm/justifi-season-interruption-insurance.entry.js +12 -11
  272. package/dist/esm/justifi-skeleton.entry.js +3 -3
  273. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +8 -8
  274. package/dist/esm/justifi-terminal-orders-list.entry.js +12 -11
  275. package/dist/esm/justifi-terminals-list-filters.entry.js +6 -6
  276. package/dist/esm/justifi-terminals-list.entry.js +14 -13
  277. package/dist/esm/loader.js +1 -1
  278. package/dist/esm/{package-qNXIkzDE.js → package-CIYOQWsL.js} +1 -1
  279. package/dist/esm/pagination-menu.entry.js +1 -1
  280. package/dist/esm/{parts-D3V9AE6o.js → parts-D50Rx76J.js} +1 -1
  281. package/dist/esm/payment-details-core.entry.js +15 -15
  282. package/dist/esm/payment-method-option.entry.js +2 -2
  283. package/dist/esm/{payment-provisioning-loading-CQfDKCwy.js → payment-provisioning-loading-BAoIyEOj.js} +1 -1
  284. package/dist/esm/{payment.service-BjU4B__W.js → payment.service-0k8z2rOV.js} +2 -2
  285. package/dist/esm/payments-list-core.entry.js +9 -9
  286. package/dist/esm/{payments-status-DT4VNKKg.js → payments-status-7P7L51CK.js} +1 -1
  287. package/dist/esm/{payments-table-BJ1F2ZZU.js → payments-table-Bz7LmU_J.js} +3 -3
  288. package/dist/esm/payout-details-core.entry.js +10 -10
  289. package/dist/esm/{payout.service-CzCd8AaC.js → payout.service-C14YvCWQ.js} +2 -2
  290. package/dist/esm/payouts-list-core.entry.js +9 -9
  291. package/dist/esm/{payouts-status-LTNE_gQc.js → payouts-status-CGZRMu-q.js} +1 -1
  292. package/dist/esm/{payouts-table-Yp2d9OgA.js → payouts-table-Bpt__avQ.js} +3 -3
  293. package/dist/esm/{plaid.service-D61Eq14d.js → plaid.service-Dtxfrsm8.js} +2 -2
  294. package/dist/esm/radio-list-item.entry.js +19 -0
  295. package/dist/esm/save-new-payment-method.entry.js +23 -0
  296. package/dist/esm/{skeleton-CV6EpBqb.js → skeleton-DV6yJalo.js} +1 -1
  297. package/dist/esm/{spinner-CG3aWl8K.js → spinner--fEgBBOG.js} +1 -1
  298. package/dist/esm/{table-DZ6rurWg.js → table-Deugl8h5.js} +2 -2
  299. package/dist/esm/table-filters-menu.entry.js +3 -3
  300. package/dist/esm/terminal-orders-list-core.entry.js +8 -8
  301. package/dist/esm/{terminal-orders-table-CJg6dKsL.js → terminal-orders-table-DRnRR4zn.js} +4 -4
  302. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  303. package/dist/esm/{terminal.service-BBdRhDxm.js → terminal.service-rxvEhqqF.js} +2 -2
  304. package/dist/esm/terminals-list-core.entry.js +8 -8
  305. package/dist/esm/{terminals-table-iGSICJeZ.js → terminals-table-DSDZgJ77.js} +3 -3
  306. package/dist/esm/{utils-7bp92NC7.js → utils-C_8ZxLti.js} +1 -1
  307. package/dist/esm/{utils-DUArY3am.js → utils-DJOBwFeP.js} +1 -1
  308. package/dist/esm/webcomponents.js +1 -1
  309. package/dist/module/Analytics.js +1 -43
  310. package/dist/module/Plaid.js +1 -1
  311. package/dist/module/additional-questions-form-step.d.ts +11 -0
  312. package/dist/module/additional-questions-form-step.js +6 -0
  313. package/dist/module/{business-additional-questions-form-step.js → additional-questions-form-step2.js} +5 -5
  314. package/dist/module/additional-questions.d.ts +11 -0
  315. package/dist/module/additional-questions.js +4 -76
  316. package/dist/module/additional-questions2.js +78 -0
  317. package/dist/module/badge.js +1 -1
  318. package/dist/module/bank-account-billing-form-simple.d.ts +11 -0
  319. package/dist/module/bank-account-billing-form-simple.js +4 -86
  320. package/dist/module/bank-account-billing-form-simple2.js +91 -0
  321. package/dist/module/bank-account-document-form-inputs.js +1 -1
  322. package/dist/module/{bank-account-document-inputs.js → bank-account-document-form-inputs2.js} +1 -1
  323. package/dist/module/bank-account-form-inputs-canada2.js +3 -3
  324. package/dist/module/bank-account-form-inputs2.js +3 -3
  325. package/dist/module/bank-account-form.js +1 -80
  326. package/dist/module/{bank-account.js → bank-account-form2.js} +10 -19
  327. package/dist/module/bank-account-read-only-value2.js +2 -2
  328. package/dist/module/billing-form-full.d.ts +11 -0
  329. package/dist/module/billing-form-full.js +4 -97
  330. package/dist/module/billing-form-full2.js +105 -0
  331. package/dist/module/billing-form-schema.js +1 -1
  332. package/dist/module/billing-form.d.ts +11 -0
  333. package/dist/module/billing-form.js +4 -102
  334. package/dist/module/billing-form2.js +99 -0
  335. package/dist/module/business-additional-questions-schema.js +1 -1
  336. package/dist/module/business-address-schema.js +2 -2
  337. package/dist/module/business-bank-account-form-step.d.ts +11 -0
  338. package/dist/module/business-bank-account-form-step.js +4 -602
  339. package/dist/module/business-bank-account-form-step2.js +604 -0
  340. package/dist/module/business-core-info-form-step.d.ts +11 -0
  341. package/dist/module/business-core-info-form-step.js +4 -215
  342. package/dist/module/business-core-info-form-step2.js +217 -0
  343. package/dist/module/{justifi-owner-form.d.ts → business-core-info.d.ts} +4 -4
  344. package/dist/module/business-core-info.js +4 -92
  345. package/dist/module/business-core-info2.js +94 -0
  346. package/dist/module/business-details-core2.js +1 -1
  347. package/dist/module/business-documents-on-file2.js +3 -3
  348. package/dist/module/business-form-options.js +1 -1
  349. package/dist/module/business-identity-schema.js +2 -2
  350. package/dist/module/business-owners-form-step.d.ts +11 -0
  351. package/dist/module/business-owners-form-step.js +4 -302
  352. package/dist/module/business-owners-form-step2.js +304 -0
  353. package/dist/module/business-representative-form-inputs.d.ts +11 -0
  354. package/dist/module/business-representative-form-inputs.js +4 -100
  355. package/dist/module/business-representative-form-inputs2.js +102 -0
  356. package/dist/module/business-representative-form-step.d.ts +11 -0
  357. package/dist/module/business-representative-form-step.js +4 -220
  358. package/dist/module/business-representative-form-step2.js +222 -0
  359. package/dist/module/business-representative.d.ts +11 -0
  360. package/dist/module/business-representative.js +4 -114
  361. package/dist/module/business-representative2.js +116 -0
  362. package/dist/module/business-terms-conditions-form-step.d.ts +11 -0
  363. package/dist/module/business-terms-conditions-form-step.js +4 -165
  364. package/dist/module/business-terms-conditions-form-step2.js +167 -0
  365. package/dist/module/button.js +1 -1
  366. package/dist/module/card-billing-form-simple.d.ts +11 -0
  367. package/dist/module/card-billing-form-simple.js +4 -86
  368. package/dist/module/card-billing-form-simple2.js +91 -0
  369. package/dist/module/card-form.js +1 -84
  370. package/dist/module/card-form2.js +12 -21
  371. package/dist/module/check-pkg-version.js +45 -0
  372. package/dist/module/checkout.store.js +2 -2
  373. package/dist/module/checkouts-list-core2.js +4 -4
  374. package/dist/module/checkouts-list-params-state.js +1 -1
  375. package/dist/module/config-state.js +1 -1
  376. package/dist/module/custom-popper2.js +2 -2
  377. package/dist/module/dispute-management-core.js +15 -15
  378. package/dist/module/dispute-response-actions.js +2 -2
  379. package/dist/module/dispute-response-core.js +13 -13
  380. package/dist/module/form-address-fields.d.ts +11 -0
  381. package/dist/module/form-address-fields.js +4 -63
  382. package/dist/module/form-address-fields2.js +65 -0
  383. package/dist/module/form-alert2.js +1 -1
  384. package/dist/module/form-control-checkbox.js +2 -2
  385. package/dist/module/form-control-checkbox2.js +8 -8
  386. package/dist/module/form-control-date.js +2 -2
  387. package/dist/module/form-control-date2.js +7 -7
  388. package/dist/module/form-control-file-v2.js +2 -2
  389. package/dist/module/form-control-file-v22.js +4 -4
  390. package/dist/module/form-control-file.js +2 -2
  391. package/dist/module/form-control-file2.js +7 -7
  392. package/dist/module/form-control-help-text.js +1 -1
  393. package/dist/module/form-control-help-text2.js +9 -32
  394. package/dist/module/form-control-help-text3.js +32 -9
  395. package/dist/module/form-control-monetary-provisioning.js +2 -2
  396. package/dist/module/form-control-monetary-provisioning2.js +9 -9
  397. package/dist/module/form-control-monetary.js +2 -2
  398. package/dist/module/form-control-monetary2.js +8 -8
  399. package/dist/module/form-control-number-masked.js +2 -2
  400. package/dist/module/form-control-number-masked2.js +8 -8
  401. package/dist/module/form-control-number.js +2 -2
  402. package/dist/module/form-control-number2.js +8 -8
  403. package/dist/module/form-control-radio.js +2 -2
  404. package/dist/module/form-control-radio2.js +7 -7
  405. package/dist/module/form-control-select.js +2 -2
  406. package/dist/module/form-control-select2.js +7 -7
  407. package/dist/module/form-control-text.js +2 -2
  408. package/dist/module/form-control-text2.js +7 -7
  409. package/dist/module/form-control-textarea.js +2 -2
  410. package/dist/module/form-control-textarea2.js +7 -7
  411. package/dist/module/form-control-tooltip.js +2 -2
  412. package/dist/module/form-control-tooltip2.js +4 -4
  413. package/dist/module/get-business.js +2 -2
  414. package/dist/module/get-payment-details.js +2 -2
  415. package/dist/module/get-payout-csv.js +2 -2
  416. package/dist/module/get-subaccounts.js +2 -2
  417. package/dist/module/gross-payment-chart-core2.js +1 -1
  418. package/dist/module/header-1.js +1 -1
  419. package/dist/module/header-3.js +1 -1
  420. package/dist/module/hidden-input2.js +2 -2
  421. package/dist/module/identity-address-form.d.ts +11 -0
  422. package/dist/module/identity-address-form.js +4 -76
  423. package/dist/module/identity-address-form2.js +78 -0
  424. package/dist/module/iframe-input-styles-state.js +1 -1
  425. package/dist/module/iframe-input2.js +4 -4
  426. package/dist/module/index2.js +3567 -246
  427. package/dist/module/index3.js +246 -3567
  428. package/dist/module/insurance-state.js +1 -1
  429. package/dist/module/internal-button.d.ts +11 -0
  430. package/dist/module/internal-button.js +6 -0
  431. package/dist/module/internal-button2.js +42 -0
  432. package/dist/module/justifi-additional-statement.js +2 -2
  433. package/dist/module/{additional-statement.js → justifi-additional-statement2.js} +5 -5
  434. package/dist/module/justifi-apple-pay.js +2 -2
  435. package/dist/module/{apple-pay.js → justifi-apple-pay2.js} +11 -11
  436. package/dist/module/justifi-bank-account-billing-form-simple.js +81 -2
  437. package/dist/module/justifi-bank-account-form.js +72 -2
  438. package/dist/module/justifi-billing-form-full.js +75 -2
  439. package/dist/module/justifi-billing-form.js +96 -2
  440. package/dist/module/justifi-business-details.js +7 -6
  441. package/dist/module/justifi-business-form.js +38 -37
  442. package/dist/module/justifi-button2.js +10 -4
  443. package/dist/module/justifi-cancellation-policy.js +2 -2
  444. package/dist/module/{cancellation-policy.js → justifi-cancellation-policy2.js} +5 -5
  445. package/dist/module/justifi-card-billing-form-simple.js +69 -2
  446. package/dist/module/justifi-card-form.js +71 -1
  447. package/dist/module/justifi-checkout-summary.js +2 -2
  448. package/dist/module/{summary.js → justifi-checkout-summary2.js} +6 -6
  449. package/dist/module/justifi-checkout.js +73 -62
  450. package/dist/module/justifi-checkouts-list-filters.js +6 -6
  451. package/dist/module/justifi-checkouts-list.js +9 -8
  452. package/dist/module/justifi-config-provider.js +3 -3
  453. package/dist/module/justifi-customer-details.js +2 -2
  454. package/dist/module/{customer-details.js → justifi-customer-details2.js} +5 -5
  455. package/dist/module/justifi-details.js +2 -2
  456. package/dist/module/{details.js → justifi-details2.js} +4 -4
  457. package/dist/module/justifi-dispute-management-core.js +2 -2
  458. package/dist/module/justifi-dispute-management.js +19 -18
  459. package/dist/module/justifi-dispute-notification.js +2 -2
  460. package/dist/module/{dispute-notification.js → justifi-dispute-notification2.js} +7 -7
  461. package/dist/module/justifi-dispute-response-core.js +2 -2
  462. package/dist/module/justifi-dispute-response.js +2 -2
  463. package/dist/module/{dispute-response.js → justifi-dispute-response2.js} +17 -16
  464. package/dist/module/justifi-duplicate-charge.js +2 -2
  465. package/dist/module/{duplicate-charge.js → justifi-duplicate-charge2.js} +5 -5
  466. package/dist/module/justifi-electronic-evidence.js +2 -2
  467. package/dist/module/{electronic-evidence.js → justifi-electronic-evidence2.js} +4 -4
  468. package/dist/module/justifi-google-pay.js +2 -2
  469. package/dist/module/{google-pay.js → justifi-google-pay2.js} +4 -4
  470. package/dist/module/justifi-gross-payment-chart.js +7 -6
  471. package/dist/module/justifi-header.js +2 -2
  472. package/dist/module/justifi-header2.js +4 -4
  473. package/dist/module/justifi-modular-checkout.js +2 -2
  474. package/dist/module/{modular-checkout.js → justifi-modular-checkout2.js} +23 -9
  475. package/dist/module/justifi-order-terminals.js +10 -9
  476. package/dist/module/justifi-payment-details.js +7 -6
  477. package/dist/module/justifi-payment-provisioning-core.js +2 -2
  478. package/dist/module/justifi-payment-provisioning.js +70 -69
  479. package/dist/module/justifi-payment-transactions-list.js +10 -9
  480. package/dist/module/justifi-payments-list-filters.js +6 -6
  481. package/dist/module/justifi-payments-list.js +9 -8
  482. package/dist/module/justifi-payout-details.js +8 -7
  483. package/dist/module/justifi-payout-transactions-list.js +10 -9
  484. package/dist/module/justifi-payouts-list-filters.js +6 -6
  485. package/dist/module/justifi-payouts-list.js +9 -8
  486. package/dist/module/justifi-plaid-payment-method.js +2 -2
  487. package/dist/module/{plaid-payment-method.js → justifi-plaid-payment-method2.js} +7 -7
  488. package/dist/module/justifi-product-or-service.js +2 -2
  489. package/dist/module/{product-or-service.js → justifi-product-or-service2.js} +4 -4
  490. package/dist/module/justifi-radio-list-item2.js +11 -9
  491. package/dist/module/justifi-refund-payment.js +9 -8
  492. package/dist/module/justifi-refund-policy.js +2 -2
  493. package/dist/module/{refund-policy.js → justifi-refund-policy2.js} +5 -5
  494. package/dist/module/justifi-save-new-payment-method.js +50 -2
  495. package/dist/module/justifi-saved-payment-method.js +6 -6
  496. package/dist/module/justifi-saved-payment-methods.js +2 -2
  497. package/dist/module/{saved-payment-methods.js → justifi-saved-payment-methods2.js} +6 -6
  498. package/dist/module/justifi-season-interruption-insurance.js +10 -9
  499. package/dist/module/justifi-sezzle-payment-method.js +2 -2
  500. package/dist/module/{sezzle-payment-method.js → justifi-sezzle-payment-method2.js} +4 -4
  501. package/dist/module/justifi-shipping-details.js +2 -2
  502. package/dist/module/{shipping-details.js → justifi-shipping-details2.js} +5 -5
  503. package/dist/module/justifi-skeleton.js +1 -1
  504. package/dist/module/justifi-terminal-orders-list-filters.js +7 -7
  505. package/dist/module/justifi-terminal-orders-list.js +9 -8
  506. package/dist/module/justifi-terminals-list-filters.js +5 -5
  507. package/dist/module/justifi-terminals-list.js +9 -8
  508. package/dist/module/justifi-tokenize-payment-method.js +2 -167
  509. package/dist/module/{internal-tokenize-payment-method2.js → justifi-tokenize-payment-method2.js} +73 -56
  510. package/dist/module/legal-address-form-step.d.ts +11 -0
  511. package/dist/module/legal-address-form-step.js +4 -189
  512. package/dist/module/legal-address-form-step2.js +191 -0
  513. package/dist/module/legal-address-form.d.ts +11 -0
  514. package/dist/module/legal-address-form.js +4 -74
  515. package/dist/module/legal-address-form2.js +76 -0
  516. package/dist/module/owner-details2.js +1 -1
  517. package/dist/module/owner-form-core.js +2 -2
  518. package/dist/module/owner-form-core2.js +23 -23
  519. package/dist/module/owner-form-inputs.js +2 -2
  520. package/dist/module/owner-form-inputs2.js +23 -23
  521. package/dist/module/owner-form.d.ts +11 -0
  522. package/dist/module/owner-form.js +4 -142
  523. package/dist/module/owner-form2.js +144 -0
  524. package/dist/module/package.js +1 -1
  525. package/dist/module/pagination-menu2.js +1 -1
  526. package/dist/module/parts.js +1 -1
  527. package/dist/module/payment-details-core2.js +10 -10
  528. package/dist/module/payment-method-option.js +4 -4
  529. package/dist/module/payment-provisioning-actions.js +2 -2
  530. package/dist/module/payment-provisioning-core.js +68 -68
  531. package/dist/module/payment-provisioning-form-buttons.d.ts +11 -0
  532. package/dist/module/payment-provisioning-form-buttons.js +4 -49
  533. package/dist/module/payment-provisioning-form-buttons2.js +51 -0
  534. package/dist/module/payment-provisioning-form-steps.d.ts +11 -0
  535. package/dist/module/payment-provisioning-form-steps.js +4 -224
  536. package/dist/module/payment-provisioning-form-steps2.js +226 -0
  537. package/dist/module/payment-provisioning-loading.js +1 -1
  538. package/dist/module/payments-list-core2.js +3 -3
  539. package/dist/module/payments-list-params-state.js +1 -1
  540. package/dist/module/payout-details-core2.js +5 -5
  541. package/dist/module/payouts-list-core2.js +4 -4
  542. package/dist/module/payouts-list-params-state.js +1 -1
  543. package/dist/module/plaid-verification2.js +3 -3
  544. package/dist/module/radio-list-item.d.ts +11 -0
  545. package/dist/module/radio-list-item.js +6 -0
  546. package/dist/module/radio-list-item2.js +55 -0
  547. package/dist/module/representative-details.js +2 -2
  548. package/dist/module/representative-details2.js +4 -4
  549. package/dist/module/save-new-payment-method.d.ts +11 -0
  550. package/dist/module/save-new-payment-method.js +4 -50
  551. package/dist/module/save-new-payment-method2.js +48 -0
  552. package/dist/module/schema-validations.js +2 -2
  553. package/dist/module/skeleton.js +1 -1
  554. package/dist/module/spinner.js +1 -1
  555. package/dist/module/table-filters-menu2.js +1 -1
  556. package/dist/module/table.js +1 -1
  557. package/dist/module/terminal-orders-list-core2.js +3 -3
  558. package/dist/module/terminal-orders-list-params-state.js +1 -1
  559. package/dist/module/terminal-quantity-selector2.js +2 -2
  560. package/dist/module/terminals-list-core2.js +3 -3
  561. package/dist/module/terminals-list-params-state.js +1 -1
  562. package/dist/module/utils.js +1 -1
  563. package/dist/module/utils2.js +1 -1
  564. package/dist/module/utils3.js +24 -23
  565. package/dist/module/utils4.js +23 -24
  566. package/dist/types/components/business-details/{business-details.d.ts → justifi-business-details.d.ts} +1 -1
  567. package/dist/types/components/business-details/representative-details/representative-details.d.ts +1 -1
  568. package/dist/types/components/business-forms/business-form/{business-form.d.ts → justifi-business-form.d.ts} +1 -1
  569. package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +1 -1
  570. package/dist/types/components/business-forms/owner-form/owner-form-inputs.d.ts +1 -1
  571. package/dist/types/components/business-forms/owner-form/owner-form.d.ts +1 -1
  572. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.d.ts +1 -1
  573. package/dist/types/components/business-forms/payment-provisioning/form-control-monetary-provisioning.d.ts +1 -1
  574. package/dist/types/components/business-forms/payment-provisioning/{payment-provisioning.d.ts → justifi-payment-provisioning.d.ts} +1 -1
  575. package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-core.d.ts +1 -1
  576. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +6 -6
  577. package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +5 -1
  578. package/dist/types/components/{modular-checkout/sub-components → checkout/billing-form}/bank-account-billing-form-simple.d.ts +3 -2
  579. package/dist/types/components/{modular-checkout/sub-components → checkout/billing-form}/billing-form-full.d.ts +4 -2
  580. package/dist/types/components/checkout/billing-form/billing-form-schema.d.ts +1 -1
  581. package/dist/types/components/checkout/billing-form/billing-form.d.ts +0 -1
  582. package/dist/types/components/{modular-checkout/sub-components → checkout/billing-form}/card-billing-form-simple.d.ts +3 -2
  583. package/dist/types/components/checkout/billing-form/justifi-billing-form.d.ts +14 -0
  584. package/dist/types/components/checkout/card-form/card-form.d.ts +5 -1
  585. package/dist/types/components/checkout/{checkout.d.ts → justifi-checkout.d.ts} +2 -21
  586. package/dist/types/components/checkout/{saved-payment-method.d.ts → justifi-saved-payment-method.d.ts} +1 -1
  587. package/dist/types/components/checkout/save-new-payment-method/justifi-save-new-payment-method.d.ts +7 -0
  588. package/dist/types/components/checkout/{save-new-payment-method.d.ts → save-new-payment-method/save-new-payment-method.d.ts} +2 -1
  589. package/dist/types/components/checkouts-list/checkouts-list-filters.d.ts +1 -1
  590. package/dist/types/components/checkouts-list/{checkouts-list.d.ts → justifi-checkouts-list.d.ts} +1 -1
  591. package/dist/types/components/config-provider/{config-provider.d.ts → justifi-config-provider.d.ts} +1 -1
  592. package/dist/types/components/dispute-management/dispute-management-core.d.ts +1 -1
  593. package/dist/types/components/dispute-management/dispute-response/dispute-response-core.d.ts +1 -1
  594. package/dist/types/components/dispute-management/dispute-response/{additional-statement.d.ts → justifi-additional-statement.d.ts} +1 -1
  595. package/dist/types/components/dispute-management/dispute-response/{cancellation-policy.d.ts → justifi-cancellation-policy.d.ts} +1 -1
  596. package/dist/types/components/dispute-management/dispute-response/{customer-details.d.ts → justifi-customer-details.d.ts} +1 -1
  597. package/dist/types/components/dispute-management/dispute-response/{dispute-response.d.ts → justifi-dispute-response.d.ts} +2 -2
  598. package/dist/types/components/dispute-management/dispute-response/{duplicate-charge.d.ts → justifi-duplicate-charge.d.ts} +1 -1
  599. package/dist/types/components/dispute-management/dispute-response/{electronic-evidence.d.ts → justifi-electronic-evidence.d.ts} +1 -1
  600. package/dist/types/components/dispute-management/dispute-response/{product-or-service.d.ts → justifi-product-or-service.d.ts} +1 -1
  601. package/dist/types/components/dispute-management/dispute-response/{refund-policy.d.ts → justifi-refund-policy.d.ts} +1 -1
  602. package/dist/types/components/dispute-management/dispute-response/{shipping-details.d.ts → justifi-shipping-details.d.ts} +1 -1
  603. package/dist/types/components/dispute-management/{dispute-management.d.ts → justifi-dispute-management.d.ts} +1 -1
  604. package/dist/types/components/dispute-management/{dispute-notification.d.ts → justifi-dispute-notification.d.ts} +1 -1
  605. package/dist/types/components/gross-payment-chart/{gross-payment-chart.d.ts → justifi-gross-payment-chart.d.ts} +1 -1
  606. package/dist/types/components/insurance/season-interruption/{season-interruption-insurance.d.ts → justifi-season-interruption-insurance.d.ts} +1 -1
  607. package/dist/types/components/modular-checkout/{modular-checkout.d.ts → justifi-modular-checkout.d.ts} +2 -1
  608. package/dist/types/components/modular-checkout/sub-components/{apple-pay.d.ts → justifi-apple-pay.d.ts} +1 -4
  609. package/dist/types/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.d.ts +15 -0
  610. package/dist/types/components/modular-checkout/sub-components/{bank-account.d.ts → justifi-bank-account-form.d.ts} +2 -7
  611. package/dist/types/components/modular-checkout/sub-components/justifi-billing-form-full.d.ts +11 -0
  612. package/dist/types/components/modular-checkout/sub-components/justifi-card-billing-form-simple.d.ts +11 -0
  613. package/dist/types/components/modular-checkout/sub-components/{card-form.d.ts → justifi-card-form.d.ts} +1 -8
  614. package/dist/types/components/modular-checkout/sub-components/justifi-checkout-summary.d.ts +3 -0
  615. package/dist/types/components/modular-checkout/sub-components/{google-pay.d.ts → justifi-google-pay.d.ts} +1 -1
  616. package/dist/types/components/modular-checkout/sub-components/{plaid-payment-method.d.ts → justifi-plaid-payment-method.d.ts} +1 -1
  617. package/dist/types/components/modular-checkout/sub-components/{saved-payment-methods.d.ts → justifi-saved-payment-methods.d.ts} +1 -1
  618. package/dist/types/components/modular-checkout/sub-components/{sezzle-payment-method.d.ts → justifi-sezzle-payment-method.d.ts} +1 -1
  619. package/dist/types/components/order-terminals/{order-terminals.d.ts → justifi-order-terminals.d.ts} +1 -1
  620. package/dist/types/components/payment-details/{payment-details.d.ts → justifi-payment-details.d.ts} +1 -1
  621. package/dist/types/components/payment-transactions-list/{payment-transactions-list.d.ts → justifi-payment-transactions-list.d.ts} +1 -1
  622. package/dist/types/components/payments-list/{payments-list-filters.d.ts → justifi-payments-list-filters.d.ts} +1 -1
  623. package/dist/types/components/payments-list/{payments-list.d.ts → justifi-payments-list.d.ts} +1 -1
  624. package/dist/types/components/payout-details/{payout-details.d.ts → justifi-payout-details.d.ts} +1 -1
  625. package/dist/types/components/payout-transactions-list/{payout-transactions-list.d.ts → justifi-payout-transactions-list.d.ts} +1 -1
  626. package/dist/types/components/payouts-list/{payouts-list-filters.d.ts → justifi-payouts-list-filters.d.ts} +1 -1
  627. package/dist/types/components/payouts-list/{payouts-list.d.ts → justifi-payouts-list.d.ts} +1 -1
  628. package/dist/types/components/refund-payment/{refund-payment.d.ts → justifi-refund-payment.d.ts} +1 -1
  629. package/dist/types/components/terminal-orders-list/{terminal-orders-list-filters.d.ts → justifi-terminal-orders-list-filters.d.ts} +1 -1
  630. package/dist/types/components/terminal-orders-list/{terminal-orders-list.d.ts → justifi-terminal-orders-list.d.ts} +1 -1
  631. package/dist/types/components/terminals-list/{terminals-list-filters.d.ts → justifi-terminals-list-filters.d.ts} +1 -1
  632. package/dist/types/components/terminals-list/{terminals-list.d.ts → justifi-terminals-list.d.ts} +1 -1
  633. package/dist/types/components/tokenize-payment-method/{internal-tokenize-payment-method.d.ts → justifi-tokenize-payment-method.d.ts} +4 -3
  634. package/dist/types/components.d.ts +826 -657
  635. package/dist/types/ui-components/details/{details.d.ts → justifi-details.d.ts} +1 -1
  636. package/dist/types/ui-components/form/form-control-checkbox.d.ts +1 -1
  637. package/dist/types/ui-components/form/form-control-date.d.ts +1 -1
  638. package/dist/types/ui-components/form/form-control-file-v2.d.ts +1 -1
  639. package/dist/types/ui-components/form/form-control-file.d.ts +1 -1
  640. package/dist/types/ui-components/form/form-control-monetary.d.ts +1 -1
  641. package/dist/types/ui-components/form/form-control-number-masked.d.ts +1 -1
  642. package/dist/types/ui-components/form/form-control-number.d.ts +1 -1
  643. package/dist/types/ui-components/form/form-control-radio.d.ts +1 -1
  644. package/dist/types/ui-components/form/form-control-select.d.ts +1 -1
  645. package/dist/types/ui-components/form/form-control-text.d.ts +1 -1
  646. package/dist/types/ui-components/form/form-control-textarea.d.ts +1 -1
  647. package/dist/types/ui-components/form/form-helpers/form-control-tooltip/form-control-tooltip.d.ts +1 -1
  648. package/dist/types/ui-components/index.d.ts +1 -1
  649. package/dist/types/ui-components/internal-button.d.ts +14 -0
  650. package/dist/types/ui-components/radio-list-item.d.ts +12 -0
  651. package/dist/types/ui-components/shadow-dom-components/justifi-button.d.ts +1 -0
  652. package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +0 -1
  653. package/dist/webcomponents/p-08424d71.entry.js +1 -0
  654. package/dist/webcomponents/p-089bc927.entry.js +1 -0
  655. package/dist/webcomponents/p-0b7fa323.entry.js +1 -0
  656. package/dist/webcomponents/p-16ae88d0.entry.js +1 -0
  657. package/dist/webcomponents/p-179fe9a0.entry.js +1 -0
  658. package/dist/webcomponents/p-1a9aecbf.entry.js +1 -0
  659. package/dist/webcomponents/{p-132c8d4c.entry.js → p-1c95ec74.entry.js} +3 -3
  660. package/dist/webcomponents/{p-541da1ed.entry.js → p-1d1c48c3.entry.js} +1 -1
  661. package/dist/webcomponents/p-1da3ba0f.entry.js +1 -0
  662. package/dist/webcomponents/{p-368d8543.entry.js → p-252a4f75.entry.js} +1 -1
  663. package/dist/webcomponents/{p-ef98982e.entry.js → p-26062991.entry.js} +1 -1
  664. package/dist/webcomponents/p-26074643.entry.js +1 -0
  665. package/dist/webcomponents/{p-251f6c90.entry.js → p-2719f4db.entry.js} +1 -1
  666. package/dist/webcomponents/p-2a0ce169.entry.js +1 -0
  667. package/dist/webcomponents/p-2b8df3c0.entry.js +1 -0
  668. package/dist/webcomponents/p-2bec5dca.entry.js +1 -0
  669. package/dist/webcomponents/p-358f7121.entry.js +1 -0
  670. package/dist/webcomponents/{p-ca307ba0.entry.js → p-38281490.entry.js} +1 -1
  671. package/dist/webcomponents/p-383798ab.entry.js +1 -0
  672. package/dist/webcomponents/p-3d135aee.entry.js +1 -0
  673. package/dist/webcomponents/{p-15919744.entry.js → p-42129686.entry.js} +1 -1
  674. package/dist/webcomponents/p-431ad048.entry.js +1 -0
  675. package/dist/webcomponents/p-485a8795.entry.js +1 -0
  676. package/dist/webcomponents/p-4d222f42.entry.js +1 -0
  677. package/dist/webcomponents/{p-c751bb5f.entry.js → p-534833ca.entry.js} +1 -1
  678. package/dist/webcomponents/p-534881d8.entry.js +1 -0
  679. package/dist/webcomponents/p-53dd8569.entry.js +1 -0
  680. package/dist/webcomponents/{p-e646422f.entry.js → p-56d58041.entry.js} +1 -1
  681. package/dist/webcomponents/p-61784c6a.entry.js +1 -0
  682. package/dist/webcomponents/p-6372a42a.entry.js +1 -0
  683. package/dist/webcomponents/p-7108eead.entry.js +1 -0
  684. package/dist/webcomponents/p-729c9798.entry.js +1 -0
  685. package/dist/webcomponents/{p-7cb910cf.entry.js → p-744f57f0.entry.js} +1 -1
  686. package/dist/webcomponents/p-7742cf61.entry.js +1 -0
  687. package/dist/webcomponents/p-774b69a0.entry.js +1 -0
  688. package/dist/webcomponents/p-77600a47.entry.js +1 -0
  689. package/dist/webcomponents/{p-f23b4474.entry.js → p-7791b55e.entry.js} +1 -1
  690. package/dist/webcomponents/p-783580d4.entry.js +1 -0
  691. package/dist/webcomponents/p-83fd4eae.entry.js +1 -0
  692. package/dist/webcomponents/p-848ae146.entry.js +1 -0
  693. package/dist/webcomponents/p-865d4604.entry.js +1 -0
  694. package/dist/webcomponents/{p-e86c713b.entry.js → p-89bf64ef.entry.js} +1 -1
  695. package/dist/webcomponents/p-8Kt4Rhcq.js +1 -0
  696. package/dist/webcomponents/p-8c52d10a.entry.js +1 -0
  697. package/dist/webcomponents/p-8df335d4.entry.js +1 -0
  698. package/dist/webcomponents/p-90f2c769.entry.js +1 -0
  699. package/dist/webcomponents/{p-7703ada7.entry.js → p-9639d9d0.entry.js} +1 -1
  700. package/dist/webcomponents/p-97d16844.entry.js +1 -0
  701. package/dist/webcomponents/p-9838b5a7.entry.js +1 -0
  702. package/dist/webcomponents/{p--UanYWb-.js → p-B6sIVWJW.js} +1 -1
  703. package/dist/webcomponents/{p-BXT1uJVr.js → p-BJtvT9BX.js} +1 -1
  704. package/dist/webcomponents/{p-DnZY6aQX.js → p-BmEX2SfZ.js} +1 -1
  705. package/dist/webcomponents/{p-C0tps2ph.js → p-BrO0HEFJ.js} +1 -1
  706. package/dist/webcomponents/{p-CMLfjWil.js → p-Bwzxu5wV.js} +1 -1
  707. package/dist/webcomponents/{p-o83Uy7sW.js → p-C-QiUcEa.js} +1 -1
  708. package/dist/webcomponents/{p-ERB63T7J.js → p-C1olhiO9.js} +1 -1
  709. package/dist/webcomponents/p-CAl_N2gi.js +1 -0
  710. package/dist/webcomponents/{p-_BHErKTQ.js → p-CBqZge6m.js} +1 -1
  711. package/dist/webcomponents/p-CIYOQWsL.js +1 -0
  712. package/dist/webcomponents/{p-55QcjheA.js → p-CMB3sNMT.js} +1 -1
  713. package/dist/webcomponents/{p-XxcNbSyO.js → p-CWv3GX8X.js} +1 -1
  714. package/dist/webcomponents/p-CbM9cuX_.js +1 -0
  715. package/dist/webcomponents/{p-COZ-9O53.js → p-CjuaXEuI.js} +1 -1
  716. package/dist/webcomponents/{p-zGGZEiGQ.js → p-CmXujxGp.js} +1 -1
  717. package/dist/webcomponents/{p-Csh7hxly.js → p-CwdQ1VdH.js} +1 -1
  718. package/dist/webcomponents/{p-BrcAwFqw.js → p-CzdAS9Jo.js} +1 -1
  719. package/dist/webcomponents/p-D0BjjvYt.js +1 -0
  720. package/dist/webcomponents/{p-C5CtnV8A.js → p-D2TJwp13.js} +1 -1
  721. package/dist/webcomponents/{p-D3V9AE6o.js → p-D50Rx76J.js} +1 -1
  722. package/dist/webcomponents/p-D5MdA21U.js +1 -0
  723. package/dist/webcomponents/p-D68EHdgA.js +1 -0
  724. package/dist/webcomponents/p-DB_pqjwH.js +1 -0
  725. package/dist/webcomponents/{p-vIYW-hye.js → p-DL0R5vDy.js} +1 -1
  726. package/dist/webcomponents/{p-DdR4lBzU.js → p-DLmWCafe.js} +1 -1
  727. package/dist/webcomponents/{p-BPpqjhPu.js → p-Da4efjxw.js} +1 -1
  728. package/dist/webcomponents/p-Df9FVwA7.js +1 -0
  729. package/dist/webcomponents/p-Dvcgmvfg.js +1 -0
  730. package/dist/webcomponents/{p-Daew0gTO.js → p-EBsfAkrP.js} +1 -1
  731. package/dist/webcomponents/{p-xvmoHDSy.js → p-J7WCmj-J.js} +1 -1
  732. package/dist/webcomponents/{p-D-cvuqv1.js → p-MLfmcsbZ.js} +1 -1
  733. package/dist/webcomponents/{p-MeSAYDNh.js → p-MkDHT9M4.js} +1 -1
  734. package/dist/webcomponents/p-N60pPiy5.js +1 -0
  735. package/dist/webcomponents/{p-2xM1wp0u.js → p-_fynNk40.js} +1 -1
  736. package/dist/webcomponents/p-a53fae42.entry.js +1 -0
  737. package/dist/webcomponents/p-a5640aa4.entry.js +1 -0
  738. package/dist/webcomponents/{p-1ddbbba8.entry.js → p-b21e5a85.entry.js} +1 -1
  739. package/dist/webcomponents/p-b2d7a9dd.entry.js +1 -0
  740. package/dist/webcomponents/p-b31c9979.entry.js +1 -0
  741. package/dist/webcomponents/p-b322d2f3.entry.js +1 -0
  742. package/dist/webcomponents/p-b596cbb3.entry.js +1 -0
  743. package/dist/webcomponents/p-b7ffdb30.entry.js +1 -0
  744. package/dist/webcomponents/p-bac16c16.entry.js +1 -0
  745. package/dist/webcomponents/p-bb4cc829.entry.js +1 -0
  746. package/dist/webcomponents/p-bbdae5b7.entry.js +1 -0
  747. package/dist/webcomponents/p-c07069f1.entry.js +1 -0
  748. package/dist/webcomponents/p-c4da12e0.entry.js +1 -0
  749. package/dist/webcomponents/p-c5be6300.entry.js +1 -0
  750. package/dist/webcomponents/p-c63b8c8f.entry.js +1 -0
  751. package/dist/webcomponents/p-d6350138.entry.js +1 -0
  752. package/dist/webcomponents/{p-f4074e9a.entry.js → p-d667138d.entry.js} +1 -1
  753. package/dist/webcomponents/p-d6c2d51d.entry.js +1 -0
  754. package/dist/webcomponents/p-def798df.entry.js +1 -0
  755. package/dist/webcomponents/p-e2650fe5.entry.js +1 -0
  756. package/dist/webcomponents/p-e4ba0754.entry.js +1 -0
  757. package/dist/webcomponents/p-e939affa.entry.js +1 -0
  758. package/dist/webcomponents/p-e9c20b52.entry.js +1 -0
  759. package/dist/webcomponents/p-ea84c544.entry.js +1 -0
  760. package/dist/webcomponents/{p-DzeWzcho.js → p-rz2BF2Sz.js} +1 -1
  761. package/dist/webcomponents/webcomponents.esm.js +1 -1
  762. package/package.json +1 -1
  763. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +0 -470
  764. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +0 -147
  765. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +0 -24
  766. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +0 -101
  767. package/dist/collection/components/modular-checkout/sub-components/card-form.js +0 -105
  768. package/dist/collection/components/modular-checkout/sub-components/summary.js +0 -12
  769. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +0 -296
  770. package/dist/esm/internal-tokenize-payment-method_7.entry.js +0 -462
  771. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +0 -143
  772. package/dist/esm/justifi-tokenize-payment-method.entry.js +0 -22
  773. package/dist/module/internal-tokenize-payment-method.d.ts +0 -11
  774. package/dist/module/internal-tokenize-payment-method.js +0 -6
  775. package/dist/module/justifi-additional-questions-form-step.d.ts +0 -11
  776. package/dist/module/justifi-additional-questions-form-step.js +0 -6
  777. package/dist/module/justifi-additional-questions.d.ts +0 -11
  778. package/dist/module/justifi-additional-questions.js +0 -6
  779. package/dist/module/justifi-business-bank-account-form-step.d.ts +0 -11
  780. package/dist/module/justifi-business-bank-account-form-step.js +0 -6
  781. package/dist/module/justifi-business-core-info-form-step.d.ts +0 -11
  782. package/dist/module/justifi-business-core-info-form-step.js +0 -6
  783. package/dist/module/justifi-business-core-info.d.ts +0 -11
  784. package/dist/module/justifi-business-core-info.js +0 -6
  785. package/dist/module/justifi-business-owners-form-step.d.ts +0 -11
  786. package/dist/module/justifi-business-owners-form-step.js +0 -6
  787. package/dist/module/justifi-business-representative-form-inputs.d.ts +0 -11
  788. package/dist/module/justifi-business-representative-form-inputs.js +0 -6
  789. package/dist/module/justifi-business-representative-form-step.d.ts +0 -11
  790. package/dist/module/justifi-business-representative-form-step.js +0 -6
  791. package/dist/module/justifi-business-representative.d.ts +0 -11
  792. package/dist/module/justifi-business-representative.js +0 -6
  793. package/dist/module/justifi-business-terms-conditions-form-step.d.ts +0 -11
  794. package/dist/module/justifi-business-terms-conditions-form-step.js +0 -6
  795. package/dist/module/justifi-form-address-fields.d.ts +0 -11
  796. package/dist/module/justifi-form-address-fields.js +0 -6
  797. package/dist/module/justifi-identity-address-form.d.ts +0 -11
  798. package/dist/module/justifi-identity-address-form.js +0 -6
  799. package/dist/module/justifi-legal-address-form-step.d.ts +0 -11
  800. package/dist/module/justifi-legal-address-form-step.js +0 -6
  801. package/dist/module/justifi-legal-address-form.d.ts +0 -11
  802. package/dist/module/justifi-legal-address-form.js +0 -6
  803. package/dist/module/justifi-owner-form.js +0 -6
  804. package/dist/module/justifi-payment-provisioning-form-buttons.d.ts +0 -11
  805. package/dist/module/justifi-payment-provisioning-form-buttons.js +0 -6
  806. package/dist/module/justifi-payment-provisioning-form-steps.d.ts +0 -11
  807. package/dist/module/justifi-payment-provisioning-form-steps.js +0 -6
  808. package/dist/types/components/modular-checkout/sub-components/summary.d.ts +0 -3
  809. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +0 -19
  810. package/dist/webcomponents/p-03b913e8.entry.js +0 -1
  811. package/dist/webcomponents/p-12b662e3.entry.js +0 -1
  812. package/dist/webcomponents/p-19e82b02.entry.js +0 -1
  813. package/dist/webcomponents/p-19f22078.entry.js +0 -1
  814. package/dist/webcomponents/p-1fc96f35.entry.js +0 -1
  815. package/dist/webcomponents/p-2758d129.entry.js +0 -1
  816. package/dist/webcomponents/p-2V38oZhe.js +0 -1
  817. package/dist/webcomponents/p-320aac60.entry.js +0 -1
  818. package/dist/webcomponents/p-337fb232.entry.js +0 -1
  819. package/dist/webcomponents/p-3490ede8.entry.js +0 -1
  820. package/dist/webcomponents/p-3bf56699.entry.js +0 -1
  821. package/dist/webcomponents/p-3cd30c7a.entry.js +0 -1
  822. package/dist/webcomponents/p-3f9c7b04.entry.js +0 -1
  823. package/dist/webcomponents/p-426fd524.entry.js +0 -1
  824. package/dist/webcomponents/p-4ae0227a.entry.js +0 -1
  825. package/dist/webcomponents/p-50a34a13.entry.js +0 -1
  826. package/dist/webcomponents/p-5148f836.entry.js +0 -1
  827. package/dist/webcomponents/p-55605664.entry.js +0 -1
  828. package/dist/webcomponents/p-55b478bc.entry.js +0 -1
  829. package/dist/webcomponents/p-57e09f09.entry.js +0 -1
  830. package/dist/webcomponents/p-5b4dfe0e.entry.js +0 -1
  831. package/dist/webcomponents/p-5c70a772.entry.js +0 -1
  832. package/dist/webcomponents/p-60df1c18.entry.js +0 -1
  833. package/dist/webcomponents/p-6Nv8l5n8.js +0 -1
  834. package/dist/webcomponents/p-6cdea3ef.entry.js +0 -1
  835. package/dist/webcomponents/p-77d0f2e2.entry.js +0 -1
  836. package/dist/webcomponents/p-8ed651b1.entry.js +0 -1
  837. package/dist/webcomponents/p-97e27e4a.entry.js +0 -1
  838. package/dist/webcomponents/p-9ed5d349.entry.js +0 -1
  839. package/dist/webcomponents/p-BU9iZ8OM.js +0 -1
  840. package/dist/webcomponents/p-BYLHkONM.js +0 -1
  841. package/dist/webcomponents/p-C_WlV7F_.js +0 -1
  842. package/dist/webcomponents/p-DSmuL_bZ.js +0 -1
  843. package/dist/webcomponents/p-FcERM7LF.js +0 -1
  844. package/dist/webcomponents/p-a109b3a1.entry.js +0 -1
  845. package/dist/webcomponents/p-a5db7147.entry.js +0 -1
  846. package/dist/webcomponents/p-b08bca2b.entry.js +0 -1
  847. package/dist/webcomponents/p-b2c237c6.entry.js +0 -1
  848. package/dist/webcomponents/p-b2d5f105.entry.js +0 -1
  849. package/dist/webcomponents/p-b8fc6dff.entry.js +0 -1
  850. package/dist/webcomponents/p-c595d3fb.entry.js +0 -1
  851. package/dist/webcomponents/p-c9f94919.entry.js +0 -1
  852. package/dist/webcomponents/p-ca7e369f.entry.js +0 -1
  853. package/dist/webcomponents/p-cab4c787.entry.js +0 -1
  854. package/dist/webcomponents/p-cd220f6c.entry.js +0 -1
  855. package/dist/webcomponents/p-cd2c2256.entry.js +0 -1
  856. package/dist/webcomponents/p-cd7a4048.entry.js +0 -1
  857. package/dist/webcomponents/p-d5d8ccd9.entry.js +0 -1
  858. package/dist/webcomponents/p-e72d05b1.entry.js +0 -1
  859. package/dist/webcomponents/p-e9d7f988.entry.js +0 -1
  860. package/dist/webcomponents/p-f1562dab.entry.js +0 -1
  861. package/dist/webcomponents/p-f44008d9.entry.js +0 -1
  862. package/dist/webcomponents/p-f657995a.entry.js +0 -1
  863. package/dist/webcomponents/p-fa3b5072.entry.js +0 -1
  864. package/dist/webcomponents/p-fb58eb13.entry.js +0 -1
  865. package/dist/webcomponents/p-fff25a5f.entry.js +0 -1
  866. package/dist/webcomponents/p-qNXIkzDE.js +0 -1
  867. package/dist/webcomponents/p-rgpO5xc3.js +0 -1
  868. package/dist/webcomponents/p-t6eP44Li.js +0 -1
  869. /package/dist/types/components/business-forms/payment-provisioning/additional-questions/{business-additional-questions-form-step.d.ts → additional-questions-form-step.d.ts} +0 -0
  870. /package/dist/types/components/business-forms/payment-provisioning/bank-account/{bank-account-document-inputs.d.ts → bank-account-document-form-inputs.d.ts} +0 -0
  871. /package/dist/webcomponents/{p-99065f37.entry.js → p-9399f4f1.entry.js} +0 -0
@@ -1 +1 @@
1
- import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{C as e,a as o}from"./p-Cjcsf8ku.js";import{C as r,B as n,c as h}from"./p-BcNb9bVO.js";import{t as a}from"./p-D3V9AE6o.js";import{S as p}from"./p-BqNNwq6C.js";import{H as l}from"./p-t6eP44Li.js";import"./p-CZfYo5-1.js";import{B as c}from"./p-XYgDHrVL.js";import{P as u}from"./p-C_WlV7F_.js";import"./p-C0tps2ph.js";const m=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(l,{text:"Business Already Provisioned"})),s("div",{class:"col-12",part:a},s("p",null,"We have already received the onboarding information for this business."))),d=()=>s("div",{class:"row gap-3 p5"},s("div",{class:"col-12"},s(l,{text:"You're all set for now"})),s("div",{class:"col-12",part:a},s("p",null,"We're reviewing your information and working on your approval. We'll be in touch to let you know once you've been approved (or if we find anything that needs fixing). Have a good one!"))),f=class{constructor(s){t(this,s),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.formSubmitted=!1,this.currentStep=0,this.country=r.USA,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new n(t.data);this.businessProvisioned=h(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:o.PROVISIONING_REQUESTED,severity:e.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.formSubmitted=!0,this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:c.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}async componentWillLoad(){this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return s(p,null,this.businessLoading?s(u,null):this.businessProvisioned?s(m,null):this.formSubmitted?s(d,null):s("div",{class:"row gap-3"},s(l,{text:this.formTitle}),s("justifi-payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),s("div",{class:"d-flex justify-content-between align-items-center"},s("div",{class:"d-flex align-items-center",part:a},this.stepCounter),s("justifi-payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{f as justifi_payment_provisioning_core}
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{C as o,B as n,c as h}from"./p-BcNb9bVO.js";import{t as a}from"./p-D50Rx76J.js";import{S as p}from"./p-BqNNwq6C.js";import{H as l}from"./p-DB_pqjwH.js";import"./p-CZfYo5-1.js";import{B as c}from"./p-XYgDHrVL.js";import{P as m}from"./p-CbM9cuX_.js";import"./p-BrO0HEFJ.js";const u=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(l,{text:"Business Already Provisioned"})),s("div",{class:"col-12",part:a},s("p",null,"We have already received the onboarding information for this business."))),d=()=>s("div",{class:"row gap-3 p5"},s("div",{class:"col-12"},s(l,{text:"You're all set for now"})),s("div",{class:"col-12",part:a},s("p",null,"We're reviewing your information and working on your approval. We'll be in touch to let you know once you've been approved (or if we find anything that needs fixing). Have a good one!"))),f=class{constructor(s){t(this,s),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.formSubmitted=!1,this.currentStep=0,this.country=o.USA,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new n(t.data);this.businessProvisioned=h(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:r.PROVISIONING_REQUESTED,severity:e.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.formSubmitted=!0,this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:c.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}async componentWillLoad(){this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return s(p,null,this.businessLoading?s(m,null):this.businessProvisioned?s(u,null):this.formSubmitted?s(d,null):s("div",{class:"row gap-3"},s(l,{text:this.formTitle}),s("payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),s("div",{class:"d-flex justify-content-between align-items-center"},s("div",{class:"d-flex align-items-center",part:a},this.stepCounter),s("payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{f as justifi_payment_provisioning_core}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-CKiAlBsU.js";import{f as o}from"./p-MkDHT9M4.js";import"./p-DVJaoI_m.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as h,l}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{B as c}from"./p-C-QiUcEa.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-DLmWCafe.js";import{m as p}from"./p-C1olhiO9.js";import{J as f}from"./p-CmXujxGp.js";import{c as v}from"./p-D0BjjvYt.js";import{g as y,a as j}from"./p-D2muobcE.js";import{A as b}from"./p-CMB3sNMT.js";import{S as w}from"./p-BrO0HEFJ.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-D50Rx76J.js";import"./p-CIYOQWsL.js";const C=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},T=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([h.customerRequest,h.duplicate,h.fraudulent],"Select a reason")})},g=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],I=b();class k{async postRefund(t,e,s,r){return I.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const x=b();class B{async postVoid(t,e,s){return x.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const A=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),S=()=>t(m,null,t("div",{class:"row gap-5"},t(A,null),t(A,null),t(A,null))),D=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(T())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(T(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var u;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(u=o.error)||void 0===u?void 0:u.code),severity:a.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:a.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(t,s,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:u})=>{var h;try{const u=await r.postRefund(s,e,t,i);if(u.error)return o({error:j(u.error),code:y(null===(h=u.error)||void 0===h?void 0:h.code),severity:a.ERROR});n(u)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new k});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(t,e,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(S,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(m,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:g,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{D as justifi_refund_payment}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{D as e}from"./p-Bg2SZArf.js";import{D as r,a as o}from"./p-BH0Xfn-F.js";const h=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.isLoading=!0,this.showDisputeResponseForm=!1}disputeResponseHandler(t){t.detail.name===e.respondToDispute&&(this.showDisputeResponseForm=!0),t.detail.name===e.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){this.getDispute&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.isLoading=!0,this.getDispute({onSuccess:({dispute:t})=>{this.dispute=new r(t),this.isLoading=!1,this.dispute.status!==o.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({errorCode:s,message:t,severity:i}),this.isLoading=!1}})}render(){return i("div",{key:"a4b8f312c4da129036d1725a6792b7e07f1dddc3"},this.showDisputeResponseForm?i("justifi-dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):i("justifi-dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading}))}static get watchers(){return{getDispute:["updateOnPropChange"]}}};export{h as justifi_dispute_management_core}
1
+ import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{D as e}from"./p-Bg2SZArf.js";import{D as r,a as o}from"./p-BH0Xfn-F.js";const h=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.isLoading=!0,this.showDisputeResponseForm=!1}disputeResponseHandler(t){t.detail.name===e.respondToDispute&&(this.showDisputeResponseForm=!0),t.detail.name===e.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){this.getDispute&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.isLoading=!0,this.getDispute({onSuccess:({dispute:t})=>{this.dispute=new r(t),this.isLoading=!1,this.dispute.status!==o.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({errorCode:s,message:t,severity:i}),this.isLoading=!1}})}render(){return i("div",{key:"cd1da1a29b989475098809875dc6b31538696106"},this.showDisputeResponseForm?i("justifi-dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):i("justifi-dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading}))}static get watchers(){return{getDispute:["updateOnPropChange"]}}};export{h as justifi_dispute_management_core}
@@ -1 +1 @@
1
- import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{C as r,a as n}from"./p-Cjcsf8ku.js";import{m as o,b as a,f as h,g as c}from"./p-R0FDNhyd.js";import{B as l,a as d,D as u}from"./p--UanYWb-.js";import{a as m,c as p,b}from"./p-BovgIz83.js";import{F as f,c as v,a as y,b as g,d as w}from"./p-CKiAlBsU.js";import{A as _,C as k,e as j,R as C,f as T}from"./p-BcNb9bVO.js";import{C as x,P as O}from"./p-CVaOFfrI.js";import{b as S,a2 as E,E as I,z as A,w as L,am as B}from"./p-D3V9AE6o.js";import{P as D}from"./p-C_WlV7F_.js";import{b as P,c as H}from"./p-Bt4GjEWL.js";import{a as V,B as F}from"./p-XYgDHrVL.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{E as W,p as q,q as M}from"./p-_BHErKTQ.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{A as U,B as Y,v as z,C as N,D as R,E as G,F as X}from"./p-HT_4DkD0.js";import{B as Q}from"./p-o83Uy7sW.js";import"./p-CZfYo5-1.js";import{c as J}from"./p-_-2E_vYf.js";import{d as K,e as $}from"./p-D8EGHc_m.js";import{A as Z}from"./p-55QcjheA.js";import"./p-D2muobcE.js";import"./p-BFTU3MAI.js";import"./p-C0tps2ph.js";import"./p-D8GTwl9v.js";import"./p-MeSAYDNh.js";class ss{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.account_number=s.account_number,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.institution_number=s.institution_number,this.transit_number=s.transit_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const ts=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.additional_questions=new _(s.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t})),this.additional_questions=new _(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(s){this.recurringPayments="Yes"===(null==s?void 0:s.business_recurring_payments)}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{additional_questions:new _(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f(m(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t,i,r,n;const o=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Additional Questions"),e("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=this.errors)||void 0===s?void 0:s.business_revenue,defaultValue:null==o?void 0:o.business_revenue,maskOptions:x.WHOLE})),e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_payment_volume,defaultValue:null==o?void 0:o.business_payment_volume,maskOptions:x.WHOLE})),e("div",{class:"col-12"},e("form-control-text",{name:"business_average_transaction_amount",label:"What is your average transaction size?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_average_transaction_amount,defaultValue:null==o?void 0:o.business_average_transaction_amount})),e("div",{class:"col-12"},e("form-control-select",{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:null===(r=this.errors)||void 0===r?void 0:r.business_when_service_received,options:P,defaultValue:null==o?void 0:o.business_when_service_received})),e("div",{class:"col-12"},e("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_other_payment_details,defaultValue:null==o?void 0:o.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},es=(s,t)=>s.some((s=>s.document_type===t)),is=s=>s?{bank_name:R.nullable(),nickname:N.nullable(),account_owner_name:z.nullable(),account_type:Y.nullable(),account_number:U.nullable()}:{bank_name:R.required("Enter bank name"),nickname:N.required("Enter nickname"),account_owner_name:z.required("Enter account owner name"),account_type:Y.required("Select account type"),account_number:U.required("Enter account number")},rs=(s,t)=>{if(t)return{voided_check:g().nullable(),bank_statement:g().nullable()};const e=es(s,W.voidedCheck),i=es(s,W.bankStatement),r=e||i,n="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:g().when("bank_statement",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()}),bank_statement:g().when("voided_check",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()})}},ns={[k.USA]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>s?{routing_number:X.nullable()}:{routing_number:X.required("Enter routing number")})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s),[k.CAN]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>{const t=y().length(3,"Institution number must be 3 digits").matches(G,"Enter valid institution number"),e=y().length(5,"Transit number must be 5 digits").matches(G,"Enter valid transit number");return s?{institution_number:t.nullable(),transit_number:e.nullable()}:{institution_number:t.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s)},os=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new q,this.isLoading=!1,this.viewMode="manual",this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,ns[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new f(this.getSchema()),this.formController.setInitialValues("readonly"===this.viewMode?Object.assign({},this.bankAccount):{business_id:this.businessId}),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new M({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.processBusinessResponse(s.data),this.determineViewMode()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.viewMode=this.plaidAvailable?"plaid":"manual",this.documentData=new q,this.initializeFormController()},this.handleCancel=()=>{this.viewMode=this.existingBankAccount?"readonly":"plaid",this.documentData=new q,this.initializeFormController()},this.handleToggleToManualEntry=()=>{this.viewMode="manual"},this.handleToggleToPlaidVerification=()=>{this.viewMode="plaid"},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async s=>{this.isLoading=!0;const t=s.record_data;return new Promise((e=>{this.postDocumentRecord({payload:t,onSuccess:t=>{e(this.handleDocRecordResponse(s,t))},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:r.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await s.getFileData(),e=await fetch(s.presigned_url,{method:"PUT",body:t});return this.handleUploadResponse(e)},this.handleUploadResponse=s=>!s.error||(this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}),!1)}propChanged(){this.initializeApi()}watchHandler(s){this.formLoading.emit(s)}async validateAndSubmit({onSuccess:s}){"readonly"===this.viewMode?this.sendData(s):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new f(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.postBankAccount=h({authToken:this.authToken,service:new d}),this.postDocumentRecord=c({authToken:this.authToken,service:new u})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}get postPayload(){const s=this.formController.values.getValue();return new ss(s).payload}get existingBankAccount(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}get plaidAvailable(){return this.bankAccountVerification&&!!this.platformAccountId}get showCancel(){return this.bankAccountVerification||this.existingBankAccount}processBusinessResponse(s){const{bank_accounts:t,documents:e,settings:i,platform_account_id:r}=s;t.length>0?this.bankAccount=new ss(t[t.length-1]):(this.bankAccount=new ss({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=e,this.bankAccountVerification=!0===i.bank_account_verification,this.platformAccountId=r}determineViewMode(){this.viewMode=this.existingBankAccount?"readonly":this.plaidAvailable?"plaid":"manual"}async sendData(s){try{if("manual"===this.viewMode&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;"manual"===this.viewMode&&(this.viewMode="readonly",await this.refreshBankAccountData()),s()}catch(s){this.errorEvent.emit({message:s,errorCode:n.POST_ERROR,severity:r.ERROR})}}async postBankAccountData(){let s;return this.isLoading=!0,new Promise((t=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:t=>{s=t,e=!0},onError:({error:s,code:t,severity:i})=>{e=!1,this.errorEvent.emit({message:s,errorCode:t,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:V.bankAccount}),this.isLoading=!1,t(e)}})}))}async refreshBankAccountData(){return new Promise((s=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.processBusinessResponse(s.data),this.determineViewMode(),this.initializeFormController()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.isLoading=!1,s()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const s=Object.values(this.documentData).flat();return!s.length||!(await Promise.all(s.map((s=>this.postDocumentRecordData(s))))).includes(!1)&&!(await Promise.all(s.map((s=>this.uploadDocument(s))))).includes(!1)}finally{this.isLoading=!1}}renderBankAccountInputs(s){const t=this.formController.getInitialValues();return e(this.country===k.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:t,errors:this.errors,inputHandler:this.inputHandler,formDisabled:s})}renderReadonlyView(){return e("div",null,this.renderBankAccountInputs(!0),e("div",{class:"mt-3"},e(Q,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:E},"Change Bank Account")))}renderPlaidView(){return e("div",{class:"mt-3"},e("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.viewMode="readonly",this.refreshBankAccountData()}}),e("div",{class:"mt-3"},e(Q,{type:"button",variant:"link",className:"p-0",onClick:this.handleToggleToManualEntry,disabled:this.isLoading,part:I},"Enter bank details manually (document upload required)")))}renderManualEntryView(){return e("div",null,this.plaidAvailable&&e("div",{class:"mb-3"},e(Q,{type:"button",variant:"secondary",onClick:this.handleToggleToPlaidVerification,disabled:this.isLoading,part:E},"Link bank account with Plaid instead")),this.renderBankAccountInputs(!1),e("div",{class:"mt-3 d-flex gap-2"},this.showCancel&&e(Q,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:E},"Cancel"),e(Q,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account")))}renderDocumentUploads(){return e("fieldset",{class:"mt-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Document Uploads"),e("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),e("hr",{class:"mt-2"}),e("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),e("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles}))}render(){return this.isLoading?e(D,null):e("form",null,e("fieldset",{class:"mb-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Bank Account Info"),e("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),e("hr",{class:"mt-2"}),"readonly"===this.viewMode&&this.renderReadonlyView(),"plaid"===this.viewMode&&this.renderPlaidView(),"manual"===this.viewMode&&this.renderManualEntryView()),"plaid"!==this.viewMode&&this.renderDocumentUploads())}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},as=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.coreInfo=new j(s.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s(),this.isEditingTaxId=!1},onError:({error:s,code:e,severity:i,rawError:r})=>{t=s,r&&"object"==typeof r&&r.param&&this.formController.setFieldError(r.param,r.message),this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.errors[s]&&this.formController.clearFieldError(s),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return new j(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const s=this.country===k.CAN?p(this.allowOptionalFields):b(this.allowOptionalFields);this.formController=new f(s),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t;const i=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Business Information")),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),e("div",{class:"col-12 col-md-8"},e("form-control-select",{name:"classification",label:"Business Classification",options:H,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-4"},e("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),e("div",{class:"col-12 col-md-6"},!(null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4)||this.isEditingTaxId?e("form-control-number-masked",{name:"tax_id",label:J[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:J[this.country].taxIdHelpText}):e("div",null,e("label",{class:"form-label",part:A},J[this.country].taxIdLabel),e("div",{class:"input-group mb-3"},e("input",{type:"text",class:"form-control",part:L,value:`****${null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4}`,disabled:!0}),e("button",{class:"btn btn-secondary",type:"button",part:E,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),e("div",{class:"col-12"},e("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:O.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},hs=class{constructor(e){s(this,e),this.clickEvent=t(this,"click-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(s,t)=>{if(null===s)return;const e=this.ownersPayload.findIndex((s=>s.id===t));-1!==e&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[e]=s)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new C(s.data.representative||{}),s.data.owners.length?this.ownersPayload=s.data.owners.map((s=>({id:s.id}))):this.addOwnerForm()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=s=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],s&&this.clickEvent.emit({name:F.addOwnerForm})},this.removeOwnerForm=s=>{this.ownersPayload=this.ownersPayload.filter((t=>t.id!==s)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=s=>{this.representativeIsOwner=s,this.representativeIsOwner&&(this.formLoading.emit(!0),this.isLoading=!0,this.ownersPayload=this.ownersPayload.filter((s=>""!==s.id)),this.patchBusiness({payload:{owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1},finally:()=>{this.isLoading=!1,this.formLoading.emit(!1)}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((s=>s.id))}async validateAndSubmit({onSuccess:s}){const t=this.refs.map((s=>s.validate()));if(!(await Promise.all(t)).every((s=>s)))return;const e=this.refs.map((s=>s.submit()));(await Promise.all(e)).every((s=>s))&&this.sendData(s)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(s){const t=s.detail,e=this.ownersPayload.map((s=>s.id===t.id?t:s));e.includes(t)||(e[this.ownersPayload.findIndex((s=>!s.id))]=t,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){if(this.isLoading)return e(i,null,e(D,null));const s=this.ownersPayload.some((s=>s.id===this.representative.id)),t=null===this.representativeIsOwner&&!s;return e(i,null,e("div",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Owners"),e("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),e("hr",{class:"mt-2"}),t&&e("div",{class:"alert alert-warning mb-3",part:B},e("div",{class:"card-body"},e("div",{class:"d-flex align-items-center mb-3"},e("strong",null,"Is the representative of this business also an owner?")),e("div",{class:"d-flex gap-2"},e(Q,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),e(Q,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),e("div",{class:"row gy-3"},this.ownersPayload.map((s=>e("justifi-owner-form",{key:s.id,authToken:this.authToken,businessId:this.businessId,ownerId:s.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),e("div",{class:"d-flex justify-content-start"},e("div",{class:"gap-2"},e(Q,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},cs=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new C(s.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}initializeForm(){const s=K[this.country];s?(this.formController=new f(s("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:n.MISSING_PROPS,severity:r.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get patchPayload(){return{representative:new C(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?e(D,null):e("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},ls=class{constructor(e){s(this,e),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.formCompleted=t(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:n.FETCH_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.termsPayload,e=await this.api.post({endpoint:this.termsConditionsEndpoint,body:t,authToken:this.authToken});this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.acceptedTerms=t,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=Z(),this.formController=new f((s=>{const t=v({accepted:w().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=v({accepted:w().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}):t(),this.stepCompleteEvent.emit({response:s,formStep:V.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:V.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get merchantAgreementLink(){return e("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return e("form",{key:"33336d0a66d63ce39951822fd570a9a0689e714d"},e("fieldset",{key:"fcfdb59eef671cb408ed99e2dad20d6be706688a"},e("legend",{key:"f0cf7f0ac15c90cf36ee25d4bf986c0e781a2e92",part:S},"Terms and Conditions"),e("hr",{key:"d5c820e7d6523f931040a994bd103d69fd644c45"}),e("div",{key:"681b584de14afe121f5dc69ee0bad1cab51ba0d1"},e("p",{key:"7c597bf891a108d303739126b806ded5220f56ab"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),e("br",{key:"52854c5a07611180be40df21a5f60d7d9d4c4cb7"}),e("div",{key:"7448b3f6138b996edac137b961367725e3b40556",class:"row-gy-3"},e("div",{key:"c732deb4e1e3a2d04dd4e09914543a7f594af108",class:"col-12"},e("form-control-checkbox",{key:"fca18e4843aef20d13790029b114b2ecaeb6ffa2",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},ds=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{const t=new T((s.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},t),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{legal_address:new T(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f((0,$[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s;const t=null===(s=this.formController)||void 0===s?void 0:s.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Legal Address of your Business"),e("form-control-tooltip",{helpText:"No PO Boxes."})),e("hr",{class:"mt-2"}),e("justifi-form-address-fields",{country:this.country,errors:this.errors,defaultValues:t,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},us=class{constructor(t){s(this,t)}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"53ba6c809e1968712b333f4bcf2798dbca186ddb",class:"d-flex gap-2"},e(Q,{key:"b45c60083ccf6589cae0c63ce6b66c18da340dc7",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(Q,{key:"27372798da0276de44d1563a4688486e7cc91d64",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,F.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(Q,{key:"8bc14ca8fe951caf276f8ed03e502486e11acbe2",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,F.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},ms=class{constructor(t){s(this,t),this.allowOptionalFields=!1,this.country=k.USA,this.componentStepMapping={0:()=>e("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),1:()=>e("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),2:()=>e("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),4:()=>e("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),5:()=>e("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),6:()=>e("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields})}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"ff7c9e688009383fdbe18c9824fa578d2338900c",class:"col-12 mb-4"},this.currentStepComponent)}};export{ts as justifi_additional_questions_form_step,os as justifi_business_bank_account_form_step,as as justifi_business_core_info_form_step,hs as justifi_business_owners_form_step,cs as justifi_business_representative_form_step,ls as justifi_business_terms_conditions_form_step,ds as justifi_legal_address_form_step,us as justifi_payment_provisioning_form_buttons,ms as justifi_payment_provisioning_form_steps}
1
+ import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{C as r,a as n}from"./p-Cjcsf8ku.js";import{m as o,b as a,f as h,g as c}from"./p-R0FDNhyd.js";import{B as l,a as d,D as u}from"./p-B6sIVWJW.js";import{a as m,c as p,b}from"./p-BovgIz83.js";import{F as f,c as v,a as y,b as g,d as w}from"./p-CKiAlBsU.js";import{A as k,C as _,e as C,R as j,f as T}from"./p-BcNb9bVO.js";import{C as x,P as O}from"./p-CVaOFfrI.js";import{b as S,a2 as E,E as I,z as B,w as L,am as A}from"./p-D50Rx76J.js";import{P as D}from"./p-CbM9cuX_.js";import{b as P,c as H}from"./p-Bt4GjEWL.js";import{a as V,B as F}from"./p-XYgDHrVL.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{E as W,p as q,q as M}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{A as R,B as U,v as z,C as N,D as Y,E as J,F as X}from"./p-HT_4DkD0.js";import{B as G}from"./p-C-QiUcEa.js";import"./p-CZfYo5-1.js";import{c as Q}from"./p-_-2E_vYf.js";import{d as Z,e as $}from"./p-D8EGHc_m.js";import{A as K}from"./p-CMB3sNMT.js";import"./p-D2muobcE.js";import"./p-BFTU3MAI.js";import"./p-BrO0HEFJ.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";class ss{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.account_number=s.account_number,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.institution_number=s.institution_number,this.transit_number=s.transit_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const ts=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.additional_questions=new k(s.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t})),this.additional_questions=new k(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(s){this.recurringPayments="Yes"===(null==s?void 0:s.business_recurring_payments)}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{additional_questions:new k(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f(m(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t,i,r,n;const o=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Additional Questions"),e("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=this.errors)||void 0===s?void 0:s.business_revenue,defaultValue:null==o?void 0:o.business_revenue,maskOptions:x.WHOLE})),e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_payment_volume,defaultValue:null==o?void 0:o.business_payment_volume,maskOptions:x.WHOLE})),e("div",{class:"col-12"},e("form-control-text",{name:"business_average_transaction_amount",label:"What is your average transaction size?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_average_transaction_amount,defaultValue:null==o?void 0:o.business_average_transaction_amount})),e("div",{class:"col-12"},e("form-control-select",{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:null===(r=this.errors)||void 0===r?void 0:r.business_when_service_received,options:P,defaultValue:null==o?void 0:o.business_when_service_received})),e("div",{class:"col-12"},e("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_other_payment_details,defaultValue:null==o?void 0:o.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},es=(s,t)=>s.some((s=>s.document_type===t)),is=s=>s?{bank_name:Y.nullable(),nickname:N.nullable(),account_owner_name:z.nullable(),account_type:U.nullable(),account_number:R.nullable()}:{bank_name:Y.required("Enter bank name"),nickname:N.required("Enter nickname"),account_owner_name:z.required("Enter account owner name"),account_type:U.required("Select account type"),account_number:R.required("Enter account number")},rs=(s,t)=>{if(t)return{voided_check:g().nullable(),bank_statement:g().nullable()};const e=es(s,W.voidedCheck),i=es(s,W.bankStatement),r=e||i,n="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:g().when("bank_statement",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()}),bank_statement:g().when("voided_check",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()})}},ns={[_.USA]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>s?{routing_number:X.nullable()}:{routing_number:X.required("Enter routing number")})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s),[_.CAN]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},is(t)),(s=>{const t=y().length(3,"Institution number must be 3 digits").matches(J,"Enter valid institution number"),e=y().length(5,"Transit number must be 5 digits").matches(J,"Enter valid transit number");return s?{institution_number:t.nullable(),transit_number:e.nullable()}:{institution_number:t.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(t)),rs(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s)},os=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new q,this.isLoading=!1,this.viewMode="manual",this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,ns[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new f(this.getSchema()),this.formController.setInitialValues("readonly"===this.viewMode?Object.assign({},this.bankAccount):{business_id:this.businessId}),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new M({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.processBusinessResponse(s.data),this.determineViewMode()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.viewMode=this.plaidAvailable?"plaid":"manual",this.documentData=new q,this.initializeFormController()},this.handleCancel=()=>{this.viewMode=this.existingBankAccount?"readonly":"plaid",this.documentData=new q,this.initializeFormController()},this.handleToggleToManualEntry=()=>{this.viewMode="manual"},this.handleToggleToPlaidVerification=()=>{this.viewMode="plaid"},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async s=>{this.isLoading=!0;const t=s.record_data;return new Promise((e=>{this.postDocumentRecord({payload:t,onSuccess:t=>{e(this.handleDocRecordResponse(s,t))},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:r.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await s.getFileData(),e=await fetch(s.presigned_url,{method:"PUT",body:t});return this.handleUploadResponse(e)},this.handleUploadResponse=s=>!s.error||(this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}),!1)}propChanged(){this.initializeApi()}watchHandler(s){this.formLoading.emit(s)}async validateAndSubmit({onSuccess:s}){"readonly"===this.viewMode?this.sendData(s):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new f(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.postBankAccount=h({authToken:this.authToken,service:new d}),this.postDocumentRecord=c({authToken:this.authToken,service:new u})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}get postPayload(){const s=this.formController.values.getValue();return new ss(s).payload}get existingBankAccount(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}get plaidAvailable(){return this.bankAccountVerification&&!!this.platformAccountId}get showCancel(){return this.bankAccountVerification||this.existingBankAccount}processBusinessResponse(s){const{bank_accounts:t,documents:e,settings:i,platform_account_id:r}=s;t.length>0?this.bankAccount=new ss(t[t.length-1]):(this.bankAccount=new ss({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=e,this.bankAccountVerification=!0===i.bank_account_verification,this.platformAccountId=r}determineViewMode(){this.viewMode=this.existingBankAccount?"readonly":this.plaidAvailable?"plaid":"manual"}async sendData(s){try{if("manual"===this.viewMode&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;"manual"===this.viewMode&&(this.viewMode="readonly",await this.refreshBankAccountData()),s()}catch(s){this.errorEvent.emit({message:s,errorCode:n.POST_ERROR,severity:r.ERROR})}}async postBankAccountData(){let s;return this.isLoading=!0,new Promise((t=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:t=>{s=t,e=!0},onError:({error:s,code:t,severity:i})=>{e=!1,this.errorEvent.emit({message:s,errorCode:t,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:V.bankAccount}),this.isLoading=!1,t(e)}})}))}async refreshBankAccountData(){return new Promise((s=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.processBusinessResponse(s.data),this.determineViewMode(),this.initializeFormController()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.isLoading=!1,s()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const s=Object.values(this.documentData).flat();return!s.length||!(await Promise.all(s.map((s=>this.postDocumentRecordData(s))))).includes(!1)&&!(await Promise.all(s.map((s=>this.uploadDocument(s))))).includes(!1)}finally{this.isLoading=!1}}renderBankAccountInputs(s){const t=this.formController.getInitialValues();return e(this.country===_.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:t,errors:this.errors,inputHandler:this.inputHandler,formDisabled:s})}renderReadonlyView(){return e("div",null,this.renderBankAccountInputs(!0),e("div",{class:"mt-3"},e(G,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:E},"Change Bank Account")))}renderPlaidView(){return e("div",{class:"mt-3"},e("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.viewMode="readonly",this.refreshBankAccountData()}}),e("div",{class:"mt-3"},e(G,{type:"button",variant:"link",className:"p-0",onClick:this.handleToggleToManualEntry,disabled:this.isLoading,part:I},"Enter bank details manually (document upload required)")))}renderManualEntryView(){return e("div",null,this.plaidAvailable&&e("div",{class:"mb-3"},e(G,{type:"button",variant:"secondary",onClick:this.handleToggleToPlaidVerification,disabled:this.isLoading,part:E},"Link bank account with Plaid instead")),this.renderBankAccountInputs(!1),e("div",{class:"mt-3 d-flex gap-2"},this.showCancel&&e(G,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:E},"Cancel"),e(G,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account")))}renderDocumentUploads(){return e("fieldset",{class:"mt-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Document Uploads"),e("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),e("hr",{class:"mt-2"}),e("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),e("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles}))}render(){return this.isLoading?e(D,null):e("form",null,e("fieldset",{class:"mb-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Bank Account Info"),e("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),e("hr",{class:"mt-2"}),"readonly"===this.viewMode&&this.renderReadonlyView(),"plaid"===this.viewMode&&this.renderPlaidView(),"manual"===this.viewMode&&this.renderManualEntryView()),"plaid"!==this.viewMode&&this.renderDocumentUploads())}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},as=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.coreInfo=new C(s.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s(),this.isEditingTaxId=!1},onError:({error:s,code:e,severity:i,rawError:r})=>{t=s,r&&"object"==typeof r&&r.param&&this.formController.setFieldError(r.param,r.message),this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.errors[s]&&this.formController.clearFieldError(s),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return new C(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const s=this.country===_.CAN?p(this.allowOptionalFields):b(this.allowOptionalFields);this.formController=new f(s),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t;const i=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Business Information")),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),e("div",{class:"col-12 col-md-8"},e("form-control-select",{name:"classification",label:"Business Classification",options:H,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-4"},e("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),e("div",{class:"col-12 col-md-6"},!(null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4)||this.isEditingTaxId?e("form-control-number-masked",{name:"tax_id",label:Q[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:Q[this.country].taxIdHelpText}):e("div",null,e("label",{class:"form-label",part:B},Q[this.country].taxIdLabel),e("div",{class:"input-group mb-3"},e("input",{type:"text",class:"form-control",part:L,value:`****${null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4}`,disabled:!0}),e("button",{class:"btn btn-secondary",type:"button",part:E,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),e("div",{class:"col-12"},e("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:O.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},hs=class{constructor(e){s(this,e),this.clickEvent=t(this,"click-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(s,t)=>{if(null===s)return;const e=this.ownersPayload.findIndex((s=>s.id===t));-1!==e&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[e]=s)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new j(s.data.representative||{}),s.data.owners.length?this.ownersPayload=s.data.owners.map((s=>({id:s.id}))):this.addOwnerForm()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=s=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],s&&this.clickEvent.emit({name:F.addOwnerForm})},this.removeOwnerForm=s=>{this.ownersPayload=this.ownersPayload.filter((t=>t.id!==s)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=s=>{this.representativeIsOwner=s,this.representativeIsOwner&&(this.formLoading.emit(!0),this.isLoading=!0,this.ownersPayload=this.ownersPayload.filter((s=>""!==s.id)),this.patchBusiness({payload:{owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1},finally:()=>{this.isLoading=!1,this.formLoading.emit(!1)}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((s=>s.id))}async validateAndSubmit({onSuccess:s}){const t=this.refs.map((s=>s.validate()));if(!(await Promise.all(t)).every((s=>s)))return;const e=this.refs.map((s=>s.submit()));(await Promise.all(e)).every((s=>s))&&this.sendData(s)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(s){const t=s.detail,e=this.ownersPayload.map((s=>s.id===t.id?t:s));e.includes(t)||(e[this.ownersPayload.findIndex((s=>!s.id))]=t,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){if(this.isLoading)return e(i,null,e(D,null));const s=this.ownersPayload.some((s=>s.id===this.representative.id)),t=null===this.representativeIsOwner&&!s;return e(i,null,e("div",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Owners"),e("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),e("hr",{class:"mt-2"}),t&&e("div",{class:"alert alert-warning mb-3",part:A},e("div",{class:"card-body"},e("div",{class:"d-flex align-items-center mb-3"},e("strong",null,"Is the representative of this business also an owner?")),e("div",{class:"d-flex gap-2"},e(G,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),e(G,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),e("div",{class:"row gy-3"},this.ownersPayload.map((s=>e("owner-form",{key:s.id,authToken:this.authToken,businessId:this.businessId,ownerId:s.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),e("div",{class:"d-flex justify-content-start"},e("div",{class:"gap-2"},e(G,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},cs=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new j(s.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}initializeForm(){const s=Z[this.country];s?(this.formController=new f(s("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:n.MISSING_PROPS,severity:r.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get patchPayload(){return{representative:new j(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?e(D,null):e("business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},ls=class{constructor(e){s(this,e),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.formCompleted=t(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:n.FETCH_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.termsPayload,e=await this.api.post({endpoint:this.termsConditionsEndpoint,body:t,authToken:this.authToken});this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.acceptedTerms=t,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=K(),this.formController=new f((s=>{const t=v({accepted:w().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=v({accepted:w().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}):t(),this.stepCompleteEvent.emit({response:s,formStep:V.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:V.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get merchantAgreementLink(){return e("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return e("form",{key:"325cb8ddd72c0fcd8ea14eae5c8abff286c57b90"},e("fieldset",{key:"4376945ecca9dc5f462099b8a7b893b84d72ee28"},e("legend",{key:"d2c83a8d552091c1e546fe663be6674fb5cc623a",part:S},"Terms and Conditions"),e("hr",{key:"608620cec864f21eed1c0263236e160171543881"}),e("div",{key:"58942ff2e4a620695485b9e80443c9cbfae74186"},e("p",{key:"487df1718bb9a5dfc486c8589d75c627d325edd8"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),e("br",{key:"ee3cc0ccedd353030abc05d80b20d7ae5b3f327c"}),e("div",{key:"d9ff9f7aeb18da7253f6ed1705ac0ebd4aebbc15",class:"row-gy-3"},e("div",{key:"f9e9fd3bdc0b74872fa58940af54952a138cc988",class:"col-12"},e("form-control-checkbox",{key:"63cdad138445ac5b5fa4beb678475048c5b8c589",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},ds=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{const t=new T((s.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},t),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:V.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{legal_address:new T(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f((0,$[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new l}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new l})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s;const t=null===(s=this.formController)||void 0===s?void 0:s.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Legal Address of your Business"),e("form-control-tooltip",{helpText:"No PO Boxes."})),e("hr",{class:"mt-2"}),e("form-address-fields",{country:this.country,errors:this.errors,defaultValues:t,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},us=class{constructor(t){s(this,t)}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"84faa27ba9737bc546ed0ff0d169cea53e3599f3",class:"d-flex gap-2"},e(G,{key:"615c83981ca574001fc7219611f512486415cbd8",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(G,{key:"a75dc66a0f067d9153c69cc9756291ef5ef34748",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,F.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(G,{key:"9aa26b8592823ecce24aae8bfbf230b6deab5336",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,F.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},ms=class{constructor(t){s(this,t),this.allowOptionalFields=!1,this.country=_.USA,this.componentStepMapping={0:()=>e("business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),1:()=>e("legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),2:()=>e("additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),4:()=>e("business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),5:()=>e("business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),6:()=>e("business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields})}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"0dc1675cbaf760028c6631eb64192c61361fdec9",class:"col-12 mb-4"},this.currentStepComponent)}};export{ts as additional_questions_form_step,os as business_bank_account_form_step,as as business_core_info_form_step,hs as business_owners_form_step,cs as business_representative_form_step,ls as business_terms_conditions_form_step,ds as legal_address_form_step,us as payment_provisioning_form_buttons,ms as payment_provisioning_form_steps}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as o}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as i,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as c,a as p}from"./p-D2muobcE.js";import{c as a}from"./p-D0BjjvYt.js";import{J as n}from"./p-CmXujxGp.js";import{C as h}from"./p-CAl_N2gi.js";import{m,S as u}from"./p-8Kt4Rhcq.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-D2TJwp13.js";import"./p-D8GTwl9v.js";import"./p-MkDHT9M4.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-Da4efjxw.js";import"./p-D50Rx76J.js";const l=class{constructor(o){t(this,o),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){a(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){const t=this.subAccountId||this.accountId;t&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:o})=>async({params:r,onSuccess:a,onError:n})=>{var h,m;try{const u=await o.fetchCheckouts(t,s,r);if(u.error)return n({error:p(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);a({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:i.ERROR})}})({accountId:t,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID/Sub Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return o(d,{key:"96153624befeb889e49caa063c64596eb38e38ff"},o("checkouts-list-core",{key:"b2ced4d610511630d73498422db88be9fac50b15",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],subAccountId:["propChanged"]}}};export{l as justifi_checkouts_list}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-CKiAlBsU.js";import{aa as d}from"./p-D3V9AE6o.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"4c6f6740b3ad7c063f3275dad9d74feb360b36a7"},a("div",{key:"4eeb3d2aae2df266e95ea80ed97bf00b63fe2952",class:"row gy-3"},a("div",{key:"ca0c7efc3186ba84e648fd2432fd36862ca7e704",class:"col-12"},a("h2",{key:"26236264d2dd37545092b15b8164b109b9738bfe",class:"h5",part:d},"Additional Evidence")),a("div",{key:"84e74149369dcfab9f31dd2a079044911b8af9f4",class:"col-12"},a("form-control-textarea",{key:"1aa5ffee7bcf19d56b34708cdac36bcda9bb4d03",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"7145211db8aaaba540670c7d67cf2d1075f1fc69",class:"col-12"},a("form-control-file-v2",{key:"64b82123ff0697fdca198363417582bb6079fbbe",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"f9b93b3dd8c73dcf878c3a4ff0bf1644a853b7bb"},a("div",{key:"520759d6b31b86035d1e60a9c8b1353e764291ef",class:"row gy-3"},a("div",{key:"3afe7011e77eb9c864e8b26e93edccc917f42658",class:"col-12"},a("h2",{key:"57fe3c49c3d2634525c2d6c6dc04031ff73a8a3f",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"dd6b7bb8a608940d213e55224de3410f51c5b78d",class:"col-12"},a("form-control-textarea",{key:"05596adee9001ca673e0c61ffa1245ea45ae944d",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"75dca392cfee3a5c571acb0ed1526623be0eb7e8",class:"col-12"},a("form-control-textarea",{key:"9bf96784519d39c9961b2741da358b0112275c71",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"d9995887e3791f54730d84a598869dce7cabd8b4",class:"col-12"},a("form-control-file-v2",{key:"40fb6492e3db57e1d9b5b77d37229579bee4de5e",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"ac1c08881bf4f5288aa6841d3f87ba1d8e9dd6e4"},a("div",{key:"148296af222d038e8e9ab3e318d210b7638074d2",class:"row gy-3"},a("div",{key:"e3e3635454797465b08b0df10023f66899d8dd04",class:"col-12"},a("h2",{key:"d65767d3d3b091afc8b9b4798e639214ede14726",class:"h5",part:d},"Customer Details")),a("div",{key:"258f8dadcb6aec223c1a039ee0100ed91d0b2896",class:"col-12"},a("form-control-text",{key:"e2206e72a7603ca15ea1d6a70593667e1eaf5132",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"792028d6ae5ee85765b91188e20330489cfd7bb3",class:"col-12"},a("form-control-text",{key:"a7288afe499a39a6c78bf8b1fe5f5e1a5bc6af27",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"82f8bfaa81e727226e013e94712928a5cdb03841",class:"col-12"},a("form-control-textarea",{key:"bd2410564783f6ae8acf1d1fb820bcbe4aea3aa5",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"84442373f62efaf5a1e14623d61eff0bc81f6751",class:"col-12"},a("form-control-file-v2",{key:"4575df27d749c4520fa55d7f1fc901296ec2ed45",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"f1c9f81104d1e080be993d0af29343c5d540cb43",class:"col-12"},a("form-control-file-v2",{key:"8b8e4eefba1e84551645229204108bfe007012cf",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"3a6188603e8cfdd1b24db55703f63b2199dc9e71"},a("div",{key:"68cac9c229db9641e3f71e42e9f96d4b6437e9b9",class:"row gy-3"},a("div",{key:"2060793e27c759d8fdf21765fcfbf0253ca9a016",class:"col-12"},a("h2",{key:"21fb843b28af8fe9cfc2ef4aa297541fb3d9d61b",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"9743e65ce74307e5d4544c46f2507f4815d0a413",class:"col-12"},a("form-control-text",{key:"213e56620c428e214d3b937a45fee4a0c2116caf",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"ca7963f7cbc63caece9d0ff91fd6ae04a45bc9a7",class:"col-12"},a("form-control-textarea",{key:"9edf3135b2cbbc61017fa1fd74f06da34982c4d6",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"e0fe338e2bec5bc1889eeb72f8138f2f0fce497b",class:"col-12"},a("form-control-file-v2",{key:"86851806bb69be1da6334376a44da6cddfa013e7",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"2938a2cebbc08938a88af9848f674727c2925473"},a("div",{key:"fc85fd26921d9ffc0ed547bd4c4facb40cfbcd5f",class:"row gy-3"},a("div",{key:"b737248f4ffc77483816c80192b3b957ed899f67",class:"col-12"},a("h2",{key:"4ee8776884ba4527e4ab6acf9255bc24ceda264c",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"6343a2a36120fd60a46c4a0d72096db778298d43",class:"col-12"},a("form-control-text",{key:"26d4b151d39d0fcc100fa4494a5efca07905d152",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"d9f2a4a6c66c32765a36378669b02faecbca070c",class:"col-12"},a("form-control-file-v2",{key:"f3284b4fc35f68e1120960e4728f0e8f472920fa",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"05fccd72cd4c7d22cd23e8f14518f0e70dacb3e5"},a("div",{key:"464b6335fb494bbd13a4eb8ab8be0e73b7658a6b",class:"row gy-3"},a("div",{key:"446a4650edee4c7b5caa8709afce2826484d1f28",class:"col-12"},a("h2",{key:"f2414eb4ea879136177702367591cb45542a6cdb",class:"h5",part:d},"Product & Service Details")),a("div",{key:"5ce3d90815b48a94f7aadc104aa02d3c04ef423d",class:"col-12"},a("form-control-text",{key:"721d1376342972cb9a2a932c7a710231435905a5",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"f3580d06b1e390c3f769177091aa93b9b82e5b26",class:"col-12"},a("form-control-date",{key:"9166a295b843c890100a41d33d38c69aaaa69950",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"d67631887c3178f05ae85112f71bcefb5807496c",class:"col-12"},a("form-control-file-v2",{key:"8e9f0b2a8ffb264e3d89a36a452477a72482eb8a",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"b0b610c20e194b94743d99212e2efffef56520f9"},a("div",{key:"0a17bc79f6a07aba4cf9e5f5ef0ee4a6d484bf51",class:"row gy-3"},a("div",{key:"517679d918a832bdf8b21554cc9e4121c304cdff",class:"col-12"},a("h2",{key:"c49dfd3f5072031b1ff07e51df4149548e79d83a",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"5d7af624762783c0151d31e4c9600381b8a8fa3a",class:"col-12"},a("form-control-textarea",{key:"fb4ca818378fa6d674ba7c389f906145b9d11627",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"0591b80676048c52034b0571ac94a1daad70f102",class:"col-12"},a("form-control-textarea",{key:"1ce0a48f04f12a8d4bc91d01e90dd6caa32018af",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"d02a401923e4c38427cff3245767441ef4b9f779",class:"col-12"},a("form-control-file-v2",{key:"772aefaf3e0a54768ef9163df0de8ba6cfdb28b5",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"d113a7eacf5a4aee4132baed5fd6a76bd670ba30",class:"col-12"},a("form-control-file-v2",{key:"8a3c5f1d006e97ff6bb385a76818a325686ff1de",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"180df6d9062459eec271f148828a2dd57f18d271"},a("div",{key:"406e8870df739225b547ada975dbd83085ea97d2",class:"row gy-3"},a("div",{key:"44c088ffe6b0eb7cbe072069821de8c9d3e1892d",class:"col-12"},a("h2",{key:"208bc93626a900b414ce3df5a8c3d7dfc5d1d75a",class:"h5",part:d},"Shipping Details")),a("div",{key:"27cf473cefd457cc3c802cef99ace1584881bf16",class:"col-12"},a("form-control-text",{key:"6dfa9be914863103a6362c6b9efd81c5be99b0f2",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"7b6f0e1d14698442a98df75f5635cbafc8172ddb",class:"col-12"},a("form-control-text",{key:"a5424f340602b3a1b3ccbe38a14ac36d0a6a74d2",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"1c956a0ef4ca9d3fbc61af14bcb6bca058aed8f7",class:"col-12"},a("form-control-date",{key:"32c52e9178e9f54ef4f4695ffae0c124e025d354",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"34eed46e9dce3dffa3b8547ee2e601927a6b239b",class:"col-12"},a("form-control-textarea",{key:"f873c9a4c9d4518e35d76a61000d99e26e25f4a4",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"025fb202955938d89d6990eac237b1be66cf1945",class:"col-12"},a("form-control-file-v2",{key:"135edc3fcaef1a07dde5c175a11b8c3f833b93c9",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as justifi_additional_statement,h as justifi_cancellation_policy,v as justifi_customer_details,m as justifi_duplicate_charge,_ as justifi_electronic_evidence,g as justifi_product_or_service,j as justifi_refund_policy,T as justifi_shipping_details}
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{c as t,a as i,F as c}from"./p-CKiAlBsU.js";import{a9 as d}from"./p-D50Rx76J.js";import"./p-BFTU3MAI.js";const s=t({additional_statement:i().nullable()});var o,l;!function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(o||(o={})),function(e){e.activity_log="activity_log",e.cancellationPolicy="cancellation_policy",e.customerCommunication="customer_communication",e.customerSignature="customer_signature",e.duplicateChargeDocumentation="duplicate_charge_documentation",e.receipt="receipt",e.refundPolicy="refund_policy",e.serviceDocumentation="service_documentation",e.shippingDocumentation="shipping_documentation",e.uncategorizedFile="uncategorized_file"}(l||(l={}));class n{set presignedUrl(e){this._presignedUrl=e}get presignedUrl(){return this._presignedUrl}async getFileString(){const e=new Promise(((e,a)=>{const t=new FileReader;t.onload=a=>{e(a.target.result)},t.onerror=()=>{a(new Error("Error reading file"))},t.readAsArrayBuffer(this._file)}));return await e}constructor(e,a){this._file=e,this.file_name=e.name,this.file_type=e.type,this.dispute_evidence_type=a}}const r=(e,a)=>{const t=e.target,i=t.name,c=t.files;a[i]=[];for(const e of c)a[i].push(new n(e,i))},f=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.acceptedTerms=!1,this.documents={uncategorized_file:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.additionalStatement)))}componentWillLoad(){this.form=new c(s)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"38afa726961618a321faa0a0653fe13c933cc5d4"},a("div",{key:"dcf1bbb019196719fe2f08cb38542d9e4af21797",class:"row gy-3"},a("div",{key:"30bf5043e78ba03e1cb90b931a2b9b9b7aaf8317",class:"col-12"},a("h2",{key:"176b0cbd82fc611521355d2ebb472bf21ad88790",class:"h5",part:d},"Additional Evidence")),a("div",{key:"67802f033535941d8e78c345c642ba1cc009eb61",class:"col-12"},a("form-control-textarea",{key:"947ddec697cc65faa174ec121a6fcc501a3a3ebd",label:"Is there anything else you would like to say about this dispute?",name:"additional_statement",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.additional_statement,inputHandler:this.inputHandler,errorText:this.errors.additional_statement})),a("div",{key:"9c0469c54fcc5f160963d605d9503899070e9ab8",class:"col-12"},a("form-control-file-v2",{key:"b2fb3203125da6ab27948911f8b83bcfdd845496",label:"Additional files",name:"uncategorized_file",multiple:!0,helpText:"Upload any additional pieces of evidence that have not already been provided.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.uncategorized_file}))))}},b=t({cancellation_policy_disclosure:i().nullable(),cancellation_rebuttal:i().nullable()}),h=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={cancellation_policy:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.cancellationPolicy)))}componentWillLoad(){this.form=new c(b)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"11292b7523ea77a978c03e8a349da8d2bdbb12eb"},a("div",{key:"9ede1868d00b7df2a6e4af76bf6203a26988f20b",class:"row gy-3"},a("div",{key:"409a15cb80914863ffcbba73eea6e706393bf1b0",class:"col-12"},a("h2",{key:"4012cfad95101c0372b8ed6b6f7f3e093e28869b",class:"h5",part:d},"Cancellation Policy")),a("div",{key:"89093d799883ff5673cbacd838c5ca3e2fa47f54",class:"col-12"},a("form-control-textarea",{key:"2646ab607bc3360ecc6491314a3e09bdc01f6597",label:"Cancellation Policy Disclosure",name:"cancellation_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.cancellation_policy_disclosure,inputHandler:this.inputHandler,errorText:this.errors.cancellation_policy_disclosure})),a("div",{key:"ab8fb47510394ff89854e8fbc74ec27ef071f227",class:"col-12"},a("form-control-textarea",{key:"8b1cbcf64fa6b7af0f3389304fd86a9d1550f957",label:"Cancellation Rebuttal",name:"cancellation_rebuttal",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.cancellation_rebuttal,inputHandler:this.inputHandler,errorText:this.errors.cancellation_rebuttal})),a("div",{key:"13f905a58086f5955ff39c39646f92c900a6b125",class:"col-12"},a("form-control-file-v2",{key:"a9dd3168ba628bb18c713618dec8c584345ca1db",label:"Upload Cancellation Policy",name:"cancellation_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.cancellation_policy}))))}},u=t({customer_name:i().nullable(),customer_email_address:i().nullable(),customer_billing_address:i().nullable()}),v=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={customer_signature:[],customer_communication:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.customerDetails)))}componentWillLoad(){this.form=new c(u)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"1e845fde4aacb950ac4afd82009eb6112af830ef"},a("div",{key:"dbc565d42c828f56243640d269504a95b0ff69c7",class:"row gy-3"},a("div",{key:"8fbd8fe29ae216a8759294410d8fd0cbd8c65b5e",class:"col-12"},a("h2",{key:"b852cb824cc6a0990f0e4eee04702f36ef306cc2",class:"h5",part:d},"Customer Details")),a("div",{key:"fc42b78ae5858be0ae521ac830ef5857943f6c58",class:"col-12"},a("form-control-text",{key:"c9dfe20609704edef7a2b6ffa3d3e063c3168b73",label:"Full Name",name:"customer_name",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_name,inputHandler:this.inputHandler,errorText:this.errors.customer_name})),a("div",{key:"53ceaebddfeeaad586f1924d16eaaad661ebf7a7",class:"col-12"},a("form-control-text",{key:"94e4d2fc711c157ae3c9a1addffa5022fc493afa",label:"Email",name:"customer_email_address",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.customer_email_address,inputHandler:this.inputHandler,errorText:this.errors.customer_email_address})),a("div",{key:"1a656f6dfddf5e090bb098ceab9ed235b6b06ca5",class:"col-12"},a("form-control-textarea",{key:"5e49323c520019c96eb50bb7573cf45c85848cd2",label:"Billing Address",name:"customer_billing_address",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.customer_billing_address,inputHandler:this.inputHandler,errorText:this.errors.customer_billing_address})),a("div",{key:"cc105778397e49917c91d5d2d57b1b505cf07cb4",class:"col-12"},a("form-control-file-v2",{key:"db4069f39ff645156810a0c9e265716b33257c2a",label:"Customer Signature",name:"customer_signature",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.customer_signature})),a("div",{key:"b7ba5f79d854fbc22052873772309e8fb02e865b",class:"col-12"},a("form-control-file-v2",{key:"49add3b24bd1471ccd2362910d1c9487dc4faedd",label:"Customer Communication",name:"customer_communication",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.customer_communication}))))}},p=t({duplicate_charge_original_payment_id:i().nullable(),duplicate_charge_explanation:i().nullable()}),m=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={duplicate_charge_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.duplicateCharge)))}componentWillLoad(){this.form=new c(p)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"d79028dfc1949c6bf9f9c77bf427f6fea94c5cee"},a("div",{key:"7f05dd0a6ad675d1acfbf6b6dedda12914092a42",class:"row gy-3"},a("div",{key:"35a65eaf672b11812482eeb241e15ea7828f8b1a",class:"col-12"},a("h2",{key:"91ead89be2f1497469ac63266ddb922f47223da2",class:"h5",part:d},"Duplicate Charge")),a("div",{key:"89f7a88c0d068368f0b730e501f45183e065a1f2",class:"col-12"},a("form-control-text",{key:"c35b090d20419d40dfde1a88ec34afbcbf8ab0b2",label:"Original Payment ID",name:"duplicate_charge_original_payment_id",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.duplicate_charge_original_payment_id,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_original_payment_id})),a("div",{key:"c3126552f55721c8faa39bb6c65de9740778a9e9",class:"col-12"},a("form-control-textarea",{key:"014d8ffbcddccd883d655a2f9dd4f1443c81bf3c",label:"Duplicate Charge Explanation",name:"duplicate_charge_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.duplicate_charge_explanation,inputHandler:this.inputHandler,errorText:this.errors.duplicate_charge_explanation})),a("div",{key:"050e60f3b5dfe80ad1cd0b7de8472667a1c32651",class:"col-12"},a("form-control-file-v2",{key:"3f7610825c63c979655f80c68e475a7dd463956e",label:"Duplicate Charge Documentation",name:"duplicate_charge_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.duplicate_charge_documentation}))))}},y=t({customer_purchase_ip_address:i().nullable()}),_=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={activity_log:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.electronicEvidence)))}componentWillLoad(){this.form=new c(y)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t;return a("div",{key:"f7b24599316e8545d61370c50d28cbf5e0d90985"},a("div",{key:"d1edc60194b573078d5701a14e16ef0dd8f6b45d",class:"row gy-3"},a("div",{key:"4b7e12eb4a9b41b30d7c85334691136280679210",class:"col-12"},a("h2",{key:"b9e3721e4ff6610da877f49e263ef84b86cd81ea",class:"h5",part:d},"Electronic Evidence")),a("div",{key:"b90b4c712c5bd02a0bf8911fcaae7b907c1a216f",class:"col-12"},a("form-control-text",{key:"468f44dc9b907b4b21e387a511e7995f88d0c53c",label:"Purchase IP Address",name:"customer_purchase_ip_address",helpText:"The IP address used by the customer during the purchase.",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.customer_purchase_ip_address,inputHandler:this.inputHandler,errorText:this.errors.customer_purchase_ip_address})),a("div",{key:"563a949612a21b8434b80c5c025aa79567aa54a4",class:"col-12"},a("form-control-file-v2",{key:"467fbd2f55a85134b73d23764845038b7f2415ba",label:"Activity Logs",name:"activity_log",helpText:"Any server or activity logs that provide evidence of the customer's access to or download of the purchased digital product. This information should encompass IP addresses, relevant timestamps, and any detailed records of activity.",onChange:e=>r(e,this.documents),errorText:null===(t=this.documentErrors)||void 0===t?void 0:t.activity_log}))))}},k=t({product_description:i().nullable(),service_date:i().nullable()}),g=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={service_documentation:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.productOrService)))}componentWillLoad(){this.form=new c(k)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i;return a("div",{key:"78ae891c29d08c3416f23a1a3f79f4748d76ab40"},a("div",{key:"88c19ce6ceeaaa77cbd5aaed3b2bb171c0fed44c",class:"row gy-3"},a("div",{key:"30a2df0197d01b911dce05df5b3340aab8b6af04",class:"col-12"},a("h2",{key:"ba463f9c6dbf9b28aa966b90b911c782cf14a6a3",class:"h5",part:d},"Product & Service Details")),a("div",{key:"19d497710739b9272f24ed5e1ab0ad265dfe1c3d",class:"col-12"},a("form-control-text",{key:"c6d921f51c08b5e4c6a0280b0dcb45bba9885f3e",label:"Product Description",name:"product_description",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.product_description,inputHandler:this.inputHandler,errorText:this.errors.product_description})),a("div",{key:"3074df432c0f3959179237113eef15761dcbb5fb",class:"col-12"},a("form-control-date",{key:"8edd606a143654dc458b70f9c67f1874223bb700",label:"Service Date",name:"service_date",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.service_date,inputHandler:this.inputHandler,errorText:this.errors.service_date})),a("div",{key:"dafb0b4514cdb1e87f02a92cd80d97b553519a3d",class:"col-12"},a("form-control-file-v2",{key:"32af43dfd6b9f569723db219eb9db5c7f531df55",label:"Service Documentation",name:"service_documentation",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.service_documentation}))))}},x=t({refund_policy_disclosure:i().nullable(),refund_refusal_explanation:i().nullable()}),j=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={refund_policy:[],receipt:[]},this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.refundPolicy)))}componentWillLoad(){this.form=new c(x)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c;return a("div",{key:"ce05a5b2408f95dfef0d3c24edb62c34f992bc61"},a("div",{key:"41972a8136487f319d09181b110f4be93bd8846c",class:"row gy-3"},a("div",{key:"bf66351a5e8f5824e333addfacafba157728d9c7",class:"col-12"},a("h2",{key:"2d5e8505b2c38dde873677ab55841cce229d29a9",class:"h5",part:d},"Refund Policy and Receipt")),a("div",{key:"cce914921aadf8d18e5f455690c54f154dda7e96",class:"col-12"},a("form-control-textarea",{key:"5d59ffe00ba84d2c7fbfc4151bc86fb55b216907",label:"Refund Policy Disclosure",name:"refund_policy_disclosure",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.refund_policy_disclosure,inputHandler:this.inputHandler})),a("div",{key:"01b51f496e0d064b8fec8ad5f992f9c19a7b0d2c",class:"col-12"},a("form-control-textarea",{key:"580e58a7f90af35c187cc01b93f847b939bf7dbc",label:"Refund Refusal Explanation",name:"refund_refusal_explanation",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.refund_refusal_explanation,inputHandler:this.inputHandler})),a("div",{key:"5e428dee0d8e6a06bc9e1e0bb15c7f4d1fafe8dc",class:"col-12"},a("form-control-file-v2",{key:"c7b1eac64ac72c4fd8299f1bafd23299e3b6057d",label:"Upload Refund Policy",name:"refund_policy",onChange:e=>r(e,this.documents),errorText:null===(i=this.documentErrors)||void 0===i?void 0:i.refund_policy})),a("div",{key:"e06b9507f5b91db6241d5d9628179aa946263097",class:"col-12"},a("form-control-file-v2",{key:"36a8dee9bf6f60ff705440fb9fd727be1fa11209",label:"Upload Receipt",name:"receipt",onChange:e=>r(e,this.documents),errorText:null===(c=this.documentErrors)||void 0===c?void 0:c.receipt}))))}},O=t({shipping_carrier:i().nullable(),shipping_tracking_number:i().nullable(),shipping_date:i().nullable(),shipping_address:i().nullable()}),T=class{constructor(a){e(this,a),this.documentErrors={},this.errors={},this.documents={shipping_documentation:[]},this.documentList=[],this.inputHandler=(e,a)=>{this.form.setValues(Object.assign(Object.assign({},this.form.values.getValue()),{[e]:a}))}}async validateAndSubmit(e){const a=Object.values(this.documents).flat();this.form.validateAndSubmit((t=>e(t,a,o.shippingDetails)))}componentWillLoad(){this.form=new c(O)}componentDidLoad(){this.form.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}render(){var e,t,i,c,s;return a("div",{key:"866cc4bbec74504766f54b7ead77905108e943a9"},a("div",{key:"fbd5066de212864ecec4a364508e348b7af3f3bc",class:"row gy-3"},a("div",{key:"f4570f4e399f800840e13edad14f77c8a1b53712",class:"col-12"},a("h2",{key:"2e5100b95fa159a119e82eb6efbc0c553861ec71",class:"h5",part:d},"Shipping Details")),a("div",{key:"872e7a523810713854895852b437cbde39fc7d7c",class:"col-12"},a("form-control-text",{key:"bfddeb4473c5d15ab6cddc555492ebbbabb4e7ff",label:"Shipping Carrier Name",name:"shipping_carrier",defaultValue:null===(e=this.disputeResponse)||void 0===e?void 0:e.shipping_carrier,inputHandler:this.inputHandler,errorText:this.errors.shipping_carrier})),a("div",{key:"9376147e0d182470e0a280cf0c256006f4422eeb",class:"col-12"},a("form-control-text",{key:"6e62ddb611af6a69f4568fabeb90271e593998ac",label:"Tracking Number",name:"shipping_tracking_number",defaultValue:null===(t=this.disputeResponse)||void 0===t?void 0:t.shipping_tracking_number,inputHandler:this.inputHandler,errorText:this.errors.shipping_tracking_number})),a("div",{key:"7431cd70b761dbe3183a544e179e443cd6af9761",class:"col-12"},a("form-control-date",{key:"b834fac26c825d5dc809c16e8a8519b1d330ecfc",label:"Date Shipped",name:"shipping_date",defaultValue:null===(i=this.disputeResponse)||void 0===i?void 0:i.shipping_date,inputHandler:this.inputHandler,errorText:this.errors.shipping_date})),a("div",{key:"f07986a66fe74289cbe778996146d8781418db57",class:"col-12"},a("form-control-textarea",{key:"c2287f560c55006a9c0cef83acb46ed02a981bb8",label:"Shipping Address",name:"shipping_address",defaultValue:null===(c=this.disputeResponse)||void 0===c?void 0:c.shipping_address,inputHandler:this.inputHandler,errorText:this.errors.shipping_address})),a("div",{key:"ef07786e43bda9fec564e08d2fbd34a7dc9dc3e3",class:"col-12"},a("form-control-file-v2",{key:"70743473ff8bed43562b65eb35a78466ed6d947a",label:"Shipping Documentation",name:"shipping_documentation",onChange:e=>r(e,this.documents),errorText:null===(s=this.documentErrors)||void 0===s?void 0:s.shipping_documentation}))))}};export{f as justifi_additional_statement,h as justifi_cancellation_policy,v as justifi_customer_details,m as justifi_duplicate_charge,_ as justifi_electronic_evidence,g as justifi_product_or_service,j as justifi_refund_policy,T as justifi_shipping_details}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{J as e}from"./p-CmXujxGp.js";import{c as p}from"./p-D0BjjvYt.js";import{P as a}from"./p-Dvcgmvfg.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{e as n}from"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as c,a as m}from"./p-D2muobcE.js";import{m as h}from"./p-DYGIC0QH.js";import{m as u,S as j}from"./p-8Kt4Rhcq.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as f}from"./p-J7WCmj-J.js";import"./p-CIYOQWsL.js";import"./p-CMB3sNMT.js";import"./p-MkDHT9M4.js";import"./p-D8GTwl9v.js";import"./p-BJtvT9BX.js";import"./p-Da4efjxw.js";import"./p-D50Rx76J.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=f,this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new e(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:e,onError:p})=>{var a,h;try{const u=await i.fetchPayouts(t,s,r);if(u.error)return p({error:m(u.error),code:c(null===(h=u.error)||void 0===h?void 0:h.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);e({payouts:(null===(a=u.data)||void 0===a?void 0:a.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:o.ERROR})}})(t),this.getPayoutCSV=h(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({primaryAccountId:this.accountId,authToken:this.authToken,service:new j}))}render(){return i(d,{key:"6b277749b0f621327a6614cbdeffe595637b92b1"},i("payouts-list-core",{key:"1c589706ad38c7e8e74f82ab29b431e6028a19bd",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_payouts_list}
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-CMB3sNMT.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-CBqZge6m.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{J as c}from"./p-CmXujxGp.js";import{c as l}from"./p-D0BjjvYt.js";import{c as h}from"./p-EBsfAkrP.js";import{p as d,f as p,r as u,k as v}from"./p-MkDHT9M4.js";import{v as m,i as f,a as y,H as j}from"./p-_fynNk40.js";import{t as _,B as k}from"./p-D50Rx76J.js";import{S as g}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-BrO0HEFJ.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CIYOQWsL.js";import"./p-DkoufM1t.js";import"./p-HXpYMWUU.js";const b=e();class w{async fetchQuote(s,t){return b.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return b.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const T=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(C,{width:"70%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12"},s(C,{width:"80%"}))),H=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){l(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new w};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),f[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,y[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),f[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return y[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(g,null,this.isLoading?s(T,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:k},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{H as justifi_season_interruption_insurance}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,H as s,c as a}from"./p-CV0Pyo1O.js";import{C as i}from"./p-BcNb9bVO.js";import{n as d}from"./p-BnjCmwMr.js";import{b as o,c as l}from"./p-_-2E_vYf.js";import{I as r}from"./p-Ce_F4E0f.js";import{v as c,w as f,x as h,y as n,z as b}from"./p-D50Rx76J.js";import{F as u}from"./p-N60pPiy5.js";import"./p-CZfYo5-1.js";const m=class{constructor(t){e(this,t),this.country=i.USA}render(){var e,a,r,c,f,h,n,b,u,m;const v=l[this.country],p=o[this.country];return t(s,{key:"e29f7f83cadc904cfc99431b72503ec7db545d0d"},t("div",{key:"f12e1246925a1a1fbfe25e07144aee46f698c24f",class:"row gy-3"},t("div",{key:"109e36cc204e6798d8c4698aa92872226a885020",class:"col-12"},t("form-control-text",{key:"9d458a0cad4fd33ac5ab1211a0930e23109cbe6c",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(a=this.errors)||void 0===a?void 0:a.line1,helpText:"No PO Boxes."})),t("div",{key:"7001ca8f0f123d3bd6c819b51bcd9859c138875d",class:"col-12"},t("form-control-text",{key:"47b8ffbf8e14d731187dfa6903ccc50ef7719eca",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(r=this.defaultValues)||void 0===r?void 0:r.line2,errorText:null===(c=this.errors)||void 0===c?void 0:c.line2})),t("div",{key:"24795c8373dfb546e7bb9bd841646a24455c72af",class:"col-12"},t("form-control-text",{key:"124aab7c415c972f010b98eca83e9eef51f96f33",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.city,errorText:null===(h=this.errors)||void 0===h?void 0:h.city})),t("div",{key:"b710a554fa639a3c0a7a31661379b480a537d776",class:"col-12 col-md-6"},t("form-control-select",{key:"3bca33f351147286fa34fdff51f0cfd9b5443658",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(n=this.defaultValues)||void 0===n?void 0:n.state,errorText:null===(b=this.errors)||void 0===b?void 0:b.state})),t("div",{key:"b869501766aa4482e9ea9edda29af9ecd05fac0e",class:"col-12 col-md-6"},t("form-control-text",{key:"29b3412e69ee4bf83bf211fa3f8395d6d80fde2d",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(u=this.defaultValues)||void 0===u?void 0:u.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===i.USA?5:7,keyDownHandler:this.country===i.USA?d:void 0}))))}},v=class{constructor(t){e(this,t),this.formControlInput=a(this,"formControlInput",7),this.formControlBlur=a(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=r(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?c:this.disabled?f:this.isFocused?h:n}render(){return t(s,{key:"c70d3fcce4d3e1e120008b03a708bb3d1038777b"},t("div",{key:"fc3c3cf5637121a7c6f662649a1b3910ec503afa",class:"form-group d-flex flex-column"},t("div",{key:"c06e87a0d72942e421c37ab406b7f71d4e7f2c54",class:"d-flex align-items-start gap-2"},t("label",{key:"eedeec0161e3085cd65ea08b3fb4517ff62c6ffc",part:b,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"9fb05bd91836ca51750f30a714a7940493bfad8b",helpText:this.helpText})),t("input",{key:"ef12caf83b42b0de0c33ece690bdd927b9b9a02c",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),t(u,{key:"8791f48bed5d6508b7cccad7bba8da7d65f96ffc",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return t(s,{key:"98aa8fad1d8e4fef6f015968dea21d6a3257ad9c"},t("form-address-fields",{key:"24f34471d209fc94bb00ce9b47b6018ba57019a7",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_address_fields,v as form_control_number_masked,p as identity_address_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as s,g as n}from"./p-CV0Pyo1O.js";import{A as o}from"./p-CMB3sNMT.js";import{A as a,r,s as l,t as h,u as c,v as d,w as u,I as p,m as y,n as m,o as v}from"./p-CBqZge6m.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as g}from"./p-BrO0HEFJ.js";import{c as M,a as b,g as k,b as w,o as j}from"./p-EBsfAkrP.js";import{t as P,r as T}from"./p-D50Rx76J.js";import{f as A}from"./p-MkDHT9M4.js";import{w as N,c as C}from"./p-DVJaoI_m.js";import{H as I}from"./p-DB_pqjwH.js";import{H as E,b as D,h as O,i as S}from"./p-_fynNk40.js";import{H as x}from"./p-D68EHdgA.js";import{J as L}from"./p-CmXujxGp.js";import{c as z}from"./p-D0BjjvYt.js";import"./p-HXpYMWUU.js";import{C as _,a as R,b as B}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as U,a as F}from"./p-D2muobcE.js";import{C as Y}from"./p-CAl_N2gi.js";import{P as H}from"./p-rz2BF2Sz.js";import{P as Q,a as V,b as G}from"./p-DkoufM1t.js";import{C as q}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-CIYOQWsL.js";const W=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click",7),this.checked=!1,this.hidden=!1}render(){return i(f,{key:"02955940079320bd9c6bf94e239545385ac36458"},i("radio-list-item",{key:"fc6b98e456e4326b843b2b3248b7327436767cf4",name:this.name,value:this.value,label:this.label,checked:this.checked,hidden:this.hidden,class:this.class,"onRadio-click":t=>this.radioClick.emit(t.detail)}))}};var Z;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(Z||(Z={}));class J{constructor(){this.api=o()}initialize(t){if(this.applePayConfig=new a(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.hostname,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const s=new l(t);if(!s.isValid){const t=[];throw s.countryCode||t.push("countryCode"),s.currencyCode||t.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||t.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||t.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((t,n)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),n({success:!1,error:{code:Z.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),this.setupSessionEventHandlers(t,n,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),n({success:!1,error:{code:Z.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,s);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:Z.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const o=n.payment,a=Object.assign(Object.assign({},o.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,s,a);l.success?(this.currentSession.completePayment({status:h.STATUS_SUCCESS}),t({success:!0,token:o.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:h.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const X=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(g,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},$=t=>i("div",{class:"apple-pay-button-container"},i("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case c.WHITE:e+=" apple-pay-button-white";break;case c.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case d.BUY:e+=" apple-pay-button-type-buy";break;case d.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width,height:t.height},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&i("div",{class:"processing-overlay"},i("div",{class:"spinner"}),i("span",null,"Processing..."))),i("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),K=class{constructor(i){t(this,i),this.applePayStarted=e(this,"applePayStarted",7),this.applePayCompleted=e(this,"applePayCompleted",7),this.applePayCancelled=e(this,"applePayCancelled",7),this.applePayError=e(this,"applePayError",7),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=c.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e,i;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:M.paymentCurrency,merchantCapabilities:[u.SUPPORTS_3DS,u.SUPPORTS_CREDIT,u.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(M.paymentDescription,M.paymentAmount)},s=await this.applePayService.startPaymentSession(i,M.authToken,M.accountId);s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=s.error)||void 0===e?void 0:e.code)||K.ErrorCode.PAYMENT_FAILED}))}catch(t){if((null===(i=null==t?void 0:t.error)||void 0===i?void 0:i.code)===Z.USER_CANCELLED)this.applePayCancelled.emit();else{const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:K.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(M.paymentAmount)&&Boolean(M.paymentCurrency)&&Boolean(M.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:M.paymentAmount,paymentCurrency:M.paymentCurrency,hasAuthToken:Boolean(M.authToken),accountId:M.accountId}),this.applePayError.emit({error:this.error,code:K.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new J,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:K.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!M.applePayEnabled)return null;const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return i(f,null,M.checkoutLoaded&&i("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),i("div",{class:"apple-pay-container"},i(X,{isLoading:this.isLoading}),t&&i($,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),i("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};K.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(f,{key:"f1ac17863df571d72e7db9b748b1980218145322"},i("internal-button",{key:"0b7052d216fb79ed5d9f90aacff97d39dce87473",text:this.text,variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,type:this.type,disabled:this.disabled,class:this.class,customStyle:this.customStyle,hidden:this.hidden}))}},et=class{constructor(e){t(this,e)}render(){return i(f,{key:"43b48a771bd617b3b3481e0976aa50b6b63e2d6e"},i("section",{key:"e112a767fef56b095f002dfb272a43eda42ede46"},i("div",{key:"079ce3aa4eb74004f5ecd3a634d2b42cf9c7a863"},i("div",{key:"5d816254f104e238122080fcf43356fd7f01bcfd",part:P},null==M?void 0:M.paymentDescription),i("div",{key:"e7d28a3a4cce7399c1fb45194f4fad172e0a2751"},i("span",{key:"b1683801875c39a8de8d93e0cdc8778a669eebfd",part:P},"Total")," ",i("span",{key:"ae2efd44a3ea54d77fcb284fee7361d0ba9b87e1",part:P},A(+(null==M?void 0:M.totalAmount)))))))}},it=t=>{const{isLoading:e}=t;return e?i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-center"},i(g,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null};var st;!function(t){t.initialize="justifi.googlePay.initialize",t.ready="justifi.googlePay.ready",t.sdkLoaded="justifi.googlePay.sdkLoaded",t.initializeResult="justifi.googlePay.initializeResult",t.error="justifi.googlePay.error",t.buttonClicked="justifi.googlePay.buttonClicked",t.startPayment="justifi.googlePay.startPayment",t.paymentSuccess="justifi.googlePay.paymentSuccess",t.paymentCanceled="justifi.googlePay.paymentCanceled",t.paymentError="justifi.googlePay.paymentError"}(st||(st={}));const nt=class{constructor(i){t(this,i),this.googlePayCompleted=e(this,"googlePayCompleted",7),this.googlePayCancelled=e(this,"googlePayCancelled",7),this.environment="TEST",this.iframeReady=!1,this.sdkLoaded=!1,this.isReadyToPay=!1,this.handleMessage=t=>{if(t.origin!==this.iframeOrigin)return;const{eventType:e,data:i}=t.data||{};switch(e){case st.ready:this.iframeReady=!0;break;case st.sdkLoaded:this.sdkLoaded=!0,this.sendInitialize();break;case st.initializeResult:this.isReadyToPay=i.isReadyToPay,i.error&&console.error("Init error:",i.error);break;case st.error:console.error("Google Pay error:",i);break;case st.buttonClicked:this.sendStartPayment();break;case st.paymentSuccess:this.googlePayCompleted.emit({success:!0,paymentMethodId:i.paymentMethodId,cardNetwork:i.cardNetwork,cardDetails:i.cardDetails});break;case st.paymentCanceled:this.googlePayCancelled.emit();break;case st.paymentError:this.googlePayCompleted.emit({success:!1,error:{code:i.code,message:i.message}})}}}async componentWillLoad(){await N(),this.iframeOrigin=C.iframeOrigin}componentDidLoad(){window.addEventListener("message",this.handleMessage)}disconnectedCallback(){window.removeEventListener("message",this.handleMessage)}sendInitialize(){var t;(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow)&&this.iframeElement.contentWindow.postMessage({eventType:st.initialize,data:{environment:this.environment,gatewayMerchantId:M.accountId,merchantName:this.merchantName,authToken:M.authToken,accountId:M.accountId}},this.iframeOrigin)}sendStartPayment(){var t;if(!(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow))return;const e={totalPrice:String(M.paymentAmount/100),totalPriceStatus:"FINAL",currencyCode:M.paymentCurrency||"USD"};this.iframeElement.contentWindow.postMessage({eventType:st.startPayment,data:e},this.iframeOrigin)}render(){return M.googlePayEnabled?i(s,null,i(it,{isLoading:!this.isReadyToPay}),i("iframe",{ref:t=>this.iframeElement=t,src:`${this.iframeOrigin}/v2/googlePay`,style:{border:"none",width:"100%",height:"48px",display:this.isReadyToPay?"block":"none"}})):(console.warn("Google Pay is not enabled for this checkout"),null)}},ot=class{constructor(e){t(this,e),this.levels={h1:I,h2:E,h3:x},this.level="h1"}render(){return i(f,{key:"879e301ec35e7cc536dec135e11daf140c67eeed"},i(this.levels[this.level],{key:"1766cb9a4d84bee1b3365b4df93515274cf31565",text:this.text,class:this.class}))}},at=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.checkoutChangedEvent=e(this,"checkout-changed",7),this.plaidService=new H,this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:s}=t.detail||{};e&&i?(M.paymentToken=i,M.selectedPaymentMethod={type:Q.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:s&&s.message||"Google Pay payment failed",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR})},this.handleGooglePayCancelled=()=>{M.paymentToken=void 0,M.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(M.paymentToken=s,M.selectedPaymentMethod={type:Q.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",n),this.errorEvent.emit({message:(null==n?void 0:n.message)||"Apple Pay payment failed",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:_.ERROR})},this.handleApplePayCancelled=()=>{M.paymentToken=void 0,M.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),M.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new Y};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var o;try{const a=await i.fetchCheckout(t,e);if(a.error)return n({error:F(a.error),code:U(null===(o=a.error)||void 0===o?void 0:o.code),severity:_.ERROR});s({checkout:a.data})}catch(t){const e=U(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:_.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:o})=>{var a;try{const r=await i.complete(t,e,s);if(r.error)return o({error:F(r.error),code:U(null===(a=r.error)||void 0===a?void 0:a.code),severity:_.ERROR});n({checkout:r.data})}catch(t){const e=U(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:_.ERROR})}})(t),b((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new L(this),z(),M.authToken=this.authToken,this.fetchCheckout(),D("set",(t=>{const e=S[t];void 0!==e&&O(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==p.completed?t.status!==p.expired||this.errorEvent.emit({message:B.CHECKOUT_EXPIRED,errorCode:R.CHECKOUT_EXPIRED,severity:_.ERROR}):this.errorEvent.emit({message:B.CHECKOUT_ALREADY_COMPLETED,errorCode:R.CHECKOUT_ALREADY_COMPLETED,severity:_.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:B.NOT_AUTHENTICATED,errorCode:R.NOT_AUTHENTICATED,severity:_.ERROR})}updateStore(t){var e,i,s,n,o,a,r;M.accountId=t.account_id,M.checkoutLoaded=!0,M.paymentMethods=t.payment_methods.map((t=>new V(t))),M.paymentMethodGroupId=t.payment_method_group_id,M.paymentDescription=t.payment_description,M.totalAmount=t.total_amount,M.paymentAmount=t.payment_amount,M.bnplEnabled=t.payment_settings.bnpl_payments,M.insuranceEnabled=t.payment_settings.insurance_payments,M.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,M.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,M.googlePayEnabled=null===(s=t.payment_settings)||void 0===s?void 0:s.google_payments,M.bnplProviderClientId=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_client_id,M.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,M.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,M.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:k(),selectedPaymentMethod:M.selectedPaymentMethod,savedPaymentMethods:M.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){if(this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full, justifi-tokenize-payment-method"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),!M.selectedPaymentMethod&&this.paymentMethodFormRef){const t=this.paymentMethodFormRef.tagName.toLowerCase();"justifi-card-form"===t?M.selectedPaymentMethod={type:Q.NEW_CARD}:"justifi-bank-account-form"===t&&(M.selectedPaymentMethod={type:Q.NEW_BANK_ACCOUNT})}this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const n=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},t),n),a=Object.assign({accountId:M.accountId,payment_method_group_id:void 0},o);M.savePaymentMethod&&(a.payment_method_group_id=M.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:M.accountId}));return r.error?r:(M.paymentToken=r.id,r.id)}async fillBillingForm(t){M.billingFormFields=t}async setSelectedPaymentMethod(t){M.selectedPaymentMethod=t,M.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];M.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=M.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.NEW_CARD,n=(null===(e=M.selectedPaymentMethod)||void 0===e?void 0:e.type)===Q.NEW_BANK_ACCOUNT;if((s||n)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:R.VALIDATION_ERROR,severity:_.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,o;const a=await this.validate();if(!M.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:R.VALIDATION_ERROR,severity:_.ERROR});const r=(null===(e=M.selectedPaymentMethod)||void 0===e?void 0:e.type)===Q.NEW_CARD,l=(null===(i=M.selectedPaymentMethod)||void 0===i?void 0:i.type)===Q.NEW_BANK_ACCOUNT,h=(null===(s=M.selectedPaymentMethod)||void 0===s?void 0:s.type)===Q.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:R.TOKENIZE_ERROR,severity:_.ERROR})}if(h&&!M.paymentToken){const t=M.plaidPublicToken,e=M.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(M.authToken,M.accountId,t,e||void 0,M.savePaymentMethod?M.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR});const s=null==i?void 0:i.data,o=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);M.paymentToken=o}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:R.VALIDATION_ERROR,severity:_.ERROR});if(!M.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:R.TOKENIZE_ERROR,severity:_.ERROR});let c;if(c={payment_mode:(t=>{switch(t){case Q.NEW_CARD:case Q.SAVED_CARD:case Q.NEW_BANK_ACCOUNT:case Q.SAVED_BANK_ACCOUNT:case Q.PLAID:return G.ECOM;case Q.SEZZLE:return G.BNPL;case Q.APPLE_PAY:return G.APPLE_PAY;case Q.GOOGLE_PAY:return G.GOOGLE_PAY;default:return}})(null===(o=M.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:M.paymentToken},this.preCompleteHook){const t=w();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:c,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:R.COMPLETE_CHECKOUT_ERROR,severity:_.ERROR})}})}render(){return i(s,{key:"f97e00da82355bfd1bf1ce34acefc4adfe0863dc"})}get hostEl(){return n(this)}},rt=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.plaidError=e(this,"plaidError",7),this.plaidErrorRecovered=e(this,"plaidErrorRecovered",7),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new H,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{M.authToken&&M.accountId&&M.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:m[v.PLAID_LINK_TOKEN_FAILED],severity:y[v.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:v.PLAID_LINK_INIT_FAILED,message:m[v.PLAID_LINK_INIT_FAILED],severity:y[v.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!M.authToken||!M.accountId)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:_.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(M.authToken,M.accountId,M.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(M.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=v.PLAID_LINK_TOKEN_FAILED,a=m[o],r=!0;"AbortError"===t.name?(o=v.PLAID_TIMEOUT,a=m[o],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(o=v.PLAID_NETWORK_ERROR,a=m[o],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(n=t.message)||void 0===n?void 0:n.includes("unauthorized")))&&(o=v.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:y[o],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return v.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return v.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return v.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return v.PLAID_RATE_LIMITED;case"maintenance":return v.PLAID_MAINTENANCE;case"not_authenticated":return v.PLAID_INVALID_CREDENTIALS;default:return v.PLAID_LINK_TOKEN_FAILED}return v.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,M.selectedPaymentMethod={type:Q.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:_.INFO}),M.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=v.PLAID_AUTHENTICATION_FAILED,i=m[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=v.PLAID_INVALID_CREDENTIALS,i=m[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=v.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=v.PLAID_ACCOUNT_LOCKED,i=m[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=v.PLAID_MAINTENANCE,i=m[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=v.PLAID_RATE_LIMITED,i=m[e],s=!0;break;case"INVALID_REQUEST":e=v.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=v.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const o=t.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(e=v.PLAID_BANK_NOT_SUPPORTED,i=m[e],s=!1,n="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(e=v.PLAID_TOKEN_EXPIRED,i=m[e],s=!0)}this.handleError({code:e,message:i,severity:y[e],originalError:t,retryable:s,userAction:n}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=M.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=M.selectedPaymentMethod)||void 0===e?void 0:e.type)!==Q.PLAID&&(M.selectedPaymentMethod={type:Q.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=M.selectedPaymentMethod)||void 0===t?void 0:t.type)===Q.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return M.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,M.selectedPaymentMethod={type:Q.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(M.selectedPaymentMethod={type:Q.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=j("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==M.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[JustifiPlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=i("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return i(f,{class:"payment-method"},i("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),i("div",{title:"Pay with Plaid"},i("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?i("div",{class:(this.error.severity===_.ERROR?"text-danger":this.error.severity===_.WARNING?"text-warning":"text-info")+" mt-2"},i("small",null,this.error.message),i("br",null),i("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&i("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?i("div",{class:"text-info mt-2"},i("small",null,"Connecting to your bank...")):this.publicToken?i("div",{class:"text-success mt-2"},i("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:i("div",{class:"text-muted mt-2"},i("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},lt=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),M.selectedPaymentMethod={id:t.id,type:t.type},M.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===Q.SAVED_CARD&&M.disableCreditCard||t===Q.SAVED_BANK_ACCOUNT&&M.disableBankAccount)}componentWillLoad(){M.paymentMethods.length||console.warn("No saved payment methods available."),M.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return M.disablePaymentMethodGroup?null:i(f,null,i("div",{class:"saved-payment-methods"},M.paymentMethods.length?M.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((t=>i("div",{class:"radio-list-item p-3",part:T,onClick:this.onPaymentMethodOptionClick(t)},i("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:M.paymentToken===(null==t?void 0:t.id),label:`${q[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},ht=i("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),ct=class{constructor(i){t(this,i),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=Q.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(M.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:M.bnplProviderClientId,apiMode:M.bnplProviderMode,apiVersion:M.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:M.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){M.selectedPaymentMethod={type:Q.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,e;return M.bnplEnabled?i(f,{class:"payment-method"},i("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),i("div",null,i("div",null,"Buy now, pay later with ",ht),this.installmentPlan&&i("small",null,i("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",i("span",null,this.installmentPlan.schedule," payments of")," ",i("span",{class:"fw-bold"},A(null===(e=this.installmentPlan)||void 0===e?void 0:e.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}},dt={[Q.NEW_BANK_ACCOUNT]:"New bank account",[Q.NEW_CARD]:"New credit or debit card"},ut="Payment form not ready",pt="Validation error",yt=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){z(),this.analytics=new L(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,M.selectedPaymentMethod={type:t.detail}}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:R.TOKENIZE_ERROR,message:pt}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(R.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:R.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async fillBillingForm(t){M.billingFormFields=t}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:ut}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async getValues(){return this.billingFormRef.getValues()}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||M.authToken,account:this.accountId||M.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||M.authToken||this.emitError({errorCode:R.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||M.accountId||this.emitError({errorCode:R.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=Q.NEW_BANK_ACCOUNT,M.selectedPaymentMethod={type:Q.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=Q.NEW_CARD,M.selectedPaymentMethod={type:Q.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(Q.NEW_CARD),this.disableBankAccount||t.push(Q.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:_.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",ut);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||pt;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||M.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!M.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===M.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:dt[t],hidden:this.shouldHideRadioInput}),e&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return i("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),i("div",{class:"mt-4"},i("billing-form",{ref:t=>{t&&(this.billingFormRef=t)},hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===Q.NEW_CARD?"card-form":"bank-account-form",{ref:t=>{t&&(this.paymentMethodFormRef=t)}})}render(){return i(f,{key:"2d4349f3e5ad632981cdeb14dbe4e483f79379da"},i("form",{key:"754afee2c5229cf016bd8fc0cf81041cf37270a8"},i("fieldset",{key:"01867151a09d384e1258ef7f62fbc88c526706cc"},i("div",{key:"7ba453d4629a0c2ef583daddcb9cf02ac5eee265",class:"row gy-3"},i("div",{key:"4148f2269c738a00f2684d69d4a83a4ab2424f2b",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"e67b09357571aadfb3d2712f55954506748b3826",class:"col-12"},i("internal-button",{key:"c2e805060ff7e9e97144533ffad3b4a02433e792",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return n(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}};export{K as justifi_apple_pay,tt as justifi_button,et as justifi_checkout_summary,nt as justifi_google_pay,ot as justifi_header,at as justifi_modular_checkout,rt as justifi_plaid_payment_method,W as justifi_radio_list_item,lt as justifi_saved_payment_methods,ct as justifi_sezzle_payment_method,yt as justifi_tokenize_payment_method}
@@ -1 +1 @@
1
- import{h as s,F as t,r as i,c as e}from"./p-CV0Pyo1O.js";import{E as l}from"./p-COZ-9O53.js";import{S as r}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-C0tps2ph.js";import"./p-D3V9AE6o.js";const n=()=>{const i=()=>s("div",{class:"mt-5"},s(o,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null)),s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=e(this,"error-event",7),this.renderState=a.LOADING}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return s(r,null,this.renderState===a.LOADING?s(n,null):this.renderState===a.ERROR?l(this.errorMessage):s("justifi-details",{errorMessage:this.errorMessage},s("div",{slot:"detail-sections"},s("core-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))))}};export{d as business_details_core}
1
+ import{h as s,F as t,r as i,c as e}from"./p-CV0Pyo1O.js";import{E as r}from"./p-CjuaXEuI.js";import{S as l}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-BrO0HEFJ.js";import"./p-D50Rx76J.js";const n=()=>{const i=()=>s("div",{class:"mt-5"},s(o,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null)),s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=e(this,"error-event",7),this.renderState=a.LOADING}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return s(l,null,this.renderState===a.LOADING?s(n,null):this.renderState===a.ERROR?r(this.errorMessage):s("justifi-details",{errorMessage:this.errorMessage},s("div",{slot:"detail-sections"},s("core-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))))}};export{d as business_details_core}
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as a}from"./p-CV0Pyo1O.js";import{S as s}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";const o=class{constructor(a){e(this,a),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method"}render(){return a(s,{key:"58ca6f98ace8aba5658fa38215b0c0756907ce9f"},a("save-new-payment-method",{key:"6bfd3950c0bdf26bca6866ebf1b155ac39466516",label:this.label,hidden:this.hidden,onCheckboxChanged:e=>this.checkboxChanged.emit(e.detail)}))}};export{o as justifi_save_new_payment_method}