export function calculateImpactBuilder ( sums ? ) { const sumValues = ( sums ?? [ ] ) . filter ( ( value ) => value !== null ) as number [ ] ; const max = Math . max ( ... sumValues ) ; const min = Math . min ( ... sumValues ) ; return ( sum ) => sum !== null && sum !== undefined ? ( ( sum - min ) / ( max - min ) ) * 100 || 0 : 0 ; }