@justifi/webcomponents 6.5.1-rc.3 → 6.5.1-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (524) hide show
  1. package/dist/cjs/{GooglePay-40aEKdDF.js → Refund-Blquw3jZ.js} +0 -446
  2. package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +4 -5
  3. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  4. package/dist/cjs/{business.service-BggHdPOV.js → business.service-DrBmfEbR.js} +1 -1
  5. package/dist/cjs/card-form.cjs.entry.js +2 -2
  6. package/dist/cjs/{check-pkg-version-DuPkU5qI.js → check-pkg-version-T54BeR4n.js} +2 -2
  7. package/dist/cjs/{checkout.service-BUcIs9az.js → checkout.service-BEU6CI0t.js} +1 -1
  8. package/dist/cjs/checkout.store-BA6h-dp2.js +107 -0
  9. package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -3
  10. package/dist/cjs/custom-popper.cjs.entry.js +2 -2
  11. package/dist/cjs/{dispute.service-CxWqivLc.js → dispute.service-c0CZxPpe.js} +1 -1
  12. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  13. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  14. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  15. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  16. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +2 -2
  17. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  18. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  19. package/dist/cjs/form-control-select_3.cjs.entry.js +4 -4
  20. package/dist/cjs/{get-payment-details-D_dDxsPG.js → get-payment-details-D8UQRtX1.js} +2 -2
  21. package/dist/cjs/{get-subaccounts-_D9lzD5O.js → get-subaccounts-fKcKqvrx.js} +2 -2
  22. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  23. package/dist/cjs/hidden-input_2.cjs.entry.js +5 -5
  24. package/dist/cjs/{index-CajjbB9t.js → index-C2ITzalN.js} +0 -1
  25. package/dist/cjs/index.cjs.js +1 -1
  26. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +23 -22
  27. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +5 -6
  28. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +2 -3
  29. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  30. package/dist/cjs/{justifi-apple-pay_8.cjs.entry.js → justifi-apple-pay_7.cjs.entry.js} +253 -1124
  31. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +2 -2
  32. package/dist/cjs/justifi-business-details.cjs.entry.js +4 -5
  33. package/dist/cjs/justifi-business-form.cjs.entry.js +4 -5
  34. package/dist/cjs/justifi-checkout.cjs.entry.js +15 -14
  35. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -10
  36. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -8
  37. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  38. package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -6
  39. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +8 -9
  40. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -4
  41. package/dist/cjs/justifi-order-terminals.cjs.entry.js +9 -10
  42. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -3
  43. package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -6
  44. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -5
  45. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -7
  46. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  47. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -7
  48. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -6
  49. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -7
  50. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  51. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -8
  52. package/dist/cjs/justifi-refund-payment.cjs.entry.js +9 -10
  53. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  54. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +8 -7
  55. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  56. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +11 -12
  57. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -7
  58. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -8
  59. package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -8
  60. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +1 -1
  61. package/dist/cjs/loader.cjs.js +1 -1
  62. package/dist/cjs/{package-C6nOTkVV.js → package-JstJdxIu.js} +1 -1
  63. package/dist/cjs/pagination-menu.cjs.entry.js +3 -3
  64. package/dist/cjs/payment-details-core.cjs.entry.js +10 -11
  65. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  66. package/dist/cjs/{payment.service-wWZTmyFv.js → payment.service-DXbR13Kq.js} +1 -1
  67. package/dist/cjs/payments-list-core.cjs.entry.js +2 -3
  68. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  69. package/dist/cjs/{payout.service-CWAem5VG.js → payout.service-D0U6kzXJ.js} +1 -1
  70. package/dist/cjs/payouts-list-core.cjs.entry.js +2 -3
  71. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  72. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -4
  73. package/dist/cjs/{terminal-orders-table-DBNG4K5I.js → terminal-orders-table-BByfBAEK.js} +3 -3
  74. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  75. package/dist/cjs/{terminal.service-DSlqCGxE.js → terminal.service-BqXeiERV.js} +1 -1
  76. package/dist/cjs/terminals-list-core.cjs.entry.js +2 -3
  77. package/dist/cjs/webcomponents.cjs.js +1 -1
  78. package/dist/collection/api/index.js +0 -2
  79. package/dist/collection/collection-manifest.json +0 -1
  80. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  81. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  82. package/dist/collection/components/checkout/checkout.js +2 -2
  83. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  84. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  85. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  86. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  87. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  88. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  89. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  90. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  91. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  92. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  93. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  94. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  95. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  96. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  97. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  98. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  99. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  100. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  101. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  102. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  103. package/dist/collection/components/modular-checkout/ModularCheckout.js +0 -1
  104. package/dist/collection/components/modular-checkout/modular-checkout.js +6 -44
  105. package/dist/collection/components/modular-checkout/sub-components/bank-account-billing-form-simple.js +1 -1
  106. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +2 -2
  107. package/dist/collection/components/modular-checkout/sub-components/card-billing-form-simple.js +1 -1
  108. package/dist/collection/components/modular-checkout/sub-components/card-form.js +2 -2
  109. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  110. package/dist/collection/components/modular-checkout/sub-components/summary.js +1 -1
  111. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  112. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  113. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  114. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  115. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  116. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  117. package/dist/collection/components/payments-list/payments-list.js +1 -1
  118. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  119. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  120. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  121. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  122. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  123. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  124. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  125. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  126. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  127. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  128. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  129. package/dist/collection/components/tokenize-payment-method/internal-tokenize-payment-method.js +1 -1
  130. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  131. package/dist/collection/store/checkout.store.js +0 -4
  132. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  133. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  134. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  135. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  136. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  137. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  138. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  139. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  140. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  141. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  142. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  143. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  144. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  145. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  146. package/dist/collection/ui-components/pagination-menu/pagination-menu.js +3 -3
  147. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  148. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  149. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  150. package/dist/docs.json +3 -540
  151. package/dist/esm/{GooglePay-f7mYX17c.js → Refund-BugCdfRo.js} +1 -436
  152. package/dist/esm/bank-account-document-form-inputs_6.entry.js +3 -4
  153. package/dist/esm/bank-account-form.entry.js +2 -2
  154. package/dist/esm/{business.service-CzHfftZk.js → business.service-pWcc3kfX.js} +1 -1
  155. package/dist/esm/card-form.entry.js +2 -2
  156. package/dist/esm/{check-pkg-version-Cqb7EhvC.js → check-pkg-version-C8hgGLFx.js} +2 -2
  157. package/dist/esm/{checkout.service-BWdnJLVG.js → checkout.service-B4xSV2-X.js} +1 -1
  158. package/dist/esm/checkout.store-CaS_htQd.js +101 -0
  159. package/dist/esm/checkouts-list-core.entry.js +2 -3
  160. package/dist/esm/custom-popper.entry.js +2 -2
  161. package/dist/esm/{dispute.service-CqX5HR5o.js → dispute.service-3Kbbh1J9.js} +1 -1
  162. package/dist/esm/form-control-checkbox.entry.js +2 -2
  163. package/dist/esm/form-control-date.entry.js +2 -2
  164. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  165. package/dist/esm/form-control-monetary.entry.js +2 -2
  166. package/dist/esm/form-control-number-masked_3.entry.js +2 -2
  167. package/dist/esm/form-control-number.entry.js +2 -2
  168. package/dist/esm/form-control-radio.entry.js +2 -2
  169. package/dist/esm/form-control-select_3.entry.js +4 -4
  170. package/dist/esm/{get-payment-details-D0T7bd_-.js → get-payment-details-CakzKvOr.js} +1 -1
  171. package/dist/esm/{get-subaccounts-Gil-SOoF.js → get-subaccounts-Cw1Adtmo.js} +1 -1
  172. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  173. package/dist/esm/hidden-input_2.entry.js +5 -5
  174. package/dist/esm/{index-DkoufM1t.js → index-DCIW8z1f.js} +0 -1
  175. package/dist/esm/index.js +1 -1
  176. package/dist/esm/internal-tokenize-payment-method_7.entry.js +12 -11
  177. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +1 -2
  178. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -3
  179. package/dist/esm/justifi-additional-statement_8.entry.js +8 -8
  180. package/dist/esm/{justifi-apple-pay_8.entry.js → justifi-apple-pay_7.entry.js} +137 -1007
  181. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +2 -2
  182. package/dist/esm/justifi-business-details.entry.js +4 -5
  183. package/dist/esm/justifi-business-form.entry.js +4 -5
  184. package/dist/esm/justifi-checkout.entry.js +8 -7
  185. package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -3
  186. package/dist/esm/justifi-checkouts-list.entry.js +6 -7
  187. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  188. package/dist/esm/justifi-dispute-management.entry.js +5 -6
  189. package/dist/esm/justifi-dispute-notification_3.entry.js +8 -9
  190. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -4
  191. package/dist/esm/justifi-order-terminals.entry.js +6 -7
  192. package/dist/esm/justifi-owner-form_3.entry.js +2 -3
  193. package/dist/esm/justifi-payment-details.entry.js +5 -6
  194. package/dist/esm/justifi-payment-provisioning.entry.js +4 -5
  195. package/dist/esm/justifi-payment-transactions-list.entry.js +5 -6
  196. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  197. package/dist/esm/justifi-payments-list.entry.js +5 -6
  198. package/dist/esm/justifi-payout-details.entry.js +4 -5
  199. package/dist/esm/justifi-payout-transactions-list.entry.js +5 -6
  200. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  201. package/dist/esm/justifi-payouts-list.entry.js +6 -7
  202. package/dist/esm/justifi-refund-payment.entry.js +5 -6
  203. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  204. package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -4
  205. package/dist/esm/justifi-skeleton.entry.js +1 -1
  206. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -4
  207. package/dist/esm/justifi-terminal-orders-list.entry.js +5 -6
  208. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -3
  209. package/dist/esm/justifi-terminals-list.entry.js +6 -7
  210. package/dist/esm/justifi-tokenize-payment-method.entry.js +1 -1
  211. package/dist/esm/loader.js +1 -1
  212. package/dist/esm/{package-CzedYX3W.js → package-DEhd71m_.js} +1 -1
  213. package/dist/esm/pagination-menu.entry.js +3 -3
  214. package/dist/esm/payment-details-core.entry.js +9 -10
  215. package/dist/esm/payment-method-option.entry.js +1 -1
  216. package/dist/esm/{payment.service-CWyZF34P.js → payment.service-nExZY_sU.js} +1 -1
  217. package/dist/esm/payments-list-core.entry.js +2 -3
  218. package/dist/esm/payout-details-core.entry.js +3 -3
  219. package/dist/esm/{payout.service-CkTievFG.js → payout.service-B9-JQqU6.js} +1 -1
  220. package/dist/esm/payouts-list-core.entry.js +2 -3
  221. package/dist/esm/table-filters-menu.entry.js +1 -1
  222. package/dist/esm/terminal-orders-list-core.entry.js +3 -4
  223. package/dist/esm/{terminal-orders-table-OX3ZvzZy.js → terminal-orders-table-DsrpmD9F.js} +1 -1
  224. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  225. package/dist/esm/{terminal.service-Bu5-dhum.js → terminal.service-DvFiKAKV.js} +1 -1
  226. package/dist/esm/terminals-list-core.entry.js +2 -3
  227. package/dist/esm/webcomponents.js +1 -1
  228. package/dist/module/Analytics.js +0 -2
  229. package/dist/module/ModularCheckout.js +0 -1
  230. package/dist/module/additional-statement.js +1 -1
  231. package/dist/module/apple-pay.js +120 -1
  232. package/dist/module/bank-account-billing-form-simple.js +1 -1
  233. package/dist/module/bank-account-document-inputs.js +0 -2
  234. package/dist/module/bank-account-form.js +2 -2
  235. package/dist/module/bank-account.js +2 -2
  236. package/dist/module/business-bank-account-form-step-core.js +0 -2
  237. package/dist/module/business-bank-account-form-step.js +0 -2
  238. package/dist/module/business-terms-conditions-form-step.js +0 -2
  239. package/dist/module/business.service.js +0 -2
  240. package/dist/module/cancellation-policy.js +1 -1
  241. package/dist/module/card-billing-form-simple.js +1 -1
  242. package/dist/module/card-form.js +2 -2
  243. package/dist/module/card-form2.js +2 -2
  244. package/dist/module/checkout.service.js +0 -2
  245. package/dist/module/checkout.store.js +0 -4
  246. package/dist/module/checkouts-list-core2.js +1 -3
  247. package/dist/module/custom-popper2.js +2 -2
  248. package/dist/module/customer-details.js +1 -1
  249. package/dist/module/dispute-management-core.js +1 -1
  250. package/dist/module/dispute-notification.js +2 -2
  251. package/dist/module/dispute-response-actions.js +0 -2
  252. package/dist/module/dispute-response-core.js +1 -1
  253. package/dist/module/dispute-response.js +1 -1
  254. package/dist/module/duplicate-charge.js +1 -1
  255. package/dist/module/electronic-evidence.js +1 -1
  256. package/dist/module/form-control-checkbox2.js +2 -2
  257. package/dist/module/form-control-date2.js +2 -2
  258. package/dist/module/form-control-file-v22.js +1 -1
  259. package/dist/module/form-control-file2.js +2 -2
  260. package/dist/module/form-control-monetary2.js +2 -2
  261. package/dist/module/form-control-number-masked2.js +2 -2
  262. package/dist/module/form-control-number.js +2 -2
  263. package/dist/module/form-control-radio2.js +2 -2
  264. package/dist/module/form-control-select2.js +2 -2
  265. package/dist/module/form-control-text2.js +2 -2
  266. package/dist/module/form-control-textarea2.js +2 -2
  267. package/dist/module/get-payment-details.js +0 -2
  268. package/dist/module/get-subaccounts.js +0 -2
  269. package/dist/module/gross-payment-chart-core2.js +1 -1
  270. package/dist/module/hidden-input2.js +1 -1
  271. package/dist/module/iframe-input2.js +3 -3
  272. package/dist/module/internal-tokenize-payment-method2.js +1 -3
  273. package/dist/module/justifi-business-form.js +0 -2
  274. package/dist/module/justifi-button2.js +1 -1
  275. package/dist/module/justifi-checkout.js +40 -46
  276. package/dist/module/justifi-checkouts-list-filters.js +1 -3
  277. package/dist/module/justifi-checkouts-list.js +1 -3
  278. package/dist/module/justifi-dispute-management.js +1 -1
  279. package/dist/module/justifi-gross-payment-chart.js +0 -2
  280. package/dist/module/justifi-header2.js +1 -1
  281. package/dist/module/justifi-order-terminals.js +1 -3
  282. package/dist/module/justifi-payment-provisioning.js +0 -2
  283. package/dist/module/justifi-payment-transactions-list.js +1 -3
  284. package/dist/module/justifi-payments-list-filters.js +2 -2
  285. package/dist/module/justifi-payments-list.js +1 -3
  286. package/dist/module/justifi-payout-details.js +0 -2
  287. package/dist/module/justifi-payout-transactions-list.js +1 -3
  288. package/dist/module/justifi-payouts-list-filters.js +2 -2
  289. package/dist/module/justifi-payouts-list.js +1 -3
  290. package/dist/module/justifi-refund-payment.js +0 -2
  291. package/dist/module/justifi-saved-payment-method.js +1 -1
  292. package/dist/module/justifi-season-interruption-insurance.js +0 -2
  293. package/dist/module/justifi-skeleton.js +1 -1
  294. package/dist/module/justifi-terminal-orders-list-filters.js +2 -4
  295. package/dist/module/justifi-terminal-orders-list.js +1 -3
  296. package/dist/module/justifi-terminals-list-filters.js +1 -3
  297. package/dist/module/justifi-terminals-list.js +1 -3
  298. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  299. package/dist/module/modular-checkout.js +6 -46
  300. package/dist/module/package.js +1 -1
  301. package/dist/module/pagination-menu2.js +3 -3
  302. package/dist/module/payment-details-core2.js +8 -10
  303. package/dist/module/payment-method-option.js +1 -1
  304. package/dist/module/payment.service.js +0 -2
  305. package/dist/module/payments-list-core2.js +1 -3
  306. package/dist/module/payout-details-core2.js +3 -3
  307. package/dist/module/payout.service.js +0 -2
  308. package/dist/module/payouts-list-core2.js +1 -3
  309. package/dist/module/plaid.service.js +0 -2
  310. package/dist/module/product-or-service.js +1 -1
  311. package/dist/module/refund-policy.js +1 -1
  312. package/dist/module/save-new-payment-method.js +1 -1
  313. package/dist/module/shipping-details.js +1 -1
  314. package/dist/module/summary.js +1 -1
  315. package/dist/module/table-filters-menu2.js +1 -1
  316. package/dist/module/terminal-orders-list-core2.js +1 -3
  317. package/dist/module/terminal-quantity-selector2.js +1 -1
  318. package/dist/module/terminal.service.js +0 -2
  319. package/dist/module/terminals-list-core2.js +1 -3
  320. package/dist/types/api/Checkout.d.ts +0 -2
  321. package/dist/types/api/index.d.ts +0 -2
  322. package/dist/types/components/checkout/checkout.d.ts +0 -1
  323. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +1 -2
  324. package/dist/types/components/modular-checkout/modular-checkout.d.ts +0 -5
  325. package/dist/types/components.d.ts +0 -140
  326. package/dist/types/store/checkout.store.d.ts +0 -1
  327. package/dist/webcomponents/index.esm.js +1 -1
  328. package/dist/webcomponents/{p-a22d1078.entry.js → p-0082f428.entry.js} +1 -1
  329. package/dist/webcomponents/p-04b23547.entry.js +1 -0
  330. package/dist/webcomponents/p-04ed045b.entry.js +1 -0
  331. package/dist/webcomponents/{p-19dabeab.entry.js → p-1193a1ac.entry.js} +1 -1
  332. package/dist/webcomponents/p-159d8ae7.entry.js +1 -0
  333. package/dist/webcomponents/{p-86111a0a.entry.js → p-1edec396.entry.js} +1 -1
  334. package/dist/webcomponents/p-20608f0c.entry.js +1 -0
  335. package/dist/webcomponents/p-266a9aee.entry.js +1 -0
  336. package/dist/webcomponents/p-2bafa257.entry.js +1 -0
  337. package/dist/webcomponents/p-30f61f44.entry.js +1 -0
  338. package/dist/webcomponents/p-3101565c.entry.js +1 -0
  339. package/dist/webcomponents/p-34aa9298.entry.js +1 -0
  340. package/dist/webcomponents/p-3c38cec5.entry.js +1 -0
  341. package/dist/webcomponents/p-3c40eefe.entry.js +1 -0
  342. package/dist/webcomponents/p-42c3bda4.entry.js +1 -0
  343. package/dist/webcomponents/p-44a94dac.entry.js +1 -0
  344. package/dist/webcomponents/p-4dcbc0af.entry.js +1 -0
  345. package/dist/webcomponents/{p-f2650bfc.entry.js → p-4e23116c.entry.js} +1 -1
  346. package/dist/webcomponents/{p-3bacf834.entry.js → p-58ae4f9e.entry.js} +1 -1
  347. package/dist/webcomponents/p-5a3687bf.entry.js +1 -0
  348. package/dist/webcomponents/p-5c8c88c6.entry.js +1 -0
  349. package/dist/webcomponents/p-614b0adc.entry.js +1 -0
  350. package/dist/webcomponents/p-7081eb35.entry.js +1 -0
  351. package/dist/webcomponents/p-7128920a.entry.js +1 -0
  352. package/dist/webcomponents/p-7218c312.entry.js +1 -0
  353. package/dist/webcomponents/p-73388c68.entry.js +1 -0
  354. package/dist/webcomponents/p-77b76007.entry.js +1 -0
  355. package/dist/webcomponents/p-77bd4fb0.entry.js +1 -0
  356. package/dist/webcomponents/p-7a3d9c24.entry.js +1 -0
  357. package/dist/webcomponents/p-8c07d9f0.entry.js +1 -0
  358. package/dist/webcomponents/p-8cfda6c1.entry.js +1 -0
  359. package/dist/webcomponents/p-90de8098.entry.js +1 -0
  360. package/dist/webcomponents/p-98b8028e.entry.js +1 -0
  361. package/dist/webcomponents/p-9efd1bce.entry.js +1 -0
  362. package/dist/webcomponents/p-9fef2496.entry.js +1 -0
  363. package/dist/webcomponents/{p-DUs94fK3.js → p-B4ZUYyNh.js} +1 -1
  364. package/dist/webcomponents/{p-B4W3my_D.js → p-BCPutgAi.js} +1 -1
  365. package/dist/webcomponents/p-BojLBYsY.js +1 -0
  366. package/dist/webcomponents/p-BpaE8q5f.js +1 -0
  367. package/dist/webcomponents/{p-DXnwIxTB.js → p-C6wS5-M7.js} +1 -1
  368. package/dist/webcomponents/{p-DeX_cIoV.js → p-C8QOezo8.js} +1 -1
  369. package/dist/webcomponents/{p-aZ8YkDMZ.js → p-CFevTCAJ.js} +1 -1
  370. package/dist/webcomponents/{p-CPRPR6fJ.js → p-CPtsjcdm.js} +1 -1
  371. package/dist/webcomponents/p-Ch9cTPyq.js +1 -0
  372. package/dist/webcomponents/p-DCIW8z1f.js +1 -0
  373. package/dist/webcomponents/p-DEhd71m_.js +1 -0
  374. package/dist/webcomponents/p-DU8dqq9U.js +1 -0
  375. package/dist/webcomponents/{p-TKWqvm_A.js → p-D_IJC4HG.js} +1 -1
  376. package/dist/webcomponents/p-MQxr_LMC.js +1 -0
  377. package/dist/webcomponents/p-a54b8901.entry.js +1 -0
  378. package/dist/webcomponents/p-a655b996.entry.js +1 -0
  379. package/dist/webcomponents/p-a7f8cacb.entry.js +1 -0
  380. package/dist/webcomponents/p-a9bd4e27.entry.js +1 -0
  381. package/dist/webcomponents/{p-03c8c754.entry.js → p-aec9185f.entry.js} +1 -1
  382. package/dist/webcomponents/{p-4e71de94.entry.js → p-af48a6bb.entry.js} +1 -1
  383. package/dist/webcomponents/p-b24a2971.entry.js +1 -0
  384. package/dist/webcomponents/p-bf8cf72d.entry.js +1 -0
  385. package/dist/webcomponents/p-c364c76d.entry.js +1 -0
  386. package/dist/webcomponents/p-c3b71a1f.entry.js +1 -0
  387. package/dist/webcomponents/{p-f528da70.entry.js → p-cd10cd05.entry.js} +1 -1
  388. package/dist/webcomponents/p-cfd858be.entry.js +1 -0
  389. package/dist/webcomponents/p-d1951301.entry.js +1 -0
  390. package/dist/webcomponents/p-d39598e4.entry.js +1 -0
  391. package/dist/webcomponents/p-dc0d3484.entry.js +1 -0
  392. package/dist/webcomponents/{p-88074dd7.entry.js → p-de35abb6.entry.js} +1 -1
  393. package/dist/webcomponents/p-e47a2592.entry.js +1 -0
  394. package/dist/webcomponents/p-eb56ba9b.entry.js +1 -0
  395. package/dist/webcomponents/{p-e7e5fee9.entry.js → p-ed55d333.entry.js} +1 -1
  396. package/dist/webcomponents/p-edcb84bf.entry.js +1 -0
  397. package/dist/webcomponents/{p-aaed4997.entry.js → p-f0957fca.entry.js} +1 -1
  398. package/dist/webcomponents/p-f0fc86ce.entry.js +1 -0
  399. package/dist/webcomponents/p-f223fabb.entry.js +1 -0
  400. package/dist/webcomponents/p-f26db2e6.entry.js +1 -0
  401. package/dist/webcomponents/p-fab28b02.entry.js +1 -0
  402. package/dist/webcomponents/webcomponents.esm.js +1 -1
  403. package/docs/.eslintrc.cjs +17 -0
  404. package/docs/changelog/index.mdx +17 -0
  405. package/docs/entities/businessdetails/index.mdx +158 -0
  406. package/docs/entities/businessform/index.mdx +241 -0
  407. package/docs/entities/index.mdx +19 -0
  408. package/docs/entities/payment-provisioning/index.mdx +131 -0
  409. package/docs/frameworks/angular/index.mdx +112 -0
  410. package/docs/frameworks/index.mdx +18 -0
  411. package/docs/frameworks/react/index.mdx +125 -0
  412. package/docs/frameworks/vue/index.mdx +102 -0
  413. package/docs/helpers/PartsTable.js +50 -0
  414. package/docs/helpers/PartsTable.ts +55 -0
  415. package/docs/helpers/PropsTable.js +56 -0
  416. package/docs/helpers/PropsTable.ts +63 -0
  417. package/docs/helpers/index.js +4 -0
  418. package/docs/helpers/index.ts +3 -0
  419. package/docs/helpers/version.js +32 -0
  420. package/docs/helpers/version.ts +32 -0
  421. package/docs/introduction/index.mdx +125 -0
  422. package/docs/merchant-tools/checkouts-list/index.mdx +107 -0
  423. package/docs/merchant-tools/gross-payments-chart/index.mdx +81 -0
  424. package/docs/merchant-tools/index.mdx +25 -0
  425. package/docs/merchant-tools/order-terminals/index.mdx +84 -0
  426. package/docs/merchant-tools/payment-details/index.mdx +130 -0
  427. package/docs/merchant-tools/payment-transactions-list/index.mdx +85 -0
  428. package/docs/merchant-tools/payments-list/index.mdx +111 -0
  429. package/docs/merchant-tools/payout-details/index.mdx +90 -0
  430. package/docs/merchant-tools/payout-transactions-list/index.mdx +84 -0
  431. package/docs/merchant-tools/payouts-list/index.mdx +94 -0
  432. package/docs/merchant-tools/terminal-orders-list/index.mdx +85 -0
  433. package/docs/merchant-tools/terminals-list/index.mdx +93 -0
  434. package/docs/modular-checkout/complete-examples/index.mdx +20 -0
  435. package/docs/modular-checkout/docs/index.mdx +32 -0
  436. package/docs/modular-checkout/example/index.mdx +25 -0
  437. package/docs/modular-checkout/index.mdx +25 -0
  438. package/docs/modular-checkout/introduction/index.mdx +100 -0
  439. package/docs/modular-checkout/sub-components/apple-pay.mdx +96 -0
  440. package/docs/modular-checkout/sub-components/bank-account-form.mdx +162 -0
  441. package/docs/modular-checkout/sub-components/card-form.mdx +177 -0
  442. package/docs/modular-checkout/sub-components/index.mdx +23 -0
  443. package/docs/modular-checkout/sub-components/payment-method-options.mdx +85 -0
  444. package/docs/modular-checkout/sub-components/plaid-payment-method.mdx +175 -0
  445. package/docs/modular-checkout/sub-components/saved-payment-methods.mdx +177 -0
  446. package/docs/modular-checkout/sub-components/season-interruption-insurance.mdx +219 -0
  447. package/docs/modular-checkout/sub-components/sezzle-payment-method.mdx +183 -0
  448. package/docs/modular-checkout/sub-components/summary.mdx +107 -0
  449. package/docs/payment-facilitation/dispute-management/index.mdx +98 -0
  450. package/docs/payment-facilitation/index.mdx +21 -0
  451. package/docs/payment-facilitation/refund-payment/index.mdx +229 -0
  452. package/docs/payment-facilitation/tokenize-payment-method/index.mdx +361 -0
  453. package/docs/payment-facilitation/unified-fintech-checkout/342/204/242/index.mdx +164 -0
  454. package/package.json +21 -6
  455. package/dist/collection/api/GooglePay.js +0 -212
  456. package/dist/collection/api/services/google-pay.service.js +0 -368
  457. package/dist/collection/components/modular-checkout/sub-components/google-pay-skeleton.js +0 -10
  458. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +0 -706
  459. package/dist/collection/ui-components/google-pay-button.js +0 -251
  460. package/dist/module/ApplePay.js +0 -121
  461. package/dist/module/GooglePay.js +0 -215
  462. package/dist/module/google-pay.js +0 -1006
  463. package/dist/module/justifi-google-pay.d.ts +0 -11
  464. package/dist/module/justifi-google-pay.js +0 -6
  465. package/dist/types/api/GooglePay.d.ts +0 -271
  466. package/dist/types/api/services/google-pay.service.d.ts +0 -60
  467. package/dist/types/components/modular-checkout/sub-components/google-pay-skeleton.d.ts +0 -6
  468. package/dist/types/components/modular-checkout/sub-components/google-pay.d.ts +0 -59
  469. package/dist/types/ui-components/google-pay-button.d.ts +0 -18
  470. package/dist/webcomponents/p-0437c330.entry.js +0 -1
  471. package/dist/webcomponents/p-065b24c3.entry.js +0 -1
  472. package/dist/webcomponents/p-0772719b.entry.js +0 -1
  473. package/dist/webcomponents/p-136b29e3.entry.js +0 -1
  474. package/dist/webcomponents/p-14cbf366.entry.js +0 -1
  475. package/dist/webcomponents/p-1e014ee7.entry.js +0 -1
  476. package/dist/webcomponents/p-1f196690.entry.js +0 -1
  477. package/dist/webcomponents/p-20e66fc0.entry.js +0 -1
  478. package/dist/webcomponents/p-22fdf7a4.entry.js +0 -1
  479. package/dist/webcomponents/p-25755af4.entry.js +0 -1
  480. package/dist/webcomponents/p-270bf699.entry.js +0 -1
  481. package/dist/webcomponents/p-2da4e6ca.entry.js +0 -1
  482. package/dist/webcomponents/p-2eb123a3.entry.js +0 -1
  483. package/dist/webcomponents/p-3ae12b98.entry.js +0 -1
  484. package/dist/webcomponents/p-3d3a65ca.entry.js +0 -1
  485. package/dist/webcomponents/p-3f291e6b.entry.js +0 -1
  486. package/dist/webcomponents/p-44011a41.entry.js +0 -1
  487. package/dist/webcomponents/p-4ccd753b.entry.js +0 -1
  488. package/dist/webcomponents/p-4f102cfd.entry.js +0 -1
  489. package/dist/webcomponents/p-4f16a3ce.entry.js +0 -1
  490. package/dist/webcomponents/p-50a32503.entry.js +0 -1
  491. package/dist/webcomponents/p-57ed105e.entry.js +0 -1
  492. package/dist/webcomponents/p-5e3bc1dc.entry.js +0 -1
  493. package/dist/webcomponents/p-62cfe9b6.entry.js +0 -1
  494. package/dist/webcomponents/p-6a075da4.entry.js +0 -1
  495. package/dist/webcomponents/p-8c16e4aa.entry.js +0 -1
  496. package/dist/webcomponents/p-8ee61443.entry.js +0 -1
  497. package/dist/webcomponents/p-8efea1e4.entry.js +0 -1
  498. package/dist/webcomponents/p-914b590d.entry.js +0 -1
  499. package/dist/webcomponents/p-A2FbmAEt.js +0 -1
  500. package/dist/webcomponents/p-BrazW3nF.js +0 -1
  501. package/dist/webcomponents/p-CIOILVyM.js +0 -1
  502. package/dist/webcomponents/p-CzedYX3W.js +0 -1
  503. package/dist/webcomponents/p-DkoufM1t.js +0 -1
  504. package/dist/webcomponents/p-Yp5v6wmS.js +0 -1
  505. package/dist/webcomponents/p-a020c889.entry.js +0 -1
  506. package/dist/webcomponents/p-a6e816f6.entry.js +0 -1
  507. package/dist/webcomponents/p-aa42e3c1.entry.js +0 -1
  508. package/dist/webcomponents/p-ad0f8d85.entry.js +0 -1
  509. package/dist/webcomponents/p-ad9307c1.entry.js +0 -1
  510. package/dist/webcomponents/p-b8c47cb1.entry.js +0 -1
  511. package/dist/webcomponents/p-c11e6c03.entry.js +0 -1
  512. package/dist/webcomponents/p-c41191e7.entry.js +0 -1
  513. package/dist/webcomponents/p-c5af7149.entry.js +0 -1
  514. package/dist/webcomponents/p-c621e7af.entry.js +0 -1
  515. package/dist/webcomponents/p-c7df4370.entry.js +0 -1
  516. package/dist/webcomponents/p-cf9d8e1a.entry.js +0 -1
  517. package/dist/webcomponents/p-d3663663.entry.js +0 -1
  518. package/dist/webcomponents/p-daedfe82.entry.js +0 -1
  519. package/dist/webcomponents/p-dd11e67b.entry.js +0 -1
  520. package/dist/webcomponents/p-e3ab5fe2.entry.js +0 -1
  521. package/dist/webcomponents/p-e95e27af.entry.js +0 -1
  522. package/dist/webcomponents/p-f4cb581f.entry.js +0 -1
  523. package/dist/webcomponents/p-f66778b8.entry.js +0 -1
  524. package/dist/webcomponents/p-ff212635.entry.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{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 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}