react-slideshow-image 3.6.1 → 3.7.2

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -94,14 +94,14 @@ const Slideshow = () => {
94
94
  return (
95
95
  <div className="slide-container">
96
96
  <Fade>
97
- {fadeImages.map(fadeImage, index) => (
97
+ {fadeImages.map((fadeImage, index) => (
98
98
  <div className="each-fade" key={index}>
99
99
  <div className="image-container">
100
100
  <img src={fadeImage.url} />
101
101
  </div>
102
102
  <h2>{fadeImage.caption}</h2>
103
103
  </div>
104
- )}
104
+ ))}
105
105
  </Fade>
106
106
  </div>
107
107
  )
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports["react-slideshow-image"]=e(require("react")):t["react-slideshow-image"]=e(t.React)}(this,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(e,n){e.exports=t},function(t,e,n){"use strict";(function(t){var n=function(){this._tweens={},this._tweensAddedDuringUpdate={}};n.prototype={getAll:function(){return Object.keys(this._tweens).map(function(t){return this._tweens[t]}.bind(this))},removeAll:function(){this._tweens={}},add:function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},remove:function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},update:function(t,e){var n=Object.keys(this._tweens);if(0===n.length)return!1;for(t=void 0!==t?t:r.now();n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var o=this._tweens[n[i]];o&&!1===o.update(t)&&(o._isPlaying=!1,e||delete this._tweens[n[i]])}n=Object.keys(this._tweensAddedDuringUpdate)}return!0}};var i,r=new n;r.Group=n,r._nextId=0,r.nextId=function(){return r._nextId++},"undefined"==typeof self&&void 0!==t&&t.hrtime?r.now=function(){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?r.now=self.performance.now.bind(self.performance):void 0!==Date.now?r.now=Date.now:r.now=function(){return(new Date).getTime()},r.Tween=function(t,e){this._object=t,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._repeat=0,this._repeatDelayTime=void 0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=null,this._easingFunction=r.Easing.Linear.None,this._interpolationFunction=r.Interpolation.Linear,this._chainedTweens=[],this._onStartCallback=null,this._onStartCallbackFired=!1,this._onUpdateCallback=null,this._onRepeatCallback=null,this._onCompleteCallback=null,this._onStopCallback=null,this._group=e||r,this._id=r.nextId()},r.Tween.prototype={getId:function(){return this._id},isPlaying:function(){return this._isPlaying},to:function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},duration:function(t){return this._duration=t,this},start:function(t){for(var e in this._group.add(this),this._isPlaying=!0,this._onStartCallbackFired=!1,this._startTime=void 0!==t?"string"==typeof t?r.now()+parseFloat(t):t:r.now(),this._startTime+=this._delayTime,this._valuesEnd){if(this._valuesEnd[e]instanceof Array){if(0===this._valuesEnd[e].length)continue;this._valuesEnd[e]=[this._object[e]].concat(this._valuesEnd[e])}void 0!==this._object[e]&&(this._valuesStart[e]=this._object[e],this._valuesStart[e]instanceof Array==!1&&(this._valuesStart[e]*=1),this._valuesStartRepeat[e]=this._valuesStart[e]||0)}return this},stop:function(){return this._isPlaying?(this._group.remove(this),this._isPlaying=!1,null!==this._onStopCallback&&this._onStopCallback(this._object),this.stopChainedTweens(),this):this},end:function(){return this.update(1/0),this},stopChainedTweens:function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop()},group:function(t){return this._group=t,this},delay:function(t){return this._delayTime=t,this},repeat:function(t){return this._repeat=t,this},repeatDelay:function(t){return this._repeatDelayTime=t,this},yoyo:function(t){return this._yoyo=t,this},easing:function(t){return this._easingFunction=t,this},interpolation:function(t){return this._interpolationFunction=t,this},chain:function(){return this._chainedTweens=arguments,this},onStart:function(t){return this._onStartCallback=t,this},onUpdate:function(t){return this._onUpdateCallback=t,this},onRepeat:function(t){return this._onRepeatCallback=t,this},onComplete:function(t){return this._onCompleteCallback=t,this},onStop:function(t){return this._onStopCallback=t,this},update:function(t){var e,n,i;if(t<this._startTime)return!0;for(e in!1===this._onStartCallbackFired&&(null!==this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),n=(t-this._startTime)/this._duration,n=0===this._duration||n>1?1:n,i=this._easingFunction(n),this._valuesEnd)if(void 0!==this._valuesStart[e]){var r=this._valuesStart[e]||0,o=this._valuesEnd[e];o instanceof Array?this._object[e]=this._interpolationFunction(o,i):("string"==typeof o&&(o="+"===o.charAt(0)||"-"===o.charAt(0)?r+parseFloat(o):parseFloat(o)),"number"==typeof o&&(this._object[e]=r+(o-r)*i))}if(null!==this._onUpdateCallback&&this._onUpdateCallback(this._object,n),1===n){if(this._repeat>0){for(e in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat){if("string"==typeof this._valuesEnd[e]&&(this._valuesStartRepeat[e]=this._valuesStartRepeat[e]+parseFloat(this._valuesEnd[e])),this._yoyo){var s=this._valuesStartRepeat[e];this._valuesStartRepeat[e]=this._valuesEnd[e],this._valuesEnd[e]=s}this._valuesStart[e]=this._valuesStartRepeat[e]}return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,null!==this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}null!==this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,u=this._chainedTweens.length;a<u;a++)this._chainedTweens[a].start(this._startTime+this._duration);return!1}return!0}},r.Easing={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-r.Easing.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*r.Easing.Bounce.In(2*t):.5*r.Easing.Bounce.Out(2*t-1)+.5}}},r.Interpolation={Linear:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),s=r.Interpolation.Utils.Linear;return e<0?s(t[0],t[1],i):e>1?s(t[n],t[n-1],n-i):s(t[o],t[o+1>n?n:o+1],i-o)},Bezier:function(t,e){for(var n=0,i=t.length-1,o=Math.pow,s=r.Interpolation.Utils.Bernstein,a=0;a<=i;a++)n+=o(1-e,i-a)*o(e,a)*t[a]*s(i,a);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,o=Math.floor(i),s=r.Interpolation.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(o=Math.floor(i=n*(1+e))),s(t[(o-1+n)%n],t[o],t[(o+1)%n],t[(o+2)%n],i-o)):e<0?t[0]-(s(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(s(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):s(t[o?o-1:0],t[o],t[n<o+1?n:o+1],t[n<o+2?n:o+2],i-o)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=r.Interpolation.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(i=[1],function(t){var e=1;if(i[t])return i[t];for(var n=t;n>1;n--)e*=n;return i[t]=e,e}),CatmullRom:function(t,e,n,i,r){var o=.5*(n-t),s=.5*(i-e),a=r*r;return(2*e-2*n+o+s)*(r*a)+(-3*e+3*n-2*o-s)*a+o*r+e}}},e.a=r}).call(this,n(3))},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];t.call(e,r[1],r[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var s=["top","right","bottom","left","width","height","size","weight"],a="undefined"!=typeof MutationObserver,u=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,i=!1,r=0;function s(){n&&(n=!1,t()),i&&u()}function a(){o(s)}function u(){var t=Date.now();if(n){if(t-r<2)return;i=!0}else n=!0,i=!1,setTimeout(a,e);r=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(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)},t.prototype.disconnect_=function(){i&&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)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},h=m(0,0,0,0);function p(t){return parseFloat(t)||0}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+p(t["border-"+n+"-width"])}),0)}function f(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return h;var i=l(t).getComputedStyle(t),r=function(t){for(var e={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=t["padding-"+r];e[r]=p(o)}return e}(i),o=r.left+r.right,s=r.top+r.bottom,a=p(i.width),u=p(i.height);if("border-box"===i.boxSizing&&(Math.round(a+o)!==e&&(a-=d(i,"left","right")+o),Math.round(u+s)!==n&&(u-=d(i,"top","bottom")+s)),!function(t){return t===l(t).document.documentElement}(t)){var c=Math.round(a+o)-e,f=Math.round(u+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(f)&&(u-=f)}return m(r.left,r.top,a,u)}var v="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function y(t){return i?v(t)?function(t){var e=t.getBBox();return m(0,0,e.width,e.height)}(t):f(t):h}function m(t,e,n,i){return{x:t,y:e,width:n,height:i}}var b=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=y(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),w=function(t,e){var n,i,r,o,s,a,u,l=(i=(n=e).x,r=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),c(u,{x:i,y:r,width:o,height:s,top:r,right:i+o,bottom:s+r,left:i}),u);c(this,{target:t,contentRect:l})},g=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new b(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new w(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,S=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),i=new g(e,n,this);_.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){S.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}}));var O=void 0!==r.ResizeObserver?r.ResizeObserver:S;e.a=O}).call(this,n(4))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,c=[],l=!1,h=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=a(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||l||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"Slide",(function(){return M})),n.d(e,"Fade",(function(){return D})),n.d(e,"Zoom",(function(){return X}));var i=n(0),r=n.n(i),o=n(1),s=n(2);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l={duration:5e3,transitionDuration:1e3,defaultIndex:0,infinite:!0,autoplay:!0,indicators:!1,arrows:!0,pauseOnHover:!0,scale:1,easing:"linear",canSwipe:!0,slidesToShow:1,slidesToScroll:1,cssClass:""},h=function(t){var e=r.a.Children.map(t.children,(function(t){return t}));return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(n,!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},l,{},t,{children:e})},p={duration:"number",transitionDuration:"number",defaultIndex:"number",infinite:"boolean",indicators:["boolean","function"],autoplay:"boolean",arrows:"boolean",onChange:"function",pauseOnHover:"boolean",prevArrow:["object","function"],nextArrow:["object","function"],scale:"number",easing:"string",canSwipe:"boolean",slidesToShow:"number",slidesToScroll:"number",cssClass:"string"},d=function(t){for(var e in t){var n=a(t[e]);p[e]&&(Array.isArray(p[e])&&!p[e].includes(n)?console.warn("".concat(e," must be of one of type ").concat(p[e].join(", "))):Array.isArray(p[e])||n===p[e]||console.warn("".concat(e," must be of type ").concat(p[e])))}};function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(n,!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b={linear:o.a.Easing.Linear.None,ease:o.a.Easing.Quadratic.InOut,"ease-in":o.a.Easing.Quadratic.In,"ease-out":o.a.Easing.Quadratic.Out,cubic:o.a.Easing.Cubic.InOut,"cubic-in":o.a.Easing.Cubic.In,"cubic-out":o.a.Easing.Cubic.Out},w=function(t){return b[t]||b.linear},g=function(t,e){var n=Object.keys(t);return Object.keys(e).reduce((function(t,i){return-1===n.indexOf(i)&&(t[i]=e[i]),t}),{})},_=function(t,e,n){var i=t.prevArrow,o=t.infinite,s=e<=0&&!o,a={"data-type":"prev","aria-label":"Previous Slide",disabled:s,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(s?"disabled":"")},a));var u="nav default-nav ".concat(s?"disabled":"");return r.a.createElement("button",f({className:u},a),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"})))},S=function(t,e,n){var i=t.nextArrow,o=t.infinite,s=t.children,a=t.slidesToScroll,u=e>=s.length-a&&!o,c={"data-type":"next","aria-label":"Next Slide",disabled:u,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(u?"disabled":"")},c));var l="nav default-nav ".concat(u?"disabled":"");return r.a.createElement("button",f({className:l},c),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"})))},O=function(t,e,n){var i=t.children,o=t.indicators,s=t.slidesToScroll,a="boolean"!=typeof o,u=Math.ceil(i.length/s);return r.a.createElement("ul",{className:"indicators"},Array.from({length:u},(function(t,i){var u={"data-key":i,"aria-label":"Go to slide ".concat(i+1),onClick:n},c=Math.floor((e+s-1)/s)===i;return a?function(t,e,n,i){return r.a.cloneElement(i,y({className:"".concat(i.props.className," ").concat(t?"active":""),key:e},n))}(c,i,u,o(i)):function(t,e,n){return r.a.createElement("li",{key:e},r.a.createElement("button",f({className:"each-slideshow-indicator ".concat(t?"active":"")},n)))}(c,i,u)})))};function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function k(){return(k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function x(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var M=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==T(e)&&"function"!=typeof e?C(t):e}(this,E(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.dragging=!1,n.imageContainer=null,n.wrapper=null,n.timeout=null,n.moveSlides=n.moveSlides.bind(C(n)),n.pauseSlides=n.pauseSlides.bind(C(n)),n.startSlides=n.startSlides.bind(C(n)),n.handleResize=n.handleResize.bind(C(n)),n.initResizeObserver=n.initResizeObserver.bind(C(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n.goToSlide=n.goToSlide.bind(C(n)),n.tweenGroup=new o.a.Group,n.startSwipe=n.startSwipe.bind(C(n)),n.endSwipe=n.endSwipe.bind(C(n)),n.swipe=n.swipe.bind(C(n)),n.distanceSwiped=0,n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){var t=this;this.setWidth(),this.initResizeObserver(),d(this.props);var e=h(this.props),n=e.autoplay,i=e.duration;n&&(this.timeout=setTimeout((function(){return t.goNext()}),i))}},{key:"initResizeObserver",value:function(){var t=this;this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.reactSlideshowWrapper.current&&this.resizeObserver.observe(this.reactSlideshowWrapper.current)}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"startSwipe",value:function(t){h(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(){h(this.props).canSwipe&&(this.dragging=!1,Math.abs(this.distanceSwiped)/this.width>.2?this.distanceSwiped<0?this.goNext():this.goBack():Math.abs(this.distanceSwiped)>0&&this.slideImages(this.state.index,300))}},{key:"swipe",value:function(t){var e=h(this.props),n=e.canSwipe,i=e.slidesToShow,r=e.children,o=e.infinite,s=e.slidesToScroll;if(n){var a=t.touches?t.touches[0].pageX:t.clientX;if(this.dragging){var u=this.width*(this.state.index+this.getOffset(o,i)),c=a-this.startingClientX;if(!o&&this.state.index===r.length-s&&c<0)return;if(!o&&0===this.state.index&&c>0)return;this.distanceSwiped=c,u-=this.distanceSwiped,this.imageContainer.style.transform="translate(-".concat(u,"px)")}}}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.allImages=this.wrapper&&Array.prototype.slice.call(this.wrapper.querySelectorAll(".images-wrap > div"),0)||[];var t=h(this.props),e=t.slidesToShow,n=t.infinite;this.width=(this.wrapper&&this.wrapper.clientWidth||0)/e;var i=r.a.Children.count(this.props.children),o=this.width*(i+2*e);this.imageContainer&&(this.imageContainer.style.width="".concat(o,"px"),this.imageContainer.style.transform="translate(-".concat(this.width*(this.state.index+this.getOffset(n,e)),"px)")),this.applySlideStyle()}},{key:"componentDidUpdate",value:function(t){var e=this,n=h(this.props),i=n.autoplay,r=n.duration,o=n.children,s=h(t);i!==s.autoplay&&(i?this.timeout=setTimeout((function(){return e.goNext()}),r):clearTimeout(this.timeout)),o.length!=s.children.length&&(this.setWidth(),clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.goNext()}),r))}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applySlideStyle",value:function(){var t=this;this.allImages.forEach((function(e,n){e.style.width="".concat(t.width,"px")}))}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;this.dragging?this.endSwipe():n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"moveSlides",value:function(t){"next"===t.currentTarget.dataset.type?this.goNext():this.goBack()}},{key:"goToSlide",value:function(t){var e=t.currentTarget,n=h(this.props).slidesToScroll;this.goTo(parseInt(e.dataset.key*n))}},{key:"goTo",value:function(t){this.slideImages(this.calculateIndex(t))}},{key:"calculateIndex",value:function(t){var e=h(this.props),n=e.children,i=e.slidesToScroll;return t<n.length&&t+i>n.length&&(n.length-i)%i?n.length-i:t}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children,i=e.infinite,r=e.slidesToScroll;if(i||t!==n.length-r){var o=this.calculateIndex(t+r);this.slideImages(o)}}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.infinite,i=e.slidesToScroll;if(n||0!==t){var r=t-i;r%i&&(r=Math.ceil(r/i)*i),this.slideImages(r)}}},{key:"isSlideActive",value:function(t){var e=h(this.props).slidesToShow;return t<this.state.index+e&&t>=this.state.index}},{key:"renderPreceedingSlides",value:function(t,e){return t.slice(-e).map((function(t,n){return r.a.createElement("div",{"data-index":n-e,"aria-roledescription":"slide","aria-hidden":"true",key:n-e},t)}))}},{key:"renderTrailingSlides",value:function(t,e){return t.slice(0,e).map((function(e,n){return r.a.createElement("div",{"data-index":t.length+n,"aria-roledescription":"slide","aria-hidden":"true",key:t.length+n},e)}))}},{key:"getOffset",value:function(t,e){return t?e:0}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.children,i=e.indicators,o=e.arrows,s=e.cssClass,a=e.slidesToShow,u=e.infinite,c=g(p,this.props),l=this.state.index,d={transform:"translate(-".concat((l+this.getOffset(u,a))*this.width,"px)")};return r.a.createElement("div",k({dir:"ltr","aria-roledescription":"carousel"},c),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onMouseMove:this.swipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,onTouchMove:this.swipe,ref:this.reactSlideshowWrapper},o&&_(h(this.props),this.state.index,this.moveSlides),r.a.createElement("div",{className:"react-slideshow-wrapper slide ".concat(s),ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"images-wrap",style:d,ref:function(e){return t.imageContainer=e}},u?this.renderPreceedingSlides(n,a):"",n.map((function(e,n){var i=t.isSlideActive(n);return r.a.createElement("div",{"data-index":n,key:n,className:i?"active":"","aria-roledescription":"slide","aria-hidden":i?"false":"true"},e)})),u?this.renderTrailingSlides(n,a):"")),o&&S(h(this.props),this.state.index,this.moveSlides)),i&&O(h(this.props),this.state.index,this.goToSlide))}},{key:"slideImages",value:function(t,e){var n=this,i=h(this.props),r=i.children,s=i.transitionDuration,a=i.autoplay,u=i.infinite,c=i.duration,l=i.onChange,p=i.easing,d=i.slidesToShow,f=i.slidesToScroll;if(s=e||s,!this.tweenGroup.getAll().length){clearTimeout(this.timeout);var v={margin:-this.width*(this.state.index+this.getOffset(u,d))+this.distanceSwiped},y=new o.a.Tween(v,this.tweenGroup).to({margin:-this.width*(t+this.getOffset(u,d))},s).onUpdate((function(t){n.imageContainer&&(n.imageContainer.style.transform="translate(".concat(t.margin,"px)"))})).start();y.easing(w(p)),!function t(){n.willUnmount?n.tweenGroup.removeAll():(requestAnimationFrame(t),n.tweenGroup.update())}(),y.onComplete((function(){if(!n.willUnmount){n.distanceSwiped=0;var e=t;e<0?e=r.length-f:e>=r.length&&(e=0),"function"==typeof l&&l(n.state.index,e),n.setState({index:e},(function(){a&&(u||n.state.index<r.length)&&(clearTimeout(n.timeout),n.timeout=setTimeout((function(){return n.goNext()}),c))}))}}))}}}])&&x(n.prototype,a),u&&x(n,u),e}(i.Component);function I(t){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(){return(R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function z(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W(t,e){return(W=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var D=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==I(e)&&"function"!=typeof e?A(t):e}(this,P(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(A(n)),n.handleResize=n.handleResize.bind(A(n)),n.navigate=n.navigate.bind(A(n)),n.preFade=n.preFade.bind(A(n)),n.pauseSlides=n.pauseSlides.bind(A(n)),n.startSlides=n.startSlides.bind(A(n)),n.initResizeObserver=n.initResizeObserver.bind(A(n)),n.tweenGroup=new o.a.Group,n.reactSlideshowWrapper=Object(i.createRef)(),n.wrapper=Object(i.createRef)(),n.startSwipe=n.startSwipe.bind(A(n)),n.endSwipe=n.endSwipe.bind(A(n)),n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&W(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=h(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.fadeImages(o+1)}),r))}},{key:"componentDidUpdate",value:function(t){var e=h(this.props),n=e.autoplay,i=e.children,r=h(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.wrapper.current&&(this.width=this.wrapper.current.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.fadeImages((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||0!==t)&&this.fadeImages(0===t?n.length-1:t-1)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"goTo",value:function(t){this.fadeImages(t)}},{key:"preFade",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"startSwipe",value:function(t){h(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(t){var e=(t.changedTouches?t.changedTouches[0].pageX:t.clientX)-this.startingClientX;h(this.props).canSwipe&&(this.dragging=!1,Math.abs(e)/this.width>.2&&(e<0?this.goNext():this.goBack()))}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.indicators,i=e.children,o=e.arrows,s=e.cssClass,a=this.state.index,u=g(p,this.props);return r.a.createElement("div",R({dir:"ltr","aria-roledescription":"carousel"},u),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,ref:this.reactSlideshowWrapper},o&&_(h(this.props),this.state.index,this.preFade),r.a.createElement("div",{className:"react-slideshow-fade-wrapper ".concat(s),ref:this.wrapper},r.a.createElement("div",{className:"react-slideshow-fade-images-wrap",ref:function(e){return t.divsContainer=e}},i.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),o&&S(h(this.props),this.state.index,this.preFade)),n&&O(h(this.props),this.state.index,this.navigate))}},{key:"fadeImages",value:function(t){var e=this,n=this.state.index,i=h(this.props),r=i.autoplay,s=i.children,a=i.infinite,u=i.duration,c=i.transitionDuration,l=i.onChange,p=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer.children[t]||(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var d=new o.a.Tween({opacity:0},this.tweenGroup).to({opacity:1},c).onUpdate((function(i){e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity})).start();d.easing(w(p)),d.onComplete((function(){e.willUnmount||(e.setState({index:t}),"function"==typeof l&&l(n,t),r&&(a||t<s.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.fadeImages((t+1)%s.length)}),u)))}))}}}])&&z(n.prototype,a),u&&z(n,u),e}(i.Component);function N(t){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(){return(U=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function F(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function G(t){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var X=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==N(e)&&"function"!=typeof e?B(t):e}(this,G(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(B(n)),n.handleResize=n.handleResize.bind(B(n)),n.navigate=n.navigate.bind(B(n)),n.preZoom=n.preZoom.bind(B(n)),n.pauseSlides=n.pauseSlides.bind(B(n)),n.startSlides=n.startSlides.bind(B(n)),n.tweenGroup=new o.a.Group,n.initResizeObserver=n.initResizeObserver.bind(B(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n.startSwipe=n.startSwipe.bind(B(n)),n.endSwipe=n.endSwipe.bind(B(n)),n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=h(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.zoomTo(o+1)}),r))}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"componentDidUpdate",value:function(t){var e=h(this.props),n=e.autoplay,i=e.children,r=h(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"setWidth",value:function(){this.wrapper&&(this.width=this.wrapper.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){h(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=h(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.zoomTo((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=h(this.props),n=e.children;(e.infinite||0!==t)&&this.zoomTo(0===t?n.length-1:t-1)}},{key:"goTo",value:function(t){this.zoomTo(t)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"preZoom",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"startSwipe",value:function(t){h(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(t){var e=(t.changedTouches?t.changedTouches[0].pageX:t.clientX)-this.startingClientX;h(this.props).canSwipe&&(this.dragging=!1,Math.abs(e)/this.width>.2&&(e<0?this.goNext():this.goBack()))}},{key:"render",value:function(){var t=this,e=h(this.props),n=e.indicators,i=e.arrows,o=e.children,s=e.cssClass,a=this.state.index,u=g(p,this.props);return r.a.createElement("div",U({dir:"ltr","aria-roledescription":"carousel"},u),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,ref:this.reactSlideshowWrapper},i&&_(h(this.props),this.state.index,this.preZoom),r.a.createElement("div",{className:"react-slideshow-zoom-wrapper ".concat(s),ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"zoom-wrapper",ref:function(e){return t.divsContainer=e}},o.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),i&&S(h(this.props),this.state.index,this.preZoom)),n&&O(h(this.props),this.state.index,this.navigate))}},{key:"zoomTo",value:function(t){var e=this,n=this.state.index,i=h(this.props),r=i.children,s=i.scale,a=i.autoplay,u=i.infinite,c=i.transitionDuration,l=i.duration,p=i.onChange,d=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer&&!this.divsContainer.children[t]&&(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var f=new o.a.Tween({opacity:0,scale:1},this.tweenGroup).to({opacity:1,scale:s},c).onUpdate((function(i){e.divsContainer&&(e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity,e.divsContainer.children[n].style.transform="scale(".concat(i.scale,")"))})).start();f.easing(w(d)),f.onComplete((function(){e.willUnmount||("function"==typeof p&&p(n,t),e.setState({index:t},(function(){e.divsContainer&&(e.divsContainer.children[n].style.transform="scale(1)")})),a&&(u||t<r.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.zoomTo((t+1)%r.length)}),l)))}))}}}])&&F(n.prototype,a),u&&F(n,u),e}(i.Component)}])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports["react-slideshow-image"]=e(require("react")):t["react-slideshow-image"]=e(t.React)}(this,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(e,n){e.exports=t},function(t,e,n){"use strict";(function(t){var n,i={Linear:{None:function(t){return t}},Quadratic:{In:function(t){return t*t},Out:function(t){return t*(2-t)},InOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},Cubic:{In:function(t){return t*t*t},Out:function(t){return--t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},Quartic:{In:function(t){return t*t*t*t},Out:function(t){return 1- --t*t*t*t},InOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},Quintic:{In:function(t){return t*t*t*t*t},Out:function(t){return--t*t*t*t*t+1},InOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},Sinusoidal:{In:function(t){return 1-Math.cos(t*Math.PI/2)},Out:function(t){return Math.sin(t*Math.PI/2)},InOut:function(t){return.5*(1-Math.cos(Math.PI*t))}},Exponential:{In:function(t){return 0===t?0:Math.pow(1024,t-1)},Out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},Circular:{In:function(t){return 1-Math.sqrt(1-t*t)},Out:function(t){return Math.sqrt(1- --t*t)},InOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},Elastic:{In:function(t){return 0===t?0:1===t?1:-Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)},Out:function(t){return 0===t?0:1===t?1:Math.pow(2,-10*t)*Math.sin(5*(t-.1)*Math.PI)+1},InOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?-.5*Math.pow(2,10*(t-1))*Math.sin(5*(t-1.1)*Math.PI):.5*Math.pow(2,-10*(t-1))*Math.sin(5*(t-1.1)*Math.PI)+1}},Back:{In:function(t){var e=1.70158;return t*t*((e+1)*t-e)},Out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},InOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},Bounce:{In:function(t){return 1-i.Bounce.Out(1-t)},Out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},InOut:function(t){return t<.5?.5*i.Bounce.In(2*t):.5*i.Bounce.Out(2*t-1)+.5}}},r="undefined"==typeof self&&void 0!==t&&t.hrtime?function(){var e=t.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},o=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(e){return t._tweens[e]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,e){void 0===t&&(t=r()),void 0===e&&(e=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var o=this._tweens[n[i]],s=!e;o&&!1===o.update(t,s)&&!e&&delete this._tweens[n[i]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},t}(),s={Linear:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),o=s.Utils.Linear;return e<0?o(t[0],t[1],i):e>1?o(t[n],t[n-1],n-i):o(t[r],t[r+1>n?n:r+1],i-r)},Bezier:function(t,e){for(var n=0,i=t.length-1,r=Math.pow,o=s.Utils.Bernstein,a=0;a<=i;a++)n+=r(1-e,i-a)*r(e,a)*t[a]*o(i,a);return n},CatmullRom:function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i),o=s.Utils.CatmullRom;return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),o(t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n],i-r)):e<0?t[0]-(o(t[0],t[0],t[1],t[1],-i)-t[0]):e>1?t[n]-(o(t[n],t[n],t[n-1],t[n-1],i-n)-t[n]):o(t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2],i-r)},Utils:{Linear:function(t,e,n){return(e-t)*n+t},Bernstein:function(t,e){var n=s.Utils.Factorial;return n(t)/n(e)/n(t-e)},Factorial:(n=[1],function(t){var e=1;if(n[t])return n[t];for(var i=t;i>1;i--)e*=i;return n[t]=e,e}),CatmullRom:function(t,e,n,i,r){var o=.5*(n-t),s=.5*(i-e),a=r*r;return(2*e-2*n+o+s)*(r*a)+(-3*e+3*n-2*o-s)*a+o*r+e}}},a=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),u=new o,c=function(){function t(t,e){void 0===e&&(e=u),this._object=t,this._group=e,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=i.Linear.None,this._interpolationFunction=s.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=a.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,e){return this._valuesEnd=Object.create(t),void 0!==e&&(this._duration=e),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?r()+parseFloat(t):t:r(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,e,n,i){for(var r in n){var o=t[r],s=Array.isArray(o),a=s?"array":typeof o,u=!s&&Array.isArray(n[r]);if("undefined"!==a&&"function"!==a){if(u){var c=n[r];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,o)),n[r]=[o].concat(c)}if("object"!==a&&!s||!o||u)void 0===e[r]&&(e[r]=o),s||(e[r]*=1),i[r]=u?n[r].slice().reverse():e[r]||0;else{for(var h in e[r]=s?[]:{},o)e[r][h]=o[h];i[r]=s?[]:{},this._setupProperties(o,e[r],n[r],i[r])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},t.prototype.pause=function(t){return void 0===t&&(t=r()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=t,this._group&&this._group.remove(this)),this},t.prototype.resume=function(t){return void 0===t&&(t=r()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=t-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,e=this._chainedTweens.length;t<e;t++)this._chainedTweens[t].stop();return this},t.prototype.group=function(t){return this._group=t,this},t.prototype.delay=function(t){return this._delayTime=t,this},t.prototype.repeat=function(t){return this._initialRepeat=t,this._repeat=t,this},t.prototype.repeatDelay=function(t){return this._repeatDelayTime=t,this},t.prototype.yoyo=function(t){return this._yoyo=t,this},t.prototype.easing=function(t){return this._easingFunction=t,this},t.prototype.interpolation=function(t){return this._interpolationFunction=t,this},t.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._chainedTweens=t,this},t.prototype.onStart=function(t){return this._onStartCallback=t,this},t.prototype.onUpdate=function(t){return this._onUpdateCallback=t,this},t.prototype.onRepeat=function(t){return this._onRepeatCallback=t,this},t.prototype.onComplete=function(t){return this._onCompleteCallback=t,this},t.prototype.onStop=function(t){return this._onStopCallback=t,this},t.prototype.update=function(t,e){if(void 0===t&&(t=r()),void 0===e&&(e=!0),this._isPaused)return!0;var n,i,o=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(t>o)return!1;e&&this.start(t)}if(this._goToEnd=!1,t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),i=(t-this._startTime)/this._duration,i=0===this._duration||i>1?1:i;var s=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,s),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),1===i){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var a=0,u=this._chainedTweens.length;a<u;a++)this._chainedTweens[a].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},t.prototype._updateProperties=function(t,e,n,i){for(var r in n)if(void 0!==e[r]){var o=e[r]||0,s=n[r],a=Array.isArray(t[r]),u=Array.isArray(s);!a&&u?t[r]=this._interpolationFunction(s,i):"object"==typeof s&&s?this._updateProperties(t[r],o,s,i):"number"==typeof(s=this._handleRelativeValue(o,s))&&(t[r]=o+(s-o)*i)}},t.prototype._handleRelativeValue=function(t,e){return"string"!=typeof e?e:"+"===e.charAt(0)||"-"===e.charAt(0)?t+parseFloat(e):parseFloat(e)},t.prototype._swapEndStartRepeatValues=function(t){var e=this._valuesStartRepeat[t],n=this._valuesEnd[t];this._valuesStartRepeat[t]="string"==typeof n?this._valuesStartRepeat[t]+parseFloat(n):this._valuesEnd[t],this._valuesEnd[t]=e},t}(),h=a.nextId,l=u,p=l.getAll.bind(l),d=l.removeAll.bind(l),f=l.add.bind(l),v=l.remove.bind(l),y=l.update.bind(l),m={Easing:i,Group:o,Interpolation:s,now:r,Sequence:a,nextId:h,Tween:c,VERSION:"18.6.4",getAll:p,removeAll:d,add:f,remove:v,update:y};e.a=m}).call(this,n(3))},function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];t.call(e,r[1],r[0])}},e}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var s=["top","right","bottom","left","width","height","size","weight"],a="undefined"!=typeof MutationObserver,u=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,i=!1,r=0;function s(){n&&(n=!1,t()),i&&u()}function a(){o(s)}function u(){var t=Date.now();if(n){if(t-r<2)return;i=!0}else n=!0,i=!1,setTimeout(a,e);r=t}return u}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(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)},t.prototype.disconnect_=function(){i&&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)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),c=function(t,e){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},h=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},l=m(0,0,0,0);function p(t){return parseFloat(t)||0}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+p(t["border-"+n+"-width"])}),0)}function f(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return l;var i=h(t).getComputedStyle(t),r=function(t){for(var e={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=t["padding-"+r];e[r]=p(o)}return e}(i),o=r.left+r.right,s=r.top+r.bottom,a=p(i.width),u=p(i.height);if("border-box"===i.boxSizing&&(Math.round(a+o)!==e&&(a-=d(i,"left","right")+o),Math.round(u+s)!==n&&(u-=d(i,"top","bottom")+s)),!function(t){return t===h(t).document.documentElement}(t)){var c=Math.round(a+o)-e,f=Math.round(u+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(f)&&(u-=f)}return m(r.left,r.top,a,u)}var v="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof h(t).SVGGraphicsElement}:function(t){return t instanceof h(t).SVGElement&&"function"==typeof t.getBBox};function y(t){return i?v(t)?function(t){var e=t.getBBox();return m(0,0,e.width,e.height)}(t):f(t):l}function m(t,e,n,i){return{x:t,y:e,width:n,height:i}}var b=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=y(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),g=function(t,e){var n,i,r,o,s,a,u,h=(i=(n=e).x,r=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),c(u,{x:i,y:r,width:o,height:s,top:r,right:i+o,bottom:s+r,left:i}),u);c(this,{target:t,contentRect:h})},w=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new b(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new g(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,S=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),i=new w(e,n,this);_.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){S.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}}));var O=void 0!==r.ResizeObserver?r.ResizeObserver:S;e.a=O}).call(this,n(4))},function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var u,c=[],h=!1,l=-1;function p(){h&&u&&(h=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!h){var t=a(p);h=!0;for(var e=c.length;e;){for(u=c,c=[];++l<e;)u&&u[l].run();l=-1,e=c.length}u=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function v(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new f(t,e)),1!==c.length||h||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=v,r.addListener=v,r.once=v,r.off=v,r.removeListener=v,r.removeAllListeners=v,r.emit=v,r.prependListener=v,r.prependOnceListener=v,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.r(e),n.d(e,"Slide",(function(){return M})),n.d(e,"Fade",(function(){return D})),n.d(e,"Zoom",(function(){return X}));var i=n(0),r=n.n(i),o=n(1),s=n(2);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h={duration:5e3,transitionDuration:1e3,defaultIndex:0,infinite:!0,autoplay:!0,indicators:!1,arrows:!0,pauseOnHover:!0,scale:1,easing:"linear",canSwipe:!0,slidesToShow:1,slidesToScroll:1,cssClass:"",responsive:[]},l=function(t){var e=r.a.Children.map(t.children,(function(t){return t})),n={};if("undefined"!=typeof window&&Array.isArray(t.responsive)){var i=function(t,e){return e.find((function(e){return e.breakpoint<=t}))}(window.innerWidth,t.responsive);i&&(n=i.settings)}return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(n,!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},h,{},t,{},n,{children:e})},p={duration:"number",transitionDuration:"number",defaultIndex:"number",infinite:"boolean",indicators:["boolean","function"],autoplay:"boolean",arrows:"boolean",onChange:"function",pauseOnHover:"boolean",prevArrow:["object","function"],nextArrow:["object","function"],scale:"number",easing:"string",canSwipe:"boolean",slidesToShow:"number",slidesToScroll:"number",cssClass:"string",responsive:"array"},d=function(t){for(var e in t){var n=a(t[e]);p[e]&&(Array.isArray(p[e])&&!p[e].includes(n)?console.warn("".concat(e," must be of one of type ").concat(p[e].join(", "))):("array"!==p[e]||Array.isArray(t[e]))&&("array"===p[e]||Array.isArray(p[e])||n===p[e])||console.warn("".concat(e," must be of type ").concat(p[e])))}};function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?v(n,!0).forEach((function(e){m(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):v(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function m(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b={linear:o.a.Easing.Linear.None,ease:o.a.Easing.Quadratic.InOut,"ease-in":o.a.Easing.Quadratic.In,"ease-out":o.a.Easing.Quadratic.Out,cubic:o.a.Easing.Cubic.InOut,"cubic-in":o.a.Easing.Cubic.In,"cubic-out":o.a.Easing.Cubic.Out},g=function(t){return b[t]||b.linear},w=function(t,e){var n=Object.keys(t);return Object.keys(e).reduce((function(t,i){return-1===n.indexOf(i)&&(t[i]=e[i]),t}),{})},_=function(t,e,n){var i=t.prevArrow,o=t.infinite,s=e<=0&&!o,a={"data-type":"prev","aria-label":"Previous Slide",disabled:s,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(s?"disabled":"")},a));var u="nav default-nav ".concat(s?"disabled":"");return r.a.createElement("button",f({className:u},a),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z"})))},S=function(t,e,n){var i=t.nextArrow,o=t.infinite,s=t.children,a=t.slidesToScroll,u=e>=s.length-a&&!o,c={"data-type":"next","aria-label":"Next Slide",disabled:u,onClick:n};if(i)return r.a.cloneElement(i,y({className:"".concat(i.props.className," nav ").concat(u?"disabled":"")},c));var h="nav default-nav ".concat(u?"disabled":"");return r.a.createElement("button",f({className:h},c),r.a.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{d:"M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"})))},O=function(t,e,n){var i=t.children,o=t.indicators,s=t.slidesToScroll,a="boolean"!=typeof o,u=Math.ceil(i.length/s);return r.a.createElement("ul",{className:"indicators"},Array.from({length:u},(function(t,i){var u={"data-key":i,"aria-label":"Go to slide ".concat(i+1),onClick:n},c=Math.floor((e+s-1)/s)===i;return a?function(t,e,n,i){return r.a.cloneElement(i,y({className:"".concat(i.props.className," ").concat(t?"active":""),key:e},n))}(c,i,u,o(i)):function(t,e,n){return r.a.createElement("li",{key:e},r.a.createElement("button",f({className:"each-slideshow-indicator ".concat(t?"active":"")},n)))}(c,i,u)})))};function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function k(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var M=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==T(e)&&"function"!=typeof e?C(t):e}(this,E(e).call(this))).state={slidesToShow:t.slidesToShow||1,index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.dragging=!1,n.imageContainer=null,n.wrapper=null,n.timeout=null,n.moveSlides=n.moveSlides.bind(C(n)),n.pauseSlides=n.pauseSlides.bind(C(n)),n.startSlides=n.startSlides.bind(C(n)),n.handleResize=n.handleResize.bind(C(n)),n.initResizeObserver=n.initResizeObserver.bind(C(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n.goToSlide=n.goToSlide.bind(C(n)),n.tweenGroup=new o.a.Group,n.startSwipe=n.startSwipe.bind(C(n)),n.endSwipe=n.endSwipe.bind(C(n)),n.swipe=n.swipe.bind(C(n)),n.distanceSwiped=0,n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){var t=this;this.setWidth(),this.initResizeObserver(),d(this.props);var e=l(this.props),n=e.autoplay,i=e.duration;n&&(this.timeout=setTimeout((function(){return t.goNext()}),i))}},{key:"initResizeObserver",value:function(){var t=this;this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.reactSlideshowWrapper.current&&this.resizeObserver.observe(this.reactSlideshowWrapper.current)}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"startSwipe",value:function(t){l(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(){l(this.props).canSwipe&&(this.dragging=!1,Math.abs(this.distanceSwiped)/this.width>.2?this.distanceSwiped<0?this.goNext():this.goBack():Math.abs(this.distanceSwiped)>0&&this.slideImages(this.state.index,300))}},{key:"swipe",value:function(t){var e=l(this.props),n=e.canSwipe,i=e.slidesToShow,r=e.children,o=e.infinite,s=e.slidesToScroll;if(n){var a=t.touches?t.touches[0].pageX:t.clientX;if(this.dragging){var u=this.width*(this.state.index+this.getOffset(o,i)),c=a-this.startingClientX;if(!o&&this.state.index===r.length-s&&c<0)return;if(!o&&0===this.state.index&&c>0)return;this.distanceSwiped=c,u-=this.distanceSwiped,this.imageContainer.style.transform="translate(-".concat(u,"px)")}}}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.allImages=this.wrapper&&Array.prototype.slice.call(this.wrapper.querySelectorAll(".images-wrap > div"),0)||[];var t=l(this.props),e=t.slidesToShow,n=t.infinite;this.state.slidesToShow!==e&&this.setState({slidesToShow:e,index:0}),this.width=(this.wrapper&&this.wrapper.clientWidth||0)/e;var i=r.a.Children.count(this.props.children),o=this.width*(i+2*e);this.imageContainer&&(this.imageContainer.style.width="".concat(o,"px"),this.imageContainer.style.transform="translate(-".concat(this.width*(this.state.index+this.getOffset(n,e)),"px)")),this.applySlideStyle()}},{key:"componentDidUpdate",value:function(t){var e=this,n=l(this.props),i=n.autoplay,r=n.duration,o=n.children,s=l(t);i!==s.autoplay&&(i?this.timeout=setTimeout((function(){return e.goNext()}),r):clearTimeout(this.timeout)),o.length!=s.children.length&&(this.setWidth(),clearTimeout(this.timeout),this.timeout=setTimeout((function(){return e.goNext()}),r))}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applySlideStyle",value:function(){var t=this;this.allImages.forEach((function(e,n){e.style.width="".concat(t.width,"px")}))}},{key:"pauseSlides",value:function(){l(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=l(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;this.dragging?this.endSwipe():n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"moveSlides",value:function(t){"next"===t.currentTarget.dataset.type?this.goNext():this.goBack()}},{key:"goToSlide",value:function(t){var e=t.currentTarget,n=l(this.props).slidesToScroll;this.goTo(parseInt(e.dataset.key*n))}},{key:"goTo",value:function(t){this.slideImages(this.calculateIndex(t))}},{key:"calculateIndex",value:function(t){var e=l(this.props),n=e.children,i=e.slidesToScroll;return t<n.length&&t+i>n.length&&(n.length-i)%i?n.length-i:t}},{key:"goNext",value:function(){var t=this.state.index,e=l(this.props),n=e.children,i=e.infinite,r=e.slidesToScroll;if(i||t!==n.length-r){var o=this.calculateIndex(t+r);this.slideImages(o)}}},{key:"goBack",value:function(){var t=this.state.index,e=l(this.props),n=e.infinite,i=e.slidesToScroll;if(n||0!==t){var r=t-i;r%i&&(r=Math.ceil(r/i)*i),this.slideImages(r)}}},{key:"isSlideActive",value:function(t){var e=l(this.props).slidesToShow;return t<this.state.index+e&&t>=this.state.index}},{key:"renderPreceedingSlides",value:function(t,e){return t.slice(-e).map((function(t,n){return r.a.createElement("div",{"data-index":n-e,"aria-roledescription":"slide","aria-hidden":"true",key:n-e},t)}))}},{key:"renderTrailingSlides",value:function(){var t=l(this.props),e=t.children,n=t.slidesToShow,i=t.slidesToScroll;if(t.infinite||n!==i)return e.slice(0,n).map((function(t,n){return r.a.createElement("div",{"data-index":e.length+n,"aria-roledescription":"slide","aria-hidden":"true",key:e.length+n},t)}))}},{key:"getOffset",value:function(t,e){return t?e:0}},{key:"render",value:function(){var t=this,e=l(this.props),n=e.children,i=e.indicators,o=e.arrows,s=e.cssClass,a=e.slidesToShow,u=e.infinite,c=w(p,this.props),h=this.state.index,d={transform:"translate(-".concat((h+this.getOffset(u,a))*this.width,"px)")};return r.a.createElement("div",x({dir:"ltr","aria-roledescription":"carousel"},c),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onMouseMove:this.swipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,onTouchMove:this.swipe,ref:this.reactSlideshowWrapper},o&&_(l(this.props),this.state.index,this.moveSlides),r.a.createElement("div",{className:"react-slideshow-wrapper slide ".concat(s),ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"images-wrap",style:d,ref:function(e){return t.imageContainer=e}},u?this.renderPreceedingSlides(n,a):"",n.map((function(e,n){var i=t.isSlideActive(n);return r.a.createElement("div",{"data-index":n,key:n,className:i?"active":"","aria-roledescription":"slide","aria-hidden":i?"false":"true"},e)})),this.renderTrailingSlides())),o&&S(l(this.props),this.state.index,this.moveSlides)),i&&O(l(this.props),this.state.index,this.goToSlide))}},{key:"slideImages",value:function(t,e){var n=this,i=l(this.props),r=i.children,s=i.transitionDuration,a=i.autoplay,u=i.infinite,c=i.duration,h=i.onChange,p=i.easing,d=i.slidesToShow,f=i.slidesToScroll;if(s=e||s,!this.tweenGroup.getAll().length){clearTimeout(this.timeout);var v={margin:-this.width*(this.state.index+this.getOffset(u,d))+this.distanceSwiped},y=new o.a.Tween(v,this.tweenGroup).to({margin:-this.width*(t+this.getOffset(u,d))},s).onUpdate((function(t){n.imageContainer&&(n.imageContainer.style.transform="translate(".concat(t.margin,"px)"))})).start();y.easing(g(p)),!function t(){n.willUnmount?n.tweenGroup.removeAll():(requestAnimationFrame(t),n.tweenGroup.update())}(),y.onComplete((function(){if(!n.willUnmount){n.distanceSwiped=0;var e=t;e<0?e=r.length-f:e>=r.length&&(e=0),"function"==typeof h&&h(n.state.index,e),n.setState({index:e},(function(){a&&(u||n.state.index<r.length)&&(clearTimeout(n.timeout),n.timeout=setTimeout((function(){return n.goNext()}),c))}))}}))}}}])&&k(n.prototype,a),u&&k(n,u),e}(i.Component);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function I(){return(I=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function R(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function A(t){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function W(t,e){return(W=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var D=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==P(e)&&"function"!=typeof e?z(t):e}(this,A(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(z(n)),n.handleResize=n.handleResize.bind(z(n)),n.navigate=n.navigate.bind(z(n)),n.preFade=n.preFade.bind(z(n)),n.pauseSlides=n.pauseSlides.bind(z(n)),n.startSlides=n.startSlides.bind(z(n)),n.initResizeObserver=n.initResizeObserver.bind(z(n)),n.tweenGroup=new o.a.Group,n.reactSlideshowWrapper=Object(i.createRef)(),n.wrapper=Object(i.createRef)(),n.startSwipe=n.startSwipe.bind(z(n)),n.endSwipe=n.endSwipe.bind(z(n)),n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&W(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=l(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.fadeImages(o+1)}),r))}},{key:"componentDidUpdate",value:function(t){var e=l(this.props),n=e.autoplay,i=e.children,r=l(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"setWidth",value:function(){this.wrapper.current&&(this.width=this.wrapper.current.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){l(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=l(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=l(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.fadeImages((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=l(this.props),n=e.children;(e.infinite||0!==t)&&this.fadeImages(0===t?n.length-1:t-1)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"goTo",value:function(t){this.fadeImages(t)}},{key:"preFade",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"startSwipe",value:function(t){l(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(t){var e=(t.changedTouches?t.changedTouches[0].pageX:t.clientX)-this.startingClientX;l(this.props).canSwipe&&(this.dragging=!1,Math.abs(e)/this.width>.2&&(e<0?this.goNext():this.goBack()))}},{key:"render",value:function(){var t=this,e=l(this.props),n=e.indicators,i=e.children,o=e.arrows,s=e.cssClass,a=this.state.index,u=w(p,this.props);return r.a.createElement("div",I({dir:"ltr","aria-roledescription":"carousel"},u),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,ref:this.reactSlideshowWrapper},o&&_(l(this.props),this.state.index,this.preFade),r.a.createElement("div",{className:"react-slideshow-fade-wrapper ".concat(s),ref:this.wrapper},r.a.createElement("div",{className:"react-slideshow-fade-images-wrap",ref:function(e){return t.divsContainer=e}},i.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),o&&S(l(this.props),this.state.index,this.preFade)),n&&O(l(this.props),this.state.index,this.navigate))}},{key:"fadeImages",value:function(t){var e=this,n=this.state.index,i=l(this.props),r=i.autoplay,s=i.children,a=i.infinite,u=i.duration,c=i.transitionDuration,h=i.onChange,p=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer.children[t]||(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var d=new o.a.Tween({opacity:0},this.tweenGroup).to({opacity:1},c).onUpdate((function(i){e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity})).start();d.easing(g(p)),d.onComplete((function(){e.willUnmount||(e.setState({index:t}),"function"==typeof h&&h(n,t),r&&(a||t<s.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.fadeImages((t+1)%s.length)}),u)))}))}}}])&&R(n.prototype,a),u&&R(n,u),e}(i.Component);function N(t){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(){return(U=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function F(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function G(t){return(G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var X=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e){return!e||"object"!==N(e)&&"function"!=typeof e?B(t):e}(this,G(e).call(this))).state={index:t.defaultIndex&&t.defaultIndex<t.children.length?t.defaultIndex:0},n.width=0,n.timeout=null,n.divsContainer=null,n.wrapper=null,n.setWidth=n.setWidth.bind(B(n)),n.handleResize=n.handleResize.bind(B(n)),n.navigate=n.navigate.bind(B(n)),n.preZoom=n.preZoom.bind(B(n)),n.pauseSlides=n.pauseSlides.bind(B(n)),n.startSlides=n.startSlides.bind(B(n)),n.tweenGroup=new o.a.Group,n.initResizeObserver=n.initResizeObserver.bind(B(n)),n.reactSlideshowWrapper=Object(i.createRef)(),n.startSwipe=n.startSwipe.bind(B(n)),n.endSwipe=n.endSwipe.bind(B(n)),n}var n,a,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(e,t),n=e,(a=[{key:"componentDidMount",value:function(){this.setWidth(),this.play(),this.initResizeObserver(),d(this.props)}},{key:"initResizeObserver",value:function(){var t=this;this.reactSlideshowWrapper.current&&(this.resizeObserver=new s.a((function(e){e&&t.handleResize()})),this.resizeObserver.observe(this.reactSlideshowWrapper.current))}},{key:"play",value:function(){var t=this,e=l(this.props),n=e.autoplay,i=e.children,r=e.duration,o=this.state.index;n&&i.length>1&&(clearTimeout(this.timeout),this.timeout=setTimeout((function(){return t.zoomTo(o+1)}),r))}},{key:"componentWillUnmount",value:function(){this.willUnmount=!0,clearTimeout(this.timeout),this.removeResizeObserver()}},{key:"removeResizeObserver",value:function(){this.resizeObserver&&this.reactSlideshowWrapper&&this.reactSlideshowWrapper.current&&this.resizeObserver.unobserve(this.reactSlideshowWrapper.current)}},{key:"componentDidUpdate",value:function(t){var e=l(this.props),n=e.autoplay,i=e.children,r=l(t);n!==r.autoplay&&(n?this.play():clearTimeout(this.timeout)),i.length!=r.children.length&&(this.applyStyle(),clearTimeout(this.timeout),this.play())}},{key:"setWidth",value:function(){this.wrapper&&(this.width=this.wrapper.clientWidth),this.applyStyle()}},{key:"handleResize",value:function(){this.setWidth()}},{key:"applyStyle",value:function(){var t=this.width*r.a.Children.count(this.props.children);if(this.divsContainer){this.divsContainer.style.width="".concat(t,"px");for(var e=0;e<this.divsContainer.children.length;e++){var n=this.divsContainer.children[e];n&&(n.style.width="".concat(this.width,"px"),n.style.left="".concat(e*-this.width,"px"))}}}},{key:"pauseSlides",value:function(){l(this.props).pauseOnHover&&clearTimeout(this.timeout)}},{key:"startSlides",value:function(){var t=this,e=l(this.props),n=e.pauseOnHover,i=e.autoplay,r=e.duration;n&&i&&(this.timeout=setTimeout((function(){return t.goNext()}),r))}},{key:"goNext",value:function(){var t=this.state.index,e=l(this.props),n=e.children;(e.infinite||t!==n.length-1)&&this.zoomTo((t+1)%n.length)}},{key:"goBack",value:function(){var t=this.state.index,e=l(this.props),n=e.children;(e.infinite||0!==t)&&this.zoomTo(0===t?n.length-1:t-1)}},{key:"goTo",value:function(t){this.zoomTo(t)}},{key:"navigate",value:function(t){var e=t.currentTarget.dataset;e.key!=this.state.index&&this.goTo(parseInt(e.key))}},{key:"preZoom",value:function(t){"prev"===t.currentTarget.dataset.type?this.goBack():this.goNext()}},{key:"startSwipe",value:function(t){l(this.props).canSwipe&&(this.startingClientX=t.touches?t.touches[0].pageX:t.clientX,clearTimeout(this.timeout),this.dragging=!0)}},{key:"endSwipe",value:function(t){var e=(t.changedTouches?t.changedTouches[0].pageX:t.clientX)-this.startingClientX;l(this.props).canSwipe&&(this.dragging=!1,Math.abs(e)/this.width>.2&&(e<0?this.goNext():this.goBack()))}},{key:"render",value:function(){var t=this,e=l(this.props),n=e.indicators,i=e.arrows,o=e.children,s=e.cssClass,a=this.state.index,u=w(p,this.props);return r.a.createElement("div",U({dir:"ltr","aria-roledescription":"carousel"},u),r.a.createElement("div",{className:"react-slideshow-container",onMouseEnter:this.pauseSlides,onMouseOver:this.pauseSlides,onMouseLeave:this.startSlides,onMouseDown:this.startSwipe,onMouseUp:this.endSwipe,onTouchStart:this.startSwipe,onTouchEnd:this.endSwipe,onTouchCancel:this.endSwipe,ref:this.reactSlideshowWrapper},i&&_(l(this.props),this.state.index,this.preZoom),r.a.createElement("div",{className:"react-slideshow-zoom-wrapper ".concat(s),ref:function(e){return t.wrapper=e}},r.a.createElement("div",{className:"zoom-wrapper",ref:function(e){return t.divsContainer=e}},o.map((function(t,e){return r.a.createElement("div",{style:{opacity:e===a?"1":"0",zIndex:e===a?"1":"0"},"data-index":e,key:e,"aria-roledescription":"slide","aria-hidden":e===a?"false":"true"},t)})))),i&&S(l(this.props),this.state.index,this.preZoom)),n&&O(l(this.props),this.state.index,this.navigate))}},{key:"zoomTo",value:function(t){var e=this,n=this.state.index,i=l(this.props),r=i.children,s=i.scale,a=i.autoplay,u=i.infinite,c=i.transitionDuration,h=i.duration,p=i.onChange,d=i.easing;if(!this.tweenGroup.getAll().length){this.divsContainer&&!this.divsContainer.children[t]&&(t=0),clearTimeout(this.timeout),function t(){e.willUnmount?e.tweenGroup.removeAll():(requestAnimationFrame(t),e.tweenGroup.update())}();var f=new o.a.Tween({opacity:0,scale:1},this.tweenGroup).to({opacity:1,scale:s},c).onUpdate((function(i){e.divsContainer&&(e.divsContainer.children[t].style.opacity=i.opacity,e.divsContainer.children[n].style.opacity=1-i.opacity,e.divsContainer.children[n].style.transform="scale(".concat(i.scale,")"))})).start();f.easing(g(d)),f.onComplete((function(){e.willUnmount||("function"==typeof p&&p(n,t),e.setState({index:t},(function(){e.divsContainer&&(e.divsContainer.children[n].style.transform="scale(1)")})),a&&(u||t<r.length-1)&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){e.zoomTo((t+1)%r.length)}),h)))}))}}}])&&F(n.prototype,a),u&&F(n,u),e}(i.Component)}])}));
2
2
  //# sourceMappingURL=react-slideshow-image.min.js.map