@adyen/adyen-platform-experience-web 1.3.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adyen-platform-experience-web.css +1 -1
- package/dist/{angle-right-reGJ7jfy.cjs → angle-right-DoWVn5wu.cjs} +2 -2
- package/dist/{angle-right-reGJ7jfy.cjs.map → angle-right-DoWVn5wu.cjs.map} +1 -1
- package/dist/{checkmark-DLQ0eQ9B.cjs → checkmark-CJGA8ZP3.cjs} +2 -2
- package/dist/{checkmark-DLQ0eQ9B.cjs.map → checkmark-CJGA8ZP3.cjs.map} +1 -1
- package/dist/{checkmark-circle-fill-daKF6pt4.cjs → checkmark-circle-fill-CAB5gukT.cjs} +2 -2
- package/dist/{checkmark-circle-fill-daKF6pt4.cjs.map → checkmark-circle-fill-CAB5gukT.cjs.map} +1 -1
- package/dist/{checkmark-square-fill-B6wYCtwy.cjs → checkmark-square-fill-CiZmFh_I.cjs} +2 -2
- package/dist/{checkmark-square-fill-B6wYCtwy.cjs.map → checkmark-square-fill-CiZmFh_I.cjs.map} +1 -1
- package/dist/{chevron-down-DN0sbcES.cjs → chevron-down-Dta7QXOA.cjs} +2 -2
- package/dist/{chevron-down-DN0sbcES.cjs.map → chevron-down-Dta7QXOA.cjs.map} +1 -1
- package/dist/{chevron-left-DQy9RoLd.cjs → chevron-left-B5Al1d4a.cjs} +2 -2
- package/dist/{chevron-left-DQy9RoLd.cjs.map → chevron-left-B5Al1d4a.cjs.map} +1 -1
- package/dist/{chevron-right-C1v8rslw.cjs → chevron-right-D4tgeCRD.cjs} +2 -2
- package/dist/{chevron-right-C1v8rslw.cjs.map → chevron-right-D4tgeCRD.cjs.map} +1 -1
- package/dist/{chevron-up-DLQHTfYo.cjs → chevron-up-BnS-kgE5.cjs} +2 -2
- package/dist/{chevron-up-DLQHTfYo.cjs.map → chevron-up-BnS-kgE5.cjs.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{copy-BAyT_BYn.cjs → copy-Cw-eOhqB.cjs} +2 -2
- package/dist/{copy-BAyT_BYn.cjs.map → copy-Cw-eOhqB.cjs.map} +1 -1
- package/dist/{cross-8jn1CRBO.cjs → cross-L2Paef-M.cjs} +2 -2
- package/dist/{cross-8jn1CRBO.cjs.map → cross-L2Paef-M.cjs.map} +1 -1
- package/dist/{cross-circle-fill-DUcHCmLb.cjs → cross-circle-fill-DJTPa1qC.cjs} +2 -2
- package/dist/{cross-circle-fill-DUcHCmLb.cjs.map → cross-circle-fill-DJTPa1qC.cjs.map} +1 -1
- package/dist/da-DK-DHGqGo8Q.cjs +2 -0
- package/dist/da-DK-DHGqGo8Q.cjs.map +1 -0
- package/dist/de-DE-k_BRPv7a.cjs +2 -0
- package/dist/de-DE-k_BRPv7a.cjs.map +1 -0
- package/dist/{download-BwO4dcZi.cjs → download-m1Wy-73V.cjs} +2 -2
- package/dist/{download-BwO4dcZi.cjs.map → download-m1Wy-73V.cjs.map} +1 -1
- package/dist/es/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.js +5 -5
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetail.js +22 -0
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetails.js +34 -0
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/utils.js +46 -0
- package/dist/es/components/external/CapitalOverview/components/CapitalOverview/CapitalOverview.js +58 -58
- package/dist/es/components/external/CapitalOverview/components/GrantAdjustmentDetails/GrantAdjustmentDetails.js +34 -0
- package/dist/es/components/external/CapitalOverview/components/GrantAdjustmentDetails/constants.js +7 -0
- package/dist/es/components/external/CapitalOverview/components/GrantItem/GrantItem.js +71 -51
- package/dist/es/components/external/CapitalOverview/components/GrantItem/constants.js +4 -2
- package/dist/es/components/external/CapitalOverview/components/GrantItem/utils.js +17 -10
- package/dist/es/components/external/CapitalOverview/components/GrantList/GrantList.js +24 -23
- package/dist/es/components/external/CapitalOverview/components/GrantList/GrantsDisplay.js +36 -23
- package/dist/es/components/external/CapitalOverview/components/GrantRepaymentDetails/GrantRepaymentDetails.js +54 -0
- package/dist/es/components/external/PayoutDetails/components/PayoutData.js +142 -92
- package/dist/es/components/external/PayoutDetails/components/constants.js +14 -9
- package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +108 -90
- package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +33 -31
- package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +81 -64
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +69 -75
- package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionData.js +5 -5
- package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.js +138 -129
- package/dist/es/components/external/TransactionDetails/components/details/TransactionDataProperties.js +72 -42
- package/dist/es/components/external/TransactionDetails/context/details/context.js +46 -38
- package/dist/es/components/external/TransactionsOverview/components/MultiSelectionFilter/MultiSelectionFilter.js +8 -8
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +19 -19
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TransactionTotals.js +23 -23
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +144 -141
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/PaymentMethodCell.js +13 -13
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +37 -38
- package/dist/es/components/external/UIElement/UIElement.js +29 -26
- package/dist/es/components/internal/AnchorButton/AnchorButton.js +11 -11
- package/dist/es/components/internal/Button/Button.js +16 -16
- package/dist/es/components/internal/Button/ButtonActions/ButtonActions.js +15 -13
- package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +27 -27
- package/dist/es/components/internal/Button/constants.js +12 -11
- package/dist/es/components/internal/CopyText/CopyText.js +17 -21
- package/dist/es/components/internal/DataGrid/DataGridCell.js +16 -17
- package/dist/es/components/internal/DataGrid/components/TableCells.js +40 -19
- package/dist/es/components/internal/DataGrid/components/TableHeaderCell.js +12 -13
- package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +62 -47
- package/dist/es/components/internal/DataOverviewDisplay/DataDetailsModal.js +14 -13
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +1 -1
- package/dist/es/components/internal/FilterBar/FilterBar.js +20 -20
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +50 -50
- package/dist/es/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.js +23 -21
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +42 -42
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +15 -15
- package/dist/es/components/internal/Icon/Icon.js +1 -0
- package/dist/es/components/internal/Link/Link.js +40 -0
- package/dist/es/components/internal/Modal/Modal.js +18 -18
- package/dist/es/components/internal/Modal/ModalContent/ModalContent.js +13 -13
- package/dist/es/components/internal/StructuredList/StructuredList.js +24 -23
- package/dist/es/components/internal/StructuredList/constants.js +6 -5
- package/dist/es/components/internal/StructuredList/useStructuredListItem.js +9 -7
- package/dist/es/components/internal/Tooltip/Tooltip.js +32 -28
- package/dist/es/components/utils/customData/hasCustomField.js +22 -0
- package/dist/es/components/utils/customData/mergeRecords.js +13 -0
- package/dist/es/core/Context/CoreContext.js +4 -3
- package/dist/es/core/Context/CoreProvider.js +15 -14
- package/dist/es/core/Http/utils.js +1 -1
- package/dist/es/core/core.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.module.js +18 -17
- package/dist/es/external/preact/dist/preact.module.js +10 -6
- package/dist/es/hooks/useContainerQuery.js +37 -0
- package/dist/es/hooks/useCustomColumnsData.js +24 -21
- package/dist/es/hooks/useResponsiveContainer.js +24 -0
- package/dist/es/hooks/useTableColumns.js +43 -23
- package/dist/es/images/icons/external-link.svg.js +6 -0
- package/dist/es/translations/da-DK.json.js +51 -41
- package/dist/es/translations/de-DE.json.js +63 -53
- package/dist/es/translations/en-US.json.js +39 -29
- package/dist/es/translations/es-ES.json.js +79 -69
- package/dist/es/translations/fi-FI.json.js +59 -49
- package/dist/es/translations/fr-FR.json.js +77 -67
- package/dist/es/translations/it-IT.json.js +55 -45
- package/dist/es/translations/nl-NL.json.js +35 -25
- package/dist/es/translations/no-NO.json.js +43 -33
- package/dist/es/translations/pt-BR.json.js +100 -90
- package/dist/es/translations/sv-SE.json.js +47 -37
- package/dist/es-ES-Cy-9bm8z.cjs +2 -0
- package/dist/es-ES-Cy-9bm8z.cjs.map +1 -0
- package/dist/external-link-DnmxrmjV.cjs +2 -0
- package/dist/external-link-DnmxrmjV.cjs.map +1 -0
- package/dist/fi-FI-C7ICLuS8.cjs +2 -0
- package/dist/fi-FI-C7ICLuS8.cjs.map +1 -0
- package/dist/{filter-DGCUlKbX.cjs → filter-CyAjNvvu.cjs} +2 -2
- package/dist/{filter-DGCUlKbX.cjs.map → filter-CyAjNvvu.cjs.map} +1 -1
- package/dist/fr-FR-DH8euUOp.cjs +2 -0
- package/dist/fr-FR-DH8euUOp.cjs.map +1 -0
- package/dist/index-LzoB__Hj.cjs +12 -0
- package/dist/index-LzoB__Hj.cjs.map +1 -0
- package/dist/{info-filled-y_-s_7-J.cjs → info-filled-DNy-1YG1.cjs} +2 -2
- package/dist/{info-filled-y_-s_7-J.cjs.map → info-filled-DNy-1YG1.cjs.map} +1 -1
- package/dist/it-IT-DsfPVAun.cjs +2 -0
- package/dist/it-IT-DsfPVAun.cjs.map +1 -0
- package/dist/{minus-circle-outline-BombUmpi.cjs → minus-circle-outline-BRBYMsfi.cjs} +2 -2
- package/dist/{minus-circle-outline-BombUmpi.cjs.map → minus-circle-outline-BRBYMsfi.cjs.map} +1 -1
- package/dist/nl-NL-DP_t6EpF.cjs +2 -0
- package/dist/nl-NL-DP_t6EpF.cjs.map +1 -0
- package/dist/no-NO-ARsXLWv0.cjs +2 -0
- package/dist/no-NO-ARsXLWv0.cjs.map +1 -0
- package/dist/{plus-circle-outline-2EQEIXAM.cjs → plus-circle-outline-C077N1t1.cjs} +2 -2
- package/dist/{plus-circle-outline-2EQEIXAM.cjs.map → plus-circle-outline-C077N1t1.cjs.map} +1 -1
- package/dist/pt-BR-CuTqntp7.cjs +2 -0
- package/dist/pt-BR-CuTqntp7.cjs.map +1 -0
- package/dist/{square-Ds2_OrAo.cjs → square-B8n_Cd4N.cjs} +2 -2
- package/dist/{square-Ds2_OrAo.cjs.map → square-B8n_Cd4N.cjs.map} +1 -1
- package/dist/sv-SE-DDAIHLKD.cjs +2 -0
- package/dist/sv-SE-DDAIHLKD.cjs.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/AccountDetail.d.ts +14 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/AccountDetail.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/AccountDetails.d.ts +5 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/AccountDetails.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/types.d.ts +10 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/types.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/utils.d.ts +5 -0
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/utils.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/GrantAdjustmentDetails/GrantAdjustmentDetails.d.ts +10 -0
- package/dist/types/components/external/CapitalOverview/components/GrantAdjustmentDetails/GrantAdjustmentDetails.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/GrantAdjustmentDetails/constants.d.ts +5 -0
- package/dist/types/components/external/CapitalOverview/components/GrantAdjustmentDetails/constants.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/GrantAdjustmentDetails/types.d.ts +10 -0
- package/dist/types/components/external/CapitalOverview/components/GrantAdjustmentDetails/types.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/GrantItem/GrantItem.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantItem/constants.d.ts +2 -0
- package/dist/types/components/external/CapitalOverview/components/GrantItem/constants.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantItem/types.d.ts +21 -0
- package/dist/types/components/external/CapitalOverview/components/GrantItem/types.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantItem/utils.d.ts +2 -19
- package/dist/types/components/external/CapitalOverview/components/GrantItem/utils.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantList/GrantList.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantList/GrantsDisplay.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantList/types.d.ts +2 -1
- package/dist/types/components/external/CapitalOverview/components/GrantList/types.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantRepaymentDetails/GrantRepaymentDetails.d.ts +5 -0
- package/dist/types/components/external/CapitalOverview/components/GrantRepaymentDetails/GrantRepaymentDetails.d.ts.map +1 -0
- package/dist/types/components/external/PayoutDetails/PayoutDetails.d.ts +3 -3
- package/dist/types/components/external/PayoutDetails/PayoutDetails.d.ts.map +1 -1
- package/dist/types/components/external/PayoutDetails/components/PayoutData.d.ts +6 -1
- package/dist/types/components/external/PayoutDetails/components/PayoutData.d.ts.map +1 -1
- package/dist/types/components/external/PayoutDetails/components/constants.d.ts +5 -0
- package/dist/types/components/external/PayoutDetails/components/constants.d.ts.map +1 -1
- package/dist/types/components/external/PayoutDetails/types.d.ts +8 -0
- package/dist/types/components/external/PayoutDetails/types.d.ts.map +1 -0
- package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts +1 -1
- package/dist/types/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.d.ts.map +1 -1
- package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts +5 -0
- package/dist/types/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.d.ts.map +1 -1
- package/dist/types/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.d.ts +1 -1
- package/dist/types/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.d.ts.map +1 -1
- package/dist/types/components/external/ReportsOverview/components/ReportsTable/ReportsTable.d.ts +5 -0
- package/dist/types/components/external/ReportsOverview/components/ReportsTable/ReportsTable.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts +3 -3
- package/dist/types/components/external/TransactionDetails/TransactionDetails.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionData/TransactionData.d.ts +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionData/TransactionData.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.d.ts +2 -1
- package/dist/types/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/constants.d.ts +1 -1
- package/dist/types/components/external/TransactionDetails/components/constants.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/details/TransactionDataProperties.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/context/details/context.d.ts +1 -1
- package/dist/types/components/external/TransactionDetails/context/details/context.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/context/details/types.d.ts +3 -1
- package/dist/types/components/external/TransactionDetails/context/details/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/context/refund/hooks/useRefundAction.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/types.d.ts +15 -3
- package/dist/types/components/external/TransactionDetails/types.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.d.ts.map +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts +1 -1
- package/dist/types/components/external/TransactionsOverview/components/TransactionsTable/types.d.ts.map +1 -1
- package/dist/types/components/external/UIElement/UIElement.d.ts +2 -0
- package/dist/types/components/external/UIElement/UIElement.d.ts.map +1 -1
- package/dist/types/components/internal/Button/Button.d.ts.map +1 -1
- package/dist/types/components/internal/Button/ButtonActions/ButtonActions.d.ts.map +1 -1
- package/dist/types/components/internal/Button/ButtonActions/types.d.ts +1 -0
- package/dist/types/components/internal/Button/ButtonActions/types.d.ts.map +1 -1
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +16 -0
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -1
- package/dist/types/components/internal/Button/constants.d.ts +1 -0
- package/dist/types/components/internal/Button/constants.d.ts.map +1 -1
- package/dist/types/components/internal/CopyText/CopyText.d.ts +8 -6
- package/dist/types/components/internal/CopyText/CopyText.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts +3 -2
- package/dist/types/components/internal/DataGrid/components/TableCells.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/types/components/internal/DataGrid/types.d.ts +1 -4
- package/dist/types/components/internal/DataGrid/types.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDetails/DataOverviewDetails.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDetails/types.d.ts +8 -3
- package/dist/types/components/internal/DataOverviewDetails/types.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDisplay/DataDetailsModal.d.ts +2 -0
- package/dist/types/components/internal/DataOverviewDisplay/DataDetailsModal.d.ts.map +1 -1
- package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/index.d.ts +3 -0
- package/dist/types/components/internal/DataOverviewDisplay/DataOverviewHeader/index.d.ts.map +1 -0
- package/dist/types/components/internal/FilterBar/FilterBar.d.ts +2 -2
- package/dist/types/components/internal/FilterBar/FilterBar.d.ts.map +1 -1
- package/dist/types/components/internal/FilterBar/types.d.ts +1 -1
- package/dist/types/components/internal/FilterBar/types.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/BalanceAccountSelector/BalanceAccountSelector.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectButton.d.ts.map +1 -1
- package/dist/types/components/internal/Icon/Icon.d.ts +1 -0
- package/dist/types/components/internal/Icon/Icon.d.ts.map +1 -1
- package/dist/types/components/internal/Link/Link.d.ts +6 -0
- package/dist/types/components/internal/Link/Link.d.ts.map +1 -0
- package/dist/types/components/internal/Link/types.d.ts +15 -0
- package/dist/types/components/internal/Link/types.d.ts.map +1 -0
- package/dist/types/components/internal/Modal/ModalContent/ModalContent.d.ts +1 -1
- package/dist/types/components/internal/Modal/ModalContent/ModalContent.d.ts.map +1 -1
- package/dist/types/components/internal/StructuredList/StructuredList.d.ts +1 -1
- package/dist/types/components/internal/StructuredList/StructuredList.d.ts.map +1 -1
- package/dist/types/components/internal/StructuredList/constants.d.ts +1 -0
- package/dist/types/components/internal/StructuredList/constants.d.ts.map +1 -1
- package/dist/types/components/internal/StructuredList/types.d.ts +6 -1
- package/dist/types/components/internal/StructuredList/types.d.ts.map +1 -1
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +3 -1
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts.map +1 -1
- package/dist/types/components/internal/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +63 -13
- package/dist/types/components/types.d.ts.map +1 -1
- package/dist/types/components/utils/customData/hasCustomField.d.ts +5 -0
- package/dist/types/components/utils/customData/hasCustomField.d.ts.map +1 -0
- package/dist/types/components/utils/customData/mergeRecords.d.ts +5 -0
- package/dist/types/components/utils/customData/mergeRecords.d.ts.map +1 -0
- package/dist/types/core/ConfigContext/context.d.ts +64 -32
- package/dist/types/core/ConfigContext/context.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts +128 -64
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts +64 -32
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts.map +1 -1
- package/dist/types/core/Context/CoreContext.d.ts.map +1 -1
- package/dist/types/core/Context/CoreProvider.d.ts +1 -1
- package/dist/types/core/Context/CoreProvider.d.ts.map +1 -1
- package/dist/types/core/Context/types.d.ts +2 -0
- package/dist/types/core/Context/types.d.ts.map +1 -1
- package/dist/types/hooks/useContainerQuery.d.ts +6 -0
- package/dist/types/hooks/useContainerQuery.d.ts.map +1 -0
- package/dist/types/hooks/useCustomColumnsData.d.ts +3 -2
- package/dist/types/hooks/useCustomColumnsData.d.ts.map +1 -1
- package/dist/types/hooks/useResponsiveContainer.d.ts +42 -0
- package/dist/types/hooks/useResponsiveContainer.d.ts.map +1 -0
- package/dist/types/hooks/useTableColumns.d.ts +4 -4
- package/dist/types/hooks/useTableColumns.d.ts.map +1 -1
- package/dist/types/translations/index.d.ts +10 -0
- package/dist/types/translations/index.d.ts.map +1 -1
- package/dist/types/types/api/resources/CapitalResource.d.ts +10 -0
- package/dist/types/types/api/resources/CapitalResource.d.ts.map +1 -1
- package/dist/{warning-CqutbHgk.cjs → warning-6iewnkkK.cjs} +2 -2
- package/dist/{warning-CqutbHgk.cjs.map → warning-6iewnkkK.cjs.map} +1 -1
- package/dist/{warning-filled-DL73IbMz.cjs → warning-filled-DbbyNMim.cjs} +2 -2
- package/dist/{warning-filled-DL73IbMz.cjs.map → warning-filled-DbbyNMim.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/da-DK-UDr4zLEm.cjs +0 -2
- package/dist/da-DK-UDr4zLEm.cjs.map +0 -1
- package/dist/de-DE-CRXo3Lip.cjs +0 -2
- package/dist/de-DE-CRXo3Lip.cjs.map +0 -1
- package/dist/es/components/internal/DataGrid/types.js +0 -4
- package/dist/es/hooks/useMediaQuery.js +0 -14
- package/dist/es/hooks/useResponsiveViewport.js +0 -24
- package/dist/es-ES-DKE_miHr.cjs +0 -2
- package/dist/es-ES-DKE_miHr.cjs.map +0 -1
- package/dist/fi-FI-MQMNSR--.cjs +0 -2
- package/dist/fi-FI-MQMNSR--.cjs.map +0 -1
- package/dist/fr-FR-Bq797--M.cjs +0 -2
- package/dist/fr-FR-Bq797--M.cjs.map +0 -1
- package/dist/index-BU9H-9Gn.cjs +0 -12
- package/dist/index-BU9H-9Gn.cjs.map +0 -1
- package/dist/it-IT-P4aG92g4.cjs +0 -2
- package/dist/it-IT-P4aG92g4.cjs.map +0 -1
- package/dist/nl-NL-CkNmbOjk.cjs +0 -2
- package/dist/nl-NL-CkNmbOjk.cjs.map +0 -1
- package/dist/no-NO-Cb48UzO1.cjs +0 -2
- package/dist/no-NO-Cb48UzO1.cjs.map +0 -1
- package/dist/pt-BR-7QdWAx4z.cjs +0 -2
- package/dist/pt-BR-7QdWAx4z.cjs.map +0 -1
- package/dist/sv-SE-DDU8uUdf.cjs +0 -2
- package/dist/sv-SE-DDU8uUdf.cjs.map +0 -1
- package/dist/types/hooks/useMediaQuery.d.ts +0 -3
- package/dist/types/hooks/useMediaQuery.d.ts.map +0 -1
- package/dist/types/hooks/useResponsiveViewport.d.ts +0 -28
- package/dist/types/hooks/useResponsiveViewport.d.ts.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";var Q0=Object.defineProperty;var vc=e=>{throw TypeError(e)};var J0=(e,t,n)=>t in e?Q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>J0(e,typeof t!="symbol"?t+"":t,n),ui=(e,t,n)=>t.has(e)||vc("Cannot "+n);var p=(e,t,n)=>(ui(e,t,"read from private field"),n?n.call(e):t.get(e)),w=(e,t,n)=>t.has(e)?vc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),O=(e,t,n,r)=>(ui(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),W=(e,t,n)=>(ui(e,t,"access private method"),n);var En=(e,t,n,r)=>({set _(s){O(e,t,s,n)},get _(){return p(e,t,r)}});const M=require("classnames"),vi="test",e2=e=>{var t;return(t=e==null?void 0:e.replace)==null?void 0:t.call(e,/([^\/])$/,"$1/")},t2=e=>e==null?void 0:e.replace(/^([^\/])/,"/$1"),n2=(()=>{const e={test:"https://platform-components-external-test.adyen.com/platform-components-external/api/",live:"https://platform-components-external-live.adyen.com/platform-components-external/api/"};return t=>e[t??vi]||e[vi]})(),Hn=Function.prototype.bind.bind(Function.prototype.call),r2=async()=>{},Uo=e=>e,te=()=>{},s2=Hn(Object.prototype.toString),o2=e=>s2(e).slice(8,-1),Jl=e=>(Object.keys(e).forEach(t=>{const n=e[t];n&&typeof n=="object"&&!Object.isFrozen(n)&&Jl(n)}),Object.freeze(e)),Oi=e=>e===!!e,Q=e=>typeof e=="function",fo=e=>e===null,Ne=e=>e==null,$r=e=>typeof e=="number",Wo=e=>o2(e)==="Object",gt=e=>typeof e=="string",i2=e=>typeof e=="symbol",Z=e=>e===void 0,vt=(e,t,n)=>(Math.min(e,n)!==e&&([e,n]=[n,e]),Math.max(e,Math.min(t,n))),os=e=>!i2(e)&&e===~~e,Mn=e=>$r(e)&&1/e===0,eu=(e,t)=>{if(Number.isInteger(e)&&Number.isInteger(t))return e+Math.floor((t-e)/2);throw TypeError(`Expects 2 integer values: [${e}, ${t}]`)},Ms=(e,t)=>(e%t+t)%t,Oc="abort",a2="signal is aborted without reason",Zn=(e,t=e)=>Oi(e)?e:!!t,xe=e=>e===!0,Bt=e=>e!==!1,c2=e=>!1,bi=e=>!0,H=(e,t=!1)=>({writable:xe(t),enumerable:!0,value:e}),ue=(e,t=!0)=>({enumerable:Bt(t),get:e}),xt=Hn(Object.prototype.hasOwnProperty),Gn=(e,t)=>e===t||!(e===e||t===t);if(!xt(AbortSignal.prototype,"reason"))try{Object.defineProperty(AbortSignal.prototype,"reason",{...ue(function(){return this.aborted?is():void 0},!0),configurable:!0})}catch{}xt(AbortSignal.prototype,"throwIfAborted")||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason??is()});const is=(e=a2)=>new DOMException(e,"AbortError"),tu=(e,t)=>{if(!Gn(e.reason,t))try{Object.defineProperty(e,"reason",H(t))}catch{}return e},l2=(e=is())=>{if("abort"in AbortSignal)return AbortSignal.abort(e);const t=new AbortController,n=Z(e)?is():e,{signal:r}=t;return t.abort(n),tu(r,n),r},Ho=e=>{if("any"in AbortSignal)return AbortSignal.any(e);let t=new Set,n=new AbortController;const{signal:r}=n;let s=function(){t.forEach(o=>o.removeEventListener(Oc,s)),t.clear();const i=(this==null?void 0:this.reason)??is();n.abort(i),tu(r,i),n=t=s=void 0};e:{const i=Symbol("<NIL_EXCEPTION>");let o=i;t:{try{for(const c of e){if(!Fs(c))throw new TypeError("Failed to convert value to 'AbortSignal'");if(c.aborted)break t;t.add(c)}}catch(c){o=c;break t}t.forEach(c=>c.addEventListener(Oc,s));break e}if(s.call(r),o!==i)throw o}return r},Fs=e=>e instanceof AbortSignal,de=Object.freeze([]),$=Object.freeze(Object.create(null)),Pr=Promise.resolve();Promise.race(de);const hn=function(e,...t){return new Promise(n=>n(e.call(this,...t)))},u2=(e,t,n)=>{let r=t.get(e);return Z(r)&&Q(n)&&(Z(r=n(e,t))||t.set(e,r)),r},Vr=(e,t=de)=>{const n=`${e||""}`.trim(),r=n?n.split(/(?:\s*,\s*)+/).filter(Uo):de;return r.length?r:t},zr=(e,t,n)=>e.includes(t)?t:Ne(t)?e[0]:e.includes(n)?n:e[0],bc=Hn(Array.prototype.some),nu=function e(t,n,r=new Set){for(const s of n)Array.isArray(s)?e(t,s,r):(t&&r.delete(s),r.add(s));return r};Hn(nu,void 0,!1);Hn(nu,void 0,!0);const ru=(...e)=>{const[t]=e,r=(e.length>=2?new Date(...e):t instanceof Date?t:new Date(gt(t)||Number.isFinite(t)?t:void 0)).getTime();return Number.isFinite(r)?r:void 0},as=(()=>{let e=Date.now();return(t="adyen-pe")=>`${t}-${++e}`})(),aa=(()=>{const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";return()=>e.replace(/[xy]/g,t=>{const n=Math.random()*16|0;return(t=="x"?n:n&3|8).toString(16)})})(),cs=(e,t=$)=>Wo(e)?e:cs(t,$),Ur=Hn(Object.create,void 0),J=Hn(Ur,void 0,null),Go=(e=$)=>Object.freeze({...e,defineProperty:bi,set:bi}),d2=e=>e&&(e==null?void 0:e.length)>0?`${e[0].toUpperCase()}${e.slice(1)}`:e,Ii=e=>Ne(e)||gt(e)&&/^\s*$/.test(e),h2="/setup",f2=xe(void 0),Ic=(()=>{let e=0;if(Number.isFinite(e)&&(e=Math.max(0,~~e)))return e})();class Di extends Error{constructor(n,r,s,i){super(s);B(this,"type");B(this,"errorCode");B(this,"requestId");this.type=n,this.name=n,this.errorCode=i,this.requestId=r}}const m2=/^[^]*?filename[^;\n]*=\s*(?:UTF-\d['"]*)?(?:(['"])([^]*?)\1|([^;\n]*))?[^]*?$/;var mo=(e=>(e.NETWORK_ERROR="NETWORK_ERROR",e.CANCEL="CANCEL",e.IMPLEMENTATION_ERROR="IMPLEMENTATION_ERROR",e.ERROR="ERROR",e.EXPIRED_TOKEN="EXPIRED_TOKEN",e))(mo||{});const p2=e=>{switch(e){case 401:return"EXPIRED_TOKEN";default:return"NETWORK_ERROR"}},_2=e=>{var t;return(t=e.headers.get("Content-Type"))==null?void 0:t.split(";",1)[0]},y2=e=>{const n=(e.headers.get("Content-Disposition")??"").replace(m2,"$2$3");return decodeURIComponent(n)},g2=e=>{const{headers:t=[],method:n="GET"}=e;return{method:n,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":e.contentType??"application/json",...t,"SDK-Version":"1.4.0"},redirect:"follow",signal:e.signal,referrerPolicy:"no-referrer-when-downgrade",...n==="POST"&&e.body&&{body:JSON.stringify(e.body)}}};function T2({message:e,level:t,errorCode:n,type:r="NETWORK_ERROR",requestId:s}){switch(t){case"silent":break;case"info":case"warn":console[t](e);break;case"error":default:throw new Di(r,s,e,n)}}function A2(e){return e&&e.errorCode&&e.type&&(e.detail||e.invalidFields)&&e.status}function E2(e){const t=new URLSearchParams;for(const n of Object.keys(e)){const r=e[n];Ne(r)||(Array.isArray(r)?r.forEach(s=>t.append(n,s)):t.set(n,String(r)))}return t}const su=e=>{let t,n,r;const s=()=>{if(Z(t))return;const u=t.abort.bind(t);t=void 0,u()},i=()=>(r=new Promise((u,l)=>{if(n.addEventListener("abort",function h(){n.removeEventListener("abort",h),l(e)}),n.aborted)throw e}),r.catch(te),r),o=()=>(Z(t)&&(t=new AbortController,n=t.signal,r=i()),c),c=J({abort:H(s),promise:ue(()=>r),reason:H(e),refresh:H(o),signal:ue(()=>n)});return o()},ou=()=>{let e,t,n;const r=()=>{const i=n??te,o=new Promise((c,u)=>{n=c,t=u});return i(e=o),s},s=J({promise:ue(()=>e),refresh:H(r),reject:H(i=>t(i)),resolve:H(i=>n(i))});return r()},xs=e=>{const t=su(),n=ou();let r;return Object.defineProperties(function(...i){Z(r)?n.refresh():t.abort();const o=hn.call(this,e,t.refresh().signal,...i);return(async()=>{let c=r===(r=o);try{const u=await o.finally(()=>{c=r===o,c&&(r=void 0)});c&&n.resolve(u)}catch(u){c&&n.reject(u)}})(),o},{abort:H(t.abort),promise:ue(()=>n.promise),refresh:H(()=>void n.refresh())})};class N2{constructor(t){B(this,"_endpoints",$);B(this,"_extraConfig",$);B(this,"_revokeEndpointsProxy",te);B(this,"_beforeHttp",async()=>{await this._refreshPromisor.promise.catch(te)});B(this,"_refreshPromisor",xs((t,n)=>{const r=Fs(n)?Ho([n,t]):t;return this._fetchSetupEndpoint(r)}));this._session=t;let n;this.refresh=r=>(this._refreshPromisor(r).catch(te),n??(n=this._refreshPromisor.promise.finally(()=>n=void 0).then(({endpoints:s,...i})=>{this._resetEndpoints(),{proxy:this._endpoints,revoke:this._revokeEndpointsProxy}=this._getEndpointsProxy(s),this._extraConfig=Jl(i)})))}get endpoints(){return this._endpoints}get extraConfig(){return this._extraConfig}_fetchSetupEndpoint(t){return this._session.http(null,{method:"POST",path:h2,errorLevel:"fatal",loadingContext:this.loadingContext,signal:t})}_getEndpointsProxy(t){const n=new Set(Object.keys(t)),r=J();return Proxy.revocable($,Go({get:(s,i,o)=>n.has(i)?(r[i]??(r[i]=(()=>{const{method:c="GET",url:u}=t[i];if(!Z(u||void 0))return(...l)=>{const h=this._getHttpOptions(c,u,...l);return this._session.http(this._beforeHttp,h)}})()),r[i]):Reflect.get(s,i,o)}))}_getHttpOptions(t,n,...r){const{loadingContext:s}=this,[i,o]=r,{path:c,query:u}=cs(o),l=u&&E2(u);if(Wo(c))for(const h of Object.keys(c))n=n.replace(`{${h}}`,c[h]);return{loadingContext:s,...i,method:t,params:l,path:n}}_resetEndpoints(){this._revokeEndpointsProxy(),this._revokeEndpointsProxy=te,this._endpoints=$}}const iu=Symbol("Error<SESSION_EXPIRED>"),S2=Symbol("Error<SESSION_FACTORY_UNAVAILABLE>"),C2=Symbol("Error<SESSION_HTTP_UNAVAILABLE>"),R2=Symbol("Error<SESSION_INVALID>"),au=Symbol("Error<SESSION_REFRESH_ABORTED>"),Yo="_sessionExpired",cu="_sessionReady",v2="_sessionRefreshed",O2="_sessionRefreshingEnd",b2="_sessionRefreshingStart",lu="_session.deadline",uu="_session.ready",du="_session.refreshingEnd",hu="_session.refreshingStart",I2=async e=>{const{specification:t}=e.context,n=await hn(async()=>{const r=t.autoRefresh;return Q(r)?r.call(t,e.session):r}).catch(c2);return xe(n)},D2=e=>{let t=e.context.emitter.on(Yo,()=>s(!1)),n,r=xs(async(c,u=!1)=>{n=c;const l=xe(u)||await I2(e);n===c&&l&&e.pending&&!e.refreshing&&e.refresh(n).catch(te)}),s=(c=!1)=>{e.refreshing||r(c)},i=()=>{t(),r.abort(),r=n=t=void 0,s=i=te};return Object.defineProperties((c=!1)=>s(c),{destruct:ue(()=>i,!1)})},Dc=1e3,k2=2147483647,L2=(e,t=Dc,n=!1)=>{var h;let r=new AbortController,s=vt(0,~~t,k2),i=xe(n);Number.isFinite(s)||(s=Dc);const o=((h=document.timeline)==null?void 0:h.currentTime)??performance.now(),c=()=>{r==null||r.abort(),r=void 0},u=d=>{!r||r.signal.aborted||(l(d),e(d))},l=d=>{let f=0;if(!i){const m=d-o,y=Math.round(m/s)*s;f=o+y+s-performance.now()}setTimeout(()=>requestAnimationFrame(u),f)};return l(o),i=!1,J({cancel:H(c),delay:H(t),signal:H(r.signal)})},w2=e=>{const t={},n=Object.getOwnPropertyDescriptors(e);for(const r of Object.keys(e)){const{get:s,value:i}=n[r];t[r]=ue(s||(Q(i)?i.bind(e):()=>i))}return J(t)},P2=()=>{const e={idle:null,resume:null},t={};for(const n of Object.keys(e))t[n]={get:()=>e[n]??te,set:r=>{Ne(r)?e[n]=null:Q(r)&&r!==e[n]&&(e[n]=r)}};return J(t)},fu=Symbol("<<UNSUBSCRIBE>>"),Yn=e=>e===fu,Bs=e=>{let t;const n=w2(e),r=P2(),s=new Map,i=new WeakMap,o=()=>Object.freeze({...n}),c=()=>s.size===0,u=h=>{if(c())return;if(Yn(h)){const f=[];return s.forEach((m,y)=>{f.push(y);const _=i.get(y);for(;m--;)_==null||_()}),f.forEach(m=>m(h)),!0}const d=t;t=o();for(const f of Object.keys(t))if(!Gn(t[f],d[f]))return s.forEach((m,y)=>y(t)),!0;return!1},l=h=>{if(!Q(h))return te;const d=u2(h,i,()=>{let m=()=>{const y=s.get(h)||0;y===1?(m=void 0,s.delete(h),i.delete(h),c()&&(t=void 0,r.idle())):y>1&&s.set(h,y-1)};return()=>{m==null||m()}}),f=c();return s.set(h,(s.get(h)||0)+1),f&&(t=o(),r.resume()),h(t),d};return J({idle:ue(c),on:H(r),cancelSubscriptions:H(()=>u(fu)),requestNotification:H(()=>u()),snapshot:ue(()=>t??o()),subscribe:H(l)})},ca=(()=>{let e;const{cancelSubscriptions:t,requestNotification:n,subscribe:r,on:s}=Bs({now:()=>Date.now()});return s.resume=()=>{e=L2(n,1e3,!1)},s.idle=()=>{e==null||e.cancel(),e=void 0},J({cancelSubscriptions:H(t),subscribe:H(r)})})(),la=()=>{const e=new class extends EventTarget{},t=(r,...s)=>{const[i]=s;s.length&&Z(i)&&console.warn("Unexpected value `undefined` provided for event detail.\n Turn off this warning by doing either of the following:\n (1) omit the optional event detail parameter.\n (2) explicitly pass `null` for the event detail parameter (instead of `undefined`).\n");const o=new CustomEvent(r,J({bubbles:H(!1),cancelable:H(!1),detail:H(i??null)}));return e.dispatchEvent(o)},n=(r,s)=>{if(!Q(s))return te;const i=o=>s.call(null,J({detail:H(o.detail),timeStamp:H(o.timeStamp),type:H(o.type)}));return e.addEventListener(r,i),()=>e.removeEventListener(r,i)};return J({emit:H(t),on:H(n)})},M2=(e,t)=>{let n,r=1/0,s,i;const o=su(),c=la(),u=()=>{n==null||n.removeEventListener("abort",u),r=1/0,i==null||i(),o.refresh(),c.emit(lu)},l=xs(async(d,f)=>{s=d;const m=await hn(()=>{const _=t.deadline;return Q(_)?_.call(t,f,d):_}).catch(te);if(s!==d)return;const y=(Array.isArray(m)?m:[m]).filter(_=>_||_===0);if(y.length>0){let _=!1,T=new Set;for(const g of y)if(Fs(g)){if(_=g.aborted)break;T.add(g)}else if(r=Math.min(r,ru(g)??1/0),_=r<=Date.now())break;_||(_=T.size<1&&!Number.isFinite(r)),_?n??(n=l2()):(n=Ho([...T,o.signal]),n.addEventListener("abort",u),h()),y.length=0,T.clear()}else n=void 0}),h=()=>{if(!Number.isFinite(r))return;let d=ca.subscribe(f=>{if(Yn(f))return u();f.now>=r&&o.abort()});i=()=>{d==null||d(),d=i=void 0}};return J({elapse:H(o.abort),elapsed:ue(()=>n&&n.aborted),on:H(c.on),refresh:H(l.bind(void 0)),signal:ue(()=>o.signal)})},F2=(e,t)=>{let n=!1,r,s,i=!0,o;const c=Symbol("<next_session>"),u=la();function l(m){var y;try{(y=t.assert)==null||y.call(t,m)}catch{throw R2}}function h(m){if(!Q(m))throw S2}const d=xs((m,y)=>{if(!s)s=m;else return f(Fs(y)?Ho([y,m]):m)}),f=async m=>{let y=c;try{n=!1,s=m,i&&await(r??(r=(async()=>{await Pr,i=!1,u.emit(hu)})())),h(t.onRefresh),y=await hn(()=>t.onRefresh(o,m)).finally(()=>{if(m.aborted)throw au})}finally{if(s===m)try{y!==c&&(l(y),o=y,u.emit(uu))}finally{r=void 0,i=!0,u.emit(du)}}};return e.on(Yo,()=>n=!r),d(),J({context:H(J({emitter:H(e),specification:H(t)})),on:H(u.on),pending:ue(()=>n),promise:ue(()=>d.promise),refresh:H(d.bind(void 0)),refreshing:ue(()=>!!r),session:ue(()=>o),signal:ue(()=>s)})};class x2{constructor(t){B(this,"_session");B(this,"_autofresh");B(this,"_deadline");B(this,"_refresher");B(this,"_eventEmitter",la());this._specification=t,this._deadline=M2(this._eventEmitter,this._specification),this._refresher=F2(this._eventEmitter,this._specification),this._autofresh=D2(this._refresher),this._deadline.on(lu,()=>this._eventEmitter.emit(Yo)),this._refresher.on(hu,()=>this._eventEmitter.emit(b2)),this._refresher.on(du,()=>this._eventEmitter.emit(O2)),this._refresher.on(uu,()=>{this._session=this._refresher.session,this._deadline.refresh(this._session).finally(()=>this._eventEmitter.emit(v2)),this._eventEmitter.emit(cu)}),this.http=this._sessionHttp.bind(this),this.on=this._eventEmitter.on,this.refresh=this._refresher.refresh}get isExpired(){return this._deadline.elapsed}get refreshing(){return this._refresher.refreshing}_assertSessionHttp(t){if(!Q(t))throw C2}async _sessionHttp(t,...n){for(this._autofresh(!0);;)try{await this._refresher.promise.catch(te);const{signal:r}=this._deadline;return await(t==null?void 0:t(this._session,r,...n)),this._assertSessionHttp(this._specification.http),await this._specification.http(this._session,r,...n)}catch(r){if(r!==iu)throw r;if(this._refresher.pending)continue;this._deadline.elapse()}}}const B2="v1",di=(e,t)=>{try{e==null||e(t)}catch{throw t}};async function $2(e){const{errorLevel:t,loadingContext:n="",path:r}=e,s=g2(e),i=new URL(`${e2(n)}${B2}${t2(r)}`);return e.params&&e.params.forEach((o,c)=>{const u=decodeURIComponent(o);u&&i.searchParams.append(c,u)}),(async()=>{let o=!1;const c={level:t};try{const u=await fetch(i,s);if(u.ok){if(u.status===204)return null;try{switch(_2(u)){case"application/json":return await u.json();default:const d=await u.blob(),f=y2(u);return{blob:d,filename:f}}}catch(h){throw o=!0,h}}c.type=p2(u.status);const l=await u.json();c.message=e.errorMessage||`Service at ${i} not available`,c.errorCode=String(l.status),c.requestId=l==null?void 0:l.requestId,A2(l)&&(c.message=l.detail,c.errorCode=l.errorCode,c.status=l.status),di(e.errorHandler,c)}catch(u){if(o)throw di(e.errorHandler,u),u;di(e.errorHandler,u),c.message=e.errorMessage||`Call to ${i} failed. Error: ${u}`}T2(c)})()}class U2{constructor(t){B(this,"assert",t=>{if(Wo(t)){const n=gt(t.id)?t.id.trim():void 0,r=gt(t.token)?t.token.trim():void 0;if(n&&r)return}throw void 0});B(this,"deadline",t=>{const n=[];let r,s;try{({iat:r,exp:s}=JSON.parse(atob(t==null?void 0:t.token.split(".")[1]))),n.push(s)}catch{r=Date.now()}if(!Z(Ic)){const i=new Date(r);n.push(i.setMilliseconds(i.getMilliseconds()+Ic))}return n});B(this,"http",async(t,n,r)=>{const{headers:s,signal:i,...o}=r;try{const c={...o,headers:{...s,...t&&{Authorization:`Bearer ${t.token}`}},errorHandler:this._errorHandler,signal:Fs(i)?Ho([n,i]):n};return await $2(c)}catch(c){throw(c==null?void 0:c.type)===mo.EXPIRED_TOKEN?iu:c}});this.onSessionCreate=t,this._errorHandler=this._errorHandler.bind(this),Object.defineProperties(this,{autoRefresh:H(f2),onRefresh:H((n,r)=>this.onSessionCreate(r))})}_errorHandler(t){try{this.errorHandler&&this.errorHandler(t)}catch{}throw t}}const qr=Symbol("<<NO_ERR>>");function W2(e){/* istanbul ignore if -- @preserve */if(e===qr)throw new TypeError("Illegal error")}const H2=()=>{let e=qr;const t=()=>{e=qr},n=r=>{W2(r),e=r};return J({error:ue(()=>e===qr?void 0:e),hasError:ue(()=>e!==qr),reset:H(t),set:H(n)})};class G2{constructor(){B(this,"_canSkipSessionRefresh",!1);B(this,"_refreshPromisorSignal");B(this,"_sessionIsFrozen",!1);B(this,"_errorContainer",H2());B(this,"_specification",new U2);B(this,"_sessionContext",new x2(this._specification));B(this,"_setupContext",new N2(this._sessionContext));B(this,"_refreshPromisor",xs(async(t,n=!1)=>{let r=!this._refreshPromisorSignal,s=this._refreshPromisorSignal===(this._refreshPromisorSignal=t);const i=xe(n)&&this._canSkipSessionRefresh;r&&(r=!1,this._errorContainer.reset(),this._onAuthStateChanged());try{await(i?this._setupContext:this._sessionContext).refresh(t).finally(()=>s=this._refreshPromisorSignal===t)}catch(o){if(!s)return;!t.aborted&&(i||o!==au)&&this._errorContainer.set(o),r=!i}finally{(r||i&&s)&&(this._refreshPromisorSignal=void 0,this._onAuthStateChanged())}}));B(this,"_watchlist",Bs({endpoints:()=>this._setupContext.endpoints,extraConfig:()=>this._setupContext.extraConfig,hasError:()=>this._errorContainer.hasError,isExpired:()=>this._sessionContext.isExpired,isFrozen:()=>this._sessionIsFrozen,refreshing:()=>!!this._refreshPromisorSignal}));B(this,"freeze",()=>{this._sessionIsFrozen=!0,this._watchlist.on.resume=void 0,this._watchlist.cancelSubscriptions()});B(this,"http",this._sessionContext.http.bind(this._sessionContext,null));B(this,"refresh",this._refresh.bind(this));B(this,"subscribe",this._watchlist.subscribe);this._watchlist.on.resume=()=>{const t=[this._sessionContext.on(Yo,()=>{this._canSkipSessionRefresh=!1,this._onAuthStateChanged()}),this._sessionContext.on(cu,()=>{this._refresh(this._canSkipSessionRefresh=!0)})];this._watchlist.on.idle=()=>{this._watchlist.on.idle=void 0,t.forEach(n=>n()),t.length=0},!this.context.refreshing&&Bt(this.context.isExpired)&&this._refresh()}}get context(){return this._watchlist.snapshot}set loadingContext(t){this._setupContext.loadingContext=t}set errorHandler(t){this._specification.errorHandler=t}set onSessionCreate(t){this._specification.onSessionCreate!==t&&(this._specification.onSessionCreate=t,this._refreshPromisorSignal&&Q(this._specification.onSessionCreate)&&(this._canSkipSessionRefresh=!1,this._refresh()))}_onAuthStateChanged(){this._watchlist.requestNotification()}_refresh(t=!1){this._refreshPromisor(t)}}const Y2="Account",j2="Account Balance",z2="Account description",K2="Account ID",V2="Additions",q2="Adjustments",Z2="Amount",X2="and",Q2="Apply",J2="Back",eh="Balance account",th="Balance account ID",nh="Booked",rh="Captured",sh="Category",oh="Chargebacks",ih="Close",ah="Contact support",ch="Contact support for help.",lh="Contact support for help and share error code %{requestId}",uh="Copied",dh="Copy",hh="Corrections",fh="Currency",mh="Date",ph="Date range",_h="Description",yh="Dismiss",gh="Download",Th="Downloading",Ah="Email",Eh="Entity was not found",Nh="Transaction not found for the specified Account Holder",Sh="Fees",Ch="File",Rh="Filter bar",vh="From",Oh="Full",bh="Funds captured",Ih="Go back",Dh="Grant issued",kh="Grant repayments",Lh="Hide content",wh="ID",Ph="Incomplete field",Mh="In progress",Fh="Loading",xh="max",Bh="min",$h="Mobile",Uh="Net payout",Wh="Next Payouts",Hh="No data",Gh="No negative numbers allowed",Yh="No payouts found",jh="No reports found",zh="No transactions found",Kh="Other",Vh="Paginated navigation",qh="Partial",Zh="Payment ID",Xh="Payment method",Qh="Payout Details",Jh="Payout information is generated each day at midnight, UTC time.",ef="Payouts",tf="Pending",nf="Please come back later.",rf="Please, reach out to support for assistance.",sf="Reach out to support",of="Reference ID",af="Refresh",cf="Refunds",lf="Refund payment",uf="We couldn’t process the refund. Try again later.",df="Something went wrong.",hf="Your customer will receive the money in a maximum of 40 days. When the refund is successful you will see a new Refund transaction on your list.",ff="Refund is sent!",mf="Amount to refund",pf="Refunds can take up to 40 days depending on the payment method. Fees are included.",_f="Refund %{amount}",yf="Reason for refund",gf="Reference",Tf="Remaining amount",Af="Report",Ef="Reports are generated each day at midnight, UTC time.",Nf="Reports",Sf="Reset",Cf="Reversed",Rf="Something went wrong.",vf="Something went wrong. Try refreshing the page or come back later.",Of="Status",bf="Structured list",If="Subtractions",Df="Sum of same-day payouts",kf="Tabs",Lf="The error code is %{requestId}",wf="There are no results",Pf="The request is missing required fields or contains invalid data.",Mf="There was an unexpected error",Ff="The selected balance account is incorrect",xf="Timezone",Bf="To",$f="Total incoming",Uf="Total outgoing",Wf="To value should be equal or greater than the From value",Hf="Transaction details",Gf="Transactions",Yf="Transactions overview",jf="Transaction type",zf="Transfers",Kf="Try a different search or reset your filters, and we’ll try again.",Vf="Try refreshing the page or come back later.",qf="Amount",Zf="Type",Xf="Value",Qf="We couldn't load the payouts overview.",Jf="We couldn't load the reports overview.",e1="We couldn't load the transactions overview.",t1="We couldn't load your balance accounts.",n1="We couldn't load your payouts.",r1="We couldn't load your reports.",s1="We couldn't load your transactions.",o1={account:Y2,accountBalance:j2,accountDescription:z2,accountID:K2,additions:V2,adjustments:q2,amount:Z2,and:X2,apply:Q2,back:J2,balanceAccount:eh,balanceAccountId:th,Booked:nh,"button.clearAll":"Clear all","calendar.controls":"Calendar navigation controls","calendar.nextMonth":"Next month","calendar.previousMonth":"Previous month","calendar.timezone":"Timezone is set on: GMT%{offset} (%{time})","capital.accountIsInactive":"Your account is inactive","capital.actionNeeded":"Action needed","capital.bankAccountDetails":"Bank account details","capital.bankAccountIban":"IBAN","capital.bankAccountNumber":"Account number","capital.bankCountryOrRegion":"Country/region","capital.bankRoutingNumber":"Routing number","capital.bankSortCode":"Sort code","capital.businessFinancing":"Business financing","capital.businessFinancingOffer":"Business financing offer","capital.businessFinancingSummary":"Business financing summary","capital.closed":"Closed","capital.couldNotContinueWithTheOffer":"We couldn't continue with the offer.","capital.couldNotLoadFinancialOffers":"We couldn't load financial offers.","capital.dailyRepaymentRate":"Daily repayment rate","capital.daysAndDaysLeft":"%{days} days (%{daysLeft} days left)","capital.expectedRepaymentPeriod":"Expected repayment period","capital.failed":"Failed","capital.fees":"Fees","capital.fullyRepaid":"Fully repaid","capital.goToTermsAndConditions":"Go to Terms & Conditions","capital.grantID":"Grant ID","capital.howMuchMoneyDoYouNeed":"How much money do you need?","capital.inProgress":"In progress","capital.legalSubtitleAU":"Adyen Capital is provided by Adyen Australia Pty Limited.","capital.legalSubtitleEU":"Loans are issued by Adyen N.V.","capital.legalSubtitleGB":"Loans are issued by Adyen N.V. represented by its London Branch.","capital.legalSubtitleUS":"Loans are issued by Adyen N.V. San Francisco Branch and subject to credit approval.","capital.maximumRepaymentPeriod":"Maximum repayment period","capital.minimumRepaymentToRepayTheFinancingOnTime":"Minimum repayment every %{days} days to repay the financing on time","capital.needSomeExtraMoney":"Need some extra money?","capital.offerLegalNoticeDescriptionUS":"If your application for business credit is denied, you have the right to a written statement of the specific reasons for the denial. To obtain the statement, please contact Adyen's Credit Support Team by emailing %{email} within 60 days from the date you are notified of our decision. We will send you a written statement of reasons for the denial within 30 days of receiving your request for the statement. %{break} The Federal Equal Credit Opportunity Act prohibits creditors from discriminating against credit applicants on the basis of race, color, religion, national origin, sex, marital status, age (provided that the applicant has the legal capacity to enter into a binding contract), because all or part of the applicant's income derives from any public assistance program, or because the applicant has in good faith exercised any right under the Consumer Credit Protection Act. The federal agency that administers compliance with this law concerning this creditor is the Office of the Comptroller of the Currency (OCC), 400 7th Street, SW Washington, DC 20219.","capital.offerLegalNoticeTitleUS":"Creditor: Adyen N.V. – San Francisco Branch %{break} 505 Brannan Street, San Francisco, CA 94107.","capital.oneMonth":"1 month","capital.pending":"Pending","capital.primaryAccount":"Primary account","capital.remaining":"Remaining","capital.remainingAmount":"Remaining amount","capital.remainingFees":"Remaining fees","capital.repaid":"Repaid","capital.repaidAmount":"Repaid amount","capital.repaidFees":"Repaid fees","capital.repaymentBalanceInfo":"Your current remaining amount, including fees, is %{amount}","capital.repaymentThreshold":"Repayment threshold","capital.requestedFunds":"Requested funds","capital.requestFunds":"Request funds","capital.requesting":"Requesting","capital.reviewOffer":"Review offer","capital.revoked":"Revoked","capital.seeNewOffer":"See new offer","capital.seeOptions":"See options","capital.sendRepayment":"Send repayment","capital.sendRepaymentNotice":"The additional repayment bank transfer made towards your loan could take 2-3 business days for it to be reflected on your loan account.","capital.sendRepaymentSubtitle":"Transfer money to this bank account to repay back part of your loan or the entirety of it.","capital.signTermsAndConditionsToReceiveFunds":"Sign the Terms & Conditions to receive your funds.","capital.signTheTermsToReceiveYourFunds":"Sign the terms to receive your funds","capital.termEnds":"Term ends: ","capital.thereIsNoPrimaryAccountConfigured":"There is no primary account configured","capital.thisOfferExpiresOn":"This offer expires on %{date}.","capital.totalFees":"Total fees","capital.totalRepaymentAmount":"Total repayment amount","capital.unsupportedRegionDescription":"Business financing isn’t available in your region yet, but check back here for an offer.","capital.unsupportedRegionTitle":"Stay tuned!","capital.weCouldNotContinueWithTheOffer":"We couldn't continue with the offer.","capital.weCouldNotContinueWithTheOfferContactSupportForHelp":"We couldn't continue with the offer. Contact support for help.","capital.weCouldNotLoadFinancialOffers":"We couldn't load financial offers.","capital.weCouldNotProcessThisRequestTryAgain":"We couldn't process this request. Try again with a new offer.","capital.weReceivedYourRequestAndWeAreWorkingOnItNowCheckBackSoon":"We received your request and we’re working on it now. Check back soon for the next steps.","capital.writtenOff":"Written off","capital.xDays":"%{days} days","capital.xMonths":"%{months} months","capital.xPercent":"%{percentage}%","capital.youAcceptedButThenReturnedTheseFunds":"You accepted but then returned these funds","capital.youAcceptedTheseFundsButDidNotRepayThem":"You accepted these funds but did not repay them","capital.youAreRequestingFundingOf":"You’re requesting funding of","capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part1":"You have been pre-qualified for business financing","capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part2":" up to %{amount}.","capital.yourRequestedFundsWere":"Your requested funds were: ","capital.youShouldGetTheFundsWithinOneBusinessDay":"You should get the funds within one business day","capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds":"You will need to repay a minimum of %{amount} every %{days} days to fully pay off the funds by %{date}.","capital.youWillSoonQualifyForAFinancialOffer":"You will soon qualify for a financial offer!",capture:rh,category:sh,chargeback:oh,closeIconLabel:ih,contactSupport:ah,contactSupportForHelp:ch,contactSupportForHelpAndShareErrorCode:lh,copied:uh,copy:dh,correction:hh,currency:fh,date:mh,dateRange:ph,default:"Default",description:_h,dismiss:yh,download:gh,downloading:Th,email:Ah,entityWasNotFound:Eh,entityWasNotFoundDetail:Nh,"error.pleaseTryAgainLater":"Please try again later.","error.somethingWentWrongWithDownload":"Something went wrong with the download","expandableCard.collapse":"Collapse","expandableCard.expand":"Expand",export:"Export",fee:Sh,file:Ch,"filter.date.since":"Since %{date}","filter.date.until":"Until %{date}",filterBar:Rh,"filterPlaceholder.category":"Type","filterPlaceholder.currency":"Currency","filterPlaceholder.status":"Status",from:vh,full:Oh,fundsCaptured:bh,goBack:Ih,grantIssued:Dh,grantRepayment:kh,hideContent:Lh,id:wh,incompleteField:Ph,inProgress:Mh,loading:Fh,max:xh,min:Bh,mobile:$h,netPayout:Uh,nextPayouts:Wh,noData:Hh,noNegativeNumbersAllowed:Gh,noPayoutsFound:Yh,noReportsFound:jh,noTransactionsFound:zh,other:Kh,paginatedNavigation:Vh,"pagination.nextPage":"Next page","pagination.previousPage":"Previous page","pagination.showing":"Showing",partial:qh,paymentId:Zh,paymentMethod:Xh,payoutDetails:Qh,payoutsNotice:Jh,payoutsTitle:ef,Pending:tf,pleaseComeBackLater:nf,pleaseReachOutToSupportForAssistance:rf,"rangePreset.custom":"Custom","rangePreset.last30Days":"Last 30 days","rangePreset.last7Days":"Last 7 days","rangePreset.lastMonth":"Last month","rangePreset.lastWeek":"Last week","rangePreset.thisMonth":"This month","rangePreset.thisWeek":"This week","rangePreset.yearToDate":"Year to date",reachOutToSupport:sf,referenceID:of,refresh:af,refund:cf,"refund.amountAlreadyRefunded":"You already refunded %{amount}","refund.amountFailed":"The refund for %{amount} has failed. It is not currently possible to refund this amount. Please contact support.","refund.amountInProgress":"The partial refund of %{amount} is being processed.","refund.fee":"Fee","refund.fullAmountFailed":"It is not possible to refund this payment. Please contact support.","refund.fullAmountRefunded":"The full amount has been refunded back to the customer","refund.goToPayment":"Go to payment","refund.maximumRefundable":"You can only refund a maximum of %{amount}","refund.onlyRefundable":"You can only refund %{amount}","refund.originalAmount":"Original Amount","refund.originalPayment":"Original Payment","refund.paymentPspReference":"Payment PSP Reference","refund.pspReference":"PSP Reference","refund.refundFee":"Refund Fee","refund.refundPspReference":"Refund PSP Reference","refund.returnToRefund":"Return to refund","refund.theRefundIsBeingProcessed":"The refund is being processed.",refundAction:lf,refundActionErrorSubtitle:uf,refundActionErrorTitle:df,refundActionSuccessSubtitle:hf,refundActionSuccessTitle:ff,refundAmount:mf,"refundAmount.excess":"You cannot exceed the available amount of %{amount}","refundAmount.required":"Enter a refund amount","refunded.full":"Fully refunded","refunded.partial":"Partially refunded",refundNotice:pf,refundPayment:_f,refundReason:yf,"refundReason.duplicate":"Duplicate","refundReason.fraudulent":"Fraudulent","refundReason.issue_with_item_sold":"Issue with item sold","refundReason.other":"Other","refundReason.requested_by_customer":"Requested by customer",refundReference:gf,"refundReference.placeholder":"Enter the reference here",remainingAmount:Tf,report:Af,"reportsError.tooManyDownloads":"We couldn't download all the files. Please try again later.",reportsNotice:Ef,reportsTitle:Nf,"reportType.payout":"Payout",reset:Sf,Reversed:Cf,"select.filter.placeholder":"Placeholder","select.noOptionsFound":"No options match this search",somethingWentWrong:Rf,somethingWentWrongTryRefreshingOrComeBackLater:vf,status:Of,structuredList:bf,subtractions:If,sumOfSameDayPayouts:Df,tabs:kf,theErrorCodeIs:Lf,thereAreNoResults:wf,theRequestIsMissingRequiredFieldsOrContainsInvalidData:Pf,thereWasAnUnexpectedError:Mf,theSelectedBalanceAccountIsIncorrect:Ff,timezone:xf,to:Bf,"tooltip.ATM":"Money withdrawn at an ATM","tooltip.Capital":"Money from an incoming loan grant or outgoing loan repayment","tooltip.Chargeback":"Money returned to a customer after a disputed transaction","tooltip.Correction":"Adjustments to your funds, including transaction reversals and deposit corrections","tooltip.Fee":"Transaction costs and payment method fees","tooltip.Other":"Transactions not in another category, usually an adjustment","tooltip.Payment":"Money received to your account from a sales transaction","tooltip.Refund":"Money sent back to a customer from a refunded transaction","tooltip.totalIncoming":"All money received into your account based on the selected filters","tooltip.totalOutgoing":"All fees, refunds, payouts, and other charges based on the selected filters","tooltip.Transfer":"Money moved between your account and another account",totalIncoming:$f,totalOutgoing:Uf,toValueShouldBeGreaterThanTheFromValue:Wf,transactionDetails:Hf,transactions:Gf,transactionsOverviewTitle:Yf,transactionType:jf,transfer:zf,tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain:Kf,tryRefreshingThePageOrComeBackLater:Vf,txAmount:qf,"txType.ATM":"ATM","txType.Capital":"Capital","txType.Chargeback":"Chargeback","txType.Correction":"Correction","txType.Fee":"Fee","txType.Other":"Other","txType.Payment":"Payment","txType.Refund":"Refund","txType.Transfer":"Transfer",type:Zf,value:Xf,weCouldNotLoadThePayoutsOverview:Qf,weCouldNotLoadTheReportsOverview:Jf,weCouldNotLoadTheTransactionsOverview:e1,weCouldNotLoadYourBalanceAccounts:t1,weCouldNotLoadYourPayouts:n1,weCouldNotLoadYourReports:r1,weCouldNotLoadYourTransactions:s1},i1={...o1},$t=e=>e.then(({default:t})=>t),mu={da_DK:()=>$t(Promise.resolve().then(()=>require("./da-DK-DHGqGo8Q.cjs")))},pu={de_DE:()=>$t(Promise.resolve().then(()=>require("./de-DE-k_BRPv7a.cjs")))},_u={es_ES:()=>$t(Promise.resolve().then(()=>require("./es-ES-Cy-9bm8z.cjs")))},yu={fi_FI:()=>$t(Promise.resolve().then(()=>require("./fi-FI-C7ICLuS8.cjs")))},gu={fr_FR:()=>$t(Promise.resolve().then(()=>require("./fr-FR-DH8euUOp.cjs")))},Tu={it_IT:()=>$t(Promise.resolve().then(()=>require("./it-IT-DsfPVAun.cjs")))},Au={nl_NL:()=>$t(Promise.resolve().then(()=>require("./nl-NL-DP_t6EpF.cjs")))},Eu={no_NO:()=>$t(Promise.resolve().then(()=>require("./no-NO-ARsXLWv0.cjs")))},Nu={pt_BR:()=>$t(Promise.resolve().then(()=>require("./pt-BR-CuTqntp7.cjs")))},Su={sv_SE:()=>$t(Promise.resolve().then(()=>require("./sv-SE-DDAIHLKD.cjs")))},po={en_US:i1},ua={...mu,...pu,...po,..._u,...yu,...gu,...Tu,...Au,...Eu,...Nu,...Su},Rn="en-US",Cu=ua.en_US,da={year:"numeric",month:"2-digit",day:"2-digit"},a1=["constructor","i18n","watch","preferredTranslations"],Ru=e=>[...new Set(Object.keys(e).map(t=>t.replace(/_/g,"-")).sort())],c1=Ru(ua),vu={AED:"د.إ",AFN:"؋",ALL:"L",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"Bs.",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BYN:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"Fr.",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KYD:"$",KZT:"₸",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTL:"Lt",LVL:"Ls",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"},l1={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3},Ou=e=>l1[e]||100,u1=e=>!!vu[e],bu=e=>u1(e)?vu[e]:null,Iu=(e,t)=>{const n=Ou(t);return parseInt(String(e),10)/n},d1=(e,t,n,r=!1,s={})=>{const i=e.toString(),o=Iu(i,n),c=t.replace("_","-"),u={style:"currency",currency:n,currencyDisplay:"symbol",...s};try{return r?h1(c,u,o):o.toLocaleString(c,u)}catch{return i}},h1=(e,t,n)=>Intl.NumberFormat(e,t).formatToParts(n).filter(r=>r.type!=="currency").reduce((r,s)=>r+s.value,"").trim(),f1=new RegExp("(?<=GMT)(?:[-+](?:0?\\d|1[0-4])(?::?[0-5]\\d)?)?$"),{BASE_FORMAT_OPTIONS:Du,BASE_LOCALE:jo,SYSTEM_TIMEZONE:Vs,SYSTEM_TIMEZONE_FORMATTER:tr}=(()=>{const e="en-US",t="2-digit",n="numeric",o=Object.freeze({year:n,month:"short",day:n,hour:t,minute:t,second:t,fractionalSecondDigits:3,timeZoneName:"longOffset"});let c,u;try{u=new Intl.DateTimeFormat(e,o),c=u.resolvedOptions().timeZone}catch{c=void 0}return{BASE_FORMAT_OPTIONS:o,BASE_LOCALE:e,SYSTEM_TIMEZONE:c,SYSTEM_TIMEZONE_FORMATTER:u}})(),m1=/\+(?=-)|([+-]00:00)/g,p1=new RegExp("(?<=^\\D?)(\\d)$"),_1=([e,t])=>(Math.abs(e*60)+t)*(e<0?-1:1),y1=e=>Object.freeze([Math.floor(e/60),Ms(e,60)]),g1=e=>parseInt(e,10)||0,T1=e=>`GMT+${y1(e).map(r=>`${r}`.replace(p1,"0$1")).join(":")}`.replace(m1,""),ki=e=>{var n;const t=((n=e==null?void 0:e.match(f1))==null?void 0:n[0].split(":",2).map(g1))??de;return _1(t.concat(0,0).slice(0,2))},A1=(e,t=tr)=>{const n=ki(tr==null?void 0:tr.format(e));return ki(t==null?void 0:t.format(e))-n},ku=(e,t,n=1)=>{const{offset:r,timestamp:s}=e(t);return s-r*n*6e4},Ft=(e,t)=>ku(e,t,1),Zt=(e,t)=>ku(e,t,-1),$s=(()=>{let e,t;Z(Vs)||(e=function(){return this.TIMEZONE},t=function(r){if(Ne(r))this.TIMEZONE=Vs,this.formatter=tr;else try{const s=new Intl.DateTimeFormat(jo,{...Du,timeZone:r}),i=s.resolvedOptions().timeZone;if(this.TIMEZONE===i)return;this.TIMEZONE=i,this.formatter=s}catch{}});function n(...r){if(r.length===0)return n.call(this,Date.now());const s=r[0],i=new Date(s).getTime(),o=this.formatter??tr;return Object.freeze({formatted:o==null?void 0:o.format(i),offset:A1(i,o),timestamp:i})}return()=>{const r={TIMEZONE:Vs},s=t==null?void 0:t.bind(r),i=J({current:{get:e==null?void 0:e.bind(r),set:s},system:{value:Vs}});return Object.defineProperties(n.bind(r),{tz:{get:()=>i,set:s}})}})(),E1={values:$,count:0},N1=/^[a-z]{2}-[A-Z]{2}$/,_o=e=>e.substring(0,2).toLowerCase();function S1(e,t){if(!e)return null;const n=_o(e);return t.find(r=>_o(r)===n)||null}function ha(e){const t=e.replace("_","-");if(N1.test(t))return t;const[n,r]=t.split("-");if(!n||!r)return null;const s=`${n.toLowerCase()}-${r.toUpperCase()}`;return s.length===5?s:null}function fa(e,t){const n=e.trim();if(!n||n.length<1||n.length>5)return Rn;const r=ha(n);return r&&t.includes(r)?r:S1(r??n,t)}function C1(e=$,t){return e===$?e:Object.keys(e).reduce((n,r)=>{const s=ha(r)||fa(r,t);return s&&e[r]&&(n[s]=e[r]),n},{})}const hi=(e,t)=>{if(Q(t)){const n=new Map;let r=-1;return e.replace(/%{(\w+)}/g,(s,i)=>{let o=n.get(i)??-1;const c=t(i,++r,++o)??"";return n.set(i,o),c})}return e.replace(/%{(\w+)}/g,(n,r)=>(t==null?void 0:t[r])??"")},kc=(e,t,n=E1)=>{const r=n.count??0,s=`${t}__${r}`;if(xt(e,s)&&e[s])return hi(e[s],n.values);const i=`${t}__plural`;return xt(e,i)&&r>1&&e[i]?hi(e[i],n.values):xt(e,t)&&e[t]?hi(e[t],n.values):null},R1=async(e,t=$,n=$)=>{const r=fa(e,Object.keys(t))||Rn,s=t[r];return{...Cu,...await(Q(s)?s():s)??$,...cs(n==null?void 0:n[e])}};function v1(){let e=this.locale,t=e,n=[...this.supportedLocales];return J({load:{value:r=>R1(e,this.preferredTranslations,r)},locale:{get:()=>e,set:r=>{t=r,e=ha(r)||fa(r,n)||Rn}},supportedLocales:{get:()=>n,set(r){n=r,this.locale=t}}})}function O1(){var t;const e={};for(const[n,r]of Object.entries(Object.getOwnPropertyDescriptors(zo.prototype)))a1.includes(n)||(Q(r.get)?e[n]={get:r.get.bind(this),...n==="timezone"&&{set:(t=r.set)==null?void 0:t.bind(this)}}:Q(r.value)?e[n]={value:r.value.bind(this)}:e[n]={get:()=>this[n]});return e}var kt,_s,dr,ys,hr,fr,Gt,gs,On,bn,mr,pr,Ts,Li;class zo{constructor(t=Rn,n){w(this,Ts);w(this,kt,Rn);w(this,_s,_o(p(this,kt)));w(this,dr,[Rn]);w(this,ys,p(this,dr));w(this,hr);w(this,fr,Cu);w(this,Gt,v1.call(this));w(this,gs,Pr);w(this,On);w(this,bn);w(this,mr,Bs({timestamp:()=>performance.now()}));w(this,pr,$s());B(this,"watch",p(this,mr).subscribe.bind(void 0));B(this,"i18n",J(O1.call(this)));B(this,"preferredTranslations");this.watch(te),this.preferredTranslations=Object.freeze((n==null?void 0:n.reduce((r,s)=>({...r,...s}),po))??{...po}),O(this,dr,Ru(this.preferredTranslations)),this.locale=t}get customTranslations(){return p(this,hr)??{}}set customTranslations(t){let n,r=[...p(this,dr)];if(!Ne(t)){n=C1(t,c1);const s=Object.keys(n);r=[...r,...s].sort().filter((i,o,c)=>c.indexOf(i)===o)}p(this,Gt).supportedLocales=r,W(this,Ts,Li).call(this,n)}get languageCode(){return p(this,_s)}get lastRefreshTimestamp(){return p(this,mr).snapshot.timestamp}get locale(){return p(this,kt)}set locale(t){if(Ne(t))this.locale=Rn;else{if(p(this,Gt).locale=t,p(this,kt)===p(this,Gt).locale)return;W(this,Ts,Li).call(this,p(this,hr))}}get ready(){return p(this,gs)}get supportedLocales(){return p(this,ys)}get timezone(){return p(this,pr).tz.current}set timezone(t){p(this,pr).tz=t}get(t,n){const r=kc(p(this,fr),t,n);return fo(r)?t:r}has(t,n){return!!kc(p(this,fr),t,n)}amount(t,n,r){const{hideCurrency:s,...i}=r||{},o=d1(t,p(this,kt),n,s,{...i,currencyDisplay:"symbol",signDisplay:"never"});return t<0?`- ${o}`:o}date(t,n={}){const r={...da,timeZone:p(this,pr).tz.current,...n};return new Date(t).toLocaleDateString(p(this,kt),r)}fullDate(t){return this.date(t,{month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}}kt=new WeakMap,_s=new WeakMap,dr=new WeakMap,ys=new WeakMap,hr=new WeakMap,fr=new WeakMap,Gt=new WeakMap,gs=new WeakMap,On=new WeakMap,bn=new WeakMap,mr=new WeakMap,pr=new WeakMap,Ts=new WeakSet,Li=function(t){Z(p(this,bn))&&O(this,gs,new Promise(s=>{O(this,bn,()=>{s(p(this,On)),O(this,On,O(this,bn,void 0))})}));const n=()=>{var s;p(this,On)===r&&((s=p(this,bn))==null||s.call(this))},r=O(this,On,(async()=>{O(this,fr,await p(this,Gt).load(t)),O(this,kt,p(this,Gt).locale),O(this,ys,Object.freeze(p(this,Gt).supportedLocales)),O(this,hr,t),O(this,_s,_o(p(this,kt))),p(this,mr).requestNotification()})());r.then(n).catch(s=>{n(),console.error(s)})};class ma{constructor(t){B(this,"components",[]);B(this,"options");B(this,"localization");B(this,"loadingContext");B(this,"session",new G2);B(this,"onError");B(this,"update",async(t=$)=>(this.setOptions(t),await this.initialize(),this.components.forEach(n=>{n.props.core===this&&n.update(this.getPropsForComponent(this.options))}),this));B(this,"remove",t=>(this.components=this.components.filter(n=>n._id!==t._id),t.unmount(),this));B(this,"registerComponent",t=>{t.props.core===this&&this.components.push(t)});B(this,"setOptions",t=>{var n,r;return this.options={...this.options,...t},this.localization.locale=(n=this.options)==null?void 0:n.locale,this.localization.customTranslations=(r=this.options)==null?void 0:r.translations,this.session.loadingContext=this.loadingContext,this.session.onSessionCreate=this.options.onSessionCreate,this});this.options={environment:vi,...t},this.localization=new zo(t.locale,t.availableTranslations),this.loadingContext=n2(this.options.environment),this.setOptions(t)}async initialize(){return Promise.all([this.localization.ready]).then(()=>this)}getPropsForComponent(t){return{...t}}}B(ma,"version","1.4.0");var Us,re,Lu,wu,Sn,Lc,Pu,wi,Mu,pa,Pi,Mi,Fu,ls={},xu=[],b1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ko=Array.isArray;function Xt(e,t){for(var n in t)e[n]=t[n];return e}function _a(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Mr(e,t,n){var r,s,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?Us.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return ns(e,o,r,s,null)}function ns(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Lu,__i:-1,__u:0};return s==null&&re.vnode!=null&&re.vnode(i),i}function I1(){return{current:null}}function V(e){return e.children}function Jt(e,t){this.props=e,this.context=t}function Fr(e,t){if(t==null)return e.__?Fr(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Fr(e):null}function Bu(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Bu(e)}}function Fi(e){(!e.__d&&(e.__d=!0)&&Sn.push(e)&&!yo.__r++||Lc!==re.debounceRendering)&&((Lc=re.debounceRendering)||Pu)(yo)}function yo(){var e,t,n,r,s,i,o,c;for(Sn.sort(wi);e=Sn.shift();)e.__d&&(t=Sn.length,r=void 0,i=(s=(n=e).__v).__e,o=[],c=[],n.__P&&((r=Xt({},s)).__v=s.__v+1,re.vnode&&re.vnode(r),ya(n.__P,r,s,n.__n,n.__P.namespaceURI,32&s.__u?[i]:null,o,i??Fr(s),!!(32&s.__u),c),r.__v=s.__v,r.__.__k[r.__i]=r,Wu(o,r,c),r.__e!=i&&Bu(r)),Sn.length>t&&Sn.sort(wi));yo.__r=0}function $u(e,t,n,r,s,i,o,c,u,l,h){var d,f,m,y,_,T,g=r&&r.__k||xu,E=t.length;for(u=D1(n,t,g,u,E),d=0;d<E;d++)(m=n.__k[d])!=null&&(f=m.__i===-1?ls:g[m.__i]||ls,m.__i=d,T=ya(e,m,f,s,i,o,c,u,l,h),y=m.__e,m.ref&&f.ref!=m.ref&&(f.ref&&ga(f.ref,null,m),h.push(m.ref,m.__c||y,m)),_==null&&y!=null&&(_=y),4&m.__u||f.__k===m.__k?u=Uu(m,u,e):typeof m.type=="function"&&T!==void 0?u=T:y&&(u=y.nextSibling),m.__u&=-7);return n.__e=_,u}function D1(e,t,n,r,s){var i,o,c,u,l,h=n.length,d=h,f=0;for(e.__k=new Array(s),i=0;i<s;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=i+f,(o=e.__k[i]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?ns(null,o,null,null,null):Ko(o)?ns(V,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?ns(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,c=null,(l=o.__i=k1(o,n,u,d))!==-1&&(d--,(c=n[l])&&(c.__u|=2)),c==null||c.__v===null?(l==-1&&f--,typeof o.type!="function"&&(o.__u|=4)):l!=u&&(l==u-1?f--:l==u+1?f++:(l>u?f--:f++,o.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<h;i++)(c=n[i])!=null&&!(2&c.__u)&&(c.__e==r&&(r=Fr(c)),Hu(c,c));return r}function Uu(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=Uu(r[s],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=Fr(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function yn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Ko(e)?e.some(function(n){yn(n,t)}):t.push(e)),t}function k1(e,t,n,r){var s,i,o=e.key,c=e.type,u=t[n];if(u===null||u&&o==u.key&&c===u.type&&!(2&u.__u))return n;if(r>(u!=null&&!(2&u.__u)?1:0))for(s=n-1,i=n+1;s>=0||i<t.length;){if(s>=0){if((u=t[s])&&!(2&u.__u)&&o==u.key&&c===u.type)return s;s--}if(i<t.length){if((u=t[i])&&!(2&u.__u)&&o==u.key&&c===u.type)return i;i++}}return-1}function wc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||b1.test(t)?n:n+"px"}function qs(e,t,n,r,s){var i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||wc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||wc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Mu,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=pa,e.addEventListener(t,i?Mi:Pi,i)):e.removeEventListener(t,i?Mi:Pi,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Pc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=pa++;else if(t.t<n.u)return;return n(re.event?re.event(t):t)}}}function ya(e,t,n,r,s,i,o,c,u,l){var h,d,f,m,y,_,T,g,E,b,N,D,S,v,R,F,P,z=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[c=t.__e=n.__e]),(h=re.__b)&&h(t);e:if(typeof z=="function")try{if(g=t.props,E="prototype"in z&&z.prototype.render,b=(h=z.contextType)&&r[h.__c],N=h?b?b.props.value:h.__:r,n.__c?T=(d=t.__c=n.__c).__=d.__E:(E?t.__c=d=new z(g,N):(t.__c=d=new Jt(g,N),d.constructor=z,d.render=w1),b&&b.sub(d),d.props=g,d.state||(d.state={}),d.context=N,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),E&&d.__s==null&&(d.__s=d.state),E&&z.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Xt({},d.__s)),Xt(d.__s,z.getDerivedStateFromProps(g,d.__s))),m=d.props,y=d.state,d.__v=t,f)E&&z.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),E&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(E&&z.getDerivedStateFromProps==null&&g!==m&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(g,N),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(g,d.__s,N)===!1||t.__v==n.__v)){for(t.__v!=n.__v&&(d.props=g,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(j){j&&(j.__=t)}),D=0;D<d._sb.length;D++)d.__h.push(d._sb[D]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(g,d.__s,N),E&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(m,y,_)})}if(d.context=N,d.props=g,d.__P=e,d.__e=!1,S=re.__r,v=0,E){for(d.state=d.__s,d.__d=!1,S&&S(t),h=d.render(d.props,d.state,d.context),R=0;R<d._sb.length;R++)d.__h.push(d._sb[R]);d._sb=[]}else do d.__d=!1,S&&S(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++v<25);d.state=d.__s,d.getChildContext!=null&&(r=Xt(Xt({},r),d.getChildContext())),E&&!f&&d.getSnapshotBeforeUpdate!=null&&(_=d.getSnapshotBeforeUpdate(m,y)),c=$u(e,Ko(F=h!=null&&h.type===V&&h.key==null?h.props.children:h)?F:[F],t,n,r,s,i,o,c,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),T&&(d.__E=d.__=null)}catch(j){if(t.__v=null,u||i!=null)if(j.then){for(t.__u|=u?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;i[i.indexOf(c)]=null,t.__e=c}else for(P=i.length;P--;)_a(i[P]);else t.__e=n.__e,t.__k=n.__k;re.__e(j,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=L1(n.__e,t,n,r,s,i,o,u,l);return(h=re.diffed)&&h(t),128&t.__u?void 0:c}function Wu(e,t,n){for(var r=0;r<n.length;r++)ga(n[r],n[++r],n[++r]);re.__c&&re.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){re.__e(i,s.__v)}})}function L1(e,t,n,r,s,i,o,c,u){var l,h,d,f,m,y,_,T=n.props,g=t.props,E=t.type;if(E=="svg"?s="http://www.w3.org/2000/svg":E=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(l=0;l<i.length;l++)if((m=i[l])&&"setAttribute"in m==!!E&&(E?m.localName==E:m.nodeType==3)){e=m,i[l]=null;break}}if(e==null){if(E==null)return document.createTextNode(g);e=document.createElementNS(s,E,g.is&&g),c&&(re.__m&&re.__m(t,i),c=!1),i=null}if(E===null)T===g||c&&e.data===g||(e.data=g);else{if(i=i&&Us.call(e.childNodes),T=n.props||ls,!c&&i!=null)for(T={},l=0;l<e.attributes.length;l++)T[(m=e.attributes[l]).name]=m.value;for(l in T)if(m=T[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=m;else if(!(l in g)){if(l=="value"&&"defaultValue"in g||l=="checked"&&"defaultChecked"in g)continue;qs(e,l,null,m,s)}}for(l in g)m=g[l],l=="children"?f=m:l=="dangerouslySetInnerHTML"?h=m:l=="value"?y=m:l=="checked"?_=m:c&&typeof m!="function"||T[l]===m||qs(e,l,m,T[l],s);if(h)c||d&&(h.__html===d.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),t.__k=[];else if(d&&(e.innerHTML=""),$u(e,Ko(f)?f:[f],t,n,r,E=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&Fr(n,0),c,u),i!=null)for(l=i.length;l--;)_a(i[l]);c||(l="value",E=="progress"&&y==null?e.removeAttribute("value"):y!==void 0&&(y!==e[l]||E=="progress"&&!y||E=="option"&&y!==T[l])&&qs(e,l,y,T[l],s),l="checked",_!==void 0&&_!==e[l]&&qs(e,l,_,T[l],s))}return e}function ga(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(s){re.__e(s,n)}}function Hu(e,t,n){var r,s;if(re.unmount&&re.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||ga(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){re.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&Hu(r[s],t,n||typeof e.type!="function");n||_a(e.__e),e.__c=e.__=e.__e=void 0}function w1(e,t,n){return this.constructor(e,n)}function nr(e,t,n){var r,s,i,o;t==document&&(t=document.documentElement),re.__&&re.__(e,t),s=(r=!1)?null:t.__k,i=[],o=[],ya(t,e=t.__k=Mr(V,null,[e]),s||ls,ls,t.namespaceURI,s?null:t.firstChild?Us.call(t.childNodes):null,i,s?s.__e:t.firstChild,r,o),Wu(i,e,o)}function Gu(e,t,n){var r,s,i,o,c=Xt({},e.props);for(i in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?s=t[i]:c[i]=t[i]===void 0&&o!==void 0?o[i]:t[i];return arguments.length>2&&(c.children=arguments.length>3?Us.call(arguments,2):n),ns(e.type,c,r||e.key,s||e.ref,null)}function Wr(e,t){var n={__c:t="__cC"+Fu++,__:e,Consumer:function(r,s){return r.children(s)},Provider:function(r){var s,i;return this.getChildContext||(s=new Set,(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){s=null},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&s.forEach(function(c){c.__e=!0,Fi(c)})},this.sub=function(o){s.add(o);var c=o.componentWillUnmount;o.componentWillUnmount=function(){s&&s.delete(o),c&&c.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Us=xu.slice,re={__e:function(e,t,n,r){for(var s,i,o;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),o=s.__d),o)return s.__E=s}catch(c){e=c}throw e}},Lu=0,wu=function(e){return e!=null&&e.constructor==null},Jt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xt({},this.state),typeof e=="function"&&(e=e(Xt({},n),this.props)),e&&Xt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Fi(this))},Jt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Fi(this))},Jt.prototype.render=V,Sn=[],Pu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wi=function(e,t){return e.__v.__b-t.__v.__b},yo.__r=0,Mu=/(PointerCapture)$|Capture$/i,pa=0,Pi=Pc(!1),Mi=Pc(!0),Fu=0;var P1=0;function a(e,t,n,r,s,i){t||(t={});var o,c,u=t;if("ref"in u)for(c in u={},t)c=="ref"?o=t[c]:u[c]=t[c];var l={type:e,props:u,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--P1,__i:-1,__u:0,__source:s,__self:i};if(typeof e=="function"&&(o=e.defaultProps))for(c in o)u[c]===void 0&&(u[c]=o[c]);return re.vnode&&re.vnode(l),l}var $n,Se,fi,Mc,xr=0,Yu=[],we=re,Fc=we.__b,xc=we.__r,Bc=we.diffed,$c=we.__c,Uc=we.unmount,Wc=we.__;function Ws(e,t){we.__h&&we.__h(Se,e,xr||t),xr=0;var n=Se.__H||(Se.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function x(e){return xr=1,Vo(ju,e)}function Vo(e,t,n){var r=Ws($n++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ju(void 0,t),function(c){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,c);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=Se,!Se.u)){var s=function(c,u,l){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(f){return!!f.__c});if(h.every(function(f){return!f.__N}))return!i||i.call(this,c,u,l);var d=r.__c.props!==c;return h.forEach(function(f){if(f.__N){var m=f.__[0];f.__=f.__N,f.__N=void 0,m!==f.__[0]&&(d=!0)}}),i&&i.call(this,c,u,l)||d};Se.u=!0;var i=Se.shouldComponentUpdate,o=Se.componentWillUpdate;Se.componentWillUpdate=function(c,u,l){if(this.__e){var h=i;i=void 0,s(c,u,l),i=h}o&&o.call(this,c,u,l)},Se.shouldComponentUpdate=s}return r.__N||r.__}function G(e,t){var n=Ws($n++,3);!we.__s&&Ta(n.__H,t)&&(n.__=e,n.i=t,Se.__H.__h.push(n))}function go(e,t){var n=Ws($n++,4);!we.__s&&Ta(n.__H,t)&&(n.__=e,n.i=t,Se.__h.push(n))}function Y(e){return xr=5,A(function(){return{current:e}},[])}function M1(e,t,n){xr=6,go(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function A(e,t){var n=Ws($n++,7);return Ta(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return xr=8,A(function(){return e},t)}function Hr(e){var t=Se.context[e.__c],n=Ws($n++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Se)),t.props.value):e.__}function F1(){for(var e;e=Yu.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(to),e.__H.__h.forEach(xi),e.__H.__h=[]}catch(t){e.__H.__h=[],we.__e(t,e.__v)}}we.__b=function(e){Se=null,Fc&&Fc(e)},we.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Wc&&Wc(e,t)},we.__r=function(e){xc&&xc(e),$n=0;var t=(Se=e.__c).__H;t&&(fi===Se?(t.__h=[],Se.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(to),t.__h.forEach(xi),t.__h=[],$n=0)),fi=Se},we.diffed=function(e){Bc&&Bc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Yu.push(t)!==1&&Mc===we.requestAnimationFrame||((Mc=we.requestAnimationFrame)||x1)(F1)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),fi=Se=null},we.__c=function(e,t){t.some(function(n){try{n.__h.forEach(to),n.__h=n.__h.filter(function(r){return!r.__||xi(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],we.__e(r,n.__v)}}),$c&&$c(e,t)},we.unmount=function(e){Uc&&Uc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{to(r)}catch(s){t=s}}),n.__H=void 0,t&&we.__e(t,n.__v))};var Hc=typeof requestAnimationFrame=="function";function x1(e){var t,n=function(){clearTimeout(r),Hc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Hc&&(t=requestAnimationFrame(n))}function to(e){var t=Se,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Se=t}function xi(e){var t=Se;e.__c=e.__(),Se=t}function Ta(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function ju(e,t){return typeof t=="function"?t(e):t}const rt="adyen-pe-typography";var I=(e=>(e.CAPTION="caption",e.BODY="body",e.SUBTITLE="subtitle",e.TITLE="title",e))(I||{}),It=(e=>(e.WIDE="wide",e.STRONGER="stronger",e.STRONGER_WIDE="stronger-wide",e.STRONGEST="strongest",e.STRONGEST_WIDE="strongest-wide",e.MEDIUM="m",e.LARGE="l",e.MOBILE="mobile",e))(It||{}),ne=(e=>(e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.DIV="div",e.PARAGRAPH="p",e.SPAN="span",e))(ne||{});function zu(e,t){for(var n in t)e[n]=t[n];return e}function Bi(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Gc(e,t){this.props=e,this.context=t}function Ie(e,t){function n(s){var i=this.props.ref,o=i==s.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,s)||!o:Bi(this.props,s)}function r(s){return this.shouldComponentUpdate=n,Mr(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Gc.prototype=new Jt).isPureReactComponent=!0,Gc.prototype.shouldComponentUpdate=function(e,t){return Bi(this.props,e)||Bi(this.state,t)};var Yc=re.__b;re.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Yc&&Yc(e)};var B1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Gr(e){function t(n){var r=zu({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=B1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var $1=re.__e;re.__e=function(e,t,n,r){if(e.then){for(var s,i=t;i=i.__;)if((s=i.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}$1(e,t,n,r)};var jc=re.unmount;function Ku(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=zu({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Ku(r,t,n)})),e}function Vu(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Vu(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function mi(){this.__u=0,this.o=null,this.__b=null}function qu(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Zs(){this.i=null,this.l=null}re.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),jc&&jc(e)},(mi.prototype=new Jt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var s=qu(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,s?s(c):c())};n.__R=o;var c=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=Vu(u,u.__c.__P,u.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},mi.prototype.componentWillUnmount=function(){this.o=[]},mi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Ku(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&Mr(V,null,e.fallback);return s&&(s.__u&=-33),[Mr(V,null,t.__a?null:e.children),s]};var zc=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function U1(e){return this.getChildContext=function(){return e.context},e.children}function W1(e){var t=this,n=e.h;t.componentWillUnmount=function(){nr(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),t.h.appendChild(r)},insertBefore:function(r,s){this.childNodes.push(r),t.h.insertBefore(r,s)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.h.removeChild(r)}}),nr(Mr(U1,{context:t.context},e.__v),t.v)}function Zu(e,t){var n=Mr(W1,{__v:e,h:t});return n.containerInfo=t,n}(Zs.prototype=new Jt).__a=function(e){var t=this,n=qu(t.__v),r=t.l.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),zc(t,e,r)):s()};n?n(i):i()}},Zs.prototype.render=function(e){this.i=null,this.l=new Map;var t=yn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Zs.prototype.componentDidUpdate=Zs.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){zc(e,n,t)})};var H1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,G1=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Y1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,j1=/[A-Z0-9]/g,z1=typeof document<"u",K1=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Jt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Jt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Kc=re.event;function V1(){}function q1(){return this.cancelBubble}function Z1(){return this.defaultPrevented}re.event=function(e){return Kc&&(e=Kc(e)),e.persist=V1,e.isPropagationStopped=q1,e.isDefaultPrevented=Z1,e.nativeEvent=e};var X1={enumerable:!1,configurable:!0,get:function(){return this.class}},Vc=re.vnode;re.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={},i=r.indexOf("-")===-1;for(var o in n){var c=n[o];if(!(o==="value"&&"defaultValue"in n&&c==null||z1&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var u=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&c===!0?c="":u==="translate"&&c==="no"?c=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?o="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||K1(n.type)?u==="onfocus"?o="onfocusin":u==="onblur"?o="onfocusout":Y1.test(o)&&(o=u):u=o="oninput":i&&G1.test(o)?o=o.replace(j1,"-$&").toLowerCase():c===null&&(c=void 0),u==="oninput"&&s[o=u]&&(o="oninputCapture"),s[o]=c}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=yn(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=yn(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",X1)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=H1,Vc&&Vc(e)};var qc=re.__r;re.__r=function(e){qc&&qc(e),e.__c};var Zc=re.diffed;re.diffed=function(e){Zc&&Zc(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value)};function Q1({el:e,className:t,stronger:n,strongest:r,variant:s,medium:i,large:o,testId:c,wide:u,children:l}){const h=e||"p",d=A(()=>({[`${rt}--${I.CAPTION}`]:s===I.CAPTION,[`${rt}--${I.CAPTION}-${It.WIDE}`]:s===I.CAPTION&&u,[`${rt}--${I.CAPTION}-${It.STRONGER}`]:s===I.CAPTION&&n,[`${rt}--${I.BODY}`]:s===I.BODY,[`${rt}--${I.BODY}-${It.WIDE}`]:s===I.BODY&&u,[`${rt}--${I.BODY}-${It.STRONGER}`]:s===I.BODY&&n,[`${rt}--${I.BODY}-${It.STRONGEST}`]:s===I.BODY&&r,[`${rt}--${I.SUBTITLE}`]:s===I.SUBTITLE,[`${rt}--${I.SUBTITLE}-${It.STRONGER}`]:s===I.SUBTITLE&&n,[`${rt}--${I.TITLE}`]:s===I.TITLE&&!i&&!o,[`${rt}--${I.TITLE}-${It.MEDIUM}`]:s===I.TITLE&&i,[`${rt}--${I.TITLE}-${It.LARGE}`]:s===I.TITLE&&o}),[s,u,n,i,o,r]);return a(h,{className:M([`${rt}`,d,t]),"data-testid":c,children:l})}const k=Ie(Q1),Xu=Wr({i18n:new zo().i18n,loadingContext:"",commonProps:{},updateCore:te,componentRef:{current:null}}),U=()=>Hr(Xu),J1="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='223'%20height='169'%20fill='none'%20viewBox='0%200%20223%20169'%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M36.6%20112.2c.6-.1%201-.7%201-1.3l-.9-8.7%202.1%206.6c.2.6.8.8%201.4.7.6-.1%201-.7.8-1.2l-1.3-6.8%202.9-4.8-5.9-5.5-7.6%209%205%204.7%201%206.2c0%20.7.7%201.2%201.5%201Z'/%3e%3cpath%20fill='%23EAB1A0'%20d='M31.7%20103.6c.3.4%201.2%206.6%201.5%209%200%20.5.6%201%201.1%201h.3c.7%200%201.2-.6%201.1-1.3l-.7-9.1'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M31.7%20103.6c.3.4%201.2%206.6%201.5%209%200%20.5.6%201%201.1%201h.3c.7%200%201.2-.6%201.1-1.3l-.7-9.1'/%3e%3cpath%20fill='%23EAB1A0'%20d='M30.4%2099.3v13.1c0%20.6.5%201.1%201.2%201.1.5%200%201-.4%201-1l1.2-9.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M30.4%2099.3v13.1c0%20.6.5%201.1%201.2%201.1.5%200%201-.4%201-1l1.2-9.3'/%3e%3cpath%20fill='%23EAB1A0'%20d='M35.8%2092s-6.5%204.8-6.6%206.2a995%20995%200%200%200-.9%2010.3c1.5%200%202.8-1%203.2-2.3.6-2.1%201.2-4.9%201-5.1-.1-.3%205-.7%205.8-3.8'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M35.8%2092s-6.5%204.8-6.6%206.2a995%20995%200%200%200-.9%2010.3c1.5%200%202.8-1%203.2-2.3.6-2.1%201.2-4.9%201-5.1-.1-.3%205-.7%205.8-3.8'/%3e%3cpath%20fill='%233300C2'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M95.3%2046.7S78%2053%2070.5%2059.4c-7.6%206.4-36.1%2031.2-36.1%2031.2l11.2%2011%2038-27.3c3.5-2.6%2011.7-27.6%2011.7-27.6Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m45.6%20101.7-11.2-11%2029.8-2.5-18.6%2013.5ZM186.4%2090.4h-7.1v25.3h7.1V90.4ZM215.6%2066.7h-7.2V92h7.2V66.7ZM173.7%20167.8h-7l8.3-44h7l-8.3%2044ZM26.3%20167.8h-7l8.3-44h7l-8.3%2044ZM209.2%20167.8h-7l-8.3-44h7l8.3%2044ZM68%2091.1h-7v25h7V91Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M208.4%2066.7H39V92h169.3V66.7Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M208.4%20123.4v-7.6H39v7.6h169.5Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M193.7%20123.4V116H15.3v7.5h178.4Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M77.4%20167.8h-7l-8.3-44h7l8.3%2044ZM42.2%20150.4l-.8%203h16.2l.7-3.1h-16ZM80.1%20150.3l1.4%203h15.1l-1-3H80Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m97.8%20115.9-28.4.1-7.7%2034.7h-23l9.5-40.6a18%2018%200%200%201%2016.7-12l54-.5-.5%202.6c-2%209.1-10.6%2015.6-20.6%2015.7Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M110.7%20115.9H85.5L99%20150.3h-25L62.9%20117c-3-9%203.6-18.6%2013.6-19.4h.8l54.5-1.3-.6%203.9a20.7%2020.7%200%200%201-20.4%2015.7Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M57.6%20153.4H41.4l-.8%202.7-16.8%204.2c-2%20.7-3.7%202.1-4.7%203.9H55l2.6-10.8ZM96.6%20153.4H81.5l1.3%202.9-15.2%204c-2%20.7-3.6%202.1-4.6%203.8h37.3l-3.7-10.7Z'/%3e%3cpath%20fill='%23fff'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m54%20168%201-3.8H19a8%208%200%200%200-1%203.8h36ZM101.7%20168l-1.3-3.8H63a8%208%200%200%200-1%203.8h39.6Z'/%3e%3cpath%20fill='%233300C2'%20d='M86.9%2059.6c.3%2020-5.4%2037.7-5.4%2037.7l50.3-.1s4.7-18.7%202-31c-2.6-12.3-16.2-21.8-22.5-22.3-6.2-.6-20.6%204.6-20.6%204.6'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M86.9%2059.6c.3%2020-5.4%2037.7-5.4%2037.7l50.3-.1s4.7-18.7%202-31c-2.6-12.3-16.2-21.8-22.5-22.3-6.2-.6-20.6%204.6-20.6%204.6'/%3e%3cpath%20fill='%23fff'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M96.7%2047.1s.6%205.5%202%209c1.2%203.6%202%207.3%202%207.3s6.8-17.5%208.3-19.6c0%200-8%206.5-12.3%203.3Z'/%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m105.8%2038.3%203.1%205.5s-4%206.8-8.6%206.7c-4.7%200-3.5-5.6-3.5-5.6l9-6.6Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m101.8%2044.7-4%204.9-1-2.5%205-2.4ZM97%2083.1H85.6l-3.3-17.9h11.1l3.4%2017.9Z'/%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M101.6%2082.6c-1-1.6-2.3-3-3.2-4.5-1.2-2-1.7-4.5-2.3-6.8-2.5-.7-2.6%204-2.4%206%20.3%201.8%201%203.7%201%203.7-2-.4-10.4-4.7-10.4-4.7.3%200-1.4%202.3-.7%203.3l1%201.3s-.7%201.3-.7%202c-.1%201.2%201.1%202.2%201.1%202.2l.1%202.3c.2.8%201.5%201.5%201.5%201.5s0%201.4.7%201.8c.7.3%2011.2%201.2%2015.8%201.4%200-1.6.5-3.4.3-5%200-1.5-1-3.2-1.8-4.5Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M111.7%2021.9c.4.8-.2%201.8-1%202.4-.7.5-1.7.7-2.6%201%201.2-.4%202.6-.2%203.8.2.4.2.8.4%201%20.7.3.5.1%201.2-.2%201.6-.3.4-.8.8-1.3%201-1.4.7-3%201.2-4.5%201.3%201%200%201.5%201.1%201.1%201.9-.4.8-1.3%201.2-2.2%201.4-1.5.4-3.3.4-4.5-.4-.7-.4-1.1-1-1.5-1.5a7%207%200%200%201-.2-7.4%209%209%200%200%201%205.7-3.8c1.7-.3%205.6-.3%206.4%201.6Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M68.7%2025c.5%201.7%203%202%204.6%201.3-1.2.2-2.4.4-3.3%201.2-1%20.9-1.1%202.4-.1%203%20.3.3.8.4%201.3.4a9%209%200%200%200%204.6-1c-1%20.6-2%201.9-1.3%203%20.6.9%202.2.8%203.2.2%201-.6%202-1.5%203-1.8-.6.4-1.3.8-1.5%201.5-.3.6%200%201.6.6%201.7.5.1%201%200%201.4-.2%201.1-.6%202.2-1.3%203-2.3-1%20.3-.8%201.9.1%202.3%201%20.4%202%200%203-.6a8.5%208.5%200%200%200%202.8-3c-.3.4%200%201.1.6%201.5%201%20.6%202.4.7%203.5.3a9%209%200%200%200%203-2%207%207%200%200%200%202-2.4c.6-1.4.2-3-.7-4.2A10%2010%200%200%200%2095%2021c-4.3-2.3-9.8-3-14.6-1.7a6.6%206.6%200%200%200-6.8-2c-.7.3-1.5.7-1.8%201.4-.5%201.2.5%202.3%201.6%202.8-2%200-5.4%201-4.6%203.5Z'/%3e%3cpath%20fill='%23EAB1A0'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M80.6%2027.7c.7-.7%2010.6-6.8%2010.6-6.8l10.2%203.8%204.8%209.1v.2c.9%207.4-3.1%2010.5-8.8%2013.2-5%202.4-16-1.6-16.9-19.4%200%200%200%200%200%200Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M70.3%2017.3c-.3-.9-.3-1.8.2-2.4.5-.5%201.2-.7%201.9-.6.7%200%201.3.4%201.9.7-.9-.8-.3-2.3.8-2.7%201.1-.3%202.4.1%203.2%201%20.5.4%201%204.3%201.5%204.4.6.1%201%200%201.5-.2%202.4-.9%205-1.5%207.4-1.8%201.9-.3%203.8-.4%205.6-.2%202.1.3%204.2%201%206.2%201.9v0c3.4.2%207.4%2010.5%206.4%2010.8-.9.2.2%200-.1.1-2.1.7-6.4-.7-7.6-1.1a12%2012%200%200%201-3.1-2.1c-1.8-1.4-4-2.2-6.2-2.6l-1.4-.2c-1.8.7-3.8%201-5.8.7-.7%200-1.5-.3-2-.8-.3-.4-.3-1.2.2-1.5-1%20.5-2.1.7-3.3.7-.7%200-1.6%200-2.2-.7-.6-.5-.5-1.6.3-1.8-1.3.3-2.8.7-4%200-.7-.5-1.2-.7-1.4-1.6Z'/%3e%3cpath%20fill='%23EAB1A0'%20d='M100%2027.8c-.6-1.7.7-4.3%202.4-4.6%202.6-.5%204%202%204.5%204%20.5%201.8.6%203.8-.2%205.6-.3.5-.6%201-1.2%201.4'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M100%2027.8c-.6-1.7.7-4.3%202.4-4.6%202.6-.5%204%202%204.5%204%20.5%201.8.6%203.8-.2%205.6-.3.5-.6%201-1.2%201.4'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M96.8%207.7c2%200%203.6-1.5%203.6-3.4%200-1.8-1.6-3.3-3.6-3.3s-3.6%201.5-3.6%203.3c0%201.9%201.6%203.4%203.6%203.4Z'/%3e%3cpath%20fill='%23F3F6F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M107.4%2022.1c0-.1%200-3.3-1.5-7.5-1.6-4-4.9-9.1-11.6-10.4-8.2-1.2-13.2%204-15.4%207.3-2.3%203.2-2.4%205.3-2.4%205.3a67%2067%200%200%201%2030.9%205.3Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M93.3%2017.9c.7-.9.4-2.2-.6-2.7-1-.4-2.4.2-2.7%201.2.7-.9.4-2.2-.5-2.9-.9-.7-2.3-.7-3.2%200-1%20.6-1.3%201.9-1%202.9%200-.7%200-1.5-.2-2.1-.3-.7-1-1.3-1.7-1.3-.5%200-1%20.2-1.4.5a3%203%200%200%200-1%203c-.3-1-.5-2.1-1.2-3-.7-1-1.8-1.6-3-1.4-1%20.2-2%201.3-2%202.3%200%201%20.7%202%201.5%202.7.1%200%2014.6%204%2017%20.8Z'/%3e%3cpath%20fill='%233300C2'%20d='M128%2054.8s22%2026.5%2018.9%2037.8c-2%206.7-47%204.9-47%204.9l2.5-14.3%2023.7-1.5-9.7-12.5'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M128%2054.8s22%2026.5%2018.9%2037.8c-2%206.7-47%204.9-47%204.9l2.5-14.3%2023.7-1.5-9.7-12.5'/%3e%3cpath%20fill='%23fff'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M57.4%201.4H1v29.4h33.2L48.9%2045l-.2-14.2h8.7V1.4Z'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M2.3%20168h219.4'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='M29.2%2026.3c6.2%200%2011.3-4.7%2011.3-10.5S35.4%205.2%2029.2%205.2C23%205.2%2017.9%2010%2017.9%2015.8s5%2010.5%2011.3%2010.5Z'/%3e%3cpath%20stroke='%23fff'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20stroke-width='.6'%20d='m25.2%2012%208%207.5M33.2%2012l-8%207.5'/%3e%3c/svg%3e",Xe=e=>Gr(e),To=(()=>{const e=new Set,t=(r,s,i,o)=>{let c=o==null?void 0:o[i];return c=Q(c)?c:Uo,!Gn(c(r[i]),c(s[i]))};return Object.defineProperty(r=>(s,i)=>{try{for(const o in s)if(e.add(o),t(s,i,o,r))return!1;for(const o in i)if(!e.has(o)&&(e.add(o),t(s,i,o,r)))return!1;return!0}finally{e.clear()}},"exclude",{value:te})})(),Xc=/^\s+|\s+(?=\s|$)/g,Fn=(e,t)=>(t?typeof t=="string"?t:(t==null?void 0:t.value)??"":"").replace(Xc,"")||e.replace(Xc,"")||void 0,Ao=(e,t,n)=>M(Fn("",n),Fn(Fn("",t)||"",e)),Aa=(e,t=[],n=[])=>M([...n,...t==null?void 0:t.map(r=>e?`${e}--${r}`:r)]),qo=e=>Zn(e,(e==null?void 0:e.value)??e),ut="adyen-pe-button",em="adyen-pe-button__anchor",$i=`${ut}-actions`,tm=`${ut}--icon`,nm=`${ut}--icon-content`,rm=`${$i}__container-wrapper`,sm=`${ut}__label`,om=`${ut}__icon-right`,im=`${ut}__icon-left`,am=`${ut}--condensed`,cm=`${ut}--full-width`,lm=`${ut}--loading`,Ui=({inline:e=!1,size:t="large"})=>a("div",{className:`adyen-pe-spinner__wrapper ${e?"adyen-pe-spinner__wrapper--inline":""}`,children:a("div",{className:`adyen-pe-spinner adyen-pe-spinner--${t}`})}),Zo=(e,t,n,r,s,i)=>{const{children:o,iconLeft:c,iconRight:u,iconButton:l=!1,fullWidth:h,condensed:d,state:f="default"}=s,m=C(g=>{g.preventDefault(),r||i==null||i(g)},[r,i]),y=A(()=>Aa(n,t,[n,e]),[n,t,e]),_=A(()=>({...s,className:M(y,{[tm]:l,[am]:d,[cm]:h,[lm]:f==="loading"}),disabled:r||f==="loading"}),[y,d,r,h,l,s,f]),T=A(()=>l?a("div",{className:`${nm}`,children:o}):a(V,{children:[f==="loading"&&a(Ui,{size:"x-small"}),c&&a("span",{className:im,children:c}),a(k,{className:sm,el:ne.SPAN,variant:I.BODY,children:o}),u&&a("span",{className:om,children:u})]}),[o,l,c,u,f]);return{classes:y,click:m,allChildren:T,allProps:_}};var se=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.TERTIARY="tertiary",e.TERTIARY_WITH_BACKGROUND="tertiary-with-background",e.LINK="link",e))(se||{});function um(e,t){const n=A(()=>Fn("",e.className)||"",[e.className]),r=A(()=>qo(e.disabled||!1),[e.disabled]),{click:s,allChildren:i,allProps:o}=Zo(n,[...e.classNameModifiers||[],e.variant||se.PRIMARY],ut,r,e,e.onClick),{classNameModifiers:c,...u}=o;return a("button",{...u,ref:t,type:e.type||"button",onClick:s,children:i})}const he=Xe(um),Qc={md:680,lg:1024},en=({title:e,message:t,imageDesktop:n,imageMobile:r,withImage:s,centered:i,refreshComponent:o,onContactSupport:c,translationValues:u,absolutePosition:l=!0,outlined:h=!0,renderSecondaryButton:d})=>{const{i18n:f,updateCore:m}=U(),y=C(_=>Array.isArray(_)?_.map((T,g)=>g===0?a(V,{children:[f.get(T),u&&u[T]&&a(V,{children:u[T]})]}):a(V,{children:[a("br",{}),f.get(T),u&&u[T]&&a(V,{children:u[T]})]})):f.get(_),[f,u]);return a("div",{className:M(["adyen-pe-error-message-display"],{"adyen-pe-error-message-display--absolute-position":l,"adyen-pe-error-message-display--outlined":h,"adyen-pe-error-message-display--with-background":!h,"adyen-pe-error-message-display--centered":i}),children:[(n||r||s)&&a("div",{className:"adyen-pe-error-message-display__illustration",children:a("picture",{children:[a("source",{type:"image/svg+xml",media:`(min-width: ${Qc.md}px)`,srcSet:n}),a("source",{type:"image/svg+xml",media:`(max-width: ${Qc.md}px)`,srcSet:r}),a("img",{srcSet:n??J1,alt:f.get("thereWasAnUnexpectedError")})]})}),a(k,{variant:I.TITLE,children:f.get(e)}),t&&a(k,{variant:I.BODY,children:y(t)}),(c||o||d)&&a("div",{className:"adyen-pe-error-message-display__button",children:[d&&d(),c&&a(he,{onClick:c,children:f.get("contactSupport")}),!c&&o&&a(he,{onClick:m,children:f.get("refresh")})]})]})},Nn=(e,t)=>Q(e.endpoints[t]),pi={transactions:e=>Nn(e,"getTransactions"),transactionDetails:e=>Nn(e,"getTransaction"),payouts:e=>Nn(e,"getPayouts"),payoutDetails:e=>Nn(e,"getPayout"),reports:e=>Nn(e,"getReports"),capitalOverview:e=>Nn(e,"getDynamicGrantOffersConfiguration"),capitalOffer:e=>Nn(e,"getDynamicGrantOffer")},Qu=async e=>{const t=ou(),n=t.promise,r=e.context.refreshing;let s,i,o=e.subscribe(c=>{if(Yn(c)){t.resolve();return}if(s??(s=e.context.refreshing),!e.context.refreshing){if(Bt(e.context.isExpired)&&(i??(i=!(r||s)))){i=!1,e.refresh();return}t.resolve()}});return n.finally(()=>{o(),o=null}),n},dm=async(e,t)=>{var n;return await Qu(t),xe(await((n=pi[e])==null?void 0:n.call(pi,t.context)))},hm=e=>{switch(e){case"payouts":return"weCouldNotLoadThePayoutsOverview";case"transactions":return"weCouldNotLoadTheTransactionsOverview";case"transactionDetails":return"weCouldNotLoadYourTransactions";case"payoutDetails":return"weCouldNotLoadYourPayouts";case"reports":return"weCouldNotLoadTheReportsOverview";default:return"somethingWentWrong"}},Ju=Wr({endpoints:$,extraConfig:$,hasError:!1,http:r2,isExpired:void 0,isFrozen:!1,refresh:te,refreshing:!1}),fm=({children:e,session:t,type:n})=>{const{http:r,refresh:s}=A(()=>t,[t]),[,i]=x(0),[o,c]=x(0),[u,l]=x();return G(()=>{dm(n,t).then(l)},[t,n]),G(()=>t.subscribe(h=>{(Yn(h)?c:i)(f=>f+1)}),[o]),a(Ju.Provider,{value:{...t.context,http:r,refresh:s},children:!Z(u)&&(u?yn(e):a(en,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[hm(n),"contactSupportForHelp"]}))})},Ce=()=>Hr(Ju),wt=(e=!1)=>{const[t,n]=x(e),r=C(i=>n(i),[]),s=C(()=>n(i=>!i),[]);return[t,r,s]},mm=({i18n:e=new zo().i18n,children:t,commonProps:n,loadingContext:r,updateCore:s,externalErrorHandler:i,componentRef:o})=>{const[c,u]=wt(!1),l=A(()=>n||{},[n]),h=A(()=>r??"",[r]);return G(()=>{(async()=>{await(e==null?void 0:e.ready),u(!0)})().catch()},[]),c?a(Xu.Provider,{value:{i18n:e,commonProps:l,loadingContext:h,updateCore:s,externalErrorHandler:i,componentRef:o},children:yn(t)}):null};var Zl;class ed{constructor(t){B(this,"_component");B(this,"_node",null);B(this,"_id",`${(Zl=this.constructor)==null?void 0:Zl.type}-${aa()}`);B(this,"defaultProps",{});B(this,"props");B(this,"state",{});this.props=this.formatProps({...this==null?void 0:this.defaultProps,...t}),this.props.core.registerComponent(this)}formatProps(t){return t}formatData(){return{}}setState(t){this.state={...this.state,...t}}get data(){return{...this.formatData(),clientStateDataIndicator:!0}}render(){throw new Error("Component cannot be rendered.")}mount(t){const n=gt(t)?document.querySelector(t):t;if(!n)throw new Error("Component could not mount. Root node was not found.");return this._node&&this.unmount(),this._node=n,this._component=this.render(),nr(this._component,n),this}update(t){return this.props=this.formatProps({...this.props,...t}),this._component=this.render(),this._node&&nr(this._component,this._node),this}remount(t){if(!this._node)throw new Error("Component is not mounted.");const n=t||this.render();return nr(n,this._node),this}unmount(){return this._node&&nr(null,this._node),this}remove(){this.unmount(),this.props.core.remove(this)}}B(ed,"type");class jn extends ed{constructor(n){super(n);B(this,"componentRef",null);B(this,"componentToRender",null);B(this,"elementRef");B(this,"onContactSupport");B(this,"customClassNames");B(this,"compRef");B(this,"setUIElementStatus");this.setState=this.setState.bind(this),this.onContactSupport=n.onContactSupport,this.elementRef=this,this.compRef=I1()}get isValid(){return!!this.state.isValid}get displayName(){return this.type}get accessibleName(){return this.displayName}get type(){var n;return(n=this.constructor)==null?void 0:n.type}formatProps(n){return n}formatData(){return{...this.state}}setState(n){this.state={...this.state,...n}}setStatus(n,r){var s,i;return(s=this.componentRef)!=null&&s.setStatus?this.componentRef.setStatus(n,r):(i=this.setUIElementStatus)==null||i.call(this,n),this}render(){const n=this.props.core,r=n.update.bind(n),s=this.props.onError||n.onError||null;return n.session.errorHandler=s,a(fm,{type:this.type,session:n.session,children:a(mm,{i18n:n.localization.i18n,loadingContext:n.loadingContext,updateCore:r,externalErrorHandler:s,componentRef:this.compRef,children:this.componentToRender&&a("div",{ref:this.compRef,className:M("adyen-pe-component",this.customClassNames),children:a("div",{className:"adyen-pe-component__container",children:this.componentToRender()})})})},performance.now())}}function Ot({fetchOptions:{keepPrevData:e,onSuccess:t,enabled:n}={keepPrevData:!0},queryFn:r}){const s=Y(!1),i={error:void 0,data:void 0,isFetching:Bt(n)},o=(h,d)=>{switch(d.type){case"loading":return{...i,isFetching:!0,data:e?h.data:void 0};case"fetched":return{...i,data:d.payload,isFetching:!1};case"error":return{...i,error:d.payload,isFetching:!1};default:return h}},[c,u]=Vo(o,i),l=C(async()=>{u({type:"loading"});try{if(s.current)return;const h=await r();t==null||t(h),u({type:"fetched",payload:h})}catch(h){if(s.current)return;u({type:"error",payload:h})}},[u,r,t]);return G(()=>(s.current=!1,Bt(n)&&l(),()=>{s.current=!0}),[n,l]),c}const Xo=Xe(({title:e,...t},n)=>a("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&a("title",{children:e}),a("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.47 4.97c.3-.3.77-.3 1.06 0L8 9.44l4.47-4.47a.75.75 0 1 1 1.06 1.06l-5 5c-.3.3-.77.3-1.06 0l-5-5a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})]})),Ea=Xe(({title:e,...t},n)=>a("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&a("title",{children:e}),a("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.53 11.03c-.3.3-.77.3-1.06 0L8 6.56l-4.47 4.47a.75.75 0 1 1-1.06-1.06l5-5c.3-.3.77-.3 1.06 0l5 5c.3.3.3.77 0 1.06Z",clipRule:"evenodd"})]})),Na="adyen-pe-accordion",Sa=Na+"__header",pm=Sa+"-container",_m=Sa+"-controller",ym=Na+"__content";function Jc({children:e,classNames:t,header:n,headerInformation:r}){var u;const[s,i]=x(!1),o=Y(null),c=C(()=>{i(!s)},[s]);return a("div",{className:M(Na,t),children:[a("h3",{className:Sa,children:[a("button",{id:"accordion-controller","aria-controls":"accordion-content",className:pm,onClick:c,"aria-expanded":s,children:a("div",{className:_m,children:[n,s?a(Ea,{height:8,width:15}):a(Xo,{height:8,width:15})]})}),r&&a("div",{children:r})]}),a("div",{role:"region",id:"accordion-content","aria-labelledby":"accordion-controller",style:{maxHeight:s?(u=o==null?void 0:o.current)==null?void 0:u.offsetHeight:0},className:ym,children:a("div",{ref:o,children:e})})]})}const nn="adyen-pe-card",td=`${nn}__body`,nd=`${nn}__header`,gm=`${nn}__title`,Tm=`${nn}__subtitle`,Am=`${nd}-content`,Em=`${td}--with-title`,Nm=`${nn}--no-outline`,Sm=`${nn}--no-padding`,Cm=`${nn}--filled`,Rm=`${nn}__footer`,no=({title:e,subTitle:t,children:n,footer:r,el:s,renderHeader:i,renderFooter:o,filled:c,noOutline:u,noPadding:l,classNameModifiers:h,testId:d})=>{const f=s||"header";return a("section",{className:M(nn,{[Cm]:c,[Nm]:u,[Sm]:l},h),"data-testid":d,children:[(e||i)&&a(f,{className:nd,children:(e||i)&&a("div",{className:Am,children:[i||a("span",{className:gm,children:e}),t&&a("div",{className:Tm,children:t})]})}),a("div",{className:M(td,{[Em]:e||i}),children:n}),(r||o)&&a("footer",{className:Rm,children:o||r})]})},el="2-digit",Ca="long",tl="numeric",rd="short",vm="shortOffset",Yr={month:Ca,day:tl,year:tl},sd={hour:el,minute:el},od={...Yr,...sd,month:rd,hour12:!1},id={...od,year:void 0},ad={...Yr,month:"short"},Om=Yr,bm=id,Im={...Yr,weekday:Ca},nl={...Yr,month:rd},Dm=od,km=id,Lm={...Yr,...sd,weekday:Ca,timeZoneName:vm},tt={sm:480,md:768,lg:1024},jr="adyen-pe-structured-list",wm=`${jr}--align-end`,cd=`${jr}__item`,rl=`${jr}__grid`,Pm=`${jr}__content`,Mm=`${jr}__label`,Fm=`${cd}--has-highlight`,xm=e=>{const{i18n:t}=U();return A(()=>e.map(n=>({key:n.key,value:n.value,id:aa(),label:t.get(n.key),type:n.type,config:n.config})),[t,e])},Bm="6-6";function fn({items:e,highlightable:t,renderValue:n,renderLabel:r,layout:s=Bm,grid:i=!0,classNames:o,align:c="end"}){const[u,l]=A(()=>s.split("-").map(f=>`${rl}--width-${f}-of-12`),[s]),h=xm(e),{i18n:d}=U();return a("dl",{"aria-label":d.get("structuredList"),className:M(jr,o,{[wm]:c==="end"}),children:h.map((f,m)=>a("div",{className:M(cd,{[Fm]:t,[rl]:i}),children:[a("dt",{className:M(Mm,u),children:r?r(f.label,e[m].key):a(k,{variant:I.BODY,children:f.label})}),a("dd",{"aria-label":`${d.get(f.key)} ${d.get("value")}`,className:M(Pm,l),children:n?n(f.value,f.key,f.type,f.config):a(k,{variant:I.BODY,children:f.value})})]},`${m}_${f.id||"0"}`))})}const ld="adyen-pe-overview-details",Ra=`${ld}__skeleton`,$m=`${Ra}-container`,Um=`${Ra}--loading-content`,Wm=`${ld}__status-skeleton`,Hm=({skeletonRowNumber:e=0})=>{const t=M(Ra,Um),n=Array.from({length:e}),r=Array.from({length:2});return a("div",{className:$m,children:[a("div",{className:Wm,children:r.map((s,i)=>a("span",{className:t},`status-skeleton-${i}`))}),n.map((s,i)=>a("span",{className:t},`skeleton-${i}`))]})},va=Ie(Hm),Wi=e=>{const{i18n:t}=U();return C((...n)=>{const r=t.timezone;try{return e(...n)}finally{t.timezone=r}},[t,e])},Gm=e=>{const{i18n:t}=U(),n=Wi(C(()=>(t.timezone=void 0,t.timezone=e,t.timezone),[t,e]));return A(n,[n])},rn=e=>{const{i18n:t}=U(),n=Gm(e),r=Wi(C((...i)=>(t.timezone=n,t.date(...i)),[t,n])),s=Wi(C((...i)=>(t.timezone=n,t.fullDate(...i)),[t,n]));return{dateFormat:r,fullDateFormat:s}},bt="adyen-pe-payout-data",Ym=`${bt}__title-container`,jm=`${bt}__title`,zm=`${bt}__title--with-extra-details`,Km=`${bt}__title--ba-id`,Oa=`${bt}__content`,Vm=`${bt}__extra-details`,qm=`${bt}__extra-details-label`,Zm=`${bt}__extra-details-icon`,Xm=`${bt}__button-actions`,Xn=`${Oa}--section`,ro=`${Oa}--card`,sl=`${ro}-title`,rs=`${Xn}-amount`,ol=`${rs}-gross`,Qm=`${rs}-net`,Jm=`${bt}--unpaid-amount`;var Ee=(e=>(e.DEFAULT="default",e.WARNING="warning",e.ERROR="error",e.SUCCESS="success",e.WHITE="white",e.LIGHT="light",e.LIGHT_WITH_OUTLINE="light-with-outline",e.BLUE="blue",e))(Ee||{});const Mt=Ie(({variant:e=Ee.DEFAULT,label:t})=>a("div",{className:M("adyen-pe-tag",{"adyen-pe-tag--success":e===Ee.SUCCESS,"adyen-pe-tag--default":e===Ee.DEFAULT,"adyen-pe-tag--warning":e===Ee.WARNING,"adyen-pe-tag--error":e===Ee.ERROR,"adyen-pe-tag--primary":e===Ee.WHITE,"adyen-pe-tag--light":e===Ee.LIGHT,"adyen-pe-tag--light-with-outline":e===Ee.LIGHT_WITH_OUTLINE,"adyen-pe-tag--blue":e===Ee.BLUE}),children:t})),il={"angle-right":()=>Promise.resolve().then(()=>require("./angle-right-DoWVn5wu.cjs")),"checkmark-circle-fill":()=>Promise.resolve().then(()=>require("./checkmark-circle-fill-CAB5gukT.cjs")),"checkmark-square-fill":()=>Promise.resolve().then(()=>require("./checkmark-square-fill-CiZmFh_I.cjs")),checkmark:()=>Promise.resolve().then(()=>require("./checkmark-CJGA8ZP3.cjs")),"chevron-down":()=>Promise.resolve().then(()=>require("./chevron-down-Dta7QXOA.cjs")),"chevron-left":()=>Promise.resolve().then(()=>require("./chevron-left-B5Al1d4a.cjs")),"chevron-right":()=>Promise.resolve().then(()=>require("./chevron-right-D4tgeCRD.cjs")),"chevron-up":()=>Promise.resolve().then(()=>require("./chevron-up-BnS-kgE5.cjs")),copy:()=>Promise.resolve().then(()=>require("./copy-Cw-eOhqB.cjs")),"cross-circle-fill":()=>Promise.resolve().then(()=>require("./cross-circle-fill-DJTPa1qC.cjs")),cross:()=>Promise.resolve().then(()=>require("./cross-L2Paef-M.cjs")),download:()=>Promise.resolve().then(()=>require("./download-m1Wy-73V.cjs")),"external-link":()=>Promise.resolve().then(()=>require("./external-link-DnmxrmjV.cjs")),filter:()=>Promise.resolve().then(()=>require("./filter-CyAjNvvu.cjs")),"info-filled":()=>Promise.resolve().then(()=>require("./info-filled-DNy-1YG1.cjs")),"minus-circle-outline":()=>Promise.resolve().then(()=>require("./minus-circle-outline-BRBYMsfi.cjs")),"plus-circle-outline":()=>Promise.resolve().then(()=>require("./plus-circle-outline-C077N1t1.cjs")),square:()=>Promise.resolve().then(()=>require("./square-B8n_Cd4N.cjs")),"warning-filled":()=>Promise.resolve().then(()=>require("./warning-filled-DbbyNMim.cjs")),warning:()=>Promise.resolve().then(()=>require("./warning-6iewnkkK.cjs"))},Ze=({className:e,name:t,...n})=>{const[r,s]=x(null);return G(()=>{il[t]?il[t]().then(({default:i})=>{s(a(i,{}))}):(s(null),console.error(`Icon with name "${t}" does not exist.`))},[t]),r&&a("span",{className:M("adyen-pe-icon",e),role:"img","aria-hidden":!0,...n,children:r})};function ba({href:e,children:t,variant:n="default",truncate:r,target:s="_blank",withIcon:i=!0,classNames:o=[],...c}){const u=C(l=>l.stopPropagation(),[]);return a("a",{className:M("adyen-pe-link",[...o],{[`adyen-pe-link--${n}`]:n!=="default","adyen-pe-link--truncate":r}),href:e,target:s,rel:"noopener noreferrer",onClick:u,...c,children:[a(k,{className:"adyen-pe-link__text",el:ne.SPAN,variant:I.BODY,children:t}),i&&s==="_blank"&&a(Ze,{name:"external-link"})]})}const Ia=({className:e,alt:t,url:n})=>a("div",{className:"adyen-pe-data-grid__icon-container",children:a("img",{className:M("adyen-pe-data-grid__icon",e),alt:t,src:n})}),ud=Wr($),Da=()=>Hr(ud);function al({children:e,column:t,position:n,...r}){const{registerCells:s}=Da(),i=Y(null);return G(()=>{var o;i.current&&s({column:t,width:(o=i.current)==null?void 0:o.getBoundingClientRect().width})},[t,s]),a("div",{role:"cell",className:M("adyen-pe-data-grid__cell",{"adyen-pe-data-grid__cell--right":n==="right","adyen-pe-data-grid__cell--center":n==="center"}),...r,children:e&&wu(e)?Gu(e,{...e==null?void 0:e.props,ref:i,style:{width:"min-content"}}):null})}const xn=e=>!!e&&typeof e=="object"&&"value"in e,cl=e=>!!e&&typeof e=="object"&&e.type==="icon",ep=e=>!!e&&typeof e=="object"&&e.type==="button",tp=e=>!!e&&typeof e=="object"&&e.type==="link",dd=({columns:e,customCells:t,item:n,rowIndex:r})=>a(V,{children:e.map(({key:s,position:i})=>{var d,f,m,y,_,T,g;if(t!=null&&t[s])return a(al,{"aria-labelledby":String(s),column:s,position:i,children:a("div",{style:{width:"min-content"},children:t[s]({key:s,value:n[s],item:n,rowIndex:r})})},s);const o=n[s],{value:c,type:u}=xn(o)?o:{value:o,type:"text"},l=cl(o)?{url:(d=o==null?void 0:o.config)==null?void 0:d.src,alt:((f=o==null?void 0:o.config)==null?void 0:f.alt)!==void 0&&((m=o==null?void 0:o.config)==null?void 0:m.alt)!==null?(y=o==null?void 0:o.config)==null?void 0:y.alt:o.value}:void 0,h=ep(o)?E=>{var b;E.stopPropagation(),(b=o==null?void 0:o.config)==null||b.action()}:void 0;return a(al,{"aria-labelledby":String(s),column:s,position:i,children:a("div",{className:"adyen-pe-data-grid__cell-value",children:[cl(o)&&o.config&&(l==null?void 0:l.url)&&a("div",{className:M("adyen-pe-data-grid__icon-cell",(_=o==null?void 0:o.config)==null?void 0:_.className),children:[a(Ia,{...l}),c.trim()&&a("span",{children:c})]}),u==="text"&&a("span",{className:M((T=o==null?void 0:o.config)==null?void 0:T.className),children:c}),u==="button"&&o.config&&h&&a(he,{className:M((g=o.config)==null?void 0:g.className),onClick:h,variant:se.SECONDARY,children:c}),tp(o)&&o.config&&a(ba,{classNames:o.config.className?[o.config.className]:[],href:o.config.href,target:o.config.target,children:c})]})},s)})});var Hs=(e=>(e.BUTTONS_END="buttons-end",e.FILL_CONTAINER="fill-container",e.SPACE_BETWEEN="space-between",e.VERTICAL_STACK="vertical-stack",e))(Hs||{}),hd=(e=>(e.BUTTONS_START="buttons-start",e))(hd||{});const np={...Hs,...hd};function rp({actions:e,layout:t=np.BUTTONS_END}){const n=()=>`${$i}--${t}`,r=i=>{const o=e.length-1;return i===o?se.PRIMARY:se.SECONDARY},s=A(()=>[...e].reverse(),[e]);return a("div",{className:$i,children:a("div",{className:`${rm} ${n()}`,role:"group",children:s.map((i,o)=>a(he,{className:M(i.classNames),"aria-label":i.title,disabled:i.disabled,variant:i.variant||r(o),onClick:i.event,state:i.state??"default",children:i.renderTitle?i.renderTitle(i.title):i.title},`${o}_${i.title||"0"}`))})})}const ka=Ie(rp),sp=({balanceAccountId:e,balanceAccountDescription:t,payout:n,extraFields:r})=>{var f;const{payout:s}=n??$,{dateFormat:i}=rn("UTC"),{i18n:o}=U(),c=A(()=>{var y,_;const m=(_=(y=n==null?void 0:n.amountBreakdowns)==null?void 0:y.adjustmentBreakdown)==null?void 0:_.reduce((T,g)=>{var S,v,R,F,P,z,j;const E=(S=g==null?void 0:g.amount)!=null&&S.value&&((v=g==null?void 0:g.amount)!=null&&v.currency)?o.amount((R=g==null?void 0:g.amount)==null?void 0:R.value,(F=g==null?void 0:g.amount)==null?void 0:F.currency,{hideCurrency:!0}):(((P=g==null?void 0:g.amount)==null?void 0:P.value)??"").toString(),b=`${g==null?void 0:g.category}`,N=o.get(b),D=g!=null&&g.category&&N!==b?N:g==null?void 0:g.category;return g!=null&&g.category&&E&&D&&T[(z=g==null?void 0:g.amount)!=null&&z.value&&((j=g==null?void 0:g.amount)==null?void 0:j.value)<0?"subtractions":"additions"].push({key:D,value:E}),T},{subtractions:[],additions:[]});return m==null||m.subtractions.sort((T,g)=>T.key.localeCompare(g.key)),m==null||m.additions.sort((T,g)=>T.key.localeCompare(g.key)),m},[o,n]),u=A(()=>{var y,_;const m=(_=(y=n==null?void 0:n.amountBreakdowns)==null?void 0:y.fundsCapturedBreakdown)==null?void 0:_.reduce((T,g)=>{var E,b,N,D;return((E=g==null?void 0:g.amount)==null?void 0:E.value)===0||(b=g==null?void 0:g.amount)!=null&&b.value&&g.category&&T.push({key:g.category,value:o.amount((N=g==null?void 0:g.amount)==null?void 0:N.value,(D=g==null?void 0:g.amount)==null?void 0:D.currency,{hideCurrency:!0})}),T},[]);return m==null||m.sort((T,g)=>T.key==="capture"?-1:g.key==="capture"?1:T.key.localeCompare(g.key)),m},[n,o]),l=A(()=>s!=null&&s.createdAt?i(new Date(s==null?void 0:s.createdAt),Im):"",[s,i]),h=Object.entries(r||{}).filter(([,m])=>m.type!=="button"&&m.visibility!=="hidden").map(([m,y])=>({key:m,value:xn(y)?y.value:y,type:xn(y)?y.type:"text",config:xn(y)?y.config:void 0}))||[],d=A(()=>[...r?Object.values(r).filter(_=>_.type==="button").map(_=>{var T,g,E;return{title:_.value,variant:se.SECONDARY,event:(T=_.config)==null?void 0:T.action,classNames:(g=_==null?void 0:_.config)!=null&&g.className?[(E=_==null?void 0:_.config)==null?void 0:E.className]:[]}}):[]].filter(Boolean),[r]);return a(V,{children:s?a("div",{className:bt,children:[a("div",{className:M(jm,{[zm]:h.length}),children:[a("div",{className:Ym,children:[a(k,{variant:I.SUBTITLE,stronger:!0,children:o.get("netPayout")}),s.isSumOfSameDayPayouts&&a(Mt,{variant:Ee.BLUE,label:o.get("sumOfSameDayPayouts")})]}),a(k,{variant:I.TITLE,large:!0,children:`${o.amount(s.payoutAmount.value,s.payoutAmount.currency,{hideCurrency:!0})} ${s.payoutAmount.currency}`}),a(k,{variant:I.BODY,children:l}),a("div",{className:Xn,children:[t&&a(k,{variant:I.CAPTION,stronger:!0,wide:!0,children:`${t}`}),a(k,{variant:I.CAPTION,className:Km,children:`${e}`})]})]}),h.length>0?a("div",{children:a(fn,{classNames:Vm,items:h,align:"start",layout:"5-7",renderLabel:m=>a("div",{className:qm,children:m}),renderValue:(m,y,_,T)=>{if(_==="link"&&T)return a(ba,{classNames:[M(T==null?void 0:T.className)],href:T.href,target:T.target||"_blank",children:m});if(_==="icon"&&T){const g={url:T.src,alt:T.alt||m};return a("div",{className:M(Zm,T==null?void 0:T.className),children:[a(Ia,{...g}),a(k,{variant:I.BODY,children:m})]})}return a(k,{className:M(T==null?void 0:T.className),variant:I.BODY,children:m})}})}):null,a("div",{className:Oa,children:[a("div",{className:Xn,children:(s==null?void 0:s.fundsCapturedAmount)&&(u&&Object.keys(u).length>0?a(Jc,{header:a(k,{variant:I.BODY,children:o.get("fundsCaptured")}),headerInformation:a(k,{variant:I.BODY,children:o.amount(s.fundsCapturedAmount.value,s.fundsCapturedAmount.currency)}),children:a("div",{className:Xn,children:a("div",{className:ro,children:a(no,{noPadding:!0,children:a(fn,{items:u})})})})}):a("div",{className:M(rs,ol),children:[a(k,{variant:I.BODY,children:o.get("fundsCaptured")}),a(k,{variant:I.BODY,children:o.amount(s.fundsCapturedAmount.value,s.fundsCapturedAmount.currency)})]}))}),a("div",{className:Xn,children:c!=null&&c.subtractions&&Object.keys(c==null?void 0:c.subtractions).length>0||c!=null&&c.additions&&Object.keys(c==null?void 0:c.additions).length>0?a(Jc,{header:a(k,{variant:I.BODY,children:o.get("adjustments")}),headerInformation:a(k,{variant:I.BODY,children:o.amount(s.adjustmentAmount.value,s.adjustmentAmount.currency)}),children:[(c==null?void 0:c.additions)&&Object.keys(c==null?void 0:c.additions).length>0&&a("div",{className:ro,children:a(no,{noPadding:!0,renderHeader:a(k,{className:sl,variant:I.CAPTION,stronger:!0,children:o.get("additions")}),children:a(fn,{items:c==null?void 0:c.additions})})}),(c==null?void 0:c.subtractions)&&Object.keys(c==null?void 0:c.subtractions).length>0&&a("div",{className:ro,children:a(no,{noPadding:!0,renderHeader:a(k,{className:sl,variant:I.CAPTION,stronger:!0,children:o.get("subtractions")}),children:a(fn,{items:c==null?void 0:c.subtractions})})})]}):a("div",{className:M(rs,ol),children:[a(k,{variant:I.BODY,children:o.get("adjustments")}),a(k,{variant:I.BODY,children:o.amount(s.adjustmentAmount.value,s.adjustmentAmount.currency)})]})}),a("div",{className:M(Xn),children:a("div",{className:M(rs,Qm),children:[a(k,{variant:I.BODY,stronger:!0,children:o.get("netPayout")}),a(k,{variant:I.BODY,stronger:!0,children:o.amount(s.payoutAmount.value,s.payoutAmount.currency)})]})})]}),((f=n==null?void 0:n.payout)==null?void 0:f.unpaidAmount)&&a("div",{className:Jm,children:[a(k,{variant:I.BODY,children:o.get("remainingAmount")}),a(k,{variant:I.BODY,children:o.amount(n.payout.unpaidAmount.value,n.payout.unpaidAmount.currency)})]}),d.length?a("div",{className:Xm,children:a(ka,{actions:d,layout:Hs.BUTTONS_END})}):null]}):a(va,{skeletonRowNumber:6})})};var Fe=(e=>(e.WARNING="warning",e.CRITICAL="critical",e.HIGHLIGHT="highlight",e.SUCCESS="success",e))(Fe||{}),mn=(e=>(e.DEFAULT="default",e.TIP="tip",e))(mn||{});const op=({className:e,type:t})=>{switch(t){case Fe.WARNING:return a(Ze,{name:"warning-filled",className:e});case Fe.CRITICAL:return a(Ze,{name:"cross-circle-fill",className:e});case Fe.HIGHLIGHT:return a(Ze,{name:"info-filled",className:e});case Fe.SUCCESS:default:return a(Ze,{name:"checkmark-circle-fill",className:e})}},pn=({className:e,description:t,title:n,type:r,children:s,onClose:i,variant:o=mn.DEFAULT})=>a("div",{className:M("adyen-pe-alert",`adyen-pe-alert--${r}`,`adyen-pe-alert--${o}`,e),role:"alert",children:[a(op,{type:r,className:"adyen-pe-alert__icon"}),a("div",{className:"adyen-pe-alert__content",children:[n&&o!==mn.TIP&&a(k,{className:"adyen-pe-alert__title",el:ne.DIV,variant:I.BODY,wide:!0,strongest:!0,children:n}),t&&a(k,{className:"adyen-pe-alert__description",el:ne.DIV,variant:o!==mn.TIP?I.CAPTION:I.BODY,wide:!0,children:t}),s]}),i&&o!==mn.TIP&&a("div",{className:"adyen-pe-alert__close-button",children:a(he,{iconButton:!0,variant:se.TERTIARY,onClick:i,children:a(Ze,{name:"cross"})})})]});var lt=(e=>(e[e.DETAILS=0]="DETAILS",e[e.REFUND=1]="REFUND",e[e.REFUND_SUCCESS=2]="REFUND_SUCCESS",e[e.REFUND_ERROR=3]="REFUND_ERROR",e))(lt||{}),cr=(e=>(e[e.INDETERMINATE=0]="INDETERMINATE",e[e.PARTIAL=1]="PARTIAL",e[e.FULL=2]="FULL",e))(cr||{}),We=(e=>(e.NON_REFUNDABLE="non_refundable",e.PARTIAL_AMOUNT="partially_refundable_any_amount",e.PARTIAL_LINE_ITEMS="partially_refundable_with_line_items_required",e.FULL_AMOUNT="fully_refundable_only",e))(We||{}),Zr=(e=>(e.IN_PROGRESS="in_progress",e.COMPLETED="completed",e.FAILED="failed",e))(Zr||{}),vn=(e=>(e.PARTIAL="partial",e.FULL="full",e))(vn||{});const fd=Wr({availableItems:de,primaryAction:te,secondaryAction:te,transaction:$,extraFields:$,dataCustomization:$}),ip=Ie(({children:e,lineItems:t,refundAvailable:n,refundDisabled:r,setActiveView:s,setPrimaryAction:i,setSecondaryAction:o,transaction:c,transactionNavigator:u,extraFields:l,dataCustomization:h})=>{const{i18n:d}=U(),{currentTransaction:f,canNavigateBackward:m,canNavigateForward:y,backward:_,forward:T}=u,g=A(()=>({title:d.get("refundAction")}),[d]),E=A(()=>!n||r,[n,r]),b=C(()=>void(!E&&s(lt.REFUND)),[E,s]),N=A(()=>{if(f===c.id){if(m)return 2;if(y)return 1}},[m,y,f,c]),D=C(()=>{switch(N){case 2:return void _();case 1:return void T()}},[N,_,T]),S=A(()=>{switch(N){case 2:return{title:d.get("refund.returnToRefund"),renderTitle:v=>a(V,{children:[a(Ze,{style:{transform:"scaleX(-1)"},name:"angle-right"}),a("span",{children:v})]})};case 1:return{title:d.get("refund.goToPayment"),renderTitle:v=>a(V,{children:[a(Ze,{name:"angle-right"}),a("span",{children:v})]})}}},[N,d]);return G(()=>{i(n?Object.freeze({disabled:E,event:b,variant:se.PRIMARY,...g}):void 0)},[b,n,E,g,i]),G(()=>{o(N&&S?Object.freeze({disabled:!1,event:D,variant:se.SECONDARY,...S}):void 0)},[N,D,S,o]),a(fd.Provider,{value:{availableItems:t,primaryAction:b,secondaryAction:D,transaction:c,extraFields:l,dataCustomization:h},children:e})}),ap=()=>Hr(fd),La=Object.freeze(["requested_by_customer","issue_with_item_sold","fraudulent","duplicate","other"]),cp=({refundAmount:e,refundReason:t,refundInProgress:n,refundTransaction:r,setActiveView:s,transactionId:i})=>{const{i18n:o}=U(),c=A(()=>{const y=o.amount(e.value,e.currency);return{title:o.get("refundPayment",{values:{amount:y}})}},[e,o]),u=A(()=>({title:o.get("refundAction")}),[o]),l=A(()=>({title:`${o.get("inProgress")}..`,state:"loading"}),[o]),h=A(()=>({path:{transactionId:i}}),[i]),d=A(()=>({amount:e,refundReason:t}),[e,t]),f=C(()=>r==null?void 0:r({body:d,contentType:"application/json"},h).then(()=>{s(lt.REFUND_SUCCESS)}).catch(()=>{s(lt.REFUND_ERROR)}),[r,h,d,s]),m=A(()=>n?l:e.value>0?c:u,[e,n,c,u,l]);return{refundAction:f,refundActionLabel:m}},lp=({interactionsDisabled:e,refundAmount:t,setActiveView:n,setPrimaryAction:r,setSecondaryAction:s,...i})=>{const{refundAction:o,refundActionLabel:c}=cp({...i,refundAmount:t,setActiveView:n}),{i18n:u}=U(),l=A(()=>e||t.value<=0,[t,e]),h=C(()=>!l&&o(),[l,o]),d=e,f=A(()=>u.get("back"),[u]),m=C(()=>void(!d&&n(lt.DETAILS)),[d,n]);return G(()=>{r(Object.freeze({disabled:l,event:h,variant:se.PRIMARY,...c}))},[h,l,c,r]),G(()=>{s(Object.freeze({disabled:d,event:m,title:f,variant:se.SECONDARY}))},[m,d,f,s]),{primaryAction:h,secondaryAction:m}},up=({availableAmount:e,currency:t,interactionsDisabled:n,items:r,refundMode:s})=>{const[i,o]=x(0),c=A(()=>{switch(s){case We.NON_REFUNDABLE:return 0;case We.PARTIAL_LINE_ITEMS:case We.PARTIAL_AMOUNT:return i;case We.FULL_AMOUNT:default:return e}},[e,r,s,i]),u=A(()=>Object.freeze({currency:t,value:c}),[c,t]),l=A(()=>!n&&s===We.PARTIAL_AMOUNT,[n,s]),h=C(d=>void(l&&o(vt(0,d,e))),[e,l]);return G(()=>{o(e)},[e]),[u,h]},ll=(e,t,n,r=0)=>{const{...s}=e.get(n.id),i=vt(0,Math.trunc(r),s.quantity+=n.quantity);s.quantity-=i,e.set(n.id,Object.freeze(s)),i>0&&t.push(Object.freeze({...s,quantity:i}))},ul=(e,t,n=de)=>{const r=new Map((n==null?void 0:n.map(({id:i,quantity:o})=>[i,o]))??de),s=[];return t.forEach(i=>{const o=r.get(i.id);Z(o)?s.push(i):r.delete(i.id)&&ll(e,s,i,o)}),r.forEach((i,o)=>{ll(e,s,{id:o,quantity:0},i)}),s.length>0?Object.freeze(s):de},dp=({currency:e,lineItems:t})=>{const[n,r]=x(de),s=A(()=>{const u=t==null?void 0:t.filter(l=>{if(l.amountIncludingTax.currency!==e)return;const h=l.availableQuantity;return h>0&&Number.isFinite(h)&&Math.trunc(h)===h}).map(({id:l,...h})=>[l,Object.freeze({amount:h.amountIncludingTax.value,quantity:h.availableQuantity,id:l})]);return new Map(u??de)},[e,t]),i=A(()=>(t==null?void 0:t.filter(({id:u})=>s.has(u)))??de,[n,t,s]),o=C(function(u){r(l=>{const d=[...arguments.length===0?new Map(l.map(({id:f})=>[f,0])):new Map((u==null?void 0:u.map(f=>[f,0]))??de)].map(([f,m])=>({id:f,quantity:m}));return ul(s,l,d)})},[s]),c=C(u=>r(l=>ul(s,l,u)),[s]);return{availableItems:i,clearItems:o,items:n,updateItems:c}},hp=({interactionsDisabled:e,refundMode:t})=>{const[n,r]=x(La[0]),s=A(()=>!e&&t!==We.NON_REFUNDABLE,[e,t]),i=C(o=>void(s&&r(o)),[s]);return[n,i]},Xs=e=>{setTimeout(()=>{throw e},0)};function Eo({queryFn:e,options:t}){const{retry:n=!1,retryDelay:r=1e3,onSuccess:s,onError:i,onSettled:o,shouldRetry:c}=t||$,[u,l]=x(null),[h,d]=x(null),[f,m]=x("idle"),y=Y(!0),_=Y(0),T=C(()=>{l(null),d(null),m("idle"),_.current=0},[]),g=C(()=>{_.current=0},[]),E=C(async(...b)=>{try{m("loading"),d(null);const N=await(e==null?void 0:e(...b));return y.current&&(l(N),m("success")),Pr.then(()=>{s&&hn(s,N).catch(Xs),o&&hn(o,N,null).catch(Xs),g()}),N}catch(N){let D=0;if($r(n)&&(!c||c(N))?D=Math.max(0,Math.floor(n)):D=0,_.current++<D){const S=Q(r)?r(_.current):r??1e3;return await new Promise(v=>setTimeout(v,S)),E(...b)}throw y.current&&(d(N),m("error")),Pr.then(()=>{i&&hn(i,N).catch(Xs),o&&hn(o,void 0,N).catch(Xs),g()}),N}},[e,s,o,n,c,r,g,i]);return G(()=>()=>{y.current=!1},[]),A(()=>({data:u,error:h,status:f,isIdle:f==="idle",isLoading:f==="loading",isSuccess:f==="success",isError:f==="error",mutate:E,reset:T}),[u,h,f,E,T])}const md=Wr({amount:0,availableAmount:0,availableItems:de,clearItems:te,currency:"",interactionsDisabled:!1,items:de,primaryAction:te,refundMode:We.FULL_AMOUNT,refundReason:La[0],secondaryAction:te,setAmount:te,setRefundReason:te,transactionId:"",updateItems:te}),fp=Ie(({availableAmount:e,children:t,currency:n,lineItems:r,refreshTransaction:s,refundMode:i,setActiveView:o,setPrimaryAction:c,setSecondaryAction:u,transactionId:l})=>{const{isLoading:h,mutate:d}=Eo({queryFn:Ce().endpoints.initiateRefund}),{availableItems:f,clearItems:m,items:y,updateItems:_}=dp({currency:n,lineItems:r}),T=h,[g,E]=up({availableAmount:e,currency:n,interactionsDisabled:T,items:y,refundMode:i}),[b,N]=hp({interactionsDisabled:T,refundMode:i}),{value:D}=g,{primaryAction:S,secondaryAction:v}=lp({interactionsDisabled:T,refreshTransaction:s,refundAmount:g,refundInProgress:h,refundReason:b,refundTransaction:d,setActiveView:o,setPrimaryAction:c,setSecondaryAction:u,transactionId:l});return a(md.Provider,{value:{amount:D,availableAmount:e,availableItems:f,clearItems:m,currency:n,interactionsDisabled:T,items:y,primaryAction:S,refundMode:i,refundReason:b,secondaryAction:v,setAmount:E,setRefundReason:N,transactionId:l,updateItems:_},children:t})}),wa=()=>Hr(md),mp=()=>{let[e,t,n,r]=de;const s=()=>!!(e&&e===r&&n),i=()=>!!(e&&e===n&&r);let o=null;const c=()=>{s()&&(t=e,e=n,d())},u=()=>{i()&&(t=e,e=r,d())},l=(f,m)=>{const y=e;e=t=n=r=void 0,!Ii(f)&&!Ii(m)&&(n=f,r=m,e=y===n||y===r?y:n,y!==e&&d())},h=f=>{Ne(f)?o=null:Q(f)&&o!==(o=f)&&d()},d=()=>{const f=t,m=e;t=void 0,o==null||o(J({from:ue(()=>f),to:ue(()=>m)}))};return J({backward:H(c),forward:H(u),canNavigateBackward:ue(s),canNavigateForward:ue(i),currentTransaction:ue(()=>e),onNavigation:{set:h},reset:H(l)})},pp=e=>{const[t,n]=x(e),[r,s]=x(e.id),[i,o]=x(performance.now()),{getTransaction:c}=Ce().endpoints,u=Y(mp()),l=u.current,h=Y(!1),d=Y(!1),f=Y(e),m=Y(r),y=A(()=>!!c&&!!r&&h.current,[r,c]),_=C(()=>c($,{path:{transactionId:r}}),[r,c]),{data:T,error:g,isFetching:E}=Ot({fetchOptions:{enabled:y},queryFn:_}),b=C(()=>s(void 0),[]);return G(()=>{r||s(t.id)},[r,t]),G(()=>{var S;const N=u.current,D=f.current;return D.category==="Refund"&&(N.reset(D.id,(S=D.refundMetadata)==null?void 0:S.originalPaymentId),N.onNavigation=({to:v})=>{h.current=!0,o(performance.now()),v&&s(v)}),()=>{h.current=!1,N.onNavigation=null,N.reset()}},[]),G(()=>{if(d.current!==E&&!(d.current=E))if(!T||g)s(m.current);else{const N=f.current;n(()=>({...T.id===N.id?N:$,...T})),m.current=r}},[T,g,E,r,i]),{fetchingTransaction:E,refreshTransaction:b,transaction:t,transactionNavigator:l}},_p=(e,t)=>{let n=t?(t==null?void 0:t.length)>0:!1,r=!1;return t==null||t.forEach(s=>{const i=!!e(s);n&&(n=i),r||(r=i)}),{every:n,some:r}},Qs=["completed","in_progress","failed"],yp=e=>{var b,N,D;const{i18n:t}=U(),n=e==null?void 0:e.refundDetails,r=(n==null?void 0:n.refundMode)??We.FULL_AMOUNT,s=xe(n==null?void 0:n.refundLocked),i=r!==We.NON_REFUNDABLE,o=(b=e==null?void 0:e.originalAmount)==null?void 0:b.value,c=A(()=>{var S;return e?Math.max(0,((S=n==null?void 0:n.refundableAmount)==null?void 0:S.value)??0):0},[n,e]),u=Q(Ce().endpoints.initiateRefund),l=u&&i&&c>0,h=((N=n==null?void 0:n.refundableAmount)==null?void 0:N.currency)??(e==null?void 0:e.amount.currency)??"",d=!l||s,f=A(()=>{var v;const S=((v=e==null?void 0:e.refundDetails)==null?void 0:v.refundStatuses)??[];return(S==null?void 0:S.filter(R=>R.amount.value!==0).sort((R,F)=>Qs.includes(R.status)&&Qs.includes(F.status)&&Qs.indexOf(R.status)>Qs.indexOf(F.status)?0:-1).reduce((R,F)=>{var j;const P=F.status,z=~F.amount.value+1;return R!=null&&R[P]?((j=R==null?void 0:R[P])==null||j.amounts.push(z),R):{...R,[P]:{amounts:[z],currency:F.amount.currency}}},{}))??{}},[(D=e==null?void 0:e.refundDetails)==null?void 0:D.refundStatuses]),m=A(()=>{var v,R;const S=(R=(v=f.completed)==null?void 0:v.amounts)==null?void 0:R.reduce((F,P)=>F+P,0);return S?Math.max(0,S??0):0},[f]),{some:y,every:_}=A(()=>_p(({status:S})=>S===Zr.COMPLETED,n==null?void 0:n.refundStatuses),[n==null?void 0:n.refundStatuses]),T=A(()=>{var S;return c===0&&m>0&&_&&m===o?[{type:Fe.HIGHLIGHT,label:t.get("refund.fullAmountRefunded")}]:((S=Object.keys(f))==null?void 0:S.map(R=>{var j,ie;const F=R,P=(j=f==null?void 0:f[F])==null?void 0:j.amounts.reduce((K,ce,Te)=>{var _e,De,pe;const me=(_e=f==null?void 0:f[F])==null?void 0:_e.amounts.length;return me>1&&Te===me-1?`${K?`${K}`:""} ${t.get("and")} ${t.amount(ce,(De=f==null?void 0:f[F])==null?void 0:De.currency)}`:`${K?`${K},`:""} ${t.amount(ce,(pe=f==null?void 0:f[F])==null?void 0:pe.currency)}`},""),z=(ie=f==null?void 0:f[F])==null?void 0:ie.amounts.reduce((K,ce)=>K+ce,0);switch(R){case Zr.COMPLETED:return{type:Fe.HIGHLIGHT,label:t.get("refund.amountAlreadyRefunded",{values:{amount:P}})};case Zr.IN_PROGRESS:return z===o?{type:Fe.HIGHLIGHT,label:t.get("refund.theRefundIsBeingProcessed")}:{type:Fe.HIGHLIGHT,label:t.get("refund.amountInProgress",{values:{amount:P}})};case Zr.FAILED:return z===o?{type:Fe.WARNING,label:t.get("refund.fullAmountFailed")}:{type:Fe.WARNING,label:t.get("refund.amountFailed",{values:{amount:P}})};default:return}}))??[]},[c,o,t,m,f,_]),g=A(()=>{if(c>0){const S=t.amount(c,h);switch(r){case We.FULL_AMOUNT:return{type:Fe.HIGHLIGHT,description:t.get("refund.onlyRefundable",{values:{amount:S}})};case We.PARTIAL_AMOUNT:return{type:Fe.HIGHLIGHT,description:t.get("refund.maximumRefundable",{values:{amount:S}})};default:return null}}return null},[t,c,h,r]),E=A(()=>{switch(r){case We.NON_REFUNDABLE:if(c===0&&m>0&&_&&m===o)return cr.FULL}switch(r){case We.PARTIAL_AMOUNT:case We.PARTIAL_LINE_ITEMS:if(c>0&&y&&m>0&&!Z(o)&&m<o)return cr.PARTIAL}return cr.INDETERMINATE},[c,m,r,o,y,_]);return{refundableAmount:c,refundable:i,refundableAmountLabel:g,refundAvailable:l,refundAuthorization:u,refundCurrency:h,refundDisabled:d,refundedAmount:m,refundedState:E,refundStatuses:T,refundLocked:s,refundMode:r}},pt="adyen-pe-popover",pd="adyen-pe-tooltip",gp=`${pt}-container`,dl=`${pt}__header`,Tp=`${pt}__header-title`,_i=`${pt}__content`,_d=`${pd}__content`,Ap=`${pt}__footer`;function Ep({image:e=!0,onClick:t}){const{i18n:n}=U();return a(V,{children:a(he,{className:e?"adyen-pe-popover-dismiss-button--on-image":"",iconButton:!0,variant:se.TERTIARY,onClick:t,"aria-label":n.get("closeIconLabel"),children:a("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",children:[a("title",{children:"dismiss"}),a("path",{fill:"#00112C",fillRule:"evenodd",d:"M11.4697 12.5303C11.7626 12.8232 12.2374 12.8232 12.5303 12.5303C12.8232 12.2374 12.8232 11.7626 12.5303 11.4697L9.06066 8L12.5303 4.53033C12.8232 4.23744 12.8232 3.76256 12.5303 3.46967C12.2374 3.17678 11.7626 3.17678 11.4697 3.46967L8 6.93934L4.53033 3.46967C4.23744 3.17678 3.76256 3.17678 3.46967 3.46967C3.17678 3.76256 3.17678 4.23744 3.46967 4.53033L6.93934 8L3.46967 11.4697C3.17678 11.7626 3.17678 12.2374 3.46967 12.5303C3.76256 12.8232 4.23744 12.8232 4.53033 12.5303L8 9.06066L11.4697 12.5303Z",clipRule:"evenodd"})]})})})}const Np=Ie(Ep);function Sp({title:e,isImageTitle:t=!1}){return a(k,{strongest:!t,variant:t?I.SUBTITLE:I.BODY,children:e})}const Cp=Ie(Sp);var Ke=(e=>(e.TOOLTIP="tooltip",e.POPOVER="popover",e))(Ke||{}),ge=(e=>(e.TOP="top",e.TOP_LEFT="top-left",e.RIGHT="right",e.BOTTOM="bottom",e.BOTTOM_LEFT="bottom-left",e.LEFT="left",e))(ge||{}),us=(e=>(e.MEDIUM="medium",e.WIDE="wide",e))(us||{}),q=(e=>(e.ARROW_DOWN="ArrowDown",e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_UP="ArrowUp",e.BACKSPACE="Backspace",e.END="End",e.ENTER="Enter",e.ESCAPE="Escape",e.HOME="Home",e.PAGE_DOWN="PageDown",e.PAGE_UP="PageUp",e.SPACE="Space",e.TAB="Tab",e))(q||{}),ee=(e=>(e.BALANCE_ACCOUNT="balanceAccount",e.CATEGORIES="categories",e.CURRENCIES="currencies",e.CREATED_SINCE="createdSince",e.CREATED_UNTIL="createdUntil",e.STATUSES="statuses",e.MIN_AMOUNT="minAmount",e.MAX_AMOUNT="maxAmount",e))(ee||{});const Xr=(()=>{let e=[];const t=o=>{const c=o.reduce((u,l)=>{const h=l instanceof Node?e.findIndex(d=>{const f=d.element.getAttribute("id"),m=l&&(l!=null&&l.getAttribute)?l==null?void 0:l.getAttribute("id"):null;return f===m}):-1;return u===-1&&h!==-1?h:u},-1);c===-1?s(0):c+1<=e.length-1&&s(c+1)},n=o=>{const c=e.findIndex(u=>u.element.getAttribute("id")===o.getAttribute("id"));c>=0&&e.splice(c,1)},r=(o,c)=>{e.findIndex(l=>l.element.getAttribute("id")===o.getAttribute("id"))>=0||e.push({element:o,callback:c})},s=o=>{var u,l;const c=e.length;for(let h=o;h<c;h++)(l=(u=e==null?void 0:e[h])==null?void 0:u.callback)==null||l.call(u);e.splice(o)};return{add:r,remove:n,closeAll:()=>{e.forEach(o=>{var c;return(c=o==null?void 0:o.callback)==null?void 0:c.call(o)}),e=[]},closePopoversOutsideOfClick:t}})(),ds=Symbol("_ref");class yd extends Error{}class Rp extends yd{}class vp extends yd{}function Pa(e){if(!Q(e))throw new vp}const Op=e=>{try{if(Q(e)&&xt(e,"current")&&xt(e,ds)&&!Gn(e,e[ds])){const t=e.actions.get($),n=e.actions.size;return Z(t)&&Number.isInteger(n)&&n>=0}}catch{}return!1},hs=e=>Op(e)?hs(e[ds]):e;function bp(e){return!!e.current}const Ip=(()=>{const e=(r,s)=>{const i=r.get(s);if(!i)throw new Rp;return i},t=(r,s,i)=>{let o,c;const u=hs(s);try{o=e(r,u)}catch{Pa(i)}if(o)[,c]=o;else{const l=Q(u),h=l?m=>{u(f=m)}:m=>{u&&(u.current=m,f=u.current)},d=m=>{if(c.size===0)return;const y=f;if(h(m),!Gn(f,y))for(const[_]of c)_(f,y)};let f=l?null:u.current;r.set(u,o=[d,c=new Map]),Object.defineProperties(d,{[ds]:{value:u},actions:{value:J({get:{value:c.get.bind(c)},size:{get:()=>c.size}})},current:{get:()=>f,set:l?void 0:d}})}return i&&c.set(i,1+(c.get(i)||0)),o[0]},n=(r,s,i)=>{const o=hs(s),[,c]=e(r,o),u=c.get(i)||0;u===1?c.delete(i):u>1&&c.set(i,u-1),c.size===0&&o&&r.delete(o)};return()=>{const r=new WeakMap;return J({bind:H(t.bind(void 0,r)),unbind:H(n.bind(void 0,r))})}})(),Dp=Ip(),kp=e=>{Pa(e);const t=new WeakMap([[e,1]]),n=s=>{if(Gn(r,s))return;const i=r;e(r=s,i)};let r=null;return Object.defineProperties(n,{[ds]:{value:n},actions:{value:J({get:{value:t.get.bind(t)},size:{value:1}})},current:{get:()=>r,set:n}})},Lp=(e=Dp)=>{let t,n=null,r,s=!1;const i=l=>{t=void 0,n=null,r=l,s=!1},o=()=>{s||(c(),s=!0)},c=()=>{try{if(!n)return;e.unbind(n,r)}catch{}};return J({action:{get:()=>r},reflex:{get:()=>t},release:{value:o},update:{value:(l,h)=>{Pa(l),s&&i(l);const d=Ne(h)?null:h;if(r===l&&n===d){if(t)return}else if(n){if(Gn(hs(n),hs(d))){t=e.bind(n,l),c(),r=l;return}c()}r=l,t=(n=d)?e.bind(n,r):kp(r)}}})},sn=(e,t)=>{const n=Y(Lp());return go(()=>n.current.release,[]),A(()=>(n.current.update(e,t),n.current.reflex),[e,t])},rr=Symbol("__control.Elem.");var gd=(e=>(e.POPOVER="POPOVER",e.DEFAULT="DEFAULT",e))(gd||{});const hl=e=>{e.stopImmediatePropagation()},Ma=(e,t,n,r)=>{const s=Y(null),i=C(c=>{const u=c.composedPath();if(s&&s.current)if(r==="POPOVER")Xr.closePopoversOutsideOfClick(u);else{let l=0,h=!1,d=u[l];for(;d instanceof Element&&!(h||(h=d==null?void 0:d.isSameNode(s.current)));)d=u[++l]??d.parentElement,(d==null?void 0:d[rr])instanceof Element&&(d=d[rr],u.length=0);t&&!h&&t(!0)}},[s,t,r]),o=Y(i);return G(()=>()=>{s.current&&Xr.remove(s.current),document.removeEventListener("click",o.current,!0)},[]),G(()=>(document.removeEventListener("click",o.current,!0),o.current=i,document.addEventListener("click",o.current,!0),r==="POPOVER"&&s.current instanceof Element&&Xr.add(s.current,t),()=>{s.current&&Xr.remove(s.current),document.removeEventListener("click",o.current,!0)}),[i,t,r]),G(()=>{n?document.removeEventListener("click",o.current,!0):document.addEventListener("click",o.current,!0)},[n]),sn(C((c,u)=>{u instanceof Element&&u.removeEventListener("focusout",hl,!0),c instanceof Element&&(n||(c.addEventListener("focusout",hl,!0),s.current=c))},[n,r]),e)},Fa=`
|
|
2
|
+
a[href],
|
|
3
|
+
audio[controls],
|
|
4
|
+
video[controls],
|
|
5
|
+
button,
|
|
6
|
+
input,
|
|
7
|
+
select,
|
|
8
|
+
textarea,
|
|
9
|
+
[contenteditable],
|
|
10
|
+
[tabindex]
|
|
11
|
+
`.replace(/\s+/,""),wp=["contenteditable","controls","disabled","hidden","href","inert","tabindex"],fl=new Map,Td=e=>e.tagName==="INPUT",Pp=e=>Td(e)&&e.type==="radio",Mp=e=>{const t=e.name,n=e.form,r=fl.get(n);let s=r==null?void 0:r.get(t);return Z(s)&&n&&(s=n.querySelector(`input[type=radio][name='${t}']:checked`)||null,fl.set(n,(r||new Map).set(t,s))),s===e},Fp=(e,t)=>{for(const n of t)if(n.type!=="attributes"){if(bc(n.addedNodes,r=>r instanceof Element&&Hi(r))||bc(n.removedNodes,r=>e.includes(r)))return!0}else{if(Hi(n.target))return!0;if(e.includes(n.target))return!0}return!1},xa=(e=document.body,t)=>{if(Z(e))return!1;if(Ne(t))return!!document.activeElement&&xa(e,document.activeElement);let n=t==null?void 0:t.parentNode;for(;n;){if(n===e)return!0;n=n==null?void 0:n.parentNode}return!1},Ba=e=>!(!e.matches(Fa)||e!=null&&e.disabled||/^(true)?$/.test(e.getAttribute("inert"))||Td(e)&&e.hidden),Hi=e=>!(Pp(e)&&!Mp(e)||(e==null?void 0:e.tabIndex)<0||!Ba(e)),xp=()=>{const e=new MutationObserver(c=>Fp(t,c)&&i()),t=[];let n=-1,r=null;const s=c=>{var l;if(c<0)return;const u=Math.min(c,t.length-1);n!==u&&(n=u),(l=t[n])==null||l.focus()},i=()=>{t.length=0,r instanceof Element&&(r.querySelectorAll(Fa).forEach(c=>Hi(c)&&t.push(c)),xa(r)&&(o.current=document.activeElement))},o=Object.create(null,{current:{get:()=>t[n]??null,set:c=>{if(c){if(!$r(c))return s(t.indexOf(c));if(c===~~c)return s(Ms(n+c,t.length))}}},root:{get:()=>r,set:c=>{c!==r&&(r&&e.disconnect(),r=c instanceof Element?c:null,t.length=0,r&&(e.observe(r,{attributeFilter:wp,attributes:!0,childList:!0,subtree:!0}),i()))}},tabbables:{value:t}});return o},Bp=(e,t)=>{const n=Y(!1),r=Y(null),s=Y(!1),i=A(xp,[]),o=A(()=>{let h=null,d;return f=>{Z(d)||cancelAnimationFrame(d);let m=f.target;for(;m&&m!==f.currentTarget;){if(Ba(m)){h=m,d=requestAnimationFrame(()=>{d=requestAnimationFrame(()=>{var y;r.current!==h&&h instanceof HTMLElement&&((y=r.current=h)==null||y.focus()),h=null,d=void 0})});return}m=m.parentNode}}},[]),c=C(h=>{i.current=r.current=h.target},[]),u=C(h=>{i.tabbables.includes(h.relatedTarget)||xa(h.currentTarget,h.relatedTarget)||s.current||(n.current=!0,requestAnimationFrame(()=>{n.current&&t(n.current=!1)}))},[]),l=A(()=>{let h;return d=>{switch(d.code){case q.ARROW_DOWN:case q.ARROW_LEFT:case q.ARROW_RIGHT:case q.ARROW_UP:case q.END:case q.ESCAPE:case q.HOME:case q.PAGE_DOWN:case q.PAGE_UP:case q.TAB:cancelAnimationFrame(h),h=requestAnimationFrame(()=>{h=requestAnimationFrame(()=>{s.current=!1,h=void 0})}),s.current=!0;break}d.code===q.TAB?(d.preventDefault(),i.current=d.shiftKey?-1:1):d.code===q.ESCAPE&&t(!0)}},[]);return sn(C((h,d)=>{d instanceof Element&&(d.removeEventListener("keydown",l,!0),d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0),h.removeEventListener("click",o,!0)),h instanceof Element?(h.addEventListener("keydown",l,!0),h.addEventListener("focusin",c,!0),h.addEventListener("focusout",u,!0),h.addEventListener("click",o,!0),n.current=!1,i.root=h):i.root=null},[]),e)},yi=(()=>{const e=new WeakMap,t=J({remove:H(function(){r(this.observerCallback)})}),n=s=>{let i=e.get(s);if(Z(i)){const o=new IntersectionObserver(c=>{c.forEach(u=>{s&&s(u)})},{root:null,rootMargin:"",threshold:[1]});i=Ur(t,{observerCallback:H(s),observer:H(o)}),e.set(s,i)}return i},r=s=>{const i=e.get(s);i==null||i.observer.disconnect(),e.delete(s)};return n})(),$p=({popover:e,offset:t,targetElement:n,position:r,variant:s,fullWidth:i})=>{const o=n==null?void 0:n.current;let c=0,u=0;const l=o.getBoundingClientRect(),h=document.body.getBoundingClientRect(),d=e==null?void 0:e.firstChild,f=h.left+h.width/2-d.offsetWidth/2,m=l.left+l.width/2-d.offsetWidth/2,y=l.top+l.height/2-d.offsetHeight/2;switch(r){case ge.BOTTOM:c=i?f:s===Ke.TOOLTIP?m+window.scrollX:(l==null?void 0:l.left)+window.scrollX,u=(l==null?void 0:l.top)+(l==null?void 0:l.height)+window.scrollY+t[1];break;case ge.BOTTOM_LEFT:c=(l==null?void 0:l.right)+window.scrollX-e.clientWidth,u=(l==null?void 0:l.top)+(l==null?void 0:l.height)+window.scrollY+t[1];break;case ge.TOP:c=s===Ke.TOOLTIP?m+window.scrollX:l.left+window.scrollX,u=(l==null?void 0:l.top)-(d==null?void 0:d.clientHeight)+window.scrollY-t[0];break;case ge.RIGHT:c=l.left+l.width+window.scrollX+t[2],u=s===Ke.TOOLTIP?y+window.scrollY:(l==null?void 0:l.top)-(l==null?void 0:l.height)/2+window.scrollY;break;case ge.LEFT:c=(l==null?void 0:l.left)-(e==null?void 0:e.clientWidth)+window.scrollX-t[3],u=s===Ke.TOOLTIP?y+window.scrollY:(l==null?void 0:l.top)+window.scrollY-(l==null?void 0:l.height)/2;break}const _=[c,u,0];return`position:absolute;inset:0 auto auto 0;margin: 0;transform: ${_.reduce((g,E,b)=>b===0?g+`${E}px,`:b===_.length-1?g+` ${E}px)`:g+` ${E}px,`,"translate3d(")};visibility:hidden`},Up=(e,t,n,r,s,i,o,c,u)=>{const[l,h]=x(!0),[d,f]=x(c?!c:!!r),[m,y]=x(r||ge.TOP),[_,T]=x([]),g=C(b=>{if(b.intersectionRatio===1)return f(!0);if(!l&&b.intersectionRatio!==1){if(_&&_.length===(c?5:4)){const N=_.reduce((D,S)=>S[1]>D[1]?S:D,_[0]);y(N[0]),f(!0);return}switch(f(!1),m){case ge.TOP:T(N=>[...N,[ge.TOP,b.intersectionRatio]]),y(ge.BOTTOM);break;case ge.BOTTOM:T(N=>[...N,[ge.BOTTOM,b.intersectionRatio]]),y(c?ge.BOTTOM_LEFT:ge.RIGHT);break;case ge.BOTTOM_LEFT:T(N=>[...N,[ge.BOTTOM,b.intersectionRatio]]),y(ge.RIGHT);break;case ge.RIGHT:T(N=>[...N,[ge.RIGHT,b.intersectionRatio]]),y(ge.LEFT);break;case ge.LEFT:T(N=>[...N,[ge.LEFT,b.intersectionRatio]]),y(ge.TOP);break}}},[l,_,m,c]),E=Y(g);return G(()=>{yi(E.current).remove(),E.current=g},[g]),sn(C((b,N)=>{var D,S;if(N&&(!r||c)&&yi(g).observer.unobserve(N),b&&t.current){if((!r||c)&&yi(g).observer.observe(b),!(b instanceof Element))return;const v=$p({popover:b,offset:e,targetElement:t,position:m,variant:n,fullWidth:o??!1}),R=d?v+";visibility:visible":v,F=i?R+";min-width:fit-content;width:"+((D=t.current)==null?void 0:D.clientWidth)+"px":R;b.setAttribute("style",`${F}`),l&&h(!1),n&&n===Ke.TOOLTIP&&s&&bp(s)&&((S=s.current)==null||S.setAttribute("data-popover-placement",m))}},[e,t,m,r,n,g,d,l,i,s,o,c]),u)},No=e=>{const t=Y();return sn(C((n,r)=>{r instanceof Element&&r.id===t.current&&(r.id=""),n instanceof Element&&(n.id=t.current||(t.current=as()))},[e]),e)},Wp=e=>{var r;let t;const n=(r=e.querySelector(`.${_d}`))==null?void 0:r.querySelectorAll(Fa);return n?(Array.prototype.some.call(n,s=>{if(Ba(s))return t=s}),t):null},Hp=e=>e===Ke.TOOLTIP?[10,3,5,5]:[15,15,15,15];function $a({actions:e,disableFocusTrap:t=!1,actionsLayout:n=Hs.SPACE_BETWEEN,variant:r=Ke.TOOLTIP,title:s,open:i,dismissible:o,modifiers:c,divider:u,fitContent:l,withoutSpace:h,containerSize:d,position:f,targetElement:m,setToTargetWidth:y,dismiss:_,children:T,withContentPadding:g,classNameModifiers:E,showOverlay:b=!1,fitPosition:N,...D}){const S=A(()=>Q(_)&&Bt(o),[_,o]),v=No(),R=Y(),F=C(pe=>{var ke;_&&_(),pe&&((ke=m==null?void 0:m.current)==null||ke.focus())},[_,m]),P=C(pe=>{pe.code===q.ESCAPE&&(_&&_(),(m==null?void 0:m.current).focus())},[_,m]),z=Y(P),j=Y(),ie=Ma(Up(Hp(r),m,r,f,v,y,b,N),_,r===Ke.TOOLTIP&&!i,gd.POPOVER),K=Bp(t?null:ie,F),ce=sn(C((pe,ke)=>{ke instanceof Element&&(ke[rr]=void 0,delete ke[rr]),pe instanceof Element&&(pe[rr]=m.current,cancelAnimationFrame(j.current),j.current=requestAnimationFrame(()=>{if(R.current===i||!(R.current=i))return;const fe=Wp(pe);fe==null||fe.focus()}))},[i,m]),t?ie:K),Te=No(ce),me=A(()=>({[`${pt}--medium`]:d===us.MEDIUM,[`${pt}--with-divider`]:!!u,[`${pt}--wide`]:d===us.WIDE,[`${pt}--fit-content`]:l,[`${pt}--without-space`]:h,[`${pt}--auto-width`]:b}),[d,u,h,l,b]);G(()=>{ce.current&&(ce.current[rr]=m.current)},[m]),G(()=>(document.removeEventListener("keydown",z.current),document.addEventListener("keydown",z.current=P),()=>document.removeEventListener("keydown",z.current)),[P]);const _e=r===Ke.TOOLTIP?pd:`${pt} ${gp}`,De=r===Ke.TOOLTIP?_d:`${_i}`;return Zu(a(V,{children:i?a(V,{children:[b&&a("div",{className:"adyen-pe-popover__overlay"}),a("div",{id:"popover",ref:Te,...D,className:M(_e,me,E),style:{visibility:"hidden"},role:D.role??(r===Ke.POPOVER?"dialog":"tooltip"),children:[(s||S)&&a("div",{className:Aa(dl,c,[dl]),children:[s&&a("div",{className:Tp,children:a(Cp,{title:s})}),S&&a(Np,{onClick:_})]}),T&&a(V,{children:[a("div",{className:M(De,{[`${_i}--with-padding`]:g,[`${_i}--overlay`]:b}),children:T}),r===Ke.TOOLTIP&&a("span",{"data-popover-placement":"hidden",ref:v,className:"adyen-pe-tooltip__arrow"})]}),e&&a("div",{className:Ap,children:a(ka,{actions:e,layout:n})})]})]}):null}),document.getElementsByTagName("body")[0])}const Gp=()=>{const[e,t]=wt(),n=C(()=>t(!0),[t]),r=C(()=>t(!1),[t]),s=C(i=>{switch(i.code){case q.ESCAPE:r();break}},[r]);return{listeners:{onfocusoutCapture:r,onMouseLeave:r,onKeyDown:s,onFocus:n,onMouseEnter:n},isVisible:e}},Yp=e=>typeof e=="string";function jp(){const e="ontouchstart"in window,t=navigator.maxTouchPoints&&navigator.maxTouchPoints>0||navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>0,n=window.matchMedia&&window.matchMedia("(pointer: coarse)").matches;return e||t||n}const gn=({content:e,children:t,triggerRef:n,showTooltip:r,position:s,isContainerHovered:i=!1})=>{var l,h,d;const o=No(),{isVisible:c,listeners:u}=Gp();return jp()?a(V,{children:t}):a(V,{children:[t?Gu(t,{...t==null?void 0:t.props,role:"button",tabIndex:-1,ref:o,className:(l=t==null?void 0:t.props)!=null&&l.className?M(`${(h=t==null?void 0:t.props)==null?void 0:h.className} adyen-pe__tooltip-target`,{" adyen-pe__tooltip-target--hovered":i}):M("adyen-pe__tooltip-target",{"adyen-pe__tooltip-target--hovered":i}),...u,"aria-describedby":`tooltip-${(d=o.current)==null?void 0:d.id}`}):null,(c||r)&&a($a,{variant:Ke.TOOLTIP,targetElement:n??o,position:s,open:c||r,children:a(V,{children:e&&Yp(e)?a(k,{variant:I.CAPTION,children:e}):{content:e}})})]})};function zp({value:e,isContainerHovered:t}){const{i18n:n}=U(),r=`tooltip.${e}`;return a(V,{children:n.has(r)&&a(gn,{content:n.get(r),isContainerHovered:t,children:a("span",{children:a(k,{variant:I.BODY,children:n.has(`txType.${e}`)?n.get(`txType.${e}`):`${e}`})})})})}const Gi={title:"thereWasAnUnexpectedError",message:["contactSupportForHelp"]},Ad=(e,t)=>{if(!e)return null;switch(e.errorCode){case"29_001":return{title:"theRequestIsMissingRequiredFieldsOrContainsInvalidData",message:["contactSupportForHelp"],onContactSupport:t};case"30_112":return{title:"entityWasNotFound",message:["entityWasNotFoundDetail"],onContactSupport:t};case"00_403":return Gi;default:return null}},Bn=({textToCopy:e,isHovered:t,buttonLabel:n,showCopyTextTooltip:r=!0,type:s="Link",...i})=>{const{i18n:o}=U(),[c,u]=x(o.get("copy")),l=C(async()=>{if(e)try{await navigator.clipboard.writeText(e),u(o.get("copied"))}catch(d){console.log(d)}},[o,e]),h=C(()=>{u(o.get("copy"))},[o]);return a("span",{className:M("adyen-pe-copy-text__container",{"adyen-pe-copy-text__container--information":s==="Link"}),...i,children:[r?a(gn,{content:e,isContainerHovered:t,children:a("span",{className:M({"adyen-pe-copy-text__label":s!=="Default","adyen-pe-copy-text__information":s==="Link","adyen-pe-copy-text__text":s==="Text"}),children:n||e})}):a("span",{className:M({"adyen-pe-copy-text__label":s!=="Default","adyen-pe-copy-text__information":s==="Link","adyen-pe-copy-text__text":s==="Text"}),children:n||e}),a(gn,{content:c,children:a(he,{variant:se.TERTIARY,className:"adyen-pe-copy-text",onClick:l,onBlur:h,onMouseLeaveCapture:h,"data-testid":"copyText",children:a("div",{className:M("adyen-pe-copy-text__icon",{"adyen-pe-copy-text__icon--information":s==="Link"}),children:a(Ze,{name:"copy","data-testid":"copy-icon"})})})})]})},Ua=(e,t,n)=>{if(!e)return Gi;const r=Ad(e,n);if(r)return r;switch(e.errorCode){case void 0:return{title:"somethingWentWrong",message:[t,"tryRefreshingThePageOrComeBackLater"],refreshComponent:!0};case"00_500":{const s=n?"theErrorCodeIs":"contactSupportForHelpAndShareErrorCode";return{title:"somethingWentWrong",message:[t,s],translationValues:{[s]:e.requestId?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:n}}default:return Gi}},Wa=({error:e,errorMessage:t,onContactSupport:n})=>{const{title:r,message:s,refreshComponent:i,translationValues:o,onContactSupport:c}=Ua(e,t,n);return a(en,{title:r,message:s,translationValues:o,withImage:!0,centered:!0,refreshComponent:i,onContactSupport:c})},Kp=({data:e,columns:t,customCells:n,onRowHover:r})=>{const{i18n:s}=U();return a(V,{children:e==null?void 0:e.map((i,o)=>a("div",{role:"row",tabIndex:0,className:"adyen-pe-data-grid__row",onMouseEnter:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r(o):te,onFocus:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r(o):te,onMouseLeave:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r():te,onBlur:s.has(`tooltip.${i==null?void 0:i.category}`)&&r?()=>r():te,children:a(dd,{columns:t,customCells:n,item:i,rowIndex:o})},i))})},Vp=({totalRows:e})=>{const[t,n]=Vo((o,c)=>{const u=e;if(u>1){const l=c.index;if(l<u&&l>=0)return c.type==="ACTIVE"?Object.freeze({...o,index:c.index??0,activeIndex:c.index}):Object.freeze({...o,index:c.index??0,activeIndex:-1})}return o},e_),r=sn(C(o=>{var u;if(!(o instanceof Element))return;const c=Number((u=o.dataset)==null?void 0:u.index);t.activeIndex===-1&&c===0||c===t.index?o.setAttribute("tabindex","0"):o.setAttribute("tabindex","-1"),c===t.activeIndex&&(o==null||o.focus())},[t.activeIndex,t.index])),s=C(o=>{var u,l;if(!(((u=o.target)==null?void 0:u.getAttribute("role"))==="row")){o.code===q.ARROW_LEFT&&n({type:"ACTIVE",index:t.index});return}switch(o.code){case q.ARROW_DOWN:case q.ARROW_UP:n({type:"ACTIVE",index:o.code===q.ARROW_DOWN?t.index+1:t.index-1});break;case q.HOME:n({type:"ACTIVE",index:0});break;case q.END:n({type:"ACTIVE",index:e-1});break;case q.ENTER:(l=o.currentTarget)==null||l.click();break;default:return}o.stopPropagation()},[e,t.index]),i=C(o=>c=>{var l;(!(((l=c.target)==null?void 0:l.localName)==="tr")||t.index===-1)&&n({type:"CURRENT",index:o})},[t.index]);return{listeners:{onKeyDownCapture:s,onFocusCapture:i},ref:r,activeIndex:t.activeIndex,currentIndex:t.index}},qp=({data:e,columns:t,onRowClick:n,customCells:r,onRowHover:s})=>{const i=C(h=>()=>n==null?void 0:n.callback(n!=null&&n.retrievedField?h[n.retrievedField]:h),[n]),{i18n:o}=U(),{currentIndex:c,listeners:u,ref:l}=Vp({totalRows:(e==null?void 0:e.length)??0});return a(V,{children:e==null?void 0:e.map((h,d)=>a("div",{role:"row",tabIndex:0,onMouseEnter:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s(d):te,onFocus:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s(d):te,onMouseLeave:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s():te,onBlur:o.has(`tooltip.${h==null?void 0:h.category}`)&&s?()=>s():te,ref:l,"aria-selected":d===c,"data-index":d,className:"adyen-pe-data-grid__row adyen-pe-data-grid__row--clickable",onClick:i(h),onFocusCapture:u.onFocusCapture(d),onKeyDownCapture:u.onKeyDownCapture,children:a(dd,{columns:t,customCells:r,item:h,rowIndex:d})},h))})},Zp=({columnsNumber:e,loading:t,emptyMessageDisplay:n})=>{const r=Array.from({length:10},(i,o)=>o),s=Array.from({length:e},(i,o)=>o);return a(V,{children:[r.map((i,o)=>a("div",{className:"adyen-pe-data-grid__row",children:s.map((c,u)=>a("div",{className:"adyen-pe-data-grid__cell adyen-pe-data-grid__skeleton-cell",children:a("span",{className:M({"adyen-pe-data-grid__skeleton-cell-content adyen-pe-data-grid__skeleton-cell-content--loading":t,"adyen-pe-data-grid__empty-cell":!t})})},`adyen-pe-data-grid-skeleton-cell-${u}`))},`adyen-pe-data-grid-skeleton-row-${o}`)),!t&&n&&n]})},Xp="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='300'%20height='200'%20viewBox='0%200%20300%20200'%20fill='none'%3e%3cg%20clip-path='url(%23a)'%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M189.3%20113.7c-1-.3%2036.3%2028.6%2047.7%2026.4%209.3-1.8%2014.3-59%2014.3-59h-9.9l-10.8%2036.3s-30.4-22.3-31.8-22.3c-1.4%200-8%2019.1-9.5%2018.6Z'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m230.1%20116.7%202%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='m259.8%2074.6%2010-3.6.7-8.1c.1-.9-.6-1.6-1.4-1.7-.8-.1-1.5.5-1.7%201.3l-1.3%206.6-12.6%204.8'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m259.8%2074.6%2010-3.6.7-8.1c.1-.9-.6-1.6-1.4-1.7-.8-.1-1.5.5-1.7%201.3l-1.3%206.6-12.6%204.8'/%3e%3cpath%20fill='%23BF7C6A'%20d='m260.5%2075.5%2011.1-3.5%202.9-7.1c.3-.8-.1-1.7-.9-2.1-.8-.3-1.6%200-2%20.7l-3.2%205.9-10.2%203.2'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m260.5%2075.5%2011.1-3.5%202.9-7.1c.3-.8-.1-1.7-.9-2.1-.8-.3-1.6%200-2%20.7l-3.2%205.9-10.2%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='m254%2076.5%207.4-7.8c.7-.6.8-1.5.2-2.2-.5-.7-1.5-.8-2.2-.4-2%201.3-6.2%205-10.7%207.1-3.1%201.4-5.2%205.8-5.8%207.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m254%2076.5%207.4-7.8c.7-.6.8-1.5.2-2.2-.5-.7-1.5-.8-2.2-.4-2%201.3-6.2%205-10.7%207.1-3.1%201.4-5.2%205.8-5.8%207.3'/%3e%3cpath%20fill='%23BF7C6A'%20d='M250.3%2082.2c1.2-.3%2021.6-8.6%2026.7-10.3.9-.3%201.4-1.2%201.1-2.1-.2-.9-1-1.1-1.9-1-4.4.8-17.9%203.9-19.5%204.2-1.5.2-5.3.6-10.9%203.1a9%209%200%200%200-5.2%208'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M250.3%2082.2c1.2-.3%2021.6-8.6%2026.7-10.3.9-.3%201.4-1.2%201.1-2.1-.2-.9-1-1.1-1.9-1-4.4.8-17.9%203.9-19.5%204.2-1.5.2-5.3.6-10.9%203.1a9%209%200%200%200-5.2%208'/%3e%3cpath%20fill='%2300112C'%20d='M130.9%2063.1c.8%207.3%204.7%2014.1%2010.3%2018l-3.1-6.4c-.5-1-.9-2-1-3.1l-.1-.3c-.1-.1-.1.2%200%20.1'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M130.9%2063.1c.8%207.3%204.7%2014.1%2010.3%2018l-3.1-6.4c-.5-1-.9-2-1-3.1l-.1-.3c-.1-.1-.1.2%200%20.1'/%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m158.9%2074.8-13.2.2-1.5%2018%208.4%203.6%207.9-3.8-1.6-18Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M151.9%2083.9c-4.7%200-6.4-2.7-6.4-2.7v-4.6h13.4l.3%206c-.1.1-2.5%201.3-7.3%201.3Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M134.5%2070.7c2.4%203%206.3%205.7%209.8%207.3%203.6%201.6%2015.3%201.7%2019.5-1.1%208.8-5.9%2010.5-20.3%208.2-30.6-.7-3.4-1.8-6.8-3.7-9.7a22%2022%200%200%200-19.8-9.3c-7.5.5-19.3%205.9-20.8%2014.2-1.7%209.6.8%2021.6%206.8%2029.2Z'/%3e%3cpath%20fill='%23BF7C6A'%20d='M133.2%2058.9s-5.1-7-7.8-1.6%204.8%2013.4%2010.8%2011.2'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M133.2%2058.9s-5.1-7-7.8-1.6%204.8%2013.4%2010.8%2011.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='M169.5%2052.4s2.3-8.3%206.7-4.2c4.4%204.1.2%2014.2-6.2%2014.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M169.5%2052.4s2.3-8.3%206.7-4.2c4.4%204.1.2%2014.2-6.2%2014.3'/%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M166.9%2041.2c-6.3-12-33.4-8.2-34.9%206.3A38.2%2038.2%200%200%200%20142%2077c5.7%205.2%2012%204.5%2014.1%204.1%202.1-.3%208.2-1.8%2011.7-8.8a37.2%2037.2%200%200%200-.9-31.1Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M134.1%2055c7.8-1.1%2015.5-2.6%2023.1-4.4l-.4-4.8c1%201.6%201.8%202.7%202.4%204.5%203-1.3%206.3-1.5%209.5-1.6%203.1-.1-4.2-14.3-6.1-15.6a16.2%2016.2%200%200%200-7.1-2.1c-5.7-.6-11.7-.4-16.7%202.3-4%202.2-7.3%206.4-7.6%2011%200%201.5.5%2011%202.9%2010.7Z'/%3e%3cpath%20fill='%23BF7C6A'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M114.5%20113.7c1-.3-36.3%2028.6-47.7%2026.4-9.3-1.8-14.3-59-14.3-59h9.9l10.8%2036.3s30.4-22.3%2031.8-22.3c1.5-.1%208.1%2019.1%209.5%2018.6Z'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m73.8%20116.7-2.1%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='M44%2074.6%2034%2071l-.7-8.1c-.1-.9.6-1.6%201.4-1.7.8-.1%201.5.5%201.7%201.3l1.3%206.6%2012.6%204.8'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M44%2074.6%2034%2071l-.7-8.1c-.1-.9.6-1.6%201.4-1.7.8-.1%201.5.5%201.7%201.3l1.3%206.6%2012.6%204.8'/%3e%3cpath%20fill='%23BF7C6A'%20d='M43.3%2075.5%2032.2%2072l-2.9-7c-.3-.8.1-1.7.9-2.1.8-.3%201.6%200%202%20.7l3.2%205.9%2010.2%203.2'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M43.3%2075.5%2032.2%2072l-2.9-7c-.3-.8.1-1.7.9-2.1.8-.3%201.6%200%202%20.7l3.2%205.9%2010.2%203.2'/%3e%3cpath%20fill='%23BF7C6A'%20d='m49.8%2076.5-7.4-7.8c-.7-.6-.8-1.5-.2-2.2.5-.7%201.5-.8%202.2-.4%202%201.3%206.2%205%2010.7%207.1%203.1%201.4%205.2%205.8%205.8%207.3'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m49.8%2076.5-7.4-7.8c-.7-.6-.8-1.5-.2-2.2.5-.7%201.5-.8%202.2-.4%202%201.3%206.2%205%2010.7%207.1%203.1%201.4%205.2%205.8%205.8%207.3'/%3e%3cpath%20fill='%23BF7C6A'%20d='M53.5%2082.2C52.4%2081.9%2032%2073.7%2026.8%2072a1.6%201.6%200%200%201-1.1-2.1c.2-.9%201-1.1%201.9-1%204.4.8%2017.9%203.9%2019.5%204.2%201.5.2%205.3.6%2010.9%203.1a9%209%200%200%201%205.2%208'/%3e%3cpath%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M53.5%2082.2C52.4%2081.9%2032%2073.7%2026.8%2072a1.6%201.6%200%200%201-1.1-2.1c.2-.9%201-1.1%201.9-1%204.4.8%2017.9%203.9%2019.5%204.2%201.5.2%205.3.6%2010.9%203.1a9%209%200%200%201%205.2%208'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='M139.9%2087.6c-1.4-3.4-6.3-12.5-9.8-11.7a90.7%2090.7%200%200%200-46.2%2029.7c-4.4%205.4-2%208.7-2%208.7l7.1%2018.8s3.6%202%2015.4%201.7c17.4-.5%2038.8-26.8%2039.5-30.6.4-2.6-1.7-10.8-4-16.6Z'/%3e%3cpath%20fill='%233300C2'%20d='m196.6%20232.8-18.7-58.1h-51l-20.2%2058.1'/%3e%3cpath%20stroke='%230C112C'%20stroke-miterlimit='10'%20d='m196.6%20232.8-18.7-58.1h-51l-20.2%2058.1'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m159.1%2091.8-16.8.1s-20.4%201-21.3%206.8c-1.6%2010.6%206.1%2052.6%205.9%2056.2l-4.8%2020.4.2.1c10.7%205%2022.7%207.2%2034.6%206.2l23.1-1.9-3.2-18.2c-.2-2.7%207.3-46%206.9-61.3-.1-7.1-24.6-8.4-24.6-8.4Z'/%3e%3cpath%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-miterlimit='10'%20d='m141.4%2092%201.6-5.6h18.7l1.1%204.9c-.1.1-8.9%2011-21.4.7Zm23.1-4.4c1.4-3.4%206.3-12.5%209.8-11.7a90.7%2090.7%200%200%201%2046.2%2029.7c4.4%205.4%202%208.7%202%208.7l-7.1%2018.8s-3.6%202-15.4%201.7c-17.4-.5-38.8-26.8-39.5-30.6a48.3%2048.3%200%200%201%204-16.6ZM119.9%2018c0-2.5%201.1-4.9%202.7-6.8%201.9-2.2%204.5-3.8%207.4-4.2%202.9-.4%205.9.6%207.9%202.7a4.8%204.8%200%200%200-3-4.1s5-.2%207.1.4a14.7%2014.7%200%200%201%2011%2017.8c-2.3%208.8-14.2%207-21%205.6-5.6-1.2-12-4.9-12.1-11.4Z'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='a'%3e%3cpath%20fill='%23fff'%20d='M0%200h300v200H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Qp=({children:e})=>{const t=A(()=>new Map,[]),n=C(({column:s,width:i})=>{if(t.has(s)){const o=t.get(s);i>o&&t.set(s,i)}else t.set(s,i)},[t]),r=C(s=>t.get(s),[t]);return a(ud.Provider,{value:{registerCells:n,getMinWidthByColumn:r},children:yn(e)})},Jp=({cellKey:e,position:t,label:n})=>{const{registerCells:r}=Da(),s=Y(null);return G(()=>{var i;s.current&&r({column:e,width:(i=s.current)==null?void 0:i.getBoundingClientRect().width})},[e,r]),a("div",{role:"columnheader",id:String(e),className:M("adyen-pe-data-grid__cell adyen-pe-data-grid__cell--heading",{"adyen-pe-data-grid__cell--right":t==="right","adyen-pe-data-grid__cell--center":t==="center"}),children:a("div",{ref:s,className:"adyen-pe-data-grid__cell--heading-content",children:n})})},e_=Object.freeze({activeIndex:-1,index:-1});function Tn({errorDisplay:e,...t}){return a("div",{style:{width:"100%"},children:a(Qp,{children:a(t_,{...t,errorDisplay:e})})})}function t_({errorDisplay:e,...t}){var l,h;const n=A(()=>yn(t.children),[t.children]),r=A(()=>n.find(d=>(d==null?void 0:d.type)===Ed),[n]),s=A(()=>{var d;return((d=t.data)==null?void 0:d.length)===0},[t.data]),i=A(()=>!t.loading&&(s||t.error),[s,t.error,t.loading]),{getMinWidthByColumn:o}=Da(),c=t.columns.filter(d=>d.visible!==!1).map(d=>({...d,minWidth:o(d.key)})),u=c.map(d=>`minmax(${(d.minWidth||100)+40}px, ${d.flex||1}fr)`).join(" ");return a("div",{className:M("adyen-pe-data-grid",{"adyen-pe-data-grid--condensed":t.condensed,"adyen-pe-data-grid--outline":t.outline,"adyen-pe-data-grid--scrollable":t.scrollable,"adyen-pe-data-grid--loading":t.loading,"adyen-pe-data-grid--empty":s||t.error}),style:`--adyen-pe-data-grid-cols: ${c.length}; --adyen-pe-data-grid-cells: ${u};`,children:a(V,{children:[a("div",{className:"adyen-pe-data-grid__table-wrapper",children:[a("div",{role:"table",className:"adyen-pe-data-grid__table",children:[a("div",{className:"adyen-pe-data-grid__head",role:"rowgroup",children:a("div",{role:"rowheader",className:"adyen-pe-data-grid__header",style:t.loading?{width:"100%"}:{},children:c.map(d=>a(Jp,{label:d.label,position:d.position,cellKey:d.key},d.key))})}),a(n_,{...t,columns:c,emptyBody:s})]}),i&&(s&&!t.error?a(en,{title:((l=t.emptyTableMessage)==null?void 0:l.title)??"thereAreNoResults",message:(h=t.emptyTableMessage)==null?void 0:h.message,imageDesktop:Xp,centered:!0}):t.error&&e?e():null)]}),r]})})}function n_(e){const t=A(()=>e.loading||e.emptyBody||e.error,[e.emptyBody,e.error,e.loading]);return a("div",{role:"rowgroup",className:M("adyen-pe-data-grid__body"),style:t&&{display:"grid",gridTemplateColumns:"1fr"},children:t?a(Zp,{columnsNumber:e.columns.length,loading:e.loading}):e.onRowClick?a(qp,{onRowHover:e.onRowHover,data:e.data,columns:e.columns,onRowClick:e.onRowClick,customCells:e.customCells}):a(Kp,{onRowHover:e.onRowHover,data:e.data,customCells:e.customCells,columns:e.columns})})}Tn.Footer=Ed;function Ed({children:e}){return a("div",{className:"adyen-pe-data-grid__footer",children:e})}Tn.defaultProps={condensed:!1,outline:!0,scrollable:!0};const So="-ariaError";var je=(e=>(e[e.NONE=0]="NONE",e[e.APPLY=1]="APPLY",e[e.CLEAR=2]="CLEAR",e))(je||{});const Nd=({applyDisabled:e,applyTitle:t,resetDisabled:n,resetTitle:r}=$)=>{const{i18n:s}=U(),[i,o]=x(je.NONE),[c,u]=x(i!==je.NONE),l=C(()=>o(je.APPLY),[o]),h=C(()=>o(je.CLEAR),[o]),d=C(()=>o(je.NONE),[o]),f=A(()=>({disabled:xe(e),event:l,title:(t==null?void 0:t.trim())||s.get("apply"),variant:se.PRIMARY}),[s,l,e,t]),m=A(()=>({disabled:xe(n),event:h,title:(r==null?void 0:r.trim())||s.get("reset"),variant:se.SECONDARY}),[s,h,n,r]),y=A(()=>[f,m],[f,m]);return G(()=>{switch(u(i!==je.NONE),i){case je.APPLY:case je.CLEAR:d();break}},[i,u,d]),{commitAction:i,commitActionButtons:y,committing:c,resetCommitAction:d}};function Sd(e){const{backgroundUrl:t="",className:n="",classNameModifiers:r=[],src:s="",alt:i="",showOnError:o=!1}=e,[c,u]=x(!1),l=Y(null),h=()=>{u(!0)},d=()=>{u(o)},f=M([n],"adyen-pe-image",{"adyen-pe-image--loaded":c},...r.map(m=>`adyen-pe-image--${m}`));return G(()=>{const m=t?new Image:l.current;m&&(m.src=t||s,m.onload=h),u(!!(m!=null&&m.complete))},[]),t?a("div",{style:{backgroundUrl:t},...e,className:f}):a("img",{...e,alt:i,ref:l,className:f,onError:d})}const Br="adyen-pe-dropdown",r_=Aa(ut,[se.SECONDARY],[ut]),Ut=`${Br}__button`,s_=`${Ut}--active`,o_=`${Ut}-collapse-indicator`,i_=`${Ut}--has-selection`,a_=`${Ut}-icon`,c_=`${Ut}-multiselect-counter`,l_=`${Ut}--readonly`,u_=`${Ut}-text`,d_=`${Ut}--valid`,h_=`${Ut}--invalid`,on=`${Br}__element`,f_=`${on}--active`,m_=`${on}-checkbox`,p_=`${on}-checkmark`,__=`${on}-content`,y_=`${on}--disabled`,g_=`${on}-icon`,T_=`${on}--no-option`,Cd=`${Br}__list`,A_=`${Cd}--active`,E_=`${Br}--multiselect`,N_=({active:e,disabled:t,className:n,filterable:r,toggleButtonRef:s,...i})=>{const o=A(()=>r?M(r_,n):n,[n,r]);return r?a("div",{...i,className:o,ref:s}):a(he,{...i,className:o,disabled:t,variant:se.SECONDARY,ref:s})},S_=e=>{var f,m;const{i18n:t}=U(),{active:n,filterable:r,multiSelect:s,placeholder:i,readonly:o,showList:c,withoutCollapseIndicator:u}=e,l=A(()=>(i==null?void 0:i.trim())||t.get("select.filter.placeholder"),[t,i]),h=A(()=>xe(s)?void 0:n[0],[n,s]),d=A(()=>{var y;return((y=h==null?void 0:h.name)==null?void 0:y.trim())||l},[h,l]);return a(N_,{active:n,disabled:o,"aria-disabled":o,"aria-expanded":c,"aria-haspopup":"listbox",className:M(Ut,{[s_]:c,[i_]:!!n.length,[l_]:o,[h_]:e.isInvalid,[d_]:e.isValid}),filterable:r,onClick:o?void 0:e.toggleList,onKeyDown:o?void 0:e.onButtonKeyDown,role:r?"button":void 0,tabIndex:0,title:d,toggleButtonRef:e.toggleButtonRef,type:r?void 0:"button","aria-describedby":e.ariaDescribedBy,id:e.id??"",children:[c&&r?a("input",{"aria-autocomplete":"list","aria-controls":e.selectListId,"aria-expanded":c,"aria-owns":e.selectListId,autoComplete:"off",className:"adyen-pe-filter-input",onInput:e.onInput,placeholder:l,ref:e.filterInputRef,role:"combobox",type:"text"}):a(V,{children:[(h==null?void 0:h.icon)&&a(Sd,{className:a_,src:h.icon,alt:((f=h==null?void 0:h.name)==null?void 0:f.trim())??""}),a("span",{className:u_,children:((m=h==null?void 0:h.selectedOptionName)==null?void 0:m.trim())||d}),s&&e.appliedFilterNumber>0&&a("div",{className:c_,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:e.appliedFilterNumber})})]}),!u&&a("span",{className:o_,children:a(Xo,{role:"presentation"})})]})},C_=e=>{var u;const{componentRef:t}=U(),[n,r]=x(((u=t.current)==null?void 0:u.offsetWidth)||0),[s,i,o]=e;let c=!1;switch(s){case"up":c=n>=i;break;case"down":c=n<=i;break;case"only":if(o){const{min:l,max:h}=o;c=h?n<=h:l?n>=l:!1}else c=n===i;break}return G(()=>{const l=t.current;if(!l)return;const h=new ResizeObserver(d=>{for(const f of d)f.target===l&&r(l.offsetWidth)});return h.observe(l),()=>{h.unobserve(l),h.disconnect()}},[t]),c},Oe={up:{sm:["up",tt.sm],md:["up",tt.md],lg:["up",tt.lg]},down:{xs:["down",tt.sm-1],sm:["down",tt.md-1],md:["down",tt.lg-1]},only:{xs:["only",tt.sm-1,{max:tt.sm-1}],sm:["only",tt.sm,{max:tt.md-1}],md:["only",tt.md,{max:tt.lg-1}],lg:["only",tt.lg,{min:tt.lg}]}},be=C_,R_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e&&a("title",{children:e}),a("path",{fill:"currentColor",d:"M1.25 3.5c0-1.24 1-2.25 2.25-2.25h9c1.24 0 2.25 1 2.25 2.25v9c0 1.24-1 2.25-2.25 2.25h-9c-1.24 0-2.25-1-2.25-2.25v-9ZM12.06 6 11 4.94l-4 4-2-2L3.94 8 7 11.06 12.06 6Z"})]})),v_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e&&a("title",{children:e}),a("path",{stroke:"currentColor",d:"M.5 4C.5 2 2.1.5 4 .5h8c2 0 3.5 1.6 3.5 3.5v8c0 2-1.6 3.5-3.5 3.5H4C2 15.5.5 13.9.5 12V4Z"})]})),O_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"16",viewBox:"0 0 16 16",height:"16",children:[e&&a("title",{children:e}),a("path",{fill:"currentColor","fill-rule":"evenodd",d:"M14.5 4.5a.7.7 0 0 0-1-1L6 10.9 2.5 7.5a.8.8 0 0 0-1 1l4 4a.8.8 0 0 0 1 0l8-8Z","clip-rule":"evenodd"})]})),b_=e=>e.multiSelect?a("span",{className:m_,children:e.selected?a(R_,{role:"presentation"}):a(v_,{role:"presentation"})}):null,Rd=e=>e.multiSelect?null:a("span",{className:p_,children:e.selected&&a(O_,{role:"presentation"})}),I_=e=>a(V,{children:[b_(e),a("div",{className:e.contentClassName,children:[e.item.icon&&a(Sd,{className:e.iconClassName,alt:e.item.name,src:e.item.icon}),a("span",{children:e.item.name})]}),Rd(e)]}),D_=({item:e,multiSelect:t,onKeyDown:n,onSelect:r,renderListItem:s,selected:i})=>{const o=!!e.disabled,c=xe(e.disabled)||null,u=M(on,{[f_]:i,[y_]:o});return a("li",{"aria-disabled":o,"aria-selected":i,className:u,"data-disabled":c,"data-value":e.id,onClick:r,onKeyDown:n,title:e.name,role:"option",tabIndex:-1,children:s({item:e,multiSelect:t,selected:i,contentClassName:__,iconClassName:g_})})},k_=Ie(D_),L_=Xe(({active:e,commitActions:t,items:n,multiSelect:r,onKeyDown:s,onSelect:i,renderListItem:o,selectListId:c,showList:u,textFilter:l,toggleButtonRef:h,dismissPopover:d,setToTargetWidth:f,popoverClassNameModifiers:m,showOverlay:y,fitPosition:_},T)=>{const{i18n:g}=U(),E=be(Oe.down.xs),b=n.filter(R=>!l||R.name.toLowerCase().includes(l)),N=M(Cd,{[A_]:u}),D=M(on,T_),S=A(()=>Q(o)?o:I_,[o]),v=A(()=>xe(r),[r]);return u?a($a,{classNameModifiers:m,actions:v?t:void 0,disableFocusTrap:!0,divider:!0,dismiss:d,dismissible:!1,open:u,setToTargetWidth:f,containerSize:us.MEDIUM,variant:Ke.POPOVER,targetElement:h,withContentPadding:!1,position:ge.BOTTOM,showOverlay:y&&E,fitPosition:_,children:a("ul",{className:N,id:c,ref:T,role:"listbox","aria-multiselectable":v,children:b.length?b.map(R=>a(k_,{item:R,multiSelect:v,onKeyDown:s,onSelect:i,renderListItem:S,selected:e.includes(R)},R.id)):a("div",{className:D,children:g.get("select.noOptionsFound")})})}):null}),w_=Ie(L_),P_=({items:e,multiSelect:t,selected:n})=>{const r=C((u=de)=>{const l=de.concat(u??de).filter(Boolean),h=e.filter(f=>l.includes(f.id)),d=t?h:h.slice(0,1);return d.length?Object.freeze(d):de},[e,t]),[s,i]=x(r(n)),o=C((u=de)=>{const l=u.filter(h=>e.includes(h));i(l.length?Object.freeze(l):de)},[e,i]),c=C(u=>{i(l=>{const h=l.indexOf(u);if(h<0)return Object.freeze((t?l:de).concat(u));if(!t)return l;const d=[...l];return d.splice(h,1),d.length?Object.freeze(d):de})},[t,i]);return G(()=>i(r(n)),[r,n,i]),{resetSelection:o,select:c,selection:s}},Gs=({className:e,classNameModifiers:t=de,popoverClassNameModifiers:n,items:r=de,filterable:s=!1,multiSelect:i=!1,readonly:o=!1,onChange:c=te,selected:u,name:l,isInvalid:h,isValid:d,placeholder:f,uniqueId:m,renderListItem:y,isCollatingErrors:_,setToTargetWidth:T,withoutCollapseIndicator:g=!1,showOverlay:E=!1,fitPosition:b})=>{const{resetSelection:N,select:D,selection:S}=P_({items:r,multiSelect:i,selected:u}),[v,R]=x(!1),[F,P]=x(""),z=Y(null),j=Y(null),ie=Y(null),K=Y(`select-${aa()}`),[ce,Te]=x(0),me=Y(),_e=Y(!0),De=Y(!1),pe=Y(S),ke=Y(S),fe=C(()=>{P(""),R(!1),v&&(N(pe.current),_e.current=!0)},[N,R,P,v]),Ue=A(()=>M([Br,{[E_]:xe(i)},...t.map(ae=>`${Br}--${ae}`),e]),[e,t,i]),{commitAction:oe,commitActionButtons:ze,committing:Qe,resetCommitAction:Tt}=Nd({resetDisabled:!S.length}),Ge=C(()=>{var ae;P(""),R(!1),Tt(),_e.current?_e.current=!1:(ae=ie.current)==null||ae.focus()},[Tt,R,P]),Wt=C(()=>{pe.current=S;const ae=`${S.map(({id:Re})=>Re)}`;c({target:{value:ae,name:l}})},[l,c,S]);G(()=>{switch(oe){case je.APPLY:Wt();break;case je.CLEAR:N(),De.current=!0;break}},[oe,Wt,N]);const Be=C(ae=>{var ve;ae.preventDefault();const Re=ae.currentTarget&&((ve=j==null?void 0:j.current)!=null&&ve.contains(ae.currentTarget))?ae.currentTarget:null;if(Re&&!Re.getAttribute("data-disabled")){const js=Re.getAttribute("data-value"),zs=r.find(Ks=>Ks.id===js);D(zs)}},[r,D]);G(()=>{ke.current!==S&&(ke.current=S,(!i||De.current)&&(Wt(),Ge())),De.current=!1},[Ge,Wt,i,S]),G(()=>{Qe&&(Te(S.length),Ge())},[Qe,Ge,Te,S.length]);const An=C(ae=>{switch(ae.code){case q.ESCAPE:case q.TAB:v&&Ge(),_e.current=ae.key===q.TAB;return;case q.ENTER:case q.SPACE:if(s&&v){if(ae.key===q.ENTER)if(F)Be(ae);else break;return}break;case q.ARROW_DOWN:case q.ARROW_UP:break;default:return}ae.preventDefault(),R(!0)},[Ge,s,Be,v,R,F]);G(()=>{v&&(cancelAnimationFrame(me.current),me.current=requestAnimationFrame(()=>{var ae;e:{let Re=(ae=j.current)==null?void 0:ae.firstElementChild,ve;for(;Re;){if(!(Re.dataset.disabled&&Re.dataset.disabled==="true")){if(Re.getAttribute("aria-selected")==="true"){Re.focus();break e}ve=ve||Re}Re=Re.nextElementSibling}ve&&ve.focus()}}))},[v]);const Kn=C(ae=>{const Re=ae.target;switch(ae.code){case q.ESCAPE:ae.preventDefault(),Ge();break;case q.ENTER:case q.SPACE:Be(ae);break;case q.ARROW_DOWN:{ae.preventDefault();let ve=Re.nextElementSibling;for(;ve;){if(!(ve.dataset.disabled&&ve.dataset.disabled==="true")){ve.focus();break}ve=ve.nextElementSibling}break}case q.ARROW_UP:{ae.preventDefault();e:{let ve=Re.previousElementSibling;for(;ve;){if(!(ve.dataset.disabled&&ve.dataset.disabled==="true")){ve.focus();break e}ve=ve.previousElementSibling}s&&z.current&&z.current.focus()}break}case q.TAB:Ge();break}},[Ge,s,Be]),Vn=C(ae=>{const Re=ae.target.value;P(Re.toLowerCase())},[P]),ci=C(ae=>{ae.preventDefault(),R(Re=>!Re),v&&N(pe.current)},[R,v,N]);return G(()=>{var ae;v&&s&&((ae=z.current)==null||ae.focus())},[s,v]),a("div",{className:Ue,children:[a(S_,{id:m??void 0,appliedFilterNumber:ce,active:S,filterInputRef:z,filterable:s,isInvalid:h,isValid:d,onButtonKeyDown:An,onInput:Vn,multiSelect:i,placeholder:f,readonly:o,selectListId:K.current,showList:v,toggleButtonRef:ie,toggleList:ci,withoutCollapseIndicator:g,ariaDescribedBy:!_&&m?`${m}${So}`:""}),a(w_,{popoverClassNameModifiers:n,setToTargetWidth:T,dismissPopover:fe,active:S,commitActions:ze,items:r,multiSelect:i,onKeyDown:Kn,onSelect:Be,selectListId:K.current,ref:j,toggleButtonRef:ie,renderListItem:y,showList:v,showOverlay:E,textFilter:F,fitPosition:b})]})},M_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,width:"7",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e&&a("title",{children:e}),a("path",{d:"M5.56077 2.00011L2.56077 5.00011L5.56077 8.00011L4.50011 9.06077L0.439453 5.00011L4.50011 0.939453L5.56077 2.00011Z",fill:t.disabled?"#8D95A3":"#00112C"})]})),F_=Xe(({title:e,...t},n)=>a("svg",{...t,ref:n,width:"7",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e&&a("title",{children:e}),a("path",{d:"M0.439453 7.9999L3.43945 4.9999L0.439454 1.9999L1.50011 0.93924L5.56077 4.9999L1.50011 9.06056L0.439453 7.9999Z",fill:t.disabled?"#8D95A3":"#00112C"})]}));function Ha({next:e,hasNext:t,hasPrev:n,prev:r,limit:s,limitOptions:i,onLimitSelection:o}){const{i18n:c}=U(),u=A(()=>i&&Object.freeze(i.map(h=>({id:`${h}`,name:`${h}`}))),[i]),l=C(({target:h})=>{Ne(h==null?void 0:h.value)||o==null||o(+h.value)},[o]);return a("div",{"aria-label":c.get("paginatedNavigation"),className:`adyen-pe-pagination ${M({})}`,children:[a("div",{className:"adyen-pe-pagination__context",children:u&&o&&a(V,{children:[a("span",{children:c.get("pagination.showing")}),a("div",{className:"adyen-pe-pagination__limit-selector",children:a(Gs,{setToTargetWidth:!0,filterable:!1,multiSelect:!1,items:u,onChange:l,selected:`${s??""}`})})]})}),a("div",{className:"adyen-pe-pagination__controls",children:[a(he,{"aria-label":c.get("pagination.previousPage"),variant:se.TERTIARY,disabled:!n,iconButton:!0,classNameModifiers:["circle"].concat(n?de:"disabled"),onClick:r,children:a(M_,{disabled:!n})}),a(he,{"aria-label":c.get("pagination.nextPage"),variant:se.TERTIARY,disabled:!t,iconButton:!0,classNameModifiers:["circle"].concat(t?de:"disabled"),onClick:e,children:a(F_,{disabled:!t})})]})]})}const zn="adyen-pe-transactions-table",x_=zn+"__amount",B_=zn+"__payment-method",$_=zn+"__payment-method-logo-container",U_=zn+"__payment-method-logo",W_=zn+"__date-and-payment-method",H_=zn+"__date-and-payment-method--date",G_="https://cdf6519016.cdn.adyen.com/checkoutshopper/",Y_=({name:e,resourceContext:t,imageFolder:n="logos/",parentFolder:r="",extension:s="svg",size:i="",subFolder:o=""})=>{const c=`/images/${n}/${o}/${r}/${e}${i}.${s}`.replace(/\/+/g,"/");return`${t}${c}`},j_=({options:e=$,name:t})=>{const{loadingContext:n}=U();return A(()=>Y_({resourceContext:G_,name:t,...e}),[n,t,e])},vd=({folder:e="components/",className:t,alt:n,name:r,extension:s})=>{const i=j_({options:A(()=>({imageFolder:e,extension:s}),[s,e]),name:r});return a("img",{className:M("adyen-pe__image",t),alt:n,src:i})},z_=Object.freeze({klarna:"Klarna",paypal:"PayPal"});function Od(e,t){return e.lastFourDigits?t==="detail"?"•••• •••• •••• "+e.lastFourDigits:e.lastFourDigits:e.description||z_[e.type]||e.type}const ml=({paymentMethod:e,bankAccount:t})=>{const{i18n:n}=U(),r=be(Oe.down.xs);return a("div",{className:B_,children:e||t?a(V,{children:[a("div",{className:$_,children:a(vd,{name:e?e.type:"bankTransfer",alt:e?e.type:"bankTransfer",folder:"logos/",className:U_})}),a(k,{variant:I.BODY,stronger:r,children:e?Od(e):t==null?void 0:t.accountNumberLastFourDigits})]}):a(Mt,{label:n.get("noData"),variant:Ee.LIGHT_WITH_OUTLINE})})},K_={id:"paymentId",transactionType:"transactionType",createdAt:"date",balanceAccountId:"balanceAccount",accountHolderId:"account",amount:"txAmount",description:"description",status:"status",category:"category",paymentMethod:"paymentMethod",currency:"currency",fundsCapturedAmount:"fundsCaptured",payoutAmount:"netPayout",adjustmentAmount:"adjustments",dateAndPaymentMethod:"date",dateAndReportType:"date",reportType:"report",reportFile:"file"},bd=e=>K_[e]||e;function V_(e){let t={};for(const n of Object.keys(e))Z(e[n])||(t={...t,[n]:e[n]});return t}const Ga=({fields:e,customColumns:t,columnConfig:n})=>{const{i18n:r}=U(),s=A(()=>e.map(c=>({key:c})),[e]),i=be(Oe.up.sm);return A(()=>{const c=(t==null?void 0:t.filter(d=>!(e!=null&&e.some(f=>f===d.key))).map(d=>d.key))||[],u=[...s,...(t==null?void 0:t.filter(d=>d==null?void 0:d.key))||[]],l=(t==null?void 0:t.reduce((d,f)=>(d[f.key]=f,d),{}))||{},h=new Map;return u.forEach(d=>{const f=l[d.key];if((f==null?void 0:f.visibility)!=="hidden")if(h.has(d.key)){const m=h.get(d.key);h.set(d.key,{...m,...d,visible:d.visibility!=="hidden",position:d.align||m.position})}else{const{key:m,flex:y,align:_}=d,T=r.get(bd(m)),g=V_((n==null?void 0:n[m])||$);h.set(d.key,{key:m,label:T,visible:c.includes(d.key)?i:!0,flex:y,position:_,...g})}}),Array.from(h.values())},[n,t,e,r,i,s])},Ya=["createdAt","paymentMethod","transactionType","amount"],q_=({activeBalanceAccount:e,availableCurrencies:t,error:n,hasMultipleCurrencies:r,loading:s,onContactSupport:i,onRowClick:o,showDetails:c,showPagination:u,transactions:l,customColumns:h,...d})=>{const{i18n:f}=U(),{dateFormat:m}=rn(e==null?void 0:e.timeZone),[y,_]=x(),T=be(Oe.up.sm),g=be(Oe.up.md),E=be(Oe.down.xs),b=f.get("amount"),N=Ga({fields:Ya,customColumns:h,columnConfig:{amount:{label:r?void 0:`${b} ${t&&t[0]?`(${bu(t[0])})`:""}`,position:"right",flex:T?1.5:void 0},transactionType:{visible:g},paymentMethod:{visible:T}}}),D={title:"noTransactionsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},S=C(R=>{_(R??void 0)},[_]),v=A(()=>()=>a(Wa,{error:n,onContactSupport:i,errorMessage:"weCouldNotLoadYourTransactions"}),[n,i]);return a("div",{className:zn,children:a(Tn,{errorDisplay:v,error:n,columns:N,data:l,loading:s,outline:!1,onRowClick:{callback:o},onRowHover:S,emptyTableMessage:D,customCells:{transactionType:({item:R,rowIndex:F})=>{const P=`tooltip.${R.category}`;return R.category?f.has(P)?a(zp,{isContainerHovered:F===y,value:R.category}):a(k,{variant:I.BODY,children:f.has(`txType.${R.category}`)?f.get(`txType.${R.category}`):`${R.category}`}):null},amount:({value:R})=>{const F=f.amount(R.value,R.currency,{hideCurrency:!r});return a(k,{variant:I.BODY,className:x_,children:F})},createdAt:({item:R,value:F})=>E?a("div",{className:W_,children:[a(ml,{paymentMethod:R.paymentMethod,bankAccount:R.bankAccount}),a(k,{variant:I.BODY,className:H_,children:m(R.createdAt,km)})]}):a(k,{variant:I.BODY,children:m(F,Dm)}),paymentMethod:({item:R})=>a(ml,{paymentMethod:R.paymentMethod,bankAccount:R.bankAccount})},children:u&&a(Tn.Footer,{children:a(Ha,{...d})})})})},nt="adyen-pe-transaction-data",pl=`${nt}__amount`,Z_=`${nt}__action-bar`,Qo=`${nt}__container`,X_=`${nt}__head-container`,ja=`${nt}__input`,Ys=`${ja}-container`,Id=`${Ys}--short`,Q_=`${Ys}--text-input`,J_=`${Ys}--with-error`,Dd=`${ja}-head`,kd=`${nt}__label`,e3=`${nt}__list`,za=`${nt}__payment-method`,t3=`${za}-detail`,Ld=`${za}-logo`,n3=`${Ld}-container`,r3=`${nt}__tags`,s3=`${nt}__status-box`,o3=`${nt}__refund-response`,Co=`${nt}__refund-response-icon`,i3=`${Co}--success`,a3=`${Co}--error`,c3=`${nt}__refund-statuses-container`,wd=new Set(["status","category","paymentMethod","bankAccount","balanceAccount","id","balanceAccountId",...Ya,"deductedAmount","lineItems","originalAmount","paymentPspReference","refundDetails","refundMetadata"]),l3=()=>{var s;const{i18n:e}=U(),{transaction:t,extraFields:n,dataCustomization:r}=ap();return A(()=>{const{balanceAccount:i,category:o,id:c,paymentPspReference:u,refundMetadata:l}=t,h=o==="Refund",d=null,f=N=>{if(Ne(N))return null;const{value:D,currency:S}=N;return e.amount(D,S)},m=f(t.deductedAmount),y=f(t.originalAmount),_=h?"refund.refundFee":"refund.fee",T=h?"refund.originalPayment":"refund.originalAmount",g=h?"refund.paymentPspReference":"refund.pspReference",b=[...[y?{key:T,value:y,id:"originalAmount"}:d,m?{key:_,value:m,id:"deductedAmount"}:d,i!=null&&i.description?{key:"account",value:i.description,id:"description"}:d,h&&(l!=null&&l.refundReason)?{key:"refundReason",value:e.has(`refundReason.${l.refundReason}`)?e.get(`refundReason.${l.refundReason}`):l.refundReason,id:"refundReason"}:d,{key:"referenceID",value:a(Bn,{type:"Default",textToCopy:c,showCopyTextTooltip:!1}),id:"id"},h&&(l!=null&&l.refundPspReference)?{key:"refund.refundPspReference",value:l.refundPspReference,id:"refundPspReference"}:d,u?{key:g,value:u,id:"paymentPspReference"}:d].filter(Boolean).filter(N=>{var D,S;return!((S=(D=r==null?void 0:r.details)==null?void 0:D.fields)!=null&&S.some(v=>v.key===N.id&&v.visibility==="hidden"))}),...Object.entries(n||{}).filter(([N,D])=>!wd.has(N)&&D.type!=="button"&&D.visibility!=="hidden").map(([N,D])=>({key:N,value:xn(D)?D.value:D,type:xn(D)?D.type:"text",config:xn(D)?D.config:void 0}))||{}];return a(fn,{classNames:e3,items:b,layout:"5-7",align:"start",renderLabel:N=>a("div",{className:kd,children:N}),renderValue:(N,D,S,v)=>{if(S==="link"&&v)return a(ba,{classNames:[M(v==null?void 0:v.className)],href:v.href,target:v.target||"_blank",children:N});if(S==="icon"&&v){const R={url:v==null?void 0:v.src,alt:v.alt||N};return a("div",{className:M("adyen-pe-transaction-data__list-icon-value",v==null?void 0:v.className),children:[a(Ia,{...R}),a(k,{variant:I.BODY,children:[" ",N," "]})]})}return a(k,{className:M(v==null?void 0:v.className),variant:I.BODY,children:N})}})},[(s=r==null?void 0:r.details)==null?void 0:s.fields,n,e,t])},_l=({children:e,className:t})=>a("div",{className:M(Qo,t),children:e}),u3=e=>{switch(e==null?void 0:e.status){case"Booked":return"default";case"Reversed":return"error";default:return"pending"}},d3=e=>e!=null&&e.paymentMethod?e.paymentMethod.type:e!=null&&e.bankAccount?"bankTransfer":null,h3=e=>{var t;return e!=null&&e.paymentMethod?Od(e.paymentMethod,"detail"):(t=e==null?void 0:e.bankAccount)==null?void 0:t.accountNumberLastFourDigits},f3=e=>{if(e.category==="Refund"){const{refundType:t}=e.refundMetadata??$;switch(t){case vn.FULL:return vn.FULL;case vn.PARTIAL:return vn.PARTIAL}}},m3=({refundedState:e,transaction:t})=>{var d;const{i18n:n}=U(),{dateFormat:r}=rn((d=t==null?void 0:t.balanceAccount)==null?void 0:d.timeZone),{amount:s,category:i,createdAt:o}=t,c=A(()=>{const{currency:f,value:m}=s;return`${n.amount(m,f,{hideCurrency:!0})} ${f}`},[s,n]),[u,l,h]=A(()=>[d3(t),h3(t),f3(t)],[t]);return a(V,{children:[a("div",{className:r3,children:[i&&a(Mt,{label:n.get(`txType.${i}`),variant:Ee.DEFAULT}),h&&a(V,{children:[h===vn.FULL&&a(Mt,{label:n.get("full"),variant:Ee.SUCCESS}),h===vn.PARTIAL&&a(Mt,{label:n.get("partial"),variant:Ee.BLUE})]}),e===cr.FULL&&a(Mt,{label:n.get("refunded.full"),variant:Ee.SUCCESS}),e===cr.PARTIAL&&a(Mt,{label:n.get("refunded.partial"),variant:Ee.BLUE})]}),c&&a("div",{className:M(pl,`${pl}--${u3(t)}`),children:c}),u&&a("div",{className:za,children:[a("div",{className:n3,children:a(vd,{className:Ld,name:u,alt:u,folder:"logos/"})}),a("div",{className:t3,children:l})]}),o&&a("div",{className:kd,children:r(new Date(o),Lm)})]})},p3=Ie(m3),_3=Xe(({title:e,...t},n)=>a("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",...t,children:[e&&a("title",{children:e}),a("g",{"clip-path":"url(#a)",children:a("path",{d:"M.25 8a7.75 7.75 0 1 1 15.5 0A7.75 7.75 0 0 1 .25 8ZM6 4.94 4.94 6l2 2-2 2L6 11.06l2-2 2 2L11.06 10l-2-2 2-2L10 4.94l-2 2-2-2Z",fill:"currentColor"})}),a("defs",{children:a("clipPath",{id:"a",children:a("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}));function Pd({onInput:e,onKeyUp:t,trimOnBlur:n,onBlurHandler:r,onBlur:s,onFocusHandler:i,errorMessage:o,...c},u){const{autoCorrect:l,classNameModifiers:h,isInvalid:d,isValid:f,readonly:m=!1,spellCheck:y,type:_,uniqueId:T,isCollatingErrors:g,disabled:E}=c;xt(c,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const b=C(K=>{e==null||e(K)},[e]),N=C(K=>{t&&t(K)},[t]),D=C(K=>{r==null||r(K),n&&(K.target.value=K.target.value.trim()),s==null||s(K)},[s,r,n]),S=C(K=>{i==null||i(K)},[i]),v=M("adyen-pe-input",[`adyen-pe-input--${_}`],c.className,{"adyen-pe-input--invalid":d,"adyen-pe-input--valid":f},h==null?void 0:h.map(K=>`adyen-pe-input--${K}`)),{classNameModifiers:R,uniqueId:F,isInvalid:P,isValid:z,isCollatingErrors:j,...ie}=c;return a(V,{children:[a("input",{id:T,...ie,type:_,className:v,readOnly:m,"aria-describedby":g?void 0:`${T}${So}`,"aria-invalid":d,onInput:b,onBlurCapture:D,onFocus:S,onKeyUp:N,disabled:E,ref:u}),d&&o&&a("span",{className:"adyen-pe-input__invalid-value",id:`${T}${So}`,children:o})]})}Pd.defaultProps={type:"text",classNameModifiers:[],onInput:()=>{}};const Ro=Gr(Pd),Md=(e,t)=>Iu(e,t).toFixed(Yi(t)),Yi=e=>Math.log10(Ou(e)),Fd=({currency:e,disabled:t,errorMessage:n,errorMessageArg:r,onInput:s,value:i})=>{const{i18n:o}=U(),c=Y(as()),u=Y(as()),l=n?r?o.get(n,{values:{amount:r}}):o.get(n):"";return a("div",{className:Qo,children:[a("div",{className:Dd,children:a("div",{id:u.current,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:o.get("refundAmount")})})}),a("div",{className:M({[Ys]:!0,[Id]:!0,[Q_]:!0,[J_]:!!n}),children:[a("label",{htmlFor:c.current,"aria-labelledby":u.current,children:[e&&a(Mt,{label:e,variant:Ee.DEFAULT}),a(Ro,{min:0,type:"number",className:ja,disabled:xe(t),lang:o.locale,onInput:s,value:i,uniqueId:c.current})]}),n&&a("div",{className:"adyen-pe-input__refund-invalid-value",id:`${c.current}${So}`,children:[a(_3,{}),a(k,{el:ne.SPAN,variant:I.BODY,children:l})]})]})]})},y3=()=>{const{availableAmount:e,currency:t}=wa();return a(Fd,{currency:t,errorMessage:null,value:Md(e,t),disabled:!0})},g3=({locale:e})=>{const{availableAmount:t,currency:n,interactionsDisabled:r,setAmount:s}=wa(),[i,o]=x(null),[c,u]=x(`${Md(t,n)}`),{i18n:l}=U(),h=A(()=>{const f=Yi(n);return m=>Math.trunc(+`${parseFloat(m)}e${f}`)||0},[n]),d=f=>{var E;let m=f.currentTarget.value.trim();const y=h(m);let _=null;y||m?(y<0&&(_="noNegativeNumbersAllowed"),y>t&&(_="refundAmount.excess")):_="refundAmount.required";const T=((E=1.1.toLocaleString(e).match(/\d(.*?)\d/))==null?void 0:E[1])||".",g=m.split(T);if(g.length===2){const b=Yi(n),N=g[0];let D=g[1];D.length>=b&&(D=D.substring(0,b),m=N+T+D,f.currentTarget.value=m)}u(m),o(_),s(_?0:y)};return a(Fd,{currency:n,errorMessage:i,errorMessageArg:l.amount(t,n),onInput:d,value:c,disabled:r})},T3=()=>{const{i18n:e}=U();return A(()=>a("div",{className:`${Qo} ${X_}`,children:[a(k,{el:ne.DIV,variant:I.SUBTITLE,stronger:!0,children:e.get("refundAction")}),a(k,{variant:I.BODY,children:e.get("refundNotice")})]}),[e])},A3=()=>{const{i18n:e}=U(),{interactionsDisabled:t,refundReason:n,setRefundReason:r}=wa(),s=A(()=>Object.freeze(La.map(o=>({id:o,name:e.has(`refundReason.${o}`)?e.get(`refundReason.${o}`):o}))),[e]),i=C(o=>{var u;const c=(u=o.target)==null?void 0:u.value;c&&r(c)},[r]);return a("div",{className:Qo,children:[a("div",{className:Dd,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:e.get("refundReason")})}),a("div",{className:`${Ys} ${Id}`,children:a(Gs,{items:s,readonly:t,filterable:!1,multiSelect:!1,onChange:i,selected:n})})]})},yl=({children:e,renderViewActionButtons:t,renderViewMessageBox:n})=>a("div",{className:nt,children:[e,n&&n(),t()]}),gl=({action:e,title:t,renderIcon:n,subtitle:r})=>a("div",{className:o3,children:[n&&n(),a(k,{className:It.MEDIUM,variant:I.TITLE,children:t}),a(k,{variant:I.BODY,children:r}),e&&e()]}),E3=({transaction:e,extraFields:t,dataCustomization:n})=>{var Ue;const[r,s]=x(lt.DETAILS),[i,o]=x(),[c,u]=x(),[l,h]=x(!1),{fetchingTransaction:d,refreshTransaction:f,transaction:m,transactionNavigator:y}=pp(e),{refundable:_,refundableAmount:T,refundableAmountLabel:g,refundAvailable:E,refundCurrency:b,refundDisabled:N,refundedState:D,refundStatuses:S,refundMode:v,refundLocked:R}=yp(m),F=A(()=>N||l,[N,l]),{i18n:P}=U(),z=Object.freeze((m==null?void 0:m.lineItems)??de),j=C(oe=>o(oe),[]),ie=C(oe=>u(oe),[]),K=C(oe=>oe===lt.REFUND&&F,[F]),{getBalanceAccounts:ce}=Ce().endpoints,{data:Te}=Ot(A(()=>({fetchOptions:{enabled:!!ce&&!m.balanceAccount&&!!m.balanceAccountId,keepPrevData:!0},queryFn:async()=>ce==null?void 0:ce($)}),[m.balanceAccountId,m.balanceAccount,ce])),me=C(oe=>void(K(oe)||s(oe)),[K]),_e=C(()=>{const oe=t?Object.values(t).filter(Qe=>Qe.type==="button").map(Qe=>{var Tt,Ge;return{title:Qe.value,variant:se.SECONDARY,event:(Tt=Qe.config)==null?void 0:Tt.action,classNames:(Ge=Qe.config)!=null&&Ge.className?[Qe.config.className]:[]}}):[],ze=[i,c,...oe].filter(Boolean);return ze.length?a(_l,{className:Z_,children:a(ka,{actions:ze,layout:Hs.BUTTONS_END})}):null},[t,i,c]),De=C(()=>{f(),h(!0)},[h,f]),pe=C(()=>S!=null&&S.length||R||l?a("div",{className:c3,children:[(R||l)&&a(pn,{type:Fe.HIGHLIGHT,variant:mn.TIP,description:`${P.get("refund.theRefundIsBeingProcessed")} ${P.get("pleaseComeBackLater")}`}),S.map((oe,ze)=>a(pn,{variant:mn.TIP,type:(oe==null?void 0:oe.type)??Fe.HIGHLIGHT,description:oe==null?void 0:oe.label},`${Math.random()}-${ze}`))]}):null,[P,S,R,l]),ke=m.balanceAccount??((Ue=Te==null?void 0:Te.data)==null?void 0:Ue.find(oe=>oe.id===m.balanceAccountId));if(go(()=>{s(lt.DETAILS)},[m]),go(()=>{F&&s(lt.DETAILS)},[F]),d)return a(va,{skeletonRowNumber:5});if(K(r))return null;const fe={lineItems:z,refundAvailable:E,refundDisabled:F,setActiveView:me,setPrimaryAction:j,setSecondaryAction:ie};switch(r){case lt.DETAILS:return a(yl,{renderViewActionButtons:_e,renderViewMessageBox:pe,children:a(ip,{...fe,transaction:!m.balanceAccount&&ke?{...m,balanceAccount:ke}:{...m},transactionNavigator:y,extraFields:t,dataCustomization:n,children:[a(_l,{className:s3,children:a(p3,{transaction:m,refundedState:D})}),a(l3,{})]})});case lt.REFUND:return a(yl,{renderViewActionButtons:_e,children:a(fp,{...fe,availableAmount:T,currency:b,refundMode:v,refreshTransaction:f,transactionId:m.id,children:[a(T3,{}),_&&a(A3,{}),v===We.FULL_AMOUNT&&a(y3,{}),(v===We.PARTIAL_AMOUNT||v===We.PARTIAL_LINE_ITEMS)&&a(g3,{locale:P.locale}),g&&a(pn,{variant:mn.TIP,type:g.type,description:g.description})]})});case lt.REFUND_SUCCESS:return a(gl,{renderIcon:()=>a(Ze,{name:"checkmark-circle-fill",className:M(Co,i3)}),title:P.get("refundActionSuccessTitle"),subtitle:P.get("refundActionSuccessSubtitle"),action:()=>a(he,{variant:se.SECONDARY,onClick:De,children:P.get("goBack")})});case lt.REFUND_ERROR:return a(gl,{renderIcon:()=>a(Ze,{name:"cross-circle-fill",className:M(Co,a3)}),title:P.get("refundActionErrorTitle"),subtitle:P.get("refundActionErrorSubtitle"),action:()=>a(he,{variant:se.SECONDARY,onClick:f,children:P.get("goBack")})});default:return null}},N3=({error:e,isFetching:t,transaction:n,extraFields:r,dataCustomization:s})=>xe(t)||!(n||e)?a(va,{skeletonRowNumber:5}):n?a(E3,{dataCustomization:s,transaction:n,extraFields:r}):null,Jo=(e,t)=>{const{getBalanceAccounts:n}=Ce().endpoints,{data:r,isFetching:s,error:i}=Ot(A(()=>({fetchOptions:{enabled:!!n&&(t??!0),keepPrevData:!0},queryFn:async()=>n==null?void 0:n($)}),[n])),o=A(()=>r==null?void 0:r.data.filter(u=>e?u.id===e:!0),[r==null?void 0:r.data,e]),c=A(()=>!!e&&!!(r!=null&&r.data.length)&&(o==null?void 0:o.length)===0,[o==null?void 0:o.length,r==null?void 0:r.data.length,e]);return{balanceAccounts:o,isBalanceAccountIdWrong:c,isFetching:s,error:i}},xd=Wr({withinModal:!1}),S3=()=>Hr(xd);function C3({title:e,children:t,classNameModifiers:n=[],isOpen:r,onClose:s,isDismissible:i=!0,headerWithBorder:o=!0,size:c="fluid",...u}){const l=be(Oe.down.xs),{i18n:h}=U(),d=Ma(null,s),f=C(m=>{m.key==="Escape"&&r&&i&&s()},[r,i,s]);return G(()=>(r?window.addEventListener("keydown",f):window.removeEventListener("keydown",f),()=>window.removeEventListener("keydown",f)),[r,f]),a(V,{children:r&&a("div",{className:M("adyen-pe-modal-wrapper",n.map(m=>`adyen-pe-modal-wrapper--${m}`),{"adyen-pe-modal-wrapper--open":r,"adyen-pe-modal-wrapper--dismissible":i}),role:"dialog","aria-modal":"true","aria-hidden":!open,...u,children:a(xd.Provider,{value:{withinModal:!0},children:a("div",{className:M("adyen-pe-modal",{"adyen-pe-modal--fluid":c==="fluid","adyen-pe-modal--small":c==="small","adyen-pe-modal--large":c==="large","adyen-pe-modal--extra-large":c==="extra-large","adyen-pe-modal--full-screen":c==="full-screen"||l}),ref:d,children:[a("div",{className:M("adyen-pe-modal__header",{"adyen-pe-modal__header--with-title":e,"adyen-pe-modal__header--with-border-bottom":o}),children:[e&&a("div",{className:"adyen-pe-modal__header__title",children:e}),i&&a(he,{onClick:s,variant:se.TERTIARY,iconButton:!0,classNameModifiers:["circle"],className:"adyen-pe-modal__header-icon","aria-label":h.get("dismiss"),children:a(Ze,{name:"cross"})})]}),a("div",{className:"adyen-pe-modal__content",children:t})]})})})})}const R3={transaction:"transactionDetails",payout:"payoutDetails"},v3=({hideTitle:e,type:t})=>{const{i18n:n}=U(),{withinModal:r}=S3(),[s,i]=x(!1),o=A(()=>s||xe(e),[s,e]),c=A(()=>n.get(R3[t]),[n,t]);return G(()=>{i(r)},[r]),{hideTitle:o,title:c}},Bd="adyen-pe-payouts-table",O3=`${Bd}__net-payout`,$d=["fundsCapturedAmount","adjustmentAmount","payoutAmount"],Ka=["createdAt",...$d],b3=e=>$d.includes(e),I3=({error:e,loading:t,onContactSupport:n,onRowClick:r,showDetails:s,showPagination:i,data:o,customColumns:c,...u})=>{const{i18n:l}=U(),{dateFormat:h}=rn("UTC"),{refreshing:d}=Ce(),f=A(()=>t||d,[t,d]),m=be(Oe.up.sm),y=C(E=>{var N,D,S,v;const b=l.get(bd(E));if(b3(E))return{label:(D=(N=o==null?void 0:o[0])==null?void 0:N[E])!=null&&D.currency?`${b} (${bu((v=(S=o==null?void 0:o[0])==null?void 0:S[E])==null?void 0:v.currency)})`:b,position:"right"}},[o,l]),_=Ga({fields:Ka,customColumns:c,columnConfig:A(()=>({fundsCapturedAmount:{...y("fundsCapturedAmount"),visible:m},adjustmentAmount:{...y("adjustmentAmount"),visible:m},payoutAmount:y("payoutAmount")}),[y,m])}),T={title:"noPayoutsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},g=A(()=>()=>a(Wa,{error:e,errorMessage:"weCouldNotLoadYourPayouts",onContactSupport:n}),[e,n]);return a("div",{className:Bd,children:a(Tn,{errorDisplay:g,error:e,columns:_,data:o,loading:f,outline:!1,onRowClick:{callback:r},emptyTableMessage:T,customCells:{createdAt:({value:E})=>E?m?E&&a(k,{variant:I.BODY,children:h(E,Om)}):h(E,bm):null,fundsCapturedAmount:({value:E})=>E&&a(k,{variant:I.BODY,children:l.amount(E.value,E.currency,{hideCurrency:!0})}),adjustmentAmount:({value:E})=>E&&a(k,{variant:I.BODY,children:l.amount(E.value,E.currency,{hideCurrency:!0})}),payoutAmount:({value:E})=>E&&a(k,{variant:I.BODY,className:M({[`${O3}--strong`]:!m}),children:l.amount(E.value,E.currency,{hideCurrency:m})})},children:i&&a(Tn.Footer,{children:a(Ha,{...u})})})})},D3={transaction:"getTransaction",payout:"getPayout"},Js=e=>!("data"in e);function Va(e){var E;const t=A(()=>Js(e)?null:e.data,[e]),n=A(()=>Js(e)?e.id:null,[e]),r=Ce().endpoints[D3[e.type]],{hideTitle:s,title:i}=v3(e),{data:o,error:c,isFetching:u}=Ot(A(()=>({fetchOptions:{enabled:!!n&&!!r},queryFn:async()=>{const b=e.type==="transaction"?{path:{transactionId:n}}:{query:{balanceAccountId:n,createdAt:e.date}};return r($,{...b})}}),[n,r,e])),l=e.type==="payout"?e.id:o==null?void 0:o.balanceAccountId,h=e.type==="payout"?e==null?void 0:e.balanceAccountDescription:e==null?void 0:e.balanceAccount,{balanceAccounts:d}=Jo(l,!h),f=A(()=>{if(c)return Ua(c,"weCouldNotLoadYourTransactions",e.onContactSupport)},[c,e.onContactSupport]),m=t??o,[y,_]=x(),T=C(async()=>{var b,N,D,S,v;if(o&&(Js(e)&&e.type==="transaction"||e.type==="payout")){const R=await((D=(N=(b=e.dataCustomization)==null?void 0:b.details)==null?void 0:N.onDataRetrieve)==null?void 0:D.call(N,o));_((v=(S=e.dataCustomization)==null?void 0:S.details)==null?void 0:v.fields.reduce((F,P)=>wd.has(P.key)||Ka.includes(P.key)||(P==null?void 0:P.visibility)==="hidden"?F:{...F,...R!=null&&R[P.key]?{[P.key]:R[P.key]}:{}},{}))}},[o,e]),g=Js(e)&&e.type==="transaction"||e.type==="payout"?e.dataCustomization:void 0;return G(()=>{T()},[T]),a("div",{className:"adyen-pe-overview-details",children:[!s&&a("div",{className:"adyen-pe-overview-details--title",children:a(k,{variant:I.TITLE,medium:!0,children:i})}),c&&f&&a("div",{className:"adyen-pe-overview-details--error-container",children:a(en,{withImage:!0,...f})}),e.type==="transaction"&&a(N3,{transaction:m?{...m||$,balanceAccount:(e==null?void 0:e.balanceAccount)||(d==null?void 0:d[0])}:void 0,error:!!(c&&f),isFetching:u,extraFields:y,dataCustomization:g}),e.type==="payout"&&m&&a(sp,{balanceAccountId:n,payout:m,balanceAccountDescription:(e==null?void 0:e.balanceAccountDescription)||((E=d==null?void 0:d[0])==null?void 0:E.description),isFetching:u,extraFields:y,dataCustomization:g})]})}class Ud extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Va,{...this.props,type:"payout",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(Ud,"type","payoutDetails");const k3="adyen-pe-data-overview-container--with-error";function qa({balanceAccountsError:e,children:t,className:n,errorMessage:r,isBalanceAccountIdWrong:s,onContactSupport:i}){const{hasError:o}=Ce();return a("div",{className:M(n,{[k3]:o}),children:o?a(en,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[r,"tryRefreshingThePageOrComeBackLater"],refreshComponent:!0}):e?a(en,{withImage:!0,centered:!0,...Ua(e,"weCouldNotLoadYourBalanceAccounts",i)}):s?a(en,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[r,"theSelectedBalanceAccountIsIncorrect"]}):a(V,{children:t})})}const L3="adyen-pe-payouts-overview",w3="adyen-pe-payouts-details",P3=new Date("2024-04-16T00:00:00.000Z").toString(),Tl="adyen-pe-filter-bar-mobile-switch",Za=()=>{const e=be(Oe.down.xs),[t,n]=x(!e);return G(()=>{n(!e)},[e]),{isMobileContainer:e,showingFilters:t,setShowingFilters:n}},Xa=({isMobileContainer:e,showingFilters:t,setShowingFilters:n})=>e?a("div",{className:Tl,children:a(he,{iconButton:!0,className:`${Tl}__button`,disabled:!Q(n),onClick:()=>n==null?void 0:n(!t),variant:se.SECONDARY,children:a(Ze,{name:t?"cross":"filter"})})}):null,Qa=e=>{const{i18n:t}=U();return e.showingFilters?a("div",{"aria-label":t.get("filterBar"),className:M("adyen-pe-filter-bar",{"adyen-pe-filter-bar__content--mobile":e.isMobileContainer}),children:[e.children,e.canResetFilters&&!!e.resetFilters&&a(he,{variant:se.TERTIARY,onClick:e.resetFilters,children:t.get("button.clearAll")})]}):null},Ja="adyen-pe-balance-account-selector",M3=`${Ja}__account-id`,Al=`${Ja}__account-label`,ec=Ie(({activeBalanceAccount:e,balanceAccountSelectionOptions:t,onBalanceAccountSelection:n})=>{const r=be(Oe.down.xs),{i18n:s}=U(),i=C(o=>a(V,{children:[a("div",{className:o.contentClassName,children:[o.item.name&&a("span",{className:Al,children:o.item.name}),a("span",{className:o.item.name?M3:Al,children:o.item.id})]}),Rd(o)]}),[]);return t&&t.length>1?a(Gs,{popoverClassNameModifiers:[Ja],onChange:n,filterable:!1,multiSelect:!1,placeholder:(e==null?void 0:e.id)||s.get("balanceAccount"),selected:e==null?void 0:e.id,withoutCollapseIndicator:!0,items:t,renderListItem:i,showOverlay:r}):null}),tc=Object.freeze([10,20]),F3=100,fs=10,ji=e=>{const t=~~e;return t===e&&t>0?Math.min(t,F3):Math.max(t,0)},x3=(e,t)=>{const n=e.length-1;if(n<0)return t;if(t<=e[0])return e[0];if(t>=e[n])return e[n];let r=0,s=0,i=n;for(;;){const o=e[r=eu(s,i)];if(s>i||t===o)return o;t>o?s=r+1:i=r-1}},B3=({preferredLimit:e=fs,preferredLimitOptions:t})=>{const n=Y(),r=Y(),s=A(()=>{try{const o=new Set;for(const c of t){const u=ji(c);u>0&&o.add(u)}return Object.freeze([...o].sort((c,u)=>c-u))}catch{}},[t]);return{limit:A(()=>{let o=ji(e)||fs;e:try{if(n.current===s)break e;const c=new Set(n.current=s);if(c.size===0){n.current=void 0;break e}if(r.current!==o)t:{if(c.size===c.add(o).size)break t;if(c.delete(o),c.size===c.add(r.current).size){if($r(r.current)){o=r.current;break t}}else c.delete(r.current);o=x3(n.current,o)}}catch{}return r.current=o},[s,e]),limitOptions:s}},nc=e=>{const t=Y(!1),n=A(()=>e,[e]);return G(()=>(t.current=!0,()=>{t.current=!1,n&&n()}),[n]),t},Wd=(e,t,n)=>{const r=Y(),s=Y(),i=Y(),o=Y(),c=nc(C(()=>{var P;(P=r.current)==null||P.abort(),r.current=void 0},[])),[u,l]=x(o.current),[h,d]=wt(!1),f=A(()=>ji(n),[n]),{getPageCount:m,getPageParams:y,resetPageCount:_,updatePagination:T}=e,g=A(()=>t?P=>{var K;if(!(f&&Number.isInteger(P)))return;const z=m(),j=P<0?P+z+1:P;j>0&&(z?j<=z:j===1)&&((K=r.current)==null||K.abort(),r.current=new AbortController,c.current&&(((o.current=j)>1||z)&&l(o.current),(async()=>{const{signal:ce}=r.current,Te={...y(j,f),limit:f,page:j};try{const me=await t(Te,ce);if(!me||!c.current)return;const{size:_e,...De}=me;T(j,f,De),s.current=o.current&&Math.max(o.current,s.current||-1/0),o.current&&o.current===s.current&&(i.current=_e),o.current===1&&_e>0&&l(o.current),o.current=void 0,d(!0)}catch(me){if(ce.aborted)return;console.error(me)}})()))}:te,[f,t]),E=C(()=>{u&&g(Math.min(u+1,m()))},[g,u]),b=C(()=>{u&&g(Math.max(u-1,1))},[g,u]),N=A(()=>m()||u||void 0,[g,h]),D=A(()=>!!(u&&N)&&u<N,[u,N]),S=A(()=>!!u&&u>1,[u]),v=A(()=>s.current?(s.current-1)*f+(i.current||0):0,[g,h]),R=A(()=>f&&Math.min(f,v||1/0)%f,[f,v]),F=C(()=>{_(),s.current=i.current=o.current=void 0,c.current&&l(o.current)},[_]);return G(()=>{c.current&&h&&d(!1)},[h]),{goto:g,hasNext:D,hasPrev:S,limit:f,next:E,page:u,pages:N,pageSize:R,prev:b,resetPagination:F,size:v}},$3=e=>gt(e.next),U3=e=>gt(e.prev),W3=(e,t)=>{const n=A(()=>{const r=[],s=()=>r.length,i=()=>{r.length=0},o=l=>({cursor:r[l-1]}),c=(l,h)=>{const d=r[h-1];(h===1||h===(r.length||1)+1)&&Z(d)&&(r[h-1]=l?decodeURIComponent(l):void 0)};return{getPageCount:s,getPageParams:o,resetPageCount:i,updatePagination:(l,h,d)=>{$3(d)&&c(d.next,l+1),U3(d)&&c(d.prev,l-1)}}},[]);return Wd(n,e,t)},H3=e=>e.next,G3=(e,t)=>{const n=A(()=>{let r=0;return{getPageCount:()=>r,getPageParams:(u,l)=>({offset:(u-1)*l}),resetPageCount:()=>{r=0},updatePagination:(u,l,h)=>{H3(h)&&h.next&&(r=Math.max(r,u+1))}}},[]);return Wd(n,e,t)},Y3=(e=$,t=!0)=>{const n=Y(t),r=Y(Object.freeze({...e})),s=Y(new Set(Object.keys(r.current))),i=Y(new Set),o=nc(),[c,u]=A(()=>{const f=m=>{o.current&&h(m)};return[()=>f("reset"),m=>f(m)]},[o]),[l,h]=Vo((f,m)=>{if(m==="reset")return i.current.clear(),r.current;const y={...m},_=[0];Object.keys(y).forEach((g,E)=>{if(!s.current.has(g))return;const b=f[g]??void 0,N=r.current[g]??void 0,D=y[g]??N;if(D===b)return;const S=Math.floor(E/32),v=1<<E%32;y[g]=D,_[S]|=v,i.current[D===N?"delete":"add"](g)});const T=_.some(g=>g)?n.current&&i.current.size===0?r.current:Object.freeze({...f,...y}):f;return n.current||(r.current=T,n.current=!0),T},r.current),d=A(()=>!!i.current.size,[]);return G(()=>{r.current=Object.freeze({...e}),s.current=new Set(Object.keys(r.current)),n.current=t,c()},[t,e,c]),{canResetState:d,defaultState:r.current,resetState:c,state:l,updateState:u}},j3=(e=$,t)=>{const{canResetState:n,defaultState:r,resetState:s,state:i,updateState:o}=Y3(e,t);return{canResetFilters:n,defaultFilters:r,filters:i,resetFilters:s,updateFilters:o}};var zi=(e=>(e.NEXT="next",e.PREV="prev",e))(zi||{}),rc=(e=>(e.CURSOR="cursor",e.OFFSET="offset",e))(rc||{});const z3=["hasNext","hasPrevious"],Hd=e=>{const t=Object.getOwnPropertyNames(e);return!z3.some(n=>t.includes(n))},K3=(e,t="data")=>{const n=e[t];if(Hd(e)){const r=Object.fromEntries(Object.entries(e._links).map(([s,i])=>[s,i.cursor]));return{records:n,paginationData:r}}throw new TypeError("MALFORMED_PAGINATED_DATA")},V3=(e,t="data")=>{const n=e[t];if(!Hd(e)){const{hasNext:r,hasPrevious:s}=e,i={[zi.NEXT]:xe(r),[zi.PREV]:xe(s)};return{records:n,paginationData:i}}throw new TypeError("MALFORMED_PAGINATED_DATA")},q3=({dataField:e="data",fetchRecords:t,filterParams:n=$,initialFiltersSameAsDefault:r=!0,initialize:s,onFiltersChanged:i,pagination:o,preferredLimit:c,preferredLimitOptions:u,enabled:l})=>{const[h,d]=x([]),[f,m]=wt(!0),[y,_]=x(),[T,g]=x(c),E=nc(),b=Y(!0),N=Y(1),D=j3(n,r),{limit:S,limitOptions:v}=B3({preferredLimit:T,preferredLimitOptions:u}),{defaultFilters:R,filters:F,updateFilters:P,...z}=D,[j,ie]=A(()=>o===rc.CURSOR?[K3,W3]:[V3,G3],[]),K=C(pe=>g(pe),[]),{goto:ce,page:Te,pages:me,resetPagination:_e,...De}=ie(C(async({page:pe,...ke},fe)=>{try{if(_(void 0),N.current=pe,!E.current||m(!0))return;const Ue=await t({...ke,...F},fe),{records:oe,paginationData:ze}=j(Ue,e);return b.current&&(s==null||s([oe,ze],D),b.current=!1),E.current&&(d(oe),m(!1)),{...ze,size:oe==null?void 0:oe.length}}catch(Ue){if(fe!=null&&fe.aborted)return;m(!1),_(Ue),console.error(Ue)}},[t,F,S]),S);return A(()=>{b.current=!0},[n]),A(()=>{_e(),N.current=1},[F,S,_e]),G(()=>{l&&ce(N.current)},[ce,l]),G(()=>{i==null||i(F)},[F]),{error:y,fetching:f,filters:F,goto:ce,limitOptions:v,page:Te,pages:me,records:h,updateFilters:P,updateLimit:K,...z,...De}},sc=e=>q3({...e,pagination:rc.CURSOR}),oc=e=>{const[t,n]=x(0),r=C(()=>n(0),[n]),s=A(()=>e==null?void 0:e[t],[e,t]),i=A(()=>e&&e.length>1?Object.freeze(e.map(({description:c,id:u})=>({id:u,name:d2(c)}))):void 0,[e]),o=C(({target:c})=>{const u=c==null?void 0:c.value,l=e==null?void 0:e.findIndex(({id:h})=>h===u);l>=0&&n(l)},[e,n]);return{activeBalanceAccount:s,balanceAccountSelectionOptions:i,onBalanceAccountSelection:o,resetBalanceAccountSelection:r}},{getTimezoneTime:Z3,getUsedTimezone:X3}=(()=>{const e=/\d{2}:\d{2}(?=:\d{2}(?:\.\d+)?\s+([AP]M))/i,t=/^GMT|0(?=\d:00)|:00/g,n=$s();return{getTimezoneTime:(i,o=Date.now())=>{n.tz=i;const{formatted:c}=n(o),[u="",l=""]=(c==null?void 0:c.match(e))??de,h=ki(c),d=`${u}${l&&` ${l}`}`,f=T1(h).replace(t,"");return[d,f]},getUsedTimezone:i=>(n.tz=i,n.tz.current)}})(),Q3=({timezone:e,withClock:t=!1}=$)=>{const n=A(()=>xe(t),[t]),r=A(()=>X3(e),[e]),s=Y(te),[i,o]=x(Date.now()),[c,u]=A(()=>Z3(r,i),[i,r]);return A(()=>{s.current(),s.current=n?ca.subscribe(l=>{Yn(l)||o(l.now)}):te},[o,n]),{clockTime:c,GMTOffset:u,timestamp:i,timezone:r}},J3=e=>Object.freeze({systemToTimezone:H(t=>Ft(e,t)),timezoneToSystem:H(t=>Zt(e,t)),timezoneOffset:H(t=>e(t).offset)}),Gd=(e,t,n=e)=>{const r=(s,i)=>{let o=s;Ne(s)?o=n:os(s)||(o=i??n);const c=vt(e,o,t);return c===o?c:i??n};return s=>{const i=ue(()=>o);let o=r(s);return J({value:i,descriptor:H({...i,set(c){const u=o;o=r(c,o),u!==o&&(this.now=this.now)}})})}},ey=(e,t)=>n=>Q(n)?n.call(e,t):n,ty=e=>!xt(e,"offsets"),ny=e=>xt(e,"from"),ei=({now:e})=>e,ry=(()=>{const e=new Map;return t=>{let n=e.get(t);return Z(n)&&(n=Object.freeze([0,0,t,0,0,0,-1]),e.set(t,n)),n}})(),qn=e=>{try{const t=e instanceof Date||+e===e?e:void 0,n=new Date(t).getTime();return isNaN(n)?void 0:n}catch{}},ti=(e=$,t=$)=>{const n=cs(e),r=cs(t);return()=>{const s=$s(),i=ue(()=>d),o=ue(()=>s.tz.current),c=J({now:i,timezone:o,...J3(s)}),u=ey(n,c);let{from:l,to:h,now:d}=$;const f=y=>{d=qn(y??Date.now())??d;e:{if(ty(n)){l=qn(u(n.from))??d,h=qn(u(n.to))??d;break e}let _,T,g;(g=ny(n))?(_=new Date(l=qn(u(n.from))??d),T=1):(_=new Date(h=qn(u(n.to))??d),T=-1),_=new Date(c.timezoneToSystem(_));const[E=0,b=0,N=0,D=0,S=0,v=0,R=0]=u(n.offsets);_.setFullYear(_.getFullYear()+E*T,_.getMonth()+b*T,_.getDate()+N*T),_.setHours(_.getHours()+D*T,_.getMinutes()+S*T,_.getSeconds()+v*T,_.getMilliseconds()+R*T);const F=qn(c.systemToTimezone(_))??d;g?h=F:l=F}l>h&&([l,h]=[h,l])},m=y=>{const _=s.tz,T=_.current;s.tz=y,_.current!==T&&f(d)};return f(),J({...r,from:ue(()=>l),now:{...i,set:f},timezone:{...o,set:m},to:ue(()=>h)})}},sy=/^(\d{2})\/(\d{2})\/(-?\d+),\s+(\d{2}):(\d{2}):(\d{2}).(\d{3})/,ni=(e=Uo)=>(t,n,...r)=>{const s=tn(n),i=new Date(Zt(s,t));return i.setHours(0,0,0,0),Ft(s,e(i,...r))},Yd=ni(),jd=ni(e=>e.setDate(1)),oy=ni(e=>e.setMonth(0,1)),zd=ni((e,t)=>{const n=ay(e.getDay(),t??0);return e.setDate(e.getDate()-n)}),iy=e=>(e%100?e%4:e%400)===0,gi=(e,t,n=0)=>{const r=e+n,s=Ms(r,12),i=t+Math.floor(r/12);let o=31;switch(s){case 1:o=iy(i)?29:28;break;case 3:case 5:case 8:case 10:o=30;break}return[o,s,i]},ay=(e,t=0)=>(7-t+e)%7,sr=(e,t)=>Mn(e)?0:e-Yd(e,t),El=e=>Z(e)?e:new Date(e),cy=(e,t=$)=>{const n=tn(t.timeZone),r={...da,...t,timeZone:n.tz.current};return new Date(e).toLocaleDateString(jo,r)},an=(e,t)=>{const n=cy(e,{...Du,...da,timeZone:t,hour12:!1}),[,r="",s="",i="",o="",c="",u="",l=""]=n.match(sy)??de;return[+i,+r-1,+s,+o%24,+c,+u,+l]},Ki=(e,t,n)=>{if(Mn(e)||Mn(t))return 1/0;const[r,s]=an(e,n),[i,o]=an(t,n);return Math.abs(o-s+(i-r)*12)},tn=(()=>{const e=$s();return t=>(e.tz=void 0,e.tz=t,e)})(),ic=1,ly=ry(7),uy=Gd(0,6,ic),Kd=(e=0)=>{const t=~~vt(0,e,1/0)||0;return(n=ic)=>{const r=t?{offsets:ly}:{to:ei},s=uy(n);return ti({from:({now:i,timezone:o,systemToTimezone:c,timezoneToSystem:u})=>{const l=new Date(u(zd(i,o,s.value)));return l.setDate(l.getDate()-t*7),c(l)},...r},{firstWeekDay:s.descriptor})()}},dy=Object.freeze([0,1,0,0,0,0,-1]),Vd=(e=0)=>{const t=~~vt(0,e,1/0)||0;return ti({from:({now:r,timezone:s,systemToTimezone:i,timezoneToSystem:o})=>{const c=new Date(o(jd(r,s)));return c.setMonth(c.getMonth()-t),i(c)},...t?{offsets:dy}:{to:ei}})},hy=Vd(1),fy=365,my=1,py=1,_y=Gd(my,fy,py),Nl=e=>{const t=_y(e);return ti({from:({now:n,timezone:r,systemToTimezone:s,timezoneToSystem:i})=>{const o=new Date(i(Yd(n,r)));return o.setDate(o.getDate()-t.value+1),s(o)},to:ei},{numberOfDays:t.descriptor})()},yy=Kd(1),gy=Vd(0),Ty=Kd(0),Ay=ti({from:({now:e,timezone:t})=>oy(e,t),to:ei}),Ey=()=>Object.freeze({"rangePreset.last7Days":Nl(7),"rangePreset.last30Days":Nl(30),"rangePreset.thisWeek":Ty(),"rangePreset.lastWeek":yy(),"rangePreset.thisMonth":gy(),"rangePreset.lastMonth":hy(),"rangePreset.yearToDate":Ay()}),Ny=({now:e=Date.now(),options:t,selectedOption:n,timezone:r})=>{const{i18n:s}=U(),[i,o]=x(),[c,u]=x(),[l,h]=x(),d=Y(),f=Y(),[m,y,_]=A(()=>{const S=s.get("rangePreset.custom"),v=Object.keys(t),R=Object.freeze(v.map(P=>s.get(P)));return[S,(P,z=R)=>{const j=z.findIndex(ie=>ie===P);return t[v[j]]},R]},[s,t]),[T,g]=x(n===m),E=A(()=>Object.freeze([..._,m]),[m,_]),b=A(()=>T?E:_,[T,_,E]),N=C(S=>{const v=y(S,_);v&&(o(v.from),u(v.to),g(!1),h(S))},[m,y,l,_]),D=C(()=>{o(void 0),u(void 0),g(!0),h(m)},[m]);return A(()=>{n===m?h(m):N(n)},[]),A(()=>{var S;if(d.current!==e||f.current!==r){const v=Object.values(t);v.forEach(R=>{R.now=e,R.timezone=r}),d.current=e,f.current=(S=v[0])==null?void 0:S.timezone,N(l)}},[e,r,t]),{customSelection:D,from:i,onSelection:N,options:b,selectedOption:l,to:c}},Sy=({calendarRef:e,onTimeRangeSelected:t,timestamp:n,...r})=>{const{customSelection:s,from:i,onSelection:o,options:c,selectedOption:u,to:l}=Ny(r),h=A(()=>Object.freeze(c.map(y=>({id:y,name:y}))),[c]),d=C(({target:y})=>o(y==null?void 0:y.value),[o]),f=Y(!0),m=Y(n);return G(()=>{e!=null&&e.current&&i&&l&&(f.current=!0,e.current.from=new Date(i),e.current.to=new Date(l))},[e,i,l]),G(()=>{m.current!==n&&(m.current=n,f.current?f.current=!1:s())},[s,n]),G(()=>{u&&(t==null||t(u))},[u,t]),a(Gs,{setToTargetWidth:!0,items:h,filterable:!1,multiSelect:!1,onChange:d,selected:u})},_t=(()=>{const e=r=>Object.freeze(Ur($,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{value:i}])))),t=r=>{try{return Object.getPrototypeOf(r)===$}catch{return!1}},n=(r,s)=>{if(!r)return e(H(s,Bt(r)));let i=s;return e({enumerable:!0,get:()=>i,set:o=>{i=r(o)}})};return Object.defineProperties(n,{is:{value:t},isObject:{value:Wo},immutable:{value:r=>n(!1,r)},mutable:{value:r=>n(void 0,r)},restricted:{value:()=>n(!1)}})})(),qd=(()=>{const e=(n={},r=!1)=>{const s=J();for(const[i,o]of Object.entries(n)){try{const c=_t.is(o),u=_t.isObject(o);if(c||u){Object.defineProperty(s,i,c?o:e(o,r));continue}else if(r){Object.defineProperty(s,i,_t.immutable(o));continue}}catch{}s[i]=o}return _t((i={})=>Object.assign(s,i),s)};return Object.defineProperties(e,{unwrapped:{value:(n={},r=!1)=>{const s=e(n,r);return J({P:s}).P}}})})();var ac=(e=>(e[e.DATE=0]="DATE",e[e.DAY_OF_WEEK=1]="DAY_OF_WEEK",e[e.MONTH_HEADER=2]="MONTH_HEADER",e))(ac||{});const Zd="adyen-pe-calendar__cell adyen-pe-calendar__cell--date",Xd="adyen-pe-calendar__date",Cy=(e=$,t)=>{const n=qd.unwrapped({childClassName:_t.mutable(Xd),childProps:{children:_t.restricted(),className:""},className:_t.mutable(Zd),props:{...e,children:_t.restricted(),className:""}},!0);return t==null||t(ac.DATE,n),n},Ry=Xe(({grid:e,prepare:t,datetime:n,flags:r,index:s,label:i,onlyCellsWithin:o},c)=>{const u=r.WITHIN_BLOCK,l={"data-cursor-position":s,"data-within-month":u,tabIndex:-1};if(u){const _=r.WITHIN_RANGE;l["data-today"]=r.CURRENT,l["data-first-week-day"]=r.LINE_START,l["data-last-week-day"]=r.LINE_END,l["data-weekend"]=r.WEEKEND,l["data-first-month-day"]=r.BLOCK_START,l["data-last-month-day"]=r.BLOCK_END,l["data-within-range"]=_,_&&(l["data-range-end"]=r.RANGE_END,l["data-range-start"]=r.RANGE_START,l["data-selection-end"]=r.SELECTION_END,l["data-selection-start"]=r.SELECTION_START,l["data-within-selection"]=r.WITHIN_SELECTION,l["aria-selected"]=`${!!(r.SELECTION_END||r.SELECTION_START||r.WITHIN_SELECTION)}`),s===+e.cursor&&(l.ref=c)}const h=Cy(l,t),{children:d,className:f,...m}=h.props||$,y=Ao(h.className,Zd,f);return a("td",{...m,...l,className:y,children:(!o||u)&&(()=>{const{children:_,className:T,...g}=h.childProps||$,E=Ao(h.childClassName,Xd,T);return a("time",{...g,className:E,dateTime:n,children:i})})()})}),vy=Ie(Ry,To({block:To.exclude,flags:e=>+e})),Qd="adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week",Jd="adyen-pe-calendar__day-of-week",Oy=(e=$,t)=>{const n=qd.unwrapped({childClassName:_t.mutable(Jd),childProps:{children:_t.restricted(),className:""},className:_t.mutable(Qd),props:{...e,children:_t.restricted(),className:""}},!0);return t==null||t(ac.DAY_OF_WEEK,n),n},by=({prepare:e,flags:t,labels:{long:n,short:r}})=>{const s={"aria-label":n,"data-first-week-day":t.LINE_START,"data-last-week-day":t.LINE_END,"data-weekend":t.WEEKEND,scope:"col"},i=Oy(s,e),{children:o,className:c,...u}=i.props||$,l=Ao(i.className,Qd,c),{children:h,className:d,...f}=i.childProps||$,m=Ao(i.childClassName,Jd,d);return a("th",{...u,ref:u.ref,...s,className:l,children:a("abbr",{...f,className:m,children:r})})},Iy=Ie(by,To({block:To.exclude,flags:e=>+e})),Dy=Gr(({cursorRootProps:e,onlyCellsWithin:t,prepare:n,grid:r},s)=>a("ol",{className:"adyen-pe-calendar",role:"none",...e,children:r.map(i=>a("li",{className:"adyen-pe-calendar__month",role:"none",children:[a("div",{className:"adyen-pe-calendar__month-name",role:"none",children:a("time",{dateTime:i.datetime,"aria-hidden":"true",children:i.label})}),a("table",{role:"grid","aria-multiselectable":!0,"aria-label":`${i.label} calendar`,className:"adyen-pe-calendar__grid",style:{"--adyen-pe-calendar-rowspan":r.rowspan},children:[a("thead",{children:a("tr",{className:"adyen-pe-calendar__row",children:r.weekdays.map((o,c)=>a(Iy,{grid:r,block:i,prepare:n,cell:c,...o},o.labels.long))})}),a("tbody",{children:i.map((o,c)=>a("tr",{className:"adyen-pe-calendar__row",children:o.map((u,l)=>a(vy,{ref:s,grid:r,block:i,prepare:n,cell:l,onlyCellsWithin:t,row:c,...u},`${i.month}:${u.timestamp}`))},`${i.month}:${c}`))})]})]},i.datetime))})),ky=Ie(Dy),ms=864e5,Ly=["narrow","short","long"],e0=[0,1,6],lr=[1,2,3,4,6,12],Sl=42,wy=[0,1],cc=Symbol(),lc=Symbol(),uc=Symbol(),Cl=[uc,lc,cc],Cn=Symbol(),or=Symbol(),ir=Symbol(),Py=[or,ir,Cn],t0=Symbol(),n0=Symbol(),r0=Symbol(),s0=Symbol(),o0=Symbol(),i0=Symbol(),a0=Symbol(),c0=Symbol(),l0=Symbol(),u0=Symbol(),dc=Symbol(),hc=Symbol(),d0=Symbol(),Rl=Symbol(),Ve=Symbol(),vl=Symbol(),dt=Symbol(),h0=Symbol(),so=Symbol(),oo=Symbol(),Ol=(e,t)=>{if(t>=e)return e;let n=Math.max(1,lr.indexOf(e));for(;--n&&t<lr[n];);return lr[n]},My=e=>lr[Math.max(lr.indexOf(e),0)],bl=(e=0)=>Object.freeze(wy.map(t=>Ms(6-e+t,7)));var As,ot,it,_r,yr;class Il{constructor(...t){w(this,As,1/0);w(this,ot,1/0);w(this,it,-1/0);w(this,_r,0);w(this,yr,0);if(t.length>=3){let n=new Date(t[1]).getTime();if(typeof t[2]!="symbol")O(this,it,n||p(this,it)),O(this,ot,new Date(t[2]).getTime()||p(this,ot)),p(this,ot)<p(this,it)&&([En(this,ot)._,En(this,it)._]=[p(this,it),p(this,ot)]),O(this,yr,sr(p(this,it),t[0])),O(this,_r,sr(p(this,ot),t[0])),O(this,As,Ki(p(this,it),p(this,ot),t[0])+1);else if(!isNaN(n))switch(t[2]){case hc:O(this,ot,n),O(this,_r,sr(p(this,ot),t[0]));break;case dc:default:O(this,it,n),O(this,yr,sr(p(this,it),t[0]));break}}}get numberOfMonths(){return p(this,As)}get endTimestamp(){return p(this,ot)}get endTimestampOffset(){return p(this,_r)}get startTimestamp(){return p(this,it)}get startTimestampOffset(){return p(this,yr)}}As=new WeakMap,ot=new WeakMap,it=new WeakMap,_r=new WeakMap,yr=new WeakMap;const ri=(...e)=>{let t=tn().tz.current,n=new Il(t,...e);return J({from:ue(()=>n.startTimestamp,!1),to:ue(()=>n.endTimestamp,!1),offsets:{value:J({from:ue(()=>n.startTimestampOffset,!1),to:ue(()=>n.endTimestampOffset,!1)})},span:ue(()=>n.numberOfMonths,!1),timezone:{...ue(()=>t,!1),set:r=>{const s=t;t=tn(r??void 0).tz.current,t!==s&&(n=new Il(t,...e))}}})},ss=ri(),Fy=()=>ri(Date.now(),dc),xy=()=>ri(Date.now(),hc),f0=(...e)=>e.length===0?ss:ri(...e);var Le=(e=>(e[e.CURRENT=1]="CURRENT",e[e.CURSOR=2]="CURSOR",e[e.WEEKEND=4]="WEEKEND",e[e.LINE_START=8]="LINE_START",e[e.LINE_END=16]="LINE_END",e[e.WITHIN_BLOCK=32]="WITHIN_BLOCK",e[e.BLOCK_START=64]="BLOCK_START",e[e.BLOCK_END=128]="BLOCK_END",e[e.WITHIN_RANGE=256]="WITHIN_RANGE",e[e.RANGE_START=512]="RANGE_START",e[e.RANGE_END=1024]="RANGE_END",e[e.WITHIN_SELECTION=2048]="WITHIN_SELECTION",e[e.SELECTION_START=4096]="SELECTION_START",e[e.SELECTION_END=8192]="SELECTION_END",e[e.ALL=16383]="ALL",e))(Le||{}),Qn=(e=>(e[e.PREV=1]="PREV",e[e.BLOCK=0]="BLOCK",e[e.FRAME=2]="FRAME",e[e.PERIOD=4]="PERIOD",e))(Qn||{}),Vi=(e=>(e[e.PREV_PERIOD=5]="PREV_PERIOD",e[e.PREV_FRAME=3]="PREV_FRAME",e[e.PREV=1]="PREV",e[e.NEXT=0]="NEXT",e[e.NEXT_FRAME=2]="NEXT_FRAME",e[e.NEXT_PERIOD=4]="NEXT_PERIOD",e))(Vi||{});const m0=(()=>{const e={},t=Object.keys(Le).filter(r=>isNaN(+r)),n=r=>r!=="ALL"&>(r)&&t.includes(r);return r=>{const s=r&Le.ALL;return e[s]||(e[s]=new Proxy(J({valueOf:{value:()=>s}}),Go({get:(i,o)=>{switch(o){case"valueOf":return i.valueOf;case Symbol.toStringTag:return"_";default:if(!n(o))return}return s&Le[o]?1:void 0}}))),e[s]}})(),By=e=>(t,n,r)=>{if(gt(n)){const s=+n;if(s>=0&&s<t.length)return e(s)}return Reflect.get(t,n,r)},Dl=function*(e=Uo,t){for(let n=0;n<this.length;n++)yield e.call(t,this[n],n,this)},$y=Object.freeze(J({[Symbol.iterator]:{value(){return Dl.call(this)}},map:{value(e,t){return[...Dl.call(this,e,t)]}}})),Qt=(e,t)=>Q(e)?Qt({length:{get:e}},t):$r(e)?Qt({length:{value:e}},t):new Proxy(Ur($y,e),{get:By(t),set:bi}),vo=(()=>{const e=new Map,t=$s(),n=(r=Date.now())=>{const s=new Date(Zt(t,r)),i=Ft(t,s.setHours(0,0,0,0)),o=Ft(t,s.setDate(s.getDate()+1));return[i,o-i]};return r=>{t.tz=r;const s=t.tz.current;return e.get(s)??(()=>{let i=null,o=null,c=null;const u=()=>(t.tz=s,i??n()[0]),l=(_=Date.now())=>{t.tz=s,[i,o]=n(_)},{cancelSubscriptions:h,requestNotification:d,subscribe:f,on:m}=Bs({timestamp:u});m.resume=()=>{c=ca.subscribe(_=>{if(Yn(_))return;const{now:T}=_;if(fo(i)||fo(o))return l(T);T-i<o||(l(T),d())})},m.idle=()=>{c==null||c(),i=o=c=null};const y=J({cancelSubscriptions:H(h),timestamp:ue(u),timezone:H(s),subscribe:H(f)});return e.set(s,y),y})()}})();var gr,qe,Es,Ns,Ss,Cs,Et,at,Yt,Tr,Ar,Er,In,jt,Rs,$e,Pe,Me,Nr,zt,Dn,Sr,Nt,vs,Os,ln,Kt,bs,Is,Io,Do,le,p0,_0,Jn,y0,st,Qr,Zi;const ar=class ar{constructor(){w(this,le);w(this,qe,0);w(this,Es);w(this,Ns);w(this,Ss,-1);w(this,Cs,-1);w(this,Et);w(this,at);w(this,Yt);w(this,Tr,!1);w(this,Ar);w(this,Er,0);w(this,In,[]);w(this,jt,p(ar,gr));w(this,Rs,12);w(this,$e);w(this,Pe);w(this,Me,1);w(this,Nr);w(this,zt);w(this,Dn);w(this,Sr,vo());w(this,Nt);w(this,vs,-1/0);w(this,Os,1/0);w(this,ln,-1/0);w(this,Kt,1/0);w(this,bs,1/0);w(this,Is,0);B(this,"daysInWeek",0);B(this,"origin");B(this,"originTimestamp");w(this,Io,Qt(()=>this.daysInWeek,this.getDayOfWeekAtIndex.bind(this)));w(this,Do,Qt(()=>p(this,Me),W(this,le,y0).bind(this)))}get fromTimestamp(){return p(this,vs)}get toTimestamp(){return p(this,Os)}get numberOfBlocks(){return p(this,bs)}get blankSelection(){return p(this,$e)===p(this,Pe)&&Z(p(this,Pe))}get cursor(){return p(this,Et)??-1}get daysOfWeek(){return p(this,Io)}get dynamicBlockHeight(){return p(this,Tr)}set dynamicBlockHeight(t){Ne(t)?O(this,Tr,!!t):Oi(t)&&O(this,Tr,t)}set effect(t){Ne(t)?O(this,Ar,void 0):Q(t)&&O(this,Ar,t)}get firstWeekDay(){return p(this,Er)}set firstWeekDay(t){if(Ne(t))this.firstWeekDay=0;else if(!e0.includes(t)||p(this,Er)===O(this,Er,t))return}get frameBlocks(){return p(this,Do)}get isAtEnd(){return!Mn(p(this,Kt))&&p(this,Kt)===p(this,Me)-1}get isAtStart(){return!Mn(p(this,ln))&&p(this,ln)===0}get locale(){return p(this,jt)}set locale(t){const n=p(this,jt);if(Ne(t))O(this,jt,p(ar,gr));else if(typeof Intl<"u")try{O(this,jt,new Intl.Locale(t).toString())}catch{O(this,jt,p(ar,gr))}p(this,jt)!==n&&this.refreshFrame(!0)}get selectionStart(){return p(this,$e)}get selectionEnd(){return p(this,Pe)}get size(){return p(this,Me)}set size(t){const n=Math.min(!Ne(t)&&My(t)||1,p(this,Rs));p(this,Me)!==O(this,Me,n)&&(W(this,le,Zi).call(this),this.refreshFrame())}get timeslice(){return p(this,zt)}set timeslice(t){if(t===p(this,Nr)||Ne(t)&&p(this,Nr)===ss)return;const{from:n,to:r,timezone:s}=O(this,Nr,t??ss);O(this,zt,f0(n,r)),this.timezone=s}get timezone(){return p(this,Dn)}set timezone(t){p(this,zt).timezone=t,O(this,Dn,p(this,zt).timezone),O(this,Sr,vo(p(this,Dn))),p(this,Nt)&&(p(this,Nt).call(this),O(this,Nt,p(this,Sr).subscribe(this.refreshFrame.bind(this,!0)))),W(this,le,p0).call(this)}set trackCurrentDay(t){Oi(t)?t&&!p(this,Nt)?O(this,Nt,p(this,Sr).subscribe(this.refreshFrame.bind(this,!0))):!t&&p(this,Nt)&&(p(this,Nt).call(this),O(this,Nt,void 0)):Ne(t)&&(this.trackCurrentDay=!1)}get units(){return p(this,Is)}initialize(){this.timeslice=ss}refreshFrame(t=!1){var n;if(p(this,In).length=0,!(Z(p(this,at))||t)){const r=this.getFrameBlockAtIndex(p(this,qe)),{from:s,to:i}=r.inner,[o]=W(this,le,Jn).call(this,this.getTimestampAtIndex(s+p(this,at)),!1);O(this,at,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(s),o));const c=s+p(this,at),u=vt(s,c,i);if(u>c)return O(this,at,this.getUnitsForFrameBlockAtIndex(--En(this,qe)._)+c-u),p(this,qe)>=0?this.refreshFrame():(O(this,qe,p(this,Me)-1),this.shiftFrameByOffset(-1,so));if(u<c)return O(this,at,c-u-1),++En(this,qe)._<p(this,Me)?this.refreshFrame():(O(this,qe,0),this.shiftFrameByOffset(1,so));O(this,Es,s),O(this,Ns,i),O(this,Yt,W(this,le,Jn).call(this,this.getTimestampAtIndex(c),!1)[0]),O(this,at,this.getCursorBlockOriginTimestampOffset(p(this,Yt))),O(this,Et,s+p(this,at));const l=p(this,qe)>0?this.getFrameBlockAtIndex(0):r,h=p(this,qe)<p(this,Me)-1?this.getFrameBlockAtIndex(p(this,Me)-1):r;O(this,Ss,l.inner.from),O(this,Cs,h.inner.to),O(this,Is,h.outer.to+1)}this.withCurrentDayTimestamp(),(n=p(this,Ar))==null||n.call(this)}shiftFrameByOffset(t,n){if(t&&os(t))switch(n){case h0:return W(this,le,Qr).call(this,t);case oo:return W(this,le,Qr).call(this,t*12);case so:default:return W(this,le,Qr).call(this,t*p(this,Me))}}shiftFrameCursor(t){switch(t){case t0:return W(this,le,st).call(this,-1);case o0:return W(this,le,st).call(this,1);case u0:return W(this,le,st).call(this,-this.rowspan);case s0:return W(this,le,st).call(this,this.rowspan);case r0:return W(this,le,st).call(this,p(this,Es)-p(this,Et));case n0:return W(this,le,st).call(this,p(this,Ns)-p(this,Et));case a0:return W(this,le,st).call(this,-(p(this,Et)%this.rowspan));case i0:return W(this,le,st).call(this,this.rowspan-(p(this,Et)%this.rowspan+1));case l0:return W(this,le,st).call(this,-this.getUnitsForFrameBlockAtIndex((p(this,qe)??0)-1));case c0:return W(this,le,st).call(this,this.getUnitsForFrameBlockAtIndex(p(this,qe)??0))}if(!(t<0)&&t>=p(this,Ss)&&t<=p(this,Cs))return W(this,le,st).call(this,t-p(this,Et))}shiftFrameToTimestamp(t){O(this,Yt,this.originTimestamp=W(this,le,Jn).call(this,t,!1).reduce((n,r)=>n+r)),O(this,at,this.getCursorBlockOriginTimestampOffset(p(this,Yt))),this.reoriginate(),[En(this,ln)._,En(this,Kt)._]=this.getEdgeBlockOffsetsFromOrigin(),W(this,le,Zi).call(this),this.refreshFrame(),W(this,le,st).call(this,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(p(this,Et)),p(this,Yt)))}clearSelection(){this.blankSelection||(O(this,$e,O(this,Pe,void 0)),this.refreshFrame(!0))}updateSelection(t,n){const r=p(this,$e),s=p(this,Pe),i=W(this,le,Jn).call(this,t,!1).reduce((o,c)=>o+c);switch(n===Rl&&(i<=r?n=dt:i>=s&&(n=Ve)),n){case Ve:O(this,$e,i),O(this,Pe,Math.max(p(this,$e),s??i));break;case dt:O(this,Pe,i),O(this,$e,Math.min(r??i,p(this,Pe)));break;case Rl:case vl:{let o=Math.abs(i-(r??i)),c=Math.abs(i-(s??i));n===vl&&([o,c]=[c,o]),o>c?O(this,$e,i):O(this,Pe,i);break}case d0:default:O(this,$e,O(this,Pe,i));break}(p(this,$e)!==r||p(this,Pe)!==s)&&this.refreshFrame(!0)}};gr=new WeakMap,qe=new WeakMap,Es=new WeakMap,Ns=new WeakMap,Ss=new WeakMap,Cs=new WeakMap,Et=new WeakMap,at=new WeakMap,Yt=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,Er=new WeakMap,In=new WeakMap,jt=new WeakMap,Rs=new WeakMap,$e=new WeakMap,Pe=new WeakMap,Me=new WeakMap,Nr=new WeakMap,zt=new WeakMap,Dn=new WeakMap,Sr=new WeakMap,Nt=new WeakMap,vs=new WeakMap,Os=new WeakMap,ln=new WeakMap,Kt=new WeakMap,bs=new WeakMap,Is=new WeakMap,Io=new WeakMap,Do=new WeakMap,le=new WeakSet,p0=function(){const{from:t,to:n,span:r,offsets:s}=p(this,zt);O(this,vs,t-s.from),O(this,Os,n-s.to),O(this,bs,r);const i=Z(p(this,$e))?p(this,$e):Math.max(p(this,$e),t),o=Z(p(this,Pe))?p(this,Pe):Math.min(p(this,Pe),n);i===p(this,$e)||o===p(this,Pe)?(O(this,$e,i),O(this,Pe,o)):O(this,$e,O(this,Pe,void 0)),this.reslice(),O(this,Rs,Ol(12,this.numberOfBlocks)),O(this,Me,Ol(p(this,Me),this.numberOfBlocks)),this.shiftFrameToTimestamp(p(this,Yt))},_0=function(t){return vt(p(this,ln),t||0,p(this,Kt)-p(this,Me)+1)},Jn=function(t,n=!0){let r=new Date(t).getTime();if(isNaN(r))return W(this,le,Jn).call(this,Date.now());const{from:s,to:i}=p(this,zt),o=vt(s,r,i);o!==r&&n?(r=eu(s,i),(isNaN(r)||Mn(r))&&(r=o)):r=o;const c=sr(r,p(this,Dn));return[r-c,c]},y0=function(t){if(os(t)&&t>=0&&t<p(this,Me)){if(!p(this,In)[t]){const n=this.getFrameBlockAtIndex(t);if(!n)return;const[r,s]=this.getFormattedDataForFrameBlock(n[n.inner.from][0]+ms/2),i=n.outer.from;p(this,In)[t]=Qt({datetime:H(s),label:H(r),length:H(Math.ceil(n.outer.units/this.rowspan)),month:H(n.month),year:H(n.year)},o=>{const c=o*this.rowspan;return Qt(this.rowspan,u=>{const[l,h]=n[u+c],[d,f]=this.getFormattedDataForBlockCell(l+ms/2);return J({datetime:H(f),flags:H(m0(h)),index:H(i+u+c),label:H(d),timestamp:H(l)})})})}return p(this,In)[t]}},st=function(t){t!==0&&(O(this,at,p(this,at)+t),this.refreshFrame())},Qr=function(t){const n=W(this,le,_0).call(this,t);n&&(this.shiftOrigin(n),O(this,ln,p(this,ln)-n),O(this,Kt,p(this,Kt)-n),O(this,qe,Ms(p(this,qe)-n,p(this,Me))),this.refreshFrame())},Zi=function(){const t=p(this,Me)-1,n=Math.min(t-this.origin%p(this,Me),p(this,Kt))-t;n&&W(this,le,Qr).call(this,n)},w(ar,gr,jo);let qi=ar;var kn,Ln,Cr,Ds,Rr,vr,ks,Or,Ls,br,Ir,Dr,He,Xi,Qi,er,io;class Uy extends qi{constructor(){super();w(this,He);w(this,kn,7);w(this,Ln,[]);w(this,Cr,bl(this.firstWeekDay));w(this,Ds);w(this,Rr,-1/0);w(this,vr,1/0);w(this,ks,1/0);w(this,Or);w(this,Ls);w(this,br);w(this,Ir);w(this,Dr);B(this,"daysInWeek",p(this,kn));this.initialize()}get fromTimestamp(){return p(this,Rr)}get toTimestamp(){return p(this,vr)}get numberOfBlocks(){return p(this,ks)}get currentDayTimestamp(){return p(this,Ds)}get dynamicBlockHeight(){return super.dynamicBlockHeight}set dynamicBlockHeight(n){const r=this.dynamicBlockHeight;super.dynamicBlockHeight=n,this.dynamicBlockHeight!==r&&this.refreshFrame(!0)}get rowspan(){return p(this,kn)}get firstWeekDay(){return super.firstWeekDay}set firstWeekDay(n){const r=this.firstWeekDay;super.firstWeekDay=n,this.firstWeekDay!==r&&(p(this,Ln).length=0,O(this,Cr,bl(this.firstWeekDay)),this.reoriginate(),this.refreshFrame())}getCursorBlockOriginTimestampOffset(n){return an(n,this.timezone)[2]-1}getDayOfWeekAtIndex(n){if(!p(this,Ln)[n]){const r=new Date(this.getTimestampAtIndex(n));let s=0;p(this,Cr).includes(n)&&(s|=Le.WEEKEND),n===0?s|=Le.LINE_START:n===6&&(s|=Le.LINE_END);const i={};for(const o of Ly)i[o]=H(r.toLocaleDateString(this.locale,{weekday:o,timeZone:this.timezone}));p(this,Ln)[n]=J({flags:H(m0(s)),labels:H(J(i))})}return p(this,Ln)[n]}getEdgeBlockOffsetsFromOrigin(){return[W(this,He,Xi).call(this,p(this,Rr)),W(this,He,Xi).call(this,p(this,vr))]}getFormattedDataForBlockCell(n){const[r,s,i]=an(n,this.timezone);return[Number(i).toLocaleString(this.locale),`${r}-${`${s+1}`.padStart(2,"0")}-${`${i}`.padStart(2,"0")}`]}getFormattedDataForFrameBlock(n){const[r,s]=an(n,this.timezone);return[new Date(n).toLocaleDateString(this.locale,{month:"long",year:"numeric",timeZone:this.timezone}),`${r}-${`${s+1}`.padStart(2,"0")}`]}getFrameBlockAtIndex(n){const[r,s,i]=gi(this.origin,p(this,br),n),o=n>0?this.getFrameBlockAtIndex(n-1).inner.to+1:p(this,Or),c=o+r-1,u=Math.floor(o/7)*7,l=this.dynamicBlockHeight?Math.ceil((c+1)/7)*7:u+Sl,h=this.dynamicBlockHeight?l-u:Sl,d=new Proxy(J(),Go({get:(f,m,y)=>{if(gt(m)){const _=+m;if(os(_)&&_>=0&&_<h){const T=u+_,g=this.getTimestampAtIndex(T),E=T%p(this,kn);let b=g===this.currentDayTimestamp?Le.CURRENT:0;return T===this.cursor&&(b|=Le.CURSOR),p(this,Cr).includes(E)&&(b|=Le.WEEKEND),E===0?b|=Le.LINE_START:E===p(this,kn)-1&&(b|=Le.LINE_END),T>=o&&T<=c&&(T===o?b|=Le.BLOCK_START:T===c&&(b|=Le.BLOCK_END),b|=Le.WITHIN_BLOCK),g>=this.fromTimestamp&&g<=this.toTimestamp&&(g===this.fromTimestamp&&(b|=Le.RANGE_START),g===this.toTimestamp&&(b|=Le.RANGE_END),b|=Le.WITHIN_RANGE),g>=p(this,Ir)&&g<=p(this,Dr)&&(g===p(this,Ir)&&(b|=Le.SELECTION_START),g===p(this,Dr)&&(b|=Le.SELECTION_END),b|=Le.WITHIN_SELECTION),[g,b]}}return Reflect.get(f,m,y)}}));return Ur(d,{inner:{value:J({from:{value:o},to:{value:c},units:{value:r}})},month:{value:s},outer:{value:J({from:{value:u},to:{value:l-1},units:{value:h}})},year:{value:i}})}getUnitsForFrameBlockAtIndex(n){return gi(this.origin,p(this,br),n)[0]}getUnitsOffsetForTimestamp(n,r){return Math.round((r-n)/ms)}reoriginate(){this.originTimestamp=jd(this.originTimestamp,this.timezone);const[n,r]=an(this.originTimestamp,this.timezone),s=zd(this.originTimestamp,this.timezone,this.firstWeekDay);this.origin=r,O(this,br,n),O(this,Or,this.getUnitsOffsetForTimestamp(s,this.originTimestamp)),O(this,Ls,W(this,He,Qi).call(this,this.originTimestamp,-p(this,Or)))}reslice(){W(this,He,io).call(this),O(this,Rr,W(this,He,er).call(this,super.fromTimestamp)),O(this,vr,W(this,He,er).call(this,super.toTimestamp)),O(this,ks,Ki(super.fromTimestamp,super.toTimestamp,this.timezone)+1)}shiftOrigin(n){const[r,s]=an(this.originTimestamp,this.timezone),[,i,o]=gi(s,r,n),c=tn(this.timezone),u=new Date(Zt(c,this.originTimestamp)).setFullYear(o,i);this.originTimestamp=Ft(c,u),this.reoriginate()}clearSelection(){super.clearSelection(),W(this,He,io).call(this),this.refreshFrame(!0)}getTimestampAtIndex(n){return W(this,He,Qi).call(this,p(this,Ls),n)}updateSelection(n,r){super.updateSelection(n,r),W(this,He,io).call(this),this.refreshFrame(!0)}withCurrentDayTimestamp(){O(this,Ds,W(this,He,er).call(this,Date.now()))}}kn=new WeakMap,Ln=new WeakMap,Cr=new WeakMap,Ds=new WeakMap,Rr=new WeakMap,vr=new WeakMap,ks=new WeakMap,Or=new WeakMap,Ls=new WeakMap,br=new WeakMap,Ir=new WeakMap,Dr=new WeakMap,He=new WeakSet,Xi=function(n){const r=Ki(n,this.originTimestamp,this.timezone);return n<this.originTimestamp?0-r:r},Qi=function(n,r=0){const s=tn(this.timezone),i=Zt(s,n),o=Ft(s,i+r*ms);let[,,,c,u]=an(o,this.timezone),l=0;return(c>0||u>0)&&(c=(c>12?24:0)-c,u=(c>1?1:-1)*u,l=c*36e5+u*6e4),o+l},er=function(n){return Z(n)||Mn(n)?n:n-sr(n,this.timezone)},io=function(){O(this,Ir,W(this,He,er).call(this,this.selectionStart)),O(this,Dr,W(this,He,er).call(this,this.selectionEnd))};const kl=Symbol("<<NO_EXCEPTION>>"),Ll=e=>{const t=[];return J({bind:H(r=>function(...s){let i=kl;try{return t.push(r),r.call(this,...s)}catch(o){throw i=o}finally{t.pop(),t.length===0&&i===kl&&e()}}),effect:H(e)})};var Xl,Ql,Ae,St,L,Ct,ht,Rt,Ye,wn,ct,kr,Vt,qt,ft,Lt,Lr,ws,un,mt,ko,dn,wr,Pn,Ps,Lo,ye,wo,Po,Mo,Fo,xo,Bo,yt,g0,T0,A0,$o,ao,X,Jr,Ji,E0,N0,S0,C0,ea,R0,es,ta,co,na,ra,sa,oa;let Wy=(ye=class{constructor(){w(this,X);B(this,"grid");B(this,"kill");w(this,Ae,$);w(this,St,!1);w(this,L);w(this,Ct);w(this,ht);w(this,Rt,!1);w(this,Ye,or);w(this,wn,!1);w(this,ct);w(this,kr,(Xl=p(this,ct))==null?void 0:Xl.join(" "));w(this,Vt);w(this,qt);w(this,ft);w(this,Lt);w(this,Lr);w(this,ws,vo());w(this,un,[]);w(this,mt);w(this,ko,new Proxy(Qt(()=>{var t;return((t=p(this,mt))==null?void 0:t.length)??0},W(this,X,ea).bind(this)),Go({get:(t,n,r)=>{var i,o;const s=((i=p(this,mt))==null?void 0:i.indexOf(n))??-1;return s>=0?(o=W(this,X,ea).call(this,s))==null?void 0:o[1]:Reflect.get(t,n,r)}})));w(this,dn,Bs({blocks:()=>{var t;return(t=p(this,L))==null?void 0:t.size},cells:()=>{var t;return(t=p(this,L))==null?void 0:t.units},controls:()=>zr(Cl,p(this,Ae).controls),cursor:()=>{var t;return(t=p(this,L))==null?void 0:t.cursor},from:()=>{var t;return(t=p(this,L))==null?void 0:t.selectionStart},highlight:()=>p(this,Ye),locale:()=>{var t;return(t=p(this,L))==null?void 0:t.locale},minified:()=>Zn(p(this,Ae).minified),origin:()=>{var t;return(t=p(this,L))==null?void 0:t.getTimestampAtIndex(0)},timezone:()=>{var t;return(t=p(this,L))==null?void 0:t.timezone},to:()=>{var t;return(t=p(this,L))==null?void 0:t.selectionEnd},today:()=>p(this,ws).timestamp}));w(this,wr,(Ql=p(this,dn))==null?void 0:Ql.snapshot);w(this,Pn,Ll(()=>{var t;return p(this,ft)&&((t=p(this,dn))==null?void 0:t.requestNotification())}));w(this,Ps,Ll(()=>{var t;return(t=p(this,ft))==null?void 0:t.call(p(this,X,Jr))}));w(this,Lo,Ur(Qt(()=>{var t;return((t=p(this,L))==null?void 0:t.size)??0},t=>{var n;return(n=p(this,L))==null?void 0:n.frameBlocks[t]}),{config:{value:Object.defineProperties(t=>(t&&W(this,X,N0).call(this,t),p(this,X,Jr)),{cursorIndex:{get:()=>p(this,Vt),set:t=>{p(this,St)||(Ne(t)?O(this,Vt,void 0):Q(t)&&O(this,Vt,t))}},shiftFactor:{get:()=>p(this,qt),set:t=>{p(this,St)||(Ne(t)?O(this,qt,void 0):Q(t)&&O(this,qt,t))}},watch:{get:()=>p(this,ft),set:t=>{var n,r,s,i,o;if(!p(this,St))if(Q(t)){if(O(this,ft,t),!p(this,Lt)){const c=(n=p(this,Pn))==null?void 0:n.bind(p(ye,$o).bind(this));c&&(O(this,Lt,(r=p(this,Pn))==null?void 0:r.bind(te)),O(this,Lr,(i=p(this,dn))==null?void 0:i.subscribe((s=p(this,Ps))==null?void 0:s.bind(c))),p(this,L)&&(p(this,L).effect=p(this,Lt)))}if(!p(this,wn))return;O(this,wn,!1),(o=p(this,Lt))==null||o.call(this)}else Ne(t)&&O(this,ft,void 0)}}})},controls:{value:p(this,ko)},cursor:{value:Object.defineProperties(t=>W(ye,yt,ao).call(this,n=>!!(n&&W(this,X,S0).call(this,n)))(t),{valueOf:{value:()=>{var t;return((t=p(this,L))==null?void 0:t.cursor)??-1}}})},highlight:{value:(()=>{const t=()=>p(this,Ct)===p(this,ht)&&Z(p(this,ht)),n=r=>s=>W(ye,yt,ao).call(this,i=>{var o,c,u,l,h;if(!(p(this,St)||!p(this,Ye)||p(this,Ye)===or)){if(Ne(i))return W(this,X,ta).call(this);t()?(c=p(this,L))==null||c.updateSelection(i,d0):((o=p(this,L))==null||o.updateSelection(i,r),p(this,Ye)===Cn&&p(this,ct)&&W(this,X,co).call(this,i,r===Ve?dt:Ve,p(this,ct))),O(this,Ct,(u=p(this,L))==null?void 0:u.selectionStart),O(this,ht,(l=p(this,L))==null?void 0:l.selectionEnd),(h=p(this,L))==null||h.shiftFrameToTimestamp(r===Ve?p(this,Ct):p(this,ht))}})(s);return J({blank:{get:t},from:{get:()=>{var r;return((r=p(this,L))==null?void 0:r.selectionStart)??p(this,Ct)},set:n(Ve)},to:{get:()=>{var r;return((r=p(this,L))==null?void 0:r.selectionEnd)??p(this,ht)},set:n(dt)}})})()},rowspan:{get:()=>{var t;return((t=p(this,L))==null?void 0:t.rowspan)??0}},weekdays:{get:()=>{var t;return((t=p(this,L))==null?void 0:t.daysOfWeek)??p(ye,Mo)}}}));this.grid=p(this,Lo),this.kill=W(this,X,C0).bind(this)}},Ae=new WeakMap,St=new WeakMap,L=new WeakMap,Ct=new WeakMap,ht=new WeakMap,Rt=new WeakMap,Ye=new WeakMap,wn=new WeakMap,ct=new WeakMap,kr=new WeakMap,Vt=new WeakMap,qt=new WeakMap,ft=new WeakMap,Lt=new WeakMap,Lr=new WeakMap,ws=new WeakMap,un=new WeakMap,mt=new WeakMap,ko=new WeakMap,dn=new WeakMap,wr=new WeakMap,Pn=new WeakMap,Ps=new WeakMap,Lo=new WeakMap,wo=new WeakMap,Po=new WeakMap,Mo=new WeakMap,Fo=new WeakMap,xo=new WeakMap,Bo=new WeakMap,yt=new WeakSet,g0=function(t){if(!gt(t)||!p(ye,wo).test(t))return;const n=t.split(/\s+/);return Array.from({length:6},(r,s)=>parseInt(n[s]??"0"))},T0=function(t){switch(t&~Qn.PREV){case Qn.FRAME:return so;case Qn.PERIOD:return oo;case Qn.BLOCK:default:return h0}},A0=function(t){return t&Qn.PREV?-1:1},$o=new WeakMap,ao=function(t){var n;return((n=p(this,Pn))==null?void 0:n.bind(t))??t},X=new WeakSet,Jr=function(){return{...p(this,Ae)}},Ji=function(){return new Uy},E0=function(t){return!!p(this,L)&&!(t>0?p(this,L).isAtEnd:p(this,L).isAtStart)},N0=function(t){var s,i;if(p(this,St))return;O(this,ct,void 0);const n=t==null?void 0:t.highlight,r=Zn(p(this,Ae).minified);if(gt(n)?O(this,ct,W(s=ye,yt,g0).call(s,n))&&O(this,Ye,Cn):O(this,Ye,zr(Py,n,p(this,Ye))),O(this,Ae,{...p(this,Ae),...t,blocks:zr(lr,t==null?void 0:t.blocks,p(this,Ae).blocks),controls:zr(Cl,t==null?void 0:t.controls,p(this,Ae).controls),firstWeekDay:zr(e0,t==null?void 0:t.firstWeekDay,p(this,Ae).firstWeekDay),fixedBlockHeight:Zn(t==null?void 0:t.fixedBlockHeight,p(this,Ae).fixedBlockHeight),highlight:p(this,Ye),minified:Zn(t==null?void 0:t.minified,p(this,Ae).minified),trackCurrentDay:Zn(t==null?void 0:t.trackCurrentDay,p(this,Ae).trackCurrentDay)}),!Q(p(this,ft))){p(this,L)?O(this,wn,!0):(O(this,L,p(this,X,Ji)),W(this,X,ra).call(this),W(this,X,oa).call(this),W(this,X,sa).call(this));return}(!p(this,L)||r!==p(this,Ae).minified)&&(O(this,L,p(this,X,Ji)),p(this,L).effect=p(this,Lt)),W(this,X,ra).call(this),(i=p(this,Lt))==null||i.call(this)},S0=function(t){if(t&&p(this,L)&&Q(p(this,ft))){if(t instanceof KeyboardEvent){switch(t.code){case q.ARROW_LEFT:p(this,L).shiftFrameCursor(t0);break;case q.ARROW_RIGHT:p(this,L).shiftFrameCursor(o0);break;case q.ARROW_UP:p(this,L).shiftFrameCursor(u0);break;case q.ARROW_DOWN:p(this,L).shiftFrameCursor(s0);break;case q.HOME:p(this,L).shiftFrameCursor(t.ctrlKey?r0:a0);break;case q.END:p(this,L).shiftFrameCursor(t.ctrlKey?n0:i0);break;case q.PAGE_UP:t.shiftKey?p(this,L).shiftFrameByOffset(-1,oo):p(this,L).shiftFrameCursor(l0);break;case q.PAGE_DOWN:t.shiftKey?p(this,L).shiftFrameByOffset(1,oo):p(this,L).shiftFrameCursor(c0);break;case q.SPACE:case q.ENTER:return W(this,X,es).call(this),!0;default:return}return p(this,Rt)&&W(this,X,es).call(this,$),!0}if(t instanceof MouseEvent&&p(ye,Po).includes(t.type)&&Q(p(this,Vt))){const n=p(this,Vt).call(p(this,X,Jr),t);if(!os(n))return;const r=t.type==="click";if(!(r||p(this,Rt)))return;if(p(this,L).shiftFrameCursor(n),p(this,L).cursor===n)return r?W(this,X,es).call(this):W(this,X,es).call(this,$),!0}}},C0=function(){var t;p(this,St)||((t=p(this,Lr))==null||t.call(this),O(this,Pn,O(this,Ps,O(this,Vt,O(this,L,O(this,Ye,O(this,kr,O(this,wr,O(this,ct,O(this,qt,O(this,Lr,O(this,dn,O(this,Lt,O(this,ft,void 0))))))))))))),O(this,Ae,$),O(this,Rt,O(this,wn,!1)),O(this,St,!0))},ea=function(t){var r,s;if(!p(this,mt)||t<0||t>=p(this,mt).length)return;const n=p(this,mt)[t];if(!p(this,un)[t]){const i=Vi[n],o=W(r=ye,yt,T0).call(r,i),c=W(s=ye,yt,A0).call(s,i);p(this,un)[t]=(...u)=>W(ye,yt,ao).call(this,(...l)=>{var f;const h=W(this,X,E0).call(this,c);if(!(h&&l.length))return h;const d=W(this,X,R0).call(this,n,l[0]);return Z(d)?!1:((f=p(this,L))==null||f.shiftFrameByOffset(c*d,o),!0)})(...u)}return[n,p(this,un)[t]]},R0=function(t,n){if(!(p(this,L)&&Q(p(this,ft))))return;if(n instanceof MouseEvent){if(n.type!=="click")return}else if(n instanceof KeyboardEvent){if(!p(ye,Fo).includes(n.code))return}else return;let r=1;if(Q(p(this,qt))){const s=Number(p(this,qt).call(p(this,X,Jr),n,t));r=Number.isInteger(s)&&s>=1?s:r}return r},es=function(t){if(p(this,St)||!p(this,L))return;switch(p(this,Ye)){case Cn:case ir:break;case or:default:return}const n=p(this,L).cursor,r=Math.max(p(this,L).getTimestampAtIndex(n),p(this,L).timeslice.from),s=Math.min(p(this,L).getTimestampAtIndex(n+1)-1,p(this,L).timeslice.to),i=p(this,ct);if(p(this,Ye)===ir||p(this,L).blankSelection||i)if(O(this,Rt,!(p(this,Ye)===ir||i)),p(this,Ye)===Cn&&i){const o=s>=p(this,L).selectionEnd?Ve:dt;o===Ve?p(this,L).updateSelection(s,dt):p(this,L).updateSelection(r,Ve),W(this,X,co).call(this,o===Ve?p(this,L).selectionEnd:p(this,L).selectionStart,o,i)}else p(this,L).updateSelection(r,Ve),p(this,L).updateSelection(s,dt);else{const o=t===$,c=tn(p(this,L).timezone);if(o||O(this,Rt,!1),r<=p(this,L).selectionStart){const u=new Date(Zt(c,p(this,L).selectionStart)),l=Math.min(Ft(c,u.setDate(u.getDate()+1)-1),p(this,L).timeslice.to);r===p(this,L).selectionStart&&s<=l&&p(this,L).updateSelection(s,dt),p(this,L).updateSelection(r,Ve)}else{const u=new Date(Zt(c,p(this,L).selectionEnd)),l=Math.max(Ft(c,u.setHours(0,0,0,0)),p(this,L).timeslice.from);r<=p(this,L).selectionEnd&&r>=l&&p(this,L).updateSelection(r,Ve),p(this,L).updateSelection(s,dt)}if(o)return}O(this,Ct,p(this,L).selectionStart),O(this,ht,p(this,L).selectionEnd)},ta=function(){var t;(t=p(this,L))==null||t.clearSelection(),O(this,Rt,!1),O(this,Ct,O(this,ht,void 0))},co=function(t,n,r){var m;if(!p(this,L))return;const s=tn((m=p(this,L))==null?void 0:m.timezone),i=new Date(Zt(s,t)),o=n===Ve?-1:1,[c=0,u=0,l=0,h=0,d=0,f=0]=r??[];i.setFullYear(i.getFullYear()+c*o,i.getMonth()+u*o,i.getDate()+l*o),i.setHours(i.getHours()+h*o,i.getMinutes()+d*o,i.getSeconds()+f*o),p(this,L).updateSelection(Ft(s,i.getTime()-o),n)},na=function(){var t,n;p(this,Ct)&&((t=p(this,L))==null||t.updateSelection(p(this,Ct),Ve)),p(this,ht)&&((n=p(this,L))==null||n.updateSelection(p(this,ht),dt)),O(this,Rt,!1)},ra=function(){p(this,L)&&(p(this,L).timeslice=p(this,Ae).timeslice,p(this,L).dynamicBlockHeight=!p(this,Ae).fixedBlockHeight,p(this,L).firstWeekDay=p(this,Ae).firstWeekDay,p(this,L).locale=p(this,Ae).locale,p(this,L).size=p(this,Ae).blocks,p(this,L).timezone=p(this,Ae).timezone,p(this,L).trackCurrentDay=p(this,Ae).trackCurrentDay,O(this,ws,vo(p(this,L).timezone)),W(this,X,na).call(this))},sa=function(){var t,n,r,s,i,o;switch(p(this,Ye)){case Cn:!Bt((t=p(this,L))==null?void 0:t.blankSelection)&&p(this,ct)&&W(this,X,co).call(this,(n=p(this,L))==null?void 0:n.selectionStart,dt,p(this,ct));break;case ir:if(!Bt((r=p(this,L))==null?void 0:r.blankSelection)){const c=tn((s=p(this,L))==null?void 0:s.timezone),u=new Date(Zt(c,(i=p(this,L))==null?void 0:i.selectionStart));(o=p(this,L))==null||o.updateSelection(Ft(c,u.setHours(23,59,59,999)),dt)}break;case or:default:W(this,X,ta).call(this);return}},oa=function(){var t,n;switch((t=p(this,dn))==null?void 0:t.snapshot.controls){case cc:O(this,mt,p(ye,xo));break;case lc:O(this,mt,p(ye,Bo));break;case uc:default:O(this,mt,void 0)}p(this,un).length=0,p(this,un).length=((n=p(this,mt))==null?void 0:n.length)??0},w(ye,yt),w(ye,wo,/^(?:0|[1-9]\d*)(\s+(?:0|[1-9]\d*)?){0,5}?$/),w(ye,Po,["click","mouseover","pointerover"]),w(ye,Mo,Qt(0,te)),w(ye,Fo,[q.ENTER,q.SPACE]),w(ye,xo,Object.keys(Vi).filter(t=>isNaN(+t))),w(ye,Bo,["PREV","NEXT"]),w(ye,$o,function(t){var o,c;if(Yn(t))return;let n=!1,r=!1,s=!1;const i=(o=p(this,ct))==null?void 0:o.join(" ");for(const u of Object.keys(t))t[u]!==((c=p(this,wr))==null?void 0:c[u])&&(u==="controls"?n=!0:u==="highlight"?r=!0:(u==="from"||u==="to")&&(s=!0));p(this,kr)!==i&&(O(this,kr,i),r=!0),O(this,wr,t),p(this,Rt)&&!s&&W(this,X,na).call(this),n&&W(this,X,oa).call(this),r&&W(this,X,sa).call(this)}),ye);const Dt=Object.defineProperties(t=>{const{grid:n,kill:r}=new Wy;return $r(t)?n.config({blocks:t}):Q(t)?Pr.then(()=>{n.config.watch=t}):n.config(t),J({grid:H(n),kill:H(r)})},{controls:{value:J({ALL:{value:cc},MINIMAL:{value:lc},NONE:{value:uc}})},highlight:{value:J({ONE:{value:ir},MANY:{value:Cn},NONE:{value:or}})},slice:{value:Object.defineProperties(f0.bind(null),{FROM:{value:dc},TO:{value:hc},UNBOUNDED:{value:ss},SINCE_NOW:{get:Fy},UNTIL_NOW:{get:xy}})}}),Hy=({config:e,grid:{controls:t},renderer:n})=>e.controls===Dt.controls.NONE||!Q(n)?null:a(V,{children:t.map(([r,s])=>n(r,s))}),Gy=Ie(Hy),Yy=e=>{const t=C((n,r)=>{r instanceof Element&&r.setAttribute("tabindex","-1"),n instanceof Element&&(n.setAttribute("tabindex","0"),Pr.then(()=>n==null?void 0:n.focus()))},[]);return sn(C((n,r)=>{try{e==null||e(n,r)}finally{t(n,r)}},[e]))},jy=({blocks:e,controls:t,dynamicBlockRows:n,firstWeekDay:r,highlight:s,locale:i,onHighlight:o,originDate:c,renderControl:u,sinceDate:l,timezone:h,trackCurrentDay:d,untilDate:f,useYearView:m},y)=>{const{i18n:_}=U(),[T,g]=x(performance.now()),E=A(()=>Dt.slice(l,f),[l,f]),b=Y($),N=A(()=>t??(Q(u)?Dt.controls.MINIMAL:Dt.controls.NONE),[t,u]),D=A(()=>s??(Q(o)?Dt.highlight.ONE:Dt.highlight.NONE),[s,o]),{grid:S,kill:v}=A(()=>{const{grid:P,kill:z}=Dt(function(){g(performance.now()),b.current=this,!(j===P.highlight.from&&ie===P.highlight.to)&&(j=P.highlight.from,ie=P.highlight.to,o==null||o(j,ie))});let{from:j,to:ie}=P.highlight;return P.config.cursorIndex=K=>{let ce=K.target;for(;ce&&ce!==K.currentTarget;){const Te=Number(ce.dataset.cursorPosition);if(Number.isFinite(Te))return Te;ce=ce.parentNode}},P.config.shiftFactor=function(K){if(this.controls===Dt.controls.MINIMAL)return K!=null&&K.shiftKey?12:K!=null&&K.altKey?this.blocks:1},{grid:P,kill:z}},[]),R=A(()=>{const P=z=>{S.cursor(z)};return{onClickCapture:P,onMouseOverCapture:P,onPointerOverCapture:P,onKeyDownCapture:z=>{S.cursor(z)&&z.preventDefault()}}},[S]),F=Yy(C((P,z)=>{z instanceof Element&&z.removeAttribute("aria-selected"),P instanceof Element&&P.setAttribute("aria-selected","true")},[]));return M1(y,()=>{const{from:P,to:z}=(S==null?void 0:S.highlight)||$;return{clear:()=>{S!=null&&S.highlight&&(S.highlight.from=void 0)},get config(){return{...b.current??$}},get from(){return El(P)},set from(j){S!=null&&S.highlight&&j&&(S.highlight.from=j.getTime())},get to(){return El(z)},set to(j){S!=null&&S.highlight&&j&&(S.highlight.to=j.getTime())}}},[S,T]),G(()=>{S.config({blocks:e,controls:N,firstWeekDay:r,fixedBlockHeight:!n,highlight:D,locale:i??_.locale,minified:m,timeslice:E,timezone:h,trackCurrentDay:d})},[N,D,e,n,r,S,_,i,E,h,d,m]),G(()=>{const P=[].concat(c).slice(0,2).map(Number).filter(Boolean);return P[0]&&(S.highlight.from=+P[0]),P[1]&&(S.highlight.to=+P[1]),v},[]),{cursorElementRef:F,cursorRootProps:R,grid:S}},zy=Gr((e,t)=>{const n=jy(e,t),r=n.grid.config();return a("div",{role:"none",children:[a(Gy,{config:r,grid:n.grid,renderer:e.renderControl}),a(ky,{ref:n.cursorElementRef,config:r,cursorRootProps:n.cursorRootProps,grid:n.grid,onlyCellsWithin:e.onlyCellsWithin,prepare:e.prepare})]})}),Ky=Ie(zy),Vy=(e,t)=>{const[n,r]=x(),s=sn(A(()=>{const i=o=>(...c)=>{const u=e(o,...c);return u&&Zu(u,o)};return r(void 0),o=>r(o instanceof Element?()=>i(o):void 0)},[e,t]),t);return[n,s]},qy=e=>{const{i18n:t}=U();return Vy(C((n,r,s)=>{if(!(n instanceof HTMLElement))return null;if(Q(e))return e(r,s);let i,o,c;switch(r){case"PREV":i="prev",o="previous",c=Ea;break;case"NEXT":i=o="next",c=Xo;break;default:return null}const u=s();return u?a(he,{"aria-label":t.get(`calendar.${o}Month`),variant:se.TERTIARY,disabled:!u,classNameModifiers:["circle",i],iconButton:!0,onClick:s,children:a(c,{role:"presentation"})},r):null},[t,e]))},Zy=Gr((e,t)=>{const{i18n:n}=U(),[r,s]=qy(e.renderControl),[i,o]=x(performance.now()),c=A(()=>Bt(e.showTimezoneInfo),[e.showTimezoneInfo]),{clockTime:u,GMTOffset:l}=Q3({timezone:e.timezone,withClock:c}),h=A(()=>M([{"adyen-pe-datepicker--with-timezone":c},"adyen-pe-datepicker"]),[c]),d=A(()=>c?{values:{offset:l,time:u}}:$,[l,u,c]),f=sn(te,t),m=C(()=>{var y,_,T,g,E;o(performance.now()),(y=f.current)!=null&&y.from&&((_=f.current)!=null&&_.to)&&((E=e.onHighlight)==null||E.call(e,+((T=f.current)==null?void 0:T.from),+((g=f.current)==null?void 0:g.to)))},[o,e.onHighlight]);return a("div",{className:h,children:[a("div",{className:"adyen-pe-datepicker__selector-container",children:a(Sy,{now:e.now,calendarRef:f,onTimeRangeSelected:e.onPresetOptionSelected,options:e.timeRangePresetOptions,selectedOption:e.selectedPresetOption,timestamp:i,timezone:e.timezone})}),a("div",{ref:s,role:"group",className:"adyen-pe-datepicker__controls","aria-label":n.get("calendar.controls")}),a(Ky,{...e,ref:f,firstWeekDay:ic,dynamicBlockRows:!0,onlyCellsWithin:!0,controls:e.controls??Dt.controls.MINIMAL,highlight:e.highlight??Dt.highlight.MANY,onHighlight:m,renderControl:r,trackCurrentDay:!0}),c&&a("div",{className:"adyen-pe-datepicker__timezone",children:n.get("calendar.timezone",d)})]})}),Xy="adyen-pe-filter-button";function Qy(e,t){const{className:n,classNameModifiers:r=[],children:s,disabled:i,onClick:o,...c}=e,u=A(()=>Fn("",n)||"",[n]),l=A(()=>qo(i),[i]),{classes:h,click:d}=Zo(u,r,Xy,l,e,o);return a("button",{className:h,ref:t,onClick:d,...c,children:a(k,{el:ne.DIV,variant:I.BODY,stronger:!0,children:s})})}const Jy=Xe(Qy),eg=Gr(function(t,n){return a(Ro,{classNameModifiers:t.classNameModifiers,...t,ref:n,"aria-required":t.required,type:"text"})}),tg=e=>!e||Ii(e),ng=(()=>{const e=t=>{const{editAction:n,name:r,onChange:s,onValueUpdated:i}=t,[o,c]=x(t.value),u=C(l=>{const h=l.target.value.trim();c(h),i(h)},[i]);return G(()=>{if(n===je.CLEAR){const l="";c(l),i(l),s(l)}n===je.APPLY&&s(o??"")},[o,n,s,i]),a(eg,{name:r,value:o,onInput:u})};return t=>a(e,{...t})})(),rg=({render:e,...t})=>{var z;const n=be(Oe.down.xs),[r,s]=wt(!1),[i,o]=wt(!1),c=A(()=>t.isValueEmpty??tg,[t.isValueEmpty]),[u,l]=wt(c(t.value)),[h,d]=wt(!1),[f,m]=wt(!1),[y,_]=wt(c(t.value)),T=No(),g=A(()=>e??ng,[e]),E=C(j=>{const ie=c(j??void 0);l(ie),_(fo(j)),m(h?j!==t.value:!ie)},[c,l,_,m,h,t.value]),{commitAction:b,commitActionButtons:N,committing:D,resetCommitAction:S}=Nd({applyDisabled:y||!f,resetDisabled:u}),[v,R]=A(()=>{const j=ie=>()=>{ie!==r&&(ie&&(S(),m(!1),d(!1)),s(ie),o(ie))};return[j(!1),j(!0)]},[s,r,S,o,d,m]);G(()=>{if(i){const j=c(t.value);o(!1),l(j),d(!j)}},[t.value,i,c,o,l,d]),G(()=>{D&&v(),l(u)},[D,v,l,u]);const F=be(Oe.only.sm),P=be(Oe.only.md);return a(V,{children:[a("div",{className:`adyen-pe-filter adyen-pe-filter--${t.type}`,children:A(()=>a(Jy,{classNameModifiers:[...t.appliedFilterAmount?["with-counter"]:[],...t.classNameModifiers??[],...r?["active"]:[],...u?[]:["has-selection"]],onClick:r?v:R,tabIndex:0,ref:T,children:a("div",{className:"adyen-pe-filter-button__default-container",children:[a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,className:"adyen-pe-filter-button__label",children:t.label}),!!t.appliedFilterAmount&&a("div",{className:"adyen-pe-filter-button__counter-wrapper",children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,className:"adyen-pe-filter-button__counter",children:t.appliedFilterAmount})})]})}),[t.appliedFilterAmount,t.classNameModifiers,t.label,r,u,v,R,T])}),r&&a($a,{actions:N,title:(z=t.title)==null?void 0:z.trim(),variant:Ke.POPOVER,modifiers:["filter"],open:r,"aria-label":`${t.label}`,dismiss:v,dismissible:!1,withContentPadding:t.withContentPadding??!0,divider:!0,targetElement:T,disableFocusTrap:!1,position:ge.BOTTOM,containerSize:t.containerSize,showOverlay:n,fitPosition:F||P,children:g({...t,editAction:b,onValueUpdated:E})})]})},v0=Ie(rg);var ps=(e=>(e.FROM="from",e.TO="to",e))(ps||{});const sg={month:"short",day:"numeric",year:"numeric"},O0=(e,t,n,r)=>{const s=n&&t(n),i=r&&t(r);if(s&&i)return`${s} - ${i}`;if(s)return e.get("filter.date.since",{values:{date:s}});if(i)return e.get("filter.date.until",{values:{date:i}})},Pt=e=>{try{return new Date(e||"").toISOString()}catch{return""}},og=(()=>{const e=({editAction:t,from:n,to:r,now:s,onChange:i,onValueUpdated:o,showTimezoneInfo:c,selectedPresetOption:u,timeRangePresetOptions:l,timezone:h,sinceDate:d,untilDate:f})=>{const{i18n:m}=U(),{fullDateFormat:y}=rn(h),[_,T]=x(u),g=A(()=>[new Date(n),new Date(r)],[n,r]),E=Y(),b=C((N,D)=>{o(O0(m,y,Pt(N),Pt(D)))},[m,y,o]);return G(()=>{var N,D,S;switch(t){case je.APPLY:i({selectedPresetOption:_,[ps.FROM]:Pt((N=E.current)==null?void 0:N.from),[ps.TO]:Pt((D=E.current)==null?void 0:D.to)});break;case je.CLEAR:(S=E.current)==null||S.clear(),i()}},[t,i,_]),a(Zy,{ref:E,now:s,originDate:g,onHighlight:b,onPresetOptionSelected:T,selectedPresetOption:u,timeRangePresetOptions:l,timezone:h,showTimezoneInfo:c,sinceDate:Pt(d),untilDate:Pt(f)})};return t=>a(e,{...t})})(),ig=(e,t,n)=>e.formatRange(t,n);function ag({title:e,from:t,to:n,selectedPresetOption:r,...s}){const{i18n:i}=U(),{fullDateFormat:o}=rn(s.timezone),[c,u]=x(),[l,h]=x(),[d,f]=x(),m=C(g=>{const{from:E,to:b,selectedPresetOption:N}=g??$;try{u(c??N),h(Pt(l??E)),f(Pt(d??b))}finally{s.onChange({from:E,to:b,selectedPresetOption:N})}},[c,l,d,s]),y=A(()=>i.get("rangePreset.custom"),[i]),_=A(()=>{const g={...sg,timeZone:s.timezone};let E=new Intl.DateTimeFormat(jo,g);try{E=new Intl.DateTimeFormat(i.locale,g)}catch{}return E},[i,s.timezone]);G(()=>u(r),[r]),G(()=>h(Pt(t||Date.now())),[t]),G(()=>f(Pt(n||Date.now())),[n]);const T=A(()=>r===y&&l&&d?ig(_,new Date(l),new Date(d)):r??s.label,[y,_,l,d,r,s.label]);return a(v0,{...s,from:t,to:n,type:"date",label:T,onChange:m,render:og,selectedPresetOption:r,value:O0(i,o,t,n),withContentPadding:!1})}const fc=({timezone:e,canResetFilters:t,defaultParams:n,filters:r,nowTimestamp:s,refreshNowTimestamp:i,sinceDate:o,untilDate:c,updateFilters:u})=>{const{i18n:l}=U(),h=A(()=>l.get(n.current.defaultTimeRange),[l]),[d,f]=x(h),m=C((y=$)=>{for(const[_,T]of Object.entries(y)){switch(_){case"selectedPresetOption":f(T||h);break;case ps.FROM:u({[ee.CREATED_SINCE]:T||n.current.defaultFilterParams[ee.CREATED_SINCE]});break;case ps.TO:u({[ee.CREATED_UNTIL]:T||n.current.defaultFilterParams[ee.CREATED_UNTIL]});break;default:return}i()}},[h,i,u]);return A(()=>!t&&f(h),[t,h]),a(ag,{label:l.get("dateRange"),name:ee.CREATED_SINCE,sinceDate:o,untilDate:c??new Date(s).toString(),from:r[ee.CREATED_SINCE],to:r[ee.CREATED_UNTIL],selectedPresetOption:d,timeRangePresetOptions:n.current.timeRangeOptions,timezone:e,onChange:m,showTimezoneInfo:!0,now:s})};function cg(e){return"callback"in e}function b0(e){const[t,n]=x(null),r=C(o=>{var c;return o&&cg(e[o.selection.type])?{callback:(c=e==null?void 0:e[o.selection.type])!=null&&c.callback?u=>{var l,h;return(h=(l=e[o.selection.type])==null?void 0:l.callback)==null?void 0:h.call(l,{showModal:()=>n(o),...u})}:()=>{var u;return((u=e[o.selection.type])==null?void 0:u.showDetails)&&n(o)}}:(n(o),{})},[e]),s=C(()=>n(null),[]),i=A(()=>{const o={};for(const c in e){const u=e[c];o[c]=!(u!=null&&u.showDetails)||!!u.callback}return o},[e]);return{selectedDetail:t,updateDetails:r,detailsToShow:i,resetDetails:s}}const wl=Ie(({placeholder:e,selection:t,selectionOptions:n,updateSelection:r})=>{const s=be(Oe.down.xs),i=be(Oe.only.sm),o=be(Oe.only.md);return n&&n.length>1?a(Gs,{onChange:r,filterable:!1,multiSelect:!0,placeholder:e,selected:t,withoutCollapseIndicator:!0,items:n,showOverlay:s,fitPosition:o||i}):null}),lg=e=>Object.freeze(e.map(t=>({id:t,name:t}))),Ti=({filterParam:e,filterValues:t,filters:n,defaultFilters:r,updateFilters:s})=>{const i=A(()=>Vr((n==null?void 0:n[e])??(r==null?void 0:r[e])??""),[r,n,e]),o=A(()=>t&&lg(t),[t]),c=C(({target:u})=>{s==null||s({[e]:(u==null?void 0:u.value)||""})},[s,e]);return{selection:i,selectionOptions:o,updateSelection:c}},ug=[ee.CURRENCIES,ee.CATEGORIES,ee.STATUSES],lo=Object.freeze(Object.fromEntries(ug.map(e=>[e,""]))),dg=["ATM","Capital","Chargeback","Correction","Fee","Payment","Refund","Transfer","Other"],hg=["Booked","Pending","Reversed"],fg=e=>{const t=Ey(),n="rangePreset.last30Days",{from:r,to:s}=t[n];return{defaultFilterParams:{...e==="transactions"&&{...lo,[ee.MIN_AMOUNT]:void 0,[ee.MAX_AMOUNT]:void 0},[ee.BALANCE_ACCOUNT]:void 0,[ee.CREATED_SINCE]:new Date(r).toISOString(),[ee.CREATED_UNTIL]:new Date(s).toISOString()},defaultTimeRange:n,timeRangeOptions:t}},mc=(e,t)=>{const[n,r]=x(Date.now()),s=fg(e),i=Y(s),o=C(()=>r(Date.now()),[r]);return G(()=>{o()},[t,o]),{defaultParams:i,nowTimestamp:n,refreshNowTimestamp:o}},mg="adyen-pe-data-overview-header",pg=({baseClassName:e=mg,children:t,hideTitle:n,titleKey:r,descriptionKey:s})=>{const{i18n:i}=U();return a("header",{className:e,children:[a("div",{className:`${e}__headings`,children:[!n&&r&&a("div",{className:`${e}__title`,children:a(k,{el:ne.SPAN,variant:I.TITLE,medium:!0,children:i.get(r)})}),s&&a("p",{className:`${e}__description`,children:a(k,{el:ne.SPAN,variant:I.BODY,children:i.get(s)})})]}),t&&a("div",{className:`${e}__controls`,children:t})]})},_g={base:"adyen-pe-modal-content"};function yg({type:e,data:t,dataCustomization:n,...r}){const s=A(()=>{switch(e){case"payout":return{...t,type:e,...r};case"transaction":return{id:t,type:e,...r};default:return{data:t,type:e}}},[t,e]);return a(V,{children:s&&a("div",{className:_g.base,children:a(Va,{...s,dataCustomization:n})})})}const I0=({children:e,className:t,selectedDetail:n,resetDetails:r,dataCustomization:s})=>{const{i18n:i}=U(),o=!!n;return G(()=>{o&&Xr.closeAll()},[o]),a("div",{className:t,children:[e,n&&a(C3,{title:n!=null&&n.title?i.get(n.title):void 0,isOpen:!!n,"aria-label":i.get("payoutDetails"),onClose:r,isDismissible:!0,headerWithBorder:!1,size:(n==null?void 0:n.modalSize)??"large",children:n&&a(yg,{dataCustomization:{details:s},...n==null?void 0:n.selection})})]})},pc=({records:e,hasCustomColumn:t=!1,onDataRetrieve:n,mergeCustomData:r})=>{const[s,i]=x(e),[o,c]=x(!1),u=C(async()=>{try{if(t&&Q(n)){const l=await n(e);if(Array.isArray(l))i(r({records:e,retrievedData:(l==null?void 0:l.filter(Boolean))||[]}));else throw new Error("Retrieved data should be an array")}else i(e)}catch(l){i(e),console.error(l)}finally{c(!1)}},[t,n,r,e]);return G(()=>{e.length&&(c(!0),u())},[u,e]),{customRecords:s,loadingCustomRecords:o}},_c=(e,t=de)=>{var n;if(Array.isArray(e))for(const r of e)try{const s=typeof r=="object"?(n=r==null?void 0:r.key)==null?void 0:n.trim():!1;if(typeof s=="string"&&s&&!t.includes(s))return!0}catch{}return!1},yc=(e,t,n)=>{const r=[];for(let s=0;s<e.length;s++){const i=e[s],o=t.find(c=>n(c,i,s));r[s]={...o??$,...i}}return r},gg=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=fs,onRecordSelection:s,showDetails:i,isLoadingBalanceAccount:o,onContactSupport:c,hideTitle:u,dataCustomization:l})=>{var Qe,Tt,Ge,Wt;const{getPayouts:h}=Ce().endpoints,{activeBalanceAccount:d,balanceAccountSelectionOptions:f,onBalanceAccountSelection:m}=oc(t),{defaultParams:y,nowTimestamp:_,refreshNowTimestamp:T}=mc("payouts",d),g=C(async(Be,An)=>h({signal:An,errorLevel:"error"},{query:{...Be,createdSince:Be[ee.CREATED_SINCE]??y.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:Be[ee.CREATED_UNTIL]??y.current.defaultFilterParams[ee.CREATED_UNTIL],balanceAccountId:(d==null?void 0:d.id)??""}}),[d==null?void 0:d.id,y,h]),E=Za(),b=A(()=>Q(e)?e:void 0,[e]),N=A(()=>n?tc:void 0,[n]),{canResetFilters:D,error:S,fetching:v,filters:R,limit:F,limitOptions:P,records:z,resetFilters:j,updateFilters:ie,updateLimit:K,...ce}=sc({fetchRecords:g,dataField:"data",filterParams:y.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:b,preferredLimit:r,preferredLimitOptions:N,enabled:!!(d!=null&&d.id)&&!!h});G(()=>{T()},[R,T]);const Te=A(()=>({showDetails:i??!0,callback:s}),[i,s]),me=C(({records:Be,retrievedData:An})=>yc(Be,An,(Kn,Vn)=>Kn.createdAt===Vn.createdAt),[]),_e=A(()=>{var Be;return _c((Be=l==null?void 0:l.list)==null?void 0:Be.fields,Ka)},[(Qe=l==null?void 0:l.list)==null?void 0:Qe.fields]),{customRecords:De,loadingCustomRecords:pe}=pc({records:z,hasCustomColumn:_e,onDataRetrieve:(Tt=l==null?void 0:l.list)==null?void 0:Tt.onDataRetrieve,mergeCustomData:me}),ke=A(()=>({payout:Te}),[Te]),{updateDetails:fe,resetDetails:Ue,selectedDetail:oe}=b0(ke),ze=C(Be=>{fe({selection:{type:"payout",data:{id:d==null?void 0:d.id,balanceAccountDescription:(d==null?void 0:d.description)||"",date:Be.createdAt}},modalSize:"small"}).callback({balanceAccountId:(d==null?void 0:d.id)||"",date:Be.createdAt})},[fe,d==null?void 0:d.id,d==null?void 0:d.description]);return a("div",{className:L3,children:[a(pg,{hideTitle:u,titleKey:"payoutsTitle",descriptionKey:"payoutsNotice",children:a(Xa,{...E})}),a(Qa,{...E,children:[a(ec,{activeBalanceAccount:d,balanceAccountSelectionOptions:f,onBalanceAccountSelection:m}),a(fc,{canResetFilters:D,defaultParams:y,filters:R,nowTimestamp:_,refreshNowTimestamp:T,sinceDate:P3,timezone:"UTC",updateFilters:ie})]}),a(I0,{className:w3,onContactSupport:c,selectedDetail:oe,resetDetails:Ue,dataCustomization:l==null?void 0:l.details,children:a(I3,{loading:v||o||!t||pe,data:(Ge=l==null?void 0:l.list)!=null&&Ge.onDataRetrieve?De:z,showPagination:!0,onRowClick:ze,showDetails:i,limit:F,limitOptions:P,onContactSupport:c,onLimitSelection:K,error:S,customColumns:(Wt=l==null?void 0:l.list)==null?void 0:Wt.fields,...ce})})]})},Tg="adyen-pe-payouts-overview-container";function Ag({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=Jo(e.balanceAccountId);return a(qa,{balanceAccountsError:s,className:Tg,errorMessage:"weCouldNotLoadThePayoutsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(gg,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class D0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Ag,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(D0,"type","payouts");class k0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Va,{...this.props,type:"transaction",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(k0,"type","transactionDetails");const Eg={base:"adyen-pe-divider"},Ng=({className:e})=>a("hr",{className:M(Eg.base,e)}),Sg="adyen-pe-header",si=({baseClassName:e=Sg,children:t,hasDivider:n,hideTitle:r,titleKey:s,subtitleKey:i,subtitleConfig:o})=>{const{i18n:c}=U();return a("header",{className:e,children:[a("div",{className:`${e}__headings`,children:[!r&&s&&a("div",{className:`${e}__title`,children:a(k,{el:ne.SPAN,variant:I.TITLE,medium:!0,children:c.get(s)})}),i&&a("div",{className:M(`${e}__subtitle`,o==null?void 0:o.classNames),children:a(k,{el:(o==null?void 0:o.typographyEl)??ne.SPAN,variant:(o==null?void 0:o.variant)??I.BODY,children:c.get(i)})}),n&&a(Ng,{className:`${e}__divider`})]}),t&&a("div",{className:`${e}__controls`,children:t})]})},Cg="adyen-pe-transaction-totals",Pl="adyen-pe-transaction-totals__item",Rg="adyen-pe-base-button";function vg(e,t){const n=A(()=>Fn("",e.className)||"",[e.className]),r=A(()=>qo(e.disabled||!1),[e.disabled]),{click:s,allProps:i}=Zo(n,[...e.classNameModifiers||[],...e.fullWidth?["full-width"]:[]],Rg,r,e,e.onClick);return a("button",{type:e.type||"button",onClick:s,ref:t,...i,children:e.children})}const Ml=Xe(vg),L0="adyen-pe-expandable-card",oi=L0,_n=oi+"__container",uo=oi+"__content",Fl=oi+"__chevron",xl=_n+"--button",Ai=_n+"--filled",Og=_n+"--hidden",bg=_n+"--in-flow",w0=_n+"--overlay",Bl=uo+"--expandable",$l=`--${L0}-height`,Ei=w0,gc=({renderHeader:e,children:t,filled:n,fullWidth:r,inFlow:s,...i})=>{const{i18n:o}=U(),[c,u]=x(!1),l=A(()=>s===!0,[s]),h=C(()=>u(g=>!g),[u]),d=Y(null),f=Y(l),m=Y(!1),y=Y(c),_=Ma(void 0,C(()=>{c&&(h(),m.current=!0)},[c,h])),T=g=>{var E;g&&(l?(!c||f.current!==l)&&g.style.setProperty($l,`${((E=d.current)==null?void 0:E.offsetHeight)||0}px`):c||g.style.removeProperty($l),f.current=l)};return G(()=>{var g,E;c?(g=_.current)==null||g.focus():(y.current!==c&&!m.current&&((E=d.current)==null||E.focus()),m.current=!1),y.current=c},[c,_]),a("div",{ref:T,className:oi,children:t?a(V,{children:[a(Ml,{className:M(_n,xl,{[Ai]:n}),disabled:c,fullWidth:r,"aria-controls":Ei,"aria-expanded":c,"aria-hidden":c,onClick:h,ref:d,"data-testid":"expand-button",...i,children:[a("span",{className:"adyen-pe-sr-only",children:o.get("expandableCard.expand")}),a("div",{className:M(uo,Bl),children:e}),a("div",{className:Fl,children:a(Xo,{role:"presentation"})})]}),a(Ml,{id:Ei,className:M(_n,xl,w0,{[Ai]:n,[Og]:!c,[bg]:l}),disabled:!c,fullWidth:r,"aria-controls":Ei,"aria-expanded":c,"aria-hidden":!c,onClick:h,ref:_,"data-testid":"collapse-button",...i,children:[a("span",{className:"adyen-pe-sr-only",children:o.get("expandableCard.collapse")}),a("div",{className:M(uo,Bl),children:[e,a("div",{children:t})]}),a("div",{className:Fl,children:a(Ea,{role:"presentation"})})]})]}):a("div",{className:M(_n,{[Ai]:n}),...i,children:a("div",{className:uo,children:e})})})},Tc="adyen-pe-amount-skeleton",Ig=Tc+"--has-margin",Dg=Tc+"--loading",kg=({hasMargin:e=!1,isLoading:t=!1,width:n})=>a("span",{className:M(Tc,{[Dg]:t,[Ig]:e}),style:{width:n}}),Un="adyen-pe-summary-item",P0=Un+"__label-container",Lg=P0+"--loading",wg=Un+"--body",M0=Un+"__label",Pg=Un+"__placeholder",Mg=Un+"__amount",Ul=Xe(({config:e,i18n:t,isSkeletonVisible:n,className:r,...s},i)=>a("span",{className:M(P0,r,{[Lg]:n}),style:{cursor:"default"},ref:i,...s,children:e.labelKey&&a(k,{variant:I.CAPTION,className:M0,children:t.get(e.labelKey)})})),F0=({columnConfigs:e,isHeader:t=!1,isHovered:n=!1,isSkeletonVisible:r=!1,isLoading:s=!1,widths:i,onWidthsSet:o,isEmpty:c})=>{const{i18n:u}=U();G(()=>{const f=e.map(m=>{var y,_;return((_=(y=m.ref)==null?void 0:y.current)==null?void 0:_.getBoundingClientRect().width)??0});o(f)},[o]);const l=f=>({width:i&&i[f]?i[f]:"auto"}),h=be(Oe.only.xs),d=C((f,m)=>f.valueHasLabelStyle?I.CAPTION:m&&!h?I.BODY:I.TITLE,[h]);return a("div",{className:M(Un,{[wg]:!t}),children:e.map((f,m)=>{const y=f.getValue(),_=!!y&&y.length>12;return a("div",{children:[t&&(f.tooltipLabel?a(gn,{content:u.get(`${f.tooltipLabel}`),isContainerHovered:n,children:a(Ul,{config:f,i18n:u,isSkeletonVisible:r})}):a(Ul,{config:f,i18n:u,isSkeletonVisible:r})),r?a(kg,{isLoading:s,hasMargin:f.hasSkeletonMargin,width:f.skeletonWidth+"px"}):c?a("span",{className:M([Un,Pg])}):a("div",{ref:f.ref,style:l(m),children:a(k,{variant:d(f,_),className:M({[M0]:f.valueHasLabelStyle,[Mg]:!f.valueHasLabelStyle}),children:y})})]},m)})})},Wl=({total:e,hiddenField:t,isHeader:n=!1,isHovered:r=!1,isSkeleton:s=!1,isLoading:i=!1,widths:o,onWidthsSet:c})=>{const{i18n:u}=U(),l=Y(null),h=Y(null),d=Y(null),f=A(()=>{const m={labelKey:"totalIncoming",ref:l,skeletonWidth:80,getValue:()=>e&&u.amount(e.incomings,e.currency),tooltipLabel:"tooltip.totalIncoming"},y={labelKey:"totalOutgoing",ref:h,skeletonWidth:80,getValue:()=>e&&u.amount(e.expenses,e.currency),tooltipLabel:"tooltip.totalOutgoing"};return[...t!=="incomings"?[m]:[],...t!=="expenses"?[y]:[],{ref:d,skeletonWidth:40,valueHasLabelStyle:!0,getValue:()=>e==null?void 0:e.currency}]},[e,t,u]);return a(F0,{isHovered:r,isEmpty:!e,columnConfigs:f,isHeader:n,isSkeletonVisible:s,isLoading:i,widths:o,onWidthsSet:c})},Fg="adyen-pe-base-list",Ac=({children:e,classNames:t})=>a("ul",{className:M(Fg,[t]),children:e}),x0=()=>{const[e,t]=x([]),n=C(r=>{t(s=>r.every(i=>!i)?r:r.map((i,o)=>{const c=s[o];return!c||i>c?i:c}))},[]);return[e,n]},Ni=Ie(({totals:e,isLoading:t,hiddenField:n,fullWidth:r})=>{const[s,i]=x0(),[o,c]=x(!1),[u,...l]=A(()=>e.map(h=>(h.key=`${h.currency}-${Math.random()}`,h)),[e]);return a(gc,{renderHeader:a(Wl,{isHovered:o,total:u,hiddenField:n,widths:s,isHeader:!0,isSkeleton:t,isLoading:t,onWidthsSet:i}),fullWidth:r,onMouseEnter:()=>c(!0),onFocus:()=>c(!0),onMouseLeave:()=>c(!1),onBlur:()=>c(!1),children:!t&&l.length&&a(Ac,{children:l.map(h=>a("li",{children:a(Wl,{isHovered:o,total:h,hiddenField:n,widths:s,onWidthsSet:i})},h.key))})})}),xg=Ie(({availableCurrencies:e,isAvailableCurrenciesFetching:t,balanceAccountId:n,createdSince:r,createdUntil:s,categories:i,statuses:o,maxAmount:c,minAmount:u,currencies:l,fullWidth:h})=>{const{getTransactionTotals:d}=Ce().endpoints,f=C(async()=>d==null?void 0:d($,{query:{createdSince:r,createdUntil:s,categories:i,statuses:o,maxAmount:c,minAmount:u,currencies:l,balanceAccountId:n}}),[n,i,r,s,l,d,c,u,o]),{data:m,isFetching:y}=Ot({fetchOptions:A(()=>({enabled:!!n&&!!d}),[n,d]),queryFn:f}),_=!n||y||t,g=C(()=>{if(!e||!m)return m==null?void 0:m.data;const b=e.map(N=>m.data.find(S=>S.currency===N)||{currency:N,incomings:0,expenses:0});return b.concat(m.data.filter(N=>!b.includes(N)))},[e,m])()??[],E=be(Oe.only.xs);return a("div",{className:Cg,children:E?a(V,{children:[a("div",{className:Pl,children:a(Ni,{totals:g,isLoading:_,hiddenField:"expenses",fullWidth:h})}),a("div",{className:Pl,children:a(Ni,{totals:g,isLoading:_,hiddenField:"incomings",fullWidth:h})})]}):a(Ni,{totals:g,isLoading:_,fullWidth:h})})}),Bg="adyen-pe-balances",Hl=({balance:e,isHeader:t=!1,isSkeleton:n=!1,isLoading:r=!1,widths:s,onWidthsSet:i,isEmpty:o})=>{const{i18n:c}=U(),u=Y(null),l=Y(null),h=A(()=>[{labelKey:"accountBalance",ref:u,skeletonWidth:80,getValue:()=>e&&c.amount(e.value,e.currency)},{ref:l,skeletonWidth:40,valueHasLabelStyle:!0,getValue:()=>e==null?void 0:e.currency}],[e,u,c]);return a(F0,{isEmpty:o,columnConfigs:h,isHeader:t,isSkeletonVisible:n,isLoading:r,widths:s,onWidthsSet:i})},$g=Ie(({balanceAccountId:e,defaultCurrencyCode:t,onCurrenciesChange:n,fullWidth:r})=>{const{getBalances:s}=Ce().endpoints,i=C(async()=>s==null?void 0:s($,{path:{balanceAccountId:e}}),[e,s]),{data:o,error:c,isFetching:u}=Ot({fetchOptions:A(()=>({enabled:!!e&&!!s}),[e,s]),queryFn:i}),l=!e||u,h=!!c||!(o!=null&&o.data.length),d=A(()=>(o==null?void 0:o.data)&&[...o.data].sort(({currency:T},{currency:g})=>{if(t){if(T===t)return-1;if(g===t)return 1}return T.localeCompare(g)}),[o==null?void 0:o.data,t]),[f,...m]=A(()=>(d==null?void 0:d.map(T=>(T.key=`${T.currency}-${Math.random()}`,T)))??[],[d]),[y,_]=x0();return G(()=>{const T=new Set((d==null?void 0:d.map(({currency:g})=>g))||[]);n(Array.from(T),u)},[d,u,n]),a("div",{className:Bg,children:a(gc,{renderHeader:a(Hl,{isEmpty:h,balance:f,widths:y,isHeader:!0,isSkeleton:l,isLoading:l,onWidthsSet:_}),filled:!0,fullWidth:r,children:m.length&&a(Ac,{children:m.map(T=>a("li",{children:a(Hl,{balance:T,widths:y,onWidthsSet:_})},T.key))})})})}),Ug=(e,t)=>{const n=Ti({filterParam:ee.CATEGORIES,filterValues:dg,defaultFilters:lo,...e}),r=Ti({filterParam:ee.STATUSES,filterValues:hg,defaultFilters:lo,...e}),s=Ti({filterParam:ee.CURRENCIES,filterValues:t,defaultFilters:lo,...e});return{categoriesFilter:n,currenciesFilter:s,statusesFilter:r}},Oo=1e5,Wg=({onChange:e,editAction:t,onValueUpdated:n,selectedCurrencies:r,availableCurrencies:s,value:i,...o})=>{const{i18n:c}=U(),[u,l]=x(Z(o.minAmount)?void 0:parseFloat(o.minAmount)/Oo),[h,d]=x(Z(o.maxAmount)?void 0:parseFloat(o.maxAmount)/Oo),f=C(()=>{e({minAmount:u,maxAmount:h})},[h,u,e]),m=C(()=>{e({minAmount:void 0,maxAmount:void 0}),d(void 0),l(void 0)},[e]);G(()=>{t===je.APPLY&&f(),t===je.CLEAR&&m()},[f,m,t]);const y=A(()=>({minAmount:Number(u),maxAmount:Number(h)}),[h,u]);return G(()=>{const{maxAmount:_,minAmount:T}=y;Z(_)&&Z(T)||T>_?n(null):n(`${T}-${_}`)},[y,n]),a("div",{className:"adyen-pe-range-selection-filter",children:[a("div",{className:"adyen-pe-range-selection-filter__input",children:[a("label",{htmlFor:"minValue",children:`${c.get("from")}:`}),a(Ro,{"data-testid":"minValueFilter",lang:c.locale,name:"minValue",type:"number",value:u,onInput:_=>{_.currentTarget&&l(_.currentTarget.value!==""?_.currentTarget.value:void 0)},min:0,isInvalid:u?u<0:!1,errorMessage:c.get("noNegativeNumbersAllowed")})]}),a("div",{className:"adyen-pe-range-selection-filter__input",children:[a("label",{htmlFor:"maxValue",children:`${c.get("to")}:`}),a(Ro,{"data-testid":"maxValueFilter",lang:c.locale,name:"maxValue",type:"number",value:h,onInput:_=>{_.currentTarget&&d(_.currentTarget.value!==""?_.currentTarget.value:void 0)},min:u,isInvalid:!Z(h)&&!Z(u)&&h<u,errorMessage:c.get("toValueShouldBeGreaterThanTheFromValue")})]})]})},Hg=({updateFilters:e,selectedCurrencies:t,availableCurrencies:n,...r})=>{const{i18n:s}=U(),[i,o]=x(),[c,u]=x(),l=A(()=>(t==null?void 0:t.length)===1||(n==null?void 0:n.length)===1,[n==null?void 0:n.length,t==null?void 0:t.length]),h=C((f,m)=>{const y=(t==null?void 0:t[0])||(n==null?void 0:n[0]),_=m&&y?{style:"currency",currency:y,currencyDisplay:"symbol"}:void 0;return f.toLocaleString(s.locale,_)},[n,s,t]),d=C(f=>{const{minAmount:m,maxAmount:y}=f??$;o({minAmount:m,maxAmount:y}),Z(m)&&Z(y)&&u(void 0),e({minAmount:Z(m)?void 0:String(Math.round(m*Oo)),maxAmount:Z(y)?void 0:String(Math.round(y*Oo))})},[e]);if(i&&(i.minAmount||i.maxAmount)){const{minAmount:f,maxAmount:m}=i??{};!Z(f)&&!Z(m)&&f<=m?u(`${h(f,l)} ${s.get("to").toLowerCase()} ${h(m,l)}`):!Z(f)&&Z(m)&&f>=0?u(`${s.get("from")} ${h(f,l)}`):Z(f)&&!Z(m)?u(`${s.get("to")} ${h(m,l)}`):u(void 0)}return a(v0,{...r,updateFilters:e,minAmount:r.minAmount,maxAmount:r.maxAmount,onChange:d,value:c,label:c||r.label,type:"text",containerSize:us.MEDIUM,selectedCurrencies:t,availableCurrencies:n,render:Wg})},B0="adyen-pe-transactions",$0=`${B0}-overview`,Gg=`${B0}-details`,U0=`${$0}__summary`,Gl=`${U0}-item`,Yg=24,jg=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=fs,onRecordSelection:s,showDetails:i,isLoadingBalanceAccount:o,onContactSupport:c,hideTitle:u,dataCustomization:l})=>{var js,zs,Ks,Cc;const{i18n:h}=U(),{getTransactions:d}=Ce().endpoints,{activeBalanceAccount:f,balanceAccountSelectionOptions:m,onBalanceAccountSelection:y}=oc(t),{defaultParams:_,nowTimestamp:T,refreshNowTimestamp:g}=mc("transactions",f),E=C(async({balanceAccount:Je,...et},li)=>d({signal:li,errorLevel:"error"},{query:{...et,statuses:Vr(et[ee.STATUSES]),categories:Vr(et[ee.CATEGORIES]),currencies:Vr(et[ee.CURRENCIES]),createdSince:et[ee.CREATED_SINCE]??_.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:et[ee.CREATED_UNTIL]??_.current.defaultFilterParams[ee.CREATED_UNTIL],sortDirection:"desc",balanceAccountId:(f==null?void 0:f.id)??"",minAmount:Z(et.minAmount)?void 0:parseFloat(et.minAmount),maxAmount:Z(et.maxAmount)?void 0:parseFloat(et.maxAmount)}}),[f==null?void 0:f.id,_,d]),b=Za(),N=A(()=>Q(e)?e:void 0,[e]),D=A(()=>n?tc:void 0,[n]),{canResetFilters:S,error:v,fetching:R,filters:F,limit:P,limitOptions:z,records:j,resetFilters:ie,updateFilters:K,updateLimit:ce,...Te}=sc({fetchRecords:E,dataField:"data",filterParams:_.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:N,preferredLimit:r,preferredLimitOptions:D,enabled:!!(f!=null&&f.id)&&!!d}),[me,_e]=x([]),[De,pe]=x(!1),ke=C((Je,et)=>{_e(Je),pe(et)},[]),{categoriesFilter:fe,currenciesFilter:Ue,statusesFilter:oe}=Ug({filters:F,updateFilters:K},me);G(()=>{_e(void 0),K({[ee.BALANCE_ACCOUNT]:f==null?void 0:f.id,[ee.CURRENCIES]:void 0})},[K,f==null?void 0:f.id]),G(()=>{g()},[F,g]),G(()=>{oe.updateSelection({target:{value:"Booked",name:"status"}})},[oe]);const ze=be(Oe.down.sm),Qe=!!me&&me.length>1,Tt=A(()=>({showDetails:i??!0,callback:s}),[i,s]),Ge=A(()=>({transaction:Tt}),[Tt]),Wt=C(({records:Je,retrievedData:et})=>yc(Je,et,(li,Rc)=>li.id===Rc.id),[]),Be=A(()=>{var Je;return _c((Je=l==null?void 0:l.list)==null?void 0:Je.fields,Ya)},[(js=l==null?void 0:l.list)==null?void 0:js.fields]),{customRecords:An,loadingCustomRecords:Kn}=pc({records:j,hasCustomColumn:Be,onDataRetrieve:(zs=l==null?void 0:l.list)==null?void 0:zs.onDataRetrieve,mergeCustomData:Wt}),{updateDetails:Vn,resetDetails:ci,selectedDetail:ae}=b0(Ge),Re=C(({id:Je})=>{Vn({selection:{type:"transaction",data:Je,balanceAccount:f||""},modalSize:"small"}).callback({id:Je})},[f,Vn]),ve=A(()=>{const Je=new Date(T);return Je.setMonth(Je.getMonth()-Yg),Je.toString()},[T]);return a("div",{className:$0,children:[a(si,{hideTitle:u,titleKey:"transactionsOverviewTitle",children:a(Xa,{...b})}),a(Qa,{...b,children:[a(ec,{activeBalanceAccount:f,balanceAccountSelectionOptions:m,onBalanceAccountSelection:y}),a(fc,{canResetFilters:S,defaultParams:_,filters:F,nowTimestamp:T,refreshNowTimestamp:g,sinceDate:ve,timezone:f==null?void 0:f.timeZone,updateFilters:K}),a(wl,{...fe,placeholder:h.get("filterPlaceholder.category")}),a(Hg,{availableCurrencies:me,selectedCurrencies:Vr(F[ee.CURRENCIES]),name:"range",label:h.get("amount"),minAmount:F[ee.MIN_AMOUNT],maxAmount:F[ee.MAX_AMOUNT],updateFilters:K,onChange:K}),a(wl,{...Ue,placeholder:h.get("filterPlaceholder.currency")})]}),a("div",{className:U0,children:[a("div",{className:Gl,children:a(xg,{availableCurrencies:me,isAvailableCurrenciesFetching:De,balanceAccountId:f==null?void 0:f.id,statuses:oe.selection,categories:fe.selection,createdUntil:F[ee.CREATED_UNTIL],createdSince:F[ee.CREATED_SINCE],currencies:Ue.selection,minAmount:F[ee.MIN_AMOUNT]?parseFloat(F[ee.MIN_AMOUNT]):void 0,maxAmount:F[ee.MAX_AMOUNT]?parseFloat(F[ee.MAX_AMOUNT]):void 0,fullWidth:ze})}),a("div",{className:Gl,children:a($g,{balanceAccountId:f==null?void 0:f.id,onCurrenciesChange:ke,defaultCurrencyCode:f==null?void 0:f.defaultCurrencyCode,fullWidth:ze})})]}),a(I0,{dataCustomization:l==null?void 0:l.details,selectedDetail:ae,resetDetails:ci,className:Gg,children:a(q_,{activeBalanceAccount:f,availableCurrencies:me,error:v,hasMultipleCurrencies:Qe,limit:P,limitOptions:z,loading:R||o||!t||Kn,onContactSupport:c,onLimitSelection:ce,onRowClick:Re,showPagination:!0,transactions:(Ks=l==null?void 0:l.list)!=null&&Ks.onDataRetrieve?An:j,customColumns:(Cc=l==null?void 0:l.list)==null?void 0:Cc.fields,...Te})})]})},zg="adyen-pe-transactions-overview-container";function Kg({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=Jo(e.balanceAccountId);return a(qa,{balanceAccountsError:s,className:zg,errorMessage:"weCouldNotLoadTheTransactionsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(jg,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class W0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Kg,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(W0,"type","transactions");var ur=(e=>(e.AU="AU",e.EU="EU",e.GB="GB",e.US="US",e))(ur||{});const Vg=["AU","GB","US"],qg=["EU"],H0=e=>{var n;const t=(n=e==null?void 0:e.regions)==null?void 0:n.find(r=>r.type==="capital");return(t==null?void 0:t.value)??""},Zg=e=>{switch(e){case ur.EU:return"capital.legalSubtitleEU";default:return null}},Xg=e=>{switch(e){case ur.AU:return"capital.legalSubtitleAU";case ur.GB:return"capital.legalSubtitleGB";case ur.US:return"capital.legalSubtitleUS";default:return null}},Qg=e=>{const t=H0(e),n=e==null?void 0:e.countryCode;return Xg(n)??Zg(t)},Ec=e=>{const t=H0(e),n=(e==null?void 0:e.countryCode)??"";return Vg.includes(n)||qg.includes(t)},Ht={contactSupportForHelp:"contactSupportForHelp",couldNotLoadOffers:"capital.weCouldNotLoadFinancialOffers",tryRefreshingThePage:"tryRefreshingThePageOrComeBackLater",somethingWentWrong:"somethingWentWrong"},Si={title:Ht.somethingWentWrong,message:[Ht.couldNotLoadOffers,Ht.tryRefreshingThePage],refreshComponent:!0},G0=(e,t)=>{if(!e)return Si;const n=Ad(e,t);if(n)return n;const r=t?"theErrorCodeIs":"contactSupportForHelpAndShareErrorCode";switch(e.errorCode){case void 0:return{...Si,...t?{onContactSupport:t}:{}};case"30_016":return{title:Ht.somethingWentWrong,message:[Ht.couldNotLoadOffers,r],translationValues:{[r]:e.requestId?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_011":return{title:"capital.accountIsInactive",message:[Ht.couldNotLoadOffers,r],translationValues:{[r]:e.requestId?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_600":return{title:Ht.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",r],translationValues:{[r]:e.requestId?a(Bn,{textToCopy:e.requestId}):null},onContactSupport:t};case"EMPTY_CONFIG":return{title:Ht.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",Ht.contactSupportForHelp]};case"UNSUPPORTED_REGION":return{title:"capital.unsupportedRegionTitle",message:"capital.unsupportedRegionDescription"};default:return{...Si,refreshComponent:!0}}},ii=({emptyGrantOffer:e,error:t,onContactSupport:n,onBack:r,unsupportedRegion:s})=>{const{i18n:i}=U(),o=C(()=>a(V,{children:r&&a(he,{variant:se.SECONDARY,onClick:r,children:i.get("back")})}),[i,r]),c=A(()=>s?new Di(mo.ERROR,"UnsupportedRegion","Unsupported Region Configuration","UNSUPPORTED_REGION"):e?new Di(mo.ERROR,"EmptyConfig","Empty Configuration","EMPTY_CONFIG"):t,[e,s,t]);return a(en,{absolutePosition:!1,withImage:!0,onContactSupport:n,renderSecondaryButton:o,outlined:!1,...G0(c,n)})},Yl={base:"adyen-pe-capital-offer",errorContainer:"adyen-pe-capital-offer__error-container"},Wn=e=>{var r;const t=(r=Ce().extraConfig)==null?void 0:r.legalEntity,n=A(()=>{const s=Qg(t);return s?{subtitleKey:s}:{}},[t]);return a(si,{...e,...n,subtitleConfig:{variant:I.CAPTION,classNames:"adyen-pe-capital-header__subtitle"}})},ai=({className:e,el:t="div",children:n})=>a(t,{className:M("adyen-pe-info-box",e),children:n}),Jg=(e,t=0)=>new Date(new Date(e).setUTCHours(0,0,0,0)+Math.floor(t)*ms),Y0=e=>ru(Jg(new Date,e)),eT=e=>e?Math.ceil(e/30):null,tT=(e,t)=>{let n,r;function s(...i){clearTimeout(n),r=i,n=setTimeout(()=>{e(r),r=void 0},t)}return s.cancel=()=>{n&&(clearTimeout(n),n=void 0,r=void 0)},s},Nc=e=>e/100;function nT(e,t,n,r){if(t>=n)return 0;const s=r>0?r:1;if(s>n-t)return 0;const o=(Math.round((e-t)/s)*s+t-t)*100/(n-t);return Number(vt(0,o,100).toFixed(2))}function rT(e,t,n){const r=t/2;let s=Math.round(r/n)*n;return s<e?s=e:s>t&&(s=t),s}const sT=({min:e=0,max:t=100,step:n=1,value:r=e,onChange:s,className:i,...o})=>{const c=A(()=>nT(r,e,t,n),[r,e,t,n]);return a("input",{type:"range",className:M("adyen-pe-slider",i),min:e,max:t,step:n,value:r,onChange:s,style:{backgroundSize:`${c}% 100%`},...o})},oT=({dynamicOffersConfig:e,value:t=e.minAmount.value,onValueChange:n,onRelease:r,className:s})=>{const i=as(),{i18n:o}=U(),c=l=>{const h=Number(l.target.value);n==null||n(h)},u=l=>{const h=Number(l.target.value);r==null||r(h)};return a("div",{className:M("adyen-pe-capital-slider",s),children:[a("label",{htmlFor:i,className:"adyen-pe-capital-slider__label",children:a(k,{variant:I.BODY,stronger:!0,children:o.get("capital.howMuchMoneyDoYouNeed")})}),a("div",{children:[a("output",{htmlFor:i,className:"adyen-pe-capital-slider__value","aria-live":"polite",children:a(k,{variant:I.TITLE,strongest:!0,children:o.amount(t,e.minAmount.currency,{maximumFractionDigits:0})})}),a(sT,{id:i,value:t,min:e.minAmount.value,max:e.maxAmount.value,step:e.step,onChange:c,onMouseUp:u,onTouchEnd:u,onKeyUp:u,className:"adyen-pe-capital-slider__input"})]}),a("div",{className:"adyen-pe-capital-slider__labels",children:[a("label",{children:[a(k,{variant:I.CAPTION,children:o.get("min")}),a(k,{variant:I.BODY,children:o.amount(e.minAmount.value,e.minAmount.currency,{maximumFractionDigits:0})})]}),a("label",{children:[a(k,{variant:I.CAPTION,children:o.get("max")}),a(k,{variant:I.BODY,children:o.amount(e.maxAmount.value,e.maxAmount.currency,{maximumFractionDigits:0})})]})]})]})},bo=30,iT=()=>a("div",{className:"adyen-pe-capital-offer-selection__loading-container",children:[...Array(4)].map((e,t)=>a("div",{className:"adyen-pe-capital-offer-selection__loading-skeleton"},t))}),aT=({data:e})=>{const{i18n:t}=U(),n=A(()=>{const r=e.expectedRepaymentPeriodDays&&Y0(e.expectedRepaymentPeriodDays);return r?t.date(r,{month:"long"}):null},[e,t]);return a("div",{className:"adyen-pe-capital-offer-selection__information",children:[a(k,{el:ne.SPAN,variant:I.BODY,wide:!0,children:n&&t.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds",{values:{amount:t.amount(e.thresholdAmount.value,e.thresholdAmount.currency),days:bo,date:n}})}),a(fn,{renderValue:r=>a(k,{el:ne.SPAN,stronger:!0,variant:I.CAPTION,children:r}),renderLabel:r=>a(k,{el:ne.SPAN,variant:I.CAPTION,children:r}),items:[{key:"capital.fees",value:t.amount(e.feesAmount.value,e.feesAmount.currency)},{key:"capital.dailyRepaymentRate",value:`${t.get("capital.xPercent",{values:{percentage:Nc(e.repaymentRate)}})}`},{key:"capital.expectedRepaymentPeriod",value:t.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})}]})]})},cT=({dynamicOffersConfig:e,dynamicOffersConfigError:t,emptyGrantOffer:n,onContactSupport:r,onOfferDismiss:s,onOfferSelect:i,requestedAmount:o})=>{const{i18n:c}=U(),u=A(()=>{if(e)return rT(e.minAmount.value,e.maxAmount.value,e.step)},[e]),[l,h]=x(void 0),d=A(()=>e==null?void 0:e.minAmount.currency,[e==null?void 0:e.minAmount.currency]),{createGrantOffer:f,getDynamicGrantOffer:m}=Ce().endpoints,y=Eo({queryFn:m,options:{retry:1,shouldRetry:C(R=>R.status===500,[]),onSettled:C(()=>{b(!1)},[])}}),_=Eo({queryFn:f,options:{onSuccess:R=>i(R)}}),T=C(()=>{var R,F;_.mutate({body:{amount:((R=y.data)==null?void 0:R.grantAmount.value)||l,currency:((F=y.data)==null?void 0:F.grantAmount.currency)||d},contentType:"application/json"})},[d,y.data,l,_]),g=C(R=>y.mutate({},{query:{amount:R,currency:d}}),[d,y]),[E,b]=x(!1),N=tT(g,300),D=C(R=>{N.cancel(),b(!0),h(R)},[N]),S=R=>N(R);G(()=>{e&&!y.data&&!l&&(h(R=>R||(o?Number(o):u||e.minAmount.value)),g(l||u||e.minAmount.value))},[e,y.data,g,u,o,l]);const v=A(()=>_.isLoading||y.isLoading||E,[y.isLoading,E,_.isLoading]);return a("div",{className:"adyen-pe-capital-offer-selection",children:_.error||y.error||n||t?a(ii,{error:_.error||y.error||t,onBack:s,onContactSupport:r,emptyGrantOffer:n}):a(V,{children:[e&&a(oT,{value:l,dynamicOffersConfig:e,onValueChange:D,onRelease:S}),a(ai,{className:"adyen-pe-capital-offer-selection__details",children:!y.data||y.isLoading||E?a(iT,{}):y.data?a(aT,{data:y.data}):null}),a("div",{className:"adyen-pe-capital-offer-selection__buttons",children:[s&&a(he,{variant:se.SECONDARY,onClick:s,children:c.get("back")}),a(he,{variant:se.PRIMARY,state:v?"loading":void 0,onClick:T,disabled:_.isLoading||!(e!=null&&e.minAmount),children:c.get(v?"loading":"capital.reviewOffer")})]})]})})},lT=(e,t)=>{const{variant:n=se.PRIMARY,disabled:r=!1,onClick:s,classNameModifiers:i=[],className:o}=e,c=A(()=>Fn("",o)||"",[o]),u=A(()=>qo(r),[r]),{click:l,allChildren:h,allProps:d}=Zo(c,[...i,n],`${ut} ${em}`,u,e,s),f=A(()=>({...d,...e.onClick&&l?{onClick:l}:{}}),[l,d,e.onClick]);return a("a",{...f,href:e.href,ref:t,children:h})},uT=Xe(lT),jl=e=>Q(e)?e:()=>e,ia=({count:e,defaultFill:t,fills:n,translationKey:r})=>{const{i18n:s}=U(),i=A(()=>{const o=jl(t);return n!==void 0?(...c)=>{const[u,l]=c;for(const h of[u,l]){const d=jl(n[h])(...c);if(d!=null)return d}return o(...c)}:o},[n,t]);return A(()=>{const o=[],c=as("translation"),u=(...d)=>(o.push(i(...d)??null),c),[l,...h]=s.get(r,{count:e,values:u}).split(c);return a(V,{children:[l,h.map((d,f)=>a(V,{children:[o[f],d]},`${c}__${f}`))]})},[s,e,i,r])},zl="capital-support@adyen.com",dT=()=>{var t,n,r;return((r=(n=(t=Ce())==null?void 0:t.extraConfig)==null?void 0:n.legalEntity)==null?void 0:r.countryCode)===ur.US?a(no,{filled:!0,noOutline:!0,children:[a(k,{variant:I.CAPTION,className:"adyen-pe-capital-offer-legal-notice--title",children:a(ia,{translationKey:"capital.offerLegalNoticeTitleUS",fills:{break:a("br",{})}})}),a("br",{}),a(k,{variant:I.CAPTION,className:"adyen-pe-capital-offer-legal-notice--description",children:a(ia,{translationKey:"capital.offerLegalNoticeDescriptionUS",fills:{email:a(uT,{href:`mailto:${zl}`,variant:se.TERTIARY,className:"adyen-pe-capital-offer-summary__info--email",children:zl}),break:a(V,{children:[a("br",{}),a("br",{})]})}})})]}):null},hT=["30_013"],fT=({grantOffer:e,onBack:t,onFundsRequest:n,onContactSupport:r})=>{const{i18n:s}=U(),i=A(()=>{const m=Y0(e.expectedRepaymentPeriodDays);return m?s.date(m,{month:"long"}):null},[e,s]),{requestFunds:o}=Ce().endpoints,c=Eo({queryFn:o,options:{onSuccess:m=>n==null?void 0:n(m)}}),u=C(m=>{c.mutate($,{path:{grantOfferId:m}})},[c]),l=C(()=>{e.id&&u(e.id)},[e.id,u]),h=A(()=>eT(e.maximumRepaymentPeriodDays),[e.maximumRepaymentPeriodDays]),d=A(()=>{const m=c.error?c.error:null;if(m&&hT.includes(m.errorCode))switch(m.errorCode){case"30_013":return{title:s.get("capital.thereIsNoPrimaryAccountConfigured"),message:s.get("capital.weCouldNotContinueWithTheOfferContactSupportForHelp"),errorCode:"30_013"};default:return{title:s.get("somethingWentWrong"),message:s.get("capital.weCouldNotLoadFinancialOffers")}}return null},[s,c.error]),f=A(()=>{const m=[{key:"capital.fees",value:s.amount(e.feesAmount.value,e.feesAmount.currency)},{key:"capital.totalRepaymentAmount",value:s.amount(e.totalAmount.value,e.totalAmount.currency)},{key:"capital.repaymentThreshold",value:s.amount(e.thresholdAmount.value,e.thresholdAmount.currency)},{key:"capital.dailyRepaymentRate",value:s.get("capital.xPercent",{values:{percentage:Nc(e.repaymentRate)}})},{key:"capital.expectedRepaymentPeriod",value:s.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})},{key:"account",value:s.get("capital.primaryAccount")}];return h&&m.splice(4,0,{key:"capital.maximumRepaymentPeriod",value:h===1?s.get("capital.oneMonth"):s.get("capital.xMonths",{values:{months:h}})}),m},[e,s,h]);return!d&&c.error?a(ii,{error:c.error,onBack:t,onContactSupport:r}):a("div",{className:"adyen-pe-capital-offer-summary",children:[a(ai,{className:"adyen-pe-capital-offer-summary__grant-summary",children:[a(k,{el:ne.PARAGRAPH,variant:I.BODY,children:[s.get("capital.youAreRequestingFundingOf")," ",a("strong",{children:`${s.amount(e.grantAmount.value,e.grantAmount.currency,{minimumFractionDigits:0})}.`})]}),a(k,{el:ne.PARAGRAPH,variant:I.CAPTION,children:s.get("capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds",{values:{amount:s.amount(e.thresholdAmount.value,e.thresholdAmount.currency),days:bo,date:i??""}})})]}),a(fn,{classNames:"adyen-pe-capital-offer-summary__details",renderLabel:(m,y)=>y==="capital.repaymentThreshold"?a(gn,{isContainerHovered:!0,content:s.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:bo}}),children:a("span",{children:a(k,{className:"adyen-pe-capital-offer-summary__list-label",el:ne.SPAN,variant:I.CAPTION,children:m})})}):a(k,{className:"adyen-pe-capital-offer-summary__list-label",el:ne.SPAN,variant:I.CAPTION,children:m}),renderValue:(m,y)=>{const _=y==="account"&&c.error&&d&&d.errorCode==="30_013";return a(k,{className:M({"adyen-pe-capital-offer-summary__details--error":_}),el:ne.SPAN,variant:I.CAPTION,stronger:!0,children:[_?a(Ze,{name:"warning-filled","data-testid":"primary-account-warning-icon"}):null,m]})},items:f}),d&&a(pn,{className:"adyen-pe-capital-offer-summary__error-alert",type:Fe.WARNING,title:d.title,description:d.message,children:r?a(he,{className:"adyen-pe-capital-offer-summary__error-alert-button",onClick:r,children:s.get("contactSupport")}):null}),a(dT,{}),a("div",{className:"adyen-pe-capital-offer-summary__buttons",children:[c.error&&!d?null:a(he,{variant:se.SECONDARY,onClick:t,children:s.get("back")}),a(he,{variant:se.PRIMARY,state:c.isLoading?"loading":void 0,onClick:l,disabled:c.isLoading||!!c.error||!!c.data,children:s.get(c.isLoading?"capital.requesting":"capital.requestFunds")})]})]})},Sc=({externalDynamicOffersConfig:e,hideTitle:t,onContactSupport:n,onFundsRequest:r,onOfferDismiss:s,onOfferSelect:i})=>{var D,S;const{getDynamicGrantOffersConfiguration:o}=Ce().endpoints,c=(S=(D=Ce())==null?void 0:D.extraConfig)==null?void 0:S.legalEntity,u=A(()=>Ec(c),[c]),[l,h]=x(!1),d=C(v=>{h(!v)},[]),{data:f,error:m}=Ot({fetchOptions:{enabled:!e&&!!o&&u,onSuccess:d},queryFn:C(async()=>o==null?void 0:o($),[o])}),y=e||f,[_,T]=x(),[g,E]=x(),b=C(v=>{i?i(v):(E(v==null?void 0:v.grantAmount.value),T(v))},[i]),N=A(()=>_?"OfferSummary":"OfferSelection",[_]);return u?a("div",{className:Yl.base,children:[a(Wn,{hasDivider:!0,hideTitle:t,titleKey:N==="OfferSummary"?"capital.businessFinancingSummary":"capital.businessFinancingOffer"}),N==="OfferSelection"&&a(cT,{requestedAmount:g,dynamicOffersConfig:y,dynamicOffersConfigError:m,onOfferDismiss:s,onOfferSelect:b,emptyGrantOffer:l,onContactSupport:n}),N==="OfferSummary"&&a(fT,{grantOffer:_,onBack:()=>T(void 0),onFundsRequest:r,onContactSupport:n})]}):a("div",{className:Yl.errorContainer,children:[a(Wn,{hideTitle:t,titleKey:"capital.businessFinancing"}),a(ii,{unsupportedRegion:!0})]})};class j0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(Sc,{...this.props}));this.componentToRender=this.componentToRender.bind(this),this.customClassNames="adyen-pe-capital-offer-component"}}B(j0,"type","capitalOffer");const mT=(e=1e3,t=!1)=>{const[n,r]=x(t),s=Y(),i=Y(),o=C(()=>{n||(i.current=setTimeout(()=>{s.current=requestAnimationFrame(()=>r(!1))},e),r(!0))},[n,e]);return G(()=>()=>{cancelAnimationFrame(s.current),clearTimeout(i.current),s.current=i.current=null},[e]),{freeze:o,frozen:n}},Kl=({...e})=>a("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[a("path",{d:"M8.25 0.25V8.18957L10.5001 5.93945L11.5608 7.00011L7.50011 11.0608L3.43945 7.00011L4.50011 5.93945L6.75 8.18934V0.25H8.25Z",fill:"currentColor"}),a("path",{d:"M2.25 11.5V9.25H0.75V11.5C0.75 12.0967 0.987053 12.669 1.40901 13.091C1.83097 13.5129 2.40326 13.75 3 13.75H12C12.5967 13.75 13.169 13.5129 13.591 13.091C14.0129 12.669 14.25 12.0967 14.25 11.5V9.25H12.75V11.5C12.75 11.6989 12.671 11.8897 12.5303 12.0303C12.3897 12.171 12.1989 12.25 12 12.25H3C2.80109 12.25 2.61032 12.171 2.46967 12.0303C2.32902 11.8897 2.25 11.6989 2.25 11.5Z",fill:"currentColor"})]}),pT=(e,t,n)=>{const r=Ce().endpoints[e];return Ot({fetchOptions:{enabled:!!r&&n,keepPrevData:!0},queryFn:async()=>r($,{...t})})};function _T({blob:e,filename:t}){const n=document.createElement("a"),r=URL.createObjectURL(e);n.href=r,n.download=t||"download";const s=()=>{setTimeout(()=>{URL.revokeObjectURL(r)},150)};n.addEventListener("click",s,{once:!0}),n.click()}function yT({className:e,disabled:t,endpointName:n,params:r,setError:s,errorDisplay:i,onDownloadRequested:o}){const{i18n:c}=U(),[u,l]=x(!1),h=be(Oe.down.xs),{data:d,error:f,isFetching:m}=pT(n,r,u);G(()=>{u&&l(!1)},[u]),G(()=>{d&&_T(d)},[d]),G(()=>{s&&f&&s(f)},[f,s]);const y=()=>{l(!0),o==null||o()};return a("div",{className:"adyen-pe-download",children:[h?a(he,{iconButton:!0,variant:se.TERTIARY,onClick:y,children:m?a(Ui,{size:"small"}):a(Kl,{})}):a(he,{className:M("adyen-pe-download__button",{"adyen-pe-download__button--loading":m},e),disabled:t||m,variant:se.SECONDARY,onClick:y,iconLeft:m?a(Ui,{size:"small"}):a(Kl,{}),children:m?`${c.get("downloading")}..`:c.get("download")}),f&&i&&a("div",{className:"adyen-pe-download__error",children:i})]})}const gT=({...e})=>a("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[a("path",{d:"M8.75 4.58008H7.25V9.08008H8.75V4.58008Z",fill:"currentColor"}),a("path",{d:"M8.71 10.6201C8.57 10.4801 8.39 10.3801 8.2 10.3501C8.01 10.3101 7.8 10.3301 7.62 10.4101C7.44 10.4901 7.28 10.6101 7.17 10.7801C7.06 10.9401 7 11.1401 7 11.3401C7 11.6101 7.11 11.8601 7.29 12.0501C7.48 12.2401 7.73 12.3401 8 12.3401C8.2 12.3401 8.39 12.2801 8.56 12.1701C8.72 12.0601 8.85 11.9001 8.93 11.7201C9.01 11.5401 9.03 11.3401 8.99 11.1401C8.95 10.9501 8.86 10.7701 8.72 10.6301L8.71 10.6201Z",fill:"currentColor"}),a("path",{d:"M9.9501 2.21008L15.3501 11.5301V11.5201C15.5501 11.8601 15.6501 12.2501 15.6501 12.6501C15.6501 13.0501 15.5501 13.4401 15.3501 13.7801C15.1501 14.1201 14.8601 14.4001 14.5201 14.6001C14.1801 14.8001 13.7901 14.9001 13.4001 14.9001H2.6001C2.2001 14.9001 1.8101 14.8001 1.4701 14.6001C1.1301 14.4101 0.850097 14.1201 0.650097 13.7801C0.450097 13.4501 0.350098 13.0601 0.350098 12.6601C0.350098 12.2601 0.450097 11.8701 0.650097 11.5301L6.0601 2.20008C6.2501 1.86008 6.5401 1.58008 6.8801 1.38008C7.5601 0.980078 8.4401 0.980078 9.1301 1.38008C9.4701 1.58008 9.7501 1.87008 9.9501 2.21008ZM13.7701 13.3001C13.8901 13.2401 13.9801 13.1401 14.0501 13.0301L14.0601 13.0401C14.1301 12.9201 14.1601 12.7901 14.1601 12.6601C14.1601 12.5301 14.1301 12.4001 14.0601 12.2901L8.6601 2.96008C8.5901 2.84008 8.5001 2.74008 8.3801 2.68008C8.2601 2.62008 8.1401 2.58008 8.0001 2.58008C7.8601 2.58008 7.7301 2.61008 7.6201 2.68008C7.5101 2.74008 7.4201 2.84008 7.3501 2.95008L1.9501 12.2901C1.8801 12.4001 1.8501 12.5301 1.8501 12.6601C1.8501 12.7901 1.8801 12.9201 1.9501 13.0301C2.0101 13.1401 2.1101 13.2401 2.2201 13.3001C2.3401 13.3601 2.4701 13.4001 2.6001 13.4001H13.3901C13.5301 13.4001 13.6601 13.3701 13.7701 13.3001Z",fill:"currentColor"})]}),TT=1e3,z0="adyen-pe-reports-table",K0=`${z0}-date-report-type`,AT=`${K0}--date`,V0=["createdAt","dateAndReportType","reportType","reportFile"],ET=({error:e,loading:t,balanceAccountId:n,onContactSupport:r,showPagination:s,data:i,customColumns:o,...c})=>{const{i18n:u}=U(),{dateFormat:l}=rn("UTC"),{freeze:h,frozen:d}=mT(TT),[f,m]=x(null),{refreshing:y}=Ce(),_=A(()=>t||y,[t,y]),T=be(Oe.up.sm),g=be(Oe.down.xs),E=Ga({fields:V0,customColumns:o,columnConfig:A(()=>({dateAndReportType:{visible:g},createdAt:{visible:T},reportType:{visible:T},reportFile:{visible:!0,position:g?"right":void 0}}),[T,g])}),b=C(()=>{m(null)},[]),N={title:"noReportsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},D=A(()=>()=>a(Wa,{error:e,errorMessage:"weCouldNotLoadYourReports",onContactSupport:r}),[e,r]),S=A(()=>a(gT,{}),[]),v=A(()=>R=>{const F={};switch(R==null?void 0:R.errorCode){case"999_429_001":F.title=u.get("error.somethingWentWrongWithDownload"),F.description=u.get("reportsError.tooManyDownloads");break;case"00_500":default:F.title=u.get("error.somethingWentWrongWithDownload"),F.description=u.get("error.pleaseTryAgainLater");break}m(F)},[u]);return t&&m(null),a("div",{className:z0,children:[f&&a(pn,{onClose:b,type:Fe.WARNING,className:"adyen-pe-reports-table-alert",...f}),a(Tn,{errorDisplay:D,error:e,columns:E,data:i,loading:_,outline:!1,emptyTableMessage:N,customCells:{createdAt:({value:R})=>R?R&&a(k,{variant:I.BODY,children:l(R,nl)}):null,dateAndReportType:({item:R})=>a("div",{className:K0,children:[a(k,{variant:I.BODY,stronger:!0,children:u.get(`reportType.${R==null?void 0:R.type}`)}),a(k,{className:AT,variant:I.BODY,children:l(R.createdAt,nl)})]}),reportType:({item:R})=>(R==null?void 0:R.type)&&a(k,{variant:I.BODY,children:u.get(`reportType.${R==null?void 0:R.type}`)}),reportFile:({item:R})=>{const F={query:{balanceAccountId:n,createdAt:R.createdAt,type:R.type}};return a(yT,{className:"adyen-pe-reports-table--download",endpointName:"downloadReport",disabled:d,params:F,onDownloadRequested:h,setError:v,errorDisplay:S})}},children:s&&a(Tn.Footer,{children:a(Ha,{...c})})})]})},NT="adyen-pe-reports-overview",ST=new Date("2024-04-16T00:00:00.000Z").toString(),CT=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=fs,isLoadingBalanceAccount:s,onContactSupport:i,hideTitle:o,dataCustomization:c})=>{var _e,De,pe,ke;const{getReports:u}=Ce().endpoints,{activeBalanceAccount:l,balanceAccountSelectionOptions:h,onBalanceAccountSelection:d}=oc(t),{defaultParams:f,nowTimestamp:m,refreshNowTimestamp:y}=mc("reports",l),_=C(async(fe,Ue)=>u({signal:Ue,errorLevel:"error"},{query:{...fe,type:"payout",createdSince:fe[ee.CREATED_SINCE]??f.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:fe[ee.CREATED_UNTIL]??f.current.defaultFilterParams[ee.CREATED_UNTIL],balanceAccountId:(l==null?void 0:l.id)??""}}),[l==null?void 0:l.id,f,u]),T=Za(),g=A(()=>Q(e)?e:void 0,[e]),E=A(()=>n?tc:void 0,[n]),{canResetFilters:b,error:N,fetching:D,filters:S,limit:v,limitOptions:R,records:F,resetFilters:P,updateFilters:z,updateLimit:j,...ie}=sc({fetchRecords:_,dataField:"data",filterParams:f.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:g,preferredLimit:r,preferredLimitOptions:E,enabled:!!(l!=null&&l.id)&&!!u}),K=C(({records:fe,retrievedData:Ue})=>yc(fe,Ue,(oe,ze)=>oe.createdAt===ze.createdAt),[]),ce=A(()=>{var fe;return _c((fe=c==null?void 0:c.list)==null?void 0:fe.fields,V0)},[(_e=c==null?void 0:c.list)==null?void 0:_e.fields]),{customRecords:Te,loadingCustomRecords:me}=pc({records:F,hasCustomColumn:ce,onDataRetrieve:(De=c==null?void 0:c.list)==null?void 0:De.onDataRetrieve,mergeCustomData:K});return G(()=>{y()},[S,y]),a("div",{className:NT,children:[a(si,{hideTitle:o,titleKey:"reportsTitle",subtitleKey:"reportsNotice",children:a(Xa,{...T})}),a(Qa,{...T,children:[a(ec,{activeBalanceAccount:l,balanceAccountSelectionOptions:h,onBalanceAccountSelection:d}),a(fc,{canResetFilters:b,defaultParams:f,filters:S,nowTimestamp:m,refreshNowTimestamp:y,sinceDate:ST,timezone:"UTC",updateFilters:z})]}),a(ET,{balanceAccountId:l==null?void 0:l.id,loading:D||s||!t||!l||me,data:(pe=c==null?void 0:c.list)!=null&&pe.onDataRetrieve?Te:F,showPagination:!0,limit:v,limitOptions:R,onContactSupport:i,onLimitSelection:j,error:N,customColumns:(ke=c==null?void 0:c.list)==null?void 0:ke.fields,...ie})]})},RT="adyen-pe-reports-overview-container";function vT({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=Jo(e.balanceAccountId);return a(qa,{balanceAccountsError:s,className:RT,errorMessage:"weCouldNotLoadTheReportsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(CT,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class q0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(vT,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>{this.componentRef=n}}));this.componentToRender=this.componentToRender.bind(this)}}B(q0,"type","reports");const cn={base:"adyen-pe-capital-overview",title:"adyen-pe-capital-overview__title",skeleton:"adyen-pe-capital-overview__skeleton",headerSkeleton:"adyen-pe-capital-overview__header-skeleton",skeletonContainer:"adyen-pe-capital-overview__header-skeleton-container",preQualifiedGrant:"adyen-pe-capital-overview__pre-qualified-grant",preQualifiedGrantButton:"adyen-pe-capital-overview__pre-qualified-grant-review-button",errorContainer:"adyen-pe-capital-overview__error-container"},OT="data:image/svg+xml,%3csvg%20width='254'%20height='132'%20viewBox='0%200%20254%20132'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M68.0772%2069.5256C68.0287%2069.3932%2066.6957%2058.4056%2066.6957%2058.4056C66.576%2057.682%2064.6702%2055.0296%2064.4049%2054.5676L53.5013%2036.8958C52.618%2035.639%2051.1199%2036.0946%2050.4728%2036.6244C49.9325%2037.0379%2049.4601%2037.7293%2050.3272%2039.3769C51.7832%2042.1489%2057.4842%2052.9393%2057.4842%2052.9393L55.7144%2056.3348L52.7927%2058.9872C52.9836%2059.3231%2048.6124%2058.4993%2048.6124%2058.4993C48.4798%2058.3313%2050.9776%2071.0117%2057.4421%2074.7529C57.4421%2074.7529%2065.2591%2087.724%2065.0294%2087.8274L73.1635%2078.8397L68.0772%2069.5289V69.5256Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M51.534%2055.2108C51.534%2055.2108%2047.6805%2054.975%2048.6155%2058.4932C49.5506%2062.0146%2053.6079%2068.3984%2055.4069%2066.838C57.2058%2065.2776%2053.2844%2059.5238%2053.2844%2059.5238'%20fill='%23B34B36'/%3e%3cpath%20d='M51.534%2055.2108C51.534%2055.2108%2047.6805%2054.975%2048.6155%2058.4932C49.5506%2062.0146%2053.6079%2068.3984%2055.4069%2066.838C57.2058%2065.2776%2053.2844%2059.5238%2053.2844%2059.5238'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M53.6048%2052.245C53.6048%2052.245%2049.7513%2052.0092%2050.6863%2055.5274C51.6214%2059.0488%2055.6787%2065.4326%2057.4777%2063.8722C59.2766%2062.3118%2055.3552%2056.558%2055.3552%2056.558'%20fill='%23B34B36'/%3e%3cpath%20d='M53.6048%2052.245C53.6048%2052.245%2049.7513%2052.0092%2050.6863%2055.5274C51.6214%2059.0488%2055.6787%2065.4326%2057.4777%2063.8722C59.2766%2062.3118%2055.3552%2056.558%2055.3552%2056.558'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M56.1903%2050.5459C56.1903%2050.5459%2051.8191%2049.0404%2052.7542%2052.5619C53.6893%2056.0833%2057.7466%2062.4671%2059.5455%2060.9067C61.3445%2059.3463%2056.1903%2050.5459%2056.1903%2050.5459Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M66.6955%2058.4029C66.6955%2058.4029%2065.5081%2049.147%2063.7253%2048.0615C61.9425%2046.9759%2057.8852%2043.3641%2056.8142%2044.091C55.7433%2044.8146%2056.1186%2046.4849%2056.8369%2047.4024C57.5552%2048.3199%2061.2469%2051.8381%2061.2469%2051.8381C61.2469%2051.8381%2056.3677%2059.3365%2058.872%2064.8481'%20fill='%23B34B36'/%3e%3cpath%20d='M66.6955%2058.4029C66.6955%2058.4029%2065.5081%2049.147%2063.7253%2048.0615C61.9425%2046.9759%2057.8852%2043.3641%2056.8142%2044.091C55.7433%2044.8146%2056.1186%2046.4849%2056.8369%2047.4024C57.5552%2048.3199%2061.2469%2051.8381%2061.2469%2051.8381C61.2469%2051.8381%2056.3677%2059.3365%2058.872%2064.8481'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M118.833%2023.1365C116.105%2020.3161%20116.157%2017.247%20116.856%2014.7691C116.862%2014.7432%20116.869%2014.7206%20116.879%2014.6948C117.869%2011.3155%20121.479%209.48044%20124.89%2010.3721C127.465%2011.0473%20130.222%2011.1572%20132.907%2011.1442C136.748%2011.1281%20140.66%2010.9116%20144.364%2011.9261C148.069%2012.9373%20150.829%2014.5397%20151.867%2018.2291C163.078%2023.0557%20156.41%2033.3325%20156.41%2033.3325L150.822%2042.3364L127.381%2038.8182C121.855%2038.1236%20117.882%2033.171%20118.406%2027.6368L118.833%2023.1365Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M123.178%2023.6825C121.062%2022.3709%20120.467%2019.2629%20121.677%2017.0887C122.887%2014.9145%20125.56%2013.774%20128.035%2014.0389C129.484%2014.194%20130.853%2014.7658%20132.257%2015.1568C133.661%2015.5477%20135.205%2015.7512%20136.551%2015.1858C137.893%2014.6205%20138.903%2013.0633%20138.424%2011.687'%20stroke='%2385DFA9'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M150.725%2040.7211C150.783%2039.2382%20152.158%2037.9847%20153.64%2037.8813C155.122%2037.778%20156.574%2038.7116%20157.273%2040.0201C157.972%2041.3285%20157.975%2042.9438%20157.474%2044.3395C157.115%2045.3377%20156.487%2046.265%20155.594%2046.84C154.384%2047.6154%20152.792%2047.6541%20151.449%2047.1405C150.107%2046.6268%20149.003%2045.6091%20148.172%2044.4396'%20fill='%23B34B36'/%3e%3cpath%20d='M150.725%2040.7211C150.783%2039.2382%20152.158%2037.9847%20153.64%2037.8813C155.122%2037.778%20156.574%2038.7116%20157.273%2040.0201C157.972%2041.3285%20157.975%2042.9438%20157.474%2044.3395C157.115%2045.3377%20156.487%2046.265%20155.594%2046.84C154.384%2047.6154%20152.792%2047.6541%20151.449%2047.1405C150.107%2046.6268%20149.003%2045.6091%20148.172%2044.4396'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M120.641%2036.9443C120.951%2035.4937%20119.932%2033.9365%20118.521%2033.4713C117.111%2033.0061%20115.474%2033.5489%20114.471%2034.6441C113.468%2035.7393%20113.066%2037.3029%20113.205%2038.7793C113.306%2039.8358%20113.684%2040.889%20114.406%2041.6643C115.386%2042.7143%20116.92%2043.1472%20118.347%2042.9792C119.774%2042.8112%20121.097%2042.1005%20122.194%2041.1733'%20fill='%23B34B36'/%3e%3cpath%20d='M120.641%2036.9443C120.951%2035.4937%20119.932%2033.9365%20118.521%2033.4713C117.111%2033.0061%20115.474%2033.5489%20114.471%2034.6441C113.468%2035.7393%20113.066%2037.3029%20113.205%2038.7793C113.306%2039.8358%20113.684%2040.889%20114.406%2041.6643C115.386%2042.7143%20116.92%2043.1472%20118.347%2042.9792C119.774%2042.8112%20121.097%2042.1005%20122.194%2041.1733'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M153.317%2064.6669H152.567C148.937%2064.6669%20145.995%2061.727%20145.995%2058.1054V49.3535H125.097V58.1054C125.097%2061.7302%20122.153%2064.6669%20118.526%2064.6669H117.775L135.516%2080.7977L153.324%2064.6669H153.317Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M118.293%2043.2381L122.273%2052.6361C122.668%2053.5666%20121.982%2054.5971%20120.972%2054.5971H113.013C112%2054.5971%20111.317%2053.5666%20111.712%2052.6361L115.692%2043.2381C116.177%2042.088%20117.808%2042.088%20118.296%2043.2381H118.293Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M155.138%2047.7447L159.535%2056.9553C159.972%2057.8664%20159.334%2058.926%20158.322%2058.9713L150.372%2059.3266C149.362%2059.3719%20148.631%2058.3736%20148.984%2057.427L152.537%2047.861C152.97%2046.6914%20154.601%2046.6171%20155.138%2047.7447Z'%20fill='%2385DFA9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.543%2056.5576L125.096%2056.1828V53.0781H145.926V56.1828L145.574%2056.48C143.063%2058.609%20139.918%2059.8658%20136.628%2060.0079C135.741%2060.0467%20134.851%2060.0402%20133.968%2059.9853C130.868%2059.7947%20127.924%2058.5477%20125.543%2056.5543V56.5576Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M147.713%2022.2967C141.423%2025.2624%20134.202%2026.2381%20127.355%2024.9911C126.158%2024.7746%20124.919%2024.4354%20123.777%2023.9379C121.457%2026.923%20119.833%2030.7158%20119.296%2034.9674C117.921%2045.9%20124.24%2055.6954%20133.416%2056.8456C142.588%2057.9957%20151.143%2050.0676%20152.518%2039.135C153.346%2032.567%20151.392%2026.4126%20147.71%2022.2935L147.713%2022.2967Z'%20fill='%23B34B36'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M119.625%2020.3711C120.754%2022.2158%20122.595%2023.5275%20124.653%2024.2802'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M132.249%2035.6243C132.444%2034.0771%20131.084%2032.6321%20129.212%2032.397C127.34%2032.1618%20125.664%2033.2254%20125.469%2034.7727C125.274%2036.3199%20126.634%2037.7649%20128.506%2038C130.378%2038.2352%20132.054%2037.1716%20132.249%2035.6243Z'%20fill='white'/%3e%3cpath%20d='M130.497%2041.3389C130.497%2041.3389%20128.646%2044.9152%20133.943%2045.5775C139.239%2046.243%20138.084%2042.2887%20138.084%2042.2887'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.459%2034.7669C125.459%2034.7669%20125.812%2031.9659%20129.199%2032.3923C132.587%2032.8188%20132.234%2035.6198%20132.234%2035.6198'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M127.726%2036.9931C128.968%2036.9931%20129.975%2035.9878%20129.975%2034.7478C129.975%2033.5077%20128.968%2032.5024%20127.726%2032.5024C126.484%2032.5024%20125.478%2033.5077%20125.478%2034.7478C125.478%2035.9878%20126.484%2036.9931%20127.726%2036.9931Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M123.944%2033.5752C123.944%2033.5752%20125.048%2034.9256%20126.161%2034.7609L123.944%2033.5752Z'%20fill='%2300112C'/%3e%3cpath%20d='M123.944%2033.5752C123.944%2033.5752%20125.048%2034.9256%20126.161%2034.7609'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M146.765%2036.4375C146.765%2036.4375%20145.361%2037.4713%20144.325%2037.0384L146.765%2036.4375Z'%20fill='%2300112C'/%3e%3cpath%20d='M146.765%2036.4375C146.765%2036.4375%20145.361%2037.4713%20144.325%2037.0384'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M144.949%2037.2181C145.144%2035.6708%20143.785%2034.2259%20141.912%2033.9907C140.04%2033.7555%20138.364%2034.8192%20138.169%2036.3664C137.974%2037.9137%20139.334%2039.3586%20141.206%2039.5938C143.079%2039.829%20144.754%2038.7653%20144.949%2037.2181Z'%20fill='white'/%3e%3cpath%20d='M138.158%2036.3631C138.158%2036.3631%20138.511%2033.5621%20141.898%2033.9885C145.286%2034.415%20144.933%2037.216%20144.933%2037.216'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M133.784%2046.9853C130.581%2046.5847%20129.06%2048.1031%20129.06%2048.1031C129.06%2048.1031%20128.801%2051.6859%20133.263%2052.2448C137.725%2052.8037%20138.013%2049.3437%20138.013%2049.3437C138.013%2049.3437%20137.223%2047.415%20133.787%2046.982L133.784%2046.9853Z'%20fill='%2389382B'/%3e%3cpath%20d='M128.361%2047.7129C131.526%2049.6093%20135.334%2050.123%20138.89%2049.1344L139.136%2049.0665'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M125.485%2029.0653C126.695%2028.4838%20128.089%2028.2996%20129.41%2028.5419C130.73%2028.7842%20131.966%2029.453%20132.891%2030.4254'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M145.984%2030.8031C145.114%2029.7854%20143.913%2029.052%20142.606%2028.7419C141.302%2028.4318%20139.898%2028.5448%20138.662%2029.0585'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M140.583%2038.6054C141.825%2038.6054%20142.831%2037.6001%20142.831%2036.3601C142.831%2035.12%20141.825%2034.1147%20140.583%2034.1147C139.341%2034.1147%20138.334%2035.12%20138.334%2036.3601C138.334%2037.6001%20139.341%2038.6054%20140.583%2038.6054Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M154.285%2023.02C154.285%2023.02%20156.686%2025.33%20155.223%2030.8027'%20stroke='%2385DFA9'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M124.708%2064.8447C123.245%2064.1016%20121.679%2063.6009%20120.055%2063.3586C115.723%2062.7124%20107.294%2066.8121%20100.011%2070.9603C89.8645%2076.74%2080.3262%2090.0019%2080.3262%2090.0019L69.607%2069.8328C69.2187%2069.1059%2068.2222%2068.9929%2067.6851%2069.6164C64.3784%2073.4447%2054.9081%2084.5744%2055.1475%2086.2447C55.4355%2088.2671%2067.3033%20128.437%2081.1966%20120.348C95.0899%20112.258%20106.087%20102.718%20106.087%20102.718L107.951%20131.494H138.119C138.119%20131.494%20138.216%2078.9821%20138.216%2077.538C138.216%2076.4137%20128.843%2066.9414%20124.704%2064.8414L124.708%2064.8447Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M152.566%2064.6665L138.217%2077.5408L138.12%20131.496H169.899V104.359L185.84%20131.496H211.297C211.297%20131.496%20193.473%2089.0323%20179.767%2074.2487C172.503%2066.4111%20152.566%2064.6665%20152.566%2064.6665Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.9987%201H13.3003V49.1274H15.9987V1Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M13%2024.6216L1%2024.6216'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20opacity='0.75'%20d='M80.2651%201.22607H16.0015V49.3535H80.2651V1.22607Z'%20fill='white'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M80.2651%201H16.0015V49.1274H80.2651V1Z'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M29.8433%2025.0622C29.8433%2023.8378%2030.8398%2022.8428%2032.0661%2022.8428C33.2923%2022.8428%2034.2889%2023.8378%2034.2889%2025.0622C34.2889%2026.2867%2033.2923%2027.2817%2032.0661%2027.2817C30.8398%2027.2817%2029.8433%2026.2867%2029.8433%2025.0622Z'%20fill='%23F7F8F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M64.1984%2027.2817C65.426%2027.2817%2066.4212%2026.288%2066.4212%2025.0622C66.4212%2023.8365%2065.426%2022.8428%2064.1984%2022.8428C62.9708%2022.8428%2061.9756%2023.8365%2061.9756%2025.0622C61.9756%2026.288%2062.9708%2027.2817%2064.1984%2027.2817Z'%20fill='%23F7F8F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M48.1344%2027.2817C49.362%2027.2817%2050.3572%2026.288%2050.3572%2025.0622C50.3572%2023.8365%2049.362%2022.8428%2048.1344%2022.8428C46.9068%2022.8428%2045.9116%2023.8365%2045.9116%2025.0622C45.9116%2026.288%2046.9068%2027.2817%2048.1344%2027.2817Z'%20fill='%23F7F8F9'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20opacity='0.75'%20d='M226.125%20106.581V46.6392H181.1V106.581H226.125Z'%20fill='white'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M180.99%2046.6392H178.469V106.581H180.99V46.6392Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M253%2076.6216H226'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M225.866%2046.6392H212.345V60.1402H225.866V46.6392Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M244.779%2027.5757H214.763V57.5467H244.779V27.5757Z'%20fill='%230ABF53'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M225.499%2043.4868L228.443%2046.4235L236.176%2038.7021'%20stroke='white'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M220.919%20116.949L216.163%2096.2178L234.832%20106.113L220.919%20116.949Z'%20fill='%2300112C'%20stroke='%2300112C'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",bT=({hideTitle:e})=>{const{i18n:t}=U();return a(V,{children:[a(Wn,{hideTitle:e,titleKey:"capital.needSomeExtraMoney"}),a("div",{className:"adyen-pe-capital-overview__unqualified-state",children:[a("div",{className:"adyen-pe-capital-overview__unqualified-state-img",children:a("img",{srcSet:OT,alt:""})}),a(k,{el:ne.PARAGRAPH,variant:I.BODY,large:!0,children:t.get("capital.youWillSoonQualifyForAFinancialOffer")})]})]})},IT=({dynamicOfferConfig:e,hideTitle:t,onOfferOptionsRequest:n})=>{const{i18n:r}=U();return a(V,{children:[a(Wn,{hideTitle:t,titleKey:"capital.needSomeExtraMoney"}),a("div",{className:cn.preQualifiedGrant,children:[a(ai,{children:a(k,{variant:I.BODY,children:[r.get("capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part1"),a("strong",{children:r.get("capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part2",{values:{amount:r.amount(e.maxAmount.value,e.maxAmount.currency,{minimumFractionDigits:0})}})})]})}),a(he,{className:cn.preQualifiedGrantButton,onClick:n,children:r.get("capital.seeOptions")})]})]})},DT=({hideTitle:e,dynamicOffer:t,skipPreQualifiedIntro:n,onOfferOptionsRequest:r,onFundsRequest:s,onOfferDismiss:i})=>{const[o,c]=x(n?"capitalOffer":"intro"),u=C(()=>{r?r():c("capitalOffer")},[r]),l=A(()=>!n||!!i,[i,n]),h=C(()=>{i?i():c("intro")},[i]);return a(V,{children:o==="intro"?a(IT,{hideTitle:e,dynamicOfferConfig:t,onOfferOptionsRequest:u}):a(Sc,{onFundsRequest:s,onOfferDismiss:l?h:void 0,externalDynamicOffersConfig:t})})},kT=({max:e=1,value:t,labels:n,tooltips:r,className:s})=>{const i=A(()=>vt(0,t*100/e,100),[t,e]),o=!!(n!=null&&n.current||n!=null&&n.max),c=(n==null?void 0:n.ariaLabel)??(n!=null&&n.current?`${n.current}: ${t}`:`${t}/${e}`);return a("div",{role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":e,"aria-valuetext":`${i}%`,"aria-label":c,className:M("adyen-pe-progress-bar",s),children:[a("div",{className:"adyen-pe-progress-bar__track",children:[a("div",{className:"adyen-pe-progress-bar__track-background"}),a(Vl,{tooltipContent:r==null?void 0:r.progress,title:n==null?void 0:n.current,percentage:i,className:"adyen-pe-progress-bar__track-fill"}),a(Vl,{tooltipContent:r==null?void 0:r.remaining,title:n==null?void 0:n.max,percentage:100-i,className:"adyen-pe-progress-bar__track-remaining"})]}),o&&a("div",{className:"adyen-pe-progress-bar__legend","aria-hidden":"true",children:[n.current&&a(k,{el:ne.SPAN,variant:I.CAPTION,className:"adyen-pe-progress-bar__legend-label",children:n.current}),n.max&&a(k,{el:ne.SPAN,variant:I.CAPTION,className:"adyen-pe-progress-bar__legend-label",children:n.max})]})]})},Vl=({tooltipContent:e,title:t,percentage:n,className:r})=>{const s=i=>a("div",{className:r,title:i,style:{width:`${n}%`}});return e?a(gn,{content:e,children:s()}):s(t)},At={base:"adyen-pe-grant-item",actionsBar:"adyen-pe-grant-item__actions-bar",alert:"adyen-pe-grant-item__alert",cardContent:"adyen-pe-grant-item__card-content",grantID:"adyen-pe-grant-item__grant-id",mainActionBtn:"adyen-pe-grant-item__main-action-button",progressBar:"adyen-pe-grant-item__progress-bar",statusContainer:"adyen-pe-grant-item__status-container",textSecondary:"adyen-pe-grant-item__text--secondary"},LT=e=>e==="Active",wT=e=>e==="Repaid",PT=e=>e==="Active"?"capital.remaining":"capital.requestedFunds",MT=e=>e.status==="Active"?e.remainingTotalAmount:e.grantAmount,FT=({status:e,missingActions:t})=>{switch(e){case"Active":return;case"Failed":return"capital.failed";case"Pending":return t&&t.length?"capital.actionNeeded":"capital.pending";case"Repaid":return"capital.fullyRepaid";case"Revoked":return"capital.revoked";case"WrittenOff":return"capital.writtenOff"}},xT=({status:e,missingActions:t})=>{switch(e){case"Failed":return Ee.ERROR;case"Pending":return t!=null&&t.length?Ee.WARNING:Ee.DEFAULT;case"Repaid":return Ee.LIGHT;case"Revoked":case"WrittenOff":return Ee.WARNING;default:return Ee.DEFAULT}},BT=e=>{const t=new Date,n=new Date;return n.setDate(t.getDate()+e),n},$T=e=>{var n,r;const t=((n=e.missingActions)==null?void 0:n.some(s=>s.type==="signToS"))||!1;switch(e.status){case"Pending":return(r=e.missingActions)!=null&&r.length?t?"capital.signTheTermsToReceiveYourFunds":void 0:"capital.youShouldGetTheFundsWithinOneBusinessDay";case"Failed":return"capital.weCouldNotProcessThisRequestTryAgain";case"WrittenOff":return"capital.youAcceptedTheseFundsButDidNotRepayThem";case"Revoked":return"capital.youAcceptedButThenReturnedTheseFunds";default:return}},Z0=e=>{var r;const t=e.status==="Active",n=e.status==="Pending";return{amount:MT(e),amountLabelKey:PT(e.status),hasAlerts:n,hasDetails:LT(e.status),hasUnscheduledRepaymentDetails:t&&!!((r=e.unscheduledRepaymentAccounts)!=null&&r.length),isAmountColorSecondary:!t,isBackgroundFilled:wT(e.status),isGrantIdVisible:!t,isLabelColorSecondary:t,isProgressBarVisible:t,repaymentPeriodEndDate:BT(e.repaymentPeriodLeft),statusKey:FT(e),statusTagVariant:xT(e),statusTooltipKey:$T(e)}},Kr={base:"adyen-pe-grant-details",content:"adyen-pe-grant-details__content",header:"adyen-pe-grant-details__header",label:"adyen-pe-grant-details__label"},UT=({grant:e})=>{const{i18n:t}=U(),n=C(s=>t.amount(s.value,s.currency),[t]),r=A(()=>{const s=e.maximumRepaymentPeriodDays?Math.ceil(e.maximumRepaymentPeriodDays/30):null,i=[{key:"capital.remainingAmount",value:t.amount(e.remainingGrantAmount.value,e.remainingGrantAmount.currency)},{key:"capital.remainingFees",value:n(e.remainingFeesAmount)},{key:"capital.repaidAmount",value:n(e.repaidGrantAmount)},{key:"capital.repaidFees",value:n(e.repaidFeesAmount)},{key:"capital.dailyRepaymentRate",value:`${t.get("capital.xPercent",{values:{percentage:Nc(e.repaymentRate)}})}`},{key:"capital.expectedRepaymentPeriod",value:t.get("capital.daysAndDaysLeft",{values:{days:e.expectedRepaymentPeriodDays,daysLeft:e.repaymentPeriodLeft}})},{key:"capital.totalFees",value:n(e.feesAmount)},{key:"capital.totalRepaymentAmount",value:n(e.totalAmount)},{key:"capital.repaymentThreshold",value:n(e.thresholdAmount)},{key:"capital.grantID",value:e.id},{key:"accountDescription",value:e.balanceAccountDescription},{key:"accountID",value:e.balanceAccountCode}];return s&&i.splice(5,0,{key:"capital.maximumRepaymentPeriod",value:t.get("capital.xMonths",{values:{months:s}})}),i},[e,n,t]);return a("div",{className:Kr.base,children:a("div",{className:Kr.content,children:[a("div",{className:Kr.header,children:[a(k,{el:ne.SPAN,variant:I.BODY,children:t.get("capital.yourRequestedFundsWere")}),a(k,{el:ne.SPAN,variant:I.BODY,strongest:!0,children:t.amount(e.grantAmount.value,e.grantAmount.currency)})]}),a(fn,{renderLabel:(s,i)=>i==="capital.repaymentThreshold"?a(gn,{isContainerHovered:!0,content:t.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:bo}}),children:a("span",{children:a(k,{className:Kr.label,el:ne.SPAN,variant:I.CAPTION,children:s})})}):a(k,{className:Kr.label,el:ne.SPAN,variant:I.CAPTION,children:s}),renderValue:s=>a(k,{el:ne.SPAN,stronger:!0,variant:I.CAPTION,children:s}),items:r})]})})},ql={button:"adyen-pe-grant-action__button"},WT=()=>{var e;return((e=window.top)==null?void 0:e.location.href)||window.location.href},HT=e=>{window.top?window.top.location.href=e:window.location.href=e},GT=({action:e,className:t,offerExpiresAt:n})=>{const{i18n:r,updateCore:s}=U(),{dateFormat:i}=rn(),{signToSActionDetails:o}=Ce().endpoints,[c,u]=x(!1),l=C(async()=>{if(e.type==="signToS")return o==null?void 0:o($,{query:{redirectUrl:WT(),locale:r.locale}})},[e,r.locale,o]),{data:h,isFetching:d,error:f}=Ot({fetchOptions:A(()=>({enabled:!!o&&c}),[o,c]),queryFn:l});return G(()=>{const m=h==null?void 0:h.url;m&&HT(m)},[h,c]),f?a(pn,{className:t,type:Fe.CRITICAL,title:r.get("somethingWentWrongTryRefreshingOrComeBackLater"),description:a(he,{className:ql.button,onClick:s,children:r.get("refresh")})}):a(pn,{className:t,type:Fe.WARNING,title:`${r.get("capital.signTermsAndConditionsToReceiveFunds")}${n?` ${r.get("capital.thisOfferExpiresOn",{values:{date:i(n,ad)}})}`:""}`,description:a(he,{className:ql.button,onClick:()=>u(!0),disabled:d,state:d?"loading":void 0,children:r.get("capital.goToTermsAndConditions")})})},YT=({grant:e,showDetails:t})=>{const{i18n:n}=U(),{dateFormat:r}=rn(),s=A(()=>Z0(e),[e]),i=C(()=>t==null?void 0:t("unscheduledRepayment"),[t]),o=A(()=>{var c,u;return a("div",{className:At.cardContent,children:[a("div",{className:At.statusContainer,children:[a(k,{variant:I.CAPTION,className:M({[At.textSecondary]:s.isLabelColorSecondary}),testId:"grant-amount-label",children:n.get(s.amountLabelKey)}),a("div",{children:e.status==="Active"?a(V,{children:[a(k,{variant:I.CAPTION,el:ne.SPAN,children:n.get("capital.termEnds")}),a(k,{variant:I.CAPTION,stronger:!0,el:ne.SPAN,children:r(s.repaymentPeriodEndDate,ad)})]}):s.statusKey?s.statusTooltipKey?a(gn,{content:n.get(s.statusTooltipKey),children:a("div",{children:a(Mt,{label:n.get(s.statusKey),variant:s.statusTagVariant})})}):a(Mt,{label:n.get(s.statusKey),variant:s.statusTagVariant}):null})]}),a(k,{variant:I.TITLE,medium:!0,className:M({[At.textSecondary]:s.isAmountColorSecondary}),children:n.amount(s.amount.value,s.amount.currency)}),s.isProgressBarVisible&&a(kT,{className:At.progressBar,value:e.repaidTotalAmount.value,max:e.totalAmount.value,labels:{current:n.get("capital.repaid"),max:n.get("capital.remaining")},tooltips:{remaining:`${n.amount(e.remainingTotalAmount.value,e.remainingTotalAmount.currency)} ${(c=n.get("capital.remaining"))==null?void 0:c.toLowerCase()}`,progress:`${n.amount(e.repaidTotalAmount.value,e.repaidTotalAmount.currency)} ${(u=n.get("capital.repaid"))==null?void 0:u.toLowerCase()}`}}),s.isGrantIdVisible?a("div",{className:At.grantID,children:a(Bn,{textToCopy:e.id,buttonLabel:n.get("capital.grantID"),isHovered:!0,type:"Text","data-testid":"grant-id-copy-text"})}):null,s.hasAlerts?a(V,{children:e.missingActions&&e.missingActions.length?e.missingActions.map(l=>a(GT,{action:l,className:At.alert,offerExpiresAt:e.offerExpiresAt},l.type)):a(pn,{className:At.alert,type:Fe.HIGHLIGHT,title:n.get("capital.weReceivedYourRequestAndWeAreWorkingOnItNowCheckBackSoon")})}):s.hasUnscheduledRepaymentDetails&&a("div",{className:At.actionsBar,children:a(he,{onClick:i,className:At.mainActionBtn,variant:se.SECONDARY,fullWidth:!0,children:n.get("capital.sendRepayment")})})]})},[n,r,e,s,i]);return a("div",{className:At.base,children:a(gc,{renderHeader:o,filled:s.isBackgroundFilled,inFlow:!0,children:s.hasDetails&&a(UT,{grant:e})})})},jT={revocation:"revocation",unscheduledRepayment:"unscheduledRepayment"},zT=({className:e,content:t,contentClassName:n,textToCopy:r,label:s,labelClassName:i})=>{const{i18n:o}=U();return a("div",{className:e,children:[a("dt",{className:i,children:a(k,{el:ne.SPAN,variant:I.CAPTION,children:o.get(s)})}),a("dd",{className:n,children:r?a(Bn,{buttonLabel:t,textToCopy:r,showCopyTextTooltip:!1,type:"Text"}):a(k,{el:ne.SPAN,variant:I.BODY,children:t})})]})},KT=(e,t=!0)=>{const n=t?" ":" ";return e.replace(/\s+/g,"").replace(/([A-Z\d]{4}(?!$))/gi,`$1${n}`)},VT=e=>{switch(e){case"iban":case"accountNumber":case"routingNumber":case"sortCode":return!0;case"region":default:return!1}},qT=(e,t)=>VT(e)?t:void 0,ZT=(e,t)=>{switch(e){case"iban":return t&&KT(t);default:return t}},XT=e=>{switch(e){case"region":return"capital.bankCountryOrRegion";case"iban":return"capital.bankAccountIban";case"accountNumber":return"capital.bankAccountNumber";case"routingNumber":return"capital.bankRoutingNumber";case"sortCode":return"capital.bankSortCode";default:return e}},ho="adyen-pe-capital-account-details",Ci={detail:`${ho}__detail`,detailContent:`${ho}__detail-content`,detailLabel:`${ho}__detail-label`},QT=({bankAccount:e,className:t})=>{const n=A(()=>{const{accountNumber:r,iban:s,order:i,region:o,...c}=e,u=Object.keys({iban:s,accountNumber:r,...c,region:o}),l=Array.isArray(i)?i.filter(h=>u.includes(h)):u;return[...new Set(l)]},[e]);return a("dl",{className:M(ho,t),children:n.map(r=>{const s=e[r];return s?a(V,{children:a(zT,{className:Ci.detail,contentClassName:Ci.detailContent,labelClassName:Ci.detailLabel,label:XT(r),content:ZT(r,s),textToCopy:qT(r,s)})},r):null})})},JT=({children:e,className:t,headerTitleKey:n,headerSubtitleKey:r,onDetailsClose:s})=>{const{i18n:i}=U();return a("div",{className:M("adyen-pe-grant-adjustment-details",t),children:[a(si,{titleKey:n,subtitleKey:r,children:a(he,{onClick:s,variant:se.TERTIARY,iconButton:!0,classNameModifiers:["circle"],"aria-label":i.get("dismiss"),children:a(Ze,{name:"cross"})})}),e]})},ts="adyen-pe-grant-repayment-details",eo={balanceInfo:`${ts}__balance-info`,repaymentInfo:`${ts}__repayment-info`,repaymentAccount:`${ts}__repayment-account`,repaymentNotice:`${ts}__repayment-notice`},eA=({grant:e,onDetailsClose:t})=>{const{i18n:n}=U(),r=A(()=>{var i;return(i=e.unscheduledRepaymentAccounts)==null?void 0:i[0]},[e.unscheduledRepaymentAccounts]),s=A(()=>{const{currency:i,value:o}=e.remainingTotalAmount;return n.amount(o,i)},[n,e.remainingTotalAmount]);return r?a(JT,{className:ts,onDetailsClose:t,headerTitleKey:"capital.sendRepayment",headerSubtitleKey:"capital.sendRepaymentSubtitle",children:[a("div",{className:eo.repaymentInfo,children:[a("section",{className:eo.repaymentAccount,children:[a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:n.get("capital.bankAccountDetails")}),a(QT,{bankAccount:r})]}),a("section",{className:eo.repaymentNotice,children:a(k,{el:ne.PARAGRAPH,variant:I.CAPTION,children:n.get("capital.sendRepaymentNotice")})})]}),a(ai,{className:eo.balanceInfo,children:a(k,{variant:I.BODY,children:a(ia,{translationKey:"capital.repaymentBalanceInfo",fills:{amount:a(k,{el:ne.SPAN,variant:I.BODY,strongest:!0,children:s})}})})})]}):null};function tA(e){const t=e.tabs,{i18n:n}=U(),r=e.defaultActiveTab?e.tabs.findIndex(l=>l.id===e.defaultActiveTab):0,[s,i]=x(r===-1?0:r),o=Y({}),c=C(l=>{const h=o.current[l];h==null||h.focus()},[]),u=A(()=>{const l=t.length,h={[q.ARROW_RIGHT]:()=>c((s+1)%l),[q.ARROW_LEFT]:()=>c((s-1+l)%l),[q.HOME]:()=>c(0),[q.END]:()=>c(l-1)};return d=>{var f;h[d.key]&&(d.preventDefault(),(f=h[d.key])==null||f.call(h))}},[t.length,s,c]);return a("section",{"aria-label":n.get("tabs"),children:[a("div",{className:"adyen-fp-tabs",role:"tablist","aria-orientation":"horizontal",children:t.map((l,h)=>a("button",{id:`tab-id-${l.id}`,name:l.id,className:"adyen-fp-tabs__tab",role:"tab","aria-controls":`panel-id-${l.id}`,"aria-selected":s===h,ref:d=>o.current[h]=d,onKeyDown:u,onClick:h===s?void 0:()=>i(h),onFocus:()=>i(h),tabIndex:s===h?0:-1,disabled:l.disabled,children:a(k,{variant:I.BODY,el:ne.SPAN,stronger:!0,className:"adyen-fp-tabs__tab-content-tab-label",children:n.get(l.label)})},`tab-${l.id}`))}),a("div",{className:"adyen-fp-tabpanel__wrapper",children:t.map((l,h)=>a("section",{className:"adyen-fp-tabpanel__content",id:`panel-id-${l.id}`,hidden:s!==h,role:"tabpanel","aria-labelledby":`tab-id-${l.id}`,children:l.content},`tabpanel-${l.id}`))})]})}const Ri=({grants:e,showDetails:t})=>a(Ac,{classNames:"adyen-pe-grant-list__items",children:e.map(n=>a("li",{children:a(YT,{grant:n,showDetails:t.bind(null,n)})},n.id))}),nA=({grantList:e,hideTitle:t,newOfferAvailable:n,onNewOfferRequest:r})=>{const[s,i]=x(),[o,c]=x(),{i18n:u}=U(),[l,h]=A(()=>{const T=[],g=[];return e==null||e.forEach(E=>{E.status==="Active"||E.status==="Pending"?T.push(E):g.push(E)}),[T,g]},[e]),d=A(()=>e.length>1&&l.length&&h.length?"Tabs":"SingleGrant",[l.length,e.length,h.length]),f=A(()=>n&&!l.some(T=>T.status==="Pending"),[l,n]),m=A(()=>o&&Z0(o),[o]),y=C(()=>i(void 0),[]),_=C((T,g)=>{i(g),c(T)},[]);if(o)switch(s){case jT.unscheduledRepayment:{if(m!=null&&m.hasUnscheduledRepaymentDetails)return a(eA,{grant:o,onDetailsClose:y});break}}return a("div",{className:"adyen-pe-grant-list",children:[a("div",{className:"adyen-pe-grant-list__header-container",children:[a(Wn,{hideTitle:t,titleKey:"capital.businessFinancing"}),f?a(he,{onClick:r,className:"adyen-pe-grant-list__offer-button",variant:se.SECONDARY,children:u.get("capital.seeNewOffer")}):null]}),d==="SingleGrant"&&a(Ri,{grants:e,showDetails:_}),d==="Tabs"&&a(tA,{tabs:[{label:"capital.inProgress",content:a(Ri,{grants:l,showDetails:_}),id:"active"},{label:"capital.closed",content:a(Ri,{grants:h,showDetails:_}),id:"inactive"}],defaultActiveTab:"active"})]})},rA=({externalDynamicOffersConfig:e,grantList:t,newOfferAvailable:n,onFundsRequest:r,onGrantListUpdateRequest:s,onOfferDismiss:i})=>{const[o,c]=x(!1),u=C(()=>c(!1),[]),l=C(()=>c(!0),[]),h=C(()=>{i?i(u):u()},[u,i]),d=C(f=>{r?r(f):(s(f),c(!1))},[r,s]);return a(V,{children:o?a(Sc,{externalDynamicOffersConfig:e,onFundsRequest:d,onOfferDismiss:h}):a(nA,{grantList:t,newOfferAvailable:n,onNewOfferRequest:l})})},sA=({hideTitle:e,onContactSupport:t,onFundsRequest:n,onOfferDismiss:r,onOfferOptionsRequest:s,skipPreQualifiedIntro:i})=>{var N,D,S;const o=(D=(N=Ce())==null?void 0:N.extraConfig)==null?void 0:D.legalEntity,c=A(()=>Ec(o),[o]),{getGrants:u,getDynamicGrantOffersConfiguration:l}=Ce().endpoints,h=Ot({fetchOptions:{enabled:!!u&&c},queryFn:C(async()=>u==null?void 0:u($),[u])}),d=Ot({fetchOptions:{enabled:!!l&&c},queryFn:C(async()=>l==null?void 0:l($),[l])}),f=d.data,[m,y]=x(),_=A(()=>{var v,R;return m?[m,...((v=h.data)==null?void 0:v.data)||[]]:(R=h.data)==null?void 0:R.data},[(S=h.data)==null?void 0:S.data,m]),T=C(v=>{n?n(v):y(v)},[n]),g=A(()=>!!(d.error&&h.error||d.error&&!(_!=null&&_.length)),[d.error,_==null?void 0:_.length,h.error]),E=A(()=>{if(c){if(g)return"Error";if(!u&&!l||!f&&!_||h.isFetching||d.isFetching)return"Loading";if(_!=null&&_.length)return"GrantList";if(f!=null&&f.maxAmount&&(f!=null&&f.minAmount))return"PreQualified"}else return"UnsupportedRegion";return"Unqualified"},[l,f,d.isFetching,_,u,h.isFetching,g,c]),b=A(()=>!!(f&&f.minAmount&&f.maxAmount),[f]);return a("div",{className:cn.base,children:(()=>{switch(E){case"Loading":return a("div",{className:cn.skeletonContainer,children:[a("div",{className:cn.headerSkeleton}),a("div",{className:cn.skeleton})]});case"Error":return a("div",{className:cn.errorContainer,children:[a(Wn,{hideTitle:e,titleKey:"capital.businessFinancing"}),a(en,{absolutePosition:!1,outlined:!1,withImage:!0,onContactSupport:t,...G0(d.error,t)})]});case"GrantList":return _&&a(rA,{externalDynamicOffersConfig:f,grantList:_,hideTitle:e,newOfferAvailable:b,onFundsRequest:n,onGrantListUpdateRequest:y,onOfferDismiss:r});case"PreQualified":return a(DT,{onOfferDismiss:r,onOfferOptionsRequest:s,skipPreQualifiedIntro:i,hideTitle:e,dynamicOffer:f,onFundsRequest:T});case"Unqualified":return a(bT,{hideTitle:e});case"UnsupportedRegion":return a("div",{className:cn.errorContainer,children:[a(Wn,{hideTitle:e,titleKey:"capital.businessFinancing"}),a(ii,{unsupportedRegion:!0})]});default:return null}})()})};class X0 extends jn{constructor(n){super(n);B(this,"componentToRender",()=>a(sA,{...this.props,ref:n=>void(this.componentRef=n)}));this.customClassNames="adyen-pe-capital-overview-component",this.componentToRender=this.componentToRender.bind(this)}async getState(){var l,h;const{session:n}=this.props.core;await Qu(n);const{getDynamicGrantOffersConfiguration:r,getGrants:s}=n.context.endpoints,i=(l=n.context.extraConfig)==null?void 0:l.legalEntity;if(!Ec(i))return{state:"isInUnsupportedRegion"};const[o,c]=await Promise.all([r==null?void 0:r($).catch(te),s==null?void 0:s($).catch(te)]);let u="isUnqualified";return c&&((h=c.data)==null?void 0:h.length)>0?u="hasRequestedGrants":o&&o.minAmount&&(u="isPreQualified"),{state:u}}}B(X0,"type","capitalOverview");async function oA(e){return await new ma(e).initialize()}exports.AdyenPlatformExperience=oA;exports.CapitalOfferElement=j0;exports.CapitalOverviewElement=X0;exports.Core=ma;exports.PayoutElement=Ud;exports.PayoutsElement=D0;exports.ReportsElement=q0;exports.TransactionElement=k0;exports.TransactionsElement=W0;exports.all_locales=ua;exports.da_DK=mu;exports.de_DE=pu;exports.en_US=po;exports.es_ES=_u;exports.fi_FI=yu;exports.fr_FR=gu;exports.it_IT=Tu;exports.nl_NL=Au;exports.no_NO=Eu;exports.pt_BR=Nu;exports.sv_SE=Su;exports.u=a;
|
|
12
|
+
//# sourceMappingURL=index-LzoB__Hj.cjs.map
|