<commit_before>var defaults = {
    direction: 'horizontal',
    touchEventsTarget: 'container',
    initialSlide: 0,
    speed: 300,
    // autoplay
    autoplay: false,
    autoplayDisableOnInteraction: true,
    autoplayStopOnLast: false,
    // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
    iOSEdgeSwipeDetection: false,
    iOSEdgeSwipeThreshold: 20,
    // Free mode
    freeMode: false,
    freeModeMomentum: true,
    freeModeMomentumRatio: 1,
    freeModeMomentumBounce: true,
    freeModeMomentumBounceRatio: 1,
    freeModeSticky: false,
    freeModeMinimumVelocity: 0.02,
    // Autoheight
    autoHeight: false,
    // Set wrapper width
    setWrapperSize: false,
    // Virtual Translate
    virtualTranslate: false,
    // Effects
    effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
    coverflow: {
        rotate: 50,
        stretch: 0,
        depth: 100,
        modifier: 1,
        slideShadows : true
    },
    flip: {
        slideShadows : true,
        limitRotation: true
    },
    cube: {
        slideShadows: true,
        shadow: true,
        shadowOffset: 20,
        shadowScale: 0.94
    },
    fade: {
        crossFade: false
    },
    // Parallax
    parallax: false,
    // Scrollbar
    scrollbar: null,
    scrollbarHide: true,
    scrollbarDraggable: false,
    scrollbarSnapOnRelease: false,
    // Keyboard Mousewheel
    keyboardControl: false,
    mousewheelControl: false,
    mousewheelReleaseOnEdges: false,
    mousewheelInvert: false,
    mousewheelForceToAxis: false,
    mousewheelSensitivity: 1,
    // Hash Navigation
    hashnav: false,
    hashnavReplaceState: false,
    // Breakpoints
    breakpoints: undefined,
    // Slides grid
    spaceBetween: 0,
    slidesPerView: 1,
    slidesPerColumn: 1,
    slidesPerColumnFill: 'column',
    slidesPerGroup: 1,
    centeredSlides: false,
    slidesOffsetBefore: 0, // in px
    slidesOffsetAfter: 0, // in px
    // Round length
    roundLengths: false,
    // Touches
    touchRatio: 1,
    touchAngle: 45,
    simulateTouch: true,
    shortSwipes: true,
    longSwipes: true,
    longSwipesRatio: 0.5,
    longSwipesMs: 300,
    followFinger: true,
    onlyExternal: false,
    threshold: 0,
    touchMoveStopPropagation: true,
    // Unique Navigation Elements
    uniqueNavElements: true,
    // Pagination
    pagination: null,
    paginationElement: 'span',
    paginationClickable: false,
    paginationHide: false,
    paginationBulletRender: null,
    paginationProgressRender: null,
    paginationFractionRender: null,
    paginationCustomRender: null,
    paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'
    // Resistance
    resistance: true,
    resistanceRatio: 0.85,
    // Next/prev buttons
    nextButton: null,
    prevButton: null,
    // Progress
    watchSlidesProgress: false,
    watchSlidesVisibility: false,
    // Cursor
    grabCursor: false,
    // Clicks
    preventClicks: true,
    preventClicksPropagation: true,
    slideToClickedSlide: false,
    // Lazy Loading
    lazyLoading: false,
    lazyLoadingInPrevNext: false,
    lazyLoadingInPrevNextAmount: 1,
    lazyLoadingOnTransitionStart: false,
    // Images
    preloadImages: true,
    updateOnImagesReady: true,
    // loop
    loop: false,
    loopAdditionalSlides: 0,
    loopedSlides: null,
    // Control
    control: undefined,
    controlInverse: false,
    controlBy: 'slide', //or 'container'
    // Swiping/no swiping
    allowSwipeToPrev: true,
    allowSwipeToNext: true,
    swipeHandler: null, //'.swipe-handler',
    noSwiping: true,
    noSwipingClass: 'swiper-no-swiping',
    // NS
    slideClass: 'swiper-slide',
    slideActiveClass: 'swiper-slide-active',
    slideVisibleClass: 'swiper-slide-visible',
    slideDuplicateClass: 'swiper-slide-duplicate',
    slideNextClass: 'swiper-slide-next',
    slidePrevClass: 'swiper-slide-prev',
    wrapperClass: 'swiper-wrapper',
    bulletClass: 'swiper-pagination-bullet',
    bulletActiveClass: 'swiper-pagination-bullet-active',
    buttonDisabledClass: 'swiper-button-disabled',
    paginationCurrentClass: 'swiper-pagination-current',
    paginationTotalClass: 'swiper-pagination-total',
    paginationHiddenClass: 'swiper-pagination-hidden',
    paginationProgressbarClass: 'swiper-pagination-progressbar',
    lazyLoadingClass: 'swiper-lazy',
    // Observer
    observer: false,
    observeParents: false,
    // Accessibility
    a11y: false,
    prevSlideMessage: 'Previous slide',
    nextSlideMessage: 'Next slide',
    firstSlideMessage: 'This is the first slide',
    lastSlideMessage: 'This is the last slide',
    paginationBulletMessage: 'Go to slide {{index}}',
    // Callbacks
    runCallbacksOnInit: true
    /*
    Callbacks:
    onInit: function (swiper)
    onDestroy: function (swiper)
    onClick: function (swiper, e)
    onTap: function (swiper, e)
    onDoubleTap: function (swiper, e)
    onSliderMove: function (swiper, e)
    onSlideChangeStart: function (swiper)
    onSlideChangeEnd: function (swiper)
    onTransitionStart: function (swiper)
    onTransitionEnd: function (swiper)
    onImagesReady: function (swiper)
    onProgress: function (swiper, progress)
    onTouchStart: function (swiper, e)
    onTouchMove: function (swiper, e)
    onTouchMoveOpposite: function (swiper, e)
    onTouchEnd: function (swiper, e)
    onReachBeginning: function (swiper)
    onReachEnd: function (swiper)
    onSetTransition: function (swiper, duration)
    onSetTranslate: function (swiper, translate)
    onAutoplayStart: function (swiper)
    onAutoplayStop: function (swiper),
    onLazyImageLoad: function (swiper, slide, image)
    onLazyImageReady: function (swiper, slide, image)
    */

};
var initialVirtualTranslate = params && params.virtualTranslate;

