@adyen/adyen-platform-experience-web 1.4.1 → 1.5.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/README.md +12 -13
- package/dist/adyen-platform-experience-web.css +1 -1
- package/dist/{angle-right-DpuNqT0j.cjs → angle-right-B2I_t62j.cjs} +2 -2
- package/dist/{angle-right-DpuNqT0j.cjs.map → angle-right-B2I_t62j.cjs.map} +1 -1
- package/dist/{checkmark-CC7Mmd_x.cjs → checkmark-CIwP_FdK.cjs} +2 -2
- package/dist/{checkmark-CC7Mmd_x.cjs.map → checkmark-CIwP_FdK.cjs.map} +1 -1
- package/dist/{checkmark-circle-fill-1IL4ERtO.cjs → checkmark-circle-fill-Cw5UXqzN.cjs} +2 -2
- package/dist/{checkmark-circle-fill-1IL4ERtO.cjs.map → checkmark-circle-fill-Cw5UXqzN.cjs.map} +1 -1
- package/dist/{checkmark-square-fill-Bu2jdGU3.cjs → checkmark-square-fill-BwkQfKCG.cjs} +2 -2
- package/dist/{checkmark-square-fill-Bu2jdGU3.cjs.map → checkmark-square-fill-BwkQfKCG.cjs.map} +1 -1
- package/dist/{chevron-down-BVCFqkLo.cjs → chevron-down-BuYiZOY7.cjs} +2 -2
- package/dist/{chevron-down-BVCFqkLo.cjs.map → chevron-down-BuYiZOY7.cjs.map} +1 -1
- package/dist/{chevron-left-DfGEXTbq.cjs → chevron-left-DhRCcHqQ.cjs} +2 -2
- package/dist/{chevron-left-DfGEXTbq.cjs.map → chevron-left-DhRCcHqQ.cjs.map} +1 -1
- package/dist/{chevron-right-DzkYlomK.cjs → chevron-right-DvPR8FD2.cjs} +2 -2
- package/dist/{chevron-right-DzkYlomK.cjs.map → chevron-right-DvPR8FD2.cjs.map} +1 -1
- package/dist/{chevron-up-CpmBSOon.cjs → chevron-up-DFrrO8PJ.cjs} +2 -2
- package/dist/{chevron-up-CpmBSOon.cjs.map → chevron-up-DFrrO8PJ.cjs.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{copy-DuV1z0-c.cjs → copy-Bl3l133y.cjs} +2 -2
- package/dist/{copy-DuV1z0-c.cjs.map → copy-Bl3l133y.cjs.map} +1 -1
- package/dist/{cross-C5L4gQrS.cjs → cross-BtdvCTEP.cjs} +2 -2
- package/dist/{cross-C5L4gQrS.cjs.map → cross-BtdvCTEP.cjs.map} +1 -1
- package/dist/{cross-circle-fill-D6Ir0xDO.cjs → cross-circle-fill-BBjJLOad.cjs} +2 -2
- package/dist/{cross-circle-fill-D6Ir0xDO.cjs.map → cross-circle-fill-BBjJLOad.cjs.map} +1 -1
- package/dist/da-DK-qSZWEjaU.cjs +2 -0
- package/dist/da-DK-qSZWEjaU.cjs.map +1 -0
- package/dist/de-DE-Dngq7NwF.cjs +2 -0
- package/dist/de-DE-Dngq7NwF.cjs.map +1 -0
- package/dist/{download-IwqY_7gX.cjs → download-Cqu4yqTE.cjs} +2 -2
- package/dist/{download-IwqY_7gX.cjs.map → download-Cqu4yqTE.cjs.map} +1 -1
- package/dist/es/components/external/CapitalOffer/components/CapitalOffer/CapitalOffer.js +14 -14
- package/dist/es/components/external/CapitalOffer/components/CapitalOfferSelection/CapitalOfferSelection.js +20 -20
- package/dist/es/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.js +73 -62
- package/dist/es/components/external/CapitalOffer/components/utils/utils.js +16 -16
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetail.js +3 -3
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/AccountDetails.js +3 -3
- package/dist/es/components/external/CapitalOverview/components/AccountDetails/utils.js +3 -3
- package/dist/es/components/external/CapitalOverview/components/GrantAction/GrantAction.js +6 -6
- package/dist/es/components/external/CapitalOverview/components/GrantAdjustmentDetails/constants.js +0 -1
- package/dist/es/components/external/CapitalOverview/components/GrantDetails/GrantDetails.js +2 -2
- package/dist/es/components/external/CapitalOverview/components/GrantItem/utils.js +14 -14
- package/dist/es/components/external/CapitalOverview/components/GrantList/GrantList.js +2 -2
- package/dist/es/components/external/CapitalOverview/components/GrantList/GrantsDisplay.js +29 -29
- package/dist/es/components/external/CapitalOverview/components/GrantRepaymentDetails/GrantRepaymentDetails.js +1 -1
- package/dist/es/components/external/CapitalOverview/components/PreQualified/PreQualified.js +13 -13
- package/dist/es/components/external/CapitalOverview/components/Unqualified.js +2 -2
- package/dist/es/components/external/CapitalOverview/constants.js +0 -1
- package/dist/es/components/external/PayoutDetails/components/PayoutData.js +21 -21
- package/dist/es/components/external/PayoutsOverview/components/PayoutsOverview/PayoutsOverview.js +17 -17
- package/dist/es/components/external/PayoutsOverview/components/PayoutsTable/PayoutsTable.js +4 -4
- package/dist/es/components/external/ReportsOverview/components/ReportsOverview/ReportsOverview.js +16 -16
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +1 -1
- package/dist/es/components/external/TransactionDetails/components/TransactionData/TransactionDataContent.js +20 -20
- package/dist/es/components/external/TransactionDetails/components/details/TransactionDataProperties.js +4 -4
- package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundAmount.js +8 -8
- package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundNotice.js +1 -1
- package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundReason.js +2 -2
- package/dist/es/components/external/TransactionDetails/context/details/context.js +10 -10
- package/dist/es/components/external/TransactionDetails/context/refund/context.js +1 -1
- package/dist/es/components/external/TransactionDetails/context/refund/hooks/useRefundContextLineItems.js +2 -2
- package/dist/es/components/external/TransactionDetails/hooks/useTransaction/transactionNavigator/createDuplexTransactionNavigator.js +20 -20
- package/dist/es/components/external/TransactionDetails/hooks/useTransaction/useTransaction.js +3 -3
- package/dist/es/components/external/TransactionsOverview/components/AmountSkeleton/AmountSkeleton.js +2 -2
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItem.js +4 -4
- package/dist/es/components/external/TransactionsOverview/components/SummaryItem/SummaryItemLabel.js +3 -3
- package/dist/es/components/external/TransactionsOverview/components/TransactionTotals/TotalsCard.js +8 -8
- package/dist/es/components/external/TransactionsOverview/components/TransactionsOverview/TransactionsOverview.js +66 -66
- package/dist/es/components/external/TransactionsOverview/components/TransactionsTable/TransactionsTable.js +19 -19
- package/dist/es/components/external/TransactionsOverview/hooks/useTransactionsOverviewMultiSelectionFilters.js +3 -3
- package/dist/es/components/internal/Accordion/Accordion.js +10 -10
- package/dist/es/components/internal/Alert/Alert.js +1 -1
- package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +5 -5
- package/dist/es/components/internal/Button/hooks/useButton.js +7 -7
- package/dist/es/components/internal/Calendar/calendar/facade/Calendar.js +104 -104
- package/dist/es/components/internal/Calendar/calendar/facade/index.js +12 -12
- package/dist/es/components/internal/Calendar/calendar/timeframe/common/flags.js +14 -14
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/MonthFrame.js +4 -4
- package/dist/es/components/internal/Calendar/calendar/timeframe/frames/TimeFrame.js +58 -58
- package/dist/es/components/internal/Calendar/calendar/timerange/factory.js +4 -4
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/lastNDays.js +3 -3
- package/dist/es/components/internal/Calendar/calendar/timerange/presets/shared/offsetWeek.js +2 -2
- package/dist/es/components/internal/Calendar/calendar/timerange/utils.js +7 -7
- package/dist/es/components/internal/Calendar/calendar/timeslice/index.js +6 -6
- package/dist/es/components/internal/Calendar/calendar/utils.js +22 -22
- package/dist/es/components/internal/Calendar/components/CalendarGrid/CalendarGridDayOfWeek.js +11 -11
- package/dist/es/components/internal/Calendar/components/CalendarGrid/utils.js +22 -22
- package/dist/es/components/internal/Calendar/hooks/useCalendar.js +7 -7
- package/dist/es/components/internal/Calendar/hooks/useTimezone.js +12 -12
- package/dist/es/components/internal/CapitalHeader/constants.js +4 -4
- package/dist/es/components/internal/CapitalHeader/helpers.js +14 -12
- package/dist/es/components/internal/Card/Card.js +9 -9
- package/dist/es/components/internal/DataGrid/DataGridCell.js +8 -8
- package/dist/es/components/internal/DataGrid/components/TableCells.js +16 -16
- package/dist/es/components/internal/DataOverviewDetails/DataOverviewDetails.js +13 -13
- package/dist/es/components/internal/DataOverviewDetails/useDataOverviewDetailsTitle.js +8 -8
- package/dist/es/components/internal/DataOverviewDisplay/DataDetailsModal.js +5 -5
- package/dist/es/components/internal/DataOverviewDisplay/DataOverviewHeader/DataOverviewHeader.js +3 -3
- package/dist/es/components/internal/DatePicker/components/TimeRangeSelector/useTimeRangeSelection.js +29 -29
- package/dist/es/components/internal/ErrorMessageDisplay/ErrorMessageDisplay.js +1 -2
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +53 -42
- package/dist/es/components/internal/FilterBar/components/FilterButton/FilterButton.js +2 -2
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/AmountFilter.js +31 -31
- package/dist/es/components/internal/FilterBar/filters/AmountFilter/RangeSelection.js +33 -33
- package/dist/es/components/internal/FilterBar/filters/BaseFilter/BaseFilter.js +15 -15
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilter.js +2 -2
- package/dist/es/components/internal/FilterBar/filters/DateFilter/DateFilterCore.js +9 -9
- package/dist/es/components/internal/FormFields/InputBase.js +5 -5
- package/dist/es/components/internal/FormFields/Select/Select.js +15 -15
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +43 -43
- package/dist/es/components/internal/FormFields/Select/components/SelectList.js +14 -14
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +5 -5
- package/dist/es/components/internal/FormFields/Select/hooks/useSelect.js +2 -2
- package/dist/es/components/internal/Header/Header.js +4 -4
- package/dist/es/components/internal/Icon/Icon.js +5 -3
- package/dist/es/components/internal/Img/Img.js +2 -2
- package/dist/es/components/internal/Link/Link.js +2 -2
- package/dist/es/components/internal/Modal/Modal.js +4 -4
- package/dist/es/components/internal/Pagination/hooks/useCursorPagination.js +12 -12
- package/dist/es/components/internal/Pagination/hooks/usePagination.js +22 -22
- package/dist/es/components/internal/Popover/Popover.js +4 -4
- package/dist/es/components/internal/ProgressBar/ProgressBar.js +3 -3
- package/dist/es/components/internal/SVGIcons/Checkmark.js +3 -3
- package/dist/es/components/internal/SVGIcons/ChevronLeft.js +12 -10
- package/dist/es/components/internal/SVGIcons/ChevronRight.js +12 -10
- package/dist/es/components/internal/SVGIcons/CloseCircle.js +1 -1
- package/dist/es/components/internal/SegmentedControl/SegmentedControl.js +55 -0
- package/dist/es/components/internal/StructuredList/StructuredList.js +4 -4
- package/dist/es/components/internal/Translation/Translation.js +15 -15
- package/dist/es/components/utils/getErrorMessage.js +2 -2
- package/dist/es/constants/dateFormats.js +3 -3
- package/dist/es/core/ConfigContext/context.js +18 -18
- package/dist/es/core/ConfigContext/session/AuthSession.js +36 -36
- package/dist/es/core/ConfigContext/session/AuthSessionSpecification.js +7 -7
- package/dist/es/core/ConfigContext/session/SetupContext.js +5 -5
- package/dist/es/core/ConfigContext/session/constants.js +8 -8
- package/dist/es/core/ConfigContext/session/utils/sessionReady.js +5 -5
- package/dist/es/core/Http/utils.js +1 -1
- package/dist/es/core/Localization/Localization.js +32 -32
- package/dist/es/core/Localization/datetime/restamper/constants.js +3 -3
- package/dist/es/core/Localization/datetime/restamper/restamper.js +1 -1
- package/dist/es/core/Localization/utils.js +1 -1
- package/dist/es/core/core.js +1 -1
- package/dist/es/external/preact/compat/dist/compat.module.js +40 -40
- package/dist/es/external/preact/dist/preact.module.js +197 -195
- package/dist/es/external/preact/hooks/dist/hooks.module.js +71 -67
- package/dist/es/external/preact/jsx-runtime/dist/jsxRuntime.module.js +9 -9
- package/dist/es/hooks/element/useDetachedRender.js +11 -11
- package/dist/es/hooks/element/useFocusTrap.js +5 -5
- package/dist/es/hooks/useBalanceAccountSelection.js +10 -10
- package/dist/es/hooks/useCommitAction/useCommitAction.js +7 -7
- package/dist/es/hooks/useContainerQuery.js +4 -4
- package/dist/es/hooks/useCustomColumnsData.js +2 -2
- package/dist/es/hooks/useDefaultOverviewFilterParams.js +18 -18
- package/dist/es/hooks/useFetch.js +22 -22
- package/dist/es/hooks/useModalDetails/useModalDetails.js +7 -7
- package/dist/es/hooks/useMutation/useMutation.js +3 -3
- package/dist/es/hooks/useReactiveState/useReactiveState.js +21 -21
- package/dist/es/hooks/useResponsiveContainer.js +7 -10
- package/dist/es/hooks/useTabbedControl.js +66 -0
- package/dist/es/images/icons/trash-can.svg.js +9 -0
- package/dist/es/images/icons/upload.svg.js +9 -0
- package/dist/es/primitives/async/abortable/main.js +9 -9
- package/dist/es/primitives/async/deferred/main.js +1 -1
- package/dist/es/primitives/auxiliary/errorContainer/main.js +9 -9
- package/dist/es/primitives/auxiliary/indexed/helpers.js +4 -4
- package/dist/es/primitives/auxiliary/indexed/main.js +7 -7
- package/dist/es/primitives/context/session/internal/autofresher.js +15 -15
- package/dist/es/primitives/context/session/internal/deadline.js +22 -22
- package/dist/es/primitives/context/session/internal/refresher.js +19 -19
- package/dist/es/primitives/dom/tabbableRoot/tabbable.js +3 -3
- package/dist/es/primitives/reactive/eventEmitter/main.js +3 -3
- package/dist/es/primitives/reactive/reflex/main.js +22 -22
- package/dist/es/primitives/reactive/reflex/register.js +25 -25
- package/dist/es/primitives/reactive/watchlist/main.js +24 -24
- package/dist/es/primitives/time/clock/main.js +6 -6
- package/dist/es/primitives/time/interval/main.js +9 -9
- package/dist/es/translations/da-DK.json.js +55 -46
- package/dist/es/translations/de-DE.json.js +67 -58
- package/dist/es/translations/en-US.json.js +79 -70
- package/dist/es/translations/es-ES.json.js +91 -82
- package/dist/es/translations/fi-FI.json.js +93 -84
- package/dist/es/translations/fr-FR.json.js +75 -66
- package/dist/es/translations/it-IT.json.js +95 -86
- package/dist/es/translations/nl-NL.json.js +92 -83
- package/dist/es/translations/no-NO.json.js +71 -62
- package/dist/es/translations/pt-BR.json.js +67 -58
- package/dist/es/translations/sv-SE.json.js +95 -86
- package/dist/es/utils/abort/internals.js +3 -3
- package/dist/es/utils/abort/main.js +19 -19
- package/dist/es/utils/collection/main.js +14 -14
- package/dist/es/utils/datetime/main.js +3 -3
- package/dist/es/utils/preact/className.js +2 -2
- package/dist/es/utils/struct/main.js +8 -8
- package/dist/es/utils/value/is.js +9 -9
- package/dist/es/utils/value/number.js +2 -2
- package/dist/es-ES-Bjddx94n.cjs +2 -0
- package/dist/es-ES-Bjddx94n.cjs.map +1 -0
- package/dist/{external-link-r39cGU4L.cjs → external-link-CqDz5BtK.cjs} +2 -2
- package/dist/{external-link-r39cGU4L.cjs.map → external-link-CqDz5BtK.cjs.map} +1 -1
- package/dist/fi-FI-CNpmToDG.cjs +2 -0
- package/dist/fi-FI-CNpmToDG.cjs.map +1 -0
- package/dist/{filter-BGBP3TAU.cjs → filter-DLAt7sYb.cjs} +2 -2
- package/dist/{filter-BGBP3TAU.cjs.map → filter-DLAt7sYb.cjs.map} +1 -1
- package/dist/fr-FR-CUUHB8JU.cjs +2 -0
- package/dist/fr-FR-CUUHB8JU.cjs.map +1 -0
- package/dist/index-DbNUA_xB.cjs +12 -0
- package/dist/index-DbNUA_xB.cjs.map +1 -0
- package/dist/{info-filled-C_zUEZ2b.cjs → info-filled-B9fmmNGT.cjs} +2 -2
- package/dist/{info-filled-C_zUEZ2b.cjs.map → info-filled-B9fmmNGT.cjs.map} +1 -1
- package/dist/it-IT-B-E80zCo.cjs +2 -0
- package/dist/it-IT-B-E80zCo.cjs.map +1 -0
- package/dist/{minus-circle-outline-1CJ3DOVB.cjs → minus-circle-outline-JkeH7g3f.cjs} +2 -2
- package/dist/{minus-circle-outline-1CJ3DOVB.cjs.map → minus-circle-outline-JkeH7g3f.cjs.map} +1 -1
- package/dist/nl-NL--CGhOJhH.cjs +2 -0
- package/dist/nl-NL--CGhOJhH.cjs.map +1 -0
- package/dist/no-NO-D0UNXgzr.cjs +2 -0
- package/dist/no-NO-D0UNXgzr.cjs.map +1 -0
- package/dist/{plus-circle-outline-CPQ_oOtQ.cjs → plus-circle-outline-Cmz1Lb00.cjs} +2 -2
- package/dist/{plus-circle-outline-CPQ_oOtQ.cjs.map → plus-circle-outline-Cmz1Lb00.cjs.map} +1 -1
- package/dist/pt-BR-Du4cDUgf.cjs +2 -0
- package/dist/pt-BR-Du4cDUgf.cjs.map +1 -0
- package/dist/{square-BmHyYgat.cjs → square-Bow_5TP1.cjs} +2 -2
- package/dist/{square-BmHyYgat.cjs.map → square-Bow_5TP1.cjs.map} +1 -1
- package/dist/sv-SE-C92aO-iv.cjs +2 -0
- package/dist/sv-SE-C92aO-iv.cjs.map +1 -0
- package/dist/trash-can-DLEmgXUG.cjs +2 -0
- package/dist/trash-can-DLEmgXUG.cjs.map +1 -0
- package/dist/types/components/external/CapitalOffer/components/CapitalOfferSummary/CapitalOfferSummary.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts +1 -1
- package/dist/types/components/external/CapitalOffer/components/utils/utils.d.ts.map +1 -1
- package/dist/types/components/external/TransactionDetails/components/utils.d.ts +1 -1
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +71 -0
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -1
- package/dist/types/components/internal/CapitalHeader/constants.d.ts +2 -1
- package/dist/types/components/internal/CapitalHeader/constants.d.ts.map +1 -1
- package/dist/types/components/internal/CapitalHeader/helpers.d.ts.map +1 -1
- package/dist/types/components/internal/ExpandableCard/ExpandableCard.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +3 -3
- package/dist/types/components/internal/FormFields/Select/hooks/useSelect.d.ts +1 -1
- package/dist/types/components/internal/Icon/Icon.d.ts +2 -0
- package/dist/types/components/internal/Icon/Icon.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/CheckedBox.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/Checkmark.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronDown.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/ChevronUp.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/CloseCircle.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/Download.d.ts +1 -1
- package/dist/types/components/internal/SVGIcons/Download.d.ts.map +1 -1
- package/dist/types/components/internal/SVGIcons/UncheckedBox.d.ts +1 -1
- package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts +5 -0
- package/dist/types/components/internal/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/types/components/internal/SegmentedControl/types.d.ts +14 -0
- package/dist/types/components/internal/SegmentedControl/types.d.ts.map +1 -0
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +1 -1
- package/dist/types/components/utils/getLabel.d.ts +1 -1
- package/dist/types/core/ConfigContext/context.d.ts +2 -0
- package/dist/types/core/ConfigContext/context.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts +4 -0
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts +2 -0
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts.map +1 -1
- package/dist/types/hooks/useTabbedControl.d.ts +19 -0
- package/dist/types/hooks/useTabbedControl.d.ts.map +1 -0
- package/dist/types/translations/index.d.ts +9 -0
- package/dist/types/translations/index.d.ts.map +1 -1
- package/dist/types/types/api/resources/CapitalResource.d.ts +1 -0
- package/dist/types/types/api/resources/CapitalResource.d.ts.map +1 -1
- package/dist/types/utils/file/read.d.ts +5 -0
- package/dist/types/utils/file/read.d.ts.map +1 -0
- package/dist/types/utils/file/size.d.ts +45 -0
- package/dist/types/utils/file/size.d.ts.map +1 -0
- package/dist/types/utils/file/upload.d.ts +17 -0
- package/dist/types/utils/file/upload.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/upload-DWOtVcWc.cjs +2 -0
- package/dist/upload-DWOtVcWc.cjs.map +1 -0
- package/dist/{warning-eizPFTg-.cjs → warning-DNUR39rT.cjs} +2 -2
- package/dist/{warning-eizPFTg-.cjs.map → warning-DNUR39rT.cjs.map} +1 -1
- package/dist/{warning-filled-CiVuOE_O.cjs → warning-filled-qxDqTfWV.cjs} +2 -2
- package/dist/{warning-filled-CiVuOE_O.cjs.map → warning-filled-qxDqTfWV.cjs.map} +1 -1
- package/package.json +16 -15
- package/dist/da-DK-DHGqGo8Q.cjs +0 -2
- package/dist/da-DK-DHGqGo8Q.cjs.map +0 -1
- package/dist/de-DE-k_BRPv7a.cjs +0 -2
- package/dist/de-DE-k_BRPv7a.cjs.map +0 -1
- package/dist/es/components/internal/Tabs/Tabs.js +0 -69
- package/dist/es-ES-Cy-9bm8z.cjs +0 -2
- package/dist/es-ES-Cy-9bm8z.cjs.map +0 -1
- package/dist/fi-FI-C7ICLuS8.cjs +0 -2
- package/dist/fi-FI-C7ICLuS8.cjs.map +0 -1
- package/dist/fr-FR-DH8euUOp.cjs +0 -2
- package/dist/fr-FR-DH8euUOp.cjs.map +0 -1
- package/dist/index-BeWwE_B0.cjs +0 -12
- package/dist/index-BeWwE_B0.cjs.map +0 -1
- package/dist/it-IT-DsfPVAun.cjs +0 -2
- package/dist/it-IT-DsfPVAun.cjs.map +0 -1
- package/dist/nl-NL-DP_t6EpF.cjs +0 -2
- package/dist/nl-NL-DP_t6EpF.cjs.map +0 -1
- package/dist/no-NO-ARsXLWv0.cjs +0 -2
- package/dist/no-NO-ARsXLWv0.cjs.map +0 -1
- package/dist/pt-BR-CuTqntp7.cjs +0 -2
- package/dist/pt-BR-CuTqntp7.cjs.map +0 -1
- package/dist/sv-SE-DDAIHLKD.cjs +0 -2
- package/dist/sv-SE-DDAIHLKD.cjs.map +0 -1
- package/dist/types/components/internal/Tabs/Tabs.d.ts +0 -5
- package/dist/types/components/internal/Tabs/Tabs.d.ts.map +0 -1
- package/dist/types/components/internal/Tabs/types.d.ts +0 -15
- package/dist/types/components/internal/Tabs/types.d.ts.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";var J0=Object.defineProperty;var Sc=e=>{throw TypeError(e)};var e2=(e,t,n)=>t in e?J0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>e2(e,typeof t!="symbol"?t+"":t,n),di=(e,t,n)=>t.has(e)||Sc("Cannot "+n);var p=(e,t,n)=>(di(e,t,"read from private field"),n?n.call(e):t.get(e)),w=(e,t,n)=>t.has(e)?Sc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),b=(e,t,n,r)=>(di(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(di(e,t,"access private method"),n);var En=(e,t,n,r)=>({set _(s){b(e,t,s,n)},get _(){return p(e,t,r)}});const F=require("classnames"),Oi="test",t2=e=>{var t;return(t=e==null?void 0:e.replace)==null?void 0:t.call(e,/([^\/])$/,"$1/")},n2=e=>e==null?void 0:e.replace(/^([^\/])/,"/$1"),r2=(()=>{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??Oi]||e[Oi]})(),Gn=Function.prototype.bind.bind(Function.prototype.call),s2=async()=>{},Ho=e=>e,te=()=>{},o2=Gn(Object.prototype.toString),i2=e=>o2(e).slice(8,-1),Ql=e=>(Object.keys(e).forEach(t=>{const n=e[t];n&&typeof n=="object"&&!Object.isFrozen(n)&&Ql(n)}),Object.freeze(e)),bi=e=>e===!!e,Q=e=>typeof e=="function",po=e=>e===null,Ne=e=>e==null,Ur=e=>typeof e=="number",Go=e=>i2(e)==="Object",yt=e=>typeof e=="string",a2=e=>typeof e=="symbol",Z=e=>e===void 0,St=(e,t,n)=>(Math.min(e,n)!==e&&([e,n]=[n,e]),Math.max(e,Math.min(t,n))),is=e=>!a2(e)&&e===~~e,Fn=e=>Ur(e)&&1/e===0,Jl=(e,t)=>{if(Number.isInteger(e)&&Number.isInteger(t))return e+Math.floor((t-e)/2);throw TypeError(`Expects 2 integer values: [${e}, ${t}]`)},Fs=(e,t)=>(e%t+t)%t,Rc="abort",c2="signal is aborted without reason",Xn=(e,t=e)=>bi(e)?e:!!t,xe=e=>e===!0,$t=e=>e!==!1,l2=e=>!1,Ii=e=>!0,G=(e,t=!1)=>({writable:xe(t),enumerable:!0,value:e}),ue=(e,t=!0)=>({enumerable:$t(t),get:e}),Bt=Gn(Object.prototype.hasOwnProperty),Yn=(e,t)=>e===t||!(e===e||t===t);if(!Bt(AbortSignal.prototype,"reason"))try{Object.defineProperty(AbortSignal.prototype,"reason",{...ue(function(){return this.aborted?as():void 0},!0),configurable:!0})}catch{}Bt(AbortSignal.prototype,"throwIfAborted")||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason??as()});const as=(e=c2)=>new DOMException(e,"AbortError"),eu=(e,t)=>{if(!Yn(e.reason,t))try{Object.defineProperty(e,"reason",G(t))}catch{}return e},u2=(e=as())=>{if("abort"in AbortSignal)return AbortSignal.abort(e);const t=new AbortController,n=Z(e)?as():e,{signal:r}=t;return t.abort(n),eu(r,n),r},Yo=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(Rc,s)),t.clear();const i=(this==null?void 0:this.reason)??as();n.abort(i),eu(r,i),n=t=s=void 0};e:{const i=Symbol("<NIL_EXCEPTION>");let o=i;t:{try{for(const c of e){if(!xs(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(Rc,s));break e}if(s.call(r),o!==i)throw o}return r},xs=e=>e instanceof AbortSignal,de=Object.freeze([]),U=Object.freeze(Object.create(null)),Pr=Promise.resolve();Promise.race(de);const fn=function(e,...t){return new Promise(n=>n(e.call(this,...t)))},d2=(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(Ho):de;return r.length?r:t},qr=(e,t,n)=>e.includes(t)?t:Ne(t)?e[0]:e.includes(n)?n:e[0],Oc=Gn(Array.prototype.some),tu=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};Gn(tu,void 0,!1);Gn(tu,void 0,!0);const nu=(...e)=>{const[t]=e,r=(e.length>=2?new Date(...e):t instanceof Date?t:new Date(yt(t)||Number.isFinite(t)?t:void 0)).getTime();return Number.isFinite(r)?r:void 0},Mr=(()=>{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=U)=>Go(e)?e:cs(t,U),Wr=Gn(Object.create,void 0),J=Gn(Wr,void 0,null),jo=(e=U)=>Object.freeze({...e,defineProperty:Ii,set:Ii}),h2=e=>e&&(e==null?void 0:e.length)>0?`${e[0].toUpperCase()}${e.slice(1)}`:e,Di=e=>Ne(e)||yt(e)&&/^\s*$/.test(e),f2="/setup",m2=xe(void 0),bc=(()=>{let e=0;if(Number.isFinite(e)&&(e=Math.max(0,~~e)))return e})();class ki 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 p2=/^[^]*?filename[^;\n]*=\s*(?:UTF-\d['"]*)?(?:(['"])([^]*?)\1|([^;\n]*))?[^]*?$/;var _o=(e=>(e.NETWORK_ERROR="NETWORK_ERROR",e.CANCEL="CANCEL",e.IMPLEMENTATION_ERROR="IMPLEMENTATION_ERROR",e.ERROR="ERROR",e.EXPIRED_TOKEN="EXPIRED_TOKEN",e))(_o||{});const _2=e=>{switch(e){case 401:return"EXPIRED_TOKEN";default:return"NETWORK_ERROR"}},y2=e=>{var t;return(t=e.headers.get("Content-Type"))==null?void 0:t.split(";",1)[0]},g2=e=>{const n=(e.headers.get("Content-Disposition")??"").replace(p2,"$2$3");return decodeURIComponent(n)},T2=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.5.0"},redirect:"follow",signal:e.signal,referrerPolicy:"no-referrer-when-downgrade",...n==="POST"&&e.body&&{body:JSON.stringify(e.body)}}};function A2({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 ki(r,s,e,n)}}function E2(e){return e&&e.errorCode&&e.type&&(e.detail||e.invalidFields)&&e.status}function N2(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 ru=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:G(s),promise:ue(()=>r),reason:G(e),refresh:G(o),signal:ue(()=>n)});return o()},su=()=>{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:G(r),reject:G(i=>t(i)),resolve:G(i=>n(i))});return r()},Bs=e=>{const t=ru(),n=su();let r;return Object.defineProperties(function(...i){Z(r)?n.refresh():t.abort();const o=fn.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:G(t.abort),promise:ue(()=>n.promise),refresh:G(()=>void n.refresh())})};class v2{constructor(t){B(this,"_endpoints",U);B(this,"_extraConfig",U);B(this,"_revokeEndpointsProxy",te);B(this,"_beforeHttp",async()=>{await this._refreshPromisor.promise.catch(te)});B(this,"_refreshPromisor",Bs((t,n)=>{const r=xs(n)?Yo([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=Ql(i)})))}get endpoints(){return this._endpoints}get extraConfig(){return this._extraConfig}_fetchSetupEndpoint(t){return this._session.http(null,{method:"POST",path:f2,errorLevel:"fatal",loadingContext:this.loadingContext,signal:t})}_getEndpointsProxy(t){const n=new Set(Object.keys(t)),r=J();return Proxy.revocable(U,jo({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&&N2(u);if(Go(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=U}}const ou=Symbol("Error<SESSION_EXPIRED>"),C2=Symbol("Error<SESSION_FACTORY_UNAVAILABLE>"),S2=Symbol("Error<SESSION_HTTP_UNAVAILABLE>"),R2=Symbol("Error<SESSION_INVALID>"),iu=Symbol("Error<SESSION_REFRESH_ABORTED>"),zo="_sessionExpired",au="_sessionReady",O2="_sessionRefreshed",b2="_sessionRefreshingEnd",I2="_sessionRefreshingStart",cu="_session.deadline",lu="_session.ready",uu="_session.refreshingEnd",du="_session.refreshingStart",D2=async e=>{const{specification:t}=e.context,n=await fn(async()=>{const r=t.autoRefresh;return Q(r)?r.call(t,e.session):r}).catch(l2);return xe(n)},k2=e=>{let t=e.context.emitter.on(zo,()=>s(!1)),n,r=Bs(async(c,u=!1)=>{n=c;const l=xe(u)||await D2(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)})},Ic=1e3,L2=2147483647,w2=(e,t=Ic,n=!1)=>{var h;let r=new AbortController,s=St(0,~~t,L2),i=xe(n);Number.isFinite(s)||(s=Ic);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 m=0;if(!i){const f=d-o,_=Math.round(f/s)*s;m=o+_+s-performance.now()}setTimeout(()=>requestAnimationFrame(u),m)};return l(o),i=!1,J({cancel:G(c),delay:G(t),signal:G(r.signal)})},P2=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)},M2=()=>{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)},hu=Symbol("<<UNSUBSCRIBE>>"),jn=e=>e===hu,$s=e=>{let t;const n=P2(e),r=M2(),s=new Map,i=new WeakMap,o=()=>Object.freeze({...n}),c=()=>s.size===0,u=h=>{if(c())return;if(jn(h)){const m=[];return s.forEach((f,_)=>{m.push(_);const y=i.get(_);for(;f--;)y==null||y()}),m.forEach(f=>f(h)),!0}const d=t;t=o();for(const m of Object.keys(t))if(!Yn(t[m],d[m]))return s.forEach((f,_)=>_(t)),!0;return!1},l=h=>{if(!Q(h))return te;const d=d2(h,i,()=>{let f=()=>{const _=s.get(h)||0;_===1?(f=void 0,s.delete(h),i.delete(h),c()&&(t=void 0,r.idle())):_>1&&s.set(h,_-1)};return()=>{f==null||f()}}),m=c();return s.set(h,(s.get(h)||0)+1),m&&(t=o(),r.resume()),h(t),d};return J({idle:ue(c),on:G(r),cancelSubscriptions:G(()=>u(hu)),requestNotification:G(()=>u()),snapshot:ue(()=>t??o()),subscribe:G(l)})},ca=(()=>{let e;const{cancelSubscriptions:t,requestNotification:n,subscribe:r,on:s}=$s({now:()=>Date.now()});return s.resume=()=>{e=w2(n,1e3,!1)},s.idle=()=>{e==null||e.cancel(),e=void 0},J({cancelSubscriptions:G(t),subscribe:G(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:G(!1),cancelable:G(!1),detail:G(i??null)}));return e.dispatchEvent(o)},n=(r,s)=>{if(!Q(s))return te;const i=o=>s.call(null,J({detail:G(o.detail),timeStamp:G(o.timeStamp),type:G(o.type)}));return e.addEventListener(r,i),()=>e.removeEventListener(r,i)};return J({emit:G(t),on:G(n)})},F2=(e,t)=>{let n,r=1/0,s,i;const o=ru(),c=la(),u=()=>{n==null||n.removeEventListener("abort",u),r=1/0,i==null||i(),o.refresh(),c.emit(cu)},l=Bs(async(d,m)=>{s=d;const f=await fn(()=>{const y=t.deadline;return Q(y)?y.call(t,m,d):y}).catch(te);if(s!==d)return;const _=(Array.isArray(f)?f:[f]).filter(y=>y||y===0);if(_.length>0){let y=!1,T=new Set;for(const g of _)if(xs(g)){if(y=g.aborted)break;T.add(g)}else if(r=Math.min(r,nu(g)??1/0),y=r<=Date.now())break;y||(y=T.size<1&&!Number.isFinite(r)),y?n??(n=u2()):(n=Yo([...T,o.signal]),n.addEventListener("abort",u),h()),_.length=0,T.clear()}else n=void 0}),h=()=>{if(!Number.isFinite(r))return;let d=ca.subscribe(m=>{if(jn(m))return u();m.now>=r&&o.abort()});i=()=>{d==null||d(),d=i=void 0}};return J({elapse:G(o.abort),elapsed:ue(()=>n&&n.aborted),on:G(c.on),refresh:G(l.bind(void 0)),signal:ue(()=>o.signal)})},x2=(e,t)=>{let n=!1,r,s,i=!0,o;const c=Symbol("<next_session>"),u=la();function l(f){var _;try{(_=t.assert)==null||_.call(t,f)}catch{throw R2}}function h(f){if(!Q(f))throw C2}const d=Bs((f,_)=>{if(!s)s=f;else return m(xs(_)?Yo([_,f]):f)}),m=async f=>{let _=c;try{n=!1,s=f,i&&await(r??(r=(async()=>{await Pr,i=!1,u.emit(du)})())),h(t.onRefresh),_=await fn(()=>t.onRefresh(o,f)).finally(()=>{if(f.aborted)throw iu})}finally{if(s===f)try{_!==c&&(l(_),o=_,u.emit(lu))}finally{r=void 0,i=!0,u.emit(uu)}}};return e.on(zo,()=>n=!r),d(),J({context:G(J({emitter:G(e),specification:G(t)})),on:G(u.on),pending:ue(()=>n),promise:ue(()=>d.promise),refresh:G(d.bind(void 0)),refreshing:ue(()=>!!r),session:ue(()=>o),signal:ue(()=>s)})};class B2{constructor(t){B(this,"_session");B(this,"_autofresh");B(this,"_deadline");B(this,"_refresher");B(this,"_eventEmitter",la());this._specification=t,this._deadline=F2(this._eventEmitter,this._specification),this._refresher=x2(this._eventEmitter,this._specification),this._autofresh=k2(this._refresher),this._deadline.on(cu,()=>this._eventEmitter.emit(zo)),this._refresher.on(du,()=>this._eventEmitter.emit(I2)),this._refresher.on(uu,()=>this._eventEmitter.emit(b2)),this._refresher.on(lu,()=>{this._session=this._refresher.session,this._deadline.refresh(this._session).finally(()=>this._eventEmitter.emit(O2)),this._eventEmitter.emit(au)}),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 S2}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!==ou)throw r;if(this._refresher.pending)continue;this._deadline.elapse()}}}const $2="v1",hi=(e,t)=>{try{e==null||e(t)}catch{throw t}};async function U2(e){const{errorLevel:t,loadingContext:n="",path:r}=e,s=T2(e),i=new URL(`${t2(n)}${$2}${n2(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(y2(u)){case"application/json":return await u.json();default:const d=await u.blob(),m=g2(u);return{blob:d,filename:m}}}catch(h){throw o=!0,h}}c.type=_2(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,E2(l)&&(c.message=l.detail,c.errorCode=l.errorCode,c.status=l.status),hi(e.errorHandler,c)}catch(u){if(o)throw hi(e.errorHandler,u),u;hi(e.errorHandler,u),c.message=e.errorMessage||`Call to ${i} failed. Error: ${u}`}A2(c)})()}class W2{constructor(t){B(this,"assert",t=>{if(Go(t)){const n=yt(t.id)?t.id.trim():void 0,r=yt(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(bc)){const i=new Date(r);n.push(i.setMilliseconds(i.getMilliseconds()+bc))}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:xs(i)?Yo([n,i]):n};return await U2(c)}catch(c){throw(c==null?void 0:c.type)===_o.EXPIRED_TOKEN?ou:c}});this.onSessionCreate=t,this._errorHandler=this._errorHandler.bind(this),Object.defineProperties(this,{autoRefresh:G(m2),onRefresh:G((n,r)=>this.onSessionCreate(r))})}_errorHandler(t){try{this.errorHandler&&this.errorHandler(t)}catch{}throw t}}const Zr=Symbol("<<NO_ERR>>");function H2(e){/* istanbul ignore if -- @preserve */if(e===Zr)throw new TypeError("Illegal error")}const G2=()=>{let e=Zr;const t=()=>{e=Zr},n=r=>{H2(r),e=r};return J({error:ue(()=>e===Zr?void 0:e),hasError:ue(()=>e!==Zr),reset:G(t),set:G(n)})};class Y2{constructor(){B(this,"_canSkipSessionRefresh",!1);B(this,"_refreshPromisorSignal");B(this,"_sessionIsFrozen",!1);B(this,"_errorContainer",G2());B(this,"_specification",new W2);B(this,"_sessionContext",new B2(this._specification));B(this,"_setupContext",new v2(this._sessionContext));B(this,"_refreshPromisor",Bs(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!==iu)&&this._errorContainer.set(o),r=!i}finally{(r||i&&s)&&(this._refreshPromisorSignal=void 0,this._onAuthStateChanged())}}));B(this,"_watchlist",$s({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(zo,()=>{this._canSkipSessionRefresh=!1,this._onAuthStateChanged()}),this._sessionContext.on(au,()=>{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&&$t(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 j2="Account",z2="Account Balance",q2="Account description",K2="Account ID",V2="Additions",Z2="Adjustments",X2="Amount",Q2="and",J2="Apply",eh="Back",th="Balance account",nh="Balance account ID",rh="Booked",sh="Captured",oh="Category",ih="Chargebacks",ah="Close",ch="Contact support",lh="Contact support for help.",uh="Contact support for help and share error code %{requestId}",dh="Copied",hh="Copy",fh="Corrections",mh="Currency",ph="Date",_h="Date range",yh="Description",gh="Dismiss",Th="Download",Ah="Downloading",Eh="Email",Nh="Entity was not found",vh="Transaction not found for the specified Account Holder",Ch="Fees",Sh="File",Rh="Filter bar",Oh="From",bh="Full",Ih="Funds captured",Dh="Go back",kh="Grant issued",Lh="Grant repayments",wh="Hide content",Ph="ID",Mh="Incomplete field",Fh="In progress",xh="Loading",Bh="max",$h="min",Uh="Mobile",Wh="Net payout",Hh="Next Payouts",Gh="No data",Yh="No negative numbers allowed",jh="No payouts found",zh="No reports found",qh="No transactions found",Kh="Other",Vh="Paginated navigation",Zh="Partial",Xh="Payment ID",Qh="Payment method",Jh="Payout Details",ef="Payout information is generated each day at midnight, UTC time.",tf="Payouts",nf="Pending",rf="Please come back later.",sf="Please, reach out to support for assistance.",of="Reach out to support",af="Reference ID",cf="Refresh",lf="Refunds",uf="Refund payment",df="We couldn’t process the refund. Try again later.",hf="Something went wrong.",ff="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.",mf="Refund is sent!",pf="Amount to refund",_f="Refunds can take up to 40 days depending on the payment method. Fees are included.",yf="Refund %{amount}",gf="Reason for refund",Tf="Reference",Af="Remaining amount",Ef="Report",Nf="Reports are generated each day at midnight, UTC time.",vf="Reports",Cf="Reset",Sf="Reversed",Rf="Something went wrong.",Of="Something went wrong. Try refreshing the page or come back later.",bf="Status",If="Structured list",Df="Subtractions",kf="Sum of same-day payouts",Lf="Tabs",wf="The error code is %{requestId}",Pf="There are no results",Mf="The request is missing required fields or contains invalid data.",Ff="There was an unexpected error",xf="The selected balance account is incorrect",Bf="Timezone",$f="To",Uf="Total incoming",Wf="Total outgoing",Hf="To value should be equal or greater than the From value",Gf="Transaction details",Yf="Transactions",jf="Transactions overview",zf="Transaction type",qf="Transfers",Kf="Try a different search or reset your filters, and we’ll try again.",Vf="Try refreshing the page or come back later.",Zf="Amount",Xf="Type",Qf="Value",Jf="We couldn't load the payouts overview.",e1="We couldn't load the reports overview.",t1="We couldn't load the transactions overview.",n1="We couldn't load your balance accounts.",r1="We couldn't load your payouts.",s1="We couldn't load your reports.",o1="We couldn't load your transactions.",i1={account:j2,accountBalance:z2,accountDescription:q2,accountID:K2,additions:V2,adjustments:Z2,amount:X2,and:Q2,apply:J2,back:eh,balanceAccount:th,balanceAccountId:nh,Booked:rh,"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.annualPercentageRate":"Annual percentage rate","capital.annualPercentageRateIsTheCostOfBorrowingForALoan":"Annual Percentage Rate is the cost of borrowing for a loan under a credit agreement expressed as an annual rate on the principal","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.legalSubtitleCA":"Adyen Capital is provided by Adyen Canada Ltd.","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), Customer Assistance Group, PO Box 53570, Houston, TX 77052.","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:sh,category:oh,chargeback:ih,closeIconLabel:ah,contactSupport:ch,contactSupportForHelp:lh,contactSupportForHelpAndShareErrorCode:uh,copied:dh,copy:hh,correction:fh,currency:mh,date:ph,dateRange:_h,default:"Default",description:yh,dismiss:gh,download:Th,downloading:Ah,email:Eh,entityWasNotFound:Nh,entityWasNotFoundDetail:vh,"error.pleaseTryAgainLater":"Please try again later.","error.somethingWentWrongWithDownload":"Something went wrong with the download","expandableCard.collapse":"Collapse","expandableCard.expand":"Expand",export:"Export",fee:Ch,file:Sh,"filter.date.since":"Since %{date}","filter.date.until":"Until %{date}",filterBar:Rh,"filterPlaceholder.category":"Type","filterPlaceholder.currency":"Currency","filterPlaceholder.status":"Status",from:Oh,full:bh,fundsCaptured:Ih,goBack:Dh,grantIssued:kh,grantRepayment:Lh,hideContent:wh,id:Ph,incompleteField:Mh,inProgress:Fh,"inputError.disallowedFileType":"File type not accepted","inputError.fileRequired":"File required","inputError.tooManyFiles":"Too many files","inputError.veryLargeFile":"File size exceeds the maximum file size",loading:xh,max:Bh,min:$h,mobile:Uh,netPayout:Wh,nextPayouts:Hh,noData:Gh,noNegativeNumbersAllowed:Yh,noPayoutsFound:jh,noReportsFound:zh,noTransactionsFound:qh,other:Kh,paginatedNavigation:Vh,"pagination.nextPage":"Next page","pagination.previousPage":"Previous page","pagination.showing":"Showing",partial:Zh,paymentId:Xh,paymentMethod:Qh,payoutDetails:Jh,payoutsNotice:ef,payoutsTitle:tf,Pending:nf,pleaseComeBackLater:rf,pleaseReachOutToSupportForAssistance:sf,"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:of,referenceID:af,refresh:cf,refund:lf,"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:uf,refundActionErrorSubtitle:df,refundActionErrorTitle:hf,refundActionSuccessSubtitle:ff,refundActionSuccessTitle:mf,refundAmount:pf,"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:_f,refundPayment:yf,refundReason:gf,"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:Tf,"refundReference.placeholder":"Enter the reference here",remainingAmount:Af,report:Ef,"reportsError.tooManyDownloads":"We couldn't download all the files. Please try again later.",reportsNotice:Nf,reportsTitle:vf,"reportType.payout":"Payout",reset:Cf,Reversed:Sf,"select.filter.placeholder":"Placeholder","select.noOptionsFound":"No options match this search",somethingWentWrong:Rf,somethingWentWrongTryRefreshingOrComeBackLater:Of,status:bf,structuredList:If,subtractions:Df,sumOfSameDayPayouts:kf,tabs:Lf,theErrorCodeIs:wf,thereAreNoResults:Pf,theRequestIsMissingRequiredFieldsOrContainsInvalidData:Mf,thereWasAnUnexpectedError:Ff,theSelectedBalanceAccountIsIncorrect:xf,timezone:Bf,to:$f,"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:Uf,totalOutgoing:Wf,toValueShouldBeGreaterThanTheFromValue:Hf,transactionDetails:Gf,transactions:Yf,transactionsOverviewTitle:jf,transactionType:zf,transfer:qf,tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain:Kf,tryRefreshingThePageOrComeBackLater:Vf,txAmount:Zf,"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:Xf,"uploadedFile.remove":"Delete %{filename} file","uploadFile.browse":"Browse files",value:Qf,weCouldNotLoadThePayoutsOverview:Jf,weCouldNotLoadTheReportsOverview:e1,weCouldNotLoadTheTransactionsOverview:t1,weCouldNotLoadYourBalanceAccounts:n1,weCouldNotLoadYourPayouts:r1,weCouldNotLoadYourReports:s1,weCouldNotLoadYourTransactions:o1},a1={...i1},Ut=e=>e.then(({default:t})=>t),fu={da_DK:()=>Ut(Promise.resolve().then(()=>require("./da-DK-qSZWEjaU.cjs")))},mu={de_DE:()=>Ut(Promise.resolve().then(()=>require("./de-DE-Dngq7NwF.cjs")))},pu={es_ES:()=>Ut(Promise.resolve().then(()=>require("./es-ES-Bjddx94n.cjs")))},_u={fi_FI:()=>Ut(Promise.resolve().then(()=>require("./fi-FI-CNpmToDG.cjs")))},yu={fr_FR:()=>Ut(Promise.resolve().then(()=>require("./fr-FR-CUUHB8JU.cjs")))},gu={it_IT:()=>Ut(Promise.resolve().then(()=>require("./it-IT-B-E80zCo.cjs")))},Tu={nl_NL:()=>Ut(Promise.resolve().then(()=>require("./nl-NL--CGhOJhH.cjs")))},Au={no_NO:()=>Ut(Promise.resolve().then(()=>require("./no-NO-D0UNXgzr.cjs")))},Eu={pt_BR:()=>Ut(Promise.resolve().then(()=>require("./pt-BR-Du4cDUgf.cjs")))},Nu={sv_SE:()=>Ut(Promise.resolve().then(()=>require("./sv-SE-C92aO-iv.cjs")))},yo={en_US:a1},ua={...fu,...mu,...yo,...pu,..._u,...yu,...gu,...Tu,...Au,...Eu,...Nu},Sn="en-US",vu=ua.en_US,da={year:"numeric",month:"2-digit",day:"2-digit"},c1=["constructor","i18n","watch","preferredTranslations"],Cu=e=>[...new Set(Object.keys(e).map(t=>t.replace(/_/g,"-")).sort())],l1=Cu(ua),Su={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$"},u1={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},Ru=e=>u1[e]||100,d1=e=>!!Su[e],Ou=e=>d1(e)?Su[e]:null,bu=(e,t)=>{const n=Ru(t);return parseInt(String(e),10)/n},h1=(e,t,n,r=!1,s={})=>{const i=e.toString(),o=bu(i,n),c=t.replace("_","-"),u={style:"currency",currency:n,currencyDisplay:"symbol",...s};try{return r?f1(c,u,o):o.toLocaleString(c,u)}catch{return i}},f1=(e,t,n)=>Intl.NumberFormat(e,t).formatToParts(n).filter(r=>r.type!=="currency").reduce((r,s)=>r+s.value,"").trim(),m1=/GMT(?:[-+](?:0?\d|1[0-4])(?::?[0-5]\d)?)?$/,{BASE_FORMAT_OPTIONS:Iu,BASE_LOCALE:qo,SYSTEM_TIMEZONE:Zs,SYSTEM_TIMEZONE_FORMATTER:nr}=(()=>{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}})(),p1=/\+(?=-)|([+-]00:00)/g,_1=/(^\D?)(\d)$/,y1=([e,t])=>(Math.abs(e*60)+t)*(e<0?-1:1),g1=e=>Object.freeze([Math.floor(e/60),Fs(e,60)]),T1=e=>parseInt(e,10)||0,A1=e=>`GMT+${g1(e).map(r=>`${r}`.replace(_1,"$10$2")).join(":")}`.replace(p1,""),Li=e=>{var n;const t=((n=e==null?void 0:e.match(m1))==null?void 0:n[0].replace("GMT","").split(":",2).map(T1))??de;return y1(t.concat(0,0).slice(0,2))},E1=(e,t=nr)=>{const n=Li(nr==null?void 0:nr.format(e));return Li(t==null?void 0:t.format(e))-n},Du=(e,t,n=1)=>{const{offset:r,timestamp:s}=e(t);return s-r*n*6e4},Ft=(e,t)=>Du(e,t,1),Xt=(e,t)=>Du(e,t,-1),Us=(()=>{let e,t;Z(Zs)||(e=function(){return this.TIMEZONE},t=function(r){if(Ne(r))this.TIMEZONE=Zs,this.formatter=nr;else try{const s=new Intl.DateTimeFormat(qo,{...Iu,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??nr;return Object.freeze({formatted:o==null?void 0:o.format(i),offset:E1(i,o),timestamp:i})}return()=>{const r={TIMEZONE:Zs},s=t==null?void 0:t.bind(r),i=J({current:{get:e==null?void 0:e.bind(r),set:s},system:{value:Zs}});return Object.defineProperties(n.bind(r),{tz:{get:()=>i,set:s}})}})(),N1={values:U,count:0},v1=/^[a-z]{2}-[A-Z]{2}$/,go=e=>e.substring(0,2).toLowerCase();function C1(e,t){if(!e)return null;const n=go(e);return t.find(r=>go(r)===n)||null}function ha(e){const t=e.replace("_","-");if(v1.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 Sn;const r=ha(n);return r&&t.includes(r)?r:C1(r??n,t)}function S1(e=U,t){return e===U?e:Object.keys(e).reduce((n,r)=>{const s=ha(r)||fa(r,t);return s&&e[r]&&(n[s]=e[r]),n},{})}const fi=(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])??"")},Dc=(e,t,n=N1)=>{const r=n.count??0,s=`${t}__${r}`;if(Bt(e,s)&&e[s])return fi(e[s],n.values);const i=`${t}__plural`;return Bt(e,i)&&r>1&&e[i]?fi(e[i],n.values):Bt(e,t)&&e[t]?fi(e[t],n.values):null},R1=async(e,t=U,n=U)=>{const r=fa(e,Object.keys(t))||Sn,s=t[r];return{...vu,...await(Q(s)?s():s)??U,...cs(n==null?void 0:n[e])}};function O1(){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)||Sn}},supportedLocales:{get:()=>n,set(r){n=r,this.locale=t}}})}function b1(){var t;const e={};for(const[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ko.prototype)))c1.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,ys,dr,gs,hr,fr,Yt,Ts,bn,In,mr,pr,As,wi;class Ko{constructor(t=Sn,n){w(this,As);w(this,kt,Sn);w(this,ys,go(p(this,kt)));w(this,dr,[Sn]);w(this,gs,p(this,dr));w(this,hr);w(this,fr,vu);w(this,Yt,O1.call(this));w(this,Ts,Pr);w(this,bn);w(this,In);w(this,mr,$s({timestamp:()=>performance.now()}));w(this,pr,Us());B(this,"watch",p(this,mr).subscribe.bind(void 0));B(this,"i18n",J(b1.call(this)));B(this,"preferredTranslations");this.watch(te),this.preferredTranslations=Object.freeze((n==null?void 0:n.reduce((r,s)=>({...r,...s}),yo))??{...yo}),b(this,dr,Cu(this.preferredTranslations)),this.locale=t}get customTranslations(){return p(this,hr)??{}}set customTranslations(t){let n,r=[...p(this,dr)];if(!Ne(t)){n=S1(t,l1);const s=Object.keys(n);r=[...r,...s].sort().filter((i,o,c)=>c.indexOf(i)===o)}p(this,Yt).supportedLocales=r,H(this,As,wi).call(this,n)}get languageCode(){return p(this,ys)}get lastRefreshTimestamp(){return p(this,mr).snapshot.timestamp}get locale(){return p(this,kt)}set locale(t){if(Ne(t))this.locale=Sn;else{if(p(this,Yt).locale=t,p(this,kt)===p(this,Yt).locale)return;H(this,As,wi).call(this,p(this,hr))}}get ready(){return p(this,Ts)}get supportedLocales(){return p(this,gs)}get timezone(){return p(this,pr).tz.current}set timezone(t){p(this,pr).tz=t}get(t,n){const r=Dc(p(this,fr),t,n);return po(r)?t:r}has(t,n){return!!Dc(p(this,fr),t,n)}amount(t,n,r){const{hideCurrency:s,...i}=r||{},o=h1(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,ys=new WeakMap,dr=new WeakMap,gs=new WeakMap,hr=new WeakMap,fr=new WeakMap,Yt=new WeakMap,Ts=new WeakMap,bn=new WeakMap,In=new WeakMap,mr=new WeakMap,pr=new WeakMap,As=new WeakSet,wi=function(t){Z(p(this,In))&&b(this,Ts,new Promise(s=>{b(this,In,()=>{s(p(this,bn)),b(this,bn,b(this,In,void 0))})}));const n=()=>{var s;p(this,bn)===r&&((s=p(this,In))==null||s.call(this))},r=b(this,bn,(async()=>{b(this,fr,await p(this,Yt).load(t)),b(this,kt,p(this,Yt).locale),b(this,gs,Object.freeze(p(this,Yt).supportedLocales)),b(this,hr,t),b(this,ys,go(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 Y2);B(this,"onError");B(this,"update",async(t=U)=>(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:Oi,...t},this.localization=new Ko(t.locale,t.availableTranslations),this.loadingContext=r2(this.options.environment),this.setOptions(t)}async initialize(){return Promise.all([this.localization.ready]).then(()=>this)}getPropsForComponent(t){return{...t}}}B(ma,"version","1.5.0");var Ws,re,ku,Lu,vn,kc,wu,Pu,Mu,pa,Pi,Mi,Fu,ls={},xu=[],I1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Hs=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 Fr(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?Ws.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 rs(e,o,r,s,null)}function rs(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??++ku,__i:-1,__u:0};return s==null&&re.vnode!=null&&re.vnode(i),i}function D1(){return{current:null}}function K(e){return e.children}function Jt(e,t){this.props=e,this.context=t}function xr(e,t){if(t==null)return e.__?xr(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"?xr(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)&&vn.push(e)&&!To.__r++||kc!==re.debounceRendering)&&((kc=re.debounceRendering)||wu)(To)}function To(){for(var e,t,n,r,s,i,o,c=1;vn.length;)vn.length>c&&vn.sort(Pu),e=vn.shift(),c=vn.length,e.__d&&(n=void 0,s=(r=(t=e).__v).__e,i=[],o=[],t.__P&&((n=xt({},r)).__v=r.__v+1,re.vnode&&re.vnode(n),ya(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[s]:null,i,s??xr(r),!!(32&r.__u),o),n.__v=r.__v,n.__.__k[n.__i]=n,Wu(i,n,o),n.__e!=s&&Bu(n)));To.__r=0}function $u(e,t,n,r,s,i,o,c,u,l,h){var d,m,f,_,y,T,g=r&&r.__k||xu,E=t.length;for(u=k1(n,t,g,u,E),d=0;d<E;d++)(f=n.__k[d])!=null&&(m=f.__i===-1?ls:g[f.__i]||ls,f.__i=d,T=ya(e,f,m,s,i,o,c,u,l,h),_=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&ga(m.ref,null,f),h.push(f.ref,f.__c||_,f)),y==null&&_!=null&&(y=_),4&f.__u||m.__k===f.__k?u=Uu(f,u,e):typeof f.type=="function"&&T!==void 0?u=T:_&&(u=_.nextSibling),f.__u&=-7);return n.__e=y,u}function k1(e,t,n,r,s){var i,o,c,u,l,h=n.length,d=h,m=0;for(e.__k=new Array(s),i=0;i<s;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=i+m,(o=e.__k[i]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?rs(null,o,null,null,null):Hs(o)?rs(K,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?rs(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=L1(o,n,u,d))!==-1&&(d--,(c=n[l])&&(c.__u|=2)),c==null||c.__v===null?(l==-1&&(s>h?m--:s<h&&m++),typeof o.type!="function"&&(o.__u|=4)):l!=u&&(l==u-1?m--:l==u+1?m++:(l>u?m--:m++,o.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<h;i++)(c=n[i])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=xr(c)),Gu(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=xr(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function gn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Hs(e)?e.some(function(n){gn(n,t)}):t.push(e)),t}function L1(e,t,n,r){var s,i,o=e.key,c=e.type,u=t[n];if(u===null&&e.key==null||u&&o==u.key&&c===u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(s=n-1,i=n+1;s>=0||i<t.length;){if(s>=0){if((u=t[s])&&(2&u.__u)==0&&o==u.key&&c===u.type)return s;s--}if(i<t.length){if((u=t[i])&&(2&u.__u)==0&&o==u.key&&c===u.type)return i;i++}}return-1}function Lc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||I1.test(t)?n:n+"px"}function Xs(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||Lc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Lc(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.t=r.t:(n.t=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 wc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.u==null)t.u=pa++;else if(t.u<n.t)return;return n(re.event?re.event(t):t)}}}function ya(e,t,n,r,s,i,o,c,u,l){var h,d,m,f,_,y,T,g,E,R,N,D,v,O,S,M,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,R=(h=z.contextType)&&r[h.__c],N=h?R?R.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=P1),R&&R.sub(d),d.props=g,d.state||(d.state={}),d.context=N,d.__n=r,m=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))),f=d.props,_=d.state,d.__v=t,m)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!==f&&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(f,_,y)})}if(d.context=N,d.props=g,d.__P=e,d.__e=!1,v=re.__r,O=0,E){for(d.state=d.__s,d.__d=!1,v&&v(t),h=d.render(d.props,d.state,d.context),S=0;S<d._sb.length;S++)d.__h.push(d._sb[S]);d._sb=[]}else do d.__d=!1,v&&v(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++O<25);d.state=d.__s,d.getChildContext!=null&&(r=xt(xt({},r),d.getChildContext())),E&&!m&&d.getSnapshotBeforeUpdate!=null&&(y=d.getSnapshotBeforeUpdate(f,_)),M=h,h!=null&&h.type===K&&h.key==null&&(M=Hu(h.props.children)),c=$u(e,Hs(M)?M:[M],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=w1(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 Hu(e){return typeof e!="object"||e==null?e:Hs(e)?e.map(Hu):xt({},e)}function w1(e,t,n,r,s,i,o,c,u){var l,h,d,m,f,_,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((f=i[l])&&"setAttribute"in f==!!E&&(E?f.localName==E:f.nodeType==3)){e=f,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&&Ws.call(e.childNodes),T=n.props||ls,!c&&i!=null)for(T={},l=0;l<e.attributes.length;l++)T[(f=e.attributes[l]).name]=f.value;for(l in T)if(f=T[l],l!="children"){if(l=="dangerouslySetInnerHTML")d=f;else if(!(l in g)){if(l=="value"&&"defaultValue"in g||l=="checked"&&"defaultChecked"in g)continue;Xs(e,l,null,f,s)}}for(l in g)f=g[l],l=="children"?m=f:l=="dangerouslySetInnerHTML"?h=f:l=="value"?_=f:l=="checked"?y=f:c&&typeof f!="function"||T[l]===f||Xs(e,l,f,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(t.type==="template"?e.content:e,Hs(m)?m:[m],t,n,r,E=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,o,i?i[0]:n.__k&&xr(n,0),c,u),i!=null)for(l=i.length;l--;)_a(i[l]);c||(l="value",E=="progress"&&_==null?e.removeAttribute("value"):_!==void 0&&(_!==e[l]||E=="progress"&&!_||E=="option"&&_!==T[l])&&Xs(e,l,_,T[l],s),l="checked",y!==void 0&&y!==e[l]&&Xs(e,l,y,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 Gu(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]&&Gu(r[s],t,n||typeof e.type!="function");n||_a(e.__e),e.__c=e.__=e.__e=void 0}function P1(e,t,n){return this.constructor(e,n)}function rr(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=Fr(K,null,[e]),s||ls,ls,t.namespaceURI,s?null:t.firstChild?Ws.call(t.childNodes):null,i,s?s.__e:t.firstChild,r,o),Wu(i,e,o)}function Yu(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?Ws.call(arguments,2):n),rs(e.type,c,r||e.key,s||e.ref,null)}function Hr(e){function t(n){var r,s;return this.getChildContext||(r=new Set,(s={})[t.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&r.forEach(function(o){o.__e=!0,Fi(o)})},this.sub=function(i){r.add(i);var o=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),o&&o.call(i)}}),n.children}return t.__c="__cC"+Fu++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Ws=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}},ku=0,Lu=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=K,vn=[],wu=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Pu=function(e,t){return e.__v.__b-t.__v.__b},To.__r=0,Mu=/(PointerCapture)$|Capture$/i,pa=0,Pi=wc(!1),Mi=wc(!0),Fu=0;var M1=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:--M1,__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 Un,ve,mi,Pc,Br=0,ju=[],we=re,Mc=we.__b,Fc=we.__r,xc=we.diffed,Bc=we.__c,$c=we.unmount,Uc=we.__;function Gs(e,t){we.__h&&we.__h(ve,e,Br||t),Br=0;var n=ve.__H||(ve.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function x(e){return Br=1,Vo(zu,e)}function Vo(e,t,n){var r=Gs(Un++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):zu(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=ve,!ve.__f)){var s=function(c,u,l){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(m){return!!m.__c});if(h.every(function(m){return!m.__N}))return!i||i.call(this,c,u,l);var d=r.__c.props!==c;return h.forEach(function(m){if(m.__N){var f=m.__[0];m.__=m.__N,m.__N=void 0,f!==m.__[0]&&(d=!0)}}),i&&i.call(this,c,u,l)||d};ve.__f=!0;var i=ve.shouldComponentUpdate,o=ve.componentWillUpdate;ve.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)},ve.shouldComponentUpdate=s}return r.__N||r.__}function $(e,t){var n=Gs(Un++,3);!we.__s&&Ta(n.__H,t)&&(n.__=e,n.u=t,ve.__H.__h.push(n))}function us(e,t){var n=Gs(Un++,4);!we.__s&&Ta(n.__H,t)&&(n.__=e,n.u=t,ve.__h.push(n))}function Y(e){return Br=5,A(function(){return{current:e}},[])}function F1(e,t,n){Br=6,us(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function A(e,t){var n=Gs(Un++,7);return Ta(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function C(e,t){return Br=8,A(function(){return e},t)}function Gr(e){var t=ve.context[e.__c],n=Gs(Un++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(ve)),t.props.value):e.__}function x1(){for(var e;e=ju.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ro),e.__H.__h.forEach(xi),e.__H.__h=[]}catch(t){e.__H.__h=[],we.__e(t,e.__v)}}we.__b=function(e){ve=null,Mc&&Mc(e)},we.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Uc&&Uc(e,t)},we.__r=function(e){Fc&&Fc(e),Un=0;var t=(ve=e.__c).__H;t&&(mi===ve?(t.__h=[],ve.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ro),t.__h.forEach(xi),t.__h=[],Un=0)),mi=ve},we.diffed=function(e){xc&&xc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(ju.push(t)!==1&&Pc===we.requestAnimationFrame||((Pc=we.requestAnimationFrame)||B1)(x1)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),mi=ve=null},we.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ro),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)}}),Bc&&Bc(e,t)},we.unmount=function(e){$c&&$c(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ro(r)}catch(s){t=s}}),n.__H=void 0,t&&we.__e(t,n.__v))};var Wc=typeof requestAnimationFrame=="function";function B1(e){var t,n=function(){clearTimeout(r),Wc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Wc&&(t=requestAnimationFrame(n))}function ro(e){var t=ve,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ve=t}function xi(e){var t=ve;e.__c=e.__(),ve=t}function Ta(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function zu(e,t){return typeof t=="function"?t(e):t}const nt="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 qu(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 Hc(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,Fr(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Hc.prototype=new Jt).isPureReactComponent=!0,Hc.prototype.shouldComponentUpdate=function(e,t){return Bi(this.props,e)||Bi(this.state,t)};var Gc=re.__b;re.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Gc&&Gc(e)};var $1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Yr(e){function t(n){var r=qu({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=$1,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var U1=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)}U1(e,t,n,r)};var Yc=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=qu({},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 pi(){this.__u=0,this.o=null,this.__b=null}function Zu(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Qs(){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),Yc&&Yc(e)},(pi.prototype=new Jt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var s=Zu(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)},pi.prototype.componentWillUnmount=function(){this.o=[]},pi.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&&Fr(K,null,e.fallback);return s&&(s.__u&=-33),[Fr(K,null,t.__a?null:e.children),s]};var jc=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 W1(e){return this.getChildContext=function(){return e.context},e.children}function H1(e){var t=this,n=e.h;t.componentWillUnmount=function(){rr(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)}}),rr(Fr(W1,{context:t.context},e.__v),t.v)}function Xu(e,t){var n=Fr(H1,{__v:e,h:t});return n.containerInfo=t,n}(Qs.prototype=new Jt).__a=function(e){var t=this,n=Zu(t.__v),r=t.l.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),jc(t,e,r)):s()};n?n(i):i()}},Qs.prototype.render=function(e){this.i=null,this.l=new Map;var t=gn(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},Qs.prototype.componentDidUpdate=Qs.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){jc(e,n,t)})};var G1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Y1=/^(?: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]/,j1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,z1=/[A-Z0-9]/g,q1=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 zc=re.event;function V1(){}function Z1(){return this.cancelBubble}function X1(){return this.defaultPrevented}re.event=function(e){return zc&&(e=zc(e)),e.persist=V1,e.isPropagationStopped=Z1,e.isDefaultPrevented=X1,e.nativeEvent=e};var Q1={enumerable:!1,configurable:!0,get:function(){return this.class}},qc=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||q1&&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":j1.test(o)&&(o=u):u=o="oninput":i&&Y1.test(o)?o=o.replace(z1,"-$&").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=gn(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=gn(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",Q1)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=G1,qc&&qc(e)};var Kc=re.__r;re.__r=function(e){Kc&&Kc(e),e.__c};var Vc=re.diffed;re.diffed=function(e){Vc&&Vc(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 J1({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(()=>({[`${nt}--${I.CAPTION}`]:s===I.CAPTION,[`${nt}--${I.CAPTION}-${It.WIDE}`]:s===I.CAPTION&&u,[`${nt}--${I.CAPTION}-${It.STRONGER}`]:s===I.CAPTION&&n,[`${nt}--${I.BODY}`]:s===I.BODY,[`${nt}--${I.BODY}-${It.WIDE}`]:s===I.BODY&&u,[`${nt}--${I.BODY}-${It.STRONGER}`]:s===I.BODY&&n,[`${nt}--${I.BODY}-${It.STRONGEST}`]:s===I.BODY&&r,[`${nt}--${I.SUBTITLE}`]:s===I.SUBTITLE,[`${nt}--${I.SUBTITLE}-${It.STRONGER}`]:s===I.SUBTITLE&&n,[`${nt}--${I.TITLE}`]:s===I.TITLE&&!i&&!o,[`${nt}--${I.TITLE}-${It.MEDIUM}`]:s===I.TITLE&&i,[`${nt}--${I.TITLE}-${It.LARGE}`]:s===I.TITLE&&o}),[s,u,n,i,o,r]);return a(h,{className:F([`${nt}`,d,t]),"data-testid":c,children:l})}const k=Ie(J1),Qu=Hr({i18n:new Ko().i18n,loadingContext:"",commonProps:{},updateCore:te,componentRef:{current:null}}),W=()=>Gr(Qu),em="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=>Yr(e),Ao=(()=>{const e=new Set,t=(r,s,i,o)=>{let c=o==null?void 0:o[i];return c=Q(c)?c:Ho,!Yn(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})})(),Zc=/^\s+|\s+(?=\s|$)/g,xn=(e,t)=>(t?typeof t=="string"?t:(t==null?void 0:t.value)??"":"").replace(Zc,"")||e.replace(Zc,"")||void 0,Eo=(e,t,n)=>F(xn("",n),xn(xn("",t)||"",e)),Aa=(e,t=[],n=[])=>F([...n,...t==null?void 0:t.map(r=>e?`${e}--${r}`:r)]),Zo=e=>Xn(e,(e==null?void 0:e.value)??e),lt="adyen-pe-button",tm="adyen-pe-button__anchor",$i=`${lt}-actions`,nm=`${lt}--icon`,rm=`${lt}--icon-content`,sm=`${$i}__container-wrapper`,om=`${lt}__label`,im=`${lt}__icon-right`,am=`${lt}__icon-left`,cm=`${lt}--condensed`,lm=`${lt}--full-width`,um=`${lt}--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}`})}),Xo=(e,t,n,r,s,i)=>{const{children:o,iconLeft:c,iconRight:u,iconButton:l=!1,fullWidth:h,condensed:d,state:m="default"}=s,f=C(g=>{g.preventDefault(),r||i==null||i(g)},[r,i]),_=A(()=>Aa(n,t,[n,e]),[n,t,e]),y=A(()=>({...s,className:F(_,{[nm]:l,[cm]:d,[lm]:h,[um]:m==="loading"}),disabled:r||m==="loading"}),[_,d,r,h,l,s,m]),T=A(()=>l?a("div",{className:`${rm}`,children:o}):a(K,{children:[m==="loading"&&a(Ui,{size:"x-small"}),c&&a("span",{className:am,children:c}),a(k,{className:om,el:ne.SPAN,variant:I.BODY,children:o}),u&&a("span",{className:im,children:u})]}),[o,l,c,u,m]);return{classes:_,click:f,allChildren:T,allProps:y}};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 dm(e,t){const n=A(()=>xn("",e.className)||"",[e.className]),r=A(()=>Zo(e.disabled||!1),[e.disabled]),{click:s,allChildren:i,allProps:o}=Xo(n,[...e.classNameModifiers||[],e.variant||se.PRIMARY],lt,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(dm),Xc={md:680},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:m,updateCore:f}=W(),_=C(y=>Array.isArray(y)?y.map((T,g)=>g===0?a(K,{children:[m.get(T),u&&u[T]&&a(K,{children:u[T]})]}):a(K,{children:[a("br",{}),m.get(T),u&&u[T]&&a(K,{children:u[T]})]})):m.get(y),[m,u]);return a("div",{className:F(["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: ${Xc.md}px)`,srcSet:n}),a("source",{type:"image/svg+xml",media:`(max-width: ${Xc.md}px)`,srcSet:r}),a("img",{srcSet:n??em,alt:m.get("thereWasAnUnexpectedError")})]})}),a(k,{variant:I.TITLE,children:m.get(e)}),t&&a(k,{variant:I.BODY,children:_(t)}),(c||o||d)&&a("div",{className:"adyen-pe-error-message-display__button",children:[d&&d(),c&&a(he,{onClick:c,children:m.get("contactSupport")}),!c&&o&&a(he,{onClick:f,children:m.get("refresh")})]})]})},Nn=(e,t)=>Q(e.endpoints[t]),_i={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")},Ju=async e=>{const t=su(),n=t.promise,r=e.context.refreshing;let s,i,o=e.subscribe(c=>{if(jn(c)){t.resolve();return}if(s??(s=e.context.refreshing),!e.context.refreshing){if($t(e.context.isExpired)&&(i??(i=!(r||s)))){i=!1,e.refresh();return}t.resolve()}});return n.finally(()=>{o(),o=null}),n},hm=async(e,t)=>{var n;return await Ju(t),xe(await((n=_i[e])==null?void 0:n.call(_i,t.context)))},fm=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"}},ed=Hr({endpoints:U,extraConfig:U,hasError:!1,http:s2,isExpired:void 0,isFrozen:!1,refresh:te,refreshing:!1}),mm=({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 $(()=>{hm(n,t).then(l)},[t,n]),$(()=>t.subscribe(h=>{(jn(h)?c:i)(m=>m+1)}),[o]),a(ed.Provider,{value:{...t.context,http:r,refresh:s},children:!Z(u)&&(u?gn(e):a(en,{withImage:!0,centered:!0,title:"somethingWentWrong",message:[fm(n),"contactSupportForHelp"]}))})},Ce=()=>Gr(ed),wt=(e=!1)=>{const[t,n]=x(e),r=C(i=>n(i),[]),s=C(()=>n(i=>!i),[]);return[t,r,s]},pm=({i18n:e=new Ko().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 $(()=>{(async()=>{await(e==null?void 0:e.ready),u(!0)})().catch()},[]),c?a(Qu.Provider,{value:{i18n:e,commonProps:l,loadingContext:h,updateCore:s,externalErrorHandler:i,componentRef:o},children:gn(t)}):null};var Vl;class td{constructor(t){B(this,"_component");B(this,"_node",null);B(this,"_id",`${(Vl=this.constructor)==null?void 0:Vl.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=yt(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(),rr(this._component,n),this}update(t){return this.props=this.formatProps({...this.props,...t}),this._component=this.render(),this._node&&rr(this._component,this._node),this}remount(t){if(!this._node)throw new Error("Component is not mounted.");const n=t||this.render();return rr(n,this._node),this}unmount(){return this._node&&rr(null,this._node),this}remove(){this.unmount(),this.props.core.remove(this)}}B(td,"type");class zn extends td{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=D1()}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(mm,{type:this.type,session:n.session,children:a(pm,{i18n:n.localization.i18n,loadingContext:n.loadingContext,updateCore:r,externalErrorHandler:s,componentRef:this.compRef,children:this.componentToRender&&a("div",{ref:this.compRef,className:F("adyen-pe-component",this.customClassNames),children:a("div",{className:"adyen-pe-component__container",children:this.componentToRender()})})})},performance.now())}}function Rt({fetchOptions:{keepPrevData:e,onSuccess:t,enabled:n}={keepPrevData:!0},queryFn:r}){const s=Y(!1),i={error:void 0,data:void 0,isFetching:$t(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 $(()=>(s.current=!1,$t(n)&&l(),()=>{s.current=!0}),[n,l]),c}const Qo=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",va=Na+"__header",_m=va+"-container",ym=va+"-controller",gm=Na+"__content";function Qc({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:F(Na,t),children:[a("h3",{className:va,children:[a("button",{id:"accordion-controller","aria-controls":"accordion-content",className:_m,onClick:c,"aria-expanded":s,children:a("div",{className:ym,children:[n,s?a(Ea,{height:8,width:15}):a(Qo,{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:gm,children:a("div",{ref:o,children:e})})]})}const rn="adyen-pe-card",nd=`${rn}__body`,rd=`${rn}__header`,Tm=`${rn}__title`,Am=`${rn}__subtitle`,Em=`${rd}-content`,Nm=`${nd}--with-title`,vm=`${rn}--no-outline`,Cm=`${rn}--no-padding`,Sm=`${rn}--filled`,Rm=`${rn}__footer`,so=({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 m=s||"header";return a("section",{className:F(rn,{[Sm]:c,[vm]:u,[Cm]:l},h),"data-testid":d,children:[(e||i)&&a(m,{className:rd,children:(e||i)&&a("div",{className:Em,children:[i||a("span",{className:Tm,children:e}),t&&a("div",{className:Am,children:t})]})}),a("div",{className:F(nd,{[Nm]:e||i}),children:n}),(r||o)&&a("footer",{className:Rm,children:o||r})]})},Jc="2-digit",Ca="long",el="numeric",sd="short",Om="shortOffset",jr={month:Ca,day:el,year:el},od={hour:Jc,minute:Jc},id={...jr,...od,month:sd,hour12:!1},ad={...id,year:void 0},cd={...jr,month:"short"},bm=jr,Im=ad,Dm={...jr,weekday:Ca},tl={...jr,month:sd},km=id,Lm=ad,wm={...jr,...od,weekday:Ca,timeZoneName:Om},bt={sm:480,md:768,lg:1024},zr="adyen-pe-structured-list",Pm=`${zr}--align-end`,ld=`${zr}__item`,nl=`${zr}__grid`,Mm=`${zr}__content`,Fm=`${zr}__label`,xm=`${ld}--has-highlight`,Bm=e=>{const{i18n:t}=W();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])},$m="6-6";function mn({items:e,highlightable:t,renderValue:n,renderLabel:r,layout:s=$m,grid:i=!0,classNames:o,align:c="end"}){const[u,l]=A(()=>s.split("-").map(m=>`${nl}--width-${m}-of-12`),[s]),h=Bm(e),{i18n:d}=W();return a("dl",{"aria-label":d.get("structuredList"),className:F(zr,o,{[Pm]:c==="end"}),children:h.map((m,f)=>a("div",{className:F(ld,{[xm]:t,[nl]:i}),children:[a("dt",{className:F(Fm,u),children:r?r(m.label,e[f].key):a(k,{variant:I.BODY,children:m.label})}),a("dd",{"aria-label":`${d.get(m.key)} ${d.get("value")}`,className:F(Mm,l),children:n?n(m.value,m.key,m.type,m.config):a(k,{variant:I.BODY,children:m.value})})]},`${f}_${m.id||"0"}`))})}const ud="adyen-pe-overview-details",Sa=`${ud}__skeleton`,Um=`${Sa}-container`,Wm=`${Sa}--loading-content`,Hm=`${ud}__status-skeleton`,Gm=({skeletonRowNumber:e=0})=>{const t=F(Sa,Wm),n=Array.from({length:e}),r=Array.from({length:2});return a("div",{className:Um,children:[a("div",{className:Hm,children:r.map((s,i)=>a("span",{className:t},`status-skeleton-${i}`))}),n.map((s,i)=>a("span",{className:t},`skeleton-${i}`))]})},Ra=Ie(Gm),Wi=e=>{const{i18n:t}=W();return C((...n)=>{const r=t.timezone;try{return e(...n)}finally{t.timezone=r}},[t,e])},Ym=e=>{const{i18n:t}=W(),n=Wi(C(()=>(t.timezone=void 0,t.timezone=e,t.timezone),[t,e]));return A(n,[n])},sn=e=>{const{i18n:t}=W(),n=Ym(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}},Ot="adyen-pe-payout-data",jm=`${Ot}__title-container`,zm=`${Ot}__title`,qm=`${Ot}__title--with-extra-details`,Km=`${Ot}__title--ba-id`,Oa=`${Ot}__content`,Vm=`${Ot}__extra-details`,Zm=`${Ot}__extra-details-label`,Xm=`${Ot}__extra-details-icon`,Qm=`${Ot}__button-actions`,Qn=`${Oa}--section`,oo=`${Oa}--card`,rl=`${oo}-title`,ss=`${Qn}-amount`,sl=`${ss}-gross`,Jm=`${ss}-net`,ep=`${Ot}--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:F("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})),ol={"angle-right":()=>Promise.resolve().then(()=>require("./angle-right-B2I_t62j.cjs")),"checkmark-circle-fill":()=>Promise.resolve().then(()=>require("./checkmark-circle-fill-Cw5UXqzN.cjs")),"checkmark-square-fill":()=>Promise.resolve().then(()=>require("./checkmark-square-fill-BwkQfKCG.cjs")),checkmark:()=>Promise.resolve().then(()=>require("./checkmark-CIwP_FdK.cjs")),"chevron-down":()=>Promise.resolve().then(()=>require("./chevron-down-BuYiZOY7.cjs")),"chevron-left":()=>Promise.resolve().then(()=>require("./chevron-left-DhRCcHqQ.cjs")),"chevron-right":()=>Promise.resolve().then(()=>require("./chevron-right-DvPR8FD2.cjs")),"chevron-up":()=>Promise.resolve().then(()=>require("./chevron-up-DFrrO8PJ.cjs")),copy:()=>Promise.resolve().then(()=>require("./copy-Bl3l133y.cjs")),"cross-circle-fill":()=>Promise.resolve().then(()=>require("./cross-circle-fill-BBjJLOad.cjs")),cross:()=>Promise.resolve().then(()=>require("./cross-BtdvCTEP.cjs")),download:()=>Promise.resolve().then(()=>require("./download-Cqu4yqTE.cjs")),"external-link":()=>Promise.resolve().then(()=>require("./external-link-CqDz5BtK.cjs")),filter:()=>Promise.resolve().then(()=>require("./filter-DLAt7sYb.cjs")),"info-filled":()=>Promise.resolve().then(()=>require("./info-filled-B9fmmNGT.cjs")),"minus-circle-outline":()=>Promise.resolve().then(()=>require("./minus-circle-outline-JkeH7g3f.cjs")),"plus-circle-outline":()=>Promise.resolve().then(()=>require("./plus-circle-outline-Cmz1Lb00.cjs")),square:()=>Promise.resolve().then(()=>require("./square-Bow_5TP1.cjs")),"trash-can":()=>Promise.resolve().then(()=>require("./trash-can-DLEmgXUG.cjs")),upload:()=>Promise.resolve().then(()=>require("./upload-DWOtVcWc.cjs")),"warning-filled":()=>Promise.resolve().then(()=>require("./warning-filled-qxDqTfWV.cjs")),warning:()=>Promise.resolve().then(()=>require("./warning-DNUR39rT.cjs"))},Ze=({className:e,name:t,...n})=>{const[r,s]=x(null);return $(()=>{ol[t]?ol[t]().then(({default:i})=>{s(a(i,{}))}):(s(null),console.error(`Icon with name "${t}" does not exist.`))},[t]),r&&a("span",{className:F("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:F("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:F("adyen-pe-data-grid__icon",e),alt:t,src:n})}),dd=Hr(U),Da=()=>Gr(dd);function il({children:e,column:t,position:n,...r}){const{registerCells:s}=Da(),i=Y(null);return $(()=>{var o;i.current&&s({column:t,width:(o=i.current)==null?void 0:o.getBoundingClientRect().width})},[t,s]),a("div",{role:"cell",className:F("adyen-pe-data-grid__cell",{"adyen-pe-data-grid__cell--right":n==="right","adyen-pe-data-grid__cell--center":n==="center"}),...r,children:e&&Lu(e)?Yu(e,{...e==null?void 0:e.props,ref:i,style:{width:"min-content"}}):null})}const Bn=e=>!!e&&typeof e=="object"&&"value"in e,al=e=>!!e&&typeof e=="object"&&e.type==="icon",tp=e=>!!e&&typeof e=="object"&&e.type==="button",np=e=>!!e&&typeof e=="object"&&e.type==="link",hd=({columns:e,customCells:t,item:n,rowIndex:r})=>a(K,{children:e.map(({key:s,position:i})=>{var d,m,f,_,y,T,g;if(t!=null&&t[s])return a(il,{"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}=Bn(o)?o:{value:o,type:"text"},l=al(o)?{url:(d=o==null?void 0:o.config)==null?void 0:d.src,alt:((m=o==null?void 0:o.config)==null?void 0:m.alt)!==void 0&&((f=o==null?void 0:o.config)==null?void 0:f.alt)!==null?(_=o==null?void 0:o.config)==null?void 0:_.alt:o.value}:void 0,h=tp(o)?E=>{var R;E.stopPropagation(),(R=o==null?void 0:o.config)==null||R.action()}:void 0;return a(il,{"aria-labelledby":String(s),column:s,position:i,children:a("div",{className:"adyen-pe-data-grid__cell-value",children:[al(o)&&o.config&&(l==null?void 0:l.url)&&a("div",{className:F("adyen-pe-data-grid__icon-cell",(y=o==null?void 0:o.config)==null?void 0:y.className),children:[a(Ia,{...l}),c.trim()&&a("span",{children:c})]}),u==="text"&&a("span",{className:F((T=o==null?void 0:o.config)==null?void 0:T.className),children:c}),u==="button"&&o.config&&h&&a(he,{className:F((g=o.config)==null?void 0:g.className),onClick:h,variant:se.SECONDARY,children:c}),np(o)&&o.config&&a(ba,{classNames:o.config.className?[o.config.className]:[],href:o.config.href,target:o.config.target,children:c})]})},s)})});var Ys=(e=>(e.BUTTONS_END="buttons-end",e.FILL_CONTAINER="fill-container",e.SPACE_BETWEEN="space-between",e.VERTICAL_STACK="vertical-stack",e))(Ys||{}),fd=(e=>(e.BUTTONS_START="buttons-start",e))(fd||{});const rp={...Ys,...fd};function sp({actions:e,layout:t=rp.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:`${sm} ${n()}`,role:"group",children:s.map((i,o)=>a(he,{className:F(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(sp),op=({balanceAccountId:e,balanceAccountDescription:t,payout:n,extraFields:r})=>{var m;const{payout:s}=n??U,{dateFormat:i}=sn("UTC"),{i18n:o}=W(),c=A(()=>{var _,y;const f=(y=(_=n==null?void 0:n.amountBreakdowns)==null?void 0:_.adjustmentBreakdown)==null?void 0:y.reduce((T,g)=>{var v,O,S,M,P,z,j;const E=(v=g==null?void 0:g.amount)!=null&&v.value&&((O=g==null?void 0:g.amount)!=null&&O.currency)?o.amount((S=g==null?void 0:g.amount)==null?void 0:S.value,(M=g==null?void 0:g.amount)==null?void 0:M.currency,{hideCurrency:!0}):(((P=g==null?void 0:g.amount)==null?void 0:P.value)??"").toString(),R=`${g==null?void 0:g.category}`,N=o.get(R),D=g!=null&&g.category&&N!==R?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 f==null||f.subtractions.sort((T,g)=>T.key.localeCompare(g.key)),f==null||f.additions.sort((T,g)=>T.key.localeCompare(g.key)),f},[o,n]),u=A(()=>{var _,y;const f=(y=(_=n==null?void 0:n.amountBreakdowns)==null?void 0:_.fundsCapturedBreakdown)==null?void 0:y.reduce((T,g)=>{var E,R,N,D;return((E=g==null?void 0:g.amount)==null?void 0:E.value)===0||(R=g==null?void 0:g.amount)!=null&&R.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 f==null||f.sort((T,g)=>T.key==="capture"?-1:g.key==="capture"?1:T.key.localeCompare(g.key)),f},[n,o]),l=A(()=>s!=null&&s.createdAt?i(new Date(s==null?void 0:s.createdAt),Dm):"",[s,i]),h=Object.entries(r||{}).filter(([,f])=>f.type!=="button"&&f.visibility!=="hidden").map(([f,_])=>({key:f,value:Bn(_)?_.value:_,type:Bn(_)?_.type:"text",config:Bn(_)?_.config:void 0}))||[],d=A(()=>[...r?Object.values(r).filter(y=>y.type==="button").map(y=>{var T,g,E;return{title:y.value,variant:se.SECONDARY,event:(T=y.config)==null?void 0:T.action,classNames:(g=y==null?void 0:y.config)!=null&&g.className?[(E=y==null?void 0:y.config)==null?void 0:E.className]:[]}}):[]].filter(Boolean),[r]);return a(K,{children:s?a("div",{className:Ot,children:[a("div",{className:F(zm,{[qm]:h.length}),children:[a("div",{className:jm,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:Qn,children:[t&&a(k,{variant:I.CAPTION,stronger:!0,wide:!0,children:`${t}`}),a(k,{variant:I.CAPTION,className:Km,children:`${e}`})]})]}),h&&h.length>0?a("div",{children:a(mn,{classNames:Vm,items:h,align:"start",layout:"5-7",renderLabel:f=>a("div",{className:Zm,children:f}),renderValue:(f,_,y,T)=>{if(y==="link"&&T)return a(ba,{classNames:[F(T==null?void 0:T.className)],href:T.href,target:T.target||"_blank",children:f});if(y==="icon"&&T){const g={url:T.src,alt:T.alt||f};return a("div",{className:F(Xm,T==null?void 0:T.className),children:[a(Ia,{...g}),a(k,{variant:I.BODY,children:f})]})}return a(k,{className:F(T==null?void 0:T.className),variant:I.BODY,children:f})}})}):null,a("div",{className:Oa,children:[a("div",{className:Qn,children:(s==null?void 0:s.fundsCapturedAmount)&&(u&&Object.keys(u).length>0?a(Qc,{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:Qn,children:a("div",{className:oo,children:a(so,{noPadding:!0,children:a(mn,{items:u})})})})}):a("div",{className:F(ss,sl),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:Qn,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(Qc,{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:oo,children:a(so,{noPadding:!0,renderHeader:a(k,{className:rl,variant:I.CAPTION,stronger:!0,children:o.get("additions")}),children:a(mn,{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:oo,children:a(so,{noPadding:!0,renderHeader:a(k,{className:rl,variant:I.CAPTION,stronger:!0,children:o.get("subtractions")}),children:a(mn,{items:c==null?void 0:c.subtractions})})})]}):a("div",{className:F(ss,sl),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:F(Qn),children:a("div",{className:F(ss,Jm),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)})]})})]}),((m=n==null?void 0:n.payout)==null?void 0:m.unpaidAmount)&&a("div",{className:ep,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:Qm,children:a(ka,{actions:d,layout:Ys.BUTTONS_END})}):null]}):a(Ra,{skeletonRowNumber:6})})};var Fe=(e=>(e.WARNING="warning",e.CRITICAL="critical",e.HIGHLIGHT="highlight",e.SUCCESS="success",e))(Fe||{}),pn=(e=>(e.DEFAULT="default",e.TIP="tip",e))(pn||{});const ip=({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})}},_n=({className:e,description:t,title:n,type:r,children:s,onClose:i,variant:o=pn.DEFAULT})=>a("div",{className:F("adyen-pe-alert",`adyen-pe-alert--${r}`,`adyen-pe-alert--${o}`,e),role:"alert",children:[a(ip,{type:r,className:"adyen-pe-alert__icon"}),a("div",{className:"adyen-pe-alert__content",children:[n&&o!==pn.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!==pn.TIP?I.CAPTION:I.BODY,wide:!0,children:t}),s]}),i&&o!==pn.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 ct=(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))(ct||{}),lr=(e=>(e[e.INDETERMINATE=0]="INDETERMINATE",e[e.PARTIAL=1]="PARTIAL",e[e.FULL=2]="FULL",e))(lr||{}),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||{}),Xr=(e=>(e.IN_PROGRESS="in_progress",e.COMPLETED="completed",e.FAILED="failed",e))(Xr||{}),Rn=(e=>(e.PARTIAL="partial",e.FULL="full",e))(Rn||{});const md=Hr({availableItems:de,primaryAction:te,secondaryAction:te,transaction:U,extraFields:U,dataCustomization:U}),ap=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}=W(),{currentTransaction:m,canNavigateBackward:f,canNavigateForward:_,backward:y,forward:T}=u,g=A(()=>({title:d.get("refundAction")}),[d]),E=A(()=>!n||r,[n,r]),R=C(()=>void(!E&&s(ct.REFUND)),[E,s]),N=A(()=>{if(m===c.id){if(f)return 2;if(_)return 1}},[f,_,m,c]),D=C(()=>{switch(N){case 2:return void y();case 1:return void T()}},[N,y,T]),v=A(()=>{switch(N){case 2:return{title:d.get("refund.returnToRefund"),renderTitle:O=>a(K,{children:[a(Ze,{style:{transform:"scaleX(-1)"},name:"angle-right"}),a("span",{children:O})]})};case 1:return{title:d.get("refund.goToPayment"),renderTitle:O=>a(K,{children:[a(Ze,{name:"angle-right"}),a("span",{children:O})]})}}},[N,d]);return $(()=>{i(n?Object.freeze({disabled:E,event:R,variant:se.PRIMARY,...g}):void 0)},[R,n,E,g,i]),$(()=>{o(N&&v?Object.freeze({disabled:!1,event:D,variant:se.SECONDARY,...v}):void 0)},[N,D,v,o]),a(md.Provider,{value:{availableItems:t,primaryAction:R,secondaryAction:D,transaction:c,extraFields:l,dataCustomization:h},children:e})}),cp=()=>Gr(md),La=Object.freeze(["requested_by_customer","issue_with_item_sold","fraudulent","duplicate","other"]),lp=({refundAmount:e,refundReason:t,refundInProgress:n,refundTransaction:r,setActiveView:s,transactionId:i})=>{const{i18n:o}=W(),c=A(()=>{const _=o.amount(e.value,e.currency);return{title:o.get("refundPayment",{values:{amount:_}})}},[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]),m=C(()=>r==null?void 0:r({body:d,contentType:"application/json"},h).then(()=>{s(ct.REFUND_SUCCESS)}).catch(()=>{s(ct.REFUND_ERROR)}),[r,h,d,s]),f=A(()=>n?l:e.value>0?c:u,[e,n,c,u,l]);return{refundAction:m,refundActionLabel:f}},up=({interactionsDisabled:e,refundAmount:t,setActiveView:n,setPrimaryAction:r,setSecondaryAction:s,...i})=>{const{refundAction:o,refundActionLabel:c}=lp({...i,refundAmount:t,setActiveView:n}),{i18n:u}=W(),l=A(()=>e||t.value<=0,[t,e]),h=C(()=>!l&&o(),[l,o]),d=e,m=A(()=>u.get("back"),[u]),f=C(()=>void(!d&&n(ct.DETAILS)),[d,n]);return $(()=>{r(Object.freeze({disabled:l,event:h,variant:se.PRIMARY,...c}))},[h,l,c,r]),$(()=>{s(Object.freeze({disabled:d,event:f,title:m,variant:se.SECONDARY}))},[f,d,m,s]),{primaryAction:h,secondaryAction:f}},dp=({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(St(0,d,e))),[e,l]);return $(()=>{o(e)},[e]),[u,h]},cl=(e,t,n,r=0)=>{const{...s}=e.get(n.id),i=St(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}))},ll=(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)&&cl(e,s,i,o)}),r.forEach((i,o)=>{cl(e,s,{id:o,quantity:0},i)}),s.length>0?Object.freeze(s):de},hp=({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:m})=>[m,0])):new Map((u==null?void 0:u.map(m=>[m,0]))??de)].map(([m,f])=>({id:m,quantity:f}));return ll(s,l,d)})},[s]),c=C(u=>r(l=>ll(s,l,u)),[s]);return{availableItems:i,clearItems:o,items:n,updateItems:c}},fp=({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]},Js=e=>{setTimeout(()=>{throw e},0)};function No({queryFn:e,options:t}){const{retry:n=!1,retryDelay:r=1e3,onSuccess:s,onError:i,onSettled:o,shouldRetry:c}=t||U,[u,l]=x(null),[h,d]=x(null),[m,f]=x("idle"),_=Y(!0),y=Y(0),T=C(()=>{l(null),d(null),f("idle"),y.current=0},[]),g=C(()=>{y.current=0},[]),E=C(async(...R)=>{try{f("loading"),d(null);const N=await(e==null?void 0:e(...R));return _.current&&(l(N),f("success")),Pr.then(()=>{s&&fn(s,N).catch(Js),o&&fn(o,N,null).catch(Js),g()}),N}catch(N){let D=0;if(Ur(n)&&(!c||c(N))?D=Math.max(0,Math.floor(n)):D=0,y.current++<D){const v=Q(r)?r(y.current):r??1e3;return await new Promise(O=>setTimeout(O,v)),E(...R)}throw _.current&&(d(N),f("error")),Pr.then(()=>{i&&fn(i,N).catch(Js),o&&fn(o,void 0,N).catch(Js),g()}),N}},[e,s,o,n,c,r,g,i]);return $(()=>()=>{_.current=!1},[]),A(()=>({data:u,error:h,status:m,isIdle:m==="idle",isLoading:m==="loading",isSuccess:m==="success",isError:m==="error",mutate:E,reset:T}),[u,h,m,E,T])}const pd=Hr({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}),mp=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}=No({queryFn:Ce().endpoints.initiateRefund}),{availableItems:m,clearItems:f,items:_,updateItems:y}=hp({currency:n,lineItems:r}),T=h,[g,E]=dp({availableAmount:e,currency:n,interactionsDisabled:T,items:_,refundMode:i}),[R,N]=fp({interactionsDisabled:T,refundMode:i}),{value:D}=g,{primaryAction:v,secondaryAction:O}=up({interactionsDisabled:T,refreshTransaction:s,refundAmount:g,refundInProgress:h,refundReason:R,refundTransaction:d,setActiveView:o,setPrimaryAction:c,setSecondaryAction:u,transactionId:l});return a(pd.Provider,{value:{amount:D,availableAmount:e,availableItems:m,clearItems:f,currency:n,interactionsDisabled:T,items:_,primaryAction:v,refundMode:i,refundReason:R,secondaryAction:O,setAmount:E,setRefundReason:N,transactionId:l,updateItems:y},children:t})}),wa=()=>Gr(pd),pp=()=>{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=(m,f)=>{const _=e;e=t=n=r=void 0,!Di(m)&&!Di(f)&&(n=m,r=f,e=_===n||_===r?_:n,_!==e&&d())},h=m=>{Ne(m)?o=null:Q(m)&&o!==(o=m)&&d()},d=()=>{const m=t,f=e;t=void 0,o==null||o(J({from:ue(()=>m),to:ue(()=>f)}))};return J({backward:G(c),forward:G(u),canNavigateBackward:ue(s),canNavigateForward:ue(i),currentTransaction:ue(()=>e),onNavigation:{set:h},reset:G(l)})},_p=e=>{const[t,n]=x(e),[r,s]=x(e.id),[i,o]=x(performance.now()),{getTransaction:c}=Ce().endpoints,u=Y(pp()),l=u.current,h=Y(!1),d=Y(!1),m=Y(e),f=Y(r),_=A(()=>!!c&&!!r&&h.current,[r,c]),y=C(()=>c(U,{path:{transactionId:r}}),[r,c]),{data:T,error:g,isFetching:E}=Rt({fetchOptions:{enabled:_},queryFn:y}),R=C(()=>s(void 0),[]);return $(()=>{r||s(t.id)},[r,t]),$(()=>{var v;const N=u.current,D=m.current;return D.category==="Refund"&&(N.reset(D.id,(v=D.refundMetadata)==null?void 0:v.originalPaymentId),N.onNavigation=({to:O})=>{h.current=!0,o(performance.now()),O&&s(O)}),()=>{h.current=!1,N.onNavigation=null,N.reset()}},[]),$(()=>{if(d.current!==E&&!(d.current=E))if(!T||g)s(f.current);else{const N=m.current;n(()=>({...T.id===N.id?N:U,...T})),f.current=r}},[T,g,E,r,i]),{fetchingTransaction:E,refreshTransaction:R,transaction:t,transactionNavigator:l}},yp=(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}},eo=["completed","in_progress","failed"],gp=e=>{var R,N,D;const{i18n:t}=W(),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=(R=e==null?void 0:e.originalAmount)==null?void 0:R.value,c=A(()=>{var v;return e?Math.max(0,((v=n==null?void 0:n.refundableAmount)==null?void 0:v.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,m=A(()=>{var O;const v=((O=e==null?void 0:e.refundDetails)==null?void 0:O.refundStatuses)??[];return(v==null?void 0:v.filter(S=>S.amount.value!==0).sort((S,M)=>eo.includes(S.status)&&eo.includes(M.status)&&eo.indexOf(S.status)>eo.indexOf(M.status)?0:-1).reduce((S,M)=>{var j;const P=M.status,z=~M.amount.value+1;return S!=null&&S[P]?((j=S==null?void 0:S[P])==null||j.amounts.push(z),S):{...S,[P]:{amounts:[z],currency:M.amount.currency}}},{}))??{}},[(D=e==null?void 0:e.refundDetails)==null?void 0:D.refundStatuses]),f=A(()=>{var O,S;const v=(S=(O=m.completed)==null?void 0:O.amounts)==null?void 0:S.reduce((M,P)=>M+P,0);return v?Math.max(0,v??0):0},[m]),{some:_,every:y}=A(()=>yp(({status:v})=>v===Xr.COMPLETED,n==null?void 0:n.refundStatuses),[n==null?void 0:n.refundStatuses]),T=A(()=>{var v;return c===0&&f>0&&y&&f===o?[{type:Fe.HIGHLIGHT,label:t.get("refund.fullAmountRefunded")}]:((v=Object.keys(m))==null?void 0:v.map(S=>{var j,ie;const M=S,P=(j=m==null?void 0:m[M])==null?void 0:j.amounts.reduce((q,ce,Te)=>{var _e,De,pe;const me=(_e=m==null?void 0:m[M])==null?void 0:_e.amounts.length;return me>1&&Te===me-1?`${q?`${q}`:""} ${t.get("and")} ${t.amount(ce,(De=m==null?void 0:m[M])==null?void 0:De.currency)}`:`${q?`${q},`:""} ${t.amount(ce,(pe=m==null?void 0:m[M])==null?void 0:pe.currency)}`},""),z=(ie=m==null?void 0:m[M])==null?void 0:ie.amounts.reduce((q,ce)=>q+ce,0);switch(S){case Xr.COMPLETED:return{type:Fe.HIGHLIGHT,label:t.get("refund.amountAlreadyRefunded",{values:{amount:P}})};case Xr.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 Xr.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,f,m,y]),g=A(()=>{if(c>0){const v=t.amount(c,h);switch(r){case We.FULL_AMOUNT:return{type:Fe.HIGHLIGHT,description:t.get("refund.onlyRefundable",{values:{amount:v}})};case We.PARTIAL_AMOUNT:return{type:Fe.HIGHLIGHT,description:t.get("refund.maximumRefundable",{values:{amount:v}})};default:return null}}return null},[t,c,h,r]),E=A(()=>{switch(r){case We.NON_REFUNDABLE:if(c===0&&f>0&&y&&f===o)return lr.FULL}switch(r){case We.PARTIAL_AMOUNT:case We.PARTIAL_LINE_ITEMS:if(c>0&&_&&f>0&&!Z(o)&&f<o)return lr.PARTIAL}return lr.INDETERMINATE},[c,f,r,o,_,y]);return{refundableAmount:c,refundable:i,refundableAmountLabel:g,refundAvailable:l,refundAuthorization:u,refundCurrency:h,refundDisabled:d,refundedAmount:f,refundedState:E,refundStatuses:T,refundLocked:s,refundMode:r}},mt="adyen-pe-popover",_d="adyen-pe-tooltip",Tp=`${mt}-container`,ul=`${mt}__header`,Ap=`${mt}__header-title`,yi=`${mt}__content`,yd=`${_d}__content`,Ep=`${mt}__footer`;function Np({image:e=!0,onClick:t}){const{i18n:n}=W();return a(K,{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 vp=Ie(Np);function Cp({title:e,isImageTitle:t=!1}){return a(k,{strongest:!t,variant:t?I.SUBTITLE:I.BODY,children:e})}const Sp=Ie(Cp);var qe=(e=>(e.TOOLTIP="tooltip",e.POPOVER="popover",e))(qe||{}),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||{}),ds=(e=>(e.MEDIUM="medium",e.WIDE="wide",e))(ds||{}),V=(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))(V||{}),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 Qr=(()=>{let e=[];const t=o=>{const c=o.reduce((u,l)=>{const h=l instanceof Node?e.findIndex(d=>{const m=d.element.getAttribute("id"),f=l&&(l!=null&&l.getAttribute)?l==null?void 0:l.getAttribute("id"):null;return m===f}):-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}})(),hs=Symbol("_ref");class gd extends Error{}class Rp extends gd{}class Op extends gd{}function Pa(e){if(!Q(e))throw new Op}const bp=e=>{try{if(Q(e)&&Bt(e,"current")&&Bt(e,hs)&&!Yn(e,e[hs])){const t=e.actions.get(U),n=e.actions.size;return Z(t)&&Number.isInteger(n)&&n>=0}}catch{}return!1},fs=e=>bp(e)?fs(e[hs]):e;function Ip(e){return!!e.current}const Dp=(()=>{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=fs(s);try{o=e(r,u)}catch{Pa(i)}if(o)[,c]=o;else{const l=Q(u),h=l?f=>{u(m=f)}:f=>{u&&(u.current=f,m=u.current)},d=f=>{if(c.size===0)return;const _=m;if(h(f),!Yn(m,_))for(const[y]of c)y(m,_)};let m=l?null:u.current;r.set(u,o=[d,c=new Map]),Object.defineProperties(d,{[hs]:{value:u},actions:{value:J({get:{value:c.get.bind(c)},size:{get:()=>c.size}})},current:{get:()=>m,set:l?void 0:d}})}return i&&c.set(i,1+(c.get(i)||0)),o[0]},n=(r,s,i)=>{const o=fs(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:G(t.bind(void 0,r)),unbind:G(n.bind(void 0,r))})}})(),kp=Dp(),Lp=e=>{Pa(e);const t=new WeakMap([[e,1]]),n=s=>{if(Yn(r,s))return;const i=r;e(r=s,i)};let r=null;return Object.defineProperties(n,{[hs]:{value:n},actions:{value:J({get:{value:t.get.bind(t)},size:{value:1}})},current:{get:()=>r,set:n}})},wp=(e=kp)=>{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(Yn(fs(n),fs(d))){t=e.bind(n,l),c(),r=l;return}c()}r=l,t=(n=d)?e.bind(n,r):Lp(r)}}})},on=(e,t)=>{const n=Y(wp());return us(()=>n.current.release,[]),A(()=>(n.current.update(e,t),n.current.reflex),[e,t])},sr=Symbol("__control.Elem.");var Td=(e=>(e.POPOVER="POPOVER",e.DEFAULT="DEFAULT",e))(Td||{});const dl=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")Qr.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[sr])instanceof Element&&(d=d[sr],u.length=0);t&&!h&&t(!0)}},[s,t,r]),o=Y(i);return $(()=>()=>{s.current&&Qr.remove(s.current),document.removeEventListener("click",o.current,!0)},[]),$(()=>(document.removeEventListener("click",o.current,!0),o.current=i,document.addEventListener("click",o.current,!0),r==="POPOVER"&&s.current instanceof Element&&Qr.add(s.current,t),()=>{s.current&&Qr.remove(s.current),document.removeEventListener("click",o.current,!0)}),[i,t,r]),$(()=>{n?document.removeEventListener("click",o.current,!0):document.addEventListener("click",o.current,!0)},[n]),on(C((c,u)=>{u instanceof Element&&u.removeEventListener("focusout",dl,!0),c instanceof Element&&(n||(c.addEventListener("focusout",dl,!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+/,""),Pp=["contenteditable","controls","disabled","hidden","href","inert","tabindex"],hl=new Map,Ad=e=>e.tagName==="INPUT",Mp=e=>Ad(e)&&e.type==="radio",Fp=e=>{const t=e.name,n=e.form,r=hl.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,hl.set(n,(r||new Map).set(t,s))),s===e},xp=(e,t)=>{for(const n of t)if(n.type!=="attributes"){if(Oc(n.addedNodes,r=>r instanceof Element&&Hi(r))||Oc(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"))||Ad(e)&&e.hidden),Hi=e=>!(Mp(e)&&!Fp(e)||(e==null?void 0:e.tabIndex)<0||!Ba(e)),Bp=()=>{const e=new MutationObserver(c=>xp(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(!Ur(c))return s(t.indexOf(c));if(c===~~c)return s(Fs(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:Pp,attributes:!0,childList:!0,subtree:!0}),i()))}},tabbables:{value:t}});return o},$p=(e,t)=>{const n=Y(!1),r=Y(null),s=Y(!1),i=A(Bp,[]),o=A(()=>{let h=null,d;return m=>{Z(d)||cancelAnimationFrame(d);let f=m.target;for(;f&&f!==m.currentTarget;){if(Ba(f)){h=f,d=requestAnimationFrame(()=>{d=requestAnimationFrame(()=>{var _;r.current!==h&&h instanceof HTMLElement&&((_=r.current=h)==null||_.focus()),h=null,d=void 0})});return}f=f.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 V.ARROW_DOWN:case V.ARROW_LEFT:case V.ARROW_RIGHT:case V.ARROW_UP:case V.END:case V.ESCAPE:case V.HOME:case V.PAGE_DOWN:case V.PAGE_UP:case V.TAB:cancelAnimationFrame(h),h=requestAnimationFrame(()=>{h=requestAnimationFrame(()=>{s.current=!1,h=void 0})}),s.current=!0;break}d.code===V.TAB?(d.preventDefault(),i.current=d.shiftKey?-1:1):d.code===V.ESCAPE&&t(!0)}},[]);return on(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)},gi=(()=>{const e=new WeakMap,t=J({remove:G(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=Wr(t,{observerCallback:G(s),observer:G(o)}),e.set(s,i)}return i},r=s=>{const i=e.get(s);i==null||i.observer.disconnect(),e.delete(s)};return n})(),Up=({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,m=h.left+h.width/2-d.offsetWidth/2,f=l.left+l.width/2-d.offsetWidth/2,_=l.top+l.height/2-d.offsetHeight/2;switch(r){case ge.BOTTOM:c=i?m:s===qe.TOOLTIP?f+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===qe.TOOLTIP?f+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===qe.TOOLTIP?_+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===qe.TOOLTIP?_+window.scrollY:(l==null?void 0:l.top)+window.scrollY-(l==null?void 0:l.height)/2;break}const y=[c,u,0];return`position:absolute;inset:0 auto auto 0;margin: 0;transform: ${y.reduce((g,E,R)=>R===0?g+`${E}px,`:R===y.length-1?g+` ${E}px)`:g+` ${E}px,`,"translate3d(")};visibility:hidden`},Wp=(e,t,n,r,s,i,o,c,u)=>{const[l,h]=x(!0),[d,m]=x(c?!c:!!r),[f,_]=x(r||ge.TOP),[y,T]=x([]),g=C(R=>{if(R.intersectionRatio===1)return m(!0);if(!l&&R.intersectionRatio!==1){if(y&&y.length===(c?5:4)){const N=y.reduce((D,v)=>v[1]>D[1]?v:D,y[0]);_(N[0]),m(!0);return}switch(m(!1),f){case ge.TOP:T(N=>[...N,[ge.TOP,R.intersectionRatio]]),_(ge.BOTTOM);break;case ge.BOTTOM:T(N=>[...N,[ge.BOTTOM,R.intersectionRatio]]),_(c?ge.BOTTOM_LEFT:ge.RIGHT);break;case ge.BOTTOM_LEFT:T(N=>[...N,[ge.BOTTOM,R.intersectionRatio]]),_(ge.RIGHT);break;case ge.RIGHT:T(N=>[...N,[ge.RIGHT,R.intersectionRatio]]),_(ge.LEFT);break;case ge.LEFT:T(N=>[...N,[ge.LEFT,R.intersectionRatio]]),_(ge.TOP);break}}},[l,y,f,c]),E=Y(g);return $(()=>{gi(E.current).remove(),E.current=g},[g]),on(C((R,N)=>{var D,v;if(N&&(!r||c)&&gi(g).observer.unobserve(N),R&&t.current){if((!r||c)&&gi(g).observer.observe(R),!(R instanceof Element))return;const O=Up({popover:R,offset:e,targetElement:t,position:f,variant:n,fullWidth:o??!1}),S=d?O+";visibility:visible":O,M=i?S+";min-width:fit-content;width:"+((D=t.current)==null?void 0:D.clientWidth)+"px":S;R.setAttribute("style",`${M}`),l&&h(!1),n&&n===qe.TOOLTIP&&s&&Ip(s)&&((v=s.current)==null||v.setAttribute("data-popover-placement",f))}},[e,t,f,r,n,g,d,l,i,s,o,c]),u)},vo=e=>{const t=Y();return on(C((n,r)=>{r instanceof Element&&r.id===t.current&&(r.id=""),n instanceof Element&&(n.id=t.current||(t.current=Mr()))},[e]),e)},Hp=e=>{var r;let t;const n=(r=e.querySelector(`.${yd}`))==null?void 0:r.querySelectorAll(Fa);return n?(Array.prototype.some.call(n,s=>{if(Ba(s))return t=s}),t):null},Gp=e=>e===qe.TOOLTIP?[10,3,5,5]:[15,15,15,15];function $a({actions:e,disableFocusTrap:t=!1,actionsLayout:n=Ys.SPACE_BETWEEN,variant:r=qe.TOOLTIP,title:s,open:i,dismissible:o,modifiers:c,divider:u,fitContent:l,withoutSpace:h,containerSize:d,position:m,targetElement:f,setToTargetWidth:_,dismiss:y,children:T,withContentPadding:g,classNameModifiers:E,showOverlay:R=!1,fitPosition:N,...D}){const v=A(()=>Q(y)&&$t(o),[y,o]),O=vo(),S=Y(),M=C(pe=>{var ke;y&&y(),pe&&((ke=f==null?void 0:f.current)==null||ke.focus())},[y,f]),P=C(pe=>{pe.code===V.ESCAPE&&(y&&y(),(f==null?void 0:f.current).focus())},[y,f]),z=Y(P),j=Y(),ie=Ma(Wp(Gp(r),f,r,m,O,_,R,N),y,r===qe.TOOLTIP&&!i,Td.POPOVER),q=$p(t?null:ie,M),ce=on(C((pe,ke)=>{ke instanceof Element&&(ke[sr]=void 0,delete ke[sr]),pe instanceof Element&&(pe[sr]=f.current,cancelAnimationFrame(j.current),j.current=requestAnimationFrame(()=>{if(S.current===i||!(S.current=i))return;const fe=Hp(pe);fe==null||fe.focus()}))},[i,f]),t?ie:q),Te=vo(ce),me=A(()=>({[`${mt}--medium`]:d===ds.MEDIUM,[`${mt}--with-divider`]:!!u,[`${mt}--wide`]:d===ds.WIDE,[`${mt}--fit-content`]:l,[`${mt}--without-space`]:h,[`${mt}--auto-width`]:R}),[d,u,h,l,R]);$(()=>{ce.current&&(ce.current[sr]=f.current)},[f]),$(()=>(document.removeEventListener("keydown",z.current),document.addEventListener("keydown",z.current=P),()=>document.removeEventListener("keydown",z.current)),[P]);const _e=r===qe.TOOLTIP?_d:`${mt} ${Tp}`,De=r===qe.TOOLTIP?yd:`${yi}`;return Xu(a(K,{children:i?a(K,{children:[R&&a("div",{className:"adyen-pe-popover__overlay"}),a("div",{id:"popover",ref:Te,...D,className:F(_e,me,E),style:{visibility:"hidden"},role:D.role??(r===qe.POPOVER?"dialog":"tooltip"),children:[(s||v)&&a("div",{className:Aa(ul,c,[ul]),children:[s&&a("div",{className:Ap,children:a(Sp,{title:s})}),v&&a(vp,{onClick:y})]}),T&&a(K,{children:[a("div",{className:F(De,{[`${yi}--with-padding`]:g,[`${yi}--overlay`]:R}),children:T}),r===qe.TOOLTIP&&a("span",{"data-popover-placement":"hidden",ref:O,className:"adyen-pe-tooltip__arrow"})]}),e&&a("div",{className:Ep,children:a(ka,{actions:e,layout:n})})]})]}):null}),document.getElementsByTagName("body")[0])}const Yp=()=>{const[e,t]=wt(),n=C(()=>t(!0),[t]),r=C(()=>t(!1),[t]),s=C(i=>{switch(i.code){case V.ESCAPE:r();break}},[r]);return{listeners:{onfocusoutCapture:r,onMouseLeave:r,onKeyDown:s,onFocus:n,onMouseEnter:n},isVisible:e}},jp=e=>typeof e=="string";function zp(){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 nn=({content:e,children:t,triggerRef:n,showTooltip:r,position:s,isContainerHovered:i=!1})=>{var l,h,d;const o=vo(),{isVisible:c,listeners:u}=Yp();return zp()?a(K,{children:t}):a(K,{children:[t?Yu(t,{...t==null?void 0:t.props,role:"button",tabIndex:-1,ref:o,className:(l=t==null?void 0:t.props)!=null&&l.className?F(`${(h=t==null?void 0:t.props)==null?void 0:h.className} adyen-pe__tooltip-target`,{" adyen-pe__tooltip-target--hovered":i}):F("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:qe.TOOLTIP,targetElement:n??o,position:s,open:c||r,children:a(K,{children:e&&jp(e)?a(k,{variant:I.CAPTION,children:e}):{content:e}})})]})};function qp({value:e,isContainerHovered:t}){const{i18n:n}=W(),r=`tooltip.${e}`;return a(K,{children:n.has(r)&&a(nn,{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"]},Ed=(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}},$n=({textToCopy:e,isHovered:t,buttonLabel:n,showCopyTextTooltip:r=!0,type:s="Link",...i})=>{const{i18n:o}=W(),[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:F("adyen-pe-copy-text__container",{"adyen-pe-copy-text__container--information":s==="Link"}),...i,children:[r?a(nn,{content:e,isContainerHovered:t,children:a("span",{className:F({"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:F({"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(nn,{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:F("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=Ed(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($n,{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}=W();return a(K,{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(hd,{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},t_),r=on(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===V.ARROW_LEFT&&n({type:"ACTIVE",index:t.index});return}switch(o.code){case V.ARROW_DOWN:case V.ARROW_UP:n({type:"ACTIVE",index:o.code===V.ARROW_DOWN?t.index+1:t.index-1});break;case V.HOME:n({type:"ACTIVE",index:0});break;case V.END:n({type:"ACTIVE",index:e-1});break;case V.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}},Zp=({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}=W(),{currentIndex:c,listeners:u,ref:l}=Vp({totalRows:(e==null?void 0:e.length)??0});return a(K,{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(hd,{columns:t,customCells:r,item:h,rowIndex:d})},h))})},Xp=({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(K,{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:F({"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]})},Qp="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",Jp=({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(dd.Provider,{value:{registerCells:n,getMinWidthByColumn:r},children:gn(e)})},e_=({cellKey:e,position:t,label:n})=>{const{registerCells:r}=Da(),s=Y(null);return $(()=>{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:F("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})})},t_=Object.freeze({activeIndex:-1,index:-1});function Tn({errorDisplay:e,...t}){return a("div",{style:{width:"100%"},children:a(Jp,{children:a(n_,{...t,errorDisplay:e})})})}function n_({errorDisplay:e,...t}){var l,h;const n=A(()=>gn(t.children),[t.children]),r=A(()=>n.find(d=>(d==null?void 0:d.type)===Nd),[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:F("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(K,{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(e_,{label:d.label,position:d.position,cellKey:d.key},d.key))})}),a(r_,{...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:Qp,centered:!0}):t.error&&e?e():null)]}),r]})})}function r_(e){const t=A(()=>e.loading||e.emptyBody||e.error,[e.emptyBody,e.error,e.loading]);return a("div",{role:"rowgroup",className:F("adyen-pe-data-grid__body"),style:t&&{display:"grid",gridTemplateColumns:"1fr"},children:t?a(Xp,{columnsNumber:e.columns.length,loading:e.loading}):e.onRowClick?a(Zp,{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=Nd;function Nd({children:e}){return a("div",{className:"adyen-pe-data-grid__footer",children:e})}Tn.defaultProps={condensed:!1,outline:!0,scrollable:!0};const Co="-ariaError";var je=(e=>(e[e.NONE=0]="NONE",e[e.APPLY=1]="APPLY",e[e.CLEAR=2]="CLEAR",e))(je||{});const vd=({applyDisabled:e,applyTitle:t,resetDisabled:n,resetTitle:r}=U)=>{const{i18n:s}=W(),[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]),m=A(()=>({disabled:xe(e),event:l,title:(t==null?void 0:t.trim())||s.get("apply"),variant:se.PRIMARY}),[s,l,e,t]),f=A(()=>({disabled:xe(n),event:h,title:(r==null?void 0:r.trim())||s.get("reset"),variant:se.SECONDARY}),[s,h,n,r]),_=A(()=>[m,f],[m,f]);return $(()=>{switch(u(i!==je.NONE),i){case je.APPLY:case je.CLEAR:d();break}},[i,u,d]),{commitAction:i,commitActionButtons:_,committing:c,resetCommitAction:d}};function Cd(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)},m=F([n],"adyen-pe-image",{"adyen-pe-image--loaded":c},...r.map(f=>`adyen-pe-image--${f}`));return $(()=>{const f=t?new Image:l.current;f&&(f.src=t||s,f.onload=h),u(!!(f!=null&&f.complete))},[]),t?a("div",{style:{backgroundUrl:t},...e,className:m}):a("img",{...e,alt:i,ref:l,className:m,onError:d})}const $r="adyen-pe-dropdown",s_=Aa(lt,[se.SECONDARY],[lt]),Wt=`${$r}__button`,o_=`${Wt}--active`,i_=`${Wt}-collapse-indicator`,a_=`${Wt}--has-selection`,c_=`${Wt}-icon`,l_=`${Wt}-multiselect-counter`,u_=`${Wt}--readonly`,d_=`${Wt}-text`,h_=`${Wt}--valid`,f_=`${Wt}--invalid`,an=`${$r}__element`,m_=`${an}--active`,p_=`${an}-checkbox`,__=`${an}-checkmark`,y_=`${an}-content`,g_=`${an}--disabled`,T_=`${an}-icon`,A_=`${an}--no-option`,Sd=`${$r}__list`,E_=`${Sd}--active`,N_=`${$r}--multiselect`,v_=({active:e,disabled:t,className:n,filterable:r,toggleButtonRef:s,...i})=>{const o=A(()=>r?F(s_,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})},C_=e=>{var m,f;const{i18n:t}=W(),{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 _;return((_=h==null?void 0:h.name)==null?void 0:_.trim())||l},[h,l]);return a(v_,{active:n,disabled:o,"aria-disabled":o,"aria-expanded":c,"aria-haspopup":"listbox",className:F(Wt,{[o_]:c,[a_]:!!n.length,[u_]:o,[f_]:e.isInvalid,[h_]: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(K,{children:[(h==null?void 0:h.icon)&&a(Cd,{className:c_,src:h.icon,alt:((m=h==null?void 0:h.name)==null?void 0:m.trim())??""}),a("span",{className:d_,children:((f=h==null?void 0:h.selectedOptionName)==null?void 0:f.trim())||d}),s&&e.appliedFilterNumber>0&&a("div",{className:l_,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:e.appliedFilterNumber})})]}),!u&&a("span",{className:i_,children:a(Qo,{role:"presentation"})})]})},S_=e=>{var u;const{componentRef:t}=W(),[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 $(()=>{const l=t.current;if(!l)return;const h=new ResizeObserver(d=>{for(const m of d)m.target===l&&r(l.offsetWidth)});return h.observe(l),()=>{h.unobserve(l),h.disconnect()}},[t]),c},Oe={up:{sm:["up",bt.sm],md:["up",bt.md]},down:{xs:["down",bt.sm-1],sm:["down",bt.md-1]},only:{xs:["only",bt.sm-1,{max:bt.sm-1}],sm:["only",bt.sm,{max:bt.md-1}],md:["only",bt.md,{max:bt.lg-1}]}},be=S_,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"})]})),O_=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"})]})),b_=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",fillRule:"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",clipRule:"evenodd"})]})),I_=e=>e.multiSelect?a("span",{className:p_,children:e.selected?a(R_,{role:"presentation"}):a(O_,{role:"presentation"})}):null,Rd=e=>e.multiSelect?null:a("span",{className:__,children:e.selected&&a(b_,{role:"presentation"})}),D_=e=>a(K,{children:[I_(e),a("div",{className:e.contentClassName,children:[e.item.icon&&a(Cd,{className:e.iconClassName,alt:e.item.name,src:e.item.icon}),a("span",{children:e.item.name})]}),Rd(e)]}),k_=({item:e,multiSelect:t,onKeyDown:n,onSelect:r,renderListItem:s,selected:i})=>{const o=!!e.disabled,c=xe(e.disabled)||null,u=F(an,{[m_]:i,[g_]: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:y_,iconClassName:T_})})},L_=Ie(k_),w_=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:m,popoverClassNameModifiers:f,showOverlay:_,fitPosition:y},T)=>{const{i18n:g}=W(),E=be(Oe.down.xs),R=n.filter(S=>!l||S.name.toLowerCase().includes(l)),N=F(Sd,{[E_]:u}),D=F(an,A_),v=A(()=>Q(o)?o:D_,[o]),O=A(()=>xe(r),[r]);return u?a($a,{classNameModifiers:f,actions:O?t:void 0,disableFocusTrap:!0,divider:!0,dismiss:d,dismissible:!1,open:u,setToTargetWidth:m,containerSize:ds.MEDIUM,variant:qe.POPOVER,targetElement:h,withContentPadding:!1,position:ge.BOTTOM,showOverlay:_&&E,fitPosition:y,children:a("ul",{className:N,id:c,ref:T,role:"listbox","aria-multiselectable":O,children:R.length?R.map(S=>a(L_,{item:S,multiSelect:O,onKeyDown:s,onSelect:i,renderListItem:v,selected:e.includes(S)},S.id)):a("div",{className:D,children:g.get("select.noOptionsFound")})})}):null}),P_=Ie(w_),M_=({items:e,multiSelect:t,selected:n})=>{const r=C((u=de)=>{const l=de.concat(u??de).filter(Boolean),h=e.filter(m=>l.includes(m.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 $(()=>i(r(n)),[r,n,i]),{resetSelection:o,select:c,selection:s}},js=({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:m,uniqueId:f,renderListItem:_,isCollatingErrors:y,setToTargetWidth:T,withoutCollapseIndicator:g=!1,showOverlay:E=!1,fitPosition:R})=>{const{resetSelection:N,select:D,selection:v}=M_({items:r,multiSelect:i,selected:u}),[O,S]=x(!1),[M,P]=x(""),z=Y(null),j=Y(null),ie=Y(null),q=Y(`select-${aa()}`),[ce,Te]=x(0),me=Y(),_e=Y(!0),De=Y(!1),pe=Y(v),ke=Y(v),fe=C(()=>{P(""),S(!1),O&&(N(pe.current),_e.current=!0)},[N,S,P,O]),Ue=A(()=>F([$r,{[N_]:xe(i)},...t.map(ae=>`${$r}--${ae}`),e]),[e,t,i]),{commitAction:oe,commitActionButtons:ze,committing:Qe,resetCommitAction:gt}=vd({resetDisabled:!v.length}),Ge=C(()=>{var ae;P(""),S(!1),gt(),_e.current?_e.current=!1:(ae=ie.current)==null||ae.focus()},[gt,S,P]),Ht=C(()=>{pe.current=v;const ae=`${v.map(({id:Se})=>Se)}`;c({target:{value:ae,name:l}})},[l,c,v]);$(()=>{switch(oe){case je.APPLY:Ht();break;case je.CLEAR:N(),De.current=!0;break}},[oe,Ht,N]);const Be=C(ae=>{var Re;ae.preventDefault();const Se=ae.currentTarget&&((Re=j==null?void 0:j.current)!=null&&Re.contains(ae.currentTarget))?ae.currentTarget:null;if(Se&&!Se.getAttribute("data-disabled")){const qs=Se.getAttribute("data-value"),Ks=r.find(Vs=>Vs.id===qs);D(Ks)}},[r,D]);$(()=>{ke.current!==v&&(ke.current=v,(!i||De.current)&&(Ht(),Ge())),De.current=!1},[Ge,Ht,i,v]),$(()=>{Qe&&(Te(v.length),Ge())},[Qe,Ge,Te,v.length]);const An=C(ae=>{switch(ae.code){case V.ESCAPE:case V.TAB:O&&Ge(),_e.current=ae.key===V.TAB;return;case V.ENTER:case V.SPACE:if(s&&O){if(ae.key===V.ENTER)if(M)Be(ae);else break;return}break;case V.ARROW_DOWN:case V.ARROW_UP:break;default:return}ae.preventDefault(),S(!0)},[Ge,s,Be,O,S,M]);$(()=>{O&&(cancelAnimationFrame(me.current),me.current=requestAnimationFrame(()=>{var ae;e:{let Se=(ae=j.current)==null?void 0:ae.firstElementChild,Re;for(;Se;){if(!(Se.dataset.disabled&&Se.dataset.disabled==="true")){if(Se.getAttribute("aria-selected")==="true"){Se.focus();break e}Re=Re||Se}Se=Se.nextElementSibling}Re&&Re.focus()}}))},[O]);const Kn=C(ae=>{const Se=ae.target;switch(ae.code){case V.ESCAPE:ae.preventDefault(),Ge();break;case V.ENTER:case V.SPACE:Be(ae);break;case V.ARROW_DOWN:{ae.preventDefault();let Re=Se.nextElementSibling;for(;Re;){if(!(Re.dataset.disabled&&Re.dataset.disabled==="true")){Re.focus();break}Re=Re.nextElementSibling}break}case V.ARROW_UP:{ae.preventDefault();e:{let Re=Se.previousElementSibling;for(;Re;){if(!(Re.dataset.disabled&&Re.dataset.disabled==="true")){Re.focus();break e}Re=Re.previousElementSibling}s&&z.current&&z.current.focus()}break}case V.TAB:Ge();break}},[Ge,s,Be]),Vn=C(ae=>{const Se=ae.target.value;P(Se.toLowerCase())},[P]),li=C(ae=>{ae.preventDefault(),S(Se=>!Se),O&&N(pe.current)},[S,O,N]);return $(()=>{var ae;O&&s&&((ae=z.current)==null||ae.focus())},[s,O]),a("div",{className:Ue,children:[a(C_,{id:f??void 0,appliedFilterNumber:ce,active:v,filterInputRef:z,filterable:s,isInvalid:h,isValid:d,onButtonKeyDown:An,onInput:Vn,multiSelect:i,placeholder:m,readonly:o,selectListId:q.current,showList:O,toggleButtonRef:ie,toggleList:li,withoutCollapseIndicator:g,ariaDescribedBy:!y&&f?`${f}${Co}`:""}),a(P_,{popoverClassNameModifiers:n,setToTargetWidth:T,dismissPopover:fe,active:v,commitActions:ze,items:r,multiSelect:i,onKeyDown:Kn,onSelect:Be,selectListId:q.current,ref:j,toggleButtonRef:ie,renderListItem:_,showList:O,showOverlay:E,textFilter:M,fitPosition:R})]})},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:"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"})]})),x_=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}=W(),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 ${F({})}`,children:[a("div",{className:"adyen-pe-pagination__context",children:u&&o&&a(K,{children:[a("span",{children:c.get("pagination.showing")}),a("div",{className:"adyen-pe-pagination__limit-selector",children:a(js,{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(F_,{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(x_,{disabled:!t})})]})]})}const qn="adyen-pe-transactions-table",B_=qn+"__amount",$_=qn+"__payment-method",U_=qn+"__payment-method-logo-container",W_=qn+"__payment-method-logo",H_=qn+"__date-and-payment-method",G_=qn+"__date-and-payment-method--date",Y_="https://cdf6519016.cdn.adyen.com/checkoutshopper/",j_=({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}`},z_=({options:e=U,name:t})=>{const{loadingContext:n}=W();return A(()=>j_({resourceContext:Y_,name:t,...e}),[n,t,e])},Od=({folder:e="components/",className:t,alt:n,name:r,extension:s})=>{const i=z_({options:A(()=>({imageFolder:e,extension:s}),[s,e]),name:r});return a("img",{className:F("adyen-pe__image",t),alt:n,src:i})},q_=Object.freeze({klarna:"Klarna",paypal:"PayPal"});function bd(e,t){return e.lastFourDigits?t==="detail"?"•••• •••• •••• "+e.lastFourDigits:e.lastFourDigits:e.description||q_[e.type]||e.type}const fl=({paymentMethod:e,bankAccount:t})=>{const{i18n:n}=W(),r=be(Oe.down.xs);return a("div",{className:$_,children:e||t?a(K,{children:[a("div",{className:U_,children:a(Od,{name:e?e.type:"bankTransfer",alt:e?e.type:"bankTransfer",folder:"logos/",className:W_})}),a(k,{variant:I.BODY,stronger:r,children:e?bd(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"},Id=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}=W(),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(m=>m===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,m)=>(d[m.key]=m,d),{}))||{},h=new Map;return u.forEach(d=>{const m=l[d.key];if((m==null?void 0:m.visibility)!=="hidden")if(h.has(d.key)){const f=h.get(d.key);h.set(d.key,{...f,...d,visible:d.visibility!=="hidden",position:d.align||f.position})}else{const{key:f,flex:_,align:y}=d,T=r.get(Id(f)),g=V_((n==null?void 0:n[f])||U);h.set(d.key,{key:f,label:T,visible:c.includes(d.key)?i:!0,flex:_,position:y,...g})}}),Array.from(h.values())},[n,t,e,r,i,s])},Ya=["createdAt","paymentMethod","transactionType","amount"],Z_=({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:m}=W(),{dateFormat:f}=sn(e==null?void 0:e.timeZone),[_,y]=x(),T=be(Oe.up.sm),g=be(Oe.up.md),E=be(Oe.down.xs),R=m.get("amount"),N=Ga({fields:Ya,customColumns:h,columnConfig:{amount:{label:r?void 0:`${R} ${t&&t[0]?`(${Ou(t[0])})`:""}`,position:"right",flex:T?1.5:void 0},transactionType:{visible:g},paymentMethod:{visible:T}}}),D={title:"noTransactionsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},v=C(S=>{y(S??void 0)},[y]),O=A(()=>()=>a(Wa,{error:n,onContactSupport:i,errorMessage:"weCouldNotLoadYourTransactions"}),[n,i]);return a("div",{className:qn,children:a(Tn,{errorDisplay:O,error:n,columns:N,data:l,loading:s,outline:!1,onRowClick:{callback:o},onRowHover:v,emptyTableMessage:D,customCells:{transactionType:({item:S,rowIndex:M})=>{const P=`tooltip.${S.category}`;return S.category?m.has(P)?a(qp,{isContainerHovered:M===_,value:S.category}):a(k,{variant:I.BODY,children:m.has(`txType.${S.category}`)?m.get(`txType.${S.category}`):`${S.category}`}):null},amount:({value:S})=>{const M=m.amount(S.value,S.currency,{hideCurrency:!r});return a(k,{variant:I.BODY,className:B_,children:M})},createdAt:({item:S,value:M})=>E?a("div",{className:H_,children:[a(fl,{paymentMethod:S.paymentMethod,bankAccount:S.bankAccount}),a(k,{variant:I.BODY,className:G_,children:f(S.createdAt,Lm)})]}):a(k,{variant:I.BODY,children:f(M,km)}),paymentMethod:({item:S})=>a(fl,{paymentMethod:S.paymentMethod,bankAccount:S.bankAccount})},children:u&&a(Tn.Footer,{children:a(Ha,{...d})})})})},tt="adyen-pe-transaction-data",ml=`${tt}__amount`,X_=`${tt}__action-bar`,Jo=`${tt}__container`,Q_=`${tt}__head-container`,ja=`${tt}__input`,zs=`${ja}-container`,Dd=`${zs}--short`,J_=`${zs}--text-input`,e3=`${zs}--with-error`,kd=`${ja}-head`,Ld=`${tt}__label`,t3=`${tt}__list`,za=`${tt}__payment-method`,n3=`${za}-detail`,wd=`${za}-logo`,r3=`${wd}-container`,s3=`${tt}__tags`,o3=`${tt}__status-box`,i3=`${tt}__refund-response`,So=`${tt}__refund-response-icon`,a3=`${So}--success`,c3=`${So}--error`,l3=`${tt}__refund-statuses-container`,Pd=new Set(["status","category","paymentMethod","bankAccount","balanceAccount","id","balanceAccountId",...Ya,"deductedAmount","lineItems","originalAmount","paymentPspReference","refundDetails","refundMetadata"]),u3=()=>{var s;const{i18n:e}=W(),{transaction:t,extraFields:n,dataCustomization:r}=cp();return A(()=>{const{balanceAccount:i,category:o,id:c,paymentPspReference:u,refundMetadata:l}=t,h=o==="Refund",d=null,m=N=>{if(Ne(N))return null;const{value:D,currency:v}=N;return e.amount(D,v)},f=m(t.deductedAmount),_=m(t.originalAmount),y=h?"refund.refundFee":"refund.fee",T=h?"refund.originalPayment":"refund.originalAmount",g=h?"refund.paymentPspReference":"refund.pspReference",R=[...[_?{key:T,value:_,id:"originalAmount"}:d,f?{key:y,value:f,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($n,{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,v;return!((v=(D=r==null?void 0:r.details)==null?void 0:D.fields)!=null&&v.some(O=>O.key===N.id&&O.visibility==="hidden"))}),...Object.entries(n||{}).filter(([N,D])=>!Pd.has(N)&&D.type!=="button"&&D.visibility!=="hidden").map(([N,D])=>({key:N,value:Bn(D)?D.value:D,type:Bn(D)?D.type:"text",config:Bn(D)?D.config:void 0}))||{}];return a(mn,{classNames:t3,items:R,layout:"5-7",align:"start",renderLabel:N=>a("div",{className:Ld,children:N}),renderValue:(N,D,v,O)=>{if(v==="link"&&O)return a(ba,{classNames:[F(O==null?void 0:O.className)],href:O.href,target:O.target||"_blank",children:N});if(v==="icon"&&O){const S={url:O==null?void 0:O.src,alt:O.alt||N};return a("div",{className:F("adyen-pe-transaction-data__list-icon-value",O==null?void 0:O.className),children:[a(Ia,{...S}),a(k,{variant:I.BODY,children:[" ",N," "]})]})}return a(k,{className:F(O==null?void 0:O.className),variant:I.BODY,children:N})}})},[(s=r==null?void 0:r.details)==null?void 0:s.fields,n,e,t])},pl=({children:e,className:t})=>a("div",{className:F(Jo,t),children:e}),d3=e=>{switch(e==null?void 0:e.status){case"Booked":return"default";case"Reversed":return"error";default:return"pending"}},h3=e=>e!=null&&e.paymentMethod?e.paymentMethod.type:e!=null&&e.bankAccount?"bankTransfer":null,f3=e=>{var t;return e!=null&&e.paymentMethod?bd(e.paymentMethod,"detail"):(t=e==null?void 0:e.bankAccount)==null?void 0:t.accountNumberLastFourDigits},m3=e=>{if(e.category==="Refund"){const{refundType:t}=e.refundMetadata??U;switch(t){case Rn.FULL:return Rn.FULL;case Rn.PARTIAL:return Rn.PARTIAL}}},p3=({refundedState:e,transaction:t})=>{var d;const{i18n:n}=W(),{dateFormat:r}=sn((d=t==null?void 0:t.balanceAccount)==null?void 0:d.timeZone),{amount:s,category:i,createdAt:o}=t,c=A(()=>{const{currency:m,value:f}=s;return`${n.amount(f,m,{hideCurrency:!0})} ${m}`},[s,n]),[u,l,h]=A(()=>[h3(t),f3(t),m3(t)],[t]);return a(K,{children:[a("div",{className:s3,children:[i&&a(Mt,{label:n.get(`txType.${i}`),variant:Ee.DEFAULT}),h&&a(K,{children:[h===Rn.FULL&&a(Mt,{label:n.get("full"),variant:Ee.SUCCESS}),h===Rn.PARTIAL&&a(Mt,{label:n.get("partial"),variant:Ee.BLUE})]}),e===lr.FULL&&a(Mt,{label:n.get("refunded.full"),variant:Ee.SUCCESS}),e===lr.PARTIAL&&a(Mt,{label:n.get("refunded.partial"),variant:Ee.BLUE})]}),c&&a("div",{className:F(ml,`${ml}--${d3(t)}`),children:c}),u&&a("div",{className:za,children:[a("div",{className:r3,children:a(Od,{className:wd,name:u,alt:u,folder:"logos/"})}),a("div",{className:n3,children:l})]}),o&&a("div",{className:Ld,children:r(new Date(o),wm)})]})},_3=Ie(p3),y3=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",{clipPath:"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 Md({onInput:e,onKeyUp:t,trimOnBlur:n,onBlurHandler:r,onBlur:s,onFocusHandler:i,errorMessage:o,...c},u){const{autoCorrect:l,classNameModifiers:h,isInvalid:d,isValid:m,readonly:f=!1,spellCheck:_,type:y,uniqueId:T,isCollatingErrors:g,disabled:E}=c;Bt(c,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const R=C(q=>{e==null||e(q)},[e]),N=C(q=>{t&&t(q)},[t]),D=C(q=>{r==null||r(q),n&&(q.target.value=q.target.value.trim()),s==null||s(q)},[s,r,n]),v=C(q=>{i==null||i(q)},[i]),O=F("adyen-pe-input",[`adyen-pe-input--${y}`],c.className,{"adyen-pe-input--invalid":d,"adyen-pe-input--valid":m},h==null?void 0:h.map(q=>`adyen-pe-input--${q}`)),{classNameModifiers:S,uniqueId:M,isInvalid:P,isValid:z,isCollatingErrors:j,...ie}=c;return a(K,{children:[a("input",{id:T,...ie,type:y,className:O,readOnly:f,"aria-describedby":g?void 0:`${T}${Co}`,"aria-invalid":d,onInput:R,onBlurCapture:D,onFocus:v,onKeyUp:N,disabled:E,ref:u}),d&&o&&a("span",{className:"adyen-pe-input__invalid-value",id:`${T}${Co}`,children:o})]})}Md.defaultProps={type:"text",classNameModifiers:[],onInput:()=>{}};const Ro=Yr(Md),Fd=(e,t)=>bu(e,t).toFixed(Yi(t)),Yi=e=>Math.log10(Ru(e)),xd=({currency:e,disabled:t,errorMessage:n,errorMessageArg:r,onInput:s,value:i})=>{const{i18n:o}=W(),c=Y(Mr()),u=Y(Mr()),l=n?r?o.get(n,{values:{amount:r}}):o.get(n):"";return a("div",{className:Jo,children:[a("div",{className:kd,children:a("div",{id:u.current,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:o.get("refundAmount")})})}),a("div",{className:F({[zs]:!0,[Dd]:!0,[J_]:!0,[e3]:!!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}${Co}`,children:[a(y3,{}),a(k,{el:ne.SPAN,variant:I.BODY,children:l})]})]})]})},g3=()=>{const{availableAmount:e,currency:t}=wa();return a(xd,{currency:t,errorMessage:null,value:Fd(e,t),disabled:!0})},T3=({locale:e})=>{const{availableAmount:t,currency:n,interactionsDisabled:r,setAmount:s}=wa(),[i,o]=x(null),[c,u]=x(`${Fd(t,n)}`),{i18n:l}=W(),h=A(()=>{const m=Yi(n);return f=>Math.trunc(+`${parseFloat(f)}e${m}`)||0},[n]),d=m=>{var E;let f=m.currentTarget.value.trim();const _=h(f);let y=null;_||f?(_<0&&(y="noNegativeNumbersAllowed"),_>t&&(y="refundAmount.excess")):y="refundAmount.required";const T=((E=1.1.toLocaleString(e).match(/\d(.*?)\d/))==null?void 0:E[1])||".",g=f.split(T);if(g.length===2){const R=Yi(n),N=g[0];let D=g[1];D.length>=R&&(D=D.substring(0,R),f=N+T+D,m.currentTarget.value=f)}u(f),o(y),s(y?0:_)};return a(xd,{currency:n,errorMessage:i,errorMessageArg:l.amount(t,n),onInput:d,value:c,disabled:r})},A3=()=>{const{i18n:e}=W();return A(()=>a("div",{className:`${Jo} ${Q_}`,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])},E3=()=>{const{i18n:e}=W(),{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:Jo,children:[a("div",{className:kd,children:a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:e.get("refundReason")})}),a("div",{className:`${zs} ${Dd}`,children:a(js,{items:s,readonly:t,filterable:!1,multiSelect:!1,onChange:i,selected:n})})]})},_l=({children:e,renderViewActionButtons:t,renderViewMessageBox:n})=>a("div",{className:tt,children:[e,n&&n(),t()]}),yl=({action:e,title:t,renderIcon:n,subtitle:r})=>a("div",{className:i3,children:[n&&n(),a(k,{className:It.MEDIUM,variant:I.TITLE,children:t}),a(k,{variant:I.BODY,children:r}),e&&e()]}),N3=({transaction:e,extraFields:t,dataCustomization:n})=>{var Ue;const[r,s]=x(ct.DETAILS),[i,o]=x(),[c,u]=x(),[l,h]=x(!1),{fetchingTransaction:d,refreshTransaction:m,transaction:f,transactionNavigator:_}=_p(e),{refundable:y,refundableAmount:T,refundableAmountLabel:g,refundAvailable:E,refundCurrency:R,refundDisabled:N,refundedState:D,refundStatuses:v,refundMode:O,refundLocked:S}=gp(f),M=A(()=>N||l,[N,l]),{i18n:P}=W(),z=Object.freeze((f==null?void 0:f.lineItems)??de),j=C(oe=>o(oe),[]),ie=C(oe=>u(oe),[]),q=C(oe=>oe===ct.REFUND&&M,[M]),{getBalanceAccounts:ce}=Ce().endpoints,{data:Te}=Rt(A(()=>({fetchOptions:{enabled:!!ce&&!f.balanceAccount&&!!f.balanceAccountId,keepPrevData:!0},queryFn:async()=>ce==null?void 0:ce(U)}),[f.balanceAccountId,f.balanceAccount,ce])),me=C(oe=>void(q(oe)||s(oe)),[q]),_e=C(()=>{const oe=t?Object.values(t).filter(Qe=>Qe.type==="button").map(Qe=>{var gt,Ge;return{title:Qe.value,variant:se.SECONDARY,event:(gt=Qe.config)==null?void 0:gt.action,classNames:(Ge=Qe.config)!=null&&Ge.className?[Qe.config.className]:[]}}):[],ze=[i,c,...oe].filter(Boolean);return ze.length?a(pl,{className:X_,children:a(ka,{actions:ze,layout:Ys.BUTTONS_END})}):null},[t,i,c]),De=C(()=>{m(),h(!0)},[h,m]),pe=C(()=>v!=null&&v.length||S||l?a("div",{className:l3,children:[(S||l)&&a(_n,{type:Fe.HIGHLIGHT,variant:pn.TIP,description:`${P.get("refund.theRefundIsBeingProcessed")} ${P.get("pleaseComeBackLater")}`}),v.map((oe,ze)=>a(_n,{variant:pn.TIP,type:(oe==null?void 0:oe.type)??Fe.HIGHLIGHT,description:oe==null?void 0:oe.label},`${Math.random()}-${ze}`))]}):null,[P,v,S,l]),ke=f.balanceAccount??((Ue=Te==null?void 0:Te.data)==null?void 0:Ue.find(oe=>oe.id===f.balanceAccountId));if(us(()=>{s(ct.DETAILS)},[f]),us(()=>{M&&s(ct.DETAILS)},[M]),d)return a(Ra,{skeletonRowNumber:5});if(q(r))return null;const fe={lineItems:z,refundAvailable:E,refundDisabled:M,setActiveView:me,setPrimaryAction:j,setSecondaryAction:ie};switch(r){case ct.DETAILS:return a(_l,{renderViewActionButtons:_e,renderViewMessageBox:pe,children:a(ap,{...fe,transaction:!f.balanceAccount&&ke?{...f,balanceAccount:ke}:{...f},transactionNavigator:_,extraFields:t,dataCustomization:n,children:[a(pl,{className:o3,children:a(_3,{transaction:f,refundedState:D})}),a(u3,{})]})});case ct.REFUND:return a(_l,{renderViewActionButtons:_e,children:a(mp,{...fe,availableAmount:T,currency:R,refundMode:O,refreshTransaction:m,transactionId:f.id,children:[a(A3,{}),y&&a(E3,{}),O===We.FULL_AMOUNT&&a(g3,{}),(O===We.PARTIAL_AMOUNT||O===We.PARTIAL_LINE_ITEMS)&&a(T3,{locale:P.locale}),g&&a(_n,{variant:pn.TIP,type:g.type,description:g.description})]})});case ct.REFUND_SUCCESS:return a(yl,{renderIcon:()=>a(Ze,{name:"checkmark-circle-fill",className:F(So,a3)}),title:P.get("refundActionSuccessTitle"),subtitle:P.get("refundActionSuccessSubtitle"),action:()=>a(he,{variant:se.SECONDARY,onClick:De,children:P.get("goBack")})});case ct.REFUND_ERROR:return a(yl,{renderIcon:()=>a(Ze,{name:"cross-circle-fill",className:F(So,c3)}),title:P.get("refundActionErrorTitle"),subtitle:P.get("refundActionErrorSubtitle"),action:()=>a(he,{variant:se.SECONDARY,onClick:m,children:P.get("goBack")})});default:return null}},v3=({error:e,isFetching:t,transaction:n,extraFields:r,dataCustomization:s})=>xe(t)||!(n||e)?a(Ra,{skeletonRowNumber:5}):n?a(N3,{dataCustomization:s,transaction:n,extraFields:r}):null,ei=(e,t)=>{const{getBalanceAccounts:n}=Ce().endpoints,{data:r,isFetching:s,error:i}=Rt(A(()=>({fetchOptions:{enabled:!!n&&(t??!0),keepPrevData:!0},queryFn:async()=>n==null?void 0:n(U)}),[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}},Bd=Hr({withinModal:!1}),C3=()=>Gr(Bd);function S3({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}=W(),d=Ma(null,s),m=C(f=>{f.key==="Escape"&&r&&i&&s()},[r,i,s]);return $(()=>(r?window.addEventListener("keydown",m):window.removeEventListener("keydown",m),()=>window.removeEventListener("keydown",m)),[r,m]),a(K,{children:r&&a("div",{className:F("adyen-pe-modal-wrapper",n.map(f=>`adyen-pe-modal-wrapper--${f}`),{"adyen-pe-modal-wrapper--open":r,"adyen-pe-modal-wrapper--dismissible":i}),role:"dialog","aria-modal":"true","aria-hidden":!open,...u,children:a(Bd.Provider,{value:{withinModal:!0},children:a("div",{className:F("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:F("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"},O3=({hideTitle:e,type:t})=>{const{i18n:n}=W(),{withinModal:r}=C3(),[s,i]=x(!1),o=A(()=>s||xe(e),[s,e]),c=A(()=>n.get(R3[t]),[n,t]);return $(()=>{i(r)},[r]),{hideTitle:o,title:c}},$d="adyen-pe-payouts-table",b3=`${$d}__net-payout`,Ud=["fundsCapturedAmount","adjustmentAmount","payoutAmount"],qa=["createdAt",...Ud],I3=e=>Ud.includes(e),D3=({error:e,loading:t,onContactSupport:n,onRowClick:r,showDetails:s,showPagination:i,data:o,customColumns:c,...u})=>{const{i18n:l}=W(),{dateFormat:h}=sn("UTC"),{refreshing:d}=Ce(),m=A(()=>t||d,[t,d]),f=be(Oe.up.sm),_=C(E=>{var N,D,v,O;const R=l.get(Id(E));if(I3(E))return{label:(D=(N=o==null?void 0:o[0])==null?void 0:N[E])!=null&&D.currency?`${R} (${Ou((O=(v=o==null?void 0:o[0])==null?void 0:v[E])==null?void 0:O.currency)})`:R,position:"right"}},[o,l]),y=Ga({fields:qa,customColumns:c,columnConfig:A(()=>({fundsCapturedAmount:{..._("fundsCapturedAmount"),visible:f},adjustmentAmount:{..._("adjustmentAmount"),visible:f},payoutAmount:_("payoutAmount")}),[_,f])}),T={title:"noPayoutsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},g=A(()=>()=>a(Wa,{error:e,errorMessage:"weCouldNotLoadYourPayouts",onContactSupport:n}),[e,n]);return a("div",{className:$d,children:a(Tn,{errorDisplay:g,error:e,columns:y,data:o,loading:m,outline:!1,onRowClick:{callback:r},emptyTableMessage:T,customCells:{createdAt:({value:E})=>E?f?E&&a(k,{variant:I.BODY,children:h(E,bm)}):h(E,Im):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:F({[`${b3}--strong`]:!f}),children:l.amount(E.value,E.currency,{hideCurrency:f})})},children:i&&a(Tn.Footer,{children:a(Ha,{...u})})})})},k3={transaction:"getTransaction",payout:"getPayout"},to=e=>!("data"in e);function Ka(e){var E;const t=A(()=>to(e)?null:e.data,[e]),n=A(()=>to(e)?e.id:null,[e]),r=Ce().endpoints[k3[e.type]],{hideTitle:s,title:i}=O3(e),{data:o,error:c,isFetching:u}=Rt(A(()=>({fetchOptions:{enabled:!!n&&!!r},queryFn:async()=>{const R=e.type==="transaction"?{path:{transactionId:n}}:{query:{balanceAccountId:n,createdAt:e.date}};return r(U,{...R})}}),[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}=ei(l,!h),m=A(()=>{if(c)return Ua(c,"weCouldNotLoadYourTransactions",e.onContactSupport)},[c,e.onContactSupport]),f=t??o,[_,y]=x(),T=C(async()=>{var R,N,D,v,O;if(o&&(to(e)&&e.type==="transaction"||e.type==="payout")){const S=await((D=(N=(R=e.dataCustomization)==null?void 0:R.details)==null?void 0:N.onDataRetrieve)==null?void 0:D.call(N,o));y((O=(v=e.dataCustomization)==null?void 0:v.details)==null?void 0:O.fields.reduce((M,P)=>Pd.has(P.key)||qa.includes(P.key)||(P==null?void 0:P.visibility)==="hidden"?M:{...M,...S!=null&&S[P.key]?{[P.key]:S[P.key]}:{}},{}))}},[o,e]),g=to(e)&&e.type==="transaction"||e.type==="payout"?e.dataCustomization:void 0;return $(()=>{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&&m&&a("div",{className:"adyen-pe-overview-details--error-container",children:a(en,{withImage:!0,...m})}),e.type==="transaction"&&a(v3,{transaction:f?{...f||U,balanceAccount:(e==null?void 0:e.balanceAccount)||(d==null?void 0:d[0])}:void 0,error:!!(c&&m),isFetching:u,extraFields:_,dataCustomization:g}),e.type==="payout"&&f&&a(op,{balanceAccountId:n,payout:f,balanceAccountDescription:(e==null?void 0:e.balanceAccountDescription)||((E=d==null?void 0:d[0])==null?void 0:E.description),isFetching:u,extraFields:_,dataCustomization:g})]})}class Wd extends zn{constructor(n){super(n);B(this,"componentToRender",()=>a(Ka,{...this.props,type:"payout",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(Wd,"type","payoutDetails");const L3="adyen-pe-data-overview-container--with-error";function Va({balanceAccountsError:e,children:t,className:n,errorMessage:r,isBalanceAccountIdWrong:s,onContactSupport:i}){const{hasError:o}=Ce();return a("div",{className:F(n,{[L3]: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(K,{children:t})})}const w3="adyen-pe-payouts-overview",P3="adyen-pe-payouts-details",M3=new Date("2024-04-16T00:00:00.000Z").toString(),gl="adyen-pe-filter-bar-mobile-switch",Za=()=>{const e=be(Oe.down.xs),[t,n]=x(!e);return $(()=>{n(!e)},[e]),{isMobileContainer:e,showingFilters:t,setShowingFilters:n}},Xa=({isMobileContainer:e,showingFilters:t,setShowingFilters:n})=>e?a("div",{className:gl,children:a(he,{iconButton:!0,className:`${gl}__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}=W();return e.showingFilters?a("div",{"aria-label":t.get("filterBar"),className:F("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",F3=`${Ja}__account-id`,Tl=`${Ja}__account-label`,ec=Ie(({activeBalanceAccount:e,balanceAccountSelectionOptions:t,onBalanceAccountSelection:n})=>{const r=be(Oe.down.xs),{i18n:s}=W(),i=C(o=>a(K,{children:[a("div",{className:o.contentClassName,children:[o.item.name&&a("span",{className:Tl,children:o.item.name}),a("span",{className:o.item.name?F3:Tl,children:o.item.id})]}),Rd(o)]}),[]);return t&&t.length>1?a(js,{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]),x3=100,ms=10,ji=e=>{const t=~~e;return t===e&&t>0?Math.min(t,x3):Math.max(t,0)},B3=(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=Jl(s,i)];if(s>i||t===o)return o;t>o?s=r+1:i=r-1}},$3=({preferredLimit:e=ms,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)||ms;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(Ur(r.current)){o=r.current;break t}}else c.delete(r.current);o=B3(n.current,o)}}catch{}return r.current=o},[s,e]),limitOptions:s}},nc=e=>{const t=Y(!1),n=A(()=>e,[e]);return $(()=>(t.current=!0,()=>{t.current=!1,n&&n()}),[n]),t},Hd=(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),m=A(()=>ji(n),[n]),{getPageCount:f,getPageParams:_,resetPageCount:y,updatePagination:T}=e,g=A(()=>t?P=>{var q;if(!(m&&Number.isInteger(P)))return;const z=f(),j=P<0?P+z+1:P;j>0&&(z?j<=z:j===1)&&((q=r.current)==null||q.abort(),r.current=new AbortController,c.current&&(((o.current=j)>1||z)&&l(o.current),(async()=>{const{signal:ce}=r.current,Te={..._(j,m),limit:m,page:j};try{const me=await t(Te,ce);if(!me||!c.current)return;const{size:_e,...De}=me;T(j,m,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,[m,t]),E=C(()=>{u&&g(Math.min(u+1,f()))},[g,u]),R=C(()=>{u&&g(Math.max(u-1,1))},[g,u]),N=A(()=>f()||u||void 0,[g,h]),D=A(()=>!!(u&&N)&&u<N,[u,N]),v=A(()=>!!u&&u>1,[u]),O=A(()=>s.current?(s.current-1)*m+(i.current||0):0,[g,h]),S=A(()=>m&&Math.min(m,O||1/0)%m,[m,O]),M=C(()=>{y(),s.current=i.current=o.current=void 0,c.current&&l(o.current)},[y]);return $(()=>{c.current&&h&&d(!1)},[h]),{goto:g,hasNext:D,hasPrev:v,limit:m,next:E,page:u,pages:N,pageSize:S,prev:R,resetPagination:M,size:O}},U3=e=>yt(e.next),W3=e=>yt(e.prev),H3=(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)=>{U3(d)&&c(d.next,l+1),W3(d)&&c(d.prev,l-1)}}},[]);return Hd(n,e,t)},G3=e=>e.next,Y3=(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)=>{G3(h)&&h.next&&(r=Math.max(r,u+1))}}},[]);return Hd(n,e,t)},j3=(e=U,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 m=f=>{o.current&&h(f)};return[()=>m("reset"),f=>m(f)]},[o]),[l,h]=Vo((m,f)=>{if(f==="reset")return i.current.clear(),r.current;const _={...f},y=[0];Object.keys(_).forEach((g,E)=>{if(!s.current.has(g))return;const R=m[g]??void 0,N=r.current[g]??void 0,D=_[g]??N;if(D===R)return;const v=Math.floor(E/32),O=1<<E%32;_[g]=D,y[v]|=O,i.current[D===N?"delete":"add"](g)});const T=y.some(g=>g)?n.current&&i.current.size===0?r.current:Object.freeze({...m,..._}):m;return n.current||(r.current=T,n.current=!0),T},r.current),d=A(()=>!!i.current.size,[]);return $(()=>{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}},z3=(e=U,t)=>{const{canResetState:n,defaultState:r,resetState:s,state:i,updateState:o}=j3(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 q3=["hasNext","hasPrevious"],Gd=e=>{const t=Object.getOwnPropertyNames(e);return!q3.some(n=>t.includes(n))},K3=(e,t="data")=>{const n=e[t];if(Gd(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(!Gd(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")},Z3=({dataField:e="data",fetchRecords:t,filterParams:n=U,initialFiltersSameAsDefault:r=!0,initialize:s,onFiltersChanged:i,pagination:o,preferredLimit:c,preferredLimitOptions:u,enabled:l})=>{const[h,d]=x([]),[m,f]=wt(!0),[_,y]=x(),[T,g]=x(c),E=nc(),R=Y(!0),N=Y(1),D=z3(n,r),{limit:v,limitOptions:O}=$3({preferredLimit:T,preferredLimitOptions:u}),{defaultFilters:S,filters:M,updateFilters:P,...z}=D,[j,ie]=A(()=>o===rc.CURSOR?[K3,H3]:[V3,Y3],[]),q=C(pe=>g(pe),[]),{goto:ce,page:Te,pages:me,resetPagination:_e,...De}=ie(C(async({page:pe,...ke},fe)=>{try{if(y(void 0),N.current=pe,!E.current||f(!0))return;const Ue=await t({...ke,...M},fe),{records:oe,paginationData:ze}=j(Ue,e);return R.current&&(s==null||s([oe,ze],D),R.current=!1),E.current&&(d(oe),f(!1)),{...ze,size:oe==null?void 0:oe.length}}catch(Ue){if(fe!=null&&fe.aborted)return;f(!1),y(Ue),console.error(Ue)}},[t,M,v]),v);return A(()=>{R.current=!0},[n]),A(()=>{_e(),N.current=1},[M,v,_e]),$(()=>{l&&ce(N.current)},[ce,l]),$(()=>{i==null||i(M)},[M]),{error:_,fetching:m,filters:M,goto:ce,limitOptions:O,page:Te,pages:me,records:h,updateFilters:P,updateLimit:q,...z,...De}},sc=e=>Z3({...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:h2(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:X3,getUsedTimezone:Q3}=(()=>{const e=/\d{2}:\d{2}(?=:\d{2}(?:\.\d+)?\s+([AP]M))/i,t=/^GMT|0(?=\d:00)|:00/g,n=Us();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=Li(c),d=`${u}${l&&` ${l}`}`,m=A1(h).replace(t,"");return[d,m]},getUsedTimezone:i=>(n.tz=i,n.tz.current)}})(),J3=({timezone:e,withClock:t=!1}=U)=>{const n=A(()=>xe(t),[t]),r=A(()=>Q3(e),[e]),s=Y(te),[i,o]=x(Date.now()),[c,u]=A(()=>X3(r,i),[i,r]);return A(()=>{s.current(),s.current=n?ca.subscribe(l=>{jn(l)||o(l.now)}):te},[o,n]),{clockTime:c,GMTOffset:u,timestamp:i,timezone:r}},ey=e=>Object.freeze({systemToTimezone:G(t=>Ft(e,t)),timezoneToSystem:G(t=>Xt(e,t)),timezoneOffset:G(t=>e(t).offset)}),Yd=(e,t,n=e)=>{const r=(s,i)=>{let o=s;Ne(s)?o=n:is(s)||(o=i??n);const c=St(e,o,t);return c===o?c:i??n};return s=>{const i=ue(()=>o);let o=r(s);return J({value:i,descriptor:G({...i,set(c){const u=o;o=r(c,o),u!==o&&(this.now=this.now)}})})}},ty=(e,t)=>n=>Q(n)?n.call(e,t):n,ny=e=>!Bt(e,"offsets"),ry=e=>Bt(e,"from"),ti=({now:e})=>e,sy=(()=>{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}})(),Zn=e=>{try{const t=e instanceof Date||+e===e?e:void 0,n=new Date(t).getTime();return isNaN(n)?void 0:n}catch{}},ni=(e=U,t=U)=>{const n=cs(e),r=cs(t);return()=>{const s=Us(),i=ue(()=>d),o=ue(()=>s.tz.current),c=J({now:i,timezone:o,...ey(s)}),u=ty(n,c);let{from:l,to:h,now:d}=U;const m=_=>{d=Zn(_??Date.now())??d;e:{if(ny(n)){l=Zn(u(n.from))??d,h=Zn(u(n.to))??d;break e}let y,T,g;(g=ry(n))?(y=new Date(l=Zn(u(n.from))??d),T=1):(y=new Date(h=Zn(u(n.to))??d),T=-1),y=new Date(c.timezoneToSystem(y));const[E=0,R=0,N=0,D=0,v=0,O=0,S=0]=u(n.offsets);y.setFullYear(y.getFullYear()+E*T,y.getMonth()+R*T,y.getDate()+N*T),y.setHours(y.getHours()+D*T,y.getMinutes()+v*T,y.getSeconds()+O*T,y.getMilliseconds()+S*T);const M=Zn(c.systemToTimezone(y))??d;g?h=M:l=M}l>h&&([l,h]=[h,l])},f=_=>{const y=s.tz,T=y.current;s.tz=_,y.current!==T&&m(d)};return m(),J({...r,from:ue(()=>l),now:{...i,set:m},timezone:{...o,set:f},to:ue(()=>h)})}},oy=/^(\d{2})\/(\d{2})\/(-?\d+),\s+(\d{2}):(\d{2}):(\d{2}).(\d{3})/,ri=(e=Ho)=>(t,n,...r)=>{const s=tn(n),i=new Date(Xt(s,t));return i.setHours(0,0,0,0),Ft(s,e(i,...r))},jd=ri(),zd=ri(e=>e.setDate(1)),iy=ri(e=>e.setMonth(0,1)),qd=ri((e,t)=>{const n=cy(e.getDay(),t??0);return e.setDate(e.getDate()-n)}),ay=e=>(e%100?e%4:e%400)===0,Ti=(e,t,n=0)=>{const r=e+n,s=Fs(r,12),i=t+Math.floor(r/12);let o=31;switch(s){case 1:o=ay(i)?29:28;break;case 3:case 5:case 8:case 10:o=30;break}return[o,s,i]},cy=(e,t=0)=>(7-t+e)%7,or=(e,t)=>Fn(e)?0:e-jd(e,t),Al=e=>Z(e)?e:new Date(e),ly=(e,t=U)=>{const n=tn(t.timeZone),r={...da,...t,timeZone:n.tz.current};return new Date(e).toLocaleDateString(qo,r)},cn=(e,t)=>{const n=ly(e,{...Iu,...da,timeZone:t,hour12:!1}),[,r="",s="",i="",o="",c="",u="",l=""]=n.match(oy)??de;return[+i,+r-1,+s,+o%24,+c,+u,+l]},qi=(e,t,n)=>{if(Fn(e)||Fn(t))return 1/0;const[r,s]=cn(e,n),[i,o]=cn(t,n);return Math.abs(o-s+(i-r)*12)},tn=(()=>{const e=Us();return t=>(e.tz=void 0,e.tz=t,e)})(),ic=1,uy=sy(7),dy=Yd(0,6,ic),Kd=(e=0)=>{const t=~~St(0,e,1/0)||0;return(n=ic)=>{const r=t?{offsets:uy}:{to:ti},s=dy(n);return ni({from:({now:i,timezone:o,systemToTimezone:c,timezoneToSystem:u})=>{const l=new Date(u(qd(i,o,s.value)));return l.setDate(l.getDate()-t*7),c(l)},...r},{firstWeekDay:s.descriptor})()}},hy=Object.freeze([0,1,0,0,0,0,-1]),Vd=(e=0)=>{const t=~~St(0,e,1/0)||0;return ni({from:({now:r,timezone:s,systemToTimezone:i,timezoneToSystem:o})=>{const c=new Date(o(zd(r,s)));return c.setMonth(c.getMonth()-t),i(c)},...t?{offsets:hy}:{to:ti}})},fy=Vd(1),my=365,py=1,_y=1,yy=Yd(py,my,_y),El=e=>{const t=yy(e);return ni({from:({now:n,timezone:r,systemToTimezone:s,timezoneToSystem:i})=>{const o=new Date(i(jd(n,r)));return o.setDate(o.getDate()-t.value+1),s(o)},to:ti},{numberOfDays:t.descriptor})()},gy=Kd(1),Ty=Vd(0),Ay=Kd(0),Ey=ni({from:({now:e,timezone:t})=>iy(e,t),to:ti}),Ny=()=>Object.freeze({"rangePreset.last7Days":El(7),"rangePreset.last30Days":El(30),"rangePreset.thisWeek":Ay(),"rangePreset.lastWeek":gy(),"rangePreset.thisMonth":Ty(),"rangePreset.lastMonth":fy(),"rangePreset.yearToDate":Ey()}),vy=({now:e=Date.now(),options:t,selectedOption:n,timezone:r})=>{const{i18n:s}=W(),[i,o]=x(),[c,u]=x(),[l,h]=x(),d=Y(),m=Y(),[f,_,y]=A(()=>{const v=s.get("rangePreset.custom"),O=Object.keys(t),S=Object.freeze(O.map(P=>s.get(P)));return[v,(P,z=S)=>{const j=z.findIndex(ie=>ie===P);return t[O[j]]},S]},[s,t]),[T,g]=x(n===f),E=A(()=>Object.freeze([...y,f]),[f,y]),R=A(()=>T?E:y,[T,y,E]),N=C(v=>{const O=_(v,y);O&&(o(O.from),u(O.to),g(!1),h(v))},[f,_,l,y]),D=C(()=>{o(void 0),u(void 0),g(!0),h(f)},[f]);return A(()=>{n===f?h(f):N(n)},[]),A(()=>{var v;if(d.current!==e||m.current!==r){const O=Object.values(t);O.forEach(S=>{S.now=e,S.timezone=r}),d.current=e,m.current=(v=O[0])==null?void 0:v.timezone,N(l)}},[e,r,t]),{customSelection:D,from:i,onSelection:N,options:R,selectedOption:l,to:c}},Cy=({calendarRef:e,onTimeRangeSelected:t,timestamp:n,...r})=>{const{customSelection:s,from:i,onSelection:o,options:c,selectedOption:u,to:l}=vy(r),h=A(()=>Object.freeze(c.map(_=>({id:_,name:_}))),[c]),d=C(({target:_})=>o(_==null?void 0:_.value),[o]),m=Y(!0),f=Y(n);return $(()=>{e!=null&&e.current&&i&&l&&(m.current=!0,e.current.from=new Date(i),e.current.to=new Date(l))},[e,i,l]),$(()=>{f.current!==n&&(f.current=n,m.current?m.current=!1:s())},[s,n]),$(()=>{u&&(t==null||t(u))},[u,t]),a(js,{setToTargetWidth:!0,items:h,filterable:!1,multiSelect:!1,onChange:d,selected:u})},pt=(()=>{const e=r=>Object.freeze(Wr(U,Object.fromEntries(Object.entries(r).map(([s,i])=>[s,{value:i}])))),t=r=>{try{return Object.getPrototypeOf(r)===U}catch{return!1}},n=(r,s)=>{if(!r)return e(G(s,$t(r)));let i=s;return e({enumerable:!0,get:()=>i,set:o=>{i=r(o)}})};return Object.defineProperties(n,{is:{value:t},isObject:{value:Go},immutable:{value:r=>n(!1,r)},mutable:{value:r=>n(void 0,r)},restricted:{value:()=>n(!1)}})})(),Zd=(()=>{const e=(n={},r=!1)=>{const s=J();for(const[i,o]of Object.entries(n)){try{const c=pt.is(o),u=pt.isObject(o);if(c||u){Object.defineProperty(s,i,c?o:e(o,r));continue}else if(r){Object.defineProperty(s,i,pt.immutable(o));continue}}catch{}s[i]=o}return pt((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 Xd="adyen-pe-calendar__cell adyen-pe-calendar__cell--date",Qd="adyen-pe-calendar__date",Sy=(e=U,t)=>{const n=Zd.unwrapped({childClassName:pt.mutable(Qd),childProps:{children:pt.restricted(),className:""},className:pt.mutable(Xd),props:{...e,children:pt.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 y=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"]=y,y&&(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=Sy(l,t),{children:d,className:m,...f}=h.props||U,_=Eo(h.className,Xd,m);return a("td",{...f,...l,className:_,children:(!o||u)&&(()=>{const{children:y,className:T,...g}=h.childProps||U,E=Eo(h.childClassName,Qd,T);return a("time",{...g,className:E,dateTime:n,children:i})})()})}),Oy=Ie(Ry,Ao({block:Ao.exclude,flags:e=>+e})),Jd="adyen-pe-calendar__cell adyen-pe-calendar__cell--day-of-week",e0="adyen-pe-calendar__day-of-week",by=(e=U,t)=>{const n=Zd.unwrapped({childClassName:pt.mutable(e0),childProps:{children:pt.restricted(),className:""},className:pt.mutable(Jd),props:{...e,children:pt.restricted(),className:""}},!0);return t==null||t(ac.DAY_OF_WEEK,n),n},Iy=({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=by(s,e),{children:o,className:c,onCommand:u,...l}=i.props||U,h=Eo(i.className,Jd,c),{children:d,className:m,...f}=i.childProps||U,_=Eo(i.childClassName,e0,m);return a("th",{...l,ref:l.ref,...s,className:h,children:a("abbr",{...f,className:_,children:r})})},Dy=Ie(Iy,Ao({block:Ao.exclude,flags:e=>+e})),ky=Yr(({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(Dy,{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(Oy,{ref:s,grid:r,block:i,prepare:n,cell:l,onlyCellsWithin:t,row:c,...u},`${i.month}:${u.timestamp}`))},`${i.month}:${c}`))})]})]},i.datetime))})),Ly=Ie(ky),ps=864e5,wy=["narrow","short","long"],t0=[0,1,6],ur=[1,2,3,4,6,12],Nl=42,Py=[0,1],cc=Symbol(),lc=Symbol(),uc=Symbol(),vl=[uc,lc,cc],Cn=Symbol(),ir=Symbol(),ar=Symbol(),My=[ir,ar,Cn],n0=Symbol(),r0=Symbol(),s0=Symbol(),o0=Symbol(),i0=Symbol(),a0=Symbol(),c0=Symbol(),l0=Symbol(),u0=Symbol(),d0=Symbol(),dc=Symbol(),hc=Symbol(),h0=Symbol(),Cl=Symbol(),Ke=Symbol(),Sl=Symbol(),ut=Symbol(),f0=Symbol(),io=Symbol(),ao=Symbol(),Rl=(e,t)=>{if(t>=e)return e;let n=Math.max(1,ur.indexOf(e));for(;--n&&t<ur[n];);return ur[n]},Fy=e=>ur[Math.max(ur.indexOf(e),0)],Ol=(e=0)=>Object.freeze(Py.map(t=>Fs(6-e+t,7)));var Es,st,ot,_r,yr;class bl{constructor(...t){w(this,Es,1/0);w(this,st,1/0);w(this,ot,-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")b(this,ot,n||p(this,ot)),b(this,st,new Date(t[2]).getTime()||p(this,st)),p(this,st)<p(this,ot)&&([En(this,st)._,En(this,ot)._]=[p(this,ot),p(this,st)]),b(this,yr,or(p(this,ot),t[0])),b(this,_r,or(p(this,st),t[0])),b(this,Es,qi(p(this,ot),p(this,st),t[0])+1);else if(!isNaN(n))switch(t[2]){case hc:b(this,st,n),b(this,_r,or(p(this,st),t[0]));break;case dc:default:b(this,ot,n),b(this,yr,or(p(this,ot),t[0]));break}}}get numberOfMonths(){return p(this,Es)}get endTimestamp(){return p(this,st)}get endTimestampOffset(){return p(this,_r)}get startTimestamp(){return p(this,ot)}get startTimestampOffset(){return p(this,yr)}}Es=new WeakMap,st=new WeakMap,ot=new WeakMap,_r=new WeakMap,yr=new WeakMap;const si=(...e)=>{let t=tn().tz.current,n=new bl(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 bl(t,...e))}}})},os=si(),xy=()=>si(Date.now(),dc),By=()=>si(Date.now(),hc),m0=(...e)=>e.length===0?os:si(...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||{}),Jn=(e=>(e[e.PREV=1]="PREV",e[e.BLOCK=0]="BLOCK",e[e.FRAME=2]="FRAME",e[e.PERIOD=4]="PERIOD",e))(Jn||{}),Ki=(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))(Ki||{});const p0=(()=>{const e={},t=Object.keys(Le).filter(r=>isNaN(+r)),n=r=>r!=="ALL"&&yt(r)&&t.includes(r);return r=>{const s=r&Le.ALL;return e[s]||(e[s]=new Proxy(J({valueOf:{value:()=>s}}),jo({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]}})(),$y=e=>(t,n,r)=>{if(yt(n)){const s=+n;if(s>=0&&s<t.length)return e(s)}return Reflect.get(t,n,r)},Il=function*(e=Ho,t){for(let n=0;n<this.length;n++)yield e.call(t,this[n],n,this)},Uy=Object.freeze(J({[Symbol.iterator]:{value(){return Il.call(this)}},map:{value(e,t){return[...Il.call(this,e,t)]}}})),Qt=(e,t)=>Q(e)?Qt({length:{get:e}},t):Ur(e)?Qt({length:{value:e}},t):new Proxy(Wr(Uy,e),{get:$y(t),set:Ii}),Oo=(()=>{const e=new Map,t=Us(),n=(r=Date.now())=>{const s=new Date(Xt(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=(y=Date.now())=>{t.tz=s,[i,o]=n(y)},{cancelSubscriptions:h,requestNotification:d,subscribe:m,on:f}=$s({timestamp:u});f.resume=()=>{c=ca.subscribe(y=>{if(jn(y))return;const{now:T}=y;if(po(i)||po(o))return l(T);T-i<o||(l(T),d())})},f.idle=()=>{c==null||c(),i=o=c=null};const _=J({cancelSubscriptions:G(h),timestamp:ue(u),timezone:G(s),subscribe:G(m)});return e.set(s,_),_})()}})();var gr,Ve,Ns,vs,Cs,Ss,At,it,jt,Tr,Ar,Er,Dn,zt,Rs,$e,Pe,Me,Nr,qt,kn,vr,Et,Os,bs,un,Kt,Is,Ds,ko,Lo,le,_0,y0,er,g0,rt,Jr,Zi;const cr=class cr{constructor(){w(this,le);w(this,Ve,0);w(this,Ns);w(this,vs);w(this,Cs,-1);w(this,Ss,-1);w(this,At);w(this,it);w(this,jt);w(this,Tr,!1);w(this,Ar);w(this,Er,0);w(this,Dn,[]);w(this,zt,p(cr,gr));w(this,Rs,12);w(this,$e);w(this,Pe);w(this,Me,1);w(this,Nr);w(this,qt);w(this,kn);w(this,vr,Oo());w(this,Et);w(this,Os,-1/0);w(this,bs,1/0);w(this,un,-1/0);w(this,Kt,1/0);w(this,Is,1/0);w(this,Ds,0);B(this,"daysInWeek",0);B(this,"origin");B(this,"originTimestamp");w(this,ko,Qt(()=>this.daysInWeek,this.getDayOfWeekAtIndex.bind(this)));w(this,Lo,Qt(()=>p(this,Me),H(this,le,g0).bind(this)))}get fromTimestamp(){return p(this,Os)}get toTimestamp(){return p(this,bs)}get numberOfBlocks(){return p(this,Is)}get blankSelection(){return p(this,$e)===p(this,Pe)&&Z(p(this,Pe))}get cursor(){return p(this,At)??-1}get daysOfWeek(){return p(this,ko)}get dynamicBlockHeight(){return p(this,Tr)}set dynamicBlockHeight(t){Ne(t)?b(this,Tr,!!t):bi(t)&&b(this,Tr,t)}set effect(t){Ne(t)?b(this,Ar,void 0):Q(t)&&b(this,Ar,t)}get firstWeekDay(){return p(this,Er)}set firstWeekDay(t){if(Ne(t))this.firstWeekDay=0;else if(!t0.includes(t)||p(this,Er)===b(this,Er,t))return}get frameBlocks(){return p(this,Lo)}get isAtEnd(){return!Fn(p(this,Kt))&&p(this,Kt)===p(this,Me)-1}get isAtStart(){return!Fn(p(this,un))&&p(this,un)===0}get locale(){return p(this,zt)}set locale(t){const n=p(this,zt);if(Ne(t))b(this,zt,p(cr,gr));else if(typeof Intl<"u")try{b(this,zt,new Intl.Locale(t).toString())}catch{b(this,zt,p(cr,gr))}p(this,zt)!==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)&&Fy(t)||1,p(this,Rs));p(this,Me)!==b(this,Me,n)&&(H(this,le,Zi).call(this),this.refreshFrame())}get timeslice(){return p(this,qt)}set timeslice(t){if(t===p(this,Nr)||Ne(t)&&p(this,Nr)===os)return;const{from:n,to:r,timezone:s}=b(this,Nr,t??os);b(this,qt,m0(n,r)),this.timezone=s}get timezone(){return p(this,kn)}set timezone(t){p(this,qt).timezone=t,b(this,kn,p(this,qt).timezone),b(this,vr,Oo(p(this,kn))),p(this,Et)&&(p(this,Et).call(this),b(this,Et,p(this,vr).subscribe(this.refreshFrame.bind(this,!0)))),H(this,le,_0).call(this)}set trackCurrentDay(t){bi(t)?t&&!p(this,Et)?b(this,Et,p(this,vr).subscribe(this.refreshFrame.bind(this,!0))):!t&&p(this,Et)&&(p(this,Et).call(this),b(this,Et,void 0)):Ne(t)&&(this.trackCurrentDay=!1)}get units(){return p(this,Ds)}initialize(){this.timeslice=os}refreshFrame(t=!1){var n;if(p(this,Dn).length=0,!(Z(p(this,it))||t)){const r=this.getFrameBlockAtIndex(p(this,Ve)),{from:s,to:i}=r.inner,[o]=H(this,le,er).call(this,this.getTimestampAtIndex(s+p(this,it)),!1);b(this,it,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(s),o));const c=s+p(this,it),u=St(s,c,i);if(u>c)return b(this,it,this.getUnitsForFrameBlockAtIndex(--En(this,Ve)._)+c-u),p(this,Ve)>=0?this.refreshFrame():(b(this,Ve,p(this,Me)-1),this.shiftFrameByOffset(-1,io));if(u<c)return b(this,it,c-u-1),++En(this,Ve)._<p(this,Me)?this.refreshFrame():(b(this,Ve,0),this.shiftFrameByOffset(1,io));b(this,Ns,s),b(this,vs,i),b(this,jt,H(this,le,er).call(this,this.getTimestampAtIndex(c),!1)[0]),b(this,it,this.getCursorBlockOriginTimestampOffset(p(this,jt))),b(this,At,s+p(this,it));const l=p(this,Ve)>0?this.getFrameBlockAtIndex(0):r,h=p(this,Ve)<p(this,Me)-1?this.getFrameBlockAtIndex(p(this,Me)-1):r;b(this,Cs,l.inner.from),b(this,Ss,h.inner.to),b(this,Ds,h.outer.to+1)}this.withCurrentDayTimestamp(),(n=p(this,Ar))==null||n.call(this)}shiftFrameByOffset(t,n){if(t&&is(t))switch(n){case f0:return H(this,le,Jr).call(this,t);case ao:return H(this,le,Jr).call(this,t*12);case io:default:return H(this,le,Jr).call(this,t*p(this,Me))}}shiftFrameCursor(t){switch(t){case n0:return H(this,le,rt).call(this,-1);case i0:return H(this,le,rt).call(this,1);case d0:return H(this,le,rt).call(this,-this.rowspan);case o0:return H(this,le,rt).call(this,this.rowspan);case s0:return H(this,le,rt).call(this,p(this,Ns)-p(this,At));case r0:return H(this,le,rt).call(this,p(this,vs)-p(this,At));case c0:return H(this,le,rt).call(this,-(p(this,At)%this.rowspan));case a0:return H(this,le,rt).call(this,this.rowspan-(p(this,At)%this.rowspan+1));case u0:return H(this,le,rt).call(this,-this.getUnitsForFrameBlockAtIndex((p(this,Ve)??0)-1));case l0:return H(this,le,rt).call(this,this.getUnitsForFrameBlockAtIndex(p(this,Ve)??0))}if(!(t<0)&&t>=p(this,Cs)&&t<=p(this,Ss))return H(this,le,rt).call(this,t-p(this,At))}shiftFrameToTimestamp(t){b(this,jt,this.originTimestamp=H(this,le,er).call(this,t,!1).reduce((n,r)=>n+r)),b(this,it,this.getCursorBlockOriginTimestampOffset(p(this,jt))),this.reoriginate(),[En(this,un)._,En(this,Kt)._]=this.getEdgeBlockOffsetsFromOrigin(),H(this,le,Zi).call(this),this.refreshFrame(),H(this,le,rt).call(this,this.getUnitsOffsetForTimestamp(this.getTimestampAtIndex(p(this,At)),p(this,jt)))}clearSelection(){this.blankSelection||(b(this,$e,b(this,Pe,void 0)),this.refreshFrame(!0))}updateSelection(t,n){const r=p(this,$e),s=p(this,Pe),i=H(this,le,er).call(this,t,!1).reduce((o,c)=>o+c);switch(n===Cl&&(i<=r?n=ut:i>=s&&(n=Ke)),n){case Ke:b(this,$e,i),b(this,Pe,Math.max(p(this,$e),s??i));break;case ut:b(this,Pe,i),b(this,$e,Math.min(r??i,p(this,Pe)));break;case Cl:case Sl:{let o=Math.abs(i-(r??i)),c=Math.abs(i-(s??i));n===Sl&&([o,c]=[c,o]),o>c?b(this,$e,i):b(this,Pe,i);break}case h0:default:b(this,$e,b(this,Pe,i));break}(p(this,$e)!==r||p(this,Pe)!==s)&&this.refreshFrame(!0)}};gr=new WeakMap,Ve=new WeakMap,Ns=new WeakMap,vs=new WeakMap,Cs=new WeakMap,Ss=new WeakMap,At=new WeakMap,it=new WeakMap,jt=new WeakMap,Tr=new WeakMap,Ar=new WeakMap,Er=new WeakMap,Dn=new WeakMap,zt=new WeakMap,Rs=new WeakMap,$e=new WeakMap,Pe=new WeakMap,Me=new WeakMap,Nr=new WeakMap,qt=new WeakMap,kn=new WeakMap,vr=new WeakMap,Et=new WeakMap,Os=new WeakMap,bs=new WeakMap,un=new WeakMap,Kt=new WeakMap,Is=new WeakMap,Ds=new WeakMap,ko=new WeakMap,Lo=new WeakMap,le=new WeakSet,_0=function(){const{from:t,to:n,span:r,offsets:s}=p(this,qt);b(this,Os,t-s.from),b(this,bs,n-s.to),b(this,Is,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)?(b(this,$e,i),b(this,Pe,o)):b(this,$e,b(this,Pe,void 0)),this.reslice(),b(this,Rs,Rl(12,this.numberOfBlocks)),b(this,Me,Rl(p(this,Me),this.numberOfBlocks)),this.shiftFrameToTimestamp(p(this,jt))},y0=function(t){return St(p(this,un),t||0,p(this,Kt)-p(this,Me)+1)},er=function(t,n=!0){let r=new Date(t).getTime();if(isNaN(r))return H(this,le,er).call(this,Date.now());const{from:s,to:i}=p(this,qt),o=St(s,r,i);o!==r&&n?(r=Jl(s,i),(isNaN(r)||Fn(r))&&(r=o)):r=o;const c=or(r,p(this,kn));return[r-c,c]},g0=function(t){if(is(t)&&t>=0&&t<p(this,Me)){if(!p(this,Dn)[t]){const n=this.getFrameBlockAtIndex(t);if(!n)return;const[r,s]=this.getFormattedDataForFrameBlock(n[n.inner.from][0]+ps/2),i=n.outer.from;p(this,Dn)[t]=Qt({datetime:G(s),label:G(r),length:G(Math.ceil(n.outer.units/this.rowspan)),month:G(n.month),year:G(n.year)},o=>{const c=o*this.rowspan;return Qt(this.rowspan,u=>{const[l,h]=n[u+c],[d,m]=this.getFormattedDataForBlockCell(l+ps/2);return J({datetime:G(m),flags:G(p0(h)),index:G(i+u+c),label:G(d),timestamp:G(l)})})})}return p(this,Dn)[t]}},rt=function(t){t!==0&&(b(this,it,p(this,it)+t),this.refreshFrame())},Jr=function(t){const n=H(this,le,y0).call(this,t);n&&(this.shiftOrigin(n),b(this,un,p(this,un)-n),b(this,Kt,p(this,Kt)-n),b(this,Ve,Fs(p(this,Ve)-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&&H(this,le,Jr).call(this,n)},w(cr,gr,qo);let Vi=cr;var Ln,wn,Cr,ks,Sr,Rr,Ls,Or,ws,br,Ir,Dr,He,Xi,Qi,tr,co;class Wy extends Vi{constructor(){super();w(this,He);w(this,Ln,7);w(this,wn,[]);w(this,Cr,Ol(this.firstWeekDay));w(this,ks);w(this,Sr,-1/0);w(this,Rr,1/0);w(this,Ls,1/0);w(this,Or);w(this,ws);w(this,br);w(this,Ir);w(this,Dr);B(this,"daysInWeek",p(this,Ln));this.initialize()}get fromTimestamp(){return p(this,Sr)}get toTimestamp(){return p(this,Rr)}get numberOfBlocks(){return p(this,Ls)}get currentDayTimestamp(){return p(this,ks)}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,Ln)}get firstWeekDay(){return super.firstWeekDay}set firstWeekDay(n){const r=this.firstWeekDay;super.firstWeekDay=n,this.firstWeekDay!==r&&(p(this,wn).length=0,b(this,Cr,Ol(this.firstWeekDay)),this.reoriginate(),this.refreshFrame())}getCursorBlockOriginTimestampOffset(n){return cn(n,this.timezone)[2]-1}getDayOfWeekAtIndex(n){if(!p(this,wn)[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 wy)i[o]=G(r.toLocaleDateString(this.locale,{weekday:o,timeZone:this.timezone}));p(this,wn)[n]=J({flags:G(p0(s)),labels:G(J(i))})}return p(this,wn)[n]}getEdgeBlockOffsetsFromOrigin(){return[H(this,He,Xi).call(this,p(this,Sr)),H(this,He,Xi).call(this,p(this,Rr))]}getFormattedDataForBlockCell(n){const[r,s,i]=cn(n,this.timezone);return[Number(i).toLocaleString(this.locale),`${r}-${`${s+1}`.padStart(2,"0")}-${`${i}`.padStart(2,"0")}`]}getFormattedDataForFrameBlock(n){const[r,s]=cn(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]=Ti(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+Nl,h=this.dynamicBlockHeight?l-u:Nl,d=new Proxy(J(),jo({get:(m,f,_)=>{if(yt(f)){const y=+f;if(is(y)&&y>=0&&y<h){const T=u+y,g=this.getTimestampAtIndex(T),E=T%p(this,Ln);let R=g===this.currentDayTimestamp?Le.CURRENT:0;return T===this.cursor&&(R|=Le.CURSOR),p(this,Cr).includes(E)&&(R|=Le.WEEKEND),E===0?R|=Le.LINE_START:E===p(this,Ln)-1&&(R|=Le.LINE_END),T>=o&&T<=c&&(T===o?R|=Le.BLOCK_START:T===c&&(R|=Le.BLOCK_END),R|=Le.WITHIN_BLOCK),g>=this.fromTimestamp&&g<=this.toTimestamp&&(g===this.fromTimestamp&&(R|=Le.RANGE_START),g===this.toTimestamp&&(R|=Le.RANGE_END),R|=Le.WITHIN_RANGE),g>=p(this,Ir)&&g<=p(this,Dr)&&(g===p(this,Ir)&&(R|=Le.SELECTION_START),g===p(this,Dr)&&(R|=Le.SELECTION_END),R|=Le.WITHIN_SELECTION),[g,R]}}return Reflect.get(m,f,_)}}));return Wr(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 Ti(this.origin,p(this,br),n)[0]}getUnitsOffsetForTimestamp(n,r){return Math.round((r-n)/ps)}reoriginate(){this.originTimestamp=zd(this.originTimestamp,this.timezone);const[n,r]=cn(this.originTimestamp,this.timezone),s=qd(this.originTimestamp,this.timezone,this.firstWeekDay);this.origin=r,b(this,br,n),b(this,Or,this.getUnitsOffsetForTimestamp(s,this.originTimestamp)),b(this,ws,H(this,He,Qi).call(this,this.originTimestamp,-p(this,Or)))}reslice(){H(this,He,co).call(this),b(this,Sr,H(this,He,tr).call(this,super.fromTimestamp)),b(this,Rr,H(this,He,tr).call(this,super.toTimestamp)),b(this,Ls,qi(super.fromTimestamp,super.toTimestamp,this.timezone)+1)}shiftOrigin(n){const[r,s]=cn(this.originTimestamp,this.timezone),[,i,o]=Ti(s,r,n),c=tn(this.timezone),u=new Date(Xt(c,this.originTimestamp)).setFullYear(o,i);this.originTimestamp=Ft(c,u),this.reoriginate()}clearSelection(){super.clearSelection(),H(this,He,co).call(this),this.refreshFrame(!0)}getTimestampAtIndex(n){return H(this,He,Qi).call(this,p(this,ws),n)}updateSelection(n,r){super.updateSelection(n,r),H(this,He,co).call(this),this.refreshFrame(!0)}withCurrentDayTimestamp(){b(this,ks,H(this,He,tr).call(this,Date.now()))}}Ln=new WeakMap,wn=new WeakMap,Cr=new WeakMap,ks=new WeakMap,Sr=new WeakMap,Rr=new WeakMap,Ls=new WeakMap,Or=new WeakMap,ws=new WeakMap,br=new WeakMap,Ir=new WeakMap,Dr=new WeakMap,He=new WeakSet,Xi=function(n){const r=qi(n,this.originTimestamp,this.timezone);return n<this.originTimestamp?0-r:r},Qi=function(n,r=0){const s=tn(this.timezone),i=Xt(s,n),o=Ft(s,i+r*ps);let[,,,c,u]=cn(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},tr=function(n){return Z(n)||Fn(n)?n:n-or(n,this.timezone)},co=function(){b(this,Ir,H(this,He,tr).call(this,this.selectionStart)),b(this,Dr,H(this,He,tr).call(this,this.selectionEnd))};const Dl=Symbol("<<NO_EXCEPTION>>"),kl=e=>{const t=[];return J({bind:G(r=>function(...s){let i=Dl;try{return t.push(r),r.call(this,...s)}catch(o){throw i=o}finally{t.pop(),t.length===0&&i===Dl&&e()}}),effect:G(e)})};var Zl,Xl,Ae,Nt,L,vt,dt,Ct,Ye,Pn,at,kr,Vt,Zt,ht,Lt,Lr,Ps,dn,ft,wo,hn,wr,Mn,Ms,Po,ye,Mo,Fo,xo,Bo,$o,Uo,_t,T0,A0,E0,Wo,lo,X,es,Ji,N0,v0,C0,S0,ea,R0,ts,ta,uo,na,ra,sa,oa;let Hy=(ye=class{constructor(){w(this,X);B(this,"grid");B(this,"kill");w(this,Ae,U);w(this,Nt,!1);w(this,L);w(this,vt);w(this,dt);w(this,Ct,!1);w(this,Ye,ir);w(this,Pn,!1);w(this,at);w(this,kr,(Zl=p(this,at))==null?void 0:Zl.join(" "));w(this,Vt);w(this,Zt);w(this,ht);w(this,Lt);w(this,Lr);w(this,Ps,Oo());w(this,dn,[]);w(this,ft);w(this,wo,new Proxy(Qt(()=>{var t;return((t=p(this,ft))==null?void 0:t.length)??0},H(this,X,ea).bind(this)),jo({get:(t,n,r)=>{var i,o;const s=((i=p(this,ft))==null?void 0:i.indexOf(n))??-1;return s>=0?(o=H(this,X,ea).call(this,s))==null?void 0:o[1]:Reflect.get(t,n,r)}})));w(this,hn,$s({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:()=>qr(vl,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:()=>Xn(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,Ps).timestamp}));w(this,wr,(Xl=p(this,hn))==null?void 0:Xl.snapshot);w(this,Mn,kl(()=>{var t;return p(this,ht)&&((t=p(this,hn))==null?void 0:t.requestNotification())}));w(this,Ms,kl(()=>{var t;return(t=p(this,ht))==null?void 0:t.call(p(this,X,es))}));w(this,Po,Wr(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&&H(this,X,v0).call(this,t),p(this,X,es)),{cursorIndex:{get:()=>p(this,Vt),set:t=>{p(this,Nt)||(Ne(t)?b(this,Vt,void 0):Q(t)&&b(this,Vt,t))}},shiftFactor:{get:()=>p(this,Zt),set:t=>{p(this,Nt)||(Ne(t)?b(this,Zt,void 0):Q(t)&&b(this,Zt,t))}},watch:{get:()=>p(this,ht),set:t=>{var n,r,s,i,o;if(!p(this,Nt))if(Q(t)){if(b(this,ht,t),!p(this,Lt)){const c=(n=p(this,Mn))==null?void 0:n.bind(p(ye,Wo).bind(this));c&&(b(this,Lt,(r=p(this,Mn))==null?void 0:r.bind(te)),b(this,Lr,(i=p(this,hn))==null?void 0:i.subscribe((s=p(this,Ms))==null?void 0:s.bind(c))),p(this,L)&&(p(this,L).effect=p(this,Lt)))}if(!p(this,Pn))return;b(this,Pn,!1),(o=p(this,Lt))==null||o.call(this)}else Ne(t)&&b(this,ht,void 0)}}})},controls:{value:p(this,wo)},cursor:{value:Object.defineProperties(t=>H(ye,_t,lo).call(this,n=>!!(n&&H(this,X,C0).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,vt)===p(this,dt)&&Z(p(this,dt)),n=r=>s=>H(ye,_t,lo).call(this,i=>{var o,c,u,l,h;if(!(p(this,Nt)||!p(this,Ye)||p(this,Ye)===ir)){if(Ne(i))return H(this,X,ta).call(this);t()?(c=p(this,L))==null||c.updateSelection(i,h0):((o=p(this,L))==null||o.updateSelection(i,r),p(this,Ye)===Cn&&p(this,at)&&H(this,X,uo).call(this,i,r===Ke?ut:Ke,p(this,at))),b(this,vt,(u=p(this,L))==null?void 0:u.selectionStart),b(this,dt,(l=p(this,L))==null?void 0:l.selectionEnd),(h=p(this,L))==null||h.shiftFrameToTimestamp(r===Ke?p(this,vt):p(this,dt))}})(s);return J({blank:{get:t},from:{get:()=>{var r;return((r=p(this,L))==null?void 0:r.selectionStart)??p(this,vt)},set:n(Ke)},to:{get:()=>{var r;return((r=p(this,L))==null?void 0:r.selectionEnd)??p(this,dt)},set:n(ut)}})})()},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,xo)}}}));this.grid=p(this,Po),this.kill=H(this,X,S0).bind(this)}},Ae=new WeakMap,Nt=new WeakMap,L=new WeakMap,vt=new WeakMap,dt=new WeakMap,Ct=new WeakMap,Ye=new WeakMap,Pn=new WeakMap,at=new WeakMap,kr=new WeakMap,Vt=new WeakMap,Zt=new WeakMap,ht=new WeakMap,Lt=new WeakMap,Lr=new WeakMap,Ps=new WeakMap,dn=new WeakMap,ft=new WeakMap,wo=new WeakMap,hn=new WeakMap,wr=new WeakMap,Mn=new WeakMap,Ms=new WeakMap,Po=new WeakMap,Mo=new WeakMap,Fo=new WeakMap,xo=new WeakMap,Bo=new WeakMap,$o=new WeakMap,Uo=new WeakMap,_t=new WeakSet,T0=function(t){if(!yt(t)||!p(ye,Mo).test(t))return;const n=t.split(/\s+/);return Array.from({length:6},(r,s)=>parseInt(n[s]??"0"))},A0=function(t){switch(t&~Jn.PREV){case Jn.FRAME:return io;case Jn.PERIOD:return ao;case Jn.BLOCK:default:return f0}},E0=function(t){return t&Jn.PREV?-1:1},Wo=new WeakMap,lo=function(t){var n;return((n=p(this,Mn))==null?void 0:n.bind(t))??t},X=new WeakSet,es=function(){return{...p(this,Ae)}},Ji=function(){return new Wy},N0=function(t){return!!p(this,L)&&!(t>0?p(this,L).isAtEnd:p(this,L).isAtStart)},v0=function(t){var s,i;if(p(this,Nt))return;b(this,at,void 0);const n=t==null?void 0:t.highlight,r=Xn(p(this,Ae).minified);if(yt(n)?b(this,at,H(s=ye,_t,T0).call(s,n))&&b(this,Ye,Cn):b(this,Ye,qr(My,n,p(this,Ye))),b(this,Ae,{...p(this,Ae),...t,blocks:qr(ur,t==null?void 0:t.blocks,p(this,Ae).blocks),controls:qr(vl,t==null?void 0:t.controls,p(this,Ae).controls),firstWeekDay:qr(t0,t==null?void 0:t.firstWeekDay,p(this,Ae).firstWeekDay),fixedBlockHeight:Xn(t==null?void 0:t.fixedBlockHeight,p(this,Ae).fixedBlockHeight),highlight:p(this,Ye),minified:Xn(t==null?void 0:t.minified,p(this,Ae).minified),trackCurrentDay:Xn(t==null?void 0:t.trackCurrentDay,p(this,Ae).trackCurrentDay)}),!Q(p(this,ht))){p(this,L)?b(this,Pn,!0):(b(this,L,p(this,X,Ji)),H(this,X,ra).call(this),H(this,X,oa).call(this),H(this,X,sa).call(this));return}(!p(this,L)||r!==p(this,Ae).minified)&&(b(this,L,p(this,X,Ji)),p(this,L).effect=p(this,Lt)),H(this,X,ra).call(this),(i=p(this,Lt))==null||i.call(this)},C0=function(t){if(t&&p(this,L)&&Q(p(this,ht))){if(t instanceof KeyboardEvent){switch(t.code){case V.ARROW_LEFT:p(this,L).shiftFrameCursor(n0);break;case V.ARROW_RIGHT:p(this,L).shiftFrameCursor(i0);break;case V.ARROW_UP:p(this,L).shiftFrameCursor(d0);break;case V.ARROW_DOWN:p(this,L).shiftFrameCursor(o0);break;case V.HOME:p(this,L).shiftFrameCursor(t.ctrlKey?s0:c0);break;case V.END:p(this,L).shiftFrameCursor(t.ctrlKey?r0:a0);break;case V.PAGE_UP:t.shiftKey?p(this,L).shiftFrameByOffset(-1,ao):p(this,L).shiftFrameCursor(u0);break;case V.PAGE_DOWN:t.shiftKey?p(this,L).shiftFrameByOffset(1,ao):p(this,L).shiftFrameCursor(l0);break;case V.SPACE:case V.ENTER:return H(this,X,ts).call(this),!0;default:return}return p(this,Ct)&&H(this,X,ts).call(this,U),!0}if(t instanceof MouseEvent&&p(ye,Fo).includes(t.type)&&Q(p(this,Vt))){const n=p(this,Vt).call(p(this,X,es),t);if(!is(n))return;const r=t.type==="click";if(!(r||p(this,Ct)))return;if(p(this,L).shiftFrameCursor(n),p(this,L).cursor===n)return r?H(this,X,ts).call(this):H(this,X,ts).call(this,U),!0}}},S0=function(){var t;p(this,Nt)||((t=p(this,Lr))==null||t.call(this),b(this,Mn,b(this,Ms,b(this,Vt,b(this,L,b(this,Ye,b(this,kr,b(this,wr,b(this,at,b(this,Zt,b(this,Lr,b(this,hn,b(this,Lt,b(this,ht,void 0))))))))))))),b(this,Ae,U),b(this,Ct,b(this,Pn,!1)),b(this,Nt,!0))},ea=function(t){var r,s;if(!p(this,ft)||t<0||t>=p(this,ft).length)return;const n=p(this,ft)[t];if(!p(this,dn)[t]){const i=Ki[n],o=H(r=ye,_t,A0).call(r,i),c=H(s=ye,_t,E0).call(s,i);p(this,dn)[t]=(...u)=>H(ye,_t,lo).call(this,(...l)=>{var m;const h=H(this,X,N0).call(this,c);if(!(h&&l.length))return h;const d=H(this,X,R0).call(this,n,l[0]);return Z(d)?!1:((m=p(this,L))==null||m.shiftFrameByOffset(c*d,o),!0)})(...u)}return[n,p(this,dn)[t]]},R0=function(t,n){if(!(p(this,L)&&Q(p(this,ht))))return;if(n instanceof MouseEvent){if(n.type!=="click")return}else if(n instanceof KeyboardEvent){if(!p(ye,Bo).includes(n.code))return}else return;let r=1;if(Q(p(this,Zt))){const s=Number(p(this,Zt).call(p(this,X,es),n,t));r=Number.isInteger(s)&&s>=1?s:r}return r},ts=function(t){if(p(this,Nt)||!p(this,L))return;switch(p(this,Ye)){case Cn:case ar:break;case ir: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,at);if(p(this,Ye)===ar||p(this,L).blankSelection||i)if(b(this,Ct,!(p(this,Ye)===ar||i)),p(this,Ye)===Cn&&i){const o=s>=p(this,L).selectionEnd?Ke:ut;o===Ke?p(this,L).updateSelection(s,ut):p(this,L).updateSelection(r,Ke),H(this,X,uo).call(this,o===Ke?p(this,L).selectionEnd:p(this,L).selectionStart,o,i)}else p(this,L).updateSelection(r,Ke),p(this,L).updateSelection(s,ut);else{const o=t===U,c=tn(p(this,L).timezone);if(o||b(this,Ct,!1),r<=p(this,L).selectionStart){const u=new Date(Xt(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,ut),p(this,L).updateSelection(r,Ke)}else{const u=new Date(Xt(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,Ke),p(this,L).updateSelection(s,ut)}if(o)return}b(this,vt,p(this,L).selectionStart),b(this,dt,p(this,L).selectionEnd)},ta=function(){var t;(t=p(this,L))==null||t.clearSelection(),b(this,Ct,!1),b(this,vt,b(this,dt,void 0))},uo=function(t,n,r){var f;if(!p(this,L))return;const s=tn((f=p(this,L))==null?void 0:f.timezone),i=new Date(Xt(s,t)),o=n===Ke?-1:1,[c=0,u=0,l=0,h=0,d=0,m=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()+m*o),p(this,L).updateSelection(Ft(s,i.getTime()-o),n)},na=function(){var t,n;p(this,vt)&&((t=p(this,L))==null||t.updateSelection(p(this,vt),Ke)),p(this,dt)&&((n=p(this,L))==null||n.updateSelection(p(this,dt),ut)),b(this,Ct,!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,b(this,Ps,Oo(p(this,L).timezone)),H(this,X,na).call(this))},sa=function(){var t,n,r,s,i,o;switch(p(this,Ye)){case Cn:!$t((t=p(this,L))==null?void 0:t.blankSelection)&&p(this,at)&&H(this,X,uo).call(this,(n=p(this,L))==null?void 0:n.selectionStart,ut,p(this,at));break;case ar:if(!$t((r=p(this,L))==null?void 0:r.blankSelection)){const c=tn((s=p(this,L))==null?void 0:s.timezone),u=new Date(Xt(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)),ut)}break;case ir:default:H(this,X,ta).call(this);return}},oa=function(){var t,n;switch((t=p(this,hn))==null?void 0:t.snapshot.controls){case cc:b(this,ft,p(ye,$o));break;case lc:b(this,ft,p(ye,Uo));break;case uc:default:b(this,ft,void 0)}p(this,dn).length=0,p(this,dn).length=((n=p(this,ft))==null?void 0:n.length)??0},w(ye,_t),w(ye,Mo,/^(?:0|[1-9]\d*)(\s+(?:0|[1-9]\d*)?){0,5}?$/),w(ye,Fo,["click","mouseover","pointerover"]),w(ye,xo,Qt(0,te)),w(ye,Bo,[V.ENTER,V.SPACE]),w(ye,$o,Object.keys(Ki).filter(t=>isNaN(+t))),w(ye,Uo,["PREV","NEXT"]),w(ye,Wo,function(t){var o,c;if(jn(t))return;let n=!1,r=!1,s=!1;const i=(o=p(this,at))==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&&(b(this,kr,i),r=!0),b(this,wr,t),p(this,Ct)&&!s&&H(this,X,na).call(this),n&&H(this,X,oa).call(this),r&&H(this,X,sa).call(this)}),ye);const Dt=Object.defineProperties(t=>{const{grid:n,kill:r}=new Hy;return Ur(t)?n.config({blocks:t}):Q(t)?Pr.then(()=>{n.config.watch=t}):n.config(t),J({grid:G(n),kill:G(r)})},{controls:{value:J({ALL:{value:cc},MINIMAL:{value:lc},NONE:{value:uc}})},highlight:{value:J({ONE:{value:ar},MANY:{value:Cn},NONE:{value:ir}})},slice:{value:Object.defineProperties(m0.bind(null),{FROM:{value:dc},TO:{value:hc},UNBOUNDED:{value:os},SINCE_NOW:{get:xy},UNTIL_NOW:{get:By}})}}),Gy=({config:e,grid:{controls:t},renderer:n})=>e.controls===Dt.controls.NONE||!Q(n)?null:a(K,{children:t.map(([r,s])=>n(r,s))}),Yy=Ie(Gy),jy=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 on(C((n,r)=>{try{e==null||e(n,r)}finally{t(n,r)}},[e]))},zy=({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:m,useYearView:f},_)=>{const{i18n:y}=W(),[T,g]=x(performance.now()),E=A(()=>Dt.slice(l,m),[l,m]),R=Y(U),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:v,kill:O}=A(()=>{const{grid:P,kill:z}=Dt(function(){g(performance.now()),R.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=q=>{let ce=q.target;for(;ce&&ce!==q.currentTarget;){const Te=Number(ce.dataset.cursorPosition);if(Number.isFinite(Te))return Te;ce=ce.parentNode}},P.config.shiftFactor=function(q){if(this.controls===Dt.controls.MINIMAL)return q!=null&&q.shiftKey?12:q!=null&&q.altKey?this.blocks:1},{grid:P,kill:z}},[]),S=A(()=>{const P=z=>{v.cursor(z)};return{onClickCapture:P,onMouseOverCapture:P,onPointerOverCapture:P,onKeyDownCapture:z=>{v.cursor(z)&&z.preventDefault()}}},[v]),M=jy(C((P,z)=>{z instanceof Element&&z.removeAttribute("aria-selected"),P instanceof Element&&P.setAttribute("aria-selected","true")},[]));return F1(_,()=>{const{from:P,to:z}=(v==null?void 0:v.highlight)||U;return{clear:()=>{v!=null&&v.highlight&&(v.highlight.from=void 0)},get config(){return{...R.current??U}},get from(){return Al(P)},set from(j){v!=null&&v.highlight&&j&&(v.highlight.from=j.getTime())},get to(){return Al(z)},set to(j){v!=null&&v.highlight&&j&&(v.highlight.to=j.getTime())}}},[v,T]),$(()=>{v.config({blocks:e,controls:N,firstWeekDay:r,fixedBlockHeight:!n,highlight:D,locale:i??y.locale,minified:f,timeslice:E,timezone:h,trackCurrentDay:d})},[N,D,e,n,r,v,y,i,E,h,d,f]),$(()=>{const P=[].concat(c).slice(0,2).map(Number).filter(Boolean);return P[0]&&(v.highlight.from=+P[0]),P[1]&&(v.highlight.to=+P[1]),O},[]),{cursorElementRef:M,cursorRootProps:S,grid:v}},qy=Yr((e,t)=>{const n=zy(e,t),r=n.grid.config();return a("div",{role:"none",children:[a(Yy,{config:r,grid:n.grid,renderer:e.renderControl}),a(Ly,{ref:n.cursorElementRef,config:r,cursorRootProps:n.cursorRootProps,grid:n.grid,onlyCellsWithin:e.onlyCellsWithin,prepare:e.prepare})]})}),Ky=Ie(qy),Vy=(e,t)=>{const[n,r]=x(),s=on(A(()=>{const i=o=>(...c)=>{const u=e(o,...c);return u&&Xu(u,o)};return r(void 0),o=>r(o instanceof Element?()=>i(o):void 0)},[e,t]),t);return[n,s]},Zy=e=>{const{i18n:t}=W();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=Qo;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]))},Xy=Yr((e,t)=>{const{i18n:n}=W(),[r,s]=Zy(e.renderControl),[i,o]=x(performance.now()),c=A(()=>$t(e.showTimezoneInfo),[e.showTimezoneInfo]),{clockTime:u,GMTOffset:l}=J3({timezone:e.timezone,withClock:c}),h=A(()=>F([{"adyen-pe-datepicker--with-timezone":c},"adyen-pe-datepicker"]),[c]),d=A(()=>c?{values:{offset:l,time:u}}:U,[l,u,c]),m=on(te,t),f=C(()=>{var _,y,T,g,E;o(performance.now()),(_=m.current)!=null&&_.from&&((y=m.current)!=null&&y.to)&&((E=e.onHighlight)==null||E.call(e,+((T=m.current)==null?void 0:T.from),+((g=m.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(Cy,{now:e.now,calendarRef:m,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:m,firstWeekDay:ic,dynamicBlockRows:!0,onlyCellsWithin:!0,controls:e.controls??Dt.controls.MINIMAL,highlight:e.highlight??Dt.highlight.MANY,onHighlight:f,renderControl:r,trackCurrentDay:!0}),c&&a("div",{className:"adyen-pe-datepicker__timezone",children:n.get("calendar.timezone",d)})]})}),Qy="adyen-pe-filter-button";function Jy(e,t){const{className:n,classNameModifiers:r=[],children:s,disabled:i,onClick:o,...c}=e,u=A(()=>xn("",n)||"",[n]),l=A(()=>Zo(i),[i]),{classes:h,click:d}=Xo(u,r,Qy,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 eg=Xe(Jy),tg=Yr(function(t,n){return a(Ro,{classNameModifiers:t.classNameModifiers,...t,ref:n,"aria-required":t.required,type:"text"})}),ng=e=>!e||Di(e),rg=(()=>{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 $(()=>{if(n===je.CLEAR){const l="";c(l),i(l),s(l)}n===je.APPLY&&s(o??"")},[o,n,s,i]),a(tg,{name:r,value:o,onInput:u})};return t=>a(e,{...t})})(),sg=({render:e,...t})=>{var z;const n=be(Oe.down.xs),[r,s]=wt(!1),[i,o]=wt(!1),c=A(()=>t.isValueEmpty??ng,[t.isValueEmpty]),[u,l]=wt(c(t.value)),[h,d]=wt(!1),[m,f]=wt(!1),[_,y]=wt(c(t.value)),T=vo(),g=A(()=>e??rg,[e]),E=C(j=>{const ie=c(j??void 0);l(ie),y(po(j)),f(h?j!==t.value:!ie)},[c,l,y,f,h,t.value]),{commitAction:R,commitActionButtons:N,committing:D,resetCommitAction:v}=vd({applyDisabled:_||!m,resetDisabled:u}),[O,S]=A(()=>{const j=ie=>()=>{ie!==r&&(ie&&(v(),f(!1),d(!1)),s(ie),o(ie))};return[j(!1),j(!0)]},[s,r,v,o,d,f]);$(()=>{if(i){const j=c(t.value);o(!1),l(j),d(!j)}},[t.value,i,c,o,l,d]),$(()=>{D&&O(),l(u)},[D,O,l,u]);const M=be(Oe.only.sm),P=be(Oe.only.md);return a(K,{children:[a("div",{className:`adyen-pe-filter adyen-pe-filter--${t.type}`,children:A(()=>a(eg,{classNameModifiers:[...t.appliedFilterAmount?["with-counter"]:[],...t.classNameModifiers??[],...r?["active"]:[],...u?[]:["has-selection"]],onClick:r?O:S,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,O,S,T])}),r&&a($a,{actions:N,title:(z=t.title)==null?void 0:z.trim(),variant:qe.POPOVER,modifiers:["filter"],open:r,"aria-label":`${t.label}`,dismiss:O,dismissible:!1,withContentPadding:t.withContentPadding??!0,divider:!0,targetElement:T,disableFocusTrap:!1,position:ge.BOTTOM,containerSize:t.containerSize,showOverlay:n,fitPosition:M||P,children:g({...t,editAction:R,onValueUpdated:E})})]})},O0=Ie(sg);var _s=(e=>(e.FROM="from",e.TO="to",e))(_s||{});const og={month:"short",day:"numeric",year:"numeric"},b0=(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""}},ig=(()=>{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:m})=>{const{i18n:f}=W(),{fullDateFormat:_}=sn(h),[y,T]=x(u),g=A(()=>[new Date(n),new Date(r)],[n,r]),E=Y(),R=C((N,D)=>{o(b0(f,_,Pt(N),Pt(D)))},[f,_,o]);return $(()=>{var N,D,v;switch(t){case je.APPLY:i({selectedPresetOption:y,[_s.FROM]:Pt((N=E.current)==null?void 0:N.from),[_s.TO]:Pt((D=E.current)==null?void 0:D.to)});break;case je.CLEAR:(v=E.current)==null||v.clear(),i()}},[t,i,y]),a(Xy,{ref:E,now:s,originDate:g,onHighlight:R,onPresetOptionSelected:T,selectedPresetOption:u,timeRangePresetOptions:l,timezone:h,showTimezoneInfo:c,sinceDate:Pt(d),untilDate:Pt(m)})};return t=>a(e,{...t})})(),ag=(e,t,n)=>e.formatRange(t,n);function cg({title:e,from:t,to:n,selectedPresetOption:r,...s}){const{i18n:i}=W(),{fullDateFormat:o}=sn(s.timezone),[c,u]=x(),[l,h]=x(),[d,m]=x(),f=C(g=>{const{from:E,to:R,selectedPresetOption:N}=g??U;try{u(c??N),h(Pt(l??E)),m(Pt(d??R))}finally{s.onChange({from:E,to:R,selectedPresetOption:N})}},[c,l,d,s]),_=A(()=>i.get("rangePreset.custom"),[i]),y=A(()=>{const g={...og,timeZone:s.timezone};let E=new Intl.DateTimeFormat(qo,g);try{E=new Intl.DateTimeFormat(i.locale,g)}catch{}return E},[i,s.timezone]);$(()=>u(r),[r]),$(()=>h(Pt(t||Date.now())),[t]),$(()=>m(Pt(n||Date.now())),[n]);const T=A(()=>r===_&&l&&d?ag(y,new Date(l),new Date(d)):r??s.label,[_,y,l,d,r,s.label]);return a(O0,{...s,from:t,to:n,type:"date",label:T,onChange:f,render:ig,selectedPresetOption:r,value:b0(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}=W(),h=A(()=>l.get(n.current.defaultTimeRange),[l]),[d,m]=x(h),f=C((_=U)=>{for(const[y,T]of Object.entries(_)){switch(y){case"selectedPresetOption":m(T||h);break;case _s.FROM:u({[ee.CREATED_SINCE]:T||n.current.defaultFilterParams[ee.CREATED_SINCE]});break;case _s.TO:u({[ee.CREATED_UNTIL]:T||n.current.defaultFilterParams[ee.CREATED_UNTIL]});break;default:return}i()}},[h,i,u]);return A(()=>!t&&m(h),[t,h]),a(cg,{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:f,showTimezoneInfo:!0,now:s})};function lg(e){return"callback"in e}function I0(e){const[t,n]=x(null),r=C(o=>{var c;return o&&lg(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 Ll=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(js,{onChange:r,filterable:!1,multiSelect:!0,placeholder:e,selected:t,withoutCollapseIndicator:!0,items:n,showOverlay:s,fitPosition:o||i}):null}),ug=e=>Object.freeze(e.map(t=>({id:t,name:t}))),Ai=({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&&ug(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}},dg=[ee.CURRENCIES,ee.CATEGORIES,ee.STATUSES],ho=Object.freeze(Object.fromEntries(dg.map(e=>[e,""]))),hg=["ATM","Capital","Chargeback","Correction","Fee","Payment","Refund","Transfer","Other"],fg=["Booked","Pending","Reversed"],mg=e=>{const t=Ny(),n="rangePreset.last30Days",{from:r,to:s}=t[n];return{defaultFilterParams:{...e==="transactions"&&{...ho,[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=mg(e),i=Y(s),o=C(()=>r(Date.now()),[r]);return $(()=>{o()},[t,o]),{defaultParams:i,nowTimestamp:n,refreshNowTimestamp:o}},pg="adyen-pe-data-overview-header",_g=({baseClassName:e=pg,children:t,hideTitle:n,titleKey:r,descriptionKey:s})=>{const{i18n:i}=W();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})]})},yg={base:"adyen-pe-modal-content"};function gg({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(K,{children:s&&a("div",{className:yg.base,children:a(Ka,{...s,dataCustomization:n})})})}const D0=({children:e,className:t,selectedDetail:n,resetDetails:r,dataCustomization:s})=>{const{i18n:i}=W(),o=!!n;return $(()=>{o&&Qr.closeAll()},[o]),a("div",{className:t,children:[e,n&&a(S3,{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(gg,{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 $(()=>{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??U,...i}}return r},Tg=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=ms,onRecordSelection:s,showDetails:i,isLoadingBalanceAccount:o,onContactSupport:c,hideTitle:u,dataCustomization:l})=>{var Qe,gt,Ge,Ht;const{getPayouts:h}=Ce().endpoints,{activeBalanceAccount:d,balanceAccountSelectionOptions:m,onBalanceAccountSelection:f}=oc(t),{defaultParams:_,nowTimestamp:y,refreshNowTimestamp:T}=mc("payouts",d),g=C(async(Be,An)=>h({signal:An,errorLevel:"error"},{query:{...Be,createdSince:Be[ee.CREATED_SINCE]??_.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:Be[ee.CREATED_UNTIL]??_.current.defaultFilterParams[ee.CREATED_UNTIL],balanceAccountId:(d==null?void 0:d.id)??""}}),[d==null?void 0:d.id,_,h]),E=Za(),R=A(()=>Q(e)?e:void 0,[e]),N=A(()=>n?tc:void 0,[n]),{canResetFilters:D,error:v,fetching:O,filters:S,limit:M,limitOptions:P,records:z,resetFilters:j,updateFilters:ie,updateLimit:q,...ce}=sc({fetchRecords:g,dataField:"data",filterParams:_.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:R,preferredLimit:r,preferredLimitOptions:N,enabled:!!(d!=null&&d.id)&&!!h});$(()=>{T()},[S,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,qa)},[(Qe=l==null?void 0:l.list)==null?void 0:Qe.fields]),{customRecords:De,loadingCustomRecords:pe}=pc({records:z,hasCustomColumn:_e,onDataRetrieve:(gt=l==null?void 0:l.list)==null?void 0:gt.onDataRetrieve,mergeCustomData:me}),ke=A(()=>({payout:Te}),[Te]),{updateDetails:fe,resetDetails:Ue,selectedDetail:oe}=I0(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:w3,children:[a(_g,{hideTitle:u,titleKey:"payoutsTitle",descriptionKey:"payoutsNotice",children:a(Xa,{...E})}),a(Qa,{...E,children:[a(ec,{activeBalanceAccount:d,balanceAccountSelectionOptions:m,onBalanceAccountSelection:f}),a(fc,{canResetFilters:D,defaultParams:_,filters:S,nowTimestamp:y,refreshNowTimestamp:T,sinceDate:M3,timezone:"UTC",updateFilters:ie})]}),a(D0,{className:P3,onContactSupport:c,selectedDetail:oe,resetDetails:Ue,dataCustomization:l==null?void 0:l.details,children:a(D3,{loading:O||o||!t||pe,data:(Ge=l==null?void 0:l.list)!=null&&Ge.onDataRetrieve?De:z,showPagination:!0,onRowClick:ze,showDetails:i,limit:M,limitOptions:P,onContactSupport:c,onLimitSelection:q,error:v,customColumns:(Ht=l==null?void 0:l.list)==null?void 0:Ht.fields,...ce})})]})},Ag="adyen-pe-payouts-overview-container";function Eg({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=ei(e.balanceAccountId);return a(Va,{balanceAccountsError:s,className:Ag,errorMessage:"weCouldNotLoadThePayoutsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(Tg,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class k0 extends zn{constructor(n){super(n);B(this,"componentToRender",()=>a(Eg,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(k0,"type","payouts");class L0 extends zn{constructor(n){super(n);B(this,"componentToRender",()=>a(Ka,{...this.props,type:"transaction",ref:n=>void(this.componentRef=n)}));this.componentToRender=this.componentToRender.bind(this)}}B(L0,"type","transactionDetails");const Ng={base:"adyen-pe-divider"},vg=({className:e})=>a("hr",{className:F(Ng.base,e)}),Cg="adyen-pe-header",oi=({baseClassName:e=Cg,children:t,hasDivider:n,hideTitle:r,titleKey:s,subtitleKey:i,subtitleConfig:o})=>{const{i18n:c}=W();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:F(`${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(vg,{className:`${e}__divider`})]}),t&&a("div",{className:`${e}__controls`,children:t})]})},Sg="adyen-pe-transaction-totals",wl="adyen-pe-transaction-totals__item",Rg="adyen-pe-base-button";function Og(e,t){const n=A(()=>xn("",e.className)||"",[e.className]),r=A(()=>Zo(e.disabled||!1),[e.disabled]),{click:s,allProps:i}=Xo(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 Pl=Xe(Og),w0="adyen-pe-expandable-card",ii=w0,yn=ii+"__container",fo=ii+"__content",Ml=ii+"__chevron",Fl=yn+"--button",Ei=yn+"--filled",bg=yn+"--hidden",Ig=yn+"--in-flow",P0=yn+"--overlay",xl=fo+"--expandable",Bl=`--${w0}-height`,Ni=P0,gc=({renderHeader:e,children:t,filled:n,fullWidth:r,inFlow:s,...i})=>{const{i18n:o}=W(),[c,u]=x(!1),[l,h]=x(0),d=A(()=>s===!0,[s]),m=C(()=>u(E=>!E),[u]),f=Y(null),_=Y(null),y=Y(!1),T=Y(c),g=Ma(void 0,C(()=>{c&&(m(),y.current=!0)},[c,m]));return us(()=>{const E=_.current;E&&(d?E.style.setProperty(Bl,`${l}px`):c||E.style.removeProperty(Bl))},[l,d,c]),$(()=>{if(!d)return void h(0);const E=f.current;if(!E)return;const R=new ResizeObserver(N=>{for(const D of N)D.target===E&&h(E.offsetHeight||0)});return R.observe(E),()=>{R.unobserve(E),R.disconnect()}},[d]),$(()=>{var E,R;c?(E=g.current)==null||E.focus():(T.current!==c&&!y.current&&((R=f.current)==null||R.focus()),y.current=!1),T.current=c},[c,g]),a("div",{ref:_,className:ii,children:t?a(K,{children:[a(Pl,{className:F(yn,Fl,{[Ei]:n}),disabled:c,fullWidth:r,"aria-controls":Ni,"aria-expanded":c,"aria-hidden":c,onClick:m,ref:f,"data-testid":"expand-button",...i,children:[a("span",{className:"adyen-pe-visually-hidden",children:o.get("expandableCard.expand")}),a("div",{className:F(fo,xl),children:e}),a("div",{className:Ml,children:a(Qo,{role:"presentation"})})]}),a(Pl,{id:Ni,className:F(yn,Fl,P0,{[Ei]:n,[bg]:!c,[Ig]:d}),disabled:!c,fullWidth:r,"aria-controls":Ni,"aria-expanded":c,"aria-hidden":!c,onClick:m,ref:g,"data-testid":"collapse-button",...i,children:[a("span",{className:"adyen-pe-visually-hidden",children:o.get("expandableCard.collapse")}),a("div",{className:F(fo,xl),children:[e,a("div",{children:t})]}),a("div",{className:Ml,children:a(Ea,{role:"presentation"})})]})]}):a("div",{className:F(yn,{[Ei]:n}),...i,children:a("div",{className:fo,children:e})})})},Tc="adyen-pe-amount-skeleton",Dg=Tc+"--has-margin",kg=Tc+"--loading",Lg=({hasMargin:e=!1,isLoading:t=!1,width:n})=>a("span",{className:F(Tc,{[kg]:t,[Dg]:e}),style:{width:n}}),Wn="adyen-pe-summary-item",M0=Wn+"__label-container",wg=M0+"--loading",Pg=Wn+"--body",F0=Wn+"__label",Mg=Wn+"__placeholder",Fg=Wn+"__amount",$l=Xe(({config:e,i18n:t,isSkeletonVisible:n,className:r,...s},i)=>a("span",{className:F(M0,r,{[wg]:n}),style:{cursor:"default"},ref:i,...s,children:e.labelKey&&a(k,{variant:I.CAPTION,className:F0,children:t.get(e.labelKey)})})),x0=({columnConfigs:e,isHeader:t=!1,isHovered:n=!1,isSkeletonVisible:r=!1,isLoading:s=!1,widths:i,onWidthsSet:o,isEmpty:c})=>{const{i18n:u}=W();$(()=>{const m=e.map(f=>{var _,y;return((y=(_=f.ref)==null?void 0:_.current)==null?void 0:y.getBoundingClientRect().width)??0});o(m)},[o]);const l=m=>({width:i&&i[m]?i[m]:"auto"}),h=be(Oe.only.xs),d=C((m,f)=>m.valueHasLabelStyle?I.CAPTION:f&&!h?I.BODY:I.TITLE,[h]);return a("div",{className:F(Wn,{[Pg]:!t}),children:e.map((m,f)=>{const _=m.getValue(),y=!!_&&_.length>12;return a("div",{children:[t&&(m.tooltipLabel?a(nn,{content:u.get(`${m.tooltipLabel}`),isContainerHovered:n,children:a($l,{config:m,i18n:u,isSkeletonVisible:r})}):a($l,{config:m,i18n:u,isSkeletonVisible:r})),r?a(Lg,{isLoading:s,hasMargin:m.hasSkeletonMargin,width:m.skeletonWidth+"px"}):c?a("span",{className:F([Wn,Mg])}):a("div",{ref:m.ref,style:l(f),children:a(k,{variant:d(m,y),className:F({[F0]:m.valueHasLabelStyle,[Fg]:!m.valueHasLabelStyle}),children:_})})]},f)})})},Ul=({total:e,hiddenField:t,isHeader:n=!1,isHovered:r=!1,isSkeleton:s=!1,isLoading:i=!1,widths:o,onWidthsSet:c})=>{const{i18n:u}=W(),l=Y(null),h=Y(null),d=Y(null),m=A(()=>{const f={labelKey:"totalIncoming",ref:l,skeletonWidth:80,getValue:()=>e&&u.amount(e.incomings,e.currency),tooltipLabel:"tooltip.totalIncoming"},_={labelKey:"totalOutgoing",ref:h,skeletonWidth:80,getValue:()=>e&&u.amount(e.expenses,e.currency),tooltipLabel:"tooltip.totalOutgoing"};return[...t!=="incomings"?[f]:[],...t!=="expenses"?[_]:[],{ref:d,skeletonWidth:40,valueHasLabelStyle:!0,getValue:()=>e==null?void 0:e.currency}]},[e,t,u]);return a(x0,{isHovered:r,isEmpty:!e,columnConfigs:m,isHeader:n,isSkeletonVisible:s,isLoading:i,widths:o,onWidthsSet:c})},xg="adyen-pe-base-list",Ac=({children:e,classNames:t})=>a("ul",{className:F(xg,[t]),children:e}),B0=()=>{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]},vi=Ie(({totals:e,isLoading:t,hiddenField:n,fullWidth:r})=>{const[s,i]=B0(),[o,c]=x(!1),[u,...l]=A(()=>e.map(h=>(h.key=`${h.currency}-${Math.random()}`,h)),[e]);return a(gc,{renderHeader:a(Ul,{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(Ul,{isHovered:o,total:h,hiddenField:n,widths:s,onWidthsSet:i})},h.key))})})}),Bg=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,m=C(async()=>d==null?void 0:d(U,{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:f,isFetching:_}=Rt({fetchOptions:A(()=>({enabled:!!n&&!!d}),[n,d]),queryFn:m}),y=!n||_||t,g=C(()=>{if(!e||!f)return f==null?void 0:f.data;const R=e.map(N=>f.data.find(v=>v.currency===N)||{currency:N,incomings:0,expenses:0});return R.concat(f.data.filter(N=>!R.includes(N)))},[e,f])()??[],E=be(Oe.only.xs);return a("div",{className:Sg,children:E?a(K,{children:[a("div",{className:wl,children:a(vi,{totals:g,isLoading:y,hiddenField:"expenses",fullWidth:h})}),a("div",{className:wl,children:a(vi,{totals:g,isLoading:y,hiddenField:"incomings",fullWidth:h})})]}):a(vi,{totals:g,isLoading:y,fullWidth:h})})}),$g="adyen-pe-balances",Wl=({balance:e,isHeader:t=!1,isSkeleton:n=!1,isLoading:r=!1,widths:s,onWidthsSet:i,isEmpty:o})=>{const{i18n:c}=W(),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(x0,{isEmpty:o,columnConfigs:h,isHeader:t,isSkeletonVisible:n,isLoading:r,widths:s,onWidthsSet:i})},Ug=Ie(({balanceAccountId:e,defaultCurrencyCode:t,onCurrenciesChange:n,fullWidth:r})=>{const{getBalances:s}=Ce().endpoints,i=C(async()=>s==null?void 0:s(U,{path:{balanceAccountId:e}}),[e,s]),{data:o,error:c,isFetching:u}=Rt({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]),[m,...f]=A(()=>(d==null?void 0:d.map(T=>(T.key=`${T.currency}-${Math.random()}`,T)))??[],[d]),[_,y]=B0();return $(()=>{const T=new Set((d==null?void 0:d.map(({currency:g})=>g))||[]);n(Array.from(T),u)},[d,u,n]),a("div",{className:$g,children:a(gc,{renderHeader:a(Wl,{isEmpty:h,balance:m,widths:_,isHeader:!0,isSkeleton:l,isLoading:l,onWidthsSet:y}),filled:!0,fullWidth:r,children:f.length&&a(Ac,{children:f.map(T=>a("li",{children:a(Wl,{balance:T,widths:_,onWidthsSet:y})},T.key))})})})}),Wg=(e,t)=>{const n=Ai({filterParam:ee.CATEGORIES,filterValues:hg,defaultFilters:ho,...e}),r=Ai({filterParam:ee.STATUSES,filterValues:fg,defaultFilters:ho,...e}),s=Ai({filterParam:ee.CURRENCIES,filterValues:t,defaultFilters:ho,...e});return{categoriesFilter:n,currenciesFilter:s,statusesFilter:r}},bo=1e5,Hg=({onChange:e,editAction:t,onValueUpdated:n,selectedCurrencies:r,availableCurrencies:s,value:i,...o})=>{const{i18n:c}=W(),[u,l]=x(Z(o.minAmount)?void 0:parseFloat(o.minAmount)/bo),[h,d]=x(Z(o.maxAmount)?void 0:parseFloat(o.maxAmount)/bo),m=C(()=>{e({minAmount:u,maxAmount:h})},[h,u,e]),f=C(()=>{e({minAmount:void 0,maxAmount:void 0}),d(void 0),l(void 0)},[e]);$(()=>{t===je.APPLY&&m(),t===je.CLEAR&&f()},[m,f,t]);const _=A(()=>({minAmount:Number(u),maxAmount:Number(h)}),[h,u]);return $(()=>{const{maxAmount:y,minAmount:T}=_;Z(y)&&Z(T)||T>y?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:y=>{y.currentTarget&&l(y.currentTarget.value!==""?y.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:y=>{y.currentTarget&&d(y.currentTarget.value!==""?y.currentTarget.value:void 0)},min:u,isInvalid:!Z(h)&&!Z(u)&&h<u,errorMessage:c.get("toValueShouldBeGreaterThanTheFromValue")})]})]})},Gg=({updateFilters:e,selectedCurrencies:t,availableCurrencies:n,...r})=>{const{i18n:s}=W(),[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((m,f)=>{const _=(t==null?void 0:t[0])||(n==null?void 0:n[0]),y=f&&_?{style:"currency",currency:_,currencyDisplay:"symbol"}:void 0;return m.toLocaleString(s.locale,y)},[n,s,t]),d=C(m=>{const{minAmount:f,maxAmount:_}=m??U;o({minAmount:f,maxAmount:_}),Z(f)&&Z(_)&&u(void 0),e({minAmount:Z(f)?void 0:String(Math.round(f*bo)),maxAmount:Z(_)?void 0:String(Math.round(_*bo))})},[e]);if(i&&(i.minAmount||i.maxAmount)){const{minAmount:m,maxAmount:f}=i??{};!Z(m)&&!Z(f)&&m<=f?u(`${h(m,l)} ${s.get("to").toLowerCase()} ${h(f,l)}`):!Z(m)&&Z(f)&&m>=0?u(`${s.get("from")} ${h(m,l)}`):Z(m)&&!Z(f)?u(`${s.get("to")} ${h(f,l)}`):u(void 0)}return a(O0,{...r,updateFilters:e,minAmount:r.minAmount,maxAmount:r.maxAmount,onChange:d,value:c,label:c||r.label,type:"text",containerSize:ds.MEDIUM,selectedCurrencies:t,availableCurrencies:n,render:Hg})},$0="adyen-pe-transactions",U0=`${$0}-overview`,Yg=`${$0}-details`,W0=`${U0}__summary`,Hl=`${W0}-item`,jg=24,zg=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=ms,onRecordSelection:s,showDetails:i,isLoadingBalanceAccount:o,onContactSupport:c,hideTitle:u,dataCustomization:l})=>{var qs,Ks,Vs,vc;const{i18n:h}=W(),{getTransactions:d}=Ce().endpoints,{activeBalanceAccount:m,balanceAccountSelectionOptions:f,onBalanceAccountSelection:_}=oc(t),{defaultParams:y,nowTimestamp:T,refreshNowTimestamp:g}=mc("transactions",m),E=C(async({balanceAccount:Je,...et},ui)=>d({signal:ui,errorLevel:"error"},{query:{...et,statuses:Vr(et[ee.STATUSES]),categories:Vr(et[ee.CATEGORIES]),currencies:Vr(et[ee.CURRENCIES]),createdSince:et[ee.CREATED_SINCE]??y.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:et[ee.CREATED_UNTIL]??y.current.defaultFilterParams[ee.CREATED_UNTIL],sortDirection:"desc",balanceAccountId:(m==null?void 0:m.id)??"",minAmount:Z(et.minAmount)?void 0:parseFloat(et.minAmount),maxAmount:Z(et.maxAmount)?void 0:parseFloat(et.maxAmount)}}),[m==null?void 0:m.id,y,d]),R=Za(),N=A(()=>Q(e)?e:void 0,[e]),D=A(()=>n?tc:void 0,[n]),{canResetFilters:v,error:O,fetching:S,filters:M,limit:P,limitOptions:z,records:j,resetFilters:ie,updateFilters:q,updateLimit:ce,...Te}=sc({fetchRecords:E,dataField:"data",filterParams:y.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:N,preferredLimit:r,preferredLimitOptions:D,enabled:!!(m!=null&&m.id)&&!!d}),[me,_e]=x([]),[De,pe]=x(!1),ke=C((Je,et)=>{_e(Je),pe(et)},[]),{categoriesFilter:fe,currenciesFilter:Ue,statusesFilter:oe}=Wg({filters:M,updateFilters:q},me);$(()=>{_e(void 0),q({[ee.BALANCE_ACCOUNT]:m==null?void 0:m.id,[ee.CURRENCIES]:void 0})},[q,m==null?void 0:m.id]),$(()=>{g()},[M,g]),$(()=>{oe.updateSelection({target:{value:"Booked",name:"status"}})},[oe]);const ze=be(Oe.down.sm),Qe=!!me&&me.length>1,gt=A(()=>({showDetails:i??!0,callback:s}),[i,s]),Ge=A(()=>({transaction:gt}),[gt]),Ht=C(({records:Je,retrievedData:et})=>yc(Je,et,(ui,Cc)=>ui.id===Cc.id),[]),Be=A(()=>{var Je;return _c((Je=l==null?void 0:l.list)==null?void 0:Je.fields,Ya)},[(qs=l==null?void 0:l.list)==null?void 0:qs.fields]),{customRecords:An,loadingCustomRecords:Kn}=pc({records:j,hasCustomColumn:Be,onDataRetrieve:(Ks=l==null?void 0:l.list)==null?void 0:Ks.onDataRetrieve,mergeCustomData:Ht}),{updateDetails:Vn,resetDetails:li,selectedDetail:ae}=I0(Ge),Se=C(({id:Je})=>{Vn({selection:{type:"transaction",data:Je,balanceAccount:m||""},modalSize:"small"}).callback({id:Je})},[m,Vn]),Re=A(()=>{const Je=new Date(T);return Je.setMonth(Je.getMonth()-jg),Je.toString()},[T]);return a("div",{className:U0,children:[a(oi,{hideTitle:u,titleKey:"transactionsOverviewTitle",children:a(Xa,{...R})}),a(Qa,{...R,children:[a(ec,{activeBalanceAccount:m,balanceAccountSelectionOptions:f,onBalanceAccountSelection:_}),a(fc,{canResetFilters:v,defaultParams:y,filters:M,nowTimestamp:T,refreshNowTimestamp:g,sinceDate:Re,timezone:m==null?void 0:m.timeZone,updateFilters:q}),a(Ll,{...fe,placeholder:h.get("filterPlaceholder.category")}),a(Gg,{availableCurrencies:me,selectedCurrencies:Vr(M[ee.CURRENCIES]),name:"range",label:h.get("amount"),minAmount:M[ee.MIN_AMOUNT],maxAmount:M[ee.MAX_AMOUNT],updateFilters:q,onChange:q}),a(Ll,{...Ue,placeholder:h.get("filterPlaceholder.currency")})]}),a("div",{className:W0,children:[a("div",{className:Hl,children:a(Bg,{availableCurrencies:me,isAvailableCurrenciesFetching:De,balanceAccountId:m==null?void 0:m.id,statuses:oe.selection,categories:fe.selection,createdUntil:M[ee.CREATED_UNTIL],createdSince:M[ee.CREATED_SINCE],currencies:Ue.selection,minAmount:M[ee.MIN_AMOUNT]?parseFloat(M[ee.MIN_AMOUNT]):void 0,maxAmount:M[ee.MAX_AMOUNT]?parseFloat(M[ee.MAX_AMOUNT]):void 0,fullWidth:ze})}),a("div",{className:Hl,children:a(Ug,{balanceAccountId:m==null?void 0:m.id,onCurrenciesChange:ke,defaultCurrencyCode:m==null?void 0:m.defaultCurrencyCode,fullWidth:ze})})]}),a(D0,{dataCustomization:l==null?void 0:l.details,selectedDetail:ae,resetDetails:li,className:Yg,children:a(Z_,{activeBalanceAccount:m,availableCurrencies:me,error:O,hasMultipleCurrencies:Qe,limit:P,limitOptions:z,loading:S||o||!t||Kn,onContactSupport:c,onLimitSelection:ce,onRowClick:Se,showPagination:!0,transactions:(Vs=l==null?void 0:l.list)!=null&&Vs.onDataRetrieve?An:j,customColumns:(vc=l==null?void 0:l.list)==null?void 0:vc.fields,...Te})})]})},qg="adyen-pe-transactions-overview-container";function Kg({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=ei(e.balanceAccountId);return a(Va,{balanceAccountsError:s,className:qg,errorMessage:"weCouldNotLoadTheTransactionsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(zg,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class H0 extends zn{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(H0,"type","transactions");var On=(e=>(e.AU="AU",e.EU="EU",e.GB="GB",e.US="US",e.CA="CA",e))(On||{});const Vg=["AU","GB","US","CA"],Zg=["EU"],G0=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)??""},Xg=e=>{switch(e){case On.EU:return"capital.legalSubtitleEU";default:return null}},Qg=e=>{switch(e){case On.AU:return"capital.legalSubtitleAU";case On.GB:return"capital.legalSubtitleGB";case On.US:return"capital.legalSubtitleUS";case On.CA:return"capital.legalSubtitleCA";default:return null}},Jg=e=>{const t=G0(e),n=e==null?void 0:e.countryCode;return Qg(n)??Xg(t)},Ec=e=>{const t=G0(e),n=(e==null?void 0:e.countryCode)??"";return Vg.includes(n)||Zg.includes(t)},Gt={contactSupportForHelp:"contactSupportForHelp",couldNotLoadOffers:"capital.weCouldNotLoadFinancialOffers",tryRefreshingThePage:"tryRefreshingThePageOrComeBackLater",somethingWentWrong:"somethingWentWrong"},Ci={title:Gt.somethingWentWrong,message:[Gt.couldNotLoadOffers,Gt.tryRefreshingThePage],refreshComponent:!0},Y0=(e,t)=>{if(!e)return Ci;const n=Ed(e,t);if(n)return n;const r=t?"theErrorCodeIs":"contactSupportForHelpAndShareErrorCode";switch(e.errorCode){case void 0:return{...Ci,...t?{onContactSupport:t}:{}};case"30_016":return{title:Gt.somethingWentWrong,message:[Gt.couldNotLoadOffers,r],translationValues:{[r]:e.requestId?a($n,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_011":return{title:"capital.accountIsInactive",message:[Gt.couldNotLoadOffers,r],translationValues:{[r]:e.requestId?a($n,{textToCopy:e.requestId}):null},onContactSupport:t};case"30_600":return{title:Gt.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",r],translationValues:{[r]:e.requestId?a($n,{textToCopy:e.requestId}):null},onContactSupport:t};case"EMPTY_CONFIG":return{title:Gt.somethingWentWrong,message:["capital.weCouldNotContinueWithTheOffer",Gt.contactSupportForHelp]};case"UNSUPPORTED_REGION":return{title:"capital.unsupportedRegionTitle",message:"capital.unsupportedRegionDescription"};default:return{...Ci,refreshComponent:!0}}},ai=({emptyGrantOffer:e,error:t,onContactSupport:n,onBack:r,unsupportedRegion:s})=>{const{i18n:i}=W(),o=C(()=>a(K,{children:r&&a(he,{variant:se.SECONDARY,onClick:r,children:i.get("back")})}),[i,r]),c=A(()=>s?new ki(_o.ERROR,"UnsupportedRegion","Unsupported Region Configuration","UNSUPPORTED_REGION"):e?new ki(_o.ERROR,"EmptyConfig","Empty Configuration","EMPTY_CONFIG"):t,[e,s,t]);return a(en,{absolutePosition:!1,withImage:!0,onContactSupport:n,renderSecondaryButton:o,outlined:!1,...Y0(c,n)})},Gl={base:"adyen-pe-capital-offer",errorContainer:"adyen-pe-capital-offer__error-container"},Hn=e=>{var r;const t=(r=Ce().extraConfig)==null?void 0:r.legalEntity,n=A(()=>{const s=Jg(t);return s?{subtitleKey:s}:{}},[t]);return a(oi,{...e,...n,subtitleConfig:{variant:I.CAPTION,classNames:"adyen-pe-capital-header__subtitle"}})},ci=({className:e,el:t="div",children:n})=>a(t,{className:F("adyen-pe-info-box",e),children:n}),eT=(e,t=0)=>new Date(new Date(e).setUTCHours(0,0,0,0)+Math.floor(t)*ps),j0=e=>nu(eT(new Date,e)),tT=e=>e?Math.ceil(e/30):null,nT=(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},Io=e=>e/100;function rT(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(St(0,o,100).toFixed(2))}function sT(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 oT=({min:e=0,max:t=100,step:n=1,value:r=e,onChange:s,className:i,...o})=>{const c=A(()=>rT(r,e,t,n),[r,e,t,n]);return a("input",{type:"range",className:F("adyen-pe-slider",i),min:e,max:t,step:n,value:r,onChange:s,style:{backgroundSize:`${c}% 100%`},...o})},iT=({dynamicOffersConfig:e,value:t=e.minAmount.value,onValueChange:n,onRelease:r,className:s})=>{const i=Mr(),{i18n:o}=W(),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:F("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(oT,{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})})]})]})]})},Do=30,aT=()=>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))}),cT=({data:e})=>{const{i18n:t}=W(),n=A(()=>{const r=e.expectedRepaymentPeriodDays&&j0(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:Do,date:n}})}),a(mn,{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:Io(e.repaymentRate)}})}`},{key:"capital.expectedRepaymentPeriod",value:t.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})}]})]})},lT=({dynamicOffersConfig:e,dynamicOffersConfigError:t,emptyGrantOffer:n,onContactSupport:r,onOfferDismiss:s,onOfferSelect:i,requestedAmount:o})=>{const{i18n:c}=W(),u=A(()=>{if(e)return sT(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:m,getDynamicGrantOffer:f}=Ce().endpoints,_=No({queryFn:f,options:{retry:1,shouldRetry:C(S=>S.status===500,[]),onSettled:C(()=>{R(!1)},[])}}),y=No({queryFn:m,options:{onSuccess:S=>i(S)}}),T=C(()=>{var S,M;y.mutate({body:{amount:((S=_.data)==null?void 0:S.grantAmount.value)||l,currency:((M=_.data)==null?void 0:M.grantAmount.currency)||d},contentType:"application/json"})},[d,_.data,l,y]),g=C(S=>_.mutate({},{query:{amount:S,currency:d}}),[d,_]),[E,R]=x(!1),N=nT(g,300),D=C(S=>{N.cancel(),R(!0),h(S)},[N]),v=S=>N(S);$(()=>{e&&!_.data&&!l&&(h(S=>S||(o?Number(o):u||e.minAmount.value)),g(l||u||e.minAmount.value))},[e,_.data,g,u,o,l]);const O=A(()=>y.isLoading||_.isLoading||E,[_.isLoading,E,y.isLoading]);return a("div",{className:"adyen-pe-capital-offer-selection",children:y.error||_.error||n||t?a(ai,{error:y.error||_.error||t,onBack:s,onContactSupport:r,emptyGrantOffer:n}):a(K,{children:[e&&a(iT,{value:l,dynamicOffersConfig:e,onValueChange:D,onRelease:v}),a(ci,{className:"adyen-pe-capital-offer-selection__details",children:!_.data||_.isLoading||E?a(aT,{}):_.data?a(cT,{data:_.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:O?"loading":void 0,onClick:T,disabled:y.isLoading||!(e!=null&&e.minAmount),children:c.get(O?"loading":"capital.reviewOffer")})]})]})})},uT=(e,t)=>{const{variant:n=se.PRIMARY,disabled:r=!1,onClick:s,classNameModifiers:i=[],className:o}=e,c=A(()=>xn("",o)||"",[o]),u=A(()=>Zo(r),[r]),{click:l,allChildren:h,allProps:d}=Xo(c,[...i,n],`${lt} ${tm}`,u,e,s),m=A(()=>({...d,...e.onClick&&l?{onClick:l}:{}}),[l,d,e.onClick]);return a("a",{...m,href:e.href,ref:t,children:h})},dT=Xe(uT),Yl=e=>Q(e)?e:()=>e,ia=({count:e,defaultFill:t,fills:n,translationKey:r})=>{const{i18n:s}=W(),i=A(()=>{const o=Yl(t);return n!==void 0?(...c)=>{const[u,l]=c;for(const h of[u,l]){const d=Yl(n[h])(...c);if(d!=null)return d}return o(...c)}:o},[n,t]);return A(()=>{const o=[],c=Mr("translation"),u=(...d)=>(o.push(i(...d)??null),c),[l,...h]=s.get(r,{count:e,values:u}).split(c);return a(K,{children:[l,h.map((d,m)=>a(K,{children:[o[m],d]},`${c}__${m}`))]})},[s,e,i,r])},jl="capital-support@adyen.com",hT=()=>{var t,n,r;return((r=(n=(t=Ce())==null?void 0:t.extraConfig)==null?void 0:n.legalEntity)==null?void 0:r.countryCode)===On.US?a(so,{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(dT,{href:`mailto:${jl}`,variant:se.TERTIARY,className:"adyen-pe-capital-offer-summary__info--email",children:jl}),break:a(K,{children:[a("br",{}),a("br",{})]})}})})]}):null},fT=["30_013"],mT=({grantOffer:e,onBack:t,onFundsRequest:n,onContactSupport:r})=>{const{i18n:s}=W(),i=A(()=>{const f=j0(e.expectedRepaymentPeriodDays);return f?s.date(f,{month:"long"}):null},[e,s]),{requestFunds:o}=Ce().endpoints,c=No({queryFn:o,options:{onSuccess:f=>n==null?void 0:n(f)}}),u=C(f=>{c.mutate(U,{path:{grantOfferId:f}})},[c]),l=C(()=>{e.id&&u(e.id)},[e.id,u]),h=A(()=>tT(e.maximumRepaymentPeriodDays),[e.maximumRepaymentPeriodDays]),d=A(()=>{const f=c.error?c.error:null;if(f&&fT.includes(f.errorCode))switch(f.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]),m=A(()=>{const f=[{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:Io(e.repaymentRate)}})},{key:"capital.expectedRepaymentPeriod",value:s.get("capital.xDays",{values:{days:e.expectedRepaymentPeriodDays}})},{key:"account",value:s.get("capital.primaryAccount")}];return h&&f.splice(4,0,{key:"capital.maximumRepaymentPeriod",value:h===1?s.get("capital.oneMonth"):s.get("capital.xMonths",{values:{months:h}})}),e.aprBasisPoints&&f.splice(1,0,{key:"capital.annualPercentageRate",value:s.get("capital.xPercent",{values:{percentage:Io(e.aprBasisPoints)}})}),f},[e,s,h]);return!d&&c.error?a(ai,{error:c.error,onBack:t,onContactSupport:r}):a("div",{className:"adyen-pe-capital-offer-summary",children:[a(ci,{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:Do,date:i??""}})})]}),a(mn,{classNames:"adyen-pe-capital-offer-summary__details",renderLabel:(f,_)=>_==="capital.repaymentThreshold"?a(nn,{isContainerHovered:!0,content:s.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:Do}}),children:a("span",{children:a(k,{className:"adyen-pe-capital-offer-summary__list-label",el:ne.SPAN,variant:I.CAPTION,children:f})})}):_==="capital.annualPercentageRate"?a(nn,{isContainerHovered:!0,content:s.get("capital.annualPercentageRateIsTheCostOfBorrowingForALoan"),children:a("span",{children:a(k,{className:"adyen-pe-capital-offer-summary__list-label",el:ne.SPAN,variant:I.CAPTION,children:f})})}):a(k,{className:"adyen-pe-capital-offer-summary__list-label",el:ne.SPAN,variant:I.CAPTION,children:f}),renderValue:(f,_)=>{const y=_==="account"&&c.error&&d&&d.errorCode==="30_013";return a(k,{className:F({"adyen-pe-capital-offer-summary__details--error":y}),el:ne.SPAN,variant:I.CAPTION,stronger:!0,children:[y?a(Ze,{name:"warning-filled","data-testid":"primary-account-warning-icon"}):null,f]})},items:m}),d&&a(_n,{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(hT,{}),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")})]})]})},Nc=({externalDynamicOffersConfig:e,hideTitle:t,onContactSupport:n,onFundsRequest:r,onOfferDismiss:s,onOfferSelect:i})=>{var D,v;const{getDynamicGrantOffersConfiguration:o}=Ce().endpoints,c=(v=(D=Ce())==null?void 0:D.extraConfig)==null?void 0:v.legalEntity,u=A(()=>Ec(c),[c]),[l,h]=x(!1),d=C(O=>{h(!O)},[]),{data:m,error:f}=Rt({fetchOptions:{enabled:!e&&!!o&&u,onSuccess:d},queryFn:C(async()=>o==null?void 0:o(U),[o])}),_=e||m,[y,T]=x(),[g,E]=x(),R=C(O=>{i?i(O):(E(O==null?void 0:O.grantAmount.value),T(O))},[i]),N=A(()=>y?"OfferSummary":"OfferSelection",[y]);return u?a("div",{className:Gl.base,children:[a(Hn,{hasDivider:!0,hideTitle:t,titleKey:N==="OfferSummary"?"capital.businessFinancingSummary":"capital.businessFinancingOffer"}),N==="OfferSelection"&&a(lT,{requestedAmount:g,dynamicOffersConfig:_,dynamicOffersConfigError:f,onOfferDismiss:s,onOfferSelect:R,emptyGrantOffer:l,onContactSupport:n}),N==="OfferSummary"&&a(mT,{grantOffer:y,onBack:()=>T(void 0),onFundsRequest:r,onContactSupport:n})]}):a("div",{className:Gl.errorContainer,children:[a(Hn,{hideTitle:t,titleKey:"capital.businessFinancing"}),a(ai,{unsupportedRegion:!0})]})};class z0 extends zn{constructor(n){super(n);B(this,"componentToRender",()=>a(Nc,{...this.props}));this.componentToRender=this.componentToRender.bind(this),this.customClassNames="adyen-pe-capital-offer-component"}}B(z0,"type","capitalOffer");const pT=(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 $(()=>()=>{cancelAnimationFrame(s.current),clearTimeout(i.current),s.current=i.current=null},[e]),{freeze:o,frozen:n}},zl=({...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"})]}),_T=(e,t,n)=>{const r=Ce().endpoints[e];return Rt({fetchOptions:{enabled:!!r&&n,keepPrevData:!0},queryFn:async()=>r(U,{...t})})};function yT({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 gT({className:e,disabled:t,endpointName:n,params:r,setError:s,errorDisplay:i,onDownloadRequested:o}){const{i18n:c}=W(),[u,l]=x(!1),h=be(Oe.down.xs),{data:d,error:m,isFetching:f}=_T(n,r,u);$(()=>{u&&l(!1)},[u]),$(()=>{d&&yT(d)},[d]),$(()=>{s&&m&&s(m)},[m,s]);const _=()=>{l(!0),o==null||o()};return a("div",{className:"adyen-pe-download",children:[h?a(he,{iconButton:!0,variant:se.TERTIARY,onClick:_,children:f?a(Ui,{size:"small"}):a(zl,{})}):a(he,{className:F("adyen-pe-download__button",{"adyen-pe-download__button--loading":f},e),disabled:t||f,variant:se.SECONDARY,onClick:_,iconLeft:f?a(Ui,{size:"small"}):a(zl,{}),children:f?`${c.get("downloading")}..`:c.get("download")}),m&&i&&a("div",{className:"adyen-pe-download__error",children:i})]})}const TT=({...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"})]}),AT=1e3,q0="adyen-pe-reports-table",K0=`${q0}-date-report-type`,ET=`${K0}--date`,V0=["createdAt","dateAndReportType","reportType","reportFile"],NT=({error:e,loading:t,balanceAccountId:n,onContactSupport:r,showPagination:s,data:i,customColumns:o,...c})=>{const{i18n:u}=W(),{dateFormat:l}=sn("UTC"),{freeze:h,frozen:d}=pT(AT),[m,f]=x(null),{refreshing:_}=Ce(),y=A(()=>t||_,[t,_]),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])}),R=C(()=>{f(null)},[]),N={title:"noReportsFound",message:["tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain"]},D=A(()=>()=>a(Wa,{error:e,errorMessage:"weCouldNotLoadYourReports",onContactSupport:r}),[e,r]),v=A(()=>a(TT,{}),[]),O=A(()=>S=>{const M={};switch(S==null?void 0:S.errorCode){case"999_429_001":M.title=u.get("error.somethingWentWrongWithDownload"),M.description=u.get("reportsError.tooManyDownloads");break;case"00_500":default:M.title=u.get("error.somethingWentWrongWithDownload"),M.description=u.get("error.pleaseTryAgainLater");break}f(M)},[u]);return t&&f(null),a("div",{className:q0,children:[m&&a(_n,{onClose:R,type:Fe.WARNING,className:"adyen-pe-reports-table-alert",...m}),a(Tn,{errorDisplay:D,error:e,columns:E,data:i,loading:y,outline:!1,emptyTableMessage:N,customCells:{createdAt:({value:S})=>S?S&&a(k,{variant:I.BODY,children:l(S,tl)}):null,dateAndReportType:({item:S})=>a("div",{className:K0,children:[a(k,{variant:I.BODY,stronger:!0,children:u.get(`reportType.${S==null?void 0:S.type}`)}),a(k,{className:ET,variant:I.BODY,children:l(S.createdAt,tl)})]}),reportType:({item:S})=>(S==null?void 0:S.type)&&a(k,{variant:I.BODY,children:u.get(`reportType.${S==null?void 0:S.type}`)}),reportFile:({item:S})=>{const M={query:{balanceAccountId:n,createdAt:S.createdAt,type:S.type}};return a(gT,{className:"adyen-pe-reports-table--download",endpointName:"downloadReport",disabled:d,params:M,onDownloadRequested:h,setError:O,errorDisplay:v})}},children:s&&a(Tn.Footer,{children:a(Ha,{...c})})})]})},vT="adyen-pe-reports-overview",CT=new Date("2024-04-16T00:00:00.000Z").toString(),ST=({onFiltersChanged:e,balanceAccounts:t,allowLimitSelection:n,preferredLimit:r=ms,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:m,nowTimestamp:f,refreshNowTimestamp:_}=mc("reports",l),y=C(async(fe,Ue)=>u({signal:Ue,errorLevel:"error"},{query:{...fe,type:"payout",createdSince:fe[ee.CREATED_SINCE]??m.current.defaultFilterParams[ee.CREATED_SINCE],createdUntil:fe[ee.CREATED_UNTIL]??m.current.defaultFilterParams[ee.CREATED_UNTIL],balanceAccountId:(l==null?void 0:l.id)??""}}),[l==null?void 0:l.id,m,u]),T=Za(),g=A(()=>Q(e)?e:void 0,[e]),E=A(()=>n?tc:void 0,[n]),{canResetFilters:R,error:N,fetching:D,filters:v,limit:O,limitOptions:S,records:M,resetFilters:P,updateFilters:z,updateLimit:j,...ie}=sc({fetchRecords:y,dataField:"data",filterParams:m.current.defaultFilterParams,initialFiltersSameAsDefault:!0,onFiltersChanged:g,preferredLimit:r,preferredLimitOptions:E,enabled:!!(l!=null&&l.id)&&!!u}),q=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:M,hasCustomColumn:ce,onDataRetrieve:(De=c==null?void 0:c.list)==null?void 0:De.onDataRetrieve,mergeCustomData:q});return $(()=>{_()},[v,_]),a("div",{className:vT,children:[a(oi,{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:R,defaultParams:m,filters:v,nowTimestamp:f,refreshNowTimestamp:_,sinceDate:CT,timezone:"UTC",updateFilters:z})]}),a(NT,{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:M,showPagination:!0,limit:O,limitOptions:S,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 OT({...e}){const{balanceAccounts:t,isBalanceAccountIdWrong:n,isFetching:r,error:s}=ei(e.balanceAccountId);return a(Va,{balanceAccountsError:s,className:RT,errorMessage:"weCouldNotLoadTheReportsOverview",isBalanceAccountIdWrong:n,onContactSupport:e.onContactSupport,children:a(ST,{...e,balanceAccounts:t,isLoadingBalanceAccount:r})})}class Z0 extends zn{constructor(n){super(n);B(this,"componentToRender",()=>a(OT,{...this.props,balanceAccountId:this.props.balanceAccountId,ref:n=>{this.componentRef=n}}));this.componentToRender=this.componentToRender.bind(this)}}B(Z0,"type","reports");const ln={base:"adyen-pe-capital-overview",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"},bT="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",IT=({hideTitle:e})=>{const{i18n:t}=W();return a(K,{children:[a(Hn,{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:bT,alt:""})}),a(k,{el:ne.PARAGRAPH,variant:I.BODY,large:!0,children:t.get("capital.youWillSoonQualifyForAFinancialOffer")})]})]})},DT=({dynamicOfferConfig:e,hideTitle:t,onOfferOptionsRequest:n})=>{const{i18n:r}=W();return a(K,{children:[a(Hn,{hideTitle:t,titleKey:"capital.needSomeExtraMoney"}),a("div",{className:ln.preQualifiedGrant,children:[a(ci,{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:ln.preQualifiedGrantButton,onClick:n,children:r.get("capital.seeOptions")})]})]})},kT=({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(K,{children:o==="intro"?a(DT,{hideTitle:e,dynamicOfferConfig:t,onOfferOptionsRequest:u}):a(Nc,{onFundsRequest:s,onOfferDismiss:l?h:void 0,externalDynamicOffersConfig:t})})},LT=({max:e=1,value:t,labels:n,tooltips:r,className:s})=>{const i=A(()=>St(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:F("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(ql,{tooltipContent:r==null?void 0:r.progress,title:n==null?void 0:n.current,percentage:i,className:"adyen-pe-progress-bar__track-fill"}),a(ql,{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})]})]})},ql=({tooltipContent:e,title:t,percentage:n,className:r})=>{const s=i=>a("div",{className:r,title:i,style:{width:`${n}%`}});return e?a(nn,{content:e,children:s()}):s(t)},Tt={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"},wT=e=>e==="Active",PT=e=>e==="Repaid",MT=e=>e==="Active"?"capital.remaining":"capital.requestedFunds",FT=e=>e.status==="Active"?e.remainingTotalAmount:e.grantAmount,xT=({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"}},BT=({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}},$T=e=>{const t=new Date,n=new Date;return n.setDate(t.getDate()+e),n},UT=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}},X0=e=>{var r;const t=e.status==="Active",n=e.status==="Pending";return{amount:FT(e),amountLabelKey:MT(e.status),hasAlerts:n,hasDetails:wT(e.status),hasUnscheduledRepaymentDetails:t&&!!((r=e.unscheduledRepaymentAccounts)!=null&&r.length),isAmountColorSecondary:!t,isBackgroundFilled:PT(e.status),isGrantIdVisible:!t,isLabelColorSecondary:t,isProgressBarVisible:t,repaymentPeriodEndDate:$T(e.repaymentPeriodLeft),statusKey:xT(e),statusTagVariant:BT(e),statusTooltipKey:UT(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"},WT=({grant:e})=>{const{i18n:t}=W(),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:Io(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(mn,{renderLabel:(s,i)=>i==="capital.repaymentThreshold"?a(nn,{isContainerHovered:!0,content:t.get("capital.minimumRepaymentToRepayTheFinancingOnTime",{values:{days:Do}}),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})]})})},Kl={button:"adyen-pe-grant-action__button"},HT=()=>{var e;return((e=window.top)==null?void 0:e.location.href)||window.location.href},GT=e=>{window.top?window.top.location.href=e:window.location.href=e},YT=({action:e,className:t,offerExpiresAt:n})=>{const{i18n:r,updateCore:s}=W(),{dateFormat:i}=sn(),{signToSActionDetails:o}=Ce().endpoints,[c,u]=x(!1),l=C(async()=>{if(e.type==="signToS")return o==null?void 0:o(U,{query:{redirectUrl:HT(),locale:r.locale}})},[e,r.locale,o]),{data:h,isFetching:d,error:m}=Rt({fetchOptions:A(()=>({enabled:!!o&&c}),[o,c]),queryFn:l});return $(()=>{const f=h==null?void 0:h.url;f&>(f)},[h,c]),m?a(_n,{className:t,type:Fe.CRITICAL,title:r.get("somethingWentWrongTryRefreshingOrComeBackLater"),description:a(he,{className:Kl.button,onClick:s,children:r.get("refresh")})}):a(_n,{className:t,type:Fe.WARNING,title:`${r.get("capital.signTermsAndConditionsToReceiveFunds")}${n?` ${r.get("capital.thisOfferExpiresOn",{values:{date:i(n,cd)}})}`:""}`,description:a(he,{className:Kl.button,onClick:()=>u(!0),disabled:d,state:d?"loading":void 0,children:r.get("capital.goToTermsAndConditions")})})},jT=({grant:e,showDetails:t})=>{const{i18n:n}=W(),{dateFormat:r}=sn(),s=A(()=>X0(e),[e]),i=C(()=>t==null?void 0:t("unscheduledRepayment"),[t]),o=A(()=>{var c,u;return a("div",{className:Tt.cardContent,children:[a("div",{className:Tt.statusContainer,children:[a(k,{variant:I.CAPTION,className:F({[Tt.textSecondary]:s.isLabelColorSecondary}),testId:"grant-amount-label",children:n.get(s.amountLabelKey)}),a("div",{children:e.status==="Active"?a(K,{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,cd)})]}):s.statusKey?s.statusTooltipKey?a(nn,{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:F({[Tt.textSecondary]:s.isAmountColorSecondary}),children:n.amount(s.amount.value,s.amount.currency)}),s.isProgressBarVisible&&a(LT,{className:Tt.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:Tt.grantID,children:a($n,{textToCopy:e.id,buttonLabel:n.get("capital.grantID"),isHovered:!0,type:"Text","data-testid":"grant-id-copy-text"})}):null,s.hasAlerts?a(K,{children:e.missingActions&&e.missingActions.length?e.missingActions.map(l=>a(YT,{action:l,className:Tt.alert,offerExpiresAt:e.offerExpiresAt},l.type)):a(_n,{className:Tt.alert,type:Fe.HIGHLIGHT,title:n.get("capital.weReceivedYourRequestAndWeAreWorkingOnItNowCheckBackSoon")})}):s.hasUnscheduledRepaymentDetails&&a("div",{className:Tt.actionsBar,children:a(he,{onClick:i,className:Tt.mainActionBtn,variant:se.SECONDARY,fullWidth:!0,children:n.get("capital.sendRepayment")})})]})},[n,r,e,s,i]);return a("div",{className:Tt.base,children:a(gc,{renderHeader:o,filled:s.isBackgroundFilled,inFlow:!0,children:s.hasDetails&&a(WT,{grant:e})})})},zT={unscheduledRepayment:"unscheduledRepayment"},qT=({className:e,content:t,contentClassName:n,textToCopy:r,label:s,labelClassName:i})=>{const{i18n:o}=W();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($n,{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}},ZT=(e,t)=>VT(e)?t:void 0,XT=(e,t)=>{switch(e){case"iban":return t&&KT(t);default:return t}},QT=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}},mo="adyen-pe-capital-account-details",Si={detail:`${mo}__detail`,detailContent:`${mo}__detail-content`,detailLabel:`${mo}__detail-label`},JT=({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:F(mo,t),children:n.map(r=>{const s=e[r];return s?a(K,{children:a(qT,{className:Si.detail,contentClassName:Si.detailContent,labelClassName:Si.detailLabel,label:QT(r),content:XT(r,s),textToCopy:ZT(r,s)})},r):null})})},eA=({children:e,className:t,headerTitleKey:n,headerSubtitleKey:r,onDetailsClose:s})=>{const{i18n:i}=W();return a("div",{className:F("adyen-pe-grant-adjustment-details",t),children:[a(oi,{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]})},ns="adyen-pe-grant-repayment-details",no={balanceInfo:`${ns}__balance-info`,repaymentInfo:`${ns}__repayment-info`,repaymentAccount:`${ns}__repayment-account`,repaymentNotice:`${ns}__repayment-notice`},tA=({grant:e,onDetailsClose:t})=>{const{i18n:n}=W(),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(eA,{className:ns,onDetailsClose:t,headerTitleKey:"capital.sendRepayment",headerSubtitleKey:"capital.sendRepaymentSubtitle",children:[a("div",{className:no.repaymentInfo,children:[a("section",{className:no.repaymentAccount,children:[a(k,{el:ne.SPAN,variant:I.BODY,stronger:!0,children:n.get("capital.bankAccountDetails")}),a(JT,{bankAccount:r})]}),a("section",{className:no.repaymentNotice,children:a(k,{el:ne.PARAGRAPH,variant:I.CAPTION,children:n.get("capital.sendRepaymentNotice")})})]}),a(ci,{className:no.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},nA=(e,t)=>{if(!t)return 0;const n=e.findIndex(r=>r.id===t);return n===-1?0:n},rA=(e,t)=>{const[n,r]=x(!1),[s,i]=x(nA(e,t)),o=Y([]),c=Y(Mr().replace(/.*?(?=\d+$)/,"")).current,u=e.length,l=A(()=>{const f=[];for(let _=0;_<u;_++)f[_]=y=>o.current[_]=y;return f},[u]),h=C((f,_)=>{var T;let y=f;do if(y<0&&(y+=u),y>=u&&(y%=u),((T=o.current[y])==null?void 0:T.disabled)===!1)break;while((y+=_)!==f);return y},[u]),d=C(f=>{var y;const _=o.current.findIndex(T=>T===f.currentTarget);((y=o.current[_])==null?void 0:y.disabled)===!1&&(f.preventDefault(),i(_))},[]),m=A(()=>{const f={[V.ARROW_LEFT]:()=>i(_=>h(_-1,-1)),[V.ARROW_RIGHT]:()=>i(_=>h(_+1,1)),[V.HOME]:()=>i(h(0,1)),[V.END]:()=>i(h(u-1,-1))};return _=>{var y;f[_.key]&&(_.preventDefault(),(y=f[_.key])==null||y.call(f),r(!0))}},[u]);return $(()=>{if(n){const f=o.current[s];(f==null?void 0:f.disabled)===!1&&(f==null||f.focus()),r(!1)}},[s,n]),{activeIndex:s,onClick:d,onKeyDown:m,refs:l,uniqueId:c}};function sA({defaultItem:e,items:t}){const{activeIndex:n,onClick:r,onKeyDown:s,refs:i,uniqueId:o}=rA(t,e),{i18n:c}=W();return a("div",{children:[a("div",{role:"radiogroup",className:"adyen-fp-segmented-control",children:t.map((u,l)=>{const h=n===l;return a("button",{role:"radio",name:u.id,ref:i[l],id:`item:${o}-${u.id}`,className:"adyen-fp-segmented-control__item","aria-checked":h,"aria-controls":`segment:${o}-${u.id}`,onClick:h?void 0:r,onKeyDown:s,disabled:u.disabled,tabIndex:h?0:-1,children:a(k,{el:ne.SPAN,variant:I.BODY,className:"adyen-fp-segmented-control__item-label",stronger:!0,children:c.get(u.label)})},`item:${o}-${u.id}`)})}),a("div",{className:"adyen-fp-segmented-content-container",children:t.map((u,l)=>a("section",{id:`segment:${o}-${u.id}`,className:"adyen-fp-segmented-content","aria-labelledby":`item:${o}-${u.id}`,hidden:n!==l,children:u.content},`segment:${o}-${u.id}`))})]})}const Ri=({grants:e,showDetails:t})=>a(Ac,{classNames:"adyen-pe-grant-list__items",children:e.map(n=>a("li",{children:a(jT,{grant:n,showDetails:t.bind(null,n)})},n.id))}),oA=({grantList:e,hideTitle:t,newOfferAvailable:n,onNewOfferRequest:r})=>{const[s,i]=x(),[o,c]=x(),{i18n:u}=W(),[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?"SegmentedGrants":"UnifiedGrants",[l.length,e.length,h.length]),m=A(()=>n&&!l.some(T=>T.status==="Pending"),[l,n]),f=A(()=>o&&X0(o),[o]),_=C(()=>i(void 0),[]),y=C((T,g)=>{i(g),c(T)},[]);if(o)switch(s){case zT.unscheduledRepayment:{if(f!=null&&f.hasUnscheduledRepaymentDetails)return a(tA,{grant:o,onDetailsClose:_});break}}return a("div",{className:"adyen-pe-grant-list",children:[a("div",{className:"adyen-pe-grant-list__header-container",children:[a(Hn,{hideTitle:t,titleKey:"capital.businessFinancing"}),m?a(he,{onClick:r,className:"adyen-pe-grant-list__offer-button",variant:se.SECONDARY,children:u.get("capital.seeNewOffer")}):null]}),d==="UnifiedGrants"&&a(Ri,{grants:e,showDetails:y}),d==="SegmentedGrants"&&a(sA,{items:[{label:"capital.inProgress",content:a(Ri,{grants:l,showDetails:y}),id:"active"},{label:"capital.closed",content:a(Ri,{grants:h,showDetails:y}),id:"inactive"}],defaultItem:"active"})]})},iA=({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(m=>{r?r(m):(s(m),c(!1))},[r,s]);return a(K,{children:o?a(Nc,{externalDynamicOffersConfig:e,onFundsRequest:d,onOfferDismiss:h}):a(oA,{grantList:t,newOfferAvailable:n,onNewOfferRequest:l})})},aA=({hideTitle:e,onContactSupport:t,onFundsRequest:n,onOfferDismiss:r,onOfferOptionsRequest:s,skipPreQualifiedIntro:i})=>{var N,D,v;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=Rt({fetchOptions:{enabled:!!u&&c},queryFn:C(async()=>u==null?void 0:u(U),[u])}),d=Rt({fetchOptions:{enabled:!!l&&c},queryFn:C(async()=>l==null?void 0:l(U),[l])}),m=d.data,[f,_]=x(),y=A(()=>{var O,S;return f?[f,...((O=h.data)==null?void 0:O.data)||[]]:(S=h.data)==null?void 0:S.data},[(v=h.data)==null?void 0:v.data,f]),T=C(O=>{n?n(O):_(O)},[n]),g=A(()=>!!(d.error&&h.error||d.error&&!(y!=null&&y.length)),[d.error,y==null?void 0:y.length,h.error]),E=A(()=>{if(c){if(g)return"Error";if(!u&&!l||!m&&!y||h.isFetching||d.isFetching)return"Loading";if(y!=null&&y.length)return"GrantList";if(m!=null&&m.maxAmount&&(m!=null&&m.minAmount))return"PreQualified"}else return"UnsupportedRegion";return"Unqualified"},[l,m,d.isFetching,y,u,h.isFetching,g,c]),R=A(()=>!!(m&&m.minAmount&&m.maxAmount),[m]);return a("div",{className:ln.base,children:(()=>{switch(E){case"Loading":return a("div",{className:ln.skeletonContainer,children:[a("div",{className:ln.headerSkeleton}),a("div",{className:ln.skeleton})]});case"Error":return a("div",{className:ln.errorContainer,children:[a(Hn,{hideTitle:e,titleKey:"capital.businessFinancing"}),a(en,{absolutePosition:!1,outlined:!1,withImage:!0,onContactSupport:t,...Y0(d.error,t)})]});case"GrantList":return y&&a(iA,{externalDynamicOffersConfig:m,grantList:y,hideTitle:e,newOfferAvailable:R,onFundsRequest:n,onGrantListUpdateRequest:_,onOfferDismiss:r});case"PreQualified":return a(kT,{onOfferDismiss:r,onOfferOptionsRequest:s,skipPreQualifiedIntro:i,hideTitle:e,dynamicOffer:m,onFundsRequest:T});case"Unqualified":return a(IT,{hideTitle:e});case"UnsupportedRegion":return a("div",{className:ln.errorContainer,children:[a(Hn,{hideTitle:e,titleKey:"capital.businessFinancing"}),a(ai,{unsupportedRegion:!0})]});default:return null}})()})};class Q0 extends zn{constructor(n){super(n);B(this,"componentToRender",()=>a(aA,{...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 Ju(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(U).catch(te),s==null?void 0:s(U).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(Q0,"type","capitalOverview");async function cA(e){return await new ma(e).initialize()}exports.AdyenPlatformExperience=cA;exports.CapitalOfferElement=z0;exports.CapitalOverviewElement=Q0;exports.Core=ma;exports.PayoutElement=Wd;exports.PayoutsElement=k0;exports.ReportsElement=Z0;exports.TransactionElement=L0;exports.TransactionsElement=H0;exports.all_locales=ua;exports.da_DK=fu;exports.de_DE=mu;exports.en_US=yo;exports.es_ES=pu;exports.fi_FI=_u;exports.fr_FR=yu;exports.it_IT=gu;exports.nl_NL=Tu;exports.no_NO=Au;exports.pt_BR=Eu;exports.sv_SE=Nu;exports.u=a;
|
|
12
|
+
//# sourceMappingURL=index-DbNUA_xB.cjs.map
|