src/components/ebay-carousel/index.js
function getOffset(state) {
    const { items, index } = state;
    if (!items.length) {
        return 0;
    }
    return Math.min(items[index].left, getMaxOffset(state)) || 0;
}
function getOffset(state) {
    const { items, index } = state;
    if (!items.length) {
        return 0;
    }
    return Math.min(items[index].left, getMaxOffset(state)) || 0;
}
function getOffset ( state ) { const { items , index } = state ; if ( ! items . length ) { return 0 ; } return Math . min ( items [ index ] . left , getMaxOffset ( state ) ) || 0 ; }
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}
Given the current widget state finds the active offset left of the selected item . Also automatically caps the offset at the max offset .