params = params || {};
var originalParams = {};
for (var param in params) {
    if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {
        originalParams[param] = {};
        for (var deepParam in params[param]) {
            originalParams[param][deepParam] = params[param][deepParam];
        }
    }
    else {
        originalParams[param] = params[param];
    }
}
for (var def in defaults) {
    if (typeof params[def] === 'undefined') {
        params[def] = defaults[def];
    }
    else if (typeof params[def] === 'object') {
        for (var deepDef in defaults[def]) {
            if (typeof params[def][deepDef] === 'undefined') {
                params[def][deepDef] = defaults[def][deepDef];
            }
        }
    }
}

// Swiper
var s = this;

// Params
s.params = params;
s.originalParams = originalParams;

// Classname
s.classNames = [];
/*=========================
  Dom Library and plugins
  ===========================*/
if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){
    $ = Dom7;
}
if (typeof $ === 'undefined') {
    if (typeof Dom7 === 'undefined') {
        $ = window.Dom7 || window.Zepto || window.jQuery;
    }
    else {
        $ = Dom7;
    }
    if (!$) return;
}
// Export it to Swiper instance
s.$ = $;

/*=========================
  Breakpoints
  ===========================*/
s.currentBreakpoint = undefined;
s.getActiveBreakpoint = function () {
    //Get breakpoint for window width
    if (!s.params.breakpoints) return false;
    var breakpoint = false;
    var points = [], point;
    for ( point in s.params.breakpoints ) {
        if (s.params.breakpoints.hasOwnProperty(point)) {
            points.push(point);
        }
    }
    points.sort(function (a, b) {
        return parseInt(a, 10) > parseInt(b, 10);
    });
    for (var i = 0; i < points.length; i++) {
        point = points[i];
        if (point >= window.innerWidth && !breakpoint) {
            breakpoint = point;
        }
    }
    return breakpoint || 'max';
};
s.setBreakpoint = function () {
    //Set breakpoint for window width and update parameters
    var breakpoint = s.getActiveBreakpoint();
    if (breakpoint && s.currentBreakpoint !== breakpoint) {
        var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;
        var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);
        for ( var param in breakPointsParams ) {
            s.params[param] = breakPointsParams[param];
        }
        s.currentBreakpoint = breakpoint;
        if(needsReLoop && s.destroyLoop) {
            s.reLoop(true);
        }
    }
};
// Set breakpoint on load
if (s.params.breakpoints) {
    s.setBreakpoint();
}

/*=========================
  Preparation - Define Container, Wrapper and Pagination
  ===========================*/
s.container = $(container);
if (s.container.length === 0) return;
if (s.container.length > 1) {
    var swipers = [];
    s.container.each(function () {
        var container = this;
        swipers.push(new Swiper(this, params));
    });
    return swipers;
}

// Save instance in container HTML Element and in data
s.container[0].swiper = s;
s.container.data('swiper', s);

s.classNames.push('swiper-container-' + s.params.direction);

if (s.params.freeMode) {
    s.classNames.push('swiper-container-free-mode');
}
if (!s.support.flexbox) {
    s.classNames.push('swiper-container-no-flexbox');
    s.params.slidesPerColumn = 1;
}
if (s.params.autoHeight) {
    s.classNames.push('swiper-container-autoheight');
}
// Enable slides progress when required
if (s.params.parallax || s.params.watchSlidesVisibility) {
    s.params.watchSlidesProgress = true;
}
// Coverflow / 3D
if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {
    if (s.support.transforms3d) {
        s.params.watchSlidesProgress = true;
        s.classNames.push('swiper-container-3d');
    }
    else {
        s.params.effect = 'slide';
    }
}
if (s.params.effect !== 'slide') {
    s.classNames.push('swiper-container-' + s.params.effect);
}
if (s.params.effect === 'cube') {
    s.params.resistanceRatio = 0;
    s.params.slidesPerView = 1;
    s.params.slidesPerColumn = 1;
    s.params.slidesPerGroup = 1;
    s.params.centeredSlides = false;
    s.params.spaceBetween = 0;
    s.params.virtualTranslate = true;
    s.params.setWrapperSize = false;
}
if (s.params.effect === 'fade' || s.params.effect === 'flip') {
    s.params.slidesPerView = 1;
    s.params.slidesPerColumn = 1;
    s.params.slidesPerGroup = 1;
    s.params.watchSlidesProgress = true;
    s.params.spaceBetween = 0;
    s.params.setWrapperSize = false;
    if (typeof initialVirtualTranslate === 'undefined') {
        s.params.virtualTranslate = true;
    }
}

// Grab Cursor
if (s.params.grabCursor && s.support.touch) {
    s.params.grabCursor = false;
}

// Wrapper
s.wrapper = s.container.children('.' + s.params.wrapperClass);

// Pagination
if (s.params.pagination) {
    s.paginationContainer = $(s.params.pagination);
    if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {
        s.paginationContainer = s.container.find(s.params.pagination);
    }

    if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {
        s.paginationContainer.addClass('swiper-pagination-clickable');
    }
    else {
        s.params.paginationClickable = false;
    }
    s.paginationContainer.addClass('swiper-pagination-' + s.params.paginationType);
}
// Next/Prev Buttons
if (s.params.nextButton || s.params.prevButton) {
    if (s.params.nextButton) {
        s.nextButton = $(s.params.nextButton);
        if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {
            s.nextButton = s.container.find(s.params.nextButton);
        }
    }
    if (s.params.prevButton) {
        s.prevButton = $(s.params.prevButton);
        if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {
            s.prevButton = s.container.find(s.params.prevButton);
        }
    }
}

// Is Horizontal
s.isHorizontal = function () {
    return s.params.direction === 'horizontal';
};
// s.isH = isH;

// RTL
s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');
if (s.rtl) {
    s.classNames.push('swiper-container-rtl');
}

// Wrong RTL support
if (s.rtl) {
    s.wrongRTL = s.wrapper.css('display') === '-webkit-box';
}

// Columns
if (s.params.slidesPerColumn > 1) {
    s.classNames.push('swiper-container-multirow');
}

// Check for Android
if (s.device.android) {
    s.classNames.push('swiper-container-android');
}

// Add classes
s.container.addClass(s.classNames.join(' '));

// Translate
s.translate = 0;

// Progress
s.progress = 0;

// Velocity
s.velocity = 0;

/*=========================
  Locks, unlocks
  ===========================*/
s.lockSwipeToNext = function () {
    s.params.allowSwipeToNext = false;
    if (s.params.allowSwipeToPrev === false && s.params.grabCursor) {
        s.unsetGrabCursor();
    }
};
s.lockSwipeToPrev = function () {
    s.params.allowSwipeToPrev = false;
    if (s.params.allowSwipeToNext === false && s.params.grabCursor) {
        s.unsetGrabCursor();
    }
};
s.lockSwipes = function () {
    s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;
    if (s.params.grabCursor) s.unsetGrabCursor();
};
s.unlockSwipeToNext = function () {
    s.params.allowSwipeToNext = true;
    if (s.params.allowSwipeToPrev === true && s.params.grabCursor) {
        s.setGrabCursor();
    }
};
s.unlockSwipeToPrev = function () {
    s.params.allowSwipeToPrev = true;
    if (s.params.allowSwipeToNext === true && s.params.grabCursor) {
        s.setGrabCursor();
    }
};
s.unlockSwipes = function () {
    s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;
    if (s.params.grabCursor) s.setGrabCursor();
};

/*=========================
  Round helper
  ===========================*/
function round(a) {
    return Math.floor(a);
}
/*=========================
  Set grab cursor
  ===========================*/
