);

    function output(text) {
      console.log(text);
      if (outputElement) {
        var date = new Date(Date.now())
        outputElement.value += date.toLocaleDateString(undefined, { year: "2-digit", month: "2-digit", day: "2-digit", hour: "numeric", minute: "numeric", second: "numeric" }) + ": " + text + "\n";
        outputElement.scrollTop = outputElement.scrollHeight; // focus on bottom
      }
    }

    var Module = {
      preRun: [],
      postRun: [],
      print: (function () {
        if