@justifi/webcomponents 6.12.3 → 6.12.5

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 (606) hide show
  1. package/dist/cjs/{Analytics-DcqsdFaD.js → Analytics-CITnMj7H.js} +4 -5
  2. package/dist/cjs/{Plaid-BlSGeGpn.js → Plaid-BRSyOOuw.js} +60 -4
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  4. package/dist/cjs/additional-questions-form-step_14.cjs.entry.js +154 -21
  5. package/dist/cjs/additional-questions_5.cjs.entry.js +1 -1
  6. package/dist/cjs/{justifi-additional-statement_8.cjs.entry.js → additional-statement_8.cjs.entry.js} +24 -24
  7. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +5 -5
  8. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  9. package/dist/cjs/{business-identity-schema-DWWtSiUF.js → business-identity-schema-DuFGX6_i.js} +68 -1
  10. package/dist/cjs/{business.service-BheJs82v.js → business.service-Z9OACEQL.js} +1 -2
  11. package/dist/cjs/card-form.cjs.entry.js +2 -2
  12. package/dist/cjs/{check-pkg-version-DFTQGZz1.js → check-pkg-version-CZMgXZID.js} +1 -1
  13. package/dist/cjs/{checkout.service-DZKdHQQq.js → checkout.service-BZOyqXgW.js} +1 -2
  14. package/dist/cjs/{country-config-D7fss2oF.js → country-config-aJp8ScEs.js} +1 -0
  15. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  16. package/dist/cjs/{justifi-dispute-notification_3.cjs.entry.js → dispute-notification_2.cjs.entry.js} +67 -90
  17. package/dist/cjs/{event-types-BWQT2lwu.js → event-types-AU1B76Vm.js} +30 -0
  18. package/dist/cjs/form-address-fields_3.cjs.entry.js +3 -3
  19. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  20. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  21. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  23. package/dist/cjs/form-control-number_2.cjs.entry.js +89 -0
  24. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  25. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  26. package/dist/cjs/{get-business-TFzhaBXn.js → get-business-aR-C83KX.js} +2 -2
  27. package/dist/cjs/{get-payment-details-DL5FmIyF.js → get-payment-details-dwhA02Zl.js} +2 -3
  28. package/dist/cjs/{get-subaccounts-CVK4O7th.js → get-subaccounts-B1jmSa2d.js} +2 -3
  29. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  30. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  31. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +12 -13
  32. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -6
  33. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -6
  34. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  35. package/dist/cjs/justifi-business-details.cjs.entry.js +7 -8
  36. package/dist/cjs/justifi-business-form.cjs.entry.js +12 -14
  37. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  38. package/dist/cjs/justifi-card-form.cjs.entry.js +5 -6
  39. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -5
  40. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -4
  41. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +190 -27
  42. package/dist/cjs/justifi-dispute-management.cjs.entry.js +65 -18
  43. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +11071 -23
  44. package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -10
  45. package/dist/cjs/justifi-payment-details.cjs.entry.js +16 -17
  46. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -8
  47. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -8
  48. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  49. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -8
  50. package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -11
  51. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -8
  52. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -4
  53. package/dist/cjs/justifi-payouts-list.cjs.entry.js +9 -10
  54. package/dist/cjs/justifi-refund-payment.cjs.entry.js +7 -8
  55. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -6
  56. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  57. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -5
  58. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +178 -24
  59. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -3
  60. package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -9
  61. package/dist/cjs/loader.cjs.js +1 -1
  62. package/dist/cjs/{package-bM0MyhTf.js → package-DOiqjXmm.js} +1 -1
  63. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  64. package/dist/cjs/{payment-provisioning-actions-BO7dzIm1.js → payment-provisioning-actions-BiSpysjW.js} +2 -2
  65. package/dist/cjs/{payment.service-sZKlg2Jq.js → payment.service-ByrgA_QZ.js} +1 -2
  66. package/dist/cjs/{payout.service-BcQVsMCS.js → payout.service-CnQm_BpU.js} +1 -2
  67. package/dist/cjs/{payouts-status-CwgOMz-S.js → payouts-status-AuS3Mp0V.js} +2 -2
  68. package/dist/cjs/{plaid.service-BcgO2VXC.js → plaid.service-Dlb8EUR8.js} +1 -2
  69. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  70. package/dist/cjs/{schema-validations-_yWWnnaG.js → schema-validations-DNPcvDh5.js} +13 -2
  71. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  72. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  73. package/dist/cjs/{terminal.service-CjMMWSh3.js → terminal.service-BdwHQ3Vv.js} +1 -2
  74. package/dist/cjs/{utils-DbTucCTO.js → utils-FVGp6se3.js} +1 -1
  75. package/dist/cjs/webcomponents.cjs.js +1 -1
  76. package/dist/collection/api/Analytics.js +2 -2
  77. package/dist/collection/api/Terminal.js +1 -1
  78. package/dist/collection/collection-manifest.json +10 -16
  79. package/dist/collection/components/business-details/owner-details/owner-details.js +1 -1
  80. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +2 -2
  81. package/dist/collection/components/business-forms/owner-form/owner-form.js +226 -12
  82. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -0
  83. package/dist/collection/components/business-forms/schemas/schema-validations.js +2 -2
  84. package/dist/collection/components/checkout/billing-form/billing-form-full.js +2 -2
  85. package/dist/collection/components/checkout/billing-form/billing-form-schema.js +1 -1
  86. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
  87. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +166 -16
  88. package/dist/collection/components/dispute-management/{justifi-dispute-notification.js → dispute-notification.js} +5 -6
  89. package/dist/collection/components/dispute-management/dispute-response/{justifi-additional-statement.js → additional-statement.js} +3 -3
  90. package/dist/collection/components/dispute-management/dispute-response/{justifi-cancellation-policy.js → cancellation-policy.js} +3 -3
  91. package/dist/collection/components/dispute-management/dispute-response/{justifi-customer-details.js → customer-details.js} +3 -3
  92. package/dist/collection/components/dispute-management/dispute-response/{dispute-response-core.js → dispute-response.js} +105 -77
  93. package/dist/collection/components/dispute-management/dispute-response/{justifi-duplicate-charge.js → duplicate-charge.js} +3 -3
  94. package/dist/collection/components/dispute-management/dispute-response/{justifi-electronic-evidence.js → electronic-evidence.js} +3 -3
  95. package/dist/collection/components/dispute-management/dispute-response/{justifi-product-or-service.js → product-or-service.js} +3 -3
  96. package/dist/collection/components/dispute-management/dispute-response/{justifi-refund-policy.js → refund-policy.js} +3 -3
  97. package/dist/collection/components/dispute-management/dispute-response/{justifi-shipping-details.js → shipping-details.js} +3 -3
  98. package/dist/collection/components/dispute-management/justifi-dispute-management.js +78 -11
  99. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  100. package/dist/collection/components/gross-payment-chart/justifi-gross-payment-chart.js +79 -15
  101. package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +1 -1
  102. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
  103. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
  104. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
  105. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
  106. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
  107. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
  108. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  109. package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
  110. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  111. package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
  112. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
  113. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  114. package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
  115. package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
  116. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
  117. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  118. package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
  119. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  120. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +134 -10
  121. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  122. package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
  123. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
  124. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  125. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  126. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  127. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  128. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  129. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  130. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  131. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  132. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  133. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  134. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  135. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  136. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  137. package/dist/collection/ui-components/internal-button.js +1 -1
  138. package/dist/collection/ui-components/radio-list-item.js +1 -1
  139. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  140. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  141. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  142. package/dist/collection/utils/checkout-billing-state-options.js +12 -0
  143. package/dist/docs.json +5763 -6945
  144. package/dist/esm/{Analytics-Cyc3ZLPx.js → Analytics-Cg17Xhj_.js} +4 -5
  145. package/dist/esm/{Plaid-BuKEVgbB.js → Plaid-l6nNIjab.js} +58 -3
  146. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  147. package/dist/esm/additional-questions-form-step_14.entry.js +156 -23
  148. package/dist/esm/additional-questions_5.entry.js +2 -2
  149. package/dist/esm/{justifi-additional-statement_8.entry.js → additional-statement_8.entry.js} +18 -18
  150. package/dist/esm/{badge-B6dp1XGV.js → badge-Dlcl9qdm.js} +1 -1
  151. package/dist/esm/bank-account-billing-form-simple_4.entry.js +7 -7
  152. package/dist/esm/bank-account-form.entry.js +4 -4
  153. package/dist/esm/bank-account-read-only-value.entry.js +1 -1
  154. package/dist/esm/business-identity-schema-0Q3kck3C.js +163 -0
  155. package/dist/esm/{business.service-BPbZ5fxQ.js → business.service-C31wbMVs.js} +1 -2
  156. package/dist/esm/{button-DRdaAudE.js → button-BvzOzV4l.js} +1 -1
  157. package/dist/esm/card-form.entry.js +4 -4
  158. package/dist/esm/{check-pkg-version-6iGDh82c.js → check-pkg-version-D-rHqtUI.js} +1 -1
  159. package/dist/esm/{checkout.service-CJMfFKyS.js → checkout.service-cVdOGDuI.js} +1 -2
  160. package/dist/esm/{country-config-P042rrI3.js → country-config-CdvhLcnT.js} +1 -1
  161. package/dist/esm/custom-popper_2.entry.js +3 -3
  162. package/dist/esm/{justifi-dispute-notification_3.entry.js → dispute-notification_2.entry.js} +68 -90
  163. package/dist/esm/{event-types-Bg2SZArf.js → event-types-DalU_6SB.js} +29 -1
  164. package/dist/esm/form-address-fields_3.entry.js +5 -5
  165. package/dist/esm/form-control-checkbox.entry.js +3 -3
  166. package/dist/esm/form-control-date.entry.js +4 -4
  167. package/dist/esm/{form-control-error-text-DVedKyhp.js → form-control-error-text-Di9QePY5.js} +1 -1
  168. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  169. package/dist/esm/form-control-file.entry.js +4 -4
  170. package/dist/esm/{form-control-help-text-D-349cNw.js → form-control-help-text-DGMpMuAm.js} +1 -1
  171. package/dist/esm/form-control-monetary-provisioning.entry.js +3 -3
  172. package/dist/esm/form-control-monetary.entry.js +5 -5
  173. package/dist/esm/form-control-number_2.entry.js +86 -0
  174. package/dist/esm/form-control-radio.entry.js +3 -3
  175. package/dist/esm/form-control-select_2.entry.js +6 -6
  176. package/dist/esm/{get-business-DIpEbczl.js → get-business-Gg6qn5on.js} +2 -2
  177. package/dist/esm/{get-payment-details-DjBou5Fu.js → get-payment-details-BiWgSJau.js} +2 -3
  178. package/dist/esm/{get-subaccounts-CgDWE_5o.js → get-subaccounts-CkjZeR9U.js} +2 -3
  179. package/dist/esm/{header-1-Bl7MHW0w.js → header-1-evYxFIGN.js} +1 -1
  180. package/dist/esm/{header-3-C7JJVnMG.js → header-3-BUDap2xY.js} +1 -1
  181. package/dist/esm/hidden-input_2.entry.js +7 -7
  182. package/dist/esm/{insurance-state-qTdpe84i.js → insurance-state-CLGc1-_4.js} +1 -1
  183. package/dist/esm/internal-button.entry.js +3 -3
  184. package/dist/esm/justifi-apple-pay_11.entry.js +17 -18
  185. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -6
  186. package/dist/esm/justifi-bank-account-form.entry.js +5 -6
  187. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  188. package/dist/esm/justifi-business-details.entry.js +10 -11
  189. package/dist/esm/justifi-business-form.entry.js +14 -16
  190. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  191. package/dist/esm/justifi-card-form.entry.js +5 -6
  192. package/dist/esm/justifi-checkout.entry.js +5 -6
  193. package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -5
  194. package/dist/esm/justifi-checkouts-list.entry.js +190 -27
  195. package/dist/esm/justifi-details.entry.js +2 -2
  196. package/dist/esm/justifi-dispute-management.entry.js +64 -17
  197. package/dist/esm/justifi-gross-payment-chart.entry.js +11071 -23
  198. package/dist/esm/justifi-order-terminals.entry.js +11 -12
  199. package/dist/esm/justifi-payment-details.entry.js +20 -21
  200. package/dist/esm/justifi-payment-provisioning.entry.js +11 -12
  201. package/dist/esm/justifi-payment-transactions-list.entry.js +10 -11
  202. package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
  203. package/dist/esm/justifi-payments-list.entry.js +12 -13
  204. package/dist/esm/justifi-payout-details.entry.js +15 -16
  205. package/dist/esm/justifi-payout-transactions-list.entry.js +10 -11
  206. package/dist/esm/justifi-payouts-list-filters.entry.js +4 -5
  207. package/dist/esm/justifi-payouts-list.entry.js +13 -14
  208. package/dist/esm/justifi-refund-payment.entry.js +10 -11
  209. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  210. package/dist/esm/justifi-season-interruption-insurance.entry.js +8 -9
  211. package/dist/esm/justifi-skeleton.entry.js +3 -3
  212. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -6
  213. package/dist/esm/justifi-terminal-orders-list.entry.js +175 -21
  214. package/dist/esm/justifi-terminals-list-filters.entry.js +3 -4
  215. package/dist/esm/justifi-terminals-list.entry.js +12 -13
  216. package/dist/esm/loader.js +1 -1
  217. package/dist/esm/{package-beXEDfB9.js → package-B6YPrwyC.js} +1 -1
  218. package/dist/esm/pagination-menu.entry.js +1 -1
  219. package/dist/esm/{parts-DnrawQn3.js → parts-CPKMvyV_.js} +1 -1
  220. package/dist/esm/payment-method-option.entry.js +2 -2
  221. package/dist/esm/{payment-provisioning-actions-Dr0YIShV.js → payment-provisioning-actions-cl5xIYnF.js} +2 -2
  222. package/dist/esm/payment-provisioning-form-buttons_2.entry.js +2 -2
  223. package/dist/esm/{payment-provisioning-loading-DI2wDkhm.js → payment-provisioning-loading-Dve2xQA4.js} +1 -1
  224. package/dist/esm/{payment.service-Ckbb7gXA.js → payment.service-5_u-UzTY.js} +1 -2
  225. package/dist/esm/{payments-status-BIDoGw-m.js → payments-status-BlVUt4C1.js} +1 -1
  226. package/dist/esm/{payout.service-BgFKxEoL.js → payout.service-D2zS5y8N.js} +1 -2
  227. package/dist/esm/{payouts-status-1T2NZBoE.js → payouts-status-DCjCGTaa.js} +3 -3
  228. package/dist/esm/{plaid.service-BLguQHs_.js → plaid.service-BiJ65YG8.js} +1 -2
  229. package/dist/esm/radio-list-item.entry.js +2 -2
  230. package/dist/esm/{schema-validations-v6WGlZkq.js → schema-validations-A1o1biOB.js} +13 -3
  231. package/dist/esm/{skeleton-CXGFVqDf.js → skeleton-BEHo2ypu.js} +1 -1
  232. package/dist/esm/{spinner-kSw6PcwU.js → spinner-DIiQZd6_.js} +1 -1
  233. package/dist/esm/{table-CcyuIutB.js → table-DqGfsdys.js} +3 -3
  234. package/dist/esm/table-filters-menu.entry.js +3 -3
  235. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  236. package/dist/esm/{terminal.service-0oISl5j-.js → terminal.service-CIxDfM7V.js} +1 -2
  237. package/dist/esm/{utils-DcfpJGDZ.js → utils-C1B2hVAB.js} +1 -1
  238. package/dist/esm/{utils-BxYS3WDw.js → utils-CX6puxwf.js} +1 -1
  239. package/dist/esm/webcomponents.js +1 -1
  240. package/dist/module/Analytics.js +2 -2
  241. package/dist/module/Plaid.js +2 -2
  242. package/dist/module/{justifi-refund-policy.d.ts → additional-statement.d.ts} +4 -4
  243. package/dist/module/additional-statement.js +6 -0
  244. package/dist/module/{justifi-additional-statement2.js → additional-statement2.js} +8 -8
  245. package/dist/module/badge.js +1 -1
  246. package/dist/module/bank-account-billing-form-simple2.js +1 -1
  247. package/dist/module/billing-form-full2.js +3 -3
  248. package/dist/module/billing-form-schema.js +1 -1
  249. package/dist/module/business-address-schema.js +1 -1
  250. package/dist/module/business-bank-account-form-step2.js +2 -2
  251. package/dist/module/business-core-info-schema.js +1 -1
  252. package/dist/module/business-identity-schema.js +1 -1
  253. package/dist/module/business-owners-form-step2.js +21 -26
  254. package/dist/module/button.js +1 -1
  255. package/dist/module/cancellation-policy.d.ts +11 -0
  256. package/dist/module/cancellation-policy.js +6 -0
  257. package/dist/module/{justifi-cancellation-policy2.js → cancellation-policy2.js} +8 -8
  258. package/dist/module/card-billing-form-simple2.js +1 -1
  259. package/dist/module/country-config.js +1 -1
  260. package/dist/module/custom-popper2.js +2 -2
  261. package/dist/module/{checkouts-list-core.d.ts → customer-details.d.ts} +4 -4
  262. package/dist/module/customer-details.js +6 -0
  263. package/dist/module/{justifi-customer-details2.js → customer-details2.js} +8 -8
  264. package/dist/module/dispute-notification.d.ts +11 -0
  265. package/dist/module/dispute-notification.js +6 -0
  266. package/dist/module/dispute-notification2.js +82 -0
  267. package/dist/module/dispute-response.d.ts +11 -0
  268. package/dist/module/dispute-response.js +6 -0
  269. package/dist/module/{dispute-response-core.js → dispute-response2.js} +105 -53
  270. package/dist/module/duplicate-charge.d.ts +11 -0
  271. package/dist/module/duplicate-charge.js +6 -0
  272. package/dist/module/{justifi-duplicate-charge2.js → duplicate-charge2.js} +8 -8
  273. package/dist/module/electronic-evidence.d.ts +11 -0
  274. package/dist/module/electronic-evidence.js +6 -0
  275. package/dist/module/{justifi-electronic-evidence2.js → electronic-evidence2.js} +8 -8
  276. package/dist/module/event-types3.js +119 -1
  277. package/dist/module/form-alert2.js +1 -1
  278. package/dist/module/form-control-date2.js +2 -2
  279. package/dist/module/form-control-file-v22.js +1 -1
  280. package/dist/module/form-control-file2.js +2 -2
  281. package/dist/module/form-control-monetary2.js +2 -2
  282. package/dist/module/form-control-number-masked2.js +2 -2
  283. package/dist/module/form-control-number2.js +3 -3
  284. package/dist/module/form-control-radio2.js +2 -2
  285. package/dist/module/form-control-select2.js +2 -2
  286. package/dist/module/form-control-text2.js +2 -2
  287. package/dist/module/form-control-textarea2.js +3 -3
  288. package/dist/module/get-payment-details.js +1 -1
  289. package/dist/module/hidden-input2.js +2 -2
  290. package/dist/module/iframe-input2.js +4 -4
  291. package/dist/module/internal-button2.js +1 -1
  292. package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
  293. package/dist/module/justifi-bank-account-form.js +1 -1
  294. package/dist/module/justifi-billing-form-full.js +1 -1
  295. package/dist/module/justifi-button2.js +1 -1
  296. package/dist/module/justifi-card-billing-form-simple.js +1 -1
  297. package/dist/module/justifi-card-form.js +1 -1
  298. package/dist/module/justifi-checkout-summary2.js +1 -1
  299. package/dist/module/justifi-checkouts-list-filters.js +3 -3
  300. package/dist/module/justifi-checkouts-list.js +197 -28
  301. package/dist/module/justifi-dispute-management.js +103 -62
  302. package/dist/module/justifi-gross-payment-chart.js +11074 -24
  303. package/dist/module/justifi-header2.js +1 -1
  304. package/dist/module/justifi-modular-checkout2.js +2 -2
  305. package/dist/module/justifi-order-terminals.js +4 -4
  306. package/dist/module/justifi-payment-details.js +9 -9
  307. package/dist/module/justifi-payment-provisioning.js +53 -59
  308. package/dist/module/justifi-payment-transactions-list.js +2 -2
  309. package/dist/module/justifi-payments-list-filters.js +2 -2
  310. package/dist/module/justifi-payments-list.js +2 -2
  311. package/dist/module/justifi-payout-details.js +4 -4
  312. package/dist/module/justifi-payout-transactions-list.js +2 -2
  313. package/dist/module/justifi-payouts-list-filters.js +3 -3
  314. package/dist/module/justifi-payouts-list.js +2 -2
  315. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  316. package/dist/module/justifi-skeleton.js +1 -1
  317. package/dist/module/justifi-terminal-orders-list-filters.js +4 -4
  318. package/dist/module/justifi-terminal-orders-list.js +184 -22
  319. package/dist/module/justifi-terminals-list-filters.js +2 -2
  320. package/dist/module/justifi-terminals-list.js +3 -3
  321. package/dist/module/justifi-tokenize-payment-method2.js +1 -1
  322. package/dist/module/owner-details2.js +1 -1
  323. package/dist/module/owner-form-inputs2.js +2 -2
  324. package/dist/module/owner-form2.js +177 -33
  325. package/dist/module/package.js +1 -1
  326. package/dist/module/pagination-menu2.js +1 -1
  327. package/dist/module/parts.js +1 -1
  328. package/dist/module/payment-method-option.js +1 -1
  329. package/dist/module/payment-provisioning-form-steps2.js +52 -58
  330. package/dist/module/product-or-service.d.ts +11 -0
  331. package/dist/module/product-or-service.js +6 -0
  332. package/dist/module/{justifi-product-or-service2.js → product-or-service2.js} +8 -8
  333. package/dist/module/radio-list-item2.js +1 -1
  334. package/dist/module/{owner-form-core.d.ts → refund-policy.d.ts} +4 -4
  335. package/dist/module/refund-policy.js +6 -0
  336. package/dist/module/{justifi-refund-policy2.js → refund-policy2.js} +8 -8
  337. package/dist/module/schema-validations.js +13 -3
  338. package/dist/module/shipping-details.d.ts +11 -0
  339. package/dist/module/shipping-details.js +6 -0
  340. package/dist/module/{justifi-shipping-details2.js → shipping-details2.js} +8 -8
  341. package/dist/module/spinner.js +1 -1
  342. package/dist/module/table-filters-menu2.js +1 -1
  343. package/dist/module/terminal-quantity-selector2.js +1 -1
  344. package/dist/module/utils2.js +1 -1
  345. package/dist/types/api/Terminal.d.ts +1 -1
  346. package/dist/types/components/business-forms/owner-form/owner-form.d.ts +69 -5
  347. package/dist/types/components/checkouts-list/justifi-checkouts-list.d.ts +28 -6
  348. package/dist/types/components/dispute-management/{justifi-dispute-notification.d.ts → dispute-notification.d.ts} +1 -1
  349. package/dist/types/components/dispute-management/dispute-response/{justifi-additional-statement.d.ts → additional-statement.d.ts} +1 -1
  350. package/dist/types/components/dispute-management/dispute-response/{justifi-cancellation-policy.d.ts → cancellation-policy.d.ts} +1 -1
  351. package/dist/types/components/dispute-management/dispute-response/{justifi-customer-details.d.ts → customer-details.d.ts} +1 -1
  352. package/dist/types/components/dispute-management/dispute-response/{dispute-response-core.d.ts → dispute-response.d.ts} +21 -10
  353. package/dist/types/components/dispute-management/dispute-response/{justifi-duplicate-charge.d.ts → duplicate-charge.d.ts} +1 -1
  354. package/dist/types/components/dispute-management/dispute-response/{justifi-electronic-evidence.d.ts → electronic-evidence.d.ts} +1 -1
  355. package/dist/types/components/dispute-management/dispute-response/{justifi-product-or-service.d.ts → product-or-service.d.ts} +1 -1
  356. package/dist/types/components/dispute-management/dispute-response/{justifi-refund-policy.d.ts → refund-policy.d.ts} +1 -1
  357. package/dist/types/components/dispute-management/dispute-response/{justifi-shipping-details.d.ts → shipping-details.d.ts} +1 -1
  358. package/dist/types/components/dispute-management/justifi-dispute-management.d.ts +10 -2
  359. package/dist/types/components/gross-payment-chart/justifi-gross-payment-chart.d.ts +13 -2
  360. package/dist/types/components/terminal-orders-list/justifi-terminal-orders-list.d.ts +21 -3
  361. package/dist/types/components.d.ts +304 -551
  362. package/dist/types/utils/checkout-billing-state-options.d.ts +9 -0
  363. package/dist/webcomponents/p-0708cb76.entry.js +1 -0
  364. package/dist/webcomponents/p-0ce6c1b1.entry.js +1 -0
  365. package/dist/webcomponents/p-12ae030d.entry.js +1 -0
  366. package/dist/webcomponents/p-137a36a4.entry.js +1 -0
  367. package/dist/webcomponents/p-1d294e34.entry.js +1 -0
  368. package/dist/webcomponents/{p-4d21df48.entry.js → p-1f34b2f7.entry.js} +1 -1
  369. package/dist/webcomponents/p-1f7f2436.entry.js +1 -0
  370. package/dist/webcomponents/{p-256c5509.entry.js → p-22d19755.entry.js} +1 -1
  371. package/dist/webcomponents/p-2aac2ab6.entry.js +1 -0
  372. package/dist/webcomponents/{p-2425a375.entry.js → p-2dfdecbb.entry.js} +1 -1
  373. package/dist/webcomponents/p-397b28ba.entry.js +20 -0
  374. package/dist/webcomponents/{p-10be75b8.entry.js → p-3cefb032.entry.js} +1 -1
  375. package/dist/webcomponents/p-45668f01.entry.js +1 -0
  376. package/dist/webcomponents/p-46477dfe.entry.js +1 -0
  377. package/dist/webcomponents/{p-befe01ef.entry.js → p-49c13952.entry.js} +1 -1
  378. package/dist/webcomponents/p-4ccf9cd7.entry.js +1 -0
  379. package/dist/webcomponents/p-58b5e08e.entry.js +1 -0
  380. package/dist/webcomponents/p-5G1OMxZz.js +1 -0
  381. package/dist/webcomponents/{p-1e877e0a.entry.js → p-5ec9634c.entry.js} +1 -1
  382. package/dist/webcomponents/{p-8253ef9f.entry.js → p-605bd107.entry.js} +1 -1
  383. package/dist/webcomponents/{p-c9e1df15.entry.js → p-60c65da4.entry.js} +1 -1
  384. package/dist/webcomponents/p-63b7abf3.entry.js +1 -0
  385. package/dist/webcomponents/p-63e88b48.entry.js +1 -0
  386. package/dist/webcomponents/p-65281b33.entry.js +1 -0
  387. package/dist/webcomponents/{p-3c046adc.entry.js → p-70dcd833.entry.js} +1 -1
  388. package/dist/webcomponents/p-7ebed752.entry.js +1 -0
  389. package/dist/webcomponents/p-7ff9ce05.entry.js +1 -0
  390. package/dist/webcomponents/p-8964f4ca.entry.js +1 -0
  391. package/dist/webcomponents/p-89844a98.entry.js +1 -0
  392. package/dist/webcomponents/p-89cd31f2.entry.js +1 -0
  393. package/dist/webcomponents/p-8d6856e7.entry.js +1 -0
  394. package/dist/webcomponents/p-8e821593.entry.js +1 -0
  395. package/dist/webcomponents/p-90f2f71d.entry.js +1 -0
  396. package/dist/webcomponents/p-9153c121.entry.js +1 -0
  397. package/dist/webcomponents/p-91940d05.entry.js +1 -0
  398. package/dist/webcomponents/p-95317547.entry.js +1 -0
  399. package/dist/webcomponents/p-9b944aa4.entry.js +1 -0
  400. package/dist/webcomponents/{p-CR_-qIuN.js → p-APOabprT.js} +1 -1
  401. package/dist/webcomponents/p-Aacb4jqT.js +1 -0
  402. package/dist/webcomponents/p-B5gBiARs.js +1 -0
  403. package/dist/webcomponents/p-B6YPrwyC.js +1 -0
  404. package/dist/webcomponents/{p-bn_huKYG.js → p-BICxxa69.js} +1 -1
  405. package/dist/webcomponents/p-BJu1-9kE.js +1 -0
  406. package/dist/webcomponents/{p-Cej-1bD6.js → p-BXyADlAH.js} +1 -1
  407. package/dist/webcomponents/p-Ba8jdOkX.js +1 -0
  408. package/dist/webcomponents/p-BxKbnILQ.js +1 -0
  409. package/dist/webcomponents/{p-2LVpxCS_.js → p-CHo7TfsM.js} +1 -1
  410. package/dist/webcomponents/p-CHw7tICr.js +1 -0
  411. package/dist/webcomponents/{p-DnrawQn3.js → p-CPKMvyV_.js} +1 -1
  412. package/dist/webcomponents/p-Ce_W43gc.js +1 -0
  413. package/dist/webcomponents/{p-B5vVjDc_.js → p-Cm9f5fyh.js} +1 -1
  414. package/dist/webcomponents/p-CqiVXthx.js +1 -0
  415. package/dist/webcomponents/{p-x9fFFf7F.js → p-Cu7hgXL1.js} +1 -1
  416. package/dist/webcomponents/p-D-zwk1J3.js +1 -0
  417. package/dist/webcomponents/{p-D1D2eC05.js → p-D1_eip6x.js} +1 -1
  418. package/dist/webcomponents/p-D8ytux5N.js +1 -0
  419. package/dist/webcomponents/p-DO9lqnbB.js +1 -0
  420. package/dist/webcomponents/p-DSclFZ32.js +1 -0
  421. package/dist/webcomponents/p-DYHjzFnJ.js +1 -0
  422. package/dist/webcomponents/{p-DgH-jcIo.js → p-DjjAx7PF.js} +1 -1
  423. package/dist/webcomponents/p-Dk26hk5T.js +1 -0
  424. package/dist/webcomponents/p-DrMJliVY.js +1 -0
  425. package/dist/webcomponents/p-NZS8uCtH.js +1 -0
  426. package/dist/webcomponents/p-XIWgia4J.js +1 -0
  427. package/dist/webcomponents/{p-9581d6a1.entry.js → p-a9695714.entry.js} +1 -1
  428. package/dist/webcomponents/p-afe714cb.entry.js +1 -0
  429. package/dist/webcomponents/p-av6jyzyC.js +1 -0
  430. package/dist/webcomponents/p-b0b6083f.entry.js +1 -0
  431. package/dist/webcomponents/p-b192f251.entry.js +1 -0
  432. package/dist/webcomponents/p-b436a7d2.entry.js +1 -0
  433. package/dist/webcomponents/{p-e6e56dbb.entry.js → p-b62ff001.entry.js} +1 -1
  434. package/dist/webcomponents/p-bde7fe69.entry.js +1 -0
  435. package/dist/webcomponents/p-c108cd71.entry.js +1 -0
  436. package/dist/webcomponents/p-c1539656.entry.js +1 -0
  437. package/dist/webcomponents/p-c4415366.entry.js +1 -0
  438. package/dist/webcomponents/p-c8bc235f.entry.js +1 -0
  439. package/dist/webcomponents/{p-09d2efad.entry.js → p-ca87c609.entry.js} +1 -1
  440. package/dist/webcomponents/p-d1eabad2.entry.js +1 -0
  441. package/dist/webcomponents/{p-31e74a5a.entry.js → p-d5e7291a.entry.js} +1 -1
  442. package/dist/webcomponents/p-d79c5ee4.entry.js +1 -0
  443. package/dist/webcomponents/{p-9db1444f.entry.js → p-db09f306.entry.js} +1 -1
  444. package/dist/webcomponents/{p-354fb3c4.entry.js → p-e020f003.entry.js} +1 -1
  445. package/dist/webcomponents/p-e17b92ec.entry.js +1 -0
  446. package/dist/webcomponents/{p-1e8135f0.entry.js → p-e322dcba.entry.js} +1 -1
  447. package/dist/webcomponents/p-e5c2215a.entry.js +1 -0
  448. package/dist/webcomponents/p-e6ec9e6d.entry.js +1 -0
  449. package/dist/webcomponents/p-f1b9cbf0.entry.js +1 -0
  450. package/dist/webcomponents/p-f9aafb21.entry.js +1 -0
  451. package/dist/webcomponents/p-fE5A37L5.js +1 -0
  452. package/dist/webcomponents/{p-bc2af6b4.entry.js → p-ff8cf16c.entry.js} +1 -1
  453. package/dist/webcomponents/p-jIDKmNHy.js +1 -0
  454. package/dist/webcomponents/p-nb_LhbJq.js +1 -0
  455. package/dist/webcomponents/p-oTtn8xDw.js +1 -0
  456. package/dist/webcomponents/p-uZ5KAseb.js +1 -0
  457. package/dist/webcomponents/webcomponents.esm.js +1 -1
  458. package/package.json +2 -2
  459. package/readme.md +7 -14
  460. package/dist/cjs/Dispute-CruQTF6_.js +0 -59
  461. package/dist/cjs/business-additional-questions-schema-CI80eZLJ.js +0 -73
  462. package/dist/cjs/checkouts-list-core.cjs.entry.js +0 -146
  463. package/dist/cjs/checkouts-table-CCxrsy0x.js +0 -55
  464. package/dist/cjs/dispute.service-BbtwY673.js +0 -32
  465. package/dist/cjs/form-control-number_3.cjs.entry.js +0 -249
  466. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +0 -11075
  467. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +0 -61
  468. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +0 -108
  469. package/dist/cjs/terminal-orders-table-Cz6qvzVE.js +0 -83
  470. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +0 -523
  471. package/dist/collection/components/checkouts-list/checkouts-list-core.js +0 -262
  472. package/dist/collection/components/dispute-management/dispute-management-core.js +0 -169
  473. package/dist/collection/components/dispute-management/dispute-response/justifi-dispute-response.js +0 -190
  474. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +0 -139
  475. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +0 -199
  476. package/dist/esm/Dispute-BH0Xfn-F.js +0 -57
  477. package/dist/esm/business-additional-questions-schema-DKudYaoE.js +0 -69
  478. package/dist/esm/business-identity-schema-CFhSc0cA.js +0 -99
  479. package/dist/esm/checkouts-list-core.entry.js +0 -144
  480. package/dist/esm/checkouts-table-C8sPHeTm.js +0 -51
  481. package/dist/esm/dispute.service-vlYGy0nR.js +0 -30
  482. package/dist/esm/form-control-number_3.entry.js +0 -245
  483. package/dist/esm/gross-payment-chart-core.entry.js +0 -11073
  484. package/dist/esm/justifi-dispute-management-core.entry.js +0 -59
  485. package/dist/esm/terminal-orders-list-core.entry.js +0 -106
  486. package/dist/esm/terminal-orders-table-C7KOcRpq.js +0 -79
  487. package/dist/module/checkouts-list-core.js +0 -6
  488. package/dist/module/checkouts-list-core2.js +0 -227
  489. package/dist/module/dispute-management-core.js +0 -193
  490. package/dist/module/dispute-response-actions.js +0 -119
  491. package/dist/module/gross-payment-chart-core.d.ts +0 -11
  492. package/dist/module/gross-payment-chart-core.js +0 -6
  493. package/dist/module/gross-payment-chart-core2.js +0 -11096
  494. package/dist/module/justifi-additional-statement.d.ts +0 -11
  495. package/dist/module/justifi-additional-statement.js +0 -6
  496. package/dist/module/justifi-cancellation-policy.d.ts +0 -11
  497. package/dist/module/justifi-cancellation-policy.js +0 -6
  498. package/dist/module/justifi-customer-details.d.ts +0 -11
  499. package/dist/module/justifi-customer-details.js +0 -6
  500. package/dist/module/justifi-dispute-management-core.d.ts +0 -11
  501. package/dist/module/justifi-dispute-management-core.js +0 -6
  502. package/dist/module/justifi-dispute-notification.d.ts +0 -11
  503. package/dist/module/justifi-dispute-notification.js +0 -6
  504. package/dist/module/justifi-dispute-notification2.js +0 -85
  505. package/dist/module/justifi-dispute-response-core.d.ts +0 -11
  506. package/dist/module/justifi-dispute-response-core.js +0 -6
  507. package/dist/module/justifi-dispute-response.d.ts +0 -11
  508. package/dist/module/justifi-dispute-response.js +0 -6
  509. package/dist/module/justifi-dispute-response2.js +0 -198
  510. package/dist/module/justifi-duplicate-charge.d.ts +0 -11
  511. package/dist/module/justifi-duplicate-charge.js +0 -6
  512. package/dist/module/justifi-electronic-evidence.d.ts +0 -11
  513. package/dist/module/justifi-electronic-evidence.js +0 -6
  514. package/dist/module/justifi-product-or-service.d.ts +0 -11
  515. package/dist/module/justifi-product-or-service.js +0 -6
  516. package/dist/module/justifi-refund-policy.js +0 -6
  517. package/dist/module/justifi-shipping-details.d.ts +0 -11
  518. package/dist/module/justifi-shipping-details.js +0 -6
  519. package/dist/module/owner-form-core.js +0 -6
  520. package/dist/module/owner-form-core2.js +0 -262
  521. package/dist/module/terminal-orders-list-core.d.ts +0 -11
  522. package/dist/module/terminal-orders-list-core.js +0 -6
  523. package/dist/module/terminal-orders-list-core2.js +0 -209
  524. package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +0 -88
  525. package/dist/types/components/checkouts-list/checkouts-list-core.d.ts +0 -34
  526. package/dist/types/components/dispute-management/dispute-management-core.d.ts +0 -18
  527. package/dist/types/components/dispute-management/dispute-response/justifi-dispute-response.d.ts +0 -35
  528. package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +0 -21
  529. package/dist/types/components/terminal-orders-list/terminal-orders-list-core.d.ts +0 -28
  530. package/dist/webcomponents/p--e0ff06z.js +0 -1
  531. package/dist/webcomponents/p-032b4553.entry.js +0 -1
  532. package/dist/webcomponents/p-042daaf8.entry.js +0 -1
  533. package/dist/webcomponents/p-0638f0bd.entry.js +0 -1
  534. package/dist/webcomponents/p-0b3f4f22.entry.js +0 -1
  535. package/dist/webcomponents/p-1c4f5f1d.entry.js +0 -1
  536. package/dist/webcomponents/p-24935254.entry.js +0 -1
  537. package/dist/webcomponents/p-2a755daf.entry.js +0 -1
  538. package/dist/webcomponents/p-3488951f.entry.js +0 -1
  539. package/dist/webcomponents/p-437a99dc.entry.js +0 -1
  540. package/dist/webcomponents/p-49c0cd3a.entry.js +0 -1
  541. package/dist/webcomponents/p-50f5e313.entry.js +0 -1
  542. package/dist/webcomponents/p-52908814.entry.js +0 -1
  543. package/dist/webcomponents/p-587886f1.entry.js +0 -1
  544. package/dist/webcomponents/p-5ef355ce.entry.js +0 -1
  545. package/dist/webcomponents/p-5ef854e0.entry.js +0 -1
  546. package/dist/webcomponents/p-67498c25.entry.js +0 -1
  547. package/dist/webcomponents/p-6917aa3c.entry.js +0 -1
  548. package/dist/webcomponents/p-6d81822f.entry.js +0 -1
  549. package/dist/webcomponents/p-6f0c582a.entry.js +0 -1
  550. package/dist/webcomponents/p-80652cf8.entry.js +0 -1
  551. package/dist/webcomponents/p-82fe02e4.entry.js +0 -1
  552. package/dist/webcomponents/p-83147f23.entry.js +0 -1
  553. package/dist/webcomponents/p-8c2427ed.entry.js +0 -1
  554. package/dist/webcomponents/p-92de00d7.entry.js +0 -1
  555. package/dist/webcomponents/p-94306884.entry.js +0 -1
  556. package/dist/webcomponents/p-9937e2e7.entry.js +0 -1
  557. package/dist/webcomponents/p-9dca1331.entry.js +0 -1
  558. package/dist/webcomponents/p-9f74d7ea.entry.js +0 -1
  559. package/dist/webcomponents/p-B--N37zY.js +0 -1
  560. package/dist/webcomponents/p-BH0Xfn-F.js +0 -1
  561. package/dist/webcomponents/p-Bg2SZArf.js +0 -1
  562. package/dist/webcomponents/p-BovgIz83.js +0 -1
  563. package/dist/webcomponents/p-BsQy297i.js +0 -1
  564. package/dist/webcomponents/p-CDf5H0TB.js +0 -1
  565. package/dist/webcomponents/p-CUI41_5y.js +0 -1
  566. package/dist/webcomponents/p-CX36GHQP.js +0 -1
  567. package/dist/webcomponents/p-Cf6HoQKl.js +0 -1
  568. package/dist/webcomponents/p-CsdYMTrc.js +0 -1
  569. package/dist/webcomponents/p-D4OlsyTo.js +0 -1
  570. package/dist/webcomponents/p-D8EGHc_m.js +0 -1
  571. package/dist/webcomponents/p-DPmnGTmg.js +0 -1
  572. package/dist/webcomponents/p-DWevPe7C.js +0 -1
  573. package/dist/webcomponents/p-Dbg501Lu.js +0 -1
  574. package/dist/webcomponents/p-DcBvJu0k.js +0 -1
  575. package/dist/webcomponents/p-DkdzUTnl.js +0 -1
  576. package/dist/webcomponents/p-HT_4DkD0.js +0 -1
  577. package/dist/webcomponents/p-MDZuGvsl.js +0 -1
  578. package/dist/webcomponents/p-XrKLre8M.js +0 -1
  579. package/dist/webcomponents/p-_-2E_vYf.js +0 -1
  580. package/dist/webcomponents/p-a75d76ff.entry.js +0 -1
  581. package/dist/webcomponents/p-a7778957.entry.js +0 -1
  582. package/dist/webcomponents/p-a9d7cdae.entry.js +0 -1
  583. package/dist/webcomponents/p-b060a9c9.entry.js +0 -1
  584. package/dist/webcomponents/p-b06910b0.entry.js +0 -1
  585. package/dist/webcomponents/p-b483e71b.entry.js +0 -1
  586. package/dist/webcomponents/p-bdf21f71.entry.js +0 -1
  587. package/dist/webcomponents/p-be5d1005.entry.js +0 -1
  588. package/dist/webcomponents/p-beXEDfB9.js +0 -1
  589. package/dist/webcomponents/p-bfe2583d.entry.js +0 -1
  590. package/dist/webcomponents/p-c09fccd3.entry.js +0 -1
  591. package/dist/webcomponents/p-c827cbc9.entry.js +0 -1
  592. package/dist/webcomponents/p-cc5b7c27.entry.js +0 -1
  593. package/dist/webcomponents/p-d878df6c.entry.js +0 -1
  594. package/dist/webcomponents/p-ddf699e6.entry.js +0 -20
  595. package/dist/webcomponents/p-e0b3735f.entry.js +0 -1
  596. package/dist/webcomponents/p-ea30cf08.entry.js +0 -1
  597. package/dist/webcomponents/p-edf5a854.entry.js +0 -1
  598. package/dist/webcomponents/p-ef89824b.entry.js +0 -1
  599. package/dist/webcomponents/p-fc7ba195.entry.js +0 -1
  600. package/dist/webcomponents/p-hhdRync5.js +0 -1
  601. package/dist/webcomponents/p-niGr4RT2.js +0 -1
  602. package/dist/webcomponents/p-pL4dNfsl.js +0 -1
  603. package/dist/webcomponents/p-qcQTYcr3.js +0 -1
  604. package/dist/webcomponents/p-qrNmDp6K.js +0 -1
  605. package/dist/webcomponents/p-uCg79W3M.js +0 -1
  606. package/dist/webcomponents/p-zi3ljCdQ.js +0 -1