s.setGrabCursor = function(moving) {
    s.container[0].style.cursor = 'move';
    s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
    s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
    s.container[0].style.cursor = moving ? 'grabbing': 'grab';
};
s.unsetGrabCursor = function () {
    s.container[0].style.cursor = '';
};
if (s.params.grabCursor) {
    s.setGrabCursor();
}
/*=========================
  Update on Images Ready
  ===========================*/
s.imagesToLoad = [];
s.imagesLoaded = 0;

s.loadImage = function (imgElement, src, srcset, checkForComplete, callback) {
    var image;
    function onReady () {
        if (callback) callback();
    }
    if (!imgElement.complete || !checkForComplete) {
        if (src) {
            image = new window.Image();
            image.onload = onReady;
            image.onerror = onReady;
            if (srcset) {
                image.srcset = srcset;
            }
            if (src) {
                image.src = src;
            }
        } else {
            onReady();
        }

    } else {//image already loaded...
        onReady();
    }
};
s.preloadImages = function () {
    s.imagesToLoad = s.container.find('img');
    function _onReady() {
        if (typeof s === 'undefined' || s === null) return;
        if (s.imagesLoaded !== undefined) s.imagesLoaded++;
        if (s.imagesLoaded === s.imagesToLoad.length) {
            if (s.params.updateOnImagesReady) s.update();
            s.emit('onImagesReady', s);
        }
    }
    for (var i = 0; i < s.imagesToLoad.length; i++) {
        s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), true, _onReady);
    }
};

/*=========================
  Autoplay
  ===========================*/
s.autoplayTimeoutId = undefined;
s.autoplaying = false;
s.autoplayPaused = false;
function autoplay() {
    s.autoplayTimeoutId = setTimeout(function () {
        if (s.params.loop) {
            s.fixLoop();
            s._slideNext();
            s.emit('onAutoplay', s);
        }
        else {
            if (!s.isEnd) {
                s._slideNext();
                s.emit('onAutoplay', s);
            }
            else {
                if (!params.autoplayStopOnLast) {
                    s._slideTo(0);
                    s.emit('onAutoplay', s);
                }
                else {
                    s.stopAutoplay();
                }
            }
        }
    }, s.params.autoplay);
}
s.startAutoplay = function () {
    if (typeof s.autoplayTimeoutId !== 'undefined') return false;
    if (!s.params.autoplay) return false;
    if (s.autoplaying) return false;
    s.autoplaying = true;
    s.emit('onAutoplayStart', s);
    autoplay();
};
s.stopAutoplay = function (internal) {
    if (!s.autoplayTimeoutId) return;
    if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
    s.autoplaying = false;
    s.autoplayTimeoutId = undefined;
    s.emit('onAutoplayStop', s);
};
s.pauseAutoplay = function (speed) {
    if (s.autoplayPaused) return;
    if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
    s.autoplayPaused = true;
    if (speed === 0) {
        s.autoplayPaused = false;
        autoplay();
    }
    else {
        s.wrapper.transitionEnd(function () {
            if (!s) return;
            s.autoplayPaused = false;
            if (!s.autoplaying) {
                s.stopAutoplay();
            }
            else {
                autoplay();
            }
        });
    }
};
/*=========================
  Min/Max Translate
  ===========================*/
s.minTranslate = function () {
    return (-s.snapGrid[0]);
};
s.maxTranslate = function () {
    return (-s.snapGrid[s.snapGrid.length - 1]);
};
/*=========================
  Slider/slides sizes
  ===========================*/
