@justifi/webcomponents 5.5.0 → 5.6.1

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 (617) hide show
  1. package/dist/cjs/ApiNew-DG13rvk6.js +86 -0
  2. package/dist/cjs/{Refund-DpKGhW3o.js → Refund-CpurRc4w.js} +79 -0
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
  4. package/dist/cjs/{badge-BXpCpcer.js → badge-ByWVHNyJ.js} +2 -2
  5. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +7 -7
  6. package/dist/cjs/bank-account-form_9.cjs.entry.js +7 -7
  7. package/dist/cjs/{business-additional-questions-schema-mzZ2gYHQ.js → business-additional-questions-schema-gVepoR4V.js} +1 -1
  8. package/dist/cjs/business-details-core.cjs.entry.js +5 -5
  9. package/dist/cjs/{business.service-Crmkeulk.js → business.service-Vcq4kPU8.js} +4 -2
  10. package/dist/cjs/{button-KWTLx2LP.js → button-Bn9jOYbx.js} +2 -2
  11. package/dist/cjs/{check-pkg-version-CLsX6cK5.js → check-pkg-version-7gGchZzS.js} +1 -1
  12. package/dist/cjs/{checkout.service-r90INf2g.js → checkout.service-DP9FnXBx.js} +1 -1
  13. package/dist/cjs/checkouts-list-core.cjs.entry.js +10 -10
  14. package/dist/cjs/{payments-list-params-state-Cmfy_CND.js → checkouts-list-params-state-BvG5Ysrg.js} +1 -1
  15. package/dist/cjs/{checkouts-table-5jU4JUcM.js → checkouts-table-C_cpZa-i.js} +3 -3
  16. package/dist/cjs/config-state-Bm8-EuFE.js +42 -0
  17. package/dist/cjs/custom-popper_4.cjs.entry.js +9 -9
  18. package/dist/cjs/{dispute.service-CGgfmGU-.js → dispute.service-F-M8EJxq.js} +1 -1
  19. package/dist/cjs/{event-types-CJapDsYA.js → event-types-cB_-SsYZ.js} +3 -3
  20. package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
  21. package/dist/cjs/form-control-checkbox.cjs.entry.js +6 -6
  22. package/dist/cjs/form-control-date.cjs.entry.js +5 -5
  23. package/dist/cjs/{form-control-error-text-D19AMaOO.js → form-control-error-text-CBAVQoZ3.js} +2 -2
  24. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +6 -6
  25. package/dist/cjs/{form-control-help-text-CbrDvt9D.js → form-control-help-text-DQz5O3wX.js} +2 -2
  26. package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
  27. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +4 -4
  28. package/dist/cjs/form-control-monetary.cjs.entry.js +6 -6
  29. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +5 -5
  30. package/dist/cjs/form-control-number.cjs.entry.js +6 -6
  31. package/dist/cjs/form-control-radio.cjs.entry.js +4 -4
  32. package/dist/cjs/{get-business-BBzGEPBG.js → get-business-DHg5rpse.js} +2 -2
  33. package/dist/cjs/{get-payment-details-CKg1Lb3_.js → get-payment-details-DqvDYbnK.js} +3 -3
  34. package/dist/cjs/get-payout-csv-CXEQkjDm.js +24 -0
  35. package/dist/cjs/{get-subaccounts-YlFT-fBr.js → get-subaccounts-CasN5tDA.js} +9 -9
  36. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +5 -5
  37. package/dist/cjs/{header-1-ZNnpq6yT.js → header-1-Bl1S9jV8.js} +2 -2
  38. package/dist/cjs/{header-3-D6LxdW_A.js → header-3-DYzIjFIZ.js} +2 -2
  39. package/dist/cjs/{iframe-input-styles-state-CQL59u0d.js → iframe-input-styles-state-D9vhHzZQ.js} +1 -1
  40. package/dist/cjs/iframe-input.cjs.entry.js +9 -9
  41. package/dist/cjs/{index-DhcqPIbT.js → index-B8ljHEN1.js} +1 -1
  42. package/dist/cjs/{index-DtkhH7sB.js → index-BYd8IvAa.js} +1 -1
  43. package/dist/cjs/{insurance-state-q5eNmjIK.js → insurance-state-BbmHHQl0.js} +3 -3
  44. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +7 -7
  45. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +8 -5
  46. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +10 -10
  47. package/dist/cjs/justifi-business-details.cjs.entry.js +10 -7
  48. package/dist/cjs/justifi-business-form.cjs.entry.js +10 -10
  49. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +2 -2
  50. package/dist/cjs/justifi-checkout-core.cjs.entry.js +8 -8
  51. package/dist/cjs/justifi-checkout.cjs.entry.js +5 -5
  52. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +7 -7
  53. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +15 -13
  54. package/dist/cjs/justifi-config-provider.cjs.entry.js +26 -0
  55. package/dist/cjs/justifi-details.cjs.entry.js +3 -3
  56. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +2 -2
  57. package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -6
  58. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +12 -12
  59. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -5
  60. package/dist/cjs/justifi-order-terminals.cjs.entry.js +19 -20
  61. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +7 -4
  62. package/dist/cjs/justifi-payment-details.cjs.entry.js +13 -12
  63. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +4 -4
  64. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -4
  65. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +196 -0
  66. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +7 -7
  67. package/dist/cjs/justifi-payments-list.cjs.entry.js +18 -17
  68. package/dist/cjs/justifi-payout-details.cjs.entry.js +14 -12
  69. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +205 -0
  70. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +7 -7
  71. package/dist/cjs/justifi-payouts-list.cjs.entry.js +20 -19
  72. package/dist/cjs/justifi-refund-payment.cjs.entry.js +22 -21
  73. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +6 -6
  74. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -5
  75. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +8 -8
  76. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +20 -23
  77. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -7
  78. package/dist/cjs/justifi-terminals-list.cjs.entry.js +18 -18
  79. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +8 -8
  80. package/dist/cjs/loader.cjs.js +2 -2
  81. package/dist/cjs/{package-5B4P3NpD.js → package-CseQI95t.js} +1 -1
  82. package/dist/cjs/pagination-menu.cjs.entry.js +5 -5
  83. package/dist/cjs/{parts-D_uKOPFe.js → parts-Du1T2dvF.js} +12 -3
  84. package/dist/cjs/payment-details-core.cjs.entry.js +14 -14
  85. package/dist/cjs/payment.service-CAJSEb2x.js +21 -0
  86. package/dist/cjs/payments-list-core.cjs.entry.js +11 -11
  87. package/dist/cjs/{payouts-list-params-state-Cmfy_CND.js → payments-list-params-state-BvG5Ysrg.js} +1 -1
  88. package/dist/cjs/{payments-status-DAzq_Z13.js → payments-status-hksfHuBH.js} +2 -2
  89. package/dist/cjs/{payments-table-BEpL6oJQ.js → payments-table-CmvP6owu.js} +3 -3
  90. package/dist/cjs/payout-details-core.cjs.entry.js +9 -9
  91. package/dist/cjs/payout.service-wOnSu52a.js +26 -0
  92. package/dist/cjs/payouts-list-core.cjs.entry.js +11 -11
  93. package/dist/cjs/{terminal-orders-list-params-state-Cmfy_CND.js → payouts-list-params-state-BvG5Ysrg.js} +1 -1
  94. package/dist/cjs/{payouts-status-CYrKPRld.js → payouts-status-DfNhfSsm.js} +2 -2
  95. package/dist/cjs/{payouts-table-Bbi23U5v.js → payouts-table-CpgWxl8A.js} +3 -3
  96. package/dist/cjs/{skeleton-C59M0QK2.js → skeleton-BFtuPBwQ.js} +2 -2
  97. package/dist/cjs/{spinner-736baCoH.js → spinner-C9z2tkh2.js} +2 -2
  98. package/dist/cjs/{styled-host-JifnTMIV.js → styled-host-udkBJV5h.js} +1 -1
  99. package/dist/cjs/table-filters-menu.cjs.entry.js +4 -4
  100. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +10 -10
  101. package/dist/cjs/{checkouts-list-params-state-Cmfy_CND.js → terminal-orders-list-params-state-BvG5Ysrg.js} +1 -1
  102. package/dist/cjs/{terminal-orders-table-w4Yaf83b.js → terminal-orders-table-CpVY3VsQ.js} +4 -4
  103. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +3 -3
  104. package/dist/cjs/terminal.service-cGQB3xiL.js +29 -0
  105. package/dist/cjs/terminals-list-core.cjs.entry.js +10 -10
  106. package/dist/cjs/terminals-list-params-state-BvG5Ysrg.js +22 -0
  107. package/dist/cjs/{terminals-table-F6pkR97i.js → terminals-table-DRQQjYAE.js} +3 -3
  108. package/dist/cjs/{utils-D3seTk2e.js → utils-B_Ol6YlL.js} +2 -2
  109. package/dist/cjs/webcomponents.cjs.js +3 -3
  110. package/dist/collection/actions/business/get-business.js +2 -2
  111. package/dist/collection/actions/payment/get-payment-details.js +2 -2
  112. package/dist/collection/actions/payment/get-payment-transactions.js +34 -0
  113. package/dist/collection/actions/payment/get-payments.js +2 -2
  114. package/dist/collection/actions/payout/get-payout-transactions.js +34 -0
  115. package/dist/collection/actions/payout/get-payouts.js +2 -2
  116. package/dist/collection/actions/refund/refund-actions.js +2 -2
  117. package/dist/collection/actions/sub-account/get-subaccounts.js +2 -2
  118. package/dist/collection/actions/terminal/get-terminal-models.js +2 -2
  119. package/dist/collection/actions/terminal/get-terminal-orders.js +2 -2
  120. package/dist/collection/actions/terminal/get-terminals.js +2 -2
  121. package/dist/collection/api/ApiNew.js +82 -0
  122. package/dist/collection/api/PaymentBalanceTransaction.js +45 -0
  123. package/dist/collection/api/PayoutBalanceTransaction.js +35 -0
  124. package/dist/collection/api/index.js +2 -0
  125. package/dist/collection/api/services/business.service.js +4 -2
  126. package/dist/collection/api/services/payment.service.js +10 -6
  127. package/dist/collection/api/services/payout.service.js +13 -10
  128. package/dist/collection/api/services/refund.service.js +5 -4
  129. package/dist/collection/api/services/subaccounts.service.js +5 -5
  130. package/dist/collection/api/services/terminal.service.js +14 -15
  131. package/dist/collection/api/services/terminal_orders.service.js +5 -9
  132. package/dist/collection/collection-manifest.json +4 -1
  133. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +1 -1
  134. package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
  135. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  136. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  137. package/dist/collection/components/checkouts-list/checkouts-list.js +2 -3
  138. package/dist/collection/components/config-provider/config-provider.js +83 -0
  139. package/dist/collection/components/config-provider/config-state.js +36 -0
  140. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  141. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  142. package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
  143. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  144. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  145. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  146. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  147. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  148. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  149. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  150. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  151. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  152. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  153. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  154. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +1 -1
  155. package/dist/collection/components/order-terminals/order-terminals.js +4 -28
  156. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  157. package/dist/collection/components/payment-details/payment-details-core.js +7 -7
  158. package/dist/collection/components/payment-details/payment-details.js +1 -23
  159. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +226 -0
  160. package/dist/collection/components/payment-transactions-list/payment-transactions-table.js +45 -0
  161. package/dist/collection/components/payments-list/payments-list-core.js +2 -2
  162. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  163. package/dist/collection/components/payments-list/payments-list.js +2 -24
  164. package/dist/collection/components/payout-details/get-payout-csv.js +2 -2
  165. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  166. package/dist/collection/components/payout-details/payout-details.js +1 -23
  167. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +230 -0
  168. package/dist/collection/components/payout-transactions-list/payout-transactions-table.js +47 -0
  169. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  170. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  171. package/dist/collection/components/payouts-list/payouts-list.js +3 -26
  172. package/dist/collection/components/refund-payment/refund-payment.js +2 -25
  173. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  174. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  175. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +2 -24
  176. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  177. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  178. package/dist/collection/components/terminals-list/terminals-list.js +3 -26
  179. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  180. package/dist/collection/styles/parts.js +10 -3
  181. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  182. package/dist/collection/ui-components/filters/table-filters-menu.js +1 -1
  183. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  184. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  185. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  186. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  187. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  188. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  189. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  190. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  191. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  192. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  193. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  194. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  195. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  196. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +4 -4
  197. package/dist/docs.json +347 -165
  198. package/dist/esm/ApiNew-UOnmIWcv.js +84 -0
  199. package/dist/esm/{Refund-t_P1yy9d.js → Refund-DOvd7RJp.js} +78 -1
  200. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  201. package/dist/esm/{badge-C4TzL9CB.js → badge-B191hCAo.js} +2 -2
  202. package/dist/esm/bank-account-document-form-inputs_4.entry.js +7 -7
  203. package/dist/esm/bank-account-form_9.entry.js +7 -7
  204. package/dist/esm/{business-additional-questions-schema-W6okG5Xu.js → business-additional-questions-schema-DWnZs60Z.js} +1 -1
  205. package/dist/esm/business-details-core.entry.js +5 -5
  206. package/dist/esm/{business.service-B136meVo.js → business.service-B1VD22Tz.js} +11 -9
  207. package/dist/esm/{button-CI85Rqy5.js → button-BRFA5syj.js} +2 -2
  208. package/dist/esm/{check-pkg-version-Wd4E_Njt.js → check-pkg-version-DpVT68Qo.js} +1 -1
  209. package/dist/esm/{checkout.service-4tnXBKGq.js → checkout.service-92ld4w-G.js} +1 -1
  210. package/dist/esm/checkouts-list-core.entry.js +10 -10
  211. package/dist/esm/{checkouts-list-params-state-Gbxdxjoi.js → checkouts-list-params-state-Bn7pL-8x.js} +1 -1
  212. package/dist/esm/{checkouts-table-CHM4YCCZ.js → checkouts-table-BIO5rpvV.js} +3 -3
  213. package/dist/esm/config-state-Bl6vWekp.js +38 -0
  214. package/dist/esm/custom-popper_4.entry.js +9 -9
  215. package/dist/esm/{dispute.service-Bwh8pBe9.js → dispute.service-H2Oaq2af.js} +1 -1
  216. package/dist/esm/{event-types-CooIFpFI.js → event-types-BIryDMGV.js} +3 -3
  217. package/dist/esm/form-alert_5.entry.js +2 -2
  218. package/dist/esm/form-control-checkbox.entry.js +6 -6
  219. package/dist/esm/form-control-date.entry.js +5 -5
  220. package/dist/esm/{form-control-error-text-3q5yVuMQ.js → form-control-error-text-CVPFeRt0.js} +2 -2
  221. package/dist/esm/form-control-file-v2_2.entry.js +6 -6
  222. package/dist/esm/{form-control-help-text-BplkZkPF.js → form-control-help-text-D-ReDn6e.js} +2 -2
  223. package/dist/esm/form-control-help-text.entry.js +1 -1
  224. package/dist/esm/form-control-monetary-provisioning.entry.js +4 -4
  225. package/dist/esm/form-control-monetary.entry.js +6 -6
  226. package/dist/esm/form-control-number-masked_2.entry.js +5 -5
  227. package/dist/esm/form-control-number.entry.js +6 -6
  228. package/dist/esm/form-control-radio.entry.js +4 -4
  229. package/dist/esm/{get-business-B3c5gg1D.js → get-business-CIKToQur.js} +2 -2
  230. package/dist/esm/{get-payment-details-BbZmEGge.js → get-payment-details-CXiGG9cO.js} +3 -3
  231. package/dist/esm/get-payout-csv-D7IYYqVL.js +22 -0
  232. package/dist/esm/{get-subaccounts-58LQOtEI.js → get-subaccounts-COe5GtaY.js} +9 -9
  233. package/dist/esm/gross-payment-chart-core.entry.js +5 -5
  234. package/dist/esm/{header-1-BX6i3__G.js → header-1-ClU-iUGF.js} +2 -2
  235. package/dist/esm/{header-3-D0Sy-7DJ.js → header-3-jLYjhsUb.js} +2 -2
  236. package/dist/esm/{iframe-input-styles-state-DyXIZw1A.js → iframe-input-styles-state-ibYqbF--.js} +1 -1
  237. package/dist/esm/iframe-input.entry.js +9 -9
  238. package/dist/esm/{index-Cuk6aIda.js → index-Cc3u0uDC.js} +1 -1
  239. package/dist/esm/{index-BUM1DfV9.js → index-D6FDxSyt.js} +1 -1
  240. package/dist/esm/{insurance-state-BhklYgGK.js → insurance-state-5MPrBdwI.js} +3 -3
  241. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +7 -7
  242. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +8 -5
  243. package/dist/esm/justifi-additional-statement_8.entry.js +10 -10
  244. package/dist/esm/justifi-business-details.entry.js +10 -7
  245. package/dist/esm/justifi-business-form.entry.js +10 -10
  246. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  247. package/dist/esm/justifi-checkout-core.entry.js +8 -8
  248. package/dist/esm/justifi-checkout.entry.js +5 -5
  249. package/dist/esm/justifi-checkouts-list-filters.entry.js +7 -7
  250. package/dist/esm/justifi-checkouts-list.entry.js +15 -13
  251. package/dist/esm/justifi-config-provider.entry.js +24 -0
  252. package/dist/esm/justifi-details.entry.js +3 -3
  253. package/dist/esm/justifi-dispute-management-core.entry.js +2 -2
  254. package/dist/esm/justifi-dispute-management.entry.js +6 -6
  255. package/dist/esm/justifi-dispute-notification_3.entry.js +12 -12
  256. package/dist/esm/justifi-gross-payment-chart.entry.js +5 -5
  257. package/dist/esm/justifi-order-terminals.entry.js +19 -20
  258. package/dist/esm/justifi-owner-form_3.entry.js +7 -4
  259. package/dist/esm/justifi-payment-details.entry.js +13 -12
  260. package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
  261. package/dist/esm/justifi-payment-provisioning.entry.js +7 -4
  262. package/dist/esm/justifi-payment-transactions-list.entry.js +194 -0
  263. package/dist/esm/justifi-payments-list-filters.entry.js +7 -7
  264. package/dist/esm/justifi-payments-list.entry.js +18 -17
  265. package/dist/esm/justifi-payout-details.entry.js +13 -11
  266. package/dist/esm/justifi-payout-transactions-list.entry.js +203 -0
  267. package/dist/esm/justifi-payouts-list-filters.entry.js +7 -7
  268. package/dist/esm/justifi-payouts-list.entry.js +20 -19
  269. package/dist/esm/justifi-refund-payment.entry.js +22 -21
  270. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +6 -6
  271. package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
  272. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +8 -8
  273. package/dist/esm/justifi-terminal-orders-list.entry.js +20 -23
  274. package/dist/esm/justifi-terminals-list-filters.entry.js +7 -7
  275. package/dist/esm/justifi-terminals-list.entry.js +18 -18
  276. package/dist/esm/justifi-tokenize-payment-method.entry.js +8 -8
  277. package/dist/esm/loader.js +3 -3
  278. package/dist/esm/{package-gAO-RwrF.js → package-D2EbqwBe.js} +1 -1
  279. package/dist/esm/pagination-menu.entry.js +5 -5
  280. package/dist/esm/{parts-CB88j97I.js → parts-CjO1GttX.js} +9 -4
  281. package/dist/esm/payment-details-core.entry.js +14 -14
  282. package/dist/esm/payment.service-B9_zvpM_.js +19 -0
  283. package/dist/esm/payments-list-core.entry.js +11 -11
  284. package/dist/esm/{payments-list-params-state-Gbxdxjoi.js → payments-list-params-state-Bn7pL-8x.js} +1 -1
  285. package/dist/esm/{payments-status-BLhcMfnC.js → payments-status-CQQH_5oM.js} +2 -2
  286. package/dist/esm/{payments-table-VcaC77NC.js → payments-table-BdQtWUO-.js} +3 -3
  287. package/dist/esm/payout-details-core.entry.js +9 -9
  288. package/dist/esm/payout.service-BGSaI-j9.js +24 -0
  289. package/dist/esm/payouts-list-core.entry.js +11 -11
  290. package/dist/esm/{payouts-list-params-state-Gbxdxjoi.js → payouts-list-params-state-Bn7pL-8x.js} +1 -1
  291. package/dist/esm/{payouts-status-B9SSljnL.js → payouts-status-Cz9DL-Ph.js} +2 -2
  292. package/dist/esm/{payouts-table-DWBaNPmV.js → payouts-table-bOrdlN_0.js} +3 -3
  293. package/dist/esm/{skeleton-B-oFGeeG.js → skeleton-t69TLGP9.js} +2 -2
  294. package/dist/esm/{spinner-ptEcaLdc.js → spinner-Bo1Ff3L8.js} +2 -2
  295. package/dist/esm/{styled-host-BHVh70Zk.js → styled-host-C7vaWLiB.js} +1 -1
  296. package/dist/esm/table-filters-menu.entry.js +4 -4
  297. package/dist/esm/terminal-orders-list-core.entry.js +10 -10
  298. package/dist/esm/{terminal-orders-list-params-state-Gbxdxjoi.js → terminal-orders-list-params-state-Bn7pL-8x.js} +1 -1
  299. package/dist/esm/{terminal-orders-table-fuxIpfJ2.js → terminal-orders-table-5gemV24y.js} +4 -4
  300. package/dist/esm/terminal-quantity-selector.entry.js +3 -3
  301. package/dist/esm/terminal.service-B0Rc9vED.js +27 -0
  302. package/dist/esm/terminals-list-core.entry.js +10 -10
  303. package/dist/esm/terminals-list-params-state-Bn7pL-8x.js +16 -0
  304. package/dist/esm/{terminals-table-Dn71oQMb.js → terminals-table-DFxuyQM-.js} +3 -3
  305. package/dist/esm/{utils-B4pV3GWr.js → utils-CK8L6CE7.js} +2 -2
  306. package/dist/esm/webcomponents.js +4 -4
  307. package/dist/module/ApiNew.js +84 -0
  308. package/dist/module/Refund.js +78 -1
  309. package/dist/module/additional-statement.js +2 -2
  310. package/dist/module/badge.js +1 -1
  311. package/dist/module/billing-form.js +1 -1
  312. package/dist/module/business-core-info-form-step-core.js +1 -1
  313. package/dist/module/business-core-info-schema.js +1 -1
  314. package/dist/module/business.service.js +11 -9
  315. package/dist/module/button.js +1 -1
  316. package/dist/module/cancellation-policy.js +2 -2
  317. package/dist/module/checkout-core.js +1 -1
  318. package/dist/module/checkouts-list-core2.js +2 -2
  319. package/dist/module/config-state.js +38 -0
  320. package/dist/module/custom-popper2.js +2 -2
  321. package/dist/module/customer-details.js +2 -2
  322. package/dist/module/dispute-management-core.js +1 -1
  323. package/dist/module/dispute-notification.js +2 -2
  324. package/dist/module/dispute-response-core.js +2 -2
  325. package/dist/module/dispute-response.js +1 -1
  326. package/dist/module/duplicate-charge.js +2 -2
  327. package/dist/module/electronic-evidence.js +2 -2
  328. package/dist/module/event-types3.js +1 -1
  329. package/dist/module/form-alert2.js +1 -1
  330. package/dist/module/form-control-checkbox2.js +3 -3
  331. package/dist/module/form-control-date2.js +2 -2
  332. package/dist/module/form-control-file-v22.js +1 -1
  333. package/dist/module/form-control-file2.js +2 -2
  334. package/dist/module/form-control-monetary-provisioning2.js +1 -1
  335. package/dist/module/form-control-monetary2.js +3 -3
  336. package/dist/module/form-control-number-masked2.js +2 -2
  337. package/dist/module/form-control-number.js +3 -3
  338. package/dist/module/form-control-radio2.js +3 -3
  339. package/dist/module/form-control-select2.js +2 -2
  340. package/dist/module/form-control-text2.js +2 -2
  341. package/dist/module/form-control-textarea2.js +3 -3
  342. package/dist/module/get-business.js +2 -2
  343. package/dist/module/get-payment-details.js +2 -2
  344. package/dist/module/get-payout-csv.js +3 -27
  345. package/dist/module/get-subaccounts.js +8 -8
  346. package/dist/module/gross-payment-chart-core2.js +1 -1
  347. package/dist/module/hidden-input2.js +2 -2
  348. package/dist/module/iframe-input2.js +4 -4
  349. package/dist/module/index.js +1 -1
  350. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  351. package/dist/module/justifi-checkouts-list.js +2 -3
  352. package/dist/module/justifi-config-provider.d.ts +11 -0
  353. package/dist/module/justifi-config-provider.js +45 -0
  354. package/dist/module/justifi-dispute-management.js +1 -1
  355. package/dist/module/justifi-order-terminals.js +8 -13
  356. package/dist/module/justifi-payment-details.js +1 -4
  357. package/dist/module/justifi-payment-transactions-list.d.ts +11 -0
  358. package/dist/module/justifi-payment-transactions-list.js +226 -0
  359. package/dist/module/justifi-payments-list-filters.js +3 -3
  360. package/dist/module/justifi-payments-list.js +4 -7
  361. package/dist/module/justifi-payout-details.js +3 -5
  362. package/dist/module/justifi-payout-transactions-list.d.ts +11 -0
  363. package/dist/module/justifi-payout-transactions-list.js +236 -0
  364. package/dist/module/justifi-payouts-list-filters.js +3 -3
  365. package/dist/module/justifi-payouts-list.js +7 -10
  366. package/dist/module/justifi-refund-payment.js +10 -13
  367. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  368. package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
  369. package/dist/module/justifi-terminal-orders-list.js +10 -17
  370. package/dist/module/justifi-terminals-list-filters.js +2 -2
  371. package/dist/module/justifi-terminals-list.js +5 -9
  372. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  373. package/dist/module/new-payment-method.js +1 -1
  374. package/dist/module/owner-form-core2.js +1 -1
  375. package/dist/module/package.js +1 -1
  376. package/dist/module/pagination-menu2.js +4 -4
  377. package/dist/module/parts.js +9 -4
  378. package/dist/module/payment-details-core2.js +7 -7
  379. package/dist/module/payment.service.js +10 -12
  380. package/dist/module/payments-list-core2.js +2 -2
  381. package/dist/module/payout-details-core2.js +1 -1
  382. package/dist/module/payout.service.js +24 -0
  383. package/dist/module/payouts-list-core2.js +2 -2
  384. package/dist/module/product-or-service.js +2 -2
  385. package/dist/module/refund-policy.js +2 -2
  386. package/dist/module/saved-payment-method.js +1 -1
  387. package/dist/module/sezzle-payment-method.js +1 -1
  388. package/dist/module/shipping-details.js +2 -2
  389. package/dist/module/spinner.js +1 -1
  390. package/dist/module/table-filters-menu2.js +2 -2
  391. package/dist/module/terminal-orders-list-core2.js +2 -2
  392. package/dist/module/terminal-quantity-selector2.js +2 -2
  393. package/dist/module/terminal.service.js +14 -21
  394. package/dist/module/terminals-list-core2.js +2 -2
  395. package/dist/types/actions/business/get-business.d.ts +1 -2
  396. package/dist/types/actions/payment/get-payment-details.d.ts +1 -2
  397. package/dist/types/actions/payment/get-payment-transactions.d.ts +10 -0
  398. package/dist/types/actions/payment/get-payments.d.ts +1 -2
  399. package/dist/types/actions/payout/get-payout-transactions.d.ts +10 -0
  400. package/dist/types/actions/payout/get-payouts.d.ts +1 -2
  401. package/dist/types/actions/refund/refund-actions.d.ts +1 -2
  402. package/dist/types/actions/sub-account/get-subaccounts.d.ts +1 -2
  403. package/dist/types/actions/terminal/get-terminal-models.d.ts +1 -2
  404. package/dist/types/actions/terminal/get-terminal-orders.d.ts +1 -2
  405. package/dist/types/actions/terminal/get-terminals.d.ts +1 -2
  406. package/dist/types/api/ApiNew.d.ts +61 -0
  407. package/dist/types/api/PaymentBalanceTransaction.d.ts +42 -0
  408. package/dist/types/api/PayoutBalanceTransaction.d.ts +46 -0
  409. package/dist/types/api/index.d.ts +2 -0
  410. package/dist/types/api/services/business.service.d.ts +1 -1
  411. package/dist/types/api/services/payment.service.d.ts +7 -5
  412. package/dist/types/api/services/payout.service.d.ts +10 -7
  413. package/dist/types/api/services/refund.service.d.ts +2 -2
  414. package/dist/types/api/services/subaccounts.service.d.ts +4 -3
  415. package/dist/types/api/services/terminal.service.d.ts +8 -8
  416. package/dist/types/api/services/terminal_orders.service.d.ts +2 -2
  417. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +2 -2
  418. package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +1 -1
  419. package/dist/types/components/config-provider/config-provider.d.ts +7 -0
  420. package/dist/types/components/config-provider/config-state.d.ts +13 -0
  421. package/dist/types/components/order-terminals/order-terminals.d.ts +0 -1
  422. package/dist/types/components/payment-details/payment-details.d.ts +0 -1
  423. package/dist/types/components/payment-transactions-list/payment-transactions-list.d.ts +31 -0
  424. package/dist/types/components/payment-transactions-list/payment-transactions-table.d.ts +43 -0
  425. package/dist/types/components/payments-list/payments-list.d.ts +0 -1
  426. package/dist/types/components/payout-details/get-payout-csv.d.ts +1 -2
  427. package/dist/types/components/payout-details/payout-details.d.ts +0 -1
  428. package/dist/types/components/payout-transactions-list/payout-transactions-list.d.ts +32 -0
  429. package/dist/types/components/payout-transactions-list/payout-transactions-table.d.ts +45 -0
  430. package/dist/types/components/payouts-list/payouts-list.d.ts +0 -1
  431. package/dist/types/components/refund-payment/refund-payment.d.ts +0 -1
  432. package/dist/types/components/terminal-orders-list/terminal-orders-list.d.ts +0 -1
  433. package/dist/types/components/terminals-list/terminals-list.d.ts +0 -1
  434. package/dist/types/components.d.ts +93 -16
  435. package/dist/types/stencil-public-runtime.d.ts +19 -0
  436. package/dist/types/styles/parts.d.ts +10 -4
  437. package/dist/webcomponents/p-00eb2bc9.entry.js +1 -0
  438. package/dist/webcomponents/p-0c2f2ea9.entry.js +1 -0
  439. package/dist/webcomponents/p-11344996.entry.js +1 -0
  440. package/dist/webcomponents/{p-5a07a84c.entry.js → p-12674a89.entry.js} +1 -1
  441. package/dist/webcomponents/p-19581139.entry.js +1 -0
  442. package/dist/webcomponents/p-19d21f35.entry.js +1 -0
  443. package/dist/webcomponents/p-2294e63b.entry.js +1 -0
  444. package/dist/webcomponents/p-24e04f78.entry.js +1 -0
  445. package/dist/webcomponents/p-2P4kwjNi.js +1 -0
  446. package/dist/webcomponents/{p-a9eff0f2.entry.js → p-30466d27.entry.js} +1 -1
  447. package/dist/webcomponents/p-32c156c6.entry.js +1 -0
  448. package/dist/webcomponents/p-32ff6641.entry.js +1 -0
  449. package/dist/webcomponents/{p-063dd981.entry.js → p-38d6c034.entry.js} +1 -1
  450. package/dist/webcomponents/{p-3147bfe2.entry.js → p-3add8d1b.entry.js} +1 -1
  451. package/dist/webcomponents/{p-cf8f69de.entry.js → p-3c01edb0.entry.js} +1 -1
  452. package/dist/webcomponents/{p-eb31e5c7.entry.js → p-3cd9d9d8.entry.js} +1 -1
  453. package/dist/webcomponents/p-4028ccb0.entry.js +1 -0
  454. package/dist/webcomponents/p-43140695.entry.js +1 -0
  455. package/dist/webcomponents/{p-6d2a48f5.entry.js → p-493c9bd9.entry.js} +1 -1
  456. package/dist/webcomponents/p-4ac754e7.entry.js +1 -0
  457. package/dist/webcomponents/p-4afcb015.entry.js +1 -0
  458. package/dist/webcomponents/p-4c64b1e9.entry.js +1 -0
  459. package/dist/webcomponents/{p-f0301d11.entry.js → p-4e3aca7a.entry.js} +1 -1
  460. package/dist/webcomponents/p-4e489cf9.entry.js +1 -0
  461. package/dist/webcomponents/p-4e61f480.entry.js +1 -0
  462. package/dist/webcomponents/{p-9a9bb294.entry.js → p-4f98895d.entry.js} +1 -1
  463. package/dist/webcomponents/p-4fc851c0.entry.js +1 -0
  464. package/dist/webcomponents/p-526be31d.entry.js +1 -0
  465. package/dist/webcomponents/p-575fc637.entry.js +1 -0
  466. package/dist/webcomponents/p-581ca781.entry.js +1 -0
  467. package/dist/webcomponents/{p-7ddd7122.entry.js → p-5a1238a1.entry.js} +3 -3
  468. package/dist/webcomponents/p-5b4cbfd4.entry.js +1 -0
  469. package/dist/webcomponents/p-5d8d1818.entry.js +1 -0
  470. package/dist/webcomponents/{p-ab99e4c6.entry.js → p-5eb85754.entry.js} +1 -1
  471. package/dist/webcomponents/{p-332ce001.entry.js → p-5f02ec20.entry.js} +1 -1
  472. package/dist/webcomponents/p-6567b171.entry.js +1 -0
  473. package/dist/webcomponents/p-6d701784.entry.js +1 -0
  474. package/dist/webcomponents/p-6n7viK-J.js +1 -0
  475. package/dist/webcomponents/{p-4addd069.entry.js → p-78511d66.entry.js} +1 -1
  476. package/dist/webcomponents/p-7b649051.entry.js +1 -0
  477. package/dist/webcomponents/{p-34cfafed.entry.js → p-805269fd.entry.js} +1 -1
  478. package/dist/webcomponents/p-9d354918.entry.js +1 -0
  479. package/dist/webcomponents/p-AVaenhw9.js +1 -0
  480. package/dist/webcomponents/p-B4Bi1JkP.js +1 -0
  481. package/dist/webcomponents/p-BMDJA9xX.js +1 -0
  482. package/dist/webcomponents/{p-CwHcfOV7.js → p-BQEAUdoy.js} +1 -1
  483. package/dist/webcomponents/p-BS-e1gnL.js +1 -0
  484. package/dist/webcomponents/{p-DoH48u6u.js → p-BXey6mVj.js} +1 -1
  485. package/dist/webcomponents/{p-01wziNa9.js → p-BdNmdBIx.js} +1 -1
  486. package/dist/webcomponents/p-Bl3qFMoN.js +1 -0
  487. package/dist/webcomponents/p-Bl79NorO.js +1 -0
  488. package/dist/webcomponents/p-CN_YheWL.js +1 -0
  489. package/dist/webcomponents/p-CPXN4Ths.js +1 -0
  490. package/dist/webcomponents/p-CSwEbNEl.js +1 -0
  491. package/dist/webcomponents/p-CWpAvtGa.js +1 -0
  492. package/dist/webcomponents/{p-DhEfW-kS.js → p-C_9TcvwA.js} +1 -1
  493. package/dist/webcomponents/{p-BWFriesi.js → p-Cd06j2SL.js} +1 -1
  494. package/dist/webcomponents/p-CegkOiUz.js +1 -0
  495. package/dist/webcomponents/p-CiKdTI9h.js +1 -0
  496. package/dist/webcomponents/{p-0czqizJW.js → p-Cixn6QDS.js} +1 -1
  497. package/dist/webcomponents/p-CjO1GttX.js +1 -0
  498. package/dist/webcomponents/p-D2EbqwBe.js +1 -0
  499. package/dist/webcomponents/p-D5Sh88BE.js +1 -0
  500. package/dist/webcomponents/{p-BuYnqWwT.js → p-D9q8WsW5.js} +1 -1
  501. package/dist/webcomponents/p-DD14E0K0.js +1 -0
  502. package/dist/webcomponents/{p-CTBH4Lj9.js → p-DDEz7_ad.js} +1 -1
  503. package/dist/webcomponents/p-DJzjeg3x.js +1 -0
  504. package/dist/webcomponents/{p-DhQ2XlhY.js → p-DavDfnxI.js} +1 -1
  505. package/dist/webcomponents/p-DjGTAHJM.js +1 -0
  506. package/dist/webcomponents/p-DmIOVniD.js +1 -0
  507. package/dist/webcomponents/p-DniQ6yo6.js +1 -0
  508. package/dist/webcomponents/{p-eYaGyUvS.js → p-Dss1xCBW.js} +1 -1
  509. package/dist/webcomponents/{p-C3nDCvFQ.js → p-DuYlA4lj.js} +1 -1
  510. package/dist/webcomponents/p-Dumd8fMw.js +1 -0
  511. package/dist/webcomponents/{p-D89x2FYg.js → p-DyIEclkx.js} +1 -1
  512. package/dist/webcomponents/p-ERVEQjR2.js +1 -0
  513. package/dist/webcomponents/{p-sXe3gn-5.js → p-GTA6l_sT.js} +1 -1
  514. package/dist/webcomponents/p-KLQjERL5.js +1 -0
  515. package/dist/webcomponents/{p-QYQ4VLoz.js → p-OjYukdAC.js} +1 -1
  516. package/dist/webcomponents/p-_bsEVFir.js +1 -0
  517. package/dist/webcomponents/{p-d5675bf5.entry.js → p-a2f77373.entry.js} +1 -1
  518. package/dist/webcomponents/p-a4c08055.entry.js +1 -0
  519. package/dist/webcomponents/p-a93cceca.entry.js +1 -0
  520. package/dist/webcomponents/p-ab5cde61.entry.js +1 -0
  521. package/dist/webcomponents/p-ac98a15e.entry.js +1 -0
  522. package/dist/webcomponents/p-b0430518.entry.js +1 -0
  523. package/dist/webcomponents/{p-65345bd4.entry.js → p-b05693c6.entry.js} +1 -1
  524. package/dist/webcomponents/{p-2fe9576b.entry.js → p-b182796a.entry.js} +1 -1
  525. package/dist/webcomponents/{p-456f8c0a.entry.js → p-b25b8534.entry.js} +1 -1
  526. package/dist/webcomponents/p-b2db4fae.entry.js +1 -0
  527. package/dist/webcomponents/{p-e52d5ead.entry.js → p-b40108c0.entry.js} +1 -1
  528. package/dist/webcomponents/{p-c558725e.entry.js → p-bb5c9475.entry.js} +1 -1
  529. package/dist/webcomponents/p-bb97192f.entry.js +1 -0
  530. package/dist/webcomponents/{p-4ee6482d.entry.js → p-c77481fe.entry.js} +1 -1
  531. package/dist/webcomponents/p-c899df50.entry.js +1 -0
  532. package/dist/webcomponents/p-ca11ad58.entry.js +1 -0
  533. package/dist/webcomponents/p-d06f7faf.entry.js +1 -0
  534. package/dist/webcomponents/p-d2fbf7ea.entry.js +1 -0
  535. package/dist/webcomponents/p-d7a04fdd.entry.js +1 -0
  536. package/dist/webcomponents/p-d8f7a73b.entry.js +1 -0
  537. package/dist/webcomponents/p-d90b8cc2.entry.js +1 -0
  538. package/dist/webcomponents/p-e558eab8.entry.js +1 -0
  539. package/dist/webcomponents/{p-6c4927e7.entry.js → p-f2dc1405.entry.js} +1 -1
  540. package/dist/webcomponents/p-oPo_KSwO.js +1 -0
  541. package/dist/webcomponents/p-um3YdOwW.js +1 -0
  542. package/dist/webcomponents/p-wqUvt1PB.js +1 -0
  543. package/dist/webcomponents/webcomponents.esm.js +1 -1
  544. package/package.json +1 -1
  545. package/dist/cjs/get-payout-csv-DD9C5yMw.js +0 -49
  546. package/dist/cjs/payment.service-BrHUGHYs.js +0 -23
  547. package/dist/cjs/terminal.service-BjSo5Cm4.js +0 -36
  548. package/dist/cjs/terminals-list-params-state-Cmfy_CND.js +0 -22
  549. package/dist/esm/get-payout-csv-BKq22mOI.js +0 -46
  550. package/dist/esm/payment.service-Co_fPTvK.js +0 -21
  551. package/dist/esm/terminal.service-BLOZ-ZlR.js +0 -34
  552. package/dist/esm/terminals-list-params-state-Gbxdxjoi.js +0 -16
  553. package/dist/webcomponents/p-08d5b491.entry.js +0 -1
  554. package/dist/webcomponents/p-1049c0c5.entry.js +0 -1
  555. package/dist/webcomponents/p-2c2f6743.entry.js +0 -1
  556. package/dist/webcomponents/p-2d80f427.entry.js +0 -1
  557. package/dist/webcomponents/p-2f6c0a07.entry.js +0 -1
  558. package/dist/webcomponents/p-307a0db6.entry.js +0 -1
  559. package/dist/webcomponents/p-3995c8b8.entry.js +0 -1
  560. package/dist/webcomponents/p-3e084a0e.entry.js +0 -1
  561. package/dist/webcomponents/p-43c1c278.entry.js +0 -1
  562. package/dist/webcomponents/p-507f7a31.entry.js +0 -1
  563. package/dist/webcomponents/p-50aa4e4d.entry.js +0 -1
  564. package/dist/webcomponents/p-5dc3a795.entry.js +0 -1
  565. package/dist/webcomponents/p-62bdcca1.entry.js +0 -1
  566. package/dist/webcomponents/p-6a54d69b.entry.js +0 -1
  567. package/dist/webcomponents/p-7414b942.entry.js +0 -1
  568. package/dist/webcomponents/p-80dca817.entry.js +0 -1
  569. package/dist/webcomponents/p-815937bb.entry.js +0 -1
  570. package/dist/webcomponents/p-86fdc0a1.entry.js +0 -1
  571. package/dist/webcomponents/p-98111d03.entry.js +0 -1
  572. package/dist/webcomponents/p-9bbfde16.entry.js +0 -1
  573. package/dist/webcomponents/p-B7ErpLYA.js +0 -1
  574. package/dist/webcomponents/p-BHHWVg32.js +0 -1
  575. package/dist/webcomponents/p-BM61p7vG.js +0 -1
  576. package/dist/webcomponents/p-BODr6HXb.js +0 -1
  577. package/dist/webcomponents/p-BVwkHwTc.js +0 -1
  578. package/dist/webcomponents/p-Bo92MHrs.js +0 -1
  579. package/dist/webcomponents/p-BoPxMyJA.js +0 -1
  580. package/dist/webcomponents/p-BxPlB-C5.js +0 -1
  581. package/dist/webcomponents/p-CB88j97I.js +0 -1
  582. package/dist/webcomponents/p-CGz3XHQc.js +0 -1
  583. package/dist/webcomponents/p-CLBRsaLx.js +0 -1
  584. package/dist/webcomponents/p-CYsU0lEI.js +0 -1
  585. package/dist/webcomponents/p-CjunQqer.js +0 -1
  586. package/dist/webcomponents/p-CnyMKcfC.js +0 -1
  587. package/dist/webcomponents/p-D7s2671S.js +0 -1
  588. package/dist/webcomponents/p-D9t-X0IY.js +0 -1
  589. package/dist/webcomponents/p-DLpKiPxJ.js +0 -1
  590. package/dist/webcomponents/p-Dna7whFY.js +0 -1
  591. package/dist/webcomponents/p-DzPbgN8M.js +0 -1
  592. package/dist/webcomponents/p-JcczGkik.js +0 -1
  593. package/dist/webcomponents/p-ZUQEru6m.js +0 -1
  594. package/dist/webcomponents/p-a22974fd.entry.js +0 -1
  595. package/dist/webcomponents/p-a2bf5919.entry.js +0 -1
  596. package/dist/webcomponents/p-b7053613.entry.js +0 -1
  597. package/dist/webcomponents/p-bb8f7062.entry.js +0 -1
  598. package/dist/webcomponents/p-be04a09c.entry.js +0 -1
  599. package/dist/webcomponents/p-c38c742e.entry.js +0 -1
  600. package/dist/webcomponents/p-c6534f5f.entry.js +0 -1
  601. package/dist/webcomponents/p-c6cf707c.entry.js +0 -1
  602. package/dist/webcomponents/p-c70dcec1.entry.js +0 -1
  603. package/dist/webcomponents/p-c8d608a1.entry.js +0 -1
  604. package/dist/webcomponents/p-ce20d709.entry.js +0 -1
  605. package/dist/webcomponents/p-def42fc7.entry.js +0 -1
  606. package/dist/webcomponents/p-dfcf19f2.entry.js +0 -1
  607. package/dist/webcomponents/p-e0896deb.entry.js +0 -1
  608. package/dist/webcomponents/p-e3962860.entry.js +0 -1
  609. package/dist/webcomponents/p-e3cd72ad.entry.js +0 -1
  610. package/dist/webcomponents/p-eb677eb2.entry.js +0 -1
  611. package/dist/webcomponents/p-f51e4213.entry.js +0 -1
  612. package/dist/webcomponents/p-gAO-RwrF.js +0 -1
  613. package/dist/webcomponents/p-hkXaxw9l.js +0 -1
  614. package/dist/webcomponents/p-p7aAf5_m.js +0 -1
  615. package/dist/webcomponents/p-y-Ys7Rd-.js +0 -1
  616. package/dist/webcomponents/p-z1GJDdMW.js +0 -1
  617. /package/dist/webcomponents/{p-BUM1DfV9.js → p-D6FDxSyt.js} +0 -0
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-BUM1DfV9.js";import{f as i}from"./p-CpTwq2jw.js";import{E as a,ae as r}from"./p-CB88j97I.js";import{B as d}from"./p-D9t-X0IY.js";import{S as c}from"./p-C3nDCvFQ.js";import{S as o}from"./p-CLBRsaLx.js";import{C as n,a as h}from"./p-SdntD1xf.js";import{g as p,a as f}from"./p-C5RuuShs.js";import{D as l}from"./p-DhQ2XlhY.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-eYaGyUvS.js";import"./p-BFTU3MAI.js";import"./p-BBsCnePk.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import"./p-7MWRbTXI.js";import"./p-ZUQEru6m.js";import"./p-Ct-uNz2r.js";import"./p-gAO-RwrF.js";const m=({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()}},v=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(){m({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})}render(){var e,t,n,h,p,f,l;return s(c,{key:"c7b0e27df3ff2b6c3d7896b643dafa22ecbfc12f"},this.isLoading&&s("div",{key:"18146e1d3c1dbe3c0d13373c271f6f0c2a14e577",style:{marginBottom:"8px"}},s(o,{key:"4549fd59a8f667f3f20eee3ad7f222e3482ddd90",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"7eb2385f0ffd5ff987e744cfa63b21c2b287b8c7",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"573f29b4ab58f7e0e40b92ba66f72301b554c747",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"cbca9793cb135c38a44990123eabf1356f956611",part:a},s("h1",{key:"753e802679bac3750d29956ff36405acd382e63a",class:"h4",part:r},"This payment is disputed"),s("p",{key:"b61db99b9cd660cc275f95f54cdd6c83f8225875"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"9d5121aaeca16f9aa7a95783c1051c82aa9c8411",class:"h5"},"Dispute details"),s("div",{key:"9283a15923b110e0b3fa88d626b6f35382c1d140",class:"d-table gap-2"},s("div",{key:"2e55561fe97701ab94ea24b6959971c74ca6e729",class:"d-table-row gap-2"},s("span",{key:"f00c9fd6f56714465930707eb4b5d62089e7d267",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"49df6471bb1b23a17c9e94bec38a4790a4c201c9",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"82c0acacdf47345bdb164b8e478e5f00231a6c91",class:"d-table-row gap-2"},s("span",{key:"9e5ffb7a87c37bddb5f3ac06b5cd5b0cb13a8f16",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"1ce8f6455621793c8cc529db0ad7e00edd7c56f7",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"2387aca8911939e4a38001aa4b027e4347b53f67",class:"d-table-row gap-2"},s("span",{key:"6bae0054cd63fa4079aad94b1d59ebae82a5f29f",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"9902828da0416de007183640132b13b3b3876ab5",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"488bf8b0f522eb80dc7875a05e5bcd9ecadc2e9f",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"4a1ac98e4e10ef9eb6583266e822e9f92f37bb7a",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"9636fef3a69df92ad8d5361f60374ee185c684f6",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"80161e317bf111f13bd5305a427862a5c8533c6b"},s("h1",{key:"c5f43507dbb2b82b7098143b8397a6321e98201c",class:"h4"},"This payment is disputed and under review"),s("p",{key:"a31b3e8e72a8936ba3016e8f1f08505025d36372"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"0033197d2d6c036de59dab25ec7238664bd52726"},s("h1",{key:"ef352a480feefb8e7aa22e27b86395baaedddaa5",class:"h4"},"This payment was disputed"),s("p",{key:"258eeb510b153e46468889685f6abfcd88671be8"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"fa49089194fd3462be03ac147c0f414bcd2ff936"},s("h1",{key:"cad5f4223d4394adb1630268ec1dbce4b8e7de97",class:"h4"},"This payment was disputed"),s("p",{key:"befc6125e3d2548576c2072ebdf509f39afd93d3"},"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(){this.analytics.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=m({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:"f9f1f5840fdcbde1bff206516b1ab5777e29e101"},s("justifi-dispute-response-core",{key:"8ead7c944c233a6fa5fc6bf1cdd04670d446948e","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:"925abd40942ff12e2e6a86a3c929848694713b15",class:"row gy-3"},s("div",{key:"d5f26db74f10893a9cde0758902c0b035a61a2c1",class:"col-12"},s("h1",{key:"97a51d22b0e540b72f91f0a1a7bd813c8fb8d82d",class:"h4",part:r},"Counter dispute")),s("div",{key:"fad6269029d7c647b0fdfef74b51ae10b57c3c25",class:"col-12"},this.currentStepComponent),s("div",{key:"ddc092e8ec7d7e65944ec0d543ee77d002430f5a",class:"col-12"},s("div",{key:"ba9acd77d6aaa6aeb302cecc9d3f5d5b429214c5",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{v as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}
1
+ import{r as e,c as t,h as s}from"./p-D6FDxSyt.js";import{f as i}from"./p-CpTwq2jw.js";import{C as a,ai as r}from"./p-CjO1GttX.js";import{B as d}from"./p-CWpAvtGa.js";import{S as c}from"./p-DuYlA4lj.js";import{S as o}from"./p-B4Bi1JkP.js";import{C as n,a as h}from"./p-SdntD1xf.js";import{g as p,a as f}from"./p-C5RuuShs.js";import{D as l}from"./p-DavDfnxI.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-Dss1xCBW.js";import"./p-BFTU3MAI.js";import"./p-BBsCnePk.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import"./p-7MWRbTXI.js";import"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";import"./p-D2EbqwBe.js";const m=({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()}},v=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(){m({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})}render(){var e,t,n,h,p,f,l;return s(c,{key:"77119b1227200909f4742e24df0a45e1f631c65c"},this.isLoading&&s("div",{key:"f0766ff057fb2f4b75b34c7d4a386bde43e49652",style:{marginBottom:"8px"}},s(o,{key:"d7268194dea5ac2a3b87aea8e17573b4768e308f",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"f8863e45a917f56be302ca1b0b3d472119f6465c",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"c7b8c9c89d9488eea3be8ea0b4536f98a8151487",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"875fe7def317ce1c4547e04e83baf2b232209058",part:a},s("h1",{key:"09646afc2aac3bf4ef9737bc12442660bbafb2dd",class:"h4",part:r},"This payment is disputed"),s("p",{key:"14224cffb16726eaa589118be954e0f844ffaee8"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"415028b91872a2391796872fdffdbee837a2a511",class:"h5"},"Dispute details"),s("div",{key:"c2b8c6be3132f98eb8c686ab88a5a6a68f92a60e",class:"d-table gap-2"},s("div",{key:"d11bd8b3bc680183e8bee40281cc2c294aedbd5a",class:"d-table-row gap-2"},s("span",{key:"d77796c0d2764329c3b482ae49ceb8b4cac03d37",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"716d8af2a250c3237af6e23b43bf50e032e9f203",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"daba4379197533d2a4b246e81139d81cd15761c6",class:"d-table-row gap-2"},s("span",{key:"a039fbf47aff16445e3411c33a7b53716c42866d",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"19087aba5c516d0c71e9f84e8b3323a044ae532a",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"68ef78b15627df3b22bcde4b90f7c216466e7468",class:"d-table-row gap-2"},s("span",{key:"9463c281d76b5e201a55c2993253fc22d04168dc",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"5cffed27038f5571f37377c5023a88c8b7773a59",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"e856d924edac10116781425f6d7c4c8c6b26ced2",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"6d5278a91f79c2fe8fbdd9e391b109a6491b13b6",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"242b9076b482aae731ab6bedc1592a1a826e24c5",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"f3711546ce5bf8b6a4a8689f5db3fdbf58f45bf4"},s("h1",{key:"06e39be43cfacf667919adbd2f4f8c596702c340",class:"h4"},"This payment is disputed and under review"),s("p",{key:"b3bfef2d40e197f8dc9df6f71d9f13017a4b923d"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"580144b1439d6e017726b9731b7bb15e71900092"},s("h1",{key:"42d74d215d23409672449af86e25c945aac33ea1",class:"h4"},"This payment was disputed"),s("p",{key:"4c337e89a32f62c8f03a53eb84737785f4b0bdb4"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"66c0f7bbada42053683dd25776a7c0abdb708315"},s("h1",{key:"273f2d82dbe73a15da3186946763579be2801aa4",class:"h4"},"This payment was disputed"),s("p",{key:"22172d1c6833eb5407c19dd31b85db805d07d177"},"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(){this.analytics.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=m({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:"4c0cd0b8a082d9f2f4428868d88cbb9bde2a3a5d"},s("justifi-dispute-response-core",{key:"58bbf7f5b2ce8efea0467efddfeffe3c752a3402","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:"452cfcf106f40c27f34df05ae2923c0909de9245",class:"row gy-3"},s("div",{key:"d9b608a8d880310b96e98cd4a00cabfcca77dc79",class:"col-12"},s("h1",{key:"050aef1fa636d09880edc7d738d56eab2cf62e52",class:"h4",part:r},"Counter dispute")),s("div",{key:"4e6094f9240d4db3d4bc03c59754ab3d04fed5bc",class:"col-12"},this.currentStepComponent),s("div",{key:"9c1739bc4ed1a9104fd04531a11e02cbbb4f11cc",class:"col-12"},s("div",{key:"d37cda5a7689d8bf9263283eb24e1074ee3d97a0",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{v as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}
@@ -1 +1 @@
1
- import{r as e,h as t,H as a,c as s,g as r}from"./p-BUM1DfV9.js";import{s as i,d as o,i as c}from"./p-CpTwq2jw.js";import"./p-SdntD1xf.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import"./p-ZUQEru6m.js";import{E as l}from"./p-Ct-uNz2r.js";import{c as d}from"./p-IA90llLO.js";import"./p-XYgDHrVL.js";import{n}from"./p-BnjCmwMr.js";import{Z as b,I as f,A as h,T as p,B as m,c as u,l as y,b as k,C as x,a as j}from"./p-CB88j97I.js";import{S as v}from"./p-CLBRsaLx.js";import{F as _}from"./p-D7s2671S.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";import"./p-BrvbVMVq.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const T=class{constructor(t){e(this,t)}render(){return t("div",{key:"a3ff8b1ff23923beb847e66d6c56a39de9a86434",class:"row gy-3"},t("div",{key:"86f9ba3a8f0f87f7fa67ba0fcf1d7c04f67e9bc5",class:"col-12"},t("form-control-file",{key:"9cc2bc21414c8e3f4b25ac47b76340a4ce569c42",name:"voided_check",label:"Voided Check",documentType:l.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"bee72d6c63514cdbd3200910d3a53b045c60d05d",class:"col-12"},t("form-control-file",{key:"80a79f352d078cd210768b4060cad7014b1060c5",name:"bank_statement",label:"Bank Statement",documentType:l.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},g=class{constructor(t){e(this,t)}render(){return t("div",{key:"b18e803521d67b40e4e5af03a66dcdca0b678968",class:"row gy-3"},t("div",{key:"e2e6667ffbcebb6a9aa50739814e7bbebceaabfa",class:"col-12"},t("form-control-text",{key:"e1ad63fb7db32dbb6ed67cf18919c681d6d192ef",name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"54db821813e7eb931b8f19fad7fce976cdeb0045",class:"col-12"},t("form-control-text",{key:"4ecf222c1918e364f319d07e0a770d68dba099d0",name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"a92c38f2abbcb3dcaee4bc5ea73df44b31adc3f9",class:"col-12"},t("form-control-text",{key:"492ff1a4d1e9c4f2fa9d0e527a34dc5ccb09afe6",name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"8e14e6e3de43822d139085d3a05bfd0e7ae5b1be",class:"col-12"},t("form-control-select",{key:"f6648b6f7c4a475f88b849bf3a75d446bb539c69",name:"account_type",label:"Account Type",options:d,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"68a2efc082f5b6414ebde10b6da4365677dbefca",class:"col-12"},t("form-control-text",{key:"3ef9b3db5882063708ccf1eb282f3e90ed53ce82",name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:n,disabled:this.formDisabled,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),t("div",{key:"e3270db28269bc25dd4d5a99274f042c1efd1fc6",class:"col-12"},t("form-control-text",{key:"a8e801f65a4cc164cdc7bf186fed67f87abc828f",name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:n,disabled:this.formDisabled,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},B=class{constructor(t){e(this,t),this.documents=[],this.isLoading=!1}render(){return this.isLoading?t(v,{height:"50px"}):this.documents.length?t(a,null,t("div",{class:"card",part:b},t("div",{class:"card-body"},t("h5",{class:"card-title",part:f},"Documents Already on File"),t("div",{class:"table-responsive"},t("table",{class:"table table-sm table-borderless",part:h},t("thead",null,t("tr",null,t("th",{style:{width:"25%"},part:p,scope:"col"},"File Name"),t("th",{style:{width:"25%"},part:p,scope:"col"},"File Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Document Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Date Uploaded"))),t("tbody",null,this.documents.sort(((e,t)=>e.document_type.localeCompare(t.document_type))).map(((e,a)=>t("tr",{class:0===a?"border-bottom border-top":"border-bottom"},t("td",{part:m},e.file_name),t("td",{part:m},e.file_type),t("td",{part:m},i(e.document_type)),t("td",{part:m},`${o(e.created_at)} - ${c(e.created_at)}`))))))))),t("hr",null)):null}},w=class{constructor(t){e(this,t),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.fileSelected=s(this,"fileSelected"),this.isFocused=!1,this.handleFormControlInput=e=>{const t=e.target,a=t.getAttribute("name");this.inputHandler(a,t.value),this.formControlInput.emit({name:a,value:t.value})},this.changeHandler=()=>{const e=this.fileInput.files;e&&this.fileSelected.emit({fileList:e,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let e=u;return this.errorText&&(e=k),this.disabled&&(e=x),this.isFocused&&(e=j),e}render(){return t(a,{key:"a5ef7adbe7efb704ab17ea2bf7e72506a16383af"},t("div",{key:"689a358ae4b0e6d452001b1966d8e159d0870e5b",class:"form-group d-flex flex-column"},t("div",{key:"04a77efbf4584dee1d66b93d5d7ff4859a95909c",class:"d-flex align-items-start gap-2"},t("label",{key:"5c529a39de6862e5c6e22ccf0eb5384360b79e7a",part:y,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"d9efcdc856f685aeed2fd23bbfa6ed28380d8373",helpText:this.helpText})),t("input",{key:"52f2ee7437bfd30f5b96447a95d1e1d06e7f49ca",ref:e=>this.fileInput=e,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),t(_,{key:"e6c0b986edb44f7eaa89f800e698b52be61b9564",errorText:this.errorText,name:this.name})))}get el(){return r(this)}};export{T as bank_account_document_form_inputs,g as bank_account_form_inputs,B as business_documents_on_file,w as form_control_file}
1
+ import{r as e,h as t,H as a,c as s,g as r}from"./p-D6FDxSyt.js";import{s as c,d as i,i as o}from"./p-CpTwq2jw.js";import"./p-SdntD1xf.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import"./p-AVaenhw9.js";import{E as l}from"./p-Ct-uNz2r.js";import{c as d}from"./p-IA90llLO.js";import"./p-XYgDHrVL.js";import{n}from"./p-BnjCmwMr.js";import{_ as b,F as f,A as h,R as p,B as m,c as u,l as y,b as k,T as x,a as j}from"./p-CjO1GttX.js";import{S as v}from"./p-B4Bi1JkP.js";import{F as _}from"./p-CPXN4Ths.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";import"./p-BrvbVMVq.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const T=class{constructor(t){e(this,t)}render(){return t("div",{key:"a3ff8b1ff23923beb847e66d6c56a39de9a86434",class:"row gy-3"},t("div",{key:"86f9ba3a8f0f87f7fa67ba0fcf1d7c04f67e9bc5",class:"col-12"},t("form-control-file",{key:"9cc2bc21414c8e3f4b25ac47b76340a4ce569c42",name:"voided_check",label:"Voided Check",documentType:l.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"bee72d6c63514cdbd3200910d3a53b045c60d05d",class:"col-12"},t("form-control-file",{key:"80a79f352d078cd210768b4060cad7014b1060c5",name:"bank_statement",label:"Bank Statement",documentType:l.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},g=class{constructor(t){e(this,t)}render(){return t("div",{key:"b18e803521d67b40e4e5af03a66dcdca0b678968",class:"row gy-3"},t("div",{key:"e2e6667ffbcebb6a9aa50739814e7bbebceaabfa",class:"col-12"},t("form-control-text",{key:"e1ad63fb7db32dbb6ed67cf18919c681d6d192ef",name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"54db821813e7eb931b8f19fad7fce976cdeb0045",class:"col-12"},t("form-control-text",{key:"4ecf222c1918e364f319d07e0a770d68dba099d0",name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"a92c38f2abbcb3dcaee4bc5ea73df44b31adc3f9",class:"col-12"},t("form-control-text",{key:"492ff1a4d1e9c4f2fa9d0e527a34dc5ccb09afe6",name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"8e14e6e3de43822d139085d3a05bfd0e7ae5b1be",class:"col-12"},t("form-control-select",{key:"f6648b6f7c4a475f88b849bf3a75d446bb539c69",name:"account_type",label:"Account Type",options:d,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"68a2efc082f5b6414ebde10b6da4365677dbefca",class:"col-12"},t("form-control-text",{key:"3ef9b3db5882063708ccf1eb282f3e90ed53ce82",name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:n,disabled:this.formDisabled,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),t("div",{key:"e3270db28269bc25dd4d5a99274f042c1efd1fc6",class:"col-12"},t("form-control-text",{key:"a8e801f65a4cc164cdc7bf186fed67f87abc828f",name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:n,disabled:this.formDisabled,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},w=class{constructor(t){e(this,t),this.documents=[],this.isLoading=!1}render(){return this.isLoading?t(v,{height:"50px"}):this.documents.length?t(a,null,t("div",{class:"card",part:b},t("div",{class:"card-body"},t("h5",{class:"card-title",part:f},"Documents Already on File"),t("div",{class:"table-responsive"},t("table",{class:"table table-sm table-borderless",part:h},t("thead",null,t("tr",null,t("th",{style:{width:"25%"},part:p,scope:"col"},"File Name"),t("th",{style:{width:"25%"},part:p,scope:"col"},"File Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Document Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Date Uploaded"))),t("tbody",null,this.documents.sort(((e,t)=>e.document_type.localeCompare(t.document_type))).map(((e,a)=>t("tr",{class:0===a?"border-bottom border-top":"border-bottom"},t("td",{part:m},e.file_name),t("td",{part:m},e.file_type),t("td",{part:m},c(e.document_type)),t("td",{part:m},`${i(e.created_at)} - ${o(e.created_at)}`))))))))),t("hr",null)):null}},B=class{constructor(t){e(this,t),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.fileSelected=s(this,"fileSelected"),this.isFocused=!1,this.handleFormControlInput=e=>{const t=e.target,a=t.getAttribute("name");this.inputHandler(a,t.value),this.formControlInput.emit({name:a,value:t.value})},this.changeHandler=()=>{const e=this.fileInput.files;e&&this.fileSelected.emit({fileList:e,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let e=u;return this.errorText&&(e=k),this.disabled&&(e=x),this.isFocused&&(e=j),e}render(){return t(a,{key:"c4eb924b2def951a74f6b5aeb036a405537e824c"},t("div",{key:"3b8bcb605f8addc7188fa82e5ef91c437c17d5f0",class:"form-group d-flex flex-column"},t("div",{key:"7f0e0cb4cb6dd1f75ddcd054843d2b1663b8db64",class:"d-flex align-items-start gap-2"},t("label",{key:"73b1eca3f6f175c2832f76be825d97f708aed9bf",part:y,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"389ee4bcc680a25991d048ba3839104368c26c15",helpText:this.helpText})),t("input",{key:"e1c713e5600dace0d44ea5f640bd60bf9d3ec0bd",ref:e=>this.fileInput=e,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),t(_,{key:"64828199873b08ab92c5418a1a1d5493bb41d947",errorText:this.errorText,name:this.name})))}get el(){return r(this)}};export{T as bank_account_document_form_inputs,g as bank_account_form_inputs,w as business_documents_on_file,B as form_control_file}
@@ -1 +1 @@
1
- import{r as t,c as s,h as a,H as i}from"./p-BUM1DfV9.js";import{I as e}from"./p-Ce_F4E0f.js";import{C as h}from"./p-B-iV5cYd.js";import{_ as r,l as o,D as c,b as n,C as f,a as l}from"./p-CB88j97I.js";import{F as d}from"./p-JcczGkik.js";import{F as m}from"./p-D7s2671S.js";const p=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.maskOptions=h.DECIMAL,this.initializeIMask=()=>{this.textInput&&(this.imask=e(this.textInput,this.maskOptions),this.imask.on("accept",(()=>{const t=this.imask.unmaskedValue;this.inputHandler(this.name,t),this.formControlInput.emit({name:this.name,value:t})})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.formControlInput.emit({name:s,value:this.imask.unmaskedValue})},this.updateInput=t=>{this.imask&&(this.imask.value=String(t))}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.initializeIMask(),this.updateInput(this.defaultValue)}disconnectedCallback(){var t;null===(t=this.imask)||void 0===t||t.destroy()}get inputPart(){let t=r;return this.errorText&&(t=n),this.disabled&&(t=f),this.isFocused&&(t=l),t}render(){return a(i,{key:"950019f15743434eaa378b48338e73157525d677"},a("div",{key:"9a4dab257ec7a62f3f3f1ba1cc2c4aad3f823c17",class:"form-group d-flex flex-column"},a("label",{key:"19d046ba0d9f5d2b8fc7c3d8c1b9dc893a5834e5",part:o,class:"form-label",htmlFor:this.name},this.label),a("div",{key:"ba7df233aa5965ee0a7f5c01dfd84aabd3cecf70",class:"input-group"},a("span",{key:"e325e64173d5d7c260b824ef492f02f2333bdb8f",class:"input-group-text",part:c},"$"),a("input",{key:"5b1632e00657f9aa31139a9869ab63ad9388612e",ref:t=>this.textInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.inputPart,class:this.errorText?"form-control monetary is-invalid":"form-control monetary",type:"text",disabled:this.disabled})),a(d,{key:"cb7f04dc7e6849d335eb0cfecfb05d7e0c26ff1f",helpText:this.helpText,name:this.name}),a(m,{key:"6ad1b947a48e8c97a2f5a1c4c2c1094679ce25cd",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary_provisioning}
1
+ import{r as t,c as s,h as a,H as i}from"./p-D6FDxSyt.js";import{I as e}from"./p-Ce_F4E0f.js";import{C as h}from"./p-B-iV5cYd.js";import{$ as r,l as o,U as c,b as n,T as f,a as l}from"./p-CjO1GttX.js";import{F as d}from"./p-Dumd8fMw.js";import{F as m}from"./p-CPXN4Ths.js";const p=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.maskOptions=h.DECIMAL,this.initializeIMask=()=>{this.textInput&&(this.imask=e(this.textInput,this.maskOptions),this.imask.on("accept",(()=>{const t=this.imask.unmaskedValue;this.inputHandler(this.name,t),this.formControlInput.emit({name:this.name,value:t})})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.formControlInput.emit({name:s,value:this.imask.unmaskedValue})},this.updateInput=t=>{this.imask&&(this.imask.value=String(t))}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.initializeIMask(),this.updateInput(this.defaultValue)}disconnectedCallback(){var t;null===(t=this.imask)||void 0===t||t.destroy()}get inputPart(){let t=r;return this.errorText&&(t=n),this.disabled&&(t=f),this.isFocused&&(t=l),t}render(){return a(i,{key:"950019f15743434eaa378b48338e73157525d677"},a("div",{key:"9a4dab257ec7a62f3f3f1ba1cc2c4aad3f823c17",class:"form-group d-flex flex-column"},a("label",{key:"19d046ba0d9f5d2b8fc7c3d8c1b9dc893a5834e5",part:o,class:"form-label",htmlFor:this.name},this.label),a("div",{key:"ba7df233aa5965ee0a7f5c01dfd84aabd3cecf70",class:"input-group"},a("span",{key:"e325e64173d5d7c260b824ef492f02f2333bdb8f",class:"input-group-text",part:c},"$"),a("input",{key:"5b1632e00657f9aa31139a9869ab63ad9388612e",ref:t=>this.textInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.inputPart,class:this.errorText?"form-control monetary is-invalid":"form-control monetary",type:"text",disabled:this.disabled})),a(d,{key:"cb7f04dc7e6849d335eb0cfecfb05d7e0c26ff1f",helpText:this.helpText,name:this.name}),a(m,{key:"6ad1b947a48e8c97a2f5a1c4c2c1094679ce25cd",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary_provisioning}
@@ -1 +1 @@
1
- import{h as s,F as t,r as i,c as l}from"./p-BUM1DfV9.js";import{E as r}from"./p-CnyMKcfC.js";import{S as e}from"./p-C3nDCvFQ.js";import{S as n}from"./p-CLBRsaLx.js";import"./p-CB88j97I.js";const o=()=>{const i=()=>s("div",{class:"mt-5"},s(n,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(n,null),s(n,null),s(n,null)),s("div",{class:"col-12 col-md-6"},s(n,null),s(n,null),s(n,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=l(this,"error-event"),this.renderState=a.LOADING,this.errorMessage="An error ocurred."}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return this.renderState===a.LOADING?s(e,null,s(o,null)):this.renderState===a.ERROR?s(e,null,r(this.errorMessage)):s(e,null,s("generic-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))}};export{d as business_details_core}
1
+ import{h as s,F as t,r as i,c as l}from"./p-D6FDxSyt.js";import{E as r}from"./p-_bsEVFir.js";import{S as e}from"./p-DuYlA4lj.js";import{S as n}from"./p-B4Bi1JkP.js";import"./p-CjO1GttX.js";const o=()=>{const i=()=>s("div",{class:"mt-5"},s(n,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(n,null),s(n,null),s(n,null)),s("div",{class:"col-12 col-md-6"},s(n,null),s(n,null),s(n,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=l(this,"error-event"),this.renderState=a.LOADING,this.errorMessage="An error ocurred."}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return this.renderState===a.LOADING?s(e,null,s(o,null)):this.renderState===a.ERROR?s(e,null,r(this.errorMessage)):s(e,null,s("generic-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))}};export{d as business_details_core}
@@ -0,0 +1 @@
1
+ import{h as e,r as t,H as i,c as s}from"./p-D6FDxSyt.js";import{S as a}from"./p-B4Bi1JkP.js";import{a as n}from"./p-DDEz7_ad.js";import{i as d,b as o,a as c,c as r,an as h,ao as l}from"./p-CjO1GttX.js";import{c as f,F as b}from"./p-DVnVdicA.js";import{k as m,l as u,m as p,n as y,q as v,y as k}from"./p-Cy4aIACq.js";import{H as g}from"./p-2P4kwjNi.js";import{n as w}from"./p-BnjCmwMr.js";import{S as x}from"./p-BX8GieXu.js";import{a as _}from"./p-Bxs6fi7a.js";import{n as j,f as C}from"./p-CpTwq2jw.js";import"./p-Cd06j2SL.js";import"./p-BFTU3MAI.js";import"./p-IA90llLO.js";import"./p-BrvbVMVq.js";import"./p-Dt-vy9Le.js";import"./p-Ct-uNz2r.js";import"./p-7MWRbTXI.js";const M=t=>{const{isReady:i}=t;return i?null:e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-end"},e(a,{height:"18px",width:"120px"}),e(a,{height:"36px"}))),e("div",{class:"row"},e("div",{class:"col-12 align-content-end"},e(a,{height:"18px",width:"110px"}),e(a,{height:"36px"}))))},O=class{constructor(e){t(this,e),this.isReady=!1}async validate(){const e=await this.accountNumberIframeElement.validate(),t=await this.routingNumberIframeElement.validate();return e&&t}async tokenize(e,t,i){return this.accountNumberIframeElement.tokenize(e,t,i)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((e=>new Promise((t=>{e.addEventListener("iframeLoaded",(()=>{t()}))}))))).then((()=>{this.isReady=!0}))}render(){return e(i,{key:"3d21d5269871beaffeffaef8b9c5104da59c1783"},e(M,{key:"eb14285f2f0994085423901139f717c3b644273b",isReady:this.isReady}),e("div",{key:"906895204049f1113d596bade78de29bd5def6c2",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"c56aa2cdec0c8be615dee4388346e890b2610b82",class:"row mb-3"},e("iframe-input",{key:"5dd97225f360e267abf0c772b28ba890edf284db",inputId:"accountNumber",ref:e=>this.accountNumberIframeElement=e,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),e("div",{key:"20504c4b3c984c907765b99051a9e44ad6b5a37a",class:"row"},e("iframe-input",{key:"a85f47d87b01e099ac54969ce482abcc1fcb5366",inputId:"routingNumber",ref:e=>this.routingNumberIframeElement=e,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},S=t=>{const{isReady:i}=t;return i?null:e("div",{class:"container-fluid p-0"},e("div",{class:"mb-3"},e(a,{height:"18px",width:"100px"}),e(a,{height:"36px"})),e("div",{class:"row"},e("div",{class:"col-4 align-content-end"},e(a,{height:"18px",width:"80px"}),e(a,{height:"36px"})),e("div",{class:"col-4 align-content-end"},e(a,{height:"36px"})),e("div",{class:"col-4 align-content-end"},e(a,{height:"18px",width:"30px"}),e(a,{height:"36px"}))))},z=class{constructor(e){t(this,e),this.isReady=!1}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((e=>new Promise((t=>{e.addEventListener("iframeLoaded",(()=>{t()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const e=await this.cardNumberIframeElement.validate(),t=await this.expirationMonthIframeElement.validate(),i=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return e&&t&&i&&s}async tokenize(e,t,i){return this.cardNumberIframeElement.tokenize(e,t,i)}render(){return e(i,{key:"035f015833d7c16a99ffb3cc4c1b88f44928839f"},e(S,{key:"4f6a98efb4bb1ec08bc7660fe8fb11cf1f91aac4",isReady:this.isReady}),e("div",{key:"efe85d9a9f3cd1ecabd6014b4e6ef6a22dce94f1",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},e("div",{key:"d72b1e2e6034d556eccbc6bd68b1469ce51ae257",class:"mb-3"},e("iframe-input",{key:"d5d4ae255037b01aced2c90c59bb74d65053b88a",inputId:"cardNumber",ref:e=>this.cardNumberIframeElement=e,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),e("div",{key:"1ff59862ecaf86c067638bc86a7a21425ee27ec0",class:"row"},e("div",{key:"3f6803d69bc30890eb39f005c32c06d0cfb6cf0d",class:"col-4 align-content-end"},e("iframe-input",{key:"a328d46fbfea56f3fd483194a74e6d8520cbc2ae",inputId:"expirationMonth",ref:e=>this.expirationMonthIframeElement=e,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),e("div",{key:"46594d660b45a68f5b578823ed54db1a570a0291",class:"col-4 align-content-end"},e("iframe-input",{key:"e107c2515d16a339d52a3b08f91537eca3c92a23",inputId:"expirationYear",ref:e=>this.expirationYearIframeElement=e,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),e("div",{key:"3df8a556f5e0bade368137a673e814774ad507b9",class:"col-4 align-content-end"},e("iframe-input",{key:"3432154c7645eda22beb1fe180936357b5b4b2c2",inputId:"CVV",ref:e=>this.cvvIframeElement=e,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},B=class{constructor(e){t(this,e),this.isFocused=!1,this.errorText=""}async componentDidLoad(){const e=await this.getBaseFontStyles();n("fontStyles",e);const t=await this.getFocusedStyles();n("focused",t);const i=await this.getFocusedAndInvalidStyles();n("focusedAndInvalid",i)}async getBaseFontStyles(){return new Promise((e=>{setTimeout((()=>{const t=getComputedStyle(this.hiddenInput);e({fontFamily:t.fontFamily,fontSize:t.fontSize,fontWeight:t.fontWeight,lineHeight:t.lineHeight,margin:t.margin,padding:t.padding,color:t.color})}),500)}))}async getFocusedStyles(){return new Promise((e=>{this.hiddenInput.focus(),setTimeout((()=>{this.hiddenInput.blur();let t=getComputedStyle(this.hiddenInput);e({boxShadow:t.boxShadow,border:t.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((e=>{this.hiddenInput.focus(),this.errorText="Error",setTimeout((()=>{const t=getComputedStyle(this.hiddenInput),i={boxShadow:t.boxShadow,border:t.border};this.hiddenInput.blur(),e(i)}),500)}))}get part(){return this.isFocused&&this.errorText?d:this.errorText?o:this.isFocused?c:r}render(){return e(i,{key:"170a3d6232e5ecee555da05387d127b56b07f7df"},e("input",{key:"8acef653371ebbe45c624f8ea233b9c9c6c40714",ref:e=>this.hiddenInput=e,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}},V=class{constructor(e){t(this,e),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new b((e=>{const t=f({name:k.required("Enter full name"),address_line1:v.required("Enter street address"),address_line2:y.nullable(),address_city:p.required("Enter city"),address_state:u.required("Select state"),address_postal_code:m.required("Enter postal code")}),i=f({name:k.nullable(),address_line1:v.nullable(),address_line2:y.nullable(),address_city:p.nullable(),address_state:u.nullable(),address_postal_code:m.required("Enter postal code")});return e?i:t})(this.isPostalOnlyMode))}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}get isPostalOnlyMode(){return"card"===this.paymentMethodType&&this.hideCardBillingForm}get hideAllBillingFields(){return"bankAccount"===this.paymentMethodType&&this.hideBankAccountBillingForm}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const t=this.formController.getInitialValues();return e(i,{key:"0df4ecdee8c32874325b83dd79586c7449ce6d93"},e("div",{key:"6d5b45f278a7c69a76fe0895036ab37b810d0262",part:h,class:"mt-4",hidden:this.hideAllBillingFields},!this.isPostalOnlyMode&&!this.hideAllBillingFields&&e(g,{key:"bc8f57f42134859e28dd523500ef874101198076",text:"Billing address",class:"fs-6 fw-bold lh-lg mb-4"}),e("form",{key:"908b8265b028caaa01314bc56bdbfe550b632b94"},e("fieldset",{key:"af3e34fca100b0e0c3f13ef3af3a88009859e277"},this.legend&&e("legend",{key:"15cfcc98681d4386afad33d68910f7732e88b9a9"},this.legend),e("div",{key:"de372fbe06a6da1f512170a6f79f27c96499d790",class:"row gy-3"},e("div",{key:"bb4aab9d17a7bed7cb09e4306158f5e0ff248b8f",class:"col-12",hidden:this.isPostalOnlyMode},e("form-control-text",{key:"f8e086504b6f3fac0e4bd2a0c0dee5e2f2c3328a",name:"name",label:"Full Name",defaultValue:t.name,errorText:this.errors.name,inputHandler:this.inputHandler})),e("div",{key:"9a5105e1183a61c55639c8153a65169fb65998c5",class:"col-12",hidden:this.isPostalOnlyMode},e("form-control-text",{key:"4802e1462b0b1f433c77f817b733611332b18711",name:"address_line1",label:"Street Address",defaultValue:t.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),e("div",{key:"3edf7b2390c2fa7d0cadd75f9102a63f88a3685b",class:"col-12",hidden:this.isPostalOnlyMode},e("form-control-text",{key:"bec348d7030fa44e5a627ebc3f67ed9689a4a5b9",name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:t.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),e("div",{key:"066d141b9529aae210fc2585bd2fd386e5b82120",class:"col-12",hidden:this.isPostalOnlyMode},e("form-control-text",{key:"602587fcca0666d7070e5cd0316ed1c541953337",name:"address_city",label:"City",defaultValue:t.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),e("div",{key:"125aeec26f292763abefe1c3a1a3070a2a8b4c7c",class:"col-12",hidden:this.isPostalOnlyMode},e("form-control-select",{key:"fb8d46d217d452809ee199ef8640e93714a91e85",name:"address_state",label:"State",options:x,defaultValue:t.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),e("div",{key:"b622a69cb724ed15d2fe0fb2a9039635bc96a12e",class:"col-12",hidden:this.hideAllBillingFields},e("form-control-text",{key:"a094770db85d5a65524909b5c4ec532fca167a95",name:"address_postal_code",label:"ZIP",defaultValue:t.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:w})))))))}},P={bankAccount:"New bank account",card:"New credit or debit card"},F=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected"),this.saveNewPaymentMethodChecked=!1,this.onPaymentMethodOptionClick=e=>{e.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}handleCheckboxChanged(e){this.saveNewPaymentMethodChecked=e.detail}async fillBillingForm(e){this.billingFormRef.fill(e)}async resolvePaymentMethod(e){var t,i;if(this.paymentMethodFormRef&&this.billingFormRef)try{if(!await this.validate()||!e.isValid)return{validationError:!0};const s=await this.tokenize();if(s.error)return{error:s.error};{const e=s.data;return{token:(null===(t=e.card)||void 0===t?void 0:t.token)||(null===(i=e.bank_account)||void 0===i?void 0:i.token),data:e}}}catch(e){return{error:e}}}async validate(){const e=await this.billingFormRef.validate(),t=await this.paymentMethodFormRef.validate();return e.isValid&&t.isValid}async tokenize(){try{const e=await this.billingFormRef.getValues();let t;t=this.saveNewPaymentMethodChecked?Object.assign(Object.assign({},e),{payment_method_group_id:this.paymentMethodGroupId}):Object.assign({},e);const i=this.authToken;return await this.paymentMethodFormRef.tokenize(i,t,this.accountId)}catch(e){return e}}showNewPaymentMethodForm(){var t;const i=null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id;return e("div",{class:"mt-4 pb-4"},e("hidden-input",null),e("card"===i?"card-form":"bank-account-form",{ref:e=>this.paymentMethodFormRef=e,iframeOrigin:this.iframeOrigin}),e("justifi-billing-form",{ref:e=>this.billingFormRef=e,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:i}),e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupId}))}get hiddenRadioInput(){return!this.showAch||!this.showCard}render(){var t,s;return e(i,{key:"a3da4a7aa5c5f68bec412be9eb210e8d45d81e80",class:"payment-method"},e("div",{key:"b15cf071a206e09333d55d5c7af26b71a79c46cf",class:"radio-list-item p-3",part:l,onClick:this.onPaymentMethodOptionClick,hidden:this.hiddenRadioInput},e("form-control-radio",{key:"d6ff109905c264b201ff3d6f09001a17e4cc351b",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:P[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.id]})),this.isSelected?this.showNewPaymentMethodForm():null)}};class T{constructor(e){this.id=e.id,this.brand=e.brand,this.acct_last_four=e.acct_last_four,this.type=j(e.type)}}var A;!function(e){e.american_express="American Express",e.diners_club="Diners Club",e.discover="Discover",e.jcb="JCB",e.mastercard="Mastercard",e.china_unionpay="UnionPay",e.visa="Visa",e.unknown="Unknown"}(A||(A={}));const N=class{constructor(e){t(this,e),this.savedPaymentMethods=[],this.paymentMethodOptions=[]}async fillBillingForm(e){const t=this.selectedPaymentMethodOptionRef;t.fillBillingForm&&t.fillBillingForm(e)}connectedCallback(){this.paymentMethodsChanged()}paymentMethodsChanged(){var e,t;this.paymentMethodOptions=this.savedPaymentMethods.map((e=>new T(e))).filter((e=>(this.showCard||e.type!==_.card)&&(this.showAch||e.type!==_.bankAccount))),this.showBnpl&&"sezzle"===(null===(e=this.bnpl)||void 0===e?void 0:e.provider)&&!this.insuranceToggled&&this.paymentMethodOptions.push(new T({id:_.sezzle})),this.showCard&&this.paymentMethodOptions.push(new T({id:_.card})),this.showAch&&this.paymentMethodOptions.push(new T({id:_.bankAccount})),this.selectedPaymentMethodId||(this.selectedPaymentMethodId=null===(t=this.paymentMethodOptions[0])||void 0===t?void 0:t.id)}paymentMethodOptionSelected(e){this.selectedPaymentMethodId=e.detail.id}async resolvePaymentMethod(e){var t;return await(null===(t=this.selectedPaymentMethodOptionRef)||void 0===t?void 0:t.resolvePaymentMethod(e))}async validate(){const e=this.selectedPaymentMethodOptionRef;return{isValid:await e.validate()}}render(){var t;return e(i,{key:"2cf31e17412eb30afabe6749b86b7d1a6f308114"},null===(t=this.paymentMethodOptions)||void 0===t?void 0:t.map((t=>{const i=this.selectedPaymentMethodId===t.id,s=t.id===_.sezzle;return t.id===_.card||t.id===_.bankAccount?e("justifi-new-payment-method",{paymentMethodOption:t,authToken:this.authToken,"account-id":this.accountId,"is-selected":i,"show-card":this.showCard,"show-ach":this.showAch,paymentMethodGroupId:this.paymentMethodGroupId,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,iframeOrigin:this.iframeOrigin,ref:e=>{i&&(this.selectedPaymentMethodOptionRef=e)}}):s?e("justifi-sezzle-payment-method",{paymentMethodOption:t,"is-selected":i,paymentAmount:this.paymentAmount,bnpl:this.bnpl,ref:e=>{i&&(this.selectedPaymentMethodOptionRef=e)}}):this.showSavedPaymentMethods?e("justifi-saved-payment-method",{paymentMethodOption:t,"is-selected":i,ref:e=>{i&&(this.selectedPaymentMethodOptionRef=e)}}):void 0})))}static get watchers(){return{savedPaymentMethods:["paymentMethodsChanged"]}}},I=class{constructor(e){t(this,e),this.checkboxChanged=s(this,"checkboxChanged"),this.isChecked=!1}handleCheckboxChange(e,t){this.isChecked=t,this.checkboxChanged.emit(this.isChecked)}render(){return e("div",{key:"e6e7a75237ec2062188bf85deadac58892663b3b",class:"mt-4 form-check"},e("form-control-checkbox",{key:"abbaeb4e9119c4d41f0a727c7a070c14b7418302",label:"Save new payment method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange.bind(this)}))}},D=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=e=>{e.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(e){var t;return e.isValid?{token:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id}:{validationError:!0}}render(){var t,s,a;return e(i,{key:"78487e52f549547f4c89f48a238a8916d77d4f1c",class:"payment-method"},e("div",{key:"d437a5f9e79356b1177703da2b5d7f4ca98072ce",class:"radio-list-item p-3",part:l,onClick:this.onPaymentMethodOptionClick},e("form-control-radio",{key:"0dd03b9ebae98c441c63717aba310d77e587b1c8",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:`${A[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.brand]||""} *${null===(a=this.paymentMethodOption)||void 0===a?void 0:a.acct_last_four}`})))}},E=e("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"}}),H=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected"),this.onPaymentMethodOptionClick=e=>{e.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.initializeSezzleCheckout=()=>{let e;this.sezzlePromise=new Promise((t=>{e=t}));const t=this.bnpl,i=+this.paymentAmount,s=new(0,window.Checkout)({mode:"popup",publicKey:t.provider_client_id,apiMode:t.provider_mode,apiVersion:t.provider_api_version});s.sezzleButtonElement=this.sezzleButtonRef,s.init({onClick:function(e){e.preventDefault(),s.startCheckout({checkout_url:t.provider_checkout_url})},onComplete:t=>e({bnpl:t.data}),onCancel:t=>e({bnpl:t.data}),onFailure:t=>e({bnpl:t.data})}),this.sezzleCheckout=s,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(i)}}componentDidRender(){this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()}}async resolvePaymentMethod(e){return e.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var t,s,a;return e(i,{key:"4ae50e7bbb15d0049d069edacd0d95ba7c13dbe5",class:"payment-method"},e("script",{key:"42a0590d89626ba7a93852e421eb121626b48375",src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:e=>this.scriptRef=e}),e("div",{key:"31a2a72650486c258267c6d4de3723f7afa5b063",class:"radio-list-item p-3",part:l,onClick:this.onPaymentMethodOptionClick},e("form-control-radio",{key:"eac1adbcd82fcb4f9c440c53c40ce34af6092991",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:e("div",null,e("div",null,"Buy now, pay later with ",E),this.installmentPlan&&e("small",null,e("span",null,null===(s=this.installmentPlan)||void 0===s?void 0:s.installments.length)," ",e("span",null,this.installmentPlan.schedule," payments of")," ",e("span",{class:"fw-bold"},C(null===(a=this.installmentPlan)||void 0===a?void 0:a.installments[0].amountInCents))))})))}};export{O as bank_account_form,z as card_form,B as hidden_input,V as justifi_billing_form,F as justifi_new_payment_method,N as justifi_payment_method_options,I as justifi_save_new_payment_method,D as justifi_saved_payment_method,H as justifi_sezzle_payment_method}
@@ -0,0 +1 @@
1
+ import{h as t,r as s,c as e}from"./p-D6FDxSyt.js";import{c as r,a as i,F as o}from"./p-DVnVdicA.js";import{f as n}from"./p-CpTwq2jw.js";import{C as a,a as u}from"./p-SdntD1xf.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import{R as l,g as h}from"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";import{B as m}from"./p-CWpAvtGa.js";import{S as p}from"./p-DuYlA4lj.js";import{P as c}from"./p-BMDJA9xX.js";import{m as d}from"./p-DmIOVniD.js";import{c as f,J as j}from"./p-Dss1xCBW.js";import{g as v,a as y}from"./p-C5RuuShs.js";import{A as b}from"./p-KLQjERL5.js";import{S as w}from"./p-B4Bi1JkP.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";import"./p-CjO1GttX.js";import"./p-D2EbqwBe.js";import"./p-BBsCnePk.js";import"./p-CN_YheWL.js";import"./p-Cd06j2SL.js";const C=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},x=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},B=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],A=b();class g{async postRefund(t,s,e,r){return A.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const S=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),D=()=>t(p,null,t("div",{class:"row gap-5"},t(S,null),t(S,null),t(S,null))),R=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new j(this),this.initializeApi(),this.formController=new o(x())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(x(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new c})({onSuccess:({payment:t})=>{this.refundPayload=new h({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:v(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=v(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new g}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(D,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(p,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:B,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(m,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{R as justifi_refund_payment}
@@ -1 +1 @@
1
- import{r as e,h as a,H as t}from"./p-BUM1DfV9.js";import{ag as l,I as d}from"./p-CB88j97I.js";import{a as i,r as s,s as c,b as o}from"./p-IA90llLO.js";import{C as r,T as n,P as f,S as b}from"./p-B-iV5cYd.js";import{C as u}from"./p-BrvbVMVq.js";import{d as h}from"./p-Dt-vy9Le.js";import{S as m}from"./p-BX8GieXu.js";import{n as v}from"./p-BnjCmwMr.js";const y=class{constructor(a){e(this,a)}render(){return this.text?this.hideAlert?null:a("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:l},a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},a("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),a("div",null,this.text)):null}},p=class{constructor(a){e(this,a),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:a})}))}render(){var e,l,o,n,f,b,u,h,m,v,y,p,k,x;const j=this.formController.getInitialValues().additional_questions;return a(t,{key:"6e2549b906fec8928dae89a4f143916a2b50eff3"},a("fieldset",{key:"525eab0debf75c3996c45128e9431086e49c3850"},a("legend",{key:"adeb6e2a32fb4f9e991d7b4843569116e336743c",part:d},"Additional Questions"),a("div",{key:"29b55613d32bc434017fc561033c6c9b8800666d",class:"row gy-3"},a("div",{key:"80c1d6b2c5e52c5fe0f8b9c3591bb315e51f7c55",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"e69e6c75d3a6add592e90e3709d7b7ff694ebfe0",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(l=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===l?void 0:l.business_revenue,defaultValue:null==j?void 0:j.business_revenue,maskOptions:r.WHOLE})),a("div",{key:"af0e66f6f647ed7248e0d861707cc378c85b0dce",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"e1f6af9f7537bf4d4e96739ff7537be01ca9371c",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(n=null===(o=this.errors)||void 0===o?void 0:o.additional_questions)||void 0===n?void 0:n.business_payment_volume,defaultValue:null==j?void 0:j.business_payment_volume,maskOptions:r.WHOLE})),a("div",{key:"b914a2f8abd79eab79d284f1ece9850f4a417893",class:"col-12"},a("form-control-select",{key:"8954dfe23f7984810fbae657ac9995e40253b377",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===(b=null===(f=this.errors)||void 0===f?void 0:f.additional_questions)||void 0===b?void 0:b.business_when_service_received,options:i,defaultValue:null==j?void 0:j.business_when_service_received})),a("div",{key:"da533644fd51e8678fc80d49c7db0ce20a803019",class:"col-12"},a("form-control-select",{key:"06c23865a5bbda38b294dd4edfee6ace942fb732",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:s,defaultValue:null==j?void 0:j.business_recurring_payments})),a("div",{key:"bb492db9aea205138ef76cf6fc7c3f686bb41a79",class:"col-12"},a("form-control-text",{key:"a3f900076730b504587619ff9c4c13ecce36f541",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==j?void 0:j.business_recurring_payments_percentage})),a("div",{key:"e2f56ae5d9654bdb1077689a1ef59c9047e97bda",class:"col-12"},a("form-control-select",{key:"697e41186b4c82046e50288594681117bf8dd6fe",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(p=null===(y=this.errors)||void 0===y?void 0:y.additional_questions)||void 0===p?void 0:p.business_seasonal,options:c,defaultValue:null==j?void 0:j.business_seasonal})),a("div",{key:"2e2f5d17b70604b9425997d9e4e0dfafea933448",class:"col-12"},a("form-control-text",{key:"27d305b06e7bc2d66084c9d04ebb785883564bbd",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(x=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===x?void 0:x.business_other_payment_details,defaultValue:null==j?void 0:j.business_other_payment_details})))))}},k=class{constructor(a){e(this,a),this.errors={},this.coreInfo={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new u(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:a}))}render(){const e=this.formController.getInitialValues();return a(t,{key:"71096918610aa3068cf89fbf9f3537b7f49942c6"},a("fieldset",{key:"502e6c3e3ae05256c6e5e8d315b4aa208ce88953"},a("legend",{key:"ccbe69b2323e815dc77b2602a96bdc4238fcef03",part:d},"General Info"),a("div",{key:"19a70fd7a361e5de4c88e14cbff12d88f78233e3",class:"row gy-3"},a("div",{key:"611bcc2bd35db7b6940a5b7ae53c54b55b855dd6",class:"col-12"},a("form-control-text",{key:"a9de594470c896aff0803c34a313c38467f7c82a",name:"legal_name",label:"Legal Name",defaultValue:e.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),a("div",{key:"ed742f64b1c344587127ce94ba1d17206bbdebb3",class:"col-12"},a("form-control-text",{key:"abb41f3aa059c180882066e21fe0239838cd9956",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:e.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),a("div",{key:"3659fb0dd0419fd4d6f0205bc9e32aef05f56aa1",class:"col-12 col-md-8"},a("form-control-select",{key:"5bbbe7cd7fe0a7e8788e36855ff18390bf8df301",name:"classification",label:"Business Classification",options:o,defaultValue:e.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),a("div",{key:"5007e6269c59878e6388164ff8d5163090b87585",class:"col-12 col-md-4"},a("form-control-date",{key:"4fa7c7f001ced10c746d2891fe3efd8336542907",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:e.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),a("div",{key:"e245a4ac6e0904c9742a0d1d220cb95c9fe63497",class:"col-12 col-md-6"},a("form-control-text",{key:"bc7367525a45c221c576f2b31c1a95680a95937a",name:"industry",label:"Industry",defaultValue:e.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),a("div",{key:"6475831320818242eda7ac045dcdd076fbc4245c",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"d68e8046fa42f4d5976aa44a7769b14fc4cda416",name:"tax_id",label:"Tax ID",defaultValue:e.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:n.US})),a("div",{key:"f59cda0241c1ad92d0d995e330b92079ba75737f",class:"col-12"},a("form-control-text",{key:"8243464d1c75897c1e3423e5045f34b81b425a9e",name:"website_url",label:"Website URL",defaultValue:e.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),a("div",{key:"c65251b25e0996277f7d0e11d25d6340ccfc11e7",class:"col-12 col-md-6"},a("form-control-text",{key:"fe3a4eff53786f49fbfe24afb048f861bf7a469a",name:"email",label:"Email Address",defaultValue:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"b1d909e5f937dcbbac0082b293571904c0c81396",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"83238873cbd8ccc08a5c3af1bd87a7965fefb5f8",name:"phone",label:"Phone Number",defaultValue:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})))))}},x=class{constructor(a){e(this,a),this.errors={},this.representative={},this.inputHandler=(e,a)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:a})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const a=h(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:a.dob_day,dob_month:a.dob_month,dob_year:a.dob_year})}))}}get identificationNumberLabel(){return this.representative.ssn_last4?"Update SSN (optional)":"SSN"}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){const e=this.formController.getInitialValues().representative;return a(t,{key:"eb9c09602a11107abc465463bf7e7cdbeb98cede"},a("fieldset",{key:"1f2a035f9796c29269a7dcd7ca874c73ed6493bb"},a("legend",{key:"1aeaba7f119f15e1ffa75cd58d77608fe51a60c8",part:d},"Representative"),a("div",{key:"5d09c634135046c79b4ac80b5c1cfee9fbd26ce0",class:"row gy-3"},a("div",{key:"6f03250bf88cc79ff07a1de68fef97a41a376aec",class:"col-12 col-md-8"},a("form-control-text",{key:"d6696ab573a305e277db56a578eaeb3fc4adf9ff",name:"name",label:"Full Name",defaultValue:null==e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"fd6ddc83d99b4f86f29566077249a23724741438",class:"col-12 col-md-4"},a("form-control-text",{key:"632b12a09042ffdaf85d2fafecfab1736bbc8d36",name:"title",label:"Title",defaultValue:null==e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler})),a("div",{key:"65842c9cb8c616806631bd1d2902342cebf5326e",class:"col-12 col-md-6"},a("form-control-text",{key:"8e1f64cc7f97e4b337dfcda6494fca5750656130",name:"email",label:"Email Address",defaultValue:null==e?void 0:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"e050604c8d71e1d07f916822fbb73da4c3f5e034",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"a5bba8b362ce6070efc65e88ee80880ce855e624",name:"phone",label:"Phone Number",defaultValue:null==e?void 0:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})),a("div",{key:"dcbd23ab368e630ebaea9e8bdbb6985a98d5fbeb",class:"col-12 col-md-4"},a("form-control-date",{key:"05e0e255549ad8f0760102aab5cbfe444cae5996",name:"dob_full",label:"Birth Date",defaultValue:null==e?void 0:e.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),a("div",{key:"764595ed842fd09221ef71d5c921a9ebe947556d",class:"col-12 col-md-8"},a("form-control-number-masked",{key:"91761e52dd724a27e135a3db8b7c85643f7891d9",name:"identification_number",label:this.identificationNumberLabel,defaultValue:null==e?void 0:e.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:b})),a("div",{key:"4be6739744d6d9fcd060ed9d894502f35396a9a9",class:"col-12"},a("justifi-identity-address-form",{key:"7c9d98057e908a068aa0783b10b2bd0f634d7ab9",errors:this.errors.address,defaultValues:null==e?void 0:e.address,handleFormUpdate:this.onAddressFormUpdate})))))}},j=class{constructor(a){e(this,a),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:a})}))}render(){var e,l,i,s,c,o,r,n,f,b,u,h;const y=this.formController.getInitialValues().legal_address;return a(t,{key:"129b2ec053708454db5a515fdae9a7fba5289336"},a("fieldset",{key:"6af5c9469acc432ea01ff404af25727bd444abc7"},a("legend",{key:"1af149db608a13d18142aaea83f9ed2e8271fdc0",part:d},"Business Legal Address"),a("div",{key:"805c6ae992ebed34937b9a2622f50a7f99c7d0e6",class:"row gy-3"},a("div",{key:"78750dc68bcc6782bc4a71cfd14d417e980a57a6",class:"col-12"},a("form-control-text",{key:"18a75e38a7a5fbfcbbbce56e4967ce34c5618c8e",name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line1,errorText:null===(l=null===(e=this.errors)||void 0===e?void 0:e.legal_address)||void 0===l?void 0:l.line1})),a("div",{key:"676622c84785edfafa3413359d4985d26a734985",class:"col-12"},a("form-control-text",{key:"e8467f96595d240f5fc93585e472ad844cc49143",name:"line2",label:"Address Line 2",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line2,errorText:null===(s=null===(i=this.errors)||void 0===i?void 0:i.legal_address)||void 0===s?void 0:s.line2})),a("div",{key:"01556012d9335d23c14e130ca72b6e75028bcb36",class:"col-12"},a("form-control-text",{key:"c08dcd0ef726ff714d60de26492ced763a7d32ff",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.city,errorText:null===(o=null===(c=this.errors)||void 0===c?void 0:c.legal_address)||void 0===o?void 0:o.city})),a("div",{key:"ad811869e742f265a5441c6f36c2a55fa0b07952",class:"col-12"},a("form-control-select",{key:"47cc4b15578257f3c1fdee7896d28da94b5aaa16",name:"state",label:"State",options:m,inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.state,errorText:null===(n=null===(r=this.errors)||void 0===r?void 0:r.legal_address)||void 0===n?void 0:n.state})),a("div",{key:"f732fd2ed3967ee7fd602f41c62efd24cf6038eb",class:"col-12"},a("form-control-text",{key:"0431a63d11beb6682a2544d2483901f7fffa77bd",name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.postal_code,errorText:null===(b=null===(f=this.errors)||void 0===f?void 0:f.legal_address)||void 0===b?void 0:b.postal_code,maxLength:5,keyDownHandler:v})),a("div",{key:"cca67b0cd006f6cf9f9bbfe147507eb0ac6fecca",class:"col-12"},a("form-control-select",{key:"f561947f9443ea6f56d7ae31d44a69e2462c0751",name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.country,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.legal_address)||void 0===h?void 0:h.country,disabled:!0})))))}};export{y as form_alert,p as justifi_additional_questions,k as justifi_business_core_info,x as justifi_business_representative,j as justifi_legal_address_form}
1
+ import{r as e,h as a,H as t}from"./p-D6FDxSyt.js";import{ak as l,F as d}from"./p-CjO1GttX.js";import{a as i,r as s,s as c,b as o}from"./p-IA90llLO.js";import{C as r,T as n,P as f,S as b}from"./p-B-iV5cYd.js";import{C as u}from"./p-BrvbVMVq.js";import{d as h}from"./p-Dt-vy9Le.js";import{S as m}from"./p-BX8GieXu.js";import{n as v}from"./p-BnjCmwMr.js";const y=class{constructor(a){e(this,a)}render(){return this.text?this.hideAlert?null:a("div",{class:"alert alert-danger d-flex align-items-center",role:"alert",part:l},a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"bi bi-exclamation-triangle-fill flex-shrink-0 me-2",viewBox:"0 0 16 16",role:"img","aria-label":"Warning:"},a("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})),a("div",null,this.text)):null}},p=class{constructor(a){e(this,a),this.errors={},this.additional_questions={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.additional_questions=Object.assign({},e.additional_questions)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{additional_questions:Object.assign(Object.assign({},this.formController.values.getValue().additional_questions),{[e]:a})}))}render(){var e,l,o,n,f,b,u,h,m,v,y,p,k,x;const j=this.formController.getInitialValues().additional_questions;return a(t,{key:"6e2549b906fec8928dae89a4f143916a2b50eff3"},a("fieldset",{key:"525eab0debf75c3996c45128e9431086e49c3850"},a("legend",{key:"adeb6e2a32fb4f9e991d7b4843569116e336743c",part:d},"Additional Questions"),a("div",{key:"29b55613d32bc434017fc561033c6c9b8800666d",class:"row gy-3"},a("div",{key:"80c1d6b2c5e52c5fe0f8b9c3591bb315e51f7c55",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"e69e6c75d3a6add592e90e3709d7b7ff694ebfe0",name:"business_revenue",label:"What is the business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(l=null===(e=this.errors)||void 0===e?void 0:e.additional_questions)||void 0===l?void 0:l.business_revenue,defaultValue:null==j?void 0:j.business_revenue,maskOptions:r.WHOLE})),a("div",{key:"af0e66f6f647ed7248e0d861707cc378c85b0dce",class:"col-12 col-md-6"},a("form-control-monetary-provisioning",{key:"e1f6af9f7537bf4d4e96739ff7537be01ca9371c",name:"business_payment_volume",label:"What is the business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(n=null===(o=this.errors)||void 0===o?void 0:o.additional_questions)||void 0===n?void 0:n.business_payment_volume,defaultValue:null==j?void 0:j.business_payment_volume,maskOptions:r.WHOLE})),a("div",{key:"b914a2f8abd79eab79d284f1ece9850f4a417893",class:"col-12"},a("form-control-select",{key:"8954dfe23f7984810fbae657ac9995e40253b377",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===(b=null===(f=this.errors)||void 0===f?void 0:f.additional_questions)||void 0===b?void 0:b.business_when_service_received,options:i,defaultValue:null==j?void 0:j.business_when_service_received})),a("div",{key:"da533644fd51e8678fc80d49c7db0ce20a803019",class:"col-12"},a("form-control-select",{key:"06c23865a5bbda38b294dd4edfee6ace942fb732",name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.additional_questions)||void 0===h?void 0:h.business_recurring_payments,options:s,defaultValue:null==j?void 0:j.business_recurring_payments})),a("div",{key:"bb492db9aea205138ef76cf6fc7c3f686bb41a79",class:"col-12"},a("form-control-text",{key:"a3f900076730b504587619ff9c4c13ecce36f541",name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(v=null===(m=this.errors)||void 0===m?void 0:m.additional_questions)||void 0===v?void 0:v.business_recurring_payments_percentage,defaultValue:null==j?void 0:j.business_recurring_payments_percentage})),a("div",{key:"e2f56ae5d9654bdb1077689a1ef59c9047e97bda",class:"col-12"},a("form-control-select",{key:"697e41186b4c82046e50288594681117bf8dd6fe",name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(p=null===(y=this.errors)||void 0===y?void 0:y.additional_questions)||void 0===p?void 0:p.business_seasonal,options:c,defaultValue:null==j?void 0:j.business_seasonal})),a("div",{key:"2e2f5d17b70604b9425997d9e4e0dfafea933448",class:"col-12"},a("form-control-text",{key:"27d305b06e7bc2d66084c9d04ebb785883564bbd",name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business?",inputHandler:this.inputHandler,errorText:null===(x=null===(k=this.errors)||void 0===k?void 0:k.additional_questions)||void 0===x?void 0:x.business_other_payment_details,defaultValue:null==j?void 0:j.business_other_payment_details})))))}},k=class{constructor(a){e(this,a),this.errors={},this.coreInfo={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.values.subscribe((e=>this.coreInfo=Object.assign({},new u(e)))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:a}))}render(){const e=this.formController.getInitialValues();return a(t,{key:"71096918610aa3068cf89fbf9f3537b7f49942c6"},a("fieldset",{key:"502e6c3e3ae05256c6e5e8d315b4aa208ce88953"},a("legend",{key:"ccbe69b2323e815dc77b2602a96bdc4238fcef03",part:d},"General Info"),a("div",{key:"19a70fd7a361e5de4c88e14cbff12d88f78233e3",class:"row gy-3"},a("div",{key:"611bcc2bd35db7b6940a5b7ae53c54b55b855dd6",class:"col-12"},a("form-control-text",{key:"a9de594470c896aff0803c34a313c38467f7c82a",name:"legal_name",label:"Legal Name",defaultValue:e.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler})),a("div",{key:"ed742f64b1c344587127ce94ba1d17206bbdebb3",class:"col-12"},a("form-control-text",{key:"abb41f3aa059c180882066e21fe0239838cd9956",name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:e.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler})),a("div",{key:"3659fb0dd0419fd4d6f0205bc9e32aef05f56aa1",class:"col-12 col-md-8"},a("form-control-select",{key:"5bbbe7cd7fe0a7e8788e36855ff18390bf8df301",name:"classification",label:"Business Classification",options:o,defaultValue:e.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),a("div",{key:"5007e6269c59878e6388164ff8d5163090b87585",class:"col-12 col-md-4"},a("form-control-date",{key:"4fa7c7f001ced10c746d2891fe3efd8336542907",name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:e.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),a("div",{key:"e245a4ac6e0904c9742a0d1d220cb95c9fe63497",class:"col-12 col-md-6"},a("form-control-text",{key:"bc7367525a45c221c576f2b31c1a95680a95937a",name:"industry",label:"Industry",defaultValue:e.industry,errorText:this.errors.industry,inputHandler:this.inputHandler})),a("div",{key:"6475831320818242eda7ac045dcdd076fbc4245c",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"d68e8046fa42f4d5976aa44a7769b14fc4cda416",name:"tax_id",label:"Tax ID",defaultValue:e.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:n.US})),a("div",{key:"f59cda0241c1ad92d0d995e330b92079ba75737f",class:"col-12"},a("form-control-text",{key:"8243464d1c75897c1e3423e5045f34b81b425a9e",name:"website_url",label:"Website URL",defaultValue:e.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler})),a("div",{key:"c65251b25e0996277f7d0e11d25d6340ccfc11e7",class:"col-12 col-md-6"},a("form-control-text",{key:"fe3a4eff53786f49fbfe24afb048f861bf7a469a",name:"email",label:"Email Address",defaultValue:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"b1d909e5f937dcbbac0082b293571904c0c81396",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"83238873cbd8ccc08a5c3af1bd87a7965fefb5f8",name:"phone",label:"Phone Number",defaultValue:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})))))}},x=class{constructor(a){e(this,a),this.errors={},this.representative={},this.inputHandler=(e,a)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{[e]:a})}))},this.onAddressFormUpdate=e=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{address:Object.assign(Object.assign({},this.formController.values.getValue().representative.address),e)})}))},this.onDateOfBirthUpdate=e=>{const a=h(e.detail);this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{representative:Object.assign(Object.assign({},this.formController.values.getValue().representative),{dob_day:a.dob_day,dob_month:a.dob_month,dob_year:a.dob_year})}))}}get identificationNumberLabel(){return this.representative.ssn_last4?"Update SSN (optional)":"SSN"}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e.representative))),this.formController.values.subscribe((e=>this.representative=Object.assign({},e.representative)))}render(){const e=this.formController.getInitialValues().representative;return a(t,{key:"eb9c09602a11107abc465463bf7e7cdbeb98cede"},a("fieldset",{key:"1f2a035f9796c29269a7dcd7ca874c73ed6493bb"},a("legend",{key:"1aeaba7f119f15e1ffa75cd58d77608fe51a60c8",part:d},"Representative"),a("div",{key:"5d09c634135046c79b4ac80b5c1cfee9fbd26ce0",class:"row gy-3"},a("div",{key:"6f03250bf88cc79ff07a1de68fef97a41a376aec",class:"col-12 col-md-8"},a("form-control-text",{key:"d6696ab573a305e277db56a578eaeb3fc4adf9ff",name:"name",label:"Full Name",defaultValue:null==e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"fd6ddc83d99b4f86f29566077249a23724741438",class:"col-12 col-md-4"},a("form-control-text",{key:"632b12a09042ffdaf85d2fafecfab1736bbc8d36",name:"title",label:"Title",defaultValue:null==e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler})),a("div",{key:"65842c9cb8c616806631bd1d2902342cebf5326e",class:"col-12 col-md-6"},a("form-control-text",{key:"8e1f64cc7f97e4b337dfcda6494fca5750656130",name:"email",label:"Email Address",defaultValue:null==e?void 0:e.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"e050604c8d71e1d07f916822fbb73da4c3f5e034",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"a5bba8b362ce6070efc65e88ee80880ce855e624",name:"phone",label:"Phone Number",defaultValue:null==e?void 0:e.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:f.US})),a("div",{key:"dcbd23ab368e630ebaea9e8bdbb6985a98d5fbeb",class:"col-12 col-md-4"},a("form-control-date",{key:"05e0e255549ad8f0760102aab5cbfe444cae5996",name:"dob_full",label:"Birth Date",defaultValue:null==e?void 0:e.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:this.onDateOfBirthUpdate})),a("div",{key:"764595ed842fd09221ef71d5c921a9ebe947556d",class:"col-12 col-md-8"},a("form-control-number-masked",{key:"91761e52dd724a27e135a3db8b7c85643f7891d9",name:"identification_number",label:this.identificationNumberLabel,defaultValue:null==e?void 0:e.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:b})),a("div",{key:"4be6739744d6d9fcd060ed9d894502f35396a9a9",class:"col-12"},a("justifi-identity-address-form",{key:"7c9d98057e908a068aa0783b10b2bd0f634d7ab9",errors:this.errors.address,defaultValues:null==e?void 0:e.address,handleFormUpdate:this.onAddressFormUpdate})))))}},j=class{constructor(a){e(this,a),this.errors={},this.inputHandler=this.inputHandler.bind(this)}componentDidLoad(){this.formController.errors.subscribe((e=>this.errors=Object.assign({},e))),this.formController.values.subscribe((e=>this.legal_address=Object.assign({},e.legal_address)))}inputHandler(e,a){this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{legal_address:Object.assign(Object.assign({},this.formController.values.getValue().legal_address),{[e]:a})}))}render(){var e,l,i,s,c,o,r,n,f,b,u,h;const y=this.formController.getInitialValues().legal_address;return a(t,{key:"129b2ec053708454db5a515fdae9a7fba5289336"},a("fieldset",{key:"6af5c9469acc432ea01ff404af25727bd444abc7"},a("legend",{key:"1af149db608a13d18142aaea83f9ed2e8271fdc0",part:d},"Business Legal Address"),a("div",{key:"805c6ae992ebed34937b9a2622f50a7f99c7d0e6",class:"row gy-3"},a("div",{key:"78750dc68bcc6782bc4a71cfd14d417e980a57a6",class:"col-12"},a("form-control-text",{key:"18a75e38a7a5fbfcbbbce56e4967ce34c5618c8e",name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line1,errorText:null===(l=null===(e=this.errors)||void 0===e?void 0:e.legal_address)||void 0===l?void 0:l.line1})),a("div",{key:"676622c84785edfafa3413359d4985d26a734985",class:"col-12"},a("form-control-text",{key:"e8467f96595d240f5fc93585e472ad844cc49143",name:"line2",label:"Address Line 2",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.line2,errorText:null===(s=null===(i=this.errors)||void 0===i?void 0:i.legal_address)||void 0===s?void 0:s.line2})),a("div",{key:"01556012d9335d23c14e130ca72b6e75028bcb36",class:"col-12"},a("form-control-text",{key:"c08dcd0ef726ff714d60de26492ced763a7d32ff",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.city,errorText:null===(o=null===(c=this.errors)||void 0===c?void 0:c.legal_address)||void 0===o?void 0:o.city})),a("div",{key:"ad811869e742f265a5441c6f36c2a55fa0b07952",class:"col-12"},a("form-control-select",{key:"47cc4b15578257f3c1fdee7896d28da94b5aaa16",name:"state",label:"State",options:m,inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.state,errorText:null===(n=null===(r=this.errors)||void 0===r?void 0:r.legal_address)||void 0===n?void 0:n.state})),a("div",{key:"f732fd2ed3967ee7fd602f41c62efd24cf6038eb",class:"col-12"},a("form-control-text",{key:"0431a63d11beb6682a2544d2483901f7fffa77bd",name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.postal_code,errorText:null===(b=null===(f=this.errors)||void 0===f?void 0:f.legal_address)||void 0===b?void 0:b.postal_code,maxLength:5,keyDownHandler:v})),a("div",{key:"cca67b0cd006f6cf9f9bbfe147507eb0ac6fecca",class:"col-12"},a("form-control-select",{key:"f561947f9443ea6f56d7ae31d44a69e2462c0751",name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==y?void 0:y.country,errorText:null===(h=null===(u=this.errors)||void 0===u?void 0:u.legal_address)||void 0===h?void 0:h.country,disabled:!0})))))}};export{y as form_alert,p as justifi_additional_questions,k as justifi_business_core_info,x as justifi_business_representative,j as justifi_legal_address_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-D6FDxSyt.js";import{C as e,a as r}from"./p-SdntD1xf.js";import{c as o,J as p}from"./p-Dss1xCBW.js";import{a}from"./p-7MWRbTXI.js";import{g as n,a as h}from"./p-C5RuuShs.js";import{D as c}from"./p-DavDfnxI.js";import"./p-D2EbqwBe.js";import"./p-BBsCnePk.js";import"./p-CpTwq2jw.js";import"./p-BFTU3MAI.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.apiOrigin="https://wc-proxy.justifi.ai",this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new p(this),this.initializeGetDispute()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i,apiOrigin:r})=>async({onSuccess:o,onError:p})=>{var c;try{const u=await i.fetchDispute(t,s,r);if(u.error)return p({error:h(u.error),code:n(null===(c=u.error)||void 0===c?void 0:c.code),severity:e.ERROR});{const t=Object.assign({},u.page_info);o({dispute:new a(u.data),pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c,apiOrigin:this.apiOrigin}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"ae0e4a208d6250c4da7033e1d8bf8c33ec041c36",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_dispute_management}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-D6FDxSyt.js";import{P as o}from"./p-oPo_KSwO.js";import"./p-CpTwq2jw.js";import{C as r,a as e}from"./p-SdntD1xf.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import{P as p}from"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";import{g as a,a as h}from"./p-C5RuuShs.js";import{E as n}from"./p-_bsEVFir.js";import{c as m,J as j}from"./p-Dss1xCBW.js";import{m as d}from"./p-DniQ6yo6.js";import"./p-KLQjERL5.js";import"./p-CN_YheWL.js";import"./p-Cd06j2SL.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";import"./p-CjO1GttX.js";import"./p-D2EbqwBe.js";import"./p-BBsCnePk.js";const c=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new j(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{c as justifi_payout_details}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-D6FDxSyt.js";import{C as i,a as o}from"./p-SdntD1xf.js";import{c as r,J as a}from"./p-Dss1xCBW.js";import{P as p}from"./p-oPo_KSwO.js";import"./p-CpTwq2jw.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import{P as n}from"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";import{g as h,a as c}from"./p-C5RuuShs.js";import{m as d}from"./p-DniQ6yo6.js";import{m,S as l}from"./p-BS-e1gnL.js";import{S as u}from"./p-DuYlA4lj.js";import{d as j}from"./p-CiKdTI9h.js";import"./p-D2EbqwBe.js";import"./p-BBsCnePk.js";import"./p-KLQjERL5.js";import"./p-CN_YheWL.js";import"./p-Cd06j2SL.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";import"./p-BQEAUdoy.js";import"./p-GTA6l_sT.js";import"./p-CjO1GttX.js";const b=class{constructor(e){t(this,e),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){r(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new p};this.getPayouts=(({id:t,authToken:s,service:e})=>async({params:o,onSuccess:r,onError:a})=>{var p,d;try{const m=await e.fetchPayouts(t,s,o);if(m.error)return a({error:c(m.error),code:h(null===(d=m.error)||void 0===d?void 0:d.code),severity:i.ERROR});{const t=Object.assign({},m.page_info);r({payouts:(null===(p=m.data)||void 0===p?void 0:p.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=h(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:i.ERROR})}})(t),this.getPayoutCSV=d(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new l}))}render(){return e(u,{key:"f20034e64b3c1f39cdedd38762ac30a70d92bde1",exportedparts:"\ntable-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\ntable-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\nempty-state,pagination-bar,page-arrow,page-button,page-button-disabled,page-button-text\n"},e("payouts-list-core",{key:"3bee62765d06af00577ca338c4f8dd33eb6cfb1c",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{b as justifi_payouts_list}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as a}from"./p-BUM1DfV9.js";import{c as i,l as c,b as r,C as h,a as o}from"./p-CB88j97I.js";import{F as l}from"./p-D7s2671S.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=r),this.disabled&&(t=h),this.isFocused&&(t=o),t}render(){return s(a,{key:"587ee2fa01634a32f985ab19aaf4f62d010ce10c"},s("div",{key:"95958ed36ccb85a5a4d6c7db452e924c5000924c",class:"form-group d-flex flex-column"},s("div",{key:"ea8a18b68dcafb62c46543c0beea80321e67b990",class:"d-flex gap-2"},s("label",{key:"78a4be7c16a0f1d6a6d02d5c6fd17ccc25d727f3",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"85306bcf45e676a668f9a6b78deda4c5decc9831",helpText:this.helpText})),s("input",{key:"8526227900d9e9abc11635ffc8598c53c6db397a",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(l,{key:"341c4283c126602dc25cd5beeec7c11b26e13b18",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_date}
1
+ import{r as t,c as e,h as s,H as a}from"./p-D6FDxSyt.js";import{c as i,l as r,b as h,T as o,a as l}from"./p-CjO1GttX.js";import{F as c}from"./p-CPXN4Ths.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.maxDate=this.currentDate,this.handleFormControlInput=t=>{const e=t.target.value;this.inputHandler(this.name,e),this.formControlInput.emit({name:this.name,value:e})}}handleDefaultValueChange(t){this.updateInput(t)}get currentDate(){return this.showTime?(new Date).toISOString().slice(0,16):(new Date).toISOString().split("T")[0]}componentDidLoad(){this.updateInput(this.defaultValue)}updateInput(t){this.dateInput.value=t}get part(){let t=i;return this.errorText&&(t=h),this.disabled&&(t=o),this.isFocused&&(t=l),t}render(){return s(a,{key:"4a62a0efa2d9034ed56996d0f734ef89ae13ef1f"},s("div",{key:"f6eb5b949eac993cdb0b7d936e82f17097e91739",class:"form-group d-flex flex-column"},s("div",{key:"0171bcc477b35886986abd2879fa96dd3565cc1a",class:"d-flex gap-2"},s("label",{key:"7184b2172dcfc7f6fe9f4e1ca2b4769e64f1e825",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"04714a933a613dc21871fdce95641244d64776a5",helpText:this.helpText})),s("input",{key:"b1da6e269d7d5d65828236c1b3c4c09d91adba07",type:this.showTime?"datetime-local":"date",ref:t=>this.dateInput=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled,max:this.maxDate}),s(c,{key:"7d52e845976c61f3af1a3a36e86bf4bb3b0e2228",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_date}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-D6FDxSyt.js";import"./p-CpTwq2jw.js";import{C as a,a as i}from"./p-SdntD1xf.js";import"./p-BjB_yKBJ.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";import{A as o,B as h}from"./p-CjO1GttX.js";import{T as c,a as d,b as p,c as n,d as b}from"./p-OjYukdAC.js";import{p as m,a as u}from"./p-CiKdTI9h.js";import{o as l,g as f}from"./p-wqUvt1PB.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";import"./p-Bl79NorO.js";import"./p-BQEAUdoy.js";import"./p-GTA6l_sT.js";import"./p-Cd06j2SL.js";const y=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:i.FETCH_ERROR,message:"Failed to download CSV",severity:a.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:c.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:c.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:c.row,data:a})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new d(this.payouts,this.columns,m,u(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=f();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e("div",{key:"7269ad62dd229e55dac396c718469b5e2b923458",class:"table-wrapper",part:"table-wrapper"},e("table",{key:"52ab8f9384d328d8d1094573545c7e1e112f58c0",class:"table table-hover",part:o},e("thead",{key:"4fde6f2d3c152d04c35967c1e63ed5520e6c5b64",class:"table-head sticky-top",part:"table-head"},e("tr",{key:"4665781ce140f86394a20a454de94a4ecf19871f",class:"table-light text-nowrap",part:"table-head-row"},this.payoutsTable.columnData.map((t=>t)))),e("tbody",{key:"4e673dda87af1a204abba225de77864dd8e60cf6",class:"table-body"},e(p,{key:"b54e1e43c91b51d0364bf88198d6070569557ebb",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(n,{key:"45a64238e45671ff3d1a0c636d3ff7afe29dc93d",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(b,{key:"37d9fa23b47e7b77dbd90bbe6759b0c8763cc490",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"04875b5b8414a20e53035c4356d5c6d6e2da1389",class:"sticky-bottom"},e("tr",{key:"6fd4b360e4449f441b33028e06a1595395cc15e4",class:"table-light align-middle"},e("td",{key:"3830e46c5e838830c163023f4d904db74421f0e0",part:h,colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"a3f9cdf107672f067a23c8c3d15b14422606d221",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{y as payouts_list_core}
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./p-D6FDxSyt.js";import{B as a}from"./p-CWpAvtGa.js";import{ah as r}from"./p-CjO1GttX.js";const s=e=>{const t=["after_cursor","before_cursor"];return!!Object.keys(e).filter((e=>!t.includes(e))).length},d=class{constructor(t){e(this,t),this.showClearButton=!1}watchParamsHandler(e){this.showClearButton=s(e)}show(){this.menu.classList.add("show")}hide(){this.menu.classList.remove("show")}componentWillLoad(){this.showClearButton=s(this.params)}render(){return t("div",{key:"b55be2aa2f9d4677989da12bb114f620a9ec2e45",class:"d-flex gap-2"},t("div",{key:"dffb2be68ead3abb60a8740869e48bb48bbf558c",class:"dropdown pb-3"},t(a,{key:"2e7b2d3afc80963abfe9c8c2690a61b911a1b747",variant:"primary",type:"button dropdown-toggle",ref:e=>this.anchorButton=e,class:"btn btn-primary dropdown-toggle","data-test-id":"open-filters-button","data-bs-toggle":"dropdown"},"Filters"),t("custom-popper",{key:"9e2b1b988bc5440f18d26c5b8402f5e30e73cdad",offset:[20,10],strategy:"fixed",anchorRef:this.anchorButton,trigger:"click"},t("form",{key:"573161a7515d1b16665138ba739133379b9b6850",class:"dropdown-menu",part:r,"data-test-id":"filter-menu",ref:e=>this.menu=e,onSubmit:e=>e.preventDefault()},t("slot",{key:"9597e79f125e1e41c343fa3d2d583b5cf7ab9c31"})))),t("div",{key:"67ed29ac8e10f3ae1380514ae1a1e1e8aed7d9b6"},t(a,{key:"9b3dc6176c11226e82ecb1f9f88705ad40bf6e32",variant:"secondary",onClick:()=>this.clearParams(),hidden:!this.showClearButton,"data-test-id":"clear-filters-button"},"Clear Filters")))}static get watchers(){return{params:["watchParamsHandler"]}}};export{d as table_filters_menu}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-BUM1DfV9.js";import{u as d,a as t,b as s}from"./p-1ydcg9ti.js";import{P as l,S as o}from"./p-B-iV5cYd.js";import{I as i}from"./p-CB88j97I.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const r=class{constructor(a){e(this,a),this.inputHandler=(e,a)=>{d(this.formController,{[e]:a})},this.onAddressFormUpdate=e=>{t(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),e))}}render(){var e,d,t,r,c,f,n;return a("form",{key:"02b2888267736b1441b16e569a7d1ff3ab3e7e17"},a("fieldset",{key:"d5d4afd7df869b87272407d4e401ad802708c870"},a("div",{key:"4e2113e9d7d16c6d2b50625dba3dfa82f7b04832",class:"d-flex align-items-center gap-2"},a("legend",{key:"17ffa94355f1d89223c554f4fb80e38735681725",class:"mb-0",part:i},"Representative"),a("form-control-tooltip",{key:"0df0655bc4e409ae53b93e40260486e4ff610410",helpText:"The representative for your business needs to be someone who has significant control over managing your business’s finance. You will have an opportunity to add owners later in the form."})),a("hr",{key:"bb67f7aafe877075d18ac9a7e8acaa94267035de",class:"mt-2"}),a("div",{key:"aa5b5fb1913f64c54384d793beeb6dcd5728d10e",class:"row gy-3"},a("div",{key:"6fe16958c76e589581bd099192fc6886f3e7eb6c",class:"col-12 col-md-8"},a("form-control-text",{key:"e0579c2e09c9be66b431174b6d79122349e4d859",name:"name",label:"Full Name",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"98cfa2ab8e5537452ab0dae54ad95f1ac2a541f4",class:"col-12 col-md-4"},a("form-control-text",{key:"55962d3f118bc0ffbbe1fbf62d8d6e15c0f04dfb",name:"title",label:"Title",defaultValue:null===(d=this.representativeDefaultValue)||void 0===d?void 0:d.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),a("div",{key:"c8bb3ea449d7adcd0d897ee64a1383ff7639305d",class:"col-12 col-md-6"},a("form-control-text",{key:"df99114c3d94073a3a95b7ea2f326d27db1d4fa9",name:"email",label:"Email Address",defaultValue:null===(t=this.representativeDefaultValue)||void 0===t?void 0:t.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"9fe7cce8fbaa975f2cb2f890ec60cc5696356014",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"236d3629a7d97feb7c7556b7e7ba83b0b45ca3db",name:"phone",label:"Phone Number",defaultValue:null===(r=this.representativeDefaultValue)||void 0===r?void 0:r.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:l.US})),a("div",{key:"cf99a0654ed61f599d5d854149e68abb9e52798f",class:"col-12 col-md-4"},a("form-control-date",{key:"8bc17351844b590e16f34daaee6da1e67d433d44",name:"dob_full",label:"Birth Date",defaultValue:null===(c=this.representativeDefaultValue)||void 0===c?void 0:c.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:e=>s(e,this.formController),helpText:"Must be 18 or older."})),a("div",{key:"563dd2be61ca9238c915298fb5db51dfca6468e3",class:"col-12 col-md-8"},a("form-control-number-masked",{key:"a99b04783e2a7a439091aa79394e614d82293ac8",name:"identification_number",label:"SSN",defaultValue:null===(f=this.representativeDefaultValue)||void 0===f?void 0:f.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:o,helpText:"Enter your full Social Security Number. It is required for Federal OFAC check."})),a("div",{key:"4ae17d91e7428f54e07942a1429e554c6e7a37ac",class:"col-12"},a("justifi-identity-address-form",{key:"8490e4d041ff22bcb481d553760ed6f34ca908aa",errors:this.errors.address,defaultValues:null===(n=this.representativeDefaultValue)||void 0===n?void 0:n.address,handleFormUpdate:this.onAddressFormUpdate})))))}};export{r as justifi_business_representative_form_inputs}
1
+ import{r as e,h as a}from"./p-D6FDxSyt.js";import{u as d,a as t,b as s}from"./p-1ydcg9ti.js";import{P as l,S as o}from"./p-B-iV5cYd.js";import{F as i}from"./p-CjO1GttX.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const r=class{constructor(a){e(this,a),this.inputHandler=(e,a)=>{d(this.formController,{[e]:a})},this.onAddressFormUpdate=e=>{t(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),e))}}render(){var e,d,t,r,c,f,n;return a("form",{key:"02b2888267736b1441b16e569a7d1ff3ab3e7e17"},a("fieldset",{key:"d5d4afd7df869b87272407d4e401ad802708c870"},a("div",{key:"4e2113e9d7d16c6d2b50625dba3dfa82f7b04832",class:"d-flex align-items-center gap-2"},a("legend",{key:"17ffa94355f1d89223c554f4fb80e38735681725",class:"mb-0",part:i},"Representative"),a("form-control-tooltip",{key:"0df0655bc4e409ae53b93e40260486e4ff610410",helpText:"The representative for your business needs to be someone who has significant control over managing your business’s finance. You will have an opportunity to add owners later in the form."})),a("hr",{key:"bb67f7aafe877075d18ac9a7e8acaa94267035de",class:"mt-2"}),a("div",{key:"aa5b5fb1913f64c54384d793beeb6dcd5728d10e",class:"row gy-3"},a("div",{key:"6fe16958c76e589581bd099192fc6886f3e7eb6c",class:"col-12 col-md-8"},a("form-control-text",{key:"e0579c2e09c9be66b431174b6d79122349e4d859",name:"name",label:"Full Name",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),a("div",{key:"98cfa2ab8e5537452ab0dae54ad95f1ac2a541f4",class:"col-12 col-md-4"},a("form-control-text",{key:"55962d3f118bc0ffbbe1fbf62d8d6e15c0f04dfb",name:"title",label:"Title",defaultValue:null===(d=this.representativeDefaultValue)||void 0===d?void 0:d.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),a("div",{key:"c8bb3ea449d7adcd0d897ee64a1383ff7639305d",class:"col-12 col-md-6"},a("form-control-text",{key:"df99114c3d94073a3a95b7ea2f326d27db1d4fa9",name:"email",label:"Email Address",defaultValue:null===(t=this.representativeDefaultValue)||void 0===t?void 0:t.email,errorText:this.errors.email,inputHandler:this.inputHandler})),a("div",{key:"9fe7cce8fbaa975f2cb2f890ec60cc5696356014",class:"col-12 col-md-6"},a("form-control-number-masked",{key:"236d3629a7d97feb7c7556b7e7ba83b0b45ca3db",name:"phone",label:"Phone Number",defaultValue:null===(r=this.representativeDefaultValue)||void 0===r?void 0:r.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:l.US})),a("div",{key:"cf99a0654ed61f599d5d854149e68abb9e52798f",class:"col-12 col-md-4"},a("form-control-date",{key:"8bc17351844b590e16f34daaee6da1e67d433d44",name:"dob_full",label:"Birth Date",defaultValue:null===(c=this.representativeDefaultValue)||void 0===c?void 0:c.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:e=>s(e,this.formController),helpText:"Must be 18 or older."})),a("div",{key:"563dd2be61ca9238c915298fb5db51dfca6468e3",class:"col-12 col-md-8"},a("form-control-number-masked",{key:"a99b04783e2a7a439091aa79394e614d82293ac8",name:"identification_number",label:"SSN",defaultValue:null===(f=this.representativeDefaultValue)||void 0===f?void 0:f.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:o,helpText:"Enter your full Social Security Number. It is required for Federal OFAC check."})),a("div",{key:"4ae17d91e7428f54e07942a1429e554c6e7a37ac",class:"col-12"},a("justifi-identity-address-form",{key:"8490e4d041ff22bcb481d553760ed6f34ca908aa",errors:this.errors.address,defaultValues:null===(n=this.representativeDefaultValue)||void 0===n?void 0:n.address,handleFormUpdate:this.onAddressFormUpdate})))))}};export{r as justifi_business_representative_form_inputs}
@@ -0,0 +1 @@
1
+ import{h as i,r as s,c as t}from"./p-D6FDxSyt.js";import{aj as e,ai as r,af as o,C as l}from"./p-CjO1GttX.js";import{S as d}from"./p-DuYlA4lj.js";import{c as n,J as a}from"./p-Dss1xCBW.js";import{C as h,a as c}from"./p-SdntD1xf.js";import{B as p}from"./p-Bl3qFMoN.js";import{B as u}from"./p-BrvbVMVq.js";import{m as v}from"./p-D5Sh88BE.js";import{S as m}from"./p-B4Bi1JkP.js";import{j as f}from"./p-CpTwq2jw.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import{f as j,e as w,a as b}from"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";import{g as x,a as y}from"./p-C5RuuShs.js";import{T as g}from"./p-ERVEQjR2.js";import"./p-D2EbqwBe.js";import"./p-BBsCnePk.js";import"./p-KLQjERL5.js";import"./p-CN_YheWL.js";import"./p-Cd06j2SL.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";const B=()=>i("div",{class:"row gap-3"},i("div",{class:"col-12"},i(m,{width:"25%"})),i("div",{class:"col-12"},i(m,{width:"100%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"50%"}),i(m,{width:"50%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"65%"}),i(m,{width:"35%"}))),S=()=>i("div",{class:"row gap-5"},i("div",{class:"col-12"},i(m,{width:"40%",height:"40px"})),i(B,null)),C=()=>i("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},i("div",{class:"d-flex align-items-center gap-3"},i(m,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),i("div",{class:"flex-grow-1"},i("div",{class:"d-flex row flex-row"},i("div",{class:"col-6 flex-column"},i(m,null),i(m,{width:"60%"})),i("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),i(m,{width:"80px",height:"32px"}),i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),i("div",{class:"mt-4"},i("div",{class:"d-flex flex-column gap-2"},i(m,null),i(m,null)))))),k=class{constructor(i){s(this,i),this.errorEvent=t(this,"error-event"),this.submitted=t(this,"submit-event"),this.shipping=!1,this.submitButtonText="Submit Order",this.loading={business:!0,terminals:!0},this.submitting=!1,this.error=null,this.totalQuantity=0}componentWillLoad(){this.order=new w({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?b.boardingShipping:b.boardingOnly}),n(),this.analytics=new a(this),this.loadData()}handleError(i,s,t){this.error={message:i,code:s,severity:t},this.errorEvent.emit({errorCode:s,message:i,severity:t})}loadData(){this.businessId&&this.authToken?(this.initializeGetBusiness(),this.initializeGetTerminalModels()):this.handleError("Invalid business id or auth token",c.MISSING_PROPS,h.ERROR)}initializeGetBusiness(){v({id:this.businessId,authToken:this.authToken,service:new p})({onSuccess:({business:i})=>{this.business=new u(i),this.loading.business=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.business=!1}})}initializeGetTerminalModels(){(({id:i,authToken:s,service:t})=>async({onSuccess:e,onError:r})=>{var o,l,d,n;try{const a=await t.fetchTerminalModels(i,s);if(a.error)return r({error:y(a.error),code:x(null===(n=a.error)||void 0===n?void 0:n.code),severity:h.ERROR});e({terminals:(null===(l=null===(o=a.data)||void 0===o?void 0:o.terminal_order_models)||void 0===l?void 0:l.map((i=>new j(i))))||[],orderLimit:null===(d=a.data)||void 0===d?void 0:d.order_limit})}catch(i){const s=x(null==i?void 0:i.code);return r({error:i.message||i,code:s,severity:h.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new g})({onSuccess:({terminals:i,orderLimit:s})=>{this.terminalModels=i,this.orderLimit=s,this.loading.terminals=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.terminals=!1}})}submitOrder(){const i=(({authToken:i,service:s,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:o})=>{var l;try{const d=await s.orderTerminals(i,e,t);if(d.error)return o({error:y(d.error),code:x(null===(l=d.error)||void 0===l?void 0:l.code),severity:h.ERROR});{const{data:i}=d;r({data:i})}}catch(i){const s=x(null==i?void 0:i.code);return o({error:i.message||i,code:s,severity:h.ERROR})}})({authToken:this.authToken,service:new g});this.submitting=!0,i({terminalOrder:this.order.payload,onSuccess:({data:i})=>{this.submitted.emit(i),this.submitting=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.submitting=!1}})}onSelectedQuantityChange(i){this.order.updateTerminal(i.detail.modelName,i.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return i("div",null,this.loading.business&&i(S,null),this.loading.terminals&&i("div",{class:"mt-5"},i(C,null),i(C,null),i(C,null)))}renderBusinessDetails(){var s,t,o,l,d,n,a,h;if(!this.loading.business&&this.business)return i("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},i("div",{class:"row"},i("div",{class:"col-12"},i("h2",{part:r},this.business.legal_name))),i("div",{class:"row"},i("div",{class:"col-6"},i("h5",{part:e},"Representative:"),i("div",null,i("div",null,null===(t=null===(s=this.business)||void 0===s?void 0:s.representative)||void 0===t?void 0:t.name),i("div",null,null===(l=null===(o=this.business)||void 0===o?void 0:o.representative)||void 0===l?void 0:l.title),i("div",null,null===(n=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===n?void 0:n.email),i("div",null,f(null===(h=null===(a=this.business)||void 0===a?void 0:a.representative)||void 0===h?void 0:h.phone)))),i("div",{class:"col-6"},i("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),i("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",i("br",null),this.business.legal_address.city,", ",this.business.legal_address.state," ",this.business.legal_address.postal_code))))}renderTerminals(){if(!this.loading.terminals&&this.terminalModels)return i("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((s=>i("terminal-quantity-selector",{modelName:s.model_name,description:s.description,imageUrl:s.image_url,helpUrl:s.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return i("div",{class:"mt-3"},i("div",{class:"text-end"},"Order limit: ",this.orderLimit),i("div",{class:"d-flex justify-content-end mt-3"},i("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:o},this.submitting?"Submitting...":this.submitButtonText)))}render(){return i(d,{key:"47251af3261d16cfc067bca3b3810805d93ba36d"},i("div",{key:"13c73bb09cdbad48ee7b15089daf1b6bf56cf256",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{k as justifi_order_terminals}
@@ -0,0 +1 @@
1
+ import{h as t,r as s,c as e}from"./p-D6FDxSyt.js";import{a as i,b as r}from"./p-CegkOiUz.js";import{F as o,c as n}from"./p-DVnVdicA.js";import{A as a,C as l,R as h,c}from"./p-BrvbVMVq.js";import{C as d,P as u}from"./p-B-iV5cYd.js";import{F as m}from"./p-CjO1GttX.js";import{S as p}from"./p-B4Bi1JkP.js";import{a as f,r as v,s as y,b}from"./p-IA90llLO.js";import{a as g,B as w}from"./p-XYgDHrVL.js";import{z as _,A as x,B as j,C as T,D as S,y as C,E as O,F as k}from"./p-Cy4aIACq.js";import"./p-CpTwq2jw.js";import{C as L,a as H}from"./p-SdntD1xf.js";import"./p-BjB_yKBJ.js";import"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import"./p-AVaenhw9.js";import{a as V,b as B}from"./p-Ct-uNz2r.js";import{n as D}from"./p-BnjCmwMr.js";import{B as A}from"./p-CWpAvtGa.js";import{i as E,a as P}from"./p-BHbsXXRt.js";import{S as I}from"./p-BX8GieXu.js";import"./p-BFTU3MAI.js";import"./p-Dt-vy9Le.js";import"./p-7MWRbTXI.js";class W{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.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||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const F=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(p,{width:"25%"})),t("div",{class:"col-12"},t(p,{width:"100%"})),t("div",{class:"col-12 d-flex gap-3"},t(p,{width:"50%"}),t(p,{width:"50%"})),t("div",{class:"col-12 d-flex gap-3"},t(p,{width:"65%"}),t(p,{width:"35%"}))),q=()=>t("div",{class:"row gap-5"},t("div",{class:"col-12"},t(p,{width:"40%",height:"40px"})),t(F,null),t(F,null),t(F,null)),N=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 a(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:g.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 a(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 a(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n,a;const l=this.formController.getInitialValues();return this.isLoading?t(q,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:m},"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==l?void 0:l.business_revenue,maskOptions:d.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==l?void 0:l.business_payment_volume,maskOptions:d.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:f,defaultValue:null==l?void 0:l.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:v,defaultValue:null==l?void 0:l.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==l?void 0:l.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:y,defaultValue:null==l?void 0:l.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==l?void 0:l.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},U=(t,s)=>{const e=n({bank_name:k.required("Enter bank name"),nickname:O.required("Enter nickname"),account_owner_name:C.required("Enter account owner name"),account_type:S.required("Select account type"),account_number:T.required("Enter account number"),routing_number:j.required("Enter routing number"),voided_check:x(t,s),bank_statement:_(t,s)}),i=n({bank_name:k.nullable(),nickname:O.nullable(),account_owner_name:C.nullable(),account_type:S.nullable(),account_number:T.nullable(),routing_number:j.nullable(),voided_check:x(t,s),bank_statement:_(t,s)});return s?i:e},R=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 V,this.isLoading=!1,this.initializeFormController=()=>{this.formController=new o(U(this.existingDocuments,this.allowOptionalFields)),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 B({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 W(t.data.bank_accounts[0]):(this.bankAccount=new W({}),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:H.POST_ERROR,message:s.error.message,severity:L.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 fetch(t.presigned_url,{method:"PUT",body:t.fileString});return this.handleUploadResponse(s)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:H.POST_ERROR,message:t.error.message,severity:L.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 o(U(this.existingDocuments,this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get postPayload(){return new W(this.formController.values.getValue()).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:H.POST_ERROR,severity:L.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:g.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(q,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:m},"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("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:m},"Document Uploads"),t("form-control-tooltip",{helpText:"These documents are required for underwriting purposes. Various file formats such as PDF, DOC, DOCX, JPEG, and others 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"]}}},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.coreInfo={},this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new l(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()},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:g.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 l(this.formController.values.getValue()).payload}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(r(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){const s=this.formController.getInitialValues();return this.isLoading?t(q,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:m},"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:s.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:s.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:b,defaultValue:s.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:s.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:s.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"tax_id",label:"Tax ID (EIN or SSN)",defaultValue:s.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,keyDownHandler:D,maxLength:9,helpText:"Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns. Enter value without dashes."})),t("div",{class:"col-12"},t("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:s.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:s.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:s.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:u.US})))))}},M=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:g.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:w.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(q,null):t("div",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:m},"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,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),t("div",{class:"d-flex justify-content-start"},t("div",{class:"gap-2"},t(A,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},G=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.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new h(t.data.representative||{}),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:g.representative}),this.formLoading.emit(!1)}})}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{representative:new h(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(E("representative",this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){return this.isLoading?t(q,null):t("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController})}},Y=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.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.legal_address=new c(t.data.legal_address||{}),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:g.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 c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(P(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n;const a=this.formController.getInitialValues();return this.isLoading?t(q,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:m},"Legal Address of your Business"),t("form-control-tooltip",{helpText:"No PO Boxes."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line1,errorText:null===(s=this.errors)||void 0===s?void 0:s.line1})),t("div",{class:"col-12"},t("form-control-text",{name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line2,errorText:null===(e=this.errors)||void 0===e?void 0:e.line2})),t("div",{class:"col-12"},t("form-control-text",{name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.city,errorText:null===(i=this.errors)||void 0===i?void 0:i.city})),t("div",{class:"col-12"},t("form-control-select",{name:"state",label:"State",options:I,inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.state,errorText:null===(r=this.errors)||void 0===r?void 0:r.state})),t("div",{class:"col-12"},t("form-control-text",{name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.postal_code,errorText:null===(o=this.errors)||void 0===o?void 0:o.postal_code,maxLength:5,keyDownHandler:D})),t("div",{class:"col-12"},t("form-control-select",{name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.country,errorText:null===(n=this.errors)||void 0===n?void 0:n.country,disabled:!0})))))}};export{N as justifi_additional_questions_form_step_core,R as justifi_business_bank_account_form_step_core,X as justifi_business_core_info_form_step_core,M as justifi_business_owners_form_step_core,G as justifi_business_representative_form_step_core,Y as justifi_legal_address_form_step_core}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-D6FDxSyt.js";import{a as s}from"./p-CpTwq2jw.js";import{C as i,a as o}from"./p-SdntD1xf.js";import"./p-BjB_yKBJ.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-Bxs6fi7a.js";import{d as c}from"./p-AVaenhw9.js";import"./p-Ct-uNz2r.js";import{c as n,J as d}from"./p-Dss1xCBW.js";import{g as p,a as h}from"./p-C5RuuShs.js";import{P as l}from"./p-oPo_KSwO.js";import{T as f,a as u,b as m,c as b,d as y}from"./p-OjYukdAC.js";import{R as w,S as _,A as j,B as T}from"./p-CjO1GttX.js";import{S as g}from"./p-DuYlA4lj.js";import{c as k}from"./p-CN_YheWL.js";import"./p-BFTU3MAI.js";import"./p-7MWRbTXI.js";import"./p-D2EbqwBe.js";import"./p-BBsCnePk.js";import"./p-KLQjERL5.js";import"./p-Bl79NorO.js";import"./p-Cd06j2SL.js";const v={id:()=>t("th",{part:w,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:w,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:w,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:w,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:w,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:w,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:w,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:w,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:w,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:w,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:w,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:w,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:w,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:w,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},C={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},D={id:e=>t("td",{part:_(e.id)},e.id),account_id:e=>t("td",{part:_(e.account_id)},e.account_id),payout_id:e=>t("td",{part:_(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:_(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:_(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:_(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:_(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:_(e.currency)},e.currency),description:e=>t("td",{part:_(e.description)},e.description),source_id:e=>t("td",{part:_(e.source_id)},e.source_id),txn_type:e=>t("td",{part:_(e.txn_type)},C[e.txn_type]),created_at:e=>t("td",{part:_(e.created_at)},t("div",{class:"fw-bold"},s(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},s(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:_(e.available_on)},t("div",{class:"fw-bold"},s(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},s(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:_(e.updated_at)},t("div",{class:"fw-bold"},s(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},s(e.updated_at,{showTime:!0})))},S=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,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:f.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:f.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:f.row,data:a})}}componentWillLoad(){this.transactionsTable=new u(this.balanceTransactions,this.columns,v,D),n(),this.analytics=new d(this),this.initializeApi()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:r,final:n})=>{var d;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?r({error:h(n.error),code:p(null===(d=n.error)||void 0===d?void 0:d.code),severity:i.ERROR}):o({balanceTransactions:n.data.map((t=>new c(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);r({error:h(t),code:e,severity:i.ERROR})}finally{n()}})({accountId:k.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,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="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,i.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}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(g,{key:"11760c372ccd854fd247a931ac9a31f80e779908"},t("div",{key:"cb45e596e6ac53d5567b7afb8c3c34c11d838fbe",class:"table-wrapper"},t("table",{key:"449b9e901af31d8ae76e4543e7011f7a9596d8ab",class:"table table-hover",part:j},t("thead",{key:"c04b7c762ecbb0b25a8375661f3a51d37ff96f24",class:"table-head sticky-top"},t("tr",{key:"b81f0b41584f6322f8faec27c61a749d0a60fbf7",class:"table-light text-nowrap"},this.transactionsTable.columnData.map((t=>t)))),t("tbody",{key:"83947c4b2c28ebd29477cb776dfe193ea090e35d",class:"table-body"},t(m,{key:"94519e994722bcf30b20ba503858ed3c1ecc33dc",columnSpan:this.transactionsTable.columnData.length,isLoading:this.isLoading}),t(b,{key:"2331c2748f53ba9906ed9228d89097bfd024b600",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnData.length}),t(y,{key:"9e0a5bfbbccb0ad02a9ed70edc3bb6d6108b9ad7",columnSpan:this.transactionsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t("tfoot",{key:"0591033f666cddb7cadec2d8da2d61d8ad66fad6",class:"sticky-bottom"},t("tr",{key:"26c47ed9b3d37553ba43c0e8fc37c4666a8baef9",class:"table-light align-middle"},t("td",{key:"25ee92e4f38dc8853a5a3cfcfe4d2829ea51788a",part:T,colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"4a26779c713b7bb7833822c98596482c1c06b767",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{S as justifi_payout_transactions_list}
@@ -0,0 +1 @@
1
+ import{h as t,r as s,c as i}from"./p-D6FDxSyt.js";import{p as e,f as r,r as a,h as o}from"./p-CpTwq2jw.js";import{v as l,a as h,b as n,H as d}from"./p-CSwEbNEl.js";import{C as c,D as p}from"./p-CjO1GttX.js";import{S as u}from"./p-DuYlA4lj.js";import{S as v}from"./p-B4Bi1JkP.js";import"./p-BFTU3MAI.js";import"./p-Cd06j2SL.js";const m=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(v,{width:"35%",height:"30px"})),t("div",{class:"col-12"},t(v,{width:"70%"})),t("div",{class:"col-12"},t(v,{width:"40%"})),t("div",{class:"col-12"},t(v,{width:"40%"})),t("div",{class:"col-12"},t(v,{width:"100%"})),t("div",{class:"col-12"},t(v,{width:"80%"}))),f=class{constructor(t){s(this,t),this.insuranceUpdated=i(this,"insurance-updated"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return l()}componentWillLoad(){this.getQuote&&this.fetchData()}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:t})=>{this.quote=t,this.quote.product.description=e(this.quote.product.description,[t=>a(t,"style"),t=>o(t,"a","part",c)]),this.quote.product.legal_disclaimer=e(this.quote.product.legal_disclaimer,[t=>a(t,"style"),t=>o(t,"a","part",c)]),h[t.policy_type]=t.accepted,this.isLoading=!1},onError:({error:t,code:s,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:s,message:t,severity:i})}})}onChangeHandler(t,s){this.accepted=s,n[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),h[this.quote.policy_type]=this.accepted},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({errorCode:s,message:t,severity:i})}})}get error(){var t;return n[null===(t=this.quote)||void 0===t?void 0:t.policy_type]}render(){var s,i,e,a;return t(u,null,this.isLoading?t(m,null):t("div",null,t(d,{text:null===(s=this.quote)||void 0===s?void 0:s.product.title,class:"fs-5 fw-bold pb-3"}),t("small",{innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description,part:c}),t("form-control-radio",{label:`Accept coverage for ${r(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this)}),t("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this)}),t("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:p},"Please select an option"),t("small",{innerHTML:null===(a=this.quote)||void 0===a?void 0:a.product.legal_disclaimer,part:c})))}};export{f as justifi_season_interruption_insurance_core}