react-slick
Advanced tools
Comparing version 0.22.3 to 0.23.0
@@ -1,7 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.Slider=t(require("react"),require("react-dom")):e.Slider=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1),o=r(i);t.default=o.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(3),d=n(20),p=r(d),f=n(6),h=r(f),v=n(22),y=r(v),g=y.default&&n(23),m=function(e){function t(n){i(this,t);var r=o(this,e.call(this,n));return r.innerSliderRefHandler=function(e){return r.innerSlider=e},r.slickPrev=function(){return r.innerSlider.slickPrev()},r.slickNext=function(){return r.innerSlider.slickNext()},r.slickGoTo=function(e){return r.innerSlider.slickGoTo(e)},r.slickPause=function(){return r.innerSlider.pause("paused")},r.slickPlay=function(){return r.innerSlider.autoPlay("play")},r.state={breakpoint:null},r._responsiveMediaHandlers=[],r}return s(t,e),t.prototype.media=function(e,t){g.register(e,t),this._responsiveMediaHandlers.push({query:e,handler:t})},t.prototype.componentWillMount=function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map(function(e){return e.breakpoint});t.sort(function(e,t){return e-t}),t.forEach(function(n,r){var i=void 0;i=0===r?(0,p.default)({minWidth:0,maxWidth:n}):(0,p.default)({minWidth:t[r-1]+1,maxWidth:n}),y.default&&e.media(i,function(){e.setState({breakpoint:n})})});var n=(0,p.default)({minWidth:t.slice(-1)[0]});y.default&&this.media(n,function(){e.setState({breakpoint:null})})}},t.prototype.componentWillUnmount=function(){this._responsiveMediaHandlers.forEach(function(e){g.unregister(e.query,e.handler)})},t.prototype.render=function(){var e,t,n=this;this.state.breakpoint?(t=this.props.responsive.filter(function(e){return e.breakpoint===n.state.breakpoint}),e="unslick"===t[0].settings?"unslick":a({},h.default,this.props,t[0].settings)):e=a({},h.default,this.props),e.centerMode&&(e.slidesToScroll>1&&console.warn("slidesToScroll should be equal to 1 in centerMode, you are using "+e.slidesToScroll),e.slidesToScroll=1),e.fade&&(e.slidesToShow>1&&console.warn("slidesToShow should be equal to 1 when fade is true, you're using "+e.slidesToShow),e.slidesToScroll>1&&console.warn("slidesToScroll should be equal to 1 when fade is true, you're using "+e.slidesToScroll),e.slidesToShow=1,e.slidesToScroll=1);var r=c.default.Children.toArray(this.props.children);if(r=r.filter(function(e){return"string"==typeof e?!!e.trim():!!e}),"unslick"===e){var i="regular slider "+(this.props.className||"");return c.default.createElement("div",{className:i},r)}return r.length<=e.slidesToShow&&(e.unslick=!0),c.default.createElement(u.InnerSlider,a({ref:this.innerSliderRefHandler},e),r)},t}(c.default.Component);t.default=m},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.InnerSlider=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(2),u=r(c),d=n(4),p=r(d),f=n(5),h=r(f),v=n(6),y=(r(v),n(7)),g=(r(y),n(14)),m=r(g),w=n(15),S=n(16),b=n(17),_=n(18),E=n(19),k=r(E);t.InnerSlider=function(e){function t(n){o(this,t);var r=s(this,e.call(this,n));return r.listRefHandler=function(e){return r.list=e},r.trackRefHandler=function(e){return r.track=e},r.adaptHeight=function(){if(r.props.adaptiveHeight&&r.list){var e=r.list.querySelector('[data-index="'+r.state.currentSlide+'"]');r.list.style.height=(0,w.getHeight)(e)+"px"}},r.componentWillMount=function(){if(r.props.onInit&&r.props.onInit(),r.props.lazyLoad){var e=(0,w.getOnDemandLazySlides)(l({},r.props,r.state));e.length>0&&(r.setState(function(t,n){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),r.props.onLazyLoad&&r.props.onLazyLoad(e))}},r.componentDidMount=function(){var e=l({listRef:r.list,trackRef:r.track},r.props);r.updateState(e,!0,function(){r.adaptHeight(),r.props.autoplay&&r.autoPlay("update")}),"progressive"===r.props.lazyLoad&&(r.lazyLoadTimer=setInterval(r.progressiveLazyLoad,1e3)),r.ro=new k.default(function(e){return r.onWindowResized()}),r.ro.observe(r.list),Array.from(document.querySelectorAll(".slick-slide")).forEach(function(e){e.onfocus=r.props.pauseOnFocus?r.onSlideFocus:null,e.onblur=r.props.pauseOnFocus?r.onSlideBlur:null}),window&&(window.addEventListener?window.addEventListener("resize",r.onWindowResized):window.attachEvent("onresize",r.onWindowResized))},r.componentWillUnmount=function(){r.animationEndCallback&&clearTimeout(r.animationEndCallback),r.lazyLoadTimer&&clearInterval(r.lazyLoadTimer),r.callbackTimers.length&&(r.callbackTimers.forEach(function(e){return clearTimeout(e)}),r.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",r.onWindowResized):window.detachEvent("onresize",r.onWindowResized),r.autoplayTimer&&clearInterval(r.autoplayTimer)},r.componentWillReceiveProps=function(e){var t=l({listRef:r.list,trackRef:r.track},e,r.state);r.updateState(t,!1,function(){r.state.currentSlide>=u.default.Children.count(e.children)&&r.changeSlide({message:"index",index:u.default.Children.count(e.children)-e.slidesToShow,currentSlide:r.state.currentSlide}),e.autoplay?r.autoPlay("update"):r.pause("paused")})},r.componentDidUpdate=function(){if(r.checkImagesLoad(),r.props.onReInit&&r.props.onReInit(),r.props.lazyLoad){var e=(0,w.getOnDemandLazySlides)(l({},r.props,r.state));e.length>0&&(r.setState(function(t,n){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),r.props.onLazyLoad&&r.props.onLazyLoad(e))}r.adaptHeight()},r.onWindowResized=function(){if(p.default.findDOMNode(r.track)){var e=l({listRef:r.list,trackRef:r.track},r.props,r.state);r.updateState(e,!0,function(){r.props.autoplay?r.autoPlay("update"):r.pause("paused")}),r.setState({animating:!1}),clearTimeout(r.animationEndCallback),delete r.animationEndCallback}},r.updateState=function(e,t,n){var i=(0,w.initializedState)(e);e=l({},e,i,{slideIndex:i.currentSlide});var o=(0,w.getTrackLeft)(e);e=l({},e,{left:o});var s=(0,w.getTrackCSS)(e);(t||u.default.Children.count(r.props.children)!==u.default.Children.count(e.children))&&(i.trackStyle=s),r.setState(i,n)},r.checkImagesLoad=function(){var e=document.querySelectorAll(".slick-slide img"),t=e.length,n=0;Array.from(e).forEach(function(e){var i=function(){return++n&&n>=t&&r.onWindowResized()};if(e.onclick){var o=e.onclick;e.onclick=function(){o(),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(r.props.lazyLoad?e.onload=function(){r.adaptHeight(),r.callbackTimers.push(setTimeout(r.onWindowResized,r.props.speed))}:(e.onload=i,e.onerror=function(){i(),r.props.onLazyLoadError&&r.props.onLazyLoadError()}))})},r.progressiveLazyLoad=function(){for(var e=[],t=l({},r.props,r.state),n=r.state.currentSlide;n<r.state.slideCount+(0,w.getPostClones)(t);n++)if(r.state.lazyLoadedList.indexOf(n)<0){e.push(n);break}for(var i=r.state.currentSlide-1;i>=-(0,w.getPreClones)(t);i--)if(r.state.lazyLoadedList.indexOf(i)<0){e.push(i);break}e.length>0?(r.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),r.props.onLazyLoad&&r.props.onLazyLoad(e)):r.lazyLoadTimer&&(clearInterval(r.lazyLoadTimer),delete r.lazyLoadTimer)},r.slideHandler=function(e){var t=r.props,n=t.asNavFor,o=t.currentSlide,s=t.beforeChange,a=t.onLazyLoad,c=t.speed,u=t.afterChange,d=(0,w.slideHandler)(l({index:e},r.props,r.state,{trackRef:r.track})),p=d.state,f=d.nextState;if(p){s&&s(o,p.currentSlide);var h=p.lazyLoadedList.filter(function(e){return r.state.lazyLoadedList.indexOf(e)<0});a&&h.length>0&&a(h),r.setState(p,function(){n&&n.innerSlider.state.currentSlide!==o&&n.innerSlider.slideHandler(e),r.animationEndCallback=setTimeout(function(){var e=f.animating,t=i(f,["animating"]);r.setState(t,function(){r.callbackTimers.push(setTimeout(function(){return r.setState({animating:e})},10)),u&&u(p.currentSlide),delete r.animationEndCallback})},c)})}},r.changeSlide=function(e){var t=l({},r.props,r.state),n=(0,w.changeSlide)(t,e);(0===n||n)&&r.slideHandler(n)},r.keyHandler=function(e){var t=(0,w.keyHandler)(e,r.props.accessibility,r.props.rtl);""!==t&&r.changeSlide({message:t})},r.selectHandler=function(e){r.changeSlide(e)},r.swipeStart=function(e){var t=(0,w.swipeStart)(e,r.props.swipe,r.props.draggable);""!==t&&r.setState(t)},r.swipeMove=function(e){var t=(0,w.swipeMove)(e,l({},r.props,r.state,{trackRef:r.track,listRef:r.list,slideIndex:r.state.currentSlide}));t&&r.setState(t)},r.swipeEnd=function(e){var t=(0,w.swipeEnd)(e,l({},r.props,r.state,{trackRef:r.track,listRef:r.list,slideIndex:r.state.currentSlide}));if(t){var n=t.triggerSlideHandler;delete t.triggerSlideHandler,r.setState(t),void 0!==n&&r.slideHandler(n)}},r.slickPrev=function(){r.callbackTimers.push(setTimeout(function(){return r.changeSlide({message:"previous"})},0))},r.slickNext=function(){r.callbackTimers.push(setTimeout(function(){return r.changeSlide({message:"next"})},0))},r.slickGoTo=function(e){return e=Number(e),isNaN(e)?"":void r.callbackTimers.push(setTimeout(function(){return r.changeSlide({message:"index",index:e,currentSlide:r.state.currentSlide})},0))},r.play=function(){var e;if(r.props.rtl)e=r.state.currentSlide-r.props.slidesToScroll;else{if(!(0,w.canGoNext)(l({},r.props,r.state)))return!1;e=r.state.currentSlide+r.props.slidesToScroll}r.slideHandler(e)},r.autoPlay=function(e){r.autoplayTimer&&(console.warn("autoPlay is triggered more than once"),clearInterval(r.autoplayTimer));var t=r.state.autoplaying;if("update"===e){if("hovered"===t||"focused"===t||"paused"===t)return}else if("leave"===e){if("paused"===t||"focused"===t)return}else if("blur"===e&&("paused"===t||"hovered"===t))return;r.autoplayTimer=setInterval(r.play,r.props.autoplaySpeed+50),r.setState({autoplaying:"playing"})},r.pause=function(e){r.autoplayTimer&&(clearInterval(r.autoplayTimer),r.autoplayTimer=null);var t=r.state.autoplaying;"paused"===e?r.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==t&&"playing"!==t||r.setState({autoplaying:"focused"}):"playing"===t&&r.setState({autoplaying:"hovered"})},r.onDotsOver=function(e){return r.props.autoplay&&r.pause("hovered")},r.onDotsLeave=function(e){return r.props.autoplay&&"hovered"===r.state.autoplaying&&r.autoPlay("leave")},r.onTrackOver=function(e){return r.props.autoplay&&r.pause("hovered")},r.onTrackLeave=function(e){return r.props.autoplay&&"hovered"===r.state.autoplaying&&r.autoPlay("leave")},r.onSlideFocus=function(e){return r.props.autoplay&&r.pause("focused")},r.onSlideBlur=function(e){return r.props.autoplay&&"focused"===r.state.autoplaying&&r.autoPlay("blur")},r.render=function(){var e=(0,m.default)("regular","slider","slick-initialized","slick-slider",r.props.className,{"slick-vertical":r.props.vertical}),t=l({},r.props,r.state),n=(0,w.extractObject)(t,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding"]),i=r.props.pauseOnHover;n=l({},n,{onMouseEnter:i?r.onTrackOver:null,onMouseLeave:i?r.onTrackLeave:null,onMouseOver:i?r.onTrackOver:null,focusOnSelect:r.props.focusOnSelect?r.selectHandler:null});var o;if(r.props.dots===!0&&r.state.slideCount>=r.props.slidesToShow){var s=(0,w.extractObject)(t,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),a=r.props.pauseOnDotsHover;s=l({},s,{clickHandler:r.changeSlide,onMouseEnter:a?r.onDotsLeave:null,onMouseOver:a?r.onDotsOver:null,onMouseLeave:a?r.onDotsLeave:null}),o=u.default.createElement(b.Dots,s)}var c,d,p=(0,w.extractObject)(t,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);p.clickHandler=r.changeSlide,r.props.arrows&&(c=u.default.createElement(_.PrevArrow,p),d=u.default.createElement(_.NextArrow,p));var f=null;r.props.vertical&&(f={height:r.state.listHeight});var h=null;r.props.vertical===!1?r.props.centerMode===!0&&(h={padding:"0px "+r.props.centerPadding}):r.props.centerMode===!0&&(h={padding:r.props.centerPadding+" 0px"});var v=l({},f,h),y=r.props.touchMove,g={className:"slick-list",style:v,onMouseDown:y?r.swipeStart:null,onMouseMove:r.state.dragging&&y?r.swipeMove:null,onMouseUp:y?r.swipeEnd:null,onMouseLeave:r.state.dragging&&y?r.swipeEnd:null,onTouchStart:y?r.swipeStart:null,onTouchMove:r.state.dragging&&y?r.swipeMove:null,onTouchEnd:y?r.swipeEnd:null,onTouchCancel:r.state.dragging&&y?r.swipeEnd:null,onKeyDown:r.props.accessibility?r.keyHandler:null},E={className:e,dir:"ltr"};return r.props.unslick&&(g={className:"slick-list"},E={className:e}),u.default.createElement("div",E,r.props.unslick?"":c,u.default.createElement("div",l({ref:r.listRefHandler},g),u.default.createElement(S.Track,l({ref:r.trackRefHandler},n),r.props.children)),r.props.unslick?"":d,r.props.unslick?"":o)},r.list=null,r.track=null,r.state=l({},h.default,{currentSlide:r.props.initialSlide}),r.callbackTimers=[],r}return a(t,e),t}(u.default.Component)},function(e,n){e.exports=t},function(e,t){"use strict";t.__esModule=!0;var n={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0};t.default=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(2),o=r(i),s={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return o.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return o.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rtl:!1,slide:"div",slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0};t.default=s},function(e,t,n){"use strict";var r=n(2),i=n(8);if("undefined"==typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,o)},function(e,t,n){"use strict";function r(e){return e}function i(e,t,n){function i(e,t,n){for(var r in t)t.hasOwnProperty(r)&&c("function"==typeof t[r],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",o[n],r)}function d(e,t){var n=b.hasOwnProperty(t)?b[t]:null;T.hasOwnProperty(t)&&l("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&l("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function p(e,n){if(!n){var r=typeof n,i="object"===r&&null!==n;return void c(i,"%s: You're attempting to include a mixin that is either null or not an object. Check the mixins included by the component, as well as any mixins they include themselves. Expected object but got %s.",e.displayName||"ReactClass",null===n?null:r)}l("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),l(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var o=e.prototype,s=o.__reactAutoBindPairs;n.hasOwnProperty(u)&&_.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==u){var p=n[a],f=o.hasOwnProperty(a);if(d(f,a),_.hasOwnProperty(a))_[a](e,p);else{var h=b.hasOwnProperty(a),g="function"==typeof p,m=g&&!h&&!f&&n.autobind!==!1;if(m)s.push(a,p),o[a]=p;else if(f){var w=b[a];l(h&&("DEFINE_MANY_MERGED"===w||"DEFINE_MANY"===w),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",w,a),"DEFINE_MANY_MERGED"===w?o[a]=v(o[a],p):"DEFINE_MANY"===w&&(o[a]=y(o[a],p))}else o[a]=p,"function"==typeof p&&n.displayName&&(o[a].displayName=n.displayName+"_"+a)}}}function f(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in _;l(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var o=n in e;l(!o,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=r}}}function h(e,t){l(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(l(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function v(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return h(i,n),h(i,r),i}}function y(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function g(e,t){var n=t.bind(e);n.__reactBoundContext=e,n.__reactBoundMethod=t,n.__reactBoundArguments=null;var r=e.constructor.displayName,i=n.bind;return n.bind=function(o){for(var s=arguments.length,a=Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];if(o!==e&&null!==o)c(!1,"bind(): React component methods may only be bound to the component instance. See %s",r);else if(!a.length)return c(!1,"bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See %s",r),n;var u=i.apply(n,arguments);return u.__reactBoundContext=e,u.__reactBoundMethod=t,u.__reactBoundArguments=a,u},n}function m(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=g(e,i)}}function w(e){var t=r(function(e,r,i){c(this instanceof t,"Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory"),this.__reactAutoBindPairs.length&&m(this),this.props=e,this.context=r,this.refs=a,this.updater=i||n,this.state=null;var o=this.getInitialState?this.getInitialState():null;void 0===o&&this.getInitialState._isMockFunction&&(o=null),l("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=o});t.prototype=new x,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],S.forEach(p.bind(null,t)),p(t,E),p(t,e),p(t,k),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved={}),t.prototype.getInitialState&&(t.prototype.getInitialState.isReactClassApproved={}),l(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),c(!t.prototype.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",e.displayName||"A component"),c(!t.prototype.componentWillRecieveProps,"%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",e.displayName||"A component");for(var i in b)t.prototype[i]||(t.prototype[i]=null);return t}var S=[],b={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},_={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)p(e,t[n])},childContextTypes:function(e,t){i(e,t,"childContext"),e.childContextTypes=s({},e.childContextTypes,t)},contextTypes:function(e,t){i(e,t,"context"),e.contextTypes=s({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=v(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){i(e,t,"prop"),e.propTypes=s({},e.propTypes,t)},statics:function(e,t){f(e,t)},autobind:function(){}},E={componentDidMount:function(){this.__isMounted=!0}},k={componentWillUnmount:function(){this.__isMounted=!1}},T={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return c(this.__didWarnIsMounted,"%s: isMounted is deprecated. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.",this.constructor&&this.constructor.displayName||this.name||"Component"),this.__didWarnIsMounted=!0,!!this.__isMounted}},x=function(){};return s(x.prototype,e.prototype,T),w}var o,s=n(9),a=n(10),l=n(11),c=n(12),u="mixins";o={prop:"prop",context:"context",childContext:"child context"},e.exports=i},function(e,t){/* | ||
object-assign | ||
(c) Sindre Sorhus | ||
@license MIT | ||
*/ | ||
"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}var i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,l=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var u in r)o.call(r,u)&&(l[u]=r[u]);if(i){a=i(r);for(var d=0;d<a.length;d++)s.call(r,a[d])&&(l[a[d]]=r[a[d]])}}return l}},function(e,t,n){"use strict";var r={};Object.freeze(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,o,s,a,l){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,s,a,l],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};i=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")},e.exports=r},function(e,t,n){"use strict";var r=n(13),i=r,o=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});"undefined"!=typeof console&&console.error(o);try{throw new Error(o)}catch(e){}};i=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];o.apply(void 0,[t].concat(r))}},e.exports=i},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){var r,i;/*! | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.Slider=t(require("react"),require("react-dom")):e.Slider=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1),o=r(i);t.default=o.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(3),d=n(13),p=r(d),f=n(15),h=r(f),v=n(8),y=(0,v.canUseDOM)()&&n(16),g=function(e){function t(n){i(this,t);var r=o(this,e.call(this,n));return r.innerSliderRefHandler=function(e){return r.innerSlider=e},r.slickPrev=function(){return r.innerSlider.slickPrev()},r.slickNext=function(){return r.innerSlider.slickNext()},r.slickGoTo=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return r.innerSlider.slickGoTo(e,t)},r.slickPause=function(){return r.innerSlider.pause("paused")},r.slickPlay=function(){return r.innerSlider.autoPlay("play")},r.state={breakpoint:null},r._responsiveMediaHandlers=[],r}return s(t,e),t.prototype.media=function(e,t){y.register(e,t),this._responsiveMediaHandlers.push({query:e,handler:t})},t.prototype.componentWillMount=function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map(function(e){return e.breakpoint});t.sort(function(e,t){return e-t}),t.forEach(function(n,r){var i=void 0;i=0===r?(0,p.default)({minWidth:0,maxWidth:n}):(0,p.default)({minWidth:t[r-1]+1,maxWidth:n}),(0,v.canUseDOM)()&&e.media(i,function(){e.setState({breakpoint:n})})});var n=(0,p.default)({minWidth:t.slice(-1)[0]});(0,v.canUseDOM)()&&this.media(n,function(){e.setState({breakpoint:null})})}},t.prototype.componentWillUnmount=function(){this._responsiveMediaHandlers.forEach(function(e){y.unregister(e.query,e.handler)})},t.prototype.render=function(){var e,t,n=this;this.state.breakpoint?(t=this.props.responsive.filter(function(e){return e.breakpoint===n.state.breakpoint}),e="unslick"===t[0].settings?"unslick":a({},h.default,this.props,t[0].settings)):e=a({},h.default,this.props),e.centerMode&&(e.slidesToScroll>1&&console.warn("slidesToScroll should be equal to 1 in centerMode, you are using "+e.slidesToScroll),e.slidesToScroll=1),e.fade&&(e.slidesToShow>1&&console.warn("slidesToShow should be equal to 1 when fade is true, you're using "+e.slidesToShow),e.slidesToScroll>1&&console.warn("slidesToScroll should be equal to 1 when fade is true, you're using "+e.slidesToScroll),e.slidesToShow=1,e.slidesToScroll=1);var r=c.default.Children.toArray(this.props.children);r=r.filter(function(e){return"string"==typeof e?!!e.trim():!!e}),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var i=[],o=null,s=0;s<r.length;s+=e.rows*e.slidesPerRow){for(var l=[],d=s;d<s+e.rows*e.slidesPerRow;d+=e.slidesPerRow){for(var p=[],f=d;f<d+e.slidesPerRow&&(e.variableWidth&&r[f].props.style&&(o=r[f].props.style.width),!(f>=r.length));f+=1)p.push(c.default.cloneElement(r[f],{key:100*s+10*d+f,tabIndex:-1,style:{width:100/e.slidesPerRow+"%",display:"inline-block"}}));l.push(c.default.createElement("div",{key:10*s+d},p))}e.variableWidth?i.push(c.default.createElement("div",{key:s,style:{width:o}},l)):i.push(c.default.createElement("div",{key:s},l))}if("unslick"===e){var v="regular slider "+(this.props.className||"");return c.default.createElement("div",{className:v},i)}return i.length<=e.slidesToShow&&(e.unslick=!0),c.default.createElement(u.InnerSlider,a({ref:this.innerSliderRefHandler},e),i)},t}(c.default.Component);t.default=g},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.InnerSlider=void 0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(2),d=r(u),p=n(4),f=r(p),h=n(5),v=r(h),y=n(6),g=r(y),S=n(7),w=r(S),m=n(8),b=n(9),k=n(10),T=n(11),O=n(12),_=r(O);t.InnerSlider=function(e){function t(n){o(this,t);var r=s(this,e.call(this,n));return r.listRefHandler=function(e){return r.list=e},r.trackRefHandler=function(e){return r.track=e},r.adaptHeight=function(){if(r.props.adaptiveHeight&&r.list){var e=r.list.querySelector('[data-index="'+r.state.currentSlide+'"]');r.list.style.height=(0,m.getHeight)(e)+"px"}},r.componentWillMount=function(){if(r.ssrInit(),r.props.onInit&&r.props.onInit(),r.props.lazyLoad){var e=(0,m.getOnDemandLazySlides)(c({},r.props,r.state));e.length>0&&(r.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),r.props.onLazyLoad&&r.props.onLazyLoad(e))}},r.componentDidMount=function(){var e=c({listRef:r.list,trackRef:r.track},r.props);r.updateState(e,!0,function(){r.adaptHeight(),r.props.autoplay&&r.autoPlay("update")}),"progressive"===r.props.lazyLoad&&(r.lazyLoadTimer=setInterval(r.progressiveLazyLoad,1e3)),r.ro=new _.default(function(){r.state.animating?(r.onWindowResized(!1),r.callbackTimers.push(setTimeout(function(){return r.onWindowResized()},r.props.speed))):r.onWindowResized()}),r.ro.observe(r.list),Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),function(e){e.onfocus=r.props.pauseOnFocus?r.onSlideFocus:null,e.onblur=r.props.pauseOnFocus?r.onSlideBlur:null}),window&&(window.addEventListener?window.addEventListener("resize",r.onWindowResized):window.attachEvent("onresize",r.onWindowResized))},r.componentWillUnmount=function(){r.animationEndCallback&&clearTimeout(r.animationEndCallback),r.lazyLoadTimer&&clearInterval(r.lazyLoadTimer),r.callbackTimers.length&&(r.callbackTimers.forEach(function(e){return clearTimeout(e)}),r.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",r.onWindowResized):window.detachEvent("onresize",r.onWindowResized),r.autoplayTimer&&clearInterval(r.autoplayTimer)},r.componentWillReceiveProps=function(e){for(var t=c({listRef:r.list,trackRef:r.track},e,r.state),n=!1,i=Object.keys(r.props),o=Array.isArray(i),s=0,i=o?i:i[Symbol.iterator]();;){var a;if(o){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var u=a;if(!e.hasOwnProperty(u)){n=!0;break}if("object"!==l(e[u])&&"function"!=typeof e[u]&&e[u]!==r.props[u]){n=!0;break}}r.updateState(t,n,function(){r.state.currentSlide>=d.default.Children.count(e.children)&&r.changeSlide({message:"index",index:d.default.Children.count(e.children)-e.slidesToShow,currentSlide:r.state.currentSlide}),e.autoplay?r.autoPlay("update"):r.pause("paused")})},r.componentDidUpdate=function(){if(r.checkImagesLoad(),r.props.onReInit&&r.props.onReInit(),r.props.lazyLoad){var e=(0,m.getOnDemandLazySlides)(c({},r.props,r.state));e.length>0&&(r.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),r.props.onLazyLoad&&r.props.onLazyLoad(e))}r.adaptHeight()},r.onWindowResized=function(e){r.debouncedResize&&r.debouncedResize.cancel(),r.debouncedResize=(0,g.default)(function(){return r.resizeWindow(e)},50),r.debouncedResize()},r.resizeWindow=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(f.default.findDOMNode(r.track)){var t=c({listRef:r.list,trackRef:r.track},r.props,r.state);r.updateState(t,e,function(){r.props.autoplay?r.autoPlay("update"):r.pause("paused")}),r.setState({animating:!1}),clearTimeout(r.animationEndCallback),delete r.animationEndCallback}},r.updateState=function(e,t,n){var i=(0,m.initializedState)(e);e=c({},e,i,{slideIndex:i.currentSlide});var o=(0,m.getTrackLeft)(e);e=c({},e,{left:o});var s=(0,m.getTrackCSS)(e);(t||d.default.Children.count(r.props.children)!==d.default.Children.count(e.children))&&(i.trackStyle=s),r.setState(i,n)},r.ssrInit=function(){if(r.props.variableWidth){var e=0,t=0,n=[],i=(0,m.getPreClones)(c({},r.props,r.state,{slideCount:r.props.children.length})),o=(0,m.getPostClones)(c({},r.props,r.state,{slideCount:r.props.children.length}));r.props.children.forEach(function(t){n.push(t.props.style.width),e+=t.props.style.width});for(var s=0;s<i;s++)t+=n[n.length-1-s],e+=n[n.length-1-s];for(var a=0;a<o;a++)e+=n[a];for(var l=0;l<r.state.currentSlide;l++)t+=n[l];var u={width:e+"px",left:-t+"px"};if(r.props.centerMode){var p=n[r.state.currentSlide]+"px";u.left="calc("+u.left+" + (100% - "+p+") / 2 ) "}return void r.setState({trackStyle:u})}var f=d.default.Children.count(r.props.children),h=c({},r.props,r.state,{slideCount:f}),v=(0,m.getPreClones)(h)+(0,m.getPostClones)(h)+f,y=100/r.props.slidesToShow*v,g=100/v,S=-g*((0,m.getPreClones)(h)+r.state.currentSlide)*y/100;r.props.centerMode&&(S+=(100-g*y/100)/2);var w={width:y+"%",left:S+"%"};r.setState({slideWidth:g+"%",trackStyle:w})},r.checkImagesLoad=function(){var e=document.querySelectorAll(".slick-slide img"),t=e.length,n=0;Array.prototype.forEach.call(e,function(e){var i=function(){return++n&&n>=t&&r.onWindowResized()};if(e.onclick){var o=e.onclick;e.onclick=function(){o(),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(r.props.lazyLoad?e.onload=function(){r.adaptHeight(),r.callbackTimers.push(setTimeout(r.onWindowResized,r.props.speed))}:(e.onload=i,e.onerror=function(){i(),r.props.onLazyLoadError&&r.props.onLazyLoadError()}))})},r.progressiveLazyLoad=function(){for(var e=[],t=c({},r.props,r.state),n=r.state.currentSlide;n<r.state.slideCount+(0,m.getPostClones)(t);n++)if(r.state.lazyLoadedList.indexOf(n)<0){e.push(n);break}for(var i=r.state.currentSlide-1;i>=-(0,m.getPreClones)(t);i--)if(r.state.lazyLoadedList.indexOf(i)<0){e.push(i);break}e.length>0?(r.setState(function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}}),r.props.onLazyLoad&&r.props.onLazyLoad(e)):r.lazyLoadTimer&&(clearInterval(r.lazyLoadTimer),delete r.lazyLoadTimer)},r.slideHandler=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=r.props,o=n.asNavFor,s=n.currentSlide,a=n.beforeChange,l=n.onLazyLoad,u=n.speed,d=n.afterChange,p=(0,m.slideHandler)(c({index:e},r.props,r.state,{trackRef:r.track,useCSS:r.props.useCSS&&!t})),f=p.state,h=p.nextState;if(f){a&&a(s,f.currentSlide);var v=f.lazyLoadedList.filter(function(e){return r.state.lazyLoadedList.indexOf(e)<0});l&&v.length>0&&l(v),r.setState(f,function(){o&&o.innerSlider.state.currentSlide!==s&&o.innerSlider.slideHandler(e),h&&(r.animationEndCallback=setTimeout(function(){var e=h.animating,t=i(h,["animating"]);r.setState(t,function(){r.callbackTimers.push(setTimeout(function(){return r.setState({animating:e})},10)),d&&d(f.currentSlide),delete r.animationEndCallback})},u))})}},r.changeSlide=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=c({},r.props,r.state),i=(0,m.changeSlide)(n,e);(0===i||i)&&(t===!0?r.slideHandler(i,t):r.slideHandler(i))},r.clickHandler=function(e){r.clickable===!1&&(e.stopPropagation(),e.preventDefault()),r.clickable=!0},r.keyHandler=function(e){var t=(0,m.keyHandler)(e,r.props.accessibility,r.props.rtl);""!==t&&r.changeSlide({message:t})},r.selectHandler=function(e){r.changeSlide(e)},r.disableBodyScroll=function(){var e=function(e){e=e||window.event,e.preventDefault&&e.preventDefault(),e.returnValue=!1};window.ontouchmove=e},r.enableBodyScroll=function(){window.ontouchmove=null},r.swipeStart=function(e){r.props.verticalSwiping&&r.disableBodyScroll();var t=(0,m.swipeStart)(e,r.props.swipe,r.props.draggable);""!==t&&r.setState(t)},r.swipeMove=function(e){var t=(0,m.swipeMove)(e,c({},r.props,r.state,{trackRef:r.track,listRef:r.list,slideIndex:r.state.currentSlide}));t&&(t.swiping&&(r.clickable=!1),r.setState(t))},r.swipeEnd=function(e){var t=(0,m.swipeEnd)(e,c({},r.props,r.state,{trackRef:r.track,listRef:r.list,slideIndex:r.state.currentSlide}));if(t){var n=t.triggerSlideHandler;delete t.triggerSlideHandler,r.setState(t),void 0!==n&&(r.slideHandler(n),r.props.verticalSwiping&&r.enableBodyScroll())}},r.slickPrev=function(){r.callbackTimers.push(setTimeout(function(){return r.changeSlide({message:"previous"})},0))},r.slickNext=function(){r.callbackTimers.push(setTimeout(function(){return r.changeSlide({message:"next"})},0))},r.slickGoTo=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e=Number(e),isNaN(e)?"":void r.callbackTimers.push(setTimeout(function(){return r.changeSlide({message:"index",index:e,currentSlide:r.state.currentSlide},t)},0))},r.play=function(){var e;if(r.props.rtl)e=r.state.currentSlide-r.props.slidesToScroll;else{if(!(0,m.canGoNext)(c({},r.props,r.state)))return!1;e=r.state.currentSlide+r.props.slidesToScroll}r.slideHandler(e)},r.autoPlay=function(e){r.autoplayTimer&&clearInterval(r.autoplayTimer);var t=r.state.autoplaying;if("update"===e){if("hovered"===t||"focused"===t||"paused"===t)return}else if("leave"===e){if("paused"===t||"focused"===t)return}else if("blur"===e&&("paused"===t||"hovered"===t))return;r.autoplayTimer=setInterval(r.play,r.props.autoplaySpeed+50),r.setState({autoplaying:"playing"})},r.pause=function(e){r.autoplayTimer&&(clearInterval(r.autoplayTimer),r.autoplayTimer=null);var t=r.state.autoplaying;"paused"===e?r.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==t&&"playing"!==t||r.setState({autoplaying:"focused"}):"playing"===t&&r.setState({autoplaying:"hovered"})},r.onDotsOver=function(){return r.props.autoplay&&r.pause("hovered")},r.onDotsLeave=function(){return r.props.autoplay&&"hovered"===r.state.autoplaying&&r.autoPlay("leave")},r.onTrackOver=function(){return r.props.autoplay&&r.pause("hovered")},r.onTrackLeave=function(){return r.props.autoplay&&"hovered"===r.state.autoplaying&&r.autoPlay("leave")},r.onSlideFocus=function(){return r.props.autoplay&&r.pause("focused")},r.onSlideBlur=function(){return r.props.autoplay&&"focused"===r.state.autoplaying&&r.autoPlay("blur")},r.render=function(){var e=(0,w.default)("slick-slider",r.props.className,{"slick-vertical":r.props.vertical,"slick-initialized":(0,m.canUseDOM)()}),t=c({},r.props,r.state),n=(0,m.extractObject)(t,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding"]),i=r.props.pauseOnHover;n=c({},n,{onMouseEnter:i?r.onTrackOver:null,onMouseLeave:i?r.onTrackLeave:null,onMouseOver:i?r.onTrackOver:null,focusOnSelect:r.props.focusOnSelect?r.selectHandler:null});var o;if(r.props.dots===!0&&r.state.slideCount>=r.props.slidesToShow){var s=(0,m.extractObject)(t,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),a=r.props.pauseOnDotsHover;s=c({},s,{clickHandler:r.changeSlide,onMouseEnter:a?r.onDotsLeave:null,onMouseOver:a?r.onDotsOver:null,onMouseLeave:a?r.onDotsLeave:null}),o=d.default.createElement(k.Dots,s)}var l,u,p=(0,m.extractObject)(t,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);p.clickHandler=r.changeSlide,r.props.arrows&&(l=d.default.createElement(T.PrevArrow,p),u=d.default.createElement(T.NextArrow,p));var f=null;r.props.vertical&&(f={height:r.state.listHeight});var h=null;r.props.vertical===!1?r.props.centerMode===!0&&(h={padding:"0px "+r.props.centerPadding}):r.props.centerMode===!0&&(h={padding:r.props.centerPadding+" 0px"});var v=c({},f,h),y=r.props.touchMove,g={className:"slick-list",style:v,onClick:r.clickHandler,onMouseDown:y?r.swipeStart:null,onMouseMove:r.state.dragging&&y?r.swipeMove:null,onMouseUp:y?r.swipeEnd:null,onMouseLeave:r.state.dragging&&y?r.swipeEnd:null,onTouchStart:y?r.swipeStart:null,onTouchMove:r.state.dragging&&y?r.swipeMove:null,onTouchEnd:y?r.swipeEnd:null,onTouchCancel:r.state.dragging&&y?r.swipeEnd:null,onKeyDown:r.props.accessibility?r.keyHandler:null},S={className:e,dir:"ltr"};return r.props.unslick&&(g={className:"slick-list"},S={className:e}),d.default.createElement("div",S,r.props.unslick?"":l,d.default.createElement("div",c({ref:r.listRefHandler},g),d.default.createElement(b.Track,c({ref:r.trackRefHandler},n),r.props.children)),r.props.unslick?"":u,r.props.unslick?"":o)},r.list=null,r.track=null,r.state=c({},v.default,{currentSlide:r.props.initialSlide,slideCount:d.default.Children.count(r.props.children)}),r.callbackTimers=[],r.clickable=!0,r.debouncedResize=null,r}return a(t,e),t}(d.default.Component)},function(e,n){e.exports=t},function(e,t){"use strict";t.__esModule=!0;var n={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0};t.default=n},function(e,t){(function(t){function n(e,t,n){function i(t){var n=v,r=y;return v=y=void 0,O=t,S=e.apply(r,n)}function o(e){return O=e,w=setTimeout(u,t),_?i(e):S}function l(e){var n=e-T,r=e-O,i=t-n;return x?b(i,g-r):i}function c(e){var n=e-T,r=e-O;return void 0===T||n>=t||n<0||x&&r>=g}function u(){var e=k();return c(e)?d(e):void(w=setTimeout(u,l(e)))}function d(e){return w=void 0,E&&v?i(e):(v=y=void 0,S)}function p(){void 0!==w&&clearTimeout(w),O=0,v=T=y=w=void 0}function f(){return void 0===w?S:d(k())}function h(){var e=k(),n=c(e);if(v=arguments,y=this,T=e,n){if(void 0===w)return o(T);if(x)return w=setTimeout(u,t),i(T)}return void 0===w&&(w=setTimeout(u,t)),S}var v,y,g,S,w,T,O=0,_=!1,x=!1,E=!0;if("function"!=typeof e)throw new TypeError(a);return t=s(t)||0,r(n)&&(_=!!n.leading,x="maxWait"in n,g=x?m(s(n.maxWait)||0,t):g,E="trailing"in n?!!n.trailing:E),h.cancel=p,h.flush=f,h}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function i(e){return!!e&&"object"==typeof e}function o(e){return"symbol"==typeof e||i(e)&&w.call(e)==c}function s(e){if("number"==typeof e)return e;if(o(e))return l;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(u,"");var n=p.test(e);return n||f.test(e)?h(e.slice(2),n?2:8):d.test(e)?l:+e}var a="Expected a function",l=NaN,c="[object Symbol]",u=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,f=/^0o[0-7]+$/i,h=parseInt,v="object"==typeof t&&t&&t.Object===Object&&t,y="object"==typeof self&&self&&self.Object===Object&&self,g=v||y||Function("return this")(),S=Object.prototype,w=S.toString,m=Math.max,b=Math.min,k=function(){return g.Date.now()};e.exports=n}).call(t,function(){return this}())},function(e,t,n){var r,i;/*! | ||
Copyright (c) 2016 Jed Watson. | ||
@@ -11,2 +6,2 @@ Licensed under the MIT License (MIT), see | ||
*/ | ||
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===i)for(var s in r)o.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],i=function(){return n}.apply(t,r),!(void 0!==i&&(e.exports=i)))}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.slidesOnLeft=t.slidesOnRight=t.siblingDirection=t.getTotalSlides=t.getPostClones=t.getPreClones=t.getTrackLeft=t.getTrackAnimateCSS=t.getTrackCSS=t.checkSpecKeys=t.getSlideCount=t.checkNavigable=t.getNavigableIndexes=t.swipeEnd=t.swipeMove=t.swipeStart=t.keyHandler=t.changeSlide=t.slideHandler=t.initializedState=t.extractObject=t.canGoNext=t.getSwipeDirection=t.getHeight=t.getWidth=t.lazySlidesOnRight=t.lazySlidesOnLeft=t.lazyEndIndex=t.lazyStartIndex=t.getRequiredLazySlides=t.getOnDemandLazySlides=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(2),s=r(o),a=n(4),l=r(a),c=t.getOnDemandLazySlides=function(e){for(var t=[],n=u(e),r=d(e),i=n;i<r;i++)e.lazyLoadedList.indexOf(i)<0&&t.push(i);return t},u=(t.getRequiredLazySlides=function(e){for(var t=[],n=u(e),r=d(e),i=n;i<r;i++)t.push(i);return t},t.lazyStartIndex=function(e){return e.currentSlide-p(e)}),d=t.lazyEndIndex=function(e){return e.currentSlide+f(e)},p=t.lazySlidesOnLeft=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0},f=t.lazySlidesOnRight=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow},h=t.getWidth=function(e){return e&&e.offsetWidth||0},v=t.getHeight=function(e){return e&&e.offsetHeight||0},y=t.getSwipeDirection=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,r=Math.atan2(n,t),i=Math.round(180*r/Math.PI),i<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":o===!0?i>=35&&i<=135?"up":"down":"vertical"},g=t.canGoNext=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1?t=!1:(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t},m=(t.extractObject=function(e,t){var n={};return t.forEach(function(t){return n[t]=e[t]}),n},t.initializedState=function(e){var t=s.default.Children.count(e.children),n=Math.ceil(h(l.default.findDOMNode(e.listRef))),r=Math.ceil(h(l.default.findDOMNode(e.trackRef))),i=void 0;if(e.vertical)i=n;else{var o=e.centerMode&&2*parseInt(e.centerPadding);"string"==typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(o*=n/100),i=Math.ceil((n-o)/e.slidesToShow)}var a=l.default.findDOMNode(e.listRef)&&v(l.default.findDOMNode(e.listRef).querySelector('[data-index="0"]')),u=a*e.slidesToShow,d=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(d=t-1-e.initialSlide);var p=e.lazyLoadedList||[],f=c({currentSlide:d,lazyLoadedList:p},e);p.concat(f);var y={slideCount:t,slideWidth:i,listWidth:n,trackWidth:r,currentSlide:d,slideHeight:a,listHeight:u,lazyLoadedList:p};return null===e.autoplaying&&e.autoplay&&(y.autoplaying="playing"),y},t.slideHandler=function(e){var t=e.waitForAnimate,n=e.animating,r=e.fade,o=e.infinite,s=e.index,a=e.slideCount,l=e.lazyLoadedList,u=e.lazyLoad,d=(e.onLazyLoad,e.asNavFor,e.currentSlide),p=(e.speed,e.centerMode),f=e.slidesToScroll,h=e.slidesToShow,v=e.useCSS;if(t&&n)return{};var y=s,m=void 0,w=void 0,S=void 0,b={},T={};if(r){if(!o&&(s<0||s>=a))return{};s<0?y=s+a:s>=a&&(y=s-a),u&&l.indexOf(y)<0&&l.push(y),b={animating:!0,currentSlide:y,lazyLoadedList:l},T={animating:!1}}else m=y,y<0?(m=y+a,o?a%f!==0&&(m=a-a%f):m=0):!g(e)&&y>d?y=m=d:p&&y>=a?(y=o?a:a-1,m=o?0:a-1):y>=a&&(m=y-a,o?a%f!==0&&(m=0):m=a-h),w=k(i({},e,{slideIndex:y})),S=k(i({},e,{slideIndex:m})),o||(w===S&&(y=m),w=S),u&&l.concat(c(i({},e,{currentSlide:y}))),v?(b={animating:!0,currentSlide:m,trackStyle:E(i({},e,{left:w})),lazyLoadedList:l},T={animating:!1,currentSlide:m,trackStyle:_(i({},e,{left:S})),swipeLeft:null}):b={currentSlide:m,trackStyle:_(i({},e,{left:S})),lazyLoadedList:l};return{state:b,nextState:T}},t.changeSlide=function(e,t){var n,r,o,s,a,l=e.slidesToScroll,c=e.slidesToShow,u=(e.centerMode,e.rtl,e.slideCount),d=e.currentSlide,p=e.lazyLoad,f=e.infinite;if(s=u%l!==0,n=s?0:(u-d)%l,"previous"===t.message)o=0===n?l:c-n,a=d-o,p&&!f&&(r=d-o,a=r===-1?u-1:r);else if("next"===t.message)o=0===n?l:n,a=d+o,p&&!f&&(a=(d+l)%u+n);else if("dots"===t.message){if(a=t.index*t.slidesToScroll,a===t.currentSlide)return null}else if("children"===t.message){if(a=t.index,a===t.currentSlide)return null;if(f){var h=M(i({},e,{targetSlide:a}));a>t.currentSlide&&"left"===h?a-=u:a<t.currentSlide&&"right"===h&&(a+=u)}}else if("index"===t.message&&(a=Number(t.index),a===t.currentSlide))return null;return a},t.keyHandler=function(e,t,n){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?n?"next":"previous":39===e.keyCode?n?"previous":"next":""},t.swipeStart=function(e,t,n){return"IMG"===e.target.tagName&&e.preventDefault(),!t||!n&&e.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}},t.swipeMove=function(e,t){var n=t.scrolling,r=t.animating,o=t.vertical,s=t.swipeToSlide,a=t.verticalSwiping,l=t.rtl,c=t.currentSlide,u=t.edgeFriction,d=t.edgeDragged,p=t.onEdge,f=t.swiped,h=t.swiping,v=t.slideCount,m=t.slidesToScroll,w=t.infinite,S=t.touchObject,b=t.swipeEvent,E=t.listHeight,T=t.listWidth;if(!n){if(r)return e.preventDefault();o&&s&&a&&e.preventDefault();var x=void 0,O={},M=k(t);S.curX=e.touches?e.touches[0].pageX:e.clientX,S.curY=e.touches?e.touches[0].pageY:e.clientY,S.swipeLength=Math.round(Math.sqrt(Math.pow(S.curX-S.startX,2)));var C=Math.round(Math.sqrt(Math.pow(S.curY-S.startY,2)));if(!a&&!h&&C>10)return{scrolling:!0};a&&(S.swipeLength=C);var L=(l?-1:1)*(S.curX>S.startX?1:-1);a&&(L=S.curY>S.startY?1:-1);var N=Math.ceil(v/m),D=y(t.touchObject,a),R=S.swipeLength;return w||(0===c&&"right"===D||c+1>=N&&"left"===D||!g(t)&&"left"===D)&&(R=S.swipeLength*u,d===!1&&p&&(p(D),O.edgeDragged=!0)),!f&&b&&(b(D),O.swiped=!0),x=o?M+R*(E/T)*L:l?M-R*L:M+R*L,a&&(x=M+R*L),O=i({},O,{touchObject:S,swipeLeft:x,trackStyle:_(i({},t,{left:x}))}),Math.abs(S.curX-S.startX)<.8*Math.abs(S.curY-S.startY)?O:(S.swipeLength>10&&(O.swiping=!0,e.preventDefault()),O)}},t.swipeEnd=function(e,t){var n=t.dragging,r=t.swipe,o=t.touchObject,s=t.listWidth,a=t.touchThreshold,l=t.verticalSwiping,c=t.listHeight,u=t.currentSlide,d=t.swipeToSlide,p=t.scrolling,f=t.onSwipe;if(!n)return r&&e.preventDefault(),{};var h=l?c/a:s/a,v=y(o,l),g={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(p)return g;if(!o.swipeLength)return g;if(o.swipeLength>h){e.preventDefault(),f&&f(v);var m=void 0,b=void 0;switch(v){case"left":case"up":b=u+S(t),m=d?w(t,b):b,g.currentDirection=0;break;case"right":case"down":b=u-S(t),m=d?w(t,b):b,g.currentDirection=1;break;default:m=u}g.triggerSlideHandler=m}else{var _=k(t);g.trackStyle=E(i({},t,{left:_}))}return g},t.getNavigableIndexes=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?e.slidesToShow*-1:0,r=e.infinite?e.slidesToShow*-1:0,i=[];n<t;)i.push(n),n=r+e.slidesToScroll,r+=Math.min(e.slidesToScroll,e.slidesToShow);return i}),w=t.checkNavigable=function(e,t){var n=m(e),r=0;if(t>n[n.length-1])t=n[n.length-1];else for(var i in n){if(t<n[i]){t=r;break}r=n[i]}return t},S=t.getSlideCount=function(e){var t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){var n=void 0,r=l.default.findDOMNode(e.listRef),i=r.querySelectorAll(".slick-slide");if(Array.from(i).every(function(r){if(e.vertical){if(r.offsetTop+v(r)/2>e.swipeLeft*-1)return n=r,!1}else if(r.offsetLeft-t+h(r)/2>e.swipeLeft*-1)return n=r,!1;return!0}),!n)return 0;var o=e.rtl===!0?e.slideCount-e.currentSlide:e.currentSlide,s=Math.abs(n.dataset.index-o)||1;return s}return e.slidesToScroll},b=t.checkSpecKeys=function(e,t){return t.reduce(function(t,n){return t&&e.hasOwnProperty(n)},!0)?null:console.error("Keys Missing:",e)},_=t.getTrackCSS=function(e){b(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var t=void 0,n=void 0,r=e.slideCount+2*e.slidesToShow;e.vertical?n=r*e.slideHeight:t=O(e)*e.slideWidth;var o={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var s=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";o=i({},o,{WebkitTransform:s,transform:a,msTransform:l})}else e.vertical?o.top=e.left:o.left=e.left;return e.fade&&(o={opacity:1}),t&&(o.width=t),n&&(o.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?o.marginTop=e.left+"px":o.marginLeft=e.left+"px"),o},E=t.getTrackAnimateCSS=function(e){b(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=_(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},k=t.getTrackLeft=function(e){if(e.unslick)return 0;b(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,r=e.slideIndex,i=e.trackRef,o=e.infinite,s=e.centerMode,a=e.slideCount,c=e.slidesToShow,u=e.slidesToScroll,d=e.slideWidth,p=e.listWidth,f=e.variableWidth,h=e.slideHeight,v=e.fade,y=e.vertical,g=0,m=0;if(v||1===e.slideCount)return 0;var w=0;if(o?(w=-T(e),a%u!==0&&r+u>a&&(w=-(r>a?c-(r-a):a%u)),s&&(w+=parseInt(c/2))):(a%u!==0&&r+u>a&&(w=c-a%u),s&&(w=parseInt(c/2))),g=w*d,m=w*h,t=y?r*h*-1+m:r*d*-1+g,f===!0){var S,_=l.default.findDOMNode(i);_&&_.children[a-1];if(S=r+T(e),n=_&&_.childNodes[S],t=n?n.offsetLeft*-1:0,s===!0){S=o?r+T(e):r,n=_&&_.children[S],t=0;for(var E=0;E<S;E++)t-=_&&_.children[E].offsetWidth;t-=parseInt(e.centerPadding),t+=(p-n.offsetWidth)/2}}return t},T=t.getPreClones=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0)},x=t.getPostClones=function(e){return e.unslick||!e.infinite?0:e.slideCount},O=t.getTotalSlides=function(e){return 1===e.slideCount?1:T(e)+e.slideCount+x(e)},M=t.siblingDirection=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+C(e)?"left":"right":e.targetSlide<e.currentSlide-L(e)?"right":"left"},C=t.slidesOnRight=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r&&t%2===0&&(o+=1),o}return r?0:t-1},L=t.slidesOnLeft=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r||t%2!==0||(o+=1),o}return r?t-1:0}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.Track=void 0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(14),d=r(u),p=n(15),f=function(e){var t,n,r,i,o;o=e.rtl?e.slideCount-1-e.index:e.index,r=o<0||o>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(o-e.currentSlide)%e.slideCount===0,o>e.currentSlide-i-1&&o<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=o&&o<e.currentSlide+e.slidesToShow;var s=o===e.currentSlide;return(0,d.default)({"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":r,"slick-current":s})},h=function(e){var t={};return void 0!==e.variableWidth&&e.variableWidth!==!1||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*e.slideHeight:t.left=-e.index*e.slideWidth,t.opacity=e.currentSlide===e.index?1:0,t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase,t.WebkitTransition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase),t},v=function(e,t){return e.key||t},y=function(e){var t,n=[],r=[],i=[],o=c.default.Children.count(e.children),s=(0,p.lazyStartIndex)(e),l=(0,p.lazyEndIndex)(e);return c.default.Children.forEach(e.children,function(u,y){var g=void 0,m={message:"children",index:y,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};g=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(y)>=0?u:c.default.createElement("div",null);var w=h(a({},e,{index:y})),S=g.props.className||"";if(n.push(c.default.cloneElement(g,{key:"original"+v(g,y),"data-index":y,className:(0,d.default)(f(a({},e,{index:y})),S),tabIndex:"-1",style:a({outline:"none"},g.props.style||{},w),onClick:function(t){g.props&&g.props.onClick&&g.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(m)}})),e.infinite&&e.fade===!1){var b=o-y;b<=(0,p.getPreClones)(e)&&o!==e.slidesToShow&&(t=-b,t>=s&&(g=u),r.push(c.default.cloneElement(g,{key:"precloned"+v(g,t),"data-index":t,tabIndex:"-1",className:(0,d.default)(f(a({},e,{index:t})),S),style:a({},g.props.style||{},w),onClick:function(t){g.props&&g.props.onClick&&g.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(m)}}))),o!==e.slidesToShow&&(t=o+y,t<l&&(g=u),i.push(c.default.cloneElement(g,{key:"postcloned"+v(g,t),"data-index":t,tabIndex:"-1",className:(0,d.default)(f(a({},e,{index:t})),S),style:a({},g.props.style||{},w),onClick:function(t){g.props&&g.props.onClick&&g.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(m)}})))}}),e.rtl?r.concat(n,i).reverse():r.concat(n,i)};t.Track=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=y(this.props),t=this.props,n=t.onMouseEnter,r=t.onMouseOver,i=t.onMouseLeave,o={onMouseEnter:n,onMouseOver:r,onMouseLeave:i};return c.default.createElement("div",a({className:"slick-track",style:this.props.trackStyle},o),e)},t}(c.default.Component)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.Dots=void 0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(14),d=r(u),p=function(e){var t;return t=e.infinite?Math.ceil(e.slideCount/e.slidesToScroll):Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1};t.Dots=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.clickHandler=function(e,t){t.preventDefault(),this.props.clickHandler(e)},t.prototype.render=function(){var e=this,t=p({slideCount:this.props.slideCount,slidesToScroll:this.props.slidesToScroll,slidesToShow:this.props.slidesToShow,infinite:this.props.infinite}),n=this.props,r=n.onMouseEnter,i=n.onMouseOver,o=n.onMouseLeave,s={onMouseEnter:r,onMouseOver:i,onMouseLeave:o},l=Array.apply(null,Array(t+1).join("0").split("")).map(function(t,n){var r=n*e.props.slidesToScroll,i=n*e.props.slidesToScroll+(e.props.slidesToScroll-1),o=(0,d.default)({"slick-active":e.props.currentSlide>=r&&e.props.currentSlide<=i}),s={message:"dots",index:n,slidesToScroll:e.props.slidesToScroll,currentSlide:e.props.currentSlide},a=e.clickHandler.bind(e,s);return c.default.createElement("li",{key:n,className:o},c.default.cloneElement(e.props.customPaging(n),{onClick:a}))});return c.default.cloneElement(this.props.appendDots(l),a({className:this.props.dotsClass},s))},t}(c.default.Component)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.NextArrow=t.PrevArrow=void 0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(14),d=r(u),p=n(15);t.PrevArrow=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.clickHandler=function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)},t.prototype.render=function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var n={key:"0","data-role":"none",className:(0,d.default)(e),style:{display:"block"},onClick:t},r={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},i=void 0;return i=this.props.prevArrow?c.default.cloneElement(this.props.prevArrow,a({},n,r)):c.default.createElement("button",a({key:"0",type:"button"},n)," Previous")},t}(c.default.Component),t.NextArrow=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.clickHandler=function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)},t.prototype.render=function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});(0,p.canGoNext)(this.props)||(e["slick-disabled"]=!0,t=null);var n={key:"1","data-role":"none",className:(0,d.default)(e),style:{display:"block"},onClick:t},r={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},i=void 0;return i=this.props.nextArrow?c.default.cloneElement(this.props.nextArrow,a({},n,r)):c.default.createElement("button",a({key:"1",type:"button"},n)," Next")},t}(c.default.Component)},function(e,t,n){(function(t){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return parseFloat(e)||0}function n(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return n.reduce(function(n,r){var i=t["border-"+r+"-width"];return n+e(i)},0)}function r(t){for(var n=["top","right","bottom","left"],r={},i=0,o=n;i<o.length;i+=1){var s=o[i],a=t["padding-"+s];r[s]=e(a)}return r}function i(e){var t=e.getBBox();return c(0,0,t.width,t.height)}function o(t){var i=t.clientWidth,o=t.clientHeight;if(!i&&!o)return _;var a=b(t).getComputedStyle(t),l=r(a),u=l.left+l.right,d=l.top+l.bottom,p=e(a.width),f=e(a.height);if("border-box"===a.boxSizing&&(Math.round(p+u)!==i&&(p-=n(a,"left","right")+u),Math.round(f+d)!==o&&(f-=n(a,"top","bottom")+d)),!s(t)){var h=Math.round(p+u)-i,v=Math.round(f+d)-o;1!==Math.abs(h)&&(p-=h),1!==Math.abs(v)&&(f-=v)}return c(l.left,l.top,p,f)}function s(e){return e===b(e).document.documentElement}function a(e){return d?E(e)?i(e):o(e):_}function l(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(o.prototype);return S(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}function c(e,t,n,r){return{x:e,y:t,width:n,height:r}}var u=function(){function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return"undefined"!=typeof Map?Map:function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){var n=this;void 0===t&&(t=null);for(var r=0,i=n.__entries__;r<i.length;r+=1){var o=i[r];e.call(t,o[1],o[0])}},Object.defineProperties(t.prototype,n),t}()}(),d="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,p=function(){return"undefined"!=typeof t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")()}(),f=function(){return"function"==typeof requestAnimationFrame?requestAnimationFrame.bind(p):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),h=2,v=function(e,t){function n(){o&&(o=!1,e()),s&&i()}function r(){f(n)}function i(){var e=Date.now();if(o){if(e-a<h)return;s=!0}else o=!0,s=!1,setTimeout(r,t);a=e}var o=!1,s=!1,a=0;return i},y=20,g=["top","right","bottom","left","width","height","size","weight"],m="undefined"!=typeof MutationObserver,w=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=v(this.refresh.bind(this),y)};w.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},w.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},w.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},w.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},w.prototype.connect_=function(){d&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),m?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},w.prototype.disconnect_=function(){d&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},w.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t="");var n=g.some(function(e){return!!~t.indexOf(e)});n&&this.refresh()},w.getInstance=function(){return this.instance_||(this.instance_=new w),this.instance_},w.instance_=null;var S=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},b=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||p},_=c(0,0,0,0),E=function(){return"undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof b(e).SVGGraphicsElement}:function(e){return e instanceof b(e).SVGElement&&"function"==typeof e.getBBox}}(),k=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=c(0,0,0,0),this.target=e};k.prototype.isActive=function(){var e=a(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},k.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var T=function(e,t){var n=l(t);S(this,{target:e,contentRect:n})},x=function(e,t,n){if(this.activeObservations_=[],this.observations_=new u,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n};x.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof b(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new k(e)),this.controller_.addObserver(this),this.controller_.refresh())}},x.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof b(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},x.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},x.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},x.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new T(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},x.prototype.clearActive=function(){this.activeObservations_.splice(0)},x.prototype.hasActive=function(){return this.activeObservations_.length>0};var O="undefined"!=typeof WeakMap?new WeakMap:new u,M=function(e){if(!(this instanceof M))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=w.getInstance(),n=new x(e,t,this);O.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){M.prototype[e]=function(){return(t=O.get(this))[e].apply(t,arguments);var t}});var C=function(){return"undefined"!=typeof p.ResizeObserver?p.ResizeObserver:M}();return C})}).call(t,function(){return this}())},function(e,t,n){var r=n(21),i=function(e){var t=/[height|width]$/;return t.test(e)},o=function(e){var t="",n=Object.keys(e);return n.forEach(function(o,s){var a=e[o];o=r(o),i(o)&&"number"==typeof a&&(a+="px"),t+=a===!0?o:a===!1?"not "+o:"("+o+": "+a+")",s<n.length-1&&(t+=" and ")}),t},s=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach(function(n,r){t+=o(n),r<e.length-1&&(t+=", ")}),t):o(e)};e.exports=s},function(e,t){var n=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}).toLowerCase()};e.exports=n},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},function(e,t,n){var r=n(24);e.exports=new r},function(e,t,n){function r(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}var i=n(25),o=n(27),s=o.each,a=o.isFunction,l=o.isArray;r.prototype={constructor:r,register:function(e,t,n){var r=this.queries,o=n&&this.browserIsIncapable;return r[e]||(r[e]=new i(e,o)),a(t)&&(t={match:t}),l(t)||(t=[t]),s(t,function(t){a(t)&&(t={match:t}),r[e].addHandler(t)}),this},unregister:function(e,t){var n=this.queries[e];return n&&(t?n.removeHandler(t):(n.clear(),delete this.queries[e])),this}},e.exports=r},function(e,t,n){function r(e,t){this.query=e,this.isUnconditional=t,this.handlers=[],this.mql=window.matchMedia(e);var n=this;this.listener=function(e){n.mql=e.currentTarget||e,n.assess()},this.mql.addListener(this.listener)}var i=n(26),o=n(27).each;r.prototype={constuctor:r,addHandler:function(e){var t=new i(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var t=this.handlers;o(t,function(n,r){if(n.equals(e))return n.destroy(),!t.splice(r,1)})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){o(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";o(this.handlers,function(t){t[e]()})}},e.exports=r},function(e,t){function n(e){this.options=e,!e.deferSetup&&this.setup()}n.prototype={constructor:n,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},e.exports=n},function(e,t){function n(e,t){var n,r=0,i=e.length;for(r;r<i&&(n=t(e[r],r),n!==!1);r++);}function r(e){return"[object Array]"===Object.prototype.toString.apply(e)}function i(e){return"function"==typeof e}e.exports={isFunction:i,isArray:r,each:n}}])}); | ||
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===i)for(var s in r)o.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],i=function(){return n}.apply(t,r),!(void 0!==i&&(e.exports=i)))}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.canUseDOM=t.slidesOnLeft=t.slidesOnRight=t.siblingDirection=t.getTotalSlides=t.getPostClones=t.getPreClones=t.getTrackLeft=t.getTrackAnimateCSS=t.getTrackCSS=t.checkSpecKeys=t.getSlideCount=t.checkNavigable=t.getNavigableIndexes=t.swipeEnd=t.swipeMove=t.swipeStart=t.keyHandler=t.changeSlide=t.slideHandler=t.initializedState=t.extractObject=t.canGoNext=t.getSwipeDirection=t.getHeight=t.getWidth=t.lazySlidesOnRight=t.lazySlidesOnLeft=t.lazyEndIndex=t.lazyStartIndex=t.getRequiredLazySlides=t.getOnDemandLazySlides=void 0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n(2),s=r(o),a=n(4),l=r(a),c=t.getOnDemandLazySlides=function(e){for(var t=[],n=u(e),r=d(e),i=n;i<r;i++)e.lazyLoadedList.indexOf(i)<0&&t.push(i);return t},u=(t.getRequiredLazySlides=function(e){for(var t=[],n=u(e),r=d(e),i=n;i<r;i++)t.push(i);return t},t.lazyStartIndex=function(e){return e.currentSlide-p(e)}),d=t.lazyEndIndex=function(e){return e.currentSlide+f(e)},p=t.lazySlidesOnLeft=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0},f=t.lazySlidesOnRight=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow},h=t.getWidth=function(e){return e&&e.offsetWidth||0},v=t.getHeight=function(e){return e&&e.offsetHeight||0},y=t.getSwipeDirection=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,r=Math.atan2(n,t),i=Math.round(180*r/Math.PI),i<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":o===!0?i>=35&&i<=135?"up":"down":"vertical"},g=t.canGoNext=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1?t=!1:(e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1)),t},S=(t.extractObject=function(e,t){var n={};return t.forEach(function(t){return n[t]=e[t]}),n},t.initializedState=function(e){var t=s.default.Children.count(e.children),n=Math.ceil(h(l.default.findDOMNode(e.listRef))),r=Math.ceil(h(l.default.findDOMNode(e.trackRef))),i=void 0;if(e.vertical)i=n;else{var o=e.centerMode&&2*parseInt(e.centerPadding);"string"==typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(o*=n/100),i=Math.ceil((n-o)/e.slidesToShow)}var a=l.default.findDOMNode(e.listRef)&&v(l.default.findDOMNode(e.listRef).querySelector('[data-index="0"]')),u=a*e.slidesToShow,d=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(d=t-1-e.initialSlide);var p=e.lazyLoadedList||[],f=c({currentSlide:d,lazyLoadedList:p},e);p.concat(f);var y={slideCount:t,slideWidth:i,listWidth:n,trackWidth:r,currentSlide:d,slideHeight:a,listHeight:u,lazyLoadedList:p};return null===e.autoplaying&&e.autoplay&&(y.autoplaying="playing"),y},t.slideHandler=function(e){var t=e.waitForAnimate,n=e.animating,r=e.fade,o=e.infinite,s=e.index,a=e.slideCount,l=e.lazyLoadedList,u=e.lazyLoad,d=e.currentSlide,p=e.centerMode,f=e.slidesToScroll,h=e.slidesToShow,v=e.useCSS;if(t&&n)return{};var y=s,S=void 0,w=void 0,m=void 0,b={},_={};if(r){if(!o&&(s<0||s>=a))return{};s<0?y=s+a:s>=a&&(y=s-a),u&&l.indexOf(y)<0&&l.push(y),b={animating:!0,currentSlide:y,lazyLoadedList:l},_={animating:!1}}else S=y,y<0?(S=y+a,o?a%f!==0&&(S=a-a%f):S=0):!g(e)&&y>d?y=S=d:p&&y>=a?(y=o?a:a-1,S=o?0:a-1):y>=a&&(S=y-a,o?a%f!==0&&(S=0):S=a-h),w=O(i({},e,{slideIndex:y})),m=O(i({},e,{slideIndex:S})),o||(w===m&&(y=S),w=m),u&&l.concat(c(i({},e,{currentSlide:y}))),v?(b={animating:!0,currentSlide:S,trackStyle:T(i({},e,{left:w})),lazyLoadedList:l},_={animating:!1,currentSlide:S,trackStyle:k(i({},e,{left:m})),swipeLeft:null}):b={currentSlide:S,trackStyle:k(i({},e,{left:m})),lazyLoadedList:l};return{state:b,nextState:_}},t.changeSlide=function(e,t){var n,r,o,s,a,l=e.slidesToScroll,c=e.slidesToShow,u=e.slideCount,d=e.currentSlide,p=e.lazyLoad,f=e.infinite;if(s=u%l!==0,n=s?0:(u-d)%l,"previous"===t.message)o=0===n?l:c-n,a=d-o,p&&!f&&(r=d-o,a=r===-1?u-1:r);else if("next"===t.message)o=0===n?l:n,a=d+o,p&&!f&&(a=(d+l)%u+n);else if("dots"===t.message){if(a=t.index*t.slidesToScroll,a===t.currentSlide)return null}else if("children"===t.message){if(a=t.index,a===t.currentSlide)return null;if(f){var h=M(i({},e,{targetSlide:a}));a>t.currentSlide&&"left"===h?a-=u:a<t.currentSlide&&"right"===h&&(a+=u)}}else if("index"===t.message&&(a=Number(t.index),a===t.currentSlide))return null;return a},t.keyHandler=function(e,t,n){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?n?"next":"previous":39===e.keyCode?n?"previous":"next":""},t.swipeStart=function(e,t,n){return"IMG"===e.target.tagName&&e.preventDefault(),!t||!n&&e.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}},t.swipeMove=function(e,t){var n=t.scrolling,r=t.animating,o=t.vertical,s=t.swipeToSlide,a=t.verticalSwiping,l=t.rtl,c=t.currentSlide,u=t.edgeFriction,d=t.edgeDragged,p=t.onEdge,f=t.swiped,h=t.swiping,v=t.slideCount,S=t.slidesToScroll,w=t.infinite,m=t.touchObject,b=t.swipeEvent,T=t.listHeight,_=t.listWidth;if(!n){if(r)return e.preventDefault();o&&s&&a&&e.preventDefault();var x=void 0,E={},M=O(t);m.curX=e.touches?e.touches[0].pageX:e.clientX,m.curY=e.touches?e.touches[0].pageY:e.clientY,m.swipeLength=Math.round(Math.sqrt(Math.pow(m.curX-m.startX,2)));var L=Math.round(Math.sqrt(Math.pow(m.curY-m.startY,2)));if(!a&&!h&&L>10)return{scrolling:!0};a&&(m.swipeLength=L);var C=(l?-1:1)*(m.curX>m.startX?1:-1);a&&(C=m.curY>m.startY?1:-1);var z=Math.ceil(v/S),P=y(t.touchObject,a),H=m.swipeLength;return w||(0===c&&"right"===P||c+1>=z&&"left"===P||!g(t)&&"left"===P)&&(H=m.swipeLength*u,d===!1&&p&&(p(P),E.edgeDragged=!0)),!f&&b&&(b(P),E.swiped=!0),x=o?M+H*(T/_)*C:l?M-H*C:M+H*C,a&&(x=M+H*C),E=i({},E,{touchObject:m,swipeLeft:x,trackStyle:k(i({},t,{left:x}))}),Math.abs(m.curX-m.startX)<.8*Math.abs(m.curY-m.startY)?E:(m.swipeLength>10&&(E.swiping=!0,e.preventDefault()),E)}},t.swipeEnd=function(e,t){var n=t.dragging,r=t.swipe,o=t.touchObject,s=t.listWidth,a=t.touchThreshold,l=t.verticalSwiping,c=t.listHeight,u=t.currentSlide,d=t.swipeToSlide,p=t.scrolling,f=t.onSwipe;if(!n)return r&&e.preventDefault(),{};var h=l?c/a:s/a,v=y(o,l),g={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(p)return g;if(!o.swipeLength)return g;if(o.swipeLength>h){e.preventDefault(),f&&f(v);var S=void 0,b=void 0;switch(v){case"left":case"up":b=u+m(t),S=d?w(t,b):b,g.currentDirection=0;break;case"right":case"down":b=u-m(t),S=d?w(t,b):b,g.currentDirection=1;break;default:S=u}g.triggerSlideHandler=S}else{var k=O(t);g.trackStyle=T(i({},t,{left:k}))}return g},t.getNavigableIndexes=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?e.slidesToShow*-1:0,r=e.infinite?e.slidesToShow*-1:0,i=[];n<t;)i.push(n),n=r+e.slidesToScroll,r+=Math.min(e.slidesToScroll,e.slidesToShow);return i}),w=t.checkNavigable=function(e,t){var n=S(e),r=0;if(t>n[n.length-1])t=n[n.length-1];else for(var i in n){if(t<n[i]){t=r;break}r=n[i]}return t},m=t.getSlideCount=function(e){var t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){var n=void 0,r=l.default.findDOMNode(e.listRef),i=r.querySelectorAll(".slick-slide");if(Array.from(i).every(function(r){if(e.vertical){if(r.offsetTop+v(r)/2>e.swipeLeft*-1)return n=r,!1}else if(r.offsetLeft-t+h(r)/2>e.swipeLeft*-1)return n=r,!1;return!0}),!n)return 0;var o=e.rtl===!0?e.slideCount-e.currentSlide:e.currentSlide,s=Math.abs(n.dataset.index-o)||1;return s}return e.slidesToScroll},b=t.checkSpecKeys=function(e,t){return t.reduce(function(t,n){return t&&e.hasOwnProperty(n)},!0)?null:console.error("Keys Missing:",e)},k=t.getTrackCSS=function(e){b(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var t=void 0,n=void 0,r=e.slideCount+2*e.slidesToShow;e.vertical?n=r*e.slideHeight:t=E(e)*e.slideWidth;var o={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var s=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",a=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";o=i({},o,{WebkitTransform:s,transform:a,msTransform:l})}else e.vertical?o.top=e.left:o.left=e.left;return e.fade&&(o={opacity:1}),t&&(o.width=t),n&&(o.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?o.marginTop=e.left+"px":o.marginLeft=e.left+"px"),o},T=t.getTrackAnimateCSS=function(e){b(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=k(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t},O=t.getTrackLeft=function(e){if(e.unslick)return 0;b(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,r=e.slideIndex,i=e.trackRef,o=e.infinite,s=e.centerMode,a=e.slideCount,c=e.slidesToShow,u=e.slidesToScroll,d=e.slideWidth,p=e.listWidth,f=e.variableWidth,h=e.slideHeight,v=e.fade,y=e.vertical,g=0,S=0;if(v||1===e.slideCount)return 0;var w=0;if(o?(w=-_(e),a%u!==0&&r+u>a&&(w=-(r>a?c-(r-a):a%u)),s&&(w+=parseInt(c/2))):(a%u!==0&&r+u>a&&(w=c-a%u),s&&(w=parseInt(c/2))),g=w*d,S=w*h,t=y?r*h*-1+S:r*d*-1+g,f===!0){var m,k=l.default.findDOMNode(i);if(m=r+_(e),n=k&&k.childNodes[m],t=n?n.offsetLeft*-1:0,s===!0){m=o?r+_(e):r,n=k&&k.children[m],t=0;for(var T=0;T<m;T++)t-=k&&k.children[T]&&k.children[T].offsetWidth;t-=parseInt(e.centerPadding),t+=n&&(p-n.offsetWidth)/2}}return t},_=t.getPreClones=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0)},x=t.getPostClones=function(e){return e.unslick||!e.infinite?0:e.slideCount},E=t.getTotalSlides=function(e){return 1===e.slideCount?1:_(e)+e.slideCount+x(e)},M=t.siblingDirection=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+L(e)?"left":"right":e.targetSlide<e.currentSlide-C(e)?"right":"left"},L=t.slidesOnRight=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r&&t%2===0&&(o+=1),o}return r?0:t-1},C=t.slidesOnLeft=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r||t%2!==0||(o+=1),o}return r?t-1:0};t.canUseDOM=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.Track=void 0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(7),d=r(u),p=n(8),f=function(e){var t,n,r,i,o;o=e.rtl?e.slideCount-1-e.index:e.index,r=o<0||o>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(o-e.currentSlide)%e.slideCount===0,o>e.currentSlide-i-1&&o<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=o&&o<e.currentSlide+e.slidesToShow;var s=o===e.currentSlide;return{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":r,"slick-current":s}},h=function(e){var t={};return void 0!==e.variableWidth&&e.variableWidth!==!1||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=e.currentSlide===e.index?1:0,t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase,t.WebkitTransition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase),t},v=function(e,t){return e.key||t},y=function(e){var t,n=[],r=[],i=[],o=c.default.Children.count(e.children),s=(0,p.lazyStartIndex)(e),l=(0,p.lazyEndIndex)(e);return c.default.Children.forEach(e.children,function(u,y){var g=void 0,S={message:"children",index:y,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};g=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(y)>=0?u:c.default.createElement("div",null);var w=h(a({},e,{index:y})),m=g.props.className||"",b=f(a({},e,{index:y}));if(n.push(c.default.cloneElement(g,{key:"original"+v(g,y),"data-index":y,className:(0,d.default)(b,m),tabIndex:"-1","aria-hidden":!b["slick-active"],style:a({outline:"none"},g.props.style||{},w),onClick:function(t){g.props&&g.props.onClick&&g.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(S)}})),e.infinite&&e.fade===!1){var k=o-y;k<=(0,p.getPreClones)(e)&&o!==e.slidesToShow&&(t=-k,t>=s&&(g=u),b=f(a({},e,{index:t})),r.push(c.default.cloneElement(g,{key:"precloned"+v(g,t),"data-index":t,tabIndex:"-1",className:(0,d.default)(b,m),"aria-hidden":!b["slick-active"],style:a({},g.props.style||{},w),onClick:function(t){g.props&&g.props.onClick&&g.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(S)}}))),o!==e.slidesToShow&&(t=o+y,t<l&&(g=u),b=f(a({},e,{index:t})),i.push(c.default.cloneElement(g,{key:"postcloned"+v(g,t),"data-index":t,tabIndex:"-1",className:(0,d.default)(b,m),"aria-hidden":!b["slick-active"],style:a({},g.props.style||{},w),onClick:function(t){g.props&&g.props.onClick&&g.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(S)}})))}}),e.rtl?r.concat(n,i).reverse():r.concat(n,i)};t.Track=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.render=function(){var e=y(this.props),t=this.props,n=t.onMouseEnter,r=t.onMouseOver,i=t.onMouseLeave,o={onMouseEnter:n,onMouseOver:r,onMouseLeave:i};return c.default.createElement("div",a({className:"slick-track",style:this.props.trackStyle},o),e)},t}(c.default.PureComponent)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.Dots=void 0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(7),d=r(u),p=function(e){var t;return t=e.infinite?Math.ceil(e.slideCount/e.slidesToScroll):Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1};t.Dots=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.clickHandler=function(e,t){t.preventDefault(),this.props.clickHandler(e)},t.prototype.render=function(){var e=this,t=p({slideCount:this.props.slideCount,slidesToScroll:this.props.slidesToScroll,slidesToShow:this.props.slidesToShow,infinite:this.props.infinite}),n=this.props,r=n.onMouseEnter,i=n.onMouseOver,o=n.onMouseLeave,s={onMouseEnter:r,onMouseOver:i,onMouseLeave:o},l=Array.apply(null,Array(t+1).join("0").split("")).map(function(t,n){var r=n*e.props.slidesToScroll,i=n*e.props.slidesToScroll+(e.props.slidesToScroll-1),o=(0,d.default)({"slick-active":e.props.currentSlide>=r&&e.props.currentSlide<=i}),s={message:"dots",index:n,slidesToScroll:e.props.slidesToScroll,currentSlide:e.props.currentSlide},a=e.clickHandler.bind(e,s);return c.default.createElement("li",{key:n,className:o},c.default.cloneElement(e.props.customPaging(n),{onClick:a}))});return c.default.cloneElement(this.props.appendDots(l),a({className:this.props.dotsClass},s))},t}(c.default.PureComponent)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.NextArrow=t.PrevArrow=void 0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(2),c=r(l),u=n(7),d=r(u),p=n(8);t.PrevArrow=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.clickHandler=function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)},t.prototype.render=function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var n={key:"0","data-role":"none",className:(0,d.default)(e),style:{display:"block"},onClick:t},r={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},i=void 0;return i=this.props.prevArrow?c.default.cloneElement(this.props.prevArrow,a({},n,r)):c.default.createElement("button",a({key:"0",type:"button"},n)," ","Previous")},t}(c.default.PureComponent),t.NextArrow=function(e){function t(){return i(this,t),o(this,e.apply(this,arguments))}return s(t,e),t.prototype.clickHandler=function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)},t.prototype.render=function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});(0,p.canGoNext)(this.props)||(e["slick-disabled"]=!0,t=null);var n={key:"1","data-role":"none",className:(0,d.default)(e),style:{display:"block"},onClick:t},r={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount},i=void 0;return i=this.props.nextArrow?c.default.cloneElement(this.props.nextArrow,a({},n,r)):c.default.createElement("button",a({key:"1",type:"button"},n)," ","Next")},t}(c.default.PureComponent)},function(e,t,n){(function(t){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return parseFloat(e)||0}function n(t){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return n.reduce(function(n,r){var i=t["border-"+r+"-width"];return n+e(i)},0)}function r(t){for(var n=["top","right","bottom","left"],r={},i=0,o=n;i<o.length;i+=1){var s=o[i],a=t["padding-"+s];r[s]=e(a)}return r}function i(e){var t=e.getBBox();return c(0,0,t.width,t.height)}function o(t){var i=t.clientWidth,o=t.clientHeight;if(!i&&!o)return k;var a=b(t).getComputedStyle(t),l=r(a),u=l.left+l.right,d=l.top+l.bottom,p=e(a.width),f=e(a.height);if("border-box"===a.boxSizing&&(Math.round(p+u)!==i&&(p-=n(a,"left","right")+u),Math.round(f+d)!==o&&(f-=n(a,"top","bottom")+d)),!s(t)){var h=Math.round(p+u)-i,v=Math.round(f+d)-o;1!==Math.abs(h)&&(p-=h),1!==Math.abs(v)&&(f-=v)}return c(l.left,l.top,p,f)}function s(e){return e===b(e).document.documentElement}function a(e){return d?T(e)?i(e):o(e):k}function l(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(o.prototype);return m(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}function c(e,t,n,r){return{x:e,y:t,width:n,height:r}}var u=function(){function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return"undefined"!=typeof Map?Map:function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){var n=this;void 0===t&&(t=null);for(var r=0,i=n.__entries__;r<i.length;r+=1){var o=i[r];e.call(t,o[1],o[0])}},Object.defineProperties(t.prototype,n),t}()}(),d="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,p=function(){return"undefined"!=typeof t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")()}(),f=function(){return"function"==typeof requestAnimationFrame?requestAnimationFrame.bind(p):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),h=2,v=function(e,t){function n(){o&&(o=!1,e()),s&&i()}function r(){f(n)}function i(){var e=Date.now();if(o){if(e-a<h)return;s=!0}else o=!0,s=!1,setTimeout(r,t);a=e}var o=!1,s=!1,a=0;return i},y=20,g=["top","right","bottom","left","width","height","size","weight"],S="undefined"!=typeof MutationObserver,w=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=v(this.refresh.bind(this),y)};w.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},w.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},w.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},w.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},w.prototype.connect_=function(){d&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),S?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},w.prototype.disconnect_=function(){d&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},w.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t="");var n=g.some(function(e){return!!~t.indexOf(e)});n&&this.refresh()},w.getInstance=function(){return this.instance_||(this.instance_=new w),this.instance_},w.instance_=null;var m=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},b=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||p},k=c(0,0,0,0),T=function(){return"undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof b(e).SVGGraphicsElement}:function(e){return e instanceof b(e).SVGElement&&"function"==typeof e.getBBox}}(),O=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=c(0,0,0,0),this.target=e};O.prototype.isActive=function(){var e=a(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},O.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var _=function(e,t){var n=l(t);m(this,{target:e,contentRect:n})},x=function(e,t,n){if(this.activeObservations_=[],this.observations_=new u,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n};x.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof b(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new O(e)),this.controller_.addObserver(this),this.controller_.refresh())}},x.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof b(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},x.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},x.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},x.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new _(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},x.prototype.clearActive=function(){this.activeObservations_.splice(0)},x.prototype.hasActive=function(){return this.activeObservations_.length>0};var E="undefined"!=typeof WeakMap?new WeakMap:new u,M=function(e){if(!(this instanceof M))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=w.getInstance(),n=new x(e,t,this);E.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){M.prototype[e]=function(){return(t=E.get(this))[e].apply(t,arguments);var t}});var L=function(){return"undefined"!=typeof p.ResizeObserver?p.ResizeObserver:M}();return L})}).call(t,function(){return this}())},function(e,t,n){var r=n(14),i=function(e){var t=/[height|width]$/;return t.test(e)},o=function(e){var t="",n=Object.keys(e);return n.forEach(function(o,s){var a=e[o];o=r(o),i(o)&&"number"==typeof a&&(a+="px"),t+=a===!0?o:a===!1?"not "+o:"("+o+": "+a+")",s<n.length-1&&(t+=" and ")}),t},s=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach(function(n,r){t+=o(n),r<e.length-1&&(t+=", ")}),t):o(e)};e.exports=s},function(e,t){var n=function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}).toLowerCase()};e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(2),o=r(i),s={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return o.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return o.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0};t.default=s},function(e,t,n){var r=n(17);e.exports=new r},function(e,t,n){function r(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}var i=n(18),o=n(20),s=o.each,a=o.isFunction,l=o.isArray;r.prototype={constructor:r,register:function(e,t,n){var r=this.queries,o=n&&this.browserIsIncapable;return r[e]||(r[e]=new i(e,o)),a(t)&&(t={match:t}),l(t)||(t=[t]),s(t,function(t){a(t)&&(t={match:t}),r[e].addHandler(t)}),this},unregister:function(e,t){var n=this.queries[e];return n&&(t?n.removeHandler(t):(n.clear(),delete this.queries[e])),this}},e.exports=r},function(e,t,n){function r(e,t){this.query=e,this.isUnconditional=t,this.handlers=[],this.mql=window.matchMedia(e);var n=this;this.listener=function(e){n.mql=e.currentTarget||e,n.assess()},this.mql.addListener(this.listener)}var i=n(19),o=n(20).each;r.prototype={constuctor:r,addHandler:function(e){var t=new i(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var t=this.handlers;o(t,function(n,r){if(n.equals(e))return n.destroy(),!t.splice(r,1)})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){o(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";o(this.handlers,function(t){t[e]()})}},e.exports=r},function(e,t){function n(e){this.options=e,!e.deferSetup&&this.setup()}n.prototype={constructor:n,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},e.exports=n},function(e,t){function n(e,t){var n,r=0,i=e.length;for(r;r<i&&(n=t(e[r],r),n!==!1);r++);}function r(e){return"[object Array]"===Object.prototype.toString.apply(e)}function i(e){return"function"==typeof e}e.exports={isFunction:i,isArray:r,each:n}}])}); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -8,11 +8,11 @@ exports.__esModule = true; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _classnames = require('classnames'); | ||
var _classnames = require("classnames"); | ||
var _classnames2 = _interopRequireDefault(_classnames); | ||
var _innerSliderUtils = require('./utils/innerSliderUtils'); | ||
var _innerSliderUtils = require("./utils/innerSliderUtils"); | ||
@@ -27,4 +27,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var PrevArrow = exports.PrevArrow = function (_React$Component) { | ||
_inherits(PrevArrow, _React$Component); | ||
var PrevArrow = exports.PrevArrow = function (_React$PureComponent) { | ||
_inherits(PrevArrow, _React$PureComponent); | ||
@@ -34,3 +34,3 @@ function PrevArrow() { | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments)); | ||
} | ||
@@ -46,7 +46,7 @@ | ||
PrevArrow.prototype.render = function render() { | ||
var prevClasses = { 'slick-arrow': true, 'slick-prev': true }; | ||
var prevHandler = this.clickHandler.bind(this, { message: 'previous' }); | ||
var prevClasses = { "slick-arrow": true, "slick-prev": true }; | ||
var prevHandler = this.clickHandler.bind(this, { message: "previous" }); | ||
if (!this.props.infinite && (this.props.currentSlide === 0 || this.props.slideCount <= this.props.slidesToShow)) { | ||
prevClasses['slick-disabled'] = true; | ||
prevClasses["slick-disabled"] = true; | ||
prevHandler = null; | ||
@@ -56,6 +56,6 @@ } | ||
var prevArrowProps = { | ||
key: '0', | ||
'data-role': 'none', | ||
key: "0", | ||
"data-role": "none", | ||
className: (0, _classnames2.default)(prevClasses), | ||
style: { display: 'block' }, | ||
style: { display: "block" }, | ||
onClick: prevHandler | ||
@@ -73,5 +73,6 @@ }; | ||
prevArrow = _react2.default.createElement( | ||
'button', | ||
_extends({ key: '0', type: 'button' }, prevArrowProps), | ||
' Previous' | ||
"button", | ||
_extends({ key: "0", type: "button" }, prevArrowProps), | ||
" ", | ||
"Previous" | ||
); | ||
@@ -84,6 +85,6 @@ } | ||
return PrevArrow; | ||
}(_react2.default.Component); | ||
}(_react2.default.PureComponent); | ||
var NextArrow = exports.NextArrow = function (_React$Component2) { | ||
_inherits(NextArrow, _React$Component2); | ||
var NextArrow = exports.NextArrow = function (_React$PureComponent2) { | ||
_inherits(NextArrow, _React$PureComponent2); | ||
@@ -93,3 +94,3 @@ function NextArrow() { | ||
return _possibleConstructorReturn(this, _React$Component2.apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$PureComponent2.apply(this, arguments)); | ||
} | ||
@@ -105,7 +106,7 @@ | ||
NextArrow.prototype.render = function render() { | ||
var nextClasses = { 'slick-arrow': true, 'slick-next': true }; | ||
var nextHandler = this.clickHandler.bind(this, { message: 'next' }); | ||
var nextClasses = { "slick-arrow": true, "slick-next": true }; | ||
var nextHandler = this.clickHandler.bind(this, { message: "next" }); | ||
if (!(0, _innerSliderUtils.canGoNext)(this.props)) { | ||
nextClasses['slick-disabled'] = true; | ||
nextClasses["slick-disabled"] = true; | ||
nextHandler = null; | ||
@@ -115,6 +116,6 @@ } | ||
var nextArrowProps = { | ||
key: '1', | ||
'data-role': 'none', | ||
key: "1", | ||
"data-role": "none", | ||
className: (0, _classnames2.default)(nextClasses), | ||
style: { display: 'block' }, | ||
style: { display: "block" }, | ||
onClick: nextHandler | ||
@@ -132,5 +133,6 @@ }; | ||
nextArrow = _react2.default.createElement( | ||
'button', | ||
_extends({ key: '1', type: 'button' }, nextArrowProps), | ||
' Next' | ||
"button", | ||
_extends({ key: "1", type: "button" }, nextArrowProps), | ||
" ", | ||
"Next" | ||
); | ||
@@ -143,2 +145,2 @@ } | ||
return NextArrow; | ||
}(_react2.default.Component); | ||
}(_react2.default.PureComponent); |
@@ -1,6 +0,6 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
@@ -17,4 +17,4 @@ var _react2 = _interopRequireDefault(_react); | ||
return _react2.default.createElement( | ||
'ul', | ||
{ style: { display: 'block' } }, | ||
"ul", | ||
{ style: { display: "block" } }, | ||
dots | ||
@@ -28,8 +28,8 @@ ); | ||
centerMode: false, | ||
centerPadding: '50px', | ||
className: '', | ||
cssEase: 'ease', | ||
centerPadding: "50px", | ||
className: "", | ||
cssEase: "ease", | ||
customPaging: function customPaging(i) { | ||
return _react2.default.createElement( | ||
'button', | ||
"button", | ||
null, | ||
@@ -40,5 +40,5 @@ i + 1 | ||
dots: false, | ||
dotsClass: 'slick-dots', | ||
dotsClass: "slick-dots", | ||
draggable: true, | ||
easing: 'linear', | ||
easing: "linear", | ||
edgeFriction: 0.35, | ||
@@ -60,4 +60,6 @@ fade: false, | ||
responsive: null, | ||
rows: 1, | ||
rtl: false, | ||
slide: 'div', | ||
slide: "div", | ||
slidesPerRow: 1, | ||
slidesToScroll: 1, | ||
@@ -64,0 +66,0 @@ slidesToShow: 1, |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -8,7 +8,7 @@ exports.__esModule = true; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _classnames = require('classnames'); | ||
var _classnames = require("classnames"); | ||
@@ -37,4 +37,4 @@ var _classnames2 = _interopRequireDefault(_classnames); | ||
var Dots = exports.Dots = function (_React$Component) { | ||
_inherits(Dots, _React$Component); | ||
var Dots = exports.Dots = function (_React$PureComponent) { | ||
_inherits(Dots, _React$PureComponent); | ||
@@ -44,3 +44,3 @@ function Dots() { | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments)); | ||
} | ||
@@ -74,12 +74,11 @@ | ||
var mouseEvents = { onMouseEnter: onMouseEnter, onMouseOver: onMouseOver, onMouseLeave: onMouseLeave }; | ||
var dots = Array.apply(null, Array(dotCount + 1).join('0').split('')).map(function (x, i) { | ||
var dots = Array.apply(null, Array(dotCount + 1).join("0").split("")).map(function (x, i) { | ||
var leftBound = i * _this2.props.slidesToScroll; | ||
var rightBound = i * _this2.props.slidesToScroll + (_this2.props.slidesToScroll - 1); | ||
var className = (0, _classnames2.default)({ | ||
'slick-active': _this2.props.currentSlide >= leftBound && _this2.props.currentSlide <= rightBound | ||
"slick-active": _this2.props.currentSlide >= leftBound && _this2.props.currentSlide <= rightBound | ||
}); | ||
var dotOptions = { | ||
message: 'dots', | ||
message: "dots", | ||
index: i, | ||
@@ -92,3 +91,3 @@ slidesToScroll: _this2.props.slidesToScroll, | ||
return _react2.default.createElement( | ||
'li', | ||
"li", | ||
{ key: i, className: className }, | ||
@@ -99,6 +98,8 @@ _react2.default.cloneElement(_this2.props.customPaging(i), { onClick: onClick }) | ||
return _react2.default.cloneElement(this.props.appendDots(dots), _extends({ className: this.props.dotsClass }, mouseEvents)); | ||
return _react2.default.cloneElement(this.props.appendDots(dots), _extends({ | ||
className: this.props.dotsClass | ||
}, mouseEvents)); | ||
}; | ||
return Dots; | ||
}(_react2.default.Component); | ||
}(_react2.default.PureComponent); |
@@ -1,6 +0,6 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
var _slider = require('./slider'); | ||
var _slider = require("./slider"); | ||
@@ -7,0 +7,0 @@ var _slider2 = _interopRequireDefault(_slider); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,37 +6,35 @@ exports.__esModule = true; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _reactDom = require('react-dom'); | ||
var _reactDom = require("react-dom"); | ||
var _reactDom2 = _interopRequireDefault(_reactDom); | ||
var _initialState = require('./initial-state'); | ||
var _initialState = require("./initial-state"); | ||
var _initialState2 = _interopRequireDefault(_initialState); | ||
var _defaultProps = require('./default-props'); | ||
var _lodash = require("lodash.debounce"); | ||
var _defaultProps2 = _interopRequireDefault(_defaultProps); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
var _createReactClass = require('create-react-class'); | ||
var _classnames = require("classnames"); | ||
var _createReactClass2 = _interopRequireDefault(_createReactClass); | ||
var _classnames = require('classnames'); | ||
var _classnames2 = _interopRequireDefault(_classnames); | ||
var _innerSliderUtils = require('./utils/innerSliderUtils'); | ||
var _innerSliderUtils = require("./utils/innerSliderUtils"); | ||
var _track = require('./track'); | ||
var _track = require("./track"); | ||
var _dots = require('./dots'); | ||
var _dots = require("./dots"); | ||
var _arrows = require('./arrows'); | ||
var _arrows = require("./arrows"); | ||
var _resizeObserverPolyfill = require('resize-observer-polyfill'); | ||
var _resizeObserverPolyfill = require("resize-observer-polyfill"); | ||
@@ -73,4 +71,4 @@ var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill); | ||
if (_this.props.adaptiveHeight && _this.list) { | ||
var elem = _this.list.querySelector('[data-index="' + _this.state.currentSlide + '"]'); | ||
_this.list.style.height = (0, _innerSliderUtils.getHeight)(elem) + 'px'; | ||
var elem = _this.list.querySelector("[data-index=\"" + _this.state.currentSlide + "\"]"); | ||
_this.list.style.height = (0, _innerSliderUtils.getHeight)(elem) + "px"; | ||
} | ||
@@ -80,2 +78,3 @@ }; | ||
_this.componentWillMount = function () { | ||
_this.ssrInit(); | ||
_this.props.onInit && _this.props.onInit(); | ||
@@ -85,4 +84,6 @@ if (_this.props.lazyLoad) { | ||
if (slidesToLoad.length > 0) { | ||
_this.setState(function (prevState, props) { | ||
return { lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad) }; | ||
_this.setState(function (prevState) { | ||
return { | ||
lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad) | ||
}; | ||
}); | ||
@@ -100,12 +101,19 @@ if (_this.props.onLazyLoad) { | ||
_this.adaptHeight(); | ||
_this.props.autoplay && _this.autoPlay('update'); | ||
_this.props.autoplay && _this.autoPlay("update"); | ||
}); | ||
if (_this.props.lazyLoad === 'progressive') { | ||
if (_this.props.lazyLoad === "progressive") { | ||
_this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1000); | ||
} | ||
_this.ro = new _resizeObserverPolyfill2.default(function (entries) { | ||
return _this.onWindowResized(); | ||
_this.ro = new _resizeObserverPolyfill2.default(function () { | ||
if (_this.state.animating) { | ||
_this.onWindowResized(false); // don't set trackStyle hence don't break animation | ||
_this.callbackTimers.push(setTimeout(function () { | ||
return _this.onWindowResized(); | ||
}, _this.props.speed)); | ||
} else { | ||
_this.onWindowResized(); | ||
} | ||
}); | ||
_this.ro.observe(_this.list); | ||
Array.from(document.querySelectorAll('.slick-slide')).forEach(function (slide) { | ||
Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"), function (slide) { | ||
slide.onfocus = _this.props.pauseOnFocus ? _this.onSlideFocus : null; | ||
@@ -119,5 +127,5 @@ slide.onblur = _this.props.pauseOnFocus ? _this.onSlideBlur : null; | ||
if (window.addEventListener) { | ||
window.addEventListener('resize', _this.onWindowResized); | ||
window.addEventListener("resize", _this.onWindowResized); | ||
} else { | ||
window.attachEvent('onresize', _this.onWindowResized); | ||
window.attachEvent("onresize", _this.onWindowResized); | ||
} | ||
@@ -140,5 +148,5 @@ }; | ||
if (window.addEventListener) { | ||
window.removeEventListener('resize', _this.onWindowResized); | ||
window.removeEventListener("resize", _this.onWindowResized); | ||
} else { | ||
window.detachEvent('onresize', _this.onWindowResized); | ||
window.detachEvent("onresize", _this.onWindowResized); | ||
} | ||
@@ -151,7 +159,37 @@ if (_this.autoplayTimer) { | ||
_this.componentWillReceiveProps = function (nextProps) { | ||
var spec = _extends({ listRef: _this.list, trackRef: _this.track }, nextProps, _this.state); | ||
_this.updateState(spec, false, function () { | ||
var spec = _extends({ | ||
listRef: _this.list, | ||
trackRef: _this.track | ||
}, nextProps, _this.state); | ||
var setTrackStyle = false; | ||
for (var _iterator = Object.keys(_this.props), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { | ||
var _ref; | ||
if (_isArray) { | ||
if (_i >= _iterator.length) break; | ||
_ref = _iterator[_i++]; | ||
} else { | ||
_i = _iterator.next(); | ||
if (_i.done) break; | ||
_ref = _i.value; | ||
} | ||
var key = _ref; | ||
if (!nextProps.hasOwnProperty(key)) { | ||
setTrackStyle = true; | ||
break; | ||
} | ||
if (_typeof(nextProps[key]) === "object" || typeof nextProps[key] === "function") { | ||
continue; | ||
} | ||
if (nextProps[key] !== _this.props[key]) { | ||
setTrackStyle = true; | ||
break; | ||
} | ||
} | ||
_this.updateState(spec, setTrackStyle, function () { | ||
if (_this.state.currentSlide >= _react2.default.Children.count(nextProps.children)) { | ||
_this.changeSlide({ | ||
message: 'index', | ||
message: "index", | ||
index: _react2.default.Children.count(nextProps.children) - nextProps.slidesToShow, | ||
@@ -162,5 +200,5 @@ currentSlide: _this.state.currentSlide | ||
if (nextProps.autoplay) { | ||
_this.autoPlay('update'); | ||
_this.autoPlay("update"); | ||
} else { | ||
_this.pause('paused'); | ||
_this.pause("paused"); | ||
} | ||
@@ -176,4 +214,6 @@ }); | ||
if (slidesToLoad.length > 0) { | ||
_this.setState(function (prevState, props) { | ||
return { lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad) }; | ||
_this.setState(function (prevState) { | ||
return { | ||
lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad) | ||
}; | ||
}); | ||
@@ -191,7 +231,20 @@ if (_this.props.onLazyLoad) { | ||
_this.onWindowResized = function () { | ||
_this.onWindowResized = function (setTrackStyle) { | ||
if (_this.debouncedResize) _this.debouncedResize.cancel(); | ||
_this.debouncedResize = (0, _lodash2.default)(function () { | ||
return _this.resizeWindow(setTrackStyle); | ||
}, 50); | ||
_this.debouncedResize(); | ||
}; | ||
_this.resizeWindow = function () { | ||
var setTrackStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; | ||
if (!_reactDom2.default.findDOMNode(_this.track)) return; | ||
var spec = _extends({ listRef: _this.list, trackRef: _this.track }, _this.props, _this.state); | ||
_this.updateState(spec, true, function () { | ||
if (_this.props.autoplay) _this.autoPlay('update');else _this.pause('paused'); | ||
var spec = _extends({ | ||
listRef: _this.list, | ||
trackRef: _this.track | ||
}, _this.props, _this.state); | ||
_this.updateState(spec, setTrackStyle, function () { | ||
if (_this.props.autoplay) _this.autoPlay("update");else _this.pause("paused"); | ||
}); | ||
@@ -213,3 +266,3 @@ // animating state should be cleared while resizing, otherwise autoplay stops working | ||
if (setTrackStyle || _react2.default.Children.count(_this.props.children) !== _react2.default.Children.count(spec.children)) { | ||
updatedState['trackStyle'] = trackStyle; | ||
updatedState["trackStyle"] = trackStyle; | ||
} | ||
@@ -219,7 +272,64 @@ _this.setState(updatedState, callback); | ||
_this.ssrInit = function () { | ||
if (_this.props.variableWidth) { | ||
var _trackWidth = 0, | ||
_trackLeft = 0; | ||
var childrenWidths = []; | ||
var preClones = (0, _innerSliderUtils.getPreClones)(_extends({}, _this.props, _this.state, { | ||
slideCount: _this.props.children.length | ||
})); | ||
var postClones = (0, _innerSliderUtils.getPostClones)(_extends({}, _this.props, _this.state, { | ||
slideCount: _this.props.children.length | ||
})); | ||
_this.props.children.forEach(function (child) { | ||
childrenWidths.push(child.props.style.width); | ||
_trackWidth += child.props.style.width; | ||
}); | ||
for (var i = 0; i < preClones; i++) { | ||
_trackLeft += childrenWidths[childrenWidths.length - 1 - i]; | ||
_trackWidth += childrenWidths[childrenWidths.length - 1 - i]; | ||
} | ||
for (var _i2 = 0; _i2 < postClones; _i2++) { | ||
_trackWidth += childrenWidths[_i2]; | ||
} | ||
for (var _i3 = 0; _i3 < _this.state.currentSlide; _i3++) { | ||
_trackLeft += childrenWidths[_i3]; | ||
} | ||
var _trackStyle = { | ||
width: _trackWidth + "px", | ||
left: -_trackLeft + "px" | ||
}; | ||
if (_this.props.centerMode) { | ||
var currentWidth = childrenWidths[_this.state.currentSlide] + "px"; | ||
_trackStyle.left = "calc(" + _trackStyle.left + " + (100% - " + currentWidth + ") / 2 ) "; | ||
} | ||
_this.setState({ | ||
trackStyle: _trackStyle | ||
}); | ||
return; | ||
} | ||
var childrenCount = _react2.default.Children.count(_this.props.children); | ||
var spec = _extends({}, _this.props, _this.state, { slideCount: childrenCount }); | ||
var slideCount = (0, _innerSliderUtils.getPreClones)(spec) + (0, _innerSliderUtils.getPostClones)(spec) + childrenCount; | ||
var trackWidth = 100 / _this.props.slidesToShow * slideCount; | ||
var slideWidth = 100 / slideCount; | ||
var trackLeft = -slideWidth * ((0, _innerSliderUtils.getPreClones)(spec) + _this.state.currentSlide) * trackWidth / 100; | ||
if (_this.props.centerMode) { | ||
trackLeft += (100 - slideWidth * trackWidth / 100) / 2; | ||
} | ||
var trackStyle = { | ||
width: trackWidth + "%", | ||
left: trackLeft + "%" | ||
}; | ||
_this.setState({ | ||
slideWidth: slideWidth + "%", | ||
trackStyle: trackStyle | ||
}); | ||
}; | ||
_this.checkImagesLoad = function () { | ||
var images = document.querySelectorAll('.slick-slide img'); | ||
var images = document.querySelectorAll(".slick-slide img"); | ||
var imagesCount = images.length, | ||
loadedCount = 0; | ||
Array.from(images).forEach(function (image) { | ||
Array.prototype.forEach.call(images, function (image) { | ||
var handler = function handler() { | ||
@@ -273,3 +383,5 @@ return ++loadedCount && loadedCount >= imagesCount && _this.onWindowResized(); | ||
_this.setState(function (state) { | ||
return { lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad) }; | ||
return { | ||
lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad) | ||
}; | ||
}); | ||
@@ -288,2 +400,3 @@ if (_this.props.onLazyLoad) { | ||
_this.slideHandler = function (index) { | ||
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
var _this$props = _this.props, | ||
@@ -297,3 +410,8 @@ asNavFor = _this$props.asNavFor, | ||
var _slideHandler = (0, _innerSliderUtils.slideHandler)(_extends({ index: index }, _this.props, _this.state, { trackRef: _this.track })), | ||
var _slideHandler = (0, _innerSliderUtils.slideHandler)(_extends({ | ||
index: index | ||
}, _this.props, _this.state, { | ||
trackRef: _this.track, | ||
useCSS: _this.props.useCSS && !dontAnimate | ||
})), | ||
state = _slideHandler.state, | ||
@@ -310,5 +428,6 @@ nextState = _slideHandler.nextState; | ||
asNavFor && asNavFor.innerSlider.state.currentSlide !== currentSlide && asNavFor.innerSlider.slideHandler(index); | ||
if (!nextState) return; | ||
_this.animationEndCallback = setTimeout(function () { | ||
var animating = nextState.animating, | ||
firstBatch = _objectWithoutProperties(nextState, ['animating']); | ||
firstBatch = _objectWithoutProperties(nextState, ["animating"]); | ||
@@ -327,11 +446,25 @@ _this.setState(firstBatch, function () { | ||
_this.changeSlide = function (options) { | ||
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
var spec = _extends({}, _this.props, _this.state); | ||
var targetSlide = (0, _innerSliderUtils.changeSlide)(spec, options); | ||
if (targetSlide !== 0 && !targetSlide) return; | ||
_this.slideHandler(targetSlide); | ||
if (dontAnimate === true) { | ||
_this.slideHandler(targetSlide, dontAnimate); | ||
} else { | ||
_this.slideHandler(targetSlide); | ||
} | ||
}; | ||
_this.clickHandler = function (e) { | ||
if (_this.clickable === false) { | ||
e.stopPropagation(); | ||
e.preventDefault(); | ||
} | ||
_this.clickable = true; | ||
}; | ||
_this.keyHandler = function (e) { | ||
var dir = (0, _innerSliderUtils.keyHandler)(e, _this.props.accessibility, _this.props.rtl); | ||
dir !== '' && _this.changeSlide({ message: dir }); | ||
dir !== "" && _this.changeSlide({ message: dir }); | ||
}; | ||
@@ -343,5 +476,21 @@ | ||
_this.disableBodyScroll = function () { | ||
var preventDefault = function preventDefault(e) { | ||
e = e || window.event; | ||
if (e.preventDefault) e.preventDefault(); | ||
e.returnValue = false; | ||
}; | ||
window.ontouchmove = preventDefault; | ||
}; | ||
_this.enableBodyScroll = function () { | ||
window.ontouchmove = null; | ||
}; | ||
_this.swipeStart = function (e) { | ||
if (_this.props.verticalSwiping) { | ||
_this.disableBodyScroll(); | ||
} | ||
var state = (0, _innerSliderUtils.swipeStart)(e, _this.props.swipe, _this.props.draggable); | ||
state !== '' && _this.setState(state); | ||
state !== "" && _this.setState(state); | ||
}; | ||
@@ -356,2 +505,5 @@ | ||
if (!state) return; | ||
if (state["swiping"]) { | ||
_this.clickable = false; | ||
} | ||
_this.setState(state); | ||
@@ -367,7 +519,10 @@ }; | ||
if (!state) return; | ||
var triggerSlideHandler = state['triggerSlideHandler']; | ||
delete state['triggerSlideHandler']; | ||
var triggerSlideHandler = state["triggerSlideHandler"]; | ||
delete state["triggerSlideHandler"]; | ||
_this.setState(state); | ||
if (triggerSlideHandler === undefined) return; | ||
_this.slideHandler(triggerSlideHandler); | ||
if (_this.props.verticalSwiping) { | ||
_this.enableBodyScroll(); | ||
} | ||
}; | ||
@@ -380,3 +535,3 @@ | ||
_this.callbackTimers.push(setTimeout(function () { | ||
return _this.changeSlide({ message: 'previous' }); | ||
return _this.changeSlide({ message: "previous" }); | ||
}, 0)); | ||
@@ -387,3 +542,3 @@ }; | ||
_this.callbackTimers.push(setTimeout(function () { | ||
return _this.changeSlide({ message: 'next' }); | ||
return _this.changeSlide({ message: "next" }); | ||
}, 0)); | ||
@@ -393,10 +548,12 @@ }; | ||
_this.slickGoTo = function (slide) { | ||
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
slide = Number(slide); | ||
if (isNaN(slide)) return ''; | ||
if (isNaN(slide)) return ""; | ||
_this.callbackTimers.push(setTimeout(function () { | ||
return _this.changeSlide({ | ||
message: 'index', | ||
message: "index", | ||
index: slide, | ||
currentSlide: _this.state.currentSlide | ||
}); | ||
}, dontAnimate); | ||
}, 0)); | ||
@@ -422,16 +579,15 @@ }; | ||
if (_this.autoplayTimer) { | ||
console.warn("autoPlay is triggered more than once"); | ||
clearInterval(_this.autoplayTimer); | ||
} | ||
var autoplaying = _this.state.autoplaying; | ||
if (playType === 'update') { | ||
if (autoplaying === 'hovered' || autoplaying === 'focused' || autoplaying === 'paused') { | ||
if (playType === "update") { | ||
if (autoplaying === "hovered" || autoplaying === "focused" || autoplaying === "paused") { | ||
return; | ||
} | ||
} else if (playType === 'leave') { | ||
if (autoplaying === 'paused' || autoplaying === 'focused') { | ||
} else if (playType === "leave") { | ||
if (autoplaying === "paused" || autoplaying === "focused") { | ||
return; | ||
} | ||
} else if (playType === 'blur') { | ||
if (autoplaying === 'paused' || autoplaying === 'hovered') { | ||
} else if (playType === "blur") { | ||
if (autoplaying === "paused" || autoplaying === "hovered") { | ||
return; | ||
@@ -441,3 +597,3 @@ } | ||
_this.autoplayTimer = setInterval(_this.play, _this.props.autoplaySpeed + 50); | ||
_this.setState({ autoplaying: 'playing' }); | ||
_this.setState({ autoplaying: "playing" }); | ||
}; | ||
@@ -451,12 +607,12 @@ | ||
var autoplaying = _this.state.autoplaying; | ||
if (pauseType === 'paused') { | ||
_this.setState({ autoplaying: 'paused' }); | ||
} else if (pauseType === 'focused') { | ||
if (autoplaying === 'hovered' || autoplaying === 'playing') { | ||
_this.setState({ autoplaying: 'focused' }); | ||
if (pauseType === "paused") { | ||
_this.setState({ autoplaying: "paused" }); | ||
} else if (pauseType === "focused") { | ||
if (autoplaying === "hovered" || autoplaying === "playing") { | ||
_this.setState({ autoplaying: "focused" }); | ||
} | ||
} else { | ||
// pauseType is 'hovered' | ||
if (autoplaying === 'playing') { | ||
_this.setState({ autoplaying: 'hovered' }); | ||
if (autoplaying === "playing") { | ||
_this.setState({ autoplaying: "hovered" }); | ||
} | ||
@@ -466,32 +622,33 @@ } | ||
_this.onDotsOver = function (e) { | ||
return _this.props.autoplay && _this.pause('hovered'); | ||
_this.onDotsOver = function () { | ||
return _this.props.autoplay && _this.pause("hovered"); | ||
}; | ||
_this.onDotsLeave = function (e) { | ||
return _this.props.autoplay && _this.state.autoplaying === 'hovered' && _this.autoPlay('leave'); | ||
_this.onDotsLeave = function () { | ||
return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave"); | ||
}; | ||
_this.onTrackOver = function (e) { | ||
return _this.props.autoplay && _this.pause('hovered'); | ||
_this.onTrackOver = function () { | ||
return _this.props.autoplay && _this.pause("hovered"); | ||
}; | ||
_this.onTrackLeave = function (e) { | ||
return _this.props.autoplay && _this.state.autoplaying === 'hovered' && _this.autoPlay('leave'); | ||
_this.onTrackLeave = function () { | ||
return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave"); | ||
}; | ||
_this.onSlideFocus = function (e) { | ||
return _this.props.autoplay && _this.pause('focused'); | ||
_this.onSlideFocus = function () { | ||
return _this.props.autoplay && _this.pause("focused"); | ||
}; | ||
_this.onSlideBlur = function (e) { | ||
return _this.props.autoplay && _this.state.autoplaying === 'focused' && _this.autoPlay('blur'); | ||
_this.onSlideBlur = function () { | ||
return _this.props.autoplay && _this.state.autoplaying === "focused" && _this.autoPlay("blur"); | ||
}; | ||
_this.render = function () { | ||
var className = (0, _classnames2.default)('regular', 'slider', 'slick-initialized', 'slick-slider', _this.props.className, { | ||
'slick-vertical': _this.props.vertical | ||
var className = (0, _classnames2.default)("slick-slider", _this.props.className, { | ||
"slick-vertical": _this.props.vertical, | ||
"slick-initialized": (0, _innerSliderUtils.canUseDOM)() | ||
}); | ||
var spec = _extends({}, _this.props, _this.state); | ||
var trackProps = (0, _innerSliderUtils.extractObject)(spec, ['fade', 'cssEase', 'speed', 'infinite', 'centerMode', 'focusOnSelect', 'currentSlide', 'lazyLoad', 'lazyLoadedList', 'rtl', 'slideWidth', 'slideHeight', 'listHeight', 'vertical', 'slidesToShow', 'slidesToScroll', 'slideCount', 'trackStyle', 'variableWidth', 'unslick', 'centerPadding']); | ||
var trackProps = (0, _innerSliderUtils.extractObject)(spec, ["fade", "cssEase", "speed", "infinite", "centerMode", "focusOnSelect", "currentSlide", "lazyLoad", "lazyLoadedList", "rtl", "slideWidth", "slideHeight", "listHeight", "vertical", "slidesToShow", "slidesToScroll", "slideCount", "trackStyle", "variableWidth", "unslick", "centerPadding"]); | ||
var pauseOnHover = _this.props.pauseOnHover; | ||
@@ -508,3 +665,3 @@ | ||
if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) { | ||
var dotProps = (0, _innerSliderUtils.extractObject)(spec, ['dotsClass', 'slideCount', 'slidesToShow', 'currentSlide', 'slidesToScroll', 'clickHandler', 'children', 'customPaging', 'infinite', 'appendDots']); | ||
var dotProps = (0, _innerSliderUtils.extractObject)(spec, ["dotsClass", "slideCount", "slidesToShow", "currentSlide", "slidesToScroll", "clickHandler", "children", "customPaging", "infinite", "appendDots"]); | ||
var pauseOnDotsHover = _this.props.pauseOnDotsHover; | ||
@@ -522,3 +679,3 @@ | ||
var prevArrow, nextArrow; | ||
var arrowProps = (0, _innerSliderUtils.extractObject)(spec, ['infinite', 'centerMode', 'currentSlide', 'slideCount', 'slidesToShow', 'prevArrow', 'nextArrow']); | ||
var arrowProps = (0, _innerSliderUtils.extractObject)(spec, ["infinite", "centerMode", "currentSlide", "slideCount", "slidesToShow", "prevArrow", "nextArrow"]); | ||
arrowProps.clickHandler = _this.changeSlide; | ||
@@ -544,3 +701,3 @@ | ||
centerPaddingStyle = { | ||
padding: '0px ' + _this.props.centerPadding | ||
padding: "0px " + _this.props.centerPadding | ||
}; | ||
@@ -551,3 +708,3 @@ } | ||
centerPaddingStyle = { | ||
padding: _this.props.centerPadding + ' 0px' | ||
padding: _this.props.centerPadding + " 0px" | ||
}; | ||
@@ -560,4 +717,5 @@ } | ||
var listProps = { | ||
className: 'slick-list', | ||
className: "slick-list", | ||
style: listStyle, | ||
onClick: _this.clickHandler, | ||
onMouseDown: touchMove ? _this.swipeStart : null, | ||
@@ -576,16 +734,15 @@ onMouseMove: _this.state.dragging && touchMove ? _this.swipeMove : null, | ||
className: className, | ||
dir: 'ltr' | ||
dir: "ltr" | ||
}; | ||
if (_this.props.unslick) { | ||
listProps = { className: 'slick-list' }; | ||
listProps = { className: "slick-list" }; | ||
innerSliderProps = { className: className }; | ||
} | ||
return _react2.default.createElement( | ||
'div', | ||
"div", | ||
innerSliderProps, | ||
!_this.props.unslick ? prevArrow : '', | ||
!_this.props.unslick ? prevArrow : "", | ||
_react2.default.createElement( | ||
'div', | ||
"div", | ||
_extends({ ref: _this.listRefHandler }, listProps), | ||
@@ -598,4 +755,4 @@ _react2.default.createElement( | ||
), | ||
!_this.props.unslick ? nextArrow : '', | ||
!_this.props.unslick ? dots : '' | ||
!_this.props.unslick ? nextArrow : "", | ||
!_this.props.unslick ? dots : "" | ||
); | ||
@@ -607,5 +764,8 @@ }; | ||
_this.state = _extends({}, _initialState2.default, { | ||
currentSlide: _this.props.initialSlide | ||
currentSlide: _this.props.initialSlide, | ||
slideCount: _react2.default.Children.count(_this.props.children) | ||
}); | ||
_this.callbackTimers = []; | ||
_this.clickable = true; | ||
_this.debouncedResize = null; | ||
return _this; | ||
@@ -612,0 +772,0 @@ } |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -7,20 +7,18 @@ exports.__esModule = true; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _innerSlider = require('./inner-slider'); | ||
var _innerSlider = require("./inner-slider"); | ||
var _json2mq = require('json2mq'); | ||
var _json2mq = require("json2mq"); | ||
var _json2mq2 = _interopRequireDefault(_json2mq); | ||
var _defaultProps = require('./default-props'); | ||
var _defaultProps = require("./default-props"); | ||
var _defaultProps2 = _interopRequireDefault(_defaultProps); | ||
var _canUseDom = require('can-use-dom'); | ||
var _innerSliderUtils = require("./utils/innerSliderUtils"); | ||
var _canUseDom2 = _interopRequireDefault(_canUseDom); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -34,3 +32,3 @@ | ||
var enquire = _canUseDom2.default && require('enquire.js'); | ||
var enquire = (0, _innerSliderUtils.canUseDOM)() && require("enquire.js"); | ||
@@ -58,11 +56,12 @@ var Slider = function (_React$Component) { | ||
_this.slickGoTo = function (slide) { | ||
return _this.innerSlider.slickGoTo(slide); | ||
var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
return _this.innerSlider.slickGoTo(slide, dontAnimate); | ||
}; | ||
_this.slickPause = function () { | ||
return _this.innerSlider.pause('paused'); | ||
return _this.innerSlider.pause("paused"); | ||
}; | ||
_this.slickPlay = function () { | ||
return _this.innerSlider.autoPlay('play'); | ||
return _this.innerSlider.autoPlay("play"); | ||
}; | ||
@@ -89,2 +88,7 @@ | ||
// performance monitoring | ||
//if (process.env.NODE_ENV !== 'production') { | ||
//const { whyDidYouUpdate } = require('why-did-you-update') | ||
//whyDidYouUpdate(React) | ||
//} | ||
if (this.props.responsive) { | ||
@@ -105,6 +109,9 @@ var breakpoints = this.props.responsive.map(function (breakpt) { | ||
} else { | ||
bQuery = (0, _json2mq2.default)({ minWidth: breakpoints[index - 1] + 1, maxWidth: breakpoint }); | ||
bQuery = (0, _json2mq2.default)({ | ||
minWidth: breakpoints[index - 1] + 1, | ||
maxWidth: breakpoint | ||
}); | ||
} | ||
// when not using server side rendering | ||
_canUseDom2.default && _this2.media(bQuery, function () { | ||
(0, _innerSliderUtils.canUseDOM)() && _this2.media(bQuery, function () { | ||
_this2.setState({ breakpoint: breakpoint }); | ||
@@ -118,3 +125,3 @@ }); | ||
_canUseDom2.default && this.media(query, function () { | ||
(0, _innerSliderUtils.canUseDOM)() && this.media(query, function () { | ||
_this2.setState({ breakpoint: null }); | ||
@@ -140,3 +147,3 @@ }); | ||
}); | ||
settings = newProps[0].settings === 'unslick' ? 'unslick' : _extends({}, _defaultProps2.default, this.props, newProps[0].settings); | ||
settings = newProps[0].settings === "unslick" ? "unslick" : _extends({}, _defaultProps2.default, this.props, newProps[0].settings); | ||
} else { | ||
@@ -148,4 +155,4 @@ settings = _extends({}, _defaultProps2.default, this.props); | ||
if (settings.centerMode) { | ||
if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== 'production') { | ||
console.warn('slidesToScroll should be equal to 1 in centerMode, you are using ' + settings.slidesToScroll); | ||
if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== "production") { | ||
console.warn("slidesToScroll should be equal to 1 in centerMode, you are using " + settings.slidesToScroll); | ||
} | ||
@@ -156,7 +163,7 @@ settings.slidesToScroll = 1; | ||
if (settings.fade) { | ||
if (settings.slidesToShow > 1 && process.env.NODE_ENV !== 'production') { | ||
console.warn('slidesToShow should be equal to 1 when fade is true, you\'re using ' + settings.slidesToShow); | ||
if (settings.slidesToShow > 1 && process.env.NODE_ENV !== "production") { | ||
console.warn("slidesToShow should be equal to 1 when fade is true, you're using " + settings.slidesToShow); | ||
} | ||
if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== 'production') { | ||
console.warn('slidesToScroll should be equal to 1 when fade is true, you\'re using ' + settings.slidesToScroll); | ||
if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== "production") { | ||
console.warn("slidesToScroll should be equal to 1 when fade is true, you're using " + settings.slidesToScroll); | ||
} | ||
@@ -173,3 +180,3 @@ settings.slidesToShow = 1; | ||
children = children.filter(function (child) { | ||
if (typeof child === 'string') { | ||
if (typeof child === "string") { | ||
return !!child.trim(); | ||
@@ -180,11 +187,56 @@ } | ||
if (settings === 'unslick') { | ||
// rows and slidesPerRow logic is handled here | ||
if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) { | ||
console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"); | ||
settings.variableWidth = false; | ||
} | ||
var newChildren = []; | ||
var currentWidth = null; | ||
for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) { | ||
var newSlide = []; | ||
for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) { | ||
var row = []; | ||
for (var k = j; k < j + settings.slidesPerRow; k += 1) { | ||
if (settings.variableWidth && children[k].props.style) { | ||
currentWidth = children[k].props.style.width; | ||
} | ||
if (k >= children.length) break; | ||
row.push(_react2.default.cloneElement(children[k], { | ||
key: 100 * i + 10 * j + k, | ||
tabIndex: -1, | ||
style: { | ||
width: 100 / settings.slidesPerRow + "%", | ||
display: "inline-block" | ||
} | ||
})); | ||
} | ||
newSlide.push(_react2.default.createElement( | ||
"div", | ||
{ key: 10 * i + j }, | ||
row | ||
)); | ||
} | ||
if (settings.variableWidth) { | ||
newChildren.push(_react2.default.createElement( | ||
"div", | ||
{ key: i, style: { width: currentWidth } }, | ||
newSlide | ||
)); | ||
} else { | ||
newChildren.push(_react2.default.createElement( | ||
"div", | ||
{ key: i }, | ||
newSlide | ||
)); | ||
} | ||
} | ||
var className = 'regular slider ' + (this.props.className || ''); | ||
if (settings === "unslick") { | ||
var className = "regular slider " + (this.props.className || ""); | ||
return _react2.default.createElement( | ||
'div', | ||
"div", | ||
{ className: className }, | ||
children | ||
newChildren | ||
); | ||
} else if (children.length <= settings.slidesToShow) { | ||
} else if (newChildren.length <= settings.slidesToShow) { | ||
settings.unslick = true; | ||
@@ -195,3 +247,3 @@ } | ||
_extends({ ref: this.innerSliderRefHandler }, settings), | ||
children | ||
newChildren | ||
); | ||
@@ -198,0 +250,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -8,11 +8,11 @@ exports.__esModule = true; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _classnames = require('classnames'); | ||
var _classnames = require("classnames"); | ||
var _classnames2 = _interopRequireDefault(_classnames); | ||
var _innerSliderUtils = require('./utils/innerSliderUtils'); | ||
var _innerSliderUtils = require("./utils/innerSliderUtils"); | ||
@@ -29,3 +29,2 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var getSlideClasses = function getSlideClasses(spec) { | ||
// if spec has currentSlideIndex, we can also apply slickCurrent class according to that (https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L2300-L2302) | ||
var slickActive, slickCenter, slickCloned; | ||
@@ -35,6 +34,4 @@ var centerOffset, index; | ||
if (spec.rtl) { | ||
// if we're going right to left, index is reversed | ||
index = spec.slideCount - 1 - spec.index; | ||
} else { | ||
// index of the slide | ||
index = spec.index; | ||
@@ -45,3 +42,3 @@ } | ||
centerOffset = Math.floor(spec.slidesToShow / 2); | ||
slickCenter = (index - spec.currentSlide) % spec.slideCount === 0; // concern: not sure if this should be correct (https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L2328-L2346) | ||
slickCenter = (index - spec.currentSlide) % spec.slideCount === 0; | ||
if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) { | ||
@@ -51,13 +48,12 @@ slickActive = true; | ||
} else { | ||
// concern: following can be incorrect in case where currentSlide is lastSlide in frame and rest of the slides to show have index smaller than currentSlideIndex | ||
slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow; | ||
} | ||
var slickCurrent = index === spec.currentSlide; | ||
return (0, _classnames2.default)({ | ||
'slick-slide': true, | ||
'slick-active': slickActive, | ||
'slick-center': slickCenter, | ||
'slick-cloned': slickCloned, | ||
'slick-current': slickCurrent // dubious in case of RTL | ||
}); | ||
return { | ||
"slick-slide": true, | ||
"slick-active": slickActive, | ||
"slick-center": slickCenter, | ||
"slick-cloned": slickCloned, | ||
"slick-current": slickCurrent // dubious in case of RTL | ||
}; | ||
}; | ||
@@ -73,11 +69,11 @@ | ||
if (spec.fade) { | ||
style.position = 'relative'; | ||
style.position = "relative"; | ||
if (spec.vertical) { | ||
style.top = -spec.index * spec.slideHeight; | ||
style.top = -spec.index * parseInt(spec.slideHeight); | ||
} else { | ||
style.left = -spec.index * spec.slideWidth; | ||
style.left = -spec.index * parseInt(spec.slideWidth); | ||
} | ||
style.opacity = spec.currentSlide === spec.index ? 1 : 0; | ||
style.transition = 'opacity ' + spec.speed + 'ms ' + spec.cssEase + ', ' + 'visibility ' + spec.speed + 'ms ' + spec.cssEase; | ||
style.WebkitTransition = 'opacity ' + spec.speed + 'ms ' + spec.cssEase + ', ' + 'visibility ' + spec.speed + 'ms ' + spec.cssEase; | ||
style.transition = "opacity " + spec.speed + "ms " + spec.cssEase + ", " + "visibility " + spec.speed + "ms " + spec.cssEase; | ||
style.WebkitTransition = "opacity " + spec.speed + "ms " + spec.cssEase + ", " + "visibility " + spec.speed + "ms " + spec.cssEase; | ||
} | ||
@@ -104,3 +100,3 @@ | ||
var childOnClickOptions = { | ||
message: 'children', | ||
message: "children", | ||
index: index, | ||
@@ -115,14 +111,15 @@ slidesToScroll: spec.slidesToScroll, | ||
} else { | ||
child = _react2.default.createElement('div', null); | ||
child = _react2.default.createElement("div", null); | ||
} | ||
var childStyle = getSlideStyle(_extends({}, spec, { index: index })); | ||
var slideClass = child.props.className || ''; | ||
var slideClass = child.props.className || ""; | ||
var slideClasses = getSlideClasses(_extends({}, spec, { index: index })); | ||
// push a cloned element of the desired slide | ||
slides.push(_react2.default.cloneElement(child, { | ||
key: 'original' + getKey(child, index), | ||
'data-index': index, | ||
className: (0, _classnames2.default)(getSlideClasses(_extends({}, spec, { index: index })), slideClass), | ||
tabIndex: '-1', | ||
style: _extends({ outline: 'none' }, child.props.style || {}, childStyle), | ||
key: "original" + getKey(child, index), | ||
"data-index": index, | ||
className: (0, _classnames2.default)(slideClasses, slideClass), | ||
tabIndex: "-1", | ||
"aria-hidden": !slideClasses["slick-active"], | ||
style: _extends({ outline: "none" }, child.props.style || {}, childStyle), | ||
onClick: function onClick(e) { | ||
@@ -144,7 +141,9 @@ child.props && child.props.onClick && child.props.onClick(e); | ||
} | ||
slideClasses = getSlideClasses(_extends({}, spec, { index: key })); | ||
preCloneSlides.push(_react2.default.cloneElement(child, { | ||
key: 'precloned' + getKey(child, key), | ||
'data-index': key, | ||
tabIndex: '-1', | ||
className: (0, _classnames2.default)(getSlideClasses(_extends({}, spec, { index: key })), slideClass), | ||
key: "precloned" + getKey(child, key), | ||
"data-index": key, | ||
tabIndex: "-1", | ||
className: (0, _classnames2.default)(slideClasses, slideClass), | ||
"aria-hidden": !slideClasses["slick-active"], | ||
style: _extends({}, child.props.style || {}, childStyle), | ||
@@ -165,7 +164,9 @@ onClick: function onClick(e) { | ||
} | ||
slideClasses = getSlideClasses(_extends({}, spec, { index: key })); | ||
postCloneSlides.push(_react2.default.cloneElement(child, { | ||
key: 'postcloned' + getKey(child, key), | ||
'data-index': key, | ||
tabIndex: '-1', | ||
className: (0, _classnames2.default)(getSlideClasses(_extends({}, spec, { index: key })), slideClass), | ||
key: "postcloned" + getKey(child, key), | ||
"data-index": key, | ||
tabIndex: "-1", | ||
className: (0, _classnames2.default)(slideClasses, slideClass), | ||
"aria-hidden": !slideClasses["slick-active"], | ||
style: _extends({}, child.props.style || {}, childStyle), | ||
@@ -190,4 +191,4 @@ onClick: function onClick(e) { | ||
var Track = exports.Track = function (_React$Component) { | ||
_inherits(Track, _React$Component); | ||
var Track = exports.Track = function (_React$PureComponent) { | ||
_inherits(Track, _React$PureComponent); | ||
@@ -197,3 +198,3 @@ function Track() { | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
return _possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments)); | ||
} | ||
@@ -210,4 +211,7 @@ | ||
return _react2.default.createElement( | ||
'div', | ||
_extends({ className: 'slick-track', style: this.props.trackStyle }, mouseEvents), | ||
"div", | ||
_extends({ | ||
className: "slick-track", | ||
style: this.props.trackStyle | ||
}, mouseEvents), | ||
slides | ||
@@ -218,2 +222,2 @@ ); | ||
return Track; | ||
}(_react2.default.Component); | ||
}(_react2.default.PureComponent); |
@@ -1,13 +0,13 @@ | ||
'use strict'; | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.slidesOnLeft = exports.slidesOnRight = exports.siblingDirection = exports.getTotalSlides = exports.getPostClones = exports.getPreClones = exports.getTrackLeft = exports.getTrackAnimateCSS = exports.getTrackCSS = exports.checkSpecKeys = exports.getSlideCount = exports.checkNavigable = exports.getNavigableIndexes = exports.swipeEnd = exports.swipeMove = exports.swipeStart = exports.keyHandler = exports.changeSlide = exports.slideHandler = exports.initializedState = exports.extractObject = exports.canGoNext = exports.getSwipeDirection = exports.getHeight = exports.getWidth = exports.lazySlidesOnRight = exports.lazySlidesOnLeft = exports.lazyEndIndex = exports.lazyStartIndex = exports.getRequiredLazySlides = exports.getOnDemandLazySlides = undefined; | ||
exports.canUseDOM = exports.slidesOnLeft = exports.slidesOnRight = exports.siblingDirection = exports.getTotalSlides = exports.getPostClones = exports.getPreClones = exports.getTrackLeft = exports.getTrackAnimateCSS = exports.getTrackCSS = exports.checkSpecKeys = exports.getSlideCount = exports.checkNavigable = exports.getNavigableIndexes = exports.swipeEnd = exports.swipeMove = exports.swipeStart = exports.keyHandler = exports.changeSlide = exports.slideHandler = exports.initializedState = exports.extractObject = exports.canGoNext = exports.getSwipeDirection = exports.getHeight = exports.getWidth = exports.lazySlidesOnRight = exports.lazySlidesOnLeft = exports.lazyEndIndex = exports.lazyStartIndex = exports.getRequiredLazySlides = exports.getOnDemandLazySlides = undefined; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _react = require('react'); | ||
var _react = require("react"); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _reactDom = require('react-dom'); | ||
var _reactDom = require("react-dom"); | ||
@@ -74,16 +74,16 @@ var _reactDom2 = _interopRequireDefault(_reactDom); | ||
if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) { | ||
return 'left'; | ||
return "left"; | ||
} | ||
if (swipeAngle >= 135 && swipeAngle <= 225) { | ||
return 'right'; | ||
return "right"; | ||
} | ||
if (verticalSwiping === true) { | ||
if (swipeAngle >= 35 && swipeAngle <= 135) { | ||
return 'up'; | ||
return "up"; | ||
} else { | ||
return 'down'; | ||
return "down"; | ||
} | ||
} | ||
return 'vertical'; | ||
return "vertical"; | ||
}; | ||
@@ -122,3 +122,3 @@ | ||
var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2; | ||
if (typeof spec.centerPadding === 'string' && spec.centerPadding.slice(-1) === '%') { | ||
if (typeof spec.centerPadding === "string" && spec.centerPadding.slice(-1) === "%") { | ||
centerPaddingAdj *= listWidth / 100; | ||
@@ -140,7 +140,15 @@ } | ||
var state = { slideCount: slideCount, slideWidth: slideWidth, listWidth: listWidth, trackWidth: trackWidth, currentSlide: currentSlide, | ||
slideHeight: slideHeight, listHeight: listHeight, lazyLoadedList: lazyLoadedList }; | ||
var state = { | ||
slideCount: slideCount, | ||
slideWidth: slideWidth, | ||
listWidth: listWidth, | ||
trackWidth: trackWidth, | ||
currentSlide: currentSlide, | ||
slideHeight: slideHeight, | ||
listHeight: listHeight, | ||
lazyLoadedList: lazyLoadedList | ||
}; | ||
if (spec.autoplaying === null && spec.autoplay) { | ||
state['autoplaying'] = 'playing'; | ||
state["autoplaying"] = "playing"; | ||
} | ||
@@ -160,6 +168,3 @@ | ||
lazyLoad = spec.lazyLoad, | ||
onLazyLoad = spec.onLazyLoad, | ||
asNavFor = spec.asNavFor, | ||
currentSlide = spec.currentSlide, | ||
speed = spec.speed, | ||
centerMode = spec.centerMode, | ||
@@ -242,4 +247,2 @@ slidesToScroll = spec.slidesToScroll, | ||
slidesToShow = spec.slidesToShow, | ||
centerMode = spec.centerMode, | ||
rtl = spec.rtl, | ||
slideCount = spec.slideCount, | ||
@@ -253,3 +256,3 @@ currentSlide = spec.currentSlide, | ||
if (options.message === 'previous') { | ||
if (options.message === "previous") { | ||
slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset; | ||
@@ -261,3 +264,3 @@ targetSlide = currentSlide - slideOffset; | ||
} | ||
} else if (options.message === 'next') { | ||
} else if (options.message === "next") { | ||
slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset; | ||
@@ -268,3 +271,3 @@ targetSlide = currentSlide + slideOffset; | ||
} | ||
} else if (options.message === 'dots') { | ||
} else if (options.message === "dots") { | ||
// Click on dots | ||
@@ -275,3 +278,3 @@ targetSlide = options.index * options.slidesToScroll; | ||
} | ||
} else if (options.message === 'children') { | ||
} else if (options.message === "children") { | ||
// Click on the slides | ||
@@ -284,9 +287,9 @@ targetSlide = options.index; | ||
var direction = siblingDirection(_extends({}, spec, { targetSlide: targetSlide })); | ||
if (targetSlide > options.currentSlide && direction === 'left') { | ||
if (targetSlide > options.currentSlide && direction === "left") { | ||
targetSlide = targetSlide - slideCount; | ||
} else if (targetSlide < options.currentSlide && direction === 'right') { | ||
} else if (targetSlide < options.currentSlide && direction === "right") { | ||
targetSlide = targetSlide + slideCount; | ||
} | ||
} | ||
} else if (options.message === 'index') { | ||
} else if (options.message === "index") { | ||
targetSlide = Number(options.index); | ||
@@ -300,11 +303,11 @@ if (targetSlide === options.currentSlide) { | ||
var keyHandler = exports.keyHandler = function keyHandler(e, accessibility, rtl) { | ||
if (e.target.tagName.match('TEXTAREA|INPUT|SELECT') || !accessibility) return ''; | ||
if (e.keyCode === 37) return rtl ? 'next' : 'previous'; | ||
if (e.keyCode === 39) return rtl ? 'previous' : 'next'; | ||
return ''; | ||
if (e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !accessibility) return ""; | ||
if (e.keyCode === 37) return rtl ? "next" : "previous"; | ||
if (e.keyCode === 39) return rtl ? "previous" : "next"; | ||
return ""; | ||
}; | ||
var swipeStart = exports.swipeStart = function swipeStart(e, swipe, draggable) { | ||
e.target.tagName === 'IMG' && e.preventDefault(); | ||
if (!swipe || !draggable && e.type.indexOf('mouse') !== -1) return ''; | ||
e.target.tagName === "IMG" && e.preventDefault(); | ||
if (!swipe || !draggable && e.type.indexOf("mouse") !== -1) return ""; | ||
return { | ||
@@ -363,7 +366,7 @@ dragging: true, | ||
if (!infinite) { | ||
if (currentSlide === 0 && swipeDirection === 'right' || currentSlide + 1 >= dotCount && swipeDirection === 'left' || !canGoNext(spec) && swipeDirection === 'left') { | ||
if (currentSlide === 0 && swipeDirection === "right" || currentSlide + 1 >= dotCount && swipeDirection === "left" || !canGoNext(spec) && swipeDirection === "left") { | ||
touchSwipeLength = touchObject.swipeLength * edgeFriction; | ||
if (edgeDragged === false && onEdge) { | ||
onEdge(swipeDirection); | ||
state['edgeDragged'] = true; | ||
state["edgeDragged"] = true; | ||
} | ||
@@ -374,3 +377,3 @@ } | ||
swipeEvent(swipeDirection); | ||
state['swiped'] = true; | ||
state["swiped"] = true; | ||
} | ||
@@ -398,3 +401,3 @@ if (!vertical) { | ||
if (touchObject.swipeLength > 10) { | ||
state['swiping'] = true; | ||
state["swiping"] = true; | ||
e.preventDefault(); | ||
@@ -447,13 +450,13 @@ } | ||
switch (swipeDirection) { | ||
case 'left': | ||
case 'up': | ||
case "left": | ||
case "up": | ||
newSlide = currentSlide + getSlideCount(spec); | ||
slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide; | ||
state['currentDirection'] = 0; | ||
state["currentDirection"] = 0; | ||
break; | ||
case 'right': | ||
case 'down': | ||
case "right": | ||
case "down": | ||
newSlide = currentSlide - getSlideCount(spec); | ||
slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide; | ||
state['currentDirection'] = 1; | ||
state["currentDirection"] = 1; | ||
break; | ||
@@ -463,7 +466,7 @@ default: | ||
} | ||
state['triggerSlideHandler'] = slideCount; | ||
state["triggerSlideHandler"] = slideCount; | ||
} else { | ||
// Adjust the track back to it's original position. | ||
var currentLeft = getTrackLeft(spec); | ||
state['trackStyle'] = getTrackAnimateCSS(_extends({}, spec, { left: currentLeft })); | ||
state["trackStyle"] = getTrackAnimateCSS(_extends({}, spec, { left: currentLeft })); | ||
} | ||
@@ -505,3 +508,3 @@ return state; | ||
var slickList = _reactDom2.default.findDOMNode(spec.listRef); | ||
var slides = slickList.querySelectorAll('.slick-slide'); | ||
var slides = slickList.querySelectorAll(".slick-slide"); | ||
Array.from(slides).every(function (slide) { | ||
@@ -537,7 +540,7 @@ if (!spec.vertical) { | ||
return value && spec.hasOwnProperty(key); | ||
}, true) ? null : console.error('Keys Missing:', spec); | ||
}, true) ? null : console.error("Keys Missing:", spec); | ||
}; | ||
var getTrackCSS = exports.getTrackCSS = function getTrackCSS(spec) { | ||
checkSpecKeys(spec, ['left', 'variableWidth', 'slideCount', 'slidesToShow', 'slideWidth']); | ||
checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth"]); | ||
var trackWidth = void 0, | ||
@@ -553,9 +556,9 @@ trackHeight = void 0; | ||
opacity: 1, | ||
transition: '', | ||
WebkitTransition: '' | ||
transition: "", | ||
WebkitTransition: "" | ||
}; | ||
if (spec.useTransform) { | ||
var WebkitTransform = !spec.vertical ? 'translate3d(' + spec.left + 'px, 0px, 0px)' : 'translate3d(0px, ' + spec.left + 'px, 0px)'; | ||
var transform = !spec.vertical ? 'translate3d(' + spec.left + 'px, 0px, 0px)' : 'translate3d(0px, ' + spec.left + 'px, 0px)'; | ||
var msTransform = !spec.vertical ? 'translateX(' + spec.left + 'px)' : 'translateY(' + spec.left + 'px)'; | ||
var WebkitTransform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)"; | ||
var transform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)"; | ||
var msTransform = !spec.vertical ? "translateX(" + spec.left + "px)" : "translateY(" + spec.left + "px)"; | ||
style = _extends({}, style, { | ||
@@ -568,5 +571,5 @@ WebkitTransform: WebkitTransform, | ||
if (spec.vertical) { | ||
style['top'] = spec.left; | ||
style["top"] = spec.left; | ||
} else { | ||
style['left'] = spec.left; | ||
style["left"] = spec.left; | ||
} | ||
@@ -581,5 +584,5 @@ } | ||
if (!spec.vertical) { | ||
style.marginLeft = spec.left + 'px'; | ||
style.marginLeft = spec.left + "px"; | ||
} else { | ||
style.marginTop = spec.left + 'px'; | ||
style.marginTop = spec.left + "px"; | ||
} | ||
@@ -591,13 +594,13 @@ } | ||
var getTrackAnimateCSS = exports.getTrackAnimateCSS = function getTrackAnimateCSS(spec) { | ||
checkSpecKeys(spec, ['left', 'variableWidth', 'slideCount', 'slidesToShow', 'slideWidth', 'speed', 'cssEase']); | ||
checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth", "speed", "cssEase"]); | ||
var style = getTrackCSS(spec); | ||
// useCSS is true by default so it can be undefined | ||
if (spec.useTransform) { | ||
style.WebkitTransition = '-webkit-transform ' + spec.speed + 'ms ' + spec.cssEase; | ||
style.transition = 'transform ' + spec.speed + 'ms ' + spec.cssEase; | ||
style.WebkitTransition = "-webkit-transform " + spec.speed + "ms " + spec.cssEase; | ||
style.transition = "transform " + spec.speed + "ms " + spec.cssEase; | ||
} else { | ||
if (spec.vertical) { | ||
style.transition = 'top ' + spec.speed + 'ms ' + spec.cssEase; | ||
style.transition = "top " + spec.speed + "ms " + spec.cssEase; | ||
} else { | ||
style.transition = 'left ' + spec.speed + 'ms ' + spec.cssEase; | ||
style.transition = "left " + spec.speed + "ms " + spec.cssEase; | ||
} | ||
@@ -608,3 +611,2 @@ } | ||
var getTrackLeft = exports.getTrackLeft = function getTrackLeft(spec) { | ||
if (spec.unslick) { | ||
@@ -614,3 +616,3 @@ return 0; | ||
checkSpecKeys(spec, ['slideIndex', 'trackRef', 'infinite', 'centerMode', 'slideCount', 'slidesToShow', 'slidesToScroll', 'slideWidth', 'listWidth', 'variableWidth', 'slideHeight']); | ||
checkSpecKeys(spec, ["slideIndex", "trackRef", "infinite", "centerMode", "slideCount", "slidesToShow", "slidesToScroll", "slideWidth", "listWidth", "variableWidth", "slideHeight"]); | ||
@@ -672,3 +674,2 @@ var slideIndex = spec.slideIndex, | ||
var trackElem = _reactDom2.default.findDOMNode(trackRef); | ||
var lastSlide = trackElem && trackElem.children[slideCount - 1]; | ||
targetSlideIndex = slideIndex + getPreClones(spec); | ||
@@ -682,6 +683,6 @@ targetSlide = trackElem && trackElem.childNodes[targetSlideIndex]; | ||
for (var slide = 0; slide < targetSlideIndex; slide++) { | ||
targetLeft -= trackElem && trackElem.children[slide].offsetWidth; | ||
targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth; | ||
} | ||
targetLeft -= parseInt(spec.centerPadding); | ||
targetLeft += (listWidth - targetSlide.offsetWidth) / 2; | ||
targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2; | ||
} | ||
@@ -716,10 +717,10 @@ } | ||
if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) { | ||
return 'left'; | ||
return "left"; | ||
} | ||
return 'right'; | ||
return "right"; | ||
} else { | ||
if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) { | ||
return 'right'; | ||
return "right"; | ||
} | ||
return 'left'; | ||
return "left"; | ||
} | ||
@@ -764,2 +765,6 @@ }; | ||
return 0; | ||
}; | ||
var canUseDOM = exports.canUseDOM = function canUseDOM() { | ||
return !!(typeof window !== "undefined" && window.document && window.document.createElement); | ||
}; |
{ | ||
"name": "react-slick", | ||
"version": "0.22.3", | ||
"version": "0.23.0", | ||
"description": " React port of slick carousel", | ||
"main": "./lib", | ||
"files": [ | ||
"dist", | ||
"lib" | ||
], | ||
"files": ["dist", "lib"], | ||
"scripts": { | ||
@@ -14,5 +11,8 @@ "start": "gulp server", | ||
"prepublish": "babel ./src --out-dir ./lib && gulp dist", | ||
"test": "jest", | ||
"test": "eslint src && jest", | ||
"test:watch": "jest --watch", | ||
"lint": "eslint src" | ||
"lint": "eslint src", | ||
"gen": | ||
"node examples/scripts/generateExampleConfigs.js && node examples/scripts/generateExamples.js && xdg-open docs/jquery.html", | ||
"precommit": "lint-staged" | ||
}, | ||
@@ -53,2 +53,3 @@ "author": "Kiran Abburi", | ||
"eslint": "^3.6.1", | ||
"eslint-plugin-import": "^2.9.0", | ||
"eslint-plugin-react": "^6.3.0", | ||
@@ -59,2 +60,3 @@ "express": "^4.14.0", | ||
"gulp-sass": "^3.1.0", | ||
"husky": "^0.14.3", | ||
"jasmine-core": "^2.5.2", | ||
@@ -65,2 +67,3 @@ "jest": "^19.0.2", | ||
"json-loader": "^0.5.4", | ||
"lint-staged": "^7.0.3", | ||
"node-sass": "^4.5.2", | ||
@@ -79,10 +82,10 @@ "postcss-loader": "^1.3.3", | ||
"webpack": "^1.13.2", | ||
"webpack-dev-server": "^1.16.1" | ||
"webpack-dev-server": "^1.16.1", | ||
"why-did-you-update": "^0.1.1" | ||
}, | ||
"dependencies": { | ||
"can-use-dom": "^0.1.0", | ||
"classnames": "^2.2.5", | ||
"create-react-class": "^15.5.2", | ||
"enquire.js": "^2.1.6", | ||
"json2mq": "^0.2.0", | ||
"lodash.debounce": "^4.0.8", | ||
"resize-observer-polyfill": "^1.5.0" | ||
@@ -95,5 +98,3 @@ }, | ||
"jest": { | ||
"setupFiles": [ | ||
"./test-setup.js" | ||
], | ||
"setupFiles": ["./test-setup.js"], | ||
"testPathIgnorePatterns": [ | ||
@@ -104,2 +105,5 @@ "/__tests__/scripts.js", | ||
}, | ||
"lint-staged": { | ||
"*.{js,json,md}": ["prettier --write", "git add"] | ||
}, | ||
"npmName": "react-slick", | ||
@@ -109,5 +113,3 @@ "npmFileMap": [ | ||
"basePath": "/dist/", | ||
"files": [ | ||
"*.js" | ||
] | ||
"files": ["*.js"] | ||
} | ||
@@ -114,0 +116,0 @@ ], |
189
README.md
@@ -9,10 +9,12 @@ ### react-slick | ||
### Installation | ||
**npm** | ||
```bash | ||
npm install react-slick | ||
``` | ||
**yarn** | ||
```bash | ||
@@ -30,4 +32,2 @@ yarn add react-slick | ||
But be aware slick-carousel has a peer-dependancy on jQuery which you, or your colleagues may not like to see in your console output, so you can always grab the CSS from there and convert it into any CSS in JS solution that you might be using. | ||
or add cdn link in your html | ||
@@ -40,30 +40,12 @@ | ||
### [PlayGround](https://codesandbox.io/s/zzloxr09mp) | ||
Use [CodeSandbox template](https://codesandbox.io/s/zzloxr09mp) to try react-slick with different settings. | ||
<a href="https://opencollective.com/react-slick/donate" target="_blank"> | ||
<img src="https://opencollective.com/react-slick/donate/button@2x.png?color=blue" width=300 /> | ||
</a> | ||
### Filing issues | ||
Please replicate your issue with [CodeSandbox template](https://codesandbox.io/s/zzloxr09mp) and post it along with issue to make it easy for me to debug. | ||
### Starter Kit | ||
Checkout [yeoman generator](https://github.com/akiran/generator-react-slick) to quickly | ||
get started with react-slick. | ||
### Example | ||
```js | ||
import React from 'react' | ||
import Slider from 'react-slick' | ||
import React from "react"; | ||
import Slider from "react-slick"; | ||
class SimpleSlider extends React.Component { | ||
render () { | ||
render() { | ||
var settings = { | ||
@@ -78,8 +60,20 @@ dots: true, | ||
<Slider {...settings}> | ||
<div><h3>1</h3></div> | ||
<div><h3>2</h3></div> | ||
<div><h3>3</h3></div> | ||
<div><h3>4</h3></div> | ||
<div><h3>5</h3></div> | ||
<div><h3>6</h3></div> | ||
<div> | ||
<h3>1</h3> | ||
</div> | ||
<div> | ||
<h3>2</h3> | ||
</div> | ||
<div> | ||
<h3>3</h3> | ||
</div> | ||
<div> | ||
<h3>4</h3> | ||
</div> | ||
<div> | ||
<h3>5</h3> | ||
</div> | ||
<div> | ||
<h3>6</h3> | ||
</div> | ||
</Slider> | ||
@@ -93,132 +87,10 @@ ); | ||
Props | Type | Default Value | Description | Working | ||
---------------- | --------------- | ------------------------------- | ----------- | ------- | ||
`accessibility` | `bool` | `true` | Enable tabbing and arrow key navigation | Yes | ||
`adaptiveHeight` | `bool` | `false` | Adjust the slide's height automatically | Yes | ||
`afterChange` | `func` | `Default` | Index change callback. `index => ...` | Yes | ||
`appendDots` | `func` | `dots => <ul>{dots}</ul>` | Custom dots templates. Works same as customPaging | Yes | ||
`arrows` | `bool` | `true` | | Yes | ||
`asNavFor` | `ref` | `undefined` | provide ref to another slider and sync it with current slider| Yes | ||
`autoplaySpeed` | `int` | `3000` | Delay between each auto scroll (in milliseconds) | Yes | ||
`autoplay` | `bool` | `false` | | Yes | ||
`beforeChange` | `func` | `null` | Index change callback. `(oldIndex, newIndex) => ...` | Yes | ||
`centerMode` | `bool` | `false` | Center current slide | Yes | ||
`centerPadding` | `string` | `'50px'` | | Yes | ||
`className` | `string` | `''` | CSS class for inner slider div | Yes | ||
`cssEase` | | `'ease'` | | Yes | ||
`customPaging` | `func` | `i => <button>{i + 1}</button>` | Custom paging templates. [Example](examples/CustomPaging.js)| Yes | ||
`dotsClass` | `string` | `'slick-dots'` | CSS class for dots | Yes | ||
`dots` | `bool` | `Default` | | Yes | ||
`draggable` | `bool` | `true` | Enable scrollable via dragging on desktop | Yes | ||
`easing` | `string` | `'linear'` | | Yes | ||
`fade` | `bool` | `Default` | | Yes | ||
`focusOnSelect` | `bool` | `false` | Go to slide on click | Yes | ||
`infinite` | `bool` | `true` | Infinitely wrap around contents | Yes | ||
`initialSlide` | `int` | `0` | Index of first slide | Yes | ||
`lazyLoad` | `ondemand`/`progressive`| `null` | Load images or render components on demand or progressively | Yes | ||
`nextArrow` | React Element | `null` | React element for next arrow. [Example](examples/CustomArrows.js) | Yes | ||
`onEdge` | `func` | `null` | Edge dragged event in finite case, `direction => {...}` | Yes | ||
`onInit` | `func` | `null` | componentWillMount callback. `() => void` | Yes | ||
`onLazyLoad` | `func` | `null` | Callback after slides load lazily `slidesLoaded => {...}` | Yes | ||
`onReInit` | `func` | `null` | componentDidUpdate callback. `() => void` | Yes | ||
`onSwipe` | `func` | `null` | Callback after slide changes by swiping | Yes | ||
`pauseOnDotsHover`| `bool` | `false` | Prevents autoplay while hovering on dots | Yes | ||
`pauseOnFocus` | `bool` | `false` | Prevents autoplay while focused on slides | Yes | ||
`pauseOnHover` | `bool` | `true` | Prevents autoplay while hovering on track | Yes | ||
`prevArrow` | React Element | `null` | React element for prev arrow. [Example](examples/CustomArrows.js) | Yes | ||
`responsive` | `array` | `null` | Customize based on breakpoints (detailed explanation below) | Yes | ||
`rtl` | `bool` | `false` | Reverses the slide order | Yes | ||
`slide` | `string` | `'div'` | Slide container type | Yes | ||
`slidesToScroll` | `int` | `1` | How many slides to scroll at once | Yes | ||
`slidesToShow` | `int` | `1` | How many slides to show in one frame | Yes | ||
`speed` | `int` | `500` | Animation speed in milliseconds | Yes | ||
`swipeToSlide` | `bool` | `false` | Enable drag/swipe irrespective of `slidesToScroll` | Yes | ||
`swipe` | `bool` | `true` | Enable/disable swiping to change slides | Yes | ||
`touchMove` | `bool` | `true` | | Yes | ||
`touchThreshold` | `int` | `5` | | Yes | ||
`useCSS` | `bool` | `true` | Enable/Disable CSS Transitions | Yes | ||
`useTransform` | `bool` | `true` | Enable/Disable CSS transforms | Yes | ||
`variableWidth` | `bool` | `false` | | Yes | ||
`vertical` | `bool` | `false` | | Yes | ||
For all available props, go [here](https://react-slick.neostack.com/docs/api/). | ||
### Methods | ||
Name | Arguments | Description | ||
------------------|-----------------|------------------------- | ||
`slickPrev` | None | go to previous slide | ||
`slickNext` | None | go to next slide | ||
`slickGoTo` | index:number | go to the given slide index | ||
`slickPause` | None | pause the autoplay | ||
`slickPlay` | None | start the autoplay | ||
For all available methods, go [here](https://react-slick.neostack.com/docs/api#methods) | ||
#### Followings are not going to be implemented | ||
Name |type | Reason | ||
------------------|-----------------|------------------- | ||
`unslick` | method | same functionality can be achieved with `unslick` prop | ||
`slickSetOption` | method | same functionality can be achieved via props and managing state for them in wrapper | ||
`slickFilter` | method | same functionality can be achieved as with dynamic slides, look at dynamic slides [example](https://github.com/akiran/react-slick/blob/master/examples/DynamicSlides.js) | ||
`slickUnfilter` | method | same functionality can be achieved as with dynamic slides, look at dynamic slides [example](https://github.com/akiran/react-slick/blob/master/examples/DynamicSlides.js) | ||
`slickAdd` | method | same functionality can be achieved as with dynamic slides, look at dynamic slides [example](https://github.com/akiran/react-slick/blob/master/examples/DynamicSlides.js) | ||
`slickRemove` | method | same functionality can be achieved as with dynamic slides, look at dynamic slides [example](https://github.com/akiran/react-slick/blob/master/examples/DynamicSlides.js) | ||
`slickCurrentSlide`| method | same functionality can be achieved with `beforeChange hook` | ||
`slickGetOption` | method | manage wrapper state for desired options | ||
`getSlick` | method | a simple ref will do | ||
### Development | ||
#### `responsive` property | ||
Array of objects in the form of `{ breakpoint: int, settings: { ... } }` The breakpoint _int_ is the `maxWidth` so the settings will be applied when resolution is below this value. Breakpoints in the array should be ordered from smallest to greatest. Use 'unslick' in place of the settings object to disable rendering the carousel at that breakpoint. Example: `[ { breakpoint: 768, settings: { slidesToShow: 3 } }, { breakpoint: 1024, settings: { slidesToShow: 5 } }, { breakpoint: 100000, settings: 'unslick' } ]` | ||
### Custom next/prev arrows | ||
To customize the next/prev arrow elements, simply create new React components and set them | ||
as the values of nextArrow and prevArrow. | ||
```js | ||
class LeftNavButton extends React.Component { | ||
render() { | ||
return <button {...this.props}>Next</button> | ||
} | ||
} | ||
``` | ||
Important: be sure that you pass your component's props to your clickable element | ||
like the example above. If you don't, your custom component won't trigger the click handler. | ||
You can also set `onClick={this.props.onClick}` if you only want to set the click handler. | ||
### Flexbox support | ||
If you have flex property on container div of slider, add below css | ||
```css | ||
* { | ||
min-height: 0; | ||
min-width: 0; | ||
} | ||
``` | ||
### Test Setup | ||
If you try to run tests with jest in a project that uses react-slick, you may run into this error | ||
``` | ||
matchMedia not present, legacy browsers require a polyfill | ||
``` | ||
To fix this issue add below snippet in test-setup.js | ||
```js | ||
window.matchMedia = window.matchMedia || function() { | ||
return { | ||
matches : false, | ||
addListener : function() {}, | ||
removeListener: function() {} | ||
}; | ||
}; | ||
``` | ||
and add below jest config in package.json | ||
```json | ||
"jest": { | ||
"setupFiles": ["test-setup.js"] | ||
} | ||
``` | ||
### Development | ||
Want to run demos locally | ||
@@ -234,4 +106,5 @@ | ||
### Polyfills for old IE support | ||
`matchMedia` support from [media-match](https://github.com/weblinc/media-match) | ||
<a href="https://opencollective.com/react-slick/donate" target="_blank"> | ||
<img src="https://opencollective.com/react-slick/donate/button@2x.png?color=blue" width=300 /> | ||
</a> | ||
@@ -243,3 +116,2 @@ ## Contributors | ||
## Backers | ||
@@ -251,3 +123,2 @@ | ||
## Sponsors | ||
@@ -254,0 +125,0 @@ |
Sorry, the diff of this file is too big to display
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
7
321981
47
6574
130
4
+ Addedlodash.debounce@^4.0.8
+ Addedlodash.debounce@4.0.8(transitive)
- Removedcan-use-dom@^0.1.0
- Removedcreate-react-class@^15.5.2
- Removedcan-use-dom@0.1.0(transitive)
- Removedcreate-react-class@15.7.0(transitive)