System.register(["src/external/dexie.js"], function (_export, _context) {
  "use strict";

  var Dexie;
  return {
    setters: [function (_srcExternalDexieJs) {
      Dexie = _srcExternalDexieJs.default;
    }],
    execute: function () {
      _recorder_._src_client_bootlog_js = _recorder_._src_client_bootlog_js || {};
      _recorder_._src_client_bootlog_js.Dexie = Dexie;
      class Bootlog {

        static current() {
          if (!this._current) {
            this._current = new _recorder_._src_client_bootlog_js.Bootlog("bootlog");
          }
          return this._current;
        }

        clear() {
          this.db.files.clear();
        }

        constructor(name) {
          this.name = name;
          this.db = this.bootlogDB();
        }

        bootlogDB() {
          var db = new _recorder_._src_client_bootlog_js.Dexie(this.name);
          db.version("1").stores({
            logs: '++id,url, date, mode'
          }).upgrade(function () {});
          return db;
        }

        async addLogs(logArray) {
          this.db.transaction("rw", this.db.logs, () => {
            for (var ea of logArray) {
              this.db.logs.put(ea);
            }
          });
        }

      }

      _export("default", Bootlog);

      _recorder_._src_client_bootlog_js.Bootlog = Bootlog;
    }
  };
});