s.updateAutoHeight = function () {
    // Update Height
    var slide = s.slides.eq(s.activeIndex)[0];
    if (typeof slide !== 'undefined') {
        var newHeight = slide.offsetHeight;
        if (newHeight) s.wrapper.css('height', newHeight + 'px');
    }
};
s.updateContainerSize = function () {
    var width, height;
    if (typeof s.params.width !== 'undefined') {
        width = s.params.width;
    }
    else {
        width = s.container[0].clientWidth;
    }
    if (typeof s.params.height !== 'undefined') {
        height = s.params.height;
    }
    else {
        height = s.container[0].clientHeight;
    }
    if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {
        return;
    }

    //Subtract paddings
    width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);
    height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);<commit_msg>Fixing autoheight if slidesPerView is more than 1<commit_after>var defaults = {
    direction: 'horizontal',
    touchEventsTarget: 'container',
    initialSlide: 0,
    speed: 300,
    // autoplay
    autoplay: false,
    autoplayDisableOnInteraction: true,
    autoplayStopOnLast: false,
    // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
    iOSEdgeSwipeDetection: false,
    iOSEdgeSwipeThreshold: 20,
    // Free mode
    freeMode: false,
    freeModeMomentum: true,
    freeModeMomentumRatio: 1,
    freeModeMomentumBounce: true,
    freeModeMomentumBounceRatio: 1,
    freeModeSticky: false,
    freeModeMinimumVelocity: 0.02,
    // Autoheight
    autoHeight: false,
    // Set wrapper width
    setWrapperSize: false,
    // Virtual Translate
    virtualTranslate: false,
    // Effects
    effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
    coverflow: {
        rotate: 50,
        stretch: 0,
        depth: 100,
        modifier: 1,
        slideShadows : true
    },
    flip: {
        slideShadows : true,
        limitRotation: true
    },
    cube: {
        slideShadows: true,
        shadow: true,
        shadowOffset: 20,
        shadowScale: 0.94
    },
    fade: {
        crossFade: false
    },
    // Parallax
    parallax: false,
    // Scrollbar
    scrollbar: null,
    scrollbarHide: true,
    scrollbarDraggable: false,
    scrollbarSnapOnRelease: false,
    // Keyboard Mousewheel
    keyboardControl: false,
    mousewheelControl: false,
    mousewheelReleaseOnEdges: false,
    mousewheelInvert: false,
    mousewheelForceToAxis: false,
    mousewheelSensitivity: 1,
    // Hash Navigation
    hashnav: false,
    hashnavReplaceState: false,
    // Breakpoints
    breakpoints: undefined,
    // Slides grid
    spaceBetween: 0,
    slidesPerView: 1,
    slidesPerColumn: 1,
    slidesPerColumnFill: 'column',
    slidesPerGroup: 1,
    centeredSlides: false,
    slidesOffsetBefore: 0, // in px
    slidesOffsetAfter: 0, // in px
    // Round length
    roundLengths: false,
    // Touches
    touchRatio: 1,
    touchAngle: 45,
    simulateTouch: true,
    shortSwipes: true,
    longSwipes: true,
    longSwipesRatio: 0.5,
    longSwipesMs: 300,
    followFinger: true,
    onlyExternal: false,
    threshold: 0,
    touchMoveStopPropagation: true,
    // Unique Navigation Elements
    uniqueNavElements: true,
    // Pagination
    pagination: null,
    paginationElement: 'span',
    paginationClickable: false,
    paginationHide: false,
    paginationBulletRender: null,
    paginationProgressRender: null,
    paginationFractionRender: null,
    paginationCustomRender: null,
    paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'
    // Resistance
    resistance: true,
    resistanceRatio: 0.85,
    // Next/prev buttons
    nextButton: null,
    prevButton: null,
    // Progress
    watchSlidesProgress: false,
    watchSlidesVisibility: false,
    // Cursor
    grabCursor: false,
    // Clicks
    preventClicks: true,
    preventClicksPropagation: true,
    slideToClickedSlide: false,
    // Lazy Loading
    lazyLoading: false,
    lazyLoadingInPrevNext: false,
    lazyLoadingInPrevNextAmount: 1,
    lazyLoadingOnTransitionStart: false,
    // Images
    preloadImages: true,
    updateOnImagesReady: true,
    // loop
    loop: false,
    loopAdditionalSlides: 0,
    loopedSlides: null,
    // Control
    control: undefined,
    controlInverse: false,
    controlBy: 'slide', //or 'container'
    // Swiping/no swiping
    allowSwipeToPrev: true,
    allowSwipeToNext: true,
    swipeHandler: null, //'.swipe-handler',
    noSwiping: true,
    noSwipingClass: 'swiper-no-swiping',
    // NS
    slideClass: 'swiper-slide',
    slideActiveClass: 'swiper-slide-active',
    slideVisibleClass: 'swiper-slide-visible',
    slideDuplicateClass: 'swiper-slide-duplicate',
    slideNextClass: 'swiper-slide-next',
    slidePrevClass: 'swiper-slide-prev',
    wrapperClass: 'swiper-wrapper',
    bulletClass: 'swiper-pagination-bullet',
    bulletActiveClass: 'swiper-pagination-bullet-active',
    buttonDisabledClass: 'swiper-button-disabled',
    paginationCurrentClass: 'swiper-pagination-current',
    paginationTotalClass: 'swiper-pagination-total',
    paginationHiddenClass: 'swiper-pagination-hidden',
    paginationProgressbarClass: 'swiper-pagination-progressbar',
    lazyLoadingClass: 'swiper-lazy',
    // Observer
    observer: false,
    observeParents: false,
    // Accessibility
    a11y: false,
    prevSlideMessage: 'Previous slide',
    nextSlideMessage: 'Next slide',
    firstSlideMessage: 'This is the first slide',
    lastSlideMessage: 'This is the last slide',
    paginationBulletMessage: 'Go to slide {{index}}',
    // Callbacks
    runCallbacksOnInit: true
    /*
    Callbacks:
    onInit: function (swiper)
    onDestroy: function (swiper)
    onClick: function (swiper, e)
    onTap: function (swiper, e)
    onDoubleTap: function (swiper, e)
    onSliderMove: function (swiper, e)
    onSlideChangeStart: function (swiper)
    onSlideChangeEnd: function (swiper)
    onTransitionStart: function (swiper)
    onTransitionEnd: function (swiper)
    onImagesReady: function (swiper)
    onProgress: function (swiper, progress)
    onTouchStart: function (swiper, e)
    onTouchMove: function (swiper, e)
    onTouchMoveOpposite: function (swiper, e)
    onTouchEnd: function (swiper, e)
    onReachBeginning: function (swiper)
    onReachEnd: function (swiper)
    onSetTransition: function (swiper, duration)
    onSetTranslate: function (swiper, translate)
    onAutoplayStart: function (swiper)
    onAutoplayStop: function (swiper),
    onLazyImageLoad: function (swiper, slide, image)
    onLazyImageReady: function (swiper, slide, image)
    */

};
var initialVirtualTranslate = params && params.virtualTranslate;

