@justifi/webcomponents 6.5.1-rc.3 → 6.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (668) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/{Api-BeSnjEuW.js → Api-QUTWjGTy.js} +1 -1
  3. package/dist/cjs/{GooglePay-40aEKdDF.js → Refund-BX0mjsAQ.js} +1 -447
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  5. package/dist/cjs/bank-account-document-form-inputs_8.cjs.entry.js +206 -0
  6. package/dist/cjs/bank-account-form.cjs.entry.js +3 -3
  7. package/dist/cjs/{business-additional-questions-schema-CE-z5qrr.js → business-additional-questions-schema-Y1mXnwUT.js} +1 -7
  8. package/dist/cjs/{business-identity-schema-rMMiHyPz.js → business-identity-schema-D_OO0Suf.js} +1 -1
  9. package/dist/cjs/{business.service-BggHdPOV.js → business.service-Dffp64u6.js} +2 -2
  10. package/dist/cjs/card-form.cjs.entry.js +3 -3
  11. package/dist/cjs/{check-pkg-version-DuPkU5qI.js → check-pkg-version-DZC7jOGP.js} +3 -3
  12. package/dist/cjs/{checkout.service-BUcIs9az.js → checkout.service-C1HcsrjQ.js} +2 -2
  13. package/dist/cjs/checkout.store-BA6h-dp2.js +107 -0
  14. package/dist/cjs/checkouts-list-core.cjs.entry.js +4 -5
  15. package/dist/cjs/{checkouts-table-2fOlhkc4.js → checkouts-table-Bgqkaez4.js} +1 -1
  16. package/dist/cjs/{custom-popper.cjs.entry.js → custom-popper_2.cjs.entry.js} +22 -2
  17. package/dist/cjs/{dispute.service-CxWqivLc.js → dispute.service-CJsWYMYk.js} +2 -2
  18. package/dist/cjs/form-alert_5.cjs.entry.js +6 -6
  19. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  20. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  21. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  22. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +2 -2
  23. package/dist/cjs/form-control-monetary.cjs.entry.js +3 -3
  24. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +4 -4
  25. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  26. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  27. package/dist/cjs/{form-control-select_3.cjs.entry.js → form-control-select_2.cjs.entry.js} +4 -23
  28. package/dist/cjs/{get-payment-details-D_dDxsPG.js → get-payment-details-BblcGN2B.js} +2 -2
  29. package/dist/cjs/{get-subaccounts-_D9lzD5O.js → get-subaccounts-z4dNQDjx.js} +3 -3
  30. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +2 -2
  31. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  32. package/dist/cjs/{index-CajjbB9t.js → index-C2ITzalN.js} +0 -1
  33. package/dist/cjs/index.cjs.js +1 -1
  34. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +26 -25
  35. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +860 -29
  36. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  37. package/dist/cjs/{justifi-apple-pay_8.cjs.entry.js → justifi-apple-pay_7.cjs.entry.js} +255 -1126
  38. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +3 -3
  39. package/dist/cjs/justifi-business-details.cjs.entry.js +6 -7
  40. package/dist/cjs/justifi-business-form.cjs.entry.js +9 -10
  41. package/dist/cjs/justifi-checkout.cjs.entry.js +17 -16
  42. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +10 -11
  43. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +10 -11
  44. package/dist/cjs/justifi-details.cjs.entry.js +1 -1
  45. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  46. package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -8
  47. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +10 -11
  48. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -6
  49. package/dist/cjs/justifi-order-terminals.cjs.entry.js +11 -12
  50. package/dist/cjs/justifi-payment-details.cjs.entry.js +7 -8
  51. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  52. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -8
  53. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +8 -9
  54. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +3 -3
  55. package/dist/cjs/justifi-payments-list.cjs.entry.js +9 -10
  56. package/dist/cjs/justifi-payout-details.cjs.entry.js +7 -8
  57. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +8 -9
  58. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -3
  59. package/dist/cjs/justifi-payouts-list.cjs.entry.js +10 -11
  60. package/dist/cjs/justifi-refund-payment.cjs.entry.js +11 -12
  61. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  62. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +10 -9
  63. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  64. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +12 -13
  65. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +8 -9
  66. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -9
  67. package/dist/cjs/justifi-terminals-list.cjs.entry.js +10 -11
  68. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{justifi-owner-form_3.cjs.entry.js → owner-form-core_2.cjs.entry.js} +5 -60
  71. package/dist/cjs/{package-C6nOTkVV.js → package-CkO7M9IQ.js} +1 -1
  72. package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
  73. package/dist/cjs/payment-details-core.cjs.entry.js +11 -12
  74. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  75. package/dist/cjs/{payment.service-wWZTmyFv.js → payment.service-BZatGHKc.js} +2 -2
  76. package/dist/cjs/payments-list-core.cjs.entry.js +4 -5
  77. package/dist/cjs/{payments-table-C6SCvqLD.js → payments-table-CaJt-yMH.js} +1 -1
  78. package/dist/cjs/payout-details-core.cjs.entry.js +4 -4
  79. package/dist/cjs/{payout.service-CWAem5VG.js → payout.service-DbgLWhwh.js} +2 -2
  80. package/dist/cjs/payouts-list-core.cjs.entry.js +4 -5
  81. package/dist/cjs/{payouts-table-CEnUtKNR.js → payouts-table-DZv0WnTS.js} +1 -1
  82. package/dist/cjs/{schema-validations-BOiGVUHM.js → schema-validations-Bf2mk2xU.js} +0 -16
  83. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  84. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +4 -5
  85. package/dist/cjs/{terminal-orders-table-DBNG4K5I.js → terminal-orders-table-F-ZFUBwH.js} +4 -4
  86. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  87. package/dist/cjs/{terminal.service-DSlqCGxE.js → terminal.service-KC8wBTJJ.js} +2 -2
  88. package/dist/cjs/terminals-list-core.cjs.entry.js +4 -5
  89. package/dist/cjs/{terminals-table-EeeLeuDN.js → terminals-table-D7sf_DBN.js} +1 -1
  90. package/dist/cjs/{utils-Bab-tddY.js → utils-D4WPxuzW.js} +0 -7
  91. package/dist/cjs/webcomponents.cjs.js +1 -1
  92. package/dist/collection/api/index.js +0 -2
  93. package/dist/collection/collection-manifest.json +1 -8
  94. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +6 -7
  95. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +2 -2
  96. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +7 -8
  97. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +6 -7
  98. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
  99. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
  100. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +7 -8
  101. package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
  102. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +132 -3
  103. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
  104. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs-canada.js +1 -1
  105. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  106. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-read-only-value.js +1 -1
  107. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +335 -3
  108. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-documents-on-file.js +2 -2
  109. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +133 -3
  110. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +186 -3
  111. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +2 -2
  112. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +129 -3
  113. package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +1 -1
  114. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
  115. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +122 -3
  116. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
  117. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
  118. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
  119. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
  120. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
  121. package/dist/collection/components/business-forms/schemas/business-additional-questions-schema.js +1 -7
  122. package/dist/collection/components/business-forms/schemas/schema-validations.js +1 -14
  123. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  124. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  125. package/dist/collection/components/checkout/checkout.js +2 -2
  126. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  127. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  128. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  129. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  130. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  131. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  132. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  133. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  134. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  135. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  136. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  137. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  138. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  139. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  140. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  141. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  142. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  143. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  144. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  145. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  146. package/dist/collection/components/modular-checkout/ModularCheckout.js +0 -1
  147. package/dist/collection/components/modular-checkout/modular-checkout.js +9 -46
  148. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  149. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  150. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  151. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  152. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  153. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  154. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  155. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  156. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  157. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  158. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  159. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  160. package/dist/collection/components/payments-list/payments-list.js +1 -1
  161. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  162. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  163. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  164. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  165. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  166. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  167. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  168. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  169. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  170. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  171. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  172. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +4 -3
  173. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +10 -5
  174. package/dist/collection/store/checkout.store.js +0 -4
  175. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  176. package/dist/collection/ui-components/details/details.js +1 -1
  177. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  178. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  179. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  180. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  181. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  182. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  183. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  184. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  185. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  186. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  187. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  188. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  189. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  190. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
  191. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  192. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  193. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +1 -1
  194. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  195. package/dist/docs.json +2692 -4612
  196. package/dist/esm/{Api-DX-IWyBw.js → Api-Dln8a6No.js} +1 -1
  197. package/dist/esm/{GooglePay-f7mYX17c.js → Refund-DDWRtCuX.js} +2 -437
  198. package/dist/esm/additional-questions-details_5.entry.js +3 -3
  199. package/dist/esm/{badge-Bgosx-DC.js → badge-BWd10d-w.js} +1 -1
  200. package/dist/esm/bank-account-document-form-inputs_8.entry.js +197 -0
  201. package/dist/esm/bank-account-form.entry.js +5 -5
  202. package/dist/esm/{business-additional-questions-schema-QFJEOHF5.js → business-additional-questions-schema-woG5-pgK.js} +1 -7
  203. package/dist/esm/business-details-core.entry.js +3 -3
  204. package/dist/esm/{business-identity-schema-DB_Hhjld.js → business-identity-schema-B7VTDF4j.js} +2 -2
  205. package/dist/esm/{business.service-CzHfftZk.js → business.service-CmSijtcP.js} +2 -2
  206. package/dist/esm/{button-DBmjN7Ra.js → button-BDwVDLs-.js} +1 -1
  207. package/dist/esm/card-form.entry.js +5 -5
  208. package/dist/esm/{check-pkg-version-Cqb7EhvC.js → check-pkg-version-B83yUQEx.js} +3 -3
  209. package/dist/esm/{checkout.service-BWdnJLVG.js → checkout.service-E60GnrZv.js} +2 -2
  210. package/dist/esm/checkout.store-CaS_htQd.js +101 -0
  211. package/dist/esm/checkouts-list-core.entry.js +8 -9
  212. package/dist/esm/{checkouts-table-lgbZpF1o.js → checkouts-table-BVWL1wN9.js} +3 -3
  213. package/dist/esm/{custom-popper.entry.js → custom-popper_2.entry.js} +22 -3
  214. package/dist/esm/{dispute.service-CqX5HR5o.js → dispute.service-CAZJigrO.js} +2 -2
  215. package/dist/esm/form-alert_5.entry.js +7 -7
  216. package/dist/esm/form-control-checkbox.entry.js +5 -5
  217. package/dist/esm/form-control-date.entry.js +4 -4
  218. package/dist/esm/{form-control-error-text-B5LSdUXI.js → form-control-error-text-BYooqu0N.js} +1 -1
  219. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  220. package/dist/esm/{form-control-help-text-BK9RNOf-.js → form-control-help-text-CF1UA5Sl.js} +1 -1
  221. package/dist/esm/form-control-monetary-provisioning.entry.js +5 -5
  222. package/dist/esm/form-control-monetary.entry.js +6 -6
  223. package/dist/esm/form-control-number-masked_3.entry.js +6 -6
  224. package/dist/esm/form-control-number.entry.js +5 -5
  225. package/dist/esm/form-control-radio.entry.js +3 -3
  226. package/dist/esm/{form-control-select_3.entry.js → form-control-select_2.entry.js} +7 -25
  227. package/dist/esm/{get-payment-details-D0T7bd_-.js → get-payment-details-Dg5WRkOM.js} +1 -1
  228. package/dist/esm/{get-subaccounts-Gil-SOoF.js → get-subaccounts-CbxzednA.js} +2 -2
  229. package/dist/esm/gross-payment-chart-core.entry.js +5 -5
  230. package/dist/esm/{header-1-CPF3S2CC.js → header-1-CzkA4zNY.js} +1 -1
  231. package/dist/esm/{header-3-Cah707hu.js → header-3-eIE1RpMN.js} +1 -1
  232. package/dist/esm/hidden-input_2.entry.js +7 -7
  233. package/dist/esm/{index-DkoufM1t.js → index-DCIW8z1f.js} +0 -1
  234. package/dist/esm/index.js +1 -1
  235. package/dist/esm/{insurance-state-DRe0g_wf.js → insurance-state-By2QaBZo.js} +1 -1
  236. package/dist/esm/internal-tokenize-payment-method_7.entry.js +18 -17
  237. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +862 -31
  238. package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
  239. package/dist/esm/{justifi-apple-pay_8.entry.js → justifi-apple-pay_7.entry.js} +144 -1014
  240. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +5 -5
  241. package/dist/esm/justifi-business-details.entry.js +8 -9
  242. package/dist/esm/justifi-business-form.entry.js +13 -14
  243. package/dist/esm/justifi-checkout.entry.js +11 -10
  244. package/dist/esm/justifi-checkouts-list-filters.entry.js +4 -5
  245. package/dist/esm/justifi-checkouts-list.entry.js +11 -12
  246. package/dist/esm/justifi-details.entry.js +3 -3
  247. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  248. package/dist/esm/justifi-dispute-management.entry.js +7 -8
  249. package/dist/esm/justifi-dispute-notification_3.entry.js +13 -14
  250. package/dist/esm/justifi-gross-payment-chart.entry.js +7 -8
  251. package/dist/esm/justifi-order-terminals.entry.js +10 -11
  252. package/dist/esm/justifi-payment-details.entry.js +9 -10
  253. package/dist/esm/justifi-payment-provisioning-core.entry.js +3 -3
  254. package/dist/esm/justifi-payment-provisioning.entry.js +7 -8
  255. package/dist/esm/justifi-payment-transactions-list.entry.js +10 -11
  256. package/dist/esm/justifi-payments-list-filters.entry.js +4 -4
  257. package/dist/esm/justifi-payments-list.entry.js +11 -12
  258. package/dist/esm/justifi-payout-details.entry.js +8 -9
  259. package/dist/esm/justifi-payout-transactions-list.entry.js +10 -11
  260. package/dist/esm/justifi-payouts-list-filters.entry.js +4 -4
  261. package/dist/esm/justifi-payouts-list.entry.js +12 -13
  262. package/dist/esm/justifi-refund-payment.entry.js +10 -11
  263. package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
  264. package/dist/esm/justifi-season-interruption-insurance.entry.js +10 -9
  265. package/dist/esm/justifi-skeleton.entry.js +3 -3
  266. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +5 -6
  267. package/dist/esm/justifi-terminal-orders-list.entry.js +9 -10
  268. package/dist/esm/justifi-terminals-list-filters.entry.js +4 -5
  269. package/dist/esm/justifi-terminals-list.entry.js +11 -12
  270. package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
  271. package/dist/esm/loader.js +1 -1
  272. package/dist/esm/{justifi-owner-form_3.entry.js → owner-form-core_2.entry.js} +8 -62
  273. package/dist/esm/{package-CzedYX3W.js → package-CdVle3mx.js} +1 -1
  274. package/dist/esm/pagination-menu.entry.js +4 -4
  275. package/dist/esm/{parts-wtuY7MT2.js → parts-QmGrQis7.js} +1 -1
  276. package/dist/esm/payment-details-core.entry.js +15 -16
  277. package/dist/esm/payment-method-option.entry.js +2 -2
  278. package/dist/esm/{payment.service-CWyZF34P.js → payment.service-CWc5BPv-.js} +2 -2
  279. package/dist/esm/payments-list-core.entry.js +9 -10
  280. package/dist/esm/{payments-status-Dypl6WFL.js → payments-status-BdCVusHE.js} +1 -1
  281. package/dist/esm/{payments-table-CK9BRZEz.js → payments-table-9rC3BvV0.js} +3 -3
  282. package/dist/esm/payout-details-core.entry.js +10 -10
  283. package/dist/esm/{payout.service-CkTievFG.js → payout.service-iBVqRzf_.js} +2 -2
  284. package/dist/esm/payouts-list-core.entry.js +9 -10
  285. package/dist/esm/{payouts-status-hTCBgpLW.js → payouts-status-DhowllYh.js} +1 -1
  286. package/dist/esm/{payouts-table-Dd8IDBBX.js → payouts-table-Ci_J6mmU.js} +3 -3
  287. package/dist/esm/{schema-validations-B5sfox_4.js → schema-validations-iamDi5JD.js} +2 -15
  288. package/dist/esm/{skeleton-BmRZRW5K.js → skeleton-BX70wCwq.js} +1 -1
  289. package/dist/esm/{spinner-tU4D9iak.js → spinner-CcDNFgNu.js} +1 -1
  290. package/dist/esm/{table-Cjq1A6mO.js → table-KZoMaoUh.js} +2 -2
  291. package/dist/esm/table-filters-menu.entry.js +3 -3
  292. package/dist/esm/terminal-orders-list-core.entry.js +8 -9
  293. package/dist/esm/{terminal-orders-table-OX3ZvzZy.js → terminal-orders-table-BGiWS5cM.js} +4 -4
  294. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  295. package/dist/esm/{terminal.service-Bu5-dhum.js → terminal.service-CxSKhtwB.js} +2 -2
  296. package/dist/esm/terminals-list-core.entry.js +8 -9
  297. package/dist/esm/{terminals-table-D9okETJr.js → terminals-table-DROFEdyn.js} +3 -3
  298. package/dist/esm/{utils-BX7Rjm1M.js → utils-C1PX_3uA.js} +1 -1
  299. package/dist/esm/{utils-CIaHqjQt.js → utils-CDaVtz_6.js} +1 -7
  300. package/dist/esm/webcomponents.js +1 -1
  301. package/dist/module/Analytics.js +0 -2
  302. package/dist/module/ModularCheckout.js +0 -1
  303. package/dist/module/additional-questions.js +2 -2
  304. package/dist/module/additional-statement.js +1 -1
  305. package/dist/module/apple-pay.js +120 -1
  306. package/dist/module/bank-account-billing-form-simple.js +1 -1
  307. package/dist/module/bank-account-document-inputs.js +1 -3
  308. package/dist/module/bank-account-form-inputs-canada2.js +1 -1
  309. package/dist/module/bank-account-form-inputs2.js +1 -1
  310. package/dist/module/bank-account-form.js +3 -3
  311. package/dist/module/bank-account-read-only-value2.js +1 -1
  312. package/dist/module/bank-account.js +2 -2
  313. package/dist/module/business-additional-questions-form-step.js +107 -20
  314. package/dist/module/business-additional-questions-schema.js +1 -7
  315. package/dist/module/business-address-schema.js +1 -1
  316. package/dist/module/business-bank-account-form-step.js +443 -35
  317. package/dist/module/business-core-info-form-step.js +108 -20
  318. package/dist/module/business-core-info-schema.js +1 -1
  319. package/dist/module/business-core-info.js +2 -2
  320. package/dist/module/business-documents-on-file2.js +2 -2
  321. package/dist/module/business-identity-schema.js +1 -1
  322. package/dist/module/business-owners-form-step.js +137 -23
  323. package/dist/module/business-representative-form-inputs.js +2 -2
  324. package/dist/module/business-representative-form-step.js +106 -22
  325. package/dist/module/business-representative.js +3 -3
  326. package/dist/module/business-terms-conditions-form-step.js +1 -3
  327. package/dist/module/business.service.js +0 -2
  328. package/dist/module/cancellation-policy.js +1 -1
  329. package/dist/module/card-billing-form-simple.js +1 -1
  330. package/dist/module/card-form.js +3 -3
  331. package/dist/module/card-form2.js +2 -2
  332. package/dist/module/checkout.service.js +0 -2
  333. package/dist/module/checkout.store.js +0 -4
  334. package/dist/module/checkouts-list-core2.js +2 -4
  335. package/dist/module/custom-popper2.js +2 -2
  336. package/dist/module/customer-details.js +1 -1
  337. package/dist/module/details.js +1 -1
  338. package/dist/module/dispute-management-core.js +1 -1
  339. package/dist/module/dispute-notification.js +2 -2
  340. package/dist/module/dispute-response-actions.js +0 -2
  341. package/dist/module/dispute-response-core.js +1 -1
  342. package/dist/module/dispute-response.js +1 -1
  343. package/dist/module/duplicate-charge.js +1 -1
  344. package/dist/module/electronic-evidence.js +1 -1
  345. package/dist/module/form-address-fields.js +1 -1
  346. package/dist/module/form-control-checkbox2.js +2 -2
  347. package/dist/module/form-control-date2.js +2 -2
  348. package/dist/module/form-control-file-v22.js +1 -1
  349. package/dist/module/form-control-file2.js +2 -2
  350. package/dist/module/form-control-monetary-provisioning2.js +2 -2
  351. package/dist/module/form-control-monetary2.js +2 -2
  352. package/dist/module/form-control-number-masked2.js +2 -2
  353. package/dist/module/form-control-number.js +2 -2
  354. package/dist/module/form-control-radio2.js +2 -2
  355. package/dist/module/form-control-select2.js +2 -2
  356. package/dist/module/form-control-text2.js +2 -2
  357. package/dist/module/form-control-textarea2.js +2 -2
  358. package/dist/module/get-payment-details.js +0 -2
  359. package/dist/module/get-subaccounts.js +0 -2
  360. package/dist/module/gross-payment-chart-core2.js +2 -2
  361. package/dist/module/hidden-input2.js +1 -1
  362. package/dist/module/identity-address-form.js +1 -1
  363. package/dist/module/iframe-input2.js +3 -3
  364. package/dist/module/internal-tokenize-payment-method2.js +1 -3
  365. package/dist/module/justifi-business-form.js +0 -2
  366. package/dist/module/justifi-button2.js +1 -1
  367. package/dist/module/justifi-checkout.js +40 -46
  368. package/dist/module/justifi-checkouts-list-filters.js +1 -3
  369. package/dist/module/justifi-checkouts-list.js +1 -3
  370. package/dist/module/justifi-dispute-management.js +1 -1
  371. package/dist/module/justifi-gross-payment-chart.js +0 -2
  372. package/dist/module/justifi-header2.js +1 -1
  373. package/dist/module/justifi-order-terminals.js +2 -4
  374. package/dist/module/justifi-payment-provisioning.js +49 -87
  375. package/dist/module/justifi-payment-transactions-list.js +2 -4
  376. package/dist/module/justifi-payments-list-filters.js +3 -3
  377. package/dist/module/justifi-payments-list.js +1 -3
  378. package/dist/module/justifi-payout-details.js +0 -2
  379. package/dist/module/justifi-payout-transactions-list.js +2 -4
  380. package/dist/module/justifi-payouts-list-filters.js +3 -3
  381. package/dist/module/justifi-payouts-list.js +1 -3
  382. package/dist/module/justifi-radio-list-item2.js +1 -1
  383. package/dist/module/justifi-refund-payment.js +0 -2
  384. package/dist/module/justifi-saved-payment-method.js +1 -1
  385. package/dist/module/justifi-season-interruption-insurance.js +1 -3
  386. package/dist/module/justifi-skeleton.js +1 -1
  387. package/dist/module/justifi-terminal-orders-list-filters.js +3 -5
  388. package/dist/module/justifi-terminal-orders-list.js +1 -3
  389. package/dist/module/justifi-terminals-list-filters.js +1 -3
  390. package/dist/module/justifi-terminals-list.js +1 -3
  391. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  392. package/dist/module/legal-address-form-step.js +95 -18
  393. package/dist/module/legal-address-form.js +2 -2
  394. package/dist/module/modular-checkout.js +6 -46
  395. package/dist/module/owner-form-core2.js +1 -1
  396. package/dist/module/owner-form-inputs2.js +3 -3
  397. package/dist/module/owner-form.js +2 -2
  398. package/dist/module/package.js +1 -1
  399. package/dist/module/pagination-menu2.js +3 -3
  400. package/dist/module/payment-details-core2.js +9 -11
  401. package/dist/module/payment-method-option.js +1 -1
  402. package/dist/module/payment-provisioning-actions.js +1 -1
  403. package/dist/module/payment-provisioning-core.js +49 -85
  404. package/dist/module/payment-provisioning-form-buttons.js +1 -1
  405. package/dist/module/payment-provisioning-form-steps.js +49 -85
  406. package/dist/module/payment.service.js +0 -2
  407. package/dist/module/payments-list-core2.js +2 -4
  408. package/dist/module/payout-details-core2.js +4 -4
  409. package/dist/module/payout.service.js +0 -2
  410. package/dist/module/payouts-list-core2.js +2 -4
  411. package/dist/module/plaid.service.js +0 -2
  412. package/dist/module/product-or-service.js +1 -1
  413. package/dist/module/refund-policy.js +1 -1
  414. package/dist/module/save-new-payment-method.js +1 -1
  415. package/dist/module/schema-validations.js +2 -15
  416. package/dist/module/shipping-details.js +1 -1
  417. package/dist/module/summary.js +1 -1
  418. package/dist/module/table-filters-menu2.js +1 -1
  419. package/dist/module/terminal-orders-list-core2.js +2 -4
  420. package/dist/module/terminal-quantity-selector2.js +1 -1
  421. package/dist/module/terminal.service.js +0 -2
  422. package/dist/module/terminals-list-core2.js +2 -4
  423. package/dist/module/utils2.js +1 -7
  424. package/dist/types/api/Checkout.d.ts +0 -2
  425. package/dist/types/api/index.d.ts +0 -2
  426. package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.d.ts +26 -2
  427. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +42 -2
  428. package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.d.ts +25 -2
  429. package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.d.ts +21 -2
  430. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +37 -2
  431. package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.d.ts +24 -2
  432. package/dist/types/components/business-forms/schemas/business-additional-questions-schema.d.ts +0 -6
  433. package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -21
  434. package/dist/types/components/business-forms/schemas/schema-validations.d.ts +0 -3
  435. package/dist/types/components/checkout/checkout.d.ts +0 -1
  436. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +1 -2
  437. package/dist/types/components/modular-checkout/modular-checkout.d.ts +0 -5
  438. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +1 -1
  439. package/dist/types/components.d.ts +48 -422
  440. package/dist/types/store/checkout.store.d.ts +0 -1
  441. package/dist/webcomponents/index.esm.js +1 -1
  442. package/dist/webcomponents/p-0867547d.entry.js +1 -0
  443. package/dist/webcomponents/p-091d6a7e.entry.js +1 -0
  444. package/dist/webcomponents/p-0d4bea62.entry.js +1 -0
  445. package/dist/webcomponents/{p-86111a0a.entry.js → p-0eb7abed.entry.js} +1 -1
  446. package/dist/webcomponents/p-1634262a.entry.js +1 -0
  447. package/dist/webcomponents/p-1a4d0ad6.entry.js +1 -0
  448. package/dist/webcomponents/p-25e3cb85.entry.js +1 -0
  449. package/dist/webcomponents/{p-03c8c754.entry.js → p-278988e8.entry.js} +1 -1
  450. package/dist/webcomponents/p-3482ab40.entry.js +1 -0
  451. package/dist/webcomponents/p-3b5a9e94.entry.js +1 -0
  452. package/dist/webcomponents/p-44efe4ca.entry.js +1 -0
  453. package/dist/webcomponents/p-49a0ef9d.entry.js +1 -0
  454. package/dist/webcomponents/p-4bff1285.entry.js +1 -0
  455. package/dist/webcomponents/p-4d87be74.entry.js +1 -0
  456. package/dist/webcomponents/{p-4e71de94.entry.js → p-50308873.entry.js} +1 -1
  457. package/dist/webcomponents/p-51107c8f.entry.js +1 -0
  458. package/dist/webcomponents/p-51d7b9f7.entry.js +1 -0
  459. package/dist/webcomponents/p-5490e39c.entry.js +1 -0
  460. package/dist/webcomponents/p-5c60ba00.entry.js +1 -0
  461. package/dist/webcomponents/p-5d56a293.entry.js +1 -0
  462. package/dist/webcomponents/p-654d91d7.entry.js +1 -0
  463. package/dist/webcomponents/p-68c2ce90.entry.js +1 -0
  464. package/dist/webcomponents/{p-e6507b93.entry.js → p-69b0be17.entry.js} +1 -1
  465. package/dist/webcomponents/p-6e99cd4c.entry.js +1 -0
  466. package/dist/webcomponents/p-7e4bfba1.entry.js +1 -0
  467. package/dist/webcomponents/{p-0ce046fd.entry.js → p-8740871d.entry.js} +1 -1
  468. package/dist/webcomponents/p-87d23cf8.entry.js +1 -0
  469. package/dist/webcomponents/p-9065f077.entry.js +1 -0
  470. package/dist/webcomponents/p-908f6b79.entry.js +1 -0
  471. package/dist/webcomponents/p-93d98b07.entry.js +1 -0
  472. package/dist/webcomponents/p-94b2d6a1.entry.js +1 -0
  473. package/dist/webcomponents/p-980db13b.entry.js +1 -0
  474. package/dist/webcomponents/{p-fe862786.entry.js → p-99c1059c.entry.js} +1 -1
  475. package/dist/webcomponents/p-9c7c60f3.entry.js +1 -0
  476. package/dist/webcomponents/{p-BS7OgSQe.js → p-B09GVew-.js} +1 -1
  477. package/dist/webcomponents/p-B10U2_Sw.js +1 -0
  478. package/dist/webcomponents/{p-aZ8YkDMZ.js → p-B69TWr1K.js} +1 -1
  479. package/dist/webcomponents/{p-CkN7DFFn.js → p-BDRSfgZJ.js} +1 -1
  480. package/dist/webcomponents/{p-KPmnq8xf.js → p-BIzMmHpn.js} +1 -1
  481. package/dist/webcomponents/p-BqXh8qSb.js +1 -0
  482. package/dist/webcomponents/p-C0FpWzgU.js +1 -0
  483. package/dist/webcomponents/{p-CPRPR6fJ.js → p-CA9okQxT.js} +1 -1
  484. package/dist/webcomponents/{p-BNqo3kt0.js → p-CJ4viNrp.js} +1 -1
  485. package/dist/webcomponents/p-CMTxbXEr.js +1 -0
  486. package/dist/webcomponents/{p-DOLBAxYf.js → p-CYz0Hubu.js} +1 -1
  487. package/dist/webcomponents/p-CdVle3mx.js +1 -0
  488. package/dist/webcomponents/p-CiMKKjGV.js +1 -0
  489. package/dist/webcomponents/p-CjfgyxBN.js +1 -0
  490. package/dist/webcomponents/p-CjxyejYl.js +1 -0
  491. package/dist/webcomponents/p-CpP3EZBK.js +1 -0
  492. package/dist/webcomponents/p-D032AB34.js +1 -0
  493. package/dist/webcomponents/p-DCIW8z1f.js +1 -0
  494. package/dist/webcomponents/{p-D1WQG4I7.js → p-DOcRWTul.js} +1 -1
  495. package/dist/webcomponents/p-DQKNMVh7.js +1 -0
  496. package/dist/webcomponents/p-DU8dqq9U.js +1 -0
  497. package/dist/webcomponents/{p-bolTb61p.js → p-DUQxAYW4.js} +1 -1
  498. package/dist/webcomponents/{p-B4W3my_D.js → p-DcHTywGe.js} +1 -1
  499. package/dist/webcomponents/{p-TKWqvm_A.js → p-DircQtPA.js} +1 -1
  500. package/dist/webcomponents/p-Dp2W4Eq3.js +1 -0
  501. package/dist/webcomponents/p-E8uzhk39.js +1 -0
  502. package/dist/webcomponents/p-GenVH2BR.js +1 -0
  503. package/dist/webcomponents/{p-DeX_cIoV.js → p-H_emngUs.js} +1 -1
  504. package/dist/webcomponents/p-InCWAej0.js +1 -0
  505. package/dist/webcomponents/{p-BydKIJVC.js → p-KS3Bf_2D.js} +1 -1
  506. package/dist/webcomponents/{p-DXnwIxTB.js → p-MFnmyvti.js} +1 -1
  507. package/dist/webcomponents/{p-wtuY7MT2.js → p-QmGrQis7.js} +1 -1
  508. package/dist/webcomponents/{p-DkOiS6Zr.js → p-Qmo430x1.js} +1 -1
  509. package/dist/webcomponents/p-VodztElu.js +1 -0
  510. package/dist/webcomponents/p-a4a647bd.entry.js +1 -0
  511. package/dist/webcomponents/p-abcbfb22.entry.js +1 -0
  512. package/dist/webcomponents/p-af29e819.entry.js +1 -0
  513. package/dist/webcomponents/p-b31bf32a.entry.js +1 -0
  514. package/dist/webcomponents/{p-3bacf834.entry.js → p-b6286d7b.entry.js} +1 -1
  515. package/dist/webcomponents/p-b8c816fe.entry.js +1 -0
  516. package/dist/webcomponents/p-bcec4201.entry.js +1 -0
  517. package/dist/webcomponents/{p-f2650bfc.entry.js → p-c3a625ec.entry.js} +4 -4
  518. package/dist/webcomponents/p-c6ee5aa7.entry.js +1 -0
  519. package/dist/webcomponents/{p-c8f40375.entry.js → p-c8bd7e0d.entry.js} +1 -1
  520. package/dist/webcomponents/p-c900ccca.entry.js +1 -0
  521. package/dist/webcomponents/{p-f528da70.entry.js → p-c9920e22.entry.js} +1 -1
  522. package/dist/webcomponents/p-ca3733e5.entry.js +1 -0
  523. package/dist/webcomponents/p-cb61af93.entry.js +1 -0
  524. package/dist/webcomponents/p-d29ce58e.entry.js +1 -0
  525. package/dist/webcomponents/p-d34f5a20.entry.js +1 -0
  526. package/dist/webcomponents/p-d41ad7a8.entry.js +1 -0
  527. package/dist/webcomponents/{p-a22d1078.entry.js → p-d79f9a54.entry.js} +1 -1
  528. package/dist/webcomponents/p-d8ec7cfc.entry.js +1 -0
  529. package/dist/webcomponents/p-dd0c456f.entry.js +1 -0
  530. package/dist/webcomponents/p-dda50611.entry.js +1 -0
  531. package/dist/webcomponents/p-df7e2530.entry.js +1 -0
  532. package/dist/webcomponents/p-e4a43e31.entry.js +1 -0
  533. package/dist/webcomponents/{p-aaed4997.entry.js → p-ea75759b.entry.js} +1 -1
  534. package/dist/webcomponents/p-edcb6de1.entry.js +1 -0
  535. package/dist/webcomponents/p-faaba66d.entry.js +1 -0
  536. package/dist/webcomponents/p-fc680b08.entry.js +1 -0
  537. package/dist/webcomponents/p-fcaaed23.entry.js +1 -0
  538. package/dist/webcomponents/{p-88074dd7.entry.js → p-fdcb24aa.entry.js} +1 -1
  539. package/dist/webcomponents/p-fefc4dea.entry.js +1 -0
  540. package/dist/webcomponents/p-ff1bc3de.entry.js +1 -0
  541. package/dist/webcomponents/{p-BTzt8N0l.js → p-gcRtE71H.js} +1 -1
  542. package/dist/webcomponents/p-giyZ3C4E.js +1 -0
  543. package/dist/webcomponents/{p-C8yN3uBj.js → p-yyedWKWX.js} +1 -1
  544. package/dist/webcomponents/webcomponents.esm.js +1 -1
  545. package/package.json +13 -13
  546. package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +0 -133
  547. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +0 -875
  548. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +0 -34
  549. package/dist/collection/api/GooglePay.js +0 -212
  550. package/dist/collection/api/services/google-pay.service.js +0 -368
  551. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +0 -265
  552. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.js +0 -466
  553. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +0 -307
  554. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +0 -380
  555. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +0 -270
  556. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +0 -276
  557. package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +0 -10
  558. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +0 -706
  559. package/dist/collection/ui-components/google-pay-button.js +0 -251
  560. package/dist/esm/bank-account-document-form-inputs_6.entry.js +0 -126
  561. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +0 -868
  562. package/dist/esm/justifi-business-representative-form-inputs.entry.js +0 -32
  563. package/dist/module/ApplePay.js +0 -121
  564. package/dist/module/GooglePay.js +0 -215
  565. package/dist/module/business-additional-questions-form-step-core.js +0 -167
  566. package/dist/module/business-bank-account-form-step-core.js +0 -458
  567. package/dist/module/business-core-info-form-step-core.js +0 -173
  568. package/dist/module/business-owners-form-step-core.js +0 -231
  569. package/dist/module/business-representative-form-step-core.js +0 -171
  570. package/dist/module/google-pay.js +0 -1006
  571. package/dist/module/justifi-additional-questions-form-step-core.d.ts +0 -11
  572. package/dist/module/justifi-additional-questions-form-step-core.js +0 -6
  573. package/dist/module/justifi-business-bank-account-form-step-core.d.ts +0 -11
  574. package/dist/module/justifi-business-bank-account-form-step-core.js +0 -6
  575. package/dist/module/justifi-business-core-info-form-step-core.d.ts +0 -11
  576. package/dist/module/justifi-business-core-info-form-step-core.js +0 -6
  577. package/dist/module/justifi-business-owners-form-step-core.d.ts +0 -11
  578. package/dist/module/justifi-business-owners-form-step-core.js +0 -6
  579. package/dist/module/justifi-business-representative-form-step-core.d.ts +0 -11
  580. package/dist/module/justifi-business-representative-form-step-core.js +0 -6
  581. package/dist/module/justifi-google-pay.d.ts +0 -11
  582. package/dist/module/justifi-google-pay.js +0 -6
  583. package/dist/module/justifi-legal-address-form-step-core.d.ts +0 -11
  584. package/dist/module/justifi-legal-address-form-step-core.js +0 -6
  585. package/dist/module/legal-address-form-step-core.js +0 -154
  586. package/dist/types/api/GooglePay.d.ts +0 -271
  587. package/dist/types/api/services/google-pay.service.d.ts +0 -60
  588. package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.d.ts +0 -38
  589. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step-core.d.ts +0 -52
  590. package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +0 -40
  591. package/dist/types/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.d.ts +0 -37
  592. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +0 -50
  593. package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +0 -38
  594. package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +0 -6
  595. package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +0 -59
  596. package/dist/types/ui-components/google-pay-button.d.ts +0 -18
  597. package/dist/webcomponents/p-0437c330.entry.js +0 -1
  598. package/dist/webcomponents/p-065b24c3.entry.js +0 -1
  599. package/dist/webcomponents/p-0772719b.entry.js +0 -1
  600. package/dist/webcomponents/p-136b29e3.entry.js +0 -1
  601. package/dist/webcomponents/p-14cbf366.entry.js +0 -1
  602. package/dist/webcomponents/p-19dabeab.entry.js +0 -1
  603. package/dist/webcomponents/p-1e014ee7.entry.js +0 -1
  604. package/dist/webcomponents/p-1f196690.entry.js +0 -1
  605. package/dist/webcomponents/p-20e66fc0.entry.js +0 -1
  606. package/dist/webcomponents/p-22fdf7a4.entry.js +0 -1
  607. package/dist/webcomponents/p-25755af4.entry.js +0 -1
  608. package/dist/webcomponents/p-270bf699.entry.js +0 -1
  609. package/dist/webcomponents/p-2da4e6ca.entry.js +0 -1
  610. package/dist/webcomponents/p-2eb123a3.entry.js +0 -1
  611. package/dist/webcomponents/p-3ae12b98.entry.js +0 -1
  612. package/dist/webcomponents/p-3d3a65ca.entry.js +0 -1
  613. package/dist/webcomponents/p-3f291e6b.entry.js +0 -1
  614. package/dist/webcomponents/p-44011a41.entry.js +0 -1
  615. package/dist/webcomponents/p-48d1bc83.entry.js +0 -1
  616. package/dist/webcomponents/p-4ccd753b.entry.js +0 -1
  617. package/dist/webcomponents/p-4f102cfd.entry.js +0 -1
  618. package/dist/webcomponents/p-4f16a3ce.entry.js +0 -1
  619. package/dist/webcomponents/p-50a32503.entry.js +0 -1
  620. package/dist/webcomponents/p-57ed105e.entry.js +0 -1
  621. package/dist/webcomponents/p-5e3bc1dc.entry.js +0 -1
  622. package/dist/webcomponents/p-62cfe9b6.entry.js +0 -1
  623. package/dist/webcomponents/p-6a075da4.entry.js +0 -1
  624. package/dist/webcomponents/p-8b6b7e20.entry.js +0 -1
  625. package/dist/webcomponents/p-8c16e4aa.entry.js +0 -1
  626. package/dist/webcomponents/p-8ee61443.entry.js +0 -1
  627. package/dist/webcomponents/p-8efea1e4.entry.js +0 -1
  628. package/dist/webcomponents/p-8fcd277c.entry.js +0 -1
  629. package/dist/webcomponents/p-914b590d.entry.js +0 -1
  630. package/dist/webcomponents/p-A2FbmAEt.js +0 -1
  631. package/dist/webcomponents/p-B-0a8Xqm.js +0 -1
  632. package/dist/webcomponents/p-BitGlMSc.js +0 -1
  633. package/dist/webcomponents/p-Bli6WznP.js +0 -1
  634. package/dist/webcomponents/p-Bqlcv3ZV.js +0 -1
  635. package/dist/webcomponents/p-BrazW3nF.js +0 -1
  636. package/dist/webcomponents/p-BuCKkdLM.js +0 -1
  637. package/dist/webcomponents/p-C-2kW6Al.js +0 -1
  638. package/dist/webcomponents/p-CIOILVyM.js +0 -1
  639. package/dist/webcomponents/p-CzedYX3W.js +0 -1
  640. package/dist/webcomponents/p-DUs94fK3.js +0 -1
  641. package/dist/webcomponents/p-DkoufM1t.js +0 -1
  642. package/dist/webcomponents/p-Yp5v6wmS.js +0 -1
  643. package/dist/webcomponents/p-a020c889.entry.js +0 -1
  644. package/dist/webcomponents/p-a6e816f6.entry.js +0 -1
  645. package/dist/webcomponents/p-aa42e3c1.entry.js +0 -1
  646. package/dist/webcomponents/p-ad0f8d85.entry.js +0 -1
  647. package/dist/webcomponents/p-ad9307c1.entry.js +0 -1
  648. package/dist/webcomponents/p-avgjSJ1d.js +0 -1
  649. package/dist/webcomponents/p-b8c47cb1.entry.js +0 -1
  650. package/dist/webcomponents/p-c11e6c03.entry.js +0 -1
  651. package/dist/webcomponents/p-c41191e7.entry.js +0 -1
  652. package/dist/webcomponents/p-c5af7149.entry.js +0 -1
  653. package/dist/webcomponents/p-c621e7af.entry.js +0 -1
  654. package/dist/webcomponents/p-c7MCfTgE.js +0 -1
  655. package/dist/webcomponents/p-c7df4370.entry.js +0 -1
  656. package/dist/webcomponents/p-cf9d8e1a.entry.js +0 -1
  657. package/dist/webcomponents/p-d3663663.entry.js +0 -1
  658. package/dist/webcomponents/p-daedfe82.entry.js +0 -1
  659. package/dist/webcomponents/p-dd11e67b.entry.js +0 -1
  660. package/dist/webcomponents/p-dgG_o6wN.js +0 -1
  661. package/dist/webcomponents/p-e3ab5fe2.entry.js +0 -1
  662. package/dist/webcomponents/p-e7e5fee9.entry.js +0 -1
  663. package/dist/webcomponents/p-e95e27af.entry.js +0 -1
  664. package/dist/webcomponents/p-f4cb581f.entry.js +0 -1
  665. package/dist/webcomponents/p-f66778b8.entry.js +0 -1
  666. package/dist/webcomponents/p-ff212635.entry.js +0 -1
  667. package/dist/webcomponents/p-nrZ9yHcl.js +0 -1
  668. package/dist/webcomponents/p-zNSPsvs3.js +0 -1
@@ -1 +0,0 @@
1
- import{h as e,r as t,c as i,H as n,g as o}from"./p-DwYM91AU.js";import{A as s}from"./p-C8yN3uBj.js";import{A as a,o as r,p as l,q as c,r as h,s as d,c as y,t as p,G as u,u as g,v as m,w as v,x as b,y as f,z as P,B as M,D as k,I as w,F as S,H as C}from"./p-BrazW3nF.js";import{S as A}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as x}from"./p-c7MCfTgE.js";import{D as E,r as j}from"./p-wtuY7MT2.js";import{f as T}from"./p-BS7OgSQe.js";import{P as I,a as D,b as N}from"./p-DkoufM1t.js";import{H as G}from"./p-zNSPsvs3.js";import{H as z,b as L,h as R,i as O}from"./p-nrZ9yHcl.js";import{H as _}from"./p-C-2kW6Al.js";import{J as U,c as B}from"./p-DXnwIxTB.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as Y,a as F,b as q}from"./p-Cjcsf8ku.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as V,a as Q}from"./p-D2muobcE.js";import{C as H}from"./p-DUs94fK3.js";import{C as W}from"./p-ZpPDShvP.js";import"./p-BYsgavgS.js";import"./p-CzedYX3W.js";var Z;!function(e){e.UNAVAILABLE="UNAVAILABLE",e.SESSION_ERROR="SESSION_ERROR",e.MERCHANT_VALIDATION_ERROR="MERCHANT_VALIDATION_ERROR",e.PAYMENT_PROCESSING_ERROR="PAYMENT_PROCESSING_ERROR",e.USER_CANCELLED="USER_CANCELLED"}(Z||(Z={}));class J{constructor(){this.api=s()}initialize(e){if(this.applePayConfig=new a(e),!this.applePayConfig.isValid)throw new Error("Invalid Apple Pay configuration provided")}async validateMerchant(e,t){try{return await this.api.post({endpoint:"apple_pay/merchant_session",authToken:e,headers:{"Sub-Account":t},body:{domain:window.location.host,display_name:this.applePayConfig.displayName}})}catch(e){throw console.error("Backend validation failed:",e),new Error("Merchant validation failed")}}async processPayment(e,t,i){const n=await this.api.post({endpoint:"apple_pay/process_token",authToken:e,body:i,headers:{"Sub-Account":t}});return{success:n.id&&!!n.data.token,data:n}}isAvailable(){return r.isApplePaySupported()&&r.canMakePayments()}async canMakePaymentsWithActiveCard(){if(!this.applePayConfig)throw new Error("Apple Pay not initialized. Call initialize() first.");return await r.canMakePaymentsWithActiveCard(this.applePayConfig.merchantIdentifier)}async startPaymentSession(e,t,i){if(!this.applePayConfig)throw console.error("[ApplePayService] Missing applePayConfig. Did you call initialize()?"),new Error("Apple Pay not initialized. Call initialize() first.");const n=new l(e);if(!n.isValid){const e=[];throw n.countryCode||e.push("countryCode"),n.currencyCode||e.push("currencyCode"),n.merchantCapabilities&&0!==n.merchantCapabilities.length||e.push("merchantCapabilities"),n.supportedNetworks&&0!==n.supportedNetworks.length||e.push("supportedNetworks"),n.total&&n.total.label&&n.total.amount||e.push("total"),console.error("[ApplePayService] Payment request is invalid. Missing/invalid:",e),new Error("Invalid payment request provided")}return this.currentPaymentRequest=n,new Promise(((e,o)=>{try{if("undefined"==typeof window||!("ApplePaySession"in window))return console.error("[ApplePayService] ApplePaySession not available on window"),o({success:!1,error:{code:Z.UNAVAILABLE,message:"ApplePaySession API is not available in this environment"}});this.currentSession=new window.ApplePaySession(3,n),this.setupSessionEventHandlers(e,o,t,i),this.currentSession.begin()}catch(e){console.error("[ApplePayService] Exception while starting session:",e),o({success:!1,error:{code:Z.SESSION_ERROR,message:e instanceof Error?e.message:"Failed to start Apple Pay session"}})}}))}abortPaymentSession(){this.currentSession&&(this.currentSession.abort(),this.currentSession=void 0,this.currentPaymentRequest=void 0)}setupSessionEventHandlers(e,t,i,n){this.currentSession&&this.applePayConfig&&this.currentPaymentRequest?(this.currentSession.onvalidatemerchant=async()=>{try{if(!i)throw console.error("[ApplePayService] Missing authToken for merchant validation"),new Error("Authentication token not provided.");const e=await this.validateMerchant(i,n);try{this.currentSession.completeMerchantValidation(e)}catch(e){throw console.error("Error calling completeMerchantValidation:",e),e}}catch(e){console.error("=== MERCHANT VALIDATION ERROR ==="),console.error("Error during merchant validation:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.abort(),t({success:!1,error:{code:Z.MERCHANT_VALIDATION_ERROR,message:e instanceof Error?e.message:"Merchant validation failed"}})}},this.currentSession.onpaymentauthorized=async o=>{try{const s=o.payment,a=Object.assign(Object.assign({},s.token),{product_details:{name:this.currentPaymentRequest.total.label,price:r.parseAmount(this.currentPaymentRequest.total.amount),description:this.currentPaymentRequest.total.label}}),l=await this.processPayment(i,n,a);l.success?(this.currentSession.completePayment({status:c.STATUS_SUCCESS}),e({success:!0,token:s.token,paymentMethodId:l.data.id})):(console.error("PSP reported payment failure:",l.data),this.currentSession.completePayment({status:c.STATUS_FAILURE}),t({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:"Payment processing failed"}}))}catch(e){console.error("=== PAYMENT PROCESSING ERROR ==="),console.error("Error processing payment:",e),e&&e.stack&&console.error("Error stack:",e.stack),this.currentSession.completePayment({status:c.STATUS_FAILURE}),t({success:!1,error:{code:Z.PAYMENT_PROCESSING_ERROR,message:e instanceof Error?e.message:"Payment processing failed"}})}finally{this.currentSession=void 0,this.currentPaymentRequest=void 0}},this.currentSession.onpaymentmethodselected=()=>{const e={newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]};try{this.currentSession.completePaymentMethodSelection(e)}catch(e){console.error("Error completing payment method selection:",e),this.currentSession.abort()}},this.currentSession.onshippingmethodselected=()=>{this.currentSession.completeShippingMethodSelection({status:c.STATUS_SUCCESS,newTotal:this.currentPaymentRequest.total,newLineItems:this.currentPaymentRequest.lineItems||[]})},this.currentSession.oncancel=e=>{if(e.sessionError)switch(console.error(e.sessionError),e.sessionError.code){case"unknown":console.error("Unknown error - likely merchant validation issue"),console.error("This usually means:"),console.error("1. Merchant certificate is invalid or expired"),console.error("2. Merchant identifier mismatch"),console.error("3. Backend validation endpoint issues");break;case"invalidMerchantSession":console.error("Invalid merchant session provided"),console.error("Check that the merchant session from backend is valid");break;case"userCancel":console.error("User cancelled the payment");break;default:console.error("Other error code:",e.sessionError.code)}this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:Z.USER_CANCELLED,message:"User cancelled the Apple Pay session"}})},"onerror"in this.currentSession&&(this.currentSession.onerror=e=>{console.error("=== APPLE PAY SESSION ERROR ==="),console.error("Session error:",e),this.currentSession=void 0,this.currentPaymentRequest=void 0,t({success:!1,error:{code:Z.SESSION_ERROR,message:"Apple Pay session error occurred"}})})):console.error("[ApplePayService] setupSessionEventHandlers called without required state",{hasSession:Boolean(this.currentSession),hasConfig:Boolean(this.applePayConfig),hasPaymentRequest:Boolean(this.currentPaymentRequest)})}static createPaymentRequest(e,t,i="US",n="USD"){return{countryCode:i,currencyCode:n,merchantCapabilities:r.getDefaultMerchantCapabilities(),supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(t,e)}}getApplePayConfig(){return this.applePayConfig}}const X=t=>{const{isLoading:i}=t;return i?e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-center"},e(x,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},K=t=>e("div",{class:"apple-pay-button-container"},e("button",Object.assign({class:(()=>{let e="apple-pay-button";switch(t.buttonStyle){case h.WHITE:e+=" apple-pay-button-white";break;case h.WHITE_OUTLINE:e+=" apple-pay-button-white-outline";break;default:e+=" apple-pay-button-black"}switch(t.buttonType){case d.BUY:e+=" apple-pay-button-type-buy";break;case d.DONATE:e+=" apple-pay-button-type-donate";break;default:e+=" apple-pay-button-type-plain"}return(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:{width:t.width,height:t.height},onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Pay with Apple Pay",type:"button"},t),t.isProcessing&&e("div",{class:"processing-overlay"},e("div",{class:"spinner"}),e("span",null,"Processing..."))),e("style",null,"\n .apple-pay-button-container {\n display: block;\n position: relative;\n width: 100%;\n }\n\n /* Apple Pay CSS classes - these are the official Apple Pay button styles */\n .apple-pay-button {\n display: inline-block;\n -webkit-appearance: -apple-pay-button;\n -apple-pay-button-type: plain; /* default */\n -apple-pay-button-style: black; /* default */\n border-radius: 8px;\n cursor: pointer;\n border: none;\n outline: none;\n transition: opacity 0.2s ease;\n position: relative;\n }\n\n /* Button styles */\n .apple-pay-button.apple-pay-button-black {\n -apple-pay-button-style: black;\n }\n\n .apple-pay-button.apple-pay-button-white {\n -apple-pay-button-style: white;\n }\n\n .apple-pay-button.apple-pay-button-white-outline {\n -apple-pay-button-style: white-outline;\n }\n\n /* Button types */\n .apple-pay-button.apple-pay-button-type-plain {\n -apple-pay-button-type: plain;\n }\n\n .apple-pay-button.apple-pay-button-type-buy {\n -apple-pay-button-type: buy;\n }\n\n .apple-pay-button.apple-pay-button-type-donate {\n -apple-pay-button-type: donate;\n }\n\n /* Hover and disabled states */\n .apple-pay-button:hover:not(.disabled) {\n opacity: 0.9;\n }\n\n .apple-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .apple-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),$=class{constructor(e){t(this,e),this.applePayStarted=i(this,"applePayStarted"),this.applePayCompleted=i(this,"applePayCompleted"),this.applePayCancelled=i(this,"applePayCancelled"),this.applePayError=i(this,"applePayError"),this.countryCode="US",this.merchantIdentifier="merchant.com.staging-justifi.checkout-dev",this.merchantDisplayName="JustiFi Checkout",this.initiativeContext="dev-checkout.justifi-staging.com",this.buttonType=d.PLAIN,this.buttonStyle=h.BLACK,this.disabled=!1,this.showSkeleton=!0,this.width="100%",this.height="48px",this.isLoading=!0,this.isProcessing=!1,this.isAvailable=!1,this.canMakePayments=!1,this.isConfigValid=!0,this.error=null,this.handleApplePayClick=async()=>{var e,t;if(!this.isProcessing&&!this.disabled&&this.isAvailable)try{this.isProcessing=!0,this.error=null,this.applePayStarted.emit();const i={countryCode:this.countryCode,currencyCode:y.paymentCurrency,merchantCapabilities:[p.SUPPORTS_3DS,p.SUPPORTS_CREDIT,p.SUPPORTS_DEBIT],supportedNetworks:r.getDefaultSupportedNetworks(),total:r.createLineItem(y.paymentDescription,y.paymentAmount)},n=await this.applePayService.startPaymentSession(i,y.authToken,y.accountId);n.success?this.applePayCompleted.emit({success:!0,token:n.token,paymentMethodId:n.paymentMethodId}):(this.applePayCompleted.emit({success:!1,error:n.error}),this.applePayError.emit({error:(null===(e=n.error)||void 0===e?void 0:e.message)||"Payment failed",code:(null===(t=n.error)||void 0===t?void 0:t.code)||$.ErrorCode.PAYMENT_FAILED}))}catch(e){const t=e instanceof Error?e.message:"Payment failed";this.error=t,this.applePayError.emit({error:t,code:$.ErrorCode.PAYMENT_FAILED}),this.applePayCompleted.emit({success:!1,error:t})}finally{this.isProcessing=!1}}}async initializeApplePay(){try{if(this.isLoading=!0,this.error=null,this.isConfigValid=!0,!(Boolean(y.paymentAmount)&&Boolean(y.paymentCurrency)&&Boolean(y.authToken)))return this.error="Missing required Apple Pay configuration",this.isConfigValid=!1,console.error("Apple Pay config error: missing required values",{paymentAmount:y.paymentAmount,paymentCurrency:y.paymentCurrency,hasAuthToken:Boolean(y.authToken),accountId:y.accountId}),this.applePayError.emit({error:this.error,code:$.ErrorCode.CONFIG_ERROR}),void(this.isLoading=!1);if(this.isAvailable=r.isApplePaySupported(),this.canMakePayments=r.canMakePayments(),!this.isAvailable)return this.error="Apple Pay is not supported on this device",console.error(this.error),this.applePayError.emit({error:this.error,code:$.ErrorCode.NOT_SUPPORTED}),void(this.isLoading=!1);if(!this.canMakePayments)return this.error="Apple Pay is not available",console.error(this.error),this.applePayError.emit({error:this.error,code:$.ErrorCode.NOT_AVAILABLE}),void(this.isLoading=!1);const e={merchantIdentifier:this.merchantIdentifier,displayName:this.merchantDisplayName,initiative:"web",initiativeContext:this.initiativeContext,buttonType:this.buttonType,buttonStyle:this.buttonStyle};this.applePayService=new J,this.applePayService.initialize(e),await this.applePayService.canMakePaymentsWithActiveCard()||console.warn("No Apple Pay cards available, but continuing...")}catch(e){console.error("Apple Pay initialization error:",e),this.error=e instanceof Error?e.message:"Failed to initialize Apple Pay",this.applePayError.emit({error:this.error,code:$.ErrorCode.INITIALIZATION_ERROR})}finally{this.isLoading=!1}}async isSupported(){return this.isAvailable&&this.canMakePayments}async getPaymentMethods(){return this.isAvailable?r.getDefaultSupportedNetworks():[]}async abort(){this.applePayService.abortPaymentSession(),this.isProcessing=!1,this.applePayCancelled.emit()}render(){if(!y.applePayEnabled)return null;const t=!this.isLoading&&this.isAvailable&&this.canMakePayments&&this.isConfigValid;return e(A,null,y.checkoutLoaded&&e("script",{async:!0,src:"https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",onLoad:()=>{this.initializeApplePay()}}),e("div",{class:"apple-pay-container"},e(X,{isLoading:this.isLoading}),t&&e(K,{buttonType:this.buttonType,buttonStyle:this.buttonStyle,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleApplePayClick,width:this.width,height:this.height})),e("style",null,"\n .apple-pay-container {\n width: 100%;\n }\n "))}};$.ErrorCode={CONFIG_ERROR:"CONFIG_ERROR",NOT_SUPPORTED:"NOT_SUPPORTED",NOT_AVAILABLE:"NOT_AVAILABLE",INITIALIZATION_ERROR:"INITIALIZATION_ERROR",PAYMENT_FAILED:"PAYMENT_FAILED"};const ee=class{constructor(e){t(this,e)}render(){return e(A,{key:"3ebaf90f9085614d44043d9b5ba7de3f926bf6f1"},e("section",{key:"888ea6f17ece8e78b7ddf9302be5b1b355cd54c6"},e("div",{key:"bb7db155a31ceb9e824c5290b8fb8d8713622bdd"},e("div",{key:"dc954f18e824dabfb09fc727aeb87685020e2d1e",part:E},null==y?void 0:y.paymentDescription),e("div",{key:"e7f6b12c142655fc967bd6a37e00193b9f743f84"},e("span",{key:"25996f66626d428385422d72f5e2bba1a8301628",part:E},"Total")," ",e("span",{key:"958bd1242ac23e13e66b73563d2c6f73499d2574",part:E},T(+(null==y?void 0:y.totalAmount)))))))}};class te{constructor(){this.api=s()}initialize(e){if(console.log("[GooglePayService] initialize: Starting initialization",{config:e}),this.googlePayConfig=new u(e),console.log("[GooglePayService] initialize: Config object created",{isValid:this.googlePayConfig.isValid,environment:this.googlePayConfig.environment,merchantId:this.googlePayConfig.merchantId}),!this.googlePayConfig.isValid)throw console.error("[GooglePayService] initialize: Invalid configuration"),new Error("Invalid Google Pay configuration provided");if(console.log("[GooglePayService] initialize: Creating Google Pay client",{environment:this.googlePayConfig.environment}),this.googlePayClient=g.createGooglePayClient(this.googlePayConfig.environment),!this.googlePayClient)throw console.error("[GooglePayService] initialize: Failed to create client"),new Error("Failed to create Google Pay client");console.log("[GooglePayService] initialize: Client created successfully",{hasClient:!!this.googlePayClient})}async processPayment(e,t,i){var n;const o="google_pay/process_token";console.log("[GooglePayService] processPayment: Starting",{endpoint:o,hasAuthToken:!!e,accountId:t,payload:i});try{const s=await this.api.post({endpoint:o,authToken:e,body:i,headers:{"sub-account":t}});console.log("[GooglePayService] processPayment: API response received",{hasId:!!s.id,hasToken:!!(null===(n=s.data)||void 0===n?void 0:n.token),result:s});const a=s.id&&!!s.data.token;return console.log("[GooglePayService] processPayment: Result",{success:a}),{success:a,data:s}}catch(e){throw console.error("[GooglePayService] processPayment: API error",e),new Error("Google Pay payment processing failed")}}isAvailable(){const e=g.isGooglePaySupported(),t=!!this.googlePayClient,i=e&&t;return console.log("[GooglePayService] isAvailable:",{isSupported:e,hasClient:t,result:i}),i}async canMakePayments(){if(console.log("[GooglePayService] canMakePayments: Checking",{hasClient:!!this.googlePayClient,hasConfig:!!this.googlePayConfig}),!this.googlePayClient||!this.googlePayConfig)return console.warn("[GooglePayService] canMakePayments: Missing client or config"),!1;try{const e=g.createBasePaymentDataRequest();console.log("[GooglePayService] canMakePayments: Calling isReadyToPay",{baseRequest:e});const t=await this.googlePayClient.isReadyToPay(e);return console.log("[GooglePayService] canMakePayments: Response received",{result:t.result,response:t}),t.result}catch(e){return console.error("[GooglePayService] canMakePayments: Error",e),!1}}async startPaymentSession(e,t,i){var n;if(console.log("[GooglePayService] startPaymentSession: Starting",{hasConfig:!!this.googlePayConfig,hasClient:!!this.googlePayClient,hasAuthToken:!!t,accountId:i,paymentDataRequest:e}),!this.googlePayConfig||!this.googlePayClient)throw console.error("[GooglePayService] startPaymentSession: Not initialized"),new Error("Google Pay not initialized. Call initialize() first.");if(!this.isAvailable())throw console.error("[GooglePayService] startPaymentSession: Not available"),new Error("Google Pay is not available on this device/browser");const o=new m(e);if(console.log("[GooglePayService] startPaymentSession: Request object created",{isValid:o.isValid,request:o}),!o.isValid)throw console.error("[GooglePayService] startPaymentSession: Invalid request"),new Error("Invalid payment data request provided");try{console.log("[GooglePayService] startPaymentSession: Loading payment data...");const e=await this.googlePayClient.loadPaymentData(o);console.log("[GooglePayService] startPaymentSession: Payment data loaded",{hasPaymentData:!!e,paymentMethodData:null==e?void 0:e.paymentMethodData});const s=null===(n=null==e?void 0:e.paymentMethodData)||void 0===n?void 0:n.tokenizationData;console.log("[GooglePayService] startPaymentSession: Extracted tokenization data",{hasTokenizationData:!!s,tokenizationData:s});const a=(()=>{if((null==s?void 0:s.token)&&"string"==typeof s.token)try{const e=JSON.parse(s.token);return console.log("[GooglePayService] startPaymentSession: Parsed token",e),e}catch(e){return console.warn("[GooglePayService] startPaymentSession: Failed to parse token, using raw",e),s}return s})(),r={protocolVersion:null==a?void 0:a.protocolVersion,signature:null==a?void 0:a.signature,intermediateSigningKey:(null==a?void 0:a.intermediateSigningKey)?{signedKey:a.intermediateSigningKey.signedKey,signatures:a.intermediateSigningKey.signatures}:void 0,signedMessage:null==a?void 0:a.signedMessage};console.log("[GooglePayService] startPaymentSession: Token process request created",{hasProtocolVersion:!!r.protocolVersion,hasSignature:!!r.signature,hasSignedMessage:!!r.signedMessage,hasIntermediateSigningKey:!!r.intermediateSigningKey}),console.log("[GooglePayService] startPaymentSession: Processing payment...");const l=await this.processPayment(t,i,r);return console.log("[GooglePayService] startPaymentSession: Payment processed",l),l.success?(console.log("[GooglePayService] startPaymentSession: Payment successful",{paymentMethodId:l.data.id}),{success:!0,paymentData:e,paymentMethodId:l.data.id}):(console.error("[GooglePayService] startPaymentSession: Payment processing failed"),{success:!1,error:{code:"PAYMENT_PROCESSING_ERROR",message:"Payment processing failed"}})}catch(e){if(console.error("[GooglePayService] startPaymentSession: Exception caught",e),e&&"object"==typeof e&&"statusCode"in e){const t=e;switch(console.log("[GooglePayService] startPaymentSession: Google Pay error",{statusCode:t.statusCode,statusMessage:t.statusMessage}),t.statusCode){case"CANCELED":return console.log("[GooglePayService] startPaymentSession: User cancelled"),{success:!1,error:{code:"USER_CANCELLED",message:"User cancelled the Google Pay session"}};case"DEVELOPER_ERROR":return console.error("[GooglePayService] startPaymentSession: Developer error"),{success:!1,error:{code:"DEVELOPER_ERROR",message:"Google Pay configuration error"}};default:return console.error("[GooglePayService] startPaymentSession: Unknown error",{statusCode:t.statusCode}),{success:!1,error:{code:"PAYMENT_ERROR",message:t.statusMessage||"Google Pay payment failed"}}}}return console.error("[GooglePayService] startPaymentSession: Generic error",e),{success:!1,error:{code:"PAYMENT_ERROR",message:e instanceof Error?e.message:"Google Pay payment failed"}}}}createButton(e){if(!this.googlePayClient||!this.googlePayConfig)return null;try{return this.googlePayClient.createButton({onClick:e.onClick,buttonType:e.buttonType,buttonSizeMode:e.buttonSizeMode,buttonColor:e.buttonColor,buttonLocale:e.buttonLocale})}catch(e){return null}}prefetchPaymentData(e){if(console.log("[GooglePayService] prefetchPaymentData: Starting",{hasClient:!!this.googlePayClient,paymentDataRequest:e}),!this.googlePayClient)return void console.warn("[GooglePayService] prefetchPaymentData: No client available");const t=new m(e);if(console.log("[GooglePayService] prefetchPaymentData: Request created",{isValid:t.isValid}),t.isValid)try{console.log("[GooglePayService] prefetchPaymentData: Calling prefetchPaymentData"),this.googlePayClient.prefetchPaymentData(t),console.log("[GooglePayService] prefetchPaymentData: Prefetch complete")}catch(e){console.error("[GooglePayService] prefetchPaymentData: Error",e)}else console.warn("[GooglePayService] prefetchPaymentData: Invalid request")}static createPaymentDataRequest(e,t,i="US",n="USD",o,s){var a;console.log("[GooglePayService] createPaymentDataRequest: Creating request",{amount:e,label:t,countryCode:i,currencyCode:n,merchantName:o});const r={apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:[g.createPaymentMethodData()],transactionInfo:{countryCode:i,currencyCode:n,totalPriceStatus:"FINAL",totalPrice:g.formatAmount(e),totalPriceLabel:t},merchantInfo:{merchantId:s,merchantName:o}};return console.log("[GooglePayService] createPaymentDataRequest: Request created",{apiVersion:r.apiVersion,apiVersionMinor:r.apiVersionMinor,transactionInfo:r.transactionInfo,merchantInfo:r.merchantInfo,allowedPaymentMethodsCount:null===(a=r.allowedPaymentMethods)||void 0===a?void 0:a.length}),r}getGooglePayConfig(){return this.googlePayConfig}getGooglePayClient(){return this.googlePayClient}}const ie=t=>{const{isLoading:i}=t;return i?e("div",{class:"container-fluid p-0"},e("div",{class:"row mb-3"},e("div",{class:"col-12 align-content-center"},e(x,{height:"44px",width:"100%",styles:{borderRadius:"8px"}})))):null},ne=t=>e("div",{class:"google-pay-button-container"},e("button",Object.assign({class:(()=>{let e="google-pay-button";switch(e+=t.buttonStyle===b.WHITE?" google-pay-button-white":" google-pay-button-black",t.buttonType){case f.BUY:e+=" google-pay-button-type-buy";break;case f.BOOK:e+=" google-pay-button-type-book";break;case f.CHECKOUT:e+=" google-pay-button-type-checkout";break;case f.DONATE:e+=" google-pay-button-type-donate";break;case f.ORDER:e+=" google-pay-button-type-order";break;case f.PAY:e+=" google-pay-button-type-pay";break;case f.SUBSCRIBE:e+=" google-pay-button-type-subscribe";break;default:e+=" google-pay-button-type-plain"}return e+=t.buttonSizeMode===v.FILL?" google-pay-button-fill":" google-pay-button-static",(t.disabled||t.isProcessing||!t.isAvailable)&&(e+=" disabled"),e})(),style:(()=>{const e={};return t.buttonSizeMode===v.FILL?(e.width="100%",e.minWidth="200px"):e.width=t.width||"200px",e.height=t.height||"48px",e})(),onClick:()=>{!t.disabled&&!t.isProcessing&&t.isAvailable&&t.clickHandler&&t.clickHandler()},disabled:t.disabled||t.isProcessing||!t.isAvailable,"aria-label":"Google Pay",type:"button"},t),t.isProcessing&&e("div",{class:"processing-overlay"},e("div",{class:"spinner"}),e("span",null,"Processing...")),e("div",{class:"google-pay-button-content"},e("svg",{width:"41",height:"17",xmlns:"http://www.w3.org/2000/svg"},e("g",{fill:"none","fill-rule":"evenodd"},e("path",{d:"M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z",fill:"#FFF"}),e("path",{d:"M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944",fill:"#4285F4"}),e("path",{d:"M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703",fill:"#34A853"}),e("path",{d:"M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z",fill:"#FABB05"}),e("path",{d:"M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774",fill:"#E94235"}))))),e("style",null,"\n .google-pay-button-container {\n display: block;\n position: relative;\n }\n\n .google-pay-button {\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0.25px;\n line-height: 16px;\n outline: none;\n padding: 0 20px;\n position: relative;\n min-width: 140px;\n min-height: 48px;\n }\n\n /* Button styles */\n .google-pay-button.google-pay-button-black {\n background-color: #000;\n color: #fff;\n }\n\n .google-pay-button.google-pay-button-white {\n background-color: #fff;\n color: #3c4043;\n }\n\n /* Button content */\n .google-pay-button-content {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n white-space: nowrap;\n }\n\n .google-g-logo {\n width: 20px;\n height: 20px;\n flex-shrink: 0;\n }\n\n .pay-text {\n font-family: 'Google Sans', arial, sans-serif;\n font-size: 14px;\n font-weight: 500;\n margin-left: 8px;\n }\n\n /* Button types - text content handled by ::before pseudo-element */\n .google-pay-button-type-buy .google-pay-button-content::before {\n content: 'Buy with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-book .google-pay-button-content::before {\n content: 'Book with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-checkout .google-pay-button-content::before {\n content: 'Checkout with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-donate .google-pay-button-content::before {\n content: 'Donate with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-order .google-pay-button-content::before {\n content: 'Order with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-pay .google-pay-button-content::before {\n content: 'Pay with';\n margin-right: 8px;\n }\n\n .google-pay-button-type-subscribe .google-pay-button-content::before {\n content: 'Subscribe with';\n margin-right: 8px;\n }\n\n /* Size modes */\n .google-pay-button.google-pay-button-fill {\n width: 100%;\n min-width: 200px;\n }\n\n .google-pay-button.google-pay-button-static {\n width: auto;\n }\n\n /* Hover and focus states */\n .google-pay-button:hover:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:focus:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n }\n\n .google-pay-button:active:not(.disabled) {\n box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.15), 0 1px 3px 1px rgba(0, 0, 0, 0.30);\n transform: translateY(1px);\n }\n\n /* Disabled state */\n .google-pay-button.disabled {\n opacity: 0.5;\n cursor: not-allowed;\n box-shadow: none;\n }\n\n .google-pay-button.disabled:hover,\n .google-pay-button.disabled:focus,\n .google-pay-button.disabled:active {\n box-shadow: none;\n transform: none;\n }\n\n /* Processing overlay */\n .processing-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.8);\n color: white;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 500;\n }\n\n .spinner {\n width: 16px;\n height: 16px;\n border: 2px solid rgba(255, 255, 255, 0.3);\n border-top: 2px solid #fff;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n }\n\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Responsive design */\n @media (max-width: 480px) {\n .google-pay-button {\n width: 100% !important;\n min-width: 200px;\n }\n }\n ")),oe=class{constructor(e){t(this,e),this.googlePayCancelled=i(this,"googlePayCancelled"),this.googlePayCompleted=i(this,"googlePayCompleted"),this.googlePayStarted=i(this,"googlePayStarted"),this.unsubscribes=[],this.canMakePayments=!1,this.error=null,this.isAvailable=!1,this.isLoading=!0,this.isProcessing=!1,this.buttonSizeMode=v.FILL,this.buttonStyle=b.BLACK,this.buttonType=f.PLAIN,this.countryCode="US",this.disabled=!1,this.environment=P.PRODUCTION,this.merchantId="gateway:justifi",this.merchantName="justifi",this.showSkeleton=!0,this.handleGooglePayClick=async()=>{var e;if(console.log("[GooglePay] handleGooglePayClick: Button clicked",{isProcessing:this.isProcessing,disabled:this.disabled,isAvailable:this.isAvailable,canMakePayments:this.canMakePayments}),!this.isProcessing&&!this.disabled&&this.isAvailable&&this.canMakePayments)try{console.log("[GooglePay] handleGooglePayClick: Starting payment session"),this.isProcessing=!0,this.error=null,this.googlePayStarted.emit(),console.log("[GooglePay] handleGooglePayClick: googlePayStarted event emitted");const t=this.createPaymentDataRequest();console.log("[GooglePay] handleGooglePayClick: Starting payment session with service",{hasAuthToken:!!y.authToken,accountId:y.accountId});const i=await this.googlePayService.startPaymentSession(t,y.authToken,y.accountId);console.log("[GooglePay] handleGooglePayClick: Payment session result",i),i.success?(console.log("[GooglePay] handleGooglePayClick: Payment successful",{paymentMethodId:i.paymentMethodId,hasPaymentData:!!i.paymentData}),this.googlePayCompleted.emit({success:!0,paymentData:i.paymentData,paymentMethodId:i.paymentMethodId})):(console.error("[GooglePay] handleGooglePayClick: Payment failed",{error:i.error}),this.googlePayCompleted.emit({success:!1,error:i.error}),"USER_CANCELLED"===(null===(e=i.error)||void 0===e?void 0:e.code)&&(console.log("[GooglePay] handleGooglePayClick: User cancelled payment"),this.googlePayCancelled.emit()))}catch(e){console.error("[GooglePay] handleGooglePayClick: Exception during payment",e);const t=e instanceof Error?e.message:"Payment failed";this.error=t,this.googlePayCompleted.emit({success:!1,error:t})}finally{this.isProcessing=!1,console.log("[GooglePay] handleGooglePayClick: Payment flow complete",{isProcessing:this.isProcessing,error:this.error})}else console.warn("[GooglePay] handleGooglePayClick: Payment blocked",{reason:this.isProcessing?"isProcessing":this.disabled?"disabled":this.isAvailable?this.canMakePayments?"unknown":"cannotMakePayments":"notAvailable"})}}watchConfigChange(){console.log("[GooglePay] watchConfigChange: Configuration changed",{merchantId:this.merchantId,environment:this.environment}),this.initializeGooglePay()}componentWillLoad(){console.log("[GooglePay] componentWillLoad: Initializing GooglePayService"),this.googlePayService=new te,console.log("[GooglePay] componentWillLoad: GooglePayService created",{service:this.googlePayService})}componentDidLoad(){console.log("[GooglePay] componentDidLoad: Setting up store subscriptions",{checkoutLoaded:y.checkoutLoaded,paymentAmount:y.paymentAmount,paymentCurrency:y.paymentCurrency,paymentDescription:y.paymentDescription});const e=M("paymentAmount",(()=>{console.log("[GooglePay] paymentAmount changed:",y.paymentAmount),this.prefetchPaymentData()}));"function"==typeof e&&this.unsubscribes.push(e);const t=M("paymentCurrency",(()=>{console.log("[GooglePay] paymentCurrency changed:",y.paymentCurrency),this.prefetchPaymentData()}));"function"==typeof t&&this.unsubscribes.push(t);const i=M("paymentDescription",(()=>{console.log("[GooglePay] paymentDescription changed:",y.paymentDescription),this.prefetchPaymentData()}));"function"==typeof i&&this.unsubscribes.push(i)}disconnectedCallback(){this.unsubscribes.forEach((e=>{try{e()}catch(e){}})),this.unsubscribes=[]}async getSupportedAuthMethods(){return this.isAvailable?g.getDefaultAuthMethods():[]}async getSupportedNetworks(){return this.isAvailable?g.getDefaultSupportedNetworks():[]}async handleSelectionClick(){y.selectedPaymentMethod={type:I.GOOGLE_PAY}}async isSupported(){return this.isAvailable&&this.canMakePayments}async prefetchPaymentData(){if(console.log("[GooglePay] prefetchPaymentData: Called",{isAvailable:this.isAvailable,canMakePayments:this.canMakePayments}),!this.isAvailable||!this.canMakePayments)return void console.warn("[GooglePay] prefetchPaymentData: Skipped - not available or cannot make payments");const e=this.createPaymentDataRequest();console.log("[GooglePay] prefetchPaymentData: Prefetching",{paymentDataRequest:e}),this.googlePayService.prefetchPaymentData(e),console.log("[GooglePay] prefetchPaymentData: Prefetch complete")}async initializeGooglePay(){console.log("[GooglePay] initializeGooglePay: Starting initialization");try{if(this.isLoading=!0,this.error=null,console.log("[GooglePay] initializeGooglePay: Checking payment amount",{paymentAmount:y.paymentAmount,paymentCurrency:y.paymentCurrency,paymentDescription:y.paymentDescription}),!y.paymentAmount)return console.error("[GooglePay] initializeGooglePay: Missing payment amount"),this.error="Missing required Google Pay configuration",void(this.isLoading=!1);const e={environment:this.environment,merchantId:this.merchantId,merchantName:this.merchantName,buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode};if(console.log("[GooglePay] initializeGooglePay: Config created",e),this.googlePayService.initialize(e),console.log("[GooglePay] initializeGooglePay: Service initialized"),this.isAvailable=this.googlePayService.isAvailable(),console.log("[GooglePay] initializeGooglePay: Availability check",{isAvailable:this.isAvailable}),!this.isAvailable)return console.warn("[GooglePay] initializeGooglePay: Google Pay not available on device"),this.error="Google Pay is not supported on this device",void(this.isLoading=!1);if(console.log("[GooglePay] initializeGooglePay: Checking canMakePayments..."),this.canMakePayments=await this.googlePayService.canMakePayments(),console.log("[GooglePay] initializeGooglePay: canMakePayments result",{canMakePayments:this.canMakePayments}),!this.canMakePayments)return console.warn("[GooglePay] initializeGooglePay: Cannot make payments"),this.error="Google Pay is not available for payments",void(this.isLoading=!1);const t=this.createPaymentDataRequest();console.log("[GooglePay] initializeGooglePay: Prefetching payment data",{paymentDataRequest:t}),this.googlePayService.prefetchPaymentData(t),console.log("[GooglePay] initializeGooglePay: Initialization complete")}catch(e){console.error("[GooglePay] initializeGooglePay: Error during initialization",e),this.error=e instanceof Error?e.message:"Failed to initialize Google Pay"}finally{this.isLoading=!1,console.log("[GooglePay] initializeGooglePay: Final state",{isLoading:this.isLoading,isAvailable:this.isAvailable,canMakePayments:this.canMakePayments,error:this.error})}}createPaymentDataRequest(){const e=te.createPaymentDataRequest(y.paymentAmount,y.paymentDescription,this.countryCode,y.paymentCurrency,this.merchantName,this.merchantId);return console.log("[GooglePay] createPaymentDataRequest: Created request",{amount:y.paymentAmount,currency:y.paymentCurrency,description:y.paymentDescription,countryCode:this.countryCode,merchantName:this.merchantName,request:e}),e}render(){const t=!this.isLoading&&!!this.error,i=!this.isLoading&&!this.error&&!this.isAvailable,n=!this.isLoading&&!this.error&&this.isAvailable&&!this.canMakePayments,o=!this.isLoading&&!this.error&&this.isAvailable&&this.canMakePayments;return e(A,{key:"cf4dcfa14dd83683c0d6e811ea464968c38f38d6"},y.checkoutLoaded&&e("script",{key:"e942fe8e2eb80ee0d2119e864c62d89a79d9d12a",async:!0,src:"https://pay.google.com/gp/p/js/pay.js",onLoad:()=>{console.log("[GooglePay] Script loaded: Google Pay JS library loaded successfully"),this.initializeGooglePay()},onError:e=>{console.error("[GooglePay] Script error: Failed to load Google Pay JS library",e)}}),e("div",{key:"7ce1234392d3ea3abdcb1a385462cf740f4b98bb",class:"google-pay-container"},e(ie,{key:"3532e93f39bb69d76663c159bc6b1322a39e1361",isLoading:this.isLoading}),t&&e("div",{key:"9e42e567d383522d03bc361008cb470fd2e2d602",class:"google-pay-error",role:"alert","data-testid":"gp-error"},e("span",{key:"8b49d628ff8f5175d36f82e32191f1f3291e826f",class:"error-icon"},"⚠️"),e("span",{key:"b01e94934cd30b8dbad3127239ea625c51511d35",class:"error-message"},this.error)),i&&e("div",{key:"12ad123c7516e9ce2ad1084f6b0c366e8bb5b9d5",class:"google-pay-unavailable","data-testid":"gp-device-unavailable"},e("span",{key:"e0fa8f13423b6b545b340cc4b2b0411e833202c6",class:"unavailable-message"},"Google Pay is not available on this device")),n&&e("div",{key:"acb4c6661ca0aa6b944c8ed67642c4ad9effa1e5",class:"google-pay-unavailable","data-testid":"gp-payments-unavailable"},e("span",{key:"8a83dc8f5140d3ecade1fd68f69b5ebeaeb020d2",class:"unavailable-message"},"Google Pay is not available for payments")),o&&e(ne,{key:"46ea586c90aaa5eb909af4f1dfcb873a7ac50069","data-testid":"gp-button",buttonType:this.buttonType,buttonStyle:this.buttonStyle,buttonSizeMode:this.buttonSizeMode,disabled:this.disabled,isProcessing:this.isProcessing,isAvailable:this.isAvailable,clickHandler:this.handleGooglePayClick})),e("style",{key:"8f77166ec7d772f0c51c74cdb166f9e8ae295088"},"\n .google-pay-container {\n width: 100%;\n }\n\n .google-pay-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px;\n background: #fef2f2;\n border: 1px solid #fecaca;\n border-radius: 8px;\n color: #dc2626;\n font-size: 14px;\n }\n\n .google-pay-unavailable {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 12px;\n background: #f9fafb;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n color: #6b7280;\n font-size: 14px;\n }\n\n .error-icon {\n font-size: 16px;\n }\n \n "))}static get watchers(){return{merchantId:["watchConfigChange"],environment:["watchConfigChange"]}}},se=class{constructor(e){t(this,e),this.levels={h1:G,h2:z,h3:_},this.level="h1"}render(){return e(A,{key:"73104ea086f8a9948e69f86451adf19e0f39fb32"},e(this.levels[this.level],{key:"a8582109634299a24e2a9b3c7181c6bba511fde7",text:this.text,class:this.class}))}},ae=s();class re{async getLinkToken(e,t,i,n){return ae.post({endpoint:`plaid/${t}/link`,body:{checkout_id:i},authToken:e,signal:n})}async tokenizeBankAccount(e,t,i,n,o,s){const a=`plaid/${t}/tokenize`,r={public_token:i};return n&&(r.link_token_id=n),o&&(r.payment_method_group_id=o),ae.post({endpoint:a,body:r,authToken:e,signal:s})}}const le=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event"),this.submitEvent=i(this,"submit-event"),this.checkoutChangedEvent=i(this,"checkout-changed"),this.plaidService=new re,this.handleGooglePayCompleted=e=>{const{success:t,paymentMethodId:i,error:n}=e.detail||{};t&&i?(y.paymentToken=i,y.selectedPaymentMethod={type:I.GOOGLE_PAY},this.submitCheckout()):this.errorEvent.emit({message:n&&n.message||"Google Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})},this.handleGooglePayCancelled=()=>{y.paymentToken=void 0,y.selectedPaymentMethod=void 0},this.handleApplePayCompleted=e=>{const{success:t,token:i,paymentMethodId:n,error:o}=e.detail;t&&i?(y.paymentToken=n,y.selectedPaymentMethod={type:I.APPLE_PAY},this.submitCheckout()):(console.error("Apple Pay completed but failed:",o),this.errorEvent.emit({message:(null==o?void 0:o.message)||"Apple Pay payment failed",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR}))},this.handleApplePayError=e=>{const{error:t,code:i}=e.detail;console.error("Apple Pay error:",t),this.errorEvent.emit({message:t||"Apple Pay error occurred",errorCode:`APPLE_PAY_${i}`,severity:Y.ERROR})},this.handleApplePayCancelled=()=>{y.paymentToken=void 0,y.selectedPaymentMethod=void 0}}connectedCallback(){this.observer=new MutationObserver((()=>{this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()})),this.observer.observe(this.hostEl,{childList:!0,subtree:!0}),y.checkoutId=this.checkoutId;const e={authToken:this.authToken,checkoutId:this.checkoutId,service:new H};this.getCheckout=(({authToken:e,checkoutId:t,service:i})=>async({onSuccess:n,onError:o})=>{var s;try{const a=await i.fetchCheckout(e,t);if(a.error)return o({error:Q(a.error),code:V(null===(s=a.error)||void 0===s?void 0:s.code),severity:Y.ERROR});n({checkout:a.data})}catch(e){const t=V(null==e?void 0:e.code);return o({error:e.message||e,code:t,severity:Y.ERROR})}})(e),this.completeCheckout=(({authToken:e,checkoutId:t,service:i})=>async({payment:n,onSuccess:o,onError:s})=>{var a;try{const r=await i.complete(e,t,n);if(r.error)return s({error:Q(r.error),code:V(null===(a=r.error)||void 0===a?void 0:a.code),severity:Y.ERROR});o({checkout:r.data})}catch(e){const t=V(null==e?void 0:e.code);return s({error:e.message||e,code:t,severity:Y.ERROR})}})(e),k((()=>{this.emitCheckoutChanged()}))}componentWillLoad(){this.analytics=new U(this),B(),y.authToken=this.authToken,this.fetchCheckout(),L("set",(e=>{const t=O[e];void 0!==t&&R(e,t)&&this.fetchCheckout()}))}componentDidLoad(){this.queryFormRefs(),this.setupApplePayListeners(),this.setupGooglePayListeners()}disconnectedCallback(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.removeApplePayListeners(),this.removeGooglePayListeners()}fetchCheckout(){this.authToken&&this.checkoutId?this.getCheckout&&this.getCheckout({onSuccess:({checkout:e})=>{this.updateStore(e),e.status!==w.completed?e.status!==w.expired||this.errorEvent.emit({message:q.CHECKOUT_EXPIRED,errorCode:F.CHECKOUT_EXPIRED,severity:Y.ERROR}):this.errorEvent.emit({message:q.CHECKOUT_ALREADY_COMPLETED,errorCode:F.CHECKOUT_ALREADY_COMPLETED,severity:Y.ERROR})},onError:e=>{this.errorEvent.emit({message:e.message,errorCode:e.code,severity:e.severity})}}):this.errorEvent.emit({message:q.NOT_AUTHENTICATED,errorCode:F.NOT_AUTHENTICATED,severity:Y.ERROR})}updateStore(e){var t,i,n,o,s,a,r;y.accountId=e.account_id,y.checkoutLoaded=!0,y.paymentMethods=e.payment_methods.map((e=>new D(e))),y.paymentMethodGroupId=e.payment_method_group_id,y.paymentDescription=e.payment_description,y.totalAmount=e.total_amount,y.paymentAmount=e.payment_amount,y.bnplEnabled=e.payment_settings.bnpl_payments,y.insuranceEnabled=e.payment_settings.insurance_payments,y.bankAccountVerification=null===(t=e.payment_settings)||void 0===t?void 0:t.bank_account_verification,y.applePayEnabled=null===(i=e.payment_settings)||void 0===i?void 0:i.apple_payments,y.googlePayEnabled=null===(n=e.payment_settings)||void 0===n?void 0:n.google_payments,y.bnplProviderClientId=null===(o=null==e?void 0:e.bnpl)||void 0===o?void 0:o.provider_client_id,y.bnplProviderMode=null===(s=null==e?void 0:e.bnpl)||void 0===s?void 0:s.provider_mode,y.bnplProviderApiVersion=null===(a=null==e?void 0:e.bnpl)||void 0===a?void 0:a.provider_api_version,y.bnplProviderCheckoutUrl=null===(r=null==e?void 0:e.bnpl)||void 0===r?void 0:r.provider_checkout_url}emitCheckoutChanged(){const e={availablePaymentMethodTypes:S(),selectedPaymentMethod:y.selectedPaymentMethod,savedPaymentMethods:y.paymentMethods};this.checkoutChangedEvent.emit(e)}queryFormRefs(){this.billingFormRef=this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full"),this.applePayRef=this.hostEl.querySelector("justifi-apple-pay"),this.googlePayRef=this.hostEl.querySelector("justifi-google-pay"),this.paymentMethodFormRef=this.hostEl.querySelector("justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method"),this.insuranceFormRef=this.hostEl.querySelector("justifi-season-interruption-insurance")}setupApplePayListeners(){this.applePayRef&&(this.applePayRef.addEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.addEventListener("applePayError",this.handleApplePayError),this.applePayRef.addEventListener("applePayCancelled",this.handleApplePayCancelled))}removeApplePayListeners(){this.applePayRef&&(this.applePayRef.removeEventListener("applePayCompleted",this.handleApplePayCompleted),this.applePayRef.removeEventListener("applePayError",this.handleApplePayError),this.applePayRef.removeEventListener("applePayCancelled",this.handleApplePayCancelled))}setupGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.addEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.addEventListener("googlePayCancelled",this.handleGooglePayCancelled))}removeGooglePayListeners(){this.googlePayRef&&(this.googlePayRef.removeEventListener("googlePayCompleted",this.handleGooglePayCompleted),this.googlePayRef.removeEventListener("googlePayCancelled",this.handleGooglePayCancelled))}async tokenizePaymentMethod(e){var t,i,n;const o=null!==(i=await(null===(t=this.billingFormRef)||void 0===t?void 0:t.getValues()))&&void 0!==i?i:{},s=Object.assign(Object.assign({},e),o),a=Object.assign({accountId:y.accountId,payment_method_group_id:void 0},s);y.savePaymentMethod&&(a.payment_method_group_id=y.paymentMethodGroupId);const r=await(null===(n=this.paymentMethodFormRef)||void 0===n?void 0:n.tokenize({clientId:this.authToken,paymentMethodMetadata:a,account:y.accountId}));return r.error?r:(y.paymentToken=r.id,r.id)}async setSelectedPaymentMethod(e){y.selectedPaymentMethod=e,y.paymentToken=e.id||void 0}async validate(){var e,t;const i=[];y.insuranceEnabled&&this.insuranceFormRef&&i.push(this.insuranceFormRef.validate());const n=(null===(e=y.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.NEW_CARD,o=(null===(t=y.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.NEW_BANK_ACCOUNT;if((n||o)&&(this.paymentMethodFormRef&&i.push(this.paymentMethodFormRef.validate()),this.billingFormRef&&i.push(this.billingFormRef.validate())),0===i.length)return!0;try{return!!(await Promise.all(i)).every((e=>"boolean"==typeof e?e:!1!==(null==e?void 0:e.isValid)))||(this.errorEvent.emit({message:"Validation error",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR}),!1)}catch(e){return!1}}async submitCheckout(e){var t,i,n,o,s;const a=await this.validate();if(!y.selectedPaymentMethod)return void this.errorEvent.emit({message:"No payment method selected.",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR});const r=(null===(t=y.selectedPaymentMethod)||void 0===t?void 0:t.type)===I.NEW_CARD,l=(null===(i=y.selectedPaymentMethod)||void 0===i?void 0:i.type)===I.NEW_BANK_ACCOUNT,c=(null===(n=y.selectedPaymentMethod)||void 0===n?void 0:n.type)===I.PLAID;if(r||l){const t=await this.tokenizePaymentMethod(e);if(null==t?void 0:t.error)return void this.errorEvent.emit({message:t.error.message,errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})}if(c&&!y.paymentToken){const e=y.plaidPublicToken,t=y.plaidLinkTokenId;if(!e)return void this.errorEvent.emit({message:"Missing Plaid public token. Please connect your bank.",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});try{const i=await this.plaidService.tokenizeBankAccount(y.authToken,y.accountId,e,t||void 0,y.savePaymentMethod?y.paymentMethodGroupId:void 0);if(null==i?void 0:i.error)return void this.errorEvent.emit({message:"string"==typeof i.error?i.error:i.error.message||"Failed to tokenize bank account",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});const n=null==i?void 0:i.data,s=(null===(o=null==n?void 0:n.bank_account)||void 0===o?void 0:o.token)||(null==n?void 0:n.token)||(null==n?void 0:n.id);y.paymentToken=s}catch(e){return void this.errorEvent.emit({message:(null==e?void 0:e.message)||"Plaid exchange error",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR})}}if(!a)return void this.errorEvent.emit({message:"Please fill in all required fields.",errorCode:F.VALIDATION_ERROR,severity:Y.ERROR});if(!y.paymentToken)return void this.errorEvent.emit({message:"Payment token not found.",errorCode:F.TOKENIZE_ERROR,severity:Y.ERROR});let h;if(h={payment_mode:(e=>{switch(e){case I.NEW_CARD:case I.SAVED_CARD:case I.NEW_BANK_ACCOUNT:case I.SAVED_BANK_ACCOUNT:case I.PLAID:return N.ECOM;case I.SEZZLE:return N.BNPL;case I.APPLE_PAY:return N.APPLE_PAY;case I.GOOGLE_PAY:return N.GOOGLE_PAY;default:return}})(null===(s=y.selectedPaymentMethod)||void 0===s?void 0:s.type),payment_token:y.paymentToken},this.preCompleteHook){const e=C();try{await new Promise(((t,i)=>{this.preCompleteHook(e,(()=>t()),(()=>i()))}))}catch(e){return}}this.completeCheckout({payment:h,onSuccess:({checkout:e})=>{this.submitEvent.emit({checkout:e,message:"Checkout completed successfully"})},onError:e=>{this.errorEvent.emit({message:e.message,errorCode:F.COMPLETE_CHECKOUT_ERROR,severity:Y.ERROR})}})}render(){return e(n,{key:"43f4be87e218b23251f2ccac90e0c980bf157d68"})}get hostEl(){return o(this)}};var ce;!function(e){e.PLAID_SDK_LOAD_FAILED="plaid-sdk-load-failed",e.PLAID_LINK_INIT_FAILED="plaid-link-init-failed",e.PLAID_LINK_TOKEN_FAILED="plaid-link-token-failed",e.PLAID_AUTHENTICATION_FAILED="plaid-authentication-failed",e.PLAID_BANK_NOT_SUPPORTED="plaid-bank-not-supported",e.PLAID_TOKEN_EXPIRED="plaid-token-expired",e.PLAID_NETWORK_ERROR="plaid-network-error",e.PLAID_USER_CANCELLED="plaid-user-cancelled",e.PLAID_TIMEOUT="plaid-timeout",e.PLAID_INVALID_CREDENTIALS="plaid-invalid-credentials",e.PLAID_ACCOUNT_LOCKED="plaid-account-locked",e.PLAID_MAINTENANCE="plaid-maintenance",e.PLAID_RATE_LIMITED="plaid-rate-limited"}(ce||(ce={}));const he={[ce.PLAID_SDK_LOAD_FAILED]:"Unable to load Plaid. Please refresh the page and try again.",[ce.PLAID_LINK_INIT_FAILED]:"Unable to initialize bank connection. Please try again.",[ce.PLAID_LINK_TOKEN_FAILED]:"Unable to connect to bank service. Please try again.",[ce.PLAID_AUTHENTICATION_FAILED]:"Bank authentication failed. Please try again.",[ce.PLAID_BANK_NOT_SUPPORTED]:"Your bank is not currently supported. Please try a different payment method.",[ce.PLAID_TOKEN_EXPIRED]:"Your bank session has expired. Please reconnect your account.",[ce.PLAID_NETWORK_ERROR]:"Network connection issue. Please check your internet connection and try again.",[ce.PLAID_USER_CANCELLED]:"Bank connection was cancelled. Click to try again.",[ce.PLAID_TIMEOUT]:"Bank connection timed out. Please try again.",[ce.PLAID_INVALID_CREDENTIALS]:"Invalid bank credentials. Please check your username and password.",[ce.PLAID_ACCOUNT_LOCKED]:"Your bank account is temporarily locked. Please contact your bank.",[ce.PLAID_MAINTENANCE]:"Bank service is temporarily unavailable. Please try again later.",[ce.PLAID_RATE_LIMITED]:"Too many connection attempts. Please wait a moment and try again."},de={[ce.PLAID_SDK_LOAD_FAILED]:Y.ERROR,[ce.PLAID_LINK_INIT_FAILED]:Y.ERROR,[ce.PLAID_LINK_TOKEN_FAILED]:Y.ERROR,[ce.PLAID_AUTHENTICATION_FAILED]:Y.ERROR,[ce.PLAID_BANK_NOT_SUPPORTED]:Y.WARNING,[ce.PLAID_TOKEN_EXPIRED]:Y.WARNING,[ce.PLAID_NETWORK_ERROR]:Y.WARNING,[ce.PLAID_USER_CANCELLED]:Y.INFO,[ce.PLAID_TIMEOUT]:Y.WARNING,[ce.PLAID_INVALID_CREDENTIALS]:Y.ERROR,[ce.PLAID_ACCOUNT_LOCKED]:Y.ERROR,[ce.PLAID_MAINTENANCE]:Y.WARNING,[ce.PLAID_RATE_LIMITED]:Y.WARNING},ye=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.plaidError=i(this,"plaidError"),this.plaidErrorRecovered=i(this,"plaidErrorRecovered"),this.isAuthenticating=!1,this.publicToken=null,this.linkToken=null,this.linkTokenId=null,this.error=null,this.plaidLink=null,this.isSelected=!1,this.retryCount=0,this.isRetrying=!1,this.plaidService=new re,this.maxRetries=3,this.retryDelay=2e3,this.timeoutId=null,this.abortController=null,this.hasLoggedDisabledWarning=!1,this.waitForStoreAndInitialize=()=>{y.authToken&&y.accountId&&y.checkoutId?this.initializePlaidLink():setTimeout((()=>{this.waitForStoreAndInitialize()}),100)},this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:ce.PLAID_SDK_LOAD_FAILED,message:he[ce.PLAID_SDK_LOAD_FAILED],severity:de[ce.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:ce.PLAID_LINK_TOKEN_FAILED,message:he[ce.PLAID_LINK_TOKEN_FAILED],severity:de[ce.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const e=window.Plaid;this.plaidLink=e.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(e){this.handleError({code:ce.PLAID_LINK_INIT_FAILED,message:he[ce.PLAID_LINK_INIT_FAILED],severity:de[ce.PLAID_LINK_INIT_FAILED],originalError:e,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var e,t,i,n,o;try{if(!y.authToken||!y.accountId)return void this.handleError({code:ce.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please refresh the page and try again.",severity:Y.ERROR,retryable:!1,userAction:"Refresh the page"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var e;null===(e=this.abortController)||void 0===e||e.abort()}),3e4);const t=await this.plaidService.getLinkToken(y.authToken,y.accountId,y.checkoutId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),t.error)throw new Error("string"==typeof t.error?t.error:t.error.message||"Failed to get link token");this.linkToken=t.data.link_token,this.linkTokenId=(null==t?void 0:t.id)||(null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.id)||null,this.linkTokenId&&(y.plaidLinkTokenId=this.linkTokenId)}catch(e){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let s=ce.PLAID_LINK_TOKEN_FAILED,a=he[s],r=!0;"AbortError"===e.name?(s=ce.PLAID_TIMEOUT,a=he[s],r=!0):(null===(t=e.message)||void 0===t?void 0:t.includes("network"))||(null===(i=e.message)||void 0===i?void 0:i.includes("fetch"))?(s=ce.PLAID_NETWORK_ERROR,a=he[s],r=!0):((null===(n=e.message)||void 0===n?void 0:n.includes("401"))||(null===(o=e.message)||void 0===o?void 0:o.includes("unauthorized")))&&(s=ce.PLAID_INVALID_CREDENTIALS,a="Authentication failed. Please refresh the page and try again.",r=!1),this.handleError({code:s,message:a,severity:de[s],originalError:e,retryable:r,userAction:r?"Click to try again":"Refresh the page"})}},this.mapApiErrorToPlaidError=e=>{if("string"==typeof e){if(e.includes("rate_limit"))return ce.PLAID_RATE_LIMITED;if(e.includes("maintenance"))return ce.PLAID_MAINTENANCE;if(e.includes("not_authenticated"))return ce.PLAID_INVALID_CREDENTIALS}if(null==e?void 0:e.code)switch(e.code){case"rate_limited":return ce.PLAID_RATE_LIMITED;case"maintenance":return ce.PLAID_MAINTENANCE;case"not_authenticated":return ce.PLAID_INVALID_CREDENTIALS;default:return ce.PLAID_LINK_TOKEN_FAILED}return ce.PLAID_LINK_TOKEN_FAILED},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=e=>{this.publicToken=e,this.isAuthenticating=!1,this.clearError(),this.retryCount=0,this.isSelected||(this.isSelected=!0,y.selectedPaymentMethod={type:I.PLAID}),this.plaidErrorRecovered.emit({code:"plaid-success",message:"Bank account connected successfully",severity:Y.INFO}),y.plaidPublicToken=e},this.handlePlaidExit=e=>{this.isAuthenticating=!1,e&&this.handlePlaidError(e)},this.handlePlaidEvent=(e,t)=>{switch(e){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(t)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=e=>{let t=ce.PLAID_AUTHENTICATION_FAILED,i=he[t],n=!0,o="Click to try again";if(e.error_code)switch(e.error_code){case"INVALID_CREDENTIALS":t=ce.PLAID_INVALID_CREDENTIALS,i=he[t],n=!0;break;case"ITEM_LOGIN_REQUIRED":t=ce.PLAID_INVALID_CREDENTIALS,i="Your bank requires re-authentication. Please try again.",n=!0;break;case"ITEM_LOCKED":t=ce.PLAID_ACCOUNT_LOCKED,i=he[t],n=!1,o="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":t=ce.PLAID_MAINTENANCE,i=he[t],n=!0;break;case"RATE_LIMIT_EXCEEDED":t=ce.PLAID_RATE_LIMITED,i=he[t],n=!0;break;case"INVALID_REQUEST":t=ce.PLAID_AUTHENTICATION_FAILED,i="Invalid request. Please try again.",n=!0;break;case"PLAID_ERROR":t=ce.PLAID_AUTHENTICATION_FAILED,i=e.error_message||"Bank authentication failed. Please try again.",n=!0;break;default:e.error_message&&(i=e.error_message)}if(e.error_message){const s=e.error_message.toLowerCase();s.includes("not supported")||s.includes("unsupported")?(t=ce.PLAID_BANK_NOT_SUPPORTED,i=he[t],n=!1,o="Try a different payment method"):(s.includes("expired")||s.includes("timeout"))&&(t=ce.PLAID_TOKEN_EXPIRED,i=he[t],n=!0)}this.handleError({code:t,message:i,severity:de[t],originalError:e,retryable:n,userAction:o}),this.isAuthenticating=!1},this.handleError=e=>{this.error=e,this.plaidError.emit({code:e.code,message:e.message,severity:e.severity,data:{originalError:e.originalError,retryable:e.retryable,userAction:e.userAction,retryCount:this.retryCount}}),console.error("Plaid error:",e),e.retryable&&this.retryCount<this.maxRetries&&this.scheduleRetry()},this.scheduleRetry=()=>{this.isRetrying||(this.isRetrying=!0,this.retryCount++,setTimeout((()=>{this.isRetrying=!1,this.clearError(),this.waitForStoreAndInitialize()}),this.retryDelay*this.retryCount))},this.clearError=()=>{this.error&&(this.error=null,this.retryCount=0)},this.syncWithStore=()=>{var e;const t=(null===(e=y.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.PLAID;this.isSelected!==t&&(this.isSelected=t)}}onSelectionChange(e){var t;e&&(null===(t=y.selectedPaymentMethod)||void 0===t?void 0:t.type)!==I.PLAID&&(y.selectedPaymentMethod={type:I.PLAID}),!e||!this.plaidLink||this.publicToken||this.isAuthenticating||this.error||this.openPlaidLink()}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.waitForStoreAndInitialize()},this.scriptRef.onerror=()=>{this.handleError({code:ce.PLAID_SDK_LOAD_FAILED,message:he[ce.PLAID_SDK_LOAD_FAILED],severity:de[ce.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}componentWillLoad(){var e;this.isSelected=(null===(e=y.selectedPaymentMethod)||void 0===e?void 0:e.type)===I.PLAID}async resolvePaymentMethod(){return this.publicToken?{token:this.publicToken,data:{type:"bank_account",plaid_public_token:this.publicToken}}:{validationError:!0}}async getPaymentToken(){return y.paymentToken}async handleSelectionClick(){if(this.isSelected=!0,y.selectedPaymentMethod={type:I.PLAID},this.error)return this.clearError(),void this.waitForStoreAndInitialize();!this.plaidLink||this.publicToken||this.isAuthenticating||this.openPlaidLink()}async setSelected(e){this.isSelected=e,e&&(y.selectedPaymentMethod={type:I.PLAID})}async isCurrentlySelected(){return this.isSelected}async deselect(){this.isSelected=!1}async reset(){this.publicToken=null,this.clearError(),this.isAuthenticating=!1,this.linkToken=null,this.plaidLink=null,this.retryCount=0,this.isRetrying=!1,this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),this.abortController&&(this.abortController.abort(),this.abortController=null)}async isReadyForAuthentication(){return!(!this.plaidLink||!this.linkToken||this.isAuthenticating)}async retry(){this.error&&this.error.retryable&&(this.clearError(),this.waitForStoreAndInitialize())}async getErrorInfo(){return this.error}componentDidLoad(){const e=M("selectedPaymentMethod",this.syncWithStore);this.unsubscribeFromStore=e}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){if(!0!==y.bankAccountVerification)return this.hasLoggedDisabledWarning||(console.warn("[PlaidPaymentMethod] bank_account_verification is disabled. Component will not render."),this.hasLoggedDisabledWarning=!0),null;const t=e("img",{class:"plaid-logo-img",src:"data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=",alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return e(A,{class:"payment-method"},e("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:e=>this.scriptRef=e}),e("div",{title:"Pay with Plaid"},e("div",{onClick:e=>{e.preventDefault(),this.handleSelectionClick()}},"Pay with Bank Account ",t," "),(()=>this.error?e("div",{class:(this.error.severity===Y.ERROR?"text-danger":this.error.severity===Y.WARNING?"text-warning":"text-info")+" mt-2"},e("small",null,this.error.message),e("br",null),e("small",{class:"text-muted"},this.error.userAction,this.error.retryable&&this.retryCount<this.maxRetries&&e("span",null," • Auto-retry in progress..."))):null)(),(()=>this.error?null:this.isAuthenticating?e("div",{class:"text-info mt-2"},e("small",null,"Connecting to your bank...")):this.publicToken?e("div",{class:"text-success mt-2"},e("small",null,"✓ Bank account connected successfully")):!this.isSelected||this.publicToken||this.error||this.isAuthenticating?null:e("div",{class:"text-muted mt-2"},e("small",null,"Click to connect your bank account")))()))}static get watchers(){return{isSelected:["onSelectionChange"]}}},pe=class{constructor(e){t(this,e),this.onPaymentMethodOptionClick=e=>t=>{t.preventDefault(),y.selectedPaymentMethod={id:e.id,type:e.type},y.paymentToken=e.id},this.isAllowedPaymentMethod=e=>!(e===I.SAVED_CARD&&y.disableCreditCard||e===I.SAVED_BANK_ACCOUNT&&y.disableBankAccount)}componentWillLoad(){y.paymentMethods.length||console.warn("No saved payment methods available."),y.disablePaymentMethodGroup&&console.warn("Payment method group is disabled.")}render(){return y.disablePaymentMethodGroup?null:e(A,null,e("div",{class:"saved-payment-methods"},y.paymentMethods.length?y.paymentMethods.filter((e=>this.isAllowedPaymentMethod(e.type))).map((t=>e("div",{class:"radio-list-item p-3",part:j,onClick:this.onPaymentMethodOptionClick(t)},e("form-control-radio",{name:"paymentMethodType",value:null==t?void 0:t.id,checked:y.paymentToken===(null==t?void 0:t.id),label:`${W[null==t?void 0:t.brand]||""} *${null==t?void 0:t.acct_last_four}`})))):null))}},ue=e("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),ge=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected"),this.paymentMethodOptionId=I.SEZZLE,this.initializeSezzleCheckout=()=>{let e;this.sezzlePromise=new Promise((t=>{e=t}));const t=Number(y.paymentAmount),i=new(0,window.Checkout)({mode:"popup",publicKey:y.bnplProviderClientId,apiMode:y.bnplProviderMode,apiVersion:y.bnplProviderApiVersion});i.sezzleButtonElement=this.sezzleButtonRef,i.init({onClick:function(e){e.preventDefault(),i.startCheckout({checkout_url:y.bnplProviderCheckoutUrl})},onComplete:t=>e({bnpl:t.data}),onCancel:t=>e({bnpl:t.data}),onFailure:t=>e({bnpl:t.data})}),this.sezzleCheckout=i,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(t)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()})}async resolvePaymentMethod(e){return e.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}async handleSelectionClick(){y.selectedPaymentMethod={type:I.SEZZLE},this.paymentMethodOptionSelected.emit(this.paymentMethodOptionId)}render(){var t,i;return y.bnplEnabled?e(A,{class:"payment-method"},e("script",{src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:e=>this.scriptRef=e}),e("div",null,e("div",null,"Buy now, pay later with ",ue),this.installmentPlan&&e("small",null,e("span",null,null===(t=this.installmentPlan)||void 0===t?void 0:t.installments.length)," ",e("span",null,this.installmentPlan.schedule," payments of")," ",e("span",{class:"fw-bold"},T(null===(i=this.installmentPlan)||void 0===i?void 0:i.installments[0].amountInCents))))):(console.warn("justifi-sezzle-payment-method: BNPL is not enabled for this account."),null)}};export{$ as justifi_apple_pay,ee as justifi_checkout_summary,oe as justifi_google_pay,se as justifi_header,le as justifi_modular_checkout,ye as justifi_plaid_payment_method,pe as justifi_saved_payment_methods,ge as justifi_sezzle_payment_method}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-DXnwIxTB.js";import{T as n}from"./p-CIOILVyM.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{f as p}from"./p-BrazW3nF.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m,S as d}from"./p-Yp5v6wmS.js";import{S as u}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-DkOiS6Zr.js";import"./p-CzedYX3W.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var n,m;try{const d=await i.fetchTerminals(t,s,o);if(d.error)return a({error:h(d.error),code:c(null===(m=d.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},d.page_info);e({terminals:(null===(n=d.data)||void 0===n?void 0:n.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new n}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new d}))}render(){return i(u,{key:"bdd2e2c152c5d1482d6b90ad60b9d4c0bbaca0b3"},i("terminals-list-core",{key:"2444663ce45854b825f8a78cb15a25a0b5111d52",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
@@ -1 +0,0 @@
1
- import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import{c as i}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as s,a as o}from"./p-Cjcsf8ku.js";import{i as r}from"./p-BrazW3nF.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as n,J as d}from"./p-DXnwIxTB.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as l}from"./p-CPRPR6fJ.js";import{T as f,l as u,a as m,b,c as y,d as w,e as _,f as T,g as j,h as g,i as v,j as k,k as C}from"./p-BTzt8N0l.js";import{S as D}from"./p-BP2sTIQV.js";import{T as P}from"./p-CZfYo5-1.js";import{a as S}from"./p-BS7OgSQe.js";import{S as I,T as B}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-CzedYX3W.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const q={id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:I,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:I,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:I,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},O={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},x={id:e=>t("td",{part:B(e.id)},e.id),account_id:e=>t("td",{part:B(e.account_id)},e.account_id),payout_id:e=>t("td",{part:B(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:B(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:B(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:B(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:B(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:B(e.currency)},e.currency),description:e=>t("td",{part:B(e.description)},e.description),source_id:e=>t("td",{part:B(e.source_id)},e.source_id),txn_type:e=>t("td",{part:B(e.txn_type)},O[e.txn_type]),created_at:e=>t("td",{part:B(e.created_at)},t("div",{class:"fw-bold"},S(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:B(e.available_on)},t("div",{class:"fw-bold"},S(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:B(e.updated_at)},t("div",{class:"fw-bold"},S(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.updated_at,{showTime:!0})))},E=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:P.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,q,x),n(),this.analytics=new d(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:i,onSuccess:o,onError:c,final:n})=>{var d;try{const n=await a.fetchPayoutTransactions(t,e,i);n.error?c({error:h(n.error),code:p(null===(d=n.error)||void 0===d?void 0:d.code),severity:s.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{n()}})({accountId:i.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,s.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(D,{key:"9d34174c78f860f915141a2b78fe09f5b1e35ab8"},t(u,{key:"c8e1ee03298bce29dabdad92cc7579905e7a4257"},t(m,{key:"cecf982b4fa569819f5512dc433c274976285f1c"},t(b,{key:"5c2e0670b996008483a98a5ff1f63d58214d93af"},t(y,{key:"8d609b97cf28b499edf3c63cdfbb37a6c7ef01f1"},this.transactionsTable.columnData.map((t=>t)))),t(w,{key:"f2bede3aaefda8d56e15fc97606d665fc4f5c581"},t(_,{key:"e2316bf5827ac9b07ad601315bcb176f9cd72df0",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(T,{key:"17f8dcca75c1090fa622b5addd941397d00159c4",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"29a4ef787dbcd87f52d32c6fb486509fe1b82520",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(g,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"8e5177f727babae229bce44f45c35356bb79c25e"},t(k,{key:"39a59ab0ebbe1af53fead55d1d68980ceca37313"},t(C,{key:"72bb73b8064b8110635caf5d9a92e9aae352612e",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"5b7ea31cd08c9a33cf017ca3da3681151896b0cb",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payout_transactions_list}
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as i}from"./p-DwYM91AU.js";import{E as r}from"./p-BNqo3kt0.js";import{B as o}from"./p-B4W3my_D.js";import{m as p}from"./p-sCHf--Vc.js";import{C as e,a as m}from"./p-Cjcsf8ku.js";import{c as n,J as h}from"./p-DXnwIxTB.js";import"./p-wtuY7MT2.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-BrazW3nF.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-D2muobcE.js";import"./p-CzedYX3W.js";const a=class{constructor(i){s(this,i),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){n(),this.analytics=new h(this),this.initializeGetBusiness()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeGetBusiness(){if(!this.businessId||!this.authToken)return this.errorMessage="Invalid business id or auth token",void this.errorEvent.emit({errorCode:m.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR});this.getBusiness=p({id:this.businessId,authToken:this.authToken,service:new o})}render(){return this.errorMessage?r(this.errorMessage):i("business-details-core",{getBusiness:this.getBusiness,"onError-event":this.handleErrorEvent})}};export{a as justifi_business_details}
@@ -1 +0,0 @@
1
- import{c as s,a as e}from"./p-DiJD6Iqx.js";import{m as i,d as n,i as a,b as t,a as r,p as o,e as _,w as u,c,t as l,o as b,s as m,r as p,f as d,g as h,h as f,j as g}from"./p-avgjSJ1d.js";import{C as v}from"./p-B5rtFhtR.js";import{c as y}from"./p-DfKxeSrC.js";const w=e=>{const i=s({legal_name:c.required("Enter legal name"),website_url:u.required("Enter business website url"),email:_.required("Enter business email"),phone:o.required("Enter phone number"),doing_business_as:r.nullable(),classification:t.required("Select business classification"),industry:a.required("Enter a business industry"),date_of_incorporation:n.required("Enter date of incorporation")}),b=s({legal_name:c.required("Enter legal name"),website_url:u.nullable(),email:_.nullable(),phone:o.nullable(),doing_business_as:r.nullable(),classification:t.nullable(),industry:a.nullable(),tax_id:l.nullable(),date_of_incorporation:n.nullable()});return e?b:i},E=n=>w(n).concat(s({classification:e().required("Select business classification"),tax_id:i(v.USA).when("tax_id_last4",{is:s=>!s,then:s=>s.required(`Enter valid ${y.USA.taxIdLabel} without dashes`),otherwise:s=>s.nullable()})})),x=n=>w(n).concat(s({classification:e().required("Select business classification"),tax_id:i(v.CAN).when("tax_id_last4",{is:s=>!s,then:s=>s.required(`Enter valid ${y.CAN.taxIdLabel} without dashes`),otherwise:s=>s.nullable()})})),S=e=>{const i=s({business_revenue:g.required("Enter business revenue"),business_payment_volume:f.required("Enter business payment volume"),business_when_service_received:h.required("Select when service is received"),business_recurring_payments:d.required("Select recurring payments"),business_recurring_payments_percentage:p,business_seasonal:m.required("Select business seasonal"),business_other_payment_details:b.nullable()}),n=s({business_revenue:g.nullable(),business_payment_volume:f.nullable(),business_when_service_received:h.nullable(),business_recurring_payments:d.nullable(),business_recurring_payments_percentage:p,business_seasonal:m.nullable(),business_other_payment_details:b.nullable()});return e?n:i};export{S as a,E as b,x as c}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{A as o}from"./p-C8yN3uBj.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-BrazW3nF.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{E as p}from"./p-BNqo3kt0.js";import{c as h,J as c}from"./p-DXnwIxTB.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-DkoufM1t.js";import"./p-wtuY7MT2.js";import"./p-CzedYX3W.js";const m=o();class u{async fetchGrossVolumeChartData(t,s){return m.get({endpoint:`account/${t}/reports/gross_volume`,authToken:s})}}const d=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:t,authToken:s,service:r})=>async({onSuccess:o,onError:e})=>{var p;try{const h=await r.fetchGrossVolumeChartData(t,s);h.error?e({error:n(h.error),code:a(null===(p=h.error)||void 0===p?void 0:p.code),severity:i.ERROR}):o(h.data)}catch(t){const s=a(null==t?void 0:t.code);e({error:n(t),code:s,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?p(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
@@ -1 +0,0 @@
1
- import{r as t,c as n,h as e}from"./p-DwYM91AU.js";var r="top",i="bottom",o="right",a="left",u="auto",f=[r,i,o,a],c="start",s="end",d="viewport",l="popper",p=f.reduce((function(t,n){return t.concat([n+"-"+c,n+"-"+s])}),[]),h=[].concat(f,[u]).reduce((function(t,n){return t.concat([n,n+"-"+c,n+"-"+s])}),[]),v=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function b(t){return t?(t.nodeName||"").toLowerCase():null}function m(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function y(t){return t instanceof m(t).Element||t instanceof Element}function w(t){return t instanceof m(t).HTMLElement||t instanceof HTMLElement}function x(t){return"undefined"!=typeof ShadowRoot&&(t instanceof m(t).ShadowRoot||t instanceof ShadowRoot)}function O(t){return t.split("-")[0]}var g=Math.max,j=Math.min,k=Math.round;function M(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function E(){return!/^((?!chrome|android).)*safari/i.test(M())}function A(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),i=1,o=1;n&&w(t)&&(i=t.offsetWidth>0&&k(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&k(r.height)/t.offsetHeight||1);var a=(y(t)?m(t):window).visualViewport,u=!E()&&e,f=(r.left+(u&&a?a.offsetLeft:0))/i,c=(r.top+(u&&a?a.offsetTop:0))/o,s=r.width/i,d=r.height/o;return{width:s,height:d,top:c,right:f+s,bottom:c+d,left:f,x:f,y:c}}function q(t){var n=A(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function B(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&x(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function P(t){return m(t).getComputedStyle(t)}function L(t){return["table","td","th"].indexOf(b(t))>=0}function R(t){return((y(t)?t.ownerDocument:t.document)||window.document).documentElement}function S(t){return"html"===b(t)?t:t.assignedSlot||t.parentNode||(x(t)?t.host:null)||R(t)}function W(t){return w(t)&&"fixed"!==P(t).position?t.offsetParent:null}function T(t){for(var n=m(t),e=W(t);e&&L(e)&&"static"===P(e).position;)e=W(e);return e&&("html"===b(e)||"body"===b(e)&&"static"===P(e).position)?n:e||function(t){var n=/firefox/i.test(M());if(/Trident/i.test(M())&&w(t)&&"fixed"===P(t).position)return null;var e=S(t);for(x(e)&&(e=e.host);w(e)&&["html","body"].indexOf(b(e))<0;){var r=P(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function C(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function H(t,n,e){return g(t,j(n,e))}function I(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function z(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}function D(t){return t.split("-")[1]}var U={top:"auto",right:"auto",bottom:"auto",left:"auto"};function _(t){var n,e=t.popper,u=t.popperRect,f=t.placement,c=t.variation,d=t.offsets,l=t.position,p=t.gpuAcceleration,h=t.adaptive,v=t.roundOffsets,b=t.isFixed,y=d.x,w=void 0===y?0:y,x=d.y,O=void 0===x?0:x,g="function"==typeof v?v({x:w,y:O}):{x:w,y:O};w=g.x,O=g.y;var j=d.hasOwnProperty("x"),M=d.hasOwnProperty("y"),E=a,A=r,q=window;if(h){var B=T(e),L="clientHeight",S="clientWidth";B===m(e)&&"static"!==P(B=R(e)).position&&"absolute"===l&&(L="scrollHeight",S="scrollWidth"),(f===r||(f===a||f===o)&&c===s)&&(A=i,O-=(b&&B===q&&q.visualViewport?q.visualViewport.height:B[L])-u.height,O*=p?1:-1),f!==a&&(f!==r&&f!==i||c!==s)||(E=o,w-=(b&&B===q&&q.visualViewport?q.visualViewport.width:B[S])-u.width,w*=p?1:-1)}var W,C=Object.assign({position:l},h&&U),H=!0===v?function(t,n){var e=t.y,r=n.devicePixelRatio||1;return{x:k(t.x*r)/r||0,y:k(e*r)/r||0}}({x:w,y:O},m(e)):{x:w,y:O};return w=H.x,O=H.y,Object.assign({},C,p?((W={})[A]=M?"0":"",W[E]=j?"0":"",W.transform=(q.devicePixelRatio||1)<=1?"translate("+w+"px, "+O+"px)":"translate3d("+w+"px, "+O+"px, 0)",W):((n={})[A]=M?O+"px":"",n[E]=j?w+"px":"",n.transform="",n))}var F={passive:!0},V={left:"right",right:"left",bottom:"top",top:"bottom"};function Y(t){return t.replace(/left|right|bottom|top/g,(function(t){return V[t]}))}var G={start:"end",end:"start"};function J(t){return t.replace(/start|end/g,(function(t){return G[t]}))}function K(t){var n=m(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function N(t){return A(R(t)).left+K(t).scrollLeft}function Q(t){var n=P(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function X(t){return["html","body","#document"].indexOf(b(t))>=0?t.ownerDocument.body:w(t)&&Q(t)?t:X(S(t))}function Z(t,n){var e;void 0===n&&(n=[]);var r=X(t),i=r===(null==(e=t.ownerDocument)?void 0:e.body),o=m(r),a=i?[o].concat(o.visualViewport||[],Q(r)?r:[]):r,u=n.concat(a);return i?u:u.concat(Z(S(a)))}function $(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tt(t,n,e){return n===d?$(function(t,n){var e=m(t),r=R(t),i=e.visualViewport,o=r.clientWidth,a=r.clientHeight,u=0,f=0;if(i){o=i.width,a=i.height;var c=E();(c||!c&&"fixed"===n)&&(u=i.offsetLeft,f=i.offsetTop)}return{width:o,height:a,x:u+N(t),y:f}}(t,e)):y(n)?function(t,n){var e=A(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):$(function(t){var n,e=R(t),r=K(t),i=null==(n=t.ownerDocument)?void 0:n.body,o=g(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=g(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+N(t),f=-r.scrollTop;return"rtl"===P(i||e).direction&&(u+=g(e.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:f}}(R(t)))}function nt(t){var n,e=t.reference,u=t.element,f=t.placement,d=f?O(f):null,l=f?D(f):null,p=e.x+e.width/2-u.width/2,h=e.y+e.height/2-u.height/2;switch(d){case r:n={x:p,y:e.y-u.height};break;case i:n={x:p,y:e.y+e.height};break;case o:n={x:e.x+e.width,y:h};break;case a:n={x:e.x-u.width,y:h};break;default:n={x:e.x,y:e.y}}var v=d?C(d):null;if(null!=v){var b="y"===v?"height":"width";switch(l){case c:n[v]=n[v]-(e[b]/2-u[b]/2);break;case s:n[v]=n[v]+(e[b]/2-u[b]/2)}}return n}function et(t,n){void 0===n&&(n={});var e=n.placement,a=void 0===e?t.placement:e,u=n.strategy,c=void 0===u?t.strategy:u,s=n.boundary,p=void 0===s?"clippingParents":s,h=n.rootBoundary,v=void 0===h?d:h,m=n.elementContext,x=void 0===m?l:m,O=n.altBoundary,k=void 0!==O&&O,M=n.padding,E=void 0===M?0:M,q=I("number"!=typeof E?E:z(E,f)),L=t.rects.popper,W=t.elements[k?x===l?"reference":l:x],C=function(t,n,e,r){var i="clippingParents"===n?function(t){var n=Z(S(t)),e=["absolute","fixed"].indexOf(P(t).position)>=0&&w(t)?T(t):t;return y(e)?n.filter((function(t){return y(t)&&B(t,e)&&"body"!==b(t)})):[]}(t):[].concat(n),o=[].concat(i,[e]),a=o.reduce((function(n,e){var i=tt(t,e,r);return n.top=g(i.top,n.top),n.right=j(i.right,n.right),n.bottom=j(i.bottom,n.bottom),n.left=g(i.left,n.left),n}),tt(t,o[0],r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(y(W)?W:W.contextElement||R(t.elements.popper),p,v,c),H=A(t.elements.reference),D=nt({reference:H,element:L,placement:a}),U=$(Object.assign({},L,D)),_=x===l?U:H,F={top:C.top-_.top+q.top,bottom:_.bottom-C.bottom+q.bottom,left:C.left-_.left+q.left,right:_.right-C.right+q.right},V=t.modifiersData.offset;if(x===l&&V){var Y=V[a];Object.keys(F).forEach((function(t){var n=[o,i].indexOf(t)>=0?1:-1,e=[r,i].indexOf(t)>=0?"y":"x";F[t]+=Y[e]*n}))}return F}function rt(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,i=n.padding,o=n.flipVariations,a=n.allowedAutoPlacements,u=void 0===a?h:a,c=D(n.placement),s=c?o?p:p.filter((function(t){return D(t)===c})):f,d=s.filter((function(t){return u.indexOf(t)>=0}));0===d.length&&(d=s);var l=d.reduce((function(n,o){return n[o]=et(t,{placement:o,boundary:e,rootBoundary:r,padding:i})[O(o)],n}),{});return Object.keys(l).sort((function(t,n){return l[t]-l[n]}))}var it={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,f=t.name;if(!n.modifiersData[f]._skip){for(var s=e.mainAxis,d=void 0===s||s,l=e.altAxis,p=void 0===l||l,h=e.fallbackPlacements,v=e.padding,b=e.boundary,m=e.rootBoundary,y=e.altBoundary,w=e.flipVariations,x=void 0===w||w,g=e.allowedAutoPlacements,j=n.options.placement,k=O(j),M=h||(k!==j&&x?function(t){if(O(t)===u)return[];var n=Y(t);return[J(t),n,J(n)]}(j):[Y(j)]),E=[j].concat(M).reduce((function(t,e){return t.concat(O(e)===u?rt(n,{placement:e,boundary:b,rootBoundary:m,padding:v,flipVariations:x,allowedAutoPlacements:g}):e)}),[]),A=n.rects.reference,q=n.rects.popper,B=new Map,P=!0,L=E[0],R=0;R<E.length;R++){var S=E[R],W=O(S),T=D(S)===c,C=[r,i].indexOf(W)>=0,H=C?"width":"height",I=et(n,{placement:S,boundary:b,rootBoundary:m,altBoundary:y,padding:v}),z=C?T?o:a:T?i:r;A[H]>q[H]&&(z=Y(z));var U=Y(z),_=[];if(d&&_.push(I[W]<=0),p&&_.push(I[z]<=0,I[U]<=0),_.every((function(t){return t}))){L=S,P=!1;break}B.set(S,_)}if(P)for(var F=function(t){var n=E.find((function(n){var e=B.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return L=n,"break"},V=x?3:1;V>0&&"break"!==F(V);V--);n.placement!==L&&(n.modifiersData[f]._skip=!0,n.placement=L,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ot(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function at(t){return[r,o,i,a].some((function(n){return t[n]>=0}))}function ut(t,n,e){void 0===e&&(e=!1);var r,i,o=w(n),a=w(n)&&function(t){var n=t.getBoundingClientRect(),e=k(n.width)/t.offsetWidth||1,r=k(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=R(n),f=A(t,a,e),c={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!e)&&(("body"!==b(n)||Q(u))&&(c=(r=n)!==m(r)&&w(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:K(r)),w(n)?((s=A(n,!0)).x+=n.clientLeft,s.y+=n.clientTop):u&&(s.x=N(u))),{x:f.left+c.scrollLeft-s.x,y:f.top+c.scrollTop-s.y,width:f.width,height:f.height}}function ft(t){var n=new Map,e=new Set,r=[];function i(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),r}var ct={placement:"bottom",modifiers:[],strategy:"absolute"};function st(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function dt(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,i=void 0===r?ct:r;return function(t,n,r){void 0===r&&(r=i);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ct,i),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},f=[],c=!1,s={state:u,setOptions:function(r){var o="function"==typeof r?r(u.options):r;d(),u.options=Object.assign({},i,u.options,o),u.scrollParents={reference:y(t)?Z(t):t.contextElement?Z(t.contextElement):[],popper:Z(n)};var a,c,l=function(t){var n=ft(t);return v.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(e,u.options.modifiers),c=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return u.orderedModifiers=l.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:u,name:t.name,instance:s,options:void 0===n?{}:n});f.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!c){var t=u.elements,n=t.reference,e=t.popper;if(st(n,e)){u.rects={reference:ut(n,T(e),"fixed"===u.options.strategy),popper:q(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<u.orderedModifiers.length;r++)if(!0!==u.reset){var i=u.orderedModifiers[r],o=i.fn,a=i.options;"function"==typeof o&&(u=o({state:u,options:void 0===a?{}:a,name:i.name,instance:s})||u)}else u.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){s.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){d(),c=!0}};if(!st(t,n))return s;function d(){f.forEach((function(t){return t()})),f=[]}return s.setOptions(r).then((function(t){!c&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var lt=dt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,a=r.resize,u=void 0===a||a,f=m(n.elements.popper),c=[].concat(n.scrollParents.reference,n.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",e.update,F)})),u&&f.addEventListener("resize",e.update,F),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",e.update,F)})),u&&f.removeEventListener("resize",e.update,F)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=nt({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,i=void 0===r||r,o=e.adaptive,a=void 0===o||o,u=e.roundOffsets,f=void 0===u||u,c={placement:O(n.placement),variation:D(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,_(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,_(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},i=n.elements[t];w(i)&&b(i)&&(Object.assign(i.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],i=n.attributes[t]||{},o=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});w(r)&&b(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.name,i=t.options.offset,u=void 0===i?[0,0]:i,f=h.reduce((function(t,e){return t[e]=function(t,n,e){var i=O(t),u=[a,r].indexOf(i)>=0?-1:1,f="function"==typeof e?e(Object.assign({},n,{placement:t})):e,c=f[0],s=f[1];return c=c||0,s=(s||0)*u,[a,o].indexOf(i)>=0?{x:s,y:c}:{x:c,y:s}}(e,n.rects,u),t}),{}),c=f[n.placement],s=c.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=c.x,n.modifiersData.popperOffsets.y+=s),n.modifiersData[e]=f}},it,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,u=t.name,f=e.mainAxis,s=void 0===f||f,d=e.altAxis,l=void 0!==d&&d,p=e.tether,h=void 0===p||p,v=e.tetherOffset,b=void 0===v?0:v,m=et(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),y=O(n.placement),w=D(n.placement),x=!w,k=C(y),M="x"===k?"y":"x",E=n.modifiersData.popperOffsets,A=n.rects.reference,B=n.rects.popper,P="function"==typeof b?b(Object.assign({},n.rects,{placement:n.placement})):b,L="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),R=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,S={x:0,y:0};if(E){if(s){var W,I="y"===k?r:a,z="y"===k?i:o,U="y"===k?"height":"width",_=E[k],F=_+m[I],V=_-m[z],Y=h?-B[U]/2:0,G=w===c?A[U]:B[U],J=w===c?-B[U]:-A[U],K=n.elements.arrow,N=h&&K?q(K):{width:0,height:0},Q=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=Q[I],Z=Q[z],$=H(0,A[U],N[U]),tt=x?A[U]/2-Y-$-X-L.mainAxis:G-$-X-L.mainAxis,nt=x?-A[U]/2+Y+$+Z+L.mainAxis:J+$+Z+L.mainAxis,rt=n.elements.arrow&&T(n.elements.arrow),it=null!=(W=null==R?void 0:R[k])?W:0,ot=_+nt-it,at=H(h?j(F,_+tt-it-(rt?"y"===k?rt.clientTop||0:rt.clientLeft||0:0)):F,_,h?g(V,ot):V);E[k]=at,S[k]=at-_}if(l){var ut,ft=E[M],ct="y"===M?"height":"width",st=ft+m["x"===k?r:a],dt=ft-m["x"===k?i:o],lt=-1!==[r,a].indexOf(y),pt=null!=(ut=null==R?void 0:R[M])?ut:0,ht=lt?st:ft-A[ct]-B[ct]-pt+L.altAxis,vt=lt?ft+A[ct]+B[ct]-pt-L.altAxis:dt,bt=h&&lt?function(t,n,e){var r=H(t,n,e);return r>e?e:r}(ht,ft,vt):H(h?ht:st,ft,h?vt:dt);E[M]=bt,S[M]=bt-ft}n.modifiersData[u]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,u=t.name,c=t.options,s=e.elements.arrow,d=e.modifiersData.popperOffsets,l=O(e.placement),p=C(l),h=[a,o].indexOf(l)>=0?"height":"width";if(s&&d){var v=function(t,n){return I("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:z(t,f))}(c.padding,e),b=q(s),m="y"===p?r:a,y="y"===p?i:o,w=e.rects.reference[h]+e.rects.reference[p]-d[p]-e.rects.popper[h],x=d[p]-e.rects.reference[p],g=T(s),j=g?"y"===p?g.clientHeight||0:g.clientWidth||0:0,k=j/2-b[h]/2+(w/2-x/2),M=H(v[m],k,j-b[h]-v[y]);e.modifiersData[u]=((n={})[p]=M,n.centerOffset=M-k,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&B(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,i=n.rects.popper,o=n.modifiersData.preventOverflow,a=et(n,{elementContext:"reference"}),u=et(n,{altBoundary:!0}),f=ot(a,r),c=ot(u,i,o),s=at(f),d=at(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:s,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":s,"data-popper-escaped":d})}}]});const pt=class{constructor(e){t(this,e),this.showEvent=n(this,"showEvent"),this.hideEvent=n(this,"hideEvent"),this.placement="bottom",this.offset=[0,10],this.strategy="absolute",this.trigger="click",this.isOpen=!1}componentDidLoad(){this.popperInstance=lt(this.anchorRef,this.popperContentRef,this.popperOptions),"click"===this.trigger?window.addEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.addEventListener("mouseenter",this.show.bind(this)),this.anchorRef.addEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.addEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.addEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.addEventListener("focus",this.show.bind(this)),this.anchorRef.addEventListener("blur",this.hide.bind(this)))}disconnectedCallback(){"click"===this.trigger?window.removeEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.removeEventListener("mouseenter",this.show.bind(this)),this.anchorRef.removeEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.removeEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.removeEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.removeEventListener("focus",this.show.bind(this)),this.anchorRef.removeEventListener("blur",this.hide.bind(this)))}handleClick(t){const n=t.composedPath(),e=n.includes(this.anchorRef),r=n.includes(this.popperContentRef);!this.isOpen&&e?this.show():(this.isOpen&&!r||this.isOpen&&e)&&this.hide()}get popperOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset}}],strategy:this.strategy}}show(){this.isOpen=!0,this.popperContentRef.setAttribute("data-show",""),this.popperInstance.update(),this.showEvent.emit()}hide(){this.isOpen=!1,this.popperContentRef.removeAttribute("data-show"),this.popperInstance.update(),this.hideEvent.emit()}render(){return e("div",{key:"d41a43285190500dbdf63ebfe4c381e6ebe3c680"},e("style",{key:"c9f85586d09e78390d94a2c62815a30d5b5c72c8"},"\n .popper-content {\n display: none;\n }\n .popper-content[data-show] {\n display: block;\n z-index: 1030;\n }\n "),e("div",{key:"34cd3ce248d7856ef8cd287bf460fa663ff047da",class:"popper-content",ref:t=>this.popperContentRef=t},e("slot",{key:"8cf3cc61f96ccd087435dceb2a999bc367c110b8"})))}};export{pt as custom_popper}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{P as o}from"./p-CPRPR6fJ.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{e as p}from"./p-BrazW3nF.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-BNqo3kt0.js";import{c as m,J as c}from"./p-DXnwIxTB.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";import"./p-wtuY7MT2.js";import"./p-CzedYX3W.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.enableRecordClick=!1,this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent,enableRecordClick:this.enableRecordClick})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s,H as i}from"./p-DwYM91AU.js";import{I as a}from"./p-Ce_F4E0f.js";import{b as d,U as o,a as r,c as l,l as c}from"./p-wtuY7MT2.js";import{F as n}from"./p-BuCKkdLM.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-B5rtFhtR.js";import{n as f}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-DfKxeSrC.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput"),this.formControlBlur=t(this,"formControlBlur"),this.imask=null,this.isFocused=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=a(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,i=s.getAttribute("name"),a=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:i,value:a})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(i,{key:"589d87bd8c266abca5f90b98a4c283bbbf7395e0"},s("div",{key:"b81beb01581f1ba626e62fbd977e50ee0ce1e511",class:"form-group d-flex flex-column"},s("div",{key:"6d19e6935f4b161a803b5c977b031f47590bd9cc",class:"d-flex align-items-start gap-2"},s("label",{key:"f083814b699a6b319d487e4d604c944c25e33604",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"50dc464aa682be09049620371eda508deb4e622a",helpText:this.helpText})),s("input",{key:"bfddf6e15747db29189374015178c167a491e4ec",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(n,{key:"3f89d9f453eb3267606abc1ac4138eee97b18d22",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,a,d,o,r,l,c,n,m;const v=u[this.country],p=b[this.country];return s(i,{key:"429dd1250553f6d25f9db6d6c1379af0290718c6"},s("div",{key:"91b9d7199bea1620c7614efd25c0421d3f85c19d",class:"row gy-3"},s("div",{key:"13dd91b17d387ef9c8bc97b44a273f0984758a3a",class:"col-12"},s("form-control-text",{key:"52ecc715696aed27a6f4329971e90e90ebb971fa",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"64bc39361d02b10c75dfc8389915ce192b9f7606",class:"col-12"},s("form-control-text",{key:"a835f2f9706664dd195daa5436fe49aea2c54968",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(a=this.defaultValues)||void 0===a?void 0:a.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"ef9b02103d0d1469da092d8965d021b049e54cb5",class:"col-12"},s("form-control-text",{key:"9263360f47c6e833a904aab2e8b30d4a35d50e75",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"4609534e39659ed47350e68a64fee58616320da4",class:"col-12"},s("form-control-select",{key:"a7f94fa5ea2642cae82729951198771fd1f31380",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"eadf0a6e2e2cfbe8e476ba8abb25eab4b2b005fb",class:"col-12"},s("form-control-text",{key:"2708d2a47c8afccc470203775d494683f133174b",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(n=this.defaultValues)||void 0===n?void 0:n.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?f:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(i,{key:"c9b75fa8c884fb755cd26be4433022f278794e4e"},s("justifi-form-address-fields",{key:"2f9cfa3fc695de214d9203c680e6cb115d714b82",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
@@ -1 +0,0 @@
1
- import{r,c as s,h as t}from"./p-DwYM91AU.js";import{S as i}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as e,J as o}from"./p-DXnwIxTB.js";import{d as a}from"./p-aZ8YkDMZ.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{j as c}from"./p-BrazW3nF.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as m,a as h}from"./p-D2muobcE.js";import{A as d}from"./p-C8yN3uBj.js";import"./p-CzedYX3W.js";import"./p-wtuY7MT2.js";import"./p-BS7OgSQe.js";import"./p-DOLBAxYf.js";import"./p-BYsgavgS.js";import"./p-DkoufM1t.js";const l=d();class f{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const u=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:e,onError:o,final:a})=>{var p,d;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return o({error:h(a.error),code:m(null===(d=a.error)||void 0===d?void 0:d.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);e({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new f}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"80b94e88e1513441181fcb561ac2ccc8f15f081e"},t("terminal-orders-list-core",{key:"265b0bfcd7be64feac679690f1a3bf8b0fbbf760",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{u as justifi_terminal_orders_list}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s}from"./p-DwYM91AU.js";import{f as i}from"./p-BS7OgSQe.js";import{D as a,am as d}from"./p-wtuY7MT2.js";import{B as r}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import{S as o}from"./p-c7MCfTgE.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as u}from"./p-TKWqvm_A.js";import{D as l}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-DXnwIxTB.js";import"./p-HXpYMWUU.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BrazW3nF.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-CzedYX3W.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:f(r.error),code:p(null===(c=r.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event")}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new u})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,u,l,b;return s(c,{key:"59f2110c100006eaa4b8cb00819982f2234f9b4e"},this.isLoading&&s("div",{key:"d2340b512c798a2b1c9d24b9887873d2c640e73f",style:{marginBottom:"8px"}},s(o,{key:"12cd0d90fc08940f19ec0922d859c2c63c7ebd0d",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"377c23749691554b0e5ff3b275becc38687fc11c",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"b9f349ab2bc0ee015537627e2ae95651462aa6e6",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"d50fd4fac045b77079348b12eb395c06eb41ccf8",part:a},s("h1",{key:"acfc3c98f6676239bb09f2ebbdca302da941d99d",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"35da0ea7629aaa83570921487556beb7b523afbe"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"5fa76dfed68838b296029dd6c8ca15f4c5eec5cf",part:a},s("h1",{key:"957a70d01b207ec66d46ba453b4c4b72babb1511",class:"h4",part:d},"This payment is disputed"),s("p",{key:"402d796260f8bb49e1bcc96b80f19175b5dc71f7"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"b1ac381d59b6cd22950c59d14d43c64dfa5e92d3",class:"h5"},"Dispute details"),s("div",{key:"66e654bb296df3edd26d0d4c3c299bdb1b776e04",class:"d-table gap-2"},s("div",{key:"197ce7da42c6219c674302bc4a8f2d8151ddd824",class:"d-table-row gap-2"},s("span",{key:"ae1e3157f25342daa87d6e239e55225fffbde449",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"b784d60ab3bf41f4ef0d0f2be5ae83cd42eda746",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"4d5849d52d3e3104f0fadb5e290b2fad13ca8193",class:"d-table-row gap-2"},s("span",{key:"61ef72ba96945c2b48718037d26dc4637444cb31",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"7264a1e2aa6cfd6ff491d5e7776bb9ad3e7538d6",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"977e3301b2c5cb63b8951a624823d61b0aa1c4bd",class:"d-table-row gap-2"},s("span",{key:"c43b4aceb77c569ad78d747291fd59cbb2857f94",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"f914fcd579b5bf40cd05511eb49614f7caa550d6",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"3f72c711fae987100e3ec7f66e5027523ee496e9",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"5c18abac556deec576dc76f97be6b6d0341c37fc",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"48365ab66eacf0f9cdcf8d9dc86e141da3149e4c",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(u=this.dispute)||void 0===u?void 0:u.underReview)&&s("div",{key:"a438576b552dd40ea5b7ed779b682a46e1d93b7b"},s("h1",{key:"c1e6f4d8609bced805cb55fbcda9429e3eeda46d",class:"h4"},"This payment is disputed and under review"),s("p",{key:"dd612da3955221b741e73efc969ad33618dde9ca"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(l=this.dispute)||void 0===l?void 0:l.won)&&s("div",{key:"3a6f3f2fb5cf6135d6c8599ac301fda4652aca0b"},s("h1",{key:"f50a3aa4829a8ad799cfe97c543295e4578e974a",class:"h4"},"This payment was disputed"),s("p",{key:"7fd76cfa07b4357c292daa06cfe575f4c442f44e"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"97e042fc078f65be7c695317360119ae812a647b"},s("h1",{key:"d34c6c71cc23b818592a3422b342efbce240b74d",class:"h4"},"This payment was disputed"),s("p",{key:"083592041839632dcf8ea2d28f81e507c54142f7"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(c=r.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var c;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(c=r.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new u})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"6f1fd8e2109c806c82c63cfd046739e18cc2b3b7"},s("justifi-dispute-response-core",{key:"56cba360a731ed4054c89c11250f115a7e3b9e63","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.stepCompleteEvent=t(this,"complete-form-step-event"),this.submitEvent=t(this,"submit-event"),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"452cfcf106f40c27f34df05ae2923c0909de9245",class:"row gy-3"},s("div",{key:"d9b608a8d880310b96e98cd4a00cabfcca77dc79",class:"col-12"},s("h1",{key:"050aef1fa636d09880edc7d738d56eab2cf62e52",class:"h4",part:d},"Counter dispute")),s("div",{key:"4e6094f9240d4db3d4bc03c59754ab3d04fed5bc",class:"col-12"},this.currentStepComponent),s("div",{key:"9c1739bc4ed1a9104fd04531a11e02cbbb4f11cc",class:"col-12"},s("div",{key:"d37cda5a7689d8bf9263283eb24e1074ee3d97a0",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
@@ -1 +0,0 @@
1
- import{h as s}from"./p-DwYM91AU.js";import{G as t}from"./p-wtuY7MT2.js";import{c as a}from"./p-BYsgavgS.js";const r=a=>s("h2",{class:`header-2 ${null==a?void 0:a.class}`,part:t},a.text),o=a({}),{state:e,on:n}=o,i=a({}),{state:p}=i,l={},c=()=>{let s=!0;return Object.keys(e).forEach((t=>{null===e[t]?(p[t]=!0,s=!1):p[t]=!1})),{isValid:s}},m=(s,t)=>{const a=l.hasOwnProperty(s),r=l[s];if(!a)return l[s]=t,!1;const o=r!==t;return o&&(l[s]=t),o};export{r as H,p as a,n as b,m as h,e as i,c as v}
@@ -1 +0,0 @@
1
- import{h as o}from"./p-DwYM91AU.js";import{F as r}from"./p-wtuY7MT2.js";const s=s=>o("h1",{class:`header-1 ${null==s?void 0:s.class}`,part:r},s.text);export{s as H}