UNPKG

yl-bud

Version:

一览科技前端开发工具

587 lines (572 loc) 122 kB
/** * Swiper 3.4.1 * Most modern mobile touch slider and framework with hardware accelerated transitions * * http://www.idangero.us/swiper/ * * Copyright 2016, Vladimir Kharlampidi * The iDangero.us * http://www.idangero.us/ * * Licensed under MIT * * Released on: December 13, 2016 */ !function () { "use strict"; function e(e) { e.fn.swiper = function (a) { var s; return e(this).each(function () { var e = new t(this, a); s || (s = e) }), s } } var a, t = function (e, s) { function r(e) { return Math.floor(e) } function i() { var e = T.params.autoplay, a = T.slides.eq(T.activeIndex); a.attr("data-swiper-autoplay") && (e = a.attr("data-swiper-autoplay") || T.params.autoplay), T.autoplayTimeoutId = setTimeout(function () { T.params.loop ? (T.fixLoop(), T._slideNext(), T.emit("onAutoplay", T)) : T.isEnd ? s.autoplayStopOnLast ? T.stopAutoplay() : (T._slideTo(0), T.emit("onAutoplay", T)) : (T._slideNext(), T.emit("onAutoplay", T)) }, e) } function n(e, t) { var s = a(e.target); if (!s.is(t))if ("string" == typeof t)s = s.parents(t); else if (t.nodeType) { var r; return s.parents().each(function (e, a) { a === t && (r = t) }), r ? t : void 0 } if (0 !== s.length)return s[0] } function o(e, a) { a = a || {}; var t = window.MutationObserver || window.WebkitMutationObserver, s = new t(function (e) { e.forEach(function (e) { T.onResize(!0), T.emit("onObserverUpdate", T, e) }) }); s.observe(e, { attributes: "undefined" == typeof a.attributes || a.attributes, childList: "undefined" == typeof a.childList || a.childList, characterData: "undefined" == typeof a.characterData || a.characterData }), T.observers.push(s) } function l(e) { e.originalEvent && (e = e.originalEvent); var a = e.keyCode || e.charCode; if (!T.params.allowSwipeToNext && (T.isHorizontal() && 39 === a || !T.isHorizontal() && 40 === a))return !1; if (!T.params.allowSwipeToPrev && (T.isHorizontal() && 37 === a || !T.isHorizontal() && 38 === a))return !1; if (!(e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || document.activeElement && document.activeElement.nodeName && ("input" === document.activeElement.nodeName.toLowerCase() || "textarea" === document.activeElement.nodeName.toLowerCase()))) { if (37 === a || 39 === a || 38 === a || 40 === a) { var t = !1; if (T.container.parents("." + T.params.slideClass).length > 0 && 0 === T.container.parents("." + T.params.slideActiveClass).length)return; var s = { left: window.pageXOffset, top: window.pageYOffset }, r = window.innerWidth, i = window.innerHeight, n = T.container.offset(); T.rtl && (n.left = n.left - T.container[0].scrollLeft); for (var o = [[n.left, n.top], [n.left + T.width, n.top], [n.left, n.top + T.height], [n.left + T.width, n.top + T.height]], l = 0; l < o.length; l++) { var p = o[l]; p[0] >= s.left && p[0] <= s.left + r && p[1] >= s.top && p[1] <= s.top + i && (t = !0) } if (!t)return } T.isHorizontal() ? (37 !== a && 39 !== a || (e.preventDefault ? e.preventDefault() : e.returnValue = !1), (39 === a && !T.rtl || 37 === a && T.rtl) && T.slideNext(), (37 === a && !T.rtl || 39 === a && T.rtl) && T.slidePrev()) : (38 !== a && 40 !== a || (e.preventDefault ? e.preventDefault() : e.returnValue = !1), 40 === a && T.slideNext(), 38 === a && T.slidePrev()) } } function p() { var e = "onwheel", a = e in document; if (!a) { var t = document.createElement("div"); t.setAttribute(e, "return;"), a = "function" == typeof t[e] } return !a && document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0 && (a = document.implementation.hasFeature("Events.wheel", "3.0")), a } function d(e) { e.originalEvent && (e = e.originalEvent); var a = 0, t = T.rtl ? -1 : 1, s = u(e); if (T.params.mousewheelForceToAxis)if (T.isHorizontal()) { if (!(Math.abs(s.pixelX) > Math.abs(s.pixelY)))return; a = s.pixelX * t } else { if (!(Math.abs(s.pixelY) > Math.abs(s.pixelX)))return; a = s.pixelY } else a = Math.abs(s.pixelX) > Math.abs(s.pixelY) ? -s.pixelX * t : -s.pixelY; if (0 !== a) { if (T.params.mousewheelInvert && (a = -a), T.params.freeMode) { var r = T.getWrapperTranslate() + a * T.params.mousewheelSensitivity, i = T.isBeginning, n = T.isEnd; if (r >= T.minTranslate() && (r = T.minTranslate()), r <= T.maxTranslate() && (r = T.maxTranslate()), T.setWrapperTransition(0), T.setWrapperTranslate(r), T.updateProgress(), T.updateActiveIndex(), (!i && T.isBeginning || !n && T.isEnd) && T.updateClasses(), T.params.freeModeSticky ? (clearTimeout(T.mousewheel.timeout), T.mousewheel.timeout = setTimeout(function () { T.slideReset() }, 300)) : T.params.lazyLoading && T.lazy && T.lazy.load(), T.emit("onScroll", T, e), T.params.autoplay && T.params.autoplayDisableOnInteraction && T.stopAutoplay(), 0 === r || r === T.maxTranslate())return } else { if ((new window.Date).getTime() - T.mousewheel.lastScrollTime > 60)if (a < 0)if (T.isEnd && !T.params.loop || T.animating) { if (T.params.mousewheelReleaseOnEdges)return !0 } else T.slideNext(), T.emit("onScroll", T, e); else if (T.isBeginning && !T.params.loop || T.animating) { if (T.params.mousewheelReleaseOnEdges)return !0 } else T.slidePrev(), T.emit("onScroll", T, e); T.mousewheel.lastScrollTime = (new window.Date).getTime() } return e.preventDefault ? e.preventDefault() : e.returnValue = !1, !1 } } function u(e) { var a = 10, t = 40, s = 800, r = 0, i = 0, n = 0, o = 0; return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (r = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (r = i, i = 0), n = r * a, o = i * a, "deltaY" in e && (o = e.deltaY), "deltaX" in e && (n = e.deltaX), (n || o) && e.deltaMode && (1 === e.deltaMode ? (n *= t, o *= t) : (n *= s, o *= s)), n && !r && (r = n < 1 ? -1 : 1), o && !i && (i = o < 1 ? -1 : 1), { spinX: r, spinY: i, pixelX: n, pixelY: o } } function m(e, t) { e = a(e); var s, r, i, n = T.rtl ? -1 : 1; s = e.attr("data-swiper-parallax") || "0", r = e.attr("data-swiper-parallax-x"), i = e.attr("data-swiper-parallax-y"), r || i ? (r = r || "0", i = i || "0") : T.isHorizontal() ? (r = s, i = "0") : (i = s, r = "0"), r = r.indexOf("%") >= 0 ? parseInt(r, 10) * t * n + "%" : r * t * n + "px", i = i.indexOf("%") >= 0 ? parseInt(i, 10) * t + "%" : i * t + "px", e.transform("translate3d(" + r + ", " + i + ",0px)") } function c(e) { return 0 !== e.indexOf("on") && (e = e[0] !== e[0].toUpperCase() ? "on" + e[0].toUpperCase() + e.substring(1) : "on" + e), e } if (!(this instanceof t))return new t(e, s); var g = { direction: "horizontal", touchEventsTarget: "container", initialSlide: 0, speed: 300, autoplay: !1, autoplayDisableOnInteraction: !0, autoplayStopOnLast: !1, iOSEdgeSwipeDetection: !1, iOSEdgeSwipeThreshold: 20, freeMode: !1, freeModeMomentum: !0, freeModeMomentumRatio: 1, freeModeMomentumBounce: !0, freeModeMomentumBounceRatio: 1, freeModeMomentumVelocityRatio: 1, freeModeSticky: !1, freeModeMinimumVelocity: .02, autoHeight: !1, setWrapperSize: !1, virtualTranslate: !1, effect: "slide", coverflow: {rotate: 50, stretch: 0, depth: 100, modifier: 1, slideShadows: !0}, flip: {slideShadows: !0, limitRotation: !0}, cube: {slideShadows: !0, shadow: !0, shadowOffset: 20, shadowScale: .94}, fade: {crossFade: !1}, parallax: !1, zoom: !1, zoomMax: 3, zoomMin: 1, zoomToggle: !0, scrollbar: null, scrollbarHide: !0, scrollbarDraggable: !1, scrollbarSnapOnRelease: !1, keyboardControl: !1, mousewheelControl: !1, mousewheelReleaseOnEdges: !1, mousewheelInvert: !1, mousewheelForceToAxis: !1, mousewheelSensitivity: 1, mousewheelEventsTarged: "container", hashnav: !1, hashnavWatchState: !1, history: !1, replaceState: !1, breakpoints: void 0, spaceBetween: 0, slidesPerView: 1, slidesPerColumn: 1, slidesPerColumnFill: "column", slidesPerGroup: 1, centeredSlides: !1, slidesOffsetBefore: 0, slidesOffsetAfter: 0, roundLengths: !1, touchRatio: 1, touchAngle: 45, simulateTouch: !0, shortSwipes: !0, longSwipes: !0, longSwipesRatio: .5, longSwipesMs: 300, followFinger: !0, onlyExternal: !1, threshold: 0, touchMoveStopPropagation: !0, touchReleaseOnEdges: !1, uniqueNavElements: !0, pagination: null, paginationElement: "span", paginationClickable: !1, paginationHide: !1, paginationBulletRender: null, paginationProgressRender: null, paginationFractionRender: null, paginationCustomRender: null, paginationType: "bullets", resistance: !0, resistanceRatio: .85, nextButton: null, prevButton: null, watchSlidesProgress: !1, watchSlidesVisibility: !1, grabCursor: !1, preventClicks: !0, preventClicksPropagation: !0, slideToClickedSlide: !1, lazyLoading: !1, lazyLoadingInPrevNext: !1, lazyLoadingInPrevNextAmount: 1, lazyLoadingOnTransitionStart: !1, preloadImages: !0, updateOnImagesReady: !0, loop: !1, loopAdditionalSlides: 0, loopedSlides: null, control: void 0, controlInverse: !1, controlBy: "slide", normalizeSlideIndex: !0, allowSwipeToPrev: !0, allowSwipeToNext: !0, swipeHandler: null, noSwiping: !0, noSwipingClass: "swiper-no-swiping", passiveListeners: !0, containerModifierClass: "swiper-container-", slideClass: "swiper-slide", slideActiveClass: "swiper-slide-active", slideDuplicateActiveClass: "swiper-slide-duplicate-active", slideVisibleClass: "swiper-slide-visible", slideDuplicateClass: "swiper-slide-duplicate", slideNextClass: "swiper-slide-next", slideDuplicateNextClass: "swiper-slide-duplicate-next", slidePrevClass: "swiper-slide-prev", slideDuplicatePrevClass: "swiper-slide-duplicate-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", paginationClickableClass: "swiper-pagination-clickable", paginationModifierClass: "swiper-pagination-", lazyLoadingClass: "swiper-lazy", lazyStatusLoadingClass: "swiper-lazy-loading", lazyStatusLoadedClass: "swiper-lazy-loaded", lazyPreloaderClass: "swiper-lazy-preloader", notificationClass: "swiper-notification", preloaderClass: "preloader", zoomContainerClass: "swiper-zoom-container", observer: !1, observeParents: !1, a11y: !1, prevSlideMessage: "Previous slide", nextSlideMessage: "Next slide", firstSlideMessage: "This is the first slide", lastSlideMessage: "This is the last slide", paginationBulletMessage: "Go to slide {{index}}", runCallbacksOnInit: !0 }, h = s && s.virtualTranslate; s = s || {}; var f = {}; for (var v in s)if ("object" != typeof s[v] || null === s[v] || (s[v].nodeType || s[v] === window || s[v] === document || "undefined" != typeof Dom7 && s[v] instanceof Dom7 || "undefined" != typeof jQuery && s[v] instanceof jQuery))f[v] = s[v]; else { f[v] = {}; for (var w in s[v])f[v][w] = s[v][w] } for (var y in g)if ("undefined" == typeof s[y])s[y] = g[y]; else if ("object" == typeof s[y])for (var x in g[y])"undefined" == typeof s[y][x] && (s[y][x] = g[y][x]); var T = this; if (T.params = s, T.originalParams = f, T.classNames = [], "undefined" != typeof a && "undefined" != typeof Dom7 && (a = Dom7), ("undefined" != typeof a || (a = "undefined" == typeof Dom7 ? window.Dom7 || window.Zepto || window.jQuery : Dom7)) && (T.$ = a, T.currentBreakpoint = void 0, T.getActiveBreakpoint = function () { if (!T.params.breakpoints)return !1; var e, a = !1, t = []; for (e in T.params.breakpoints)T.params.breakpoints.hasOwnProperty(e) && t.push(e); t.sort(function (e, a) { return parseInt(e, 10) > parseInt(a, 10) }); for (var s = 0; s < t.length; s++)e = t[s], e >= window.innerWidth && !a && (a = e); return a || "max" }, T.setBreakpoint = function () { var e = T.getActiveBreakpoint(); if (e && T.currentBreakpoint !== e) { var a = e in T.params.breakpoints ? T.params.breakpoints[e] : T.originalParams, t = T.params.loop && a.slidesPerView !== T.params.slidesPerView; for (var s in a)T.params[s] = a[s]; T.currentBreakpoint = e, t && T.destroyLoop && T.reLoop(!0) } }, T.params.breakpoints && T.setBreakpoint(), T.container = a(e), 0 !== T.container.length)) { if (T.container.length > 1) { var b = []; return T.container.each(function () { b.push(new t(this, s)) }), b } T.container[0].swiper = T, T.container.data("swiper", T), T.classNames.push(T.params.containerModifierClass + T.params.direction), T.params.freeMode && T.classNames.push(T.params.containerModifierClass + "free-mode"), T.support.flexbox || (T.classNames.push(T.params.containerModifierClass + "no-flexbox"), T.params.slidesPerColumn = 1), T.params.autoHeight && T.classNames.push(T.params.containerModifierClass + "autoheight"), (T.params.parallax || T.params.watchSlidesVisibility) && (T.params.watchSlidesProgress = !0), T.params.touchReleaseOnEdges && (T.params.resistanceRatio = 0), ["cube", "coverflow", "flip"].indexOf(T.params.effect) >= 0 && (T.support.transforms3d ? (T.params.watchSlidesProgress = !0, T.classNames.push(T.params.containerModifierClass + "3d")) : T.params.effect = "slide"), "slide" !== T.params.effect && T.classNames.push(T.params.containerModifierClass + T.params.effect), "cube" === T.params.effect && (T.params.resistanceRatio = 0, T.params.slidesPerView = 1, T.params.slidesPerColumn = 1, T.params.slidesPerGroup = 1, T.params.centeredSlides = !1, T.params.spaceBetween = 0, T.params.virtualTranslate = !0, T.params.setWrapperSize = !1), "fade" !== T.params.effect && "flip" !== T.params.effect || (T.params.slidesPerView = 1, T.params.slidesPerColumn = 1, T.params.slidesPerGroup = 1, T.params.watchSlidesProgress = !0, T.params.spaceBetween = 0, T.params.setWrapperSize = !1, "undefined" == typeof h && (T.params.virtualTranslate = !0)), T.params.grabCursor && T.support.touch && (T.params.grabCursor = !1), T.wrapper = T.container.children("." + T.params.wrapperClass), T.params.pagination && (T.paginationContainer = a(T.params.pagination), T.params.uniqueNavElements && "string" == typeof T.params.pagination && T.paginationContainer.length > 1 && 1 === T.container.find(T.params.pagination).length && (T.paginationContainer = T.container.find(T.params.pagination)), "bullets" === T.params.paginationType && T.params.paginationClickable ? T.paginationContainer.addClass(T.params.paginationModifierClass + "clickable") : T.params.paginationClickable = !1, T.paginationContainer.addClass(T.params.paginationModifierClass + T.params.paginationType)), (T.params.nextButton || T.params.prevButton) && (T.params.nextButton && (T.nextButton = a(T.params.nextButton), T.params.uniqueNavElements && "string" == typeof T.params.nextButton && T.nextButton.length > 1 && 1 === T.container.find(T.params.nextButton).length && (T.nextButton = T.container.find(T.params.nextButton))), T.params.prevButton && (T.prevButton = a(T.params.prevButton), T.params.uniqueNavElements && "string" == typeof T.params.prevButton && T.prevButton.length > 1 && 1 === T.container.find(T.params.prevButton).length && (T.prevButton = T.container.find(T.params.prevButton)))), T.isHorizontal = function () { return "horizontal" === T.params.direction }, T.rtl = T.isHorizontal() && ("rtl" === T.container[0].dir.toLowerCase() || "rtl" === T.container.css("direction")), T.rtl && T.classNames.push(T.params.containerModifierClass + "rtl"), T.rtl && (T.wrongRTL = "-webkit-box" === T.wrapper.css("display")), T.params.slidesPerColumn > 1 && T.classNames.push(T.params.containerModifierClass + "multirow"), T.device.android && T.classNames.push(T.params.containerModifierClass + "android"), T.container.addClass(T.classNames.join(" ")), T.translate = 0, T.progress = 0, T.velocity = 0, T.lockSwipeToNext = function () { T.params.allowSwipeToNext = !1, T.params.allowSwipeToPrev === !1 && T.params.grabCursor && T.unsetGrabCursor() }, T.lockSwipeToPrev = function () { T.params.allowSwipeToPrev = !1, T.params.allowSwipeToNext === !1 && T.params.grabCursor && T.unsetGrabCursor() }, T.lockSwipes = function () { T.params.allowSwipeToNext = T.params.allowSwipeToPrev = !1, T.params.grabCursor && T.unsetGrabCursor() }, T.unlockSwipeToNext = function () { T.params.allowSwipeToNext = !0, T.params.allowSwipeToPrev === !0 && T.params.grabCursor && T.setGrabCursor() }, T.unlockSwipeToPrev = function () { T.params.allowSwipeToPrev = !0, T.params.allowSwipeToNext === !0 && T.params.grabCursor && T.setGrabCursor() }, T.unlockSwipes = function () { T.params.allowSwipeToNext = T.params.allowSwipeToPrev = !0, T.params.grabCursor && T.setGrabCursor() }, T.setGrabCursor = function (e) { T.container[0].style.cursor = "move", T.container[0].style.cursor = e ? "-webkit-grabbing" : "-webkit-grab", T.container[0].style.cursor = e ? "-moz-grabbin" : "-moz-grab", T.container[0].style.cursor = e ? "grabbing" : "grab" }, T.unsetGrabCursor = function () { T.container[0].style.cursor = "" }, T.params.grabCursor && T.setGrabCursor(), T.imagesToLoad = [], T.imagesLoaded = 0, T.loadImage = function (e, a, t, s, r, i) { function n() { i && i() } var o; e.complete && r ? n() : a ? (o = new window.Image, o.onload = n, o.onerror = n, s && (o.sizes = s), t && (o.srcset = t), a && (o.src = a)) : n() }, T.preloadImages = function () { function e() { "undefined" != typeof T && null !== T && T && (void 0 !== T.imagesLoaded && T.imagesLoaded++, T.imagesLoaded === T.imagesToLoad.length && (T.params.updateOnImagesReady && T.update(), T.emit("onImagesReady", T))) } T.imagesToLoad = T.container.find("img"); for (var a = 0; a < T.imagesToLoad.length; a++)T.loadImage(T.imagesToLoad[a], T.imagesToLoad[a].currentSrc || T.imagesToLoad[a].getAttribute("src"), T.imagesToLoad[a].srcset || T.imagesToLoad[a].getAttribute("srcset"), T.imagesToLoad[a].sizes || T.imagesToLoad[a].getAttribute("sizes"), !0, e) }, T.autoplayTimeoutId = void 0, T.autoplaying = !1, T.autoplayPaused = !1, T.startAutoplay = function () { return "undefined" == typeof T.autoplayTimeoutId && (!!T.params.autoplay && (!T.autoplaying && (T.autoplaying = !0, T.emit("onAutoplayStart", T), void i()))) }, T.stopAutoplay = function (e) { T.autoplayTimeoutId && (T.autoplayTimeoutId && clearTimeout(T.autoplayTimeoutId), T.autoplaying = !1, T.autoplayTimeoutId = void 0, T.emit("onAutoplayStop", T)) }, T.pauseAutoplay = function (e) { T.autoplayPaused || (T.autoplayTimeoutId && clearTimeout(T.autoplayTimeoutId), T.autoplayPaused = !0, 0 === e ? (T.autoplayPaused = !1, i()) : T.wrapper.transitionEnd(function () { T && (T.autoplayPaused = !1, T.autoplaying ? i() : T.stopAutoplay()) })) }, T.minTranslate = function () { return -T.snapGrid[0] }, T.maxTranslate = function () { return -T.snapGrid[T.snapGrid.length - 1] }, T.updateAutoHeight = function () { var e, a = [], t = 0; if ("auto" !== T.params.slidesPerView && T.params.slidesPerView > 1)for (e = 0; e < Math.ceil(T.params.slidesPerView); e++) { var s = T.activeIndex + e; if (s > T.slides.length)break; a.push(T.slides.eq(s)[0]) } else a.push(T.slides.eq(T.activeIndex)[0]); for (e = 0; e < a.length; e++)if ("undefined" != typeof a[e]) { var r = a[e].offsetHeight; t = r > t ? r : t } t && T.wrapper.css("height", t + "px") }, T.updateContainerSize = function () { var e, a; e = "undefined" != typeof T.params.width ? T.params.width : T.container[0].clientWidth, a = "undefined" != typeof T.params.height ? T.params.height : T.container[0].clientHeight, 0 === e && T.isHorizontal() || 0 === a && !T.isHorizontal() || (e = e - parseInt(T.container.css("padding-left"), 10) - parseInt(T.container.css("padding-right"), 10), a = a - parseInt(T.container.css("padding-top"), 10) - parseInt(T.container.css("padding-bottom"), 10), T.width = e, T.height = a, T.size = T.isHorizontal() ? T.width : T.height) }, T.updateSlidesSize = function () { T.slides = T.wrapper.children("." + T.params.slideClass), T.snapGrid = [], T.slidesGrid = [], T.slidesSizesGrid = []; var e, a = T.params.spaceBetween, t = -T.params.slidesOffsetBefore, s = 0, i = 0; if ("undefined" != typeof T.size) { "string" == typeof a && a.indexOf("%") >= 0 && (a = parseFloat(a.replace("%", "")) / 100 * T.size), T.virtualSize = -a, T.rtl ? T.slides.css({ marginLeft: "", marginTop: "" }) : T.slides.css({marginRight: "", marginBottom: ""}); var n; T.params.slidesPerColumn > 1 && (n = Math.floor(T.slides.length / T.params.slidesPerColumn) === T.slides.length / T.params.slidesPerColumn ? T.slides.length : Math.ceil(T.slides.length / T.params.slidesPerColumn) * T.params.slidesPerColumn, "auto" !== T.params.slidesPerView && "row" === T.params.slidesPerColumnFill && (n = Math.max(n, T.params.slidesPerView * T.params.slidesPerColumn))); var o, l = T.params.slidesPerColumn, p = n / l, d = p - (T.params.slidesPerColumn * p - T.slides.length); for (e = 0; e < T.slides.length; e++) { o = 0; var u = T.slides.eq(e); if (T.params.slidesPerColumn > 1) { var m, c, g; "column" === T.params.slidesPerColumnFill ? (c = Math.floor(e / l), g = e - c * l, (c > d || c === d && g === l - 1) && ++g >= l && (g = 0, c++), m = c + g * n / l, u.css({ "-webkit-box-ordinal-group": m, "-moz-box-ordinal-group": m, "-ms-flex-order": m, "-webkit-order": m, order: m })) : (g = Math.floor(e / p), c = e - g * p), u.css("margin-" + (T.isHorizontal() ? "top" : "left"), 0 !== g && T.params.spaceBetween && T.params.spaceBetween + "px").attr("data-swiper-column", c).attr("data-swiper-row", g) } "none" !== u.css("display") && ("auto" === T.params.slidesPerView ? (o = T.isHorizontal() ? u.outerWidth(!0) : u.outerHeight(!0), T.params.roundLengths && (o = r(o))) : (o = (T.size - (T.params.slidesPerView - 1) * a) / T.params.slidesPerView, T.params.roundLengths && (o = r(o)), T.isHorizontal() ? T.slides[e].style.width = o + "px" : T.slides[e].style.height = o + "px"), T.slides[e].swiperSlideSize = o, T.slidesSizesGrid.push(o), T.params.centeredSlides ? (t = t + o / 2 + s / 2 + a, 0 === e && (t = t - T.size / 2 - a), Math.abs(t) < .001 && (t = 0), i % T.params.slidesPerGroup === 0 && T.snapGrid.push(t), T.slidesGrid.push(t)) : (i % T.params.slidesPerGroup === 0 && T.snapGrid.push(t), T.slidesGrid.push(t), t = t + o + a), T.virtualSize += o + a, s = o, i++) } T.virtualSize = Math.max(T.virtualSize, T.size) + T.params.slidesOffsetAfter; var h; if (T.rtl && T.wrongRTL && ("slide" === T.params.effect || "coverflow" === T.params.effect) && T.wrapper.css({width: T.virtualSize + T.params.spaceBetween + "px"}), T.support.flexbox && !T.params.setWrapperSize || (T.isHorizontal() ? T.wrapper.css({width: T.virtualSize + T.params.spaceBetween + "px"}) : T.wrapper.css({height: T.virtualSize + T.params.spaceBetween + "px"})), T.params.slidesPerColumn > 1 && (T.virtualSize = (o + T.params.spaceBetween) * n, T.virtualSize = Math.ceil(T.virtualSize / T.params.slidesPerColumn) - T.params.spaceBetween, T.isHorizontal() ? T.wrapper.css({width: T.virtualSize + T.params.spaceBetween + "px"}) : T.wrapper.css({height: T.virtualSize + T.params.spaceBetween + "px"}), T.params.centeredSlides)) { for (h = [], e = 0; e < T.snapGrid.length; e++)T.snapGrid[e] < T.virtualSize + T.snapGrid[0] && h.push(T.snapGrid[e]); T.snapGrid = h } if (!T.params.centeredSlides) { for (h = [], e = 0; e < T.snapGrid.length; e++)T.snapGrid[e] <= T.virtualSize - T.size && h.push(T.snapGrid[e]); T.snapGrid = h, Math.floor(T.virtualSize - T.size) - Math.floor(T.snapGrid[T.snapGrid.length - 1]) > 1 && T.snapGrid.push(T.virtualSize - T.size) } 0 === T.snapGrid.length && (T.snapGrid = [0]), 0 !== T.params.spaceBetween && (T.isHorizontal() ? T.rtl ? T.slides.css({marginLeft: a + "px"}) : T.slides.css({marginRight: a + "px"}) : T.slides.css({marginBottom: a + "px"})), T.params.watchSlidesProgress && T.updateSlidesOffset() } }, T.updateSlidesOffset = function () { for (var e = 0; e < T.slides.length; e++)T.slides[e].swiperSlideOffset = T.isHorizontal() ? T.slides[e].offsetLeft : T.slides[e].offsetTop }, T.currentSlidesPerView = function () { var e, a, t = 1; if (T.params.centeredSlides) { var s, r = T.slides[T.activeIndex].swiperSlideSize; for (e = T.activeIndex + 1; e < T.slides.length; e++)T.slides[e] && !s && (r += T.slides[e].swiperSlideSize, t++, r > T.size && (s = !0)); for (a = T.activeIndex - 1; a >= 0; a--)T.slides[a] && !s && (r += T.slides[a].swiperSlideSize, t++, r > T.size && (s = !0)) } else for (e = T.activeIndex + 1; e < T.slides.length; e++)T.slidesGrid[e] - T.slidesGrid[T.activeIndex] < T.size && t++; return t }, T.updateSlidesProgress = function (e) { if ("undefined" == typeof e && (e = T.translate || 0), 0 !== T.slides.length) { "undefined" == typeof T.slides[0].swiperSlideOffset && T.updateSlidesOffset(); var a = -e; T.rtl && (a = e), T.slides.removeClass(T.params.slideVisibleClass); for (var t = 0; t < T.slides.length; t++) { var s = T.slides[t], r = (a + (T.params.centeredSlides ? T.minTranslate() : 0) - s.swiperSlideOffset) / (s.swiperSlideSize + T.params.spaceBetween); if (T.params.watchSlidesVisibility) { var i = -(a - s.swiperSlideOffset), n = i + T.slidesSizesGrid[t], o = i >= 0 && i < T.size || n > 0 && n <= T.size || i <= 0 && n >= T.size; o && T.slides.eq(t).addClass(T.params.slideVisibleClass) } s.progress = T.rtl ? -r : r } } }, T.updateProgress = function (e) { "undefined" == typeof e && (e = T.translate || 0); var a = T.maxTranslate() - T.minTranslate(), t = T.isBeginning, s = T.isEnd; 0 === a ? (T.progress = 0, T.isBeginning = T.isEnd = !0) : (T.progress = (e - T.minTranslate()) / a, T.isBeginning = T.progress <= 0, T.isEnd = T.progress >= 1), T.isBeginning && !t && T.emit("onReachBeginning", T), T.isEnd && !s && T.emit("onReachEnd", T), T.params.watchSlidesProgress && T.updateSlidesProgress(e), T.emit("onProgress", T, T.progress) }, T.updateActiveIndex = function () { var e, a, t, s = T.rtl ? T.translate : -T.translate; for (a = 0; a < T.slidesGrid.length; a++)"undefined" != typeof T.slidesGrid[a + 1] ? s >= T.slidesGrid[a] && s < T.slidesGrid[a + 1] - (T.slidesGrid[a + 1] - T.slidesGrid[a]) / 2 ? e = a : s >= T.slidesGrid[a] && s < T.slidesGrid[a + 1] && (e = a + 1) : s >= T.slidesGrid[a] && (e = a); T.params.normalizeSlideIndex && (e < 0 || "undefined" == typeof e) && (e = 0), t = Math.floor(e / T.params.slidesPerGroup), t >= T.snapGrid.length && (t = T.snapGrid.length - 1), e !== T.activeIndex && (T.snapIndex = t, T.previousIndex = T.activeIndex, T.activeIndex = e, T.updateClasses(), T.updateRealIndex()) }, T.updateRealIndex = function () { T.realIndex = parseInt(T.slides.eq(T.activeIndex).attr("data-swiper-slide-index") || T.activeIndex, 10) }, T.updateClasses = function () { T.slides.removeClass(T.params.slideActiveClass + " " + T.params.slideNextClass + " " + T.params.slidePrevClass + " " + T.params.slideDuplicateActiveClass + " " + T.params.slideDuplicateNextClass + " " + T.params.slideDuplicatePrevClass); var e = T.slides.eq(T.activeIndex); e.addClass(T.params.slideActiveClass), s.loop && (e.hasClass(T.params.slideDuplicateClass) ? T.wrapper.children("." + T.params.slideClass + ":not(." + T.params.slideDuplicateClass + ')[data-swiper-slide-index="' + T.realIndex + '"]').addClass(T.params.slideDuplicateActiveClass) : T.wrapper.children("." + T.params.slideClass + "." + T.params.slideDuplicateClass + '[data-swiper-slide-index="' + T.realIndex + '"]').addClass(T.params.slideDuplicateActiveClass)); var t = e.next("." + T.params.slideClass).addClass(T.params.slideNextClass); T.params.loop && 0 === t.length && (t = T.slides.eq(0), t.addClass(T.params.slideNextClass)); var r = e.prev("." + T.params.slideClass).addClass(T.params.slidePrevClass); if (T.params.loop && 0 === r.length && (r = T.slides.eq(-1), r.addClass(T.params.slidePrevClass)), s.loop && (t.hasClass(T.params.slideDuplicateClass) ? T.wrapper.children("." + T.params.slideClass + ":not(." + T.params.slideDuplicateClass + ')[data-swiper-slide-index="' + t.attr("data-swiper-slide-index") + '"]').addClass(T.params.slideDuplicateNextClass) : T.wrapper.children("." + T.params.slideClass + "." + T.params.slideDuplicateClass + '[data-swiper-slide-index="' + t.attr("data-swiper-slide-index") + '"]').addClass(T.params.slideDuplicateNextClass), r.hasClass(T.params.slideDuplicateClass) ? T.wrapper.children("." + T.params.slideClass + ":not(." + T.params.slideDuplicateClass + ')[data-swiper-slide-index="' + r.attr("data-swiper-slide-index") + '"]').addClass(T.params.slideDuplicatePrevClass) : T.wrapper.children("." + T.params.slideClass + "." + T.params.slideDuplicateClass + '[data-swiper-slide-index="' + r.attr("data-swiper-slide-index") + '"]').addClass(T.params.slideDuplicatePrevClass)), T.paginationContainer && T.paginationContainer.length > 0) { var i, n = T.params.loop ? Math.ceil((T.slides.length - 2 * T.loopedSlides) / T.params.slidesPerGroup) : T.snapGrid.length; if (T.params.loop ? (i = Math.ceil((T.activeIndex - T.loopedSlides) / T.params.slidesPerGroup), i > T.slides.length - 1 - 2 * T.loopedSlides && (i -= T.slides.length - 2 * T.loopedSlides), i > n - 1 && (i -= n), i < 0 && "bullets" !== T.params.paginationType && (i = n + i)) : i = "undefined" != typeof T.snapIndex ? T.snapIndex : T.activeIndex || 0, "bullets" === T.params.paginationType && T.bullets && T.bullets.length > 0 && (T.bullets.removeClass(T.params.bulletActiveClass), T.paginationContainer.length > 1 ? T.bullets.each(function () { a(this).index() === i && a(this).addClass(T.params.bulletActiveClass) }) : T.bullets.eq(i).addClass(T.params.bulletActiveClass)), "fraction" === T.params.paginationType && (T.paginationContainer.find("." + T.params.paginationCurrentClass).text(i + 1), T.paginationContainer.find("." + T.params.paginationTotalClass).text(n)), "progress" === T.params.paginationType) { var o = (i + 1) / n, l = o, p = 1; T.isHorizontal() || (p = o, l = 1), T.paginationContainer.find("." + T.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX(" + l + ") scaleY(" + p + ")").transition(T.params.speed) } "custom" === T.params.paginationType && T.params.paginationCustomRender && (T.paginationContainer.html(T.params.paginationCustomRender(T, i + 1, n)), T.emit("onPaginationRendered", T, T.paginationContainer[0])) } T.params.loop || (T.params.prevButton && T.prevButton && T.prevButton.length > 0 && (T.isBeginning ? (T.prevButton.addClass(T.params.buttonDisabledClass), T.params.a11y && T.a11y && T.a11y.disable(T.prevButton)) : (T.prevButton.removeClass(T.params.buttonDisabledClass), T.params.a11y && T.a11y && T.a11y.enable(T.prevButton))), T.params.nextButton && T.nextButton && T.nextButton.length > 0 && (T.isEnd ? (T.nextButton.addClass(T.params.buttonDisabledClass), T.params.a11y && T.a11y && T.a11y.disable(T.nextButton)) : (T.nextButton.removeClass(T.params.buttonDisabledClass), T.params.a11y && T.a11y && T.a11y.enable(T.nextButton)))) }, T.updatePagination = function () { if (T.params.pagination && T.paginationContainer && T.paginationContainer.length > 0) { var e = ""; if ("bullets" === T.params.paginationType) { for (var a = T.params.loop ? Math.ceil((T.slides.length - 2 * T.loopedSlides) / T.params.slidesPerGroup) : T.snapGrid.length, t = 0; t < a; t++)e += T.params.paginationBulletRender ? T.params.paginationBulletRender(T, t, T.params.bulletClass) : "<" + T.params.paginationElement + ' class="' + T.params.bulletClass + '"></' + T.params.paginationElement + ">"; T.paginationContainer.html(e), T.bullets = T.paginationContainer.find("." + T.params.bulletClass), T.params.paginationClickable && T.params.a11y && T.a11y && T.a11y.initPagination() } "fraction" === T.params.paginationType && (e = T.params.paginationFractionRender ? T.params.paginationFractionRender(T, T.params.paginationCurrentClass, T.params.paginationTotalClass) : '<span class="' + T.params.paginationCurrentClass + '"></span> / <span class="' + T.params.paginationTotalClass + '"></span>', T.paginationContainer.html(e)), "progress" === T.params.paginationType && (e = T.params.paginationProgressRender ? T.params.paginationProgressRender(T, T.params.paginationProgressbarClass) : '<span class="' + T.params.paginationProgressbarClass + '"></span>', T.paginationContainer.html(e)), "custom" !== T.params.paginationType && T.emit("onPaginationRendered", T, T.paginationContainer[0]) } }, T.update = function (e) { function a() { T.rtl ? -T.translate : T.translate; s = Math.min(Math.max(T.translate, T.maxTranslate()), T.minTranslate()), T.setWrapperTranslate(s), T.updateActiveIndex(), T.updateClasses() } if (T)if (T.updateContainerSize(), T.updateSlidesSize(), T.updateProgress(), T.updatePagination(), T.updateClasses(), T.params.scrollbar && T.scrollbar && T.scrollbar.set(), e) { var t, s; T.controller && T.controller.spline && (T.controller.spline = void 0), T.params.freeMode ? (a(), T.params.autoHeight && T.updateAutoHeight()) : (t = ("auto" === T.params.slidesPerView || T.params.slidesPerView > 1) && T.isEnd && !T.params.centeredSlides ? T.slideTo(T.slides.length - 1, 0, !1, !0) : T.slideTo(T.activeIndex, 0, !1, !0), t || a()) } else T.params.autoHeight && T.updateAutoHeight() }, T.onResize = function (e) { T.params.breakpoints && T.setBreakpoint(); var a = T.params.allowSwipeToPrev, t = T.params.allowSwipeToNext; T.params.allowSwipeToPrev = T.params.allowSwipeToNext = !0, T.updateContainerSize(), T.updateSlidesSize(), ("auto" === T.params.slidesPerView || T.params.freeMode || e) && T.updatePagination(), T.params.scrollbar && T.scrollbar && T.scrollbar.set(), T.controller && T.controller.spline && (T.controller.spline = void 0); var s = !1; if (T.params.freeMode) { var r = Math.min(Math.max(T.translate, T.maxTranslate()), T.minTranslate()); T.setWrapperTranslate(r), T.updateActiveIndex(), T.updateClasses(), T.params.autoHeight && T.updateAutoHeight() } else T.updateClasses(), s = ("auto" === T.params.slidesPerView || T.params.slidesPerView > 1) && T.isEnd && !T.params.centeredSlides ? T.slideTo(T.slides.length - 1, 0, !1, !0) : T.slideTo(T.activeIndex, 0, !1, !0); T.params.lazyLoading && !s && T.lazy && T.lazy.load(), T.params.allowSwipeToPrev = a, T.params.allowSwipeToNext = t }, T.touchEventsDesktop = { start: "mousedown", move: "mousemove", end: "mouseup" }, window.navigator.pointerEnabled ? T.touchEventsDesktop = { start: "pointerdown", move: "pointermove", end: "pointerup" } : window.navigator.msPointerEnabled && (T.touchEventsDesktop = { start: "MSPointerDown", move: "MSPointerMove", end: "MSPointerUp" }), T.touchEvents = { start: T.support.touch || !T.params.simulateTouch ? "touchstart" : T.touchEventsDesktop.start, move: T.support.touch || !T.params.simulateTouch ? "touchmove" : T.touchEventsDesktop.move, end: T.support.touch || !T.params.simulateTouch ? "touchend" : T.touchEventsDesktop.end }, (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && ("container" === T.params.touchEventsTarget ? T.container : T.wrapper).addClass("swiper-wp8-" + T.params.direction), T.initEvents = function (e) { var a = e ? "off" : "on", t = e ? "removeEventListener" : "addEventListener", r = "container" === T.params.touchEventsTarget ? T.container[0] : T.wrapper[0], i = T.support.touch ? r : document, n = !!T.params.nested; if (T.browser.ie)r[t](T.touchEvents.start, T.onTouchStart, !1), i[t](T.touchEvents.move, T.onTouchMove, n), i[t](T.touchEvents.end, T.onTouchEnd, !1); else { if (T.support.touch) { var o = !("touchstart" !== T.touchEvents.start || !T.support.passiveListener || !T.params.passiveListeners) && { passive: !0, capture: !1 }; r[t](T.touchEvents.start, T.onTouchStart, o), r[t](T.touchEvents.move, T.onTouchMove, n), r[t](T.touchEvents.end, T.onTouchEnd, o) } (s.simulateTouch && !T.device.ios && !T.device.android || s.simulateTouch && !T.support.touch && T.device.ios) && (r[t]("mousedown", T.onTouchStart, !1), document[t]("mousemove", T.onTouchMove, n), document[t]("mouseup", T.onTouchEnd, !1)) } window[t]("resize", T.onResize), T.params.nextButton && T.nextButton && T.nextButton.length > 0 && (T.nextButton[a]("click", T.onClickNext), T.params.a11y && T.a11y && T.nextButton[a]("keydown", T.a11y.onEnterKey)), T.params.prevButton && T.prevButton && T.prevButton.length > 0 && (T.prevButton[a]("click", T.onClickPrev), T.params.a11y && T.a11y && T.prevButton[a]("keydown", T.a11y.onEnterKey)), T.params.pagination && T.params.paginationClickable && (T.paginationContainer[a]("click", "." + T.params.bulletClass, T.onClickIndex), T.params.a11y && T.a11y && T.paginationContainer[a]("keydown", "." + T.params.bulletClass, T.a11y.onEnterKey)), (T.params.preventClicks || T.params.preventClicksPropagation) && r[t]("click", T.preventClicks, !0); }, T.attachEvents = function () { T.initEvents() }, T.detachEvents = function () { T.initEvents(!0) }, T.allowClick = !0, T.preventClicks = function (e) { T.allowClick || (T.params.preventClicks && e.preventDefault(), T.params.preventClicksPropagation && T.animating && (e.stopPropagation(), e.stopImmediatePropagation())) }, T.onClickNext = function (e) { e.preventDefault(), T.isEnd && !T.params.loop || T.slideNext() }, T.onClickPrev = function (e) { e.preventDefault(), T.isBeginning && !T.params.loop || T.slidePrev() }, T.onClickIndex = function (e) { e.preventDefault(); var t = a(this).index() * T.params.slidesPerGroup; T.params.loop && (t += T.loopedSlides), T.slideTo(t) }, T.updateClickedSlide = function (e) { var t = n(e, "." + T.params.slideClass), s = !1; if (t)for (var r = 0; r < T.slides.length; r++)T.slides[r] === t && (s = !0); if (!t || !s)return T.clickedSlide = void 0, void(T.clickedIndex = void 0); if (T.clickedSlide = t, T.clickedIndex = a(t).index(), T.params.slideToClickedSlide && void 0 !== T.clickedIndex && T.clickedIndex !== T.activeIndex) { var i, o = T.clickedIndex, l = "auto" === T.params.slidesPerView ? T.currentSlidesPerView() : T.params.slidesPerView; if (T.params.loop) { if (T.animating)return; i = parseInt(a(T.clickedSlide).attr("data-swiper-slide-index"), 10), T.params.centeredSlides ? o < T.loopedSlides - l / 2 || o > T.slides.length - T.loopedSlides + l / 2 ? (T.fixLoop(), o = T.wrapper.children("." + T.params.slideClass + '[data-swiper-slide-index="' + i + '"]:not(.' + T.params.slideDuplicateClass + ")").eq(0).index(), setTimeout(function () { T.slideTo(o) }, 0)) : T.slideTo(o) : o > T.slides.length - l ? (T.fixLoop(), o = T.wrapper.children("." + T.params.slideClass + '[data-swiper-slide-index="' + i + '"]:not(.' + T.params.slideDuplicateClass + ")").eq(0).index(), setTimeout(function () { T.slideTo(o) }, 0)) : T.slideTo(o) } else T.slideTo(o) } }; var S, C, z, M, P, E, I, k, D, L, B = "input, spring, textarea, button, video", H = Date.now(), G = []; T.animating = !1, T.touches = {startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0}; var X, Y; T.onTouchStart = function (e) { if (e.originalEvent && (e = e.originalEvent), X = "touchstart" === e.type, X || !("which" in e) || 3 !== e.which) { if (T.params.noSwiping && n(e, "." + T.params.noSwipingClass))return void(T.allowClick = !0); if (!T.params.swipeHandler || n(e, T.params.swipeHandler)) { var t = T.touches.currentX = "touchstart" === e.type ? e.targetTouches[0].pageX : e.pageX, s = T.touches.currentY = "touchstart" === e.type ? e.targetTouches[0].pageY : e.pageY; if (!(T.device.ios && T.params.iOSEdgeSwipeDetection && t <= T.params.iOSEdgeSwipeThreshold)) { if (S = !0, C = !1, z = !0, P = void 0, Y = void 0, T.touches.startX = t, T.touches.startY = s, M = Date.now(), T.allowClick = !0, T.updateContainerSize(), T.swipeDirection = void 0, T.params.threshold > 0 && (k = !1), "touchstart" !== e.type) { var r = !0; a(e.target).is(B) && (r = !1), document.activeElement && a(document.activeElement).is(B) && document.activeElement.blur(), r && e.preventDefault() } T.emit("onTouchStart", T, e) } } } }, T.onTouchMove = function (e) { if (e.originalEvent && (e = e.originalEvent), !X || "mousemove" !== e.type) { if (e.preventedByNestedSwiper)return T.touches.startX = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, void(T.touches.startY = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY); if (T.params.onlyExternal)return T.allowClick = !1, void(S && (T.touches.startX = T.touches.currentX = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, T.touches.startY = T.touches.currentY = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, M = Date.now())); if (X && T.params.touchReleaseOnEdges && !T.params.loop)if (T.isHorizontal()) { if (T.touches.currentX < T.touches.startX && T.translate <= T.maxTranslate() || T.touches.currentX > T.touches.startX && T.translate >= T.minTranslate())return } else if (T.touches.currentY < T.touches.startY && T.translate <= T.maxTranslate() || T.touches.currentY > T.touches.startY && T.translate >= T.minTranslate())return; if (X && document.activeElement && e.target === document.activeElement && a(e.target).is(B))return C = !0, void(T.allowClick = !1); if (z && T.emit("onTouchMove", T, e), !(e.targetTouches && e.targetTouches.length > 1)) { if (T.touches.currentX = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, T.touches.currentY = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, "undefined" == typeof P) { var t; T.isHorizontal() && T.touches.currentY === T.touches.startY || !T.isHorizontal() && T.touches.currentX === T.touches.startX ? P = !1 : (t = 180 * Math.atan2(Math.abs(T.touches.currentY - T.touches.startY), Math.abs(T.touches.currentX - T.touches.startX)) / Math.PI, P = T.isHorizontal() ? t > T.params.touchAngle : 90 - t > T.params.touchAngle)