@@ -1,21 +0,0 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { Chart } from 'chart.js';
3
- import { GrossVolumeReport } from '../../api/GrossVolume';
4
- import { ComponentErrorEvent } from '../../api/ComponentEvents';
5
- export declare class GrossPaymentChartCore {
6
- chart: Chart;
7
- chartRef: HTMLCanvasElement;
8
- getGrossPayment: Function;
9
- grossVolumeReport: GrossVolumeReport;
10
- loading: boolean;
11
- errorMessage: string;
12
- errorEvent: EventEmitter<ComponentErrorEvent>;
13
- componentDidLoad(): void;
14
- propChanged(): void;
15
- grossVolumeReportChanged(grossVolumeReport: GrossVolumeReport): void;
16
- fetchData(): Promise<void>;
17
- initChart(grossVolumeReport: GrossVolumeReport): void;
18
- updateChartData(grossVolumeReport: GrossVolumeReport): void;
19
- disconnectedCallback(): void;
20
- render(): any;
21
- }
@@ -1,28 +0,0 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { Table } from '../../utils/table';
3
- import { ComponentClickEvent, ComponentErrorEvent, PagingInfo } from '../../api';
4
- import { TerminalOrder } from '../../api';
5
- export declare class TerminalOrdersListCore {
6
- getTerminalOrders: Function;
7
- columns: string;
8
- terminalOrders: TerminalOrder[];
9
- terminalOrdersTable: Table<TerminalOrder>;
10
- loading: boolean;
11
- errorMessage: string;
12
- paging: PagingInfo;
13
- pagingParams: any;
14
- updateOnPropChange(): void;
15
- clickEvent: EventEmitter<ComponentClickEvent>;
16
- errorEvent: EventEmitter<ComponentErrorEvent>;
17
- componentWillLoad(): void;
18
- fetchData(): void;
19
- handleClickPrevious: (beforeCursor: string) => void;
20
- handleClickNext: (afterCursor: string) => void;
21
- rowClickHandler: (e: any) => void;
22
- get terminalOrderParams(): any;
23
- get entityId(): string[];
24
- get showEmptyState(): boolean;
25
- get showErrorState(): boolean;
26
- get showRowData(): boolean;
27
- render(): any;
28
- }
@@ -1 +0,0 @@
1
- import{A as e}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const n=e();class r{async fetchTerminals(e,r,s){return n.get({endpoint:"terminals",params:s,headers:{Account:e},authToken:r})}async fetchTerminal(e,r){return n.get({endpoint:`terminals/${e}`,authToken:r})}async fetchTerminalModels(e,r){return n.get({endpoint:"terminals/order_models",headers:{"sub-account":e},authToken:r})}async orderTerminals(e,r){return n.post({endpoint:"terminals/orders",body:r,headers:{"sub-account":r.sub_account_id},authToken:e})}}export{r as T}
@@ -1 +0,0 @@
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"./p-CUI41_5y.js";import{p as a}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{T as i,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as f,i as b,j as u,k as m,l as g}from"./p-bn_huKYG.js";import{T as y}from"./p-CZfYo5-1.js";import{c as l,a as j}from"./p-Cf6HoQKl.js";import{o as k,g as C}from"./p-AMVhBsGv.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-DnrawQn3.js";import"./p-CDf5H0TB.js";import"./p-pL4dNfsl.js";const v=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=a,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:y.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new i(this.checkouts,this.columns,l,j),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await 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.checkouts=this.checkouts.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 checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"ab929041216a2d6ea8db78b3bbf6d5fa3d4458fd"},e(r,{key:"264d246a1783be1c99fb2a7487328a32d4e3b47b"},e(h,{key:"b9be65c5b7a9144c780109ae906f49ea8c4023b4"},e(o,{key:"47b22c689bd63c0cfe99045c6f37a8c1c92ef8a9"},this.checkoutsTable.columnData.map((t=>t)))),e(c,{key:"7b2a39f309a2aa347f3124a79bc55a0a333a1900"},e(n,{key:"ac94a5f253572e08a4d01df82397f60912089e38",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"95855989aac418e6eb79ae9a0eee75a50ef96cc1",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"a8d9c0a2539d2565335a8da007d78771f3bfdc72",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.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:"1126b1f5c12e10bed93aa3c5a004a3d3491dd97f"},e(u,{key:"611fcf13988992f531ecb9d0b94ee4ba3a103d30"},e(m,{key:"cb77f614fe7b89737e4e22d60d18501af272f970",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"17996865c38f710fbe39ec2dce031baf9b5faaaf",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{v as checkouts_list_core}
@@ -1 +0,0 @@
1
- import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import{f as d,p as s,c as l}from"./p-CpGEMRkH.js";import{f as i,a as c}from"./p-DnrawQn3.js";import{S as r}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as f,a as o}from"./p-BRnBHsdq.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const b=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=f(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({payment_id:this.paymentId,terminal_id:this.terminalId,payment_status:this.paymentStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,account_holder:this.accountHolder,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get paymentStatusOptions(){return[{label:"All",value:""},{label:"Pending",value:"pending"},{label:"Authorized",value:"authorized"},{label:"Succeeded",value:"succeeded"},{label:"Failed",value:"failed"},{label:"Disputed",value:"disputed"},{label:"Refunded",value:"refunded"}]}get paymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:"ecom"},{label:"ACH",value:"ach"},{label:"Card Present",value:"card_present"}]}render(){const e=Object.assign({},d);return a(r,{key:"7239157d27cff26ea5528329bfca3723819734f7"},a("table-filters-menu",{key:"2a35afad1c98d866a760f5ece5cccaed59a68afe",params:e,clearParams:l,part:i},a("div",{key:"5e6a94571beb586b64672e6def26b0af367188af",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"1b5f9000a447b25ec751c4e54fb2525d70c0b949",class:"p-2"},a("form-control-text",{key:"d2bc10bc3b8ca99b41b7ed4bc93f149692aabda9",name:"payment_id",label:"Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.paymentId||d.payment_id,disabled:!!this.paymentId,part:c})),a("div",{key:"679da822c026a83e86ef0e055a26fc4963173e68",class:"p-2"},a("form-control-text",{key:"12083ad10bf9c8b2f207ee3ea0a74c32a7176a11",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||d.terminal_id,disabled:!!this.terminalId,part:c})),a("div",{key:"dbb6570354460ec261c889e7a45eddf0c407ef22",class:"p-2"},a("form-control-select",{key:"28406bc8f4273a903d26d89d431beb411a288fb5",name:"payment_status",label:"Status",options:this.paymentStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentStatus||d.payment_status||"",disabled:!!this.paymentStatus,part:c})),a("div",{key:"01511cce2def1253b5be7a53defb50bdb659c7bd",class:"p-2"},a("form-control-select",{key:"9cd3148c5f944825ac97dcf85f0e7780c712f3f2",name:"payment_mode",label:"Payment Mode",options:this.paymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||d.payment_mode||"",disabled:!!this.paymentMode,part:c})),a("div",{key:"b834569a7db874cb3426aa8d31b909fc99d9bafb",class:"p-2"},a("form-control-text",{key:"f2f4d01e739a17ca7b84a9153cdcfa9ff1f6e233",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||d.checkout_id,disabled:!!this.checkoutId,part:c})),a("div",{key:"81e701c6a73504706b79f1f6177b9de3413d0741",class:"p-2"},a("form-control-text",{key:"5b82aab4b4a3e17466c66de4454cdda6c007d1c5",name:"account_holder",label:"Account Holder",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.accountHolder||d.account_holder,disabled:!!this.accountHolder,part:c})),a("div",{key:"bce1fa46f53f4056e11d94c30b93ff6ee4036a4c",class:"p-2"},a("form-control-date",{key:"c13f82cdf9e2736bf45be98dc994f9e402f7bb2e",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:o(this.createdAfter,{showInputDateTime:!0})||o(d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:c})),a("div",{key:"d4c3db0970e19065a5cafb74491081e7897ce751",class:"p-2"},a("form-control-date",{key:"d7fa40e94c4da778ead2c4fa1dc5511783d55f3e",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:o(this.createdBefore,{showInputDateTime:!0})||o(d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:c})))))}};export{b as justifi_payments_list_filters}
@@ -1 +0,0 @@
1
- import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-C_ifLmT1.js";import"./p-DVJaoI_m.js";import{c as s,a as l}from"./p-BRnBHsdq.js";import{I as d,a as i}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{f as c,p as r,c as o}from"./p-AMVhBsGv.js";import{f as p,a as f}from"./p-DnrawQn3.js";import{S as b}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{c[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({status:this.checkoutStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,successful_payment_id:this.successfulPaymentId,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(r[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:d.created},{label:"Completed",value:d.completed},{label:"Attempted",value:d.attempted},{label:"Expired",value:d.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:i.ecom},{label:"BNPL",value:i.bnpl},{label:"Apple Pay",value:i.apple_pay}]}render(){const e=Object.assign({},c);return a(b,{key:"1a55c7d5e185991eeaa7b5a58c447dc229281368"},a("table-filters-menu",{key:"0dbea29d3dc84376462d61d6c0591166b86a47e1",params:e,clearParams:o,part:p},a("div",{key:"88e49e1259669f6fc20e7947858f703e8a72fcd6",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"52502aa4976f3b046d58ff8377dc1350b3e10f30",class:"p-2"},a("form-control-text",{key:"e4baba52dd0bd17c571c55e8b4793dc6aca37dae",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||c.checkout_id,disabled:!!this.checkoutId,part:f})),a("div",{key:"979bc95675a30e20c54bc501675682573a278c0a",class:"p-2"},a("form-control-text",{key:"af46d55904f0ed639519335212a88bf92eaa1146",name:"successful_payment_id",label:"Successful Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.successfulPaymentId||c.successful_payment_id,disabled:!!this.successfulPaymentId,part:f})),a("div",{key:"aa44b5c554324653cdc4bb70fb230605f38204ca",class:"p-2"},a("form-control-select",{key:"49a76ec2a929b76ef87e2c2098ed6bb4523b499d",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||c.status||"",disabled:!!this.checkoutStatus,part:f})),a("div",{key:"48be0da14579ea55be39dd3bb239ba4c8dd9321d",class:"p-2"},a("form-control-select",{key:"9e3111a896e7364ad6c35997e625270ed4f239d0",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||c.payment_mode||"",disabled:!!this.paymentMode,part:f})),a("div",{key:"38a52faf33e088c3119ffabbe3b52965e4f3f896",class:"p-2"},a("form-control-date",{key:"a2167a3113fd736b95138cd3da14573e0ad2558f",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:l(this.createdAfter,{showInputDateTime:!0})||l(c.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:f})),a("div",{key:"0ae414564ad4dfc7fb84c202320d110a1bf9dc6a",class:"p-2"},a("form-control-date",{key:"c3130e521009eab1df12283a275459ff5f82aa75",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:l(this.createdBefore,{showInputDateTime:!0})||l(c.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:f})))))}};export{m as justifi_checkouts_list_filters}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{B as a,C as d,D as c}from"./p-DnrawQn3.js";const i=class{constructor(s){e(this,s),this.selectedQuantityChange=t(this,"selectedQuantityChange",7),this.limit=1/0,this.selectedQuantity=0,this.removeUnit=()=>{this.selectedQuantity>0&&(this.selectedQuantity--,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))},this.addUnit=()=>{this.limit>0&&(this.selectedQuantity++,this.selectedQuantityChange.emit({modelName:this.modelName,quantity:this.selectedQuantity}))}}render(){return s("div",{key:"94b37f690afbe452cda9d074d97b3e6c7b91c096",class:"rounded shadow-sm card p-2",part:c},s("div",{key:"7913be88b93a02e7499a59b416867c81e736a6cd",class:"d-flex gap-3"},s("div",{key:"55f8b57b980689ed799c6a6ed798dd4c4ad0bd89",class:"d-flex align-items-center"},s("img",{key:"8068f7f20ff719bed021f88e644dde9f8903de05",src:this.imageUrl,alt:this.modelName,height:75,width:75,part:a})),s("div",{key:"d86a6301ca11bcbe33920e5608bfb948dffdae6e",class:"d-flex flex-column flex-grow-1 gap-3 p-4 justify-content-center"},s("div",{key:"154c785be7d7785458eaeed6a9a516d4677b544c",class:"row"},s("div",{key:"2adc08a9d50ca00c73317024ad1bde393d82efa0",class:"col-6 d-flex gap-2"},this.modelName,s("form-control-tooltip",{key:"21ea5803e18053463d343254d9ed29c98c76757f",helpText:this.description})),s("div",{key:"e862c0de5720cfb876fcc47792c0e12a0266babd",class:"col-6 d-flex justify-content-end align-items-center"},s("button",{key:"50bb2dc585b0f49591871d6ae993eb2850892ffb",class:"p-0 minus btn",onClick:this.removeUnit,part:d},"-"),s("div",{key:"ceba1a29cb4779b9e057e3066072b21cef86dcfd",class:"w-25 text-center"},this.selectedQuantity),s("button",{key:"00dfc649818d014f065ee07da3b71c61c7cda03d",class:"p-0 plus btn",onClick:this.addUnit,part:d},"+"))))))}};export{i as terminal_quantity_selector}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BRnBHsdq.js";import{t as a,a8 as r}from"./p-DnrawQn3.js";import{B as d}from"./p-2LVpxCS_.js";import{S as c}from"./p-BqNNwq6C.js";import{S as o}from"./p-DcBvJu0k.js";import"./p-CZfYo5-1.js";import{C as n,e as h}from"./p-CUI41_5y.js";import{g as p,a as f}from"./p-B5vVjDc_.js";import{D as l}from"./p-hhdRync5.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b}from"./p-DgH-jcIo.js";import{J as y}from"./p-zi3ljCdQ.js";import"./p-HXpYMWUU.js";import"./p-BH0Xfn-F.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-beXEDfB9.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(c,{key:"736e9c381309e08926162292fdbf7b62cc2087e9"},this.isLoading&&s("div",{key:"21bdc2b142c32d00323211dda36074976b63dbb4",style:{marginBottom:"8px"}},s(o,{key:"e73b642a8c2a02b397affeb1fff5e5c35a3d87fb",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"8ba58aa2227e88903a3eccc2bb8b577c05515139",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"fb88ccd69ee44cf8af5e9093906fc21016a2a5b6",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"e1fb6db600ef9418b47eb5e51ef8c62f4b005183",part:a},s("h1",{key:"ac2e9efc93c68d30f2a20ce2816c668826adfe6d",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"6d189ad1eaa6c9e144749a5bab6aefcf3541e382"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"2212952890d5fedb650c15d6e526e3fbf9ab9a68",part:a},s("h1",{key:"67426dbff584f957e89a8d86570fab038de53f8d",class:"h4",part:r},"This payment is disputed"),s("p",{key:"513490e2c25f4b12d1400d74862618aaf9794bd3"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"352898d8cae890914bf8feffd0ca913b71cd6c18",class:"h5"},"Dispute details"),s("div",{key:"b2b00e53e015d2cfb7a58ee66220af6dbb22467a",class:"d-table gap-2"},s("div",{key:"ee7162b5c176c1d334f09cdda553a1ef6e9b1dd0",class:"d-table-row gap-2"},s("span",{key:"863e381c1610481ae609e4f9e3bc4d4cba6981cb",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"a4860c2b8b4f9f79cea5b45e8da37509368e02fd",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"15b6c3183065af7771ffd31971e9c120c28cb285",class:"d-table-row gap-2"},s("span",{key:"1a43935f1a8fa71dbd7b511430d5b29179a00d40",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"6351bb9fcc392700e52f6a19a5b7796f0db81b7c",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"07badb71175a086399c2cd7e21f20eef2dc71547",class:"d-table-row gap-2"},s("span",{key:"7f000a4206424cd4808d5cd9a20c339bf3ecaf18",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"a768799fd24012e11c9a3907f9da9959c815d475",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"b077e8d4e7c446db5c46f41174dbbf18647da81d",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"b113557e1ebabd4d787d95d3cf65c50c66085f0b",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"8fc56615440cd75503c7ce9324670592e1c88068",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"1419d80deb612294fe979d8cbf2fb76eab05c30c",part:a},s("h1",{key:"d77570d765ec7c1161c29f667911df1a40004c5b",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"b4e258895b34f062b244d710a0b947e08bb5bbea"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"7e32157b5bcdc02bfd125b9b03607f67488ab48e",part:a},s("h1",{key:"d087b4fcb56468bd8aa9904286f858591af94ba1",class:"h4",part:r},"This payment was disputed"),s("p",{key:"0aa0f4003d253874c6bd639afffba2ca37c9985e"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"f3855957e8222a4837f5cee6026b0c56df3ed185",part:a},s("h1",{key:"1c0261b5d45e54b26982be2112b92d8585933b7a",class:"h4",part:r},"This payment was disputed"),s("p",{key:"f8ae5063b7254794687af55b989a5f282846fbfb"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"fb08d6796fe7740f292eff620d04e943adb30b22"},s("justifi-dispute-response-core",{key:"cb1859a262749d3e11c14844e5a9a5909970ee06","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"2cc3b2abef27f1ecf146dca2423fe07efd98c816",class:"row gy-3"},s("div",{key:"4c0303a7ad858568888c1345709858ac922ec176",class:"col-12"},s("h1",{key:"e857a204a17cb406790023c68e1f2908e3e194bc",class:"h4",part:r},"Counter dispute")),s("div",{key:"bff6c1e8d5852569d868829aaf6721e8489ee577",class:"col-12"},this.currentStepComponent),s("div",{key:"4ea8230871e5f0b90e4fed95821bf1ed6ba6ad83",class:"col-12"},s("div",{key:"a489196afb70fc4fc7c14c8ad2d55253b6f71a64",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e,H as i,g as a}from"./p-CV0Pyo1O.js";import{w as o,x as r,q as h,u as f,v as l}from"./p-DnrawQn3.js";import{F as c}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";const n=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.fileSelected=s(this,"fileSelected",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=t=>{const s=t.target,e=s.getAttribute("name");this.inputHandler(e,s.value),this.formControlInput.emit({name:e,value:s.value})},this.changeHandler=()=>{const t=this.fileInput.files;t&&this.fileSelected.emit({fileList:t,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let t=o;return this.errorText&&(t=h),this.disabled&&(t=f),this.isFocused&&(t=l),t}render(){return e(i,{key:"6029c84182825326d6bbd77aca89907f569bd508"},e("div",{key:"1c32a3ee26adb61444af0ab39d8783cb5ec17f0a",class:"form-group d-flex flex-column"},e("div",{key:"5018405df5c3275e6c5b2e225898e30ceaa74ca5",class:"d-flex align-items-start gap-2"},e("label",{key:"769a3e84e5439e600bc579bfa8b7091f8105b3c4",part:r,class:"form-label",htmlFor:this.name},this.label),e("form-control-tooltip",{key:"6559a3b53cf6456f0b9f4b5eed34a377ec9af4b8",helpText:this.helpText})),e("input",{key:"b1f15be1f9a3e38f65fa6475d6454ebbfdf9f612",ref:t=>this.fileInput=t,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),e(c,{key:"c90a103f4e21948b70643a1f35fd7321f51cf21a",errorText:this.errorText,name:this.name})))}get el(){return a(this)}};export{n as form_control_file}
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{l as s,C as a,e as r}from"./p-CUI41_5y.js";import{J as n}from"./p-zi3ljCdQ.js";import{c as o}from"./p-DgH-jcIo.js";import{T as c}from"./p--e0ff06z.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as d,a as p}from"./p-B5vVjDc_.js";import{m,S as l}from"./p-qcQTYcr3.js";import{S as u}from"./p-BqNNwq6C.js";import{T as f,l as b,a as v,b as g,c as j,d as k,e as y,f as _,g as w,h as T,i as C,j as S,k as D}from"./p-bn_huKYG.js";import{T as O}from"./p-CZfYo5-1.js";import{B as I,a as P}from"./p-pL4dNfsl.js";import{a3 as A,a4 as B}from"./p-DnrawQn3.js";import{k as N}from"./p-BRnBHsdq.js";import{o as x,g as E}from"./p-Dw63wyhO.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-CDf5H0TB.js";const H={nickname:()=>t("th",{part:A,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:A,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:A,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:A,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:A,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:A,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:A,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:A,scope:"col",title:"The current status of each terminal"},"Status")},q={nickname:(e,i)=>t("td",{part:B(i)},e.nickname),model_name:(e,i)=>t("td",{part:B(i)},e.model_name),id:(e,i)=>t("td",{part:B(i)},e.id),provider:(e,i)=>t("td",{part:B(i)},N(e.provider)),provider_serial_number:(e,i)=>t("td",{part:B(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:B(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:B(i)},e.sub_account_name),status:(e,i)=>t("td",{part:B(i)},t(P,Object.assign({},{connected:{variant:I.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:I.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:I.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:I.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:I.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},z=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,H,q),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),x("set",(()=>{this.pagingParams={}})),x("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new l}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=E();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(u,{key:"3429d0dc6534dda4e9dc6417924040a53fd5a032"},t(b,{key:"00c6172e8bb77ed0824381785b17fdd556c942a1"},t(v,{key:"d0119d84743bb06d1e0562eee3124197d46f3b13"},t(g,{key:"9721788579474c7db31587f57ff1aa4159cae7c3"},t(j,{key:"e689b5546ad32ad75bcbedb0cf184b4a6adf1bf3"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"220a3f509f17333888640b0034da30d9375c4100"},t(y,{key:"d444e883ddd69ef5b05754476e6ea66c598a2c5f",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(_,{key:"a6ee22d5138114688ff2c8525e8b5ce8fb00a853",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(w,{key:"e151dba5915e622eb7a63ce7912fabe6924df7dd",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(C,{key:"91c0903d8c81817f82e7a8864a4188fac602af87"},t(S,{key:"322abe78babc127fccb9309c14c91b30a5d86700"},t(D,{key:"e9843c61dd4eb031f514ff35f3354998dfaec59e",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"d6b0bdaa7459afb8cd164c540843e7a4d8376f53",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{z as justifi_terminals_list}
@@ -1 +0,0 @@
1
- import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{i as a,C as i,e as o}from"./p-CUI41_5y.js";import{J as r}from"./p-zi3ljCdQ.js";import{c as h}from"./p-DgH-jcIo.js";import{P as c}from"./p-CX36GHQP.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as p,a as d}from"./p-B5vVjDc_.js";import{M as u,m}from"./p-Cej-1bD6.js";import{m as l,S as f}from"./p-qcQTYcr3.js";import{S as b}from"./p-BqNNwq6C.js";import{T as y,l as g,a as j,b as v,c as C,d as _,e as w,f as k,g as S,h as T,i as D,j as P,k as O}from"./p-bn_huKYG.js";import{T as A}from"./p-CZfYo5-1.js";import{a as I}from"./p-BRnBHsdq.js";import{a3 as E,a4 as B}from"./p-DnrawQn3.js";import{o as H,g as V}from"./p-Dm07nLGs.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";import"./p-pL4dNfsl.js";import"./p-CDf5H0TB.js";const G={created_at:()=>t("th",{part:E,scope:"col",title:"The date the payout was deposited"},"Created"),sub_account_name:()=>t("th",{part:E,scope:"col",title:"The sub account associated with the payout"},"Sub Account"),payments_total:()=>t("th",{part:E,scope:"col",title:"The total payments amount associated with the payout"},"Payments"),refunds_total:()=>t("th",{part:E,scope:"col",title:"The total refunds amount associated with the payout"},"Refunds"),fees_total:()=>t("th",{part:E,scope:"col",title:"The total fees amount associated with the payout"},"Fees"),other_total:()=>t("th",{part:E,scope:"col",title:"The total other amount"},"Other"),amount:()=>t("th",{part:E,scope:"col",title:"The total amount of the payout"},"Amount"),status:()=>t("th",{part:E,scope:"col",title:"The real-time status of each payout"},"Status"),csv:()=>t("th",{part:E,scope:"col",title:"Export CSV"})},L=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event",7),this.clickEvent=e(this,"click-event",7),this.errorMessage=null,this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv",this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:o.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:A.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:A.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:A.row,data:a})}}componentWillLoad(){var s;h(),this.analytics=new r(this),this.initializeGetData(),this.payoutsTable=new y(this.payouts,this.columns,G,(s=this.downloadCSV,{created_at:(s,e)=>t("td",{part:B(e)},t("div",{class:"fw-bold"},I(s.created_at,{showDisplayDate:!0}))),sub_account_name:(s,e)=>t("td",{part:B(e)},s.sub_account_name),payments_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.payments_total)),refunds_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.refunds_total)),fees_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.fees_total)),other_total:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.other_total)),amount:(s,e)=>t("td",{part:B(e)},s.formattedPaymentAmount(s.amount)),status:(s,e)=>t("td",{part:B(e)},u(s.status)),csv:(e,a)=>t("td",{part:B(a)},t("a",{href:"#",onClick:t=>{t.preventDefault(),s(e.id)}},"CSV"))})),this.getPayouts&&this.getSubAccounts&&this.fetchData(),H("set",(()=>{this.pagingParams={}})),H("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new c};this.getPayouts=(({id:t,authToken:s,service:e})=>async({params:o,onSuccess:r,onError:h})=>{var c,n;try{const u=await e.fetchPayouts(t,s,o);if(u.error)return h({error:d(u.error),code:p(null===(n=u.error)||void 0===n?void 0:n.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);r({payouts:(null===(c=u.data)||void 0===c?void 0:c.map((t=>new a(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return h({error:t.message||t,code:s,severity:i.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=l({primaryAccountId:this.accountId,authToken:this.authToken,service:new f}))}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=V();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 t(b,{key:"1307a34cfcaf42f829d28b18d893dd5c55aadaa3"},t(g,{key:"481cd3ce90a935edc54286bd732547593c41ffed"},t(j,{key:"d8309908dd108ab194213c76b13d508bf41a3f6c"},t(v,{key:"8c70c0061a8dc486639c7fa43825076b04aebe5b"},t(C,{key:"0a53aa8c15efe99cfdbeb458bafaa8a25a10ee62"},this.payoutsTable.columnData.map((t=>t)))),t(_,{key:"c998709519b531686f24ff02d0560b7a000fbdcd"},t(w,{key:"2848b295a5483417fe8568b2e7d61803726310be",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),t(k,{key:"281a9cbf369914b60d37c54ab351d5cc7865f723",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),t(S,{key:"c7709f1546a4918b691ec3661903b00167145060",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((s,e)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[e],onClick:this.rowClickHandler},s)))),this.paging&&t(D,{key:"72682c5570fae84c4128268f734d96206f234774"},t(P,{key:"d391fc3195afc66336d966fb56057f9e89eda3de"},t(O,{key:"3403c09520cb0847d1635e6b862eab6563fb7113",colSpan:this.payoutsTable.columnData.length},t("pagination-menu",{key:"4d5d70bab5169ddf181c5216a7e4551356e9fc15",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{L as justifi_payouts_list}
@@ -1 +0,0 @@
1
- import{r as i,h as s}from"./p-CV0Pyo1O.js";import{J as o}from"./p-zi3ljCdQ.js";import{c as r}from"./p-DgH-jcIo.js";import{w as t}from"./p-DVJaoI_m.js";import{S as p}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-CUI41_5y.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-D8GTwl9v.js";const a=class{constructor(s){i(this,s)}async componentWillLoad(){await t(),r(),this.analytics=new o(this)}disconnectedCallback(){var i;null===(i=this.analytics)||void 0===i||i.cleanup()}async getValues(){var i,s;return null!==(s=null===(i=this.bankAccountBillingFormSimpleRef)||void 0===i?void 0:i.getValues())&&void 0!==s?s:{}}async validate(){var i,s;return null!==(s=null===(i=this.bankAccountBillingFormSimpleRef)||void 0===i?void 0:i.validate())&&void 0!==s?s:{isValid:!1,errors:{}}}render(){return s(p,{key:"eb678ebd32e57dcefa9b8eadd6c23b9e1ac769c8"},s("bank-account-billing-form-simple",{key:"f8aecd774e7c9a818b1976c069d16595414ead1d",legend:this.legend,ref:i=>this.bankAccountBillingFormSimpleRef=i}))}};export{a as justifi_bank_account_billing_form_simple}
@@ -1 +0,0 @@
1
- import{r as t,h as o}from"./p-CV0Pyo1O.js";import{J as s}from"./p-zi3ljCdQ.js";import{c as a}from"./p-DgH-jcIo.js";import{w as r}from"./p-DVJaoI_m.js";import{S as p}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-CUI41_5y.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-D8GTwl9v.js";const i=class{constructor(o){t(this,o)}async componentWillLoad(){await r(),a(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return this.cardFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:o,account:s}){return this.cardFormElement.tokenize({clientId:t,paymentMethodMetadata:o,account:s})}render(){return o(p,{key:"d4c6ec37fc92036326c7a20b5a6ff189880ad6f5"},o("card-form",{key:"8411003a749dc97a953874601e676beaf5bc4a6d",ref:t=>this.cardFormElement=t}))}};export{i as justifi_card_form}
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as r}from"./p-CV0Pyo1O.js";import{A as o}from"./p-CYQvLgSs.js";import{C as i,e}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-B5vVjDc_.js";import{E as p}from"./p-x9fFFf7F.js";import{J as c}from"./p-zi3ljCdQ.js";import{c as h}from"./p-DgH-jcIo.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-DnrawQn3.js";import"./p-beXEDfB9.js";const m=o();class d{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const u=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:e})=>{var p;try{const c=await r.fetchGrossVolumeChartData(s,t);c.error?e({error:n(c.error),code:a(null===(p=c.error)||void 0===p?void 0:p.code),severity:i.ERROR}):o(c.data)}catch(s){const t=a(null==s?void 0:s.code);e({error:n(s),code:t,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new d}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.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{u as justifi_gross_payment_chart}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as a,H as e}from"./p-CV0Pyo1O.js";import{q as i,u as o,v as r,w as h,x as n,y as c}from"./p-DnrawQn3.js";import{F as b}from"./p-uCg79W3M.js";import{F as f}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";import{f as l}from"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";const p=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=>l(+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:h}render(){return a(e,{key:"c7bc247268fb901619a61bef645c35bb55eb54bf"},a("div",{key:"3678d077e1fe03b30c0584d51b535984b31872d2",class:"form-group d-flex flex-column"},a("label",{key:"4912bb7c5b7647349b34c495b7e2278b08dc0232",part:n,class:"form-label",htmlFor:this.name},this.label),a(b,{key:"3aa152cdb7a2f72a739aeb431a4f2dcc389876a4",name:this.name,helpText:this.helpText}),a("div",{key:"ad6d1c9275979ee19dc7d25cb9a3af00f8e6a493",class:"input-group"},a("span",{key:"9a3293856bbb270b7d518a3129f492c18de94b60",class:"input-group-text",part:c},"$"),a("input",{key:"1b301b983948cbe6de420bf5bc06ef8eb743b246",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(f,{key:"8f8951afec2c5759c629316c693d9b07ef58a677",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as s,H as t}from"./p-CV0Pyo1O.js";import{r as a}from"./p-DnrawQn3.js";const r=class{constructor(s){e(this,s),this.radioClick=i(this,"radio-click",7),this.checked=!1,this.hidden=!1,this.handleClick=()=>{this.radioClick.emit(this.value)}}render(){return s(t,{key:"df05a770b3b220ec3c11de2e3edfc3605c0ca909"},s("div",{key:"a349e3b2e2b464ed100cee165b8a0e60f25d2e97",class:`radio-list-item p-3 ${this.class||""}`,part:a,onClick:this.handleClick,hidden:this.hidden},s("form-control-radio",{key:"df8a2643c0d236a0524ccde524396bf08597aee6",name:this.name,value:this.value,checked:this.checked,label:this.label,inputHandler:()=>null})))}};export{r as radio_list_item}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as a}from"./p-CV0Pyo1O.js";import{T as e,a as i,b as r,c as h,d as o,e as n,f as c,g as d,h as p,i as f,j as m,k as b,l}from"./p-bn_huKYG.js";import{T as u}from"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CUI41_5y.js";import{p as g}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{t as j,a as y}from"./p-niGr4RT2.js";import{o as k,g as C}from"./p-BPTtWj7E.js";import"./p-DnrawQn3.js";import"./p-CDf5H0TB.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-pL4dNfsl.js";const O=class{constructor(a){t(this,a),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.terminalOrders=[],this.loading=!0,this.paging=g,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:u.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:u.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const a=this.terminalOrders.find((t=>t.id===s));this.clickEvent.emit({name:u.row,data:a})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalOrdersTable=new e(this.terminalOrders,this.columns,j,y),this.getTerminalOrders&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:s})=>{this.terminalOrders=t,this.paging=s,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:s,severity:a})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:a})},final:()=>{this.loading=!1}})}get terminalOrderParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return a(l,{key:"92fffc2d98e3a5176d80decaeddc8d3b0babca74"},a(i,{key:"9a690f1298358fd1f22942cce38a99b157526d2a"},a(r,{key:"53275af95435cbc3fa01753e88ab6a9319aa678b"},a(h,{key:"374db48f613bddaad4308e60700c1ea66a5c54dd"},this.terminalOrdersTable.columnData.map((t=>t)))),a(o,{key:"8e95036b34d7ed6712d64978923459b29c11fab8"},a(n,{key:"bf28d8b020cfc59f494eede313f9cb38265d702f",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),a(c,{key:"0361d8c68151065fe96a97a137aa06b510d2f2dd",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),a(d,{key:"b7bbf34d9c90f1757424afb9fa30617f61a4d564",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((t,s)=>a(p,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&a(f,{key:"a0b4a423809b3b36211b7f59719642e48311d32e"},a(m,{key:"81a3dd146e0931f14ef6972e42f71b38c2f11239"},a(b,{key:"8e4afc9ea974aac2c693a60e3e0ea5f9915a199e",colSpan:this.terminalOrdersTable.columnData.length},a("pagination-menu",{key:"9d5afd8b9a09fc24f12c701e289c22a40ad77042",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminalOrders:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{O as terminal_orders_list_core}
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{h as s,C as i,e as r}from"./p-CUI41_5y.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{J as o}from"./p-zi3ljCdQ.js";import{c}from"./p-DgH-jcIo.js";import{g as p,a as h}from"./p-B5vVjDc_.js";import{P as d}from"./p-Dbg501Lu.js";import{T as f,l,a as u,b as m,c as b,d as y,e as _,f as g,g as j,h as T,i as w,j as k,k as v}from"./p-bn_huKYG.js";import{S as C}from"./p-BqNNwq6C.js";import{T as D}from"./p-CZfYo5-1.js";import{a as F}from"./p-BRnBHsdq.js";import{a3 as R,a4 as S}from"./p-DnrawQn3.js";import"./p-D8GTwl9v.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-CDf5H0TB.js";const I={created_at:()=>t("th",{part:R,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:R,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:R,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:R,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:R,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:R,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:R,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},P={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",platform_fee:"Platform Fee",platform_fee_return:"Platform Fee Return",processing_fee:"Processing Fee",processing_fee_return:"Processing Fee Return",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},B={created_at:(e,a)=>t("td",{part:S(a)},t("div",{class:"fw-bold"},F(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},F(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:S(a)},P[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:S(a)},e.id),amount:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:S(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:S(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:S(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:S(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:S(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:S(a)},e.source_id),source_type:(e,a)=>t("td",{part:S(a)},e.source_type)},q=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=n,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,I,B),c(),this.analytics=new o(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:r,onSuccess:n,onError:o,final:c})=>{var d;try{const c=await a.fetchPaymentTransactions(t,e,r);c.error?o({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:i.ERROR}):n({balanceTransactions:c.data.map((t=>new s(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);o({error:h(t),code:e,severity:i.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(r.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}render(){return t(C,{key:"bbe4f24aad52765c9566adf52917ecb5562ef38f"},t(l,{key:"6009d27d08b8940404342e4fd34ac99fd019510f"},t(u,{key:"eaa81f8eb813dc3f95ccf42eb44092cf7a52f61f"},t(m,{key:"beafd55ed8304616b85ad6fe17c17dca47b7a5f1"},t(b,{key:"e6a086d41ce143c780684548fc3483eada36ab59"},this.transactionsTable.columnData.map((t=>t)))),t(y,{key:"2e63ef1777fff0db965c1a2d1b3730d6236bba0c"},t(_,{key:"d84464c074bb55717c59559bda6e36c925394fcd",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"e2d4297ea72f8310ddee6931be89b2fa51579085",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"e686616f839acdadcb2802bf2ff9ca64524b9b18",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(w,{key:"dc3a9ec5bf2e88a2a3dbdbd174c7cb860a6b93c4"},t(k,{key:"8ddc32fec0a7edea53f8e34537b8999c5bb729bf"},t(v,{key:"eb8de1c3e3fcb2aa4a78c838e93b1400ec750170",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"aa1df15f4381600961f7d61af8141d96cc27db47",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{q as justifi_payment_transactions_list}
@@ -1 +0,0 @@
1
- import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{c as r,F as e}from"./p-CKiAlBsU.js";import{b as o,a,c as n}from"./p-BovgIz83.js";import{i as h,a as p,b as l,c as m}from"./p-D8EGHc_m.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as c,e as d}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import{C as j,B as u,b as v}from"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{J as f}from"./p-zi3ljCdQ.js";import{B as b}from"./p-2LVpxCS_.js";import{S as C}from"./p-BqNNwq6C.js";import{H as w}from"./p-XrKLre8M.js";import"./p-CZfYo5-1.js";import{c as g}from"./p-DgH-jcIo.js";import{S as B}from"./p-DcBvJu0k.js";import{B as y}from"./p-XYgDHrVL.js";import{m as _,a as D}from"./p-CR_-qIuN.js";import{B as x}from"./p-CsdYMTrc.js";import"./p-BFTU3MAI.js";import"./p-HT_4DkD0.js";import"./p-_-2E_vYf.js";import"./p-Bt4GjEWL.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-DnrawQn3.js";import"./p-B5vVjDc_.js";const H=r(Object.assign(Object.assign({},o().fields),{legal_address:p(),additional_questions:a(),representative:h("representative")}));r(Object.assign(Object.assign({},n().fields),{legal_address:m(),additional_questions:a(),representative:l("representative")}));const I=H,O=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(B,{width:"25%"})),s("div",{class:"col-12"},s(B,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(B,{width:"50%"}),s(B,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(B,{width:"65%"}),s(B,{width:"35%"}))),S=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(B,{width:"40%",height:"40px"})),s(O,null),s(O,null),s(O,null)),k=class{constructor(s){t(this,s),this.submitEvent=i(this,"submit-event",7),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!1,this.isSaving=!1,this.country=j.USA,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const t=new u(s);this.country=t.country_of_establishment,this.formController.setInitialValues(Object.assign({},t))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),t=this.formController.getInitialValues(),i=new u(Object.assign(Object.assign({},t),s)).payload;this.patchBusiness({payload:i,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){g(),this.analytics=new f(this),this.formController=new e(I),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=_({authToken:this.authToken,businessId:this.businessId,service:new x}),this.patchBusiness=D({authToken:this.authToken,businessId:this.businessId,service:new x}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:d.MISSING_PROPS,severity:c.ERROR})}handleReponse(s){s.error&&(this.errorMessage=v.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(C,null,this.isLoading?s(S,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(w,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("business-core-info",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("legal-address-form",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("business-representative",{formController:this.formController,country:this.country})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(b,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:y.submit}),isLoading:this.isSaving},"Submit")))))}};export{k as justifi_business_form}
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./p-CV0Pyo1O.js";import{B as a}from"./p-2LVpxCS_.js";import{a5 as r,a6 as s}from"./p-DnrawQn3.js";const o=e=>{const t=["after_cursor","before_cursor"];return!!Object.keys(e).filter((e=>!t.includes(e))).length},d=class{constructor(t){e(this,t),this.showClearButton=!1}watchParamsHandler(e){this.showClearButton=o(e)}show(){this.menu.classList.add("show")}hide(){this.menu.classList.remove("show")}componentWillLoad(){this.showClearButton=o(this.params)}render(){return t("div",{key:"bf0722379c0f2d12f0d351f71a4cea18605a1a6c",class:"d-flex gap-2"},t("div",{key:"68bf34efe0c7c82bfe66e1d1d386bb8f37efba11",class:"dropdown pb-3"},t("button",{key:"413db165fa98008db838b6cb8541d7276bcd7a1b",type:"button dropdown-toggle",ref:e=>this.anchorButton=e,class:"btn btn-primary dropdown-toggle",part:r,"data-test-id":"open-filters-button","data-bs-toggle":"dropdown"},"Filters"),t("custom-popper",{key:"43acd10ad9666c281406bc9928da3d568868a831",offset:[20,10],strategy:"fixed",anchorRef:this.anchorButton,trigger:"click"},t("form",{key:"52d302d40e503a7ebc311d603ab49a388c2e7fb1",class:"dropdown-menu",part:s,"data-test-id":"filter-menu",ref:e=>this.menu=e,onSubmit:e=>e.preventDefault()},t("slot",{key:"232f719456fe31e0e87abc49ec4f0f141a194cfc"})))),t("div",{key:"197f5034d8eb246a107f4e761478514d53c1c321"},t(a,{key:"5f17be2e3493b4e9e54035c4bc8a95b762161b3c",variant:"secondary",onClick:()=>this.clearParams(),hidden:!this.showClearButton,"data-test-id":"clear-filters-button"},"Clear Filters")))}static get watchers(){return{params:["watchParamsHandler"]}}};export{d as table_filters_menu}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import{D as i}from"./p-Bg2SZArf.js";import{D as r,a as o}from"./p-BH0Xfn-F.js";const h=class{constructor(e){t(this,e),this.errorEvent=s(this,"error-event",7),this.isLoading=!0,this.showDisputeResponseForm=!1}disputeResponseHandler(t){t.detail.name===i.respondToDispute&&(this.showDisputeResponseForm=!0),t.detail.name===i.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){this.getDispute&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.isLoading=!0,this.getDispute({onSuccess:({dispute:t})=>{this.dispute=new r(t),this.isLoading=!1,this.dispute.status!==o.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.isLoading=!1}})}render(){return e("div",{key:"830c909d7782694ee8b53be335cf7dd979ac9b57"},this.showDisputeResponseForm?e("justifi-dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):e("justifi-dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading}))}static get watchers(){return{getDispute:["updateOnPropChange"]}}};export{h as justifi_dispute_management_core}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{C as e,e as r}from"./p-CUI41_5y.js";import{J as o}from"./p-zi3ljCdQ.js";import{c as p}from"./p-DgH-jcIo.js";import{D as n}from"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-B5vVjDc_.js";import{D as c}from"./p-hhdRync5.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-beXEDfB9.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const d=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new o(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:i})=>async({onSuccess:r,onError:o})=>{var p;try{const c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:a(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new n(c.data),pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:e.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:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"db9bf0998d45a71d9c2a72f4cedbe4276e67a238",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_dispute_management}
@@ -1 +0,0 @@
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-BsQy297i.js";import{a7 as o,q as h,v as l,u as n,w as c,x as f}from"./p-DnrawQn3.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:"148ab38c0f84c68412db6bb87e2cb4d986809aaa",exportparts:"label,input,input-invalid"},s("div",{key:"11426b2eee53e37090e0b0d2cda9e3823b777072",class:"form-group d-flex flex-column"},s("div",{key:"c241b74d833248d3a94466490e5111cea7a587f6",class:"d-flex align-items-start gap-2"},s("label",{key:"ff5322a7dc7344374b28a04ccfc89051aa4f2e49",part:"label",class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"a134a3772f580da33b497686ffb321863e65acc2",helpText:this.helpText})),s("input",{key:"f06a4e02a08c336a9048c6e45cb588e7d9f06082",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:"c374ee239d34ba99de7146dbe10fdee38c63ddc5",errorText:this.errorText,name:this.name})))}get el(){return i(this)}},m=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?n:c}render(){return s(a,{key:"99c79a6c8020a98a663caf25a510310a46daed8c"},s("div",{key:"5cb37c1a3ecffdfa606805e72efe41825997296e",class:"form-group d-flex flex-column"},s("label",{key:"f354efb1e47e496e36ae91dc8584cfd7a803eb5e",part:f,class:"form-label",htmlFor:this.name},this.label),s("textarea",{key:"53d089f2377dc20fb1d8e07c5d2d8697a6a17b33",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:"96e451654599a09a9a86db0928c083d36a7964e1",helpText:this.helpText,name:this.name}),s("form-control-error-text",{key:"7d6b01f7f482643f91e9e4d83c59847e3a4f2f35",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{d as form_control_file_v2,m as form_control_textarea}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as s,H as i}from"./p-CV0Pyo1O.js";import{C as a,e as n,E as r,y as o,z as h,v as l,w as c,x as d}from"./p-CUI41_5y.js";import{m as u,a as m,c as b,d as p,e as f,f as v,g as y}from"./p-CR_-qIuN.js";import{B as g,a as k,D as w,I as _}from"./p-CsdYMTrc.js";import{a as x,c as T,b as L}from"./p-BovgIz83.js";import{F as C,c as j,a as O,b as A,d as E}from"./p-CKiAlBsU.js";import{A as I,C as S,e as H,R as D,f as V}from"./p-BcNb9bVO.js";import{C as B,P,I as N}from"./p-CVaOFfrI.js";import{b as M,a0 as R,C as F,x as q,u as W,D as z,aa as U,a3 as Y,aj as Z,am as G,a1 as $}from"./p-DnrawQn3.js";import{P as X}from"./p-DPmnGTmg.js";import{b as Q,a as J,c as K}from"./p-Bt4GjEWL.js";import{a as tt,B as et}from"./p-XYgDHrVL.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{n as st}from"./p-BnjCmwMr.js";import{A as it,B as at,v as nt,C as rt,D as ot,E as ht,F as lt}from"./p-HT_4DkD0.js";import{B as ct}from"./p-2LVpxCS_.js";import"./p-CZfYo5-1.js";import{c as dt}from"./p-_-2E_vYf.js";import{s as ut,b as mt,d as bt}from"./p-BRnBHsdq.js";import{S as pt}from"./p-DcBvJu0k.js";import{u as ft,a as vt,b as yt}from"./p-C6o0liMT.js";import{d as gt,e as kt}from"./p-D8EGHc_m.js";import{A as wt}from"./p-CYQvLgSs.js";import{S as _t}from"./p-BqNNwq6C.js";import{P as xt}from"./p-B--N37zY.js";import"./p-B5vVjDc_.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";class Tt{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.institution_number=t.institution_number,this.transit_number=t.transit_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",institution_number:this.institution_number||"",transit_number:this.transit_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const Lt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(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:t=>{this.additional_questions=new I(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e})),this.additional_questions=new I(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new I(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new C(x(this.allowOptionalFields))}componentDidLoad(){this.getBusiness&&this.getData(),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}render(){var t,e,i,a,n;const r=this.formController.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Additional Questions"),s("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("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===(t=this.errors)||void 0===t?void 0:t.business_revenue,defaultValue:null==r?void 0:r.business_revenue,maskOptions:B.WHOLE})),s("div",{class:"col-12 col-md-6"},s("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==r?void 0:r.business_payment_volume,maskOptions:B.WHOLE})),s("div",{class:"col-12"},s("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==r?void 0:r.business_average_transaction_amount})),s("div",{class:"col-12"},s("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===(a=this.errors)||void 0===a?void 0:a.business_when_service_received,options:Q,defaultValue:null==r?void 0:r.business_when_service_received})),s("div",{class:"col-12"},s("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==r?void 0:r.business_other_payment_details})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],additional_questions:["recurringPaymentsWatcher"]}}},Ct=class{constructor(e){t(this,e)}render(){return s("div",{key:"d0dacb95d07d3e4ca9bc2c9f23b6c490871da4e9",class:"row gy-3"},s("div",{key:"02ed406f38558badf9f591e076b120d09c71f83b",class:"col-12"},s("form-control-file",{key:"11ff1dc68264b9e5aa561ffe19b423abc1a00c78",name:"voided_check",label:"Voided Check",documentType:r.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),s("div",{key:"71d26407522a75a54489155566c18af1a64c1417",class:"col-12"},s("form-control-file",{key:"7ea42e03a44c223a5fedc273e94e635e70d54f4b",name:"bank_statement",label:"Bank Statement",documentType:r.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},jt=class{constructor(e){t(this,e)}render(){var t,e,i,a,n,r;return s("div",{key:"d3445ce89732e19baea2e8f224c42011d5a03998",class:"row gy-3"},s("div",{key:"966e1d8ba6043b4f9b57ae0061ae94c177c12b48",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"314a4f7e181b978b2ff1fdbfdfc8d9484089829a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"45ac55707ce44b208adaf72e944ea3056810183a",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"74ce58b36eb3a425d900d7bb0858bda18b2e341c",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:J,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"2562105aaaae00d9c46eb61d931a43927d96a8ce",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),s("div",{key:"4c7e6cba0ee1e2567dc5b608559b13ebd3fddd07",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Routing Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.routing_number)||""}):s("form-control-text",{name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},Ot=class{constructor(e){t(this,e)}render(){var t,e,i,a,n,r,o;return s("div",{key:"8de8f05777f72ecb1112328544e75be7cd929e8d",class:"row gy-3"},s("div",{key:"513fb78b434ba3aebe51b636f7494b54e437c65f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Bank Name",value:null===(t=this.defaultValue)||void 0===t?void 0:t.bank_name}):s("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),s("div",{key:"37a1ef4ac58fbe1633a93020e786d546cd832867",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Nickname",value:null===(e=this.defaultValue)||void 0===e?void 0:e.nickname}):s("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),s("div",{key:"fc8820e264d14ac3c5a1c6fd171b381c2b6d99e1",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):s("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),s("div",{key:"f183b1c5f6a8b0f905c916cd1715448f3e02d26f",class:"col-12"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Type",value:null===(a=this.defaultValue)||void 0===a?void 0:a.account_type}):s("form-control-select",{name:"account_type",label:"Account Type",options:J,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),s("div",{key:"8366ebde2f319f6d910a34917f57ad43b3ee234f",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Transit Number",value:(null===(n=this.defaultValue)||void 0===n?void 0:n.transit_number)||""}):s("form-control-text",{name:"transit_number",label:"Transit Number",defaultValue:this.defaultValue.transit_number,maxLength:5,errorText:this.errors.transit_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"5 digits"})),s("div",{key:"c91166337c2984048466014634f5d4e59ce2b40a",class:"col-3"},this.formDisabled?s("bank-account-read-only-value",{label:"Institution Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.institution_number)||""}):s("form-control-text",{name:"institution_number",label:"Institution Number",defaultValue:this.defaultValue.institution_number,maxLength:3,errorText:this.errors.institution_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"3 digits"})),s("div",{key:"ebce2f50ec265ed2fef7a0b3dae84d33036ad145",class:"col-6"},this.formDisabled?s("bank-account-read-only-value",{label:"Account Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):s("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:st,helpText:"Please copy the account number as shown on your statement. Do not include spaces or dashes."})))}},At=(t,e)=>t.some((t=>t.document_type===e)),Et=t=>t?{bank_name:ot.nullable(),nickname:rt.nullable(),account_owner_name:nt.nullable(),account_type:at.nullable(),account_number:it.nullable()}:{bank_name:ot.required("Enter bank name"),nickname:rt.required("Enter nickname"),account_owner_name:nt.required("Enter account owner name"),account_type:at.required("Select account type"),account_number:it.required("Enter account number")},It=(t,e)=>{if(e)return{voided_check:A().nullable(),bank_statement:A().nullable()};const s=At(t,r.voidedCheck),i=At(t,r.bankStatement),a=s||i,n="Please upload either a voided check or a bank statement. Only one is required.";return{voided_check:A().when("bank_statement",{is:t=>!t&&!a,then:t=>t.required(n),otherwise:t=>t.notRequired()}),bank_statement:A().when("voided_check",{is:t=>!t&&!a,then:t=>t.required(n),otherwise:t=>t.notRequired()})}},St={[S.USA]:(t,e=[])=>((t,e)=>{const s=Object.assign(Object.assign(Object.assign({},Et(e)),(t=>t?{routing_number:lt.nullable()}:{routing_number:lt.required("Enter routing number")})(e)),It(t,e));return j().shape(s,[["voided_check","bank_statement"]])})(e,t),[S.CAN]:(t,e=[])=>((t,e)=>{const s=Object.assign(Object.assign(Object.assign({},Et(e)),(t=>{const e=O().length(3,"Institution number must be 3 digits").matches(ht,"Enter valid institution number"),s=O().length(5,"Transit number must be 5 digits").matches(ht,"Enter valid transit number");return t?{institution_number:e.nullable(),transit_number:s.nullable()}:{institution_number:e.required("Enter institution number"),transit_number:s.required("Enter transit number")}})(e)),It(t,e));return j().shape(s,[["voided_check","bank_statement"]])})(e,t)},Ht=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(this,"formLoading",7),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new o,this.isLoading=!1,this.viewMode="manual",this.bankAccountVerification=!1,this.platformAccountId=null,this.getSchema=()=>(0,St[this.country])(this.allowOptionalFields,this.existingDocuments),this.initializeFormController=()=>{this.formController=new C(this.getSchema()),this.formController.setInitialValues("readonly"===this.viewMode?Object.assign({},this.bankAccount):{business_id:this.businessId}),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))},this.storeFiles=t=>{const e=Array.from(t.detail.fileList),s=t.detail.document_type,i=e.map((t=>new h({file:t,document_type:s},this.businessId)));this.documentData[s]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.handleChangeBankAccount=()=>{this.viewMode=this.plaidAvailable?"plaid":"manual",this.documentData=new o,this.initializeFormController()},this.handleCancel=()=>{this.viewMode=this.existingBankAccount?"readonly":"plaid",this.documentData=new o,this.initializeFormController()},this.handleToggleToManualEntry=()=>{this.viewMode="manual"},this.handleToggleToPlaidVerification=()=>{this.viewMode="plaid"},this.handleSaveBankAccount=async()=>{this.formController.validateAndSubmit((()=>{this.sendData((()=>{}))}))},this.postDocumentRecordData=async t=>{this.isLoading=!0;const e=t.record_data;return new Promise((s=>{this.postDocumentRecord({payload:e,onSuccess:e=>{s(this.handleDocRecordResponse(t,e))},onError:({error:t,code:e,severity:i})=>{this.errorEvent.emit({message:t,errorCode:e,severity:i}),s(!1)}})}))},this.handleDocRecordResponse=(t,e)=>e.error?(this.errorEvent.emit({errorCode:n.POST_ERROR,message:e.error.message,severity:a.ERROR,data:e.error}),!1):(t.setPresignedUrl(e.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const e=await t.getFileData(),s=await fetch(t.presigned_url,{method:"PUT",body:e});return this.handleUploadResponse(s)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:a.ERROR,data:t.error}),!1)}propChanged(){this.initializeApi()}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){"readonly"===this.viewMode?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData(),this.formController=new C(this.getSchema())}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.postBankAccount=b({authToken:this.authToken,service:new k}),this.postDocumentRecord=p({authToken:this.authToken,service:new w})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}get postPayload(){const t=this.formController.values.getValue();return new Tt(t).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}get plaidAvailable(){return this.bankAccountVerification&&!!this.platformAccountId}get showCancel(){return this.bankAccountVerification||this.existingBankAccount}processBusinessResponse(t){const{bank_accounts:e,documents:s,settings:i,platform_account_id:a}=t;e.length>0?this.bankAccount=new Tt(e[e.length-1]):(this.bankAccount=new Tt({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=s,this.bankAccountVerification=!0===i.bank_account_verification,this.platformAccountId=a}determineViewMode(){this.viewMode=this.existingBankAccount?"readonly":this.plaidAvailable?"plaid":"manual"}async sendData(t){try{if("manual"===this.viewMode&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;"manual"===this.viewMode&&(this.viewMode="readonly",await this.refreshBankAccountData()),t()}catch(t){this.errorEvent.emit({message:t,errorCode:n.POST_ERROR,severity:a.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((e=>{let s=!1;this.postBankAccount({payload:this.postPayload,onSuccess:e=>{t=e,s=!0},onError:({error:t,code:e,severity:i})=>{s=!1,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:tt.bankAccount}),this.isLoading=!1,e(s)}})}))}async refreshBankAccountData(){return new Promise((t=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.processBusinessResponse(t.data),this.determineViewMode(),this.initializeFormController()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.isLoading=!1,t()}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}renderBankAccountInputs(t){const e=this.formController.getInitialValues();return s(this.country===S.CAN?"bank-account-form-inputs-canada":"bank-account-form-inputs",{defaultValue:e,errors:this.errors,inputHandler:this.inputHandler,formDisabled:t})}renderReadonlyView(){return s("div",null,this.renderBankAccountInputs(!0),s("div",{class:"mt-3"},s(ct,{variant:"secondary",type:"button",onClick:this.handleChangeBankAccount,disabled:this.isLoading,part:R},"Change Bank Account")))}renderPlaidView(){return s("div",{class:"mt-3"},s("plaid-verification",{authToken:this.authToken,accountId:this.platformAccountId,businessId:this.businessId,onPlaidVerificationSuccess:()=>{this.viewMode="readonly",this.refreshBankAccountData()}}),s("div",{class:"mt-3"},s(ct,{type:"button",variant:"link",className:"p-0",onClick:this.handleToggleToManualEntry,disabled:this.isLoading,part:F},"Enter bank details manually (document upload required)")))}renderManualEntryView(){return s("div",null,this.plaidAvailable&&s("div",{class:"mb-3"},s(ct,{type:"button",variant:"secondary",onClick:this.handleToggleToPlaidVerification,disabled:this.isLoading,part:R},"Link bank account with Plaid instead")),this.renderBankAccountInputs(!1),s("div",{class:"mt-3 d-flex gap-2"},this.showCancel&&s(ct,{variant:"secondary",type:"button",onClick:this.handleCancel,disabled:this.isLoading,part:R},"Cancel"),s(ct,{variant:"primary",type:"button",onClick:this.handleSaveBankAccount,disabled:this.isLoading,isLoading:this.isLoading},"Save Bank Account")))}renderDocumentUploads(){return s("fieldset",{class:"mt-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Document Uploads"),s("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."})),s("hr",{class:"mt-2"}),s("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),s("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles}))}render(){return this.isLoading?s(X,null):s("form",null,s("fieldset",{class:"mb-4"},s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Bank Account Info"),s("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."})),s("hr",{class:"mt-2"}),"readonly"===this.viewMode&&this.renderReadonlyView(),"plaid"===this.viewMode&&this.renderPlaidView(),"manual"===this.viewMode&&this.renderManualEntryView()),"plaid"!==this.viewMode&&this.renderDocumentUploads())}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],isLoading:["watchHandler"]}}},Dt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(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:t=>{this.coreInfo=new H(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t(),this.isEditingTaxId=!1},onError:({error:t,code:s,severity:i,rawError:a})=>{e=t,a&&"object"==typeof a&&a.param&&this.formController.setFieldError(a.param,a.message),this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.errors[t]&&this.formController.clearFieldError(t),this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new H(this.formController.values.getValue()).payload}componentWillLoad(){this.initializeApi();const t=this.country===S.CAN?T(this.allowOptionalFields):L(this.allowOptionalFields);this.formController=new C(t),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}render(){var t,e;const i=this.formController.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Business Information")),s("hr",{class:"mt-2"}),s("div",{class:"row gy-3"},s("div",{class:"col-12 col-md-6"},s("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)."})),s("div",{class:"col-12 col-md-6"},s("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)"})),s("div",{class:"col-12 col-md-8"},s("form-control-select",{name:"classification",label:"Business Classification",options:K,defaultValue:i.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-4"},s("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})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"industry",label:"Industry",defaultValue:i.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),s("div",{class:"col-12 col-md-6"},!(null===(t=this.coreInfo)||void 0===t?void 0:t.tax_id_last4)||this.isEditingTaxId?s("form-control-number-masked",{name:"tax_id",label:dt[this.country].taxIdLabel,defaultValue:this.isEditingTaxId?"":i.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,mask:"000000000",helpText:dt[this.country].taxIdHelpText}):s("div",null,s("label",{class:"form-label",part:q},dt[this.country].taxIdLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:W,value:`****${null===(e=this.coreInfo)||void 0===e?void 0:e.tax_id_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:R,onClick:()=>{this.isEditingTaxId=!0,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{tax_id:"",tax_id_last4:null}))}},"Change")))),s("div",{class:"col-12"},s("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."})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"email",label:"Business Email Address",defaultValue:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{class:"col-12 col-md-6"},s("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:i.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:P.US})))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Vt=class{constructor(e){t(this,e),this.documents=[],this.isLoading=!1}render(){return this.isLoading?s(pt,{height:"50px"}):this.documents.length?s(i,null,s("div",{class:"card",part:z},s("div",{class:"card-body"},s("h5",{class:"card-title",part:M},"Documents Already on File"),s("div",{class:"table-responsive"},s("table",{class:"table table-sm table-borderless",part:U},s("thead",null,s("tr",null,s("th",{style:{width:"25%"},part:Y,scope:"col"},"File Name"),s("th",{style:{width:"25%"},part:Y,scope:"col"},"File Type"),s("th",{style:{width:"25%"},part:Y,scope:"col"},"Document Type"),s("th",{style:{width:"25%"},part:Y,scope:"col"},"Date Uploaded"))),s("tbody",null,this.documents.sort(((t,e)=>t.document_type.localeCompare(e.document_type))).map(((t,e)=>s("tr",{class:0===e?"border-bottom border-top":"border-bottom"},s("td",{part:Z},t.file_name),s("td",{part:Z},t.file_type),s("td",{part:Z},ut(t.document_type)),s("td",{part:Z},`${mt(t.created_at)} - ${bt(t.created_at)}`))))))))),s("hr",null)):null}},Bt=class{constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.representativeIsOwner=null,this.matchRef=(t,e)=>{if(null===t)return;const s=this.ownersPayload.findIndex((t=>t.id===e));-1!==s&&(this.refs.length!==this.ownersPayload.length&&this.manageRefs(),this.refs[s]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new D(t.data.representative||{}),t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:et.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((e=>e.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)},this.handleRepresentativeIsOwnerChange=t=>{this.representativeIsOwner=t,this.representativeIsOwner&&(this.formLoading.emit(!0),this.isLoading=!0,this.ownersPayload=this.ownersPayload.filter((t=>""!==t.id)),this.patchBusiness({payload:{owners:[{id:this.representative.id},...this.ownersPayload]},onSuccess:()=>{this.getData(),this.newFormOpen=!1},finally:()=>{this.isLoading=!1,this.formLoading.emit(!1)}}))}}propChanged(){this.initializeApi()}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const e=this.refs.map((t=>t.validate()));if(!(await Promise.all(e)).every((t=>t)))return;const s=this.refs.map((t=>t.submit()));(await Promise.all(s)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.initializeApi(),this.getBusiness&&this.getData()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const e=t.detail,s=this.ownersPayload.map((t=>t.id===e.id?e:t));s.includes(e)||(s[this.ownersPayload.findIndex((t=>!t.id))]=e,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=s}render(){if(this.isLoading)return s(i,null,s(X,null));const t=this.ownersPayload.some((t=>t.id===this.representative.id)),e=null===this.representativeIsOwner&&!t;return s(i,null,s("div",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Owners"),s("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."})),s("hr",{class:"mt-2"}),e&&s("div",{class:"alert alert-warning mb-3",part:G},s("div",{class:"card-body"},s("div",{class:"d-flex align-items-center mb-3"},s("strong",null,"Is the representative of this business also an owner?")),s("div",{class:"d-flex gap-2"},s(ct,{variant:"primary",onClick:()=>this.handleRepresentativeIsOwnerChange(!0)},"Yes"),s(ct,{variant:"secondary",onClick:()=>this.handleRepresentativeIsOwnerChange(!1)},"No")))),s("div",{class:"row gy-3"},this.ownersPayload.map((t=>s("owner-form",{key:t.id,authToken:this.authToken,businessId:this.businessId,ownerId:t.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,country:this.country,allowOptionalFields:this.allowOptionalFields,ref:e=>this.matchRef(e,t.id)})))),s("div",{class:"d-flex justify-content-start"},s("div",{class:"gap-2"},s(ct,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner")))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"],ownersPayload:["ownersWatcher"]}}},Pt=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{ft(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{vt(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e,i,a,n,r,o,h,l;return s("form",{key:"ef49167cc726b3d4efa128503553a77a7627ebee"},s("fieldset",{key:"3714ce7eab6e9cee062911564d1c2635b68dfc8b"},s("div",{key:"4f27236b0438e29d7449bf5e9f71c00c7245effa",class:"d-flex align-items-center gap-2"},s("legend",{key:"adc144da314549264571b245c5388ab56c1dbbf1",class:"mb-0",part:M},"Representative"),s("form-control-tooltip",{key:"bcc76add04febe984427103a594aa63cab17bd27",helpText:"The representative for your business needs to be someone who has significant control over managing your business's finance. You will have an opportunity to add owners later in the form."})),s("hr",{key:"98bfed19989ee57e451a7005f3e60af16cc5d3b5",class:"mt-2"}),s("div",{key:"8f5e0e3deed2627ecf9f77290f268c0e2ee68bfa",class:"row gy-3"},s("div",{key:"b1205284a54a608b9c3b6be386e134849c9c6b25",class:"col-12 col-md-8"},s("form-control-text",{key:"36fcd91ca263adfd9fb69dc88f15404f93a8bc13",name:"name",label:"Full Name",defaultValue:null===(t=this.representativeDefaultValue)||void 0===t?void 0:t.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"879337d3c6a120f5dc9de3cd3364b34b9c4689df",class:"col-12 col-md-4"},s("form-control-text",{key:"ff2e4d29e76b93693735b35cbaca4416f0cd28a0",name:"title",label:"Title",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),s("div",{key:"2a011b74b4c203ae4a309d7d76ea8fd0631a5f2c",class:"col-12 col-md-6"},s("form-control-text",{key:"1ef20c59829ed3abe81cc53355bbafd5d4894360",name:"email",label:"Email Address",defaultValue:null===(i=this.representativeDefaultValue)||void 0===i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"460dad175238fdfea8c79666343943a95aac0fd5",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"7bd3ad79f6da1d33e38c2246d9c0378c2ef8b7d7",name:"phone",label:"Phone Number",defaultValue:null===(a=this.representativeDefaultValue)||void 0===a?void 0:a.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:P.US})),s("div",{key:"cda84bfc9f88a35177a42b7f9ec4c58292600c0b",class:"col-12 col-md-4"},s("form-control-date",{key:"5ed66fabc97afc94a5839135add25dbcb5237900",name:"dob_full",label:"Birth Date",defaultValue:null===(n=this.representativeDefaultValue)||void 0===n?void 0:n.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>yt(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"0e19619fd081ea9dacd0eb25388a4c7b2c993312",class:"col-12 col-md-8"},!(null===(r=this.representativeDefaultValue)||void 0===r?void 0:r.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:dt[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":null===(o=this.representativeDefaultValue)||void 0===o?void 0:o.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:N[this.country],helpText:dt[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:q},dt[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:W,value:`****${null===(h=this.representativeDefaultValue)||void 0===h?void 0:h.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:R,onClick:()=>{this.isEditingIdentification=!0,ft(this.formController,{identification_number:"",ssn_last4:null})}},"Change")))),s("div",{key:"6647390b209f5a630bf60e8952a7b0e70c92ca8a",class:"col-12"},s("identity-address-form",{key:"9755d0450fc8d83ba0a98a304455df346ff33e7f",errors:this.errors.address,defaultValues:null===(l=this.representativeDefaultValue)||void 0===l?void 0:l.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},Nt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(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:t=>{this.representative=new D(t.data.representative||{}),this.representative.address.country=this.country,this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.representative}),this.formLoading.emit(!1)}})}}propChanged(){this.initializeApi(),this.getData()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.initializeApi(),this.initializeForm()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}initializeForm(){const t=gt[this.country];t?(this.formController=new C(t("representative",this.allowOptionalFields)),this.getData()):this.errorEvent.emit({message:"Missing schema for selected country",errorCode:n.MISSING_PROPS,severity:a.ERROR})}componentDidLoad(){this.formController&&this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get patchPayload(){return{representative:new D(this.formController.values.getValue()).payload}}render(){return!this.formController||this.isLoading?s(X,null):s("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"]}}},Mt=class{constructor(s){t(this,s),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.formCompleted=e(this,"formCompleted",7),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const t=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=t.data.terms_conditions_accepted}catch(t){this.errorEvent.emit({errorCode:n.FETCH_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.sendData=async t=>{this.formLoading.emit(!0);try{const e=this.termsPayload,s=await this.api.post({endpoint:this.termsConditionsEndpoint,body:e,authToken:this.authToken});this.handleResponse(s,t)}catch(t){this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.message,severity:a.ERROR,data:t})}finally{this.formLoading.emit(!1)}},this.inputHandler=(t,e)=>{this.acceptedTerms=e,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}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=wt(),this.formController=new C((t=>{const e=j({accepted:E().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),s=j({accepted:E().nullable()});return t?s:e})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(t,e){t.error?this.errorEvent.emit({errorCode:n.POST_ERROR,message:t.error.message,severity:a.ERROR,data:t.error}):e(),this.stepCompleteEvent.emit({response:t,formStep:tt.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:t}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:tt.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),t()):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get merchantAgreementLink(){return s("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return s("form",{key:"24b0a8ff0187894cf5e0f56e9e4b28c378e720cb"},s("fieldset",{key:"26fa9159dd6d61edd28b9443a10eeb981f150308"},s("legend",{key:"103bdecbc51f2cccd9105e2f9b271b60760618ec",part:M},"Terms and Conditions"),s("hr",{key:"dfd29fbe609a57d8160df7980ed0e63e75934a86"}),s("div",{key:"61e06597ec652c1d7c6e7e2bd8c9b653d061d076"},s("p",{key:"cd4def71580cd14d6edb5887221ebf6aa80cc2ea"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),s("br",{key:"e3c64733f11a4f702e686e6c5ae7acd7e6bd1c34"}),s("div",{key:"71bd74de3aee69805a2aa1297356ff8b8db3c76c",class:"row-gy-3"},s("div",{key:"94a28c13e3bbc1c89cd1b5ebde2e1732b48f99ea",class:"col-12"},s("form-control-checkbox",{key:"fee95fa42192fee1bbfd544307b4e1c11c0d97f4",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})))))}},Rt=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.stepCompleteEvent=e(this,"complete-form-step-event",7),this.formLoading=e(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:t=>{const e=new V((t.data||{}).legal_address||{});this.legal_address=Object.assign(Object.assign({},e),{country:this.country}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}}))},this.sendData=t=>{let e;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:s=>{e=s,t()},onError:({error:t,code:s,severity:i})=>{e=t,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:e,formStep:tt.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new V(this.formController.values.getValue()).payload}}componentWillLoad(){this.initializeApi(),this.formController=new C((0,kt[this.country])(this.allowOptionalFields)),this.getData()}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=u({authToken:this.authToken,businessId:this.businessId,service:new g}),this.patchBusiness=m({authToken:this.authToken,businessId:this.businessId,service:new g})):this.errorEvent.emit({message:"Missing required props",errorCode:n.MISSING_PROPS,severity:a.ERROR})}render(){var t;const e=null===(t=this.formController)||void 0===t?void 0:t.getInitialValues();return this.isLoading?s(X,null):s("form",null,s("fieldset",null,s("div",{class:"d-flex align-items-center gap-2"},s("legend",{class:"mb-0",part:M},"Legal Address of your Business"),s("form-control-tooltip",{helpText:"No PO Boxes."})),s("hr",{class:"mt-2"}),s("form-address-fields",{country:this.country,errors:this.errors,defaultValues:e,inputHandler:this.inputHandler})))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Ft=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7)}async validate(){return this.coreComponent.validate()}async submit(){return this.coreComponent.submit()}async validateAndSubmit({onSuccess:t}){this.coreComponent.validateAndSubmit({onSuccess:t})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&(this.getOwner=f({authToken:this.authToken,identityId:this.ownerId,service:new _}),this.patchOwner=v({authToken:this.authToken,identityId:this.ownerId,service:new _}),this.postOwner=y({authToken:this.authToken,service:new _}))}render(){return s("owner-form-core",{key:"598c7413dbae853f432e64ac549025442083fbb9",ownerId:this.ownerId,businessId:this.businessId,getOwner:this.getOwner,patchOwner:this.patchOwner,postOwner:this.postOwner,allowOptionalFields:this.allowOptionalFields,removeOwner:this.removeOwner,newFormOpen:this.newFormOpen,ownersLength:this.ownersLength,country:this.country,ref:t=>this.coreComponent=t})}},qt=class{constructor(s){t(this,s),this.plaidVerificationSuccess=e(this,"plaidVerificationSuccess",7),this.plaidVerificationError=e(this,"plaidVerificationError",7),this.linkToken=null,this.linkTokenId=null,this.plaidLink=null,this.isAuthenticating=!1,this.isSuccess=!1,this.error=null,this.isLoading=!1,this.plaidService=new xt,this.abortController=null,this.timeoutId=null,this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:d.PLAID_SDK_LOAD_FAILED,message:c[d.PLAID_SDK_LOAD_FAILED],severity:l[d.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:d.PLAID_LINK_TOKEN_FAILED,message:c[d.PLAID_LINK_TOKEN_FAILED],severity:l[d.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:d.PLAID_LINK_INIT_FAILED,message:c[d.PLAID_LINK_INIT_FAILED],severity:l[d.PLAID_LINK_INIT_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var t,e,s,i;try{if(!this.authToken||!this.accountId)return void this.handleError({code:d.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please provide authToken and accountId.",severity:a.ERROR,retryable:!1,userAction:"Provide required props"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var t;null===(t=this.abortController)||void 0===t||t.abort()}),3e4);const t=await this.plaidService.getLinkTokenForVerification(this.authToken,this.businessId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),t.error)throw new Error("string"==typeof t.error?t.error:t.error.message||"Failed to get link token");this.linkToken=t.data.link_token,this.linkTokenId=t.data.id}catch(a){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let n=d.PLAID_LINK_TOKEN_FAILED,r=c[n],o=!0;"AbortError"===a.name?(n=d.PLAID_TIMEOUT,r=c[n],o=!0):(null===(t=a.message)||void 0===t?void 0:t.includes("network"))||(null===(e=a.message)||void 0===e?void 0:e.includes("fetch"))?(n=d.PLAID_NETWORK_ERROR,r=c[n],o=!0):((null===(s=a.message)||void 0===s?void 0:s.includes("401"))||(null===(i=a.message)||void 0===i?void 0:i.includes("unauthorized")))&&(n=d.PLAID_INVALID_CREDENTIALS,r="Authentication failed. Please check your credentials.",o=!1),this.handleError({code:n,message:r,severity:l[n],originalError:a,retryable:o,userAction:o?"Click to try again":"Check your credentials"})}},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=async t=>{var e;this.isAuthenticating=!1,this.isLoading=!0,this.clearError();try{const s=await this.plaidService.postPlaidVerifiedBankAccountData(this.authToken,this.businessId,{public_token:t,link_token_id:this.linkTokenId},null===(e=this.abortController)||void 0===e?void 0:e.signal);if(s.error)throw new Error("string"==typeof s.error?s.error:s.error.message||"Failed to verify bank account");this.isSuccess=!0,this.isLoading=!1,this.plaidVerificationSuccess.emit({publicToken:t,bankAccount:s.data})}catch(t){this.isLoading=!1,this.handleError({code:d.PLAID_AUTHENTICATION_FAILED,message:(null==t?void 0:t.message)||"Failed to verify bank account",severity:l[d.PLAID_AUTHENTICATION_FAILED],originalError:t,retryable:!0,userAction:"Click to try again"})}},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=d.PLAID_AUTHENTICATION_FAILED,s=c[e],i=!0,a="Click to try again";if(t.error_code)switch(t.error_code){case"INVALID_CREDENTIALS":e=d.PLAID_INVALID_CREDENTIALS,s=c[e],i=!0;break;case"ITEM_LOGIN_REQUIRED":e=d.PLAID_INVALID_CREDENTIALS,s="Your bank requires re-authentication. Please try again.",i=!0;break;case"ITEM_LOCKED":e=d.PLAID_ACCOUNT_LOCKED,s=c[e],i=!1,a="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":e=d.PLAID_MAINTENANCE,s=c[e],i=!0;break;case"RATE_LIMIT_EXCEEDED":e=d.PLAID_RATE_LIMITED,s=c[e],i=!0;break;default:t.error_message&&(s=t.error_message)}this.handleError({code:e,message:s,severity:l[e],originalError:t,retryable:i,userAction:a}),this.isAuthenticating=!1},this.handleError=t=>{this.error=t,this.isLoading=!1,this.plaidVerificationError.emit(t),console.error("Plaid verification error:",t)},this.clearError=()=>{this.error&&(this.error=null)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.initializePlaidLink()},this.scriptRef.onerror=()=>{this.handleError({code:d.PLAID_SDK_LOAD_FAILED,message:c[d.PLAID_SDK_LOAD_FAILED],severity:l[d.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}disconnectedCallback(){this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){const t=s("svg",{class:"plaid-logo-img",height:"20",width:"20",viewBox:"0 0 28 29",xmlns:"http://www.w3.org/2000/svg",style:{display:"inline",marginLeft:"5px",marginRight:"5px",marginTop:"-2px"}},s("g",{fill:"#fff","fill-rule":"evenodd"},s("path",{d:"M25.7629 26.2628L28 17.5309L24.9691 14.5001L27.9999 11.4691L25.7628 2.73706L17.0309 0.5L14.0001 3.531L10.969 0.50014L2.23706 2.73734L0 11.4691L3.03128 14.4999L0.00014 17.531L2.2372 26.2629L10.9691 28.5L14.0001 25.469L17.031 28.4999L25.7629 26.2628ZM15.7321 23.7371L18.6186 20.8505L22.2912 24.5233L17.6956 25.7007L15.7321 23.7371ZM11.1136 9.88154L14.0003 6.99502L16.8868 9.8814L14.0001 12.7679L11.1136 9.88154ZM12.2682 14.5L9.38154 17.3865L6.49502 14.5L9.38154 11.6135L12.2682 14.5ZM18.6187 11.6133L21.5053 14.5L18.6186 17.3865L15.7321 14.5L18.6187 11.6133ZM16.8867 19.1186L14.0001 22.0051L11.1135 19.1185L14.0001 16.2319L16.8867 19.1186ZM10.3044 25.7007L5.70864 24.5233L9.38154 20.8504L12.2682 23.7371L10.3044 25.7007ZM4.76308 16.2319L7.6496 19.1185L3.9767 22.7914L2.7993 18.1957L4.76308 16.2319ZM3.9767 6.20836L7.64974 9.8814L4.76308 12.7681L2.7993 10.8041L3.9767 6.20836ZM12.2683 5.26294L9.38168 8.1496L5.70892 4.4767L10.3047 3.2993L12.2683 5.26294ZM17.6959 3.2993L22.2915 4.4767L18.6186 8.14946L15.7321 5.26294L17.6959 3.2993ZM23.2372 12.7681L20.3505 9.8814L24.0233 6.20878L25.2007 10.8046L23.2372 12.7681ZM24.0233 22.7914L20.3505 19.1186L23.2372 16.2321L25.2007 18.1957L24.0233 22.7914Z"})));return s(_t,null,s("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:t=>this.scriptRef=t}),s("div",null,s("div",{class:"mb-3"},s(ct,{variant:"primary",type:"button",onClick:t=>{t.preventDefault(),this.openPlaidLink()},disabled:this.isLoading,part:$},"Connect with Plaid ",t," (instant verification)")),(()=>this.error?s("div",{class:(this.error.severity===a.ERROR?"text-danger":this.error.severity===a.WARNING?"text-warning":"text-info")+" mt-2"},s("small",null,this.error.message),s("br",null),this.error.userAction&&s("small",{class:"text-muted"},this.error.userAction)):null)(),(()=>this.error?null:this.isLoading?s("div",{class:"text-info mt-2"},s("small",null,"Verifying bank account...")):this.isSuccess?s("div",{class:"text-success mt-2"},s("small",null,"✓ Bank account verified successfully")):this.isAuthenticating?s("div",{class:"text-info mt-2"},s("small",null,"Connecting to your bank...")):null)()))}};export{Lt as additional_questions_form_step,Ct as bank_account_document_form_inputs,jt as bank_account_form_inputs,Ot as bank_account_form_inputs_canada,Ht as business_bank_account_form_step,Dt as business_core_info_form_step,Vt as business_documents_on_file,Bt as business_owners_form_step,Pt as business_representative_form_inputs,Nt as business_representative_form_step,Mt as business_terms_conditions_form_step,Rt as legal_address_form_step,Ft as owner_form,qt as plaid_verification}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as s,H as i,g as a}from"./p-CV0Pyo1O.js";import{a7 as r,v as o,q as d,w as h,x as c,A as n,u as l,a0 as f}from"./p-DnrawQn3.js";import{F as b}from"./p-uCg79W3M.js";import{F as m}from"./p-BsQy297i.js";import"./p-CZfYo5-1.js";import{F as u}from"./p-CKiAlBsU.js";import{O as p}from"./p-BcNb9bVO.js";import{d as y}from"./p-D8EGHc_m.js";import{B as k}from"./p-2LVpxCS_.js";import{B as v}from"./p-XYgDHrVL.js";import{I as g,P as w}from"./p-CVaOFfrI.js";import{u as j,a as x,b as C}from"./p-C6o0liMT.js";import{c as T}from"./p-_-2E_vYf.js";import"./p-BFTU3MAI.js";import"./p-HT_4DkD0.js";import"./p-Bt4GjEWL.js";const V=class{constructor(s){t(this,s),this.formControlInput=e(this,"formControlInput",7),this.formControlBlur=e(this,"formControlBlur",7),this.isFocused=!1,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("input");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?r:this.isFocused?o:this.errorText?d:h}render(){return s(i,{key:"d2463dd8a7f976628a67b94401e833ed1c53d777"},s("div",{key:"2b77b2fa81d256a4fa52c85efce570cac62a4e31",class:"form-group d-flex flex-column"},s("label",{key:"baf3c9be24dd987907c234dd53e886ac6e3fc459",part:c,class:"form-label",htmlFor:this.name},this.label),s("input",{key:"9f456e006e074480dda19fa6433f19beb35e35bc",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:"number",disabled:this.disabled}),s(b,{key:"82100020ced402e13591f6624e45f5f85aa6980f",helpText:this.helpText,name:this.name}),s(m,{key:"d41b38f4908ada125ff2344d23c837780ae057ba",errorText:this.errorText,name:this.name})))}get el(){return a(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},_=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){t(this,s),this.clickEvent=e(this,"click-event",7),this.errorEvent=e(this,"error-event",7),this.formLoading=e(this,"formLoading",7),this.ownerSubmitted=e(this,"ownerSubmitted",7),this.isLoading=!1,this.errors={},this.owner={},this.getData=()=>{this.isLoading=!0,this.getOwner({onSuccess:t=>{this.instantiateOwner(t.data)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>this.isLoading=!1})},this.sendData=()=>(this.isLoading=!0,new Promise((t=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:e=>{this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async t=>{this.owner=Object.assign({},new p(t)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?v.updateOwner:v.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:v.removeOwner})},this.validate=this.validate.bind(this),this.submit=this.submit.bind(this),this.validateAndSubmit=this.validateAndSubmit.bind(this)}async returnOwnerData(){return this.ownerId}async validate(){return this.formController.validate()}async submit(){if(await this.validate())return this.sendData()}async validateAndSubmit(t){t.preventDefault(),await this.validate()&&this.submit()}get payload(){let t=new p(this.formController.values.getValue()).payload;return this.ownerId?t:Object.assign(Object.assign({},t),{business_id:this.businessId})}get formTitle(){return this.ownerId?"Edit Business Owner":"Add Business Owner"}get submitButtonText(){return this.ownerId?"Update":"Add"}get showRemoveButton(){return!(this.ownersLength<=1)&&(!(this.ownerId||!this.newFormOpen)||!(!this.ownerId||this.newFormOpen)||void 0)}componentWillLoad(){this.formController=new u((0,y[this.country])("owner",this.allowOptionalFields)),this.ownerId?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((t=>this.errors=Object.assign({},t)))}render(){return s("form",{key:"63cf9c7ab9031786f17ea4f3787deea081e305d3",onSubmit:this.validateAndSubmit},s("fieldset",{key:"cef59454c61515f702e846d43242f1576e604953"},s("legend",{key:"355974c342272cd90c6596129a83866f8ad20e37",class:"fw-semibold fs-5",part:n},this.formTitle),s("br",{key:"c78a4742ca2fa7bea462d4c7b1d3e73ccb8cccb9"}),s("div",{key:"ec96fba914ce8eea8223efab633873c79741e29b",class:"row gy-3"},s("owner-form-inputs",{key:"8b1b9118ac93457b38237387d478b3d084fad07d",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController,country:this.country}),s("div",{key:"b599ded9cecb9999e3c8b3310f0c70fd07c64690",class:"d-flex gap-2 justify-content-start"},s(k,{key:"54bcdf883415ada89b81b4826cfea23061d4fc60",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(k,{key:"eb990b891fe82108eae8c80da39e5ada7ef27f1e",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"7000dfde686b1879776ab63dcb6a203c0eb519c1"})))}static get watchers(){return{isLoading:["loadingWatcher"]}}},O=class{constructor(e){t(this,e),this.isEditingIdentification=!1,this.inputHandler=(t,e)=>{j(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{x(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))}}render(){var t,e,i;return s("div",{key:"212e1849ea4415835cb4f792cf5799b606ccd170",class:"row gy-3"},s("div",{key:"bc904468596d8a2b6cf82f9cca153d1db7fd9be3",class:"col-12 col-md-8"},s("form-control-text",{key:"116f4a8124743a3bdd01489f7ac4964852d2f701",name:"name",label:"Full Name",defaultValue:this.ownerDefaultValue.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"d1de51aa5d3760553012ddc586dc6068c456463f",class:"col-12 col-md-4"},s("form-control-text",{key:"542bd69f56380823a8a2fcf0f95df56a4802e52a",name:"title",label:"Title",defaultValue:this.ownerDefaultValue.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),s("div",{key:"f8230d52a4a685e358bf118d4f77849e8e23f58e",class:"col-12 col-md-6"},s("form-control-text",{key:"0d41fa107ba89a5a6a1dfe2b97d42a86feef3eb0",name:"email",label:"Email Address",defaultValue:this.ownerDefaultValue.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"c403d5cf82cc89de42a31f3478e5cda3c2309dac",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"bc0e1c91619857bcac7776e686534763898bdd79",name:"phone",label:"Phone Number",defaultValue:this.ownerDefaultValue.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:w.US})),s("div",{key:"43c3b72350a475defd393625a0d88e5720ab121c",class:"col-12 col-md-3"},s("form-control-date",{key:"4f1bd966e4a28fdcfc3539cb51b97e73bf7bf242",name:"dob_full",label:"Birth Date",defaultValue:this.ownerDefaultValue.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>C(t,this.formController),helpText:"Must be 18 or older."})),s("div",{key:"963e110d0f208730944fe7637ba0a3a9ada66a38",class:"col-12 col-md-3"},s("form-control-number",{key:"182586a1b86d351cb5063c0ca0ee578959a93369",name:"ownership_percentage",label:"% of Ownership",defaultValue:null===(t=this.ownerDefaultValue)||void 0===t?void 0:t.ownership_percentage,errorText:this.errors.ownership_percentage,inputHandler:this.inputHandler})),s("div",{key:"bf966123cd887a09b81e9e599118ee03cadabfe2",class:"col-12 col-md-6"},!(null===(e=this.ownerDefaultValue)||void 0===e?void 0:e.ssn_last4)||this.isEditingIdentification?s("form-control-number-masked",{name:"identification_number",label:T[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":this.ownerDefaultValue.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:g[this.country],helpText:T[this.country].identityHelpText}):s("div",null,s("label",{class:"form-label",part:c},T[this.country].idNumberLabel),s("div",{class:"input-group mb-3"},s("input",{type:"text",class:"form-control",part:l,value:`****${null===(i=this.ownerDefaultValue)||void 0===i?void 0:i.ssn_last4}`,disabled:!0}),s("button",{class:"btn btn-secondary",type:"button",part:f,onClick:()=>{this.isEditingIdentification=!0,j(this.formController,{ssn_last4:null,identification_number:""})}},"Change")))),s("div",{key:"da39a950fb0f4042d6047a88db4fb1cf7a7b9d07",class:"col-12"},s("identity-address-form",{key:"7ef03a0303d6f62098b5c38d669648bd4557437f",errors:this.errors.address,defaultValues:this.ownerDefaultValue.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))}};export{V as form_control_number,_ as owner_form_core,O as owner_form_inputs}
@@ -1 +0,0 @@
1
- import{r as s,h as t}from"./p-CV0Pyo1O.js";import{S as r}from"./p-BqNNwq6C.js";import{S as f}from"./p-DcBvJu0k.js";import"./p-DnrawQn3.js";const o=class{constructor(t){s(this,t)}render(){return t(r,{key:"d19fcf55df4b5b001d31af93c263fef39fc0d160"},t(f,{key:"9ab49d76aa71146287fff2013050e008342f0275",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{o as justifi_skeleton}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e,H as i}from"./p-CV0Pyo1O.js";import{K as h,L as a,M as r,N as c,O as o,x as n}from"./p-DnrawQn3.js";const f=class{constructor(e){t(this,e),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.errorText="",this.handleFormControlInput=t=>{const s=t.target.getAttribute("name");this.inputHandler(s,this.value),this.formControlInput.emit({name:s,value:this.value})}}get part(){return this.errorText?h:this.isFocused&&this.checked?a:this.checked?r:this.isFocused?c:o}render(){return e(i,{key:"8237875c1a682811ded25055266f441c6edc6776",class:"form-group d-flex flex-column"},e("div",{key:"310fe7054d414089f3a1e4c457c07e33cb2d55ff",class:"form-check"},e("input",{key:"5894a2e071758c9d647c25724a31b8a6f849353e",ref:t=>this.radioElement=t,type:"radio",id:`${this.name}-${this.value}`,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onChange:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,value:this.value,checked:this.checked}),e("label",{key:"148b64863e27ad053a2e284f3c17ab994beeca55",class:"form-check-label",htmlFor:`${this.name}-${this.value}`,part:n},this.label)),e("form-control-help-text",{key:"d46e307063145956af0b181fa8f18ecc9ebbc518",helpText:this.helpText,name:this.name}),e("form-control-error-text",{key:"06e5867c703104a9c2d136305a663179c5bcb0f6",errorText:this.errorText,name:this.name}))}};export{f as form_control_radio}
@@ -1 +0,0 @@
1
- import{h as s,F as e,r as i,c as t}from"./p-CV0Pyo1O.js";import{E as r}from"./p-x9fFFf7F.js";import{B as a}from"./p-CsdYMTrc.js";import{m as o}from"./p-qrNmDp6K.js";import{C as n,e as l}from"./p-CUI41_5y.js";import{J as c}from"./p-zi3ljCdQ.js";import{c as p}from"./p-DgH-jcIo.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{S as h}from"./p-DcBvJu0k.js";import"./p-DnrawQn3.js";import"./p-CYQvLgSs.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-BRnBHsdq.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-B5vVjDc_.js";import"./p-beXEDfB9.js";const m=()=>{const i=()=>s("div",{class:"mt-5"},s(h,{width:"40%",height:"1.5rem"}),s("hr",null),s("div",{class:"row g-3"},s("div",{class:"col-12 col-md-6"},s(h,null),s(h,null),s(h,null)),s("div",{class:"col-12 col-md-6"},s(h,null),s(h,null),s(h,null))));return s(e,null,s(i,null),s(i,null),s(i,null),s(i,null))},f=class{constructor(s){i(this,s),this.errorEvent=t(this,"error-event",7),this.loading=!0}componentWillLoad(){p(),this.analytics=new c(this),this.initializeGetBusiness()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetBusiness()}initializeGetBusiness(){this.businessId&&this.authToken?(this.getBusiness=o({id:this.businessId,authToken:this.authToken,service:new a}),this.fetchData()):(this.errorMessage="Invalid business id or auth token",this.errorEvent.emit({errorCode:l.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}updateOnPropChange(){this.getBusiness&&this.fetchData()}fetchData(){this.loading=!0,this.getBusiness({onSuccess:({business:s})=>{this.business=s,this.errorMessage=null},onError:({error:s,code:e,severity:i})=>{this.errorMessage=s,this.errorEvent.emit({errorCode:e,message:s,severity:i})},final:()=>{this.loading=!1}})}render(){return s(d,{key:"7ce48e6905cdbbf8f94470913ecfa3ef8dbb76c7"},this.loading&&s(m,{key:"7c3439e0c247436cd7951d3bdc32e7672c9f8447"}),!this.loading&&this.errorMessage&&r(this.errorMessage),!this.loading&&!this.errorMessage&&this.business&&s("justifi-details",{key:"bf57dacf2067f2704014ce3e002958e3306bba73",errorMessage:this.errorMessage},s("div",{key:"46d19a178ba0d33aa21a4f3900128e3e905731a9",slot:"detail-sections"},s("core-info-details",{key:"ac217a4cfe6b45810a85ca320760b7331f76e60b",business:this.business}),s("legal-address-details",{key:"1fc1a196a43bcf5f9eafd09bfe74c8bb7c409797",legalAddress:this.business.legal_address}),s("representative-details",{key:"1e0833606b129f69a05946726172963cbec05189",representative:this.business.representative}),s("owner-details",{key:"c974111dc67a8961ef6435c34843ca927ad8a7e5",owners:this.business.owners}),s("additional-questions-details",{key:"0951d284a373457e98a1dafc80231ec3ee057e0a",additionalQuestions:this.business.additional_questions}))))}static get watchers(){return{businessId:["propChanged"],authToken:["propChanged"],getBusiness:["updateOnPropChange"]}}};export{f as justifi_business_details}
@@ -1 +0,0 @@
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-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{R as a,C as u,e as c,n as h}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{B as l}from"./p-2LVpxCS_.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-Dbg501Lu.js";import{m as p}from"./p-DWevPe7C.js";import{J as f}from"./p-zi3ljCdQ.js";import{c as v}from"./p-DgH-jcIo.js";import{g as y,a as j}from"./p-B5vVjDc_.js";import{A as b}from"./p-CYQvLgSs.js";import{S as w}from"./p-DcBvJu0k.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-DnrawQn3.js";import"./p-beXEDfB9.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}))},g=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([a.customerRequest,a.duplicate,a.fraudulent],"Select a reason")})},I=[{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"}],B=b();class S{async postRefund(t,e,s,r){return B.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const T=b();class D{async postVoid(t,e,s){return T.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const k=()=>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(k,null),t(k,null),t(k,null))),A=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(g())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(c.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",u.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(g(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 h({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(c.MISSING_PROPS,"Payment ID and Auth Token are required",u.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 a;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(a=o.error)||void 0===a?void 0:a.code),severity:u.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:u.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new D});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:a})=>{var c;try{const a=await r.postRefund(s,e,t,i);if(a.error)return o({error:j(a.error),code:y(null===(c=a.error)||void 0===c?void 0:c.code),severity:u.ERROR});n(a)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:u.ERROR})}finally{return a()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new S});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:I,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{A as justifi_refund_payment}
@@ -1 +0,0 @@
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}from"./p-DgH-jcIo.js";import{d as o}from"./p-niGr4RT2.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{k as n,C as a,e as p}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{g as c,a as m}from"./p-B5vVjDc_.js";import{A as d}from"./p-CYQvLgSs.js";import{J as l}from"./p-zi3ljCdQ.js";import"./p-beXEDfB9.js";import"./p-DnrawQn3.js";import"./p-BRnBHsdq.js";import"./p-pL4dNfsl.js";import"./p-D8GTwl9v.js";const h=d();class j{async fetchTerminalOrders(r,s,t){return h.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const u=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=o,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new l(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:p})=>{var d,l;try{const p=await t.fetchTerminalOrders(r,s,i);if(p.error)return o({error:m(p.error),code:c(null===(l=p.error)||void 0===l?void 0:l.code),severity:a.ERROR});{const r=Object.assign({},p.page_info);e({terminalOrders:(null===(d=p.data)||void 0===d?void 0:d.map((r=>new n(r))))||[],pagingInfo:r})}}catch(r){const s=c(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:a.ERROR})}finally{return p()}})({id:this.accountId,authToken:this.authToken,service:new j}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}render(){return t(i,{key:"65330929a53f4e5e07177541460ccce864edd3ec"},t("terminal-orders-list-core",{key:"79d4bc028395ede9b9f2e2c12729cc20532ef251",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{u as justifi_terminal_orders_list}
@@ -1 +0,0 @@
1
- import{r as a,h as e}from"./p-CV0Pyo1O.js";import{f as t,p as s,c as r}from"./p-Dm07nLGs.js";import{f as l,a as d}from"./p-DnrawQn3.js";import{S as i}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as o,a as c}from"./p-BRnBHsdq.js";import"./p-DVJaoI_m.js";import{P as p}from"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";const f=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{t[a]=e},this.handleDateInput=(a,e)=>{const t=o(e,{setEndOfDay:!0});this.setParamsOnChange(a,t)}}componentWillLoad(){Object.entries({status:this.status,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([a,e])=>{e&&(s[a]=e)}))}get statusOptions(){return[{label:"All",value:""},{label:p.paid,value:"paid"},{label:p.failed,value:"failed"},{label:p.forwarded,value:"forwarded"},{label:p.scheduled,value:"scheduled"},{label:p.in_transit,value:"in_transit"},{label:p.canceled,value:"canceled"}]}render(){const a=Object.assign({},t);return e(i,{key:"cae6be7a9441ff6024548135f66a73694c53b10b"},e("table-filters-menu",{key:"a419bb5344248f9a857a9b21800c482a983e68e8",params:a,clearParams:r,part:l},e("div",{key:"ee4aa221a245a63e181d9f1e31a0b120cbe4ff2c",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"32ba66ccea590b297d27ec734c6e6b3da1d7ae0f",class:"p-2"},e("form-control-select",{key:"ff480f5fc8d38d0240d952b1cd689d4f5776e35d",name:"status",label:"Status",options:this.statusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.status||t.status||"",disabled:!!this.status,part:d})),e("div",{key:"3b3de6360d735ac8399d2e16538a00aa5736a6c1",class:"p-2"},e("form-control-date",{key:"f3f9fe5154fdf1d98becdcd4c8ed5a0099c8aa76",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:c(this.createdAfter,{showInputDate:!0})||c(t.created_after,{showInputDate:!0}),disabled:!!this.createdAfter,part:d})),e("div",{key:"0e95676650aba436b67f9e0537a5f3467015c9e5",class:"p-2"},e("form-control-date",{key:"6aafa1c4d7cc1921559de295e3213307cc34ed54",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:c(this.createdBefore,{showInputDate:!0})||c(t.created_before,{showInputDate:!0}),disabled:!!this.createdBefore,part:d})))))}};export{f as justifi_payouts_list_filters}
@@ -1 +0,0 @@
1
- import{A as n}from"./p-CYQvLgSs.js";import"./p-CUI41_5y.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";const t=n();class i{async getLinkToken(n,i,o,e){return t.post({endpoint:`plaid/${i}/link`,body:{checkout_id:o},authToken:n,signal:e})}async getLinkTokenForVerification(n,i,o){return t.post({endpoint:`entities/plaid/${i}/link_token`,body:{},authToken:n,signal:o})}async getBankAccountData(n,i,o){return t.get({endpoint:`entities/plaid/${i}/bank_account`,authToken:n,signal:o})}async postPlaidVerifiedBankAccountData(n,i,o,e){return t.post({endpoint:`entities/plaid/${i}/bank_account`,body:o,authToken:n,signal:e})}async tokenizeBankAccount(n,i,o,e,a,s){const c=`plaid/${i}/tokenize`,p={public_token:o};return e&&(p.link_token_id=e),a&&(p.payment_method_group_id=a),t.post({endpoint:c,body:p,authToken:n,signal:s})}}export{i as P}
@@ -1 +0,0 @@
1
- var s;!function(s){s.won="won",s.lost="lost",s.underReview="under_review",s.needsResponse="needs_response"}(s||(s={}));class t{get needsResponse(){return this.status==s.needsResponse}get underReview(){return this.status==s.underReview}get won(){return this.status==s.won}get lost(){return this.status==s.lost}constructor(s){this.id=s.id,this.amount=s.amount,this.currency=s.currency,this.payment_id=s.payment_id,this.reason=s.reason,this.due_date=s.due_date,this.status=s.status,this.metadata=s.metadata,this.created_at=s.created_at,this.updated_at=s.updated_at,this.dispute_response=s.dispute_response?new i(s.dispute_response):void 0}}class i{constructor(s){this.additional_statement=s.additional_statement,this.cancellation_policy_disclosure=s.cancellation_policy_disclosure,this.cancellation_rebuttal=s.cancellation_rebuttal,this.customer_billing_address=s.customer_billing_address,this.customer_email_address=s.customer_email_address,this.customer_name=s.customer_name,this.customer_purchase_ip_address=s.customer_purchase_ip_address,this.duplicate_charge_explanation=s.duplicate_charge_explanation,this.product_description=s.product_description,this.refund_policy_disclosure=s.refund_policy_disclosure,this.refund_refusal_explanation=s.refund_refusal_explanation,this.service_date=s.service_date,this.shipping_address=s.shipping_address,this.shipping_carrier=s.shipping_carrier,this.shipping_date=s.shipping_date,this.shipping_tracking_number=s.shipping_tracking_number,this.duplicate_charge_original_payment_id=s.duplicate_charge_original_payment_id}}export{t as D,s as a}
@@ -1 +0,0 @@
1
- var e,t;!function(e){e.nextStep="nextStep",e.previousStep="previousStep",e.cancelDispute="cancelDispute",e.respondToDispute="respondToDispute",e.submit="submit"}(e||(e={})),function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(t||(t={}));export{e as D}
@@ -1 +0,0 @@
1
- import{c as s,a as e}from"./p-CKiAlBsU.js";import{m as a,d as i,i as n,b as t,a as r,p as o,e as _,w as u,c,t as l,o as b,f as m,r as d,g as p}from"./p-HT_4DkD0.js";import{C as v}from"./p-BcNb9bVO.js";import{c as f}from"./p-_-2E_vYf.js";const h=e=>{const a=s({legal_name:c.required("Enter legal name"),website_url:u.required("Enter business website url"),email:_.required("Enter business email"),phone:o.required("Enter phone number"),doing_business_as:r.nullable(),classification:t.required("Select business classification"),industry:n.required("Enter a business industry"),date_of_incorporation:i.required("Enter date of registration")}),b=s({legal_name:c.required("Enter legal name"),website_url:u.nullable(),email:_.nullable(),phone:o.nullable(),doing_business_as:r.nullable(),classification:t.nullable(),industry:n.nullable(),tax_id:l.nullable(),date_of_incorporation:i.nullable()});return e?b:a},E=i=>h(i).concat(s({classification:e().required("Select business classification"),tax_id:a(v.USA).when("tax_id_last4",{is:s=>!s,then:s=>s.required(`Enter valid ${f.USA.taxIdLabel} without dashes`),otherwise:s=>s.nullable()})})),g=i=>h(i).concat(s({classification:e().required("Select business classification"),tax_id:a(v.CAN).when("tax_id_last4",{is:s=>!s,then:s=>s.required(`Enter valid ${f.CAN.taxIdLabel} without dashes`),otherwise:s=>s.nullable()})})),w=e=>{const a=s({business_revenue:d.required("Enter business revenue"),business_payment_volume:p.required("Enter business payment volume"),business_average_transaction_amount:d.required("Enter average transaction amount"),business_when_service_received:m.required("Select when service is received"),business_other_payment_details:b.nullable()}),i=s({business_revenue:d.nullable(),business_payment_volume:p.nullable(),business_average_transaction_amount:d.nullable(),business_when_service_received:m.nullable(),business_other_payment_details:b.nullable()});return e?i:a};export{w as a,E as b,g as c}