open(input, what) {
    var opening;
    var type = what || this.determineType(input);

    if (type === INPUT_TYPE.BINARY) {
      this.archived = true;
      this.url = new utils_url["a" /* default */]("/", "");
      opening = this.openEpub(input);
    } else if (type === INPUT_TYPE.BASE64) {
      this.archived = true;
      this.url = new utils_url["a" /* default */]("/", "");
      opening = this.openEpub(input, type);
    } else if (type === INPUT_TYPE.EPUB) {
      this.archived = true;
      this.url = new utils_url["a" /* default */]("/", "");
      opening = this.request(input, "binary", this.settings.requestCredentials, this.settings.requestHeaders).then(this.openEpub.bind(this));
    } else if (type == INPUT_TYPE.OPF) {
      this.url = new utils_url["a" /* default */](input);
      opening = this.openPackaging(this.url.Path.toString());
    } else if (type == INPUT_TYPE.MANIFEST) {
      this.url = new utils_url["a" /* default */](input);
      opening = this.openManifest(this.url.Path.toString());
    } else {
      this.url = new utils_url["a" /* default */](input);
      opening = this.openContainer(CONTAINER_PATH).then(this.openPackaging.bind(this));
    }

    return opening;
  }
Open a epub or url
@param {string | ArrayBuffer} input Url, Path or ArrayBuffer
@param {string} [what="binary", "base64", "epub", "opf", "json", "directory"] force opening as a certain type
@returns {Promise} of when the book has been loaded
@example book.open("/path/to/book.epub")