@justifi/webcomponents 6.9.0 → 6.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (533) hide show
  1. package/dist/cjs/{Api-CVbEWBG6.js → Api-Bukk55YZ.js} +1 -1
  2. package/dist/cjs/{Business-CB8EVrhD.js → Business-oBifyXkW.js} +3 -31
  3. package/dist/cjs/{Plaid-DxPvVu0H.js → Plaid-B_UkFjIV.js} +3 -295
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
  5. package/dist/cjs/{badge-xJttyTNv.js → badge-Cl6qJPK_.js} +1 -1
  6. package/dist/cjs/bank-account-document-form-inputs_9.cjs.entry.js +16 -17
  7. package/dist/cjs/bank-account-form.cjs.entry.js +3 -3
  8. package/dist/cjs/{business-additional-questions-schema-Cnh6AXQU.js → business-additional-questions-schema-CI80eZLJ.js} +5 -5
  9. package/dist/cjs/business-details-core.cjs.entry.js +3 -3
  10. package/dist/cjs/{business-form-options-B3CbEmdc.js → business-form-options-D_nM7NDk.js} +1 -1
  11. package/dist/cjs/{business-identity-schema-0jg2Thn9.js → business-identity-schema-DWWtSiUF.js} +3 -3
  12. package/dist/cjs/{business.service-zGEitIbP.js → business.service-Kplx8w_D.js} +3 -3
  13. package/dist/cjs/{button-BlYRmuPs.js → button-Cr3iHpyf.js} +1 -1
  14. package/dist/cjs/card-form.cjs.entry.js +3 -3
  15. package/dist/cjs/{check-pkg-version-DYPDNKpa.js → check-pkg-version-DjlvidPw.js} +4 -4
  16. package/dist/cjs/{checkout.service-DT13pWxH.js → checkout.service-B2toaeKY.js} +3 -3
  17. package/dist/cjs/checkout.store-zTfjieKa.js +111 -0
  18. package/dist/cjs/checkouts-list-core.cjs.entry.js +8 -9
  19. package/dist/cjs/{checkouts-table-sE8amz4g.js → checkouts-table-CXgizBib.js} +3 -3
  20. package/dist/cjs/{country-config-ETD-7Wb7.js → country-config-D7fss2oF.js} +1 -1
  21. package/dist/cjs/custom-popper_2.cjs.entry.js +3 -3
  22. package/dist/cjs/{dispute.service-GDUl1Wjs.js → dispute.service-C4n1SOsu.js} +3 -3
  23. package/dist/cjs/form-alert_5.cjs.entry.js +4 -4
  24. package/dist/cjs/form-control-checkbox.cjs.entry.js +3 -3
  25. package/dist/cjs/form-control-date.cjs.entry.js +4 -4
  26. package/dist/cjs/{form-control-error-text-DukLkr-1.js → form-control-error-text-6-HeM6bw.js} +1 -1
  27. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -5
  28. package/dist/cjs/{form-control-help-text-BylrKCQO.js → form-control-help-text-D0LaZkGk.js} +1 -1
  29. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
  30. package/dist/cjs/form-control-monetary.cjs.entry.js +6 -6
  31. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +6 -6
  32. package/dist/cjs/form-control-number_3.cjs.entry.js +13 -13
  33. package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
  34. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  35. package/dist/cjs/{get-business-CP0ALW9n.js → get-business-DF-XBH8G.js} +1 -1
  36. package/dist/cjs/{get-payment-details-IA5Toi7Z.js → get-payment-details-Atcodhcd.js} +2 -2
  37. package/dist/cjs/{get-subaccounts-DiGMPvU0.js → get-subaccounts-BUyf9EhG.js} +3 -3
  38. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +4 -4
  39. package/dist/cjs/{header-1-BHbPS-jr.js → header-1-BOijdmPN.js} +1 -1
  40. package/dist/cjs/{header-3-DEAkFNHs.js → header-3-FeTJjrR1.js} +1 -1
  41. package/dist/cjs/hidden-input_2.cjs.entry.js +7 -7
  42. package/dist/cjs/{index.esm-ByC0D4sJ.js → index.esm-C1ZPG85l.js} +18 -0
  43. package/dist/cjs/{input-handlers-gV1LyFy3.js → input-handlers-_51J5q7J.js} +1 -1
  44. package/dist/cjs/{insurance-state-C2diJME7.js → insurance-state-DIV_moDI.js} +1 -1
  45. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -22
  46. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +26 -18
  47. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +2 -2
  48. package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +209 -810
  49. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +7 -7
  50. package/dist/cjs/justifi-business-details.cjs.entry.js +10 -11
  51. package/dist/cjs/justifi-business-form.cjs.entry.js +18 -19
  52. package/dist/cjs/justifi-checkout.cjs.entry.js +17 -16
  53. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +4 -5
  54. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +11 -12
  55. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  56. package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -8
  57. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +10 -11
  58. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +8 -9
  59. package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -13
  60. package/dist/cjs/justifi-payment-details.cjs.entry.js +10 -11
  61. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +5 -5
  62. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +30 -24
  63. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +11 -12
  64. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +15 -4
  65. package/dist/cjs/justifi-payments-list.cjs.entry.js +12 -13
  66. package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -10
  67. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +11 -12
  68. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +22 -4
  69. package/dist/cjs/justifi-payouts-list.cjs.entry.js +13 -14
  70. package/dist/cjs/justifi-refund-payment.cjs.entry.js +12 -13
  71. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  72. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +13 -12
  73. package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
  74. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +6 -7
  75. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +10 -11
  76. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +5 -6
  77. package/dist/cjs/justifi-terminals-list.cjs.entry.js +12 -13
  78. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
  79. package/dist/cjs/loader.cjs.js +1 -1
  80. package/dist/cjs/{package-BvYokEHF.js → package-C5inXJfW.js} +1 -1
  81. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  82. package/dist/cjs/{parts-DtJdaXeM.js → parts-C0AyF3nd.js} +8 -0
  83. package/dist/cjs/payment-details-core.cjs.entry.js +16 -17
  84. package/dist/cjs/payment-method-option.cjs.entry.js +2 -2
  85. package/dist/cjs/{payment-provisioning-actions-CZVlnRA0.js → payment-provisioning-actions-J6TGZZb9.js} +2 -0
  86. package/dist/cjs/{payment-provisioning-loading-hyJJ0bBW.js → payment-provisioning-loading-CbcFPETB.js} +1 -1
  87. package/dist/cjs/{payment.service-QODfB293.js → payment.service-CxSGTv_O.js} +3 -3
  88. package/dist/cjs/payments-list-core.cjs.entry.js +11 -11
  89. package/dist/cjs/{payments-status-WKcRbqRT.js → payments-status-EZ95BQex.js} +1 -1
  90. package/dist/cjs/{payments-table-DayHhWCE.js → payments-table-D5Hw3JDe.js} +3 -3
  91. package/dist/cjs/payout-details-core.cjs.entry.js +10 -10
  92. package/dist/cjs/{payout.service-k7GBuYzk.js → payout.service-CO2wDM6M.js} +3 -3
  93. package/dist/cjs/payouts-list-core.cjs.entry.js +10 -11
  94. package/dist/cjs/{payouts-status-DXeHIDMX.js → payouts-status-D1IbE3-c.js} +1 -1
  95. package/dist/cjs/{payouts-table-B1ShNA4P.js → payouts-table-DmVthJLU.js} +3 -3
  96. package/dist/cjs/{plaid-icon-DTpONc_Q.js → plaid-icon-DiZrP1DM.js} +3 -3
  97. package/dist/cjs/{schema-validations-BakyfJpE.js → schema-validations-_yWWnnaG.js} +4 -4
  98. package/dist/cjs/{skeleton-B-Otnf5t.js → skeleton-C9Aio7v_.js} +1 -1
  99. package/dist/cjs/{spinner-B1rgGfdc.js → spinner-oLSXKwxU.js} +1 -1
  100. package/dist/cjs/{table-CNGkG0a8.js → table-CEW0_wq-.js} +2 -2
  101. package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
  102. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +9 -10
  103. package/dist/cjs/{terminal-orders-table-Aj4dJNdG.js → terminal-orders-table-DPHz95-0.js} +5 -5
  104. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +2 -2
  105. package/dist/cjs/{terminal.service-A90K3XNq.js → terminal.service-CUVwCH-a.js} +3 -3
  106. package/dist/cjs/terminals-list-core.cjs.entry.js +9 -10
  107. package/dist/cjs/{terminals-table-aQQov5qX.js → terminals-table-C6rm50Mk.js} +3 -3
  108. package/dist/cjs/{utils-D4WPxuzW.js → utils-BHi4j5rB.js} +28 -0
  109. package/dist/cjs/{utils-cLBudEdA.js → utils-Vwo0VR7n.js} +1 -1
  110. package/dist/cjs/webcomponents.cjs.js +1 -1
  111. package/dist/collection/api/Business.js +3 -31
  112. package/dist/collection/api/index.js +0 -1
  113. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +10 -1
  114. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +2 -0
  115. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +23 -15
  116. package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
  117. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +112 -516
  118. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  119. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  120. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  121. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  122. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  123. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  124. package/dist/collection/components/payments-list/payments-list-core.js +2 -1
  125. package/dist/collection/components/payments-list/payments-list-filters.js +71 -3
  126. package/dist/collection/components/payments-list/payments-list.js +1 -1
  127. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  128. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  129. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  130. package/dist/collection/components/payouts-list/payouts-list-filters.js +35 -3
  131. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  132. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  133. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  134. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  135. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  136. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  137. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  138. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +1 -1
  139. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  140. package/dist/collection/styles/parts.js +4 -0
  141. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  142. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  143. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  144. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  145. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  146. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  147. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  148. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  149. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  150. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  151. package/dist/collection/ui-components/form/form.js +18 -0
  152. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  153. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  154. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  155. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  156. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  157. package/dist/collection/utils/utils.js +27 -0
  158. package/dist/docs.json +118 -441
  159. package/dist/esm/{Api-ohkSjyhl.js → Api-CLZVsXZg.js} +1 -1
  160. package/dist/esm/{Business-GgW1g7FQ.js → Business-BcNb9bVO.js} +3 -31
  161. package/dist/esm/{Plaid-CBrksnBN.js → Plaid-Cmyilr-q.js} +2 -286
  162. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  163. package/dist/esm/{badge-C1EiQTzO.js → badge-AZ7Z3PKH.js} +1 -1
  164. package/dist/esm/bank-account-document-form-inputs_9.entry.js +16 -17
  165. package/dist/esm/bank-account-form.entry.js +3 -3
  166. package/dist/esm/{business-additional-questions-schema-CQ8CuEfQ.js → business-additional-questions-schema-DKudYaoE.js} +5 -5
  167. package/dist/esm/business-details-core.entry.js +3 -3
  168. package/dist/esm/{business-form-options-DamBLV7N.js → business-form-options-DRalxlqN.js} +1 -1
  169. package/dist/esm/{business-identity-schema-BTyJz7M9.js → business-identity-schema-CFhSc0cA.js} +3 -3
  170. package/dist/esm/{business.service-BWm7Kqs4.js → business.service-CS-wQJoN.js} +3 -3
  171. package/dist/esm/{button-BcuzSsnr.js → button-DOkTCYSa.js} +1 -1
  172. package/dist/esm/card-form.entry.js +3 -3
  173. package/dist/esm/{check-pkg-version-DU70zoMs.js → check-pkg-version-wgHSN5sV.js} +4 -4
  174. package/dist/esm/{checkout.service-D4Mljqjr.js → checkout.service-BcQ_onZq.js} +3 -3
  175. package/dist/esm/checkout.store-iNkW80yV.js +105 -0
  176. package/dist/esm/checkouts-list-core.entry.js +8 -9
  177. package/dist/esm/{checkouts-table-BPrSrgLm.js → checkouts-table-C5aYyqpX.js} +3 -3
  178. package/dist/esm/{country-config-D-9YmU94.js → country-config-P042rrI3.js} +1 -1
  179. package/dist/esm/custom-popper_2.entry.js +3 -3
  180. package/dist/esm/{dispute.service-ZpqfPDC0.js → dispute.service-B_oe0uFV.js} +3 -3
  181. package/dist/esm/form-alert_5.entry.js +4 -4
  182. package/dist/esm/form-control-checkbox.entry.js +3 -3
  183. package/dist/esm/form-control-date.entry.js +4 -4
  184. package/dist/esm/{form-control-error-text-BEfFiFoH.js → form-control-error-text-xEskXF-M.js} +1 -1
  185. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  186. package/dist/esm/{form-control-help-text-CC-MQWel.js → form-control-help-text-Dgnv4IId.js} +1 -1
  187. package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
  188. package/dist/esm/form-control-monetary.entry.js +6 -6
  189. package/dist/esm/form-control-number-masked_3.entry.js +6 -6
  190. package/dist/esm/form-control-number_3.entry.js +13 -13
  191. package/dist/esm/form-control-radio.entry.js +3 -3
  192. package/dist/esm/form-control-select_2.entry.js +4 -4
  193. package/dist/esm/{get-business-BMB2IxN_.js → get-business-BtJWpVs_.js} +1 -1
  194. package/dist/esm/{get-payment-details-B71Qi6mF.js → get-payment-details-BdewJSTH.js} +2 -2
  195. package/dist/esm/{get-subaccounts-BYnEN5xd.js → get-subaccounts-BFALCYFr.js} +3 -3
  196. package/dist/esm/gross-payment-chart-core.entry.js +4 -4
  197. package/dist/esm/{header-1-BhMrVhZJ.js → header-1-xlSavD5o.js} +1 -1
  198. package/dist/esm/{header-3-D4YKnb9t.js → header-3-egutsoDI.js} +1 -1
  199. package/dist/esm/hidden-input_2.entry.js +7 -7
  200. package/dist/esm/{index.esm-IWS0494Y.js → index.esm-BHdVU4hV.js} +18 -0
  201. package/dist/esm/{input-handlers-CzWCJ849.js → input-handlers-1lVyzImK.js} +1 -1
  202. package/dist/esm/{insurance-state-DTR-V07V.js → insurance-state-jZTKdt60.js} +1 -1
  203. package/dist/esm/internal-tokenize-payment-method_7.entry.js +12 -11
  204. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +26 -18
  205. package/dist/esm/justifi-additional-statement_8.entry.js +2 -2
  206. package/dist/esm/justifi-apple-pay_8.entry.js +113 -714
  207. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +7 -7
  208. package/dist/esm/justifi-business-details.entry.js +10 -11
  209. package/dist/esm/justifi-business-form.entry.js +18 -19
  210. package/dist/esm/justifi-checkout.entry.js +9 -8
  211. package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -5
  212. package/dist/esm/justifi-checkouts-list.entry.js +11 -12
  213. package/dist/esm/justifi-details.entry.js +2 -2
  214. package/dist/esm/justifi-dispute-management.entry.js +7 -8
  215. package/dist/esm/justifi-dispute-notification_3.entry.js +10 -11
  216. package/dist/esm/justifi-gross-payment-chart.entry.js +8 -9
  217. package/dist/esm/justifi-order-terminals.entry.js +12 -13
  218. package/dist/esm/justifi-payment-details.entry.js +10 -11
  219. package/dist/esm/justifi-payment-provisioning-core.entry.js +5 -5
  220. package/dist/esm/justifi-payment-provisioning.entry.js +30 -24
  221. package/dist/esm/justifi-payment-transactions-list.entry.js +11 -12
  222. package/dist/esm/justifi-payments-list-filters.entry.js +15 -4
  223. package/dist/esm/justifi-payments-list.entry.js +12 -13
  224. package/dist/esm/justifi-payout-details.entry.js +9 -10
  225. package/dist/esm/justifi-payout-transactions-list.entry.js +11 -12
  226. package/dist/esm/justifi-payouts-list-filters.entry.js +22 -4
  227. package/dist/esm/justifi-payouts-list.entry.js +13 -14
  228. package/dist/esm/justifi-refund-payment.entry.js +12 -13
  229. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  230. package/dist/esm/justifi-season-interruption-insurance.entry.js +10 -9
  231. package/dist/esm/justifi-skeleton.entry.js +3 -3
  232. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +6 -7
  233. package/dist/esm/justifi-terminal-orders-list.entry.js +10 -11
  234. package/dist/esm/justifi-terminals-list-filters.entry.js +5 -6
  235. package/dist/esm/justifi-terminals-list.entry.js +12 -13
  236. package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
  237. package/dist/esm/loader.js +1 -1
  238. package/dist/esm/{package-Cnc2WKdS.js → package-D4eE0MBI.js} +1 -1
  239. package/dist/esm/pagination-menu.entry.js +1 -1
  240. package/dist/esm/{parts-fTIONWal.js → parts-C4FLe2pT.js} +5 -1
  241. package/dist/esm/payment-details-core.entry.js +16 -17
  242. package/dist/esm/payment-method-option.entry.js +2 -2
  243. package/dist/esm/{payment-provisioning-actions-ONP8lDnV.js → payment-provisioning-actions-CBvplwPf.js} +2 -0
  244. package/dist/esm/{payment-provisioning-loading-C5aC-7Xf.js → payment-provisioning-loading-D_VKtlLm.js} +1 -1
  245. package/dist/esm/{payment.service-C2lFq1yV.js → payment.service-Nvz1TYZB.js} +3 -3
  246. package/dist/esm/payments-list-core.entry.js +11 -11
  247. package/dist/esm/{payments-status-ChFodVw0.js → payments-status-D4XkcfLU.js} +1 -1
  248. package/dist/esm/{payments-table-DHYfybe9.js → payments-table-BDaiD836.js} +3 -3
  249. package/dist/esm/payout-details-core.entry.js +10 -10
  250. package/dist/esm/{payout.service-ChupMPKT.js → payout.service-tTxsxoqF.js} +3 -3
  251. package/dist/esm/payouts-list-core.entry.js +10 -11
  252. package/dist/esm/{payouts-status-BFp0DBRt.js → payouts-status-BR1vd6-D.js} +1 -1
  253. package/dist/esm/{payouts-table-CPFbykKY.js → payouts-table-B4nuJlpC.js} +3 -3
  254. package/dist/esm/{plaid-icon-wJLd-2NX.js → plaid-icon-B7a1QC7F.js} +3 -3
  255. package/dist/esm/{schema-validations-CfHWzMvr.js → schema-validations-v6WGlZkq.js} +4 -4
  256. package/dist/esm/{skeleton-C0UU9Mei.js → skeleton-C162KC3u.js} +1 -1
  257. package/dist/esm/{spinner-CkUdH9X9.js → spinner-BfjGGaND.js} +1 -1
  258. package/dist/esm/table-filters-menu.entry.js +2 -2
  259. package/dist/esm/{table-DiZqpIWv.js → table-hHARNoRM.js} +2 -2
  260. package/dist/esm/terminal-orders-list-core.entry.js +9 -10
  261. package/dist/esm/{terminal-orders-table-BwGEq9On.js → terminal-orders-table-B-xs6ocO.js} +5 -5
  262. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  263. package/dist/esm/{terminal.service-DqibXFHt.js → terminal.service-Dv1-CZ4Y.js} +3 -3
  264. package/dist/esm/terminals-list-core.entry.js +9 -10
  265. package/dist/esm/{terminals-table-BeYpMiBC.js → terminals-table-CnKH-UOw.js} +3 -3
  266. package/dist/esm/{utils-CDaVtz_6.js → utils-7bp92NC7.js} +28 -1
  267. package/dist/esm/{utils-DBWsd4R9.js → utils-BSpK1eMX.js} +1 -1
  268. package/dist/esm/webcomponents.js +1 -1
  269. package/dist/module/Analytics.js +0 -1
  270. package/dist/module/Business.js +3 -31
  271. package/dist/module/Plaid.js +1 -1
  272. package/dist/module/bank-account-document-inputs.js +0 -1
  273. package/dist/module/business-bank-account-form-step.js +1 -2
  274. package/dist/module/business-core-info-form-step.js +10 -1
  275. package/dist/module/business-core-info-schema.js +1 -1
  276. package/dist/module/business-terms-conditions-form-step.js +0 -1
  277. package/dist/module/business.service.js +0 -1
  278. package/dist/module/checkout.service.js +0 -1
  279. package/dist/module/checkouts-list-core2.js +0 -1
  280. package/dist/module/custom-popper2.js +2 -2
  281. package/dist/module/dispute-response-actions.js +0 -1
  282. package/dist/module/form-control-date2.js +2 -2
  283. package/dist/module/form-control-file-v22.js +1 -1
  284. package/dist/module/form-control-file2.js +2 -2
  285. package/dist/module/form-control-monetary2.js +2 -2
  286. package/dist/module/form-control-number-masked2.js +2 -2
  287. package/dist/module/form-control-number2.js +2 -2
  288. package/dist/module/form-control-radio2.js +2 -2
  289. package/dist/module/form-control-text2.js +2 -2
  290. package/dist/module/form-control-textarea2.js +2 -2
  291. package/dist/module/form.js +18 -0
  292. package/dist/module/get-payment-details.js +0 -1
  293. package/dist/module/get-subaccounts.js +0 -1
  294. package/dist/module/google-pay.js +101 -722
  295. package/dist/module/gross-payment-chart-core2.js +1 -1
  296. package/dist/module/hidden-input2.js +1 -1
  297. package/dist/module/iframe-input2.js +3 -3
  298. package/dist/module/internal-tokenize-payment-method2.js +1 -2
  299. package/dist/module/justifi-business-form.js +0 -1
  300. package/dist/module/justifi-button2.js +1 -1
  301. package/dist/module/justifi-checkouts-list-filters.js +0 -1
  302. package/dist/module/justifi-checkouts-list.js +1 -2
  303. package/dist/module/justifi-gross-payment-chart.js +0 -1
  304. package/dist/module/justifi-header2.js +1 -1
  305. package/dist/module/justifi-order-terminals.js +3 -4
  306. package/dist/module/justifi-payment-provisioning.js +23 -16
  307. package/dist/module/justifi-payment-transactions-list.js +2 -3
  308. package/dist/module/justifi-payments-list-filters.js +17 -3
  309. package/dist/module/justifi-payments-list.js +1 -2
  310. package/dist/module/justifi-payout-details.js +1 -2
  311. package/dist/module/justifi-payout-transactions-list.js +2 -3
  312. package/dist/module/justifi-payouts-list-filters.js +31 -7
  313. package/dist/module/justifi-payouts-list.js +2 -3
  314. package/dist/module/justifi-refund-payment.js +1 -2
  315. package/dist/module/justifi-season-interruption-insurance.js +1 -2
  316. package/dist/module/justifi-skeleton.js +1 -1
  317. package/dist/module/justifi-terminal-orders-list-filters.js +4 -5
  318. package/dist/module/justifi-terminal-orders-list.js +2 -3
  319. package/dist/module/justifi-terminals-list-filters.js +3 -4
  320. package/dist/module/justifi-terminals-list.js +2 -3
  321. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  322. package/dist/module/modular-checkout.js +0 -1
  323. package/dist/module/package.js +1 -1
  324. package/dist/module/parts.js +5 -1
  325. package/dist/module/payment-details-core2.js +8 -9
  326. package/dist/module/payment-method-option.js +1 -1
  327. package/dist/module/payment-provisioning-actions.js +2 -0
  328. package/dist/module/payment.service.js +0 -1
  329. package/dist/module/payments-list-core2.js +2 -2
  330. package/dist/module/payout-details-core2.js +3 -3
  331. package/dist/module/payout.service.js +0 -1
  332. package/dist/module/payouts-list-core2.js +1 -2
  333. package/dist/module/plaid.service.js +0 -1
  334. package/dist/module/summary.js +1 -1
  335. package/dist/module/table.js +1 -1
  336. package/dist/module/terminal-orders-list-core2.js +2 -3
  337. package/dist/module/terminal-quantity-selector2.js +1 -1
  338. package/dist/module/terminal.service.js +0 -1
  339. package/dist/module/terminals-list-core2.js +2 -3
  340. package/dist/module/utils2.js +28 -1
  341. package/dist/types/api/Business.d.ts +10 -10
  342. package/dist/types/api/Payment.d.ts +3 -0
  343. package/dist/types/api/Payout.d.ts +1 -0
  344. package/dist/types/api/index.d.ts +0 -1
  345. package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.d.ts +5 -5
  346. package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +18 -49
  347. package/dist/types/components/payments-list/payments-list-filters.d.ts +7 -0
  348. package/dist/types/components/payouts-list/payouts-list-filters.d.ts +5 -0
  349. package/dist/types/components.d.ts +20 -99
  350. package/dist/types/styles/parts.d.ts +4 -0
  351. package/dist/types/ui-components/form/form.d.ts +2 -0
  352. package/dist/types/utils/utils.d.ts +1 -0
  353. package/dist/webcomponents/p--Kvji7o2.js +1 -0
  354. package/dist/webcomponents/p-05d11c40.entry.js +1 -0
  355. package/dist/webcomponents/p-0e21749b.entry.js +1 -0
  356. package/dist/webcomponents/p-0f1c100d.entry.js +1 -0
  357. package/dist/webcomponents/{p-ab89e764.entry.js → p-11402020.entry.js} +1 -1
  358. package/dist/webcomponents/p-12665340.entry.js +1 -0
  359. package/dist/webcomponents/{p-88eb0648.entry.js → p-154efb83.entry.js} +1 -1
  360. package/dist/webcomponents/p-19f1e643.entry.js +1 -0
  361. package/dist/webcomponents/p-1b973781.entry.js +1 -0
  362. package/dist/webcomponents/p-2438363d.entry.js +1 -0
  363. package/dist/webcomponents/{p-90240aa6.entry.js → p-2b679e5a.entry.js} +1 -1
  364. package/dist/webcomponents/p-2bbd810a.entry.js +1 -0
  365. package/dist/webcomponents/{p-3cc40df9.entry.js → p-2d39358b.entry.js} +1 -1
  366. package/dist/webcomponents/p-300002dd.entry.js +1 -0
  367. package/dist/webcomponents/p-38c1e9fa.entry.js +1 -0
  368. package/dist/webcomponents/p-3971d6b7.entry.js +1 -0
  369. package/dist/webcomponents/{p-0b9b50f8.entry.js → p-402ba9aa.entry.js} +1 -1
  370. package/dist/webcomponents/p-423b63ad.entry.js +1 -0
  371. package/dist/webcomponents/{p-33ceb1cf.entry.js → p-5206cd09.entry.js} +1 -1
  372. package/dist/webcomponents/{p-7a48659c.entry.js → p-52dc271f.entry.js} +1 -1
  373. package/dist/webcomponents/{p-6be6d4ec.entry.js → p-540e2ef2.entry.js} +1 -1
  374. package/dist/webcomponents/{p-y8av3w9x.js → p-55QcjheA.js} +1 -1
  375. package/dist/webcomponents/p-5862236f.entry.js +1 -0
  376. package/dist/webcomponents/p-5cee4e33.entry.js +1 -0
  377. package/dist/webcomponents/p-5d753fd4.entry.js +1 -0
  378. package/dist/webcomponents/{p-CBiNYzSf.js → p-5mt2ek0H.js} +1 -1
  379. package/dist/webcomponents/p-62f9c008.entry.js +1 -0
  380. package/dist/webcomponents/p-6V4e6Fb_.js +1 -0
  381. package/dist/webcomponents/p-6c503a00.entry.js +1 -0
  382. package/dist/webcomponents/p-6d565cd6.entry.js +1 -0
  383. package/dist/webcomponents/p-7769de83.entry.js +1 -0
  384. package/dist/webcomponents/{p-8f29877f.entry.js → p-7e14f6ac.entry.js} +1 -1
  385. package/dist/webcomponents/p-7f3dcd42.entry.js +1 -0
  386. package/dist/webcomponents/{p-3fc100b7.entry.js → p-808bf425.entry.js} +1 -1
  387. package/dist/webcomponents/p-8728065b.entry.js +1 -0
  388. package/dist/webcomponents/p-88c6713a.entry.js +1 -0
  389. package/dist/webcomponents/p-8Wa_-5QM.js +1 -0
  390. package/dist/webcomponents/p-8a42d4fe.entry.js +1 -0
  391. package/dist/webcomponents/p-8c55dac0.entry.js +1 -0
  392. package/dist/webcomponents/{p-3299c8c2.entry.js → p-8e631781.entry.js} +1 -1
  393. package/dist/webcomponents/p-979d22d0.entry.js +1 -0
  394. package/dist/webcomponents/p-9a11f17b.entry.js +1 -0
  395. package/dist/webcomponents/{p-4301e975.entry.js → p-9d69ae9f.entry.js} +3 -3
  396. package/dist/webcomponents/p-BHA4oSi3.js +1 -0
  397. package/dist/webcomponents/p-B_KHnbK8.js +1 -0
  398. package/dist/webcomponents/{p-GgW1g7FQ.js → p-BcNb9bVO.js} +1 -1
  399. package/dist/webcomponents/p-BiNakvsa.js +1 -0
  400. package/dist/webcomponents/p-BoO2BHR_.js +1 -0
  401. package/dist/webcomponents/p-BovgIz83.js +1 -0
  402. package/dist/webcomponents/{p-BZbvHgMz.js → p-Bt4GjEWL.js} +1 -1
  403. package/dist/webcomponents/p-BtFe5yQU.js +1 -0
  404. package/dist/webcomponents/{p--afWnVJc.js → p-C3kbpEIZ.js} +1 -1
  405. package/dist/webcomponents/p-C4FLe2pT.js +1 -0
  406. package/dist/webcomponents/p-C6o0liMT.js +1 -0
  407. package/dist/webcomponents/{p-ShBqgGPM.js → p-CGJ_mnry.js} +1 -1
  408. package/dist/webcomponents/p-CI11WF1E.js +1 -0
  409. package/dist/webcomponents/{p-Bfu8Pqrd.js → p-CIh-k9yP.js} +1 -1
  410. package/dist/webcomponents/{p-Tj4VxUWO.js → p-CJZ09QNH.js} +1 -1
  411. package/dist/webcomponents/{p-DiJD6Iqx.js → p-CKiAlBsU.js} +1 -1
  412. package/dist/webcomponents/{p-g0kDRH6Z.js → p-CMqX6btO.js} +1 -1
  413. package/dist/webcomponents/{p-DowKbhRa.js → p-CbTf_N6u.js} +1 -1
  414. package/dist/webcomponents/{p--cI8fPJx.js → p-CemnnRdZ.js} +1 -1
  415. package/dist/webcomponents/p-CkX7qWsc.js +1 -0
  416. package/dist/webcomponents/p-D4eE0MBI.js +1 -0
  417. package/dist/webcomponents/{p-Y-EhaLdV.js → p-D8EGHc_m.js} +1 -1
  418. package/dist/webcomponents/p-DAZtHA62.js +1 -0
  419. package/dist/webcomponents/{p-YiF4YKVz.js → p-DFiTyYE9.js} +1 -1
  420. package/dist/webcomponents/{p-lDnX3HTT.js → p-DO4RBao8.js} +1 -1
  421. package/dist/webcomponents/{p-DSlxs7BR.js → p-DYEXDs2k.js} +1 -1
  422. package/dist/webcomponents/p-Daew0gTO.js +1 -0
  423. package/dist/webcomponents/p-DqVU8ohH.js +1 -0
  424. package/dist/webcomponents/{p-CWyW004b.js → p-DqtDbB8E.js} +1 -1
  425. package/dist/webcomponents/p-DsT0m0mo.js +1 -0
  426. package/dist/webcomponents/p-DyETkJs3.js +1 -0
  427. package/dist/webcomponents/{p-D6D_29Tw.js → p-DyJ1zSHJ.js} +1 -1
  428. package/dist/webcomponents/p-EaBIgUj8.js +1 -0
  429. package/dist/webcomponents/{p-ygekUw3Q.js → p-HT_4DkD0.js} +1 -1
  430. package/dist/webcomponents/{p-B2v3zyF0.js → p-HfLk4CG0.js} +1 -1
  431. package/dist/webcomponents/{p-wSi5d4-j.js → p-Jz9qdPhR.js} +1 -1
  432. package/dist/webcomponents/{p-B09GVew-.js → p-MeSAYDNh.js} +1 -1
  433. package/dist/webcomponents/p-R0FDNhyd.js +1 -0
  434. package/dist/webcomponents/{p-B1AMrMly.js → p-_-2E_vYf.js} +1 -1
  435. package/dist/webcomponents/{p-5d13c0c0.entry.js → p-a105de67.entry.js} +1 -1
  436. package/dist/webcomponents/{p-f7128387.entry.js → p-afa2ebd9.entry.js} +1 -1
  437. package/dist/webcomponents/p-b4b540fa.entry.js +1 -0
  438. package/dist/webcomponents/p-b54bf8da.entry.js +1 -0
  439. package/dist/webcomponents/p-bcba5950.entry.js +1 -0
  440. package/dist/webcomponents/p-c0592f5f.entry.js +1 -0
  441. package/dist/webcomponents/p-c6a9410d.entry.js +1 -0
  442. package/dist/webcomponents/p-c6aee723.entry.js +1 -0
  443. package/dist/webcomponents/p-c725dc53.entry.js +1 -0
  444. package/dist/webcomponents/{p-5985f6af.entry.js → p-c72c5b99.entry.js} +1 -1
  445. package/dist/webcomponents/p-c7930f9a.entry.js +1 -0
  446. package/dist/webcomponents/{p-412ae576.entry.js → p-cb09959d.entry.js} +1 -1
  447. package/dist/webcomponents/p-d0813f21.entry.js +1 -0
  448. package/dist/webcomponents/p-d62da4f2.entry.js +1 -0
  449. package/dist/webcomponents/p-d766763a.entry.js +1 -0
  450. package/dist/webcomponents/{p-2e1e489f.entry.js → p-d9118b1e.entry.js} +1 -1
  451. package/dist/webcomponents/p-df61f19b.entry.js +1 -0
  452. package/dist/webcomponents/p-e2bc6c68.entry.js +1 -0
  453. package/dist/webcomponents/p-e71e4c49.entry.js +1 -0
  454. package/dist/webcomponents/{p-f90d7db1.entry.js → p-e89d0f36.entry.js} +1 -1
  455. package/dist/webcomponents/p-eEJMJXTG.js +1 -0
  456. package/dist/webcomponents/p-eb1251bf.entry.js +1 -0
  457. package/dist/webcomponents/p-ed4f8027.entry.js +1 -0
  458. package/dist/webcomponents/p-f18e90b1.entry.js +1 -0
  459. package/dist/webcomponents/{p-403b2248.entry.js → p-fbfe6211.entry.js} +1 -1
  460. package/dist/webcomponents/{p-f9af4ade.entry.js → p-ff4d485f.entry.js} +1 -1
  461. package/dist/webcomponents/webcomponents.esm.js +1 -1
  462. package/package.json +1 -1
  463. package/dist/collection/api/GooglePay.js +0 -181
  464. package/dist/collection/api/services/google-pay.service.js +0 -241
  465. package/dist/collection/ui-components/google-pay-button.js +0 -251
  466. package/dist/module/GooglePay.js +0 -184
  467. package/dist/types/api/GooglePay.d.ts +0 -271
  468. package/dist/types/api/services/google-pay.service.d.ts +0 -60
  469. package/dist/types/ui-components/google-pay-button.d.ts +0 -18
  470. package/dist/webcomponents/p-0188cdac.entry.js +0 -1
  471. package/dist/webcomponents/p-0c2728c3.entry.js +0 -1
  472. package/dist/webcomponents/p-130473c3.entry.js +0 -1
  473. package/dist/webcomponents/p-1c044649.entry.js +0 -1
  474. package/dist/webcomponents/p-1c5d1853.entry.js +0 -1
  475. package/dist/webcomponents/p-1d610dba.entry.js +0 -1
  476. package/dist/webcomponents/p-2019fdfd.entry.js +0 -1
  477. package/dist/webcomponents/p-29d056ed.entry.js +0 -1
  478. package/dist/webcomponents/p-2e2494ef.entry.js +0 -1
  479. package/dist/webcomponents/p-36103b16.entry.js +0 -1
  480. package/dist/webcomponents/p-387c76a4.entry.js +0 -1
  481. package/dist/webcomponents/p-3f7cffdc.entry.js +0 -1
  482. package/dist/webcomponents/p-4ddee6a9.entry.js +0 -1
  483. package/dist/webcomponents/p-5087ce6d.entry.js +0 -1
  484. package/dist/webcomponents/p-55af29a1.entry.js +0 -1
  485. package/dist/webcomponents/p-5aA7gjr5.js +0 -1
  486. package/dist/webcomponents/p-5c8bf8a6.entry.js +0 -1
  487. package/dist/webcomponents/p-5dv0txs0.js +0 -1
  488. package/dist/webcomponents/p-6c4be54a.entry.js +0 -1
  489. package/dist/webcomponents/p-6f82657a.entry.js +0 -1
  490. package/dist/webcomponents/p-76919e48.entry.js +0 -1
  491. package/dist/webcomponents/p-88716a35.entry.js +0 -1
  492. package/dist/webcomponents/p-88735d18.entry.js +0 -1
  493. package/dist/webcomponents/p-9484af96.entry.js +0 -1
  494. package/dist/webcomponents/p-96e9f41b.entry.js +0 -1
  495. package/dist/webcomponents/p-9a215fc7.entry.js +0 -1
  496. package/dist/webcomponents/p-9d0b6f34.entry.js +0 -1
  497. package/dist/webcomponents/p-BRPbLfCN.js +0 -1
  498. package/dist/webcomponents/p-BRieSe65.js +0 -1
  499. package/dist/webcomponents/p-Bg7JIRrk.js +0 -1
  500. package/dist/webcomponents/p-By-Mu1IX.js +0 -1
  501. package/dist/webcomponents/p-C0dMwnDO.js +0 -1
  502. package/dist/webcomponents/p-C3dkSx6l.js +0 -1
  503. package/dist/webcomponents/p-Cf0Rt_Os.js +0 -1
  504. package/dist/webcomponents/p-CkYB1zGe.js +0 -1
  505. package/dist/webcomponents/p-Cnc2WKdS.js +0 -1
  506. package/dist/webcomponents/p-CsilKlYU.js +0 -1
  507. package/dist/webcomponents/p-CuaXkS6j.js +0 -1
  508. package/dist/webcomponents/p-DCwnBXF7.js +0 -1
  509. package/dist/webcomponents/p-DKemQxaE.js +0 -1
  510. package/dist/webcomponents/p-DmwvaeZd.js +0 -1
  511. package/dist/webcomponents/p-DqD32M9M.js +0 -1
  512. package/dist/webcomponents/p-MVBgKFOv.js +0 -1
  513. package/dist/webcomponents/p-a1dafcb9.entry.js +0 -1
  514. package/dist/webcomponents/p-a7907856.entry.js +0 -1
  515. package/dist/webcomponents/p-aONkyLLS.js +0 -1
  516. package/dist/webcomponents/p-aab50c09.entry.js +0 -1
  517. package/dist/webcomponents/p-bd0404bf.entry.js +0 -1
  518. package/dist/webcomponents/p-bdfc61b0.entry.js +0 -1
  519. package/dist/webcomponents/p-bf242a98.entry.js +0 -1
  520. package/dist/webcomponents/p-bf3a552e.entry.js +0 -1
  521. package/dist/webcomponents/p-c1d48f19.entry.js +0 -1
  522. package/dist/webcomponents/p-c835c19b.entry.js +0 -1
  523. package/dist/webcomponents/p-caadf62a.entry.js +0 -1
  524. package/dist/webcomponents/p-ccc26acf.entry.js +0 -1
  525. package/dist/webcomponents/p-d375e82b.entry.js +0 -1
  526. package/dist/webcomponents/p-d84e5a0e.entry.js +0 -1
  527. package/dist/webcomponents/p-def9b542.entry.js +0 -1
  528. package/dist/webcomponents/p-edb8dae3.entry.js +0 -1
  529. package/dist/webcomponents/p-f57cb5d1.entry.js +0 -1
  530. package/dist/webcomponents/p-f5d407af.entry.js +0 -1
  531. package/dist/webcomponents/p-f7dac1c8.entry.js +0 -1
  532. package/dist/webcomponents/p-fTIONWal.js +0 -1
  533. package/dist/webcomponents/p-m_Ly-YPk.js +0 -1
