n which the transition applies to.
       * @param {int} [time] - The amount of time for the transition to occur over in ms.
       */
      function fade_out(element, time) {
        return new Promise((resolve) => {
          var time_per_increment = time / 100;

          var fade_out = setInterval(function () {
            if (!element.style.opacity) {
              element.style.opacity = 1;
            }

            let currentOpacity = parseFloat(element.style.opacity);
            if (currentOpacit