recalculatePercentages = (languages) => {
  const totalSum = languages.reduce(
    (totalSum, language) => totalSum + language.percent,
    0,
  );
  const weight = +(100 / totalSum).toFixed(2);
  languages.forEach((language) => {
    language.percent = +(language.percent * weight).toFixed(2);
  });
}
Recalculating percentages so that, compact layout's progress bar does not break when
hiding languages.

@param {WakaTimeLang[]} languages The languages array.
@returns {void} The recalculated languages array.