@justifi/webcomponents 6.5.0 → 6.5.1-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (545) hide show
  1. package/dist/cjs/{Refund-Blquw3jZ.js → GooglePay-HXBAmTgL.js} +415 -0
  2. package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +8 -7
  3. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  4. package/dist/cjs/{business.service-DrBmfEbR.js → business.service-DMzf08nC.js} +1 -1
  5. package/dist/cjs/card-form.cjs.entry.js +2 -2
  6. package/dist/cjs/{check-pkg-version-D06Nzj0h.js → check-pkg-version-Bw6Rz_E3.js} +2 -2
  7. package/dist/cjs/{checkout.service-BEU6CI0t.js → checkout.service-CHNHEsrp.js} +1 -1
  8. package/dist/cjs/checkouts-list-core.cjs.entry.js +3 -2
  9. package/dist/cjs/custom-popper.cjs.entry.js +2 -2
  10. package/dist/cjs/{dispute.service-c0CZxPpe.js → dispute.service-B63kcFkU.js} +1 -1
  11. package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
  12. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  13. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  14. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  15. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +2 -2
  16. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  17. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +4 -4
  18. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  19. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  20. package/dist/cjs/form-control-select_3.cjs.entry.js +4 -4
  21. package/dist/cjs/{get-payment-details-D8UQRtX1.js → get-payment-details-BN139jp0.js} +2 -2
  22. package/dist/cjs/{get-subaccounts-fKcKqvrx.js → get-subaccounts-IgHJX5J4.js} +2 -2
  23. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  24. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  25. package/dist/cjs/{index-C2ITzalN.js → index-CajjbB9t.js} +1 -0
  26. package/dist/cjs/index.cjs.js +1 -1
  27. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -24
  28. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +6 -5
  29. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +12 -11
  30. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  31. package/dist/cjs/{justifi-apple-pay_7.cjs.entry.js → justifi-apple-pay_8.cjs.entry.js} +899 -253
  32. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
  33. package/dist/cjs/justifi-business-details.cjs.entry.js +5 -4
  34. package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
  35. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
  36. package/dist/cjs/justifi-checkout.cjs.entry.js +14 -15
  37. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +10 -9
  38. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +8 -7
  39. package/dist/cjs/justifi-details.cjs.entry.js +1 -1
  40. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  41. package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -5
  42. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +9 -8
  43. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
  44. package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -9
  45. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +7 -6
  46. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
  47. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  48. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
  49. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -6
  50. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  51. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -6
  52. package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -5
  53. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -6
  54. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  55. package/dist/cjs/justifi-payouts-list.cjs.entry.js +8 -7
  56. package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -9
  57. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  58. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -8
  59. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  60. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +12 -11
  61. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -6
  62. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -7
  63. package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -7
  64. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
  65. package/dist/cjs/loader.cjs.js +1 -1
  66. package/dist/cjs/{package-gCv25hzn.js → package--UMqvxMQ.js} +1 -1
  67. package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
  68. package/dist/cjs/payment-details-core.cjs.entry.js +11 -10
  69. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  70. package/dist/cjs/{payment.service-DXbR13Kq.js → payment.service-eOZc1Qay.js} +1 -1
  71. package/dist/cjs/payments-list-core.cjs.entry.js +3 -2
  72. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  73. package/dist/cjs/{payout.service-D0U6kzXJ.js → payout.service-QVl5N-UV.js} +1 -1
  74. package/dist/cjs/payouts-list-core.cjs.entry.js +3 -2
  75. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  76. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +4 -3
  77. package/dist/cjs/{terminal-orders-table-BByfBAEK.js → terminal-orders-table-g2fwrh2P.js} +3 -3
  78. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  79. package/dist/cjs/{terminal.service-BqXeiERV.js → terminal.service-BuSFyt0j.js} +1 -1
  80. package/dist/cjs/terminals-list-core.cjs.entry.js +3 -2
  81. package/dist/cjs/webcomponents.cjs.js +1 -1
  82. package/dist/collection/api/GooglePay.js +181 -0
  83. package/dist/collection/api/index.js +2 -0
  84. package/dist/collection/api/services/google-pay.service.js +240 -0
  85. package/dist/collection/collection-manifest.json +2 -1
  86. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +7 -6
  87. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
  88. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +8 -7
  89. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +7 -6
  90. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
  91. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
  92. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +8 -7
  93. package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
  94. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
  95. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
  96. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +1 -1
  97. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  98. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +1 -1
  99. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +1 -1
  100. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  101. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
  102. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -2
  103. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
  104. package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +1 -1
  105. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
  106. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
  107. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
  108. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
  109. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
  110. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
  111. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
  112. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  113. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  114. package/dist/collection/components/checkout/checkout.js +2 -2
  115. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  116. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  117. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  118. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  119. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  120. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  121. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  122. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  123. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  124. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  125. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  126. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  127. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  128. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  129. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  130. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  131. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  132. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  133. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  134. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  135. package/dist/collection/components/modular-checkout/ModularCheckout.js +1 -0
  136. package/dist/collection/components/modular-checkout/modular-checkout.js +46 -9
  137. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  138. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  139. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  140. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  141. package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +10 -0
  142. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +609 -0
  143. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  144. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  145. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  146. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  147. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  148. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  149. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  150. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  151. package/dist/collection/components/payments-list/payments-list.js +1 -1
  152. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  153. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  154. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  155. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  156. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  157. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  158. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  159. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  160. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  161. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  162. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  163. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +3 -4
  164. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +5 -10
  165. package/dist/collection/store/checkout.store.js +4 -0
  166. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  167. package/dist/collection/ui-components/details/details.js +1 -1
  168. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  169. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  170. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  171. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  172. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  173. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  174. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  175. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  176. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  177. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  178. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  179. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  180. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  181. package/dist/collection/ui-components/google-pay-button.js +251 -0
  182. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
  183. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  184. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  185. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +1 -1
  186. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  187. package/dist/docs.json +567 -119
  188. package/dist/esm/{Refund-BugCdfRo.js → GooglePay-9bPcqGZ9.js} +405 -1
  189. package/dist/esm/bank-account-document-form-inputs_6.entry.js +8 -7
  190. package/dist/esm/bank-account-form.entry.js +2 -2
  191. package/dist/esm/{business.service-pWcc3kfX.js → business.service-2j91Emgq.js} +1 -1
  192. package/dist/esm/card-form.entry.js +2 -2
  193. package/dist/esm/{check-pkg-version-AQP98jzk.js → check-pkg-version-2BU_KPHv.js} +2 -2
  194. package/dist/esm/{checkout.service-B4xSV2-X.js → checkout.service-D-dEMyXF.js} +1 -1
  195. package/dist/esm/checkouts-list-core.entry.js +3 -2
  196. package/dist/esm/custom-popper.entry.js +2 -2
  197. package/dist/esm/{dispute.service-3Kbbh1J9.js → dispute.service-DPumDIuV.js} +1 -1
  198. package/dist/esm/form-alert_5.entry.js +6 -6
  199. package/dist/esm/form-control-checkbox.entry.js +2 -2
  200. package/dist/esm/form-control-date.entry.js +2 -2
  201. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  202. package/dist/esm/form-control-monetary-provisioning.entry.js +2 -2
  203. package/dist/esm/form-control-monetary.entry.js +2 -2
  204. package/dist/esm/form-control-number-masked_3.entry.js +4 -4
  205. package/dist/esm/form-control-number.entry.js +2 -2
  206. package/dist/esm/form-control-radio.entry.js +2 -2
  207. package/dist/esm/form-control-select_3.entry.js +4 -4
  208. package/dist/esm/{get-payment-details-CakzKvOr.js → get-payment-details-CD_K6FQ3.js} +1 -1
  209. package/dist/esm/{get-subaccounts-Cw1Adtmo.js → get-subaccounts-D1eF6c0B.js} +1 -1
  210. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  211. package/dist/esm/hidden-input_2.entry.js +5 -5
  212. package/dist/esm/{index-DCIW8z1f.js → index-DkoufM1t.js} +1 -0
  213. package/dist/esm/index.js +1 -1
  214. package/dist/esm/internal-tokenize-payment-method_7.entry.js +12 -13
  215. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +2 -1
  216. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +12 -11
  217. package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
  218. package/dist/esm/{justifi-apple-pay_7.entry.js → justifi-apple-pay_8.entry.js} +782 -137
  219. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
  220. package/dist/esm/justifi-business-details.entry.js +5 -4
  221. package/dist/esm/justifi-business-form.entry.js +5 -4
  222. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  223. package/dist/esm/justifi-checkout.entry.js +7 -8
  224. package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -2
  225. package/dist/esm/justifi-checkouts-list.entry.js +7 -6
  226. package/dist/esm/justifi-details.entry.js +1 -1
  227. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  228. package/dist/esm/justifi-dispute-management.entry.js +6 -5
  229. package/dist/esm/justifi-dispute-notification_3.entry.js +9 -8
  230. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
  231. package/dist/esm/justifi-order-terminals.entry.js +7 -6
  232. package/dist/esm/justifi-owner-form_3.entry.js +7 -6
  233. package/dist/esm/justifi-payment-details.entry.js +6 -5
  234. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  235. package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
  236. package/dist/esm/justifi-payment-transactions-list.entry.js +6 -5
  237. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  238. package/dist/esm/justifi-payments-list.entry.js +6 -5
  239. package/dist/esm/justifi-payout-details.entry.js +5 -4
  240. package/dist/esm/justifi-payout-transactions-list.entry.js +6 -5
  241. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  242. package/dist/esm/justifi-payouts-list.entry.js +7 -6
  243. package/dist/esm/justifi-refund-payment.entry.js +6 -5
  244. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  245. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
  246. package/dist/esm/justifi-skeleton.entry.js +1 -1
  247. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +4 -3
  248. package/dist/esm/justifi-terminal-orders-list.entry.js +6 -5
  249. package/dist/esm/justifi-terminals-list-filters.entry.js +3 -2
  250. package/dist/esm/justifi-terminals-list.entry.js +7 -6
  251. package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
  252. package/dist/esm/loader.js +1 -1
  253. package/dist/esm/{package-DQf0KCJj.js → package-Bx3wyDU2.js} +1 -1
  254. package/dist/esm/pagination-menu.entry.js +3 -3
  255. package/dist/esm/payment-details-core.entry.js +10 -9
  256. package/dist/esm/payment-method-option.entry.js +1 -1
  257. package/dist/esm/{payment.service-nExZY_sU.js → payment.service-BreQSu6J.js} +1 -1
  258. package/dist/esm/payments-list-core.entry.js +3 -2
  259. package/dist/esm/payout-details-core.entry.js +3 -3
  260. package/dist/esm/{payout.service-B9-JQqU6.js → payout.service-DuqRe6oq.js} +1 -1
  261. package/dist/esm/payouts-list-core.entry.js +3 -2
  262. package/dist/esm/table-filters-menu.entry.js +1 -1
  263. package/dist/esm/terminal-orders-list-core.entry.js +4 -3
  264. package/dist/esm/{terminal-orders-table-DsrpmD9F.js → terminal-orders-table-DSo5x2D7.js} +1 -1
  265. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  266. package/dist/esm/{terminal.service-DvFiKAKV.js → terminal.service-CkzrYIA_.js} +1 -1
  267. package/dist/esm/terminals-list-core.entry.js +3 -2
  268. package/dist/esm/webcomponents.js +1 -1
  269. package/dist/module/Analytics.js +2 -0
  270. package/dist/module/ApplePay.js +121 -0
  271. package/dist/module/GooglePay.js +184 -0
  272. package/dist/module/ModularCheckout.js +1 -0
  273. package/dist/module/additional-questions.js +2 -2
  274. package/dist/module/additional-statement.js +1 -1
  275. package/dist/module/apple-pay.js +1 -120
  276. package/dist/module/bank-account-billing-form-simple.js +1 -1
  277. package/dist/module/bank-account-document-inputs.js +3 -1
  278. package/dist/module/bank-account-form-inputs-canada2.js +1 -1
  279. package/dist/module/bank-account-form-inputs2.js +1 -1
  280. package/dist/module/bank-account-form.js +2 -2
  281. package/dist/module/bank-account-read-only-value2.js +1 -1
  282. package/dist/module/bank-account.js +2 -2
  283. package/dist/module/business-additional-questions-form-step.js +1 -1
  284. package/dist/module/business-bank-account-form-step-core.js +2 -0
  285. package/dist/module/business-bank-account-form-step.js +3 -1
  286. package/dist/module/business-core-info-form-step.js +1 -1
  287. package/dist/module/business-core-info.js +2 -2
  288. package/dist/module/business-owners-form-step.js +1 -1
  289. package/dist/module/business-representative-form-inputs.js +2 -2
  290. package/dist/module/business-representative-form-step.js +1 -1
  291. package/dist/module/business-representative.js +3 -3
  292. package/dist/module/business-terms-conditions-form-step.js +3 -1
  293. package/dist/module/business.service.js +2 -0
  294. package/dist/module/cancellation-policy.js +1 -1
  295. package/dist/module/card-billing-form-simple.js +1 -1
  296. package/dist/module/card-form.js +2 -2
  297. package/dist/module/card-form2.js +2 -2
  298. package/dist/module/checkout.service.js +2 -0
  299. package/dist/module/checkout.store.js +4 -0
  300. package/dist/module/checkouts-list-core2.js +3 -1
  301. package/dist/module/custom-popper2.js +2 -2
  302. package/dist/module/customer-details.js +1 -1
  303. package/dist/module/details.js +1 -1
  304. package/dist/module/dispute-management-core.js +1 -1
  305. package/dist/module/dispute-notification.js +2 -2
  306. package/dist/module/dispute-response-actions.js +2 -0
  307. package/dist/module/dispute-response-core.js +1 -1
  308. package/dist/module/dispute-response.js +1 -1
  309. package/dist/module/duplicate-charge.js +1 -1
  310. package/dist/module/electronic-evidence.js +1 -1
  311. package/dist/module/form-address-fields.js +1 -1
  312. package/dist/module/form-control-checkbox2.js +2 -2
  313. package/dist/module/form-control-date2.js +2 -2
  314. package/dist/module/form-control-file-v22.js +1 -1
  315. package/dist/module/form-control-file2.js +2 -2
  316. package/dist/module/form-control-monetary-provisioning2.js +2 -2
  317. package/dist/module/form-control-monetary2.js +2 -2
  318. package/dist/module/form-control-number-masked2.js +2 -2
  319. package/dist/module/form-control-number.js +2 -2
  320. package/dist/module/form-control-radio2.js +2 -2
  321. package/dist/module/form-control-select2.js +2 -2
  322. package/dist/module/form-control-text2.js +2 -2
  323. package/dist/module/form-control-textarea2.js +2 -2
  324. package/dist/module/get-payment-details.js +2 -0
  325. package/dist/module/get-subaccounts.js +2 -0
  326. package/dist/module/google-pay.js +781 -0
  327. package/dist/module/gross-payment-chart-core2.js +1 -1
  328. package/dist/module/hidden-input2.js +1 -1
  329. package/dist/module/identity-address-form.js +1 -1
  330. package/dist/module/iframe-input2.js +3 -3
  331. package/dist/module/internal-tokenize-payment-method2.js +3 -1
  332. package/dist/module/justifi-business-form.js +2 -0
  333. package/dist/module/justifi-button2.js +1 -1
  334. package/dist/module/justifi-checkout.js +46 -40
  335. package/dist/module/justifi-checkouts-list-filters.js +3 -1
  336. package/dist/module/justifi-checkouts-list.js +3 -1
  337. package/dist/module/justifi-dispute-management.js +1 -1
  338. package/dist/module/justifi-google-pay.d.ts +11 -0
  339. package/dist/module/justifi-google-pay.js +6 -0
  340. package/dist/module/justifi-gross-payment-chart.js +2 -0
  341. package/dist/module/justifi-header2.js +1 -1
  342. package/dist/module/justifi-order-terminals.js +3 -1
  343. package/dist/module/justifi-payment-provisioning.js +3 -1
  344. package/dist/module/justifi-payment-transactions-list.js +3 -1
  345. package/dist/module/justifi-payments-list-filters.js +2 -2
  346. package/dist/module/justifi-payments-list.js +3 -1
  347. package/dist/module/justifi-payout-details.js +2 -0
  348. package/dist/module/justifi-payout-transactions-list.js +3 -1
  349. package/dist/module/justifi-payouts-list-filters.js +2 -2
  350. package/dist/module/justifi-payouts-list.js +3 -1
  351. package/dist/module/justifi-radio-list-item2.js +1 -1
  352. package/dist/module/justifi-refund-payment.js +2 -0
  353. package/dist/module/justifi-saved-payment-method.js +1 -1
  354. package/dist/module/justifi-season-interruption-insurance.js +2 -0
  355. package/dist/module/justifi-skeleton.js +1 -1
  356. package/dist/module/justifi-terminal-orders-list-filters.js +4 -2
  357. package/dist/module/justifi-terminal-orders-list.js +3 -1
  358. package/dist/module/justifi-terminals-list-filters.js +3 -1
  359. package/dist/module/justifi-terminals-list.js +3 -1
  360. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  361. package/dist/module/legal-address-form-step.js +1 -1
  362. package/dist/module/legal-address-form.js +2 -2
  363. package/dist/module/modular-checkout.js +46 -6
  364. package/dist/module/owner-form-core2.js +1 -1
  365. package/dist/module/owner-form-inputs2.js +3 -3
  366. package/dist/module/owner-form.js +1 -1
  367. package/dist/module/package.js +1 -1
  368. package/dist/module/pagination-menu2.js +3 -3
  369. package/dist/module/payment-details-core2.js +10 -8
  370. package/dist/module/payment-method-option.js +1 -1
  371. package/dist/module/payment-provisioning-core.js +1 -1
  372. package/dist/module/payment-provisioning-form-buttons.js +1 -1
  373. package/dist/module/payment-provisioning-form-steps.js +1 -1
  374. package/dist/module/payment.service.js +2 -0
  375. package/dist/module/payments-list-core2.js +3 -1
  376. package/dist/module/payout-details-core2.js +3 -3
  377. package/dist/module/payout.service.js +2 -0
  378. package/dist/module/payouts-list-core2.js +3 -1
  379. package/dist/module/plaid.service.js +2 -0
  380. package/dist/module/product-or-service.js +1 -1
  381. package/dist/module/refund-policy.js +1 -1
  382. package/dist/module/save-new-payment-method.js +1 -1
  383. package/dist/module/shipping-details.js +1 -1
  384. package/dist/module/summary.js +1 -1
  385. package/dist/module/table-filters-menu2.js +1 -1
  386. package/dist/module/terminal-orders-list-core2.js +3 -1
  387. package/dist/module/terminal-quantity-selector2.js +1 -1
  388. package/dist/module/terminal.service.js +2 -0
  389. package/dist/module/terminals-list-core2.js +3 -1
  390. package/dist/types/api/Checkout.d.ts +2 -0
  391. package/dist/types/api/GooglePay.d.ts +271 -0
  392. package/dist/types/api/index.d.ts +2 -0
  393. package/dist/types/api/services/google-pay.service.d.ts +60 -0
  394. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -3
  395. package/dist/types/components/checkout/checkout.d.ts +1 -0
  396. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +2 -1
  397. package/dist/types/components/modular-checkout/modular-checkout.d.ts +5 -0
  398. package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +6 -0
  399. package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +59 -0
  400. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +1 -1
  401. package/dist/types/components.d.ts +160 -22
  402. package/dist/types/store/checkout.store.d.ts +1 -0
  403. package/dist/types/ui-components/google-pay-button.d.ts +18 -0
  404. package/dist/webcomponents/index.esm.js +1 -1
  405. package/dist/webcomponents/p-03930216.entry.js +1 -0
  406. package/dist/webcomponents/{p-aec9185f.entry.js → p-03c8c754.entry.js} +1 -1
  407. package/dist/webcomponents/p-0412f491.entry.js +1 -0
  408. package/dist/webcomponents/p-04154136.entry.js +1 -0
  409. package/dist/webcomponents/p-06ce1202.entry.js +1 -0
  410. package/dist/webcomponents/p-0772719b.entry.js +1 -0
  411. package/dist/webcomponents/p-0cd1c683.entry.js +1 -0
  412. package/dist/webcomponents/p-136b29e3.entry.js +1 -0
  413. package/dist/webcomponents/p-13bdb5ed.entry.js +1 -0
  414. package/dist/webcomponents/p-16812327.entry.js +1 -0
  415. package/dist/webcomponents/{p-1193a1ac.entry.js → p-19dabeab.entry.js} +1 -1
  416. package/dist/webcomponents/p-1d04bd7a.entry.js +1 -0
  417. package/dist/webcomponents/p-1f196690.entry.js +1 -0
  418. package/dist/webcomponents/{p-800660f2.entry.js → p-270bf699.entry.js} +1 -1
  419. package/dist/webcomponents/p-2da4e6ca.entry.js +1 -0
  420. package/dist/webcomponents/p-2eb123a3.entry.js +1 -0
  421. package/dist/webcomponents/p-38e1ef4b.entry.js +1 -0
  422. package/dist/webcomponents/p-3ae12b98.entry.js +1 -0
  423. package/dist/webcomponents/{p-58ae4f9e.entry.js → p-3bacf834.entry.js} +1 -1
  424. package/dist/webcomponents/p-3c006a15.entry.js +1 -0
  425. package/dist/webcomponents/p-404b3f02.entry.js +1 -0
  426. package/dist/webcomponents/p-42658888.entry.js +1 -0
  427. package/dist/webcomponents/p-43390a7f.entry.js +1 -0
  428. package/dist/webcomponents/p-47f6d271.entry.js +1 -0
  429. package/dist/webcomponents/{p-e2e6c201.entry.js → p-48d1bc83.entry.js} +1 -1
  430. package/dist/webcomponents/{p-af48a6bb.entry.js → p-4e71de94.entry.js} +1 -1
  431. package/dist/webcomponents/p-4f102cfd.entry.js +1 -0
  432. package/dist/webcomponents/p-5cba8448.entry.js +1 -0
  433. package/dist/webcomponents/p-7b610d9e.entry.js +1 -0
  434. package/dist/webcomponents/p-7bf6ded7.entry.js +1 -0
  435. package/dist/webcomponents/p-7dbd0618.entry.js +1 -0
  436. package/dist/webcomponents/{p-1edec396.entry.js → p-86111a0a.entry.js} +1 -1
  437. package/dist/webcomponents/p-88f58abe.entry.js +1 -0
  438. package/dist/webcomponents/p-8b6b7e20.entry.js +1 -0
  439. package/dist/webcomponents/p-8f4adcfd.entry.js +1 -0
  440. package/dist/webcomponents/p-8fcd277c.entry.js +1 -0
  441. package/dist/webcomponents/p-9065d67e.entry.js +1 -0
  442. package/dist/webcomponents/p-914b590d.entry.js +1 -0
  443. package/dist/webcomponents/p-9370cf0d.entry.js +1 -0
  444. package/dist/webcomponents/p-9a795f44.entry.js +1 -0
  445. package/dist/webcomponents/{p-CPtsjcdm.js → p-BKM7YeAB.js} +1 -1
  446. package/dist/webcomponents/p-BN1PYSFf.js +1 -0
  447. package/dist/webcomponents/p-BRbk6oSh.js +1 -0
  448. package/dist/webcomponents/{p-CFevTCAJ.js → p-BVwVhXcQ.js} +1 -1
  449. package/dist/webcomponents/p-Bx3wyDU2.js +1 -0
  450. package/dist/webcomponents/p-BxtmTjqW.js +1 -0
  451. package/dist/webcomponents/{p-LeyS3YJV.js → p-C01zp4xw.js} +1 -1
  452. package/dist/webcomponents/p-CQrwlULd.js +1 -0
  453. package/dist/webcomponents/{p-B4ZUYyNh.js → p-CVhnuewz.js} +1 -1
  454. package/dist/webcomponents/{p-D_IJC4HG.js → p-Cmb6PRFh.js} +1 -1
  455. package/dist/webcomponents/p-DkoufM1t.js +1 -0
  456. package/dist/webcomponents/{p-BCPutgAi.js → p-Dy5btfGV.js} +1 -1
  457. package/dist/webcomponents/p-a020c889.entry.js +1 -0
  458. package/dist/webcomponents/p-a0c9f0bd.entry.js +1 -0
  459. package/dist/webcomponents/{p-0082f428.entry.js → p-a22d1078.entry.js} +1 -1
  460. package/dist/webcomponents/p-a6e816f6.entry.js +1 -0
  461. package/dist/webcomponents/p-a87187c3.entry.js +1 -0
  462. package/dist/webcomponents/p-a9f75a9e.entry.js +1 -0
  463. package/dist/webcomponents/{p-8681f258.entry.js → p-aaed4997.entry.js} +1 -1
  464. package/dist/webcomponents/p-ad9307c1.entry.js +1 -0
  465. package/dist/webcomponents/p-b3f8d5d4.entry.js +1 -0
  466. package/dist/webcomponents/{p-f6ea74db.entry.js → p-b8426810.entry.js} +1 -1
  467. package/dist/webcomponents/p-ba0762f9.entry.js +1 -0
  468. package/dist/webcomponents/p-c41191e7.entry.js +1 -0
  469. package/dist/webcomponents/p-c621e7af.entry.js +1 -0
  470. package/dist/webcomponents/p-c63b0271.entry.js +1 -0
  471. package/dist/webcomponents/p-c88babbe.entry.js +1 -0
  472. package/dist/webcomponents/p-d2935214.entry.js +1 -0
  473. package/dist/webcomponents/p-d88d228f.entry.js +1 -0
  474. package/dist/webcomponents/{p-2769f945.entry.js → p-e6507b93.entry.js} +1 -1
  475. package/dist/webcomponents/{p-ed55d333.entry.js → p-e7e5fee9.entry.js} +1 -1
  476. package/dist/webcomponents/p-e9d13cca.entry.js +1 -0
  477. package/dist/webcomponents/p-ee122560.entry.js +1 -0
  478. package/dist/webcomponents/{p-4e23116c.entry.js → p-f2650bfc.entry.js} +1 -1
  479. package/dist/webcomponents/p-f4cb581f.entry.js +1 -0
  480. package/dist/webcomponents/p-f528da70.entry.js +1 -0
  481. package/dist/webcomponents/{p-9f70ce93.entry.js → p-fe862786.entry.js} +1 -1
  482. package/dist/webcomponents/{p-C8QOezo8.js → p-t8p0WAW4.js} +1 -1
  483. package/dist/webcomponents/webcomponents.esm.js +1 -1
  484. package/package.json +13 -13
  485. package/LICENSE +0 -21
  486. package/dist/cjs/checkout.store-BA6h-dp2.js +0 -107
  487. package/dist/esm/checkout.store-CaS_htQd.js +0 -101
  488. package/dist/webcomponents/p-159d8ae7.entry.js +0 -1
  489. package/dist/webcomponents/p-20a8b0c0.entry.js +0 -1
  490. package/dist/webcomponents/p-22f74666.entry.js +0 -1
  491. package/dist/webcomponents/p-25b382b8.entry.js +0 -1
  492. package/dist/webcomponents/p-30f61f44.entry.js +0 -1
  493. package/dist/webcomponents/p-3437ce38.entry.js +0 -1
  494. package/dist/webcomponents/p-34aa9298.entry.js +0 -1
  495. package/dist/webcomponents/p-36720116.entry.js +0 -1
  496. package/dist/webcomponents/p-39706e38.entry.js +0 -1
  497. package/dist/webcomponents/p-3c38cec5.entry.js +0 -1
  498. package/dist/webcomponents/p-42d756b8.entry.js +0 -1
  499. package/dist/webcomponents/p-44a94dac.entry.js +0 -1
  500. package/dist/webcomponents/p-45936490.entry.js +0 -1
  501. package/dist/webcomponents/p-4761e0aa.entry.js +0 -1
  502. package/dist/webcomponents/p-4baabba0.entry.js +0 -1
  503. package/dist/webcomponents/p-4dcbc0af.entry.js +0 -1
  504. package/dist/webcomponents/p-54ff9b59.entry.js +0 -1
  505. package/dist/webcomponents/p-5c8c88c6.entry.js +0 -1
  506. package/dist/webcomponents/p-66688508.entry.js +0 -1
  507. package/dist/webcomponents/p-7218c312.entry.js +0 -1
  508. package/dist/webcomponents/p-77b76007.entry.js +0 -1
  509. package/dist/webcomponents/p-77bd4fb0.entry.js +0 -1
  510. package/dist/webcomponents/p-79d77eb9.entry.js +0 -1
  511. package/dist/webcomponents/p-7ee0bae1.entry.js +0 -1
  512. package/dist/webcomponents/p-80f5b2c8.entry.js +0 -1
  513. package/dist/webcomponents/p-84e2bd93.entry.js +0 -1
  514. package/dist/webcomponents/p-89518b26.entry.js +0 -1
  515. package/dist/webcomponents/p-8b944d09.entry.js +0 -1
  516. package/dist/webcomponents/p-942c8949.entry.js +0 -1
  517. package/dist/webcomponents/p-98b8028e.entry.js +0 -1
  518. package/dist/webcomponents/p-9e1f4231.entry.js +0 -1
  519. package/dist/webcomponents/p-BojLBYsY.js +0 -1
  520. package/dist/webcomponents/p-BpaE8q5f.js +0 -1
  521. package/dist/webcomponents/p-Ch9cTPyq.js +0 -1
  522. package/dist/webcomponents/p-DCIW8z1f.js +0 -1
  523. package/dist/webcomponents/p-DQf0KCJj.js +0 -1
  524. package/dist/webcomponents/p-DU8dqq9U.js +0 -1
  525. package/dist/webcomponents/p-MQxr_LMC.js +0 -1
  526. package/dist/webcomponents/p-a4540205.entry.js +0 -1
  527. package/dist/webcomponents/p-a655b996.entry.js +0 -1
  528. package/dist/webcomponents/p-ad5e488a.entry.js +0 -1
  529. package/dist/webcomponents/p-af236d05.entry.js +0 -1
  530. package/dist/webcomponents/p-af4e501d.entry.js +0 -1
  531. package/dist/webcomponents/p-b0e80802.entry.js +0 -1
  532. package/dist/webcomponents/p-b4d8a3f6.entry.js +0 -1
  533. package/dist/webcomponents/p-bf8cf72d.entry.js +0 -1
  534. package/dist/webcomponents/p-c3b71a1f.entry.js +0 -1
  535. package/dist/webcomponents/p-d2d69454.entry.js +0 -1
  536. package/dist/webcomponents/p-da26e869.entry.js +0 -1
  537. package/dist/webcomponents/p-daa534f1.entry.js +0 -1
  538. package/dist/webcomponents/p-dc0d3484.entry.js +0 -1
  539. package/dist/webcomponents/p-e91af879.entry.js +0 -1
  540. package/dist/webcomponents/p-eb56ba9b.entry.js +0 -1
  541. package/dist/webcomponents/p-ed006dd6.entry.js +0 -1
  542. package/dist/webcomponents/p-edcb84bf.entry.js +0 -1
  543. package/dist/webcomponents/p-efb2a58a.entry.js +0 -1
  544. package/dist/webcomponents/p-f91b79fb.entry.js +0 -1
  545. package/dist/webcomponents/p-fab28b02.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as i,H as s,g as n}from"./p-DwYM91AU.js";import{A as a}from"./p-C8yN3uBj.js";import{S as o}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as r}from"./p-c7MCfTgE.js";import{c as l,o as c,g as h,a as d,b as u}from"./p-DU8dqq9U.js";import{D as p,r as y}from"./p-wtuY7MT2.js";import{f as m}from"./p-BS7OgSQe.js";import{H as v}from"./p-zNSPsvs3.js";import{H as M,b as f,h as g,i as b}from"./p-nrZ9yHcl.js";import{H as k}from"./p-C-2kW6Al.js";import{J as w,c as A}from"./p-LeyS3YJV.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as j,a as T,b as N}from"./p-Cjcsf8ku.js";import{I as E}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as P,a as I}from"./p-D2muobcE.js";import{C}from"./p-B4ZUYyNh.js";import{P as D,a as S,b as x}from"./p-DCIW8z1f.js";import{C as O}from"./p-ZpPDShvP.js";import"./p-BYsgavgS.js";import"./p-DQf0KCJj.js";var L,z,R,_,U;!function(t){t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_FAILURE="STATUS_FAILURE"}(L||(L={})),function(t){t.PLAIN="plain",t.BUY="buy",t.SET_UP="set-up",t.DONATE="donate",t.CHECK_OUT="check-out",t.BOOK="book",t.SUBSCRIBE="subscribe"}(z||(z={})),function(t){t.BLACK="black",t.WHITE="white",t.WHITE_OUTLINE="white-outline"}(R||(R={})),function(t){t.SUPPORTS_3DS="supports3DS",t.SUPPORTS_EMV="supportsEMV",t.SUPPORTS_CREDIT="supportsCredit",t.SUPPORTS_DEBIT="supportsDebit"}(_||(_={}));class B{constructor(t){this.merchantIdentifier=t.merchantIdentifier,this.displayName=t.displayName,this.initiative=t.initiative,this.initiativeContext=t.initiativeContext,this.buttonType=t.buttonType||z.PLAIN,this.buttonStyle=t.buttonStyle||R.BLACK,this.buttonLocale=t.buttonLocale||"en-US"}get isValid(){return!!(this.merchantIdentifier&&this.displayName&&this.initiative&&this.initiativeContext)}}class Y{constructor(t){this.countryCode=t.countryCode,this.currencyCode=t.currencyCode,this.merchantCapabilities=t.merchantCapabilities,this.supportedNetworks=t.supportedNetworks,this.total=t.total,this.lineItems=t.lineItems,this.shippingMethods=t.shippingMethods,this.applicationData=t.applicationData,this.supportedCountries=t.supportedCountries}get isValid(){var t,e,i,s;return!!(this.countryCode&&this.currencyCode&&(null===(t=this.merchantCapabilities)||void 0===t?void 0:t.length)&&(null===(e=this.supportedNetworks)||void 0===e?void 0:e.length)&&(null===(i=this.total)||void 0===i?void 0:i.label)&&(null===(s=this.total)||void 0===s?void 0:s.amount))}}class Q{static isApplePaySupported(){var t;return"undefined"!=typeof window&&"ApplePaySession"in window&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.supportsVersion(3))}static canMakePayments(){var t;return this.isApplePaySupported()&&(null===(t=window.ApplePaySession)||void 0===t?void 0:t.canMakePayments())||!1}static async canMakePaymentsWithActiveCard(t){var e;if(!this.isApplePaySupported())return!1;try{return await(null===(e=window.ApplePaySession)||void 0===e?void 0:e.canMakePaymentsWithActiveCard(t))||!1}catch(t){return console.error("Error checking Apple Pay active card:",t),!1}}static formatAmount(t){return(t/100).toFixed(2)}static parseAmount(t){return Math.round(100*parseFloat(t))}static createLineItem(t,e,i="final"){return{label:t,amount:this.formatAmount(e),type:i}}static getDefaultSupportedNetworks(){return["amex","discover","masterCard","visa"]}static getDefaultMerchantCapabilities(){return[_.SUPPORTS_3DS,_.SUPPORTS_EMV,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT]}}!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"}(U||(U={}));class F{constructor(){this.api=a()}initialize(t){if(this.applePayConfig=new B(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.host,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 Q.isApplePaySupported()&&Q.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await Q.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 Y(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:U.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:U.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:U.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const a=n.payment,o=Object.assign(Object.assign({},a.token),{product_details:{name:this.currentPaymentRequest.total.label,price:Q.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),r=await this.processPayment(i,s,o);r.success?(this.currentSession.completePayment({status:L.STATUS_SUCCESS}),t({success:!0,token:a.token,paymentMethodId:r.data.id})):(console.error("PSP reported payment failure:",r.data),this.currentSession.completePayment({status:L.STATUS_FAILURE}),e({success:!1,error:{code:U.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:L.STATUS_FAILURE}),e({success:!1,error:{code:U.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:L.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:U.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:U.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:Q.getDefaultMerchantCapabilities(),supportedNetworks:Q.getDefaultSupportedNetworks(),total:Q.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const V=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(r,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},H=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case R.WHITE:t+=" apple-pay-button-white";break;case R.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case z.BUY:t+=" apple-pay-button-type-buy";break;case z.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width,height:e.height},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("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 ")),Z=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted"),this.applePayCompleted=i(this,"applePayCompleted"),this.applePayCancelled=i(this,"applePayCancelled"),this.applePayError=i(this,"applePayError"),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=z.PLAIN,this.buttonStyle=R.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;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:l.paymentCurrency,merchantCapabilities:[_.SUPPORTS_3DS,_.SUPPORTS_CREDIT,_.SUPPORTS_DEBIT],supportedNetworks:Q.getDefaultSupportedNetworks(),total:Q.createLineItem(l.paymentDescription,l.paymentAmount)},s=await this.applePayService.startPaymentSession(i,l.authToken,l.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)||Z.ErrorCode.PAYMENT_FAILED}))}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:Z.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(l.paymentAmount)&&Boolean(l.paymentCurrency)&&Boolean(l.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:l.paymentAmount,paymentCurrency:l.paymentCurrency,hasAuthToken:Boolean(l.authToken),accountId:l.accountId}),this.applePayError.emit({error:this.error,code:Z.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=Q.isApplePaySupported(),this.canMakePayments=Q.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:Z.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:Z.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 F,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:Z.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?Q.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!l.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(o,null,l.checkoutLoaded&&t("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),t("div",{class:"apple-pay-container"},t(V,{isLoading:this.isLoading}),e&&t(H,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),t("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};Z.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const W=class{constructor(t){e(this,t)}render(){return t(o,{key:"fd2c61dcafdc800d0064c19d29c6e007aed5adb5"},t("section",{key:"f2abef1233f3ccad3982d10c61ec5765e13e27a5"},t("div",{key:"713d66ef6f7e2fc73135e765069baba6df976f52"},t("div",{key:"b8dd28f257948aa317366fe3ea6d2bc4911ef164",part:p},null==l?void 0:l.paymentDescription),t("div",{key:"675676b40de7dc27d07bfafc0eee77eb855a3d26"},t("span",{key:"cbd47994d9c3f1518741a298de3f5d62a0ad5313",part:p},"Total")," ",t("span",{key:"614748853f666f1b072d4fa9b14ee15ef5717112",part:p},m(+(null==l?void 0:l.totalAmount)))))))}},q=class{constructor(t){e(this,t),this.levels={h1:v,h2:M,h3:k},this.level="h1"}render(){return t(o,{key:"d4871da09451d40b27220a207ee72317ed9b1b9f"},t(this.levels[this.level],{key:"f7de159fa6395ef4024f48b868369f8d10edf64e",text:this.text,class:this.class}))}},G=a();class J{async getLinkToken(t,e,i,s){return G.post({endpoint:`plaid/${e}/link`,body:{checkout_id:i},authToken:t,signal:s})}async tokenizeBankAccount(t,e,i,s,n,a){const o=`plaid/${e}/tokenize`,r={public_token:i};return s&&(r.link_token_id=s),n&&(r.payment_method_group_id=n),G.post({endpoint:o,body:r,authToken:t,signal:a})}}const X=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new J,this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(l.paymentToken=s,l.selectedPaymentMethod={type:D.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:T.TOKENIZE_ERROR,severity:j.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:j.ERROR})},this.handleApplePayCancelled=()=>{l.paymentToken=void 0,l.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),l.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new C};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var a;try{const o=await i.fetchCheckout(t,e);if(o.error)return n({error:I(o.error),code:P(null===(a=o.error)||void 0===a?void 0:a.code),severity:j.ERROR});s({checkout:o.data})}catch(t){const e=P(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:j.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:a})=>{var o;try{const r=await i.complete(t,e,s);if(r.error)return a({error:I(r.error),code:P(null===(o=r.error)||void 0===o?void 0:o.code),severity:j.ERROR});n({checkout:r.data})}catch(t){const e=P(null==t?void 0:t.code);return a({error:t.message||t,code:e,severity:j.ERROR})}})(t),c((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new w(this),A(),l.authToken=this.authToken,this.fetchCheckout(),f("set",(t=>{const e=b[t];void 0!==e&&g(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==E.completed?t.status!==E.expired||this.errorEvent.emit({message:N.CHECKOUT_EXPIRED,errorCode:T.CHECKOUT_EXPIRED,severity:j.ERROR}):this.errorEvent.emit({message:N.CHECKOUT_ALREADY_COMPLETED,errorCode:T.CHECKOUT_ALREADY_COMPLETED,severity:j.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:N.NOT_AUTHENTICATED,errorCode:T.NOT_AUTHENTICATED,severity:j.ERROR})}updateStore(t){var e,i,s,n,a,o;l.accountId=t.account_id,l.checkoutLoaded=!0,l.paymentMethods=t.payment_methods.map((t=>new S(t))),l.paymentMethodGroupId=t.payment_method_group_id,l.paymentDescription=t.payment_description,l.totalAmount=t.total_amount,l.paymentAmount=t.payment_amount,l.bnplEnabled=t.payment_settings.bnpl_payments,l.insuranceEnabled=t.payment_settings.insurance_payments,l.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,l.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,l.bnplProviderClientId=null===(s=null==t?void 0:t.bnpl)||void 0===s?void 0:s.provider_client_id,l.bnplProviderMode=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_mode,l.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,l.bnplProviderCheckoutUrl=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:h(),selectedPaymentMethod:l.selectedPaymentMethod,savedPaymentMethods:l.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),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))}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:{},a=Object.assign(Object.assign({},t),n),o=Object.assign({accountId:l.accountId,payment_method_group_id:void 0},a);l.savePaymentMethod&&(o.payment_method_group_id=l.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:o,account:l.accountId}));return r.error?r:(l.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){l.selectedPaymentMethod=t,l.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];l.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===D.NEW_CARD,n=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===D.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:T.VALIDATION_ERROR,severity:j.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,a;const o=await this.validate();if(!l.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:T.VALIDATION_ERROR,severity:j.ERROR});const r=(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)===D.NEW_CARD,c=(null===(i=l.selectedPaymentMethod)||void 0===i?void 0:i.type)===D.NEW_BANK_ACCOUNT,h=(null===(s=l.selectedPaymentMethod)||void 0===s?void 0:s.type)===D.PLAID;if(r||c){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:T.TOKENIZE_ERROR,severity:j.ERROR})}if(h&&!l.paymentToken){const t=l.plaidPublicToken,e=l.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:T.TOKENIZE_ERROR,severity:j.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(l.authToken,l.accountId,t,e||void 0,l.savePaymentMethod?l.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:T.TOKENIZE_ERROR,severity:j.ERROR});const s=null==i?void 0:i.data,a=(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);l.paymentToken=a}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:T.TOKENIZE_ERROR,severity:j.ERROR})}}if(!o)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:T.VALIDATION_ERROR,severity:j.ERROR});if(!l.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:T.TOKENIZE_ERROR,severity:j.ERROR});let u;if(u={payment_mode:(t=>{switch(t){case D.NEW_CARD:case D.SAVED_CARD:case D.NEW_BANK_ACCOUNT:case D.SAVED_BANK_ACCOUNT:case D.PLAID:return x.ECOM;case D.SEZZLE:return x.BNPL;case D.APPLE_PAY:return x.APPLE_PAY;default:return}})(null===(a=l.selectedPaymentMethod)||void 0===a?void 0:a.type),payment_token:l.paymentToken},this.preCompleteHook){const t=d();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return}}this.completeCheckout({payment:u,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:T.COMPLETE_CHECKOUT_ERROR,severity:j.ERROR})}})}render(){return t(s,{key:"56a003ca1e1ac4bdc1baa8f862cdb05b2d8af4b1"})}get hostEl(){return n(this)}};var $;!function(t){t.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",t.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",t.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",t.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",t.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",t.PLAID_TOKEN_EXPIRED="plaid-token-expired",t.PLAID_NETWORK_ERROR="plaid-network-error",t.PLAID_USER_CANCELLED="plaid-user-cancelled",t.PLAID_TIMEOUT="plaid-timeout",t.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",t.PLAID_ACCOUNT_LOCKED="plaid-account-locked",t.PLAID_MAINTENANCE="plaid-maintenance",t.PLAID_RATE_LIMITED="plaid-rate-limited"}($||($={}));const K={[$.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[$.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[$.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[$.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[$.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[$.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[$.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[$.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[$.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[$.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[$.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[$.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[$.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},tt={[$.PLAID_SDK_LOAD_FAILED]:j.ERROR,[$.PLAID_LINK_INIT_FAILED]:j.ERROR,[$.PLAID_LINK_TOKEN_FAILED]:j.ERROR,[$.PLAID_AUTHENTICATION_FAILED]:j.ERROR,[$.PLAID_BANK_NOT_SUPPORTED]:j.WARNING,[$.PLAID_TOKEN_EXPIRED]:j.WARNING,[$.PLAID_NETWORK_ERROR]:j.WARNING,[$.PLAID_USER_CANCELLED]:j.INFO,[$.PLAID_TIMEOUT]:j.WARNING,[$.PLAID_INVALID_CREDENTIALS]:j.ERROR,[$.PLAID_ACCOUNT_LOCKED]:j.ERROR,[$.PLAID_MAINTENANCE]:j.WARNING,[$.PLAID_RATE_LIMITED]:j.WARNING},et=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),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 J,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{l.authToken&&l.accountId&&l.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:$.PLAID_SDK_LOAD_FAILED,message:K[$.PLAID_SDK_LOAD_FAILED],severity:tt[$.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:$.PLAID_LINK_TOKEN_FAILED,message:K[$.PLAID_LINK_TOKEN_FAILED],severity:tt[$.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:$.PLAID_LINK_INIT_FAILED,message:K[$.PLAID_LINK_INIT_FAILED],severity:tt[$.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!l.authToken||!l.accountId)return void this.handleError({code:$.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:j.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(l.authToken,l.accountId,l.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&&(l.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let a=$.PLAID_LINK_TOKEN_FAILED,o=K[a],r=!0;"AbortError"===t.name?(a=$.PLAID_TIMEOUT,o=K[a],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"))?(a=$.PLAID_NETWORK_ERROR,o=K[a],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")))&&(a=$.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:a,message:o,severity:tt[a],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 $.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return $.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return $.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return $.PLAID_RATE_LIMITED;case"maintenance":return $.PLAID_MAINTENANCE;case"not_authenticated":return $.PLAID_INVALID_CREDENTIALS;default:return $.PLAID_LINK_TOKEN_FAILED}return $.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,l.selectedPaymentMethod={type:D.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:j.INFO}),l.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=$.PLAID_AUTHENTICATION_FAILED,i=K[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=$.PLAID_INVALID_CREDENTIALS,i=K[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=$.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=$.PLAID_ACCOUNT_LOCKED,i=K[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=$.PLAID_MAINTENANCE,i=K[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=$.PLAID_RATE_LIMITED,i=K[e],s=!0;break;case"INVALID_REQUEST":e=$.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=$.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 a=t.error_message.toLowerCase();a.includes("not supported")||a.includes("unsupported")?(e=$.PLAID_BANK_NOT_SUPPORTED,i=K[e],s=!1,n="Try a different payment method"):(a.includes("expired")||a.includes("timeout"))&&(e=$.PLAID_TOKEN_EXPIRED,i=K[e],s=!0)}this.handleError({code:e,message:i,severity:tt[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=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===D.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=l.selectedPaymentMethod)||void 0===e?void 0:e.type)!==D.PLAID&&(l.selectedPaymentMethod={type:D.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:$.PLAID_SDK_LOAD_FAILED,message:K[$.PLAID_SDK_LOAD_FAILED],severity:tt[$.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=l.selectedPaymentMethod)||void 0===t?void 0:t.type)===D.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return l.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,l.selectedPaymentMethod={type:D.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(l.selectedPaymentMethod={type:D.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=u("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==l.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const e=t("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 t(o,{class:"payment-method"},t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{title:"Pay with Plaid"},t("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",e," "),(()=>this.error?t("div",{class:(this.error.severity===j.ERROR?"text-danger":this.error.severity===j.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),t("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&t("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):this.publicToken?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:t("div",{class:"text-muted mt-2"},t("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},it=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),l.selectedPaymentMethod={id:t.id,type:t.type},l.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===D.SAVED_CARD&&l.disableCreditCard||t===D.SAVED_BANK_ACCOUNT&&l.disableBankAccount)}componentWillLoad(){l.paymentMethods.length||console.warn("No saved payment methods available."),l.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return l.disablePaymentMethodGroup?null:t(o,null,t("div",{class:"saved-payment-methods"},l.paymentMethods.length?l.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:y,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:l.paymentToken===(null==e?void 0:e.id),label:`${O[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},st=t("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"}}),nt=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=D.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(l.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:l.bnplProviderClientId,apiMode:l.bnplProviderMode,apiVersion:l.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:l.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(){l.selectedPaymentMethod={type:D.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return l.bnplEnabled?t(o,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",null,t("div",null,"Buy now, pay later with ",st),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},m(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{Z as justifi_apple_pay,W as justifi_checkout_summary,q as justifi_header,X as justifi_modular_checkout,et as justifi_plaid_payment_method,it as justifi_saved_payment_methods,nt as justifi_sezzle_payment_method}
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as e,H as a}from"./p-DwYM91AU.js";import{a0 as i,a1 as c,a2 as h,a3 as r,a4 as o,l as d}from"./p-wtuY7MT2.js";import{F as f}from"./p-Bli6WznP.js";import{F as n}from"./p-BuCKkdLM.js";import"./p-CZfYo5-1.js";const l=class{constructor(e){s(this,e),this.formControlInput=t(this,"formControlInput"),this.formControlBlur=t(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=s=>{s.preventDefault();const t=s.target,e=t.getAttribute("name");this.inputHandler(e,t.checked),this.formControlInput.emit({name:e,value:t.value})},this.updateInput=s=>{this.checkboxElement.checked=s}}get part(){return this.errorText?i:this.isFocused&&this.checked?c:this.isFocused?h:this.checked?r:o}render(){return e(a,{key:"7bd0d5b048cb249373ea51b77e4c9da0cd9334e2"},e("div",{key:"fc2503501d863e5d4735bedbaf343c63e51933de",class:"form-group d-flex flex-column"},e("div",{key:"1279143cac22a3c83c84a0b374d521ad4f8d6b2e",class:"form-check"},e("input",{key:"05206a4ba4f07eac3015168569c0669aa467631e",ref:s=>this.checkboxElement=s,type:"checkbox",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-check-input is-invalid":"form-check-input",disabled:this.disabled,checked:this.checked}),e("label",{key:"890243508bccedbdcbec05cffc857aa5a5a15bc6",class:"form-check-label",htmlFor:this.name,part:d},this.label)),e(f,{key:"3c7be6ef2d0d9dd02601fef9e58038d010ca8246",helpText:this.helpText,name:this.name}),e(n,{key:"471b312488e84d3ab8ee2d4d13394b5887901366",errorText:this.errorText,name:this.name})))}};export{l as form_control_checkbox}
@@ -1 +0,0 @@
1
- import{h as t,r as s,c as e}from"./p-DwYM91AU.js";import{a as i,c as r,b as o}from"./p-dgG_o6wN.js";import{F as n,c as a,a as h,b as l}from"./p-DiJD6Iqx.js";import{A as c,C as d,e as u,R as m,f as p}from"./p-B5rtFhtR.js";import{C as f,P as b}from"./p-CVaOFfrI.js";import{G as v,l as y,U as g,_}from"./p-wtuY7MT2.js";import{S as w}from"./p-c7MCfTgE.js";import"./p-CZfYo5-1.js";import{b as j,r as x,s as O,c as k}from"./p-CPpUGsw5.js";import{a as S,B as C}from"./p-XYgDHrVL.js";import{E as T,l as E,m as D}from"./p-BpaE8q5f.js";import{C as L,D as H,y as B,E as P,F as V,G as A,H as W}from"./p-avgjSJ1d.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as I,a as F}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{c as U}from"./p-DfKxeSrC.js";import{B as q}from"./p-Bqlcv3ZV.js";import{d as Y,e as G}from"./p-D1WQG4I7.js";import"./p-BFTU3MAI.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";class R{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.institution_number=t.institution_number,this.transit_number=t.transit_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.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 M=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"25%"})),t("div",{class:"col-12"},t(w,{width:"100%"})),t("div",{class:"col-12 d-flex gap-3"},t(w,{width:"50%"}),t(w,{width:"50%"})),t("div",{class:"col-12 d-flex gap-3"},t(w,{width:"65%"}),t(w,{width:"35%"}))),N=()=>t("div",{class:"row gap-5"},t("div",{class:"col-12"},t(w,{width:"40%",height:"40px"})),t(M,null),t(M,null),t(M,null)),X=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new c(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s})),this.additional_questions=new c(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new n(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n,a;const h=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Additional Questions"),t("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12 col-md-6"},t("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==h?void 0:h.business_revenue,maskOptions:f.WHOLE})),t("div",{class:"col-12 col-md-6"},t("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===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==h?void 0:h.business_payment_volume,maskOptions:f.WHOLE})),t("div",{class:"col-12"},t("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===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:j,defaultValue:null==h?void 0:h.business_when_service_received})),t("div",{class:"col-12"},t("form-control-select",{name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_recurring_payments,options:x,defaultValue:null==h?void 0:h.business_recurring_payments})),t("div",{class:"col-12",hidden:!this.recurringPayments},t("form-control-text",{name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(o=this.errors)||void 0===o?void 0:o.business_recurring_payments_percentage,defaultValue:null==h?void 0:h.business_recurring_payments_percentage,helpText:"For example: 50% monthly, 50% annual."})),t("div",{class:"col-12"},t("form-control-select",{name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_seasonal,options:O,defaultValue:null==h?void 0:h.business_seasonal})),t("div",{class:"col-12"},t("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===(a=this.errors)||void 0===a?void 0:a.business_other_payment_details,defaultValue:null==h?void 0:h.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},J=(t,s)=>t.some((t=>t.document_type===s)),Q=t=>t?{bank_name:V.nullable(),nickname:P.nullable(),account_owner_name:B.nullable(),account_type:H.nullable(),account_number:L.nullable()}:{bank_name:V.required("Enter bank name"),nickname:P.required("Enter nickname"),account_owner_name:B.required("Enter account owner name"),account_type:H.required("Select account type"),account_number:L.required("Enter account number")},Z=(t,s)=>{if(s)return{voided_check:l().nullable(),bank_statement:l().nullable()};const e=J(t,T.voidedCheck),i=J(t,T.bankStatement),r=e||i,o="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:l().when("bank_statement",{is:t=>!t&&!r,then:t=>t.required(o),otherwise:t=>t.notRequired()}),bank_statement:l().when("voided_check",{is:t=>!t&&!r,then:t=>t.required(o),otherwise:t=>t.notRequired()})}},K={[d.USA]:(t,s=[])=>((t,s)=>{const e=Object.assign(Object.assign(Object.assign({},Q(s)),(t=>t?{routing_number:W.nullable()}:{routing_number:W.required("Enter routing number")})(s)),Z(t,s));return a().shape(e,[["voided_check","bank_statement"]])})(s,t),[d.CAN]:(t,s=[])=>((t,s)=>{const e=Object.assign(Object.assign(Object.assign({},Q(s)),(t=>{const s=h().length(3,"Institution number must be 3 digits").matches(A,"Enter valid institution number"),e=h().length(5,"Transit number must be 5 digits").matches(A,"Enter valid transit number");return t?{institution_number:s.nullable(),transit_number:e.nullable()}:{institution_number:s.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(s)),Z(t,s));return a().shape(e,[["voided_check","bank_statement"]])})(s,t)},$=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new E,this.isLoading=!1,this.getSchema=()=>(0,K[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new n(this.getSchema()),this.formController.setInitialValues(Object.assign({},this.bankAccount)),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))},this.storeFiles=t=>{const s=Array.from(t.detail.fileList),e=t.detail.document_type,i=s.map((t=>new D({file:t,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.bank_accounts.length>0?this.bankAccount=new R(t.data.bank_accounts[0]):(this.bankAccount=new R({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=t.data.documents},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.postDocumentRecordData=async t=>{this.isLoading=!0;const s=t.record_data;return new Promise((e=>{this.postDocumentRecord({payload:s,onSuccess:s=>{e(this.handleDocRecordResponse(t,s))},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({message:t,errorCode:s,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(t,s)=>s.error?(this.errorEvent.emit({errorCode:F.POST_ERROR,message:s.error.message,severity:I.ERROR,data:s.error}),!1):(t.setPresignedUrl(s.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const s=await t.getFileData(),e=await fetch(t.presigned_url,{method:"PUT",body:s});return this.handleUploadResponse(e)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:F.POST_ERROR,message:t.error.message,severity:I.ERROR,data:t.error}),!1)}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){this.existingBankAccount?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new n(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get postPayload(){const t=this.formController.values.getValue();return new R(t).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}async sendData(t){try{if(!this.existingBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;t()}catch(t){this.errorEvent.emit({message:t,errorCode:F.POST_ERROR,severity:I.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((s=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:s=>{t=s,e=!0},onError:({error:t,code:s,severity:i})=>{e=!1,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:S.bankAccount}),this.isLoading=!1,s(e)}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}render(){const s=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",{class:"mb-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Bank Account Info"),t("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."})),t("hr",{class:"mt-2"}),t(this.country===d.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:s,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.existingBankAccount})),t("fieldset",{class:"mt-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Document Uploads"),t("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."})),t("hr",{class:"mt-2"}),t("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),t("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles})))}static get watchers(){return{isLoading:["watchHandler"]}}},z=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new u(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t(),this.isEditingTaxId=!1},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new u(this.formController.values.getValue()).payload}componentWillLoad(){const t=this.country===d.CAN?r(this.allowOptionalFields):o(this.allowOptionalFields);this.formController=new n(t),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e;const i=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Business Information")),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("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)."})),t("div",{class:"col-12"},t("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)"})),t("div",{class:"col-12 col-md-8"},t("form-control-select",{name:"classification",label:"Business Classification",options:k,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-4"},t("form-control-date",{name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),t("div",{class:"col-12 col-md-6"},!(null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4)||this.isEditingTaxId?t("form-control-number-masked",{name:"tax_id",label:U[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:U[this.country].taxIdHelpText}):t("div",null,t("label",{class:"form-label",part:y},U[this.country].taxIdLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:g,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:_,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),t("div",{class:"col-12"},t("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."})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:b.US})))))}},tt=class{constructor(t){s(this,t),this.clickEvent=e(this,"click-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.matchRef=(t,s)=>{const e=this.refs.findIndex((t=>t===s));-1!==e&&(this.refs[e]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:C.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((s=>s.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)}}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const s=this.refs.map((t=>t.validate()));if(!(await Promise.all(s)).every((t=>t)))return;const e=this.refs.map((t=>t.submit()));(await Promise.all(e)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.getBusiness&&this.getData()}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const s=t.detail,e=this.ownersPayload.map((t=>t.id===s.id?s:t));e.includes(s)||(e[this.ownersPayload.findIndex((t=>!t.id))]=s,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return this.isLoading?t(N,null):t("div",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Owners"),t("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."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},this.ownersPayload.map((s=>t("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)})))),t("div",{class:"d-flex justify-content-start"},t("div",{class:"gap-2"},t(q,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},st=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new m(t.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.representative}),this.formLoading.emit(!1)}})}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{representative:new m(this.formController.values.getValue()).payload}}componentWillLoad(){this.formController=new n((0,Y[this.country])("representative",this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){return this.isLoading?t(N,null):t("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}},et=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{const s=new p((t.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},s),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:S.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new p(this.formController.values.getValue()).payload}}componentWillLoad(){this.formController=new n((0,G[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){const s=this.formController.getInitialValues();return this.isLoading?t(N,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:v},"Legal Address of your Business"),t("form-control-tooltip",{helpText:"No PO Boxes."})),t("hr",{class:"mt-2"}),t("justifi-form-address-fields",{country:this.country,errors:this.errors,defaultValues:s,inputHandler:this.inputHandler})))}};export{X as justifi_additional_questions_form_step_core,$ as justifi_business_bank_account_form_step_core,z as justifi_business_core_info_form_step_core,tt as justifi_business_owners_form_step_core,st as justifi_business_representative_form_step_core,et as justifi_legal_address_form_step_core}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e,H as c}from"./p-DwYM91AU.js";import{a5 as i,a6 as a,a7 as h,a8 as r,a9 as o,l as f}from"./p-wtuY7MT2.js";const l=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?i:this.isFocused&&this.checked?a:this.checked?h:this.isFocused?r:o}render(){return e(c,{key:"1b798d4c7a78475795a0b667839e82bbc402749c",class:"form-group d-flex flex-column"},e("div",{key:"df37525372c220bb0fcbc54bc89d28b55c5b5407",class:"form-check"},e("input",{key:"af923ae2cb8677fd9e943c912ef9c117dc8eb9d5",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"06aec18092d38c386cb3dbeb7712a356f6615f82",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:f},this.label)),e("form-control-help-text",{key:"63356fa988cecc235ff01b7f9eb4c344d62a18c0",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"61c5b0fac0b21856660dd6b9c64c2202f82324b2",errorText:this.errorText,name:this.name}))}};export{l as form_control_radio}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s}from"./p-DwYM91AU.js";import{f as i}from"./p-BS7OgSQe.js";import{D as a,am as r}from"./p-wtuY7MT2.js";import{B as d}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import{S as o}from"./p-c7MCfTgE.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as l}from"./p-D_IJC4HG.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-LeyS3YJV.js";import"./p-HXpYMWUU.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BpaE8q5f.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-DQf0KCJj.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event")}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(c,{key:"a494374453528ee6033589ed69dd2a0738ff8aaa"},this.isLoading&&s("div",{key:"436d266650297674d89f1ba2d299bf3ebdf16506",style:{marginBottom:"8px"}},s(o,{key:"952e9df74b83809b3a52d629ed05bc54b02754a5",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"f3dd82b6b941500202404ec1353c2f951f79b642",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"608229cd12404e5e6f7014f955c24f9ff856a14f",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"6d18b253eaa245b9f7b817c3baf473d6f6a31845",part:a},s("h1",{key:"7f7e30f8c7a9753970980796790b621a6d373548",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"1c458aecef8ce286b6c2a46e286c57e1276aff04"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"b3e85abf813bd36da6c952c9ad7c9357504bbc1d",part:a},s("h1",{key:"afcbe8f967170bc4abea0c71749a10e1c09937e0",class:"h4",part:r},"This payment is disputed"),s("p",{key:"30194ebea5f1763286f1a69f8fb2cd8c2c9d2d90"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"991505b018e4ee61b05c9872244163b729ee0cd1",class:"h5"},"Dispute details"),s("div",{key:"b94e62444ce05ac0ef6698a4b67f70088c10a9b4",class:"d-table gap-2"},s("div",{key:"8873c8b0cab9bf5e56add69007e9b281c64dcbf3",class:"d-table-row gap-2"},s("span",{key:"0c9cf9564277ba952c1b36acc7fa8660ec969266",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"0461b3c75b74e03b60dae12d80526b119d1e74d5",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"074f92623a156b5c431719a8c11870c95377dfc1",class:"d-table-row gap-2"},s("span",{key:"04e1498ecb4d64f122c27ef0a83c38d843c72cad",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"fc3c56b35d899c06130b918cf03202cc9f44fa46",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"13eca44a73967f235a18e2f8818a008f14a96ba2",class:"d-table-row gap-2"},s("span",{key:"954a86a2f0b77801a7c69c751a2b398f33bb2fe1",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"21e305a5cdc269f45439671639e3984e68cb75e0",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"cad8b592ab80d24b3d4ce187eb534a336bd36581",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"077df79dae040c41489d1206fffde036aef51954",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"eb26cd7bc9d93c83eefc927c565f321eb3c2bef1",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"f74d8e95a2ae74e1b59ac414d0a0d5cc43dd0291"},s("h1",{key:"2404542678c5ad29dd4e3af13edebbace06734d6",class:"h4"},"This payment is disputed and under review"),s("p",{key:"0027bd32af1b0ab4ffdd42fcc0b21cb7ab55835a"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"ff335c7dbe7bda7637d1b27a65150785e81361bc"},s("h1",{key:"36ee4c439d8e1346c115ba6f28e59008ce68d4e1",class:"h4"},"This payment was disputed"),s("p",{key:"5e6e6869d956f6ea84e64378e4bfaebeb71109b0"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"d67894655a47ac5327540c55fdd97db472d34f9d"},s("h1",{key:"dec3b5da213071a75183eab6e1521c5c986d3876",class:"h4"},"This payment was disputed"),s("p",{key:"806eb5f32bddde1c298eba9517c637a7fb69f598"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"ed6376969ab6a686999b8a31376b3c1cc8c7b566"},s("justifi-dispute-response-core",{key:"d823732d71613e9e98305d4b7d3c22af0344d209","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},j=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.stepCompleteEvent=t(this,"complete-form-step-event"),this.submitEvent=t(this,"submit-event"),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"b23c5bc27b1f657b9211d3a3482ae5b99982754e",class:"row gy-3"},s("div",{key:"a630f3c475d6b8026a81724c76340dc4f6088b26",class:"col-12"},s("h1",{key:"f4e848277ee8f1ec05ef1b1dfbac0e8872d9d91f",class:"h4",part:r},"Counter dispute")),s("div",{key:"6f7f21778853a3c1ac173ac79713f5427a226a5b",class:"col-12"},this.currentStepComponent),s("div",{key:"7354846a446f5677a12a3113b3f4226060a8b86a",class:"col-12"},s("div",{key:"4fb9dbccff8b004913656c3a130b46a0216dd6bb",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as i,g as s,H as a}from"./p-DwYM91AU.js";import{S as r}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as n,J as d}from"./p-LeyS3YJV.js";import{w as o,c}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{a as h,C as l}from"./p-Cjcsf8ku.js";import"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as f}from"./p-DU8dqq9U.js";import{P as u}from"./p-DCIW8z1f.js";import{S as m}from"./p-c7MCfTgE.js";import{B as b}from"./p-Bqlcv3ZV.js";import{r as p}from"./p-wtuY7MT2.js";import"./p-DQf0KCJj.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";const y=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click"),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return i(r,{key:"1ae40f787970160e38b72f917bda96f480d2a890"},i("div",{key:"2130596c8294cc38365e6126806735da0f93ef4a",class:`radio-list-item p-3 ${this.class||""}`,part:p,onClick:this.handleClick,hidden:this.hidden},i("form-control-radio",{key:"7d5524f518430f2bfd1c9863f354318929353cfb",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},v={[u.NEW_BANK_ACCOUNT]:"New bank account",[u.NEW_CARD]:"New credit or debit card"},g="Payment form not ready",k="Validation error",w=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),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(){n(),this.analytics=new d(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,f.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:h.TOKENIZE_ERROR,message:k}),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(h.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:h.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:g}};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 tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||f.authToken,account:this.accountId||f.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||f.authToken||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||f.accountId||this.emitError({errorCode:h.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=u.NEW_BANK_ACCOUNT,f.selectedPaymentMethod={type:u.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=u.NEW_CARD,f.selectedPaymentMethod={type:u.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(u.NEW_CARD),this.disableBankAccount||t.push(u.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:l.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",g);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||k;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||f.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!f.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===f.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:v[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("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===u.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return i(r,{key:"e1ee33f08d3eaff9a2951bd30ef9814a5d959b35"},i("form",{key:"df73d7965968c0efc3ee2b35a9a85d551915e5a1"},i("fieldset",{key:"2967ed65f1c0af42082a8b7c255db5fdc1c78019"},i("div",{key:"f45b8e074f39ec6abefc8f7e30bdf0ae57b1272c",class:"row gy-3"},i("div",{key:"fe9c90b34d60802f4d0dc51863874151f4a17b2b",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"ff1b8332d70fe68c3d3140c5a173dd8b419b6a8e",class:"col-12"},i("justifi-button",{key:"bf2ced1a5164a9c9af2bf2c5b750c5f9734dc86b",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 s(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}},j=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-end"},i(m,{height:"18px",width:"120px"}),i(m,{height:"36px"}))),i("div",{class:"row"},i("div",{class:"col-12 align-content-end"},i(m,{height:"18px",width:"110px"}),i(m,{height:"36px"}))))},C=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return t&&e}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.accountNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"62431aba939585a8a341942d9847e8d491b0a658"},i(j,{key:"2da8452c73e52a6fc67d80e483c40a2d0dd276f9",isReady:this.isReady}),i("hidden-input",{key:"c34bc48ee7e1925ae272b5fe60fd362ddf2433eb"}),i("div",{key:"3fefe63e9f9c98d7e08e0ceac5df0f8008303aec",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"6c19ea238eb0bff6b245f2f39028d651438c55d0",class:"row mb-3"},i("iframe-input",{key:"b5588dc21d24ec873fecedd91fbcb0344fbe324c",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),i("div",{key:"910f130a307449a3d60ef76eee6cc27fc86c3fe0",class:"row"},i("iframe-input",{key:"72756b92912c3031cc472dee5bbf945f06c38920",inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},M=class{constructor(e){t(this,e)}get showSimpleCardBillingForm(){return this.paymentMethodType===u.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===u.NEW_BANK_ACCOUNT&&this.hideBankAccountBillingForm}async getValues(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.getValues()}async fill(t){var e;null===(e=this.selectedFormRef)||void 0===e||e.fill(t)}async validate(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.validate()}render(){return i(a,null,i(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:t=>this.selectedFormRef=t}))}},x=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(r,{key:"e3b353dac8bf4c078fed17a4854c6ee1891df140"},i(b,{key:"76bfcc8763775a3442fe7f8c307400c1fa829da0",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle},this.text))}},_=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(m,{height:"18px",width:"100px"}),i(m,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(m,{height:"18px",width:"80px"}),i(m,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(m,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(m,{height:"18px",width:"30px"}),i(m,{height:"36px"}))))},P=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),i=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return t&&e&&i&&s}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.cardNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"0db53b1dace76a8e02bab9f65fdc70e20f440a62"},i(_,{key:"ea756f1799b01b81a678ce5bd2592551edd81211",isReady:this.isReady}),i("hidden-input",{key:"a6203630db26bfbb683e2b45174c79d753154eda"}),i("div",{key:"dbb6328ba3a27106474f6b9af6fc3c347b99ae7d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"64055e42612ce94da35022d7e8314ed917f90f8a",class:"mb-3"},i("iframe-input",{key:"e99008d298b6ec6e22ff5a4e73042e3e8805f09b",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),i("div",{key:"34ed1849877a47fe6ec32f443472fa9c913dae67",class:"row"},i("div",{key:"39bfdd5c8dd6271315a09cd3022083fe4b45f5ea",class:"col-4 align-content-end"},i("iframe-input",{key:"981b65ebd142396312d09df8927fd5d08a5dea72",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),i("div",{key:"a6fee6c1cc609b665b3ba9935190a43a118c5e5c",class:"col-4 align-content-end"},i("iframe-input",{key:"257b738139e182dc6e9f6a6893f8b6a0bc3f6b69",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),i("div",{key:"523316b64f673cdf89b5d01c1ecf4cf25ccef246",class:"col-4 align-content-end"},i("iframe-input",{key:"37305b54e421d759ded57b0f9de7743a07be4b5b",inputId:"CVV",ref:t=>this.cvvIframeElement=t,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},B=class{constructor(i){t(this,i),this.checkboxChanged=e(this,"checkboxChanged"),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(t,e)=>{this.isChecked=e,f.savePaymentMethod=e,this.checkboxChanged.emit(this.isChecked)}}render(){return i(r,{key:"9aa9ce812c0cb2fdc809c47060ed150903ad7cd5"},i("form-control-checkbox",{key:"596bc9a145e363c751c8610f4b9f23ad31dab299",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{w as internal_tokenize_payment_method,C as justifi_bank_account_form,M as justifi_billing_form,x as justifi_button,P as justifi_card_form,y as justifi_radio_list_item,B as justifi_save_new_payment_method}
@@ -1 +0,0 @@
1
- import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{c as e,F as r}from"./p-DiJD6Iqx.js";import{b as o,a,c as h}from"./p-dgG_o6wN.js";import{i as n,a as p,b as l,c as m}from"./p-D1WQG4I7.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as c,a as d}from"./p-Cjcsf8ku.js";import"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import{C as j,B as u,b as f}from"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as v,J as b}from"./p-LeyS3YJV.js";import{B as g}from"./p-Bqlcv3ZV.js";import{S as w}from"./p-BP2sTIQV.js";import{H as C}from"./p-zNSPsvs3.js";import"./p-CZfYo5-1.js";import{S as y}from"./p-c7MCfTgE.js";import{B}from"./p-XYgDHrVL.js";import{m as S,b as x}from"./p-5aA7gjr5.js";import{B as D}from"./p-BCPutgAi.js";import"./p-BFTU3MAI.js";import"./p-avgjSJ1d.js";import"./p-DfKxeSrC.js";import"./p-CPpUGsw5.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-DQf0KCJj.js";import"./p-C8yN3uBj.js";import"./p-wtuY7MT2.js";import"./p-D2muobcE.js";const O=e(Object.assign(Object.assign({},o().fields),{legal_address:p(),additional_questions:a(),representative:n("representative")}));e(Object.assign(Object.assign({},h().fields),{legal_address:m(),additional_questions:a(),representative:l("representative")}));const k=O,q=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(y,{width:"25%"})),s("div",{class:"col-12"},s(y,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"50%"}),s(y,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"65%"}),s(y,{width:"35%"}))),I=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(y,{width:"40%",height:"40px"})),s(q,null),s(q,null),s(q,null)),Y=class{constructor(s){t(this,s),this.submitEvent=i(this,"submit-event"),this.clickEvent=i(this,"click-event"),this.errorEvent=i(this,"error-event"),this.isLoading=!1,this.isSaving=!1,this.country=j.USA,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const t=new u(s);this.country=t.country_of_establishment,this.formController.setInitialValues(Object.assign({},t))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),t=this.formController.getInitialValues(),i=new u(Object.assign(Object.assign({},t),s)).payload;this.patchBusiness({payload:i,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){v(),this.analytics=new b(this),this.formController=new r(k),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=S({authToken:this.authToken,businessId:this.businessId,service:new D}),this.patchBusiness=x({authToken:this.authToken,businessId:this.businessId,service:new D}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:d.MISSING_PROPS,severity:c.ERROR})}handleReponse(s){s.error&&(this.errorMessage=f.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(w,null,this.isLoading?s(I,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(C,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("justifi-business-core-info",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-business-representative",{formController:this.formController,country:this.country})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(g,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:B.submit}),isLoading:this.isSaving},"Submit")))))}};export{Y as justifi_business_form}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as a,H as s,g as i}from"./p-DwYM91AU.js";import{F as r}from"./p-BuCKkdLM.js";import{i as o,b as l,a as h,U as n,c,l as f}from"./p-wtuY7MT2.js";const d=class{constructor(a){t(this,a),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur")}render(){return a(s,{key:"3e9e35e7c4c1166866e3cf94dd18bfda6d64222d",exportparts:"label,input,input-invalid"},a("div",{key:"f951ee548b004edd55957f2b34a8ab4cddb59bc7",class:"form-group d-flex flex-column"},a("div",{key:"9b28774efa7c53871c23b2e66ea8b6434af3d07b",class:"d-flex align-items-start gap-2"},a("label",{key:"783eb33e72b44bb42d01f7e474998d7fa2b58093",part:"label",class:"form-label",htmlFor:this.name},this.label),a("form-control-tooltip",{key:"bbc906ac8482e5cf21af56cf841932b78cd5e015",helpText:this.helpText})),a("input",{key:"3670f289b59e5464c11ba8b5ef66af0a3a2d65ca",type:"file",name:this.name,part:`input ${this.errorText?"input-invalid ":""}${this.disabled?"input-disabled":""}`,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onBlur:()=>this.formControlBlur.emit(),onChange:()=>this.errorText=""}),a(r,{key:"11d9f49721bc8920c0fa917e6a406019aa29041e",errorText:this.errorText,name:this.name})))}get el(){return i(this)}},b=class{constructor(a){t(this,a),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,a=e.getAttribute("name");this.inputHandler(a,e.value),this.formControlInput.emit({name:a,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("textarea");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?o:this.errorText?l:this.isFocused?h:this.disabled?n:c}render(){return a(s,{key:"1e41c053b809f4bda982850125e00e9897470d54"},a("div",{key:"c87bf55b62aea28d4eee19235c6a49ba5e14d9d7",class:"form-group d-flex flex-column"},a("label",{key:"be4dd8515c80b016e8d0cb88d8a50a53f570e239",part:f,class:"form-label",htmlFor:this.name},this.label),a("textarea",{key:"da24a7b98a098a71683a79bc1a4c77da64d9f3dc",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled}),a("form-control-help-text",{key:"6af10143701fec60501ebc5bcbff614638d3c9a9",helpText:this.helpText,name:this.name}),a("form-control-error-text",{key:"3a56898b53e89041e5947d3ffcd9f827a6b925fe",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_file_v2,b as form_control_textarea}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{P as i}from"./p-C8QOezo8.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as e}from"./p-Cjcsf8ku.js";import{P as p}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as m}from"./p-LeyS3YJV.js";import{S as h}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d}from"./p-BitGlMSc.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DQf0KCJj.js";import"./p-BydKIJVC.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const j=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPayments()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:r})=>async({params:i,onSuccess:e,onError:c,final:m})=>{var h,d;try{const m=await r.fetchPayments(t,s,i);if(m.error)return c({error:n(m.error),code:a(null===(d=m.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);e({payments:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:o.ERROR})}finally{return m()}})({id:this.accountId,authToken:this.authToken,service:new i}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return r(h,{key:"1e1f5cc087e917c65e7dbabaf21b355dd3261206"},r("payments-list-core",{key:"318b81a8eaacb70cc333efb9159279bc9310dd32",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{j as justifi_payments_list}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as s}from"./p-DwYM91AU.js";import{X as d,Y as a,Z as c}from"./p-wtuY7MT2.js";const i=class{constructor(s){t(this,s),this.selectedQuantityChange=e(this,"selectedQuantityChange"),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return s("div",{key:"e7a0bf077aca5a2ff095caf70457a5353995998e",class:"rounded shadow-sm card p-2",part:c},s("div",{key:"3ad7ac7493b73da04b071756fd4ad38be0afae9e",class:"d-flex gap-3"},s("div",{key:"568ed695946d70b84309772cbdb7b3647d227208",class:"d-flex align-items-center"},s("img",{key:"1b93058757c815f862ab0cb2640b7c2eb7bc216f",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:d})),s("div",{key:"014671ad4644fdd1cb92f07ca0c642a6138033ad",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},s("div",{key:"5d1bd75fb2c730dee13979d1811bdac2ced8ea6a",class:"row"},s("div",{key:"0dcc849ccfade11b1421a3c04b845b8d60f6061f",class:"col-6 d-flex gap-2"},this.modelName,s("form-control-tooltip",{key:"5e93951b101ea98e55b232b798d94de226146ff2",helpText:this.description})),s("div",{key:"4df172c04c7d8d7d7de5dda392824d3af005f60d",class:"col-6 d-flex justify-content-end align-items-center"},s("button",{key:"0e449f9467334d2470f835ec72f3e28f1dfc835d",class:"p-0 minus btn",onClick:this.removeUnit,part:a},"-"),s("div",{key:"ca1947fcb27d320063a682220f7c592361d21c02",class:"w-25 text-center"},this.selectedQuantity),s("button",{key:"f2119205d7ad524730ddf429083dc65b86d46251",class:"p-0 plus btn",onClick:this.addUnit,part:a},"+"))))))}};export{i as terminal_quantity_selector}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-LeyS3YJV.js";import{T as n}from"./p-MQxr_LMC.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{e as p}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m,S as u}from"./p-BojLBYsY.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-DkOiS6Zr.js";import"./p-DQf0KCJj.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var n,m;try{const u=await i.fetchTerminals(t,s,o);if(u.error)return a({error:h(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},u.page_info);e({terminals:(null===(n=u.data)||void 0===n?void 0:n.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new n}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"34cb952a43c4ecfd904c3449a05895e10e673a95"},i("terminals-list-core",{key:"32d981b366889364c4f27a4351aab41ed7d085b5",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e,H as a}from"./p-DwYM91AU.js";import{b as i,U as o,a as r,c as h,l as c,V as n}from"./p-wtuY7MT2.js";import{F as d}from"./p-Bli6WznP.js";import{F as f}from"./p-BuCKkdLM.js";import"./p-CZfYo5-1.js";import{f as l}from"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";const p=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>l(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,e=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(e),this.inputHandler(s,e),this.formControlInput.emit({name:s,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return e(a,{key:"dd501963b2b4c85eecd6c78ac8a1c38d6e30020c"},e("div",{key:"4c130a5d956ab1caaab521930d29d666dfbfcf67",class:"form-group d-flex flex-column"},e("label",{key:"59a59b0589b3555efcb509ebb0ca34a3cc01ce3a",part:c,class:"form-label",htmlFor:this.name},this.label),e(d,{key:"0290105bb2d69ae83d1583f2495557e1e11b2939",name:this.name,helpText:this.helpText}),e("div",{key:"cf80c69cc63137195ef179dd12f726f34bf35780",class:"input-group"},e("span",{key:"5ecc2e144e7fe9fde5a64e48d8b8471d446fdb5d",class:"input-group-text",part:n},"$"),e("input",{key:"585da3cd389904d002a545c01b4322c9aa9ea74e",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),e(f,{key:"52a6fef8192278acb9a3eb854f5cea8834ed5d0f",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as p,J as n}from"./p-LeyS3YJV.js";import{C as h}from"./p-B4ZUYyNh.js";import{m as u,S as m}from"./p-BojLBYsY.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-CkN7DFFn.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-DQf0KCJj.js";import"./p-C8yN3uBj.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),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(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:p,onError:n})=>{var h,u;try{const m=await i.fetchCheckouts(t,s,r);if(m.error)return n({error:a(m.error),code:c(null===(u=m.error)||void 0===u?void 0:u.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);p({checkouts:(null===(h=m.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:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(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({accountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return i(d,{key:"b7e794982435af9a755c272767c017c57fa16b24"},i("checkouts-list-core",{key:"a8de52b59cbccd7cd97369663c074011b49b9499",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_checkouts_list}
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{g as n}from"./p-BpaE8q5f.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as o,J as c}from"./p-LeyS3YJV.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-C8QOezo8.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as j,g,h as T,i as k,j as w,k as v}from"./p-BTzt8N0l.js";import{S as C}from"./p-BP2sTIQV.js";import{T as S}from"./p-CZfYo5-1.js";import{a as D}from"./p-BS7OgSQe.js";import{S as R,T as B}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-DQf0KCJj.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const F={created_at:()=>t("th",{part:R,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:R,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:R,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:R,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:R,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:R,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:R,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},x={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},I={created_at:(e,a)=>t("td",{part:B(a)},t("div",{class:"fw-bold"},D(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},D(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:B(a)},x[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:B(a)},e.id),amount:(e,a)=>t("td",{part:B(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:B(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:B(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:B(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:B(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:B(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:B(a)},e.source_id),source_type:(e,a)=>t("td",{part:B(a)},e.source_type)},E=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=r,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,F,I),o(),this.analytics=new c(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:i,onSuccess:r,onError:o,final:c})=>{var d;try{const c=await a.fetchPaymentTransactions(t,e,i);c.error?o({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:s.ERROR}):r({balanceTransactions:c.data.map((t=>new n(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);o({error:h(t),code:e,severity:s.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(i.MISSING_PROPS,this.errorMessage,s.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}render(){return t(C,{key:"ce4fd1549223738580d3a4e9195f535619491f5a"},t(l,{key:"0991e7ca748e75fa42e96be1dd1c9e9d2c876db9"},t(u,{key:"1b5d58cbf6f27fdf2faef658ae6148ee642ad3fe"},t(m,{key:"5eaef864fe0072cd4557a0585a409572f6806969"},t(y,{key:"a9c35dd1c0031da4a82207a4313c9a521729db40"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"1ed790fcc17bbb6a93f6eaf18b741fc3b2e80855"},t(_,{key:"64570f5736317dfabc97a7967dfa52dbc0dd384c",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"45d4d52687e203de3c5f45e406862b882c03757c",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(g,{key:"b8c941adc6bad5e40edd33b69231b668f587f16b",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(k,{key:"a76f922158b408ff6a70c35a47531405c012aaae"},t(w,{key:"4cf90633de51f6e9286481300cbbe0f0183f1bfb"},t(v,{key:"c06c168e8ba7c3115eab18c8366362be16582f86",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"f08aa685537d1ba529f5506d74bdc20d0352dd2b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payment_transactions_list}
@@ -1 +0,0 @@
1
- import{h as e,r as t,c as a}from"./p-DwYM91AU.js";import{i as s,e as d,d as i}from"./p-BS7OgSQe.js";import{a as c,b,D as o,c as r,C as l,E as h}from"./p-BNqo3kt0.js";import{B as f}from"./p-Bqlcv3ZV.js";import{S as n}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{M as p}from"./p-bolTb61p.js";import{S as u}from"./p-c7MCfTgE.js";import{a as y,B as v}from"./p-DOLBAxYf.js";import"./p-HXpYMWUU.js";import"./p-wtuY7MT2.js";const m=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(u,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(u,{width:"70%"})),e("div",{class:"col-12"},e(u,{width:"40%"})),e("div",{class:"col-12"},e(u,{width:"40%"})),e("div",{class:"col-12"},e(u,{width:"100%"})),e("div",{class:"col-12"},e(u,{width:"80%"}))),k=class{constructor(e){t(this,e),this.errorEvent=a(this,"error-event"),this.recordClickEvent=a(this,"record-click-event"),this.enableRecordClick=!1,this.loading=!0,this.errorMessage=null,this.downloadCSV=()=>{this.getPayoutCSV({payoutId:this.payout.id,onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:a})}})},this.handleRecordClick=e=>{this.recordClickEvent.emit({id:e,type:"account"})}}componentWillLoad(){this.getPayout&&this.fetchData()}getPayoutWatcher(){this.fetchData()}fetchData(){this.loading=!0,this.getPayout({onSuccess:e=>{this.errorMessage=null,this.payout=e,this.loading=!1},onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:a}),this.loading=!1}})}formatMethod(e){return"ach"===e?"ACH":s(e)}render(){var t;return e(n,{key:"12c258bd10e631ac1b2fb43c4e4d4854b02d8d01"},this.loading&&e(m,{key:"81c217eace20fe276d02d391f930a2684aa12385"}),!this.loading&&this.errorMessage&&h(this.errorMessage),!this.loading&&this.payout&&e("justifi-details",{key:"df1bd819a299df69c0bf5924aa21ea760668d46b","error-message":this.errorMessage},e(c,{key:"67544da1ecdb4beee16911cd49009ae3415c576d",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},p(null===(t=this.payout)||void 0===t?void 0:t.status),e(y,"expedited"===this.payout.settlement_priority?{variant:v.WARNING,title:"Expedited",text:"Expedited"}:{variant:v.SECONDARY,title:"Standard",text:"Standard"})),title:this.payout.formattedPaymentAmount(this.payout.amount)},e(b,{key:"64a28ab7e1bcc90d9487dd229cd07c411a50e4c7",classes:"border-1 border-end",title:"Updated At",value:`${d(this.payout.updated_at)} ${i(this.payout.updated_at)}`}),e(b,{key:"bcb74d904482f3dd63d1da918b700c1badf8bbd5",classes:"border-1 border-end",title:"Created At",value:`${d(this.payout.created_at)} ${i(this.payout.created_at)}`}),e(b,{key:"165b296bdebf16389ef29df825cb24ba34f14556",title:"ID",value:this.payout.id}),e("div",{key:"bbef430ca28eebc6c120f2f68200219dd1634660",class:"m-4"},e(f,{key:"1e51b1278a8f220c2376a004bbc9476307567c74",variant:"secondary",class:"btn btn-outline-secondary d-flex align-items-center",onClick:this.downloadCSV},"Export CSV"))),e("div",{key:"6dd5287d4355a84f0777f701c5b99bc5149954ed",slot:"detail-sections"},e(o,{key:"92af1ae82f5d53b1e50705aa18590528b19f6455",sectionTitle:"Details"}),e("div",{key:"73e1a84e7b8baabb7b6cc307d2b7fba5457514a9",class:"d-flex flex-column gap-2 w-100"},e(r,{key:"b223b147e8cc0a0849edd66a0b6deec2bf9ec55d",title:"Date paid",value:d(this.payout.deposits_at)}),e(r,{key:"766729d3cd7b85b5635e6bfa4091455a84595635",title:"Statement Description",value:this.payout.description}),e(r,{key:"7e4d537a26520d2c06ffadcd7658bb4a8e17b452",title:"Payout Method",value:this.formatMethod(this.payout.delivery_method)}),e(r,{key:"5fc253ad396300938f2cd95decab094d4da19d5b",title:"Amount",value:this.payout.formattedPaymentAmount(this.payout.amount)}),e(r,{key:"66c2979dbdf94ba0a53aaca5896d352bc0a5606b",title:"Fee",value:this.payout.formattedPaymentAmount(this.payout.fees_total)})),e(o,{key:"f0ca6a9c6d93b9841e1220dfde1182cb511c4594",sectionTitle:"Account"}),e("div",{key:"ad64b1bc364c9d9c1c64b2b1c5dce83f25fb066b",class:"d-flex flex-column gap-2 w-100"},e(r,{key:"6ac6c8251641e6d720ff82e0dfc9dbed255a1f0a",title:"ID",value:this.payout.account_id,onClick:this.enableRecordClick?()=>this.handleRecordClick(this.payout.account_id):void 0}),e(r,{key:"b955d27a84e0f43693e2474ee4ceab529d7eabda",title:"Account Type",value:this.payout.bank_account.account_type}),e(r,{key:"c06e3a07965683cefd3dcd4e96c16566f286b230",title:"Institution",value:this.payout.bank_account.account_type}),e(r,{key:"27cacdfeb07a3e27d7a059fedfa49470eb00ce05",title:"Routing Number",value:this.payout.bank_account.routing_number}),e(r,{key:"53442037b6e8c27b78b3da1d0bd13527e9283edb",title:"Account Number",value:`**** ${this.payout.bank_account.account_number_last4}`})),this.payout.metadata&&[e(o,{key:"82d65d70219404fbe2eb9a997fa309be02d58046",sectionTitle:"Metadata"}),e("div",{key:"b1d86b363afa8a5cf60176b3eba688d2d85b94d4",class:"d-table gap-2 w-100"},e(l,{key:"ff41f465b338f8cbbaafe4fa60f27a93e3ebde77",metadata:this.payout.metadata}))])))}static get watchers(){return{getPayout:["getPayoutWatcher"]}}};export{k as payout_details_core}