@@ -0,0 +1 @@
1
+ import{C as r}from"./p-Cjcsf8ku.js";import{g as e,a as o}from"./p-D2muobcE.js";const n=({authToken:n,businessId:t,service:s})=>async({onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await s.fetchBusiness(t,n);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},t=({authToken:n,businessId:t,service:s})=>async({payload:a,onSuccess:i,onError:c,final:u=()=>{}})=>{var l;try{const u=await s.patchBusiness(n,t,a);if(u.error){return c({error:o(u.error),code:e(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR,rawError:u.error})}i(u)}catch(o){const n=e(null==o?void 0:o.code);return c({error:o.message||o,code:n,severity:r.ERROR,rawError:o})}finally{return u()}},s=({authToken:n,businessId:t,product:s,service:a})=>async({onSuccess:i,onError:c})=>{var u;try{const l=await a.postProvisioning(n,t,s);if(l.error){return c({error:o(l.error),code:e(null===(u=l.error)||void 0===u?void 0:u.code),severity:r.ERROR})}i(l)}catch(o){const n=e(null==o?void 0:o.code);return c({error:o.message||o,code:n,severity:r.ERROR})}},a=({authToken:n,identityId:t,service:s})=>async({onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await s.fetchIdentity(t,n);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},i=({authToken:n,identityId:t,service:s})=>async({payload:a,onSuccess:i,onError:c,final:u=()=>{}})=>{var l;try{const u=await s.patchIdentity(n,t,a);if(u.error){return c({error:o(u.error),code:e(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR})}i(u)}catch(o){const n=e(null==o?void 0:o.code);return c({error:o.message||o,code:n,severity:r.ERROR})}finally{return u()}},c=({authToken:n,service:t})=>async({payload:s,onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await t.postIdentity(n,s);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},u=({authToken:n,service:t})=>async({payload:s,onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await t.postBankAccount(n,s);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},l=({authToken:n,service:t})=>async({payload:s,onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await t.postDocumentRecord(n,s);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}};export{s as a,t as b,a as c,i as d,c as e,u as f,l as g,n as m}
@@ -1 +1 @@
1
- import{S as e}from"./p-GgW1g7FQ.js";const a={USA:{stateLabel:"State",postalLabel:"Zip Code",idNumberLabel:"SSN",idNumberLabelOptional:"SSN (optional)",identityHelpText:"Enter your full Social Security Number. It is required for Federal OFAC check.",taxIdLabel:"Tax ID (EIN or SSN)",taxIdHelpText:"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."},CAN:{stateLabel:"Province",postalLabel:"Postal Code",idNumberLabel:"SIN",idNumberLabelOptional:"SIN (optional)",identityHelpText:"Enter your full Social Insurance Number.",taxIdLabel:"Business Number (BN)",taxIdHelpText:"Business Numbers (BN) are nine digits. Enter value without spaces or dashes."}},l={USA:{stateOptions:e},CAN:{stateOptions:[{label:"Choose province",value:""},{label:"Alberta",value:"AB"},{label:"British Columbia",value:"BC"},{label:"Manitoba",value:"MB"},{label:"New Brunswick",value:"NB"},{label:"Newfoundland and Labrador",value:"NL"},{label:"Northwest Territories",value:"NT"},{label:"Nova Scotia",value:"NS"},{label:"Nunavut",value:"NU"},{label:"Ontario",value:"ON"},{label:"Prince Edward Island",value:"PE"},{label:"Quebec",value:"QC"},{label:"Saskatchewan",value:"SK"},{label:"Yukon",value:"YT"}]}},t={USA:{postalRegex:/^[0-9]{5}(-[0-9]{4})?$/,identityDigits:9,taxIdDigits:9},CAN:{postalRegex:/^[A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d$/,identityDigits:9,taxIdDigits:9}};export{t as a,l as b,a as c}
1
+ import{S as e}from"./p-BcNb9bVO.js";const a={USA:{stateLabel:"State",postalLabel:"Zip Code",idNumberLabel:"SSN",idNumberLabelOptional:"SSN (optional)",identityHelpText:"Enter your full Social Security Number. It is required for Federal OFAC check.",taxIdLabel:"Tax ID (EIN or SSN)",taxIdHelpText:"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."},CAN:{stateLabel:"Province",postalLabel:"Postal Code",idNumberLabel:"SIN",idNumberLabelOptional:"SIN (optional)",identityHelpText:"Enter your full Social Insurance Number.",taxIdLabel:"Business Number (BN)",taxIdHelpText:"Business Numbers (BN) are nine digits. Enter value without spaces or dashes."}},l={USA:{stateOptions:e},CAN:{stateOptions:[{label:"Choose province",value:""},{label:"Alberta",value:"AB"},{label:"British Columbia",value:"BC"},{label:"Manitoba",value:"MB"},{label:"New Brunswick",value:"NB"},{label:"Newfoundland and Labrador",value:"NL"},{label:"Northwest Territories",value:"NT"},{label:"Nova Scotia",value:"NS"},{label:"Nunavut",value:"NU"},{label:"Ontario",value:"ON"},{label:"Prince Edward Island",value:"PE"},{label:"Quebec",value:"QC"},{label:"Saskatchewan",value:"SK"},{label:"Yukon",value:"YT"}]}},t={USA:{postalRegex:/^[0-9]{5}(-[0-9]{4})?$/,identityDigits:9,taxIdDigits:9},CAN:{postalRegex:/^[A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d$/,identityDigits:9,taxIdDigits:9}};export{t as a,l as b,a as c}
@@ -1 +1 @@
1
- import{h as s,F as t,r as i,c as e}from"./p-CV0Pyo1O.js";import{E as l}from"./p-Cf0Rt_Os.js";import{S as r}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-BRieSe65.js";import"./p-fTIONWal.js";const n=()=>{const i=()=>s("div",{class:"mt-5"},s(o,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null)),s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=e(this,"error-event",7),this.renderState=a.LOADING}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return s(r,null,this.renderState===a.LOADING?s(n,null):this.renderState===a.ERROR?l(this.errorMessage):s("justifi-details",{errorMessage:this.errorMessage},s("div",{slot:"detail-sections"},s("core-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))))}};export{d as business_details_core}
1
+ import{h as s,F as t,r as i,c as e}from"./p-CV0Pyo1O.js";import{E as l}from"./p-DAZtHA62.js";import{S as r}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as o}from"./p-DqVU8ohH.js";import"./p-C4FLe2pT.js";const n=()=>{const i=()=>s("div",{class:"mt-5"},s(o,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null)),s("div",{class:"col-12 col-md-6"},s(o,null),s(o,null),s(o,null))));return s(t,null,s(i,null),s(i,null),s(i,null),s(i,null))};var a;!function(s){s.LOADING="loading",s.READY="ready",s.ERROR="error"}(a||(a={}));const d=class{constructor(s){i(this,s),this.errorEvent=e(this,"error-event",7),this.renderState=a.LOADING}async componentWillLoad(){this.getBusiness&&this.fetchData()}fetchData(){this.renderState=a.LOADING,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.renderState=a.READY},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s,this.renderState=a.ERROR,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}render(){return s(r,null,this.renderState===a.LOADING?s(n,null):this.renderState===a.ERROR?l(this.errorMessage):s("justifi-details",{errorMessage:this.errorMessage},s("div",{slot:"detail-sections"},s("core-info-details",{business:this.business}),s("legal-address-details",{legalAddress:this.business.legal_address}),s("representative-details",{representative:this.business.representative}),s("owner-details",{owners:this.business.owners}),s("additional-questions-details",{additionalQuestions:this.business.additional_questions}))))}};export{d as business_details_core}
@@ -1 +1 @@
1
- import{r as s,c as t,h as i}from"./p-CV0Pyo1O.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{C as o,B as h,c as n}from"./p-GgW1g7FQ.js";import{D as a}from"./p-fTIONWal.js";import{S as p}from"./p-BqNNwq6C.js";import{H as m}from"./p-C3dkSx6l.js";import"./p-CZfYo5-1.js";import{B as c}from"./p-XYgDHrVL.js";import{P as u}from"./p--afWnVJc.js";import"./p-BRieSe65.js";const l=class{constructor(i){s(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.currentStep=0,this.country=o.USA,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new h(t.data);this.businessProvisioned=n(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:r.PROVISIONING_REQUESTED,severity:e.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:c.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}async componentWillLoad(){this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return i(p,null,this.businessLoading?i(u,null):i("div",{class:"row gap-3"},i(m,{text:this.formTitle}),i("justifi-payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),i("div",{class:"d-flex justify-content-between align-items-center"},i("div",{class:"d-flex align-items-center",part:a},this.stepCounter),i("justifi-payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{l as justifi_payment_provisioning_core}
1
+ import{r as s,c as t,h as i}from"./p-CV0Pyo1O.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{C as o,B as h,c as n}from"./p-BcNb9bVO.js";import{H as a}from"./p-C4FLe2pT.js";import{S as p}from"./p-BqNNwq6C.js";import{H as m}from"./p-BoO2BHR_.js";import"./p-CZfYo5-1.js";import{B as c}from"./p-XYgDHrVL.js";import{P as u}from"./p-C3kbpEIZ.js";import"./p-DqVU8ohH.js";const l=class{constructor(i){s(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.currentStep=0,this.country=o.USA,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new h(t.data);this.businessProvisioned=n(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:r.PROVISIONING_REQUESTED,severity:e.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:c.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}async componentWillLoad(){this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return i(p,null,this.businessLoading?i(u,null):i("div",{class:"row gap-3"},i(m,{text:this.formTitle}),i("justifi-payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),i("div",{class:"d-flex justify-content-between align-items-center"},i("div",{class:"d-flex align-items-center",part:a},this.stepCounter),i("justifi-payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{l as justifi_payment_provisioning_core}
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t}from"./p-CV0Pyo1O.js";import{c as e,J as o}from"./p-CbTf_N6u.js";import{C as r,a as n}from"./p-Cjcsf8ku.js";import{m as p,a}from"./p-R0FDNhyd.js";import{B as h}from"./p-DqtDbB8E.js";import{A as m}from"./p-55QcjheA.js";import"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{i as u}from"./p-MeSAYDNh.js";import"./p-D4eE0MBI.js";import"./p-D2muobcE.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const c=m();class d{async postProvisioning(s,i,t){return c.post({endpoint:"entities/provisioning",body:{business_id:i,product_category:t},authToken:s})}}const j=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){e(),this.analytics=new o(this),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?u(this.authToken)?this.errorEvent.emit({message:"auth-token is expired",errorCode:n.NOT_AUTHENTICATED,severity:r.ERROR}):(this.getBusiness=p({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new d})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"8df2a722a6c7150950cbc0a2d923bb1a107170ee",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{j as justifi_payment_provisioning}
@@ -0,0 +1 @@
1
+ import{r as s,h as t}from"./p-CV0Pyo1O.js";import{S as e}from"./p-BqNNwq6C.js";import{S as o}from"./p-DqVU8ohH.js";import"./p-C4FLe2pT.js";const r=class{constructor(t){s(this,t)}render(){return t(e,{key:"b2bc4a92e34bdb2d1f5a1e74ce69bd75757ded6f"},t(o,{key:"291eefa0f623d8c751a8a62f7da018bbcd3c2313",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{r as justifi_skeleton}
@@ -0,0 +1 @@
1
+ import{h as e,r as a,c as t}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import{e as s,d as i,s as c}from"./p-MeSAYDNh.js";import"./p-Cjcsf8ku.js";import{g as d}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{a as f}from"./p-BH0Xfn-F.js";import{P as b,M as l}from"./p-HfLk4CG0.js";import{a as o,b as r,D as h,c as p,C as y,E as n}from"./p-DAZtHA62.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as u}from"./p-DqVU8ohH.js";import{a as v,B as k}from"./p-DO4RBao8.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-C4FLe2pT.js";const j=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(u,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(u,{width:"70%"})),e("div",{class:"col-12"},e(u,{width:"40%"})),e("div",{class:"col-12"},e(u,{width:"40%"})),e("div",{class:"col-12"},e(u,{width:"100%"})),e("div",{class:"col-12"},e(u,{width:"80%"}))),g=class{constructor(e){a(this,e),this.errorEvent=t(this,"error-event",7),this.loading=!0}componentWillLoad(){this.getPaymentDetails&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.loading=!0,this.getPaymentDetails({onSuccess:({payment:e})=>{this.payment=e,this.errorMessage=null},onError:({error:e,code:a,severity:t})=>{this.errorMessage=e,this.errorEvent.emit({errorCode:a,message:e,severity:t})},final:()=>{this.loading=!1}})}get PaymentStatus(){return this.payment.status===d.disputed&&this.payment.disputes.some((e=>e.status===f.lost))?b.DISPUTE_LOST:this.payment.status}render(){return e(m,{key:"26b8d1cf265226bcc4507dad0cc3504e953a9389"},this.loading&&e(j,{key:"d2410b583c52ca4fdab80657c82b512c4e936b87"}),!this.loading&&this.errorMessage&&n(this.errorMessage),!this.loading&&!this.errorMessage&&this.payment&&e("justifi-details",{key:"9625a7b341ebab0736a5b1affd2507eaeb01aaea",errorMessage:this.errorMessage},e(o,{key:"e1da5f9932cb5ec4a9e9cbcc07637f16779e620f",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},l(this.PaymentStatus),this.payment.expedited?e(v,{variant:k.WARNING,title:"Expedited",text:"Expedited"}):null),title:this.payment.formattedPaymentAmount(this.payment.amount)},e(r,{key:"5bf927cf2ab51c8057ff5f1d14d1fdb0112da302",classes:"border-1 border-end",title:"Updated At",value:`${s(this.payment.updated_at)} ${i(this.payment.updated_at)}`}),e(r,{key:"dae7b63a0018af7ad5ff0b01303629b27f9e8690",classes:"border-1 border-end",title:"Created At",value:`${s(this.payment.created_at)} ${i(this.payment.created_at)}`}),e(r,{key:"11c7090131fe05f995a34149e32167c50171ff4a",title:"ID",value:this.payment.id})),e("div",{key:"ad1dafc96ed6041cc418f433dc2a941ccc1ed15e",slot:"detail-sections"},e(h,{key:"4fc7d43271b7d4da55126380431fd304ec6b95ca",sectionTitle:"Details"}),e("div",{key:"e884cca29436ae3e05c07c402c01f680395aadf8",class:"d-flex flex-column gap-2 w-100"},e(p,{key:"d173c1ff5476adae63efd83c78cbd6da476893f3",title:"Amount",value:this.payment.formattedPaymentAmount(this.payment.amount)}),e(p,{key:"c5307a082162dd6fde2e201916cb2d027b3ce1ff",title:"Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(p,{key:"3a8819d979eb5e49da51b80ac4cc40f9f7f06263",title:"Refunded",value:this.payment.formattedPaymentAmount(this.payment.amount_refunded)}),e(p,{key:"3850b861daf0191dc2f8ebea04fe7aba4ab53bed",title:"Net",value:this.payment.formattedPaymentAmount(this.payment.balance)}),e(p,{key:"b48c9f01ec0fd622e4f01b6405cb4ca779113492",title:"Status",value:l(this.PaymentStatus)}),e(p,{key:"742432ff1e60ebc905ce10bfac6175855fa6ea69",title:"Payment ID",value:this.payment.id}),e(p,{key:"aa9ff4ff17362b9b615dfbade88b89687e7a8791",title:"Processing Fees",value:this.payment.formattedPaymentAmount(this.payment.fee_amount)}),e(p,{key:"1e37b41e112a2e04e646f599f6b9b99a5259b8c2",title:"Statement Descriptor",value:this.payment.statement_descriptor}),e(p,{key:"ec97d4f1f23083d7a780d0ccc71f4130a3553014",title:"Description",value:this.payment.description}),e(p,{key:"96b77660af6302edd62f73290811b517b39fb876",title:"Expedited",value:this.payment.expedited?"Yes":"No"})),this.payment.payment_method.card&&[e(h,{key:"29b79b7f832363f173a3e4befc31ac88ff574867",sectionTitle:"Payment Method"}),e("div",{key:"206648ce629f705ab3483572dd2f01f1dd3bc03f",class:"d-flex flex-column gap-2 w-100"},e(p,{key:"7c03a887918a0d9cb190c85c6dfedb89bee46b8b",title:"ID",value:this.payment.payment_method.card.id}),e(p,{key:"0cb8a2b0aed45ec1f9037bcb8c7df3fa7fe3a948",title:"Payment Type",value:"Card"}),e(p,{key:"6cf56554f1c2fe706191f3b101dbf2ecbbddf9db",title:"Last 4 Numbers",value:this.payment.payment_method.lastFourDigits}),e(p,{key:"a8dec356cac117498cebd61cb59ff2b4bcfc0c4c",title:"Brand",value:c(this.payment.payment_method.card.brand)}),e(p,{key:"4703d991abab5ade33b1e5dd55d19290fe05ab72",title:"Cardholder",value:this.payment.payment_method.payersName}))],this.payment.payment_method.bank_account&&[e(h,{key:"6300a3fa99c4a0f81f0f8ff780aeb14b606a368e",sectionTitle:"Payment Method"}),e("div",{key:"7b8fbfd356587b034791a0481f6cf54f31b99114",class:"d-flex flex-column gap-2 w-100"},e(p,{key:"badbdc33521816af3a38c193fd89995b720dd53a",title:"ID",value:this.payment.payment_method.bank_account.id}),e(p,{key:"cdeff3c4459c2d29a48b631fa6ca6c81ba55dd6f",title:"Last 4 Numbers",value:this.payment.last_four_digits}),e(p,{key:"2724fa6601bb5024b326853194764114115f0be2",title:"Bank Name",value:this.payment.payment_method.bank_account.brand}),e(p,{key:"236459bc401e59140bce119a0c5a12ea49d8835b",title:"Account Owner",value:this.payment.payment_method.payersName}))],this.payment.metadata&&[e(h,{key:"c80b4d1bd4dbc5f51848cfb1e886cd4c1c3f4026",sectionTitle:"Metadata"}),e("div",{key:"bf7066df65a34cbb510aa3fdef414b27b622ff59",class:"d-table gap-2 w-100"},e(y,{key:"3a127cdeac5403079a3c822aeb40d6812e3fa914",metadata:this.payment.metadata}))])))}static get watchers(){return{getPaymentDetails:["updateOnPropChange"]}}};export{g as payment_details_core}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import{c as s,a as i}from"./p-MeSAYDNh.js";import{f as r,p as d,c as l}from"./p-Dw63wyhO.js";import{A as c,B as o,C as f,D as p,E as n,F as m}from"./p-C4FLe2pT.js";import{S as b}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import"./p-Cjcsf8ku.js";import{d as h}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";const u=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{r[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(d[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:h.connected},{label:"Disconnected",value:h.disconnected},{label:"Unknown",value:h.unknown},{label:"Pending Configuration",value:h.pending_configuration},{label:"Archived",value:h.archived}]}render(){const e=Object.assign({},r);return a(b,{key:"0d4ac75610bd23b78f079d4f4eaf45345fa48cd4"},a("table-filters-menu",{key:"c580d67c2c1c95fdbfaa50ea355206d8772c8440",params:e,clearParams:l,part:c},a("div",{key:"9d2d456d0806c48f73c9a035ca0f8f618390c644",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"93e926024eaaa5bc511c8c51daa8bab9704d8c89",class:"p-2"},a("form-control-text",{key:"c19f3177124b48882245ce4d11ef7735bb9cfd28",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||r.terminal_id,disabled:!!this.terminalId,part:o})),a("div",{key:"78fc5aa6166a6e1a7f768584e73212dca1348461",class:"p-2"},a("form-control-text",{key:"d1ab7159dff99ca779fd4e3cd19e1c247cea2ec4",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||r.terminal_order_id,disabled:!!this.terminalOrderId,part:f})),a("div",{key:"379f81c0242ceffc472cb5d502cebb0606f2d8c3",class:"p-2"},a("form-control-select",{key:"f5e7ed2157eacef4ab8ae560c15680b66049a044",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||r.status||"",disabled:!!this.terminalStatus,part:p})),a("div",{key:"dc39eea94a616f40e896e9ce4c19e1d812419188",class:"p-2"},a("form-control-date",{key:"403667bf603268954cc3982ba66d47badbcce911",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:i(this.createdAfter||r.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:n})),a("div",{key:"8a5ac2f05771f42b971e721277476194e2e92f4e",class:"p-2"},a("form-control-date",{key:"ae4d9ef25a06a319bdddda5c7023a69b9610ad49",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:i(this.createdBefore||r.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:m})))))}};export{u as justifi_terminals_list_filters}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s,H as a,g as i}from"./p-CV0Pyo1O.js";import{F as r}from"./p--Kvji7o2.js";import{ar as o,X as h,Z as l,Y as c,_ as f,$ as n}from"./p-C4FLe2pT.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.errorText="",this.inputHandler=()=>{},this.disabled=!1}render(){return s(a,{key:"9ae20e0fa6175e68642be79ada4f3464631be680",exportparts:"label,input,input-invalid"},s("div",{key:"607cd1269298725d8f4300f1b56adb945c361067",class:"form-group d-flex flex-column"},s("div",{key:"5490713d71075bf5a273ec1e39d3a7db525d11ff",class:"d-flex align-items-start gap-2"},s("label",{key:"1fcac0b30532d33c296884133991d72dfdbddd37",part:"label",class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"e06af0a48fb6dacc82f3730fb7f39b180a3375a3",helpText:this.helpText})),s("input",{key:"7ec47dbbad4a53b3ac6f513e82c67c27ce54498c",type:"file",name:this.name,part:`input ${this.errorText?"input-invalid ":""}${this.disabled?"input-disabled":""}`,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onBlur:()=>this.formControlBlur.emit(),onChange:()=>this.errorText=""}),s(r,{key:"265cfe1af1dcebdca02b538872b4f2c4a6c57309",errorText:this.errorText,name:this.name})))}get el(){return i(this)}},b=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,this.helpText="",this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=t=>{const e=t.target,s=e.getAttribute("name");this.inputHandler(s,e.value),this.formControlInput.emit({name:s,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("textarea");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?o:this.errorText?h:this.isFocused?l:this.disabled?c:f}render(){return s(a,{key:"361916c679e9bead548bb19080d7365a83dfe444"},s("div",{key:"5c562f95399854ad9855281067d90b5378b10f36",class:"form-group d-flex flex-column"},s("label",{key:"93617701dac9c5e181bfc781336fa88341731b9b",part:n,class:"form-label",htmlFor:this.name},this.label),s("textarea",{key:"342904cb39293458fb7fc2c951539e39f7eaff8b",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",disabled:this.disabled}),s("form-control-help-text",{key:"fd9b7d6b6eab0a78d92efb06d0dcdb3c07ed69f0",helpText:this.helpText,name:this.name}),s("form-control-error-text",{key:"e5250f3229a5b1315b5a0bcf93512fcfc52ce5a1",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_file_v2,b as form_control_textarea}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as i,a}from"./p-Cjcsf8ku.js";import"./p-BiNakvsa.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{T as o,a as h,b as c,c as n,d,e as p,f as m,g as u,h as f,i as b,j as y,k as g,l as j}from"./p-5mt2ek0H.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-CJZ09QNH.js";import{o as v,g as S}from"./p-AMVhBsGv.js";import"./p-D8GTwl9v.js";import"./p-MeSAYDNh.js";import"./p-C4FLe2pT.js";import"./p-DyETkJs3.js";import"./p-DsT0m0mo.js";import"./p-DO4RBao8.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:l.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:l.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 i=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:l.row,data:i})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new o(this.payouts,this.columns,k,C(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),v("set",(()=>{this.pagingParams={}})),v("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=S();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(j,{key:"9d4901c03d1675ddd796f39e0cdcf26ca00429a1"},e(h,{key:"33b4fcacd131e6c0da270794ba0468b2fd56da06"},e(c,{key:"75c31aa3ba376963ede6772cad99d4b1300aafd7"},e(n,{key:"68c2afe4d5c0a0454d93a3524081d56dd40cebe4"},this.payoutsTable.columnData.map((t=>t)))),e(d,{key:"cb63360e078916afcf693edc8044f16b591c044a"},e(p,{key:"7d70f2f379238562c067d2167f689bc312f00775",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(m,{key:"5ad3d0c6bcda30cc3717c5665b7c97d07893a013",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(u,{key:"5fea02bcfc56b40b99cb16bd29d7657629273374",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e(f,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(b,{key:"93eeae7b266e3973f4ec11ad645fb870711c855d"},e(y,{key:"9a4e32b57717b2245b66e23ac909ffe97edf6f96"},e(g,{key:"6d4ce9cc708528176c8d574bddc291f2440fe262",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"0ae57a77ebfde889ddc540886b3b7c7d74a3d133",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{w as payouts_list_core}
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{C as r,a as n}from"./p-Cjcsf8ku.js";import{m as o,b as a,f as h,g as c}from"./p-R0FDNhyd.js";import{B as d,a as l,D as u}from"./p-DqtDbB8E.js";import{a as m,c as p,b}from"./p-BovgIz83.js";import{F as f,c as v,a as y,b as g,d as w}from"./p-CKiAlBsU.js";import{A as _,C as k,e as j,R as C,f as T}from"./p-BcNb9bVO.js";import{C as O,P as x}from"./p-CVaOFfrI.js";import{J as S,am as I,$ as E,Y as L,aG as A}from"./p-C4FLe2pT.js";import{P as D}from"./p-C3kbpEIZ.js";import{b as B,c as H}from"./p-Bt4GjEWL.js";import{a as P,B as V}from"./p-XYgDHrVL.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{E as F,p as q,q as W}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{A as Y,B as M,v as N,C as U,D as z,E as R,F as G}from"./p-HT_4DkD0.js";import{B as X}from"./p-DFiTyYE9.js";import"./p-CZfYo5-1.js";import{c as J}from"./p-_-2E_vYf.js";import{d as $,e as Q}from"./p-D8EGHc_m.js";import{A as Z}from"./p-55QcjheA.js";import"./p-D2muobcE.js";import"./p-BFTU3MAI.js";import"./p-DqVU8ohH.js";import"./p-D8GTwl9v.js";import"./p-MeSAYDNh.js";class K{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.account_number=s.account_number,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.institution_number=s.institution_number,this.transit_number=s.transit_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const ss=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.additional_questions=new _(s.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t})),this.additional_questions=new _(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(s){this.recurringPayments="Yes"===(null==s?void 0:s.business_recurring_payments)}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{additional_questions:new _(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f(m(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t,i,r,n;const o=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Additional Questions"),e("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business' estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=this.errors)||void 0===s?void 0:s.business_revenue,defaultValue:null==o?void 0:o.business_revenue,maskOptions:O.WHOLE})),e("div",{class:"col-12 col-md-6"},e("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(t=this.errors)||void 0===t?void 0:t.business_payment_volume,defaultValue:null==o?void 0:o.business_payment_volume,maskOptions:O.WHOLE})),e("div",{class:"col-12"},e("form-control-text",{name:"business_average_transaction_amount",label:"What is your average transaction size?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_average_transaction_amount,defaultValue:null==o?void 0:o.business_average_transaction_amount})),e("div",{class:"col-12"},e("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_when_service_received,options:B,defaultValue:null==o?void 0:o.business_when_service_received})),e("div",{class:"col-12"},e("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_other_payment_details,defaultValue:null==o?void 0:o.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},ts=(s,t)=>s.some((s=>s.document_type===t)),es=s=>s?{bank_name:z.nullable(),nickname:U.nullable(),account_owner_name:N.nullable(),account_type:M.nullable(),account_number:Y.nullable()}:{bank_name:z.required("Enter bank name"),nickname:U.required("Enter nickname"),account_owner_name:N.required("Enter account owner name"),account_type:M.required("Select account type"),account_number:Y.required("Enter account number")},is=(s,t)=>{if(t)return{voided_check:g().nullable(),bank_statement:g().nullable()};const e=ts(s,F.voidedCheck),i=ts(s,F.bankStatement),r=e||i,n="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:g().when("bank_statement",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()}),bank_statement:g().when("voided_check",{is:s=>!s&&!r,then:s=>s.required(n),otherwise:s=>s.notRequired()})}},rs={[k.USA]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},es(t)),(s=>s?{routing_number:G.nullable()}:{routing_number:G.required("Enter routing number")})(t)),is(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s),[k.CAN]:(s,t=[])=>((s,t)=>{const e=Object.assign(Object.assign(Object.assign({},es(t)),(s=>{const t=y().length(3,"Institution number must be 3 digits").matches(R,"Enter valid institution number"),e=y().length(5,"Transit number must be 5 digits").matches(R,"Enter valid transit number");return s?{institution_number:t.nullable(),transit_number:e.nullable()}:{institution_number:t.required("Enter institution number"),transit_number:e.required("Enter transit number")}})(t)),is(s,t));return v().shape(e,[["voided_check","bank_statement"]])})(t,s)},ns=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new q,this.isLoading=!1,this.isAddingNewBankAccount=!0,this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,rs[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new f(this.getSchema()),this.formController.setInitialValues(this.isAddingNewBankAccount?{business_id:this.businessId}:Object.assign({},this.bankAccount)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new W({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{if(s.data.bank_accounts.length>0){const t=s.data.bank_accounts;this.bankAccount=new K(t[t.length-1]),this.isAddingNewBankAccount=!1}else this.bankAccount=new K({}),this.bankAccount.business_id=this.businessId;this.existingDocuments=s.data.documents,this.bankAccountVerification=!0===s.data.settings.bank_account_verification,this.platformAccountId=s.data.platform_account_id},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.isAddingNewBankAccount=!0,this.documentData=new q,this.initializeFormController()},this.handleCancel=()=>{this.isAddingNewBankAccount=!1,this.documentData=new q,this.initializeFormController()},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async s=>{this.isLoading=!0;const t=s.record_data;return new Promise((e=>{this.postDocumentRecord({payload:t,onSuccess:t=>{e(this.handleDocRecordResponse(s,t))},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:r.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await s.getFileData(),e=await fetch(s.presigned_url,{method:"PUT",body:t});return this.handleUploadResponse(e)},this.handleUploadResponse=s=>!s.error||(this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}),!1)}propChanged(){this.initializeApi()}watchHandler(s){this.formLoading.emit(s)}async validateAndSubmit({onSuccess:s}){this.existingBankAccount&&!this.isAddingNewBankAccount?this.sendData(s):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new f(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.postBankAccount=h({authToken:this.authToken,service:new l}),this.postDocumentRecord=c({authToken:this.authToken,service:new u})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}get postPayload(){const s=this.formController.values.getValue();return new K(s).payload}get existingBankAccount(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}get showReadOnlyView(){return this.existingBankAccount&&!this.isAddingNewBankAccount}async sendData(s){try{if(this.isAddingNewBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;this.isAddingNewBankAccount&&(this.isAddingNewBankAccount=!1,await this.refreshBankAccountData()),s()}catch(s){this.errorEvent.emit({message:s,errorCode:n.POST_ERROR,severity:r.ERROR})}}async postBankAccountData(){let s;return this.isLoading=!0,new Promise((t=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:t=>{s=t,e=!0},onError:({error:s,code:t,severity:i})=>{e=!1,this.errorEvent.emit({message:s,errorCode:t,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:P.bankAccount}),this.isLoading=!1,t(e)}})}))}async refreshBankAccountData(){return new Promise((s=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{const{data:t}=s,{bank_accounts:e,documents:i,settings:r,platform_account_id:n}=t;e.length>0&&(this.bankAccount=new K(e[e.length-1])),this.existingDocuments=i,this.bankAccountVerification=!0===r.bank_account_verification,this.platformAccountId=n,this.initializeFormController()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.isLoading=!1,s()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const s=Object.values(this.documentData).flat();return!s.length||!(await Promise.all(s.map((s=>this.postDocumentRecordData(s))))).includes(!1)&&!(await Promise.all(s.map((s=>this.uploadDocument(s))))).includes(!1)}finally{this.isLoading=!1}}render(){const s=this.formController.getInitialValues(),t=this.bankAccountVerification&&this.platformAccountId;return this.isLoading?e(D,null):e("form",null,e("fieldset",{class:"mb-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Bank Account Info"),e("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),e("hr",{class:"mt-2"}),t&&e("div",{class:"mt-3"},e("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.isAddingNewBankAccount=!1,this.refreshBankAccountData()}})),e(this.country===k.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:s,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.showReadOnlyView}),this.showReadOnlyView&&e("div",{class:"mt-3"},e(X,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:I},"Change Bank Account")),(!this.existingBankAccount||this.isAddingNewBankAccount)&&e("div",{class:"mt-3 d-flex gap-2"},this.isAddingNewBankAccount&&e(X,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:I},"Cancel"),e(X,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account"))),e("fieldset",{class:"mt-4"},e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Document Uploads"),e("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),e("hr",{class:"mt-2"}),e("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),e("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},os=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.coreInfo={},this.isLoading=!1,this.isEditingTaxId=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.coreInfo=new j(s.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s(),this.isEditingTaxId=!1},onError:({error:s,code:e,severity:i,rawError:r})=>{t=s,r&&"object"==typeof r&&r.param&&this.formController.setFieldError(r.param,r.message),this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.errors[s]&&this.formController.clearFieldError(s),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return new j(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const s=this.country===k.CAN?p(this.allowOptionalFields):b(this.allowOptionalFields);this.formController=new f(s),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s,t;const i=this.formController.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Business Information")),e("hr",{class:"mt-2"}),e("div",{class:"row gy-3"},e("div",{class:"col-12"},e("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:i.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),e("div",{class:"col-12"},e("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:i.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),e("div",{class:"col-12 col-md-8"},e("form-control-select",{name:"classification",label:"Business Classification",options:H,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-4"},e("form-control-date",{name:"date_of_incorporation",label:"Date of Registration",defaultValue:i.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),e("div",{class:"col-12 col-md-6"},!(null===(s=this.coreInfo)||void 0===s?void 0:s.tax_id_last4)||this.isEditingTaxId?e("form-control-number-masked",{name:"tax_id",label:J[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:J[this.country].taxIdHelpText}):e("div",null,e("label",{class:"form-label",part:E},J[this.country].taxIdLabel),e("div",{class:"input-group mb-3"},e("input",{type:"text",class:"form-control",part:L,value:`****${null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4}`,disabled:!0}),e("button",{class:"btn btn-secondary",type:"button",part:I,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),e("div",{class:"col-12"},e("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:i.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),e("div",{class:"col-12 col-md-6"},e("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),e("div",{class:"col-12 col-md-6"},e("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:x.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},as=class{constructor(e){s(this,e),this.clickEvent=t(this,"click-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(s,t)=>{if(null===s)return;const e=this.ownersPayload.findIndex((s=>s.id===t));-1!==e&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[e]=s)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new C(s.data.representative||{}),s.data.owners.length?this.ownersPayload=s.data.owners.map((s=>({id:s.id}))):this.addOwnerForm()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=s=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],s&&this.clickEvent.emit({name:V.addOwnerForm})},this.removeOwnerForm=s=>{this.ownersPayload=this.ownersPayload.filter((t=>t.id!==s)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=s=>{this.representativeIsOwner=s,this.representativeIsOwner&&(this.ownersPayload=this.ownersPayload.filter((s=>""!==s.id)),this.patchBusiness({payload:{owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((s=>s.id))}async validateAndSubmit({onSuccess:s}){const t=this.refs.map((s=>s.validate()));if(!(await Promise.all(t)).every((s=>s)))return;const e=this.refs.map((s=>s.submit()));(await Promise.all(e)).every((s=>s))&&this.sendData(s)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(s){const t=s.detail,e=this.ownersPayload.map((s=>s.id===t.id?t:s));e.includes(t)||(e[this.ownersPayload.findIndex((s=>!s.id))]=t,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){if(this.isLoading)return e(i,null,e(D,null));const s=this.ownersPayload.some((s=>s.id===this.representative.id)),t=null===this.representativeIsOwner&&!s;return e(i,null,e("div",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Owners"),e("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),e("hr",{class:"mt-2"}),t&&e("div",{class:"alert alert-warning mb-3",part:A},e("div",{class:"card-body"},e("div",{class:"d-flex align-items-center mb-3"},e("strong",null,"Is the representative of this business also an owner?")),e("div",{class:"d-flex gap-2"},e(X,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),e(X,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),e("div",{class:"row gy-3"},this.ownersPayload.map((s=>e("justifi-owner-form",{key:s.id,authToken:this.authToken,businessId:this.businessId,ownerId:s.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),e("div",{class:"d-flex justify-content-start"},e("div",{class:"gap-2"},e(X,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},hs=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&this.formController&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new C(s.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}initializeForm(){const s=$[this.country];s?(this.formController=new f(s("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:n.MISSING_PROPS,severity:r.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get patchPayload(){return{representative:new C(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?e(D,null):e("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},cs=class{constructor(e){s(this,e),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.errorEvent=t(this,"error-event",7),this.formLoading=t(this,"formLoading",7),this.formCompleted=t(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:n.FETCH_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.termsPayload,e=await this.api.post({endpoint:this.termsConditionsEndpoint,body:t,authToken:this.authToken});this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.message,severity:r.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.acceptedTerms=t,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=Z(),this.formController=new f((s=>{const t=v({accepted:w().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=v({accepted:w().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:n.POST_ERROR,message:s.error.message,severity:r.ERROR,data:s.error}):t(),this.stepCompleteEvent.emit({response:s,formStep:P.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:P.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get merchantAgreementLink(){return e("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return e("form",{key:"33336d0a66d63ce39951822fd570a9a0689e714d"},e("fieldset",{key:"fcfdb59eef671cb408ed99e2dad20d6be706688a"},e("legend",{key:"f0cf7f0ac15c90cf36ee25d4bf986c0e781a2e92",part:S},"Terms and Conditions"),e("hr",{key:"d5c820e7d6523f931040a994bd103d69fd644c45"}),e("div",{key:"681b584de14afe121f5dc69ee0bad1cab51ba0d1"},e("p",{key:"7c597bf891a108d303739126b806ded5220f56ab"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),e("br",{key:"52854c5a07611180be40df21a5f60d7d9d4c4cb7"}),e("div",{key:"7448b3f6138b996edac137b961367725e3b40556",class:"row-gy-3"},e("div",{key:"c732deb4e1e3a2d04dd4e09914543a7f594af108",class:"col-12"},e("form-control-checkbox",{key:"fca18e4843aef20d13790029b114b2ecaeb6ffa2",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},ds=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.formLoading=t(this,"formLoading",7),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.getBusiness&&(this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{const t=new T((s.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},t),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:P.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{legal_address:new T(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new f((0,Q[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new d}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new d})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:r.ERROR})}render(){var s;const t=null===(s=this.formController)||void 0===s?void 0:s.getInitialValues();return this.isLoading?e(D,null):e("form",null,e("fieldset",null,e("div",{class:"d-flex align-items-center gap-2"},e("legend",{class:"mb-0",part:S},"Legal Address of your Business"),e("form-control-tooltip",{helpText:"No PO Boxes."})),e("hr",{class:"mt-2"}),e("justifi-form-address-fields",{country:this.country,errors:this.errors,defaultValues:t,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},ls=class{constructor(t){s(this,t)}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"53ba6c809e1968712b333f4bcf2798dbca186ddb",class:"d-flex gap-2"},e(X,{key:"b45c60083ccf6589cae0c63ce6b66c18da340dc7",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(X,{key:"27372798da0276de44d1563a4688486e7cc91d64",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,V.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(X,{key:"8bc14ca8fe951caf276f8ed03e502486e11acbe2",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,V.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},us=class{constructor(t){s(this,t),this.allowOptionalFields=!1,this.country=k.USA,this.componentStepMapping={0:()=>e("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),1:()=>e("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),2:()=>e("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),4:()=>e("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),5:()=>e("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,allowOptionalFields:this.allowOptionalFields,country:this.country}),6:()=>e("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields})}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"ff7c9e688009383fdbe18c9824fa578d2338900c",class:"col-12 mb-4"},this.currentStepComponent)}};export{ss as justifi_additional_questions_form_step,ns as justifi_business_bank_account_form_step,os as justifi_business_core_info_form_step,as as justifi_business_owners_form_step,hs as justifi_business_representative_form_step,cs as justifi_business_terms_conditions_form_step,ds as justifi_legal_address_form_step,ls as justifi_payment_provisioning_form_buttons,us as justifi_payment_provisioning_form_steps}
@@ -1 +1 @@
1
- import{r as t,c as e,h as o,H as i}from"./p-CV0Pyo1O.js";import{C as s}from"./p-ZpPDShvP.js";import{r as a}from"./p-fTIONWal.js";import"./p-HXpYMWUU.js";const r=class{constructor(o){t(this,o),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(t){var e;return t.isValid?{token:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id}:{validationError:!0}}render(){var t,e,r;return o(i,{key:"c69143079680d44157ee7df3b344de8a841ac51d",class:"payment-method"},o("div",{key:"16bb3b07ed7fa23efde64b92302b5f7f51958fc4",class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick},o("form-control-radio",{key:"aa4b30d36088b1c1c71710e05c3746c03254629b",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:`${s[null===(e=this.paymentMethodOption)||void 0===e?void 0:e.brand]||""} *${null===(r=this.paymentMethodOption)||void 0===r?void 0:r.acct_last_four}`})))}};export{r as justifi_saved_payment_method}
1
+ import{r as t,c as e,h as o,H as i}from"./p-CV0Pyo1O.js";import{C as s}from"./p-ZpPDShvP.js";import{u as a}from"./p-C4FLe2pT.js";import"./p-HXpYMWUU.js";const d=class{constructor(o){t(this,o),this.paymentMethodOptionSelected=e(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)}}async resolvePaymentMethod(t){var e;return t.isValid?{token:null===(e=this.paymentMethodOption)||void 0===e?void 0:e.id}:{validationError:!0}}render(){var t,e,d;return o(i,{key:"c69143079680d44157ee7df3b344de8a841ac51d",class:"payment-method"},o("div",{key:"16bb3b07ed7fa23efde64b92302b5f7f51958fc4",class:"radio-list-item p-3",part:a,onClick:this.onPaymentMethodOptionClick},o("form-control-radio",{key:"aa4b30d36088b1c1c71710e05c3746c03254629b",name:"paymentMethodType",value:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,checked:this.isSelected,label:`${s[null===(e=this.paymentMethodOption)||void 0===e?void 0:e.brand]||""} *${null===(d=this.paymentMethodOption)||void 0===d?void 0:d.acct_last_four}`})))}};export{d as justifi_saved_payment_method}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as a,H as e}from"./p-CV0Pyo1O.js";import{X as i,Y as o,Z as r,_ as c,$ as h,a0 as f}from"./p-C4FLe2pT.js";import{F as n}from"./p-BtFe5yQU.js";import{F as l}from"./p--Kvji7o2.js";import"./p-CZfYo5-1.js";import{f as p}from"./p-MeSAYDNh.js";import"./p-HXpYMWUU.js";const m=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>p(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,a=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(a),this.inputHandler(s,a),this.formControlInput.emit({name:s,value:a})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:c}render(){return a(e,{key:"9fcce717caf2a14382e8a66c07a023ec31bffce0"},a("div",{key:"a5ef7195ec5904764f69c2987b1d1878a2d5be8d",class:"form-group d-flex flex-column"},a("label",{key:"75cf2a0d4790426df3956a69ea2483aba3e232ec",part:h,class:"form-label",htmlFor:this.name},this.label),a(n,{key:"daabe1b4779cea9af67b5bafcc8244d32bcc4775",name:this.name,helpText:this.helpText}),a("div",{key:"fbe335cf9e131842e9218befcf51535d1012f4f1",class:"input-group"},a("span",{key:"389b0a9697af6e81b350c41956bc36033dc151a2",class:"input-group-text",part:f},"$"),a("input",{key:"28a854f05c8a2476002b22baf5c5958fac9a4ec2",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),a(l,{key:"cfbdf17dcc9d55951ec39951f236cb0a5242e8cc",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_monetary}
@@ -1 +1 @@
1
- import{r as t,h as i}from"./p-CV0Pyo1O.js";const e=class{constructor(i){t(this,i),this.submitButtonText="Submit"}async tokenizePaymentMethod(t){return this.tokenizePaymentMethodRef.tokenizePaymentMethod(t)}async fillBillingForm(t){return this.tokenizePaymentMethodRef.fillBillingForm(t)}async validate(){return this.tokenizePaymentMethodRef.validate()}render(){return i("internal-tokenize-payment-method",{key:"a9b26cf7539286290d7216601c8d76335ada785b",ref:t=>this.tokenizePaymentMethodRef=t,authToken:this.authToken,accountId:this.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:this.hideSubmitButton,paymentMethodGroupId:this.paymentMethodGroupId})}};export{e as justifi_tokenize_payment_method}
1
+ import{r as t,h as e}from"./p-CV0Pyo1O.js";const i=class{constructor(e){t(this,e),this.submitButtonText="Submit"}async tokenizePaymentMethod(t){return this.tokenizePaymentMethodRef.tokenizePaymentMethod(t)}async fillBillingForm(t){return this.tokenizePaymentMethodRef.fillBillingForm(t)}async validate(){return this.tokenizePaymentMethodRef.validate()}render(){return e("internal-tokenize-payment-method",{key:"eeef0082ce936beae8d4ca51bb23bd7c965191ee",ref:t=>this.tokenizePaymentMethodRef=t,authToken:this.authToken,accountId:this.accountId,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,hideSubmitButton:this.hideSubmitButton,paymentMethodGroupId:this.paymentMethodGroupId})}};export{i as justifi_tokenize_payment_method}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as i,H as s,g as n}from"./p-CV0Pyo1O.js";import{A as o}from"./p-55QcjheA.js";import{A as a,r,s as l,t as h,u as c,v as d,w as p,I as u,m as y,n as m,o as v}from"./p-BiNakvsa.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as b}from"./p-DqVU8ohH.js";import{c as g,o as k,g as P,a as w,b as C}from"./p-Daew0gTO.js";import{H as E,u as A}from"./p-C4FLe2pT.js";import{f as S}from"./p-MeSAYDNh.js";import{w as _,c as j}from"./p-DVJaoI_m.js";import{H as I}from"./p-BoO2BHR_.js";import{H as R,b as T,h as L,i as N}from"./p-CI11WF1E.js";import{H as M}from"./p-EaBIgUj8.js";import{J as O,c as x}from"./p-CbTf_N6u.js";import"./p-HXpYMWUU.js";import{C as D,a as z,b as B}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as H,a as U}from"./p-D2muobcE.js";import{C as F}from"./p-BHA4oSi3.js";import{P as q,p as V}from"./p-Jz9qdPhR.js";import{P as G,a as Y,b as W}from"./p-DkoufM1t.js";import{C as J}from"./p-ZpPDShvP.js";import"./p-D8GTwl9v.js";import"./p-D4eE0MBI.js";var Z;!function(t){t.UNAVAILABLE="UNAVAILABLE",t.SESSION_ERROR="SESSION_ERROR",t.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",t.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",t.USER_CANCELLED="USER_CANCELLED"}(Z||(Z={}));class ${constructor(){this.api=o()}initialize(t){if(this.applePayConfig=new a(t),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(t,e){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:t,headers:{"Sub-Account":e},body:{domain:window.location.host,display_name:this.applePayConfig.displayName}})}catch(t){throw console.error("Backend validation failed:",t),new Error("Merchant validation failed")}}async processPayment(t,e,i){const s=await this.api.post({endpoint:"apple_pay/process_token",authToken:t,body:i,headers:{"Sub-Account":e}});return{success:s.id&&!!s.data.token,data:s}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(t,e,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const s=new l(t);if(!s.isValid){const t=[];throw s.countryCode||t.push("countryCode"),s.currencyCode||t.push("currencyCode"),s.merchantCapabilities&&0!==s.merchantCapabilities.length||t.push("merchantCapabilities"),s.supportedNetworks&&0!==s.supportedNetworks.length||t.push("supportedNetworks"),s.total&&s.total.label&&s.total.amount||t.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",t),new Error("Invalid payment request provided")}return this.currentPaymentRequest=s,new Promise(((t,n)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),n({success:!1,error:{code:Z.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,s),this.setupSessionEventHandlers(t,n,e,i),this.currentSession.begin()}catch(t){console.error("[ApplePayService] Exception while starting session:",t),n({success:!1,error:{code:Z.SESSION_ERROR,message:t instanceof Error?t.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(t,e,i,s){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const t=await this.validateMerchant(i,s);try{this.currentSession.completeMerchantValidation(t)}catch(t){throw console.error("Error calling completeMerchantValidation:",t),t}}catch(t){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.abort(),e({success:!1,error:{code:Z.MERCHANT_VALIDATION_ERROR,message:t instanceof Error?t.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async n=>{try{const o=n.payment,a=Object.assign(Object.assign({},o.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,s,a);l.success?(this.currentSession.completePayment({status:h.STATUS_SUCCESS}),t({success:!0,token:o.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(t){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",t),t&&t.stack&&console.error("Error stack:",t.stack),this.currentSession.completePayment({status:h.STATUS_FAILURE}),e({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:t instanceof Error?t.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const t={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(t)}catch(t){console.error("Error completing payment method selection:",t),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:h.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=t=>{if(t.sessionError)switch(console.error(t.sessionError),t.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",t.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=t=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",t),this.currentSession=void 0,this.currentPaymentRequest=void 0,e({success:!1,error:{code:Z.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(t,e,i="US",s="USD"){return{countryCode:i,currencyCode:s,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(e,t)}}getApplePayConfig(){return this.applePayConfig}}const Q=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(b,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},X=e=>t("div",{class:"apple-pay-button-container"},t("button",Object.assign({class:(()=>{let t="apple-pay-button";switch(e.buttonStyle){case c.WHITE:t+=" apple-pay-button-white";break;case c.WHITE_OUTLINE:t+=" apple-pay-button-white-outline";break;default:t+=" apple-pay-button-black"}switch(e.buttonType){case d.BUY:t+=" apple-pay-button-type-buy";break;case d.DONATE:t+=" apple-pay-button-type-donate";break;default:t+=" apple-pay-button-type-plain"}return(e.disabled||e.isProcessing||!e.isAvailable)&&(t+=" disabled"),t})(),style:{width:e.width,height:e.height},onClick:()=>{!e.disabled&&!e.isProcessing&&e.isAvailable&&e.clickHandler&&e.clickHandler()},disabled:e.disabled||e.isProcessing||!e.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},e),e.isProcessing&&t("div",{class:"processing-overlay"},t("div",{class:"spinner"}),t("span",null,"Processing..."))),t("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),K=class{constructor(t){e(this,t),this.applePayStarted=i(this,"applePayStarted",7),this.applePayCompleted=i(this,"applePayCompleted",7),this.applePayCancelled=i(this,"applePayCancelled",7),this.applePayError=i(this,"applePayError",7),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=c.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var t,e;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:g.paymentCurrency,merchantCapabilities:[p.SUPPORTS_3DS,p.SUPPORTS_CREDIT,p.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(g.paymentDescription,g.paymentAmount)},s=await this.applePayService.startPaymentSession(i,g.authToken,g.accountId);s.success?this.applePayCompleted.emit({success:!0,token:s.token,paymentMethodId:s.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:s.error}),this.applePayError.emit({error:(null===(t=s.error)||void 0===t?void 0:t.message)||"Payment failed",code:(null===(e=s.error)||void 0===e?void 0:e.code)||K.ErrorCode.PAYMENT_FAILED}))}catch(t){const e=t instanceof Error?t.message:"Payment failed";this.error=e,this.applePayError.emit({error:e,code:K.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:e})}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(g.paymentAmount)&&Boolean(g.paymentCurrency)&&Boolean(g.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:g.paymentAmount,paymentCurrency:g.paymentCurrency,hasAuthToken:Boolean(g.authToken),accountId:g.accountId}),this.applePayError.emit({error:this.error,code:K.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:K.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const t={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new $,this.applePayService.initialize(t),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(t){console.error("Apple Pay initialization error:",t),this.error=t instanceof Error?t.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:K.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!g.applePayEnabled)return null;const e=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return t(f,null,g.checkoutLoaded&&t("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),t("div",{class:"apple-pay-container"},t(Q,{isLoading:this.isLoading}),e&&t(X,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),t("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};K.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const tt=class{constructor(t){e(this,t)}render(){return t(f,{key:"13d4dd7fbc2335e2af7c24066800e0642df0cd77"},t("section",{key:"456cc598f5cf08e55b0c24ff23945b327df5fb66"},t("div",{key:"37143e2b5157cfb973189335e357f39e78fbb7a1"},t("div",{key:"f4d34254b589f631e5cf7f49cab4d37933a7b1a0",part:E},null==g?void 0:g.paymentDescription),t("div",{key:"7d4f4bad72a2c637eafd95ab7dc73f5881ed4906"},t("span",{key:"37b639cd520e87d73246f5d68a294fa2919376cd",part:E},"Total")," ",t("span",{key:"0ace5f0a3f53dd016d3d3167879364be20f407e4",part:E},S(+(null==g?void 0:g.totalAmount)))))))}},et=e=>{const{isLoading:i}=e;return i?t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-center"},t(b,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null};var it;!function(t){t.initialize="justifi.googlePay.initialize",t.ready="justifi.googlePay.ready",t.sdkLoaded="justifi.googlePay.sdkLoaded",t.initializeResult="justifi.googlePay.initializeResult",t.error="justifi.googlePay.error",t.buttonClicked="justifi.googlePay.buttonClicked",t.startPayment="justifi.googlePay.startPayment",t.paymentSuccess="justifi.googlePay.paymentSuccess",t.paymentCanceled="justifi.googlePay.paymentCanceled",t.paymentError="justifi.googlePay.paymentError"}(it||(it={}));const st=class{constructor(t){e(this,t),this.googlePayCompleted=i(this,"googlePayCompleted",7),this.googlePayCancelled=i(this,"googlePayCancelled",7),this.environment="TEST",this.iframeReady=!1,this.sdkLoaded=!1,this.isReadyToPay=!1,this.handleMessage=t=>{if(t.origin!==this.iframeOrigin)return;const{eventType:e,data:i}=t.data||{};switch(e){case it.ready:this.iframeReady=!0;break;case it.sdkLoaded:this.sdkLoaded=!0,this.sendInitialize();break;case it.initializeResult:this.isReadyToPay=i.isReadyToPay,i.error&&console.error("Init error:",i.error);break;case it.error:console.error("Google Pay error:",i);break;case it.buttonClicked:this.sendStartPayment();break;case it.paymentSuccess:this.googlePayCompleted.emit({success:!0,paymentMethodId:i.paymentMethodId,cardNetwork:i.cardNetwork,cardDetails:i.cardDetails});break;case it.paymentCanceled:this.googlePayCancelled.emit();break;case it.paymentError:this.googlePayCompleted.emit({success:!1,error:{code:i.code,message:i.message}})}}}async componentWillLoad(){await _(),this.iframeOrigin=j.iframeOrigin}componentDidLoad(){window.addEventListener("message",this.handleMessage)}disconnectedCallback(){window.removeEventListener("message",this.handleMessage)}sendInitialize(){var t;(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow)&&this.iframeElement.contentWindow.postMessage({eventType:it.initialize,data:{environment:this.environment,gatewayMerchantId:g.accountId,merchantName:this.merchantName,authToken:g.authToken,accountId:g.accountId}},this.iframeOrigin)}sendStartPayment(){var t;if(!(null===(t=this.iframeElement)||void 0===t?void 0:t.contentWindow))return;const e={totalPrice:String(g.paymentAmount/100),totalPriceStatus:"FINAL",currencyCode:g.paymentCurrency||"USD"};this.iframeElement.contentWindow.postMessage({eventType:it.startPayment,data:e},this.iframeOrigin)}render(){return g.googlePayEnabled?t(s,null,t(et,{isLoading:!this.isReadyToPay}),t("iframe",{ref:t=>this.iframeElement=t,src:`${this.iframeOrigin}/v2/googlePay`,style:{border:"none",width:"100%",height:"48px",display:this.isReadyToPay?"block":"none"}})):(console.warn("Google Pay is not enabled for this checkout"),null)}},nt=class{constructor(t){e(this,t),this.levels={h1:I,h2:R,h3:M},this.level="h1"}render(){return t(f,{key:"1fc31aaf9d222d4f53e4ca546fd323389f4154c3"},t(this.levels[this.level],{key:"6bc979a358b5a93159d378db2452b57133ed3aaa",text:this.text,class:this.class}))}},ot=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.checkoutChangedEvent=i(this,"checkout-changed",7),this.plaidService=new q,this.handleGooglePayCompleted=t=>{const{success:e,paymentMethodId:i,error:s}=t.detail||{};e&&i?(g.paymentToken=i,g.selectedPaymentMethod={type:G.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:s&&s.message||"Google Pay payment failed",errorCode:z.TOKENIZE_ERROR,severity:D.ERROR})},this.handleGooglePayCancelled=()=>{g.paymentToken=void 0,g.selectedPaymentMethod=void 0},this.handleApplePayCompleted=t=>{const{success:e,token:i,paymentMethodId:s,error:n}=t.detail;e&&i?(g.paymentToken=s,g.selectedPaymentMethod={type:G.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",n),this.errorEvent.emit({message:(null==n?void 0:n.message)||"Apple Pay payment failed",errorCode:z.TOKENIZE_ERROR,severity:D.ERROR}))},this.handleApplePayError=t=>{const{error:e,code:i}=t.detail;console.error("Apple Pay error:",e),this.errorEvent.emit({message:e||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:D.ERROR})},this.handleApplePayCancelled=()=>{g.paymentToken=void 0,g.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),g.checkoutId=this.checkoutId;const t={authToken:this.authToken,checkoutId:this.checkoutId,service:new F};this.getCheckout=(({authToken:t,checkoutId:e,service:i})=>async({onSuccess:s,onError:n})=>{var o;try{const a=await i.fetchCheckout(t,e);if(a.error)return n({error:U(a.error),code:H(null===(o=a.error)||void 0===o?void 0:o.code),severity:D.ERROR});s({checkout:a.data})}catch(t){const e=H(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:D.ERROR})}})(t),this.completeCheckout=(({authToken:t,checkoutId:e,service:i})=>async({payment:s,onSuccess:n,onError:o})=>{var a;try{const r=await i.complete(t,e,s);if(r.error)return o({error:U(r.error),code:H(null===(a=r.error)||void 0===a?void 0:a.code),severity:D.ERROR});n({checkout:r.data})}catch(t){const e=H(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:D.ERROR})}})(t),k((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new O(this),x(),g.authToken=this.authToken,this.fetchCheckout(),T("set",(t=>{const e=N[t];void 0!==e&&L(t,e)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:t})=>{this.updateStore(t),t.status!==u.completed?t.status!==u.expired||this.errorEvent.emit({message:B.CHECKOUT_EXPIRED,errorCode:z.CHECKOUT_EXPIRED,severity:D.ERROR}):this.errorEvent.emit({message:B.CHECKOUT_ALREADY_COMPLETED,errorCode:z.CHECKOUT_ALREADY_COMPLETED,severity:D.ERROR})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:t.code,severity:t.severity})}}):this.errorEvent.emit({message:B.NOT_AUTHENTICATED,errorCode:z.NOT_AUTHENTICATED,severity:D.ERROR})}updateStore(t){var e,i,s,n,o,a,r;g.accountId=t.account_id,g.checkoutLoaded=!0,g.paymentMethods=t.payment_methods.map((t=>new Y(t))),g.paymentMethodGroupId=t.payment_method_group_id,g.paymentDescription=t.payment_description,g.totalAmount=t.total_amount,g.paymentAmount=t.payment_amount,g.bnplEnabled=t.payment_settings.bnpl_payments,g.insuranceEnabled=t.payment_settings.insurance_payments,g.bankAccountVerification=null===(e=t.payment_settings)||void 0===e?void 0:e.bank_account_verification,g.applePayEnabled=null===(i=t.payment_settings)||void 0===i?void 0:i.apple_payments,g.googlePayEnabled=null===(s=t.payment_settings)||void 0===s?void 0:s.google_payments,g.bnplProviderClientId=null===(n=null==t?void 0:t.bnpl)||void 0===n?void 0:n.provider_client_id,g.bnplProviderMode=null===(o=null==t?void 0:t.bnpl)||void 0===o?void 0:o.provider_mode,g.bnplProviderApiVersion=null===(a=null==t?void 0:t.bnpl)||void 0===a?void 0:a.provider_api_version,g.bnplProviderCheckoutUrl=null===(r=null==t?void 0:t.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const t={availablePaymentMethodTypes:P(),selectedPaymentMethod:g.selectedPaymentMethod,savedPaymentMethods:g.paymentMethods};this.checkoutChangedEvent.emit(t)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(t){var e,i,s;const n=null!==(i=await(null===(e=this.billingFormRef)||void 0===e?void 0:e.getValues()))&&void 0!==i?i:{},o=Object.assign(Object.assign({},t),n),a=Object.assign({accountId:g.accountId,payment_method_group_id:void 0},o);g.savePaymentMethod&&(a.payment_method_group_id=g.paymentMethodGroupId);const r=await(null===(s=this.paymentMethodFormRef)||void 0===s?void 0:s.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:g.accountId}));return r.error?r:(g.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(t){g.selectedPaymentMethod=t,g.paymentToken=t.id||void 0}async validate(){var t,e;const i=[];g.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const s=(null===(t=g.selectedPaymentMethod)||void 0===t?void 0:t.type)===G.NEW_CARD,n=(null===(e=g.selectedPaymentMethod)||void 0===e?void 0:e.type)===G.NEW_BANK_ACCOUNT;if((s||n)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((t=>"boolean"==typeof t?t:!1!==(null==t?void 0:t.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:z.VALIDATION_ERROR,severity:D.ERROR}),!1)}catch(t){return!1}}async submitCheckout(t){var e,i,s,n,o;const a=await this.validate();if(!g.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:z.VALIDATION_ERROR,severity:D.ERROR});const r=(null===(e=g.selectedPaymentMethod)||void 0===e?void 0:e.type)===G.NEW_CARD,l=(null===(i=g.selectedPaymentMethod)||void 0===i?void 0:i.type)===G.NEW_BANK_ACCOUNT,h=(null===(s=g.selectedPaymentMethod)||void 0===s?void 0:s.type)===G.PLAID;if(r||l){const e=await this.tokenizePaymentMethod(t);if(null==e?void 0:e.error)return void this.errorEvent.emit({message:e.error.message,errorCode:z.TOKENIZE_ERROR,severity:D.ERROR})}if(h&&!g.paymentToken){const t=g.plaidPublicToken,e=g.plaidLinkTokenId;if(!t)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:z.TOKENIZE_ERROR,severity:D.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(g.authToken,g.accountId,t,e||void 0,g.savePaymentMethod?g.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:z.TOKENIZE_ERROR,severity:D.ERROR});const s=null==i?void 0:i.data,o=(null===(n=null==s?void 0:s.bank_account)||void 0===n?void 0:n.token)||(null==s?void 0:s.token)||(null==s?void 0:s.id);g.paymentToken=o}catch(t){return void this.errorEvent.emit({message:(null==t?void 0:t.message)||"Plaid exchange error",errorCode:z.TOKENIZE_ERROR,severity:D.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:z.VALIDATION_ERROR,severity:D.ERROR});if(!g.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:z.TOKENIZE_ERROR,severity:D.ERROR});let c;if(c={payment_mode:(t=>{switch(t){case G.NEW_CARD:case G.SAVED_CARD:case G.NEW_BANK_ACCOUNT:case G.SAVED_BANK_ACCOUNT:case G.PLAID:return W.ECOM;case G.SEZZLE:return W.BNPL;case G.APPLE_PAY:return W.APPLE_PAY;case G.GOOGLE_PAY:return W.GOOGLE_PAY;default:return}})(null===(o=g.selectedPaymentMethod)||void 0===o?void 0:o.type),payment_token:g.paymentToken},this.preCompleteHook){const t=w();try{await new Promise(((e,i)=>{this.preCompleteHook(t,(()=>e()),(()=>i()))}))}catch(t){return void console.log("Checkout cancelled by preCompleteHook",t)}}this.completeCheckout({payment:c,onSuccess:({checkout:t})=>{this.submitEvent.emit({checkout:t,message:"Checkout completed successfully"})},onError:t=>{this.errorEvent.emit({message:t.message,errorCode:z.COMPLETE_CHECKOUT_ERROR,severity:D.ERROR})}})}render(){return t(s,{key:"ee341d8d78767a80e2627ea5244ba46ca63cd8df"})}get hostEl(){return n(this)}},at=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.plaidError=i(this,"plaidError",7),this.plaidErrorRecovered=i(this,"plaidErrorRecovered",7),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new q,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{g.authToken&&g.accountId&&g.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:m[v.PLAID_LINK_TOKEN_FAILED],severity:y[v.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const t=window.Plaid;this.plaidLink=t.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(t){this.handleError({code:v.PLAID_LINK_INIT_FAILED,message:m[v.PLAID_LINK_INIT_FAILED],severity:y[v.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,i,s,n;try{if(!g.authToken||!g.accountId)return void this.handleError({code:v.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:D.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const e=await this.plaidService.getLinkToken(g.authToken,g.accountId,g.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=(null==e?void 0:e.id)||(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id)||null,this.linkTokenId&&(g.plaidLinkTokenId=this.linkTokenId)}catch(t){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let o=v.PLAID_LINK_TOKEN_FAILED,a=m[o],r=!0;"AbortError"===t.name?(o=v.PLAID_TIMEOUT,a=m[o],r=!0):(null===(e=t.message)||void 0===e?void 0:e.includes("network"))||(null===(i=t.message)||void 0===i?void 0:i.includes("fetch"))?(o=v.PLAID_NETWORK_ERROR,a=m[o],r=!0):((null===(s=t.message)||void 0===s?void 0:s.includes("401"))||(null===(n=t.message)||void 0===n?void 0:n.includes("unauthorized")))&&(o=v.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:o,message:a,severity:y[o],originalError:t,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=t=>{if("string"==typeof t){if(t.includes("rate_limit"))return v.PLAID_RATE_LIMITED;if(t.includes("maintenance"))return v.PLAID_MAINTENANCE;if(t.includes("not_authenticated"))return v.PLAID_INVALID_CREDENTIALS}if(null==t?void 0:t.code)switch(t.code){case"rate_limited":return v.PLAID_RATE_LIMITED;case"maintenance":return v.PLAID_MAINTENANCE;case"not_authenticated":return v.PLAID_INVALID_CREDENTIALS;default:return v.PLAID_LINK_TOKEN_FAILED}return v.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=t=>{this.publicToken=t,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,g.selectedPaymentMethod={type:G.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:D.INFO}),g.plaidPublicToken=t},this.handlePlaidExit=t=>{this.isAuthenticating=!1,t&&this.handlePlaidError(t)},this.handlePlaidEvent=(t,e)=>{switch(t){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(e)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=t=>{let e=v.PLAID_AUTHENTICATION_FAILED,i=m[e],s=!0,n="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=v.PLAID_INVALID_CREDENTIALS,i=m[e],s=!0;break;case"ITEM_LOGIN_REQUIRED":e=v.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",s=!0;break;case"ITEM_LOCKED":e=v.PLAID_ACCOUNT_LOCKED,i=m[e],s=!1,n="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=v.PLAID_MAINTENANCE,i=m[e],s=!0;break;case"RATE_LIMIT_EXCEEDED":e=v.PLAID_RATE_LIMITED,i=m[e],s=!0;break;case"INVALID_REQUEST":e=v.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",s=!0;break;case"PLAID_ERROR":e=v.PLAID_AUTHENTICATION_FAILED,i=t.error_message||"Bank authentication failed. Please try again.",s=!0;break;default:t.error_message&&(i=t.error_message)}if(t.error_message){const o=t.error_message.toLowerCase();o.includes("not supported")||o.includes("unsupported")?(e=v.PLAID_BANK_NOT_SUPPORTED,i=m[e],s=!1,n="Try a different payment method"):(o.includes("expired")||o.includes("timeout"))&&(e=v.PLAID_TOKEN_EXPIRED,i=m[e],s=!0)}this.handleError({code:e,message:i,severity:y[e],originalError:t,retryable:s,userAction:n}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.plaidError.emit({code:t.code,message:t.message,severity:t.severity,data:{originalError:t.originalError,retryable:t.retryable,userAction:t.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",t),t.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var t;const e=(null===(t=g.selectedPaymentMethod)||void 0===t?void 0:t.type)===G.PLAID;this.isSelected!==e&&(this.isSelected=e)}}onSelectionChange(t){var e;t&&(null===(e=g.selectedPaymentMethod)||void 0===e?void 0:e.type)!==G.PLAID&&(g.selectedPaymentMethod={type:G.PLAID}),!t||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:v.PLAID_SDK_LOAD_FAILED,message:m[v.PLAID_SDK_LOAD_FAILED],severity:y[v.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var t;this.isSelected=(null===(t=g.selectedPaymentMethod)||void 0===t?void 0:t.type)===G.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return g.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,g.selectedPaymentMethod={type:G.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(t){this.isSelected=t,t&&(g.selectedPaymentMethod={type:G.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const t=C("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=t}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==g.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const e=t("img",{class:"plaid-logo-img",src:V,alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return t(f,{class:"payment-method"},t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{title:"Pay with Plaid"},t("div",{onClick:t=>{t.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",e," "),(()=>this.error?t("div",{class:(this.error.severity===D.ERROR?"text-danger":this.error.severity===D.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),t("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&t("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):this.publicToken?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:t("div",{class:"text-muted mt-2"},t("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},rt=class{constructor(t){e(this,t),this.onPaymentMethodOptionClick=t=>e=>{e.preventDefault(),g.selectedPaymentMethod={id:t.id,type:t.type},g.paymentToken=t.id},this.isAllowedPaymentMethod=t=>!(t===G.SAVED_CARD&&g.disableCreditCard||t===G.SAVED_BANK_ACCOUNT&&g.disableBankAccount)}componentWillLoad(){g.paymentMethods.length||console.warn("No saved payment methods available."),g.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return g.disablePaymentMethodGroup?null:t(f,null,t("div",{class:"saved-payment-methods"},g.paymentMethods.length?g.paymentMethods.filter((t=>this.isAllowedPaymentMethod(t.type))).map((e=>t("div",{class:"radio-list-item p-3",part:A,onClick:this.onPaymentMethodOptionClick(e)},t("form-control-radio",{name:"paymentMethodType",value:null==e?void 0:e.id,checked:g.paymentToken===(null==e?void 0:e.id),label:`${J[null==e?void 0:e.brand]||""} *${null==e?void 0:e.acct_last_four}`})))):null))}},lt=t("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),ht=class{constructor(t){e(this,t),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.paymentMethodOptionId=G.SEZZLE,this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((e=>{t=e}));const e=Number(g.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:g.bnplProviderClientId,apiMode:g.bnplProviderMode,apiVersion:g.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(t){t.preventDefault(),i.startCheckout({checkout_url:g.bnplProviderCheckoutUrl})},onComplete:e=>t({bnpl:e.data}),onCancel:e=>t({bnpl:e.data}),onFailure:e=>t({bnpl:e.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){g.selectedPaymentMethod={type:G.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var e,i;return g.bnplEnabled?t(f,{class:"payment-method"},t("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",null,t("div",null,"Buy now, pay later with ",lt),this.installmentPlan&&t("small",null,t("span",null,null===(e=this.installmentPlan)||void 0===e?void 0:e.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},S(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{K as justifi_apple_pay,tt as justifi_checkout_summary,st as justifi_google_pay,nt as justifi_header,ot as justifi_modular_checkout,at as justifi_plaid_payment_method,rt as justifi_saved_payment_methods,ht as justifi_sezzle_payment_method}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,g as s,H as a}from"./p-CV0Pyo1O.js";import{S as r}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as n,J as d}from"./p-CbTf_N6u.js";import{w as o,c}from"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{a as h,C as l}from"./p-Cjcsf8ku.js";import"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{c as f}from"./p-Daew0gTO.js";import{P as u}from"./p-DkoufM1t.js";import{S as b}from"./p-DqVU8ohH.js";import{b as m}from"./p-MeSAYDNh.js";import{B as p}from"./p-DFiTyYE9.js";import{u as y}from"./p-C4FLe2pT.js";import"./p-D4eE0MBI.js";import"./p-55QcjheA.js";import"./p-D8GTwl9v.js";const v=class{constructor(i){t(this,i),this.radioClick=e(this,"radio-click",7),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return i(r,{key:"1ae40f787970160e38b72f917bda96f480d2a890"},i("div",{key:"2130596c8294cc38365e6126806735da0f93ef4a",class:`radio-list-item p-3 ${this.class||""}`,part:y,onClick:this.handleClick,hidden:this.hidden},i("form-control-radio",{key:"7d5524f518430f2bfd1c9863f354318929353cfb",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}},k={[u.NEW_BANK_ACCOUNT]:"New bank account",[u.NEW_CARD]:"New credit or debit card"},g="Payment form not ready",w="Validation error",j=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event",7),this.submitEvent=e(this,"submit-event",7),this.computedHideSubmitButton=!1,this.isLoading=!1,this.submitButtonText="Submit"}paymentMethodsChanged(){this.setDefaultSelectedPaymentMethod()}connectedCallback(){this.setDefaultSelectedPaymentMethod(),this.setComputedHideSubmitButton()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup(),this.unsubscribeFromStore&&this.unsubscribeFromStore()}componentWillLoad(){n(),this.analytics=new d(this)}handleRadioClick(t){this.selectedPaymentMethod=t.detail,f.selectedPaymentMethod={type:t.detail}}async fillBillingForm(t){var e;null===(e=this.billingFormRef)||void 0===e||e.fill(t)}async tokenizePaymentMethod(t){null==t||t.preventDefault(),this.validateRequiredProps(),this.isLoading=!0;try{if(!(await this.validate()).isValid)return this.errorEvent.emit({errorCode:h.TOKENIZE_ERROR,message:w}),void(this.isLoading=!1);const t=await this.resolvePaymentMethod({isValid:!0});return t.error&&this.emitError({errorCode:t.error.code,message:t.error.message}),this.submitEvent.emit({response:t}),t}catch(t){const e=this.createErrorResponse(h.TOKENIZE_ERROR,t.message);return this.emitError({errorCode:h.TOKENIZE_ERROR,message:t.message}),this.submitEvent.emit({response:e}),e}finally{this.isLoading=!1}}async validate(){if(!this.areFormsReady())return{isValid:!1,errors:{general:g}};const[t,e]=await Promise.all([this.billingFormRef.validate(),this.paymentMethodFormRef.validate()]);return{isValid:t.isValid&&e.isValid,errors:Object.assign(Object.assign({},t.errors),e.errors)}}async tokenize(){try{const t=await this.billingFormRef.getValues(),e={clientId:this.authToken||f.authToken,account:this.accountId||f.accountId,paymentMethodMetadata:this.buildPaymentMethodMetadata(t)};return await this.paymentMethodFormRef.tokenize(e)}catch(t){return t}}validateRequiredProps(){this.authToken||f.authToken||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Auth token is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"}),this.accountId||f.accountId||this.emitError({errorCode:h.TOKENIZE_ERROR,message:"Account ID is required when using the tokenize-payment-method component not slotted in justifi-modular-checkout"})}setDefaultSelectedPaymentMethod(){this.selectedPaymentMethod||(this.disableCreditCard?this.disableBankAccount||(this.selectedPaymentMethod=u.NEW_BANK_ACCOUNT,f.selectedPaymentMethod={type:u.NEW_BANK_ACCOUNT}):(this.selectedPaymentMethod=u.NEW_CARD,f.selectedPaymentMethod={type:u.NEW_CARD}))}setComputedHideSubmitButton(){if(void 0!==this.hideSubmitButton)return void(this.computedHideSubmitButton=this.hideSubmitButton);const t=this.isSlottedWithinModularCheckout();this.computedHideSubmitButton=t}isSlottedWithinModularCheckout(){var t;let e=null===(t=this.host)||void 0===t?void 0:t.parentElement;for(;e;){if("JUSTIFI-MODULAR-CHECKOUT"===e.tagName)return!0;e=e.parentElement}return!1}get availablePaymentMethods(){const t=[];return this.disableCreditCard||t.push(u.NEW_CARD),this.disableBankAccount||t.push(u.NEW_BANK_ACCOUNT),t}areFormsReady(){return!(!this.billingFormRef||!this.paymentMethodFormRef)}emitError(t){this.errorEvent.emit(Object.assign(Object.assign({},t),{severity:l.ERROR}))}createErrorResponse(t,e){return{error:{code:t,message:e,decline_code:void 0}}}async resolvePaymentMethod(t){if(!this.areFormsReady())return this.createErrorResponse("form_not_ready",g);try{const e=await this.validate();if(!e.isValid||!t.isValid){const t=Object.values(e.errors)[0]||w;return{validationError:!0,error:{code:"validation_error",message:String(t),decline_code:void 0}}}return await this.performTokenization()}catch(t){return{error:t}}}async performTokenization(){var t,e;const i=await this.tokenize();if(i.error)return{error:i.error};const s=i.data;return{token:(null===(t=s.card)||void 0===t?void 0:t.token)||(null===(e=s.bank_account)||void 0===e?void 0:e.token),data:s}}buildPaymentMethodMetadata(t){return this.shouldSavePaymentMethod?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupID}):Object.assign({},t)}get paymentMethodGroupID(){return this.paymentMethodGroupId||f.paymentMethodGroupId}get shouldSavePaymentMethod(){return!(!this.paymentMethodGroupId&&!f.savePaymentMethod)}get shouldHideRadioInput(){return this.disableCreditCard||this.disableBankAccount}renderPaymentMethodOption(t){const e=this.selectedPaymentMethod===t&&void 0===f.selectedPaymentMethod.id;return i("div",{class:"payment-method"},i("justifi-radio-list-item",{name:"paymentMethodType",value:t,checked:e,label:k[t],hidden:this.shouldHideRadioInput}),e&&this.renderSelectedPaymentMethodForm(t))}renderSelectedPaymentMethodForm(t){return i("div",{class:"mt-4 pb-4"},this.renderPaymentMethodForm(t),i("div",{class:"mt-4"},i("justifi-billing-form",{ref:t=>this.billingFormRef=t,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,paymentMethodType:t})),i("div",{class:"mt-4"},i("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupID,label:this.savePaymentMethodLabel})))}renderPaymentMethodForm(t){return i(t===u.NEW_CARD?"justifi-card-form":"justifi-bank-account-form",{ref:t=>this.paymentMethodFormRef=t})}render(){return i(r,{key:"bb6a2e0eec485c96a756c504a278670804be0634"},i("form",{key:"f12f65c8fbe45e86418be9d3c2ff1107e292c86d"},i("fieldset",{key:"becda77faf80fd8b1e6d967cc4ead3d4adc3b6e8"},i("div",{key:"0419c1843747f59e68800ae3e2c78096b32605b0",class:"row gy-3"},i("div",{key:"8724f40a13bc62808f6e99cced2f8d7419b22d53",class:"col-12"},this.availablePaymentMethods.map((t=>this.renderPaymentMethodOption(t)))),i("div",{key:"ec9c0e2f6a85976d68e3dc939cd2826bfbd840d8",class:"col-12"},i("justifi-button",{key:"1c4b6a83c8357e15eaba071ea2fb8ba82b4c978c",text:this.submitButtonText,variant:"primary",type:"submit",clickHandler:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.computedHideSubmitButton}))))))}get host(){return s(this)}static get watchers(){return{disableCreditCard:["paymentMethodsChanged"],disableBankAccount:["paymentMethodsChanged"]}}},C=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"row mb-3"},i("div",{class:"col-12 align-content-end"},i(b,{height:"18px",width:"120px"}),i(b,{height:"36px"}))),i("div",{class:"row"},i("div",{class:"col-12 align-content-end"},i(b,{height:"18px",width:"110px"}),i(b,{height:"36px"}))))},M=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,this.tabId=m(),n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.accountNumberIframeElement.validate(),e=await this.routingNumberIframeElement.validate();return t&&e}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.accountNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"6c1e183b7ba2c70b41e22386d74a9cf7430aa8d5"},i(C,{key:"2755f4d21f8d62919ef56909f2dc6b9211bf550d",isReady:this.isReady}),i("hidden-input",{key:"c35448285cd2b53973caa4a56c28a135e1ed7d74"}),i("div",{key:"9fae602596267bafc39b9e3e9946a289b38393b6",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"bfaee6ed0eaa2a68175f18146d56195cc1a23e91",class:"row mb-3"},i("iframe-input",{key:"7385c2582ad5b397eb2afcb9c87b789d4918542c",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}`})),i("div",{key:"effe6b1f18d5fa531f4537accfe8279b81bc7b49",class:"row"},i("iframe-input",{key:"19cc7e46d8f7cb79c70ba21f2e9c15c7665eca47",inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}`}))))}},_=class{constructor(e){t(this,e)}get showSimpleCardBillingForm(){return this.paymentMethodType===u.NEW_CARD&&this.hideCardBillingForm}get showSimpleBankAccountBillingForm(){return this.paymentMethodType===u.NEW_BANK_ACCOUNT&&this.hideBankAccountBillingForm}async getValues(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.getValues()}async fill(t){var e;null===(e=this.selectedFormRef)||void 0===e||e.fill(t)}async validate(){var t;return null===(t=this.selectedFormRef)||void 0===t?void 0:t.validate()}render(){return i(a,null,i(this.showSimpleBankAccountBillingForm?"justifi-bank-account-billing-form-simple":this.showSimpleCardBillingForm?"justifi-card-billing-form-simple":"justifi-billing-form-full",{legend:this.legend,ref:t=>this.selectedFormRef=t}))}},x=class{constructor(e){t(this,e),this.variant="primary",this.type="button"}render(){return i(r,{key:"5f92a2a58c0828c78818f0055dc2692857730788"},i(p,{key:"541fe7cc24e137cf55fc470b16f3aa8c47eee0d3",variant:this.variant,isLoading:this.isLoading,clickHandler:this.clickHandler,class:this.class,type:this.type,disabled:this.disabled,style:this.customStyle},this.text))}},I=t=>{const{isReady:e}=t;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(b,{height:"18px",width:"100px"}),i(b,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(b,{height:"18px",width:"80px"}),i(b,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(b,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(b,{height:"18px",width:"30px"}),i(b,{height:"36px"}))))},P=class{constructor(e){t(this,e),this.isReady=!1}async componentWillLoad(){await o(),this.iframeOrigin=c.iframeOrigin,this.tabId=m(),n(),this.analytics=new d(this)}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((t=>new Promise((e=>{t.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){const t=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),i=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return t&&e&&i&&s}async tokenize({clientId:t,paymentMethodMetadata:e,account:i}){return this.cardNumberIframeElement.tokenize(t,e,i)}render(){return i(r,{key:"e204cee1fc875392b8056baf58b7234a739fffce"},i(I,{key:"3accfb88d66661ceaef39f765bb3fddfd0f98393",isReady:this.isReady}),i("hidden-input",{key:"0416ddca8b444cf8702f3fff52065bf647bd4b61"}),i("div",{key:"37c1d5014e5a6658bfd28e08e361ffaa6488f6d7",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"e2956855dfbcab38a782c22e93bd49252196baa8",class:"mb-3"},i("iframe-input",{key:"55105f1eebab4b846e1b5c55448259368a412349",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"9464b1a500a84dcaa438a9ebdad756637d14cb24",class:"row"},i("div",{key:"adc51687629fb00d26c6627e95c0228f5a4dfd11",class:"col-4 align-content-end"},i("iframe-input",{key:"52a0e5e198b6bfac00515ec220370e289674b613",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"1b09582711d838643db265b003ed18b18042713e",class:"col-4 align-content-end"},i("iframe-input",{key:"a1731a8dc02723398e1aae58b3812fccf62e6157",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"1e2c3205f2e0b28d036480d2c61934da5e7da620",class:"col-4 align-content-end"},i("iframe-input",{key:"b7b87360068434122f9b5a8935468240684b7a1d",inputId:"CVV",ref:t=>this.cvvIframeElement=t,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}},N=class{constructor(i){t(this,i),this.checkboxChanged=e(this,"checkboxChanged",7),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(t,e)=>{this.isChecked=e,f.savePaymentMethod=e,this.checkboxChanged.emit(this.isChecked)}}render(){return i(r,{key:"981f6a84fc14a7b687e1b6567b30fb9f861b0aa2"},i("form-control-checkbox",{key:"566f6261d19f96b87b9382b26a86b71461a29d08",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{j as internal_tokenize_payment_method,M as justifi_bank_account_form,_ as justifi_billing_form,x as justifi_button,P as justifi_card_form,v as justifi_radio_list_item,N as justifi_save_new_payment_method}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import{C as i,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-CbTf_N6u.js";import{D as a}from"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-CemnnRdZ.js";import"./p-D4eE0MBI.js";import"./p-55QcjheA.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-MeSAYDNh.js";import"./p-HXpYMWUU.js";import"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const m=class{constructor(e){t(this,e),this.errorEvent=s(this,"error-event",7),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(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:e})=>async({onSuccess:r,onError:o})=>{var p;try{const c=await e.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:n(null===(p=c.error)||void 0===p?void 0:p.code),severity:i.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new a(c.data),pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:i.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:i.ERROR}))}render(){return e("justifi-dispute-management-core",{key:"6e884955ea019144de872582a62bcecf05efa7b4",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_dispute_management}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{I as i}from"./p-Ce_F4E0f.js";import{T as d,U as o,V as r,W as l,X as c}from"./p-fTIONWal.js";import{F as f}from"./p-Bg7JIRrk.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-GgW1g7FQ.js";import{n}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-B1AMrMly.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(a,{key:"7d8efbbc9e43126e44acb9ca90f18f976e5416ea"},s("div",{key:"705b28a260cdd2b119d60e8f4f6a94011e61664c",class:"form-group d-flex flex-column"},s("div",{key:"aed6dd57997d43e47db6e3f8341bb706af27b9da",class:"d-flex align-items-start gap-2"},s("label",{key:"d2e74d4603690d6c73aa915990868c4df5605373",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"1fa3a068b32d70f9751da42c4f3f1f7bfedef1ca",helpText:this.helpText})),s("input",{key:"da5aa10fa56a5ae17a23513e33d0cb0b2feb9831",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(f,{key:"99803ac6b2e26ad4939974b943381a78522140b1",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,i,d,o,r,l,c,f,m;const v=u[this.country],p=b[this.country];return s(a,{key:"8dabbee93e0f319db333ada6c20af49ed6131b8d"},s("div",{key:"4b308ca9fa92321e5f60f3e4d9ab1c4e60cbd703",class:"row gy-3"},s("div",{key:"9c25eec2effd7caed70a3f02f6a780513fae930c",class:"col-12"},s("form-control-text",{key:"6c2ae178c2122d1f6085906690adadf98cb0774b",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"eba53a69fc4c869014ef8b7bf6ff9b1d8f5be566",class:"col-12"},s("form-control-text",{key:"11c743ce2388173c41cb16f1865fe58b2015d6bb",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"2025c9bb15286f5c3e4693b596372a7dff730ce8",class:"col-12"},s("form-control-text",{key:"5e0e40fd028d12b88cb15a38906738320e30aeca",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"5ec53f357907749c9abdcf568c027b71faad19fa",class:"col-12"},s("form-control-select",{key:"b9eef22eb507ffbd58c26bffa41b5b225925297c",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"7456cd4f6b62b59bc9289ca3721440083e9aa4f3",class:"col-12"},s("form-control-text",{key:"c483c93d0f09d5ded3c11145216273ba75822009",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?n:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"1b644425472c68880a9be150d52029a64d75ea26"},s("justifi-form-address-fields",{key:"d5e95bc81c654d00a0fcac4760705bd21b3b8c8d",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
1
+ import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{I as i}from"./p-Ce_F4E0f.js";import{X as d,Y as o,Z as r,_ as l,$ as f}from"./p-C4FLe2pT.js";import{F as c}from"./p--Kvji7o2.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-BcNb9bVO.js";import{n}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-_-2E_vYf.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(a,{key:"6fc95da2f8a43f319b11205b6d27b5e24b1e2586"},s("div",{key:"b51ae7976fee61e38d6f00f31cfaa835733db5f3",class:"form-group d-flex flex-column"},s("div",{key:"16aed34d97424e168fa74d1fdb5757537f56b4b1",class:"d-flex align-items-start gap-2"},s("label",{key:"7b1fdf28df1ab377b1b756746fb73f42085baa42",part:f,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"391b4373fcb966ba8c65c617167f044bd0d901f1",helpText:this.helpText})),s("input",{key:"fb893ef4da1e43f72031baef93aa2c5a3a1632b9",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(c,{key:"b67a3581cb5058971fb2f356a181ca8f0de2a9eb",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,i,d,o,r,l,f,c,m;const v=u[this.country],p=b[this.country];return s(a,{key:"8dabbee93e0f319db333ada6c20af49ed6131b8d"},s("div",{key:"4b308ca9fa92321e5f60f3e4d9ab1c4e60cbd703",class:"row gy-3"},s("div",{key:"9c25eec2effd7caed70a3f02f6a780513fae930c",class:"col-12"},s("form-control-text",{key:"6c2ae178c2122d1f6085906690adadf98cb0774b",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"eba53a69fc4c869014ef8b7bf6ff9b1d8f5be566",class:"col-12"},s("form-control-text",{key:"11c743ce2388173c41cb16f1865fe58b2015d6bb",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"2025c9bb15286f5c3e4693b596372a7dff730ce8",class:"col-12"},s("form-control-text",{key:"5e0e40fd028d12b88cb15a38906738320e30aeca",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"5ec53f357907749c9abdcf568c027b71faad19fa",class:"col-12"},s("form-control-select",{key:"b9eef22eb507ffbd58c26bffa41b5b225925297c",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(f=this.errors)||void 0===f?void 0:f.state})),s("div",{key:"7456cd4f6b62b59bc9289ca3721440083e9aa4f3",class:"col-12"},s("form-control-text",{key:"c483c93d0f09d5ded3c11145216273ba75822009",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(c=this.defaultValues)||void 0===c?void 0:c.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?n:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"1b644425472c68880a9be150d52029a64d75ea26"},s("justifi-form-address-fields",{key:"d5e95bc81c654d00a0fcac4760705bd21b3b8c8d",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as r}from"./p-CV0Pyo1O.js";import{A as o}from"./p-55QcjheA.js";import{C as e,a as i}from"./p-Cjcsf8ku.js";import"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{E as p}from"./p-DAZtHA62.js";import{c as h,J as c}from"./p-CbTf_N6u.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-MeSAYDNh.js";import"./p-HXpYMWUU.js";import"./p-C4FLe2pT.js";import"./p-D4eE0MBI.js";const m=o();class u{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const d=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:i})=>{var p;try{const h=await r.fetchGrossVolumeChartData(s,t);h.error?i({error:n(h.error),code:a(null===(p=h.error)||void 0===p?void 0:p.code),severity:e.ERROR}):o(h.data)}catch(s){const t=a(null==s?void 0:s.code);i({error:n(s),code:t,severity:e.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:i.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR}))}render(){return this.errorMessage?p(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-CKiAlBsU.js";import{f as o}from"./p-MeSAYDNh.js";import"./p-DVJaoI_m.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as h,l as c}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{B as l}from"./p-DFiTyYE9.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-B_KHnbK8.js";import{m as p}from"./p-CkX7qWsc.js";import{c as f,J as v}from"./p-CbTf_N6u.js";import{g as y,a as j}from"./p-D2muobcE.js";import{A as b}from"./p-55QcjheA.js";import{S as w}from"./p-DqVU8ohH.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-C4FLe2pT.js";import"./p-D4eE0MBI.js";const C=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},T=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([h.customerRequest,h.duplicate,h.fraudulent],"Select a reason")})},k=[{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 I{async postRefund(t,e,s,r){return A.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const g=b();class S{async postVoid(t,e,s){return g.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const B=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),x=()=>t(m,null,t("div",{class:"row gap-5"},t(B,null),t(B,null),t(B,null))),D=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new n(T())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(T(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new c({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var u;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(u=o.error)||void 0===u?void 0:u.code),severity:a.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:a.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new S});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(t,s,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:u})=>{var h;try{const u=await r.postRefund(s,e,t,i);if(u.error)return o({error:j(u.error),code:y(null===(h=u.error)||void 0===h?void 0:h.code),severity:a.ERROR});n(u)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new I});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(t,e,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(x,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(m,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:k,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(l,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{D as justifi_refund_payment}
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./p-CV0Pyo1O.js";import{u as a}from"./p-C4FLe2pT.js";import{S as o}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";const s=class{constructor(t){e(this,t)}render(){return t(o,{key:"cdf49c9446ea5fd6316523ecaf4f0f14be644e71",class:"payment-method"},t("div",{key:"7de753f710389cbbb1d604ca5af97e1dfc5af2af",class:"radio-list-item p-3",part:a,onClick:this.clickHandler,hidden:this.radioButtonHidden},t("form-control-radio",{key:"7a3bb855c441031d7685aa23212cc471947108ec",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{s as payment_method_option}
@@ -1 +1 @@
1
- import{r as t,c as e,h as s,H as a}from"./p-CV0Pyo1O.js";import{W as i,X as r,T as o,U as h,V as l}from"./p-fTIONWal.js";import{F as c}from"./p-Bg7JIRrk.js";import"./p-CZfYo5-1.js";const f=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),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=o),this.disabled&&(t=h),this.isFocused&&(t=l),t}render(){return s(a,{key:"af231bc296d7bd79a01ed4c1f78b6bba1b1027c4"},s("div",{key:"47b148201af9e18546284492a668a6720e10a015",class:"form-group d-flex flex-column"},s("div",{key:"e0b7c6f48baeb022018039391479007efe9b1dc9",class:"d-flex gap-2"},s("label",{key:"26133591445cecd41c72cf69e694b7116d8a0ea5",part:r,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"822ad6405b38887385c374f9646c9512b59d7e5a",helpText:this.helpText})),s("input",{key:"ea928f636ea90f1bebfca9df9049bcde26ffdbfe",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:"66c1cac66140950abb0cb6bf550d86dfee7e2b6d",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{f as form_control_date}
1
+ import{r as t,c as e,h as s,H as a}from"./p-CV0Pyo1O.js";import{_ as i,$ as o,X as r,Y as h,Z as l}from"./p-C4FLe2pT.js";import{F as f}from"./p--Kvji7o2.js";import"./p-CZfYo5-1.js";const d=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),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=l),t}render(){return s(a,{key:"85a09c6f209dbfbf3fd319953e65c189a9b7459b"},s("div",{key:"e133720b466b49bcdfd79bf84e865b4d99d5d37d",class:"form-group d-flex flex-column"},s("div",{key:"80e2986fb137ab7067451a9c62e685e340e32976",class:"d-flex gap-2"},s("label",{key:"c6402fdecf21a836987b5a8ddb597d90e21a1926",part:o,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"314f8cb1d8715da046c47b66815bf37c1506ed3e",helpText:this.helpText})),s("input",{key:"5591aa3f855ae88394fabaf127ae1fe587c7e0a5",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(f,{key:"39864e02b813e9a4a46f9d42c5288dea14f934b7",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_date}
@@ -0,0 +1 @@
1
+ import{A as o}from"./p-55QcjheA.js";import{C as s}from"./p-Cjcsf8ku.js";import{S as r}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{g as t,a as c}from"./p-D2muobcE.js";const a=o();class n{async fetchSubAccounts(o,s,r){return a.get({authToken:s,endpoint:"sub_accounts",params:r,headers:{Account:o}})}}const p=({primaryAccountId:o,authToken:a,service:n})=>async({params:p,onSuccess:e,onError:i})=>{var u,m;try{const j=await n.fetchSubAccounts(o,a,p);if(j.error){return i({error:c(j.error),code:t(null===(m=j.error)||void 0===m?void 0:m.code),severity:s.ERROR})}{const o=Object.assign({},j.page_info);e({subAccounts:(null===(u=j.data)||void 0===u?void 0:u.map((o=>new r(o))))||[],pagingInfo:o})}}catch(o){const r=t(null==o?void 0:o.code);return i({error:o.message||o,code:r,severity:s.ERROR})}};export{n as S,p as m}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as a}from"./p-CbTf_N6u.js";import{T as n}from"./p-6V4e6Fb_.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{f as p}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m,S as d}from"./p-eEJMJXTG.js";import{S as u}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as l}from"./p-DyJ1zSHJ.js";import"./p-D4eE0MBI.js";import"./p-55QcjheA.js";import"./p-MeSAYDNh.js";import"./p-D8GTwl9v.js";import"./p-DO4RBao8.js";import"./p-C4FLe2pT.js";const j=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=l,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:o,onError:a})=>{var n,m;try{const d=await i.fetchTerminals(t,s,r);if(d.error)return a({error:h(d.error),code:c(null===(m=d.error)||void 0===m?void 0:m.code),severity:e.ERROR});{const t=Object.assign({},d.page_info);o({terminals:(null===(n=d.data)||void 0===n?void 0:n.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new n}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new d}))}render(){return i(u,{key:"dde640eb10f9e0f8e817afed66410042642b47e6"},i("terminals-list-core",{key:"7e6a67f075c10cdedcd6e133aeedcd2fa9ba45ad",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{j as justifi_terminals_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as o}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as i,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as a,a as c}from"./p-D2muobcE.js";import{c as n,J as p}from"./p-CbTf_N6u.js";import{C as h}from"./p-BHA4oSi3.js";import{m as u,S as m}from"./p-eEJMJXTG.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-CGJ_mnry.js";import"./p-D8GTwl9v.js";import"./p-MeSAYDNh.js";import"./p-D4eE0MBI.js";import"./p-55QcjheA.js";import"./p-DO4RBao8.js";import"./p-C4FLe2pT.js";const l=class{constructor(o){t(this,o),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){n(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){const t=this.subAccountId||this.accountId;t&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:o})=>async({params:r,onSuccess:n,onError:p})=>{var h,u;try{const m=await o.fetchCheckouts(t,s,r);if(m.error)return p({error:c(m.error),code:a(null===(u=m.error)||void 0===u?void 0:u.code),severity:i.ERROR});{const t=Object.assign({},m.page_info);n({checkouts:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:i.ERROR})}})({accountId:t,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID/Sub Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({primaryAccountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return o(d,{key:"08345e8bbe637cea344a232da2302bd0298a5ac9"},o("checkouts-list-core",{key:"7aa34a0537810197cf6962d1a89e12e9ad9d8eea",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],subAccountId:["propChanged"]}}};export{l as justifi_checkouts_list}
@@ -0,0 +1 @@
1
+ import{r,c as s,h as t}from"./p-CV0Pyo1O.js";import{S as i}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as e,J as o}from"./p-CbTf_N6u.js";import{d as a}from"./p-CIh-k9yP.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{j as c}from"./p-BiNakvsa.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as m,a as h}from"./p-D2muobcE.js";import{A as d}from"./p-55QcjheA.js";import"./p-D4eE0MBI.js";import"./p-C4FLe2pT.js";import"./p-MeSAYDNh.js";import"./p-DO4RBao8.js";import"./p-D8GTwl9v.js";const l=d();class u{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const j=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:e,onError:o,final:a})=>{var p,d;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return o({error:h(a.error),code:m(null===(d=a.error)||void 0===d?void 0:d.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);e({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"19a055907283ae2a126bdb2a509c3a4a991521f2"},t("terminal-orders-list-core",{key:"04df9d1ce1cca14b07e879137abbced011d02486",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{j as justifi_terminal_orders_list}
@@ -1 +1 @@
1
- import{h as i,r as a,H as e}from"./p-CV0Pyo1O.js";import{S as t}from"./p-BRieSe65.js";import{w as s,c as d}from"./p-DVJaoI_m.js";import{b as r}from"./p-B09GVew-.js";import"./p-fTIONWal.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const c=a=>{const{isReady:e}=a;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(t,{height:"18px",width:"100px"}),i(t,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"80px"}),i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"30px"}),i(t,{height:"36px"}))))},f=class{constructor(i){a(this,i),this.isReady=!1}async componentWillLoad(){await s(),this.iframeOrigin=d.iframeOrigin,this.tabId=r()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((a=>{i.addEventListener("iframeLoaded",(()=>{a()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),a=await this.expirationMonthIframeElement.validate(),e=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&a&&e&&t}async tokenize(i,a,e){return this.cardNumberIframeElement.tokenize(i,a,e)}render(){return i(e,{key:"fd58409622904cfdbe1df9e7aa893cec0b469472"},i(c,{key:"7bd4dbc17afc1641eafa5cc6c12349901a05b862",isReady:this.isReady}),i("div",{key:"1eb88b3443cb12f592a247335d5a6de2597bf10d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"4b50883a1094343e1f039c8bafed2ecfb42be0e8",class:"mb-3"},i("iframe-input",{key:"83930c6af6b6a7eb82bf66565fa2e9d16b3bfa59",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"33c8a34d012abc533d5b69baa3fddfcb3714be61",class:"d-flex align-items-start"},i("div",{key:"b37fedaab03b543789fb2909d0daa91d28d9b772",class:"flex-fill me-3"},i("iframe-input",{key:"d5fa7b25f4726e6896ee8fcf0a2ab882b1df5260",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Exp. Month",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"38798bb90f5457d3e5c3659c716fe38a79a2f2a0",class:"flex-fill me-3"},i("iframe-input",{key:"44d57ddbe4221e1d0000a9db7a19d8878211cb50",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"Exp. Year",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"233f99090baecc6097f2226d93a14d428571b03f",class:"flex-fill"},i("iframe-input",{key:"0d353a3bc4c1ece3a5ff3aecc9aabf349d59bc90",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{f as card_form}
1
+ import{h as i,r as a,H as e}from"./p-CV0Pyo1O.js";import{S as t}from"./p-DqVU8ohH.js";import{w as s,c as d}from"./p-DVJaoI_m.js";import{b as r}from"./p-MeSAYDNh.js";import"./p-C4FLe2pT.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const c=a=>{const{isReady:e}=a;return e?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(t,{height:"18px",width:"100px"}),i(t,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"80px"}),i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(t,{height:"18px",width:"30px"}),i(t,{height:"36px"}))))},f=class{constructor(i){a(this,i),this.isReady=!1}async componentWillLoad(){await s(),this.iframeOrigin=d.iframeOrigin,this.tabId=r()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((a=>{i.addEventListener("iframeLoaded",(()=>{a()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),a=await this.expirationMonthIframeElement.validate(),e=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&a&&e&&t}async tokenize(i,a,e){return this.cardNumberIframeElement.tokenize(i,a,e)}render(){return i(e,{key:"fd58409622904cfdbe1df9e7aa893cec0b469472"},i(c,{key:"7bd4dbc17afc1641eafa5cc6c12349901a05b862",isReady:this.isReady}),i("div",{key:"1eb88b3443cb12f592a247335d5a6de2597bf10d",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"4b50883a1094343e1f039c8bafed2ecfb42be0e8",class:"mb-3"},i("iframe-input",{key:"83930c6af6b6a7eb82bf66565fa2e9d16b3bfa59",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"33c8a34d012abc533d5b69baa3fddfcb3714be61",class:"d-flex align-items-start"},i("div",{key:"b37fedaab03b543789fb2909d0daa91d28d9b772",class:"flex-fill me-3"},i("iframe-input",{key:"d5fa7b25f4726e6896ee8fcf0a2ab882b1df5260",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Exp. Month",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"38798bb90f5457d3e5c3659c716fe38a79a2f2a0",class:"flex-fill me-3"},i("iframe-input",{key:"44d57ddbe4221e1d0000a9db7a19d8878211cb50",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"Exp. Year",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"233f99090baecc6097f2226d93a14d428571b03f",class:"flex-fill"},i("iframe-input",{key:"0d353a3bc4c1ece3a5ff3aecc9aabf349d59bc90",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{f as card_form}
@@ -1 +1 @@
1
- import{r as l,h as i,H as t}from"./p-CV0Pyo1O.js";import{c as e,D as s}from"./p-Cf0Rt_Os.js";import{m as o,s as d,n as v}from"./p-B09GVew-.js";import"./p-fTIONWal.js";import"./p-HXpYMWUU.js";const u=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||o(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},a=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:d(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,d,v,u,a,n;return!this.legalAddress||o(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(d=this.legalAddress)||void 0===d?void 0:d.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(v=this.legalAddress)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(u=this.legalAddress)||void 0===u?void 0:u.state}),i(e,{title:"Postal Code",value:null===(n=null===(a=this.legalAddress)||void 0===a?void 0:a.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,o,d,u,a;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"col-md-6"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:v(new Date(Number(null==l?void 0:l.dob_day),Number(null==l?void 0:l.dob_month),Number(null==l?void 0:l.dob_year)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(o=null==l?void 0:l.address)||void 0===o?void 0:o.line2}),i(e,{title:"City",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.city}),i(e,{title:"State",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.state}),i(e,{title:"Zip",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.postal_code})))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,d,u,a,n,r,c,h,m,p,f,w,g;return!this.representative||o(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(u=null===(d=this.representative)||void 0===d?void 0:d.address)||void 0===u?void 0:u.line1}),i(e,{title:"Created At",value:(null===(a=this.representative)||void 0===a?void 0:a.created_at)&&v(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&v(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(f=this.representative)||void 0===f?void 0:f.email}),i(e,{title:"Phone",value:null===(w=this.representative)||void 0===w?void 0:w.phone}),i(e,{title:"Updated At",value:this.representative&&v(null===(g=this.representative)||void 0===g?void 0:g.updated_at)})))))}};export{u as additional_questions_details,a as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}
1
+ import{r as l,h as i,H as t}from"./p-CV0Pyo1O.js";import{c as e,D as s}from"./p-DAZtHA62.js";import{n as o,s as d,o as v}from"./p-MeSAYDNh.js";import"./p-C4FLe2pT.js";import"./p-HXpYMWUU.js";const u=class{constructor(i){l(this,i)}render(){return!this.additionalQuestions||o(this.additionalQuestions)?null:i("div",null,i(s,{sectionTitle:"Additional Questions"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Business Revenue",value:this.additionalQuestions.business_revenue}),i(e,{title:"Business Payment Volume",value:this.additionalQuestions.business_payment_volume})))))}},a=class{constructor(i){l(this,i)}render(){return this.business?i("div",null,i(s,{sectionTitle:"Business Core Info Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Legal Name",value:this.business.legal_name}),i(e,{title:"Doing Business As (DBA)",value:this.business.doing_business_as}),i(e,{title:"Business Classification",value:d(this.business.classification)}),i(e,{title:"Industry",value:this.business.industry})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Tax ID",value:this.business.tax_id}),i(e,{title:"Website URL",value:this.business.website_url}),i(e,{title:"Email Address",value:this.business.email}),i(e,{title:"Phone Number",value:this.business.phone}))))):null}},n=class{constructor(i){l(this,i)}render(){var l,t,d,v,u,a,n;return!this.legalAddress||o(this.legalAddress)?null:i("div",null,i(s,{sectionTitle:"Business Legal Address Details"}),i("div",{class:"d-table gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Country",value:null===(l=this.legalAddress)||void 0===l?void 0:l.country}),i(e,{title:"Legal Address",value:null===(t=this.legalAddress)||void 0===t?void 0:t.line1}),i(e,{title:"Address Line 2",value:null===(d=this.legalAddress)||void 0===d?void 0:d.line2})),i("div",{class:"col-12 col-md-6"},i(e,{title:"City",value:null===(v=this.legalAddress)||void 0===v?void 0:v.city}),i(e,{title:"State",value:null===(u=this.legalAddress)||void 0===u?void 0:u.state}),i(e,{title:"Postal Code",value:null===(n=null===(a=this.legalAddress)||void 0===a?void 0:a.postal_code)||void 0===n?void 0:n.toString()})))))}},r=class{constructor(i){l(this,i)}render(){var l;return(null===(l=null==this?void 0:this.owners)||void 0===l?void 0:l.length)?i(t,null,!!(null==this?void 0:this.owners.length)&&this.owners.map((l=>{var t,o,d,u,a;return[i(s,{sectionTitle:`Owner ${null==l?void 0:l.name}'s Details`}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"col-md-6"},i(e,{title:"Name",value:null==l?void 0:l.name}),i(e,{title:"Title",value:null==l?void 0:l.title}),i(e,{title:"Email",value:null==l?void 0:l.email}),i(e,{title:"Phone",value:null==l?void 0:l.phone}),i(e,{title:"Date of Birth",value:v(new Date(Number(null==l?void 0:l.dob_day),Number(null==l?void 0:l.dob_month),Number(null==l?void 0:l.dob_year)))}),i(e,{title:"Identification Number",value:`********${null==l?void 0:l.ssn_last4}`}),i(e,{title:"Line 1",value:null===(t=null==l?void 0:l.address)||void 0===t?void 0:t.line1}),i(e,{title:"Line 2",value:null===(o=null==l?void 0:l.address)||void 0===o?void 0:o.line2}),i(e,{title:"City",value:null===(d=null==l?void 0:l.address)||void 0===d?void 0:d.city}),i(e,{title:"State",value:null===(u=null==l?void 0:l.address)||void 0===u?void 0:u.state}),i(e,{title:"Zip",value:null===(a=null==l?void 0:l.address)||void 0===a?void 0:a.postal_code})))]}))):null}},c=class{constructor(i){l(this,i)}render(){var l,t,d,u,a,n,r,c,h,m,p,f,D,g;return!this.representative||o(this.representative)?null:i("div",null,i(s,{sectionTitle:"Representative Details"}),i("div",{class:"d-flex flex-column gap-2 w-100 mt-3"},i("div",{class:"row gy-3"},i("div",{class:"col-12 col-md-6"},i(e,{title:"Name",value:null===(l=this.representative)||void 0===l?void 0:l.name}),i(e,{title:"ID",value:null===(t=this.representative)||void 0===t?void 0:t.id}),i(e,{title:"Address",value:null===(u=null===(d=this.representative)||void 0===d?void 0:d.address)||void 0===u?void 0:u.line1}),i(e,{title:"Created At",value:(null===(a=this.representative)||void 0===a?void 0:a.created_at)&&v(null===(n=this.representative)||void 0===n?void 0:n.created_at)})),i("div",{class:"col-12 col-md-6"},i(e,{title:"Title",value:null===(r=this.representative)||void 0===r?void 0:r.title}),i(e,{title:"Is Owner?",value:null===(c=this.representative)||void 0===c?void 0:c.is_owner.toString()}),i(e,{title:"Date Of Birth",value:this.representative&&v(new Date(Number(null===(h=this.representative)||void 0===h?void 0:h.dob_year),Number(null===(m=this.representative)||void 0===m?void 0:m.dob_month)-1,Number(null===(p=this.representative)||void 0===p?void 0:p.dob_day)))}),i(e,{title:"Email",value:null===(f=this.representative)||void 0===f?void 0:f.email}),i(e,{title:"Phone",value:null===(D=this.representative)||void 0===D?void 0:D.phone}),i(e,{title:"Updated At",value:this.representative&&v(null===(g=this.representative)||void 0===g?void 0:g.updated_at)})))))}};export{u as additional_questions_details,a as core_info_details,n as legal_address_details,r as owner_details,c as representative_details}