idangerous.swiper-2.7.min.js 43.1 KB
var Swiper=function(e,y){function a(e,t){return document.querySelectorAll?(t||document).querySelectorAll(e):jQuery(e,t)}function w(){var e=L-k;return y.freeMode&&(e=L-k),y.slidesPerView>b.slides.length&&!y.centeredSlides&&(e=0),e<0&&(e=0),e}function o(){var e,t=b.h.addEventListener;if(y.preventLinks){var i=a("a",b.container);for(e=0;e<i.length;e++)t(i[e],"click",u)}if(y.releaseFormElements){var n=a("input, textarea, select",b.container);for(e=0;e<n.length;e++)t(n[e],b.touchEvents.touchStart,c,!0)}if(y.onSlideClick)for(e=0;e<b.slides.length;e++)t(b.slides[e],"click",r);if(y.onSlideTouch)for(e=0;e<b.slides.length;e++)t(b.slides[e],b.touchEvents.touchStart,p)}function s(){var e,t=b.h.removeEventListener;if(y.onSlideClick)for(e=0;e<b.slides.length;e++)t(b.slides[e],"click",r);if(y.onSlideTouch)for(e=0;e<b.slides.length;e++)t(b.slides[e],b.touchEvents.touchStart,p);if(y.releaseFormElements){var i=a("input, textarea, select",b.container);for(e=0;e<i.length;e++)t(i[e],b.touchEvents.touchStart,c,!0)}if(y.preventLinks){var n=a("a",b.container);for(e=0;e<n.length;e++)t(n[e],"click",u)}}function l(e){var t=e.keyCode||e.charCode;if(!(e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)){if(37===t||39===t||38===t||40===t){for(var i=!1,n=b.h.getOffset(b.container),r=b.h.windowScroll().left,o=b.h.windowScroll().top,s=b.h.windowWidth(),a=b.h.windowHeight(),l=[[n.left,n.top],[n.left+b.width,n.top],[n.left,n.top+b.height],[n.left+b.width,n.top+b.height]],d=0;d<l.length;d++){var p=l[d];p[0]>=r&&p[0]<=r+s&&p[1]>=o&&p[1]<=o+a&&(i=!0)}if(!i)return}W?((37===t||39===t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),39===t&&b.swipeNext(),37===t&&b.swipePrev()):((38===t||40===t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1),40===t&&b.swipeNext(),38===t&&b.swipePrev())}}function d(e){var t=b._wheelEvent,i=0;if(e.detail)i=-e.detail;else if("mousewheel"===t)if(y.mousewheelControlForceToAxis)if(W){if(!(Math.abs(e.wheelDeltaX)>Math.abs(e.wheelDeltaY)))return;i=e.wheelDeltaX}else{if(!(Math.abs(e.wheelDeltaY)>Math.abs(e.wheelDeltaX)))return;i=e.wheelDeltaY}else i=e.wheelDelta;else if("DOMMouseScroll"===t)i=-e.detail;else if("wheel"===t)if(y.mousewheelControlForceToAxis)if(W){if(!(Math.abs(e.deltaX)>Math.abs(e.deltaY)))return;i=-e.deltaX}else{if(!(Math.abs(e.deltaY)>Math.abs(e.deltaX)))return;i=-e.deltaY}else i=Math.abs(e.deltaX)>Math.abs(e.deltaY)?-e.deltaX:-e.deltaY;if(y.freeMode){var n=b.getWrapperTranslate()+i;if(0<n&&(n=0),n<-w()&&(n=-w()),b.setWrapperTransition(0),b.setWrapperTranslate(n),b.updateActiveSlide(n),0===n||n===-w())return}else 60<(new Date).getTime()-F&&(i<0?b.swipeNext():b.swipePrev()),F=(new Date).getTime();return y.autoplay&&b.stopAutoplay(!0),e.preventDefault?e.preventDefault():e.returnValue=!1,!1}function r(e){b.allowSlideClick&&(t(e),b.fireCallback(y.onSlideClick,b,e))}function p(e){t(e),b.fireCallback(y.onSlideTouch,b,e)}function t(e){if(e.currentTarget)b.clickedSlide=e.currentTarget;else{var t=e.srcElement;do{if(-1<t.className.indexOf(y.slideClass))break;t=t.parentNode}while(t);b.clickedSlide=t}b.clickedSlideIndex=b.slides.indexOf(b.clickedSlide),b.clickedSlideLoopIndex=b.clickedSlideIndex-(b.loopedSlides||0)}function u(e){return b.allowLinks?void 0:(e.preventDefault?e.preventDefault():e.returnValue=!1,y.preventLinksPropagation&&"stopPropagation"in e&&e.stopPropagation(),!1)}function c(e){return e.stopPropagation?e.stopPropagation():e.returnValue=!1,!1}function f(e){if(y.preventLinks&&(b.allowLinks=!0),b.isTouched||y.onlyExternal)return!1;var t=e.target||e.srcElement;document.activeElement&&document.activeElement!==t&&document.activeElement.blur();var i="input select textarea".split(" ");if(y.noSwiping&&t&&function(e){var t=!1;for(;-1<e.className.indexOf(y.noSwipingClass)&&(t=!0),e=e.parentElement,!t&&e.parentElement&&-1===e.className.indexOf(y.wrapperClass););return!t&&-1<e.className.indexOf(y.wrapperClass)&&-1<e.className.indexOf(y.noSwipingClass)&&(t=!0),t}(t))return!1;if(K=!1,b.isTouched=!0,!(j="touchstart"===e.type)&&"which"in e&&3===e.which)return!1;if(!j||1===e.targetTouches.length){b.callPlugins("onTouchStartBegin"),!j&&!b.isAndroid&&i.indexOf(t.tagName.toLowerCase())<0&&(e.preventDefault?e.preventDefault():e.returnValue=!1);var n=j?e.targetTouches[0].pageX:e.pageX||e.clientX,r=j?e.targetTouches[0].pageY:e.pageY||e.clientY;b.touches.startX=b.touches.currentX=n,b.touches.startY=b.touches.currentY=r,b.touches.start=b.touches.current=W?n:r,b.setWrapperTransition(0),b.positions.start=b.positions.current=b.getWrapperTranslate(),b.setWrapperTranslate(b.positions.start),b.times.start=(new Date).getTime(),E=void 0,0<y.moveStartThreshold&&(z=!1),y.onTouchStart&&b.fireCallback(y.onTouchStart,b,e),b.callPlugins("onTouchStartEnd")}}function h(e){if(b.isTouched&&!y.onlyExternal&&(!j||"mousemove"!==e.type)){var t=j?e.targetTouches[0].pageX:e.pageX||e.clientX,i=j?e.targetTouches[0].pageY:e.pageY||e.clientY;if(void 0===E&&W&&(E=!!(E||Math.abs(i-b.touches.startY)>Math.abs(t-b.touches.startX))),void 0!==E||W||(E=!!(E||Math.abs(i-b.touches.startY)<Math.abs(t-b.touches.startX))),E)return void(b.isTouched=!1);if(W){if(!y.swipeToNext&&t<b.touches.startX||!y.swipeToPrev&&t>b.touches.startX)return}else if(!y.swipeToNext&&i<b.touches.startY||!y.swipeToPrev&&i>b.touches.startY)return;if(e.assignedToSwiper)return void(b.isTouched=!1);if(e.assignedToSwiper=!0,y.preventLinks&&(b.allowLinks=!1),y.onSlideClick&&(b.allowSlideClick=!1),y.autoplay&&b.stopAutoplay(!0),!j||1===e.touches.length){var n;if(b.isMoved||(b.callPlugins("onTouchMoveStart"),y.loop&&(b.fixLoop(),b.positions.start=b.getWrapperTranslate()),y.onTouchMoveStart&&b.fireCallback(y.onTouchMoveStart,b)),b.isMoved=!0,e.preventDefault?e.preventDefault():e.returnValue=!1,b.touches.current=W?t:i,b.positions.current=(b.touches.current-b.touches.start)*y.touchRatio+b.positions.start,0<b.positions.current&&y.onResistanceBefore&&b.fireCallback(y.onResistanceBefore,b,b.positions.current),b.positions.current<-w()&&y.onResistanceAfter&&b.fireCallback(y.onResistanceAfter,b,Math.abs(b.positions.current+w())),y.resistance&&"100%"!==y.resistance)if(0<b.positions.current&&(n=1-b.positions.current/k/2,b.positions.current=n<.5?k/2:b.positions.current*n),b.positions.current<-w()){var r=(b.touches.current-b.touches.start)*y.touchRatio+(w()+b.positions.start);n=(k+r)/k;var o=b.positions.current-r*(1-n)/2,s=-w()-k/2;b.positions.current=o<s||n<=0?s:o}if(y.resistance&&"100%"===y.resistance&&(0<b.positions.current&&(!y.freeMode||y.freeModeFluid)&&(b.positions.current=0),b.positions.current<-w()&&(!y.freeMode||y.freeModeFluid)&&(b.positions.current=-w())),!y.followFinger)return;if(y.moveStartThreshold)if(Math.abs(b.touches.current-b.touches.start)>y.moveStartThreshold||z){if(!z)return z=!0,void(b.touches.start=b.touches.current);b.setWrapperTranslate(b.positions.current)}else b.positions.current=b.positions.start;else b.setWrapperTranslate(b.positions.current);return(y.freeMode||y.watchActiveIndex)&&b.updateActiveSlide(b.positions.current),y.grabCursor&&(b.container.style.cursor="move",b.container.style.cursor="grabbing",b.container.style.cursor="-moz-grabbin",b.container.style.cursor="-webkit-grabbing"),_||(_=b.touches.current),Y||(Y=(new Date).getTime()),b.velocity=(b.touches.current-_)/((new Date).getTime()-Y)/2,Math.abs(b.touches.current-_)<2&&(b.velocity=0),_=b.touches.current,Y=(new Date).getTime(),b.callPlugins("onTouchMoveEnd"),y.onTouchMove&&b.fireCallback(y.onTouchMove,b,e),!1}}}function g(e){if(E&&b.swipeReset(),!y.onlyExternal&&b.isTouched){b.isTouched=!1,y.grabCursor&&(b.container.style.cursor="move",b.container.style.cursor="grab",b.container.style.cursor="-moz-grab",b.container.style.cursor="-webkit-grab"),b.positions.current||0===b.positions.current||(b.positions.current=b.positions.start),y.followFinger&&b.setWrapperTranslate(b.positions.current),b.times.end=(new Date).getTime(),b.touches.diff=b.touches.current-b.touches.start,b.touches.abs=Math.abs(b.touches.diff),b.positions.diff=b.positions.current-b.positions.start,b.positions.abs=Math.abs(b.positions.diff);var t=b.positions.diff,i=b.positions.abs,n=b.times.end-b.times.start;i<5&&n<300&&!1===b.allowLinks&&(y.freeMode||0===i||b.swipeReset(),y.preventLinks&&(b.allowLinks=!0),y.onSlideClick&&(b.allowSlideClick=!0)),setTimeout(function(){null!=b&&(y.preventLinks&&(b.allowLinks=!0),y.onSlideClick&&(b.allowSlideClick=!0))},100);var r=w();if(!b.isMoved&&y.freeMode)return b.isMoved=!1,y.onTouchEnd&&b.fireCallback(y.onTouchEnd,b,e),void b.callPlugins("onTouchEnd");if(!b.isMoved||0<b.positions.current||b.positions.current<-r)return b.swipeReset(),y.onTouchEnd&&b.fireCallback(y.onTouchEnd,b,e),void b.callPlugins("onTouchEnd");if(b.isMoved=!1,y.freeMode){if(y.freeModeFluid){var o,s=1e3*y.momentumRatio,a=b.velocity*s,l=b.positions.current+a,d=!1,p=20*Math.abs(b.velocity)*y.momentumBounceRatio;l<-r&&(y.momentumBounce&&b.support.transitions?(l+r<-p&&(l=-r-p),o=-r,K=d=!0):l=-r),0<l&&(y.momentumBounce&&b.support.transitions?(p<l&&(l=p),K=d=!(o=0)):l=0),0!==b.velocity&&(s=Math.abs((l-b.positions.current)/b.velocity)),b.setWrapperTranslate(l),b.setWrapperTransition(s),y.momentumBounce&&d&&b.wrapperTransitionEnd(function(){K&&(y.onMomentumBounce&&b.fireCallback(y.onMomentumBounce,b),b.callPlugins("onMomentumBounce"),b.setWrapperTranslate(o),b.setWrapperTransition(300))}),b.updateActiveSlide(l)}return(!y.freeModeFluid||300<=n)&&b.updateActiveSlide(b.positions.current),y.onTouchEnd&&b.fireCallback(y.onTouchEnd,b,e),void b.callPlugins("onTouchEnd")}"toNext"===(M=t<0?"toNext":"toPrev")&&n<=300&&(i<30||!y.shortSwipes?b.swipeReset():b.swipeNext(!0)),"toPrev"===M&&n<=300&&(i<30||!y.shortSwipes?b.swipeReset():b.swipePrev(!0));var u=0;if("auto"===y.slidesPerView){for(var c,f=Math.abs(b.getWrapperTranslate()),h=0,g=0;g<b.slides.length;g++)if(f<(h+=c=W?b.slides[g].getWidth(!0,y.roundLengths):b.slides[g].getHeight(!0,y.roundLengths))){u=c;break}k<u&&(u=k)}else u=C*y.slidesPerView;"toNext"===M&&300<n&&(i>=u*y.longSwipesRatio?b.swipeNext(!0):b.swipeReset()),"toPrev"===M&&300<n&&(i>=u*y.longSwipesRatio?b.swipePrev(!0):b.swipeReset()),y.onTouchEnd&&b.fireCallback(y.onTouchEnd,b,e),b.callPlugins("onTouchEnd")}}function v(e,t){var i,n=document.createElement("div");return n.innerHTML=t,(i=n.firstChild).className+=" "+e,i.outerHTML}function m(i,n,r){var e="to"===n&&0<=r.speed?r.speed:y.speed,o=+new Date;if(b.support.transitions||!y.DOMAnimation)b.setWrapperTranslate(i),b.setWrapperTransition(e);else{var s=b.getWrapperTranslate(),a=Math.ceil((i-s)/e*(1e3/60)),l=i<s?"toNext":"toPrev";if(b._DOMAnimating)return;!function e(){var t=+new Date;s+=a*(t-o)/(1e3/60),("toNext"===l?i<s:s<i)?(b.setWrapperTranslate(Math.ceil(s)),b._DOMAnimating=!0,window.setTimeout(function(){e()},1e3/60)):(y.onSlideChangeEnd&&("to"===n?!0===r.runCallbacks&&b.fireCallback(y.onSlideChangeEnd,b,l):b.fireCallback(y.onSlideChangeEnd,b,l)),b.setWrapperTranslate(i),b._DOMAnimating=!1)}()}b.updateActiveSlide(i),y.onSlideNext&&"next"===n&&b.fireCallback(y.onSlideNext,b,i),y.onSlidePrev&&"prev"===n&&b.fireCallback(y.onSlidePrev,b,i),y.onSlideReset&&"reset"===n&&b.fireCallback(y.onSlideReset,b,i),("next"===n||"prev"===n||"to"===n&&!0===r.runCallbacks)&&function(t){if(b.callPlugins("onSlideChangeStart"),y.onSlideChangeStart)if(y.queueStartCallbacks&&b.support.transitions){if(b._queueStartCallbacks)return;b._queueStartCallbacks=!0,b.fireCallback(y.onSlideChangeStart,b,t),b.wrapperTransitionEnd(function(){b._queueStartCallbacks=!1})}else b.fireCallback(y.onSlideChangeStart,b,t);if(y.onSlideChangeEnd)if(b.support.transitions)if(y.queueEndCallbacks){if(b._queueEndCallbacks)return;b._queueEndCallbacks=!0,b.wrapperTransitionEnd(function(e){b.fireCallback(y.onSlideChangeEnd,e,t)})}else b.wrapperTransitionEnd(function(e){b.fireCallback(y.onSlideChangeEnd,e,t)});else y.DOMAnimation||setTimeout(function(){b.fireCallback(y.onSlideChangeEnd,b,t)},10)}(n)}function S(){var e=b.paginationButtons;if(e)for(var t=0;t<e.length;t++)b.h.removeEventListener(e[t],"click",T)}function T(e){for(var t,i=e.target||e.srcElement,n=b.paginationButtons,r=0;r<n.length;r++)i===n[r]&&(t=r);y.autoplay&&b.stopAutoplay(!0),b.swipeTo(t)}function i(){X=setTimeout(function(){y.loop?(b.fixLoop(),b.swipeNext(!0)):b.swipeNext(!0)||(y.autoplayStopOnLast?(clearTimeout(X),X=void 0):b.swipeTo(0)),b.wrapperTransitionEnd(function(){void 0!==X&&i()})},y.autoplay)}if(!document.body.outerHTML&&document.body.__defineGetter__&&HTMLElement){var n=HTMLElement.prototype;n.__defineGetter__&&n.__defineGetter__("outerHTML",function(){return(new XMLSerializer).serializeToString(this)})}if(window.getComputedStyle||(window.getComputedStyle=function(i){return this.el=i,this.getPropertyValue=function(e){var t=/(\-([a-z]){1})/g;return"float"===e&&(e="styleFloat"),t.test(e)&&(e=e.replace(t,function(){return arguments[2].toUpperCase()})),i.currentStyle[e]?i.currentStyle[e]:null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var i=t||0,n=this.length;i<n;i++)if(this[i]===e)return i;return-1}),(document.querySelectorAll||window.jQuery)&&void 0!==e&&(e.nodeType||0!==a(e).length)){var b=this;b.touches={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,diff:0,abs:0},b.positions={start:0,abs:0,diff:0,current:0},b.times={start:0,end:0},b.id=(new Date).getTime(),b.container=e.nodeType?e:a(e)[0],b.isTouched=!1,b.isMoved=!1,b.activeIndex=0,b.centerIndex=0,b.activeLoaderIndex=0,b.activeLoopIndex=0,b.previousIndex=null,b.velocity=0,b.snapGrid=[],b.slidesGrid=[],b.imagesToLoad=[],b.imagesLoaded=0,b.wrapperLeft=0,b.wrapperRight=0,b.wrapperTop=0,b.wrapperBottom=0,b.isAndroid=0<=navigator.userAgent.toLowerCase().indexOf("android");var x,C,L,M,E,k,P={eventTarget:"wrapper",mode:"horizontal",touchRatio:1,speed:300,freeMode:!1,freeModeFluid:!1,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,slidesPerView:1,slidesPerGroup:1,slidesPerViewFit:!0,simulateTouch:!0,followFinger:!0,shortSwipes:!0,longSwipesRatio:.5,moveStartThreshold:!1,onlyExternal:!1,createPagination:!0,pagination:!1,paginationElement:"span",paginationClickable:!1,paginationAsRange:!0,resistance:!0,scrollContainer:!1,preventLinks:!0,preventLinksPropagation:!1,noSwiping:!1,noSwipingClass:"swiper-no-swiping",initialSlide:0,keyboardControl:!1,mousewheelControl:!1,mousewheelControlForceToAxis:!1,useCSS3Transforms:!0,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,loop:!1,loopAdditionalSlides:0,roundLengths:!1,calculateHeight:!1,cssWidthAndHeight:!1,updateOnImagesReady:!0,releaseFormElements:!0,watchActiveIndex:!1,visibilityFullFit:!1,offsetPxBefore:0,offsetPxAfter:0,offsetSlidesBefore:0,offsetSlidesAfter:0,centeredSlides:!1,queueStartCallbacks:!1,queueEndCallbacks:!1,autoResize:!0,resizeReInit:!1,DOMAnimation:!0,loader:{slides:[],slidesHTMLType:"inner",surroundGroups:1,logic:"reload",loadAllSlides:!1},swipeToPrev:!0,swipeToNext:!0,slideElement:"div",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",wrapperClass:"swiper-wrapper",paginationElementClass:"swiper-pagination-switch",paginationActiveClass:"swiper-active-switch",paginationVisibleClass:"swiper-visible-switch"};for(var A in y=y||{},P)if(A in y&&"object"==typeof y[A])for(var I in P[A])I in y[A]||(y[A][I]=P[A][I]);else A in y||(y[A]=P[A]);(b.params=y).scrollContainer&&(y.freeMode=!0,y.freeModeFluid=!0),y.loop&&(y.resistance="100%");var W="horizontal"===y.mode,D=["mousedown","mousemove","mouseup"];b.browser.ie10&&(D=["MSPointerDown","MSPointerMove","MSPointerUp"]),b.browser.ie11&&(D=["pointerdown","pointermove","pointerup"]),b.touchEvents={touchStart:b.support.touch||!y.simulateTouch?"touchstart":D[0],touchMove:b.support.touch||!y.simulateTouch?"touchmove":D[1],touchEnd:b.support.touch||!y.simulateTouch?"touchend":D[2]};for(var N=b.container.childNodes.length-1;0<=N;N--)if(b.container.childNodes[N].className)for(var H=b.container.childNodes[N].className.split(/\s+/),G=0;G<H.length;G++)H[G]===y.wrapperClass&&(x=b.container.childNodes[N]);b.wrapper=x,b._extendSwiperSlide=function(i){return i.append=function(){return y.loop?i.insertAfter(b.slides.length-b.loopedSlides):(b.wrapper.appendChild(i),b.reInit()),i},i.prepend=function(){return y.loop?(b.wrapper.insertBefore(i,b.slides[b.loopedSlides]),b.removeLoopedSlides(),b.calcSlides(),b.createLoop()):b.wrapper.insertBefore(i,b.wrapper.firstChild),b.reInit(),i},i.insertAfter=function(e){return void 0!==e&&(y.loop?((t=b.slides[e+1+b.loopedSlides])?b.wrapper.insertBefore(i,t):b.wrapper.appendChild(i),b.removeLoopedSlides(),b.calcSlides(),b.createLoop()):(t=b.slides[e+1],b.wrapper.insertBefore(i,t)),b.reInit(),i);var t},i.clone=function(){return b._extendSwiperSlide(i.cloneNode(!0))},i.remove=function(){b.wrapper.removeChild(i),b.reInit()},i.html=function(e){return void 0===e?i.innerHTML:(i.innerHTML=e,i)},i.index=function(){for(var e,t=b.slides.length-1;0<=t;t--)i===b.slides[t]&&(e=t);return e},i.isActive=function(){return i.index()===b.activeIndex},i.swiperSlideDataStorage||(i.swiperSlideDataStorage={}),i.getData=function(e){return i.swiperSlideDataStorage[e]},i.setData=function(e,t){return i.swiperSlideDataStorage[e]=t,i},i.data=function(e,t){return void 0===t?i.getAttribute("data-"+e):(i.setAttribute("data-"+e,t),i)},i.getWidth=function(e,t){return b.h.getWidth(i,e,t)},i.getHeight=function(e,t){return b.h.getHeight(i,e,t)},i.getOffset=function(){return b.h.getOffset(i)},i},b.calcSlides=function(e){var t=!!b.slides&&b.slides.length;b.slides=[],b.displaySlides=[];for(var i=0;i<b.wrapper.childNodes.length;i++)if(b.wrapper.childNodes[i].className)for(var n=b.wrapper.childNodes[i].className.split(/\s+/),r=0;r<n.length;r++)n[r]===y.slideClass&&b.slides.push(b.wrapper.childNodes[i]);for(i=b.slides.length-1;0<=i;i--)b._extendSwiperSlide(b.slides[i]);!1!==t&&(t!==b.slides.length||e)&&(s(),o(),b.updateActiveSlide(),b.params.pagination&&b.createPagination(),b.callPlugins("numberOfSlidesChanged"))},b.createSlide=function(e,t,i){t=t||b.params.slideClass,i=i||y.slideElement;var n=document.createElement(i);return n.innerHTML=e||"",n.className=t,b._extendSwiperSlide(n)},b.appendSlide=function(e,t,i){return e?e.nodeType?b._extendSwiperSlide(e).append():b.createSlide(e,t,i).append():void 0},b.prependSlide=function(e,t,i){return e?e.nodeType?b._extendSwiperSlide(e).prepend():b.createSlide(e,t,i).prepend():void 0},b.insertSlideAfter=function(e,t,i,n){return void 0!==e&&(t.nodeType?b._extendSwiperSlide(t).insertAfter(e):b.createSlide(t,i,n).insertAfter(e))},b.removeSlide=function(e){if(b.slides[e]){if(y.loop){if(!b.slides[e+b.loopedSlides])return!1;b.slides[e+b.loopedSlides].remove(),b.removeLoopedSlides(),b.calcSlides(),b.createLoop()}else b.slides[e].remove();return!0}return!1},b.removeLastSlide=function(){return 0<b.slides.length&&(y.loop?(b.slides[b.slides.length-1-b.loopedSlides].remove(),b.removeLoopedSlides(),b.calcSlides(),b.createLoop()):b.slides[b.slides.length-1].remove(),!0)},b.removeAllSlides=function(){for(var e=b.slides.length-1;0<=e;e--)b.slides[e].remove()},b.getSlide=function(e){return b.slides[e]},b.getLastSlide=function(){return b.slides[b.slides.length-1]},b.getFirstSlide=function(){return b.slides[0]},b.activeSlide=function(){return b.slides[b.activeIndex]},b.fireCallback=function(){var e=arguments[0];if("[object Array]"===Object.prototype.toString.call(e))for(var t=0;t<e.length;t++)"function"==typeof e[t]&&e[t](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]);else"[object String]"===Object.prototype.toString.call(e)?y["on"+e]&&b.fireCallback(y["on"+e],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]):e(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},b.addCallback=function(e,t){var i,n;return this.params["on"+e]?(n=this.params["on"+e],"[object Array]"===Object.prototype.toString.apply(n)?this.params["on"+e].push(t):"function"==typeof this.params["on"+e]?(i=this.params["on"+e],this.params["on"+e]=[],this.params["on"+e].push(i),this.params["on"+e].push(t)):void 0):(this.params["on"+e]=[],this.params["on"+e].push(t))},b.removeCallbacks=function(e){b.params["on"+e]&&(b.params["on"+e]=null)};var R=[];for(var O in b.plugins)if(y[O]){var V=b.plugins[O](b,y[O]);V&&R.push(V)}b.callPlugins=function(e,t){t||(t={});for(var i=0;i<R.length;i++)e in R[i]&&R[i][e](t)},!b.browser.ie10&&!b.browser.ie11||y.onlyExternal||b.wrapper.classList.add("swiper-wp8-"+(W?"horizontal":"vertical")),y.freeMode&&(b.container.className+=" swiper-free-mode"),b.initialized=!1,b.init=function(e,t){var i=b.h.getWidth(b.container,!1,y.roundLengths),n=b.h.getHeight(b.container,!1,y.roundLengths);if(i!==b.width||n!==b.height||e){var r,o,s,a,l,d,p;b.width=i,b.height=n,k=W?i:n;var u=b.wrapper;if(e&&b.calcSlides(t),"auto"===y.slidesPerView){var c=0,f=0;0<y.slidesOffset&&(u.style.paddingLeft="",u.style.paddingRight="",u.style.paddingTop="",u.style.paddingBottom=""),u.style.width="",u.style.height="",0<y.offsetPxBefore&&(W?b.wrapperLeft=y.offsetPxBefore:b.wrapperTop=y.offsetPxBefore),0<y.offsetPxAfter&&(W?b.wrapperRight=y.offsetPxAfter:b.wrapperBottom=y.offsetPxAfter),y.centeredSlides&&(W?(b.wrapperLeft=(k-this.slides[0].getWidth(!0,y.roundLengths))/2,b.wrapperRight=(k-b.slides[b.slides.length-1].getWidth(!0,y.roundLengths))/2):(b.wrapperTop=(k-b.slides[0].getHeight(!0,y.roundLengths))/2,b.wrapperBottom=(k-b.slides[b.slides.length-1].getHeight(!0,y.roundLengths))/2)),W?(0<=b.wrapperLeft&&(u.style.paddingLeft=b.wrapperLeft+"px"),0<=b.wrapperRight&&(u.style.paddingRight=b.wrapperRight+"px")):(0<=b.wrapperTop&&(u.style.paddingTop=b.wrapperTop+"px"),0<=b.wrapperBottom&&(u.style.paddingBottom=b.wrapperBottom+"px"));var h=d=0;for(b.snapGrid=[],b.slidesGrid=[],p=s=0;p<b.slides.length;p++){r=b.slides[p].getWidth(!0,y.roundLengths),o=b.slides[p].getHeight(!0,y.roundLengths),y.calculateHeight&&(s=Math.max(s,o));var g=W?r:o;if(y.centeredSlides){var w=p===b.slides.length-1?0:b.slides[p+1].getWidth(!0,y.roundLengths),v=p===b.slides.length-1?0:b.slides[p+1].getHeight(!0,y.roundLengths),m=W?w:v;if(k<g){if(y.slidesPerViewFit)b.snapGrid.push(d+b.wrapperLeft),b.snapGrid.push(d+g-k+b.wrapperLeft);else for(var S=0;S<=Math.floor(g/(k+b.wrapperLeft));S++)b.snapGrid.push(0===S?d+b.wrapperLeft:d+b.wrapperLeft+k*S);b.slidesGrid.push(d+b.wrapperLeft)}else b.snapGrid.push(h),b.slidesGrid.push(h);h+=g/2+m/2}else{if(k<g)if(y.slidesPerViewFit)b.snapGrid.push(d),b.snapGrid.push(d+g-k);else if(0!==k)for(var T=0;T<=Math.floor(g/k);T++)b.snapGrid.push(d+k*T);else b.snapGrid.push(d);else b.snapGrid.push(d);b.slidesGrid.push(d)}d+=g,c+=r,f+=o}y.calculateHeight&&(b.height=s),u.style.height=W?(L=c+b.wrapperRight+b.wrapperLeft,u.style.width=c+"px",b.height+"px"):(L=f+b.wrapperTop+b.wrapperBottom,u.style.width=b.width+"px",f+"px")}else if(y.scrollContainer)u.style.width="",u.style.height="",a=b.slides[0].getWidth(!0,y.roundLengths),l=b.slides[0].getHeight(!0,y.roundLengths),L=W?a:l,u.style.width=a+"px",u.style.height=l+"px",C=W?a:l;else{if(y.calculateHeight){var x=!0;if(void 0!==y.calculateSlideHeight&&(x=y.calculateSlideHeight),x)for(l=s=0,W||(b.container.style.height=""),u.style.height="",p=0;p<b.slides.length;p++)b.slides[p].style.height="",s=Math.max(b.slides[p].getHeight(!0),s),W||(l+=b.slides[p].getHeight(!0));o=s,b.height=o,W?l=o:(k=o,b.container.style.height=k+"px")}else o=W?b.height:b.height/y.slidesPerView,y.roundLengths&&(o=Math.ceil(o)),l=W?b.height:b.slides.length*o;for(r=W?b.width/y.slidesPerView:b.width,y.roundLengths&&(r=Math.ceil(r)),a=W?b.slides.length*r:b.width,C=W?r:o,0<y.offsetSlidesBefore&&(W?b.wrapperLeft=C*y.offsetSlidesBefore:b.wrapperTop=C*y.offsetSlidesBefore),0<y.offsetSlidesAfter&&(W?b.wrapperRight=C*y.offsetSlidesAfter:b.wrapperBottom=C*y.offsetSlidesAfter),0<y.offsetPxBefore&&(W?b.wrapperLeft=y.offsetPxBefore:b.wrapperTop=y.offsetPxBefore),0<y.offsetPxAfter&&(W?b.wrapperRight=y.offsetPxAfter:b.wrapperBottom=y.offsetPxAfter),y.centeredSlides&&(W?(b.wrapperLeft=(k-C)/2,b.wrapperRight=(k-C)/2):(b.wrapperTop=(k-C)/2,b.wrapperBottom=(k-C)/2)),W?(0<b.wrapperLeft&&(u.style.paddingLeft=b.wrapperLeft+"px"),0<b.wrapperRight&&(u.style.paddingRight=b.wrapperRight+"px")):(0<b.wrapperTop&&(u.style.paddingTop=b.wrapperTop+"px"),0<b.wrapperBottom&&(u.style.paddingBottom=b.wrapperBottom+"px")),L=W?a+b.wrapperRight+b.wrapperLeft:l+b.wrapperTop+b.wrapperBottom,0<parseFloat(a)&&(!y.cssWidthAndHeight||"height"===y.cssWidthAndHeight)&&(u.style.width=a+"px"),0<parseFloat(l)&&(!y.cssWidthAndHeight||"width"===y.cssWidthAndHeight)&&(u.style.height=l+"px"),d=0,b.snapGrid=[],b.slidesGrid=[],p=0;p<b.slides.length;p++)b.snapGrid.push(d),b.slidesGrid.push(d),d+=C,0<parseFloat(r)&&(!y.cssWidthAndHeight||"height"===y.cssWidthAndHeight)&&(b.slides[p].style.width=r+"px"),0<parseFloat(o)&&(!y.cssWidthAndHeight||"width"===y.cssWidthAndHeight)&&(b.slides[p].style.height=o+"px")}b.initialized?(b.callPlugins("onInit"),y.onInit&&b.fireCallback(y.onInit,b)):(b.callPlugins("onFirstInit"),y.onFirstInit&&b.fireCallback(y.onFirstInit,b)),b.initialized=!0}},b.reInit=function(e){b.init(!0,e)},b.resizeFix=function(e){b.callPlugins("beforeResizeFix"),b.init(y.resizeReInit||e),y.freeMode?b.getWrapperTranslate()<-w()&&(b.setWrapperTransition(0),b.setWrapperTranslate(-w())):(b.swipeTo(y.loop?b.activeLoopIndex:b.activeIndex,0,!1),y.autoplay&&(b.support.transitions&&void 0!==X?void 0!==X&&(clearTimeout(X),X=void 0,b.startAutoplay()):void 0!==q&&(clearInterval(q),q=void 0,b.startAutoplay()))),b.callPlugins("afterResizeFix")},b.destroy=function(){var e=b.h.removeEventListener,t="wrapper"===y.eventTarget?b.wrapper:b.container;b.browser.ie10||b.browser.ie11?(e(t,b.touchEvents.touchStart,f),e(document,b.touchEvents.touchMove,h),e(document,b.touchEvents.touchEnd,g)):(b.support.touch&&(e(t,"touchstart",f),e(t,"touchmove",h),e(t,"touchend",g)),y.simulateTouch&&(e(t,"mousedown",f),e(document,"mousemove",h),e(document,"mouseup",g))),y.autoResize&&e(window,"resize",b.resizeFix),s(),y.paginationClickable&&S(),y.mousewheelControl&&b._wheelEvent&&e(b.container,b._wheelEvent,d),y.keyboardControl&&e(document,"keydown",l),y.autoplay&&b.stopAutoplay(),b.callPlugins("onDestroy"),b=null},b.disableKeyboardControl=function(){y.keyboardControl=!1,b.h.removeEventListener(document,"keydown",l)},b.enableKeyboardControl=function(){y.keyboardControl=!0,b.h.addEventListener(document,"keydown",l)};var F=(new Date).getTime();if(b.disableMousewheelControl=function(){return!!b._wheelEvent&&(y.mousewheelControl=!1,b.h.removeEventListener(b.container,b._wheelEvent,d),!0)},b.enableMousewheelControl=function(){return!!b._wheelEvent&&(y.mousewheelControl=!0,b.h.addEventListener(b.container,b._wheelEvent,d),!0)},y.grabCursor){var B=b.container.style;B.cursor="move",B.cursor="grab",B.cursor="-moz-grab",B.cursor="-webkit-grab"}b.allowSlideClick=!0;var z,_,Y,X,q,j=!(b.allowLinks=!0),K=!0;b.swipeNext=function(e){!e&&y.loop&&b.fixLoop(),!e&&y.autoplay&&b.stopAutoplay(!0),b.callPlugins("onSwipeNext");var t=b.getWrapperTranslate(),i=t;if("auto"===y.slidesPerView){for(var n=0;n<b.snapGrid.length;n++)if(-t>=b.snapGrid[n]&&-t<b.snapGrid[n+1]){i=-b.snapGrid[n+1];break}}else{var r=C*y.slidesPerGroup;i=-(Math.floor(Math.abs(t)/Math.floor(r))*r+r)}return i<-w()&&(i=-w()),i!==t&&(m(i,"next"),!0)},b.swipePrev=function(e){!e&&y.loop&&b.fixLoop(),!e&&y.autoplay&&b.stopAutoplay(!0),b.callPlugins("onSwipePrev");var t,i=Math.ceil(b.getWrapperTranslate());if("auto"===y.slidesPerView){t=0;for(var n=1;n<b.snapGrid.length;n++){if(-i===b.snapGrid[n]){t=-b.snapGrid[n-1];break}if(-i>b.snapGrid[n]&&-i<b.snapGrid[n+1]){t=-b.snapGrid[n];break}}}else{var r=C*y.slidesPerGroup;t=-(Math.ceil(-i/r)-1)*r}return 0<t&&(t=0),t!==i&&(m(t,"prev"),!0)},b.swipeReset=function(){b.callPlugins("onSwipeReset");var e,t=b.getWrapperTranslate(),i=C*y.slidesPerGroup;if(w(),"auto"===y.slidesPerView){for(var n=e=0;n<b.snapGrid.length;n++){if(-t===b.snapGrid[n])return;if(-t>=b.snapGrid[n]&&-t<b.snapGrid[n+1]){e=0<b.positions.diff?-b.snapGrid[n+1]:-b.snapGrid[n];break}}-t>=b.snapGrid[b.snapGrid.length-1]&&(e=-b.snapGrid[b.snapGrid.length-1]),t<=-w()&&(e=-w())}else e=t<0?Math.round(t/i)*i:0,t<=-w()&&(e=-w());return y.scrollContainer&&(e=t<0?t:0),e<-w()&&(e=-w()),y.scrollContainer&&C<k&&(e=0),e!==t&&(m(e,"reset"),!0)},b.swipeTo=function(e,t,i){e=parseInt(e,10),b.callPlugins("onSwipeTo",{index:e,speed:t}),y.loop&&(e+=b.loopedSlides);var n,r=b.getWrapperTranslate();if(!(e>b.slides.length-1||e<0))return(n="auto"===y.slidesPerView?-b.slidesGrid[e]:-e*C)<-w()&&(n=-w()),n!==r&&(m(n,"to",{index:e,speed:t,runCallbacks:i=!1!==i}),!0)},b._queueStartCallbacks=!1,b._queueEndCallbacks=!1,b.updateActiveSlide=function(e){if(b.initialized&&0!==b.slides.length){var t;if(b.previousIndex=b.activeIndex,void 0===e&&(e=b.getWrapperTranslate()),0<e&&(e=0),"auto"===y.slidesPerView){if(b.activeIndex=b.slidesGrid.indexOf(-e),b.activeIndex<0){for(t=0;t<b.slidesGrid.length-1&&!(-e>b.slidesGrid[t]&&-e<b.slidesGrid[t+1]);t++);var i=Math.abs(b.slidesGrid[t]+e),n=Math.abs(b.slidesGrid[t+1]+e);b.activeIndex=i<=n?t:t+1}}else b.activeIndex=Math[y.visibilityFullFit?"ceil":"round"](-e/C);if(b.activeIndex===b.slides.length&&(b.activeIndex=b.slides.length-1),b.activeIndex<0&&(b.activeIndex=0),b.slides[b.activeIndex]){if(b.calcVisibleSlides(e),b.support.classList){var r;for(t=0;t<b.slides.length;t++)(r=b.slides[t]).classList.remove(y.slideActiveClass),0<=b.visibleSlides.indexOf(r)?r.classList.add(y.slideVisibleClass):r.classList.remove(y.slideVisibleClass);b.slides[b.activeIndex].classList.add(y.slideActiveClass)}else{var o=new RegExp("\\s*"+y.slideActiveClass),s=new RegExp("\\s*"+y.slideVisibleClass);for(t=0;t<b.slides.length;t++)b.slides[t].className=b.slides[t].className.replace(o,"").replace(s,""),0<=b.visibleSlides.indexOf(b.slides[t])&&(b.slides[t].className+=" "+y.slideVisibleClass);b.slides[b.activeIndex].className+=" "+y.slideActiveClass}if(y.loop){var a=b.loopedSlides;b.activeLoopIndex=b.activeIndex-a,b.activeLoopIndex>=b.slides.length-2*a&&(b.activeLoopIndex=b.slides.length-2*a-b.activeLoopIndex),b.activeLoopIndex<0&&(b.activeLoopIndex=b.slides.length-2*a+b.activeLoopIndex),b.activeLoopIndex<0&&(b.activeLoopIndex=0)}else b.activeLoopIndex=b.activeIndex;y.pagination&&b.updatePagination(e)}}},b.createPagination=function(e){if(y.paginationClickable&&b.paginationButtons&&S(),b.paginationContainer=y.pagination.nodeType?y.pagination:a(y.pagination)[0],y.createPagination){var t="",i=b.slides.length;y.loop&&(i-=2*b.loopedSlides);for(var n=0;n<i;n++)t+="<"+y.paginationElement+' class="'+y.paginationElementClass+'"></'+y.paginationElement+">";b.paginationContainer.innerHTML=t}b.paginationButtons=a("."+y.paginationElementClass,b.paginationContainer),e||b.updatePagination(),b.callPlugins("onCreatePagination"),y.paginationClickable&&function(){var e=b.paginationButtons;if(e)for(var t=0;t<e.length;t++)b.h.addEventListener(e[t],"click",T)}()},b.updatePagination=function(e){if(y.pagination&&!(b.slides.length<1)&&a("."+y.paginationActiveClass,b.paginationContainer)){var t=b.paginationButtons;if(0!==t.length){for(var i=0;i<t.length;i++)t[i].className=y.paginationElementClass;var n=y.loop?b.loopedSlides:0;if(y.paginationAsRange){b.visibleSlides||b.calcVisibleSlides(e);var r,o=[];for(r=0;r<b.visibleSlides.length;r++){var s=b.slides.indexOf(b.visibleSlides[r])-n;y.loop&&s<0&&(s=b.slides.length-2*b.loopedSlides+s),y.loop&&s>=b.slides.length-2*b.loopedSlides&&(s=b.slides.length-2*b.loopedSlides-s,s=Math.abs(s)),o.push(s)}for(r=0;r<o.length;r++)t[o[r]]&&(t[o[r]].className+=" "+y.paginationVisibleClass);y.loop?void 0!==t[b.activeLoopIndex]&&(t[b.activeLoopIndex].className+=" "+y.paginationActiveClass):t[b.activeIndex].className+=" "+y.paginationActiveClass}else y.loop?t[b.activeLoopIndex]&&(t[b.activeLoopIndex].className+=" "+y.paginationActiveClass+" "+y.paginationVisibleClass):t[b.activeIndex].className+=" "+y.paginationActiveClass+" "+y.paginationVisibleClass}}},b.calcVisibleSlides=function(e){var t=[],i=0,n=0,r=0;W&&0<b.wrapperLeft&&(e+=b.wrapperLeft),!W&&0<b.wrapperTop&&(e+=b.wrapperTop);for(var o=0;o<b.slides.length;o++){r=(i+=n)+(n="auto"===y.slidesPerView?W?b.h.getWidth(b.slides[o],!0,y.roundLengths):b.h.getHeight(b.slides[o],!0,y.roundLengths):C);var s=!1;y.visibilityFullFit?(-e<=i&&r<=-e+k&&(s=!0),i<=-e&&-e+k<=r&&(s=!0)):(-e<r&&r<=-e+k&&(s=!0),-e<=i&&i<-e+k&&(s=!0),i<-e&&-e+k<r&&(s=!0)),s&&t.push(b.slides[o])}0===t.length&&(t=[b.slides[b.activeIndex]]),b.visibleSlides=t},b.startAutoplay=function(){if(b.support.transitions){if(void 0!==X)return!1;if(!y.autoplay)return;b.callPlugins("onAutoplayStart"),y.onAutoplayStart&&b.fireCallback(y.onAutoplayStart,b),i()}else{if(void 0!==q)return!1;if(!y.autoplay)return;b.callPlugins("onAutoplayStart"),y.onAutoplayStart&&b.fireCallback(y.onAutoplayStart,b),q=setInterval(function(){y.loop?(b.fixLoop(),b.swipeNext(!0)):b.swipeNext(!0)||(y.autoplayStopOnLast?(clearInterval(q),q=void 0):b.swipeTo(0))},y.autoplay)}},b.stopAutoplay=function(e){if(b.support.transitions){if(!X)return;X&&clearTimeout(X),X=void 0,e&&!y.autoplayDisableOnInteraction&&b.wrapperTransitionEnd(function(){i()}),b.callPlugins("onAutoplayStop"),y.onAutoplayStop&&b.fireCallback(y.onAutoplayStop,b)}else q&&clearInterval(q),q=void 0,b.callPlugins("onAutoplayStop"),y.onAutoplayStop&&b.fireCallback(y.onAutoplayStop,b)},b.loopCreated=!1,b.removeLoopedSlides=function(){if(b.loopCreated)for(var e=0;e<b.slides.length;e++)!0===b.slides[e].getData("looped")&&b.wrapper.removeChild(b.slides[e])},b.createLoop=function(){if(0!==b.slides.length){b.loopedSlides="auto"===y.slidesPerView?y.loopedSlides||1:y.slidesPerView+y.loopAdditionalSlides,b.loopedSlides>b.slides.length&&(b.loopedSlides=b.slides.length);var e,t="",i="",n="",r=b.slides.length,o=Math.floor(b.loopedSlides/r),s=b.loopedSlides%r;for(e=0;e<o*r;e++){var a=e;if(r<=e)a=e-r*Math.floor(e/r);n+=b.slides[a].outerHTML}for(e=0;e<s;e++)i+=v(y.slideDuplicateClass,b.slides[e].outerHTML);for(e=r-s;e<r;e++)t+=v(y.slideDuplicateClass,b.slides[e].outerHTML);var l=t+n+x.innerHTML+n+i;for(x.innerHTML=l,b.loopCreated=!0,b.calcSlides(),e=0;e<b.slides.length;e++)(e<b.loopedSlides||e>=b.slides.length-b.loopedSlides)&&b.slides[e].setData("looped",!0);b.callPlugins("onCreateLoop")}},b.fixLoop=function(){var e;b.activeIndex<b.loopedSlides?(e=b.slides.length-3*b.loopedSlides+b.activeIndex,b.swipeTo(e,0,!1)):("auto"===y.slidesPerView&&b.activeIndex>=2*b.loopedSlides||b.activeIndex>b.slides.length-2*y.slidesPerView)&&(e=-b.slides.length+b.activeIndex+b.loopedSlides,b.swipeTo(e,0,!1))},b.loadSlides=function(){var e="";b.activeLoaderIndex=0;for(var t=y.loader.slides,i=y.loader.loadAllSlides?t.length:y.slidesPerView*(1+y.loader.surroundGroups),n=0;n<i;n++)e+="outer"===y.loader.slidesHTMLType?t[n]:"<"+y.slideElement+' class="'+y.slideClass+'" data-swiperindex="'+n+'">'+t[n]+"</"+y.slideElement+">";b.wrapper.innerHTML=e,b.calcSlides(!0),y.loader.loadAllSlides||b.wrapperTransitionEnd(b.reloadSlides,!0)},b.reloadSlides=function(){var e=y.loader.slides,t=parseInt(b.activeSlide().data("swiperindex"),10);if(!(t<0||t>e.length-1)){b.activeLoaderIndex=t;var i,n=Math.max(0,t-y.slidesPerView*y.loader.surroundGroups),r=Math.min(t+y.slidesPerView*(1+y.loader.surroundGroups)-1,e.length-1);if(0<t){var o=-C*(t-n);b.setWrapperTranslate(o),b.setWrapperTransition(0)}if("reload"===y.loader.logic){var s=b.wrapper.innerHTML="";for(i=n;i<=r;i++)s+="outer"===y.loader.slidesHTMLType?e[i]:"<"+y.slideElement+' class="'+y.slideClass+'" data-swiperindex="'+i+'">'+e[i]+"</"+y.slideElement+">";b.wrapper.innerHTML=s}else{var a=1e3,l=0;for(i=0;i<b.slides.length;i++){var d=b.slides[i].data("swiperindex");d<n||r<d?b.wrapper.removeChild(b.slides[i]):(a=Math.min(d,a),l=Math.max(d,l))}for(i=n;i<=r;i++){var p;i<a&&((p=document.createElement(y.slideElement)).className=y.slideClass,p.setAttribute("data-swiperindex",i),p.innerHTML=e[i],b.wrapper.insertBefore(p,b.wrapper.firstChild)),l<i&&((p=document.createElement(y.slideElement)).className=y.slideClass,p.setAttribute("data-swiperindex",i),p.innerHTML=e[i],b.wrapper.appendChild(p))}}b.reInit(!0)}},b.calcSlides(),0<y.loader.slides.length&&0===b.slides.length&&b.loadSlides(),y.loop&&b.createLoop(),b.init(),function(){var e,t,i=b.h.addEventListener,n="wrapper"===y.eventTarget?b.wrapper:b.container;if(b.browser.ie10||b.browser.ie11?(i(n,b.touchEvents.touchStart,f),i(document,b.touchEvents.touchMove,h),i(document,b.touchEvents.touchEnd,g)):(b.support.touch&&(i(n,"touchstart",f),i(n,"touchmove",h),i(n,"touchend",g)),y.simulateTouch&&(i(n,"mousedown",f),i(document,"mousemove",h),i(document,"mouseup",g))),y.autoResize&&i(window,"resize",b.resizeFix),o(),b._wheelEvent=!1,y.mousewheelControl){if(void 0!==document.onmousewheel&&(b._wheelEvent="mousewheel"),!b._wheelEvent)try{new WheelEvent("wheel"),b._wheelEvent="wheel"}catch(e){}b._wheelEvent||(b._wheelEvent="DOMMouseScroll"),b._wheelEvent&&i(b.container,b._wheelEvent,d)}if(y.keyboardControl&&i(document,"keydown",l),y.updateOnImagesReady){b.imagesToLoad=a("img",b.container);for(var r=0;r<b.imagesToLoad.length;r++)e=b.imagesToLoad[r].getAttribute("src"),t=void 0,(t=new Image).onload=function(){null!=b&&(void 0!==b.imagesLoaded&&b.imagesLoaded++,b.imagesLoaded===b.imagesToLoad.length&&(b.reInit(),y.onImagesReady&&b.fireCallback(y.onImagesReady,b)))},t.src=e}}(),y.pagination&&b.createPagination(!0),y.loop||0<y.initialSlide?b.swipeTo(y.initialSlide,0,!1):b.updateActiveSlide(0),y.autoplay&&b.startAutoplay(),b.centerIndex=b.activeIndex,y.onSwiperCreated&&b.fireCallback(y.onSwiperCreated,b),b.callPlugins("onSwiperCreated")}};Swiper.prototype={plugins:{},wrapperTransitionEnd:function(t,i){function n(e){if(e.target===s&&(t(o),o.params.queueEndCallbacks&&(o._queueEndCallbacks=!1),!i))for(r=0;r<a.length;r++)o.h.removeEventListener(s,a[r],n)}var r,o=this,s=o.wrapper,a=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"];if(t)for(r=0;r<a.length;r++)o.h.addEventListener(s,a[r],n)},getWrapperTranslate:function(e){var t,i,n,r,o=this.wrapper;return void 0===e&&(e="horizontal"===this.params.mode?"x":"y"),this.support.transforms&&this.params.useCSS3Transforms?(n=window.getComputedStyle(o,null),window.WebKitCSSMatrix?r=new WebKitCSSMatrix("none"===n.webkitTransform?"":n.webkitTransform):t=(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===e&&(i=window.WebKitCSSMatrix?r.m41:parseFloat(16===t.length?t[12]:t[4])),"y"===e&&(i=window.WebKitCSSMatrix?r.m42:parseFloat(16===t.length?t[13]:t[5]))):("x"===e&&(i=parseFloat(o.style.left,10)||0),"y"===e&&(i=parseFloat(o.style.top,10)||0)),i||0},setWrapperTranslate:function(e,t,i){var n,r=this.wrapper.style,o={x:0,y:0,z:0};3===arguments.length?(o.x=e,o.y=t,o.z=i):(void 0===t&&(t="horizontal"===this.params.mode?"x":"y"),o[t]=e),this.support.transforms&&this.params.useCSS3Transforms?(n=this.support.transforms3d?"translate3d("+o.x+"px, "+o.y+"px, "+o.z+"px)":"translate("+o.x+"px, "+o.y+"px)",r.webkitTransform=r.MsTransform=r.msTransform=r.MozTransform=r.OTransform=r.transform=n):(r.left=o.x+"px",r.top=o.y+"px"),this.callPlugins("onSetWrapperTransform",o),this.params.onSetWrapperTransform&&this.fireCallback(this.params.onSetWrapperTransform,this,o)},setWrapperTransition:function(e){var t=this.wrapper.style;t.webkitTransitionDuration=t.MsTransitionDuration=t.msTransitionDuration=t.MozTransitionDuration=t.OTransitionDuration=t.transitionDuration=e/1e3+"s",this.callPlugins("onSetWrapperTransition",{duration:e}),this.params.onSetWrapperTransition&&this.fireCallback(this.params.onSetWrapperTransition,this,e)},h:{getWidth:function(e,t,i){var n=window.getComputedStyle(e,null).getPropertyValue("width"),r=parseFloat(n);return(isNaN(r)||0<n.indexOf("%")||r<0)&&(r=e.offsetWidth-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left"))-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-right"))),t&&(r+=parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-right"))),i?Math.ceil(r):r},getHeight:function(e,t,i){if(t)return e.offsetHeight;var n=window.getComputedStyle(e,null).getPropertyValue("height"),r=parseFloat(n);return(isNaN(r)||0<n.indexOf("%")||r<0)&&(r=e.offsetHeight-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-top"))-parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-bottom"))),t&&(r+=parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-top"))+parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-bottom"))),i?Math.ceil(r):r},getOffset:function(e){var t=e.getBoundingClientRect(),i=document.body,n=e.clientTop||i.clientTop||0,r=e.clientLeft||i.clientLeft||0,o=window.pageYOffset||e.scrollTop,s=window.pageXOffset||e.scrollLeft;return document.documentElement&&!window.pageYOffset&&(o=document.documentElement.scrollTop,s=document.documentElement.scrollLeft),{top:t.top+o-n,left:t.left+s-r}},windowWidth:function(){return window.innerWidth?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:void 0},windowHeight:function(){return window.innerHeight?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:void 0},windowScroll:function(){return"undefined"!=typeof pageYOffset?{left:window.pageXOffset,top:window.pageYOffset}:document.documentElement?{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}:void 0},addEventListener:function(e,t,i,n){void 0===n&&(n=!1),e.addEventListener?e.addEventListener(t,i,n):e.attachEvent&&e.attachEvent("on"+t,i)},removeEventListener:function(e,t,i,n){void 0===n&&(n=!1),e.removeEventListener?e.removeEventListener(t,i,n):e.detachEvent&&e.detachEvent("on"+t,i)}},setTransform:function(e,t){var i=e.style;i.webkitTransform=i.MsTransform=i.msTransform=i.MozTransform=i.OTransform=i.transform=t},setTranslate:function(e,t){var i=e.style,n=t.x||0,r=t.y||0,o=t.z||0,s=this.support.transforms3d?"translate3d("+n+"px,"+r+"px,"+o+"px)":"translate("+n+"px,"+r+"px)";i.webkitTransform=i.MsTransform=i.msTransform=i.MozTransform=i.OTransform=i.transform=s,this.support.transforms||(i.left=n+"px",i.top=r+"px")},setTransition:function(e,t){var i=e.style;i.webkitTransitionDuration=i.MsTransitionDuration=i.msTransitionDuration=i.MozTransitionDuration=i.OTransitionDuration=i.transitionDuration=t+"ms"},support:{touch:window.Modernizr&&!0===Modernizr.touch||!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch),transforms3d:window.Modernizr&&!0===Modernizr.csstransforms3d||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),transforms:window.Modernizr&&!0===Modernizr.csstransforms||function(){var e=document.createElement("div").style;return"transform"in e||"WebkitTransform"in e||"MozTransform"in e||"msTransform"in e||"MsTransform"in e||"OTransform"in e}(),transitions:window.Modernizr&&!0===Modernizr.csstransitions||function(){var e=document.createElement("div").style;return"transition"in e||"WebkitTransition"in e||"MozTransition"in e||"msTransition"in e||"MsTransition"in e||"OTransition"in e}(),classList:"classList"in document.createElement("div")},browser:{ie8:function(){var e=-1;if("Microsoft Internet Explorer"===navigator.appName){var t=navigator.userAgent;null!==new RegExp(/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(t)&&(e=parseFloat(RegExp.$1))}return-1!==e&&e<9}(),ie10:window.navigator.msPointerEnabled,ie11:window.navigator.pointerEnabled}},(window.jQuery||window.Zepto)&&function(o){o.fn.swiper=function(n){var r;return this.each(function(e){var t=o(this);if(!t.data("swiper")){var i=new Swiper(t[0],n);e||(r=i),t.data("swiper",i)}}),r}}(window.jQuery||window.Zepto),"undefined"!=typeof module&&(module.exports=Swiper),"function"==typeof define&&define.amd&&define([],function(){return Swiper});