params = params || {};
var originalParams = {};
for (var param in params) {
    if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {
        originalParams[param] = {};
        for (var deepParam in params[param]) {
            originalParams[param][deepParam] = params[param][deepParam];
        }
    }
    else {
        originalParams[param] = params[param];
    }
}
for (var def in defaults) {
    if (typeof params[def] === 'undefined') {
        params[def] = defaults[def];
    }
    else if (typeof params[def] === 'object') {
        for (var deepDef in defaults[def]) {
            if (typeof params[def][deepDef] === 'undefined') {
                params[def][deepDef] = defaults[def][deepDef];
            }
        }
    }
}

// Swiper
var s = this;

// Params
s.params = params;
s.originalParams = originalParams;

// Classname
s.classNames = [];
/*=========================
  Dom Library and plugins
  ===========================*/
if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){
    $ = Dom7;
}
if (typeof $ === 'undefined') {
    if (typeof Dom7 === 'undefined') {
        $ = window.Dom7 || window.Zepto || window.jQuery;
    }
    else {
        $ = Dom7;
    }
    if (!$) return;
}
// Export it to Swiper instance
s.$ = $;

/*=========================
  Breakpoints
  ===========================*/
s.currentBreakpoint = undefined;
s.getActiveBreakpoint = function () {
    //Get breakpoint for window width
    if (!s.params.breakpoints) return false;
    var breakpoint = false;
    var points = [], point;
    for ( point in s.params.breakpoints ) {
        if (s.params.breakpoints.hasOwnProperty(point)) {
            points.push(point);
        }
    }
    points.sort(function (a, b) {
        return parseInt(a, 10) > parseInt(b, 10);
    });
    for (var i = 0; i < points.length; i++) {
        point = points[i];
        if (point >= window.innerWidth && !breakpoint) {
            breakpoint = point;
        }
    }
    return breakpoint || 'max';
};
s.setBreakpoint = function () {
    //Set breakpoint for window width and update parameters
    var breakpoint = s.getActiveBreakpoint();
    if (breakpoint && s.currentBreakpoint !== breakpoint) {
        var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;
        var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);
        for ( var param in breakPointsParams ) {
            s.params[param] = breakPointsParams[param];
        }
        s.currentBreakpoint = breakpoint;
        if(needsReLoop && s.destroyLoop) {
            s.reLoop(true);
        }
    }
};
// Set breakpoint on load
if (s.params.breakpoints) {
    s.setBreakpoint();
}

/*=========================
  Preparation - Define Container, Wrapper and Pagination
  ===========================*/
s.container = $(container);
if (s.container.length === 0) return;
if (s.container.length > 1) {
    var swipers = [];
    s.container.each(function () {
        var container = this;
        swipers.push(new Swiper(this, params));
    });
    return swipers;
}

// Save instance in container HTML Element and in data
s.container[0].swiper = s;
s.container.data('swiper', s);

s.classNames.push('swiper-container-' + s.params.direction);

