locationFromCfi(cfi) {
    let loc;

    if (epubcfi["a" /* default */].prototype.isCfiString(cfi)) {
      cfi = new epubcfi["a" /* default */](cfi);
    } // Check if the location has not been set yet


    if (this._locations.length === 0) {
      return -1;
    }

    loc = Object(core["locationOf"])(cfi, this._locations, this.epubcfi.compare);

    if (loc > this.total) {
      return this.total;
    }

    return loc;
  }
Get a location from an EpubCFI
@param {EpubCFI} cfi
@return {number}