@justifi/webcomponents 5.3.2 → 5.3.3

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 (596) hide show
  1. package/dist/cjs/{check-pkg-version-fe4c6467.js → Analytics-f448aa27.js} +8 -23
  2. package/dist/cjs/{Api-089e7501.js → Api-f5280a80.js} +0 -13
  3. package/dist/cjs/{Business-cfd6a2dd.js → Business-d88b77fd.js} +6 -2
  4. package/dist/cjs/{Checkout-0f1c8abe.js → Checkout-1c07dc32.js} +14 -7
  5. package/dist/cjs/{SubAccount-509ebf93.js → SubAccount-b4811a8e.js} +6 -9
  6. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  7. package/dist/cjs/{badge-ccfe03bf.js → badge-86a6a7f8.js} +1 -1
  8. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +9 -9
  9. package/dist/cjs/bank-account-form_9.cjs.entry.js +78 -5
  10. package/dist/cjs/billing-form_3.cjs.entry.js +11 -11
  11. package/dist/cjs/{business-additional-questions-schema-2cc0c6f7.js → business-additional-questions-schema-5c100f58.js} +1 -1
  12. package/dist/cjs/business-details-core.cjs.entry.js +3 -3
  13. package/dist/cjs/{business-form-options-4bcb8943.js → business-form-options-62e9c8ab.js} +1 -1
  14. package/dist/cjs/{business-identity-schema-7d462eb3.js → business-identity-schema-3b4d16f1.js} +1 -1
  15. package/dist/cjs/{business.service-33d7c7f2.js → business.service-6b05ee96.js} +8 -8
  16. package/dist/cjs/{button-8b634147.js → button-5f6c437f.js} +1 -1
  17. package/dist/cjs/check-pkg-version-d75dc147.js +24 -0
  18. package/dist/cjs/{checkout.service-d9047ddb.js → checkout.service-aa037531.js} +6 -6
  19. package/dist/cjs/checkouts-list-core.cjs.entry.js +16 -15
  20. package/dist/cjs/checkouts-list-params-state-644d3639.js +22 -0
  21. package/dist/cjs/{checkouts-table-efa1cbab.js → checkouts-table-cf3e245e.js} +2 -2
  22. package/dist/cjs/custom-popper_4.cjs.entry.js +8 -8
  23. package/dist/cjs/{dispute.service-739631c7.js → dispute.service-27dcd7f4.js} +7 -7
  24. package/dist/cjs/event-types-b6d34593.js +8 -0
  25. package/dist/cjs/form-alert_5.cjs.entry.js +3 -3
  26. package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
  27. package/dist/cjs/form-control-date.cjs.entry.js +4 -4
  28. package/dist/cjs/{form-control-error-text-46a7f2dd.js → form-control-error-text-9905e3b8.js} +1 -1
  29. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +4 -4
  30. package/dist/cjs/{form-control-help-text-98c882e3.js → form-control-help-text-8d031bfb.js} +1 -1
  31. package/dist/cjs/form-control-monetary.cjs.entry.js +5 -5
  32. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +4 -4
  33. package/dist/cjs/form-control-number.cjs.entry.js +5 -5
  34. package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
  35. package/dist/cjs/get-business-0bd063d2.js +34 -0
  36. package/dist/cjs/{get-payout-csv-bdaff21b.js → get-payout-csv-7646128d.js} +6 -15
  37. package/dist/cjs/{get-subaccounts-2db9fc01.js → get-subaccounts-cc933b3e.js} +4 -7
  38. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +4 -4
  39. package/dist/cjs/{header-1-4c21f7ca.js → header-1-b202dbbb.js} +1 -1
  40. package/dist/cjs/{header-3-130206cc.js → header-3-5f78acd1.js} +1 -1
  41. package/dist/cjs/{insurance-state-21fde44f.js → insurance-state-ba0c39a9.js} +1 -1
  42. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +10 -10
  43. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +9 -9
  44. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +9 -9
  45. package/dist/cjs/justifi-business-details.cjs.entry.js +13 -38
  46. package/dist/cjs/justifi-business-form.cjs.entry.js +17 -16
  47. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
  48. package/dist/cjs/justifi-checkout-core.cjs.entry.js +6 -6
  49. package/dist/cjs/justifi-checkout.cjs.entry.js +11 -10
  50. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +32 -9
  51. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +14 -13
  52. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  53. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  54. package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -9
  55. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +15 -14
  56. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +8 -7
  57. package/dist/cjs/justifi-order-terminals.cjs.entry.js +102 -0
  58. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +8 -8
  59. package/dist/cjs/justifi-payment-details.cjs.entry.js +10 -9
  60. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +2 -2
  61. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -6
  62. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +3 -3
  63. package/dist/cjs/justifi-payments-list.cjs.entry.js +14 -13
  64. package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -9
  65. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +20 -3
  66. package/dist/cjs/justifi-payouts-list.cjs.entry.js +15 -14
  67. package/dist/cjs/justifi-refund-form.cjs.entry.js +5 -5
  68. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +3 -3
  69. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +10 -9
  70. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +41 -0
  71. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +27 -6
  72. package/dist/cjs/justifi-terminals-list.cjs.entry.js +15 -20
  73. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +11 -10
  74. package/dist/cjs/loader.cjs.js +1 -1
  75. package/dist/cjs/{package-8b04bef0.js → package-a24ad889.js} +1 -1
  76. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  77. package/dist/cjs/{parts-b2ff8b68.js → parts-c2655003.js} +32 -1
  78. package/dist/cjs/payment-details-core.cjs.entry.js +12 -12
  79. package/dist/cjs/{payment.service-87924c1a.js → payment.service-65fbac72.js} +5 -8
  80. package/dist/cjs/payments-list-core.cjs.entry.js +17 -16
  81. package/dist/cjs/{payments-status-ec12ee6a.js → payments-status-92abe577.js} +1 -1
  82. package/dist/cjs/{payments-table-f3aa174d.js → payments-table-c58e3ca8.js} +2 -2
  83. package/dist/cjs/payout-details-core.cjs.entry.js +7 -7
  84. package/dist/cjs/payouts-list-core.cjs.entry.js +22 -17
  85. package/dist/cjs/payouts-list-params-state-033b76d6.js +22 -0
  86. package/dist/cjs/{payouts-status-9f2e9a3a.js → payouts-status-703d62af.js} +1 -1
  87. package/dist/cjs/{payouts-table-4efa53fa.js → payouts-table-70fc1498.js} +3 -3
  88. package/dist/cjs/{schema-validations-f948158d.js → schema-validations-47a256f4.js} +1 -1
  89. package/dist/cjs/{skeleton-0353466d.js → skeleton-84102a44.js} +1 -1
  90. package/dist/cjs/{spinner-4fc60a51.js → spinner-70f38e5e.js} +1 -1
  91. package/dist/cjs/{event-types-34b103b4.js → table-fc82fa81.js} +2 -9
  92. package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
  93. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +80 -0
  94. package/dist/cjs/terminal-orders-table-61081532.js +18 -0
  95. package/dist/cjs/terminals-list-core.cjs.entry.js +16 -15
  96. package/dist/cjs/terminals-list-params-state-236f06f6.js +22 -0
  97. package/dist/cjs/{terminals-table-5e4bce93.js → terminals-table-db58a0c0.js} +3 -3
  98. package/dist/cjs/{utils-134dda01.js → utils-7c5b2837.js} +1 -1
  99. package/dist/cjs/webcomponents.cjs.js +1 -1
  100. package/dist/collection/{api → actions/sub-account}/get-subaccounts.js +2 -3
  101. package/dist/collection/api/Analytics.js +5 -0
  102. package/dist/collection/api/Business.js +6 -2
  103. package/dist/collection/api/Checkout.js +8 -1
  104. package/dist/collection/api/Payout.js +0 -3
  105. package/dist/collection/api/Terminal.js +6 -6
  106. package/dist/collection/api/services/analytics.service.js +1 -2
  107. package/dist/collection/api/services/business.service.js +7 -8
  108. package/dist/collection/api/services/checkout.service.js +4 -5
  109. package/dist/collection/api/services/dispute.service.js +4 -5
  110. package/dist/collection/api/services/insurance.service.js +2 -3
  111. package/dist/collection/api/services/payment.service.js +2 -6
  112. package/dist/collection/api/services/payout.service.js +3 -13
  113. package/dist/collection/api/services/provision.service.js +1 -2
  114. package/dist/collection/api/services/reports.service.js +1 -2
  115. package/dist/collection/api/services/subaccounts.service.js +1 -5
  116. package/dist/collection/api/services/terminal.service.js +2 -9
  117. package/dist/collection/collection-manifest.json +3 -0
  118. package/dist/collection/components/business-details/business-details.js +1 -1
  119. package/dist/collection/components/business-forms/business-form/business-form.js +1 -2
  120. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -3
  121. package/dist/collection/components/checkout/bank-account-form/bank-account-form-skeleton.js +10 -0
  122. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +24 -1
  123. package/dist/collection/components/checkout/card-form/card-form-skeleton.js +10 -0
  124. package/dist/collection/components/checkout/card-form/card-form.js +26 -1
  125. package/dist/collection/components/checkout/checkout.js +5 -6
  126. package/dist/collection/components/checkouts-list/checkouts-list-core.js +7 -9
  127. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +75 -9
  128. package/dist/collection/components/checkouts-list/checkouts-list-params-state.js +11 -5
  129. package/dist/collection/components/checkouts-list/checkouts-list.js +5 -6
  130. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  131. package/dist/collection/components/dispute-management/dispute-management.js +4 -5
  132. package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
  133. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  134. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  135. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  136. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  137. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +3 -4
  138. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  139. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  140. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  141. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  142. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  143. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  144. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +1 -1
  145. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +2 -2
  146. package/dist/collection/components/order-terminals/order-terminals-loading.js +6 -0
  147. package/dist/collection/components/order-terminals/order-terminals.js +139 -0
  148. package/dist/collection/components/payment-details/payment-details-core.js +7 -7
  149. package/dist/collection/components/payment-details/payment-details.js +1 -1
  150. package/dist/collection/components/payments-list/payments-list-core.js +7 -7
  151. package/dist/collection/components/payments-list/payments-list-filters.js +3 -3
  152. package/dist/collection/components/payments-list/payments-list.js +4 -5
  153. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  154. package/dist/collection/components/payout-details/payout-details.js +1 -1
  155. package/dist/collection/components/payouts-list/payouts-list-core.js +12 -10
  156. package/dist/collection/components/payouts-list/payouts-list-filters.js +58 -3
  157. package/dist/collection/components/payouts-list/payouts-list-params-state.js +11 -5
  158. package/dist/collection/components/payouts-list/payouts-list.js +5 -6
  159. package/dist/collection/components/payouts-list/payouts-table.js +1 -1
  160. package/dist/collection/components/refund-form/refund-form.js +2 -3
  161. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +141 -0
  162. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +113 -0
  163. package/dist/collection/components/terminal-orders-list/terminal-orders-table.js +11 -0
  164. package/dist/collection/components/terminals-list/terminals-list-core.js +7 -9
  165. package/dist/collection/components/terminals-list/terminals-list-filters.js +64 -6
  166. package/dist/collection/components/terminals-list/terminals-list-params-state.js +11 -5
  167. package/dist/collection/components/terminals-list/terminals-list.js +5 -6
  168. package/dist/collection/components/terminals-list/terminals-table.js +1 -1
  169. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +3 -4
  170. package/dist/collection/styles/parts.js +19 -0
  171. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  172. package/dist/collection/ui-components/filters/table-filters-menu.js +1 -1
  173. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  174. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  175. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  176. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  177. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  178. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  179. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  180. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  181. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  182. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  183. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  184. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  185. package/dist/collection/ui-components/form/iframe-input.js +23 -7
  186. package/dist/docs.json +515 -14
  187. package/dist/esm/{check-pkg-version-e2273f4f.js → Analytics-c083a998.js} +9 -23
  188. package/dist/esm/{Api-97801a4b.js → Api-391d00e2.js} +1 -13
  189. package/dist/esm/{Business-29c69f22.js → Business-0855931c.js} +6 -2
  190. package/dist/esm/{Checkout-8325c97a.js → Checkout-919eb1ba.js} +9 -2
  191. package/dist/esm/{ComponentError-3ce7f437.js → ComponentError-c61dce41.js} +1 -1
  192. package/dist/esm/{SubAccount-a73bf971.js → SubAccount-9aad3891.js} +7 -10
  193. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  194. package/dist/esm/{badge-938ba4b1.js → badge-2eb79416.js} +1 -1
  195. package/dist/esm/bank-account-document-form-inputs_4.entry.js +10 -10
  196. package/dist/esm/bank-account-form_9.entry.js +79 -6
  197. package/dist/esm/billing-form_3.entry.js +12 -12
  198. package/dist/esm/{business-additional-questions-schema-60e9b76a.js → business-additional-questions-schema-df76728f.js} +1 -1
  199. package/dist/esm/business-details-core.entry.js +3 -3
  200. package/dist/esm/{business-form-options-018f62a5.js → business-form-options-86a13078.js} +1 -1
  201. package/dist/esm/{business-identity-schema-191d85c2.js → business-identity-schema-0a78fc59.js} +1 -1
  202. package/dist/esm/{business.service-45c7df3c.js → business.service-98709b1e.js} +8 -8
  203. package/dist/esm/{button-4b3f3934.js → button-cc455199.js} +1 -1
  204. package/dist/esm/check-pkg-version-6d475fed.js +22 -0
  205. package/dist/esm/{checkout.service-36e3355e.js → checkout.service-9330c18a.js} +7 -7
  206. package/dist/esm/checkouts-list-core.entry.js +16 -15
  207. package/dist/esm/checkouts-list-params-state-7bdf00bd.js +16 -0
  208. package/dist/esm/{checkouts-table-1634366d.js → checkouts-table-53981285.js} +2 -2
  209. package/dist/esm/custom-popper_4.entry.js +8 -8
  210. package/dist/esm/{dispute.service-9b9b87e5.js → dispute.service-a14ac172.js} +8 -8
  211. package/dist/esm/event-types-0a83d0b4.js +8 -0
  212. package/dist/esm/form-alert_5.entry.js +3 -3
  213. package/dist/esm/form-control-checkbox.entry.js +5 -5
  214. package/dist/esm/form-control-date.entry.js +4 -4
  215. package/dist/esm/{form-control-error-text-b3d14e92.js → form-control-error-text-74c6b38a.js} +1 -1
  216. package/dist/esm/form-control-file-v2_2.entry.js +4 -4
  217. package/dist/esm/{form-control-help-text-7b07fc37.js → form-control-help-text-76a4196e.js} +1 -1
  218. package/dist/esm/form-control-monetary.entry.js +5 -5
  219. package/dist/esm/form-control-number-masked_2.entry.js +4 -4
  220. package/dist/esm/form-control-number.entry.js +5 -5
  221. package/dist/esm/form-control-radio.entry.js +3 -3
  222. package/dist/esm/get-business-464419f6.js +32 -0
  223. package/dist/esm/{get-payout-csv-80210301.js → get-payout-csv-87cc2147.js} +8 -17
  224. package/dist/esm/{get-subaccounts-d3eeb85d.js → get-subaccounts-26454771.js} +6 -9
  225. package/dist/esm/gross-payment-chart-core.entry.js +4 -4
  226. package/dist/esm/{header-1-4db0c986.js → header-1-797ca789.js} +1 -1
  227. package/dist/esm/{header-3-fd150ccf.js → header-3-544afa0b.js} +1 -1
  228. package/dist/esm/{insurance-state-529e2d0d.js → insurance-state-307335d6.js} +1 -1
  229. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +11 -11
  230. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +12 -12
  231. package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
  232. package/dist/esm/justifi-business-details.entry.js +11 -36
  233. package/dist/esm/justifi-business-form.entry.js +17 -16
  234. package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
  235. package/dist/esm/justifi-checkout-core.entry.js +7 -7
  236. package/dist/esm/justifi-checkout.entry.js +12 -11
  237. package/dist/esm/justifi-checkouts-list-filters.entry.js +32 -9
  238. package/dist/esm/justifi-checkouts-list.entry.js +15 -14
  239. package/dist/esm/justifi-details.entry.js +2 -2
  240. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  241. package/dist/esm/justifi-dispute-management.entry.js +11 -10
  242. package/dist/esm/justifi-dispute-notification_3.entry.js +16 -15
  243. package/dist/esm/justifi-gross-payment-chart.entry.js +9 -8
  244. package/dist/esm/justifi-order-terminals.entry.js +98 -0
  245. package/dist/esm/justifi-owner-form_3.entry.js +11 -11
  246. package/dist/esm/justifi-payment-details.entry.js +11 -10
  247. package/dist/esm/justifi-payment-provisioning-core.entry.js +3 -3
  248. package/dist/esm/justifi-payment-provisioning.entry.js +9 -8
  249. package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
  250. package/dist/esm/justifi-payments-list.entry.js +15 -14
  251. package/dist/esm/justifi-payout-details.entry.js +11 -10
  252. package/dist/esm/justifi-payouts-list-filters.entry.js +20 -3
  253. package/dist/esm/justifi-payouts-list.entry.js +16 -15
  254. package/dist/esm/justifi-refund-form.entry.js +6 -6
  255. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +3 -3
  256. package/dist/esm/justifi-season-interruption-insurance.entry.js +11 -10
  257. package/dist/esm/justifi-terminal-orders-list.entry.js +37 -0
  258. package/dist/esm/justifi-terminals-list-filters.entry.js +27 -6
  259. package/dist/esm/justifi-terminals-list.entry.js +16 -21
  260. package/dist/esm/justifi-tokenize-payment-method.entry.js +11 -10
  261. package/dist/esm/loader.js +1 -1
  262. package/dist/esm/{package-a8e8f775.js → package-13968013.js} +1 -1
  263. package/dist/esm/pagination-menu.entry.js +1 -1
  264. package/dist/esm/{parts-ab2bb4b5.js → parts-489f0af6.js} +21 -1
  265. package/dist/esm/payment-details-core.entry.js +12 -12
  266. package/dist/esm/{payment-provisioning-actions-726795a0.js → payment-provisioning-actions-beadac34.js} +2 -2
  267. package/dist/esm/{payment.service-c847c1f6.js → payment.service-35bbab8f.js} +6 -9
  268. package/dist/esm/payments-list-core.entry.js +17 -16
  269. package/dist/esm/{payments-status-abf1724b.js → payments-status-35255b2c.js} +1 -1
  270. package/dist/esm/{payments-table-88fbab49.js → payments-table-6e97396a.js} +2 -2
  271. package/dist/esm/payout-details-core.entry.js +7 -7
  272. package/dist/esm/payouts-list-core.entry.js +22 -17
  273. package/dist/esm/payouts-list-params-state-ebcee300.js +16 -0
  274. package/dist/esm/{payouts-status-d9987a8a.js → payouts-status-a0cc00c5.js} +1 -1
  275. package/dist/esm/{payouts-table-055d3633.js → payouts-table-6b8ba8f1.js} +3 -3
  276. package/dist/esm/{schema-validations-38e8bc7b.js → schema-validations-b1aec6a0.js} +1 -1
  277. package/dist/esm/{skeleton-ee7c3b32.js → skeleton-74fbfb68.js} +1 -1
  278. package/dist/esm/{spinner-8ec6669a.js → spinner-6b708842.js} +1 -1
  279. package/dist/esm/{event-types-fd7a05d9.js → table-e287f1c0.js} +3 -10
  280. package/dist/esm/table-filters-menu.entry.js +3 -3
  281. package/dist/esm/terminal-orders-list-core.entry.js +76 -0
  282. package/dist/esm/terminal-orders-table-765c44d5.js +14 -0
  283. package/dist/esm/terminals-list-core.entry.js +16 -15
  284. package/dist/esm/terminals-list-params-state-e4b2ec23.js +16 -0
  285. package/dist/esm/{terminals-table-2963e65b.js → terminals-table-c6258344.js} +3 -3
  286. package/dist/esm/{utils-c2dc83b2.js → utils-6c26bccc.js} +1 -1
  287. package/dist/esm/{utils-b10dae27.js → utils-fd99b806.js} +1 -1
  288. package/dist/esm/webcomponents.js +1 -1
  289. package/dist/module/Analytics.js +82 -0
  290. package/dist/module/{config.js → Api.js} +1 -13
  291. package/dist/module/Business.js +6 -2
  292. package/dist/module/Checkout.js +9 -2
  293. package/dist/module/SubAccount.js +7 -10
  294. package/dist/module/additional-statement.js +1 -1
  295. package/dist/module/bank-account-form2.js +37 -2
  296. package/dist/module/business-terms-conditions-form-step.js +3 -3
  297. package/dist/module/business.service.js +8 -8
  298. package/dist/module/cancellation-policy.js +1 -1
  299. package/dist/module/card-form2.js +43 -2
  300. package/dist/module/check-pkg-version.js +1 -75
  301. package/dist/module/checkout.service.js +4 -4
  302. package/dist/module/checkouts-list-core2.js +9 -9
  303. package/dist/module/checkouts-list-params-state.js +11 -5
  304. package/dist/module/custom-popper2.js +2 -2
  305. package/dist/module/customer-details.js +1 -1
  306. package/dist/module/dispute-management-core.js +1 -1
  307. package/dist/module/dispute-notification.js +2 -2
  308. package/dist/module/dispute-response-actions.js +5 -5
  309. package/dist/module/dispute-response-core.js +2 -2
  310. package/dist/module/dispute-response.js +4 -4
  311. package/dist/module/duplicate-charge.js +1 -1
  312. package/dist/module/electronic-evidence.js +1 -1
  313. package/dist/module/event-types2.js +1 -55
  314. package/dist/module/form-control-checkbox2.js +2 -2
  315. package/dist/module/form-control-date2.js +2 -2
  316. package/dist/module/form-control-file-v22.js +1 -1
  317. package/dist/module/form-control-file2.js +2 -2
  318. package/dist/module/form-control-monetary2.js +2 -2
  319. package/dist/module/form-control-number-masked2.js +2 -2
  320. package/dist/module/form-control-number.js +2 -2
  321. package/dist/module/form-control-radio2.js +2 -2
  322. package/dist/module/form-control-select2.js +2 -2
  323. package/dist/module/form-control-text2.js +2 -2
  324. package/dist/module/form-control-textarea2.js +2 -2
  325. package/dist/module/get-business.js +32 -0
  326. package/dist/module/get-payout-csv.js +4 -13
  327. package/dist/module/get-subaccounts.js +2 -5
  328. package/dist/module/gross-payment-chart-core2.js +1 -1
  329. package/dist/module/hidden-input2.js +1 -1
  330. package/dist/module/iframe-input2.js +6 -7
  331. package/dist/module/justifi-business-details.js +4 -31
  332. package/dist/module/justifi-business-form.js +4 -3
  333. package/dist/module/justifi-checkout.js +5 -5
  334. package/dist/module/justifi-checkouts-list-filters.js +34 -10
  335. package/dist/module/justifi-checkouts-list.js +4 -4
  336. package/dist/module/justifi-dispute-management.js +4 -4
  337. package/dist/module/justifi-gross-payment-chart.js +4 -3
  338. package/dist/module/justifi-order-terminals.d.ts +11 -0
  339. package/dist/module/justifi-order-terminals.js +119 -0
  340. package/dist/module/justifi-payment-details.js +2 -1
  341. package/dist/module/justifi-payment-provisioning.js +4 -3
  342. package/dist/module/justifi-payments-list-filters.js +3 -3
  343. package/dist/module/justifi-payments-list.js +4 -4
  344. package/dist/module/justifi-payout-details.js +2 -1
  345. package/dist/module/justifi-payouts-list-filters.js +24 -4
  346. package/dist/module/justifi-payouts-list.js +4 -4
  347. package/dist/module/justifi-refund-form.js +3 -3
  348. package/dist/module/justifi-season-interruption-insurance.js +6 -5
  349. package/dist/module/justifi-terminal-orders-list.d.ts +11 -0
  350. package/dist/module/justifi-terminal-orders-list.js +73 -0
  351. package/dist/module/justifi-terminals-list-filters.js +29 -7
  352. package/dist/module/justifi-terminals-list.js +7 -12
  353. package/dist/module/justifi-tokenize-payment-method.js +4 -4
  354. package/dist/module/package.js +1 -1
  355. package/dist/module/parts.js +21 -1
  356. package/dist/module/payment-details-core2.js +7 -7
  357. package/dist/module/payment.service.js +3 -6
  358. package/dist/module/payments-list-core2.js +9 -8
  359. package/dist/module/payout-details-core2.js +1 -1
  360. package/dist/module/payouts-list-core2.js +15 -11
  361. package/dist/module/payouts-list-params-state.js +11 -5
  362. package/dist/module/product-or-service.js +1 -1
  363. package/dist/module/refund-policy.js +1 -1
  364. package/dist/module/shipping-details.js +1 -1
  365. package/dist/module/table-filters-menu2.js +2 -2
  366. package/dist/module/table.js +55 -0
  367. package/dist/module/terminal-orders-list-core.d.ts +11 -0
  368. package/dist/module/terminal-orders-list-core.js +6 -0
  369. package/dist/module/terminal-orders-list-core2.js +117 -0
  370. package/dist/module/terminals-list-core2.js +10 -10
  371. package/dist/module/terminals-list-params-state.js +11 -5
  372. package/dist/types/api/Business.d.ts +4 -4
  373. package/dist/types/api/Checkout.d.ts +6 -1
  374. package/dist/types/api/Payout.d.ts +0 -1
  375. package/dist/types/api/Terminal.d.ts +6 -12
  376. package/dist/types/components/checkout/bank-account-form/bank-account-form-skeleton.d.ts +6 -0
  377. package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +2 -0
  378. package/dist/types/components/checkout/card-form/card-form-skeleton.d.ts +6 -0
  379. package/dist/types/components/checkout/card-form/card-form.d.ts +2 -0
  380. package/dist/types/components/checkouts-list/checkouts-list-core.d.ts +1 -1
  381. package/dist/types/components/checkouts-list/checkouts-list-filters.d.ts +5 -2
  382. package/dist/types/components/checkouts-list/checkouts-list-params-state.d.ts +4 -3
  383. package/dist/types/components/order-terminals/order-terminals-loading.d.ts +1 -0
  384. package/dist/types/components/order-terminals/order-terminals.d.ts +16 -0
  385. package/dist/types/components/payments-list/payments-list-core.d.ts +1 -1
  386. package/dist/types/components/payouts-list/payouts-list-core.d.ts +1 -1
  387. package/dist/types/components/payouts-list/payouts-list-filters.d.ts +3 -0
  388. package/dist/types/components/payouts-list/payouts-list-params-state.d.ts +4 -3
  389. package/dist/types/components/terminal-orders-list/terminal-orders-list-core.d.ts +25 -0
  390. package/dist/types/components/terminal-orders-list/terminal-orders-list.d.ts +11 -0
  391. package/dist/types/components/terminal-orders-list/terminal-orders-table.d.ts +9 -0
  392. package/dist/types/components/terminals-list/terminals-list-core.d.ts +1 -1
  393. package/dist/types/components/terminals-list/terminals-list-filters.d.ts +4 -1
  394. package/dist/types/components/terminals-list/terminals-list-params-state.d.ts +4 -3
  395. package/dist/types/components.d.ts +117 -2
  396. package/dist/types/styles/parts.d.ts +14 -0
  397. package/dist/types/ui-components/form/iframe-input.d.ts +2 -1
  398. package/dist/webcomponents/p-020e7d5d.entry.js +1 -0
  399. package/dist/webcomponents/{p-0f6ae5ea.entry.js → p-060896c4.entry.js} +1 -1
  400. package/dist/webcomponents/{p-298e290e.js → p-06f5b709.js} +1 -1
  401. package/dist/webcomponents/p-092515e0.js +1 -0
  402. package/dist/webcomponents/{p-94eba309.js → p-09496255.js} +1 -1
  403. package/dist/webcomponents/p-0b38cfbf.js +1 -0
  404. package/dist/webcomponents/p-0c768ac5.entry.js +1 -0
  405. package/dist/webcomponents/p-0e180654.js +1 -0
  406. package/dist/webcomponents/p-0f0c5556.entry.js +1 -0
  407. package/dist/webcomponents/{p-f19f9f61.js → p-1278dedf.js} +1 -1
  408. package/dist/webcomponents/p-15675401.entry.js +1 -0
  409. package/dist/webcomponents/p-185181a8.js +1 -0
  410. package/dist/webcomponents/{p-5bf4535a.entry.js → p-19063270.entry.js} +1 -1
  411. package/dist/webcomponents/p-1906c67d.entry.js +1 -0
  412. package/dist/webcomponents/p-1a2eea29.entry.js +1 -0
  413. package/dist/webcomponents/p-1f4e26f3.entry.js +1 -0
  414. package/dist/webcomponents/p-1f99a902.js +1 -0
  415. package/dist/webcomponents/{p-bada4783.entry.js → p-235abbd1.entry.js} +1 -1
  416. package/dist/webcomponents/p-245819b0.entry.js +1 -0
  417. package/dist/webcomponents/p-26864218.entry.js +1 -0
  418. package/dist/webcomponents/p-27c72b92.entry.js +1 -0
  419. package/dist/webcomponents/p-2e0ae487.js +1 -0
  420. package/dist/webcomponents/p-2f9af679.js +1 -0
  421. package/dist/webcomponents/{p-21431a04.js → p-300a99ee.js} +1 -1
  422. package/dist/webcomponents/p-309dc8aa.js +1 -0
  423. package/dist/webcomponents/p-32ca779f.js +1 -0
  424. package/dist/webcomponents/p-375b4d2c.entry.js +1 -0
  425. package/dist/webcomponents/p-37b7b200.entry.js +1 -0
  426. package/dist/webcomponents/p-389e1eb7.js +1 -0
  427. package/dist/webcomponents/p-3a7a2a64.entry.js +1 -0
  428. package/dist/webcomponents/p-3ab7a49e.entry.js +1 -0
  429. package/dist/webcomponents/{p-938993c7.js → p-3b680e50.js} +1 -1
  430. package/dist/webcomponents/p-3bb21097.entry.js +1 -0
  431. package/dist/webcomponents/p-3d486f37.entry.js +1 -0
  432. package/dist/webcomponents/p-42a48c59.js +1 -0
  433. package/dist/webcomponents/p-45bf8573.js +1 -0
  434. package/dist/webcomponents/p-49df4962.entry.js +1 -0
  435. package/dist/webcomponents/{p-ab1504b6.entry.js → p-4a71c90b.entry.js} +1 -1
  436. package/dist/webcomponents/{p-b0b40bcd.js → p-4acf8ca2.js} +1 -1
  437. package/dist/webcomponents/p-4b6256e0.entry.js +1 -0
  438. package/dist/webcomponents/p-553dba95.entry.js +1 -0
  439. package/dist/webcomponents/p-595479da.entry.js +1 -0
  440. package/dist/webcomponents/p-5a96a2a2.entry.js +1 -0
  441. package/dist/webcomponents/{p-275f2154.js → p-5d1d2fd7.js} +1 -1
  442. package/dist/webcomponents/p-61b5417f.entry.js +1 -0
  443. package/dist/webcomponents/p-66ae2a0e.entry.js +1 -0
  444. package/dist/webcomponents/p-69242bad.entry.js +1 -0
  445. package/dist/webcomponents/p-73b98298.entry.js +1 -0
  446. package/dist/webcomponents/p-78a204f9.entry.js +1 -0
  447. package/dist/webcomponents/p-794cce10.entry.js +1 -0
  448. package/dist/webcomponents/{p-b2edb944.js → p-7bf21156.js} +1 -1
  449. package/dist/webcomponents/p-7c541199.entry.js +1 -0
  450. package/dist/webcomponents/p-7ee5a90e.entry.js +1 -0
  451. package/dist/webcomponents/p-87a7c3aa.js +1 -0
  452. package/dist/webcomponents/{p-8115b2f4.js → p-87f8c596.js} +1 -1
  453. package/dist/webcomponents/{p-5afefc50.entry.js → p-89ecfbf4.entry.js} +2 -2
  454. package/dist/webcomponents/{p-3e716e03.js → p-8a7266b4.js} +1 -1
  455. package/dist/webcomponents/{p-8f25f016.js → p-8b16a20f.js} +1 -1
  456. package/dist/webcomponents/p-8bedece0.entry.js +1 -0
  457. package/dist/webcomponents/{p-e63fdbca.js → p-906a6027.js} +1 -1
  458. package/dist/webcomponents/p-939d0a35.entry.js +1 -0
  459. package/dist/webcomponents/{p-27c8ffa2.js → p-95e55bb1.js} +1 -1
  460. package/dist/webcomponents/p-95fbb4b0.entry.js +1 -0
  461. package/dist/webcomponents/p-9a4d0e1d.entry.js +1 -0
  462. package/dist/webcomponents/{p-14c91ffd.js → p-9dd8685c.js} +1 -1
  463. package/dist/webcomponents/p-9edd6ad8.js +1 -0
  464. package/dist/webcomponents/p-a0082e77.entry.js +1 -0
  465. package/dist/webcomponents/{p-1820fd87.entry.js → p-a31ba276.entry.js} +1 -1
  466. package/dist/webcomponents/p-a90d8f4f.entry.js +1 -0
  467. package/dist/webcomponents/p-ab45511e.js +1 -0
  468. package/dist/webcomponents/p-b1aa7d2b.entry.js +1 -0
  469. package/dist/webcomponents/p-b2d57b2c.entry.js +1 -0
  470. package/dist/webcomponents/p-b7084adc.js +1 -0
  471. package/dist/webcomponents/{p-f2f2e20e.js → p-b84ee6d8.js} +1 -1
  472. package/dist/webcomponents/p-c4ca0038.js +1 -0
  473. package/dist/webcomponents/p-c78b5581.js +1 -0
  474. package/dist/webcomponents/{p-0ea387a2.js → p-c9b78275.js} +1 -1
  475. package/dist/webcomponents/p-cba89310.entry.js +1 -0
  476. package/dist/webcomponents/p-cbb6cc19.js +1 -0
  477. package/dist/webcomponents/p-cbe05f11.js +1 -0
  478. package/dist/webcomponents/p-cc552f59.entry.js +1 -0
  479. package/dist/webcomponents/p-d398ce81.js +1 -0
  480. package/dist/webcomponents/p-d432f0fd.entry.js +1 -0
  481. package/dist/webcomponents/{p-849c68e5.js → p-d43a38a4.js} +1 -1
  482. package/dist/webcomponents/p-d5c41ec6.js +1 -0
  483. package/dist/webcomponents/{p-db37b175.entry.js → p-e007002a.entry.js} +1 -1
  484. package/dist/webcomponents/p-e15f749c.entry.js +1 -0
  485. package/dist/webcomponents/{p-1882d7d6.entry.js → p-e3e0d791.entry.js} +1 -1
  486. package/dist/webcomponents/p-e8cd9691.js +1 -0
  487. package/dist/webcomponents/{p-5baec916.entry.js → p-e8fc36c1.entry.js} +1 -1
  488. package/dist/webcomponents/p-e9e80a62.js +1 -0
  489. package/dist/webcomponents/{p-2710884e.entry.js → p-ea0f2446.entry.js} +1 -1
  490. package/dist/webcomponents/p-ebbe93ac.entry.js +1 -0
  491. package/dist/webcomponents/p-ec019b89.js +1 -0
  492. package/dist/webcomponents/p-edae0bb0.entry.js +1 -0
  493. package/dist/webcomponents/p-f162c569.entry.js +1 -0
  494. package/dist/webcomponents/p-f30cb232.js +1 -0
  495. package/dist/webcomponents/p-f4739d31.js +1 -0
  496. package/dist/webcomponents/{p-facada09.entry.js → p-f7d9ea0b.entry.js} +1 -1
  497. package/dist/webcomponents/{p-3e0f3d87.entry.js → p-fea43254.entry.js} +1 -1
  498. package/dist/webcomponents/webcomponents.esm.js +1 -1
  499. package/package.json +1 -1
  500. package/dist/cjs/checkouts-list-params-state-418c75a3.js +0 -14
  501. package/dist/cjs/payouts-list-params-state-16348184.js +0 -14
  502. package/dist/cjs/terminals-list-params-state-95ff6a64.js +0 -14
  503. package/dist/config.js +0 -11
  504. package/dist/esm/checkouts-list-params-state-1d968971.js +0 -10
  505. package/dist/esm/payouts-list-params-state-49618e7a.js +0 -10
  506. package/dist/esm/terminals-list-params-state-2c48d35f.js +0 -10
  507. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +0 -11
  508. package/dist/webcomponents/p-01d4e35a.js +0 -1
  509. package/dist/webcomponents/p-02d36485.entry.js +0 -1
  510. package/dist/webcomponents/p-045d4ebf.entry.js +0 -1
  511. package/dist/webcomponents/p-08d87a52.entry.js +0 -1
  512. package/dist/webcomponents/p-0e68b7d6.entry.js +0 -1
  513. package/dist/webcomponents/p-131db5d1.entry.js +0 -1
  514. package/dist/webcomponents/p-1603fe4d.js +0 -1
  515. package/dist/webcomponents/p-16ba9bea.js +0 -1
  516. package/dist/webcomponents/p-18a7a9e6.entry.js +0 -1
  517. package/dist/webcomponents/p-1e8a1e01.entry.js +0 -1
  518. package/dist/webcomponents/p-25c9c88c.entry.js +0 -1
  519. package/dist/webcomponents/p-2916bb62.entry.js +0 -1
  520. package/dist/webcomponents/p-2f94d478.entry.js +0 -1
  521. package/dist/webcomponents/p-31e2d12c.entry.js +0 -1
  522. package/dist/webcomponents/p-35b00a0d.js +0 -1
  523. package/dist/webcomponents/p-39696abd.entry.js +0 -1
  524. package/dist/webcomponents/p-40e23b13.js +0 -1
  525. package/dist/webcomponents/p-40eabfca.entry.js +0 -1
  526. package/dist/webcomponents/p-44d2c762.entry.js +0 -1
  527. package/dist/webcomponents/p-4810f227.entry.js +0 -1
  528. package/dist/webcomponents/p-485814d8.entry.js +0 -1
  529. package/dist/webcomponents/p-4bad3621.js +0 -1
  530. package/dist/webcomponents/p-57206dc4.entry.js +0 -1
  531. package/dist/webcomponents/p-58f5e37b.entry.js +0 -1
  532. package/dist/webcomponents/p-5b72bab7.js +0 -1
  533. package/dist/webcomponents/p-62696f63.entry.js +0 -1
  534. package/dist/webcomponents/p-63a8b08f.entry.js +0 -1
  535. package/dist/webcomponents/p-63caad6e.entry.js +0 -1
  536. package/dist/webcomponents/p-66b6c56b.js +0 -1
  537. package/dist/webcomponents/p-67b75e01.entry.js +0 -1
  538. package/dist/webcomponents/p-68bf1a1d.entry.js +0 -1
  539. package/dist/webcomponents/p-6d2c8be2.entry.js +0 -1
  540. package/dist/webcomponents/p-72992c97.entry.js +0 -1
  541. package/dist/webcomponents/p-7b04f492.entry.js +0 -1
  542. package/dist/webcomponents/p-7bcec768.entry.js +0 -1
  543. package/dist/webcomponents/p-7c31ec70.js +0 -1
  544. package/dist/webcomponents/p-8da3667c.js +0 -1
  545. package/dist/webcomponents/p-933537ca.js +0 -1
  546. package/dist/webcomponents/p-9540d2f2.js +0 -1
  547. package/dist/webcomponents/p-960a8ec2.js +0 -1
  548. package/dist/webcomponents/p-98dad117.entry.js +0 -1
  549. package/dist/webcomponents/p-9ad6e792.entry.js +0 -1
  550. package/dist/webcomponents/p-9f773228.js +0 -1
  551. package/dist/webcomponents/p-a2076a0e.js +0 -1
  552. package/dist/webcomponents/p-a47c14cb.entry.js +0 -1
  553. package/dist/webcomponents/p-aa02cf71.js +0 -1
  554. package/dist/webcomponents/p-b01405ab.entry.js +0 -1
  555. package/dist/webcomponents/p-b15ad5df.js +0 -1
  556. package/dist/webcomponents/p-b2209632.entry.js +0 -1
  557. package/dist/webcomponents/p-b6e90400.entry.js +0 -1
  558. package/dist/webcomponents/p-c75481bf.entry.js +0 -1
  559. package/dist/webcomponents/p-d0bde1cb.js +0 -1
  560. package/dist/webcomponents/p-d8c04275.js +0 -1
  561. package/dist/webcomponents/p-dd867d1f.js +0 -1
  562. package/dist/webcomponents/p-ddcd2ff7.entry.js +0 -1
  563. package/dist/webcomponents/p-e22df884.entry.js +0 -1
  564. package/dist/webcomponents/p-e8c3c23f.js +0 -1
  565. package/dist/webcomponents/p-e8d0f978.entry.js +0 -1
  566. package/dist/webcomponents/p-f0c0cbc8.entry.js +0 -1
  567. package/dist/webcomponents/p-f694e1c8.js +0 -1
  568. package/dist/webcomponents/p-fa2b405c.entry.js +0 -1
  569. package/dist/webcomponents/p-fbe16023.entry.js +0 -1
  570. package/dist/webcomponents/p-fdbcd486.js +0 -1
  571. package/dist/webcomponents/p-ff955a18.entry.js +0 -1
  572. /package/dist/collection/{components/business-details → actions/business}/get-business.js +0 -0
  573. /package/dist/collection/{components → actions}/checkout/checkout-actions.js +0 -0
  574. /package/dist/collection/{components/checkouts-list → actions/checkout}/get-checkouts.js +0 -0
  575. /package/dist/collection/{components/dispute-management → actions/dispute}/dispute-actions.js +0 -0
  576. /package/dist/collection/{components/gross-payment-chart → actions/gross-payment}/get-gross-payment-chart-data.js +0 -0
  577. /package/dist/collection/{components → actions}/insurance/insurance-actions.js +0 -0
  578. /package/dist/collection/{components/payment-details → actions/payment}/get-payment-details.js +0 -0
  579. /package/dist/collection/{components/payments-list → actions/payment}/get-payments.js +0 -0
  580. /package/dist/collection/{components/payout-details → actions/payout}/get-payout-details.js +0 -0
  581. /package/dist/collection/{components/payouts-list → actions/payout}/get-payouts.js +0 -0
  582. /package/dist/collection/{components/terminals-list → actions/terminal}/get-terminal-detail.js +0 -0
  583. /package/dist/collection/{components/terminals-list → actions/terminal}/get-terminals.js +0 -0
  584. /package/dist/types/{components/business-details → actions/business}/get-business.d.ts +0 -0
  585. /package/dist/types/{components → actions}/checkout/checkout-actions.d.ts +0 -0
  586. /package/dist/types/{components/checkouts-list → actions/checkout}/get-checkouts.d.ts +0 -0
  587. /package/dist/types/{components/dispute-management → actions/dispute}/dispute-actions.d.ts +0 -0
  588. /package/dist/types/{components/gross-payment-chart → actions/gross-payment}/get-gross-payment-chart-data.d.ts +0 -0
  589. /package/dist/types/{components → actions}/insurance/insurance-actions.d.ts +0 -0
  590. /package/dist/types/{components/payment-details → actions/payment}/get-payment-details.d.ts +0 -0
  591. /package/dist/types/{components/payments-list → actions/payment}/get-payments.d.ts +0 -0
  592. /package/dist/types/{components/payout-details → actions/payout}/get-payout-details.d.ts +0 -0
  593. /package/dist/types/{components/payouts-list → actions/payout}/get-payouts.d.ts +0 -0
  594. /package/dist/types/{api → actions/sub-account}/get-subaccounts.d.ts +0 -0
  595. /package/dist/types/{components/terminals-list → actions/terminal}/get-terminal-detail.d.ts +0 -0
  596. /package/dist/types/{components/terminals-list → actions/terminal}/get-terminals.d.ts +0 -0
@@ -1 +1 @@
1
- import{h as t}from"./p-2783e363.js";import{B as e,a}from"./p-938993c7.js";const n=n=>t(e,Object.assign({},{canceled:{variant:a.DANGER,title:"Transfer to your bank account failed",text:"Canceled"},failed:{variant:a.DANGER,title:"Transfer to your bank account failed",text:"Failed"},forwarded:{variant:a.SECONDARY,title:"This payout initially failed; the funds have been forwarded to your next successful payout",text:"Forwarded"},in_transit:{variant:a.PRIMARY,title:"Transfer to your bank account has been initiated",text:"In Transit"},paid:{variant:a.SUCCESS,title:"Successfully deposited into your bank account",text:"Paid"},pending:{variant:a.PRIMARY,title:"Batched and scheduled to be transferred",text:"Pending"},scheduled:{variant:a.PRIMARY,title:"Batched and scheduled to be transferred",text:"Scheduled"},withdrawn:{variant:a.SUCCESS,title:"Negative payout balance successfully withdrawn from your bank account",text:"Withdrawn"}}[n]));export{n as M}
1
+ import{h as t}from"./p-2783e363.js";import{B as e,a}from"./p-3b680e50.js";const n=n=>t(e,Object.assign({},{canceled:{variant:a.DANGER,title:"Transfer to your bank account failed",text:"Canceled"},failed:{variant:a.DANGER,title:"Transfer to your bank account failed",text:"Failed"},forwarded:{variant:a.SECONDARY,title:"This payout initially failed; the funds have been forwarded to your next successful payout",text:"Forwarded"},in_transit:{variant:a.PRIMARY,title:"Transfer to your bank account has been initiated",text:"In Transit"},paid:{variant:a.SUCCESS,title:"Successfully deposited into your bank account",text:"Paid"},pending:{variant:a.PRIMARY,title:"Batched and scheduled to be transferred",text:"Pending"},scheduled:{variant:a.PRIMARY,title:"Batched and scheduled to be transferred",text:"Scheduled"},withdrawn:{variant:a.SUCCESS,title:"Negative payout balance successfully withdrawn from your bank account",text:"Withdrawn"}}[n]));export{n as M}
@@ -1 +1 @@
1
- import{h as a}from"./p-2783e363.js";import{t as s,h as l,e as t}from"./p-d8c04275.js";const e=l=>a("main",{class:"p-4 d-flex justify-content-center text-center",style:{fontSize:"1.2rem"}},a("p",{part:s},l)),p=s=>a("h2",{part:l,class:"mt-4 fs-5 border-bottom pb-3"},s.sectionTitle),r=({title:l,value:t})=>l&&t?a("div",{class:"d-table-row gap-2"},a("span",{class:"fw-bold d-table-cell px-2",part:s},l),a("span",{class:"flex-1 d-table-cell px-2 text-wrap",part:s},t)):null,c=({title:t,value:e,classes:p})=>a("div",{class:`d-flex flex-column ${p}`},a("span",{class:"fw-bold border-1 border-bottom ps-2 pe-2",part:l},t),a("span",{class:"pt-2 ps-2 pe-2",part:s},e)),o=({title:l,slot:e,badge:p},r)=>a("div",{slot:e,class:"p-2"},a("div",{class:"d-flex flex-row align-items-center gap-2 mb-2"},a("h1",{class:"m-0",part:t},l),p),a("div",{class:"d-flex flex-row align-items-top",part:s},r)),d=({metadata:s})=>s&&Object.keys(s).length?a("div",{class:"mt-4"},a("pre",{class:"p-2","aria-label":"metadata content"},a("code",null,JSON.stringify(s,null,2)))):null;export{d as C,p as D,e as E,o as a,c as b,r as c}
1
+ import{h as a}from"./p-2783e363.js";import{t as s,h as l,e as t}from"./p-e8cd9691.js";const e=l=>a("main",{class:"p-4 d-flex justify-content-center text-center",style:{fontSize:"1.2rem"}},a("p",{part:s},l)),p=s=>a("h2",{part:l,class:"mt-4 fs-5 border-bottom pb-3"},s.sectionTitle),r=({title:l,value:t})=>l&&t?a("div",{class:"d-table-row gap-2"},a("span",{class:"fw-bold d-table-cell px-2",part:s},l),a("span",{class:"flex-1 d-table-cell px-2 text-wrap",part:s},t)):null,c=({title:t,value:e,classes:p})=>a("div",{class:`d-flex flex-column ${p}`},a("span",{class:"fw-bold border-1 border-bottom ps-2 pe-2",part:l},t),a("span",{class:"pt-2 ps-2 pe-2",part:s},e)),o=({title:l,slot:e,badge:p},r)=>a("div",{slot:e,class:"p-2"},a("div",{class:"d-flex flex-row align-items-center gap-2 mb-2"},a("h1",{class:"m-0",part:t},l),p),a("div",{class:"d-flex flex-row align-items-top",part:s},r)),d=({metadata:s})=>s&&Object.keys(s).length?a("div",{class:"mt-4"},a("pre",{class:"p-2","aria-label":"metadata content"},a("code",null,JSON.stringify(s,null,2)))):null;export{d as C,p as D,e as E,o as a,c as b,r as c}
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t}from"./p-2783e363.js";import{J as e}from"./p-b7084adc.js";import{C as o,a as r}from"./p-9dd8685c.js";import{m as n,a}from"./p-b84ee6d8.js";import{B as h}from"./p-309dc8aa.js";import{A as p}from"./p-0e180654.js";import{c as d}from"./p-87a7c3aa.js";import"./p-7bf21156.js";import"./p-87f8c596.js";class c{async postProvisioning(s,i,t){const e={business_id:i,product_category:t};return p({authToken:s,apiOrigin:void 0}).post("entities/provisioning",e)}}const m=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.postProvisioning=void 0,this.getBusiness=void 0,this.businessId=void 0,this.authToken=void 0,this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){d(),this.analytics=new e(this),this.initializeApi()}disconnectedCallback(){this.analytics.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new c})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"ca4b13afe923312bd51d477eae50099876991599",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{m as justifi_payment_provisioning}
@@ -1 +1 @@
1
- import{h as t}from"./p-2783e363.js";import{a as e,b as a}from"./p-2ca5b5e4.js";import{B as c,a as o}from"./p-938993c7.js";import{k as p,m as s}from"./p-d8c04275.js";const r="created_at,payment_amount,payment_description,payment_mode,status",d={created_at:()=>t("th",{part:p,scope:"col",title:"The date each checkout occurred"},"Processed On"),payment_amount:()=>t("th",{part:p,scope:"col",title:"The dollar amount of each checkout"},"Payment Amount"),payment_description:()=>t("th",{part:p,scope:"col",title:"The description of each checkout"},"Payment Description"),sub_account_name:()=>t("th",{part:p,scope:"col",title:"The sub account associated with the checkout"},"Sub Account"),payment_mode:()=>t("th",{part:p,scope:"col",title:"The payment mode of each checkout"},"Payment Mode"),status:()=>t("th",{part:p,scope:"col",title:"The current status of each checkout"},"Status")},m={created_at:(c,o)=>t("td",{part:s(o)},t("div",{class:"fw-bold"},a(c.created_at)),t("div",{class:"fw-bold"},e(c.created_at))),payment_amount:(e,a)=>t("td",{part:s(a)},e.formattedPaymentAmount(e.payment_amount)),payment_description:(e,a)=>t("td",{part:s(a)},e.payment_description),sub_account_name:(e,a)=>t("td",{part:s(a)},e.sub_account_name),payment_mode:(e,a)=>t("td",{part:s(a)},e.payment_mode),status:(e,a)=>t("td",{part:s(a)},t(c,Object.assign({},{created:{variant:o.PRIMARY,title:"The checkout has been created",text:"Created"},completed:{variant:o.SUCCESS,title:"The checkout has been completed",text:"Completed"},attempted:{variant:o.SECONDARY,title:"The checkout has been attempted",text:"Attempted"},expired:{variant:o.DANGER,title:"The checkout has expired",text:"Expired"}}[e.status])))};export{m as a,d as c,r as d}
1
+ import{h as t}from"./p-2783e363.js";import{a as e,b as a}from"./p-2ca5b5e4.js";import{B as c,a as o}from"./p-3b680e50.js";import{k as p,m as s}from"./p-e8cd9691.js";const r="created_at,payment_amount,payment_description,payment_mode,status",d={created_at:()=>t("th",{part:p,scope:"col",title:"The date each checkout occurred"},"Processed On"),payment_amount:()=>t("th",{part:p,scope:"col",title:"The dollar amount of each checkout"},"Payment Amount"),payment_description:()=>t("th",{part:p,scope:"col",title:"The description of each checkout"},"Payment Description"),sub_account_name:()=>t("th",{part:p,scope:"col",title:"The sub account associated with the checkout"},"Sub Account"),payment_mode:()=>t("th",{part:p,scope:"col",title:"The payment mode of each checkout"},"Payment Mode"),status:()=>t("th",{part:p,scope:"col",title:"The current status of each checkout"},"Status")},m={created_at:(c,o)=>t("td",{part:s(o)},t("div",{class:"fw-bold"},a(c.created_at)),t("div",{class:"fw-bold"},e(c.created_at))),payment_amount:(e,a)=>t("td",{part:s(a)},e.formattedPaymentAmount(e.payment_amount)),payment_description:(e,a)=>t("td",{part:s(a)},e.payment_description),sub_account_name:(e,a)=>t("td",{part:s(a)},e.sub_account_name),payment_mode:(e,a)=>t("td",{part:s(a)},e.payment_mode),status:(e,a)=>t("td",{part:s(a)},t(c,Object.assign({},{created:{variant:o.PRIMARY,title:"The checkout has been created",text:"Created"},completed:{variant:o.SUCCESS,title:"The checkout has been completed",text:"Completed"},attempted:{variant:o.SECONDARY,title:"The checkout has been attempted",text:"Attempted"},expired:{variant:o.DANGER,title:"The checkout has expired",text:"Expired"}}[e.status])))};export{m as a,d as c,r as d}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,H as s,c as a,g as i}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import{E as c}from"./p-61f0a2ce.js";import{c as o}from"./p-c9b78275.js";import"./p-73f9be7c.js";import{n as r}from"./p-e3c22aa9.js";import{s as d,b as l,k as n}from"./p-2ca5b5e4.js";import{a0 as f,h,Q as b,k as p,R as m,l as u,c as y,b as k,a1 as v,a as x}from"./p-e8cd9691.js";import{S as _}from"./p-e9e80a62.js";import{F as g}from"./p-2f9af679.js";import"./p-abdbcd8e.js";import"./p-5d1d2fd7.js";import"./p-1ff8810b.js";import"./p-6078a370.js";const j=class{constructor(t){e(this,t),this.inputHandler=void 0,this.errors=void 0,this.storeFiles=void 0}render(){return t("div",{key:"9e04de8ad0e4a1d83f6d8fd1e5a2a5e92c670b92",class:"row gy-3"},t("div",{key:"af8875e58677a94873d548c35e9d2859725058e5",class:"col-12"},t("form-control-file",{key:"030c461b2c2a3da9acf5fcf761f537ea9f6cfcc9",name:"voided_check",label:"Voided Check",documentType:c.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"0b6650097a7c6810d9ab9dc76484b49dfe0c7e11",class:"col-12"},t("form-control-file",{key:"cd030043373cc6759022b9c23c674830ceffaff3",name:"bank_statement",label:"Bank Statement",documentType:c.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},T=class{constructor(t){e(this,t),this.defaultValue=void 0,this.errors=void 0,this.inputHandler=void 0,this.formDisabled=void 0}render(){return t("div",{key:"c4420b1e4396ac065b3674f52b124c0d25359435",class:"row gy-3"},t("div",{key:"40e5f2d54a6f60558ec5aa50ff47e6adcf66276b",class:"col-12"},t("form-control-text",{key:"9052ecb4597ecc96841d65929f1d8e5dbf662343",name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"c32bbaf4fe2155f49cb35ee4500016e7f97f24b3",class:"col-12"},t("form-control-text",{key:"3527553824fb36ea616836bf8e9435fc33a2365a",name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"c203663fad98052567b34cbffe316606c963ff23",class:"col-12"},t("form-control-text",{key:"db95259c41fa10b6af2cbc4c9bd7340d609312ee",name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"3228e30c418210556e4e9f99f4f87f753876072d",class:"col-12"},t("form-control-select",{key:"6dde33c0e9a2ac76051e01af836ea372f30d8fbb",name:"account_type",label:"Account Type",options:o,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),t("div",{key:"266005f1bba23068fc0be35416f5fd8cf3fc7c7c",class:"col-12"},t("form-control-text",{key:"34caa85c53b457de98a524a2eb151899e5bcf21a",name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:r,disabled:this.formDisabled,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),t("div",{key:"69d2e72cf588518e4fe310c2ad5cb37c72fab8c6",class:"col-12"},t("form-control-text",{key:"bc4353e36c9d982aa55f5e933975c4020c316ad0",name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:r,disabled:this.formDisabled,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},w=class{constructor(t){e(this,t),this.documents=[],this.isLoading=!1}render(){return this.isLoading?t(_,{height:"50px"}):this.documents.length?t(s,null,t("div",{class:"card",part:f},t("div",{class:"card-body"},t("h5",{class:"card-title",part:h},"Documents Already on File"),t("div",{class:"table-responsive"},t("table",{class:"table table-sm table-borderless",part:b},t("thead",null,t("tr",null,t("th",{style:{width:"25%"},part:p,scope:"col"},"File Name"),t("th",{style:{width:"25%"},part:p,scope:"col"},"File Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Document Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Date Uploaded"))),t("tbody",null,this.documents.sort(((e,t)=>e.document_type.localeCompare(t.document_type))).map(((e,s)=>t("tr",{class:0===s?"border-bottom border-top":"border-bottom"},t("td",{part:m},e.file_name),t("td",{part:m},e.file_type),t("td",{part:m},d(e.document_type)),t("td",{part:m},`${l(e.created_at)} - ${n(e.created_at)}`))))))))),t("hr",null)):null}},H=class{constructor(t){e(this,t),this.formControlInput=a(this,"formControlInput",7),this.formControlBlur=a(this,"formControlBlur",7),this.fileSelected=a(this,"fileSelected",7),this.handleFormControlInput=e=>{const t=e.target,s=t.getAttribute("name");this.inputHandler(s,t.value),this.formControlInput.emit({name:s,value:t.value})},this.changeHandler=()=>{const e=this.fileInput.files;e&&this.fileSelected.emit({fileList:e,document_type:this.documentType})},this.files=void 0,this.fileString=void 0,this.isFocused=!1,this.label=void 0,this.name=void 0,this.helpText=void 0,this.errorText=void 0,this.multiple=void 0,this.documentType=void 0,this.inputHandler=void 0,this.disabled=void 0}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let e=y;return this.errorText&&(e=k),this.disabled&&(e=v),this.isFocused&&(e=x),e}render(){return t(s,{key:"09e633d625a1f8f2233d80e8b999fcd7e4a16f62"},t("div",{key:"b788fd0963c0ab62d0f7e236fb47ea86430b522e",class:"form-group d-flex flex-column"},t("div",{key:"1e7a11e13ec3c386c9f30b5cd38c3afa99c88da5",class:"d-flex align-items-start gap-2"},t("label",{key:"45cd0d97ae44c32b4d1e0d87187ac1871511c319",part:u,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"d312e4f181dfb18c0b86048960ec0a333760f290",helpText:this.helpText})),t("input",{key:"73ff59959c75dc99cccddde819ebbeb6bc1de4ab",ref:e=>this.fileInput=e,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),t(g,{key:"cb9c8bd4f623ebd82bdbd9725805f6038b0e1f8c",errorText:this.errorText,name:this.name})))}get el(){return i(this)}};export{j as bank_account_document_form_inputs,T as bank_account_form_inputs,w as business_documents_on_file,H as form_control_file}
@@ -1 +1 @@
1
- import{a as e,b as a}from"./p-5844a0f0.js";import{S as t}from"./p-6078a370.js";import{b as s,a as r,r as n,s as c,c as i}from"./p-0ea387a2.js";import{E as l}from"./p-61f0a2ce.js";const o=e=>""===e?null:e,u=/^\d+$/,m=/P\.?\s?O\.?\s?Box|Postal\sBox/i,d=e().email("Enter valid email").transform(o),b=e().matches(/^\d{10}$/,"Enter valid phone number").transform(o),h=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(o),p=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(o),v=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/,"Enter valid website url").transform(o),E=e().oneOf(s.map((e=>e.value)),"Select business classification").transform(o),S=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").transform(o),N=e().matches(u,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(o),f=e().test("not-future","Date of incorporation cannot be in the future",(e=>new Date(e)<=new Date)).transform(o),g=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(o),w=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").transform(o),y=a=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${a} must be at least 18 years old`,(e=>{const a=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),a<=t})).transform(o),x=e().matches(/^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(o),A=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!m.test(e))).transform(o),$=e().max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!m.test(e))).transform(o),D=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").transform(o),P=e().oneOf(t.map((e=>e.value)),"Select state").transform(o),j=e().matches(/^[0-9]{5}$/,"Enter valid postal code").transform(o),B=e().matches(u,"Enter valid revenue").transform(o),I=e().matches(u,"Enter valid payment volume").transform(o),_=e().oneOf(r.map((e=>e.value)),"Select when service is received").transform(o),z=e().oneOf(n.map((e=>e.value)),"Select recurring payments").transform(o),q=e().when("business_recurring_payments",{is:e=>"Yes"===e,then:e=>e.required("Enter recurring payments percentage"),otherwise:e=>e.nullable()}).transform(o),C=e().oneOf(c.map((e=>e.value)),"Select seasonal business").transform(o),O=e().transform(o),T=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(o),Z=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(o),k=e().oneOf(i.map((e=>e.value)),"Select account type").transform(o),F=e().min(4,"Account number must be at least 4 digits").max(17,"Account number must be less than 17 digits").matches(u,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(o),R=e().length(9,"Routing number must be 9 digits").matches(u,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>(e=>{if(!e)return!1;const a=Array.from(String(e),Number);return 9===a.length&&0==(3*(a[0]+a[3]+a[6])+7*(a[1]+a[4]+a[7])+(a[2]+a[5]+a[8]))%10})(e))).transform(o),Y=a(),G=(e,a)=>e.some((e=>e.document_type===l.voidedCheck))||a?Y.nullable():Y.required("Please select one or more files"),H=(e,a)=>e.some((e=>e.document_type===l.bankStatement))||a?Y.nullable():Y.required("Please select one or more files");export{Z as A,k as B,F as C,R as D,G as E,H as F,E as a,h as b,f as c,p as d,d as e,I as f,_ as g,z as h,S as i,q as j,$ as k,A as l,D as m,P as n,O as o,b as p,j as q,B as r,C as s,N as t,g as u,w as v,v as w,y as x,x as y,T as z}
1
+ import{a as e,b as a}from"./p-5844a0f0.js";import{S as t}from"./p-6078a370.js";import{b as s,a as r,r as n,s as c,c as i}from"./p-c9b78275.js";import{E as l}from"./p-61f0a2ce.js";const o=e=>""===e?null:e,u=/^\d+$/,m=/P\.?\s?O\.?\s?Box|Postal\sBox/i,d=e().email("Enter valid email").transform(o),b=e().matches(/^\d{10}$/,"Enter valid phone number").transform(o),h=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(o),p=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(o),v=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/,"Enter valid website url").transform(o),E=e().oneOf(s.map((e=>e.value)),"Select business classification").transform(o),S=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").transform(o),N=e().matches(u,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(o),f=e().test("not-future","Date of incorporation cannot be in the future",(e=>new Date(e)<=new Date)).transform(o),g=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(o),w=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").transform(o),y=a=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${a} must be at least 18 years old`,(e=>{const a=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),a<=t})).transform(o),x=e().matches(/^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(o),A=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!m.test(e))).transform(o),$=e().max(100,"Address must be less than 100 characters").test("not-po-box","A PO Box is not a valid address entry",(e=>!m.test(e))).transform(o),D=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").transform(o),P=e().oneOf(t.map((e=>e.value)),"Select state").transform(o),j=e().matches(/^[0-9]{5}$/,"Enter valid postal code").transform(o),B=e().matches(u,"Enter valid revenue").transform(o),I=e().matches(u,"Enter valid payment volume").transform(o),_=e().oneOf(r.map((e=>e.value)),"Select when service is received").transform(o),z=e().oneOf(n.map((e=>e.value)),"Select recurring payments").transform(o),q=e().when("business_recurring_payments",{is:e=>"Yes"===e,then:e=>e.required("Enter recurring payments percentage"),otherwise:e=>e.nullable()}).transform(o),C=e().oneOf(c.map((e=>e.value)),"Select seasonal business").transform(o),O=e().transform(o),T=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(o),Z=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").transform(o),k=e().oneOf(i.map((e=>e.value)),"Select account type").transform(o),F=e().min(4,"Account number must be at least 4 digits").max(17,"Account number must be less than 17 digits").matches(u,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(o),R=e().length(9,"Routing number must be 9 digits").matches(u,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>(e=>{if(!e)return!1;const a=Array.from(String(e),Number);return 9===a.length&&0==(3*(a[0]+a[3]+a[6])+7*(a[1]+a[4]+a[7])+(a[2]+a[5]+a[8]))%10})(e))).transform(o),Y=a(),G=(e,a)=>e.some((e=>e.document_type===l.voidedCheck))||a?Y.nullable():Y.required("Please select one or more files"),H=(e,a)=>e.some((e=>e.document_type===l.bankStatement))||a?Y.nullable():Y.required("Please select one or more files");export{Z as A,k as B,F as C,R as D,G as E,H as F,E as a,h as b,f as c,p as d,d as e,I as f,_ as g,z as h,S as i,q as j,$ as k,A as l,D as m,P as n,O as o,b as p,j as q,B as r,C as s,N as t,g as u,w as v,v as w,y as x,x as y,T as z}
@@ -0,0 +1 @@
1
+ import{r as i,c as s,h as t}from"./p-2783e363.js";import{B as e}from"./p-06f5b709.js";import{S as a}from"./p-bfe9748b.js";import{c as o}from"./p-87a7c3aa.js";import{J as d}from"./p-b7084adc.js";import{a as r,C as c}from"./p-9dd8685c.js";import"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";import"./p-e8cd9691.js";import"./p-7bf21156.js";import"./p-0e180654.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";const h=class{constructor(t){i(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.authToken=void 0,this.accountId=void 0,this.paymentMethodGroupId=void 0,this.submitButtonText=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.hideSubmitButton=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin=void 0,this.isLoading=!1}componentWillLoad(){o(),this.analytics=new d(this)}async tokenizePaymentMethod(i){let s;i&&i.preventDefault(),this.isLoading=!0;try{s=await this.paymentMethodOptionsRef.resolvePaymentMethod({isValid:!0}),s.error&&this.errorEvent.emit({errorCode:s.error.code,message:s.error.message,severity:r.ERROR})}catch(i){this.errorEvent.emit({errorCode:c.TOKENIZE_ERROR,message:i.message,severity:r.ERROR})}finally{return this.submitEvent.emit({response:s}),this.isLoading=!1,s}}async fillBillingForm(i){this.paymentMethodOptionsRef.fillBillingForm(i)}render(){return t(a,{key:"ac989aa84f6262ff1b72a88fc7c4ebb0e62175dc"},t("form",{key:"482ebf3ca3ac67738fdd0243de8d29ad66754313"},t("fieldset",{key:"e563783b34d570bafd1788949a486454ce70ab4a"},t("div",{key:"a42f5625f5d0860153f4260aa9c5f76f4afcad06",class:"row gy-3"},t("div",{key:"f64bb331c9922be711bfdd9a50d76530773867c0",class:"col-12"},t("justifi-payment-method-options",{key:"dc23821a9130ee6435c92e20574a0bf056e1c29c",ref:i=>this.paymentMethodOptionsRef=i,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!1,paymentMethodGroupId:this.paymentMethodGroupId,"show-saved-payment-methods":!1,hideCardBillingForm:this.hideCardBillingForm,authToken:this.authToken,"account-id":this.accountId,iframeOrigin:this.iframeOrigin})),t("div",{key:"29ec96487c4a5d54c4883c4cfe4a6ee4a309042f",class:"col-12"},t(e,{key:"fe116e392e79debf6a858c993ba11a21d417d998",variant:"primary",type:"submit",onClick:i=>this.tokenizePaymentMethod(i),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.hideSubmitButton},this.submitButtonText||"Submit"))))))}};export{h as justifi_tokenize_payment_method}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-389e1eb7.js";import{p as a}from"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";import{Q as i,R as r}from"./p-e8cd9691.js";import{T as c,a as h,b as o,c as n}from"./p-d398ce81.js";import{c as b,a as d}from"./p-906a6027.js";import{o as p,g as f}from"./p-092515e0.js";import{T as m}from"./p-1f99a902.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-ec019b89.js";import"./p-3b680e50.js";import"./p-f20b6ce1.js";const u=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:m.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:m.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:m.row,data:e})},this.getCheckouts=void 0,this.getSubAccounts=void 0,this.columns=void 0,this.checkouts=[],this.checkoutsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=a,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new c(this.checkouts,this.columns,b,d),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),p("set",(()=>{this.pagingParams={}})),p("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=f();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("div",{key:"ae6d3dfefad89fcd28b2ad883a1d1172fffd2218"},e("div",{key:"91329a7880cd774c71cf30722b7be49b8a0109e9",class:"table-wrapper"},e("table",{key:"75f974cc2140089a7a42738ef0cd3bd67729ca8d",class:"table table-hover",part:i},e("thead",{key:"6aaaee8db285ca1b94cea662f62a51040f2a0f06",class:"table-head sticky-top"},e("tr",{key:"68215e0698b97a8389083a521bd8a493c410a196",class:"table-light text-nowrap"},this.checkoutsTable.columnData.map((t=>t)))),e("tbody",{key:"b3aa9bd464fda772fae2e191e1cc4f4612bd514b",class:"table-body"},e(h,{key:"a874602fb597ee55def35b80474bd2228b918200",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(o,{key:"8c30048e8766be8ca14fbbd6f990aac019904b26",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(n,{key:"c567bbca2ebbdc42dcfa6c07ae2c61b538643cb7",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"f02cd5b963f2c087b1a8ab60f25f6b1081e735aa",class:"sticky-bottom"},e("tr",{key:"a651ab932931db6a4ad42888a9b43e7b89a58495",class:"table-light align-middle"},e("td",{key:"1fde503bccc4e79454d5786fac8f82bea67618e1",part:r,colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"6237a008bc148f44aa7e159d530470c5114b32e4",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{u as checkouts_list_core}
@@ -1 +1 @@
1
- var r,e;!function(r){r.MISSING_PROPS="missing-props",r.FETCH_ERROR="fetch-error",r.PATCH_ERROR="patch-error",r.POST_ERROR="post-error",r.UNKNOWN_ERROR="unknown-error",r.TOKENIZE_ERROR="tokenize-error",r.NOT_AUTHENTICATED="not-authenticated",r.INVALID_PARAMETER="invalid-parameter",r.PROVISIONING_REQUESTED="provisioning-already-requested"}(r||(r={})),function(r){r.INFO="info",r.WARNING="warning",r.ERROR="error"}(e||(e={}));export{e as C,r as a}
1
+ var r,e;!function(r){r.MISSING_PROPS="missing-props",r.FETCH_ERROR="fetch-error",r.PATCH_ERROR="patch-error",r.POST_ERROR="post-error",r.UNKNOWN_ERROR="unknown-error",r.TOKENIZE_ERROR="tokenize-error",r.NOT_AUTHENTICATED="not-authenticated",r.INVALID_PARAMETER="invalid-parameter",r.PROVISIONING_REQUESTED="provisioning-already-requested"}(r||(r={})),function(r){r.INFO="info",r.WARNING="warning",r.ERROR="error"}(e||(e={}));export{r as C,e as a}
@@ -0,0 +1 @@
1
+ import{h as o}from"./p-2783e363.js";import{e as r}from"./p-e8cd9691.js";const s=s=>o("h1",{class:`header-1 ${null==s?void 0:s.class}`,part:r},s.text);export{s as H}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-2783e363.js";import{l as t}from"./p-c6be72b0.js";import{f as s,p as i,c}from"./p-f4739d31.js";import{N as r,O as l,P as o}from"./p-e8cd9691.js";import{S as p}from"./p-bfe9748b.js";import"./p-9dd8685c.js";import"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import{I as d}from"./p-42a48c59.js";import"./p-61f0a2ce.js";import"./p-f20b6ce1.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";const b=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a},this.terminalId=void 0,this.terminalStatus=void 0}componentWillLoad(){this.debouncedSetParamsOnChange=t.exports.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus}).forEach((([e,a])=>{a&&(i[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:d.connected},{label:"Disconnected",value:d.disconnected},{label:"Unknown",value:d.unknown}]}render(){const e=Object.assign({},s);return a(p,{key:"9e55f56855ebf7f0755c5750bfe4ae57bcc2a48e"},a("table-filters-menu",{key:"dae12779f49c3264cb3a5362cc4e4edc2aa6447c",params:e,clearParams:c,part:r},a("div",{key:"9767d61b94a7de6bc290a1dc97e5ecdb7e75beb8",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"cab20a5aab288920f205835c4343b44502cc4a1e",class:"p-2"},a("form-control-text",{key:"58600a426dded8a9efc05e444439c36e3eab5bc8",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:l})),a("div",{key:"81f513ae03435ea2c97e43f460aab430ebd4a490",class:"p-2"},a("form-control-select",{key:"ee04592e4f117f7b58984932d10081a4383d7a65",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:o})))))}};export{b as justifi_terminals_list_filters}
@@ -1 +1 @@
1
- import{r as s,c as i,h as t}from"./p-2783e363.js";import{f as e}from"./p-2ca5b5e4.js";import{C as d}from"./p-7c31ec70.js";import{C as o}from"./p-14c91ffd.js";import{i as a,v as c,H as r,a as h}from"./p-f694e1c8.js";import{B as n}from"./p-298e290e.js";import{S as l}from"./p-bfe9748b.js";import{t as v,K as f}from"./p-d8c04275.js";import{S as m}from"./p-aa02cf71.js";import{H as p}from"./p-d0bde1cb.js";import"./p-f20b6ce1.js";const u=class{constructor(t){s(this,t),this.submitEvent=i(this,"submit-event",7),this.errorEvent=i(this,"error-event",7),this.loaded=i(this,"loaded",7),this.completeCheckout=async s=>{this.complete({payment:s,onSuccess:this.onSubmitted,onError:this.onError})},this.onSubmitted=s=>{this.submitEvent.emit({response:s}),this.renderState="success"},this.onError=({error:s,code:i,severity:t})=>{this.serverError=s,this.errorEvent.emit({errorCode:i,message:s,severity:t}),this.renderState="error"},this.authToken=void 0,this.getCheckout=void 0,this.complete=void 0,this.checkoutId=void 0,this.iframeOrigin=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.disableBnpl=void 0,this.disablePaymentMethodGroup=void 0,this.hideCardBillingForm=void 0,this.hasLoadedFonts=!1,this.checkout=void 0,this.serverError=void 0,this.renderState="loading",this.creatingNewPaymentMethod=!1,this.insuranceToggled=!1}async fillBillingForm(s){this.paymentMethodOptionsRef.fillBillingForm(s)}componentWillLoad(){this.getCheckout&&(this.fetchData(),a("set",(s=>{const i=h[s];void 0!==i&&(this.insuranceToggled=i,this.fetchData())})))}fetchData(){this.renderState="loading",this.getCheckout({onSuccess:({checkout:s})=>{this.checkout=new d(s);const{status:i}=this.checkout;this.loaded.emit({checkout_status:i}),this.renderState="success"},onError:({error:s,code:i,severity:t})=>{this.serverError=s,this.renderState="error",this.errorEvent.emit({errorCode:i,message:s,severity:t})}})}async submit(s){var i;s.preventDefault(),this.renderState="loading";const t=c(),e=await this.paymentMethodOptionsRef.resolvePaymentMethod(t);e.validationError?this.renderState="error":e.error?(this.renderState="error",this.serverError=e.error.message,this.onError({code:e.error.code,error:e.error.message,severity:o.ERROR})):e.token?this.completeCheckout({payment_mode:"ecom",payment_token:e.token}):"success"===(null===(i=e.bnpl)||void 0===i?void 0:i.status)?this.completeCheckout({payment_mode:"bnpl"}):this.renderState="error"}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get paymentType(){var s,i,e,d,o;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(m,{height:"300px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("justifi-payment-method-options",{ref:s=>this.paymentMethodOptionsRef=s,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!this.disableBnpl,paymentMethodGroupId:null===(s=this.checkout)||void 0===s?void 0:s.payment_method_group_id,"show-saved-payment-methods":!this.disablePaymentMethodGroup,hideCardBillingForm:this.hideCardBillingForm,bnpl:null===(i=this.checkout)||void 0===i?void 0:i.bnpl,authToken:this.authToken,"account-id":null===(e=this.checkout)||void 0===e?void 0:e.account_id,savedPaymentMethods:(null===(d=this.checkout)||void 0===d?void 0:d.payment_methods)||[],paymentAmount:null===(o=this.checkout)||void 0===o?void 0:o.payment_amount,insuranceToggled:this.insuranceToggled,iframeOrigin:this.iframeOrigin})))}get summary(){var s,i;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(m,{height:"24px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("div",{part:v},null===(s=this.checkout)||void 0===s?void 0:s.payment_description),t("div",null,t("span",{part:v},"Total")," ",t("span",{part:v},e(+(null===(i=this.checkout)||void 0===i?void 0:i.total_amount))))))}render(){return t(l,{key:"8f7bb796cec8a51b3a871ecc6f1d040636103503"},t("div",{key:"f616c1705dd8d9da854b496d5b028cebb4c88ce5",class:"row gy-3 jfi-checkout-core"},t("div",{key:"e374110371f020c9de996f4ca3932f7535e208ee",class:"col-12",part:f},t(r,{key:"aa9227b3ff49dc43c6a42d1988ec0669b298cef0",text:"Summary",class:"fs-5 fw-bold pb-3"}),this.summary),t("div",{key:"e8e9cddcc4cb11c6d7c020c1dc18d7b5bfe457c3",class:"col-12"},t("slot",{key:"69e623e8c23aec6f49430b395f86d7134ceeddc9",name:"insurance"})),t("div",{key:"fea072a50acb658433a36d8234b27c1fd8415dc4",class:"col-12 mt-4"},t(r,{key:"9b0a5c9e5e7db31a6d6cfda87cad18786d638bd9",text:"Payment",class:"fs-5 fw-bold pb-3"}),t(p,{key:"2eeae1935b2b238573be4bf1edfc5d80700d9c80",text:"Select payment type",class:"fs-6 fw-bold lh-lg"}),t("div",{key:"5c9fd0558a37ff903ec7137beeb3c49d406bcd1d",class:"d-flex flex-column"},this.paymentType)),t("div",{key:"2538670c227dc2e96c43d878ae09357a72a7e267",class:"col-12"},t("div",{key:"b51e39da64972578815a2cf0cf5342d292edaa45",class:"d-flex justify-content-end"},t(n,{key:"abcb099a4ad152a38d05d99781e02292efd246e0",type:"submit",variant:"primary",onClick:s=>this.submit(s),disabled:this.isLoading,isLoading:this.isLoading,style:{width:"100%"}},"Pay")))))}};export{u as justifi_checkout_core}
1
+ import{r as s,c as i,h as t}from"./p-2783e363.js";import{f as e}from"./p-2ca5b5e4.js";import{C as o}from"./p-389e1eb7.js";import{a as d}from"./p-9dd8685c.js";import{i as a,v as c,H as r,a as h}from"./p-0b38cfbf.js";import{B as n}from"./p-06f5b709.js";import{S as l}from"./p-bfe9748b.js";import{t as v,W as f}from"./p-e8cd9691.js";import{S as m}from"./p-e9e80a62.js";import{H as p}from"./p-c4ca0038.js";import"./p-f20b6ce1.js";const b=class{constructor(t){s(this,t),this.submitEvent=i(this,"submit-event",7),this.errorEvent=i(this,"error-event",7),this.loaded=i(this,"loaded",7),this.completeCheckout=async s=>{this.complete({payment:s,onSuccess:this.onSubmitted,onError:this.onError})},this.onSubmitted=s=>{this.submitEvent.emit({response:s}),this.renderState="success"},this.onError=({error:s,code:i,severity:t})=>{this.serverError=s,this.errorEvent.emit({errorCode:i,message:s,severity:t}),this.renderState="error"},this.authToken=void 0,this.getCheckout=void 0,this.complete=void 0,this.checkoutId=void 0,this.iframeOrigin=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.disableBnpl=void 0,this.disablePaymentMethodGroup=void 0,this.hideCardBillingForm=void 0,this.hasLoadedFonts=!1,this.checkout=void 0,this.serverError=void 0,this.renderState="loading",this.creatingNewPaymentMethod=!1,this.insuranceToggled=!1}async fillBillingForm(s){this.paymentMethodOptionsRef.fillBillingForm(s)}componentWillLoad(){this.getCheckout&&(this.fetchData(),a("set",(s=>{const i=h[s];void 0!==i&&(this.insuranceToggled=i,this.fetchData())})))}fetchData(){this.renderState="loading",this.getCheckout({onSuccess:({checkout:s})=>{this.checkout=new o(s);const{status:i}=this.checkout;this.loaded.emit({checkout_status:i}),this.renderState="success"},onError:({error:s,code:i,severity:t})=>{this.serverError=s,this.renderState="error",this.errorEvent.emit({errorCode:i,message:s,severity:t})}})}async submit(s){var i;s.preventDefault(),this.renderState="loading";const t=c(),e=await this.paymentMethodOptionsRef.resolvePaymentMethod(t);e.validationError?this.renderState="error":e.error?(this.renderState="error",this.serverError=e.error.message,this.onError({code:e.error.code,error:e.error.message,severity:d.ERROR})):e.token?this.completeCheckout({payment_mode:"ecom",payment_token:e.token}):"success"===(null===(i=e.bnpl)||void 0===i?void 0:i.status)?this.completeCheckout({payment_mode:"bnpl"}):this.renderState="error"}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get paymentType(){var s,i,e,o,d;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(m,{height:"300px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("justifi-payment-method-options",{ref:s=>this.paymentMethodOptionsRef=s,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!this.disableBnpl,paymentMethodGroupId:null===(s=this.checkout)||void 0===s?void 0:s.payment_method_group_id,"show-saved-payment-methods":!this.disablePaymentMethodGroup,hideCardBillingForm:this.hideCardBillingForm,bnpl:null===(i=this.checkout)||void 0===i?void 0:i.bnpl,authToken:this.authToken,"account-id":null===(e=this.checkout)||void 0===e?void 0:e.account_id,savedPaymentMethods:(null===(o=this.checkout)||void 0===o?void 0:o.payment_methods)||[],paymentAmount:null===(d=this.checkout)||void 0===d?void 0:d.payment_amount,insuranceToggled:this.insuranceToggled,iframeOrigin:this.iframeOrigin})))}get summary(){var s,i;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(m,{height:"24px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("div",{part:v},null===(s=this.checkout)||void 0===s?void 0:s.payment_description),t("div",null,t("span",{part:v},"Total")," ",t("span",{part:v},e(+(null===(i=this.checkout)||void 0===i?void 0:i.total_amount))))))}render(){return t(l,{key:"8f7bb796cec8a51b3a871ecc6f1d040636103503"},t("div",{key:"f616c1705dd8d9da854b496d5b028cebb4c88ce5",class:"row gy-3 jfi-checkout-core"},t("div",{key:"e374110371f020c9de996f4ca3932f7535e208ee",class:"col-12",part:f},t(r,{key:"aa9227b3ff49dc43c6a42d1988ec0669b298cef0",text:"Summary",class:"fs-5 fw-bold pb-3"}),this.summary),t("div",{key:"e8e9cddcc4cb11c6d7c020c1dc18d7b5bfe457c3",class:"col-12"},t("slot",{key:"69e623e8c23aec6f49430b395f86d7134ceeddc9",name:"insurance"})),t("div",{key:"fea072a50acb658433a36d8234b27c1fd8415dc4",class:"col-12 mt-4"},t(r,{key:"9b0a5c9e5e7db31a6d6cfda87cad18786d638bd9",text:"Payment",class:"fs-5 fw-bold pb-3"}),t(p,{key:"2eeae1935b2b238573be4bf1edfc5d80700d9c80",text:"Select payment type",class:"fs-6 fw-bold lh-lg"}),t("div",{key:"5c9fd0558a37ff903ec7137beeb3c49d406bcd1d",class:"d-flex flex-column"},this.paymentType)),t("div",{key:"2538670c227dc2e96c43d878ae09357a72a7e267",class:"col-12"},t("div",{key:"b51e39da64972578815a2cf0cf5342d292edaa45",class:"d-flex justify-content-end"},t(n,{key:"abcb099a4ad152a38d05d99781e02292efd246e0",type:"submit",variant:"primary",onClick:s=>this.submit(s),disabled:this.isLoading,isLoading:this.isLoading,style:{width:"100%"}},"Pay")))))}};export{b as justifi_checkout_core}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-2783e363.js";import"./p-9dd8685c.js";import{I as t,a as s}from"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";import{f as l,p as c,c as o}from"./p-092515e0.js";import{y as i,z as p,A as r}from"./p-e8cd9691.js";import{S as d}from"./p-bfe9748b.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-f20b6ce1.js";const b=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{l[e]=a},this.checkoutStatus=void 0,this.paymentMode=void 0}componentWillLoad(){Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode}).forEach((([e,a])=>{a&&(c[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:t.created},{label:"Completed",value:t.completed},{label:"Attempted",value:t.attempted},{label:"Expired",value:t.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:s.ecom},{label:"BNPL",value:s.bnpl}]}render(){const e=Object.assign({},l);return a(d,{key:"cd70cc85372ea03d544340c36de1bc559cce757d"},a("table-filters-menu",{key:"332fbf23bcf5e542aa3439b93bcfe046889b89b0",params:e,clearParams:o,part:i},a("div",{key:"a95f24fa9b92cd35e0dd15a7fc5cafb2cca84c9f",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"d58366e790b1bb2fb3aa8605a806a8197ea4f5c9",class:"p-2"},a("form-control-select",{key:"1e48969ede334298a5d058f22bf5b1e39c78f535",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||l.status,disabled:!!this.checkoutStatus,part:p})),a("div",{key:"33d8d552c77a6355423e9252779f85b288e123d1",class:"p-2"},a("form-control-select",{key:"a1ae23979fb00d92a9a1c7972c375494cabde720",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||l.payment_mode,disabled:!!this.paymentMode,part:r})))))}};export{b as justifi_checkouts_list_filters}
@@ -0,0 +1 @@
1
+ import{c as s}from"./p-f20b6ce1.js";const t={},a={},c=s((()=>t)),{state:e,on:o}=c,p=s((()=>a)),{state:b}=p,f=()=>Object.assign(Object.assign({},e),b),j=()=>{c.reset()};export{j as c,e as f,f as g,o,b as p}
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t,H as e}from"./p-2783e363.js";import{C as o,a as h}from"./p-9dd8685c.js";import{m as n,b as r,c as a,d}from"./p-b84ee6d8.js";import{B as c,a as u,D as p}from"./p-309dc8aa.js";import"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";import{c as f,e as l,F as b}from"./p-5844a0f0.js";import{A as m}from"./p-0e180654.js";import{h as v}from"./p-e8cd9691.js";import"./p-5d1d2fd7.js";import{a as g,B as k}from"./p-73f9be7c.js";import{B as y}from"./p-06f5b709.js";import"./p-87f8c596.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-1ff8810b.js";import"./p-6078a370.js";const j=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:o.MISSING_PROPS,severity:h.ERROR})}render(){return t("justifi-additional-questions-form-step-core",{key:"ecc4bb3b51a4b6cb48e38230826784c5af623d88",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},w=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.getBusiness=void 0,this.postBankAccount=void 0,this.postDocumentRecord=void 0,this.postDocument=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new c}),this.postBankAccount=a({authToken:this.authToken,service:new u}),this.postDocumentRecord=d({authToken:this.authToken,service:new p})):this.errorEvent.emit({message:"Missing required props",errorCode:o.MISSING_PROPS,severity:h.ERROR})}render(){return t("justifi-business-bank-account-form-step-core",{key:"e60dff98e072aeb0eb351cd746c9c05e0adf903c",businessId:this.businessId,getBusiness:this.getBusiness,postBankAccount:this.postBankAccount,postDocumentRecord:this.postDocumentRecord,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},_=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:o.MISSING_PROPS,severity:h.ERROR})}render(){return t("justifi-business-core-info-form-step-core",{key:"c9f93be3e48527f5ae799cf736fc9ca86ece736c",businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},C=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:o.MISSING_PROPS,severity:h.ERROR})}render(){return t(e,{key:"d3010f8f811d93d7ee0983e92aa3c87a1fab0466"},t("justifi-business-owners-form-step-core",{key:"7eed1a3ebda94badba81f22011efbb23cee7bf12",authToken:this.authToken,businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s}))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},T=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:o.MISSING_PROPS,severity:h.ERROR})}render(){return t("justifi-business-representative-form-step-core",{key:"1a7dc9bc4901d5a2bb3da7a06c63952ee45b7843",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},I=class{constructor(t){s(this,t),this.stepCompleteEvent=i(this,"complete-form-step-event",7),this.errorEvent=i(this,"error-event",7),this.formLoading=i(this,"formLoading",7),this.formCompleted=i(this,"formCompleted",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:o.FETCH_ERROR,message:s.message,severity:h.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const i=this.termsPayload,t=await this.api.post(this.termsConditionsEndpoint,i);this.handleResponse(t,s)}catch(s){this.errorEvent.emit({errorCode:o.POST_ERROR,message:s.message,severity:h.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,i)=>{this.acceptedTerms=i,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:i}))},this.formController=void 0,this.errors={},this.acceptedTermsBefore=void 0,this.acceptedTerms=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}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=m({authToken:this.authToken,apiOrigin:void 0}),this.formController=new b((s=>{const i=f({accepted:l().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),t=f({accepted:l().nullable()});return s?t:i})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,i){s.error?this.errorEvent.emit({errorCode:o.POST_ERROR,message:s.error.message,severity:h.ERROR,data:s.error}):i(),this.stepCompleteEvent.emit({response:s,formStep:g.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:g.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get merchantAgreementLink(){return t("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return t("form",{key:"37500e35233a820f521ee503fc638335a2f4866c"},t("fieldset",{key:"e2d1005578397a07b9e876c9a5996e515831c61b"},t("legend",{key:"46918bc1bd20bb56d4e4882ae3ad9b29e3f6e319",part:v},"Terms and Conditions"),t("hr",{key:"904dc58480d9e879fcb462c861a3e398d4dd88b7"}),t("div",{key:"aad73d0a9beddf3487a19bf2af65684309b411aa"},t("p",{key:"10d9f2ff569e4426aaf1563a98838d89636029fd"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),t("br",{key:"dfb6de0078ebbbed103e7b901da879d5ee4195a4"}),t("div",{key:"4899d9b2a0c85e6d26bfd6e3d35ec1dd38f814e2",class:"row-gy-3"},t("div",{key:"011ea552aa484fc1d6a159fb58a8fe7383887584",class:"col-12"},t("form-control-checkbox",{key:"461b491715ed88e92795c7383af3e351e4d9d046",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})))))}},S=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:o.MISSING_PROPS,severity:h.ERROR})}render(){return t("justifi-legal-address-form-step-core",{key:"70241ec94d2519d675e3831dfb13840e0f9ea6ca",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},B=class{constructor(i){s(this,i),this.currentStep=void 0,this.totalSteps=void 0,this.formLoading=void 0,this.formDisabled=void 0,this.previousStepButtonOnClick=void 0,this.nextStepButtonOnClick=void 0}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return t("div",{key:"f5b14768cd97673e77c1ee2d9d73221cdee885e6",class:"d-flex gap-2"},t(y,{key:"4726571002718d036c292a41dc216955ba5ec687",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),t(y,{key:"3852cfcd4704f5509f22a5c457526fe8475df096",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,k.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),t(y,{key:"d62830b61932581071a1a44d872760be0823215a",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,k.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},O=class{constructor(i){s(this,i),this.componentStepMapping={0:()=>t("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields}),1:()=>t("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields}),2:()=>t("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>t("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields}),4:()=>t("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields}),5:()=>t("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,allowOptionalFields:this.allowOptionalFields}),6:()=>t("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields})},this.businessId=void 0,this.authToken=void 0,this.refs=void 0,this.currentStep=void 0,this.allowOptionalFields=!1,this.handleFormLoading=void 0}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return t("div",{key:"a83b5ef4442783fe771eef6d6418c97aa0a9026d",class:"col-12 mb-4"},this.currentStepComponent)}};export{j as justifi_additional_questions_form_step,w as justifi_business_bank_account_form_step,_ as justifi_business_core_info_form_step,C as justifi_business_owners_form_step,T as justifi_business_representative_form_step,I as justifi_business_terms_conditions_form_step,S as justifi_legal_address_form_step,B as justifi_payment_provisioning_form_buttons,O as justifi_payment_provisioning_form_steps}
@@ -0,0 +1 @@
1
+ import{h as t,r as i,H as e,c as s}from"./p-2783e363.js";import{S as a}from"./p-e9e80a62.js";import{i as n}from"./p-4cc3c7f9.js";import{i as o,b as d,a as h,c as r,Y as c,Z as l}from"./p-e8cd9691.js";import{H as f}from"./p-c4ca0038.js";import{a as m}from"./p-9894484a.js";import{j as b,f as u}from"./p-2ca5b5e4.js";import"./p-f20b6ce1.js";import"./p-abdbcd8e.js";const p=i=>{const{isReady:e}=i;return e?null:t("div",{class:"container-fluid p-0"},t("div",{class:"row mb-3"},t("div",{class:"col-12 align-content-end"},t(a,{height:"18px",width:"120px"}),t(a,{height:"36px"}))),t("div",{class:"row"},t("div",{class:"col-12 align-content-end"},t(a,{height:"18px",width:"110px"}),t(a,{height:"36px"}))))},v=class{constructor(t){i(this,t),this.iframeOrigin=void 0,this.isReady=!1}async validate(){const t=await this.accountNumberIframeElement.validate(),i=await this.routingNumberIframeElement.validate();return t&&i}async tokenize(t,i,e){return this.accountNumberIframeElement.tokenize(t,i,e)}componentDidRender(){Promise.all([this.accountNumberIframeElement,this.routingNumberIframeElement].map((t=>new Promise((i=>{t.addEventListener("iframeLoaded",(()=>{i()}))}))))).then((()=>{this.isReady=!0}))}render(){return t(e,{key:"18ace2e10e76c27166f2432a84880be2e14e7d23"},t(p,{key:"d2d3eb44c8854913866e2f1178418ab5cd43429e",isReady:this.isReady}),t("div",{key:"84987e3e4d8e5ed4f314f7e306f7e8e48f457bcb",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},t("div",{key:"b74ce1520cc0dd97d527ba0b8607ad891a645142",class:"row mb-3"},t("iframe-input",{key:"6966eae250b2d702d0fb887a09fa1b14467fd823",inputId:"accountNumber",ref:t=>this.accountNumberIframeElement=t,label:"Account Number",iframeOrigin:`${this.iframeOrigin}/v2/accountNumber`})),t("div",{key:"02da6bb34dd86fd0e3dddd0d12bdcb7b85bfc70c",class:"row"},t("iframe-input",{key:"3f8439860fae1d743e10f6b51f9d10cbe451bcae",inputId:"routingNumber",ref:t=>this.routingNumberIframeElement=t,label:"Routing Number",iframeOrigin:`${this.iframeOrigin}/v2/routingNumber`}))))}},y=i=>{const{isReady:e}=i;return e?null:t("div",{class:"container-fluid p-0"},t("div",{class:"mb-3"},t(a,{height:"18px",width:"100px"}),t(a,{height:"36px"})),t("div",{class:"row"},t("div",{class:"col-4 align-content-end"},t(a,{height:"18px",width:"80px"}),t(a,{height:"36px"})),t("div",{class:"col-4 align-content-end"},t(a,{height:"36px"})),t("div",{class:"col-4 align-content-end"},t(a,{height:"18px",width:"30px"}),t(a,{height:"36px"}))))},g=class{constructor(t){i(this,t),this.iframeOrigin=void 0,this.isReady=!1}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((t=>new Promise((i=>{t.addEventListener("iframeLoaded",(()=>{i()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const t=await this.cardNumberIframeElement.validate(),i=await this.expirationMonthIframeElement.validate(),e=await this.expirationYearIframeElement.validate(),s=await this.cvvIframeElement.validate();return t&&i&&e&&s}async tokenize(t,i,e){return this.cardNumberIframeElement.tokenize(t,i,e)}render(){return t(e,{key:"a97247efa8298a7e4c3498690974e482e36ae966"},t(y,{key:"52f338782020b5926377c9968bb85364ad720c68",isReady:this.isReady}),t("div",{key:"7cb7e827c407a18e09c1e0c925896644032428b8",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},t("div",{key:"9a49fd64a1464ae0ae032883bd79c8a7e9c5d4b3",class:"mb-3"},t("iframe-input",{key:"8778a816cbbd96f5b0c7e8f3364a704bd7aab2d8",inputId:"cardNumber",ref:t=>this.cardNumberIframeElement=t,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber`})),t("div",{key:"53ab4f9f636acfa72744cd5d364a4ae3a3c732d4",class:"row"},t("div",{key:"01aec684cab29a4aa24839acfc3ecc9e914c9911",class:"col-4 align-content-end"},t("iframe-input",{key:"9c87ff44375de2d46028f2532a33856cf608c6a0",inputId:"expirationMonth",ref:t=>this.expirationMonthIframeElement=t,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth`})),t("div",{key:"bc9176ebc7561c7cc0b654e837852a18c1b49f60",class:"col-4 align-content-end"},t("iframe-input",{key:"5f6b133bc5ae94f912648d210a6e58dd4fe1e880",inputId:"expirationYear",ref:t=>this.expirationYearIframeElement=t,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear`})),t("div",{key:"404c90decbac6b142b45c21a2997c0771bb59092",class:"col-4 align-content-end"},t("iframe-input",{key:"1b9e89656a437b080fbf92b4ebd74772ae1f26f4",inputId:"CVV",ref:t=>this.cvvIframeElement=t,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV`})))))}},k=class{constructor(t){i(this,t),this.isFocused=!1,this.errorText=""}async componentDidLoad(){const t=await this.getBaseFontStyles();n("fontStyles",t);const i=await this.getFocusedStyles();n("focused",i);const e=await this.getFocusedAndInvalidStyles();n("focusedAndInvalid",e)}async getBaseFontStyles(){return new Promise((t=>{setTimeout((()=>{const i=getComputedStyle(this.hiddenInput);t({fontFamily:i.fontFamily,fontSize:i.fontSize,fontWeight:i.fontWeight,lineHeight:i.lineHeight,margin:i.margin,padding:i.padding,color:i.color})}),500)}))}async getFocusedStyles(){return new Promise((t=>{this.hiddenInput.focus(),setTimeout((()=>{this.hiddenInput.blur();let i=getComputedStyle(this.hiddenInput);t({boxShadow:i.boxShadow,border:i.border})}),500)}))}async getFocusedAndInvalidStyles(){return new Promise((t=>{this.hiddenInput.focus(),this.errorText="Error",setTimeout((()=>{const i=getComputedStyle(this.hiddenInput),e={boxShadow:i.boxShadow,border:i.border};this.hiddenInput.blur(),t(e)}),500)}))}get part(){return this.isFocused&&this.errorText?o:this.errorText?d:this.isFocused?h:r}render(){return t(e,{key:"7bfd14ae6eb04d3bccb6f95398213655bc5c1073"},t("input",{key:"a40b6c6b2fd4e217af572f2032b158cc0ad603d2",ref:t=>this.hiddenInput=t,type:"text",class:this.errorText?"form-control is-invalid":"form-control",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,part:this.part,tabindex:"-1",style:{height:"0",opacity:"0",pointerEvents:"none",animation:"none"}}))}},w=class{constructor(t){i(this,t),this.legend=void 0,this.hideCardBillingForm=void 0,this.paymentMethodType=void 0}get hideFullBillingForm(){return this.hideCardBillingForm&&"card"===this.paymentMethodType}async fill(t){this.hideFullBillingForm?this.postalFormRef.fill(t):this.billingFormRef.fill(t)}async getValues(){return this.hideFullBillingForm?this.postalFormRef.getValues():this.billingFormRef.getValues()}async validate(){return this.hideFullBillingForm?this.postalFormRef.validate():this.billingFormRef.validate()}get renderedForm(){return this.hideFullBillingForm?t("postal-form",{ref:t=>this.postalFormRef=t}):t("div",null,t(f,{text:"Billing address",class:"fs-6 fw-bold lh-lg mb-4"}),t("billing-form",{ref:t=>this.billingFormRef=t}))}render(){return t(e,{key:"585ffd5fea9537675f0df77e1e4697a53dacf56f"},t("div",{key:"fb7cf4c2f763d64512b6f905aa29aded8060374c",part:c},this.renderedForm))}},x={bankAccount:"New bank account",card:"New credit or debit card"},_=class{constructor(t){i(this,t),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.authToken=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.paymentMethodGroupId=void 0,this.isSelected=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin=void 0,this.saveNewPaymentMethodChecked=!1}handleCheckboxChanged(t){this.saveNewPaymentMethodChecked=t.detail}async fillBillingForm(t){this.billingFormWrapperRef.fill(t)}async resolvePaymentMethod(t){var i,e;if(this.paymentMethodFormRef&&this.billingFormWrapperRef)try{if(!await this.validate()||!t.isValid)return{validationError:!0};const s=await this.tokenize();if(s.error)return{error:s.error};{const t=s.data;return{token:(null===(i=t.card)||void 0===i?void 0:i.token)||(null===(e=t.bank_account)||void 0===e?void 0:e.token),data:t}}}catch(t){return{error:t}}}async validate(){const t=await this.billingFormWrapperRef.validate(),i=await this.paymentMethodFormRef.validate();return t.isValid&&i.isValid}async tokenize(){try{const t=await this.billingFormWrapperRef.getValues();let i;i=this.saveNewPaymentMethodChecked?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupId}):Object.assign({},t);const e=this.authToken;return await this.paymentMethodFormRef.tokenize(e,i,this.accountId)}catch(t){return t}}showNewPaymentMethodForm(){var i;const e=null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id;return t("div",{class:"mt-4 pb-4"},t("hidden-input",null),t("div",{class:"mb-4"},t("card"===e?"card-form":"bank-account-form",{ref:t=>this.paymentMethodFormRef=t,iframeOrigin:this.iframeOrigin})),t("justifi-billing-form-wrapper",{ref:t=>this.billingFormWrapperRef=t,hideCardBillingForm:this.hideCardBillingForm,paymentMethodType:e}),t("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupId}))}render(){var i,s;return t(e,{key:"17b922ca3b03d458a0e139be895db31b33c255ed",class:"payment-method"},t("div",{key:"5d1bb3a05e7fc0516d29ade315f13c2f64d3afaf",class:"radio-list-item p-3",part:l,onClick:this.onPaymentMethodOptionClick},t("form-control-radio",{key:"165fd1b54a6d387be307f05ab67078e0d703f0b1",name:"paymentMethodType",value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,checked:this.isSelected,label:x[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.id]})),this.isSelected?this.showNewPaymentMethodForm():null)}};class C{constructor(t){this.id=t.id,this.brand=t.brand,this.acct_last_four=t.acct_last_four,this.type=b(t.type)}}var j;!function(t){t.american_express="American Express",t.diners_club="Diners Club",t.discover="Discover",t.jcb="JCB",t.mastercard="Mastercard",t.china_unionpay="UnionPay",t.visa="Visa",t.unknown="Unknown"}(j||(j={}));const M=class{constructor(t){i(this,t),this.showCard=void 0,this.showAch=void 0,this.showBnpl=void 0,this.showSavedPaymentMethods=void 0,this.paymentMethodGroupId=void 0,this.bnpl=void 0,this.insuranceToggled=void 0,this.authToken=void 0,this.accountId=void 0,this.savedPaymentMethods=[],this.paymentAmount=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin=void 0,this.selectedPaymentMethodId=void 0,this.paymentMethodOptions=[]}async fillBillingForm(t){const i=this.selectedPaymentMethodOptionRef;i.fillBillingForm&&i.fillBillingForm(t)}connectedCallback(){this.paymentMethodsChanged()}paymentMethodsChanged(){var t,i;this.paymentMethodOptions=this.savedPaymentMethods.map((t=>new C(t))).filter((t=>(this.showCard||t.type!==m.card)&&(this.showAch||t.type!==m.bankAccount))),this.showBnpl&&"sezzle"===(null===(t=this.bnpl)||void 0===t?void 0:t.provider)&&!this.insuranceToggled&&this.paymentMethodOptions.push(new C({id:m.sezzle})),this.showCard&&this.paymentMethodOptions.push(new C({id:m.card})),this.showAch&&this.paymentMethodOptions.push(new C({id:m.bankAccount})),this.selectedPaymentMethodId||(this.selectedPaymentMethodId=null===(i=this.paymentMethodOptions[0])||void 0===i?void 0:i.id)}paymentMethodOptionSelected(t){this.selectedPaymentMethodId=t.detail.id}async resolvePaymentMethod(t){var i;return await(null===(i=this.selectedPaymentMethodOptionRef)||void 0===i?void 0:i.resolvePaymentMethod(t))}render(){var i;return t(e,{key:"24e7d418958eb61f9582317e615502e77b4090d0"},null===(i=this.paymentMethodOptions)||void 0===i?void 0:i.map((i=>{const e=this.selectedPaymentMethodId===i.id,s=i.id===m.sezzle;return i.id===m.card||i.id===m.bankAccount?t("justifi-new-payment-method",{paymentMethodOption:i,authToken:this.authToken,"account-id":this.accountId,"is-selected":e,paymentMethodGroupId:this.paymentMethodGroupId,hideCardBillingForm:this.hideCardBillingForm,iframeOrigin:this.iframeOrigin,ref:t=>{e&&(this.selectedPaymentMethodOptionRef=t)}}):s?t("justifi-sezzle-payment-method",{paymentMethodOption:i,"is-selected":e,paymentAmount:this.paymentAmount,bnpl:this.bnpl,ref:t=>{e&&(this.selectedPaymentMethodOptionRef=t)}}):this.showSavedPaymentMethods?t("justifi-saved-payment-method",{paymentMethodOption:i,"is-selected":e,ref:t=>{e&&(this.selectedPaymentMethodOptionRef=t)}}):void 0})))}static get watchers(){return{savedPaymentMethods:["paymentMethodsChanged"]}}},z=class{constructor(t){i(this,t),this.checkboxChanged=s(this,"checkboxChanged",7),this.isChecked=!1}handleCheckboxChange(t,i){this.isChecked=i,this.checkboxChanged.emit(this.isChecked)}render(){return t("div",{key:"86520e5820d9e6ef19946566b31912c5b1050bf6",class:"mt-4 form-check"},t("form-control-checkbox",{key:"cc87b708b88aaf4b1f1a93f6b6ebfdd030f87bc0",label:"Save new payment method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange.bind(this)}))}},O=class{constructor(t){i(this,t),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.paymentMethodOption=void 0,this.isSelected=void 0}async resolvePaymentMethod(t){var i;return t.isValid?{token:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id}:{validationError:!0}}render(){var i,s,a;return t(e,{key:"34d26fc514053e2fe028a4a3ba0cbdeb8aa835f1",class:"payment-method"},t("div",{key:"da373a524b97bb91a0bc0849f0670c440f5cf5a8",class:"radio-list-item p-3",part:l,onClick:this.onPaymentMethodOptionClick},t("form-control-radio",{key:"824ebc566a018e342dd7f128c69fca873bbded45",name:"paymentMethodType",value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,checked:this.isSelected,label:`${j[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.brand]||""} *${null===(a=this.paymentMethodOption)||void 0===a?void 0:a.acct_last_four}`})))}},S=t("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),P=class{constructor(t){i(this,t),this.paymentMethodOptionSelected=s(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=t=>{t.preventDefault(),this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((i=>{t=i}));const i=this.bnpl,e=+this.paymentAmount,s=new(0,window.Checkout)({mode:"popup",publicKey:i.provider_client_id,apiMode:i.provider_mode,apiVersion:i.provider_api_version});s.sezzleButtonElement=this.sezzleButtonRef,s.init({onClick:function(t){t.preventDefault(),s.startCheckout({checkout_url:i.provider_checkout_url})},onComplete:i=>t({bnpl:i.data}),onCancel:i=>t({bnpl:i.data}),onFailure:i=>t({bnpl:i.data})}),this.sezzleCheckout=s,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)},this.bnpl=void 0,this.clientId=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.isSelected=void 0,this.paymentAmount=void 0,this.installmentPlan=void 0,this.sezzleCheckout=void 0,this.sezzlePromise=void 0}componentDidRender(){this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()}}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var i,s,a;return t(e,{key:"696051d9a48f0127013dcc84a25053f85ad92145",class:"payment-method"},t("script",{key:"0dec4821a85dbef872494885c32c26719423b761",src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),t("div",{key:"fb9812691532a49f5c8093a989f6277d4755e531",class:"radio-list-item p-3",part:l,onClick:this.onPaymentMethodOptionClick},t("form-control-radio",{key:"3ae4c03b30a32b860231789d2f541fbfbea37bef",name:"paymentMethodType",value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,checked:this.isSelected,label:t("div",null,t("div",null,"Buy now, pay later with ",S),this.installmentPlan&&t("small",null,t("span",null,null===(s=this.installmentPlan)||void 0===s?void 0:s.installments.length)," ",t("span",null,this.installmentPlan.schedule," payments of")," ",t("span",{class:"fw-bold"},u(null===(a=this.installmentPlan)||void 0===a?void 0:a.installments[0].amountInCents))))})))}};export{v as bank_account_form,g as card_form,k as hidden_input,w as justifi_billing_form_wrapper,_ as justifi_new_payment_method,M as justifi_payment_method_options,z as justifi_save_new_payment_method,O as justifi_saved_payment_method,P as justifi_sezzle_payment_method}
@@ -0,0 +1 @@
1
+ import{p as t}from"./p-7bf21156.js";import{A as i}from"./p-0e180654.js";class s{async record(t){return i({apiOrigin:void 0}).post("analytics",t)}}class e{constructor(t){this.handleCustomEvent=async t=>{await this.service.record(t)},window.location.origin.includes("localhost")||window.location.origin.includes("storybook")||(this.service=new s,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents())}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submit-event","error-event"],this.eventEmitters.forEach((t=>{"function"==typeof this.componentInstance.addEventListener&&this.componentInstance.addEventListener(t,(i=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),{error:i.detail})})))}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventEmitters.forEach((t=>{this.componentInstance.removeEventListener(t,this.handleCustomEvent)}))}}export{e as J}
@@ -1 +1 @@
1
- import{C as r}from"./p-14c91ffd.js";import{g as e,a as o}from"./p-8115b2f4.js";const n=({authToken:n,businessId:t,service:i})=>async({onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await i.fetchBusiness(t,n);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},t=({authToken:n,businessId:t,service:i})=>async({payload:s,onSuccess:a,onError:c,final:u=(()=>{})})=>{var l;try{const u=await i.patchBusiness(n,t,s);if(u.error){return c({error:e(u.error),code:o(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR})}a(u)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}finally{return u()}},i=({authToken:n,businessId:t,product:i,service:s})=>async({onSuccess:a,onError:c})=>{var u;try{const l=await s.postProvisioning(n,t,i);if(l.error){return c({error:e(l.error),code:o(null===(u=l.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(l)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}},s=({authToken:n,identityId:t,service:i})=>async({onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await i.fetchIdentity(t,n);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},a=({authToken:n,identityId:t,service:i})=>async({payload:s,onSuccess:a,onError:c,final:u=(()=>{})})=>{var l;try{const u=await i.patchIdentity(n,t,s);if(u.error){return c({error:e(u.error),code:o(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR})}a(u)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}finally{return u()}},c=({authToken:n,service:t})=>async({payload:i,onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await t.postIdentity(n,i);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},u=({authToken:n,service:t})=>async({payload:i,onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await t.postBankAccount(n,i);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},l=({authToken:n,service:t})=>async({payload:i,onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await t.postDocumentRecord(n,i);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}};export{i as a,t as b,u as c,l as d,s as e,a as f,c as g,n as m}
1
+ import{a as r}from"./p-9dd8685c.js";import{g as e,a as o}from"./p-87f8c596.js";const n=({authToken:n,businessId:t,service:i})=>async({onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await i.fetchBusiness(t,n);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},t=({authToken:n,businessId:t,service:i})=>async({payload:s,onSuccess:a,onError:c,final:u=(()=>{})})=>{var l;try{const u=await i.patchBusiness(n,t,s);if(u.error){return c({error:e(u.error),code:o(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR})}a(u)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}finally{return u()}},i=({authToken:n,businessId:t,product:i,service:s})=>async({onSuccess:a,onError:c})=>{var u;try{const l=await s.postProvisioning(n,t,i);if(l.error){return c({error:e(l.error),code:o(null===(u=l.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(l)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}},s=({authToken:n,identityId:t,service:i})=>async({onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await i.fetchIdentity(t,n);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},a=({authToken:n,identityId:t,service:i})=>async({payload:s,onSuccess:a,onError:c,final:u=(()=>{})})=>{var l;try{const u=await i.patchIdentity(n,t,s);if(u.error){return c({error:e(u.error),code:o(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR})}a(u)}catch(e){const n=o(null==e?void 0:e.code);return c({error:e.message||e,code:n,severity:r.ERROR})}finally{return u()}},c=({authToken:n,service:t})=>async({payload:i,onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await t.postIdentity(n,i);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},u=({authToken:n,service:t})=>async({payload:i,onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await t.postBankAccount(n,i);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}},l=({authToken:n,service:t})=>async({payload:i,onSuccess:s,onError:a,final:c=(()=>{})})=>{var u;try{const c=await t.postDocumentRecord(n,i);if(c.error){return a({error:e(c.error),code:o(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}s(c)}catch(e){const n=o(null==e?void 0:e.code);return a({error:e.message||e,code:n,severity:r.ERROR})}finally{return c()}};export{i as a,t as b,u as c,l as d,s as e,a as f,c as g,n as m}
@@ -0,0 +1 @@
1
+ import{h as o}from"./p-2783e363.js";import{X as r}from"./p-e8cd9691.js";const s=s=>o("h3",{class:`header-3 ${null==s?void 0:s.class}`,part:r},s.text);export{s as H}
@@ -0,0 +1 @@
1
+ import{A as t}from"./p-0e180654.js";import"./p-9dd8685c.js";import"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";class p{async fetchPayments(p,a,s,e){return t({authToken:a,apiOrigin:e}).get(`account/${p}/payments`,s)}async fetchPayment(p,a){const s=`payments/${p}`;return t({authToken:a,apiOrigin:void 0}).get(s)}}export{p as P}
@@ -1 +1 @@
1
- import{b as e}from"./p-275f2154.js";const a=[{label:"Choose business classification",value:""},{label:"Sole Proprietor",value:e.sole_proprietor},{label:"Partnership",value:e.partnership},{label:"Corporation",value:e.corporation},{label:"Public Company",value:e.public_company},{label:"Limited Liability Company (LLC)",value:e.limited},{label:"Non Profit",value:e.non_profit},{label:"Government",value:e.government}],l=[{label:"Within 7 days",value:"Within 7 days"},{label:"Within 30 days",value:"Within 30 days"},{label:"Within 90 days",value:"Within 90 days"},{label:"Within 120 days",value:"Within 120 days"},{label:"More than 120 days",value:"More than 120 days"}],s=[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],i=[{label:"Yes. The majority of the business revenue is generated in 3-6 months.",value:"Yes"},{label:"No. The business revenue is generated evenly throughout the year.",value:"No"}],n=[{label:"Checking",value:"checking"},{label:"Savings",value:"savings"}];export{l as a,a as b,n as c,s as r,i as s}
1
+ import{b as e}from"./p-5d1d2fd7.js";const a=[{label:"Choose business classification",value:""},{label:"Sole Proprietor",value:e.sole_proprietor},{label:"Partnership",value:e.partnership},{label:"Corporation",value:e.corporation},{label:"Public Company",value:e.public_company},{label:"Limited Liability Company (LLC)",value:e.limited},{label:"Non Profit",value:e.non_profit},{label:"Government",value:e.government}],l=[{label:"Within 7 days",value:"Within 7 days"},{label:"Within 30 days",value:"Within 30 days"},{label:"Within 90 days",value:"Within 90 days"},{label:"Within 120 days",value:"Within 120 days"},{label:"More than 120 days",value:"More than 120 days"}],s=[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],i=[{label:"Yes. The majority of the business revenue is generated in 3-6 months.",value:"Yes"},{label:"No. The business revenue is generated evenly throughout the year.",value:"No"}],n=[{label:"Checking",value:"checking"},{label:"Savings",value:"savings"}];export{l as a,a as b,n as c,s as r,i as s}
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as i,H as a}from"./p-2783e363.js";import{a8 as e,a9 as c,aa as h,ab as o,ac as r,l as d}from"./p-e8cd9691.js";import{F as f}from"./p-d5c41ec6.js";import{F as n}from"./p-2f9af679.js";const b=class{constructor(i){s(this,i),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.handleFormControlInput=s=>{s.preventDefault();const t=s.target,i=t.getAttribute("name");this.inputHandler(i,t.checked),this.formControlInput.emit({name:i,value:t.value})},this.updateInput=s=>{this.checkboxElement.checked=s},this.isFocused=!1,this.label=void 0,this.name=void 0,this.helpText=void 0,this.errorText=void 0,this.checked=void 0,this.inputHandler=void 0,this.disabled=void 0}get part(){return this.errorText?e:this.isFocused&&this.checked?c:this.isFocused?h:this.checked?o:r}render(){return i(a,{key:"8161ae3e7ce79824b21b97647b403646dd7d2db8"},i("div",{key:"e1aae62dd392cf208c342d727182a4b98dcabbbc",class:"form-group d-flex flex-column"},i("div",{key:"582178c2b18f6d535f692d2b1f16e71555bb6f2e",class:"form-check"},i("input",{key:"531a98078cee60acc5c8838a3ea7ea43c84fe846",ref:s=>this.checkboxElement=s,type:"checkbox",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-check-input is-invalid":"form-check-input",disabled:this.disabled,checked:this.checked}),i("label",{key:"8a12404a24a3b1c4cbec230444436c80faeba2d8",class:"form-check-label",htmlFor:this.name,part:d},this.label)),i(f,{key:"8cda3874473523f86dadc9e1e3dfb3e4448f3a6f",helpText:this.helpText,name:this.name}),i(n,{key:"951395dc28c0af8d35aa8c8f38011204a82eb008",errorText:this.errorText,name:this.name})))}};export{b as form_control_checkbox}
@@ -0,0 +1 @@
1
+ import{A as a}from"./p-0e180654.js";import{a as t}from"./p-9dd8685c.js";import"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";import{g as o,a as r}from"./p-87f8c596.js";class s{async fetchPayouts(t,o,r,s){return a({authToken:o,apiOrigin:s}).get(`account/${t}/payouts`,r)}async fetchPayout(t,o,r){return a({authToken:o,apiOrigin:r}).get(`payouts/${t}`)}async fetchCSV(t,o,r){return a({authToken:o,apiOrigin:r}).get(`reports/payouts/${t}`)}}const p=({authToken:a,service:s})=>async({payoutId:p,onError:e})=>{try{const{data:t}=await s.fetchCSV(p,a),o=document.createElement("a");o.href=t.csv_url,o.click()}catch(a){e({error:o(a),code:r(null==a?void 0:a.code),severity:t.ERROR})}};export{s as P,p as m}
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-2783e363.js";import{k as s,m as a}from"./p-e8cd9691.js";const e="id,status",r={id:()=>t("th",{part:s,scope:"col",title:"The ID of the terminal order"},"ID"),status:()=>t("th",{part:s,scope:"col",title:"The status of the terminal order"},"Status")},o={id:(s,e)=>t("td",{part:a(e)},s.id),status:(s,e)=>t("td",{part:a(e)},s.status)};export{o as a,e as d,r as t}
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t,H as o}from"./p-2783e363.js";import{E as r}from"./p-8b16a20f.js";import{B as e}from"./p-309dc8aa.js";import{m as a}from"./p-f30cb232.js";import{C as p,a as h}from"./p-9dd8685c.js";import{J as m}from"./p-b7084adc.js";import{c as d}from"./p-87a7c3aa.js";import"./p-e8cd9691.js";import"./p-0e180654.js";import"./p-5d1d2fd7.js";import"./p-1ff8810b.js";import"./p-6078a370.js";import"./p-87f8c596.js";import"./p-7bf21156.js";const n=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.businessId=void 0,this.authToken=void 0,this.errorMessage=void 0,this.getBusiness=void 0}componentWillLoad(){d(),this.analytics=new m(this),this.initializeGetBusiness()}disconnectedCallback(){this.analytics.cleanup()}initializeGetBusiness(){if(!this.businessId||!this.authToken)return this.errorMessage="Invalid business id or auth token",void this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:h.ERROR});this.getBusiness=a({id:this.businessId,authToken:this.authToken,service:new e})}render(){return t(o,null,this.errorMessage?r(this.errorMessage):t("business-details-core",{getBusiness:this.getBusiness}))}};export{n as justifi_business_details}
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-2783e363.js";import{S as s,T as r,R as e}from"./p-e8cd9691.js";import{S as a}from"./p-ec019b89.js";const n=r=>{const{columnSpan:e,isEmpty:a}=r;return e&&a?t("tr",null,t("td",{class:"empty-state",part:s,colSpan:e,style:{textAlign:"center"}},"No results")):null},l=s=>{const{columnSpan:e,errorMessage:a}=s;return e&&a?t("tr",null,t("td",{class:"error-state",part:r,colSpan:e,"data-test-id":"table-error-state",style:{textAlign:"center"}},"An unexpected error occurred: ",a)):null},o=s=>{const{columnSpan:r,isLoading:n}=s;return r&&n?t("tr",null,t("td",{class:"loading-state",part:e,colSpan:r,style:{textAlign:"center"}},t(a,null))):null};class c{get columnData(){return this.columnKeys.map((t=>this.tableColumns[t]()))}get rowData(){return this.collection.map(((t,s)=>this.columnKeys.map((r=>this.tableCells[r](t,s)))))}set collectionData(t){this.collection=t}constructor(t,s,r,e){this.columnKeys=s.split(","),this.collection=t,this.tableColumns=r,this.tableCells=e}}export{c as T,o as a,n as b,l as c}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as e}from"./p-2783e363.js";import"./p-9dd8685c.js";import"./p-389e1eb7.js";import{p as i}from"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";import{Q as a,R as r}from"./p-e8cd9691.js";import{T as h,a as o,b as c,c as d}from"./p-d398ce81.js";import{t as n,a as b}from"./p-2e0ae487.js";import{o as p,g as m}from"./p-f4739d31.js";import{T as f}from"./p-1f99a902.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";import"./p-ec019b89.js";import"./p-3b680e50.js";import"./p-f20b6ce1.js";const l=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:f.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:f.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.terminals.find((t=>t.id===s));this.clickEvent.emit({name:f.row,data:e})},this.getTerminals=void 0,this.getSubAccounts=void 0,this.columns=void 0,this.terminals=[],this.terminalsTable=void 0,this.subAccounts=[],this.loading=!0,this.errorMessage=void 0,this.paging=i,this.pagingParams={}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalsTable=new h(this.terminals,this.columns,n,b),this.getTerminals&&this.getSubAccounts&&this.fetchData(),p("set",(()=>{this.pagingParams={}})),p("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:s})=>{this.terminals=t,this.paging=s,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.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.terminals=this.terminals.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 terminalParams(){const t=m();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 e("div",{key:"074b9925b7092b69d4073b86e926bc6e627ba8cd"},e("div",{key:"195acd38db8ecc931e86e517a5e626ced44ce66f",class:"table-wrapper"},e("table",{key:"6534aba9b68490de5a7bd03d9760021db02e3f61",class:"table table-hover",part:a},e("thead",{key:"bf8dc807e1b31ed1e8040f952b5bfc3cfa77116d",class:"table-head sticky-top"},e("tr",{key:"b6828dbb38504d1f410f4c1199ea12d03b66292a",class:"table-light text-nowrap"},this.terminalsTable.columnData.map((t=>t)))),e("tbody",{key:"2080463e7f6ac9995b30e38e52f1650f75983dab",class:"table-body"},e(o,{key:"36b61e1fb8c23dea61aa3a41b2749f80dbfb34bb",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),e(c,{key:"c2a11b7e3ebb37538522026854faf3f10e405271",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),e(d,{key:"a40dd753552ee8ad3fae2655a4e890e67a8c14f0",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((t,s)=>e("tr",{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e("tfoot",{key:"0af6b6aefe2160a36e773deabed1c6d006d0cde2",class:"sticky-bottom"},e("tr",{key:"8576eee95c757c41d6b0a6838933e9c123f519d3",class:"table-light align-middle"},e("td",{key:"87ca55905ecb734ddb059dce080256af6a7f1be1",part:r,colSpan:this.terminalsTable.columnData.length},e("pagination-menu",{key:"08f29c2415998948e4dc020487fe10215bf10c3d",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{l as terminals_list_core}
@@ -1 +1 @@
1
- import{c as e,a as t}from"./p-5844a0f0.js";import{l as a,k as n,m as s,n as r,q as o,u as i,v as l,e as c,p as m,x as d,y as p}from"./p-27c8ffa2.js";const u=i=>{const l=e({line1:a.required("Enter street address"),line2:n.nullable(),city:s.required("Enter city"),state:r.required("Select state"),postal_code:o.required("Enter postal code"),country:t().required("Select country")}),c=e({line1:a.nullable(),line2:n.nullable(),city:s.nullable(),state:r.nullable(),postal_code:o.nullable(),country:t().required("Select country")});return i?c:l},f=(a,n)=>{const s=e({name:i.required(`Enter ${a} name`),title:l.required(`Enter ${a} title`),email:c.required(`Enter ${a} email`),phone:m.required("Enter phone number"),dob_full:d(a).required("Enter date of birth"),ssn_last4:t().nullable(),identification_number:p,address:u(n)}),r=e({name:i.required(`Enter ${a} name`),title:l.nullable(),email:c.nullable(),phone:m.nullable(),dob_full:d(a).nullable(),ssn_last4:t().nullable(),identification_number:p.nullable(),address:u(n)});return n?r:s};export{u as a,f as i}
1
+ import{c as e,a as t}from"./p-5844a0f0.js";import{l as a,k as n,m as s,n as r,q as o,u as i,v as l,e as c,p as m,x as d,y as p}from"./p-95e55bb1.js";const u=i=>{const l=e({line1:a.required("Enter street address"),line2:n.nullable(),city:s.required("Enter city"),state:r.required("Select state"),postal_code:o.required("Enter postal code"),country:t().required("Select country")}),c=e({line1:a.nullable(),line2:n.nullable(),city:s.nullable(),state:r.nullable(),postal_code:o.nullable(),country:t().required("Select country")});return i?c:l},E=(a,n)=>{const s=e({name:i.required(`Enter ${a} name`),title:l.required(`Enter ${a} title`),email:c.required(`Enter ${a} email`),phone:m.required("Enter phone number"),dob_full:d(a).required("Enter date of birth"),ssn_last4:t().nullable(),identification_number:p,address:u(n)}),r=e({name:i.required(`Enter ${a} name`),title:l.nullable(),email:c.nullable(),phone:m.nullable(),dob_full:d(a).nullable(),ssn_last4:t().nullable(),identification_number:p.nullable(),address:u(n)});return n?r:s};export{u as a,E as i}
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-2783e363.js";import{t as e}from"./p-e8cd9691.js";const r=r=>{const{helpText:m,name:o}=r;return m?t("small",{class:"form-text text-muted",id:`form-help-text-${o}`,part:e},m):null};export{r as F}
@@ -1 +1 @@
1
- import{r as s,c as t,h as i}from"./p-2783e363.js";import{a as e,C as r}from"./p-14c91ffd.js";import{a as o}from"./p-1ff8810b.js";import{t as h}from"./p-d8c04275.js";import{S as n}from"./p-bfe9748b.js";import{H as a}from"./p-1603fe4d.js";import{B as d}from"./p-73f9be7c.js";import"./p-6078a370.js";const c=class{constructor(i){s(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7),this.setBusinessProvisioned=()=>{this.getBusiness({onSuccess:s=>{this.businessProvisioned=o(s.data),this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:e.PROVISIONING_REQUESTED,severity:r.INFO})},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:d.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})},this.loading=!1,this.businessProvisioned=!1,this.currentStep=0,this.errorMessage=void 0,this.businessId=void 0,this.authToken=void 0,this.allowOptionalFields=!1,this.formTitle=void 0,this.getBusiness=void 0,this.postProvisioning=void 0}handleFormCompleted(){this.postProvisioningData()}componentWillLoad(){this.getBusiness&&this.setBusinessProvisioned(),this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.documentUploadRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return i(n,{key:"03dc39eadbac2f9a9a4326bab1355bfc300c392e"},i("div",{key:"86e6e57fc104c87696c5825119a15c0a642c4bd2",class:"row gap-3"},i(a,{key:"d4df3ead1037464624fb8cc465427c6b90bd0e36",text:this.formTitle}),i("justifi-payment-provisioning-form-steps",{key:"7f3d977b8dfbb29c03125c173e9d41558de08322",businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,handleFormLoading:this.handleFormLoading}),i("div",{key:"283568d94267850b0eb41fa6a52dbc6b0abf4642",class:"d-flex justify-content-between align-items-center"},i("div",{key:"6abf09f174e71767087b57180e976546c057499f",class:"d-flex align-items-center",part:h},this.stepCounter),i("justifi-payment-provisioning-form-buttons",{key:"b38ed082d216556c6ae93bde3ec1324e69f8fcee",currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{c as justifi_payment_provisioning_core}
1
+ import{r as s,c as t,h as i}from"./p-2783e363.js";import{C as e,a as r}from"./p-9dd8685c.js";import{a as o}from"./p-1ff8810b.js";import{t as h}from"./p-e8cd9691.js";import{S as n}from"./p-bfe9748b.js";import{H as a}from"./p-9edd6ad8.js";import{B as d}from"./p-73f9be7c.js";import"./p-6078a370.js";const c=class{constructor(i){s(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7),this.setBusinessProvisioned=()=>{this.getBusiness({onSuccess:s=>{this.businessProvisioned=o(s.data),this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:e.PROVISIONING_REQUESTED,severity:r.INFO})},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:d.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})},this.loading=!1,this.businessProvisioned=!1,this.currentStep=0,this.errorMessage=void 0,this.businessId=void 0,this.authToken=void 0,this.allowOptionalFields=!1,this.formTitle=void 0,this.getBusiness=void 0,this.postProvisioning=void 0}handleFormCompleted(){this.postProvisioningData()}componentWillLoad(){this.getBusiness&&this.setBusinessProvisioned(),this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.documentUploadRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return i(n,{key:"03dc39eadbac2f9a9a4326bab1355bfc300c392e"},i("div",{key:"86e6e57fc104c87696c5825119a15c0a642c4bd2",class:"row gap-3"},i(a,{key:"d4df3ead1037464624fb8cc465427c6b90bd0e36",text:this.formTitle}),i("justifi-payment-provisioning-form-steps",{key:"7f3d977b8dfbb29c03125c173e9d41558de08322",businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,handleFormLoading:this.handleFormLoading}),i("div",{key:"283568d94267850b0eb41fa6a52dbc6b0abf4642",class:"d-flex justify-content-between align-items-center"},i("div",{key:"6abf09f174e71767087b57180e976546c057499f",class:"d-flex align-items-center",part:h},this.stepCounter),i("justifi-payment-provisioning-form-buttons",{key:"b38ed082d216556c6ae93bde3ec1324e69f8fcee",currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{c as justifi_payment_provisioning_core}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e}from"./p-2783e363.js";import{a as s,C as o}from"./p-9dd8685c.js";import{g as r,a}from"./p-87f8c596.js";import{C as c}from"./p-185181a8.js";import{J as h}from"./p-b7084adc.js";import{c as d}from"./p-87a7c3aa.js";import"./p-0e180654.js";import"./p-389e1eb7.js";import"./p-2ca5b5e4.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-abdbcd8e.js";import"./p-42a48c59.js";import"./p-61f0a2ce.js";import"./p-7bf21156.js";const n=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event",7),this.loadedEvent=i(this,"loaded",7),this.authToken=void 0,this.checkoutId=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.disableBnpl=void 0,this.disablePaymentMethodGroup=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin=void 0,this.getCheckout=void 0,this.complete=void 0,this.errorMessage=""}componentWillLoad(){d(),this.analytics=new h(this),this.initializeGetCheckout()}disconnectedCallback(){this.analytics.cleanup()}initializeGetCheckout(){this.authToken&&this.checkoutId?(this.getCheckout=(({authToken:t,checkoutId:i,service:e})=>async({onSuccess:o,onError:c})=>{var h;try{const d=await e.fetchCheckout(t,i);if(d.error)return c({error:r(d.error),code:a(null===(h=d.error)||void 0===h?void 0:h.code),severity:s.ERROR});o({checkout:d.data})}catch(t){const i=a(null==t?void 0:t.code);return c({error:t.message||t,code:i,severity:s.ERROR})}})({authToken:this.authToken,checkoutId:this.checkoutId,service:new c}),this.complete=(({authToken:t,checkoutId:i,service:e})=>async({payment:o,onSuccess:c,onError:h})=>{var d;try{const n=await e.complete(t,i,o);if(n.error)return h({error:r(n.error),code:a(null===(d=n.error)||void 0===d?void 0:d.code),severity:s.ERROR});c(n)}catch(t){const i=a(null==t?void 0:t.code);return h({error:t.message||t,code:i,severity:s.ERROR})}})({authToken:this.authToken,checkoutId:this.checkoutId,service:new c})):this.errorEvent.emit({message:"auth-token and checkout-id are required",errorCode:o.MISSING_PROPS,severity:s.ERROR})}propChanged(){this.initializeGetCheckout()}async fillBillingForm(t){this.checkoutCoreRef.fillBillingForm(t)}render(){return e("justifi-checkout-core",{key:"52aca1a3ce8016a382f428ef142abc8aee9da41d",getCheckout:this.getCheckout,authToken:this.authToken,complete:this.complete,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,disableBnpl:this.disableBnpl,disablePaymentMethodGroup:this.disablePaymentMethodGroup,hideCardBillingForm:this.hideCardBillingForm,iframeOrigin:this.iframeOrigin,ref:t=>{t&&(this.checkoutCoreRef=t)}},e("div",{key:"fabb53264f26320fff2aa0a603c664f47ca380d0",slot:"insurance"},e("slot",{key:"ce09504ef5a48d6b963f4ba39252d681f23d0168",name:"insurance"})))}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{n as justifi_checkout}
@@ -1 +1 @@
1
- import{h as s,r as t,c as e}from"./p-2783e363.js";import{a as i,b as r}from"./p-b0b40bcd.js";import{F as o,c as n}from"./p-5844a0f0.js";import{A as a,C as l,R as h,c}from"./p-275f2154.js";import{C as d,P as u}from"./p-525db3e8.js";import{h as m}from"./p-d8c04275.js";import{S as p}from"./p-aa02cf71.js";import{a as v,r as f,s as b,b as y}from"./p-0ea387a2.js";import{a as g,B as w}from"./p-73f9be7c.js";import{z as _,A as x,u as j,B as S,C as T,D as O,E as k,F as C}from"./p-27c8ffa2.js";import{a as L,C as H}from"./p-14c91ffd.js";import"./p-7c31ec70.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-01d4e35a.js";import{a as E,b as D}from"./p-61f0a2ce.js";import{n as V}from"./p-e3c22aa9.js";import{B as A}from"./p-298e290e.js";import{i as P,a as B}from"./p-849c68e5.js";import{S as I}from"./p-6078a370.js";import"./p-1ff8810b.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";class W{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.account_number=s.account_number,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const F=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(p,{width:"25%"})),s("div",{class:"col-12"},s(p,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(p,{width:"50%"}),s(p,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(p,{width:"65%"}),s(p,{width:"35%"}))),N=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(p,{width:"40%",height:"40px"})),s(F,null),s(F,null),s(F,null)),U=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.additional_questions=new a(s.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t})),this.additional_questions=new a(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}recurringPaymentsWatcher(s){this.recurringPayments="Yes"===(null==s?void 0:s.business_recurring_payments)}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{additional_questions:new a(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){var t,e,i,r,o,n,a;const l=this.formController.getInitialValues();return this.isLoading?s(N,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",{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==l?void 0:l.business_revenue,maskOptions:d.WHOLE})),s("div",{class:"col-12 col-md-6"},s("form-control-monetary",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==l?void 0:l.business_payment_volume,maskOptions:d.WHOLE})),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===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:v,defaultValue:null==l?void 0:l.business_when_service_received})),s("div",{class:"col-12"},s("form-control-select",{name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_recurring_payments,options:f,defaultValue:null==l?void 0:l.business_recurring_payments})),s("div",{class:"col-12",hidden:!this.recurringPayments},s("form-control-text",{name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(o=this.errors)||void 0===o?void 0:o.business_recurring_payments_percentage,defaultValue:null==l?void 0:l.business_recurring_payments_percentage,helpText:"For example: 50% monthly, 50% annual."})),s("div",{class:"col-12"},s("form-control-select",{name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_seasonal,options:b,defaultValue:null==l?void 0:l.business_seasonal})),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===(a=this.errors)||void 0===a?void 0:a.business_other_payment_details,defaultValue:null==l?void 0:l.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},q=(s,t)=>{const e=n({bank_name:_.required("Enter bank name"),nickname:x.required("Enter nickname"),account_owner_name:j.required("Enter account owner name"),account_type:S.required("Select account type"),account_number:T.required("Enter account number"),routing_number:O.required("Enter routing number"),voided_check:k(s,t),bank_statement:C(s,t)}),i=n({bank_name:_.nullable(),nickname:x.nullable(),account_owner_name:j.nullable(),account_type:S.nullable(),account_number:T.nullable(),routing_number:O.nullable(),voided_check:k(s,t),bank_statement:C(s,t)});return t?i:e},R=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.initializeFormController=()=>{this.formController=new o(q(this.existingDocuments,this.allowOptionalFields)),this.formController.setInitialValues(Object.assign({},this.bankAccount)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new E({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{s.data.bank_accounts.length>0?this.bankAccount=new W(s.data.bank_accounts[0]):(this.bankAccount=new W({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=s.data.documents},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.postDocumentRecordData=async s=>{this.isLoading=!0;const t=s.record_data;return new Promise((e=>{this.postDocumentRecord({payload:t,onSuccess:t=>{e(this.handleDocRecordResponse(s,t))},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:L.POST_ERROR,message:t.error.message,severity:H.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await fetch(s.presigned_url,{method:"PUT",body:s.fileString});return this.handleUploadResponse(t)},this.handleUploadResponse=s=>!s.error||(this.errorEvent.emit({errorCode:L.POST_ERROR,message:s.error.message,severity:H.ERROR,data:s.error}),!1),this.formController=void 0,this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new D,this.isLoading=!1,this.businessId=void 0,this.getBusiness=void 0,this.postBankAccount=void 0,this.postDocumentRecord=void 0,this.allowOptionalFields=void 0}watchHandler(s){this.formLoading.emit(s)}async validateAndSubmit({onSuccess:s}){this.existingBankAccount?this.sendData(s):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(q(this.existingDocuments,this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get postPayload(){return new W(this.formController.values.getValue()).payload}get existingBankAccount(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}async sendData(s){try{if(!this.existingBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;s()}catch(s){this.errorEvent.emit({message:s,errorCode:L.POST_ERROR,severity:H.ERROR})}}async postBankAccountData(){let s;return this.isLoading=!0,new Promise((t=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:t=>{s=t,e=!0},onError:({error:s,code:t,severity:i})=>{e=!1,this.errorEvent.emit({message:s,errorCode:t,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:g.bankAccount}),this.isLoading=!1,t(e)}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const s=Object.values(this.documentData).flat();return!s.length||!(await Promise.all(s.map((s=>this.postDocumentRecordData(s))))).includes(!1)&&!(await Promise.all(s.map((s=>this.uploadDocument(s))))).includes(!1)}finally{this.isLoading=!1}}render(){const t=this.formController.getInitialValues();return this.isLoading?s(N,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"}),s("bank-account-form-inputs",{defaultValue:t,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.existingBankAccount})),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:"These documents are required for underwriting purposes. Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."})),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})))}static get watchers(){return{isLoading:["watchHandler"]}}},Y=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.coreInfo=new l(s.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.coreInfo={},this.isLoading=!1,this.businessId=void 0,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return new l(this.formController.values.getValue()).payload}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(r(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){const t=this.formController.getInitialValues();return this.isLoading?s(N,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"},s("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:t.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"},s("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:t.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:y,defaultValue:t.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 Incorporation",defaultValue:t.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:t.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"tax_id",label:"Tax ID (EIN or SSN)",defaultValue:t.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,keyDownHandler:V,maxLength:9,helpText:"Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns."})),s("div",{class:"col-12"},s("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:t.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:t.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:t.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:u.US})))))}},z=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.matchRef=(s,t)=>{const e=this.refs.findIndex((s=>s===t));-1!==e&&(this.refs[e]=s)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{s.data.owners.length?this.ownersPayload=s.data.owners.map((s=>({id:s.id}))):this.addOwnerForm()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=s=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],s&&this.clickEvent.emit({name:w.addOwnerForm})},this.removeOwnerForm=s=>{this.ownersPayload=this.ownersPayload.filter((t=>t.id!==s)),this.newFormOpen&&(this.newFormOpen=!1)},this.ownersPayload=[],this.refs=[],this.newFormOpen=void 0,this.isLoading=!1,this.authToken=void 0,this.businessId=void 0,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((s=>s.id))}async validateAndSubmit({onSuccess:s}){const t=this.refs.map((s=>s.validate()));if(!(await Promise.all(t)).every((s=>s)))return;const e=this.refs.map((s=>s.submit()));(await Promise.all(e)).every((s=>s))&&this.sendData(s)}componentWillLoad(){this.getBusiness&&this.getData()}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(s){const t=s.detail,e=this.ownersPayload.map((s=>s.id===t.id?t:s));e.includes(t)||(e[this.ownersPayload.findIndex((s=>!s.id))]=t,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return this.isLoading?s(N,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"}),s("div",{class:"row gy-3"},this.ownersPayload.map((t=>s("justifi-owner-form",{key:t.id,authToken:this.authToken,businessId:this.businessId,ownerId:t.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,allowOptionalFields:this.allowOptionalFields,ref:s=>this.matchRef(s,t.id)})))),s("div",{class:"d-flex justify-content-start"},s("div",{class:"gap-2"},s(A,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},G=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new h(s.data.representative||{}),this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.representative}),this.formLoading.emit(!1)}})},this.formController=void 0,this.errors={},this.representative={},this.isLoading=!1,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{representative:new h(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(P("representative",this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){return this.isLoading?s(N,null):s("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController})}},J=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.legal_address=new c(s.data.legal_address||{}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.legal_address={},this.isLoading=!1,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{legal_address:new c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(B(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){var t,e,i,r,o,n;const a=this.formController.getInitialValues();return this.isLoading?s(N,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("div",{class:"row gy-3"},s("div",{class:"col-12"},s("form-control-text",{name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1})),s("div",{class:"col-12"},s("form-control-text",{name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line2,errorText:null===(e=this.errors)||void 0===e?void 0:e.line2})),s("div",{class:"col-12"},s("form-control-text",{name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.city,errorText:null===(i=this.errors)||void 0===i?void 0:i.city})),s("div",{class:"col-12"},s("form-control-select",{name:"state",label:"State",options:I,inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.state,errorText:null===(r=this.errors)||void 0===r?void 0:r.state})),s("div",{class:"col-12"},s("form-control-text",{name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.postal_code,errorText:null===(o=this.errors)||void 0===o?void 0:o.postal_code,maxLength:5,keyDownHandler:V})),s("div",{class:"col-12"},s("form-control-select",{name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.country,errorText:null===(n=this.errors)||void 0===n?void 0:n.country,disabled:!0})))))}};export{U as justifi_additional_questions_form_step_core,R as justifi_business_bank_account_form_step_core,Y as justifi_business_core_info_form_step_core,z as justifi_business_owners_form_step_core,G as justifi_business_representative_form_step_core,J as justifi_legal_address_form_step_core}
1
+ import{h as s,r as t,c as e}from"./p-2783e363.js";import{a as i,b as r}from"./p-4acf8ca2.js";import{F as o,c as n}from"./p-5844a0f0.js";import{A as a,C as l,R as h,c}from"./p-5d1d2fd7.js";import{C as d,P as u}from"./p-525db3e8.js";import{h as m}from"./p-e8cd9691.js";import{S as p}from"./p-e9e80a62.js";import{a as v,r as f,s as b,b as y}from"./p-c9b78275.js";import{a as g,B as w}from"./p-73f9be7c.js";import{z as _,A as x,u as j,B as S,C as T,D as O,E as k,F as C}from"./p-95e55bb1.js";import{C as L,a as H}from"./p-9dd8685c.js";import"./p-389e1eb7.js";import"./p-56f6ce4c.js";import"./p-9894484a.js";import"./p-42a48c59.js";import{a as E,b as D}from"./p-61f0a2ce.js";import{n as V}from"./p-e3c22aa9.js";import{B as A}from"./p-06f5b709.js";import{i as P,a as B}from"./p-d43a38a4.js";import{S as I}from"./p-6078a370.js";import"./p-1ff8810b.js";import"./p-2ca5b5e4.js";import"./p-abdbcd8e.js";class W{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.account_number=s.account_number,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const F=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(p,{width:"25%"})),s("div",{class:"col-12"},s(p,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(p,{width:"50%"}),s(p,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(p,{width:"65%"}),s(p,{width:"35%"}))),N=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(p,{width:"40%",height:"40px"})),s(F,null),s(F,null),s(F,null)),U=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.additional_questions=new a(s.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t})),this.additional_questions=new a(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}recurringPaymentsWatcher(s){this.recurringPayments="Yes"===(null==s?void 0:s.business_recurring_payments)}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{additional_questions:new a(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){var t,e,i,r,o,n,a;const l=this.formController.getInitialValues();return this.isLoading?s(N,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",{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==l?void 0:l.business_revenue,maskOptions:d.WHOLE})),s("div",{class:"col-12 col-md-6"},s("form-control-monetary",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==l?void 0:l.business_payment_volume,maskOptions:d.WHOLE})),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===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:v,defaultValue:null==l?void 0:l.business_when_service_received})),s("div",{class:"col-12"},s("form-control-select",{name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_recurring_payments,options:f,defaultValue:null==l?void 0:l.business_recurring_payments})),s("div",{class:"col-12",hidden:!this.recurringPayments},s("form-control-text",{name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(o=this.errors)||void 0===o?void 0:o.business_recurring_payments_percentage,defaultValue:null==l?void 0:l.business_recurring_payments_percentage,helpText:"For example: 50% monthly, 50% annual."})),s("div",{class:"col-12"},s("form-control-select",{name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_seasonal,options:b,defaultValue:null==l?void 0:l.business_seasonal})),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===(a=this.errors)||void 0===a?void 0:a.business_other_payment_details,defaultValue:null==l?void 0:l.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},q=(s,t)=>{const e=n({bank_name:_.required("Enter bank name"),nickname:x.required("Enter nickname"),account_owner_name:j.required("Enter account owner name"),account_type:S.required("Select account type"),account_number:T.required("Enter account number"),routing_number:O.required("Enter routing number"),voided_check:k(s,t),bank_statement:C(s,t)}),i=n({bank_name:_.nullable(),nickname:x.nullable(),account_owner_name:j.nullable(),account_type:S.nullable(),account_number:T.nullable(),routing_number:O.nullable(),voided_check:k(s,t),bank_statement:C(s,t)});return t?i:e},R=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.initializeFormController=()=>{this.formController=new o(q(this.existingDocuments,this.allowOptionalFields)),this.formController.setInitialValues(Object.assign({},this.bankAccount)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new E({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:s=>{s.data.bank_accounts.length>0?this.bankAccount=new W(s.data.bank_accounts[0]):(this.bankAccount=new W({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=s.data.documents},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.postDocumentRecordData=async s=>{this.isLoading=!0;const t=s.record_data;return new Promise((e=>{this.postDocumentRecord({payload:t,onSuccess:t=>{e(this.handleDocRecordResponse(s,t))},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({message:s,errorCode:t,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:L.POST_ERROR,message:t.error.message,severity:H.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await fetch(s.presigned_url,{method:"PUT",body:s.fileString});return this.handleUploadResponse(t)},this.handleUploadResponse=s=>!s.error||(this.errorEvent.emit({errorCode:L.POST_ERROR,message:s.error.message,severity:H.ERROR,data:s.error}),!1),this.formController=void 0,this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new D,this.isLoading=!1,this.businessId=void 0,this.getBusiness=void 0,this.postBankAccount=void 0,this.postDocumentRecord=void 0,this.allowOptionalFields=void 0}watchHandler(s){this.formLoading.emit(s)}async validateAndSubmit({onSuccess:s}){this.existingBankAccount?this.sendData(s):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(q(this.existingDocuments,this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get postPayload(){return new W(this.formController.values.getValue()).payload}get existingBankAccount(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}async sendData(s){try{if(!this.existingBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;s()}catch(s){this.errorEvent.emit({message:s,errorCode:L.POST_ERROR,severity:H.ERROR})}}async postBankAccountData(){let s;return this.isLoading=!0,new Promise((t=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:t=>{s=t,e=!0},onError:({error:s,code:t,severity:i})=>{e=!1,this.errorEvent.emit({message:s,errorCode:t,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:g.bankAccount}),this.isLoading=!1,t(e)}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const s=Object.values(this.documentData).flat();return!s.length||!(await Promise.all(s.map((s=>this.postDocumentRecordData(s))))).includes(!1)&&!(await Promise.all(s.map((s=>this.uploadDocument(s))))).includes(!1)}finally{this.isLoading=!1}}render(){const t=this.formController.getInitialValues();return this.isLoading?s(N,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"}),s("bank-account-form-inputs",{defaultValue:t,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.existingBankAccount})),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:"These documents are required for underwriting purposes. Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."})),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})))}static get watchers(){return{isLoading:["watchHandler"]}}},Y=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.coreInfo=new l(s.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.coreInfo={},this.isLoading=!1,this.businessId=void 0,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return new l(this.formController.values.getValue()).payload}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(r(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){const t=this.formController.getInitialValues();return this.isLoading?s(N,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"},s("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:t.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"},s("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:t.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:y,defaultValue:t.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 Incorporation",defaultValue:t.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:t.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),s("div",{class:"col-12 col-md-6"},s("form-control-text",{name:"tax_id",label:"Tax ID (EIN or SSN)",defaultValue:t.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,keyDownHandler:V,maxLength:9,helpText:"Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns."})),s("div",{class:"col-12"},s("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:t.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:t.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:t.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:u.US})))))}},z=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.matchRef=(s,t)=>{const e=this.refs.findIndex((s=>s===t));-1!==e&&(this.refs[e]=s)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{s.data.owners.length?this.ownersPayload=s.data.owners.map((s=>({id:s.id}))):this.addOwnerForm()},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=s=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],s&&this.clickEvent.emit({name:w.addOwnerForm})},this.removeOwnerForm=s=>{this.ownersPayload=this.ownersPayload.filter((t=>t.id!==s)),this.newFormOpen&&(this.newFormOpen=!1)},this.ownersPayload=[],this.refs=[],this.newFormOpen=void 0,this.isLoading=!1,this.authToken=void 0,this.businessId=void 0,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((s=>s.id))}async validateAndSubmit({onSuccess:s}){const t=this.refs.map((s=>s.validate()));if(!(await Promise.all(t)).every((s=>s)))return;const e=this.refs.map((s=>s.submit()));(await Promise.all(e)).every((s=>s))&&this.sendData(s)}componentWillLoad(){this.getBusiness&&this.getData()}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(s){const t=s.detail,e=this.ownersPayload.map((s=>s.id===t.id?t:s));e.includes(t)||(e[this.ownersPayload.findIndex((s=>!s.id))]=t,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return this.isLoading?s(N,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"}),s("div",{class:"row gy-3"},this.ownersPayload.map((t=>s("justifi-owner-form",{key:t.id,authToken:this.authToken,businessId:this.businessId,ownerId:t.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,allowOptionalFields:this.allowOptionalFields,ref:s=>this.matchRef(s,t.id)})))),s("div",{class:"d-flex justify-content-start"},s("div",{class:"gap-2"},s(A,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},G=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.representative=new h(s.data.representative||{}),this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.representative}),this.formLoading.emit(!1)}})},this.formController=void 0,this.errors={},this.representative={},this.isLoading=!1,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{representative:new h(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(P("representative",this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){return this.isLoading?s(N,null):s("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController})}},J=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.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:s=>{this.legal_address=new c(s.data.legal_address||{}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=s=>{let t;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{t=e,s()},onError:({error:s,code:e,severity:i})=>{t=s,this.errorEvent.emit({message:s,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:g.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.legal_address={},this.isLoading=!1,this.getBusiness=void 0,this.patchBusiness=void 0,this.allowOptionalFields=void 0}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get patchPayload(){return{legal_address:new c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(B(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){var t,e,i,r,o,n;const a=this.formController.getInitialValues();return this.isLoading?s(N,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("div",{class:"row gy-3"},s("div",{class:"col-12"},s("form-control-text",{name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1})),s("div",{class:"col-12"},s("form-control-text",{name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line2,errorText:null===(e=this.errors)||void 0===e?void 0:e.line2})),s("div",{class:"col-12"},s("form-control-text",{name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.city,errorText:null===(i=this.errors)||void 0===i?void 0:i.city})),s("div",{class:"col-12"},s("form-control-select",{name:"state",label:"State",options:I,inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.state,errorText:null===(r=this.errors)||void 0===r?void 0:r.state})),s("div",{class:"col-12"},s("form-control-text",{name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.postal_code,errorText:null===(o=this.errors)||void 0===o?void 0:o.postal_code,maxLength:5,keyDownHandler:V})),s("div",{class:"col-12"},s("form-control-select",{name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.country,errorText:null===(n=this.errors)||void 0===n?void 0:n.country,disabled:!0})))))}};export{U as justifi_additional_questions_form_step_core,R as justifi_business_bank_account_form_step_core,Y as justifi_business_core_info_form_step_core,z as justifi_business_owners_form_step_core,G as justifi_business_representative_form_step_core,J as justifi_legal_address_form_step_core}
@@ -0,0 +1 @@
1
+ const a="font-family",s="background-color",t=`text color ${a}`,e=`text-danger ${t}`,i=`heading ${t}`,l=`heading-1 ${i}`,r=`heading-2 ${i}`,$=`heading-3 ${i}`,n=`heading-4 ${i}`,o=`heading-5 ${i}`,d=`button ${t}`,p=`button-primary ${d}`,c=`button-secondary ${d}`,u=`button-link ${d}`,m="button-loading",b=`button-disabled ${d}`,f=`label ${t}`,g=`input ${t} ${s}`,h=`input-group ${g}`,y=`input-invalid ${g}`,k=`input-disabled ${g}`,x=`input-focused ${g}`,v=`input-invalid-and-focused ${g}`,w="input-radio",j=`input-radio-focused ${w}`,q=`input-radio-checked ${w}`,z=`input-radio-checked-focused ${w}`,A=`input-radio-invalid ${w}`,B=`input-checkbox ${s}`,C=`input-checkbox-invalid ${B}`,D=`input-checkbox-focused ${B}`,E=`input-checkbox-checked ${B}`,F=`input-checkbox-checked-focused ${B}`,G=`alert-danger alert ${t}`,H=`tooltip ${t}`,I=`tooltip-icon ${t}`,J=`tooltip-inner ${t}`,K=`card ${t} ${s}`,L=`table ${t} ${s}`,M=`table-cell ${t} ${s}`,N=`table-head-cell ${M} ${t} ${s}`,O=`table-cell-even ${M} ${t} ${s}`,P=`table-cell-odd ${M} ${t} ${s}`,Q=a=>a%2?O:P,R=`table-empty ${t} ${s}`,S=`table-error ${t} ${s}`,T="loading-spinner",U=`badge ${a}`,V=`${U} badge-primary`,W=`${U} badge-secondary`,X=`${U} badge-success`,Y=`${U} badge-danger`,Z=`${U} badge-warning`,_=`${U} badge-info`,aa=`${U} badge-light`,sa=`${U} badge-dark`,ta=`dropdown-menu ${t}`,ea=`radio-list-item ${t}`,ia=`list-group ${t} ${s}`,la=`list-group-item ${t} ${s}`,ra="skeleton",$a="billing-form",na="checkout-summary",oa="filter-menu",da=`${oa} payments-list-filter-menu`,pa="payments-list-filter-param",ca=`${pa} payment-id-payments-list-filter-param`,ua=`${pa} terminal-id-payments-list-filter-param`,ma=`${pa} payment-status-payments-list-filter-param`,ba=`${pa} created-after-payments-list-filter-param`,fa=`${pa} created-before-payments-list-filter-param`,ga=`${oa} payouts-list-filter-menu`,ha="payouts-list-filter-param",ya=`${ha} created-after-payouts-list-filter-param`,ka=`${ha} created-before-payouts-list-filter-param`,xa=`${oa} checkouts-list-filter-menu`,va="checkouts-list-filter-param",wa=`${va} checkout-status-checkouts-list-filter-param`,ja=`${va} payment-mode-checkouts-list-filter-param`,qa=`${oa} terminals-list-filter-menu`,za="terminals-list-filter-param",Aa=`${za} terminal-id-terminals-list-filter-param`,Ba=`${za} terminal-status-terminals-list-filter-param`;export{ta as $,ja as A,n as B,ia as C,la as D,da as E,ca as F,ua as G,ma as H,ba as I,fa as J,ga as K,ya as L,ka as M,qa as N,Aa as O,Ba as P,L as Q,M as R,R as S,S as T,T as U,G as V,na as W,$ as X,$a as Y,ea as Z,o as _,x as a,K as a0,k as a1,h as a2,A as a3,z as a4,q as a5,j as a6,w as a7,C as a8,F as a9,D as aa,E as ab,B as ac,u as ad,b as ae,H as af,J as ag,I as ah,y as b,g as c,e as d,l as e,m as f,p as g,r as h,v as i,c as j,N as k,f as l,Q as m,U as n,V as o,W as p,X as q,Y as r,ra as s,t,Z as u,_ as v,aa as w,sa as x,xa as y,wa as z}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-2783e363.js";import{D as e}from"./p-667ebd79.js";import{a as r,D as h}from"./p-abdbcd8e.js";const o=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.getDispute=void 0,this.disputeId=void 0,this.authToken=void 0,this.dispute=void 0,this.isLoading=!0,this.showDisputeResponseForm=!1}disputeResponseHandler(t){t.detail.name===e.respondToDispute&&(this.showDisputeResponseForm=!0),t.detail.name===e.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){this.getDispute&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.isLoading=!0,this.getDispute({onSuccess:({dispute:t})=>{this.dispute=new r(t),this.isLoading=!1,this.dispute.status!==h.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({errorCode:s,message:t,severity:i}),this.isLoading=!1}})}render(){return i("div",{key:"b5a802e8c418b3b7f3235f43260186084a6ee079"},this.showDisputeResponseForm?i("justifi-dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):i("justifi-dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading}))}static get watchers(){return{getDispute:["updateOnPropChange"]}}};export{o as justifi_dispute_management_core}
1
+ import{r as t,c as s,h as i}from"./p-2783e363.js";import{D as e}from"./p-667ebd79.js";import{a as r,D as h}from"./p-abdbcd8e.js";const o=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.getDispute=void 0,this.disputeId=void 0,this.authToken=void 0,this.dispute=void 0,this.isLoading=!0,this.showDisputeResponseForm=!1}disputeResponseHandler(t){t.detail.name===e.respondToDispute&&(this.showDisputeResponseForm=!0),t.detail.name===e.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){this.getDispute&&this.fetchData()}updateOnPropChange(){this.fetchData()}fetchData(){this.isLoading=!0,this.getDispute({onSuccess:({dispute:t})=>{this.dispute=new r(t),this.isLoading=!1,this.dispute.status!==h.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({errorCode:s,message:t,severity:i}),this.isLoading=!1}})}render(){return i("div",{key:"5a8663529813801b730d449c835cfafb9924d860"},this.showDisputeResponseForm?i("justifi-dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):i("justifi-dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading}))}static get watchers(){return{getDispute:["updateOnPropChange"]}}};export{o as justifi_dispute_management_core}
@@ -0,0 +1 @@
1
+ import{h as t}from"./p-2783e363.js";import{s as e}from"./p-e8cd9691.js";const s=({component:s="div",height:o,width:r,className:i,styles:a={}})=>{const c=Object.assign(Object.assign({},a),{width:r,height:o});return t(s,{class:`${i} skeleton`,style:c,part:e,"aria-hidden":"true"})};export{s as S}