| 12 |
- function _defineProperties(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function _createClass(n,t,e){return t&&_defineProperties(n.prototype,t),e&&_defineProperties(n,e),Object.defineProperty(n,"prototype",{writable:!1}),n}!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).Splide=t()}(this,function(){"use strict";var F="mounted",r="ready",L="move",C="moved",A="shifted",D="click",M="active",z="inactive",T="visible",N="hidden",I="slide:keydown",O="refresh",j="updated",x="resize",P="resized",R="repositioned",b="scroll",B="scrolled",s="destroy",W="navigation:mounted",_="autoplay:play",w="autoplay:pause",v="lazyload:loaded",n={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,DRAGGING:5,DESTROYED:6},X=10;function E(n){n.length=0}function G(n){return!o(n)&&"object"==typeof n}function i(n){return Array.isArray(n)}function H(n){return"string"==typeof n}function Y(n){return void 0===n}function o(n){return null===n}function m(n){return n instanceof HTMLElement}function y(n){return i(n)?n:[n]}function S(n,t){y(n).forEach(t)}function k(n,t){return-1<n.indexOf(t)}function q(n,t){return n.push.apply(n,y(t)),n}var u=Array.prototype;function f(n,t,e){return u.slice.call(n,t,e)}function U(t,n,e){t&&S(n,function(n){n&&t.classList[e?"add":"remove"](n)})}function J(n,t){U(n,H(t)?t.split(" "):t,!0)}function K(n,t){S(t,n.appendChild.bind(n))}function Q(n,e){S(n,function(n){var t=e.parentNode;t&&t.insertBefore(n,e)})}function V(n,t){return m(n)&&(n.msMatchesSelector||n.matches).call(n,t)}function Z(n,t){return n?f(n.children).filter(function(n){return V(n,t)}):[]}function $(n,t){return t?Z(n,t)[0]:n.firstElementChild}function c(n,t,e){if(n)for(var i=Object.keys(n),i=e?i.reverse():i,o=0;o<i.length;o++){var r=i[o];if("__proto__"!==r&&!1===t(n[r],r))break}return n}function nn(i){return f(arguments,1).forEach(function(e){c(e,function(n,t){i[t]=e[t]})}),i}function l(e){return f(arguments).forEach(function(n){c(n,function(n,t){i(n)?e[t]=n.slice():G(n)?e[t]=l(G(e[t])?e[t]:{},n):e[t]=n})}),e}function tn(n,e){S(n,function(t){S(e,function(n){t&&t.removeAttribute(n)})})}function en(e,t,i){G(t)?c(t,function(n,t){en(e,t,n)}):S(e,function(n){o(i)?tn(n,t):n.setAttribute(t,String(i))})}function on(n,t,e){n=document.createElement(n);return t&&(H(t)?J:en)(n,t),e&&K(e,n),n}function rn(n,t,e){if(Y(e))return getComputedStyle(n)[t];o(e)||(n=n.style)[t]!==(e=""+e)&&(n[t]=e)}function un(n,t){rn(n,"display",t)}function sn(n,t){return n.getAttribute(t)}function cn(n,t){return n&&n.classList.contains(t)}function an(n){return n.getBoundingClientRect()}function fn(n){S(n,function(n){n&&n.parentNode&&n.parentNode.removeChild(n)})}function ln(n){return $((new DOMParser).parseFromString(n,"text/html").body)}function dn(n,t){n.preventDefault(),t&&(n.stopPropagation(),n.stopImmediatePropagation())}function pn(n,t){return n&&n.querySelector(t)}function hn(n,t){return f(n.querySelectorAll(t))}function gn(n,t){U(n,t,!1)}function vn(n){return n.timeStamp}function mn(n){return H(n)?n:n?n+"px":""}var yn="splide",a="data-"+yn;function bn(n,t){if(!n)throw new Error("["+yn+"] "+(t||""))}function _n(n){return n.bind.apply(n,[null].concat(f(arguments,1)))}function wn(){}var xn=setTimeout;function p(n){return requestAnimationFrame(n)}var En=Math.min,Sn=Math.max,Pn=Math.floor,kn=Math.ceil,Ln=Math.abs;function Cn(n,t,e,i){var o=En(t,e),e=Sn(t,e);return i?o<n&&n<e:o<=n&&n<=e}function An(n,t,e){var i=En(t,e),e=Sn(t,e);return En(Sn(i,n),e)}function Dn(n){return(0<n)-(n<0)}function Mn(t,n){return S(n,function(n){t=t.replace("%s",""+n)}),t}function zn(n){return n<10?"0"+n:""+n}var Tn={};function d(){var r={};function i(n,e){t(n,function(n,t){r[n]=(r[n]||[]).filter(function(n){return n._key?n._key!==e:e||n._namespace!==t})})}function t(n,t){y(n).join(" ").split(" ").forEach(function(n){n=n.split(".");t(n[0],n[1])})}return{on:function(n,e,i,o){void 0===o&&(o=X),t(n,function(n,t){r[n]=r[n]||[],q(r[n],{_callback:e,_namespace:t,_priority:o,_key:i}).sort(function(n,t){return n._priority-t._priority})})},off:i,offBy:function(e){c(r,function(n,t){i(t,e)})},emit:function(n){var t=arguments;(r[n]||[]).forEach(function(n){n._callback.apply(n,f(t,1))})},destroy:function(){r={}}}}function Nn(n,t){var i=n.event,o={},u=[];function e(n,t,e){S(n,function(n){n&&t.split(" ").forEach(_n(e,n))})}function r(){u=u.filter(function(n){n[3]()}),i.offBy(o)}return t||i.on(s,r,o),{on:function(n,t,e){i.on(n,t,o,e)},off:function(n){i.off(n,o)},emit:i.emit,bind:function(n,t,o,r){e(n,t,function(n,t){var e="addEventListener"in n,i=e?n.removeEventListener.bind(n,t,o,r):n.removeListener.bind(n,o);e?n.addEventListener(t,o,r):n.addListener(o),u.push([n,t,o,i])})},unbind:function(n,t,i){e(n,t,function(t,e){u=u.filter(function(n){return!!(n[0]!==t||n[1]!==e||i&&n[2]!==i)||(n[3](),!1)})})},destroy:r}}function In(t,e,i,o){var r,n,u=Date.now,s=0,c=!0,a=0;function f(){if(!c){var n=u()-r;if(t<=n?(s=1,r=u()):s=n/t,i&&i(s),1===s&&(e(),o&&++a>=o))return l();p(f)}}function l(){c=!0}function d(){cancelAnimationFrame(n),c=!(n=s=0)}return{start:function(n){n||d(),r=u()-(n?s*t:0),c=!1,p(f)},rewind:function(){r=u(),s=0,i&&i(s)},pause:l,cancel:d,set:function(n){t=n},isPaused:function(){return c}}}function h(n){var t=n;return{set:function(n){t=n},is:function(n){return k(y(n),t)}}}function On(e,i){var o;return function(){var n,t=this;o||(n=f(arguments),(o=In(i||0,function(){e.apply(t,n),o=null},null,1)).start())}}var g={marginRight:["marginBottom","marginLeft"],autoWidth:["autoHeight"],fixedWidth:["fixedHeight"],paddingLeft:["paddingTop","paddingRight"],paddingRight:["paddingBottom","paddingLeft"],width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:["ArrowUp","ArrowRight"],ArrowRight:["ArrowDown","ArrowLeft"]};var Rn="role",Fn="tabindex",t="aria-",jn=t+"controls",Bn=t+"current",Wn=t+"label",Xn=t+"hidden",Gn=t+"orientation",Hn=t+"roledescription",Yn=t+"atomic",qn=t+"live",Un=[Rn,Fn,"disabled",jn,Bn,Wn,Xn,Gn,Hn,Yn,qn],Jn=yn,Kn=yn+"__slider",Qn=yn+"__track",Vn=yn+"__list",Zn=yn+"__slide",$n=Zn+"--clone",nt=Zn+"__container",tt=yn+"__arrows",e=yn+"__arrow",et=e+"--prev",it=e+"--next",t=yn+"__pagination",ot=yn+"__progress",rt=ot+"__bar",ut=yn+"__autoplay",st=yn+"__play",ct=yn+"__pause",at="is-active",ft="is-prev",lt="is-next",dt="is-visible",pt="is-loading",ht=[at,dt,ft,lt,pt];var gt="slide",vt="loop",mt="fade";function yt(o,i,e,r){var u,n=Nn(o),t=n.on,s=n.emit,c=n.bind,a=n.destroy,f=o.Components,l=o.root,d=o.options,p=d.isNavigation,h=d.updateOnMove,g=d.i18n,v=f.Direction.resolve,m=sn(r,"style"),y=-1<e,b=$(r,"."+nt),_=d.focusableNodes&&hn(r,d.focusableNodes);function w(){var n=Mn(g.slideX,(y?e:i)+1),t=o.splides.map(function(n){return n.splide.root.id}).join(" ");en(r,Wn,n),en(r,jn,t),en(r,Rn,"menuitem"),S(P())}function x(){u||E()}function E(){var n,t,e;u||(n=o.index,S(P()),t=function(){if(o.is(mt))return P();var n=an(f.Elements.track),t=an(r),e=v("left"),i=v("right");return Pn(n[e])<=kn(t[e])&&Pn(t[i])<=kn(n[i])}(),e=!t&&(!P()||y),en(r,Xn,e||null),en(r,Fn,!e&&d.slideFocus?0:null),en(_||[],Fn,e?-1:null),t!==cn(r,dt)&&(U(r,dt,t),s(t?T:N,k)),U(r,ft,i===n-1),U(r,lt,i===n+1))}function S(n){n!==cn(r,at)&&(U(r,at,n),p&&en(r,Bn,n||null),s(n?M:z,k))}function P(){var n=o.index;return n===i||d.cloneStatus&&n===e}var k={index:i,slideIndex:e,slide:r,container:b,isClone:y,mount:function(){y||(r.id=l.id+"-slide"+zn(i+1),en(r,Rn,"group"),en(r,Hn,g.slide),en(r,Wn,Mn(g.slideLabel,[i+1,o.length]))),c(r,"click keydown",function(n){s("click"===n.type?D:I,k,n)}),t([O,R,A,C,B],E),t(W,w),h&&t(L,x)},destroy:function(){u=!0,a(),gn(r,ht),tn(r,Un),en(r,"style",m)},update:E,style:function(n,t,e){rn(e&&b||r,n,t)},isWithin:function(n,t){return n=Ln(n-i),(n=!y&&(d.rewind||o.is(vt))?En(n,o.length-n):n)<=t}};return k}var bt=a+"-interval";var _t={passive:!1,capture:!0},wt="touchmove mousemove",xt="touchend touchcancel mouseup";var Et=["Left","Right","Up","Down"],St="keydown";var Pt=a+"-lazy",kt=Pt+"-srcset",Lt="["+Pt+"], ["+kt+"]";var Ct=[" ","Enter","Spacebar"];var At=Object.freeze({__proto__:null,Media:function(e,n,t){var i=Nn(e,!0),o=t.breakpoints||{},r=l({},t),u=[];function s(n){n&&i.destroy()}function c(n){u.push(n.map(function(n){var t=n[1]&&matchMedia(n[1]);return t&&i.bind(t,"change",a),[n[0],t]}))}function a(){var n=u.reduce(function(n,t){var e=(e=function(n){return!n[1]||n[1].matches},f(t).filter(e)[0]||[]);return e[1]&&i.emit("media",e[1]),l(n,e[0]||{})},l({},r)),t=n.destroy;t?(e.options=r,e.destroy("completely"===t)):e.state.is(6)?(s(!0),e.mount()):e.options=n}return{setup:function(){var e="min"===t.mediaQuery;c(Object.keys(o).sort(function(n,t){return e?+t-+n:+n-+t}).map(function(n){return[o[n],"("+(e?"min":"max")+"-width:"+n+"px)"]}).concat([[r]])),c([[{speed:0,autoplay:"pause"},"(prefers-reduced-motion: reduce)"]]),a()},mount:wn,destroy:s}},Direction:function(n,t,i){return{resolve:function(n,t){var e=i.direction;return g[n]["rtl"!==e||t?"ttb"===e?0:-1:1]||n},orient:function(n){return n*("rtl"===i.direction?1:-1)}}},Elements:function(n,t,e){var i,o,r,u,s=Nn(n).on,c=n.root,a=e.i18n,f={},l=[];function d(){var n;!function(){o=$(c,"."+Kn),r=pn(c,"."+Qn),u=$(r,"."+Vn),bn(r&&u,"A track/list element is missing."),q(l,Z(u,"."+Zn+":not(."+$n+")"));var n=g("."+ut),t=g("."+tt);nn(f,{root:c,slider:o,track:r,list:u,slides:l,arrows:t,autoplay:n,prev:pn(t,"."+et),next:pn(t,"."+it),bar:pn(g("."+ot),"."+rt),play:pn(n,"."+st),pause:pn(n,"."+ct)})}(),n=c.id||function(n){return""+n+zn(Tn[n]=(Tn[n]||0)+1)}(yn),c.id=n,r.id=r.id||n+"-track",u.id=u.id||n+"-list",en(c,Hn,a.carousel),en(c,Rn,"SECTION"!==c.tagName&&e.role||null),en(u,Rn,"none"),J(c,i=v())}function p(){E(l),gn(c,i),tn([c,r,u],Un.concat("style"))}function h(){gn(c,i),J(c,i=v())}function g(n){return $(c,n)||$(o,n)}function v(){return[Jn+"--"+e.type,Jn+"--"+e.direction,e.drag&&Jn+"--draggable",e.isNavigation&&Jn+"--nav",at]}return nn(f,{setup:d,mount:function(){var n=X-2;s(O,p,n),s(O,d,n),s(j,h)},destroy:p})},Slides:function(i,o,r){var n=Nn(i),t=n.on,u=n.emit,s=n.bind,c=(n=o.Elements).slides,a=n.list,f=[];function e(){c.forEach(function(n,t){d(n,t,-1)})}function l(){h(function(n){n.destroy()}),E(f)}function d(n,t,e){n=yt(i,t,e,n);n.mount(),f.push(n)}function p(n){return n?g(function(n){return!n.isClone}):f}function h(n,t){p(t).forEach(n)}function g(t){return f.filter("function"==typeof t?t:function(n){return H(t)?V(n.slide,t):k(y(t),n.index)})}return{mount:function(){e(),t(O,l),t(O,e),t([F,O],function(){f.sort(function(n,t){return n.index-t.index})})},destroy:l,update:function(){h(function(n){n.update()})},register:d,get:p,getIn:function(n){var t=o.Controller,e=t.toIndex(n),i=t.hasFocus()?1:r.perPage;return g(function(n){return Cn(n.index,e,e+i-1)})},getAt:function(n){return g(n)[0]},add:function(n,o){S(n,function(n){var t,e,i;m(n=H(n)?ln(n):n)&&((t=c[o])?Q(n,t):K(a,n),J(n,r.classes.slide),n=n,e=_n(u,x),n=hn(n,"img"),(i=n.length)?n.forEach(function(n){s(n,"load error",function(){--i||e()})}):e())}),u(O)},remove:function(n){fn(g(n).map(function(n){return n.slide})),u(O)},forEach:h,filter:g,style:function(t,e,i){h(function(n){n.style(t,e,i)})},getLength:function(n){return(n?c:f).length},isEnough:function(){return f.length>r.perPage}}},Layout:function(n,t,e){var i,o,r=(c=Nn(n)).on,u=c.bind,s=c.emit,c=t.Slides,a=t.Direction.resolve,f=(t=t.Elements).root,l=t.track,d=t.list,p=c.getAt,h=c.style;function g(){o=null,i="ttb"===e.direction,rn(f,"maxWidth",mn(e.width)),rn(l,a("paddingLeft"),m(!1)),rn(l,a("paddingRight"),m(!0)),v()}function v(){var n=an(f);o&&o.width===n.width&&o.height===n.height||(rn(l,"height",function(){var n="";i&&(bn(n=y(),"height or heightRatio is missing."),n="calc("+n+" - "+m(!1)+" - "+m(!0)+")");return n}()),h(a("marginRight"),mn(e.gap)),h("width",(e.autoWidth?"":mn(e.fixedWidth)||(i?"":b()))||null),h("height",mn(e.fixedHeight)||(i?e.autoHeight?"":b():y())||null,!0),o=n,s(P))}function m(n){var t=e.padding,n=a(n?"right":"left");return t&&mn(t[n]||(G(t)?0:t))||"0px"}function y(){return mn(e.height||an(d).width*e.heightRatio)}function b(){var n=mn(e.gap);return"calc((100%"+(n&&" + "+n)+")/"+(e.perPage||1)+(n&&" - "+n)+")"}function _(n,t){var e=p(n);if(e){n=an(e.slide)[a("right")],e=an(d)[a("left")];return Ln(n-e)+(t?0:w())}return 0}function w(){var n=p(0);return n&&parseFloat(rn(n.slide,a("marginRight")))||0}return{mount:function(){g(),u(window,"resize load",On(_n(s,x))),r([j,O],g),r(x,v)},listSize:function(){return an(d)[a("width")]},slideSize:function(n,t){return(n=p(n||0))?an(n.slide)[a("width")]+(t?0:w()):0},sliderSize:function(){return _(n.length-1,!0)-_(-1,!0)},totalSize:_,getPadding:function(n){return parseFloat(rn(l,a("padding"+(n?"Right":"Left"))))||0}}},Clones:function(s,n,c){var t,e=Nn(s),i=e.on,o=e.emit,a=n.Elements,f=n.Slides,r=n.Direction.resolve,l=[];function u(){(t=h())&&(function(o){var r=f.get().slice(),u=r.length;if(u){for(;r.length<o;)q(r,r);q(r.slice(-o),r.slice(0,o)).forEach(function(n,t){var e=t<o,i=function(n,t){n=n.cloneNode(!0);return J(n,c.classes.clone),n.id=s.root.id+"-clone"+zn(t+1),n}(n.slide,t);e?Q(i,r[0].slide):K(a.list,i),q(l,i),f.register(i,t-o+(e?0:u),n.index)})}}(t),o(x))}function d(){fn(l),E(l)}function p(){t<h()&&o(O)}function h(){var n,t,e=c.clones;return s.is(vt)?e||(n=a.list,H(t=c[r("fixedWidth")])&&(t=an(n=on("div",{style:"width: "+t+"; position: absolute;"},n)).width,fn(n)),e=((t=t)&&kn(an(a.track)[r("width")]/t)||c[r("autoWidth")]&&s.length||c.perPage)*(c.drag?(c.flickMaxPages||1)+1:2)):e=0,e}return{mount:function(){u(),i(O,d),i(O,u),i([j,x],p)},destroy:d}},Move:function(u,s,c){var a,n=Nn(u),t=n.on,f=n.emit,i=(n=s.Layout).slideSize,e=n.getPadding,o=n.totalSize,r=n.listSize,l=n.sliderSize,d=(n=s.Direction).resolve,p=n.orient,h=(n=s.Elements).list,g=n.track;function v(){E()||(s.Scroll.cancel(),m(u.index),f(R))}function m(n){y(_(n,!0))}function y(n,t){u.is(mt)||(t=t?n:function(n){{var t,e;u.is(vt)&&(e=p(n-w()),t=S(!1,n)&&e<0,e=S(!0,n)&&0<e,(t||e)&&(n=b(n,e)))}return n}(n),h.style.transform="translate"+d("X")+"("+t+"px)",n!==t&&f(A))}function b(n,t){var e=n-x(t),i=l();return n-=p(i*(kn(Ln(e)/i)||1))*(t?1:-1)}function _(n,t){var e=p(o(n-1)-(e=n,"center"===(n=c.focus)?(r()-i(e,!0))/2:+n*i(e)||0));return t?function(n){c.trimSpace&&u.is(gt)&&(n=An(n,0,p(l()-r())));return n}(e):e}function w(){var n=d("left");return an(h)[n]-an(g)[n]+p(e(!1))}function x(n){return _(n?s.Controller.getEnd():0,!!c.trimSpace)}function E(){return u.state.is(4)&&c.waitForTransition}function S(n,t){t=Y(t)?w():t;var e=!0!==n&&p(t)<p(x(!1)),t=!1!==n&&p(t)>p(x(!0));return e||t}return{mount:function(){a=s.Transition,t([F,P,j,O],v)},move:function(n,t,e,i){var o,r;E()||(o=u.state.set,r=w(),n!==t&&(a.cancel(),y(b(r,t<n),!0)),o(4),f(L,t,e,n),a.start(t,function(){o(3),f(C,t,e,n),"move"===c.trimSpace&&n!==e&&r===w()?s.Controller.go(e<n?">":"<",!1,i):i&&i()}))},jump:m,translate:y,shift:b,cancel:function(){y(w()),a.cancel()},toIndex:function(n){for(var t=s.Slides.get(),e=0,i=1/0,o=0;o<t.length;o++){var r=t[o].index,u=Ln(_(r,!0)-n);if(!(u<=i))break;i=u,e=r}return e},toPosition:_,getPosition:w,getLimit:x,isBusy:E,exceededLimit:S}},Controller:function(n,u,o){var r,s,c,t=Nn(n).on,a=u.Move,f=a.getPosition,l=a.getLimit,e=u.Slides,d=e.isEnough,i=e.getLength,p=n.is(vt),h=n.is(gt),g=o.start||0,v=g;function m(){r=i(!0),s=o.perMove,c=o.perPage,g=An(g,0,r-1)}function y(n,t,e,i,o){var r=t?n:L(n);u.Scroll.scroll(t||e?a.toPosition(r,!0):n,i,function(){C(a.toIndex(a.getPosition())),o&&o()})}function b(n){return w(!1,n)}function _(n){return w(!0,n)}function w(n,t){var e,i,o=s||(A()?1:c),r=x(g+o*(n?-1:1),g);return-1!==r||!h||(e=f(),i=l(!n),o=1,Ln(e-i)<o)?t?r:S(r):n?0:E()}function x(n,t,e){var i;return d()?(i=E(),n<0||i<n?n=Cn(0,n,t,!0)||Cn(i,t,n,!0)?P(k(n)):p?s||A()?n:n<0?-(r%c||c):r:o.rewind?n<0?i:0:-1:e||n===t||(n=s?n:P(k(t)+(n<t?-1:1)))):n=-1,n}function E(){var n=r-c;return(A()||p&&s)&&(n=r-1),Sn(n,0)}function S(n){return p?d()?n%r+(n<0?r:0):-1:n}function P(n){return An(A()?n:c*n,0,E())}function k(n){return A()||(n=Cn(n,r-c,r-1)?r-1:n,n=Pn(n/c)),n}function L(n){n=a.toIndex(n);return h?An(n,0,E()):n}function C(n){n!==g&&(v=g,g=n)}function A(){return!Y(o.focus)||o.isNavigation}return{mount:function(){m(),t([j,O],m,X-1)},go:function(n,t,e){var i=function(n){var t=g;{var e,i;H(n)?(i=n.match(/([+\-<>])(\d+)?/)||[],e=i[1],i=i[2],"+"===e||"-"===e?t=x(g+ +(""+e+(+i||1)),g,!0):">"===e?t=i?P(+i):b(!0):"<"===e&&(t=_(!0))):t=p?n:An(n,0,E())}return t}(n);o.useScroll?y(i,!0,!0,o.speed,e):-1<(n=S(i))&&!a.isBusy()&&(t||n!==g)&&(C(n),a.move(i,n,v,e))},scroll:y,getNext:b,getPrev:_,getAdjacent:w,getEnd:E,setIndex:C,getIndex:function(n){return n?v:g},toIndex:P,toPage:k,toDest:L,hasFocus:A}},Arrows:function(o,n,t){var e,i=Nn(o),r=i.on,u=i.bind,s=i.emit,c=t.classes,a=t.i18n,f=n.Elements,l=n.Controller,d=f.arrows,p=f.prev,h=f.next,g={};function v(){var n;t.arrows&&(p&&h||(d=on("div",c.arrows),p=m(!0),h=m(!1),e=!0,K(d,[p,h]),Q(d,$("slider"===t.arrows&&f.slider||o.root)))),p&&h&&(g.prev||(en([p,h],jn,f.list.id),g.prev=p,g.next=h,n=l.go,r([F,C,j,O,B],y),u(h,"click",_n(n,">",!0,void 0)),u(p,"click",_n(n,"<",!0,void 0)),s("arrows:mounted",p,h)),un(d,!1===t.arrows?"none":""))}function m(n){return ln('<button class="'+c.arrow+" "+(n?c.prev:c.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40"><path d="'+(t.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function y(){var n=o.index,t=l.getPrev(),e=l.getNext(),i=-1<t&&n<t?a.last:a.prev,n=-1<e&&e<n?a.first:a.next;p.disabled=t<0,h.disabled=e<0,en(p,Wn,i),en(h,Wn,n),s("arrows:updated",p,h,t,e)}return{arrows:g,mount:function(){v(),r(j,v)},destroy:function(){e?fn(d):tn([p,h],Un)}}},Autoplay:function(t,e,i){var o,r,n=Nn(t),u=n.on,s=n.bind,c=n.emit,a=In(i.interval,t.go.bind(t,">"),function(n){var t=l.bar;t&&rn(t,"width",100*n+"%"),c("autoplay:playing",n)}),f=a.isPaused,l=e.Elements,d=i.autoplay,p="pause"===d;function h(n){var t=n?"pause":"play",e=l[t];e&&(en(e,jn,l.track.id),en(e,Wn,i.i18n[t]),s(e,"click",n?v:g))}function g(){f()&&e.Slides.isEnough()&&(a.start(!i.resetProgress),r=o=p=!1,c(_))}function v(n){void 0===n&&(n=!0),f()||(a.pause(),c(w)),p=n}function m(){p||(o||r?v(!1):g())}function y(){var n=e.Slides.getAt(t.index);a.set(n&&+sn(n.slide,bt)||i.interval)}return{mount:function(){d&&(h(!0),h(!1),function(){var n=l.root;i.pauseOnHover&&s(n,"mouseenter mouseleave",function(n){o="mouseenter"===n.type,m()});i.pauseOnFocus&&s(n,"focusin focusout",function(n){r="focusin"===n.type,m()});u([L,b,O],a.rewind),u(L,y)}(),p||g())},destroy:a.cancel,play:g,pause:v,isPaused:f}},Cover:function(n,t,e){var i=Nn(n).on;function o(e){t.Slides.forEach(function(n){var t=$(n.container||n.slide,"img");t&&t.src&&r(e,t,n)})}function r(n,t,e){e.style("background",n?'center/cover no-repeat url("'+t.src+'")':"",!0),un(t,n?"none":"")}return{mount:function(){e.cover&&(i(v,_n(r,!0)),i([F,j,O],_n(o,!0)))},destroy:_n(o,!1)}},Scroll:function(s,n,c){var a,f,t=Nn(s),e=t.on,l=t.emit,d=n.Move,p=d.getPosition,h=d.getLimit,g=d.exceededLimit;function v(i,n,t,o){var e,r=p(),u=1;n=n||(e=Ln(i-r),Sn(e/1.5,800)),f=t,y(),a=In(n,m,function(n){var t=p(),e=(r+(i-r)*(e=n,(n=c.easingFunc)?n(e):1-Math.pow(1-e,4))-p())*u;d.translate(t+e),s.is(gt)&&!o&&g()&&(u*=.6,Ln(e)<10&&(e=g(!1),v(h(!e),600,null,!0)))},1),l(b),a.start()}function m(){var n=p(),t=d.toIndex(n);Cn(t,0,s.length-1)||d.translate(d.shift(n,0<t),!0),f&&f(),l(B)}function y(){a&&a.cancel()}function i(){a&&!a.isPaused()&&(y(),m())}return{mount:function(){e(L,y),e([j,O],i)},destroy:y,scroll:v,cancel:i}},Drag:function(r,o,u){var s,t,i,c,a,f,l,d,n=Nn(r),e=n.on,p=n.emit,h=n.bind,g=n.unbind,v=r.state,m=o.Move,y=o.Scroll,b=o.Controller,_=o.Elements.track,w=(n=o.Direction).resolve,x=n.orient,E=m.getPosition,S=m.exceededLimit,P=!1;function k(){var n=u.drag;R(!n),c="free"===n}function L(n){var t,e;f=!1,l||(t=u.noDrag,e=O(n),!(!t||!V(n.target,t))||!e&&n.button||(m.isBusy()?dn(n,!0):(d=e?_:window,a=v.is(4),i=null,h(d,wt,C,_t),h(d,xt,A,_t),m.cancel(),y.cancel(),M(n))))}function C(n){var t,e,i,o;v.is(5)||(v.set(5),p("drag")),n.cancelable&&(a?(m.translate(s+z(n)/(P&&r.is(gt)?5:1)),e=200<T(n),i=P!==(P=S()),(e||i)&&M(n),f=!0,p("dragging"),dn(n)):Ln(z(o=n))>Ln(z(o,!0))&&(t=n,e=u.dragMinThreshold,i=G(e),o=i&&e.mouse||0,e=(i?e.touch:+e)||10,a=Ln(z(t))>(O(t)?e:o),dn(n)))}function A(n){var t,e,i;v.is(5)&&(v.set(3),p("dragged")),a&&(e=function(n){if(r.is(vt)||!P){var t=T(n);if(t&&t<200)return z(n)/t}return 0}(t=n),i=function(n){return E()+Dn(n)*En(Ln(n)*(u.flickPower||600),c?1/0:o.Layout.listSize()*(u.flickMaxPages||1))}(e),t=u.rewind&&u.rewindByDrag,c?b.scroll(i):r.is(mt)?b.go(x(Dn(e))<0?t?"<":"-":t?">":"+"):r.is(gt)&&P&&t?b.go(S(!0)?">":"<"):b.go(b.toDest(i),!0),dn(n)),g(d,wt,C),g(d,xt,A),a=!1}function D(n){!l&&f&&dn(n,!0)}function M(n){i=t,t=n,s=E()}function z(n,t){return I(n,t)-I(N(n),t)}function T(n){return vn(n)-vn(N(n))}function N(n){return t===n&&i||t}function I(n,t){return(O(n)?n.changedTouches[0]:n)["page"+w(t?"Y":"X")]}function O(n){return"undefined"!=typeof TouchEvent&&n instanceof TouchEvent}function R(n){l=n}return{mount:function(){h(_,wt,wn,_t),h(_,xt,wn,_t),h(_,"touchstart mousedown",L,_t),h(_,"click",D,{capture:!0}),h(_,"dragstart",dn),e([F,j],k)},disable:R,isDragging:function(){return a}}},Keyboard:function(t,n,e){var i,o,r=Nn(t),u=r.on,s=r.bind,c=r.unbind,a=t.root,f=n.Direction.resolve;function l(){var n=e.keyboard;n&&("focused"===n?en(i=a,Fn,0):i=window,s(i,St,g))}function d(){c(i,St)}function p(){var n=o;o=!0,xn(function(){o=n})}function h(){d(),l()}function g(n){o||(n=n.key,(n=k(Et,n)?"Arrow"+n:n)===f("ArrowLeft")?t.go("<"):n===f("ArrowRight")&&t.go(">"))}return{mount:function(){l(),u(j,h),u(L,p)},destroy:d,disable:function(n){o=n}}},LazyLoad:function(e,n,u){var t=Nn(e),i=t.on,o=t.off,r=t.bind,s=t.emit,c="sequential"===u.lazyLoad,a=[],f=0;function l(){n.Slides.forEach(function(r){hn(r.slide,Lt).forEach(function(n){var t,e,i=sn(n,Pt),o=sn(n,kt);i===n.src&&o===n.srcset||(t=u.classes.spinner,en(e=$(e=n.parentElement,"."+t)||on("span",t,e),Rn,"presentation"),a.push({_img:n,_Slide:r,src:i,srcset:o,_spinner:e}),n.src||un(n,"none"))})}),c&&g()}function d(){f=0,a=[]}function p(){(a=a.filter(function(n){var t=u.perPage*((u.preloadPages||1)+1)-1;return!n._Slide.isWithin(e.index,t)||h(n)})).length||o(C)}function h(t){var e=t._img;J(t._Slide.slide,pt),r(e,"load error",function(n){!function(n,t){var e=n._Slide;gn(e.slide,pt),t||(fn(n._spinner),un(n._img,""),s(v,n._img,e),s(x));c&&g()}(t,"error"===n.type)}),["srcset","src"].forEach(function(n){t[n]&&(en(e,n,t[n]),tn(e,"src"===n?Pt:kt))})}function g(){f<a.length&&h(a[f++])}return{mount:function(){u.lazyLoad&&(l(),i(O,d),i(O,l),c||i([F,O,C,B],p))},destroy:d}},Pagination:function(f,l,d){var p,n=Nn(f),t=n.on,e=n.emit,h=n.bind,i=n.unbind,o=l.Slides,g=l.Elements,r=l.Controller,v=r.hasFocus,u=r.getIndex,m=[];function s(){c(),d.pagination&&o.isEnough()&&(function(){var n=f.length,t=d.classes,e=d.i18n,i=d.perPage,o="slider"===d.pagination&&g.slider||g.root,r=v()?n:kn(n/i);p=on("ul",t.pagination,o);for(var u=0;u<r;u++){var s=on("li",null,p),c=on("button",{class:t.page,type:"button"},s),a=!v()&&1<i?e.pageX:e.slideX;h(c,"click",_n(y,u)),en(c,jn,l.Elements.list.id),en(c,Wn,Mn(a,u+1)),m.push({li:s,button:c,page:u})}}(),e("pagination:mounted",{list:p,items:m},a(f.index)),b())}function c(){p&&(fn(p),m.forEach(function(n){i(n.button,"click")}),E(m),p=null)}function y(t){r.go(">"+t,!0,function(){var n=o.getAt(r.toIndex(t));n&&((n=n.slide).setActive&&n.setActive()||n.focus({preventScroll:!0}))})}function a(n){return m[r.toPage(n)]}function b(){var n=a(u(!0)),t=a(u());n&&(gn(n.button,at),tn(n.button,Bn)),t&&(J(t.button,at),en(t.button,Bn,!0)),e("pagination:updated",{list:p,items:m},n,t)}return{items:m,mount:function(){s(),t([j,O],s),t([L,B],b)},destroy:c,getAt:a,update:b}},Sync:function(o,n,e){var i=n.Elements.list,r=[];function t(){var n,t;o.splides.forEach(function(n){var e;n.isParent||(e=n.splide,[o,e].forEach(function(n){var t=Nn(n),i=n===o?e:o;t.on(L,function(n,t,e){i.go(i.is(vt)?e:n)}),r.push(t)}))}),e.isNavigation&&(n=Nn(o),(t=n.on)(D,c),t(I,a),t([F,j],s),en(i,Rn,"menu"),r.push(n),n.emit(W,o.splides))}function u(){tn(i,Un),r.forEach(function(n){n.destroy()}),E(r)}function s(){en(i,Gn,"ttb"!==e.direction?"horizontal":null)}function c(n){o.go(n.index)}function a(n,t){k(Ct,t.key)&&(c(n),dn(t))}return{mount:t,destroy:u,remount:function(){u(),t()}}},Wheel:function(o,r,u){var n=Nn(o).bind,t=u.wheel,s=G(t)?t:t&&{},c=0;function e(n){var t,e,i;n.cancelable&&(i=(t=n.deltaY)<0,e=vn(n),Ln(t)>(s.min||0)&&e-c>(s.sleep||0)&&(o.go(i?"<":">"),c=e),i=i,u.releaseWheel&&!o.state.is(4)&&-1===r.Controller.getAdjacent(i)||dn(n))}return{mount:function(){s&&n(r.Elements.track,"wheel",e,_t)}}},Live:function(n,t,e){var i=Nn(n).on,o=t.Elements.list,r=e.live;function u(n){r&&en(o,qn,n?"off":"polite")}return{mount:function(){r&&(en(o,Yn,!1),u(!t.Autoplay.isPaused()),i(_,_n(u,!0)),i(w,_n(u,!1)))},disable:u}}}),Dt={type:"slide",role:"region",speed:400,waitForTransition:!0,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,keyboard:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",slideFocus:!0,trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",classes:{slide:Zn,clone:$n,arrows:tt,arrow:e,prev:et,next:it,pagination:t,page:t+"__page",spinner:yn+"__spinner"},i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",slideLabel:"%s of %s"}};function Mt(n,i,t){var e=Nn(n).on;return{mount:function(){e([F,O],function(){xn(function(){i.Slides.style("transition","opacity "+t.speed+"ms "+t.easing)})})},start:function(n,t){var e=i.Elements.track;rn(e,"height",mn(an(e).height)),xn(function(){t(),rn(e,"height","")})},cancel:wn}}function zt(r,n,u){var s,t=Nn(r).bind,c=n.Move,a=n.Controller,e=n.Elements.list;function i(){f("")}function f(n){rn(e,"transition",n)}return{mount:function(){t(e,"transitionend",function(n){n.target===e&&s&&(i(),s())})},start:function(n,t){var e=c.toPosition(n,!0),i=c.getPosition(),o=function(n){var t=u.rewindSpeed;if(r.is(gt)&&t){var e=a.getIndex(!0),i=a.getEnd();if(0===e&&i<=n||i<=e&&0===n)return t}return u.speed}(n);1<=Ln(e-i)&&1<=o?(f("transform "+o+"ms "+u.easing),c.translate(e,!0),s=t):(c.jump(n),t())},cancel:i}}t=function(){function e(n,t){this.event=d(),this.Components={},this.state=h(1),this.splides=[],this._options={},this._Extensions={};n=H(n)?pn(document,n):n;bn(n,n+" is invalid."),this.root=n,l(this._options,Dt,e.defaults,t||{});try{l(this._options,JSON.parse(sn(n,a)))}catch(n){bn(!1,"Invalid JSON")}}var n=e.prototype;return n.mount=function(n,t){var e=this,i=this.state,o=this.Components;return bn(i.is([1,6]),"Already mounted!"),i.set(1),this._Components=o,this._Transition=t||this._Transition||(this.is(mt)?Mt:zt),this._Extensions=n||this._Extensions,c(nn({},At,this._Extensions,{Transition:this._Transition}),function(n,t){n=n(e,o,e._options);(o[t]=n).setup&&n.setup()}),c(o,function(n){n.mount&&n.mount()}),this.emit(F),J(this.root,"is-initialized"),i.set(3),this.emit(r),this},n.sync=function(n){return this.splides.push({splide:n}),n.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._Components.Sync.remount(),n.Components.Sync.remount()),this},n.go=function(n){return this._Components.Controller.go(n),this},n.on=function(n,t){return this.event.on(n,t,null,20),this},n.off=function(n){return this.event.off(n),this},n.emit=function(n){var t;return(t=this.event).emit.apply(t,[n].concat(f(arguments,1))),this},n.add=function(n,t){return this._Components.Slides.add(n,t),this},n.remove=function(n){return this._Components.Slides.remove(n),this},n.is=function(n){return this._options.type===n},n.refresh=function(){return this.emit(O),this},n.destroy=function(t){void 0===t&&(t=!0);var n=this.event,e=this.state;return e.is(1)?n.on(r,this.destroy.bind(this,t),this):(c(this._Components,function(n){n.destroy&&n.destroy(t)},!0),n.emit(s),n.destroy(),t&&E(this.splides),e.set(6)),this},_createClass(e,[{key:"options",get:function(){return this._options},set:function(n){var t=this._options;l(t,n),this.state.is(1)||this.emit(j,t)}},{key:"length",get:function(){return this._Components.Slides.getLength(!0)}},{key:"index",get:function(){return this._Components.Controller.getIndex()}}]),e}();return t.defaults={},t.STATES=n,t});
- //# sourceMappingURL=splide.min.js.map
|