/*! * Splide.js * Version : 1.0.3 * License : MIT * Copyright: 2019 Naotoshi Fujita */ !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Splide=n():t.Splide=n()}(window,function(){return i={},o.m=e=[function(t,n,e){"use strict";function i(){return(i=Object.assign||function(t){for(var n=1;n])(\d+)?/),i=e&&e[1]||"",o=e?parseInt(e[2]):0;switch(i){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":n=this.pageToIndex(-1o.flickThreshold&&Math.abs(t.offset[f])<150?a+=r*Math.min(e*o.flickPower,i.width*(o.flickMaxPages||1)):a+=r*i.slideWidth/2;var s=c.toIndex(a);u.is(_)||(s=W(s,0,l.edgeIndex)),l.go(s,o.isNavigation)}}(o),r=!1)}function g(t,n){var e=t.timeStamp,i=t.touches,o=i?i[0]:t,r=o.clientX,a=o.clientY,s=n.to||{},u=s.x,d=void 0===u?r:u,c=s.y,l=void 0===c?a:c,f={x:r-d,y:a-l},p=e-(n.timeStamp||0);return{from:{x:d,y:l},to:{x:r,y:a},offset:f,timeStamp:e,velocity:{x:f.x/p,y:f.y/p}}}return n}function X(o,r,a){var s,e=[],u={required:o.options.autoplay,mount:function(){var t=o.options,n=r.Elements,e=n.slides,i=n.bar;e.length>t.perPage&&(s=function(n,e,i){function o(t){d||(s=(a=t-(r=r||t))/e,e<=a&&(r=0,s=1,n()),i&&i(s),u(o))}var r,a,s,u=window.requestAnimationFrame,d=!0;return{pause:function(){d=!0,r=0},play:function(){r=0,d&&(d=!1,u(o))}}}(function(){o.go(">")},t.interval,function(t){o.emit(a+":playing",t),i&&v(i,{width:100*t+"%"})}),function(){var t=o.options,n=r.Elements,e=o.sub,i=[o.root,e?e.root:null];t.pauseOnHover&&(d(i,"mouseleave",V,!0),d(i,"mouseenter",V,!1));t.pauseOnFocus&&(d(i,"focusout",Y,!0),d(i,"focusin",Y,!1));b(n.play,"click",function(){u.play(Y),u.play(K)}),d([n.pause],"click",K,!1),o.on("move",function(){u.play()})}(),this.play())},play:function(n){void 0===n&&(n=0),(e=e.filter(function(t){return t!==n})).length||(o.emit(a+":play"),s.play())},pause:function(t){void 0===t&&(t=0),s.pause(),-1===e.indexOf(t)&&e.push(t),1===e.length&&o.emit(a+":pause")}};function d(t,n,e,i){for(var o in t)b(t[o],n,function(){u[i?"play":"pause"](e)})}return u}function D(s,u,d){var c,i=s.classes,n=s.root;function o(t){var n=p("button",{class:i.arrow+" "+(t?i.prev:i.next)});return n.innerHTML='',n}return{required:s.options.arrows||u.Elements.arrows.prev&&u.Elements.arrows.next,mount:function(){var t=u.Elements;(c=t.arrows).prev&&c.next||!s.options.arrows||(c=function(){var t=p("div",{class:i.arrows}),n=o(!0),e=o(!1);return t.appendChild(n),t.appendChild(e),{wrapper:t,prev:n,next:e}}(),n.insertBefore(c.wrapper,t.track)),c&&(function(){var t=s.options.perMove;b(c.prev,"click",function(){s.go(t?"-"+t:"<")}),b(c.next,"click",function(){s.go(t?"+"+t:">")})}(),s.on("mounted move updated",function(){var t=c,n=t.prev,e=t.next,i=u.Controller,o=i.prevIndex,r=i.nextIndex,a=o===r;n.disabled=o<0||a,e.disabled=r<0||a,s.emit(d+":updated",n,e,o,r)})),this.arrows=c},mounted:function(){s.emit(d+":mounted",c.prev,c.next)}}}function G(s,e,o){var r={},a={required:s.options.pagination,mount:function(){r=function(){var n=s.options,o=s.classes,r=p("ul",{class:o.pagination}),a=e.Slides,t=a.getSlides(!1,!0).filter(function(t){return!1!==n.focus||t.index%n.perPage==0}).map(function(t,n){var e=p("li",{}),i=p("button",{class:o.page});return e.appendChild(i),r.appendChild(e),b(i,"click",function(){s.go(">"+n)}),{li:e,button:i,page:n,Slides:a.getSlidesByPage(n)}});return{list:r,items:t}}();var t=s.root;"top"===s.options.pagination?t.insertBefore(r.list,e.Elements.track):t.appendChild(r.list),s.on(U,n).on(Q,function(){a.destroy(),s.options.pagination&&(a.mount(),a.mounted())})},mounted:function(){var t=s.index;s.emit(o+":mounted",r,this.getItem(t)),n(t,-1)},destroy:function(){r&&r.list&&s.root.removeChild(r.list),s.off(U).off(Q),r=null},getItem:function(t){return r.items[e.Controller.indexToPage(t)]},get data(){return r}};function n(t,n){var e=a.getItem(n),i=a.getItem(t);e&&g(e.button,l.active),i&&h(i.button,l.active),s.emit(o+":updated",r,e,i)}return a}function J(s,i){var u,d,c=s.i18n;function n(t,n){y(t,"aria-hidden",!n),y(t,"tabindex",n?0:-1)}function t(t,n){u=f(c.prev),d=f(c.next),t.appendChild(u),n.appendChild(d);var e=i.Elements.track.id;y(t,nt,e),y(n,nt,e)}function e(t,n,e,i){var o=s.index,r=-1",Left:"<",Right:">"},tt="aria-current",nt="aria-controls",et="aria-label",it="move.sync",ot=[" ","Enter","Spacebar"],rt={Options:M,Elements:L,Controller:A,Slides:F,Track:z,Clones:R,Layout:B,Drag:N,Autoplay:X,Cover:function(t,n){var e=t.options;function i(t){var n=t.parentElement;n&&(v(n,{background:'center/cover no-repeat url("'+t.src+'")'}),v(t,{display:"none"}))}return{required:e.cover&&(e.height||e.heightRatio||e.fixedHeight),mount:function(){n.Slides.getSlides(!0,!1).forEach(function(t){var n=f(t,"img");n&&n.src&&i(n)}),t.on("lazyload:loaded",function(t){i(t)})}}},Arrows:D,Pagination:G,LazyLoad:function(o,t,r){var n=0,i=[],e=o.options.lazyLoad,a="sequential"===e;function s(n){var e=o.options;(i=i.filter(function(t){return!t.Slide.isWithin(n,e.perPage*(e.preloadPages+1))||(u(t.img,t.Slide),!1)})).length||o.off("moved."+r)}function u(t,n){h(n.slide,l.loading);var e=p("span",{class:o.classes.spinner});t.parentElement.appendChild(e),t.onload=function(){c(t,e,n,!1)},t.onerror=function(){c(t,e,n,!0)},v(t,{visibility:"hidden"}),y(t,"src",t.getAttribute(Z))}function d(){if(n