code: function getOffset(state) {
      const { items, index } = state;
      if (!items.length) {
          return 0;
      }
      return Math.min(items[index].left, getMaxOffset(state)) || 0;
  }
docs: Given the current widget state, finds the active offset left of the selected item.
  Also automatically caps the offset at the max offset.
  
  @param {object} state The widget state.
  @return {number}