if (s.params.freeMode) {
    s.classNames.push('swiper-container-free-mode');
}
if (!s.support.flexbox) {
    s.classNames.push('swiper-container-no-flexbox');
    s.params.slidesPerColumn = 1;
}
if (s.params.autoHeight) {
    s.classNames.push('swiper-container-autoheight');
}
// Enable slides progress when required
if (s.params.parallax || s.params.watchSlidesVisibility) {
    s.params.watchSlidesProgress = true;
}
// Coverflow / 3D
if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {
    if (s.support.transforms3d) {
        s.params.watchSlidesProgress = true;
        s.classNames.push('swiper-container-3d');
    }
    else {
        s.params.effect = 'slide';
    }
}
if (s.params.effect !== 'slide') {
    s.classNames.push('swiper-container-' + s.params.effect);
}
if (s.params.effect === 'cube') {
    s.params.resistanceRatio = 0;
    s.params.slidesPerView = 1;
    s.params.slidesPerColumn = 1;
    s.params.slidesPerGroup = 1;
    s.params.centeredSlides = false;
    s.params.spaceBetween = 0;
    s.params.virtualTranslate = true;
    s.params.setWrapperSize = false;
}
if (s.params.effect === 'fade' || s.params.effect === 'flip') {
    s.params.slidesPerView = 1;
    s.params.slidesPerColumn = 1;
    s.params.slidesPerGroup = 1;
    s.params.watchSlidesProgress = true;
    s.params.spaceBetween = 0;
    s.params.setWrapperSize = false;
    if (typeof initialVirtualTranslate === 'undefined') {
        s.params.virtualTranslate = true;
    }
}

// Grab Cursor
if (s.params.grabCursor && s.support.touch) {
    s.params.grabCursor = false;
}

// Wrapper
s.wrapper = s.container.children('.' + s.params.wrapperClass);

// Pagination
if (s.params.pagination) {
    s.paginationContainer = $(s.params.pagination);
    if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {
        s.paginationContainer = s.container.find(s.params.pagination);
    }

    if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {
        s.paginationContainer.addClass('swiper-pagination-clickable');
    }
    else {
        s.params.paginationClickable = false;
    }
    s.paginationContainer.addClass('swiper-pagination-' + s.params.paginationType);
}
// Next/Prev Buttons
if (s.params.nextButton || s.params.prevButton) {
    if (s.params.nextButton) {
        s.nextButton = $(s.params.nextButton);
        if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {
            s.nextButton = s.container.find(s.params.nextButton);
        }
    }
    if (s.params.prevButton) {
        s.prevButton = $(s.params.prevButton);
        if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {
            s.prevButton = s.container.find(s.params.prevButton);
        }
    }
}

// Is Horizontal
s.isHorizontal = function () {
    return s.params.direction === 'horizontal';
};
// s.isH = isH;

// RTL
s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');
if (s.rtl) {
    s.classNames.push('swiper-container-rtl');
}

// Wrong RTL support
if (s.rtl) {
    s.wrongRTL = s.wrapper.css('display') === '-webkit-box';
}

// Columns
if (s.params.slidesPerColumn > 1) {
    s.classNames.push('swiper-container-multirow');
}

// Check for Android
if (s.device.android) {
    s.classNames.push('swiper-container-android');
}

// Add classes
s.container.addClass(s.classNames.join(' '));

// Translate
s.translate = 0;

// Progress
s.progress = 0;

// Velocity
s.velocity = 0;

/*=========================
  Locks, unlocks
  ===========================*/
s.lockSwipeToNext = function () {
    s.params.allowSwipeToNext = false;
    if (s.params.allowSwipeToPrev === false && s.params.grabCursor) {
        s.unsetGrabCursor();
    }
};
s.lockSwipeToPrev = function () {
    s.params.allowSwipeToPrev = false;
    if (s.params.allowSwipeToNext === false && s.params.grabCursor) {
        s.unsetGrabCursor();
    }
};
s.lockSwipes = function () {
    s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;
    if (s.params.grabCursor) s.unsetGrabCursor();
};
s.unlockSwipeToNext = function () {
    s.params.allowSwipeToNext = true;
    if (s.params.allowSwipeToPrev === true && s.params.grabCursor) {
        s.setGrabCursor();
    }
};
s.unlockSwipeToPrev = function () {
    s.params.allowSwipeToPrev = true;
    if (s.params.allowSwipeToNext === true && s.params.grabCursor) {
        s.setGrabCursor();
    }
};
s.unlockSwipes = function () {
    s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;
    if (s.params.grabCursor) s.setGrabCursor();
};

/*=========================
  Round helper
  ===========================*/
function round(a) {
    return Math.floor(a);
}
/*=========================
  Set grab cursor
  ===========================*/
s.setGrabCursor = function(moving) {
    s.container[0].style.cursor = 'move';
    s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
    s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
    s.container[0].style.cursor = moving ? 'grabbing': 'grab';
};
s.unsetGrabCursor = function () {
    s.container[0].style.cursor = '';
};
if (s.params.grabCursor) {
    s.setGrabCursor();
}
/*=========================
  Update on Images Ready
  ===========================*/
