'use strict' ; import type DataEventEmitter from '../DataEventEmitter' ; import DataModifier from './DataModifier.js' ; import DataTable from '../DataTable.js' ; import U from '../../Core/Utilities.js' ; const { merge } = U ; private class SeriesPointsModifier extends DataModifier { /**
     * Default options for the series points modifier.
     */ public static readonly defaultOptions : SeriesPointsModifier . Options = { modifier : 'SeriesPoints' } ; param { SeriesPointsModifier . Options } options public constructor ( options ? ) { super ( ) ; this . options = merge ( SeriesPointsModifier . defaultOptions , options ) ; } /**
     * Options of the series points modifier.
     */ public options : SeriesPointsModifier . Options ; param { DataTable } table param { DataEventEmitter . EventDetail } eventDetail return { DataTable } public modifyTable < T extends DataTable > ( table , eventDetail ? ) { const modifier = this ; modifier . emit ( { type : 'modify' , detail : eventDetail , table } ) ; const aliasMap = modifier . options . aliasMap || { } , aliases = Object . keys ( aliasMap ) , modified = table . modified = table . clone ( false , eventDetail ) ; for ( let i = 0 , iEnd = aliases . length , alias ; i < iEnd ; ++ i ) { alias = aliases [ i ] ; modified . renameColumn ( aliasMap [ alias ] , alias ) ; } modifier . emit ( { type : 'afterModify' , detail : eventDetail , table } ) ; return table ; } } /**
 * Additionally provided types for modifier events and options, and JSON
 * conversion.
 */ namespace SeriesPointsModifier { /**
     * Options to configure the modifier.
     */ export interface Options extends DataModifier . Options { aliasMap ? : Record < string , string > ; } } DataModifier . addModifier ( SeriesPointsModifier ) ; declare module './ModifierType' { interface ModifierTypeRegistry { SeriesPoints : typeof SeriesPointsModifier ; } } export default SeriesPointsModifier ;