Uname:Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.152
Web Server : Apache
System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/plugins/woocommerce-payments/dist/chunks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/woocommerce-payments/dist/chunks/wcpay-reports.js.map
{"version":3,"file":"chunks/wcpay-reports.js?ver=ab7b3b3d0d42a985dda4","mappings":"sJAEA,SACCA,iBAAkB,mBAClBC,2BAA4B,6BAC5BC,yBAA0B,2BAC1BC,mCAAoC,qCACpCC,4BAA6B,8BAC7BC,sCACC,wC,sPCFK,SAASC,EAAmBC,EAAOC,GACzC,MAAO,CACNC,KAAMC,EAAAA,EAAMV,iBACZO,QACAC,OAEF,CAEO,SAASG,EAA2BJ,EAAOK,GACjD,MAAO,CACNH,KAAMC,EAAAA,EAAMT,2BACZM,QACAK,QAEF,CAEO,SAASC,EAA0BN,EAAOC,GAChD,MAAO,CACNC,KAAMC,EAAAA,EAAMR,yBACZK,QACAC,OAEF,CAEO,SAASM,EAAkCP,EAAOK,GACxD,MAAO,CACNH,KAAMC,EAAAA,EAAMP,mCACZI,QACAK,QAEF,CAEO,SAASG,EAA6BR,EAAOC,GACnD,MAAO,CACNC,KAAMC,EAAAA,EAAMN,4BACZG,QACAC,OAEF,CAEO,SA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ports/action-types.js","webpack://woocommerce-payments/./client/data/reports/actions.js","webpack://woocommerce-payments/./client/data/reports/hooks.ts","webpack://woocommerce-payments/./client/data/reports/reducer.js","webpack://woocommerce-payments/./client/data/reports/resolvers.js","webpack://woocommerce-payments/./client/data/reports/selectors.js","webpack://woocommerce-payments/./client/data/reports/store.js","webpack://woocommerce-payments/./client/data/store-names.js","webpack://woocommerce-payments/./client/hooks/use-report-export.ts","webpack://woocommerce-payments/./client/reports/balance/context.ts","webpack://woocommerce-payments/./client/reports/date-filter/url.ts","webpack://woocommerce-payments/./client/reports/fees/date-filter-values.ts","webpack://woocommerce-payments/./client/reports/fees-export-button.tsx","webpack://woocommerce-payments/./client/reports/lazy-balance-actions.jsx","webpack://woocommerce-payments/./client/reports/header.tsx","webpack://woocommerce-payments/./client/reports/loading-report-state.jsx","webpack://woocommerce-payments/./client/reports/lazy-balance-report.jsx","webpack://woocommerce-payments/./client/reports/lazy-fees-report.jsx","webpack://woocommerce-payments/./client/reports/tabs.tsx","webpack://woocommerce-payments/./client/reports/index.tsx","webpack://woocommerce-payments/./client/reports/hooks.ts","webpack://woocommerce-payments/./client/reports/period-selector.tsx","webpack://woocommerce-payments/./client/utils/data.js"],"sourcesContent":["/** @format */\n\nexport default {\n\tSET_REPORTS_FEES: 'SET_REPORTS_FEES',\n\tSET_ERROR_FOR_REPORTS_FEES: 'SET_ERROR_FOR_REPORTS_FEES',\n\tSET_REPORTS_FEES_SUMMARY: 'SET_REPORTS_FEES_SUMMARY',\n\tSET_ERROR_FOR_REPORTS_FEES_SUMMARY: 'SET_ERROR_FOR_REPORTS_FEES_SUMMARY',\n\tSET_REPORTS_BALANCE_SUMMARY: 'SET_REPORTS_BALANCE_SUMMARY',\n\tSET_ERROR_FOR_REPORTS_BALANCE_SUMMARY:\n\t\t'SET_ERROR_FOR_REPORTS_BALANCE_SUMMARY',\n};\n","/** @format */\n\n/**\n * Internal Dependencies\n */\nimport TYPES from './action-types';\n\nexport function updateReportsFees( query, data ) {\n\treturn {\n\t\ttype: TYPES.SET_REPORTS_FEES,\n\t\tquery,\n\t\tdata,\n\t};\n}\n\nexport function updateErrorForReportsFees( query, error ) {\n\treturn {\n\t\ttype: TYPES.SET_ERROR_FOR_REPORTS_FEES,\n\t\tquery,\n\t\terror,\n\t};\n}\n\nexport function updateReportsFeesSummary( query, data ) {\n\treturn {\n\t\ttype: TYPES.SET_REPORTS_FEES_SUMMARY,\n\t\tquery,\n\t\tdata,\n\t};\n}\n\nexport function updateErrorForReportsFeesSummary( query, error ) {\n\treturn {\n\t\ttype: TYPES.SET_ERROR_FOR_REPORTS_FEES_SUMMARY,\n\t\tquery,\n\t\terror,\n\t};\n}\n\nexport function updateReportsBalanceSummary( query, data ) {\n\treturn {\n\t\ttype: TYPES.SET_REPORTS_BALANCE_SUMMARY,\n\t\tquery,\n\t\tdata,\n\t};\n}\n\nexport function updateErrorForReportsBalanceSummary( query, error ) {\n\treturn {\n\t\ttype: TYPES.SET_ERROR_FOR_REPORTS_BALANCE_SUMMARY,\n\t\tquery,\n\t\terror,\n\t};\n}\n","/** @format */\n/* eslint-disable react-hooks/exhaustive-deps -- useSelect dep arrays intentionally use JSON.stringify for object comparison */\n\n/**\n * External dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport moment from 'moment';\nimport type { Query } from '@woocommerce/navigation';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './store';\nimport type { ReportsPeriodRange } from 'wcpay/reports/period-selector';\n\nexport type ReportsFeeType =\n\t| 'charge'\n\t| 'payment'\n\t| 'payment_failure_refund'\n\t| 'payment_refund'\n\t| 'refund'\n\t| 'refund_failure'\n\t| 'dispute'\n\t| 'dispute_reversal'\n\t| 'fee_refund'\n\t| 'network_costs';\n\nexport interface ReportsFee {\n\ttransaction_id: string;\n\tdate: string;\n\tpayment_id?: string;\n\tchannel?: string;\n\tpayment_method?: {\n\t\ttype?: string;\n\t};\n\ttype: ReportsFeeType;\n\ttransaction_currency: string;\n\tamount: number;\n\texchange_rate?: number;\n\tdeposit_currency: string;\n\tfees: number;\n\tnet_amount?: number;\n\torder_id?: number | string | null;\n\trisk_level?: number;\n\tdeposit_date?: string | null;\n\tdeposit_id?: string | null;\n\tdeposit_status?: string | null;\n}\n\ninterface ReportsFees {\n\tfeesRows: ReportsFee[];\n\tfeesError?: Record< string, unknown >;\n\tisLoading: boolean;\n}\n\ninterface ReportsFeesSummary {\n\tfeesSummary: {\n\t\tcount?: number;\n\t\ttotal?: number;\n\t\tfees?: number;\n\t\tnet?: number;\n\t\tcurrency?: string;\n\t\tstore_currencies?: string[];\n\t\tcustomer_currencies?: string[];\n\t\tsources?: string[];\n\t\ttypes?: ReportsFeeType[];\n\t};\n\tfeesSummaryError?: Record< string, unknown >;\n\tisLoading: boolean;\n}\n\nexport interface ReportsBalanceSummaryRow {\n\tamount: number;\n\tcount?: number;\n}\n\nexport interface ReportsBalanceSummary {\n\tcurrency?: string;\n\tperiod?: Partial< ReportsPeriodRange >;\n\tstarting_balance?: ReportsBalanceSummaryRow;\n\ttotal_charges_captured?: ReportsBalanceSummaryRow;\n\tfees?: ReportsBalanceSummaryRow;\n\tcharge_fees?: ReportsBalanceSummaryRow;\n\tpayout_fees?: ReportsBalanceSummaryRow;\n\treader_fees?: ReportsBalanceSummaryRow;\n\tdispute_fees?: ReportsBalanceSummaryRow;\n\tfee_refunds?: ReportsBalanceSummaryRow;\n\trefunds?: ReportsBalanceSummaryRow;\n\trefund_failure?: ReportsBalanceSummaryRow;\n\tdisputes?: ReportsBalanceSummaryRow;\n\tfinancing_payout?: ReportsBalanceSummaryRow;\n\tfinancing_paydown?: ReportsBalanceSummaryRow;\n\tnetwork_costs?: ReportsBalanceSummaryRow;\n\tother_adjustments?: ReportsBalanceSummaryRow;\n\tnet_balance_change_in_the_period?: ReportsBalanceSummaryRow;\n\tpayouts?: ReportsBalanceSummaryRow;\n\tending_balance?: ReportsBalanceSummaryRow;\n}\n\ninterface ReportsBalanceSummaryResult {\n\tsummary: ReportsBalanceSummary;\n\terror?: Record< string, unknown >;\n\tisLoading: boolean;\n}\n\nconst emptyReportsBalanceSummary: ReportsBalanceSummary = {};\nconst emptyReportsBalanceSummaryError: Record< string, unknown > = {};\nconst skippedReportsBalanceSummaryResult: ReportsBalanceSummaryResult = {\n\tsummary: emptyReportsBalanceSummary,\n\terror: emptyReportsBalanceSummaryError,\n\tisLoading: false,\n};\n\ninterface ReportsFeesQuery extends Query {\n\tpayment_method_type?: string;\n\ttype?: string;\n\torder_id?: string;\n\tdeposit_id?: string;\n\tcustomer_email?: string;\n}\n\nconst sortDateBetween = ( dateBetween: Query[ 'date_between' ] ) =>\n\tArray.isArray( dateBetween )\n\t\t? [ ...dateBetween ].sort( ( a, b ) => moment( a ).diff( moment( b ) ) )\n\t\t: dateBetween;\n\nexport const useReportsFees = ( {\n\tpaged,\n\tper_page: perPage,\n\torderby,\n\torder,\n\tmatch,\n\tdate_before: dateBefore,\n\tdate_after: dateAfter,\n\tdate_between: dateBetween,\n\tpayment_method_type: paymentMethodType,\n\ttype,\n\torder_id: orderId,\n\tdeposit_id: depositId,\n\tcustomer_email: customerEmail,\n\tsearch,\n}: ReportsFeesQuery ): ReportsFees =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst { getReportsFees, getReportsFeesError, isResolving } =\n\t\t\t\tselect( STORE_NAME );\n\n\t\t\tconst query = {\n\t\t\t\tpaged: Number.isNaN( parseInt( paged ?? '', 10 ) )\n\t\t\t\t\t? '1'\n\t\t\t\t\t: paged,\n\t\t\t\tperPage: Number.isNaN( parseInt( perPage ?? '', 10 ) )\n\t\t\t\t\t? '25'\n\t\t\t\t\t: perPage,\n\t\t\t\torderby: orderby || 'date',\n\t\t\t\torder: order || 'desc',\n\t\t\t\tmatch,\n\t\t\t\tdateBefore,\n\t\t\t\tdateAfter,\n\t\t\t\tdateBetween: sortDateBetween( dateBetween ),\n\t\t\t\tpaymentMethodType,\n\t\t\t\ttype,\n\t\t\t\torderId,\n\t\t\t\tdepositId,\n\t\t\t\tcustomerEmail,\n\t\t\t\tsearch,\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tfeesRows: getReportsFees( query ),\n\t\t\t\tfeesError: getReportsFeesError( query ),\n\t\t\t\tisLoading: isResolving( 'getReportsFees', [ query ] ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tpaged,\n\t\t\tperPage,\n\t\t\torderby,\n\t\t\torder,\n\t\t\tmatch,\n\t\t\tdateBefore,\n\t\t\tdateAfter,\n\t\t\tJSON.stringify( dateBetween ),\n\t\t\tpaymentMethodType,\n\t\t\tJSON.stringify( type ),\n\t\t\torderId,\n\t\t\tdepositId,\n\t\t\tcustomerEmail,\n\t\t\tJSON.stringify( search ),\n\t\t]\n\t);\n\nexport const useReportsBalanceSummary = (\n\tperiod?: ReportsPeriodRange,\n\tcurrency = wcpaySettings.accountDefaultCurrency || ''\n): ReportsBalanceSummaryResult => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! period ) {\n\t\t\t\treturn skippedReportsBalanceSummaryResult;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetReportsBalanceSummary,\n\t\t\t\tgetReportsBalanceSummaryError,\n\t\t\t\tisResolving,\n\t\t\t} = select( STORE_NAME );\n\n\t\t\tconst query = {\n\t\t\t\tdateStart: period.start,\n\t\t\t\tdateEnd: period.end,\n\t\t\t\tcurrency: currency.toLowerCase(),\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tsummary: getReportsBalanceSummary( query ),\n\t\t\t\terror: getReportsBalanceSummaryError( query ),\n\t\t\t\tisLoading: isResolving( 'getReportsBalanceSummary', [ query ] ),\n\t\t\t};\n\t\t},\n\t\t[ period?.start, period?.end, currency ]\n\t);\n};\n\nexport const useReportsFeesSummary = ( {\n\tmatch,\n\tdate_before: dateBefore,\n\tdate_after: dateAfter,\n\tdate_between: dateBetween,\n\tpayment_method_type: paymentMethodType,\n\ttype,\n\torder_id: orderId,\n\tdeposit_id: depositId,\n\tcustomer_email: customerEmail,\n\tsearch,\n}: ReportsFeesQuery ): ReportsFeesSummary =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetReportsFeesSummary,\n\t\t\t\tgetReportsFeesSummaryError,\n\t\t\t\tisResolving,\n\t\t\t} = select( STORE_NAME );\n\n\t\t\tconst query = {\n\t\t\t\tmatch,\n\t\t\t\tdateBefore,\n\t\t\t\tdateAfter,\n\t\t\t\tdateBetween: sortDateBetween( dateBetween ),\n\t\t\t\tpaymentMethodType,\n\t\t\t\ttype,\n\t\t\t\torderId,\n\t\t\t\tdepositId,\n\t\t\t\tcustomerEmail,\n\t\t\t\tsearch,\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tfeesSummary: getReportsFeesSummary( query ),\n\t\t\t\tfeesSummaryError: getReportsFeesSummaryError( query ),\n\t\t\t\tisLoading: isResolving( 'getReportsFeesSummary', [ query ] ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tmatch,\n\t\t\tdateBefore,\n\t\t\tdateAfter,\n\t\t\tJSON.stringify( dateBetween ),\n\t\t\tpaymentMethodType,\n\t\t\tJSON.stringify( type ),\n\t\t\torderId,\n\t\t\tdepositId,\n\t\t\tcustomerEmail,\n\t\t\tJSON.stringify( search ),\n\t\t]\n\t);\n","/** @format */\n\n/**\n * Internal dependencies\n */\nimport TYPES from './action-types';\nimport { getResourceId } from 'utils/data';\n\nconst defaultState = {\n\tsummary: {},\n\tbalanceSummary: {},\n};\n\nconst receiveReports = (\n\tstate = defaultState,\n\t{ type, query = {}, data = [], error }\n) => {\n\tconst index = getResourceId( query );\n\n\tswitch ( type ) {\n\t\tcase TYPES.SET_REPORTS_FEES:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ index ]: {\n\t\t\t\t\t...state[ index ],\n\t\t\t\t\tdata,\n\t\t\t\t\terror: undefined,\n\t\t\t\t},\n\t\t\t};\n\t\tcase TYPES.SET_ERROR_FOR_REPORTS_FEES:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ index ]: {\n\t\t\t\t\t...state[ index ],\n\t\t\t\t\terror,\n\t\t\t\t},\n\t\t\t};\n\t\tcase TYPES.SET_REPORTS_FEES_SUMMARY:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tsummary: {\n\t\t\t\t\t...state.summary,\n\t\t\t\t\t[ index ]: {\n\t\t\t\t\t\t...( state.summary && state.summary[ index ] ),\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\terror: undefined,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\tcase TYPES.SET_ERROR_FOR_REPORTS_FEES_SUMMARY:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tsummary: {\n\t\t\t\t\t...state.summary,\n\t\t\t\t\t[ index ]: {\n\t\t\t\t\t\t...( state.summary && state.summary[ index ] ),\n\t\t\t\t\t\terror,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\tcase TYPES.SET_REPORTS_BALANCE_SUMMARY:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tbalanceSummary: {\n\t\t\t\t\t...state.balanceSummary,\n\t\t\t\t\t[ index ]: {\n\t\t\t\t\t\t...( state.balanceSummary &&\n\t\t\t\t\t\t\tstate.balanceSummary[ index ] ),\n\t\t\t\t\t\tdata,\n\t\t\t\t\t\terror: undefined,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t\tcase TYPES.SET_ERROR_FOR_REPORTS_BALANCE_SUMMARY:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tbalanceSummary: {\n\t\t\t\t\t...state.balanceSummary,\n\t\t\t\t\t[ index ]: {\n\t\t\t\t\t\t...( state.balanceSummary &&\n\t\t\t\t\t\t\tstate.balanceSummary[ index ] ),\n\t\t\t\t\t\terror,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n};\n\nexport default receiveReports;\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { apiFetch } from '@wordpress/data-controls';\nimport { controls } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { NAMESPACE } from '../constants';\nimport {\n\tupdateErrorForReportsFees,\n\tupdateErrorForReportsFeesSummary,\n\tupdateErrorForReportsBalanceSummary,\n\tupdateReportsFees,\n\tupdateReportsFeesSummary,\n\tupdateReportsBalanceSummary,\n} from './actions';\nimport { formatDateValue, getUserTimeZone } from 'utils';\n\n// The Fees REST schema declares `type` as an array (see Reports controller).\n// URL helpers and DataViews can hand us a scalar string, so normalize at the\n// resolver boundary — sending a string would fall back on WP REST's lenient\n// coercion and may be rejected as the schema tightens.\nconst toArrayOrUndefined = ( value ) => {\n\tif ( value === undefined || value === null || value === '' ) {\n\t\treturn undefined;\n\t}\n\treturn Array.isArray( value ) ? value : [ value ];\n};\n\nconst formatQueryFilters = ( query ) => ( {\n\tmatch: query.match,\n\tdate_before: formatDateValue( query.dateBefore, true ),\n\tdate_after: formatDateValue( query.dateAfter ),\n\tdate_between: query.dateBetween && [\n\t\tformatDateValue( query.dateBetween[ 0 ] ),\n\t\tformatDateValue( query.dateBetween[ 1 ], true ),\n\t],\n\tpayment_method_type: query.paymentMethodType,\n\ttype: toArrayOrUndefined( query.type ),\n\torder_id: query.orderId,\n\tdeposit_id: query.depositId,\n\t// Keep customer email out of GET query strings; the Fees UI does not expose\n\t// this filter, and URLs can be persisted in logs/history.\n\tsearch: query.search,\n\tuser_timezone: getUserTimeZone(),\n} );\n\nconst getReportsFeesRows = ( results ) => {\n\tif ( Array.isArray( results ) ) {\n\t\treturn results;\n\t}\n\n\treturn results?.data || [];\n};\n\nexport const formatReportsBalanceQuery = ( {\n\tdateStart,\n\tdateEnd,\n\tcurrency,\n} ) => ( {\n\tdate_start: dateStart,\n\tdate_end: dateEnd,\n\tcurrency: ( currency || '' ).toLowerCase(),\n} );\n\n/**\n * Retrieves Fees report rows.\n *\n * @param {Object} query Data on which to parameterize the selection.\n */\nexport function* getReportsFees( query ) {\n\tconst path = addQueryArgs( `${ NAMESPACE }/reports/fees`, {\n\t\tpage: query.paged,\n\t\tper_page: query.perPage,\n\t\tsort: query.orderby,\n\t\tdirection: query.order,\n\t\t...formatQueryFilters( query ),\n\t} );\n\n\ttry {\n\t\tconst results = yield apiFetch( { path } );\n\t\tyield updateReportsFees( query, getReportsFeesRows( results ) );\n\t} catch ( e ) {\n\t\tyield controls.dispatch(\n\t\t\t'core/notices',\n\t\t\t'createErrorNotice',\n\t\t\t__( 'Error retrieving fees report.', 'woocommerce-payments' )\n\t\t);\n\t\tyield updateErrorForReportsFees( query, e );\n\t}\n}\n\n/**\n * REST endpoint for requesting and polling Fees CSV exports.\n *\n * POST without a path segment to start the export (returns an export ID).\n * GET with `/{export_id}` appended to poll for the signed download URL.\n */\nexport const feesDownloadEndpoint = `${ NAMESPACE }/reports/fees/download`;\n\n/**\n * Builds the POST URL that kicks off a Fees CSV export.\n *\n * Accepts the same query shape as the Fees list/summary resolvers so the\n * export honours the same filters as the on-screen table. Adds `user_email`\n * and `locale` — both required by the backend export pipeline but scoped to\n * this helper so they never leak into list/summary GET URLs (and from there\n * into access logs).\n *\n * @param {Object} query Fees report query.\n * @return {string} Fully-qualified REST path including serialized query string.\n */\nexport function getFeesCSVRequestURL( query ) {\n\treturn addQueryArgs( feesDownloadEndpoint, {\n\t\t...formatQueryFilters( query ),\n\t\tuser_email: query.userEmail,\n\t\tlocale: query.locale,\n\t} );\n}\n\n/**\n * Retrieves Fees report summary data.\n *\n * @param {Object} query Data on which to parameterize the selection.\n */\nexport function* getReportsFeesSummary( query ) {\n\tconst path = addQueryArgs(\n\t\t`${ NAMESPACE }/reports/fees/summary`,\n\t\tformatQueryFilters( query )\n\t);\n\n\ttry {\n\t\tconst summary = yield apiFetch( { path } );\n\t\tyield updateReportsFeesSummary( query, summary );\n\t} catch ( e ) {\n\t\tyield controls.dispatch(\n\t\t\t'core/notices',\n\t\t\t'createErrorNotice',\n\t\t\t__(\n\t\t\t\t'Error retrieving fees report summary.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t)\n\t\t);\n\t\tyield updateErrorForReportsFeesSummary( query, e );\n\t}\n}\n\n/**\n * Retrieves Balance report summary data.\n *\n * @param {Object} query Data on which to parameterize the selection.\n */\nexport function* getReportsBalanceSummary( query ) {\n\tconst path = addQueryArgs(\n\t\t`${ NAMESPACE }/reports/balance`,\n\t\tformatReportsBalanceQuery( query )\n\t);\n\n\ttry {\n\t\tconst summary = yield apiFetch( { path } );\n\t\tyield updateReportsBalanceSummary( query, summary );\n\t} catch ( e ) {\n\t\tyield controls.dispatch(\n\t\t\t'core/notices',\n\t\t\t'createErrorNotice',\n\t\t\t__(\n\t\t\t\t'Error retrieving balance report summary.',\n\t\t\t\t'woocommerce-payments'\n\t\t\t)\n\t\t);\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.error( 'Balance summary resolver failed:', {\n\t\t\tquery,\n\t\t\terror: e,\n\t\t} );\n\t\tyield updateErrorForReportsBalanceSummary( query, e );\n\t}\n}\n","/** @format */\n\n/**\n * Internal dependencies\n */\nimport { getResourceId } from 'utils/data';\n\nconst EMPTY_ARRAY = [];\nconst EMPTY_OBJECT = {};\n\nconst getReportsState = ( state ) => {\n\tif ( ! state ) {\n\t\treturn { summary: EMPTY_OBJECT, balanceSummary: EMPTY_OBJECT };\n\t}\n\n\treturn (\n\t\tstate.reports || { summary: EMPTY_OBJECT, balanceSummary: EMPTY_OBJECT }\n\t);\n};\n\nconst getReportsFeesForQuery = ( state, query ) => {\n\tconst index = getResourceId( query );\n\treturn getReportsState( state )[ index ] || {};\n};\n\nexport const getReportsFees = ( state, query ) => {\n\treturn getReportsFeesForQuery( state, query ).data || EMPTY_ARRAY;\n};\n\nexport const getReportsFeesError = ( state, query ) => {\n\treturn getReportsFeesForQuery( state, query ).error || EMPTY_OBJECT;\n};\n\nconst getReportsFeesSummaryForQuery = ( state, query ) => {\n\tconst index = getResourceId( query );\n\treturn getReportsState( state ).summary[ index ] || {};\n};\n\nexport const getReportsFeesSummary = ( state, query ) => {\n\treturn getReportsFeesSummaryForQuery( state, query ).data || EMPTY_OBJECT;\n};\n\nexport const getReportsFeesSummaryError = ( state, query ) => {\n\treturn getReportsFeesSummaryForQuery( state, query ).error || EMPTY_OBJECT;\n};\n\nconst getReportsBalanceSummaryForQuery = ( state, query ) => {\n\tconst index = getResourceId( query );\n\treturn getReportsState( state ).balanceSummary?.[ index ] || {};\n};\n\nexport const getReportsBalanceSummary = ( state, query ) => {\n\treturn (\n\t\tgetReportsBalanceSummaryForQuery( state, query ).data || EMPTY_OBJECT\n\t);\n};\n\nexport const getReportsBalanceSummaryError = ( state, query ) => {\n\treturn (\n\t\tgetReportsBalanceSummaryForQuery( state, query ).error || EMPTY_OBJECT\n\t);\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { createReduxStore, register, combineReducers } from '@wordpress/data';\nimport { controls } from '@wordpress/data-controls';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport * as resolvers from './resolvers';\nimport { REPORTS_STORE_NAME } from '../store-names';\n\nexport const STORE_NAME = REPORTS_STORE_NAME;\n\n// The reducer is nested under its slice key so selectors keep reading\n// `state.reports.…`, exactly as they did under the old combined store.\nexport const store = createReduxStore( STORE_NAME, {\n\treducer: combineReducers( { reports: reducer } ),\n\tactions,\n\tselectors,\n\tresolvers,\n\tcontrols,\n} );\n\nregister( store );\n","/** @format */\n\n/**\n * Per-slice @wordpress/data store names.\n *\n * This module is intentionally dependency-free. `store.js` (which calls\n * `register()`) imports its name from here, and so do the slice's resolvers and\n * actions — that way resolvers/actions never import `store.js`, which would\n * create a `store.js → resolvers → store.js` cycle that breaks when a resolver\n * or action module is imported on its own (e.g. in a unit test).\n */\n\nexport const DEPOSITS_STORE_NAME = 'wc/payments/deposits';\nexport const TRANSACTIONS_STORE_NAME = 'wc/payments/transactions';\nexport const CHARGES_STORE_NAME = 'wc/payments/charges';\nexport const TIMELINE_STORE_NAME = 'wc/payments/timeline';\nexport const DISPUTES_STORE_NAME = 'wc/payments/disputes';\nexport const SETTINGS_STORE_NAME = 'wc/payments/settings';\nexport const READERS_STORE_NAME = 'wc/payments/readers';\nexport const CAPITAL_STORE_NAME = 'wc/payments/capital';\nexport const DOCUMENTS_STORE_NAME = 'wc/payments/documents';\nexport const PAYMENT_INTENTS_STORE_NAME = 'wc/payments/paymentIntents';\nexport const AUTHORIZATIONS_STORE_NAME = 'wc/payments/authorizations';\nexport const FILES_STORE_NAME = 'wc/payments/files';\nexport const PM_PROMOTIONS_STORE_NAME = 'wc/payments/pmPromotions';\nexport const DISPUTE_READINESS_STORE_NAME = 'wc/payments/disputeReadiness';\nexport const REPORTS_STORE_NAME = 'wc/payments/reports';\n","/**\n * External dependencies\n */\nimport { useEffect, useRef, useState } from 'react';\nimport apiFetch from '@wordpress/api-fetch';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * The response from the export POST request, which returns an export ID.\n */\ninterface ExportResponse {\n\t/**\n\t * The export ID, used to check if the export is ready to be downloaded when polling.\n\t */\n\texport_id?: string;\n}\n\n/**\n * The response from the export URL GET request, which returns the URL to download the file.\n */\ninterface ExportURLResponse {\n\tstatus: string;\n\tdownload_url?: string;\n}\n\nconst maxRetries = 5;\n\n/**\n * Hook for requesting and polling for a CSV export. E.g. Transactions, Payouts, Disputes.\n *\n * @example\n * const { requestReportExport, isExportInProgress } = useReportExport();\n * requestReportExport( {\n * \texportRequestURL: '/wc/v3/payments/transactions/download?queryParam=value',\n * \texportFileAvailabilityEndpoint: '/wc/v3/payments/transactions/download',\n * \tuserEmail: 'test@example.com',\n * } );\n */\nexport const useReportExport = () => {\n\tconst [ isExportInProgress, setIsExportInProgress ] = useState( false );\n\tconst { createNotice } = useDispatch( 'core/notices' );\n\tconst timeoutIdRef = useRef< NodeJS.Timeout | null >( null );\n\n\tuseEffect( () => {\n\t\t// Cancel the timeout if the component unmounts.\n\t\treturn () => {\n\t\t\tif ( timeoutIdRef.current ) {\n\t\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t\t}\n\t\t};\n\t}, [ timeoutIdRef ] );\n\n\tinterface PollForFileProps {\n\t\t/**\n\t\t * The URL to check for the exported file. E.g. \"/wc/v3/payments/transactions/download/{export_id}\"\n\t\t */\n\t\tcheckFileURL: string;\n\t\t/**\n\t\t * The email address the export will be sent to.\n\t\t */\n\t\tuserEmail: string;\n\t\t/**\n\t\t * The interval in milliseconds to poll the server.\n\t\t */\n\t\tinterval?: number;\n\t\t/**\n\t\t * The retry count for the current polling chain.\n\t\t */\n\t\tretryCount?: number;\n\t\t/**\n\t\t * Callback invoked when the export is ready for download.\n\t\t */\n\t\tonSuccess?: () => void;\n\t\t/**\n\t\t * Callback invoked when polling times out after the maximum number of retries.\n\t\t */\n\t\tonError?: ( details: { reason: 'request' | 'timeout' } ) => void;\n\t}\n\n\t/**\n\t * Polls the server to check if the exported file is ready.\n\t */\n\tasync function pollForFile( {\n\t\tcheckFileURL,\n\t\tuserEmail,\n\t\tinterval = 1000,\n\t\tretryCount = 0,\n\t\tonSuccess,\n\t\tonError,\n\t}: PollForFileProps ) {\n\t\ttimeoutIdRef.current = setTimeout( async () => {\n\t\t\tconst nextRetryCount = retryCount + 1;\n\t\t\tlet exportedFileURLResponse;\n\t\t\ttry {\n\t\t\t\texportedFileURLResponse = await apiFetch< ExportURLResponse >( {\n\t\t\t\t\tpath: checkFileURL,\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t} );\n\t\t\t} catch ( error ) {\n\t\t\t\t// If there's an error (like 500), continue with retry logic\n\t\t\t\texportedFileURLResponse = { status: 'error' };\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\texportedFileURLResponse.status === 'success' &&\n\t\t\t\texportedFileURLResponse.download_url\n\t\t\t) {\n\t\t\t\t// The file is available, so we can download it.\n\t\t\t\t// Create a link element to trigger the download.\n\t\t\t\tconst link = document.createElement( 'a' );\n\t\t\t\t// Add force_download=true to the URL to force the download, which adds the appropriate `Content-Disposition: attachment` header when using production server.\n\t\t\t\tlink.href =\n\t\t\t\t\texportedFileURLResponse.download_url +\n\t\t\t\t\t'?force_download=true';\n\t\t\t\tlink.click();\n\n\t\t\t\tsetIsExportInProgress( false );\n\t\t\t\tonSuccess?.();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( nextRetryCount < maxRetries ) {\n\t\t\t\t// If the file is not available, check again after 1 second.\n\t\t\t\tpollForFile( {\n\t\t\t\t\tcheckFileURL,\n\t\t\t\t\tuserEmail,\n\t\t\t\t\tretryCount: nextRetryCount,\n\t\t\t\t\tonSuccess,\n\t\t\t\t\tonError,\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\t// If the file is not available after the maximum number of retries, show that it will be emailed.\n\t\t\t\tsetIsExportInProgress( false );\n\t\t\t\tonError?.( { reason: 'timeout' } );\n\t\t\t}\n\t\t}, interval );\n\t}\n\n\tinterface RequestReportExportProps {\n\t\t/**\n\t\t * The URL for requesting the export. E.g. \"/wc/v3/payments/transactions/download?param=value\"\n\t\t */\n\t\texportRequestURL: string;\n\t\t/**\n\t\t * The endpoint for retrieving the file's download URL. E.g. \"/wc/v3/payments/transactions/download/\"\n\t\t */\n\t\texportFileAvailabilityEndpoint: string;\n\t\t/**\n\t\t * The email address to send the export to.\n\t\t */\n\t\tuserEmail: string;\n\t\t/**\n\t\t * Callback invoked when the export is ready for download.\n\t\t */\n\t\tonSuccess?: () => void;\n\t\t/**\n\t\t * Callback invoked when the export request fails or polling times out.\n\t\t */\n\t\tonError?: ( details: { reason: 'request' | 'timeout' } ) => void;\n\t}\n\n\t/**\n\t * Requests a CSV export to be prepared.\n\t */\n\tasync function requestReportExport( {\n\t\texportRequestURL,\n\t\texportFileAvailabilityEndpoint,\n\t\tuserEmail,\n\t\tonSuccess,\n\t\tonError,\n\t}: RequestReportExportProps ) {\n\t\ttry {\n\t\t\tsetIsExportInProgress( true );\n\n\t\t\t// Request the report download.\n\t\t\tconst response = await apiFetch< ExportResponse >( {\n\t\t\t\tpath: exportRequestURL,\n\t\t\t\tmethod: 'POST',\n\t\t\t} );\n\n\t\t\t// If the export request was successful, start polling to see if the exported file is ready.\n\t\t\tif ( response.export_id ) {\n\t\t\t\tconst checkFileURL = `${ exportFileAvailabilityEndpoint }/${ response.export_id }`;\n\t\t\t\tpollForFile( {\n\t\t\t\t\tcheckFileURL,\n\t\t\t\t\tuserEmail,\n\t\t\t\t\tonSuccess,\n\t\t\t\t\tonError,\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\t// A 2xx response without an export_id means the request did not\n\t\t\t\t// produce an export. Recover the UI and surface the failure so\n\t\t\t\t// the button doesn't stay stuck and the outcome is tracked.\n\t\t\t\tsetIsExportInProgress( false );\n\t\t\t\tonError?.( { reason: 'request' } );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tsetIsExportInProgress( false );\n\t\t\tonError?.( { reason: 'request' } );\n\t\t\tcreateNotice(\n\t\t\t\t'error',\n\t\t\t\t__(\n\t\t\t\t\t'There was a problem generating your export.',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\n\treturn {\n\t\t/**\n\t\t * Requests a report export to be prepared and starts polling for the exported file.\n\t\t */\n\t\trequestReportExport,\n\t\t/**\n\t\t * Whether a report download request has been made and polling is in progress.\n\t\t */\n\t\tisExportInProgress,\n\t};\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { createContext } from 'react';\n\n// Public boundary for parent orchestrators that need to provide a shared\n// \"now\" reference to the Balance date filter without reaching into the\n// hook's implementation file.\nexport const BalanceDateFilterNowContext = createContext< Date | undefined >(\n\tundefined\n);\n","/** @format */\n\n/**\n * Internal dependencies\n */\nimport type { DateFilterValue } from './types';\n\nconst YMD = /^\\d{4}-\\d{2}-\\d{2}$/;\n\nconst isYmd = ( value: unknown ): value is string =>\n\ttypeof value === 'string' && YMD.test( value );\n\nexport interface DateFilterQueryKeys {\n\tdate_between?: [ string, string ];\n\tdate_before?: string;\n\tdate_after?: string;\n}\n\n/**\n * Parse the URL query into a DateFilterValue, recognising the existing\n * `date_between` / `date_before` / `date_after` keys. `date_between=[X,X]`\n * collapses to an `on` value (same-day range). Returns `undefined` when no\n * date filter is active in the URL.\n */\nexport const parseDateFilterFromQuery = (\n\tquery: Record< string, unknown >\n): DateFilterValue | undefined => {\n\tconst between = query.date_between;\n\tif ( Array.isArray( between ) && between.length === 2 ) {\n\t\tconst [ start, end ] = between;\n\t\tif ( isYmd( start ) && isYmd( end ) ) {\n\t\t\tif ( start === end ) {\n\t\t\t\treturn { operator: 'on', value: start };\n\t\t\t}\n\t\t\treturn { operator: 'between', value: [ start, end ] };\n\t\t}\n\t}\n\n\tconst before = query.date_before;\n\tif ( isYmd( before ) ) {\n\t\treturn { operator: 'before', value: before };\n\t}\n\n\tconst after = query.date_after;\n\tif ( isYmd( after ) ) {\n\t\treturn { operator: 'after', value: after };\n\t}\n\n\treturn undefined;\n};\n\n/**\n * Translate a DateFilterValue (or its absence) into a query patch that always\n * sets every owned key — including the ones we want to clear — to `undefined`,\n * so `updateQueryString` strips stale keys.\n */\nexport const serializeDateFilterToQuery = (\n\tvalue: DateFilterValue | undefined\n): Record< string, unknown > => {\n\tconst params: Record< string, unknown > = {\n\t\tdate_between: undefined,\n\t\tdate_before: undefined,\n\t\tdate_after: undefined,\n\t};\n\n\tif ( ! value ) {\n\t\treturn params;\n\t}\n\n\tswitch ( value.operator ) {\n\t\tcase 'on':\n\t\t\tparams.date_between = [ value.value, value.value ];\n\t\t\tbreak;\n\t\tcase 'between':\n\t\t\tparams.date_between = value.value;\n\t\t\tbreak;\n\t\tcase 'before':\n\t\t\tparams.date_before = value.value;\n\t\t\tbreak;\n\t\tcase 'after':\n\t\t\tparams.date_after = value.value;\n\t\t\tbreak;\n\t}\n\n\treturn params;\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport type { Filter } from '@wordpress/dataviews/wp';\n\n/**\n * Internal dependencies\n */\nimport type { DateFilterValue } from 'wcpay/reports/date-filter';\nimport {\n\tparseDateFilterFromQuery,\n\tserializeDateFilterToQuery,\n} from 'wcpay/reports/date-filter/url';\n\nconst millisecondsPerDay = 86400000;\n\nconst isYmd = ( value: unknown ): value is string =>\n\ttypeof value === 'string' && /^\\d{4}-\\d{2}-\\d{2}$/.test( value );\n\n// Fees export follows the Transactions export path, whose request URLs contain\n// timezone-expanded datetime bounds. Preserve those generated legacy values for\n// export compatibility; native DataViews filters still parse only date-only YMD.\nconst isLegacyLocalDateTime = ( value: unknown ): value is string =>\n\ttypeof value === 'string' &&\n\t/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$/.test( value );\n\nconst isDateQueryValue = ( value: unknown ): value is string =>\n\tisYmd( value ) || isLegacyLocalDateTime( value );\n\nexport interface FeesDateQueryParams {\n\tdate_between?: string[];\n\tdate_before?: string;\n\tdate_after?: string;\n}\n\nexport const getFeesDateFilterValue = (\n\tfilter: Pick< Filter, 'operator' | 'value' > | undefined\n): DateFilterValue | undefined => {\n\tif ( ! filter ) {\n\t\treturn undefined;\n\t}\n\n\tif ( filter.operator === 'between' ) {\n\t\tconst value = filter.value;\n\t\tif ( ! Array.isArray( value ) || value.length !== 2 ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst [ start, end ] = value;\n\t\tif ( isYmd( start ) && isYmd( end ) ) {\n\t\t\treturn {\n\t\t\t\toperator: 'between',\n\t\t\t\tvalue: [ start, end ],\n\t\t\t};\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tif (\n\t\t( filter.operator === 'on' ||\n\t\t\tfilter.operator === 'before' ||\n\t\t\tfilter.operator === 'after' ) &&\n\t\tisYmd( filter.value )\n\t) {\n\t\treturn {\n\t\t\toperator: filter.operator,\n\t\t\tvalue: filter.value,\n\t\t};\n\t}\n\n\treturn undefined;\n};\n\nexport const buildFeesDateQueryFromFilter = (\n\tfilter: Pick< Filter, 'operator' | 'value' > | undefined\n): FeesDateQueryParams => {\n\tconst dateFilter = getFeesDateFilterValue( filter );\n\n\tif ( ! dateFilter ) {\n\t\treturn {};\n\t}\n\n\tif ( dateFilter.operator === 'on' ) {\n\t\treturn {\n\t\t\tdate_between: [ dateFilter.value, dateFilter.value ],\n\t\t};\n\t}\n\n\tif ( dateFilter.operator === 'between' ) {\n\t\treturn {\n\t\t\tdate_between: dateFilter.value,\n\t\t};\n\t}\n\n\tif ( dateFilter.operator === 'before' ) {\n\t\treturn {\n\t\t\tdate_before: dateFilter.value,\n\t\t};\n\t}\n\n\treturn {\n\t\tdate_after: dateFilter.value,\n\t};\n};\n\nconst getDateBetweenQueryValue = ( value: unknown ): string[] | undefined => {\n\tif ( ! Array.isArray( value ) || value.length !== 2 ) {\n\t\treturn undefined;\n\t}\n\n\tconst [ start, end ] = value;\n\tif ( isDateQueryValue( start ) && isDateQueryValue( end ) ) {\n\t\treturn [ start, end ];\n\t}\n\n\treturn undefined;\n};\n\nexport const parseFeesDateFilterFromQuery = (\n\tquery: Record< string, unknown >\n): Filter | undefined => {\n\tconst value = parseDateFilterFromQuery( query );\n\tif ( ! value ) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\tfield: 'date',\n\t\toperator: value.operator,\n\t\tvalue: value.value,\n\t};\n};\n\nexport const buildFeesDateQueryFromUrlQuery = (\n\tquery: Record< string, unknown >\n): FeesDateQueryParams => {\n\tconst params: FeesDateQueryParams = {};\n\tconst dateBetween = getDateBetweenQueryValue( query.date_between );\n\n\tif ( dateBetween ) {\n\t\tparams.date_between = dateBetween;\n\t}\n\n\tif ( isDateQueryValue( query.date_before ) ) {\n\t\tparams.date_before = query.date_before;\n\t}\n\n\tif ( isDateQueryValue( query.date_after ) ) {\n\t\tparams.date_after = query.date_after;\n\t}\n\n\treturn params;\n};\n\nexport const serializeFeesDateFilterToQuery = (\n\tfilter: Pick< Filter, 'operator' | 'value' > | undefined\n): Record< string, unknown > => {\n\treturn {\n\t\tdate_preset: undefined,\n\t\t...serializeDateFilterToQuery( getFeesDateFilterValue( filter ) ),\n\t};\n};\n\nexport const getFeesDateFilterRangeDays = (\n\tfilter: Pick< Filter, 'operator' | 'value' > | undefined\n): number | null => {\n\tconst dateFilter = getFeesDateFilterValue( filter );\n\tif ( ! dateFilter || dateFilter.operator !== 'between' ) {\n\t\treturn null;\n\t}\n\n\tconst start = new Date( dateFilter.value[ 0 ] ).getTime();\n\tconst end = new Date( dateFilter.value[ 1 ] ).getTime();\n\treturn Math.round( ( end - start ) / millisecondsPerDay );\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { Button } from '@wordpress/components';\nimport { select, useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { getQuery } from '@woocommerce/navigation';\nimport { recordEvent } from 'tracks';\n\n/**\n * Internal dependencies\n */\nimport { useReportExport } from 'wcpay/hooks/use-report-export';\nimport { useReportsFeesSummary } from 'wcpay/data/reports/hooks';\nimport {\n\tfeesDownloadEndpoint,\n\tgetFeesCSVRequestURL,\n} from 'wcpay/data/reports/resolvers';\nimport {\n\tbuildFeesDateQueryFromUrlQuery,\n\ttype FeesDateQueryParams,\n} from './fees/date-filter-values';\nimport { store as reportsStore } from 'wcpay/data/reports';\n\n/**\n * Threshold above which an unfiltered export prompts the merchant for\n * confirmation. Matches the Transactions list threshold — Fees rows are\n * 1:1 with transactions, so the same row count is the right peer.\n */\nconst confirmThreshold = 10000;\n\nconst hasValue = ( value: unknown ): boolean =>\n\tArray.isArray( value ) ? value.length > 0 : !! value;\n\ninterface FeesExportQuery extends FeesDateQueryParams {\n\tpayment_method_type?: unknown;\n\ttype?: unknown;\n\torder_id?: unknown;\n\tdeposit_id?: unknown;\n\tsearch?: unknown;\n\tmatch?: unknown;\n}\n\ninterface FeesSummaryStoreSelectors {\n\tgetReportsFeesSummary: (\n\t\tquery: Record< string, unknown >\n\t) => { count?: number } | undefined;\n}\n\nconst buildFeesExportQuery = (\n\tquery: Record< string, unknown >\n): FeesExportQuery => ( {\n\t...buildFeesDateQueryFromUrlQuery( query ),\n\tpayment_method_type: query.payment_method_type,\n\ttype: query.type,\n\torder_id: query.order_id,\n\tdeposit_id: query.deposit_id,\n\tsearch: query.search,\n\tmatch: query.match,\n} );\n\nconst sortDateBetween = (\n\tdateBetween: FeesExportQuery[ 'date_between' ]\n): FeesExportQuery[ 'date_between' ] =>\n\tArray.isArray( dateBetween )\n\t\t? [ ...dateBetween ].sort(\n\t\t\t\t( a, b ) => new Date( a ).getTime() - new Date( b ).getTime()\n\t\t  )\n\t\t: dateBetween;\n\nconst buildFeesSummaryStoreQuery = (\n\tquery: FeesExportQuery\n): Record< string, unknown > => ( {\n\tmatch: query.match,\n\tdateBefore: query.date_before,\n\tdateAfter: query.date_after,\n\tdateBetween: sortDateBetween( query.date_between ),\n\tpaymentMethodType: query.payment_method_type,\n\ttype: query.type,\n\torderId: query.order_id,\n\tdepositId: query.deposit_id,\n\tsearch: query.search,\n} );\n\nconst getFeesSummaryCount = (\n\tquery: FeesExportQuery,\n\tfallback: number\n): number => {\n\tconst summary = (\n\t\tselect( reportsStore ) as unknown as FeesSummaryStoreSelectors\n\t ).getReportsFeesSummary( buildFeesSummaryStoreQuery( query ) );\n\n\treturn typeof summary?.count === 'number' ? summary.count : fallback;\n};\n\n/**\n * Triggers a Fees CSV export for the current URL-synced filter state.\n *\n * Reads filter state from `getQuery()` so the export can preserve\n * transaction-style datetime bounds in legacy/generated export URLs while the\n * on-screen DataViews table remains date-only. Delegates the async\n * POST → poll → download flow to `useReportExport` (shared with Transactions,\n * Payouts, and Disputes).\n */\nexport const FeesExportButton: React.FC = () => {\n\tconst { requestReportExport, isExportInProgress } = useReportExport();\n\tconst { createNotice } = useDispatch( 'core/notices' );\n\tconst currentQuery = buildFeesExportQuery(\n\t\tgetQuery() as Record< string, unknown >\n\t);\n\tconst { feesSummary } = useReportsFeesSummary(\n\t\tcurrentQuery as Parameters< typeof useReportsFeesSummary >[ 0 ]\n\t);\n\tconst totalRows = feesSummary?.count ?? 0;\n\n\tconst onClick = () => {\n\t\tconst userEmail = wcpaySettings.currentUserEmail;\n\t\tconst locale = wcSettings.locale.userLocale;\n\t\tconst query = buildFeesExportQuery(\n\t\t\tgetQuery() as Record< string, unknown >\n\t\t);\n\t\tconst exportTotalRows = getFeesSummaryCount( query, totalRows );\n\n\t\tconst isFiltered =\n\t\t\thasValue( query.date_after ) ||\n\t\t\thasValue( query.date_before ) ||\n\t\t\thasValue( query.date_between ) ||\n\t\t\thasValue( query.payment_method_type ) ||\n\t\t\thasValue( query.type ) ||\n\t\t\thasValue( query.order_id ) ||\n\t\t\thasValue( query.deposit_id ) ||\n\t\t\thasValue( query.search );\n\n\t\tif (\n\t\t\t! isFiltered &&\n\t\t\texportTotalRows >= confirmThreshold &&\n\t\t\t! window.confirm(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %d: number of fees to be exported. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t\"You are about to export %d fees. If you'd like to reduce the size of your export, you can use one or more filters. Would you like to continue?\",\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t),\n\t\t\t\t\texportTotalRows\n\t\t\t\t)\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\trecordEvent( 'wcpay_csv_export_click', {\n\t\t\trow_type: 'fees',\n\t\t\tsource: 'payments_reports',\n\t\t\texported_row_count: exportTotalRows,\n\t\t} );\n\n\t\tconst exportRequestURL = getFeesCSVRequestURL( {\n\t\t\tuserEmail,\n\t\t\tlocale,\n\t\t\tdateAfter: query.date_after,\n\t\t\tdateBefore: query.date_before,\n\t\t\tdateBetween: query.date_between,\n\t\t\tpaymentMethodType: query.payment_method_type,\n\t\t\ttype: query.type,\n\t\t\torderId: query.order_id,\n\t\t\tdepositId: query.deposit_id,\n\t\t\tsearch: query.search,\n\t\t\tmatch: query.match,\n\t\t} );\n\n\t\trequestReportExport( {\n\t\t\texportRequestURL,\n\t\t\texportFileAvailabilityEndpoint: feesDownloadEndpoint,\n\t\t\tuserEmail,\n\t\t\tonSuccess: () =>\n\t\t\t\trecordEvent( 'wcpay_reports_fees_export_success', {\n\t\t\t\t\texported_row_count: exportTotalRows,\n\t\t\t\t} ),\n\t\t\tonError: ( { reason }: { reason: 'request' | 'timeout' } ) =>\n\t\t\t\trecordEvent( 'wcpay_reports_fees_export_error', {\n\t\t\t\t\terror_type: reason,\n\t\t\t\t} ),\n\t\t} );\n\n\t\tcreateNotice(\n\t\t\t'success',\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: the user's email address */\n\t\t\t\t__(\n\t\t\t\t\t'We’re processing your export. 🎉 The file will download automatically and be emailed to %s.',\n\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t),\n\t\t\t\tuserEmail\n\t\t\t)\n\t\t);\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\tonClick={ onClick }\n\t\t\tdisabled={ isExportInProgress }\n\t\t\taccessibleWhenDisabled\n\t\t\taria-busy={ isExportInProgress }\n\t\t\tisBusy={ isExportInProgress }\n\t\t\t__next40pxDefaultSize\n\t\t>\n\t\t\t{ __( 'Export', 'woocommerce-payments' ) }\n\t\t</Button>\n\t);\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React, { lazy, Suspense } from 'react';\n\nconst LazyBalanceActions = lazy( () =>\n\timport(\n\t\t/* webpackChunkName: \"reports-balance-actions\" */ './balance/actions'\n\t).then( ( { BalanceActions } ) => ( { default: BalanceActions } ) )\n);\n\nexport const LazyLoadedBalanceActions = () => (\n\t<Suspense fallback={ null }>\n\t\t<LazyBalanceActions />\n\t</Suspense>\n);\n","/** @format */\n\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\n\nimport type { ReportsTab } from './types';\nimport { FeesExportButton } from './fees-export-button';\nimport { LazyLoadedBalanceActions } from './lazy-balance-actions';\n\ninterface ReportsHeaderProps {\n\tactiveTab: ReportsTab;\n}\n\nexport const ReportsHeader: React.FC< ReportsHeaderProps > = ( {\n\tactiveTab,\n} ) => {\n\treturn (\n\t\t<div className=\"wcpay-reports-header\">\n\t\t\t<h1 className=\"screen-reader-text\">\n\t\t\t\t{ __( 'Reports', 'woocommerce-payments' ) }\n\t\t\t</h1>\n\t\t\t<div className=\"wcpay-reports-header__intro\">\n\t\t\t\t<p>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'View your reconciliation reports.',\n\t\t\t\t\t\t'woocommerce-payments'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t{ activeTab === 'fees' && (\n\t\t\t\t<div className=\"wcpay-reports-header__actions\">\n\t\t\t\t\t<FeesExportButton />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ activeTab === 'balance' && (\n\t\t\t\t<div className=\"wcpay-reports-header__actions\">\n\t\t\t\t\t<LazyLoadedBalanceActions />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\n\nexport const LoadingReportState = ( { headingRef, headingTabIndex } = {} ) => (\n\t<div\n\t\tclassName=\"wcpay-reports-state wcpay-reports-state--loading\"\n\t\trole=\"status\"\n\t>\n\t\t<h2 ref={ headingRef } tabIndex={ headingTabIndex }>\n\t\t\t{ __( 'Loading report', 'woocommerce-payments' ) }\n\t\t</h2>\n\t</div>\n);\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React, { lazy, Suspense } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { LoadingReportState } from './loading-report-state';\n\nconst LazyBalanceReport = lazy( () =>\n\timport( /* webpackChunkName: \"reports-balance\" */ './balance' ).then(\n\t\t( { BalanceReport } ) => ( { default: BalanceReport } )\n\t)\n);\n\nexport const LazyLoadedBalanceReport = ( { onReload } ) => (\n\t<Suspense fallback={ <LoadingReportState /> }>\n\t\t<LazyBalanceReport onReload={ onReload } />\n\t</Suspense>\n);\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React, { lazy, Suspense } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { LoadingReportState } from './loading-report-state';\n\nconst LazyFeesReport = lazy( () =>\n\timport( /* webpackChunkName: \"reports-fees\" */ './fees' ).then(\n\t\t( { FeesReport } ) => ( { default: FeesReport } )\n\t)\n);\n\nexport const LazyLoadedFeesReport = ( { onReload } ) => (\n\t<Suspense fallback={ <LoadingReportState /> }>\n\t\t<LazyFeesReport onReload={ onReload } />\n\t</Suspense>\n);\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React from 'react';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { ReportsTab } from './types';\nimport { LazyLoadedBalanceReport } from './lazy-balance-report';\nimport { LazyLoadedFeesReport } from './lazy-fees-report';\nimport type { ReportsPeriodRange } from './period-selector';\n\ninterface ReportsTabPanelProps {\n\ttab: ReportsTab;\n\tonReload: ( periodOverride?: ReportsPeriodRange ) => void;\n}\n\nexport const reportsTabs: Array< {\n\tname: ReportsTab;\n\ttitle: string;\n\tclassName: string;\n} > = [\n\t{\n\t\tname: 'balance',\n\t\ttitle: __( 'Balance', 'woocommerce-payments' ),\n\t\tclassName: 'wcpay-reports-tab--balance',\n\t},\n\t{\n\t\tname: 'fees',\n\t\ttitle: __( 'Fees', 'woocommerce-payments' ),\n\t\tclassName: 'wcpay-reports-tab--fees',\n\t},\n];\n\nexport function normalizeReportsTab( tab?: unknown ): ReportsTab {\n\treturn tab === 'fees' ? 'fees' : 'balance';\n}\n\nexport const ReportsTabPanel: React.FC< ReportsTabPanelProps > = ( {\n\ttab,\n\tonReload,\n} ) => {\n\tif ( tab === 'fees' ) {\n\t\treturn <LazyLoadedFeesReport onReload={ onReload } />;\n\t}\n\n\treturn <LazyLoadedBalanceReport onReload={ onReload } />;\n};\n","/** @format */\n\n/**\n * External dependencies\n */\nimport React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { TabPanel } from '@wordpress/components';\nimport { getQuery, updateQueryString } from '@woocommerce/navigation';\nimport { recordEvent } from 'tracks';\n\n/**\n * Internal dependencies\n */\nimport Page from 'components/page';\nimport { ReportsHeader } from './header';\nimport { getLastFullCalendarMonthUTC } from './period-selector';\nimport { reportsTabs, ReportsTabPanel, normalizeReportsTab } from './tabs';\nimport { useReportsTabReload } from './hooks';\nimport { BalanceDateFilterNowContext } from './balance/context';\nimport type { ReportsTab } from './types';\nimport './style.scss';\n\ninterface ReportsPageProps {\n\tnow?: Date;\n}\n\nexport const ReportsPage: React.FC< ReportsPageProps > = ( { now } ) => {\n\tconst [ activeTab, setActiveTab ] = useState( () =>\n\t\tnormalizeReportsTab( getQuery().tab )\n\t);\n\tconst [ tabPanelKey, setTabPanelKey ] = useState( 0 );\n\tconst dateFilterNow = useRef( now ?? new Date() ).current;\n\tconst tabPanelWrapperRef = useRef< HTMLDivElement >( null );\n\tconst previousActiveTabRef = useRef< ReportsTab >( activeTab );\n\tconst period = useMemo(\n\t\t() => getLastFullCalendarMonthUTC( dateFilterNow ),\n\t\t[ dateFilterNow ]\n\t);\n\tconst reload = useReportsTabReload(\n\t\tactiveTab,\n\t\tperiod,\n\t\twcpaySettings.accountDefaultCurrency || ''\n\t);\n\n\tuseEffect( () => {\n\t\tconst syncActiveTabFromUrl = () => {\n\t\t\tconst nextTab = normalizeReportsTab( getQuery().tab );\n\n\t\t\tsetActiveTab( nextTab );\n\t\t\tsetTabPanelKey( ( key ) => key + 1 );\n\t\t};\n\n\t\twindow.addEventListener( 'popstate', syncActiveTabFromUrl );\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'popstate', syncActiveTabFromUrl );\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\trecordEvent( 'page_view', {\n\t\t\tpath: 'payments_reports',\n\t\t\ttab: activeTab,\n\t\t} );\n\t\t// Mount-only — subsequent tab switches use wcpay_reports_tab_change.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( previousActiveTabRef.current !== activeTab ) {\n\t\t\ttabPanelWrapperRef.current\n\t\t\t\t?.querySelector< HTMLElement >(\n\t\t\t\t\t'[role=\"tab\"][aria-selected=\"true\"]'\n\t\t\t\t)\n\t\t\t\t?.focus();\n\t\t}\n\n\t\tpreviousActiveTabRef.current = activeTab;\n\t}, [ activeTab ] );\n\n\tconst onTabSelected = ( tab: string ) => {\n\t\tconst nextTab = normalizeReportsTab( tab );\n\n\t\tif ( nextTab === activeTab ) {\n\t\t\treturn;\n\t\t}\n\n\t\trecordEvent( 'wcpay_reports_tab_change', {\n\t\t\tfrom_tab: activeTab,\n\t\t\tto_tab: nextTab,\n\t\t} );\n\n\t\tsetActiveTab( nextTab );\n\t\tupdateQueryString(\n\t\t\t{\n\t\t\t\ttab: nextTab,\n\t\t\t},\n\t\t\t'/payments/reports'\n\t\t);\n\t};\n\n\treturn (\n\t\t<Page className=\"wcpay-reports-page\">\n\t\t\t<BalanceDateFilterNowContext.Provider value={ dateFilterNow }>\n\t\t\t\t<ReportsHeader activeTab={ activeTab } />\n\t\t\t\t<div ref={ tabPanelWrapperRef }>\n\t\t\t\t\t<TabPanel\n\t\t\t\t\t\tkey={ tabPanelKey }\n\t\t\t\t\t\tclassName=\"wcpay-reports-tab-panel\"\n\t\t\t\t\t\tactiveClass=\"active-tab\"\n\t\t\t\t\t\tonSelect={ onTabSelected }\n\t\t\t\t\t\tinitialTabName={ activeTab }\n\t\t\t\t\t\ttabs={ reportsTabs }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( tab ) => (\n\t\t\t\t\t\t\t<div className=\"wcpay-reports-content\">\n\t\t\t\t\t\t\t\t<ReportsTabPanel\n\t\t\t\t\t\t\t\t\ttab={ tab.name as ReportsTab }\n\t\t\t\t\t\t\t\t\tonReload={ reload }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</TabPanel>\n\t\t\t\t</div>\n\t\t\t</BalanceDateFilterNowContext.Provider>\n\t\t</Page>\n\t);\n};\n\nexport default ReportsPage;\n","/** @format */\n\n/**\n * External dependencies\n */\nimport { useCallback } from 'react';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as reportsStore } from 'wcpay/data/reports';\nimport type { ReportsPeriodRange } from './period-selector';\nimport type { ReportsTab } from './types';\n\ninterface WCPayResolutionDispatch {\n\tinvalidateResolution: ( selectorName: string, args: unknown[] ) => void;\n\tinvalidateResolutionForStoreSelector: ( selectorName: string ) => void;\n}\n\nexport function useReportsTabReload(\n\ttab: ReportsTab,\n\tperiod: ReportsPeriodRange,\n\tcurrency: string\n): ( periodOverride?: ReportsPeriodRange ) => void {\n\tconst { invalidateResolution, invalidateResolutionForStoreSelector } =\n\t\tuseDispatch( reportsStore ) as unknown as WCPayResolutionDispatch;\n\tconst normalizedCurrency = currency.toLowerCase();\n\n\treturn useCallback(\n\t\t( periodOverride?: ReportsPeriodRange ) => {\n\t\t\tif ( tab === 'fees' ) {\n\t\t\t\t// Invalidate all cached resolutions for the fees selector so\n\t\t\t\t// every in-flight or cached query is re-fetched on reload.\n\t\t\t\tinvalidateResolutionForStoreSelector( 'getReportsFees' );\n\t\t\t\tinvalidateResolutionForStoreSelector( 'getReportsFeesSummary' );\n\t\t\t} else {\n\t\t\t\tconst balancePeriod = periodOverride ?? period;\n\n\t\t\t\tinvalidateResolution( 'getReportsBalanceSummary', [\n\t\t\t\t\t{\n\t\t\t\t\t\tdateStart: balancePeriod.start,\n\t\t\t\t\t\tdateEnd: balancePeriod.end,\n\t\t\t\t\t\tcurrency: normalizedCurrency,\n\t\t\t\t\t},\n\t\t\t\t] );\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tinvalidateResolution,\n\t\t\tinvalidateResolutionForStoreSelector,\n\t\t\tnormalizedCurrency,\n\t\t\tperiod,\n\t\t\ttab,\n\t\t]\n\t);\n}\n","/** @format */\n\nexport interface ReportsPeriodRange {\n\tstart: string;\n\tend: string;\n}\n\nexport function getLastFullCalendarMonthUTC(\n\tnow: Date = new Date()\n): ReportsPeriodRange {\n\tconst start = new Date(\n\t\tDate.UTC( now.getUTCFullYear(), now.getUTCMonth() - 1, 1, 0, 0, 0 )\n\t);\n\tconst end = new Date(\n\t\tDate.UTC( now.getUTCFullYear(), now.getUTCMonth(), 0, 23, 59, 59, 999 )\n\t);\n\n\treturn {\n\t\tstart: start.toISOString(),\n\t\tend: end.toISOString(),\n\t};\n}\n","/** @format */\n\nexport const getResourceId = ( identifier ) => {\n\treturn JSON.stringify( identifier, Object.keys( identifier ).sort() );\n};\n"],"names":["SET_REPORTS_FEES","SET_ERROR_FOR_REPORTS_FEES","SET_REPORTS_FEES_SUMMARY","SET_ERROR_FOR_REPORTS_FEES_SUMMARY","SET_REPORTS_BALANCE_SUMMARY","SET_ERROR_FOR_REPORTS_BALANCE_SUMMARY","updateReportsFees","query","data","type","TYPES","updateErrorForReportsFees","error","updateReportsFeesSummary","updateErrorForReportsFeesSummary","updateReportsBalanceSummary","updateErrorForReportsBalanceSummary","skippedReportsBalanceSummaryResult","summary","isLoading","sortDateBetween","dateBetween","Array","isArray","sort","a","b","moment","diff","useReportsFees","paged","per_page","perPage","orderby","order","match","date_before","dateBefore","date_after","dateAfter","date_between","payment_method_type","paymentMethodType","order_id","orderId","deposit_id","depositId","customer_email","customerEmail","search","useSelect","select","getReportsFees","getReportsFeesError","isResolving","STORE_NAME","Number","isNaN","parseInt","feesRows","feesError","JSON","stringify","useReportsBalanceSummary","period","currency","wcpaySettings","accountDefaultCurrency","getReportsBalanceSummary","getReportsBalanceSummaryError","dateStart","start","dateEnd","end","toLowerCase","useReportsFeesSummary","getReportsFeesSummary","getReportsFeesSummaryError","feesSummary","feesSummaryError","defaultState","balanceSummary","receiveReports","state","index","getResourceId","undefined","toArrayOrUndefined","value","formatQueryFilters","formatDateValue","user_timezone","getUserTimeZone","formatReportsBalanceQuery","date_start","date_end","path","addQueryArgs","NAMESPACE","page","direction","results","apiFetch","getReportsFeesRows","e","controls","dispatch","__","feesDownloadEndpoint","getFeesCSVRequestURL","user_email","userEmail","locale","console","EMPTY_ARRAY","EMPTY_OBJECT","getReportsState","reports","getReportsFeesForQuery","getReportsFeesSummaryForQuery","getReportsBalanceSummaryForQuery","REPORTS_STORE_NAME","store","createReduxStore","reducer","combineReducers","actions","selectors","resolvers","register","DEPOSITS_STORE_NAME","TRANSACTIONS_STORE_NAME","CHARGES_STORE_NAME","TIMELINE_STORE_NAME","DISPUTES_STORE_NAME","SETTINGS_STORE_NAME","READERS_STORE_NAME","CAPITAL_STORE_NAME","DOCUMENTS_STORE_NAME","PAYMENT_INTENTS_STORE_NAME","AUTHORIZATIONS_STORE_NAME","FILES_STORE_NAME","PM_PROMOTIONS_STORE_NAME","DISPUTE_READINESS_STORE_NAME","useReportExport","isExportInProgress","setIsExportInProgress","useState","createNotice","useDispatch","timeoutIdRef","useRef","async","pollForFile","checkFileURL","interval","retryCount","onSuccess","onError","current","setTimeout","nextRetryCount","exportedFileURLResponse","method","status","download_url","link","document","createElement","href","click","reason","useEffect","clearTimeout","requestReportExport","exportRequestURL","exportFileAvailabilityEndpoint","response","export_id","BalanceDateFilterNowContext","createContext","YMD","isYmd","test","parseDateFilterFromQuery","between","length","operator","before","after","serializeDateFilterToQuery","params","isDateQueryValue","isLegacyLocalDateTime","getFeesDateFilterValue","filter","buildFeesDateQueryFromFilter","dateFilter","parseFeesDateFilterFromQuery","field","buildFeesDateQueryFromUrlQuery","getDateBetweenQueryValue","serializeFeesDateFilterToQuery","date_preset","getFeesDateFilterRangeDays","Date","getTime","Math","round","hasValue","buildFeesExportQuery","FeesExportButton","currentQuery","getQuery","totalRows","count","_jsx","Button","variant","onClick","currentUserEmail","wcSettings","userLocale","exportTotalRows","getFeesSummaryCount","fallback","reportsStore","buildFeesSummaryStoreQuery","window","confirm","sprintf","recordEvent","row_type","source","exported_row_count","error_type","disabled","accessibleWhenDisabled","isBusy","__next40pxDefaultSize","children","LazyBalanceActions","lazy","then","BalanceActions","default","LazyLoadedBalanceActions","Suspense","ReportsHeader","activeTab","_jsxs","className","LoadingReportState","headingRef","headingTabIndex","role","ref","tabIndex","LazyBalanceReport","BalanceReport","LazyLoadedBalanceReport","onReload","LazyFeesReport","FeesReport","LazyLoadedFeesReport","reportsTabs","name","title","normalizeReportsTab","tab","ReportsTabPanel","ReportsPage","now","setActiveTab","tabPanelKey","setTabPanelKey","dateFilterNow","tabPanelWrapperRef","previousActiveTabRef","useMemo","getLastFullCalendarMonthUTC","reload","invalidateResolution","invalidateResolutionForStoreSelector","normalizedCurrency","useCallback","periodOverride","balancePeriod","useReportsTabReload","syncActiveTabFromUrl","nextTab","key","addEventListener","removeEventListener","querySelector","focus","Page","Provider","TabPanel","activeClass","onSelect","from_tab","to_tab","updateQueryString","initialTabName","tabs","UTC","getUTCFullYear","getUTCMonth","toISOString","identifier","Object","keys"],"sourceRoot":""}

Youez - 2016 - github.com/yon3zu
LinuXploit