s.imagesToLoad = [];
s.imagesLoaded = 0;

s.loadImage = function (imgElement, src, srcset, checkForComplete, callback) {
    var image;
    function onReady () {
        if (callback) callback();
    }
    if (!imgElement.complete || !checkForComplete) {
        if (src) {
            image = new window.Image();
            image.onload = onReady;
            image.onerror = onReady;
            if (srcset) {
                image.srcset = srcset;
            }
            if (src) {
                image.src = src;
            }
        } else {
            onReady();
        }

    } else {//image already loaded...
        onReady();
    }
};
s.preloadImages = function () {
    s.imagesToLoad = s.container.find('img');
    function _onReady() {
        if (typeof s === 'undefined' || s === null) return;
        if (s.imagesLoaded !== undefined) s.imagesLoaded++;
        if (s.imagesLoaded === s.imagesToLoad.length) {
            if (s.params.updateOnImagesReady) s.update();
            s.emit('onImagesReady', s);
        }
    }
    for (var i = 0; i < s.imagesToLoad.length; i++) {
        s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), true, _onReady);
    }
};

/*=========================
  Autoplay
  ===========================*/
s.autoplayTimeoutId = undefined;
s.autoplaying = false;
s.autoplayPaused = false;
function autoplay() {
    s.autoplayTimeoutId = setTimeout(function () {
        if (s.params.loop) {
            s.fixLoop();
            s._slideNext();
            s.emit('onAutoplay', s);
        }
        else {
            if (!s.isEnd) {
                s._slideNext();
                s.emit('onAutoplay', s);
            }
            else {
                if (!params.autoplayStopOnLast) {
                    s._slideTo(0);
                    s.emit('onAutoplay', s);
                }
                else {
                    s.stopAutoplay();
                }
            }
        }
    }, s.params.autoplay);
}
s.startAutoplay = function () {
    if (typeof s.autoplayTimeoutId !== 'undefined') return false;
    if (!s.params.autoplay) return false;
    if (s.autoplaying) return false;
    s.autoplaying = true;
    s.emit('onAutoplayStart', s);
    autoplay();
};
s.stopAutoplay = function (internal) {
    if (!s.autoplayTimeoutId) return;
    if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
    s.autoplaying = false;
    s.autoplayTimeoutId = undefined;
    s.emit('onAutoplayStop', s);
};
s.pauseAutoplay = function (speed) {
    if (s.autoplayPaused) return;
    if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);
    s.autoplayPaused = true;
    if (speed === 0) {
        s.autoplayPaused = false;
        autoplay();
    }
    else {
        s.wrapper.transitionEnd(function () {
            if (!s) return;
            s.autoplayPaused = false;
            if (!s.autoplaying) {
                s.stopAutoplay();
            }
            else {
                autoplay();
            }
        });
    }
};
/*=========================
  Min/Max Translate
  ===========================*/
s.minTranslate = function () {
    return (-s.snapGrid[0]);
};
s.maxTranslate = function () {
    return (-s.snapGrid[s.snapGrid.length - 1]);
};
/*=========================
  Slider/slides sizes
  ===========================*/
s.updateAutoHeight = function () {
    var activeSlides = [];
    var newHeight = 0;

    // Find slides currently in view
    if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) {
        for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) {
            var index = s.activeIndex + i;
            if(index > s.slides.length) break;
            activeSlides.push(s.slides.eq(index)[0]);
        }
    } else {
        activeSlides.push(s.slides.eq(s.activeIndex)[0]);
    }

    // Find new height from heighest slide in view
    for (i = 0; i < activeSlides.length; i++) {
        if (typeof activeSlides[i] !== 'undefined') {
            var height = activeSlides[i].offsetHeight;
            newHeight = height > newHeight ? height : newHeight;
        }
    }

    // Update Height
    if (newHeight) s.wrapper.css('height', newHeight + 'px');
};
s.updateContainerSize = function () {
    var width, height;
    if (typeof s.params.width !== 'undefined') {
        width = s.params.width;
    }
    else {
        width = s.container[0].clientWidth;
    }
    if (typeof s.params.height !== 'undefined') {
        height = s.params.height;
    }
    else {
        height = s.container[0].clientHeight;
    }
    if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {
        return;
    }

    //Subtract paddings
    width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);
    height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);
{'fraction_non_alphanumeric': 0.16360596772967906, 'fraction_numerical': 0.005724562425593354, 'mean_word_length': 2.7492877492877494, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3046103', 'n_tokens_mistral': 12925, 'n_tokens_neox': 12538, 'n_words': 2546}