Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@splidejs/splide

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@splidejs/splide - npm Package Compare versions

Comparing version 2.4.0 to 2.4.3

4

dist/js/splide.min.js
/*!
* Splide.js
* Version : 2.4.0
* Version : 2.4.3
* License : MIT
* Copyright: 2020 Naotoshi Fujita
*/!function(e){var i={};function o(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=i,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)o.d(e,i,function(t){return n[t]}.bind(null,i));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0)}([function(t,n,e){"use strict";e.r(n),e.d(n,"Splide",function(){return It});var s={};e.r(s),e.d(s,"CREATED",function(){return G}),e.d(s,"MOUNTED",function(){return X}),e.d(s,"IDLE",function(){return V}),e.d(s,"MOVING",function(){return F}),e.d(s,"DESTROYED",function(){return U});function i(){return(i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}var o=Object.keys;function v(e,i){o(e).some(function(t,n){return i(e[t],t,n)})}function g(n){return o(n).map(function(t){return n[t]})}function r(t){return"object"==typeof t}function u(t,n){var e=i({},t);return v(n,function(t,n){r(t)?(r(e[n])||(e[n]={}),e[n]=u(e[n],t)):e[n]=t}),e}function m(n,e){return n._s=e,o(e).forEach(function(t){n[t]||Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}),n}function a(t){return Array.isArray(t)?t:[t]}function y(t,n,e){return Math.min(Math.max(t,e<n?e:n),e<n?n:e)}function h(t,n){var e=0;return t.replace(/%s/g,function(){return a(n)[e++]})}function w(t){var n=typeof t;return"number"==n&&0<t?parseFloat(t)+"px":"string"==n?t:""}function x(t){return t<10?"0"+t:t}function b(t,n){var e;return"string"==typeof n&&(P(e=f("div",{}),{position:"absolute",width:n}),k(t,e),n=e.clientWidth,E(e)),n}function c(t,n){return t?t.querySelector(n.split(" ")[0]):null}function _(t,n){return t&&g(t.children).filter(function(t){return M(t,n.split(" ")[0])||t.tagName===n})[0]||null}function f(t,n){var e=document.createElement(t);return v(n,function(t,n){return O(e,n,t)}),e}function l(t){var n=f("div",{});return n.innerHTML=t,n.firstChild}function E(t){a(t).forEach(function(t){var n;!t||(n=t.parentElement)&&n.removeChild(t)})}function k(t,n){t&&t.appendChild(n)}function S(t,n){var e;t&&n&&((e=n.parentElement)&&e.insertBefore(t,n))}function P(e,t){e&&v(t,function(t,n){null!==t&&(e.style[n]=t)})}function d(n,t,e){n&&a(t).forEach(function(t){t&&n.classList[e?"remove":"add"](t)})}function C(t,n){d(t,n,!1)}function I(t,n){d(t,n,!0)}function M(t,n){return!!t&&t.classList.contains(n)}function O(t,n,e){t&&t.setAttribute(n,e)}function W(t,n){return t?t.getAttribute(n):""}function A(t,n){a(n).forEach(function(n){a(t).forEach(function(t){return t&&t.removeAttribute(n)})})}function p(u,c){var d,l;return{mount:function(){d=c.Elements.list,u.on("transitionend",function(t){t.target===d&&l&&l()},d)},start:function(t,n,e,i,o){var r=u.options,s=c.Controller.edgeIndex,a=r.speed;l=o,u.is(T)&&(0===e&&s<=n||s<=e&&0===n)&&(a=r.rewindSpeed||a),P(d,{transition:"transform "+a+"ms "+r.easing,transform:"translate("+i.x+"px,"+i.y+"px)"})}}}function L(e,s){function a(t){var n=e.options;P(s.Elements.slides[t],{transition:"opacity "+n.speed+"ms "+n.easing})}return{mount:function(){a(e.index)},start:function(t,n,e,i,o){var r=s.Elements.track;P(r,{height:w(r.clientHeight)}),a(n),o(),P(r,{height:""})}}}var T="slide",j="loop",H="fade";var q="[SPLIDE]";function z(t){console.error(q+" "+t)}function D(t,n){if(!t)throw new Error(n)}var N="splide",R={active:"is-active",visible:"is-visible",loading:"is-loading"},B={type:"slide",rewind:!1,speed:400,rewindSpeed:0,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,autoWidth:!1,perPage:1,perMove:0,clones:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:!0,drag:!0,dragAngleThreshold:30,swipeDistanceThreshold:150,flickVelocityThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!1,accessibility:!0,isNavigation:!1,trimSpace:!0,updateOnMove:!1,throttle:100,destroy:!1,breakpoints:!1,classes:{root:N,slider:N+"__slider",track:N+"__track",list:N+"__list",slide:N+"__slide",container:N+"__slide__container",arrows:N+"__arrows",arrow:N+"__arrow",prev:N+"__arrow--prev",next:N+"__arrow--next",pagination:N+"__pagination",page:N+"__pagination__page",clone:N+"__slide--clone",progress:N+"__progress",bar:N+"__progress__bar",autoplay:N+"__autoplay",play:N+"__play",pause:N+"__pause",spinner:N+"__spinner",sr:N+"__sr"},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"}},G=1,X=2,V=3,F=4,U=5;function Y(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function J(t){var n=W(t.root,"data-splide");if(n)try{t.options=JSON.parse(n)}catch(t){z(t.message)}return{mount:function(){t.State.is(G)&&(t.index=t.options.start)}}}function K(h,o){var t,e=h.root,i=h.classes,p=[];e.id||(window.splide=window.splide||{},t=window.splide.uid||0,window.splide.uid=++t,e.id="splide"+x(t));var r={mount:function(){var t=this;!function(){r.slider=_(e,i.slider),r.track=c(e,"."+i.track),r.list=_(r.track,i.list),D(r.track&&r.list,"Track or list was not found."),r.slides=g(r.list.children);var t=s(i.arrows);r.arrows={prev:c(t,"."+i.prev),next:c(t,"."+i.next)};var n=s(i.autoplay);r.bar=c(s(i.progress),"."+i.bar),r.play=c(n,"."+i.play),r.pause=c(n,"."+i.pause),r.track.id=r.track.id||e.id+"-track",r.list.id=r.list.id||e.id+"-list"}(),this.init(),h.on("refresh",function(){t.destroy(),t.init()}).on("updated",function(){I(e,n()),C(e,n())})},destroy:function(){p.forEach(function(t){t.destroy()}),p=[],I(e,n())},init:function(){C(e,n()),r.slides.forEach(function(t,n){r.register(t,n,-1)})},register:function(t,n,e){var c,d,i,o,r,s,a,u=(d=n,i=e,o=t,r=(c=h).options.updateOnMove,s="ready.slide updated.slide resize.slide moved.slide"+(r?" move.slide":""),a={slide:o,index:d,realIndex:i,container:_(o,c.classes.container),isClone:-1<i,mount:function(){var t=this;this.isClone||(o.id=c.root.id+"-slide"+x(d+1)),c.on(s,function(){return t.update()}).on(et,f).on("click",function(){return c.emit("click",t)},o),r&&c.on("move.slide",function(t){t===i&&l(!0,!1)}),P(o,{display:""}),this.styles=W(o,"style")||""},destroy:function(){c.off(s).off(et).off("click",o),I(o,g(R)),f()},update:function(){l(this.isActive(),!1),l(this.isVisible(),!0)},isActive:function(){return c.index===d},isVisible:function(){var t=this.isActive();if(c.is(H)||t)return t;var n=Math.floor,e=c.Components,i=e.Track,o=e.Layout,r=c.options.direction===nt,s=n((i.toPosition(d)+i.offset(d)-i.position)*i.sign),a=n(s+o[r?"slideHeight":"slideWidth"](d)),u=o[r?"height":"width"];return 0<=s&&s<=u&&0<=a&&a<=u},isWithin:function(t,n){var e=Math.abs(t-d);return c.is(T)||this.isClone||(e=Math.min(e,c.length-e)),e<n}});function l(t,n){var e=n?"visible":"active",i=R[e];t?(C(o,i),c.emit(e,a)):M(o,i)&&(I(o,i),c.emit(n?"hidden":"inactive",a))}function f(){O(o,"style",a.styles)}u.mount(),p.push(u)},getSlide:function(n){return p.filter(function(t){return t.index===n})[0]},getSlides:function(t){return t?p:p.filter(function(t){return!t.isClone})},getSlidesByPage:function(t){var e=o.Controller.toIndex(t),n=h.options,i=!1!==n.focus?1:n.perPage;return p.filter(function(t){var n=t.index;return e<=n&&n<e+i})},add:function(t,n,e){var i,o,r,s,a;"string"==typeof t&&(t=l(t)),t instanceof Element&&(i=this.slides[n],P(t,{display:"none"}),i?(S(t,i),this.slides.splice(n,0,t)):(k(this.list,t),this.slides.push(t)),o=function(){e&&e(t)},s=t.querySelectorAll("img"),(a=s.length)?(r=0,v(s,function(t){t.onload=t.onerror=function(){++r===a&&o()}})):o())},remove:function(t){E(this.slides.splice(t,1)[0])},each:function(t){p.forEach(t)},get length(){return this.slides.length},get total(){return p.length}};function n(){var t=i.root,n=h.options;return[t+"--"+n.type,t+"--"+n.direction,n.drag?t+"--draggable":"",n.isNavigation?t+"--nav":""]}function s(t){return _(e,t)||_(r.slider,t)}return r}function Q(r,i){var s,e,a={mount:function(){s=r.options,e=r.is(j),r.on("move",function(t){r.index=t}).on("updated refresh",function(t){s=t||s,r.index=y(r.index,0,a.edgeIndex)})},go:function(t,n){var e=this.trim(this.parse(t));i.Track.go(e,this.rewind(e),n)},parse:function(t){var n=r.index,e=String(t).match(/([+\-<>]+)(\d+)?/),i=e?e[1]:"",o=e?parseInt(e[2]):0;switch(i){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":case"<":n=function(t,n,e){if(-1<t)return a.toIndex(t);var i=s.perMove,o=e?-1:1;if(i)return n+i*o;return a.toIndex(a.toPage(n)+o)}(o,n,"<"===i);break;default:n=parseInt(t)}return n},toIndex:function(t){if(o())return t;var n=r.length,e=s.perPage,i=t*e;return n-e<=(i-=(this.pageLength*e-n)*it(i/n))&&i<n&&(i=n-e),i},toPage:function(t){if(o())return t;var n=r.length,e=s.perPage;return it(n-e<=t&&t<n?(n-1)/e:t/e)},trim:function(t){return e||(t=s.rewind?this.rewind(t):y(t,0,this.edgeIndex)),t},rewind:function(t){var n=this.edgeIndex;if(e){for(;n<t;)t-=n+1;for(;t<0;)t+=n+1}else n<t?t=0:t<0&&(t=n);return t},isRtl:function(){return"rtl"===s.direction},get pageLength(){var t=r.length;return o()?t:Math.ceil(t/s.perPage)},get edgeIndex(){var t=r.length;return t?o()||s.isNavigation||e?t-1:t-s.perPage:0},get prevIndex(){var t=r.index-1;return(e||s.rewind)&&(t=this.rewind(t)),-1<t?t:-1},get nextIndex(){var t=r.index+1;return(e||s.rewind)&&(t=this.rewind(t)),r.index<t&&t<=this.edgeIndex||0===t?t:-1}};function o(){return!1!==s.focus}return a}function Z(r,s){var o,a,t,u,c,e,i,d,l=0,n=r.options.direction===nt,f=r.is(H),h=m({mount:function(){o=s.Elements.list,this.init()},mounted:function(){var t=this;f||r.on("mounted resize updated",function(){t.jump(r.index)})},go:function(t,n,e){var i=g(t),o=r.index;e||r.emit("move",n,o,t),1<=Math.abs(i-l)||f?s.Transition.start(t,n,o,this.toCoord(i),function(){p(t,n,o,e)}):t!==o&&"move"===r.options.trimSpace?s.Controller.go(t+t-o,e):p(t,n,o,e)},jump:function(t){this.translate(g(t))},translate:function(t){l=t,P(o,{transform:"translate"+this.axis+"("+t+"px)"})},trim:function(t){return!r.options.trimSpace||r.is(j)?t:this._s.trim(t)},toCoord:function(t){return{x:n?0:t,y:n?t:0}},get position(){return l}},n?(e=r,i=s,{axis:"Y",sign:-1,init:function(){d=i.Layout},toPosition:function(t){return-((t+i.Clones.length/2)*(d.slideHeight()+d.gap)+this.offset())},toIndex:function(t){var n=d.slideHeight(),e=(n+d.gap)*i.Clones.length/2;return Math.round(-(t+e+this.offset())/(n+d.gap))},trim:function(t){return y(t,-(d.listHeight-(d.height+d.gap)),0)},offset:function(){var t=e.options.focus,n=d.slideHeight();return"center"===t?-(d.height-n)/2:-(parseInt(t)||0)*(n+d.gap)}}):(t=s,{axis:"X",sign:"rtl"===(a=r).options.direction?1:-1,init:function(){u=t.Layout,c=t.Elements},toPosition:function(t){return this.sign*(u.totalWidth(t-1)+this.offset(t))},toIndex:function(t){t*=this.sign,a.is(T)&&(t=y(t,u.totalWidth(c.total),0));var n=c.getSlides(!0);for(var e in n){var i=n[e].index,o=this.sign*this.toPosition(i);if(o<t&&t<=o+u.slideWidth(i)+u.gap)return i}return 0},trim:function(t){return y(t,this.sign*(u.totalWidth(c.total)-(u.width+u.gap)),0)},offset:function(t){var n=a.options.focus,e=u.slideWidth(t);return"center"===n?-(u.width-e)/2:-(parseInt(n)||0)*(e+u.gap)}}));function p(t,n,e,i){P(o,{transition:""}),f||h.jump(n),i||r.emit("moved",n,e,t)}function g(t){return h.trim(h.toPosition(t))}return h}function $(o,t){var s=[],n=0,a=t.Elements,e={mount:function(){o.is(j)&&(i(),o.on("refresh",i).on("resize",function(){n!==r()&&o.refresh()}))},destroy:function(){E(s),s=[]},get clones(){return s},get length(){return s.length}};function i(){e.destroy(),function(i){var o=a.length;if(!o)return;var r=a.slides;for(;r.length<i;)r=r.concat(r);r.slice(0,i).forEach(function(t,n){var e=u(t);k(a.list,e),s.push(e),a.register(e,n+o,n%o)}),r.slice(-i).forEach(function(t,n){var e=u(t);S(e,r[0]),s.push(e),a.register(e,n-i,(o+n-i%o)%o)})}(n=r())}function r(){var t=o.options;if(t.clones)return t.clones;var n=t.autoWidth?a.length:t.perPage,e=t.direction===nt?"Height":"Width",i=t["fixed"+e];return i&&(n=Math.ceil(a.track["client"+e]/i)),n*(t.drag?t.flickMaxPages+1:1)}function u(t){var n=t.cloneNode(!0);return C(n,o.classes.clone),A(n,"id"),n}return e}var tt=function(){function t(t,n,e){function i(t){t.elm&&t.elm.removeEventListener(t.event,t.handler,t.options)}var o,r;void 0===n&&(n={}),void 0===e&&(e={}),this.root=t instanceof Element?t:document.querySelector(t),D(this.root,"An invalid element/selector was given."),this.Components=null,this.Event=(o=[],{on:function(t,n,e,i){void 0===e&&(e=null),void 0===i&&(i={}),t.split(" ").forEach(function(t){e&&e.addEventListener(t,n,i),o.push({event:t,handler:n,elm:e,options:i})})},off:function(t,e){void 0===e&&(e=null),t.split(" ").forEach(function(n){o=o.filter(function(t){return!t||t.event!==n||t.elm!==e||(i(t),!1)})})},emit:function(n){for(var t=arguments.length,e=new Array(1<t?t-1:0),i=1;i<t;i++)e[i-1]=arguments[i];o.forEach(function(t){t.elm||t.event.split(".")[0]!==n||t.handler.apply(t,e)})},destroy:function(){o.forEach(i),o=[]}}),this.State=(r=G,{set:function(t){r=t},is:function(t){return t===r}}),this.STATES=s,this._o=u(B,n),this._i=0,this._c=e,this._e={},this._t=null}var n,e,i,o=t.prototype;return o.mount=function(t,n){var e,i,o,r,s=this;void 0===t&&(t=this._e),void 0===n&&(n=this._t),this._e=t,this._t=n,this.Components=(i=u((e=this)._c,t),o=n,r={},v(i,function(t,n){r[n]=t(e,r,n.toLowerCase())}),o=o||(e.is(H)?L:p),r.Transition=o(e,r),r);try{v(this.Components,function(t,n){var e=t.required;void 0===e||e?t.mount&&t.mount():delete s.Components[n]})}catch(t){return void z(t.message)}var a=this.State;return a.set(X),v(this.Components,function(t){t.mounted&&t.mounted()}),this.emit("mounted"),a.set(V),this.emit("ready"),P(this.root,{visibility:"visible"}),this.on("move drag",function(){return a.set(F)}).on("moved dragged",function(){return a.set(V)}),this},o.sync=function(t){return this.sibling=t,this},o.on=function(t,n,e,i){return void 0===e&&(e=null),void 0===i&&(i={}),this.Event.on(t,n,e,i),this},o.off=function(t,n){return void 0===n&&(n=null),this.Event.off(t,n),this},o.emit=function(t){for(var n,e=arguments.length,i=new Array(1<e?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return(n=this.Event).emit.apply(n,[t].concat(i)),this},o.go=function(t,n){return void 0===n&&(n=!0),(this.State.is(V)||this.State.is(F)&&!n)&&this.Components.Controller.go(t,!1),this},o.is=function(t){return t===this._o.type},o.add=function(t,n){return void 0===n&&(n=-1),this.Components.Elements.add(t,n,this.refresh.bind(this)),this},o.remove=function(t){return this.Components.Elements.remove(t),this.refresh(),this},o.refresh=function(){return this.emit("refresh").emit("resize"),this},o.destroy=function(n){var t=this;if(void 0===n&&(n=!0),!this.State.is(G))return g(this.Components).reverse().forEach(function(t){t.destroy&&t.destroy(n)}),this.emit("destroy",n),this.Event.destroy(),this.State.set(U),this;this.on("ready",function(){return t.destroy(n)})},n=t,(e=[{key:"index",get:function(){return this._i},set:function(t){this._i=parseInt(t)}},{key:"length",get:function(){return this.Components.Elements.length}},{key:"options",get:function(){return this._o},set:function(t){var n=this.State.is(G);n||this.emit("update"),this._o=u(this._o,t),n||this.emit("updated",this._o)}},{key:"classes",get:function(){return this._o.classes}},{key:"i18n",get:function(){return this._o.i18n}}])&&Y(n.prototype,e),i&&Y(n,i),t}(),nt="ttb",et="update.slide",it=Math.floor;function ot(t,n){var e;return function(){e=e||setTimeout(function(){t(),e=null},n)}}function rt(n,e,i){function o(t){c||(r||(r=t,a&&a<1&&(r-=a*e)),a=(s=t-r)/e,e<=s&&(r=0,a=1,n()),i&&i(a),u(o))}var r,s,a,u=window.requestAnimationFrame,c=!0;return{pause:function(){c=!0,r=0},play:function(t){r=0,c&&(c=!1,t&&(a=0),u(o))}}}function st(e,t){var r,s,a,u,c,d,l,f,h,p,i=t.Elements,o=m({mount:function(){e.on("resize load",ot(function(){e.emit("resize")},e.options.throttle),window).on("resize",g).on("updated refresh",n),n()},destroy:function(){A([i.list,i.track],"style")}},e.options.direction===nt?(d=e,h=t.Elements,p=d.root,{margin:"marginBottom",init:function(){f=d.options,l=h.track,this.gap=b(p,f.gap);var t=f.padding,n=t.top,e=void 0===n?t:n,i=t.bottom,o=void 0===i?t:i;this.padding={top:b(p,e),bottom:b(p,o)},P(l,{paddingTop:w(e),paddingBottom:w(o)})},slideWidth:function(){return b(p,f.fixedWidth||this.width)},slideHeight:function(){var t=f.fixedHeight||(this.height+this.gap)/f.perPage-this.gap;return b(p,t)},get width(){return l.clientWidth},get height(){var t=f.height||this.width*f.heightRatio;return D(t,'"height" or "heightRatio" is missing.'),b(p,t)-this.padding.top-this.padding.bottom},get listWidth(){return this.width},get listHeight(){return(this.slideHeight()+this.gap)*h.total}}):(r=e,a=t.Elements,u=r.root,{margin:"margin"+("rtl"===(c=r.options).direction?"Left":"Right"),height:0,listHeight:0,init:function(){c=r.options,s=a.track,this.gap=b(u,c.gap);var t=c.padding,n=t.left,e=void 0===n?t:n,i=t.right,o=void 0===i?t:i;this.padding={left:b(u,e),right:b(u,o)},P(s,{paddingLeft:w(e),paddingRight:w(o)})},totalWidth:function(n){var e=this;return a.getSlides(!0).filter(function(t){return t.index<=n}).reduce(function(t,n){return t+e.slideWidth(n.index)+e.gap},0)},slideWidth:function(t){if(c.autoWidth){var n=a.getSlide(t);return n?n.slide.offsetWidth:0}var e=c.fixedWidth||(this.width+this.gap)/c.perPage-this.gap;return b(u,e)},slideHeight:function(){var t=c.height||c.fixedHeight||this.width*c.heightRatio;return b(u,t)},get width(){return s.clientWidth-this.padding.left-this.padding.right},get listWidth(){var t=a.total;return c.autoWidth?5e3*t:this.totalWidth(t)}}));function n(){o.init(),P(e.root,{maxWidth:w(e.options.width)}),i.each(function(t){t.slide.style[o.margin]=w(o.gap)}),g()}function g(){P(i.list,{width:w(o.listWidth),height:w(o.listHeight)}),P(i.track,{height:w(o.height)});var n=w(o.slideHeight()),t=o.width;i.each(function(t){P(t.container,{height:n}),P(t.slide,{width:e.options.autoWidth?null:w(o.slideWidth(t.index)),height:t.container?null:n})}),t!==o.width&&g()}return o}function at(d,l){var e,i,o,r,f=l.Track,h=l.Controller,s=d.options.direction===nt,p=s?"y":"x",n={disabled:!1,mount:function(){var t=this,n=l.Elements.list;d.on("touchstart mousedown",a,n).on("touchmove mousemove",u,n,{passive:!1}).on("touchend touchcancel mouseleave mouseup dragend",c,n).on("mounted refresh",function(){v(n.querySelectorAll("img, a"),function(t){d.off("dragstart",t).on("dragstart",function(t){t.preventDefault()},t,{passive:!1})})}).on("mounted updated",function(){t.disabled=!d.options.drag})}};function a(t){n.disabled||r||!d.State.is(V)||(e=f.toCoord(f.position),i=g(t,{}),o=i)}function u(t){var n;i&&(o=g(t,i),r?(t.cancelable&&t.preventDefault(),d.is(H)||(n=e[p]+o.offset[p],f.translate(function(t){{var n,e,i;d.is(T)&&(n=f.sign,e=n*f.trim(f.toPosition(0)),i=n*f.trim(f.toPosition(h.edgeIndex)),(t*=n)<e?t=e-7*Math.log(e-t):i<t&&(t=i+7*Math.log(t-i)),t*=n)}return t}(n)))):function(t){var n=t.offset;if(d.State.is(V)){var e=180*Math.atan(ft(n.y)/ft(n.x))/Math.PI;return s&&(e=90-e),e<d.options.dragAngleThreshold}return!1}(o)&&(d.emit("drag",i),r=!0))}function c(){i=null,r&&(d.emit("dragged",o),function(t){var n=t.velocity[p],e=ft(n);{var i,o,r,s,a,u,c;0<e&&(i=l.Layout,o=d.options,r=d.index,a=r+(s=n<0?-1:1)*f.sign,u=r,d.is(H)||(c=f.position,e>o.flickVelocityThreshold&&ft(t.offset[p])<o.swipeDistanceThreshold&&(c+=s*Math.min(e*o.flickPower,i.width*(o.flickMaxPages||1))),u=f.toIndex(c)),u===r&&(u=a),d.is(T)&&(u=y(u,0,h.edgeIndex)),h.go(u,o.isNavigation))}}(o),r=!1)}function g(t,n){var e=t.timeStamp,i=t.touches,o=i?i[0]:t,r=o.clientX,s=o.clientY,a=n.to||{},u=a.x,c=a.y,d={x:r-(void 0===u?r:u),y:s-(void 0===c?s:c)},l=e-(n.time||0);return{to:{x:r,y:s},offset:d,time:e,velocity:{x:d.x/l,y:d.y/l}}}return n}function ut(t,n){var e=!1;function i(t){e&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}return{required:t.options.drag&&!t.is(H),mount:function(){t.on("click",i,n.Elements.track,{capture:!0}).on("drag",function(){e=!0}).on("moved",function(){e=!1})}}}function ct(o,r,s){var a,u,t,i=o.classes,c=o.root,d=r.Elements;function n(){var t=r.Controller,n=t.prevIndex,e=t.nextIndex,i=o.length>o.options.perPage||o.is(j);a.disabled=n<0||!i,u.disabled=e<0||!i,o.emit(s+":updated",a,u,n,e)}function e(t){return l('<button class="'+i.arrow+" "+(t?i.prev:i.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg"\tviewBox="0 0 40 40"\twidth="40"\theight="40"><path d="'+(o.options.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")+'" />')}return{required:o.options.arrows,mount:function(){a=d.arrows.prev,u=d.arrows.next,a&&u||!o.options.arrows||(a=e(!0),u=e(!1),t=!0,function(){var t=f("div",{class:i.arrows});k(t,a),k(t,u);var n=d.slider,e="slider"===o.options.arrows&&n?n:c;S(t,e.firstElementChild)}()),a&&u&&o.on("click",function(){o.go("<")},a).on("click",function(){o.go(">")},u).on("mounted move updated refresh",n),this.arrows={prev:a,next:u}},mounted:function(){o.emit(s+":mounted",a,u)},destroy:function(){A([a,u],"disabled"),t&&E(a.parentElement)}}}function dt(s,n,r){var a={},u=n.Elements,c={mount:function(){var t,n,o,r,e,i=s.options.pagination;i&&(n=s.options,o=s.classes,r=f("ul",{class:o.pagination}),e=u.getSlides(!1).filter(function(t){return!1!==n.focus||t.index%n.perPage==0}).map(function(t,n){var e=f("li",{}),i=f("button",{class:o.page,type:"button"});return k(e,i),k(r,e),s.on("click",function(){s.go(">"+n)},i),{li:e,button:i,page:n,Slides:u.getSlidesByPage(n)}}),a={list:r,items:e},t=u.slider,k("slider"===i&&t?t:s.root,a.list),s.on(vt,d)),s.off(mt).on(mt,function(){c.destroy(),s.options.pagination&&(c.mount(),c.mounted())})},mounted:function(){var t;s.options.pagination&&(t=s.index,s.emit(r+":mounted",a,this.getItem(t)),d(t,-1))},destroy:function(){E(a.list),a.items&&a.items.forEach(function(t){s.off("click",t.button)}),s.off(vt),a={}},getItem:function(t){return a.items[n.Controller.toPage(t)]},get data(){return a}};function d(t,n){var e=c.getItem(n),i=c.getItem(t),o=R.active;e&&I(e.button,o),i&&C(i.button,o),s.emit(r+":updated",a,e,i)}return c}function lt(a,e){var u=a.i18n,i=e.Elements,o=[Et,kt,bt,_t,xt,"role"];function n(t,n){O(t,Et,!n),O(t,kt,n?0:-1)}function t(t,n){var e=i.track.id;O(t,bt,e),O(n,bt,e)}function r(t,n,e,i){var o=a.index,r=-1<e&&o<e?u.last:u.prev,s=-1<i&&i<o?u.first:u.next;O(t,_t,r),O(n,_t,s)}function s(t,n){n&&O(n.button,xt,!0),t.items.forEach(function(t){var n=a.options,e=h(!1===n.focus&&1<n.perPage?u.pageX:u.slideX,t.page+1),i=t.button,o=t.Slides.map(function(t){return t.slide.id});O(i,bt,o.join(" ")),O(i,_t,e)})}function c(t,n,e){n&&A(n.button,xt),e&&O(e.button,xt,!0)}function d(s){i.each(function(t){var n=t.slide,e=t.realIndex;f(n)||O(n,"role","button");var i=-1<e?e:t.index,o=h(u.slideX,i+1),r=s.Components.Elements.getSlide(i);O(n,_t,o),r&&O(n,bt,r.slide.id)})}function l(t,n){var e=t.slide;n?O(e,xt,!0):A(e,xt)}function f(t){return"BUTTON"===t.tagName}return{required:a.options.accessibility,mount:function(){a.on("visible",function(t){n(t.slide,!0)}).on("hidden",function(t){n(t.slide,!1)}).on("arrows:mounted",t).on("arrows:updated",r).on("pagination:mounted",s).on("pagination:updated",c).on("refresh",function(){A(e.Clones.clones,o)}),a.options.isNavigation&&a.on("navigation:mounted",d).on("active",function(t){l(t,!0)}).on("inactive",function(t){l(t,!1)}),["play","pause"].forEach(function(t){var n=i[t];n&&(f(n)||O(n,"role","button"),O(n,bt,i.track.id),O(n,_t,u[t]))})},destroy:function(){var t=e.Arrows,n=t?t.arrows:{};A(i.slides.concat([n.prev,n.next,i.play,i.pause]),o)}}}var ft=Math.abs,ht=1,pt=2,gt=3,vt="move.page",mt="updated.page refresh.page",yt="data-splide-lazy",wt={ltr:{ArrowLeft:"<",ArrowRight:">",Left:"<",Right:">"},rtl:{ArrowLeft:">",ArrowRight:"<",Left:">",Right:"<"},ttb:{ArrowUp:"<",ArrowDown:">",Up:"<",Down:">"}},xt="aria-current",bt="aria-controls",_t="aria-label",Et="aria-hidden",kt="tabindex",St="move.sync",Pt=[" ","Enter","Spacebar"],Ct={Options:J,Breakpoints:function(r){var s,a,u=r.options.breakpoints,n=ot(t,50),c=[];function t(){var t,n,e,i,o=(t=c.filter(function(t){return t.mql.matches})[0])?t.point:-1;o!==a&&(a=o,n=r.State,(i=(e=u[o]||s).destroy)?(r.options=s,r.destroy("completely"===i)):(n.is(U)&&(n.set(G),r.mount()),r.options=e))}return{required:u&&matchMedia,mount:function(){c=Object.keys(u).sort(function(t,n){return parseInt(t)-parseInt(n)}).map(function(t){return{point:t,mql:matchMedia("(max-width:"+t+"px)")}}),this.destroy(!0),addEventListener("resize",n),s=r.options,t()},destroy:function(t){t&&removeEventListener("resize",n)}}},Controller:Q,Elements:K,Track:Z,Clones:$,Layout:st,Drag:at,Click:ut,Autoplay:function(o,t,e){var i,r=[],s=t.Elements,a={required:o.options.autoplay,mount:function(){var t=o.options;s.slides.length>t.perPage&&(i=rt(function(){o.go(">")},t.interval,function(t){o.emit(e+":playing",t),s.bar&&P(s.bar,{width:100*t+"%"})}),function(){var t=o.options,n=o.sibling,e=[o.root,n?n.root:null];t.pauseOnHover&&(u(e,"mouseleave",ht,!0),u(e,"mouseenter",ht,!1));t.pauseOnFocus&&(u(e,"focusout",pt,!0),u(e,"focusin",pt,!1));o.on("click",function(){a.play(pt),a.play(gt)},s.play).on("move refresh",function(){a.play()}).on("destroy",function(){a.pause()}),u([s.pause],"click",gt,!1)}(),this.play())},play:function(n){void 0===n&&(n=0),(r=r.filter(function(t){return t!==n})).length||(o.emit(e+":play"),i.play(o.options.resetProgress))},pause:function(t){void 0===t&&(t=0),i.pause(),-1===r.indexOf(t)&&r.push(t),1===r.length&&o.emit(e+":pause")}};function u(t,n,e,i){t.forEach(function(t){o.on(n,function(){a[i?"play":"pause"](e)},t)})}return a},Cover:function(t,n){function e(e){n.Elements.each(function(t){var n=_(t.slide,"IMG")||_(t.container,"IMG");n&&n.src&&i(n,e)})}function i(t,n){P(t.parentElement,{background:n?"":'center/cover no-repeat url("'+t.src+'")'}),P(t,{display:n?"":"none"})}return{required:t.options.cover,mount:function(){t.on("lazyload:loaded",function(t){i(t,!1)}),t.on("mounted updated refresh",function(){return e(!1)})},destroy:function(){e(!0)}}},Arrows:ct,Pagination:dt,LazyLoad:function(o,t,r){var n,e,i=o.options,s="sequential"===i.lazyLoad;function a(){e=[],n=0}function u(n){n=isNaN(n)?o.index:n,(e=e.filter(function(t){return!t.Slide.isWithin(n,i.perPage*(i.preloadPages+1))||(c(t.img,t.Slide),!1)}))[0]||o.off("moved."+r)}function c(t,n){C(n.slide,R.loading);var e=f("span",{class:o.classes.spinner});k(t.parentElement,e),t.onload=function(){l(t,e,n,!1)},t.onerror=function(){l(t,e,n,!0)},O(t,"src",W(t,yt))}function d(){var t;n<e.length&&c((t=e[n]).img,t.Slide),n++}function l(t,n,e,i){I(e.slide,R.loading),i||(E(n),P(t,{display:""}),o.emit(r+":loaded",t).emit("resize")),s&&d()}return{required:i.lazyLoad,mount:function(){o.on("mounted refresh",function(){a(),t.Elements.each(function(n){v(n.slide.querySelectorAll("["+yt+"]"),function(t){t.src||(e.push({img:t,Slide:n}),P(t,{display:"none"}))})}),s&&d()}),s||o.on("mounted refresh moved."+r,u)},destroy:a}},Keyboard:function(e){var t=e.root;return{mount:function(){var n=wt[e.options.direction];e.on("mounted updated",function(){e.off("keydown",t),e.options.keyboard&&e.on("keydown",function(t){n[t.key]&&e.go(n[t.key])},t)})}}},Sync:function(i){var o=i.sibling,t=o&&o.options.isNavigation;function r(){i.on(St,function(t,n,e){o.off(St).go(o.is(j)?e:t,!1),s()})}function s(){o.on(St,function(t,n,e){i.off(St).go(i.is(j)?e:t,!1),r()})}function a(t){i.State.is(V)&&o.go(t)}return{required:!!o,mount:function(){r(),s(),t&&o.Components.Elements.each(function(t){var n=t.slide,e=t.index;i.on("mouseup touchend",function(t){t.button&&0!==t.button||a(e)},n),i.on("keyup",function(t){-1<Pt.indexOf(t.key)&&(t.preventDefault(),a(e))},n,{passive:!1})})},mounted:function(){t&&o.emit("navigation:mounted",i)}}},A11y:lt};var It=function(e){var t,n;function i(t,n){return e.call(this,t,n,Ct)||this}return n=e,(t=i).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n,i}(tt);window.Splide=It}]);
*/!function(e){var i={};function o(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=i,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var i in n)o.d(e,i,function(t){return n[t]}.bind(null,i));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=0)}([function(t,n,e){"use strict";e.r(n),e.d(n,"Splide",function(){return At});var s={};e.r(s),e.d(s,"CREATED",function(){return G}),e.d(s,"MOUNTED",function(){return X}),e.d(s,"IDLE",function(){return V}),e.d(s,"MOVING",function(){return U}),e.d(s,"DESTROYED",function(){return Y});function i(){return(i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t}).apply(this,arguments)}var b=Object.keys;function m(e,i){b(e).some(function(t,n){return i(e[t],t,n)})}function g(n){return b(n).map(function(t){return n[t]})}function o(t){return"object"==typeof t}function u(t,n){var e=i({},t);return m(n,function(t,n){o(t)?(o(e[n])||(e[n]={}),e[n]=u(e[n],t)):e[n]=t}),e}function r(t){return Array.isArray(t)?t:[t]}function y(t,n,e){return Math.min(Math.max(t,e<n?e:n),e<n?n:e)}function h(t,n){var e=0;return t.replace(/%s/g,function(){return r(n)[e++]})}function w(t){var n=typeof t;return"number"==n&&0<t?parseFloat(t)+"px":"string"==n?t:""}function v(t){return t<10?"0"+t:t}function x(t,n){var e;return"string"==typeof n&&(P(e=f("div",{}),{position:"absolute",width:n}),k(t,e),n=e.clientWidth,E(e)),+n||0}function a(t,n){return t?t.querySelector(n.split(" ")[0]):null}function _(t,n){return c(t,n)[0]}function c(t,n){return t?g(t.children).filter(function(t){return M(t,n.split(" ")[0])||t.tagName===n}):[]}function f(t,n){var e=document.createElement(t);return m(n,function(t,n){return O(e,n,t)}),e}function l(t){var n=f("div",{});return n.innerHTML=t,n.firstChild}function E(t){r(t).forEach(function(t){var n;!t||(n=t.parentElement)&&n.removeChild(t)})}function k(t,n){t&&t.appendChild(n)}function S(t,n){var e;t&&n&&((e=n.parentElement)&&e.insertBefore(t,n))}function P(e,t){e&&m(t,function(t,n){null!==t&&(e.style[n]=t)})}function d(n,t,e){n&&r(t).forEach(function(t){t&&n.classList[e?"remove":"add"](t)})}function C(t,n){d(t,n,!1)}function I(t,n){d(t,n,!0)}function M(t,n){return!!t&&t.classList.contains(n)}function O(t,n,e){t&&t.setAttribute(n,e)}function A(t,n){return t?t.getAttribute(n):""}function z(t,n){r(n).forEach(function(n){r(t).forEach(function(t){return t&&t.removeAttribute(n)})})}function T(t){return t.getBoundingClientRect()}function p(u,c){var d,l;return{mount:function(){d=c.Elements.list,u.on("transitionend",function(t){t.target===d&&l&&l()},d)},start:function(t,n,e,i,o){var r=u.options,s=c.Controller.edgeIndex,a=r.speed;l=o,u.is(j)&&(0===e&&s<=n||s<=e&&0===n)&&(a=r.rewindSpeed||a),P(d,{transition:"transform "+a+"ms "+r.easing,transform:"translate("+i.x+"px,"+i.y+"px)"})}}}function L(e,s){function a(t){var n=e.options;P(s.Elements.slides[t],{transition:"opacity "+n.speed+"ms "+n.easing})}return{mount:function(){a(e.index)},start:function(t,n,e,i,o){var r=s.Elements.track;P(r,{height:w(r.clientHeight)}),a(n),o(),P(r,{height:""})}}}var j="slide",W="loop",q="fade";var H="[SPLIDE]";function D(t){console.error(H+" "+t)}function N(t,n){if(!t)throw new Error(n)}var R="splide",B={active:"is-active",visible:"is-visible",loading:"is-loading"},F={type:"slide",rewind:!1,speed:400,rewindSpeed:0,waitForTransition:!0,width:0,height:0,fixedWidth:0,fixedHeight:0,heightRatio:0,autoWidth:!1,autoHeight:!1,perPage:1,perMove:0,clones:0,start:0,focus:!1,gap:0,padding:0,arrows:!0,arrowPath:"",pagination:!0,autoplay:!1,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,lazyLoad:!1,preloadPages:1,easing:"cubic-bezier(.42,.65,.27,.99)",keyboard:"global",drag:!0,dragAngleThreshold:30,swipeDistanceThreshold:150,flickVelocityThreshold:.6,flickPower:600,flickMaxPages:1,direction:"ltr",cover:!1,accessibility:!0,slideFocus:!0,isNavigation:!1,trimSpace:!0,updateOnMove:!1,throttle:100,destroy:!1,breakpoints:!1,classes:{root:R,slider:R+"__slider",track:R+"__track",list:R+"__list",slide:R+"__slide",container:R+"__slide__container",arrows:R+"__arrows",arrow:R+"__arrow",prev:R+"__arrow--prev",next:R+"__arrow--next",pagination:R+"__pagination",page:R+"__pagination__page",clone:R+"__slide--clone",progress:R+"__progress",bar:R+"__progress__bar",autoplay:R+"__autoplay",play:R+"__play",pause:R+"__pause",spinner:R+"__spinner",sr:R+"__sr"},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"}},G=1,X=2,V=3,U=4,Y=5;function J(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function K(t){var n=A(t.root,"data-splide");if(n)try{t.options=JSON.parse(n)}catch(t){D(t.message)}return{mount:function(){t.State.is(G)&&(t.index=t.options.start)}}}function Q(h,o){var t,e=h.root,i=h.classes,p=[];e.id||(window.splide=window.splide||{},t=window.splide.uid||0,window.splide.uid=++t,e.id="splide"+v(t));var r={mount:function(){var t=this;!function(){r.slider=_(e,i.slider),r.track=a(e,"."+i.track),r.list=_(r.track,i.list),N(r.track&&r.list,"Track or list was not found."),r.slides=c(r.list,i.slide);var t=s(i.arrows);r.arrows={prev:a(t,"."+i.prev),next:a(t,"."+i.next)};var n=s(i.autoplay);r.bar=a(s(i.progress),"."+i.bar),r.play=a(n,"."+i.play),r.pause=a(n,"."+i.pause),r.track.id=r.track.id||e.id+"-track",r.list.id=r.list.id||e.id+"-list"}(),this.init(),h.on("refresh",function(){t.destroy(),t.init()}).on("updated",function(){I(e,n()),C(e,n())})},destroy:function(){p.forEach(function(t){t.destroy()}),p=[],I(e,n())},init:function(){C(e,n()),r.slides.forEach(function(t,n){r.register(t,n,-1)})},register:function(t,n,e){var o,i,r,s,a,u,c,d=(i=n,r=e,s=t,a=(o=h).options.updateOnMove,u="ready.slide updated.slide resize.slide moved.slide"+(a?" move.slide":""),c={slide:s,index:i,realIndex:r,container:_(s,o.classes.container),isClone:-1<r,mount:function(){var t=this;this.isClone||(s.id=o.root.id+"-slide"+v(i+1)),o.on(u,function(){return t.update()}).on(ot,f).on("click",function(){return o.emit("click",t)},s),a&&o.on("move.slide",function(t){t===r&&l(!0,!1)}),P(s,{display:""}),this.styles=A(s,"style")||""},destroy:function(){o.off(u).off(ot).off("click",s),I(s,g(B)),f(),z(this.container,"style")},update:function(){l(this.isActive(),!1),l(this.isVisible(),!0)},isActive:function(){return o.index===i},isVisible:function(){var t=this.isActive();if(o.is(q)||t)return t;var n=T(o.Components.Elements.track),e=T(s);return o.options.direction===it?n.top<=e.top&&e.bottom<=n.bottom:n.left<=e.left&&e.right<=n.right},isWithin:function(t,n){var e=Math.abs(t-i);return o.is(j)||this.isClone||(e=Math.min(e,o.length-e)),e<n}});function l(t,n){var e=n?"visible":"active",i=B[e];t?(C(s,i),o.emit(e,c)):M(s,i)&&(I(s,i),o.emit(n?"hidden":"inactive",c))}function f(){O(s,"style",c.styles)}d.mount(),p.push(d)},getSlide:function(n){return p.filter(function(t){return t.index===n})[0]},getSlides:function(t){return t?p:p.filter(function(t){return!t.isClone})},getSlidesByPage:function(t){var e=o.Controller.toIndex(t),n=h.options,i=!1!==n.focus?1:n.perPage;return p.filter(function(t){var n=t.index;return e<=n&&n<e+i})},add:function(t,n,e){var i,o,r,s,a;"string"==typeof t&&(t=l(t)),t instanceof Element&&(i=this.slides[n],P(t,{display:"none"}),i?(S(t,i),this.slides.splice(n,0,t)):(k(this.list,t),this.slides.push(t)),o=function(){e&&e(t)},s=t.querySelectorAll("img"),(a=s.length)?(r=0,m(s,function(t){t.onload=t.onerror=function(){++r===a&&o()}})):o())},remove:function(t){E(this.slides.splice(t,1)[0])},each:function(t){p.forEach(t)},get length(){return this.slides.length},get total(){return p.length}};function n(){var t=i.root,n=h.options;return[t+"--"+n.type,t+"--"+n.direction,n.drag?t+"--draggable":"",n.isNavigation?t+"--nav":"",B.active]}function s(t){return _(e,t)||_(r.slider,t)}return r}function Z(r,i){var s,e,a={mount:function(){s=r.options,e=r.is(W),r.on("move",function(t){r.index=t}).on("updated refresh",function(t){s=t||s,r.index=y(r.index,0,a.edgeIndex)})},go:function(t,n){var e=this.trim(this.parse(t));i.Track.go(e,this.rewind(e),n)},parse:function(t){var n=r.index,e=String(t).match(/([+\-<>]+)(\d+)?/),i=e?e[1]:"",o=e?parseInt(e[2]):0;switch(i){case"+":n+=o||1;break;case"-":n-=o||1;break;case">":case"<":n=function(t,n,e){if(-1<t)return a.toIndex(t);var i=s.perMove,o=e?-1:1;if(i)return n+i*o;return a.toIndex(a.toPage(n)+o)}(o,n,"<"===i);break;default:n=parseInt(t)}return n},toIndex:function(t){if(o())return t;var n=r.length,e=s.perPage,i=t*e;return n-e<=(i-=(this.pageLength*e-n)*rt(i/n))&&i<n&&(i=n-e),i},toPage:function(t){if(o())return t;var n=r.length,e=s.perPage;return rt(n-e<=t&&t<n?(n-1)/e:t/e)},trim:function(t){return e||(t=s.rewind?this.rewind(t):y(t,0,this.edgeIndex)),t},rewind:function(t){var n=this.edgeIndex;if(e){for(;n<t;)t-=n+1;for(;t<0;)t+=n+1}else n<t?t=0:t<0&&(t=n);return t},isRtl:function(){return s.direction===et},get pageLength(){var t=r.length;return o()?t:Math.ceil(t/s.perPage)},get edgeIndex(){var t=r.length;return t?o()||s.isNavigation||e?t-1:t-s.perPage:0},get prevIndex(){var t=r.index-1;return(e||s.rewind)&&(t=this.rewind(t)),-1<t?t:-1},get nextIndex(){var t=r.index+1;return(e||s.rewind)&&(t=this.rewind(t)),r.index<t&&t<=this.edgeIndex||0===t?t:-1}};function o(){return!1!==s.focus}return a}function $(r,s){var i,n,o,e=r.options.direction===it,a=r.is(q),u=!1,c=r.options.direction===et?1:-1,d={sign:c,mount:function(){n=s.Elements,i=s.Layout,o=n.list},mounted:function(){var t=this;a||(this.jump(0),r.on("mounted resize updated",function(){t.jump(r.index)}))},go:function(t,n,e){var i=f(t),o=r.index;r.State.is(U)&&u||(u=t!==n,e||r.emit("move",n,o,t),1<=Math.abs(i-this.position)||a?s.Transition.start(t,n,o,this.toCoord(i),function(){l(t,n,o,e)}):t!==o&&"move"===r.options.trimSpace?s.Controller.go(t+t-o,e):l(t,n,o,e))},jump:function(t){this.translate(f(t))},translate:function(t){P(o,{transform:"translate"+(e?"Y":"X")+"("+t+"px)"})},cancel:function(){r.is(W)?this.shift():this.translate(this.position),P(o,{transition:""})},shift:function(){var t=st(this.position),n=st(this.toPosition(0)),e=st(this.toPosition(r.length)),i=e-n;t<n?t+=i:e<t&&(t-=i),this.translate(c*t)},trim:function(t){return!r.options.trimSpace||r.is(W)?t:y(t,c*(i.totalSize()-i.size-i.gap),0)},toIndex:function(i){var o=this,r=0,s=1/0;return n.getSlides(!0).forEach(function(t){var n=t.index,e=st(o.toPosition(n)-i);e<s&&(s=e,r=n)}),r},toCoord:function(t){return{x:e?0:t,y:e?t:0}},toPosition:function(t){var n=i.totalSize(t)-i.slideSize(t)-i.gap;return c*(n+this.offset(t))},offset:function(t){var n=r.options.focus,e=i.slideSize(t);return"center"===n?-(i.size-e)/2:-(parseInt(n)||0)*(e+i.gap)},get position(){var t=e?"top":"left";return T(o)[t]-T(n.track)[t]-i.padding[t]}};function l(t,n,e,i){P(o,{transition:""}),u=!1,a||d.jump(n),i||r.emit("moved",n,e,t)}function f(t){return d.trim(d.toPosition(t))}return d}function tt(o,t){var s=[],n=0,a=t.Elements,e={mount:function(){o.is(W)&&(i(),o.on("refresh",i).on("resize",function(){n!==r()&&o.refresh()}))},destroy:function(){E(s),s=[]},get clones(){return s},get length(){return s.length}};function i(){e.destroy(),function(i){var o=a.length;if(!o)return;var r=a.slides;for(;r.length<i;)r=r.concat(r);r.slice(0,i).forEach(function(t,n){var e=u(t);k(a.list,e),s.push(e),a.register(e,n+o,n%o)}),r.slice(-i).forEach(function(t,n){var e=u(t);S(e,r[0]),s.push(e),a.register(e,n-i,(o+n-i%o)%o)})}(n=r())}function r(){var t=o.options;if(t.clones)return t.clones;var n=t.autoWidth?a.length:t.perPage,e=t.direction===it?"Height":"Width",i=t["fixed"+e];return i&&(n=Math.ceil(a.track["client"+e]/i)),n*(t.drag?t.flickMaxPages+1:1)}function u(t){var n=t.cloneNode(!0);return C(n,o.classes.clone),z(n,"id"),n}return e}var nt=function(){function t(t,n,e){function i(t){t.elm&&t.elm.removeEventListener(t.event,t.handler,t.options)}var o,r;void 0===n&&(n={}),void 0===e&&(e={}),this.root=t instanceof Element?t:document.querySelector(t),N(this.root,"An invalid element/selector was given."),this.Components=null,this.Event=(o=[],{on:function(t,n,e,i){void 0===e&&(e=null),void 0===i&&(i={}),t.split(" ").forEach(function(t){e&&e.addEventListener(t,n,i),o.push({event:t,handler:n,elm:e,options:i})})},off:function(t,e){void 0===e&&(e=null),t.split(" ").forEach(function(n){o=o.filter(function(t){return!t||t.event!==n||t.elm!==e||(i(t),!1)})})},emit:function(n){for(var t=arguments.length,e=new Array(1<t?t-1:0),i=1;i<t;i++)e[i-1]=arguments[i];o.forEach(function(t){t.elm||t.event.split(".")[0]!==n||t.handler.apply(t,e)})},destroy:function(){o.forEach(i),o=[]}}),this.State=(r=G,{set:function(t){r=t},is:function(t){return t===r}}),this.STATES=s,this._o=u(F,n),this._i=0,this._c=e,this._e={},this._t=null}var n,e,i,o=t.prototype;return o.mount=function(t,n){var e,i,o,r,s=this;void 0===t&&(t=this._e),void 0===n&&(n=this._t),this._e=t,this._t=n,this.Components=(i=u((e=this)._c,t),o=n,r={},m(i,function(t,n){r[n]=t(e,r,n.toLowerCase())}),o=o||(e.is(q)?L:p),r.Transition=o(e,r),r);try{m(this.Components,function(t,n){var e=t.required;void 0===e||e?t.mount&&t.mount():delete s.Components[n]})}catch(t){return void D(t.message)}var a=this.State;return a.set(X),m(this.Components,function(t){t.mounted&&t.mounted()}),this.emit("mounted"),a.set(V),this.emit("ready"),P(this.root,{visibility:"visible"}),this.on("move drag",function(){return a.set(U)}).on("moved dragged",function(){return a.set(V)}),this},o.sync=function(t){return this.sibling=t,this},o.on=function(t,n,e,i){return void 0===e&&(e=null),void 0===i&&(i={}),this.Event.on(t,n,e,i),this},o.off=function(t,n){return void 0===n&&(n=null),this.Event.off(t,n),this},o.emit=function(t){for(var n,e=arguments.length,i=new Array(1<e?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return(n=this.Event).emit.apply(n,[t].concat(i)),this},o.go=function(t,n){return void 0===n&&(n=this.options.waitForTransition),(this.State.is(V)||this.State.is(U)&&!n)&&this.Components.Controller.go(t,!1),this},o.is=function(t){return t===this._o.type},o.add=function(t,n){return void 0===n&&(n=-1),this.Components.Elements.add(t,n,this.refresh.bind(this)),this},o.remove=function(t){return this.Components.Elements.remove(t),this.refresh(),this},o.refresh=function(){return this.emit("refresh").emit("resize"),this},o.destroy=function(n){var t=this;if(void 0===n&&(n=!0),!this.State.is(G))return g(this.Components).reverse().forEach(function(t){t.destroy&&t.destroy(n)}),this.emit("destroy",n),this.Event.destroy(),this.State.set(Y),this;this.on("ready",function(){return t.destroy(n)})},n=t,(e=[{key:"index",get:function(){return this._i},set:function(t){this._i=parseInt(t)}},{key:"length",get:function(){return this.Components.Elements.length}},{key:"options",get:function(){return this._o},set:function(t){var n=this.State.is(G);n||this.emit("update"),this._o=u(this._o,t),n||this.emit("updated",this._o)}},{key:"classes",get:function(){return this._o.classes}},{key:"i18n",get:function(){return this._o.i18n}}])&&J(n.prototype,e),i&&J(n,i),t}(),et="rtl",it="ttb",ot="update.slide",rt=Math.floor,st=Math.abs;function at(t,n){var e;return function(){e=e||setTimeout(function(){t(),e=null},n)}}function ut(n,e,i){function o(t){c||(r||(r=t,a&&a<1&&(r-=a*e)),a=(s=t-r)/e,e<=s&&(r=0,a=1,n()),i&&i(a),u(o))}var r,s,a,u=window.requestAnimationFrame,c=!0;return{pause:function(){c=!0,r=0},play:function(t){r=0,c&&(c=!1,t&&(a=0),u(o))}}}function ct(t,n){var e,i,r,o,s,a,u,c,d,l,f,h,p=n.Elements,g=t.options.direction===it,v=(e={mount:function(){t.on("resize load",at(function(){t.emit("resize")},t.options.throttle),window).on("resize",y).on("updated refresh",m),m(),this.totalSize=g?this.totalHeight:this.totalWidth,this.slideSize=g?this.slideHeight:this.slideWidth},destroy:function(){z([p.list,p.track],"style")},get size(){return g?this.height:this.width}},i=g?(c=t,f=n.Elements,h=c.root,{margin:"marginBottom",init:function(){l=c.options,d=f.track,this.gap=x(h,l.gap);var t=l.padding,n=x(h,t.top||t),e=x(h,t.bottom||t);this.padding={top:n,bottom:e},P(d,{paddingTop:w(n),paddingBottom:w(e)})},totalHeight:function(t){void 0===t&&(t=c.length-1);var n=f.getSlide(t);return n?T(n.slide).bottom-T(f.list).top+this.gap:0},slideWidth:function(){return x(h,l.fixedWidth||this.width)},slideHeight:function(t){if(l.autoHeight){var n=f.getSlide(t);return n?n.slide.offsetHeight:0}var e=l.fixedHeight||(this.height+this.gap)/l.perPage-this.gap;return x(h,e)},get width(){return d.clientWidth},get height(){var t=l.height||this.width*l.heightRatio;return N(t,'"height" or "heightRatio" is missing.'),x(h,t)-this.padding.top-this.padding.bottom}}):(r=t,s=n.Elements,a=r.root,{margin:"margin"+((u=r.options).direction===et?"Left":"Right"),height:0,init:function(){u=r.options,o=s.track,this.gap=x(a,u.gap);var t=u.padding,n=x(a,t.left||t),e=x(a,t.right||t);this.padding={left:n,right:e},P(o,{paddingLeft:w(n),paddingRight:w(e)})},totalWidth:function(t){void 0===t&&(t=r.length-1);var n,e,i=s.getSlide(t),o=0;return i&&(n=T(i.slide),e=T(s.list),o=u.direction===et?e.right-n.left:n.right-e.left,o+=this.gap),o},slideWidth:function(t){if(u.autoWidth){var n=s.getSlide(t);return n?n.slide.offsetWidth:0}var e=u.fixedWidth||(this.width+this.gap)/u.perPage-this.gap;return x(a,e)},slideHeight:function(){var t=u.height||u.fixedHeight||this.width*u.heightRatio;return x(a,t)},get width(){return o.clientWidth-this.padding.left-this.padding.right}}),e._s=i,b(i).forEach(function(t){e[t]||Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}),e);function m(){v.init(),P(t.root,{maxWidth:w(t.options.width)}),p.each(function(t){t.slide.style[v.margin]=w(v.gap)}),y()}function y(){var n=t.options;P(p.track,{height:w(v.height)});var e=n.autoHeight?null:w(v.slideHeight());p.each(function(t){P(t.container,{height:e}),P(t.slide,{width:n.autoWidth?null:w(v.slideWidth(t.index)),height:t.container?null:e})})}return v}function dt(u,c){var e,i,o,r,d=c.Track,l=c.Controller,s=u.options.direction===it,f=s?"y":"x",n={disabled:!1,mount:function(){var t=this,n=c.Elements.list;u.on("touchstart mousedown",a,n).on("touchmove mousemove",p,n,{passive:!1}).on("touchend touchcancel mouseleave mouseup dragend",g,n).on("mounted refresh",function(){m(n.querySelectorAll("img, a"),function(t){u.off("dragstart",t).on("dragstart",function(t){t.preventDefault()},t,{passive:!1})})}).on("mounted updated",function(){t.disabled=!u.options.drag})}};function a(t){n.disabled||r||h(t)}function h(t){e=d.toCoord(d.position),i=v(t,{}),o=i}function p(t){var n;i&&(o=v(t,i),r?(t.cancelable&&t.preventDefault(),u.is(q)||(n=e[f]+o.offset[f],d.translate(function(t){{var n,e,i;u.is(j)&&(n=d.sign,e=n*d.trim(d.toPosition(0)),i=n*d.trim(d.toPosition(l.edgeIndex)),(t*=n)<e?t=e-7*Math.log(e-t):i<t&&(t=i+7*Math.log(t-i)),t*=n)}return t}(n)))):function(t){var n=t.offset;if(u.State.is(U)&&u.options.waitForTransition)return!1;var e=180*Math.atan(gt(n.y)/gt(n.x))/Math.PI;s&&(e=90-e);return e<u.options.dragAngleThreshold}(o)&&(u.emit("drag",i),r=!0,d.cancel(),h(t)))}function g(){i=null,r&&(u.emit("dragged",o),function(t){var n=t.velocity[f],e=gt(n);{var i,o,r,s,a;0<e&&(i=u.options,o=u.index,r=n<0?-1:1,s=o,u.is(q)||(a=d.position,e>i.flickVelocityThreshold&&gt(t.offset[f])<i.swipeDistanceThreshold&&(a+=r*Math.min(e*i.flickPower,c.Layout.size*(i.flickMaxPages||1))),s=d.toIndex(a)),s===o&&.1<e&&(s=o+r*d.sign),u.is(j)&&(s=y(s,0,l.edgeIndex)),l.go(s,i.isNavigation))}}(o),r=!1)}function v(t,n){var e=t.timeStamp,i=t.touches,o=i?i[0]:t,r=o.clientX,s=o.clientY,a=n.to||{},u=a.x,c=a.y,d={x:r-(void 0===u?r:u),y:s-(void 0===c?s:c)},l=e-(n.time||0);return{to:{x:r,y:s},offset:d,time:e,velocity:{x:d.x/l,y:d.y/l}}}return n}function lt(t,n){var e=!1;function i(t){e&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}return{required:t.options.drag&&!t.is(q),mount:function(){t.on("click",i,n.Elements.track,{capture:!0}).on("drag",function(){e=!0}).on("moved",function(){e=!1})}}}function ft(o,r,s){var a,u,t,i=o.classes,c=o.root,d=r.Elements;function n(){var t=r.Controller,n=t.prevIndex,e=t.nextIndex,i=o.length>o.options.perPage||o.is(W);a.disabled=n<0||!i,u.disabled=e<0||!i,o.emit(s+":updated",a,u,n,e)}function e(t){return l('<button class="'+i.arrow+" "+(t?i.prev:i.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg"\tviewBox="0 0 40 40"\twidth="40"\theight="40"><path d="'+(o.options.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")+'" />')}return{required:o.options.arrows,mount:function(){a=d.arrows.prev,u=d.arrows.next,a&&u||!o.options.arrows||(a=e(!0),u=e(!1),t=!0,function(){var t=f("div",{class:i.arrows});k(t,a),k(t,u);var n=d.slider,e="slider"===o.options.arrows&&n?n:c;S(t,e.firstElementChild)}()),a&&u&&o.on("click",function(){o.go("<")},a).on("click",function(){o.go(">")},u).on("mounted move updated refresh",n),this.arrows={prev:a,next:u}},mounted:function(){o.emit(s+":mounted",a,u)},destroy:function(){z([a,u],"disabled"),t&&E(a.parentElement)}}}function ht(s,n,r){var a={},u=n.Elements,c={mount:function(){var t,n,o,r,e,i=s.options.pagination;i&&(n=s.options,o=s.classes,r=f("ul",{class:o.pagination}),e=u.getSlides(!1).filter(function(t){return!1!==n.focus||t.index%n.perPage==0}).map(function(t,n){var e=f("li",{}),i=f("button",{class:o.page,type:"button"});return k(e,i),k(r,e),s.on("click",function(){s.go(">"+n)},i),{li:e,button:i,page:n,Slides:u.getSlidesByPage(n)}}),a={list:r,items:e},t=u.slider,k("slider"===i&&t?t:s.root,a.list),s.on(bt,d)),s.off(wt).on(wt,function(){c.destroy(),s.options.pagination&&(c.mount(),c.mounted())})},mounted:function(){var t;s.options.pagination&&(t=s.index,s.emit(r+":mounted",a,this.getItem(t)),d(t,-1))},destroy:function(){E(a.list),a.items&&a.items.forEach(function(t){s.off("click",t.button)}),s.off(bt),a={}},getItem:function(t){return a.items[n.Controller.toPage(t)]},get data(){return a}};function d(t,n){var e=c.getItem(n),i=c.getItem(t),o=B.active;e&&I(e.button,o),i&&C(i.button,o),s.emit(r+":updated",a,e,i)}return c}function pt(a,e){var u=a.i18n,i=e.Elements,o=[St,Pt,Et,kt,_t,"role"];function n(t,n){O(t,St,!n),a.options.slideFocus&&O(t,Pt,n?0:-1)}function t(t,n){var e=i.track.id;O(t,Et,e),O(n,Et,e)}function r(t,n,e,i){var o=a.index,r=-1<e&&o<e?u.last:u.prev,s=-1<i&&i<o?u.first:u.next;O(t,kt,r),O(n,kt,s)}function s(t,n){n&&O(n.button,_t,!0),t.items.forEach(function(t){var n=a.options,e=h(!1===n.focus&&1<n.perPage?u.pageX:u.slideX,t.page+1),i=t.button,o=t.Slides.map(function(t){return t.slide.id});O(i,Et,o.join(" ")),O(i,kt,e)})}function c(t,n,e){n&&z(n.button,_t),e&&O(e.button,_t,!0)}function d(s){i.each(function(t){var n=t.slide,e=t.realIndex;f(n)||O(n,"role","button");var i=-1<e?e:t.index,o=h(u.slideX,i+1),r=s.Components.Elements.getSlide(i);O(n,kt,o),r&&O(n,Et,r.slide.id)})}function l(t,n){var e=t.slide;n?O(e,_t,!0):z(e,_t)}function f(t){return"BUTTON"===t.tagName}return{required:a.options.accessibility,mount:function(){a.on("visible",function(t){n(t.slide,!0)}).on("hidden",function(t){n(t.slide,!1)}).on("arrows:mounted",t).on("arrows:updated",r).on("pagination:mounted",s).on("pagination:updated",c).on("refresh",function(){z(e.Clones.clones,o)}),a.options.isNavigation&&a.on("navigation:mounted",d).on("active",function(t){l(t,!0)}).on("inactive",function(t){l(t,!1)}),["play","pause"].forEach(function(t){var n=i[t];n&&(f(n)||O(n,"role","button"),O(n,Et,i.track.id),O(n,kt,u[t]))})},destroy:function(){var t=e.Arrows,n=t?t.arrows:{};z(i.slides.concat([n.prev,n.next,i.play,i.pause]),o)}}}var gt=Math.abs,vt=1,mt=2,yt=3,bt="move.page",wt="updated.page refresh.page",xt="data-splide-lazy",_t="aria-current",Et="aria-controls",kt="aria-label",St="aria-hidden",Pt="tabindex",Ct={ltr:{ArrowLeft:"<",ArrowRight:">",Left:"<",Right:">"},rtl:{ArrowLeft:">",ArrowRight:"<",Left:">",Right:"<"},ttb:{ArrowUp:"<",ArrowDown:">",Up:"<",Down:">"}},It="move.sync",Mt=[" ","Enter","Spacebar"],Ot={Options:K,Breakpoints:function(r){var s,a,u=r.options.breakpoints,n=at(t,50),c=[];function t(){var t,n,e,i,o=(t=c.filter(function(t){return t.mql.matches})[0])?t.point:-1;o!==a&&(a=o,n=r.State,(i=(e=u[o]||s).destroy)?(r.options=s,r.destroy("completely"===i)):(n.is(Y)&&(n.set(G),r.mount()),r.options=e))}return{required:u&&matchMedia,mount:function(){c=Object.keys(u).sort(function(t,n){return t-n}).map(function(t){return{point:t,mql:matchMedia("(max-width:"+t+"px)")}}),this.destroy(!0),addEventListener("resize",n),s=r.options,t()},destroy:function(t){t&&removeEventListener("resize",n)}}},Controller:Z,Elements:Q,Track:$,Clones:tt,Layout:ct,Drag:dt,Click:lt,Autoplay:function(o,t,e){var i,r=[],s=t.Elements,a={required:o.options.autoplay,mount:function(){var t=o.options;s.slides.length>t.perPage&&(i=ut(function(){o.go(">")},t.interval,function(t){o.emit(e+":playing",t),s.bar&&P(s.bar,{width:100*t+"%"})}),function(){var t=o.options,n=o.sibling,e=[o.root,n?n.root:null];t.pauseOnHover&&(u(e,"mouseleave",vt,!0),u(e,"mouseenter",vt,!1));t.pauseOnFocus&&(u(e,"focusout",mt,!0),u(e,"focusin",mt,!1));o.on("click",function(){a.play(mt),a.play(yt)},s.play).on("move refresh",function(){a.play()}).on("destroy",function(){a.pause()}),u([s.pause],"click",yt,!1)}(),this.play())},play:function(n){void 0===n&&(n=0),(r=r.filter(function(t){return t!==n})).length||(o.emit(e+":play"),i.play(o.options.resetProgress))},pause:function(t){void 0===t&&(t=0),i.pause(),-1===r.indexOf(t)&&r.push(t),1===r.length&&o.emit(e+":pause")}};function u(t,n,e,i){t.forEach(function(t){o.on(n,function(){a[i?"play":"pause"](e)},t)})}return a},Cover:function(t,n){function e(e){n.Elements.each(function(t){var n=_(t.slide,"IMG")||_(t.container,"IMG");n&&n.src&&i(n,e)})}function i(t,n){P(t.parentElement,{background:n?"":'center/cover no-repeat url("'+t.src+'")'}),P(t,{display:n?"":"none"})}return{required:t.options.cover,mount:function(){t.on("lazyload:loaded",function(t){i(t,!1)}),t.on("mounted updated refresh",function(){return e(!1)})},destroy:function(){e(!0)}}},Arrows:ft,Pagination:ht,LazyLoad:function(o,t,r){var n,e,i=o.options,s="sequential"===i.lazyLoad;function a(){e=[],n=0}function u(n){n=isNaN(n)?o.index:n,(e=e.filter(function(t){return!t.Slide.isWithin(n,i.perPage*(i.preloadPages+1))||(c(t.img,t.Slide),!1)}))[0]||o.off("moved."+r)}function c(t,n){C(n.slide,B.loading);var e=f("span",{class:o.classes.spinner});k(t.parentElement,e),t.onload=function(){l(t,e,n,!1)},t.onerror=function(){l(t,e,n,!0)},O(t,"src",A(t,xt))}function d(){var t;n<e.length&&c((t=e[n]).img,t.Slide),n++}function l(t,n,e,i){I(e.slide,B.loading),i||(E(n),P(t,{display:""}),o.emit(r+":loaded",t).emit("resize")),s&&d()}return{required:i.lazyLoad,mount:function(){o.on("mounted refresh",function(){a(),t.Elements.each(function(n){m(n.slide.querySelectorAll("["+xt+"]"),function(t){t.src||(e.push({img:t,Slide:n}),P(t,{display:"none"}))})}),s&&d()}),s||o.on("mounted refresh moved."+r,u)},destroy:a}},Keyboard:function(o){var r;return{mount:function(){o.on("mounted updated",function(){var t=o.options,n=o.root,e=Ct[t.direction],i=t.keyboard;r&&(o.off("keydown",r),z(n,Pt)),i&&("focused"===i?O(r=n,Pt,0):r=document,o.on("keydown",function(t){e[t.key]&&o.go(e[t.key])},r))})}}},Sync:function(i){var o=i.sibling,t=o&&o.options.isNavigation;function r(){i.on(It,function(t,n,e){o.off(It).go(o.is(W)?e:t,!1),s()})}function s(){o.on(It,function(t,n,e){i.off(It).go(i.is(W)?e:t,!1),r()})}function a(t){i.State.is(V)&&o.go(t)}return{required:!!o,mount:function(){r(),s(),t&&o.Components.Elements.each(function(t){var n=t.slide,e=t.index;i.on("mouseup touchend",function(t){t.button&&0!==t.button||a(e)},n),i.on("keyup",function(t){-1<Mt.indexOf(t.key)&&(t.preventDefault(),a(e))},n,{passive:!1})})},mounted:function(){t&&o.emit("navigation:mounted",i)}}},A11y:pt};var At=function(e){var t,n;function i(t,n){return e.call(this,t,n,Ot)||this}return n=e,(t=i).prototype=Object.create(n.prototype),(t.prototype.constructor=t).__proto__=n,i}(nt);window.Splide=At}]);
{
"name": "@splidejs/splide",
"version": "2.4.0",
"version": "2.4.3",
"description": "Splide is a lightweight and powerful slider without any dependencies.",

@@ -53,5 +53,5 @@ "author": "Naotoshi Fujita",

"build:sass": "gulp build:sass",
"test": "jest",
"test": "jest --clearCache && jest",
"lint": "gulp lint"
}
}

@@ -101,3 +101,6 @@ /**

setAttribute( slide, ARIA_HIDDEN, ! visible );
setAttribute( slide, TAB_INDEX, visible ? 0 : -1 );
if ( Splide.options.slideFocus ) {
setAttribute( slide, TAB_INDEX, visible ? 0 : -1 );
}
}

@@ -104,0 +107,0 @@

@@ -79,3 +79,3 @@ /**

map = Object.keys( breakpoints )
.sort( ( n, m ) => parseInt( n ) - parseInt( m ) )
.sort( ( n, m ) => +n - +m )
.map( point => ( { point, mql: matchMedia( `(max-width:${ point }px)` ) } ) );

@@ -82,0 +82,0 @@

@@ -10,3 +10,3 @@ /**

import { TTB } from '../../constants/directions';
import { IDLE } from '../../constants/states';
import { MOVING } from '../../constants/states';
import { between } from '../../utils/utils';

@@ -17,2 +17,7 @@ import { each } from "../../utils/object";

/**
* If the absolute velocity is greater thant this value,
* a slider always goes to a different slide after drag, not allowed to stay on a current slide.
*/
const MIN_VELOCITY = 0.1;

@@ -137,6 +142,5 @@ /**

function start( e ) {
if ( ! Drag.disabled && ! isDragging && Splide.State.is( IDLE ) ) {
startCoord = Track.toCoord( Track.position );
startInfo = analyze( e, {} );
currentInfo = startInfo;
if ( ! Drag.disabled && ! isDragging ) {
// These prams are used to evaluate whether the slider should start moving.
init( e );
}

@@ -146,2 +150,13 @@ }

/**
* Initialize parameters.
*
* @param {TouchEvent|MouseEvent} e - TouchEvent or MouseEvent object.
*/
function init( e ) {
startCoord = Track.toCoord( Track.position );
startInfo = analyze( e, {} );
currentInfo = startInfo;
}
/**
* Called while the track being dragged.

@@ -168,2 +183,6 @@ *

isDragging = true;
Track.cancel();
// These params are actual drag data.
init( e );
}

@@ -182,13 +201,13 @@ }

function shouldMove( { offset } ) {
if ( Splide.State.is( IDLE ) ) {
let angle = Math.atan( abs( offset.y ) / abs( offset.x ) ) * 180 / Math.PI;
if ( Splide.State.is( MOVING ) && Splide.options.waitForTransition ) {
return false;
}
if ( isVertical ) {
angle = 90 - angle;
}
let angle = Math.atan( abs( offset.y ) / abs( offset.x ) ) * 180 / Math.PI;
return angle < Splide.options.dragAngleThreshold;
if ( isVertical ) {
angle = 90 - angle;
}
return false;
return angle < Splide.options.dragAngleThreshold;
}

@@ -246,7 +265,5 @@

if ( absV > 0 ) {
const Layout = Components.Layout;
const options = Splide.options;
const index = Splide.index;
const sign = velocity < 0 ? -1 : 1;
const adjacent = index + sign * Track.sign;
const options = Splide.options;
const index = Splide.index;
const sign = velocity < 0 ? -1 : 1;

@@ -259,3 +276,6 @@ let destIndex = index;

if ( absV > options.flickVelocityThreshold && abs( info.offset[ axis ] ) < options.swipeDistanceThreshold ) {
destination += sign * Math.min( absV * options.flickPower, Layout.width * ( options.flickMaxPages || 1 ) );
destination += sign * Math.min(
absV * options.flickPower,
Components.Layout.size * ( options.flickMaxPages || 1 )
);
}

@@ -267,7 +287,7 @@

/*
* Do not allow the track to go to a previous position.
* Do not allow the track to go to a previous position if there is enough velocity.
* Always use the adjacent index for the fade mode.
*/
if ( destIndex === index ) {
destIndex = adjacent;
if ( destIndex === index && absV > MIN_VELOCITY ) {
destIndex = index + sign * Track.sign;
}

@@ -274,0 +294,0 @@

@@ -14,2 +14,3 @@ /**

child,
children,
remove,

@@ -23,4 +24,4 @@ append,

import { exist } from '../../utils/error';
import { values } from '../../utils/object';
import { pad } from "../../utils/utils";
import { STATUS_CLASSES } from "../../constants/classes";

@@ -249,3 +250,3 @@

Elements.slides = values( Elements.list.children );
Elements.slides = children( Elements.list, classes.slide );

@@ -279,2 +280,3 @@ const arrows = findParts( classes.arrows );

options.isNavigation ? `${ rootClass }--nav` : '',
STATUS_CLASSES.active,
];

@@ -286,3 +288,3 @@ }

*
* @return {Element|null} - A found element or null.
* @return {Element} - A found element or undefined.
*/

@@ -289,0 +291,0 @@ function findParts( className ) {

@@ -8,3 +8,13 @@ /**

import { child, addClass, removeClass, hasClass, getAttribute, setAttribute, applyStyle } from '../../utils/dom';
import {
child,
addClass,
removeClass,
hasClass,
getAttribute,
setAttribute,
removeAttribute,
applyStyle,
getRect,
} from '../../utils/dom';
import { FADE, SLIDE } from '../../constants/types';

@@ -81,3 +91,3 @@ import { STATUS_CLASSES } from '../../constants/classes';

*
* @type {Element|null}
* @type {Element|undefined}
*/

@@ -132,2 +142,3 @@ container: child( slide, Splide.classes.container ),

restoreStyles();
removeAttribute( this.container, 'style' );
},

@@ -164,12 +175,10 @@

const { floor } = Math;
const Components = Splide.Components;
const Track = Components.Track;
const Layout = Components.Layout;
const isVertical = Splide.options.direction === TTB;
const position = floor( ( Track.toPosition( index ) + Track.offset( index ) - Track.position ) * Track.sign );
const edge = floor( position + Layout[ isVertical ? 'slideHeight' : 'slideWidth' ]( index ) );
const size = Layout[ isVertical ? 'height' : 'width' ];
const trackRect = getRect( Splide.Components.Elements.track );
const slideRect = getRect( slide );
return ( 0 <= position && position <= size && 0 <= edge && edge <= size );
if ( Splide.options.direction === TTB ) {
return trackRect.top <= slideRect.top && slideRect.bottom <= trackRect.bottom;
}
return trackRect.left <= slideRect.left && slideRect.right <= trackRect.right;
},

@@ -176,0 +185,0 @@

@@ -8,2 +8,5 @@ /**

import { removeAttribute, setAttribute } from "../../utils/dom";
import { TAB_INDEX } from "../../constants/a11y";
/**

@@ -48,7 +51,7 @@ * Map a key to a slide control.

/**
* Hold the root element.
* Hold the target element.
*
* @type {Element}
* @type {Element|Document|undefined}
*/
const root = Splide.root;
let target;

@@ -60,8 +63,21 @@ return {

mount() {
const map = KEY_MAP[ Splide.options.direction ];
Splide.on( 'mounted updated', () => {
Splide.off( 'keydown', root );
const options = Splide.options;
const root = Splide.root;
const map = KEY_MAP[ options.direction ];
const keyboard = options.keyboard;
if ( Splide.options.keyboard ) {
if ( target ) {
Splide.off( 'keydown', target );
removeAttribute( root, TAB_INDEX );
}
if ( keyboard ) {
if ( keyboard === 'focused' ) {
target = root;
setAttribute( root, TAB_INDEX, 0 );
} else {
target = document;
}
Splide.on( 'keydown', e => {

@@ -71,3 +87,3 @@ if ( map[ e.key ] ) {

}
}, root );
}, target );
}

@@ -74,0 +90,0 @@ } );

@@ -8,14 +8,7 @@ /**

import { applyStyle } from "../../../utils/dom";
import { applyStyle, getRect } from "../../../utils/dom";
import { unit, toPixel } from "../../../utils/utils";
import { RTL } from '../../../constants/directions';
/**
* Max width of a slide.
*
* @type {number}
*/
const SLIDE_MAX_WIDTH = 5000;
/**

@@ -74,9 +67,2 @@ * The resolver component for horizontal layout.

/**
* Always 0 because the height will be determined by inner contents.
*
* @type {number}
*/
listHeight: 0,
/**
* Initialization.

@@ -91,28 +77,35 @@ */

const padding = options.padding;
const { left = padding, right = padding } = padding;
const left = toPixel( root, padding.left || padding );
const right = toPixel( root, padding.right || padding );
this.padding = {
left : toPixel( root, left ),
right: toPixel( root, right ),
};
applyStyle( track, {
paddingLeft : unit( left ),
paddingRight: unit( right ),
} );
this.padding = { left, right };
applyStyle( track, { paddingLeft : unit( left ), paddingRight: unit( right ) } );
},
/**
* Accumulate slide width including the gap to the designated index.
* Return total width from the left of the list to the right of the slide specified by the provided index.
*
* @param {number|undefined} index - If undefined, width of all slides will be accumulated.
* @param {number} index - Optional. A slide index. If undefined, total width of the slider will be returned.
*
* @return {number} - Accumulated width.
* @return {number} - Total width to the right side of the specified slide, or 0 for an invalid index.
*/
totalWidth( index ) {
return Elements.getSlides( true )
.filter( Slide => Slide.index <= index )
.reduce( ( accumulator, Slide ) => {
return accumulator + this.slideWidth( Slide.index ) + this.gap;
}, 0 );
totalWidth( index = Splide.length - 1 ) {
const Slide = Elements.getSlide( index );
let width = 0;
if ( Slide ) {
const slideRect = getRect( Slide.slide );
const listRect = getRect( Elements.list );
if ( options.direction === RTL ) {
width = listRect.right - slideRect.left;
} else {
width = slideRect.right - listRect.left;
}
width += this.gap;
}
return width;
},

@@ -155,13 +148,3 @@

},
/**
* Return list width.
*
* @return {number} - Current list width.
*/
get listWidth() {
const total = Elements.total;
return options.autoWidth ? total * SLIDE_MAX_WIDTH : this.totalWidth( total );
},
}
}

@@ -8,3 +8,3 @@ /**

import { applyStyle } from "../../../utils/dom";
import { applyStyle, getRect } from "../../../utils/dom";
import { toPixel, unit } from "../../../utils/utils";

@@ -69,13 +69,24 @@ import { exist } from "../../../utils/error";

const padding = options.padding;
const { top = padding, bottom = padding } = padding;
const top = toPixel( root, padding.top || padding );
const bottom = toPixel( root, padding.bottom || padding );
this.padding = {
top : toPixel( root, top ),
bottom: toPixel( root, bottom ),
};
this.padding = { top, bottom };
applyStyle( track, { paddingTop : unit( top ), paddingBottom: unit( bottom ) } );
},
applyStyle( track, {
paddingTop : unit( top ),
paddingBottom: unit( bottom ),
} );
/**
* Return total height from the top of the list to the bottom of the slide specified by the provided index.
*
* @param {number} index - Optional. A slide index. If undefined, total height of the slider will be returned.
*
* @return {number} - Total height to the bottom of the specified slide, or 0 for an invalid index.
*/
totalHeight( index = Splide.length - 1 ) {
const Slide = Elements.getSlide( index );
if ( Slide ) {
return getRect( Slide.slide ).bottom - getRect( Elements.list ).top + this.gap;
}
return 0;
},

@@ -95,5 +106,12 @@

*
* @param {number} index - Slide index.
*
* @return {number} - The slide height.
*/
slideHeight() {
slideHeight( index ) {
if ( options.autoHeight ) {
const Slide = Elements.getSlide( index );
return Slide ? Slide.slide.offsetHeight : 0;
}
const height = options.fixedHeight || ( this.height + this.gap ) / options.perPage - this.gap;

@@ -122,21 +140,3 @@ return toPixel( root, height );

},
/**
* Return list width.
*
* @return {number} - Current list width.
*/
get listWidth() {
return this.width;
},
/**
* Return list height.
*
* @return {number} - Current list height.
*/
get listHeight() {
return ( this.slideHeight() + this.gap ) * Elements.total;
},
}
}

@@ -35,2 +35,9 @@ /**

/**
* Whether the slider is vertical or not.
*
* @type {boolean}
*/
const isVertical = Splide.options.direction === TTB;
/**
* Layout component object.

@@ -47,6 +54,10 @@ *

init();
// The word "size" means width for a horizontal slider and height for a vertical slider.
this.totalSize = isVertical ? this.totalHeight : this.totalWidth;
this.slideSize = isVertical ? this.slideHeight : this.slideWidth;
},
/**
* Destroy.
* Destroy the component.
*/

@@ -56,4 +67,13 @@ destroy() {

},
}, Splide.options.direction === TTB ? Vertical( Splide, Components ) : Horizontal( Splide, Components ) );
/**
* Return the slider height on the vertical mode or width on the horizontal mode.
*
* @return {number}
*/
get size() {
return isVertical ? this.height : this.width;
},
}, isVertical ? Vertical( Splide, Components ) : Horizontal( Splide, Components ) );
/**

@@ -83,10 +103,10 @@ * Init slider styles according to options.

/**
* Resize the list and slides including clones.
* Resize the track and slide elements.
*/
function resize() {
applyStyle( Elements.list, { width: unit( Layout.listWidth ), height: unit( Layout.listHeight ) } );
const options = Splide.options;
applyStyle( Elements.track, { height: unit( Layout.height ) } );
const slideHeight = unit( Layout.slideHeight() );
const width = Layout.width;
const slideHeight = options.autoHeight ? null : unit( Layout.slideHeight() );

@@ -97,11 +117,6 @@ Elements.each( Slide => {

applyStyle( Slide.slide, {
width : Splide.options.autoWidth ? null : unit( Layout.slideWidth( Slide.index ) ),
width : options.autoWidth ? null : unit( Layout.slideWidth( Slide.index ) ),
height: Slide.container ? null : slideHeight,
} );
} );
// When the scrollbar is made hidden, the track width is changed but the resize event is not fired.
if ( width !== Layout.width ) {
resize();
}
}

@@ -108,0 +123,0 @@

@@ -8,10 +8,11 @@ /**

import Vertical from './directions/vertical';
import Horizontal from './directions/horizontal';
import { applyStyle } from '../../utils/dom';
import { applyStyle, getRect } from '../../utils/dom';
import { between } from "../../utils/utils";
import { LOOP, FADE } from '../../constants/types';
import { TTB } from '../../constants/directions';
import { assign } from "../../utils/object";
import { RTL, TTB } from '../../constants/directions';
import { MOVING } from "../../constants/states";
const { abs } = Math;
/**

@@ -27,16 +28,23 @@ * The component for moving list in the track.

/**
* Store the list element.
* Hold the Layout component.
*
* @type {Element}
* @type {Object}
*/
let list;
let Layout;
/**
* Store the current position.
* Hold the Layout component.
*
* @type {number}
* @type {Object}
*/
let currPosition = 0;
let Elements;
/**
* Store the list element.
*
* @type {Element}
*/
let list;
/**
* Whether the current direction is vertical or not.

@@ -56,2 +64,16 @@ *

/**
* This will be true while transitioning from the last index to the first one.
*
* @type {boolean}
*/
let isLoopPending = false;
/**
* Sign for the direction. Only RTL mode uses the positive sign.
*
* @type {number}
*/
const sign = Splide.options.direction === RTL ? 1 : -1;
/**
* Track component object.

@@ -61,9 +83,17 @@ *

*/
const Track = assign( {
const Track = {
/**
* Make public the sign defined locally.
*
* @type {number}
*/
sign,
/**
* Called when the component is mounted.
*/
mount() {
list = Components.Elements.list;
this.init();
Elements = Components.Elements;
Layout = Components.Layout;
list = Elements.list;
},

@@ -77,2 +107,3 @@

if ( ! isFade ) {
this.jump( 0 );
Splide.on( 'mounted resize updated', () => { this.jump( Splide.index ) } );

@@ -95,2 +126,9 @@ }

// Prevent any actions while transitioning from the last index to the first one for jump.
if ( Splide.State.is( MOVING ) && isLoopPending ) {
return;
}
isLoopPending = destIndex !== newIndex;
if ( ! silently ) {

@@ -100,3 +138,3 @@ Splide.emit( 'move', newIndex, prevIndex, destIndex );

if ( Math.abs( newPosition - currPosition ) >= 1 || isFade ) {
if ( Math.abs( newPosition - this.position ) >= 1 || isFade ) {
Components.Transition.start( destIndex, newIndex, prevIndex, this.toCoord( newPosition ), () => {

@@ -124,3 +162,3 @@ onTransitionEnd( destIndex, newIndex, prevIndex, silently );

/**
* Set position.
* Set the list position by CSS translate property.
*

@@ -130,7 +168,40 @@ * @param {number} position - A new position value.

translate( position ) {
currPosition = position;
applyStyle( list, { transform: `translate${ this.axis }(${ position }px)` } );
applyStyle( list, { transform: `translate${ isVertical ? 'Y' : 'X' }(${ position }px)` } );
},
/**
* Cancel the transition and set the list position.
* Also, loop the slider if necessary.
*/
cancel() {
if ( Splide.is( LOOP ) ) {
this.shift();
} else {
// Ensure the current position.
this.translate( this.position );
}
applyStyle( list, { transition: '' } );
},
/**
* Shift the slider if it exceeds borders on the edge.
*/
shift() {
let position = abs( this.position );
const left = abs( this.toPosition( 0 ) );
const right = abs( this.toPosition( Splide.length ) );
const innerSize = right - left;
if ( position < left ) {
position += innerSize;
} else if ( position > right ) {
position -= innerSize;
}
this.translate( sign * position );
},
/**
* Trim redundant spaces on the left or right edge if necessary.

@@ -147,6 +218,31 @@ *

return this._s.trim( position );
const edge = sign * ( Layout.totalSize() - Layout.size - Layout.gap );
return between( position, edge, 0 );
},
/**
* Calculate the closest slide index from the given position.
*
* @param {number} position - A position converted to an slide index.
*
* @return {number} - The closest slide index.
*/
toIndex( position ) {
let index = 0;
let minDistance = Infinity;
Elements.getSlides( true ).forEach( Slide => {
const slideIndex = Slide.index;
const distance = abs( this.toPosition( slideIndex ) - position );
if ( distance < minDistance ) {
minDistance = distance;
index = slideIndex;
}
} );
return index;
},
/**
* Return coordinates object by the given position.

@@ -166,10 +262,40 @@ *

/**
* Return current position.
* Calculate the track position by a slide index.
*
* @param {number} index - Slide index.
*
* @return {Object} - Calculated position.
*/
toPosition( index ) {
const position = Layout.totalSize( index ) - Layout.slideSize( index ) - Layout.gap;
return sign * ( position + this.offset( index ) );
},
/**
* Return the current offset value, considering direction.
*
* @return {number} - Offset amount.
*/
offset( index ) {
const { focus } = Splide.options;
const slideSize = Layout.slideSize( index );
if ( focus === 'center' ) {
return -( Layout.size - slideSize ) / 2;
}
return -( parseInt( focus ) || 0 ) * ( slideSize + Layout.gap );
},
/**
* Return the current position.
* This returns the correct position even while transitioning by CSS.
*
* @return {number} - Current position.
*/
get position() {
return currPosition;
const prop = isVertical ? 'top' : 'left';
return getRect( list )[ prop ] - getRect( Elements.track )[ prop ] - Layout.padding[ prop ];
},
}, isVertical ? Vertical( Splide, Components ) : Horizontal( Splide, Components ) );
};

@@ -186,2 +312,3 @@ /**

applyStyle( list, { transition: '' } );
isLoopPending = false;

@@ -188,0 +315,0 @@ if ( ! isFade ) {

@@ -46,2 +46,11 @@ /**

/**
* Whether to prevent any actions while a slider is transitioning.
* If false, navigation, drag and swipe work while the slider is running.
* Even so, it will be forced to wait for transition in some cases in the loop mode to shift a slider.
*
* @type {boolean}
*/
waitForTransition: true,
/**
* Define slider max width.

@@ -87,3 +96,2 @@ *

* - perPage/perMove should be 1.
* - lazyLoad should be false.
*

@@ -95,2 +103,10 @@ * @type {boolean}

/**
* If true, slide height will be determined by the element width itself.
* - perPage/perMove should be 1.
*
* @type {boolean}
*/
autoHeight: false,
/**
* Determine how many slides should be displayed per page.

@@ -240,7 +256,10 @@ *

/**
* Whether to control a slide via keyboard.
* Whether to enable keyboard shortcuts
* - true or 'global': Listen to keydown event of the document.
* - 'focused': Listen to the keydown event of the slider root element. tabindex="0" will be added to the element.
* - false: Disable keyboard shortcuts.
*
* @type {boolean}
* @type {boolean|string}
*/
keyboard: true,
keyboard: 'global',

@@ -320,2 +339,9 @@ /**

/**
* Whether to add tabindex="0" to visible slides or not.
*
* @type {boolean}
*/
slideFocus: true,
/**
* Determine if a slider is navigation for another.

@@ -322,0 +348,0 @@ * Use "sync" API to synchronize two sliders.

@@ -140,5 +140,15 @@ /**

*/
waitForTransition?: boolean,
/**
* @default false
*/
autoWidth?: boolean,
/**
* @default false
*/
autoHeight?: boolean,
/**
* @default 0

@@ -194,5 +204,5 @@ */

/**
* @default true
* @default 'global'
*/
keyboard?: boolean;
keyboard?: 'global' | 'focused' | boolean;

@@ -240,2 +250,7 @@ /**

/**
* @default true
*/
slideFocus?: true,
/**
* @default false

@@ -526,13 +541,14 @@ */

export interface Layout extends Component {
margin: string;
height: number;
listHeight: number;
readonly margin: string;
readonly height: number;
readonly width: number;
readonly listWidth: number;
readonly size: number;
init(): void;
totalWidth( index: number | undefined ): number;
totalHeight( index: number | undefined ): number;
totalSize( index: number | undefined ): number;
slideWidth( index: number ): number;
slideHeight( index: number ): number;
slideSize( index: number | undefined ): number;
}

@@ -586,17 +602,15 @@

export interface Track extends Component {
axis: 'X' | 'Y';
sign: 1 | -1;
readonly sign: 1 | -1;
readonly position: number;
init(): void;
go( destIndex: number, newIndex: number, silently: boolean ): void;
jump( index: number ): void;
translate( position: number ): void;
cancel(): void;
shift(): void;
trim( position: number ): number;
toIndex( index: number ): number;
toCoord( position: number ): Coordinates;
toPosition( index: number ): number;
toIndex( index: number ): number;
offset(): number;
offset( index: number ): number;
}

@@ -603,0 +617,0 @@

@@ -155,3 +155,3 @@ /**

*/
go( control, wait = true ) {
go( control, wait = this.options.waitForTransition ) {
if ( this.State.is( STATES.IDLE ) || ( this.State.is( STATES.MOVING ) && ! wait ) ) {

@@ -158,0 +158,0 @@ this.Components.Controller.go( control, false );

@@ -31,12 +31,24 @@ /**

*
* @return {Element|null} - A found element on success. Null on failure.
* @return {Element|undefined} - A found element on success or undefined on failure.
*/
export function child( parent, tagOrClassName ) {
return children( parent, tagOrClassName )[0];
}
/**
* Return chile elements that matches the provided tag or class name.
*
* @param {Element} parent - A parent element.
* @param {string} tagOrClassName - A tag or class name.
*
* @return {Element[]} - Found elements.
*/
export function children( parent, tagOrClassName ) {
if ( parent ) {
return values( parent.children ).filter( child => {
return hasClass( child, tagOrClassName.split( ' ' )[0] ) || child.tagName === tagOrClassName;
} )[0] || null;
} );
}
return null;
return [];
}

@@ -216,2 +228,13 @@

/**
* Return the Rect object of the provided object.
*
* @param {Element} elm - An element.
*
* @return {ClientRect|DOMRect} - A rect object.
*/
export function getRect( elm ) {
return elm.getBoundingClientRect();
}
/**
* Trigger the given callback after all images contained by the element are loaded.

@@ -218,0 +241,0 @@ *

@@ -101,3 +101,3 @@ /**

return value;
return +value || 0;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc