@daoyi/nmtl-ui 2.0.1-beta.9 → 2.0.1-beta.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +45 -45
  2. package/lib/components/Autocomplete-24e9686d.js +423 -0
  3. package/lib/components/Autocomplete.js +19 -1
  4. package/lib/components/Avatar.js +53 -1
  5. package/lib/components/BackTop.js +109 -1
  6. package/lib/components/BarChart.js +762 -1
  7. package/lib/components/Breadcrumbs.js +122 -1
  8. package/lib/components/Button-430d39e6.js +92 -0
  9. package/lib/components/Button.js +6 -1
  10. package/lib/components/Carousel.js +4713 -1
  11. package/lib/components/Checkbox.js +37 -1
  12. package/lib/components/CollapseContent.js +179 -1
  13. package/lib/components/ContactModal-523ae294.js +12030 -0
  14. package/lib/components/ContactModal.js +22 -3
  15. package/lib/components/Drawer-ec47e780.js +156 -0
  16. package/lib/components/Drawer.js +11 -1
  17. package/lib/components/Dropdown.js +134 -1
  18. package/lib/components/Empty-dc5fc2fc.js +45 -0
  19. package/lib/components/Empty.js +5 -1
  20. package/lib/components/ExportButton.js +112 -1
  21. package/lib/components/ExtraTools-0ffc772b.js +3598 -0
  22. package/lib/components/ExtraTools.js +10 -22
  23. package/lib/components/Filter.js +782 -12
  24. package/lib/components/Footer.js +271 -1
  25. package/lib/components/ForwardLink-15222b22.js +106 -0
  26. package/lib/components/ForwardLink.js +8 -0
  27. package/lib/components/Header.js +194 -1
  28. package/lib/components/Image.js +61 -1
  29. package/lib/components/Input.js +82 -1
  30. package/lib/components/InputMethod.js +33937 -10
  31. package/lib/components/KeywordSearch-91167d24.js +144 -0
  32. package/lib/components/KeywordSearch.js +21 -1
  33. package/lib/components/KeywordTicker.js +190 -1
  34. package/lib/components/Keywords.js +317 -1
  35. package/lib/components/Loading.js +28 -1
  36. package/lib/components/MUITheme.js +2624 -1
  37. package/lib/components/Modal-6b8c72d7.js +108 -0
  38. package/lib/components/Modal.js +9 -1
  39. package/lib/components/MoreButton-4d5d94da.js +110 -0
  40. package/lib/components/MoreButton.js +6 -1
  41. package/lib/components/Pagination.js +3637 -0
  42. package/lib/components/Radio.js +78 -1
  43. package/lib/components/SNA.js +1691 -22
  44. package/lib/components/Select-7da870e0.js +115 -0
  45. package/lib/components/Select.js +8 -1
  46. package/lib/components/Spin-9a07b106.js +75 -0
  47. package/lib/components/Spin.js +6 -1
  48. package/lib/components/Table.js +51 -1
  49. package/lib/components/Tooltip-6d53cb6e.js +70 -0
  50. package/lib/components/Tooltip.js +7 -1
  51. package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
  52. package/lib/components/_rollupPluginBabelHelpers-ed61ffc0.js +160 -0
  53. package/lib/components/createSvgIcon-ff0e3b99.js +576 -0
  54. package/lib/components/dataExport-d55d6fa3.js +92 -0
  55. package/lib/components/debounce-127da66c.js +355 -0
  56. package/lib/components/defaultTheme-ed7746fe.js +1661 -0
  57. package/lib/components/globalConfig.js +191 -0
  58. package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
  59. package/lib/components/index-a6f22b92.js +481 -0
  60. package/lib/components/index-f491ebce.js +61 -0
  61. package/lib/components/isObjectLike-e111475d.js +190 -0
  62. package/lib/components/style-inject.es-1f59c1d0.js +28 -1
  63. package/lib/components/toConsumableArray-dbe8af76.js +19 -0
  64. package/lib/components/transform-3a04288b.js +5475 -0
  65. package/lib/components/withTheme-2d778133.js +6 -0
  66. package/lib/configs/config.selector.js +151 -0
  67. package/lib/configs/index.d.ts +1 -0
  68. package/lib/configs/index.js +1 -0
  69. package/lib/index.d.ts +2 -0
  70. package/lib/index.js +2 -0
  71. package/lib/utils/_rollupPluginBabelHelpers-a6e0e6e3.js +139 -0
  72. package/lib/utils/arrayMerge.js +4953 -1
  73. package/lib/utils/chunkArray.js +15 -1
  74. package/lib/utils/convert2HtmlEntities.js +42 -1
  75. package/lib/utils/domToImage.js +802 -1
  76. package/lib/utils/downloadGephi.js +106 -1
  77. package/lib/utils/exportXlsx.js +219 -1
  78. package/lib/utils/historyAppendSearch.js +502 -1
  79. package/lib/utils/isDevelopMode.js +5 -1
  80. package/lib/utils/parseYMD.js +36 -1
  81. package/lib/utils/removeDuplicateItem.js +11 -1
  82. package/lib/utils/sendEmail.js +39 -1
  83. package/lib/utils/snaDefine-6a2bcd94.js +5 -0
  84. package/lib/utils/snaDefine.js +1 -1
  85. package/lib/utils/snaPreProcess.js +84 -1
  86. package/package.json +125 -127
  87. package/lib/components/Empty-54b79907.js +0 -1
  88. package/lib/components/KeywordSearch-5a393f12.js +0 -1
  89. package/lib/components/Select-f2441b83.js +0 -1
  90. package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
  91. package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
  92. package/lib/components/createSvgIcon-62b64929.js +0 -1
  93. package/lib/components/createSvgIcon-e24792d4.js +0 -1
  94. package/lib/components/createTheme-7fffa109.js +0 -1
  95. package/lib/components/dataExport-9fccd4f0.js +0 -1
  96. package/lib/components/debounce-c993109b.js +0 -1
  97. package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
  98. package/lib/components/index-11391ca3.js +0 -7
  99. package/lib/components/index-b2745105.js +0 -7
  100. package/lib/components/isObjectLike-2f1983fe.js +0 -1
  101. package/lib/components/style-inject.es-c875d022.js +0 -1
  102. package/lib/components/transform-95ae0119.js +0 -1
  103. package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
  104. package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
@@ -1 +1,4713 @@
1
- import{c as e,b as t,_ as n}from"./_rollupPluginBabelHelpers-ec4e2a53.js";import r,{forwardRef as i,useRef as o,useImperativeHandle as a}from"react";import{b as s,u as l,a as c,c as u}from"./index-b2745105.js";import d from"prop-types";import{s as f}from"./style-inject.es-1f59c1d0.js";var p=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={animating:!1,autoplaying:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,dragging:!1,edgeDragged:!1,initialized:!1,lazyLoadedList:[],listHeight:null,listWidth:null,scrolling:!1,slideCount:null,slideHeight:null,slideWidth:null,swipeLeft:null,swiped:!1,swiping:!1,touchObject:{startX:0,startY:0,curX:0,curY:0},trackStyle:{},trackWidth:0,targetSlide:0};t.default=n}));l(p);var h=/^\s+|\s+$/g,v=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,b=/^0o[0-7]+$/i,g=parseInt,m="object"==typeof c&&c&&c.Object===Object&&c,S="object"==typeof self&&self&&self.Object===Object&&self,w=m||S||Function("return this")(),k=Object.prototype.toString,O=Math.max,x=Math.min,T=function(){return w.Date.now()};function _(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function P(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==k.call(e)}(e))return NaN;if(_(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=_(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(h,"");var n=y.test(e);return n||b.test(e)?g(e.slice(2),n?2:8):v.test(e)?NaN:+e}var j=function(e,t,n){var r,i,o,a,s,l,c=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function h(e){return c=e,s=setTimeout(y,t),u?p(e):a}function v(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=o}function y(){var e=T();if(v(e))return b(e);s=setTimeout(y,function(e){var n=t-(e-l);return d?x(n,o-(e-c)):n}(e))}function b(e){return s=void 0,f&&r?p(e):(r=i=void 0,a)}function g(){var e=T(),n=v(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return h(l);if(d)return s=setTimeout(y,t),p(l)}return void 0===s&&(s=setTimeout(y,t)),a}return t=P(t)||0,_(n)&&(u=!!n.leading,o=(d="maxWait"in n)?O(P(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},g.flush=function(){return void 0===s?a:b(T())},g},E=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.clamp=l,t.canUseDOM=t.slidesOnLeft=t.slidesOnRight=t.siblingDirection=t.getTotalSlides=t.getPostClones=t.getPreClones=t.getTrackLeft=t.getTrackAnimateCSS=t.getTrackCSS=t.checkSpecKeys=t.getSlideCount=t.checkNavigable=t.getNavigableIndexes=t.swipeEnd=t.swipeMove=t.swipeStart=t.keyHandler=t.changeSlide=t.slideHandler=t.initializedState=t.extractObject=t.canGoNext=t.getSwipeDirection=t.getHeight=t.getWidth=t.lazySlidesOnRight=t.lazySlidesOnLeft=t.lazyEndIndex=t.lazyStartIndex=t.getRequiredLazySlides=t.getOnDemandLazySlides=t.safePreventDefault=void 0;var n,i=(n=r)&&n.__esModule?n:{default:n};function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t,n){return Math.max(t,Math.min(e,n))}var c=function(e){["onTouchStart","onTouchMove","onWheel"].includes(e._reactName)||e.preventDefault()};t.safePreventDefault=c;var u=function(e){for(var t=[],n=d(e),r=f(e),i=n;i<r;i++)e.lazyLoadedList.indexOf(i)<0&&t.push(i);return t};t.getOnDemandLazySlides=u;t.getRequiredLazySlides=function(e){for(var t=[],n=d(e),r=f(e),i=n;i<r;i++)t.push(i);return t};var d=function(e){return e.currentSlide-p(e)};t.lazyStartIndex=d;var f=function(e){return e.currentSlide+h(e)};t.lazyEndIndex=f;var p=function(e){return e.centerMode?Math.floor(e.slidesToShow/2)+(parseInt(e.centerPadding)>0?1:0):0};t.lazySlidesOnLeft=p;var h=function(e){return e.centerMode?Math.floor((e.slidesToShow-1)/2)+1+(parseInt(e.centerPadding)>0?1:0):e.slidesToShow};t.lazySlidesOnRight=h;var v=function(e){return e&&e.offsetWidth||0};t.getWidth=v;var y=function(e){return e&&e.offsetHeight||0};t.getHeight=y;var b=function(e){var t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=e.startX-e.curX,n=e.startY-e.curY,r=Math.atan2(n,t),(i=Math.round(180*r/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":!0===o?i>=35&&i<=135?"up":"down":"vertical"};t.getSwipeDirection=b;var g=function(e){var t=!0;return e.infinite||(e.centerMode&&e.currentSlide>=e.slideCount-1||e.slideCount<=e.slidesToShow||e.currentSlide>=e.slideCount-e.slidesToShow)&&(t=!1),t};t.canGoNext=g;t.extractObject=function(e,t){var n={};return t.forEach((function(t){return n[t]=e[t]})),n};t.initializedState=function(e){var t,n=i.default.Children.count(e.children),r=e.listRef,o=Math.ceil(v(r)),s=e.trackRef&&e.trackRef.node,l=Math.ceil(v(s));if(e.vertical)t=o;else{var c=e.centerMode&&2*parseInt(e.centerPadding);"string"==typeof e.centerPadding&&"%"===e.centerPadding.slice(-1)&&(c*=o/100),t=Math.ceil((o-c)/e.slidesToShow)}var d=r&&y(r.querySelector('[data-index="0"]')),f=d*e.slidesToShow,p=void 0===e.currentSlide?e.initialSlide:e.currentSlide;e.rtl&&void 0===e.currentSlide&&(p=n-1-e.initialSlide);var h=e.lazyLoadedList||[],b=u(a(a({},e),{},{currentSlide:p,lazyLoadedList:h})),g={slideCount:n,slideWidth:t,listWidth:o,trackWidth:l,currentSlide:p,slideHeight:d,listHeight:f,lazyLoadedList:h=h.concat(b)};return null===e.autoplaying&&e.autoplay&&(g.autoplaying="playing"),g};t.slideHandler=function(e){var t=e.waitForAnimate,n=e.animating,r=e.fade,i=e.infinite,o=e.index,s=e.slideCount,c=e.lazyLoad,d=e.currentSlide,f=e.centerMode,p=e.slidesToScroll,h=e.slidesToShow,v=e.useCSS,y=e.lazyLoadedList;if(t&&n)return{};var b,m,S,w=o,k={},_={},P=i?o:l(o,0,s-1);if(r){if(!i&&(o<0||o>=s))return{};o<0?w=o+s:o>=s&&(w=o-s),c&&y.indexOf(w)<0&&(y=y.concat(w)),k={animating:!0,currentSlide:w,lazyLoadedList:y,targetSlide:w},_={animating:!1,targetSlide:w}}else b=w,w<0?(b=w+s,i?s%p!=0&&(b=s-s%p):b=0):!g(e)&&w>d?w=b=d:f&&w>=s?(w=i?s:s-1,b=i?0:s-1):w>=s&&(b=w-s,i?s%p!=0&&(b=0):b=s-h),!i&&w+h>=s&&(b=s-h),m=T(a(a({},e),{},{slideIndex:w})),S=T(a(a({},e),{},{slideIndex:b})),i||(m===S&&(w=b),m=S),c&&(y=y.concat(u(a(a({},e),{},{currentSlide:w})))),v?(k={animating:!0,currentSlide:b,trackStyle:x(a(a({},e),{},{left:m})),lazyLoadedList:y,targetSlide:P},_={animating:!1,currentSlide:b,trackStyle:O(a(a({},e),{},{left:S})),swipeLeft:null,targetSlide:P}):k={currentSlide:b,trackStyle:O(a(a({},e),{},{left:S})),lazyLoadedList:y,targetSlide:P};return{state:k,nextState:_}};t.changeSlide=function(e,t){var n,r,i,o,s=e.slidesToScroll,l=e.slidesToShow,c=e.slideCount,u=e.currentSlide,d=e.targetSlide,f=e.lazyLoad,p=e.infinite;if(n=c%s!=0?0:(c-u)%s,"previous"===t.message)o=u-(i=0===n?s:l-n),f&&!p&&(o=-1===(r=u-i)?c-1:r),p||(o=d-s);else if("next"===t.message)o=u+(i=0===n?s:n),f&&!p&&(o=(u+s)%c+n),p||(o=d+s);else if("dots"===t.message)o=t.index*t.slidesToScroll;else if("children"===t.message){if(o=t.index,p){var h=E(a(a({},e),{},{targetSlide:o}));o>t.currentSlide&&"left"===h?o-=c:o<t.currentSlide&&"right"===h&&(o+=c)}}else"index"===t.message&&(o=Number(t.index));return o};t.keyHandler=function(e,t,n){return e.target.tagName.match("TEXTAREA|INPUT|SELECT")||!t?"":37===e.keyCode?n?"next":"previous":39===e.keyCode?n?"previous":"next":""};t.swipeStart=function(e,t,n){return"IMG"===e.target.tagName&&c(e),!t||!n&&-1!==e.type.indexOf("mouse")?"":{dragging:!0,touchObject:{startX:e.touches?e.touches[0].pageX:e.clientX,startY:e.touches?e.touches[0].pageY:e.clientY,curX:e.touches?e.touches[0].pageX:e.clientX,curY:e.touches?e.touches[0].pageY:e.clientY}}};t.swipeMove=function(e,t){var n=t.scrolling,r=t.animating,i=t.vertical,o=t.swipeToSlide,s=t.verticalSwiping,l=t.rtl,u=t.currentSlide,d=t.edgeFriction,f=t.edgeDragged,p=t.onEdge,h=t.swiped,v=t.swiping,y=t.slideCount,m=t.slidesToScroll,S=t.infinite,w=t.touchObject,k=t.swipeEvent,x=t.listHeight,_=t.listWidth;if(!n){if(r)return c(e);i&&o&&s&&c(e);var P,j={},E=T(t);w.curX=e.touches?e.touches[0].pageX:e.clientX,w.curY=e.touches?e.touches[0].pageY:e.clientY,w.swipeLength=Math.round(Math.sqrt(Math.pow(w.curX-w.startX,2)));var L=Math.round(Math.sqrt(Math.pow(w.curY-w.startY,2)));if(!s&&!v&&L>10)return{scrolling:!0};s&&(w.swipeLength=L);var M=(l?-1:1)*(w.curX>w.startX?1:-1);s&&(M=w.curY>w.startY?1:-1);var C=Math.ceil(y/m),z=b(t.touchObject,s),R=w.swipeLength;return S||(0===u&&("right"===z||"down"===z)||u+1>=C&&("left"===z||"up"===z)||!g(t)&&("left"===z||"up"===z))&&(R=w.swipeLength*d,!1===f&&p&&(p(z),j.edgeDragged=!0)),!h&&k&&(k(z),j.swiped=!0),P=i?E+R*(x/_)*M:l?E-R*M:E+R*M,s&&(P=E+R*M),j=a(a({},j),{},{touchObject:w,swipeLeft:P,trackStyle:O(a(a({},t),{},{left:P}))}),Math.abs(w.curX-w.startX)<.8*Math.abs(w.curY-w.startY)?j:(w.swipeLength>10&&(j.swiping=!0,c(e)),j)}};t.swipeEnd=function(e,t){var n=t.dragging,r=t.swipe,i=t.touchObject,o=t.listWidth,s=t.touchThreshold,l=t.verticalSwiping,u=t.listHeight,d=t.swipeToSlide,f=t.scrolling,p=t.onSwipe,h=t.targetSlide,v=t.currentSlide,y=t.infinite;if(!n)return r&&c(e),{};var g=l?u/s:o/s,m=b(i,l),k={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(f)return k;if(!i.swipeLength)return k;if(i.swipeLength>g){var O,_;c(e),p&&p(m);var P=y?v:h;switch(m){case"left":case"up":_=P+w(t),O=d?S(t,_):_,k.currentDirection=0;break;case"right":case"down":_=P-w(t),O=d?S(t,_):_,k.currentDirection=1;break;default:O=P}k.triggerSlideHandler=O}else{var j=T(t);k.trackStyle=x(a(a({},t),{},{left:j}))}return k};var m=function(e){for(var t=e.infinite?2*e.slideCount:e.slideCount,n=e.infinite?-1*e.slidesToShow:0,r=e.infinite?-1*e.slidesToShow:0,i=[];n<t;)i.push(n),n=r+e.slidesToScroll,r+=Math.min(e.slidesToScroll,e.slidesToShow);return i};t.getNavigableIndexes=m;var S=function(e,t){var n=m(e),r=0;if(t>n[n.length-1])t=n[n.length-1];else for(var i in n){if(t<n[i]){t=r;break}r=n[i]}return t};t.checkNavigable=S;var w=function(e){var t=e.centerMode?e.slideWidth*Math.floor(e.slidesToShow/2):0;if(e.swipeToSlide){var n,r=e.listRef,i=r.querySelectorAll&&r.querySelectorAll(".slick-slide")||[];if(Array.from(i).every((function(r){if(e.vertical){if(r.offsetTop+y(r)/2>-1*e.swipeLeft)return n=r,!1}else if(r.offsetLeft-t+v(r)/2>-1*e.swipeLeft)return n=r,!1;return!0})),!n)return 0;var o=!0===e.rtl?e.slideCount-e.currentSlide:e.currentSlide;return Math.abs(n.dataset.index-o)||1}return e.slidesToScroll};t.getSlideCount=w;var k=function(e,t){return t.reduce((function(t,n){return t&&e.hasOwnProperty(n)}),!0)?null:console.error("Keys Missing:",e)};t.checkSpecKeys=k;var O=function(e){var t,n;k(e,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var r=e.slideCount+2*e.slidesToShow;e.vertical?n=r*e.slideHeight:t=j(e)*e.slideWidth;var i={opacity:1,transition:"",WebkitTransition:""};if(e.useTransform){var o=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",s=e.vertical?"translate3d(0px, "+e.left+"px, 0px)":"translate3d("+e.left+"px, 0px, 0px)",l=e.vertical?"translateY("+e.left+"px)":"translateX("+e.left+"px)";i=a(a({},i),{},{WebkitTransform:o,transform:s,msTransform:l})}else e.vertical?i.top=e.left:i.left=e.left;return e.fade&&(i={opacity:1}),t&&(i.width=t),n&&(i.height=n),window&&!window.addEventListener&&window.attachEvent&&(e.vertical?i.marginTop=e.left+"px":i.marginLeft=e.left+"px"),i};t.getTrackCSS=O;var x=function(e){k(e,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var t=O(e);return e.useTransform?(t.WebkitTransition="-webkit-transform "+e.speed+"ms "+e.cssEase,t.transition="transform "+e.speed+"ms "+e.cssEase):e.vertical?t.transition="top "+e.speed+"ms "+e.cssEase:t.transition="left "+e.speed+"ms "+e.cssEase,t};t.getTrackAnimateCSS=x;var T=function(e){if(e.unslick)return 0;k(e,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var t,n,r=e.slideIndex,i=e.trackRef,o=e.infinite,a=e.centerMode,s=e.slideCount,l=e.slidesToShow,c=e.slidesToScroll,u=e.slideWidth,d=e.listWidth,f=e.variableWidth,p=e.slideHeight,h=e.fade,v=e.vertical;if(h||1===e.slideCount)return 0;var y=0;if(o?(y=-_(e),s%c!=0&&r+c>s&&(y=-(r>s?l-(r-s):s%c)),a&&(y+=parseInt(l/2))):(s%c!=0&&r+c>s&&(y=l-s%c),a&&(y=parseInt(l/2))),t=v?r*p*-1+y*p:r*u*-1+y*u,!0===f){var b,g=i&&i.node;if(b=r+_(e),t=(n=g&&g.childNodes[b])?-1*n.offsetLeft:0,!0===a){b=o?r+_(e):r,n=g&&g.children[b],t=0;for(var m=0;m<b;m++)t-=g&&g.children[m]&&g.children[m].offsetWidth;t-=parseInt(e.centerPadding),t+=n&&(d-n.offsetWidth)/2}}return t};t.getTrackLeft=T;var _=function(e){return e.unslick||!e.infinite?0:e.variableWidth?e.slideCount:e.slidesToShow+(e.centerMode?1:0)};t.getPreClones=_;var P=function(e){return e.unslick||!e.infinite?0:e.slideCount};t.getPostClones=P;var j=function(e){return 1===e.slideCount?1:_(e)+e.slideCount+P(e)};t.getTotalSlides=j;var E=function(e){return e.targetSlide>e.currentSlide?e.targetSlide>e.currentSlide+L(e)?"left":"right":e.targetSlide<e.currentSlide-M(e)?"right":"left"};t.siblingDirection=E;var L=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r&&t%2==0&&(o+=1),o}return r?0:t-1};t.slidesOnRight=L;var M=function(e){var t=e.slidesToShow,n=e.centerMode,r=e.rtl,i=e.centerPadding;if(n){var o=(t-1)/2+1;return parseInt(i)>0&&(o+=1),r||t%2!=0||(o+=1),o}return r?t-1:0};t.slidesOnLeft=M;t.canUseDOM=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}}));l(E),E.clamp,E.canUseDOM,E.slidesOnLeft,E.slidesOnRight,E.siblingDirection,E.getTotalSlides,E.getPostClones,E.getPreClones,E.getTrackLeft,E.getTrackAnimateCSS,E.getTrackCSS,E.checkSpecKeys,E.getSlideCount,E.checkNavigable,E.getNavigableIndexes,E.swipeEnd,E.swipeMove,E.swipeStart,E.keyHandler,E.changeSlide,E.slideHandler,E.initializedState,E.extractObject,E.canGoNext,E.getSwipeDirection,E.getHeight,E.getWidth,E.lazySlidesOnRight,E.lazySlidesOnLeft,E.lazyEndIndex,E.lazyStartIndex,E.getRequiredLazySlides,E.getOnDemandLazySlides,E.safePreventDefault;var L=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Track=void 0;var n=o(r),i=o(u);function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){var t,n,r,i,o;return r=(o=e.rtl?e.slideCount-1-e.index:e.index)<0||o>=e.slideCount,e.centerMode?(i=Math.floor(e.slidesToShow/2),n=(o-e.currentSlide)%e.slideCount==0,o>e.currentSlide-i-1&&o<=e.currentSlide+i&&(t=!0)):t=e.currentSlide<=o&&o<e.currentSlide+e.slidesToShow,{"slick-slide":!0,"slick-active":t,"slick-center":n,"slick-cloned":r,"slick-current":o===(e.targetSlide<0?e.targetSlide+e.slideCount:e.targetSlide>=e.slideCount?e.targetSlide-e.slideCount:e.targetSlide)}},S=function(e,t){return e.key||t},w=function(e){var t,r=[],o=[],a=[],s=n.default.Children.count(e.children),l=(0,E.lazyStartIndex)(e),c=(0,E.lazyEndIndex)(e);return n.default.Children.forEach(e.children,(function(u,d){var f,p={message:"children",index:d,slidesToScroll:e.slidesToScroll,currentSlide:e.currentSlide};f=!e.lazyLoad||e.lazyLoad&&e.lazyLoadedList.indexOf(d)>=0?u:n.default.createElement("div",null);var h=function(e){var t={};return void 0!==e.variableWidth&&!1!==e.variableWidth||(t.width=e.slideWidth),e.fade&&(t.position="relative",e.vertical?t.top=-e.index*parseInt(e.slideHeight):t.left=-e.index*parseInt(e.slideWidth),t.opacity=e.currentSlide===e.index?1:0,e.useCSS&&(t.transition="opacity "+e.speed+"ms "+e.cssEase+", visibility "+e.speed+"ms "+e.cssEase)),t}(b(b({},e),{},{index:d})),v=f.props.className||"",y=m(b(b({},e),{},{index:d}));if(r.push(n.default.cloneElement(f,{key:"original"+S(f,d),"data-index":d,className:(0,i.default)(y,v),tabIndex:"-1","aria-hidden":!y["slick-active"],style:b(b({outline:"none"},f.props.style||{}),h),onClick:function(t){f.props&&f.props.onClick&&f.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(p)}})),e.infinite&&!1===e.fade){var g=s-d;g<=(0,E.getPreClones)(e)&&s!==e.slidesToShow&&((t=-g)>=l&&(f=u),y=m(b(b({},e),{},{index:t})),o.push(n.default.cloneElement(f,{key:"precloned"+S(f,t),"data-index":t,tabIndex:"-1",className:(0,i.default)(y,v),"aria-hidden":!y["slick-active"],style:b(b({},f.props.style||{}),h),onClick:function(t){f.props&&f.props.onClick&&f.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(p)}}))),s!==e.slidesToShow&&((t=s+d)<c&&(f=u),y=m(b(b({},e),{},{index:t})),a.push(n.default.cloneElement(f,{key:"postcloned"+S(f,t),"data-index":t,tabIndex:"-1",className:(0,i.default)(y,v),"aria-hidden":!y["slick-active"],style:b(b({},f.props.style||{}),h),onClick:function(t){f.props&&f.props.onClick&&f.props.onClick(t),e.focusOnSelect&&e.focusOnSelect(p)}})))}})),e.rtl?o.concat(r,a).reverse():o.concat(r,a)},k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(a,e);var t,r,i,o=f(a);function a(){var e;l(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return g(h(e=o.call.apply(o,[this].concat(n))),"node",null),g(h(e),"handleRef",(function(t){e.node=t})),e}return t=a,(r=[{key:"render",value:function(){var e=w(this.props),t=this.props,r={onMouseEnter:t.onMouseEnter,onMouseOver:t.onMouseOver,onMouseLeave:t.onMouseLeave};return n.default.createElement("div",s({ref:this.handleRef,className:"slick-track",style:this.props.trackStyle},r),e)}}])&&c(t.prototype,r),i&&c(t,i),a}(n.default.PureComponent);t.Track=k}));l(L),L.Track;var M=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Dots=void 0;var n=o(r),i=o(u);function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(u,e);var t,r,o,a=p(u);function u(){return c(this,u),a.apply(this,arguments)}return t=u,r=[{key:"clickHandler",value:function(e,t){t.preventDefault(),this.props.clickHandler(e)}},{key:"render",value:function(){for(var e,t=this.props,r=t.onMouseEnter,o=t.onMouseOver,a=t.onMouseLeave,c=t.infinite,u=t.slidesToScroll,d=t.slidesToShow,f=t.slideCount,p=t.currentSlide,h=(e={slideCount:f,slidesToScroll:u,slidesToShow:d,infinite:c}).infinite?Math.ceil(e.slideCount/e.slidesToScroll):Math.ceil((e.slideCount-e.slidesToShow)/e.slidesToScroll)+1,v={onMouseEnter:r,onMouseOver:o,onMouseLeave:a},y=[],b=0;b<h;b++){var g=(b+1)*u-1,m=c?g:(0,E.clamp)(g,0,f-1),S=m-(u-1),w=c?S:(0,E.clamp)(S,0,f-1),k=(0,i.default)({"slick-active":c?p>=w&&p<=m:p===w}),O={message:"dots",index:b,slidesToScroll:u,currentSlide:p},x=this.clickHandler.bind(this,O);y=y.concat(n.default.createElement("li",{key:b,className:k},n.default.cloneElement(this.props.customPaging(b),{onClick:x})))}return n.default.cloneElement(this.props.appendDots(y),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({className:this.props.dotsClass},v))}}],r&&d(t.prototype,r),o&&d(t,o),u}(n.default.PureComponent);t.Dots=y}));l(M),M.Dots;var C=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NextArrow=t.PrevArrow=void 0;var n=o(r),i=o(u);function o(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var S=function(e){v(r,e);var t=b(r);function r(){return f(this,r),t.apply(this,arguments)}return h(r,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-prev":!0},t=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(e["slick-disabled"]=!0,t=null);var r={key:"0","data-role":"none",className:(0,i.default)(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.prevArrow?n.default.cloneElement(this.props.prevArrow,c(c({},r),o)):n.default.createElement("button",s({key:"0",type:"button"},r)," ","Previous")}}]),r}(n.default.PureComponent);t.PrevArrow=S;var w=function(e){v(r,e);var t=b(r);function r(){return f(this,r),t.apply(this,arguments)}return h(r,[{key:"clickHandler",value:function(e,t){t&&t.preventDefault(),this.props.clickHandler(e,t)}},{key:"render",value:function(){var e={"slick-arrow":!0,"slick-next":!0},t=this.clickHandler.bind(this,{message:"next"});(0,E.canGoNext)(this.props)||(e["slick-disabled"]=!0,t=null);var r={key:"1","data-role":"none",className:(0,i.default)(e),style:{display:"block"},onClick:t},o={currentSlide:this.props.currentSlide,slideCount:this.props.slideCount};return this.props.nextArrow?n.default.cloneElement(this.props.nextArrow,c(c({},r),o)):n.default.createElement("button",s({key:"1",type:"button"},r)," ","Next")}}]),r}(n.default.PureComponent);t.NextArrow=w}));l(C),C.NextArrow,C.PrevArrow;var z=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),R="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,D="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),H="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(D):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var W=["top","right","bottom","left","width","height","size","weight"],I="undefined"!=typeof MutationObserver,N=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&s()}function a(){H(o)}function s(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){R&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),I?(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)},e.prototype.disconnect_=function(){R&&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)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;W.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),A=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},q=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||D},X=K(0,0,0,0);function Y(e){return parseFloat(e)||0}function F(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+Y(e["border-"+n+"-width"])}),0)}function G(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return X;var r=q(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=Y(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=Y(r.width),l=Y(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=F(r,"left","right")+o),Math.round(l+a)!==n&&(l-=F(r,"top","bottom")+a)),!function(e){return e===q(e).document.documentElement}(e)){var c=Math.round(s+o)-t,u=Math.round(l+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(u)&&(l-=u)}return K(i.left,i.top,s,l)}var U="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof q(e).SVGGraphicsElement}:function(e){return e instanceof q(e).SVGElement&&"function"==typeof e.getBBox};function B(e){return R?U(e)?function(e){var t=e.getBBox();return K(0,0,t.width,t.height)}(e):G(e):X}function K(e,t,n,r){return{x:e,y:t,width:n,height:r}}var V=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=K(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=B(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),$=function(e,t){var n,r,i,o,a,s,l,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),A(l,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),l);A(this,{target:e,contentRect:c})},Z=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new z,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof q(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new V(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof q(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new $(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),J="undefined"!=typeof WeakMap?new WeakMap:new z,Q=function e(t){if(!(this instanceof e))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=N.getInstance(),r=new Z(t,n,this);J.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){Q.prototype[e]=function(){var t;return(t=J.get(this))[e].apply(t,arguments)}}));var ee=void 0!==D.ResizeObserver?D.ResizeObserver:Q,te=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.InnerSlider=void 0;var n=l(r),i=l(p),o=l(j),a=l(u),s=l(ee);function l(e){return e&&e.__esModule?e:{default:e}}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?S(e):t}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(p,e);var t,r,l,u=g(p);function p(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),k(S(t=u.call(this,e)),"listRefHandler",(function(e){return t.list=e})),k(S(t),"trackRefHandler",(function(e){return t.track=e})),k(S(t),"adaptHeight",(function(){if(t.props.adaptiveHeight&&t.list){var e=t.list.querySelector('[data-index="'.concat(t.state.currentSlide,'"]'));t.list.style.height=(0,E.getHeight)(e)+"px"}})),k(S(t),"componentDidMount",(function(){if(t.props.onInit&&t.props.onInit(),t.props.lazyLoad){var e=(0,E.getOnDemandLazySlides)(v(v({},t.props),t.state));e.length>0&&(t.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),t.props.onLazyLoad&&t.props.onLazyLoad(e))}var n=v({listRef:t.list,trackRef:t.track},t.props);t.updateState(n,!0,(function(){t.adaptHeight(),t.props.autoplay&&t.autoPlay("update")})),"progressive"===t.props.lazyLoad&&(t.lazyLoadTimer=setInterval(t.progressiveLazyLoad,1e3)),t.ro=new s.default((function(){t.state.animating?(t.onWindowResized(!1),t.callbackTimers.push(setTimeout((function(){return t.onWindowResized()}),t.props.speed))):t.onWindowResized()})),t.ro.observe(t.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),(function(e){e.onfocus=t.props.pauseOnFocus?t.onSlideFocus:null,e.onblur=t.props.pauseOnFocus?t.onSlideBlur:null})),window.addEventListener?window.addEventListener("resize",t.onWindowResized):window.attachEvent("onresize",t.onWindowResized)})),k(S(t),"componentWillUnmount",(function(){t.animationEndCallback&&clearTimeout(t.animationEndCallback),t.lazyLoadTimer&&clearInterval(t.lazyLoadTimer),t.callbackTimers.length&&(t.callbackTimers.forEach((function(e){return clearTimeout(e)})),t.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",t.onWindowResized):window.detachEvent("onresize",t.onWindowResized),t.autoplayTimer&&clearInterval(t.autoplayTimer),t.ro.disconnect()})),k(S(t),"componentDidUpdate",(function(e){if(t.checkImagesLoad(),t.props.onReInit&&t.props.onReInit(),t.props.lazyLoad){var r=(0,E.getOnDemandLazySlides)(v(v({},t.props),t.state));r.length>0&&(t.setState((function(e){return{lazyLoadedList:e.lazyLoadedList.concat(r)}})),t.props.onLazyLoad&&t.props.onLazyLoad(r))}t.adaptHeight();var i=v(v({listRef:t.list,trackRef:t.track},t.props),t.state),o=t.didPropsChange(e);o&&t.updateState(i,o,(function(){t.state.currentSlide>=n.default.Children.count(t.props.children)&&t.changeSlide({message:"index",index:n.default.Children.count(t.props.children)-t.props.slidesToShow,currentSlide:t.state.currentSlide}),t.props.autoplay?t.autoPlay("update"):t.pause("paused")}))})),k(S(t),"onWindowResized",(function(e){t.debouncedResize&&t.debouncedResize.cancel(),t.debouncedResize=(0,o.default)((function(){return t.resizeWindow(e)}),50),t.debouncedResize()})),k(S(t),"resizeWindow",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Boolean(t.track&&t.track.node);if(n){var r=v(v({listRef:t.list,trackRef:t.track},t.props),t.state);t.updateState(r,e,(function(){t.props.autoplay?t.autoPlay("update"):t.pause("paused")})),t.setState({animating:!1}),clearTimeout(t.animationEndCallback),delete t.animationEndCallback}})),k(S(t),"updateState",(function(e,r,i){var o=(0,E.initializedState)(e);e=v(v(v({},e),o),{},{slideIndex:o.currentSlide});var a=(0,E.getTrackLeft)(e);e=v(v({},e),{},{left:a});var s=(0,E.getTrackCSS)(e);(r||n.default.Children.count(t.props.children)!==n.default.Children.count(e.children))&&(o.trackStyle=s),t.setState(o,i)})),k(S(t),"ssrInit",(function(){if(t.props.variableWidth){var e=0,r=0,i=[],o=(0,E.getPreClones)(v(v(v({},t.props),t.state),{},{slideCount:t.props.children.length})),a=(0,E.getPostClones)(v(v(v({},t.props),t.state),{},{slideCount:t.props.children.length}));t.props.children.forEach((function(t){i.push(t.props.style.width),e+=t.props.style.width}));for(var s=0;s<o;s++)r+=i[i.length-1-s],e+=i[i.length-1-s];for(var l=0;l<a;l++)e+=i[l];for(var c=0;c<t.state.currentSlide;c++)r+=i[c];var u={width:e+"px",left:-r+"px"};if(t.props.centerMode){var d="".concat(i[t.state.currentSlide],"px");u.left="calc(".concat(u.left," + (100% - ").concat(d,") / 2 ) ")}return{trackStyle:u}}var f=n.default.Children.count(t.props.children),p=v(v(v({},t.props),t.state),{},{slideCount:f}),h=(0,E.getPreClones)(p)+(0,E.getPostClones)(p)+f,y=100/t.props.slidesToShow*h,b=100/h,g=-b*((0,E.getPreClones)(p)+t.state.currentSlide)*y/100;return t.props.centerMode&&(g+=(100-b*y/100)/2),{slideWidth:b+"%",trackStyle:{width:y+"%",left:g+"%"}}})),k(S(t),"checkImagesLoad",(function(){var e=t.list&&t.list.querySelectorAll&&t.list.querySelectorAll(".slick-slide img")||[],n=e.length,r=0;Array.prototype.forEach.call(e,(function(e){var i=function(){return++r&&r>=n&&t.onWindowResized()};if(e.onclick){var o=e.onclick;e.onclick=function(){o(),e.parentNode.focus()}}else e.onclick=function(){return e.parentNode.focus()};e.onload||(t.props.lazyLoad?e.onload=function(){t.adaptHeight(),t.callbackTimers.push(setTimeout(t.onWindowResized,t.props.speed))}:(e.onload=i,e.onerror=function(){i(),t.props.onLazyLoadError&&t.props.onLazyLoadError()}))}))})),k(S(t),"progressiveLazyLoad",(function(){for(var e=[],n=v(v({},t.props),t.state),r=t.state.currentSlide;r<t.state.slideCount+(0,E.getPostClones)(n);r++)if(t.state.lazyLoadedList.indexOf(r)<0){e.push(r);break}for(var i=t.state.currentSlide-1;i>=-(0,E.getPreClones)(n);i--)if(t.state.lazyLoadedList.indexOf(i)<0){e.push(i);break}e.length>0?(t.setState((function(t){return{lazyLoadedList:t.lazyLoadedList.concat(e)}})),t.props.onLazyLoad&&t.props.onLazyLoad(e)):t.lazyLoadTimer&&(clearInterval(t.lazyLoadTimer),delete t.lazyLoadTimer)})),k(S(t),"slideHandler",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.props,i=r.asNavFor,o=r.beforeChange,a=r.onLazyLoad,s=r.speed,l=r.afterChange,c=t.state.currentSlide,u=(0,E.slideHandler)(v(v(v({index:e},t.props),t.state),{},{trackRef:t.track,useCSS:t.props.useCSS&&!n})),d=u.state,p=u.nextState;if(d){o&&o(c,d.currentSlide);var h=d.lazyLoadedList.filter((function(e){return t.state.lazyLoadedList.indexOf(e)<0}));a&&h.length>0&&a(h),!t.props.waitForAnimate&&t.animationEndCallback&&(clearTimeout(t.animationEndCallback),l&&l(c),delete t.animationEndCallback),t.setState(d,(function(){i&&t.asNavForIndex!==e&&(t.asNavForIndex=e,i.innerSlider.slideHandler(e)),p&&(t.animationEndCallback=setTimeout((function(){var e=p.animating,n=f(p,["animating"]);t.setState(n,(function(){t.callbackTimers.push(setTimeout((function(){return t.setState({animating:e})}),10)),l&&l(d.currentSlide),delete t.animationEndCallback}))}),s))}))}})),k(S(t),"changeSlide",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=v(v({},t.props),t.state),i=(0,E.changeSlide)(r,e);if((0===i||i)&&(!0===n?t.slideHandler(i,n):t.slideHandler(i),t.props.autoplay&&t.autoPlay("update"),t.props.focusOnSelect)){var o=t.list.querySelectorAll(".slick-current");o[0]&&o[0].focus()}})),k(S(t),"clickHandler",(function(e){!1===t.clickable&&(e.stopPropagation(),e.preventDefault()),t.clickable=!0})),k(S(t),"keyHandler",(function(e){var n=(0,E.keyHandler)(e,t.props.accessibility,t.props.rtl);""!==n&&t.changeSlide({message:n})})),k(S(t),"selectHandler",(function(e){t.changeSlide(e)})),k(S(t),"disableBodyScroll",(function(){window.ontouchmove=function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}})),k(S(t),"enableBodyScroll",(function(){window.ontouchmove=null})),k(S(t),"swipeStart",(function(e){t.props.verticalSwiping&&t.disableBodyScroll();var n=(0,E.swipeStart)(e,t.props.swipe,t.props.draggable);""!==n&&t.setState(n)})),k(S(t),"swipeMove",(function(e){var n=(0,E.swipeMove)(e,v(v(v({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));n&&(n.swiping&&(t.clickable=!1),t.setState(n))})),k(S(t),"swipeEnd",(function(e){var n=(0,E.swipeEnd)(e,v(v(v({},t.props),t.state),{},{trackRef:t.track,listRef:t.list,slideIndex:t.state.currentSlide}));if(n){var r=n.triggerSlideHandler;delete n.triggerSlideHandler,t.setState(n),void 0!==r&&(t.slideHandler(r),t.props.verticalSwiping&&t.enableBodyScroll())}})),k(S(t),"touchEnd",(function(e){t.swipeEnd(e),t.clickable=!0})),k(S(t),"slickPrev",(function(){t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"previous"})}),0))})),k(S(t),"slickNext",(function(){t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"next"})}),0))})),k(S(t),"slickGoTo",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e=Number(e),isNaN(e))return"";t.callbackTimers.push(setTimeout((function(){return t.changeSlide({message:"index",index:e,currentSlide:t.state.currentSlide},n)}),0))})),k(S(t),"play",(function(){var e;if(t.props.rtl)e=t.state.currentSlide-t.props.slidesToScroll;else{if(!(0,E.canGoNext)(v(v({},t.props),t.state)))return!1;e=t.state.currentSlide+t.props.slidesToScroll}t.slideHandler(e)})),k(S(t),"autoPlay",(function(e){t.autoplayTimer&&clearInterval(t.autoplayTimer);var n=t.state.autoplaying;if("update"===e){if("hovered"===n||"focused"===n||"paused"===n)return}else if("leave"===e){if("paused"===n||"focused"===n)return}else if("blur"===e&&("paused"===n||"hovered"===n))return;t.autoplayTimer=setInterval(t.play,t.props.autoplaySpeed+50),t.setState({autoplaying:"playing"})})),k(S(t),"pause",(function(e){t.autoplayTimer&&(clearInterval(t.autoplayTimer),t.autoplayTimer=null);var n=t.state.autoplaying;"paused"===e?t.setState({autoplaying:"paused"}):"focused"===e?"hovered"!==n&&"playing"!==n||t.setState({autoplaying:"focused"}):"playing"===n&&t.setState({autoplaying:"hovered"})})),k(S(t),"onDotsOver",(function(){return t.props.autoplay&&t.pause("hovered")})),k(S(t),"onDotsLeave",(function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")})),k(S(t),"onTrackOver",(function(){return t.props.autoplay&&t.pause("hovered")})),k(S(t),"onTrackLeave",(function(){return t.props.autoplay&&"hovered"===t.state.autoplaying&&t.autoPlay("leave")})),k(S(t),"onSlideFocus",(function(){return t.props.autoplay&&t.pause("focused")})),k(S(t),"onSlideBlur",(function(){return t.props.autoplay&&"focused"===t.state.autoplaying&&t.autoPlay("blur")})),k(S(t),"render",(function(){var e,r,i,o=(0,a.default)("slick-slider",t.props.className,{"slick-vertical":t.props.vertical,"slick-initialized":!0}),s=v(v({},t.props),t.state),l=(0,E.extractObject)(s,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]),c=t.props.pauseOnHover;if(l=v(v({},l),{},{onMouseEnter:c?t.onTrackOver:null,onMouseLeave:c?t.onTrackLeave:null,onMouseOver:c?t.onTrackOver:null,focusOnSelect:t.props.focusOnSelect&&t.clickable?t.selectHandler:null}),!0===t.props.dots&&t.state.slideCount>=t.props.slidesToShow){var u=(0,E.extractObject)(s,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","customPaging","infinite","appendDots"]),f=t.props.pauseOnDotsHover;u=v(v({},u),{},{clickHandler:t.changeSlide,onMouseEnter:f?t.onDotsLeave:null,onMouseOver:f?t.onDotsOver:null,onMouseLeave:f?t.onDotsLeave:null}),e=n.default.createElement(M.Dots,u)}var p=(0,E.extractObject)(s,["infinite","centerMode","currentSlide","slideCount","slidesToShow","prevArrow","nextArrow"]);p.clickHandler=t.changeSlide,t.props.arrows&&(r=n.default.createElement(C.PrevArrow,p),i=n.default.createElement(C.NextArrow,p));var h=null;t.props.vertical&&(h={height:t.state.listHeight});var y=null;!1===t.props.vertical?!0===t.props.centerMode&&(y={padding:"0px "+t.props.centerPadding}):!0===t.props.centerMode&&(y={padding:t.props.centerPadding+" 0px"});var b=v(v({},h),y),g=t.props.touchMove,m={className:"slick-list",style:b,onClick:t.clickHandler,onMouseDown:g?t.swipeStart:null,onMouseMove:t.state.dragging&&g?t.swipeMove:null,onMouseUp:g?t.swipeEnd:null,onMouseLeave:t.state.dragging&&g?t.swipeEnd:null,onTouchStart:g?t.swipeStart:null,onTouchMove:t.state.dragging&&g?t.swipeMove:null,onTouchEnd:g?t.touchEnd:null,onTouchCancel:t.state.dragging&&g?t.swipeEnd:null,onKeyDown:t.props.accessibility?t.keyHandler:null},S={className:o,dir:"ltr",style:t.props.style};return t.props.unslick&&(m={className:"slick-list"},S={className:o}),n.default.createElement("div",S,t.props.unslick?"":r,n.default.createElement("div",d({ref:t.listRefHandler},m),n.default.createElement(L.Track,d({ref:t.trackRefHandler},l),t.props.children)),t.props.unslick?"":i,t.props.unslick?"":e)})),t.list=null,t.track=null,t.state=v(v({},i.default),{},{currentSlide:t.props.initialSlide,slideCount:n.default.Children.count(t.props.children)}),t.callbackTimers=[],t.clickable=!0,t.debouncedResize=null;var r=t.ssrInit();return t.state=v(v({},t.state),r),t}return t=p,(r=[{key:"didPropsChange",value:function(e){for(var t=!1,r=0,i=Object.keys(this.props);r<i.length;r++){var o=i[r];if(!e.hasOwnProperty(o)){t=!0;break}if("object"!==c(e[o])&&"function"!=typeof e[o]&&e[o]!==this.props[o]){t=!0;break}}return t||n.default.Children.count(this.props.children)!==n.default.Children.count(e.children)}}])&&y(t.prototype,r),l&&y(t,l),p}(n.default.Component);t.InnerSlider=O}));l(te),te.InnerSlider;var ne=function(e){return e.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()})).toLowerCase()},re=function(e){var t="",n=Object.keys(e);return n.forEach((function(r,i){var o=e[r];(function(e){return/[height|width]$/.test(e)})(r=ne(r))&&"number"==typeof o&&(o+="px"),t+=!0===o?r:!1===o?"not "+r:"("+r+": "+o+")",i<n.length-1&&(t+=" and ")})),t},ie=function(e){var t="";return"string"==typeof e?e:e instanceof Array?(e.forEach((function(n,r){t+=re(n),r<e.length-1&&(t+=", ")})),t):re(e)},oe=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r)&&n.__esModule?n:{default:n};var o={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return i.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return i.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0},a=o;t.default=a}));function ae(e){this.options=e,!e.deferSetup&&this.setup()}l(oe),ae.prototype={constructor:ae,setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}};var se=ae;var le=function(e){return"function"==typeof e},ce=function(e){return"[object Array]"===Object.prototype.toString.apply(e)},ue=function(e,t){for(var n=0,r=e.length;n<r&&!1!==t(e[n],n);n++);},de=ue;function fe(e,t){this.query=e,this.isUnconditional=t,this.handlers=[],this.mql=window.matchMedia(e);var n=this;this.listener=function(e){n.mql=e.currentTarget||e,n.assess()},this.mql.addListener(this.listener)}fe.prototype={constuctor:fe,addHandler:function(e){var t=new se(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var t=this.handlers;de(t,(function(n,r){if(n.equals(e))return n.destroy(),!t.splice(r,1)}))},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){de(this.handlers,(function(e){e.destroy()})),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";de(this.handlers,(function(t){t[e]()}))}};var pe=fe,he=ue,ve=le,ye=ce;function be(){if(!window.matchMedia)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!window.matchMedia("only all").matches}be.prototype={constructor:be,register:function(e,t,n){var r=this.queries,i=n&&this.browserIsIncapable;return r[e]||(r[e]=new pe(e,i)),ve(t)&&(t={match:t}),ye(t)||(t=[t]),he(t,(function(t){ve(t)&&(t={match:t}),r[e].addHandler(t)})),this},unregister:function(e,t){var n=this.queries[e];return n&&(t?n.removeHandler(t):(n.clear(),delete this.queries[e])),this}};var ge=new be,me=s((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r),i=a(ie),o=a(oe);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){b(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?v(e):t}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=(0,E.canUseDOM)()&&ge,m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(c,e);var t,r,a,s=p(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),b(v(t=s.call(this,e)),"innerSliderRefHandler",(function(e){return t.innerSlider=e})),b(v(t),"slickPrev",(function(){return t.innerSlider.slickPrev()})),b(v(t),"slickNext",(function(){return t.innerSlider.slickNext()})),b(v(t),"slickGoTo",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.innerSlider.slickGoTo(e,n)})),b(v(t),"slickPause",(function(){return t.innerSlider.pause("paused")})),b(v(t),"slickPlay",(function(){return t.innerSlider.autoPlay("play")})),t.state={breakpoint:null},t._responsiveMediaHandlers=[],t}return t=c,r=[{key:"media",value:function(e,t){g.register(e,t),this._responsiveMediaHandlers.push({query:e,handler:t})}},{key:"componentDidMount",value:function(){var e=this;if(this.props.responsive){var t=this.props.responsive.map((function(e){return e.breakpoint}));t.sort((function(e,t){return e-t})),t.forEach((function(n,r){var o;o=0===r?(0,i.default)({minWidth:0,maxWidth:n}):(0,i.default)({minWidth:t[r-1]+1,maxWidth:n}),(0,E.canUseDOM)()&&e.media(o,(function(){e.setState({breakpoint:n})}))}));var n=(0,i.default)({minWidth:t.slice(-1)[0]});(0,E.canUseDOM)()&&this.media(n,(function(){e.setState({breakpoint:null})}))}}},{key:"componentWillUnmount",value:function(){this._responsiveMediaHandlers.forEach((function(e){g.unregister(e.query,e.handler)}))}},{key:"render",value:function(){var e,t,r=this;(e=this.state.breakpoint?"unslick"===(t=this.props.responsive.filter((function(e){return e.breakpoint===r.state.breakpoint})))[0].settings?"unslick":u(u(u({},o.default),this.props),t[0].settings):u(u({},o.default),this.props)).centerMode&&(e.slidesToScroll,e.slidesToScroll=1),e.fade&&(e.slidesToShow,e.slidesToScroll,e.slidesToShow=1,e.slidesToScroll=1);var i=n.default.Children.toArray(this.props.children);i=i.filter((function(e){return"string"==typeof e?!!e.trim():!!e})),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);for(var a=[],s=null,c=0;c<i.length;c+=e.rows*e.slidesPerRow){for(var d=[],f=c;f<c+e.rows*e.slidesPerRow;f+=e.slidesPerRow){for(var p=[],h=f;h<f+e.slidesPerRow&&(e.variableWidth&&i[h].props.style&&(s=i[h].props.style.width),!(h>=i.length));h+=1)p.push(n.default.cloneElement(i[h],{key:100*c+10*f+h,tabIndex:-1,style:{width:"".concat(100/e.slidesPerRow,"%"),display:"inline-block"}}));d.push(n.default.createElement("div",{key:10*c+f},p))}e.variableWidth?a.push(n.default.createElement("div",{key:c,style:{width:s}},d)):a.push(n.default.createElement("div",{key:c},d))}if("unslick"===e){var v="regular slider "+(this.props.className||"");return n.default.createElement("div",{className:v},i)}return a.length<=e.slidesToShow&&(e.unslick=!0),n.default.createElement(te.InnerSlider,l({style:this.props.style,ref:this.innerSliderRefHandler},e),a)}}],r&&d(t.prototype,r),a&&d(t,a),c}(n.default.Component);t.default=m}));l(me);var Se=l(s((function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=((n=me)&&n.__esModule?n:{default:n}).default;t.default=r})));f("/* Slider */\n.slick-slider\n{\n position: relative;\n\n display: block;\n box-sizing: border-box;\n\n -webkit-user-select: none;\n user-select: none;\n\n -webkit-touch-callout: none;\n -khtml-user-select: none;\n touch-action: pan-y;\n -webkit-tap-highlight-color: transparent;\n}\n\n.slick-list\n{\n position: relative;\n\n display: block;\n overflow: hidden;\n\n margin: 0;\n padding: 0;\n}\n.slick-list:focus\n{\n outline: none;\n}\n.slick-list.dragging\n{\n cursor: pointer;\n cursor: hand;\n}\n\n.slick-slider .slick-track,\n.slick-slider .slick-list\n{\n transform: translate3d(0, 0, 0);\n}\n\n.slick-track\n{\n position: relative;\n top: 0;\n left: 0;\n\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.slick-track:before,\n.slick-track:after\n{\n display: table;\n\n content: '';\n}\n.slick-track:after\n{\n clear: both;\n}\n.slick-loading .slick-track\n{\n visibility: hidden;\n}\n\n.slick-slide\n{\n display: none;\n float: left;\n\n height: 100%;\n min-height: 1px;\n}\n[dir='rtl'] .slick-slide\n{\n float: right;\n}\n.slick-slide img\n{\n display: block;\n}\n.slick-slide.slick-loading img\n{\n display: none;\n}\n.slick-slide.dragging img\n{\n pointer-events: none;\n}\n.slick-initialized .slick-slide\n{\n display: block;\n}\n.slick-loading .slick-slide\n{\n visibility: hidden;\n}\n.slick-vertical .slick-slide\n{\n display: block;\n\n height: auto;\n\n border: 1px solid transparent;\n}\n.slick-arrow.slick-hidden {\n display: none;\n}\n");f("@charset 'UTF-8';\n/* Slider */\n.slick-loading .slick-list\n{\n background: #fff url('./ajax-loader.gif') center center no-repeat;\n}\n\n/* Icons */\n@font-face\n{\n font-family: 'slick';\n font-weight: normal;\n font-style: normal;\n\n src: url('./fonts/slick.eot');\n src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');\n}\n/* Arrows */\n.slick-prev,\n.slick-next\n{\n font-size: 0;\n line-height: 0;\n\n position: absolute;\n top: 50%;\n\n display: block;\n\n width: 20px;\n height: 20px;\n padding: 0;\n transform: translate(0, -50%);\n\n cursor: pointer;\n\n color: transparent;\n border: none;\n outline: none;\n background: transparent;\n}\n.slick-prev:hover,\n.slick-prev:focus,\n.slick-next:hover,\n.slick-next:focus\n{\n color: transparent;\n outline: none;\n background: transparent;\n}\n.slick-prev:hover:before,\n.slick-prev:focus:before,\n.slick-next:hover:before,\n.slick-next:focus:before\n{\n opacity: 1;\n}\n.slick-prev.slick-disabled:before,\n.slick-next.slick-disabled:before\n{\n opacity: .25;\n}\n\n.slick-prev:before,\n.slick-next:before\n{\n font-family: 'slick';\n font-size: 20px;\n line-height: 1;\n\n opacity: .75;\n color: white;\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.slick-prev\n{\n left: -25px;\n}\n[dir='rtl'] .slick-prev\n{\n right: -25px;\n left: auto;\n}\n.slick-prev:before\n{\n content: '←';\n}\n[dir='rtl'] .slick-prev:before\n{\n content: '→';\n}\n\n.slick-next\n{\n right: -25px;\n}\n[dir='rtl'] .slick-next\n{\n right: auto;\n left: -25px;\n}\n.slick-next:before\n{\n content: '→';\n}\n[dir='rtl'] .slick-next:before\n{\n content: '←';\n}\n\n/* Dots */\n.slick-dotted.slick-slider\n{\n margin-bottom: 30px;\n}\n\n.slick-dots\n{\n position: absolute;\n bottom: -25px;\n\n display: block;\n\n width: 100%;\n padding: 0;\n margin: 0;\n\n list-style: none;\n\n text-align: center;\n}\n.slick-dots li\n{\n position: relative;\n\n display: inline-block;\n\n width: 20px;\n height: 20px;\n margin: 0 5px;\n padding: 0;\n\n cursor: pointer;\n}\n.slick-dots li button\n{\n font-size: 0;\n line-height: 0;\n\n display: block;\n\n width: 20px;\n height: 20px;\n padding: 5px;\n\n cursor: pointer;\n\n color: transparent;\n border: 0;\n outline: none;\n background: transparent;\n}\n.slick-dots li button:hover,\n.slick-dots li button:focus\n{\n outline: none;\n}\n.slick-dots li button:hover:before,\n.slick-dots li button:focus:before\n{\n opacity: 1;\n}\n.slick-dots li button:before\n{\n font-family: 'slick';\n font-size: 6px;\n line-height: 20px;\n\n position: absolute;\n top: 0;\n left: 0;\n\n width: 20px;\n height: 20px;\n\n content: '•';\n text-align: center;\n\n opacity: .25;\n color: black;\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.slick-dots li.slick-active button:before\n{\n opacity: .75;\n color: black;\n}\n");f(".carousel .slick-arrow {\n display: none !important; }\n");var we=["className","autoplay","children"],ke=i((function(i,s){var l=i.className,c=i.autoplay,d=i.children,f=e(i,we),p=o(null),h=t({dots:!0,fade:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,autoplay:c,speed:500,autoplaySpeed:2e3,cssEase:"linear"},f);return a(s,(function(){return{prev:function(){p.current.slickPrev()},next:function(){p.current.slickNext()}}})),r.createElement(Se,n({className:u("carousel",l),ref:p},h),d)}));ke.defaultProps={className:void 0,autoplay:!1,children:void 0},ke.propTypes={className:d.string,autoplay:d.bool,children:d.arrayOf(d.any)};export{ke as default};
1
+ import { c as _objectWithoutProperties$1, b as _objectSpread2, _ as _extends$3 } from './_rollupPluginBabelHelpers-ed61ffc0.js';
2
+ import React__default, { forwardRef, useRef, useImperativeHandle } from 'react';
3
+ import { c as classNames } from './index-f491ebce.js';
4
+ import PropTypes from 'prop-types';
5
+ import { c as commonjsGlobal, g as getAugmentedNamespace, a as getDefaultExportFromCjs } from './_commonjsHelpers-70de2c37.js';
6
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
7
+
8
+ var lib = {};
9
+
10
+ var slider = {};
11
+
12
+ var innerSlider = {};
13
+
14
+ var initialState = {};
15
+
16
+ (function (exports) {
17
+
18
+ Object.defineProperty(exports, "__esModule", {
19
+ value: true
20
+ });
21
+ exports["default"] = void 0;
22
+ var initialState = {
23
+ animating: false,
24
+ autoplaying: null,
25
+ currentDirection: 0,
26
+ currentLeft: null,
27
+ currentSlide: 0,
28
+ direction: 1,
29
+ dragging: false,
30
+ edgeDragged: false,
31
+ initialized: false,
32
+ lazyLoadedList: [],
33
+ listHeight: null,
34
+ listWidth: null,
35
+ scrolling: false,
36
+ slideCount: null,
37
+ slideHeight: null,
38
+ slideWidth: null,
39
+ swipeLeft: null,
40
+ swiped: false,
41
+ // used by swipeEvent. differentites between touch and swipe.
42
+ swiping: false,
43
+ touchObject: {
44
+ startX: 0,
45
+ startY: 0,
46
+ curX: 0,
47
+ curY: 0
48
+ },
49
+ trackStyle: {},
50
+ trackWidth: 0,
51
+ targetSlide: 0
52
+ };
53
+ var _default = initialState;
54
+ exports["default"] = _default;
55
+ } (initialState));
56
+
57
+ /**
58
+ * lodash (Custom Build) <https://lodash.com/>
59
+ * Build: `lodash modularize exports="npm" -o ./`
60
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
61
+ * Released under MIT license <https://lodash.com/license>
62
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
63
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
64
+ */
65
+
66
+ /** Used as the `TypeError` message for "Functions" methods. */
67
+ var FUNC_ERROR_TEXT = 'Expected a function';
68
+
69
+ /** Used as references for various `Number` constants. */
70
+ var NAN = 0 / 0;
71
+
72
+ /** `Object#toString` result references. */
73
+ var symbolTag = '[object Symbol]';
74
+
75
+ /** Used to match leading and trailing whitespace. */
76
+ var reTrim = /^\s+|\s+$/g;
77
+
78
+ /** Used to detect bad signed hexadecimal string values. */
79
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
80
+
81
+ /** Used to detect binary string values. */
82
+ var reIsBinary = /^0b[01]+$/i;
83
+
84
+ /** Used to detect octal string values. */
85
+ var reIsOctal = /^0o[0-7]+$/i;
86
+
87
+ /** Built-in method references without a dependency on `root`. */
88
+ var freeParseInt = parseInt;
89
+
90
+ /** Detect free variable `global` from Node.js. */
91
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
92
+
93
+ /** Detect free variable `self`. */
94
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
95
+
96
+ /** Used as a reference to the global object. */
97
+ var root = freeGlobal || freeSelf || Function('return this')();
98
+
99
+ /** Used for built-in method references. */
100
+ var objectProto = Object.prototype;
101
+
102
+ /**
103
+ * Used to resolve the
104
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
105
+ * of values.
106
+ */
107
+ var objectToString = objectProto.toString;
108
+
109
+ /* Built-in method references for those with the same name as other `lodash` methods. */
110
+ var nativeMax = Math.max,
111
+ nativeMin = Math.min;
112
+
113
+ /**
114
+ * Gets the timestamp of the number of milliseconds that have elapsed since
115
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
116
+ *
117
+ * @static
118
+ * @memberOf _
119
+ * @since 2.4.0
120
+ * @category Date
121
+ * @returns {number} Returns the timestamp.
122
+ * @example
123
+ *
124
+ * _.defer(function(stamp) {
125
+ * console.log(_.now() - stamp);
126
+ * }, _.now());
127
+ * // => Logs the number of milliseconds it took for the deferred invocation.
128
+ */
129
+ var now = function() {
130
+ return root.Date.now();
131
+ };
132
+
133
+ /**
134
+ * Creates a debounced function that delays invoking `func` until after `wait`
135
+ * milliseconds have elapsed since the last time the debounced function was
136
+ * invoked. The debounced function comes with a `cancel` method to cancel
137
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
138
+ * Provide `options` to indicate whether `func` should be invoked on the
139
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
140
+ * with the last arguments provided to the debounced function. Subsequent
141
+ * calls to the debounced function return the result of the last `func`
142
+ * invocation.
143
+ *
144
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
145
+ * invoked on the trailing edge of the timeout only if the debounced function
146
+ * is invoked more than once during the `wait` timeout.
147
+ *
148
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
149
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
150
+ *
151
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
152
+ * for details over the differences between `_.debounce` and `_.throttle`.
153
+ *
154
+ * @static
155
+ * @memberOf _
156
+ * @since 0.1.0
157
+ * @category Function
158
+ * @param {Function} func The function to debounce.
159
+ * @param {number} [wait=0] The number of milliseconds to delay.
160
+ * @param {Object} [options={}] The options object.
161
+ * @param {boolean} [options.leading=false]
162
+ * Specify invoking on the leading edge of the timeout.
163
+ * @param {number} [options.maxWait]
164
+ * The maximum time `func` is allowed to be delayed before it's invoked.
165
+ * @param {boolean} [options.trailing=true]
166
+ * Specify invoking on the trailing edge of the timeout.
167
+ * @returns {Function} Returns the new debounced function.
168
+ * @example
169
+ *
170
+ * // Avoid costly calculations while the window size is in flux.
171
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
172
+ *
173
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
174
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
175
+ * 'leading': true,
176
+ * 'trailing': false
177
+ * }));
178
+ *
179
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
180
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
181
+ * var source = new EventSource('/stream');
182
+ * jQuery(source).on('message', debounced);
183
+ *
184
+ * // Cancel the trailing debounced invocation.
185
+ * jQuery(window).on('popstate', debounced.cancel);
186
+ */
187
+ function debounce(func, wait, options) {
188
+ var lastArgs,
189
+ lastThis,
190
+ maxWait,
191
+ result,
192
+ timerId,
193
+ lastCallTime,
194
+ lastInvokeTime = 0,
195
+ leading = false,
196
+ maxing = false,
197
+ trailing = true;
198
+
199
+ if (typeof func != 'function') {
200
+ throw new TypeError(FUNC_ERROR_TEXT);
201
+ }
202
+ wait = toNumber(wait) || 0;
203
+ if (isObject(options)) {
204
+ leading = !!options.leading;
205
+ maxing = 'maxWait' in options;
206
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
207
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
208
+ }
209
+
210
+ function invokeFunc(time) {
211
+ var args = lastArgs,
212
+ thisArg = lastThis;
213
+
214
+ lastArgs = lastThis = undefined;
215
+ lastInvokeTime = time;
216
+ result = func.apply(thisArg, args);
217
+ return result;
218
+ }
219
+
220
+ function leadingEdge(time) {
221
+ // Reset any `maxWait` timer.
222
+ lastInvokeTime = time;
223
+ // Start the timer for the trailing edge.
224
+ timerId = setTimeout(timerExpired, wait);
225
+ // Invoke the leading edge.
226
+ return leading ? invokeFunc(time) : result;
227
+ }
228
+
229
+ function remainingWait(time) {
230
+ var timeSinceLastCall = time - lastCallTime,
231
+ timeSinceLastInvoke = time - lastInvokeTime,
232
+ result = wait - timeSinceLastCall;
233
+
234
+ return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
235
+ }
236
+
237
+ function shouldInvoke(time) {
238
+ var timeSinceLastCall = time - lastCallTime,
239
+ timeSinceLastInvoke = time - lastInvokeTime;
240
+
241
+ // Either this is the first call, activity has stopped and we're at the
242
+ // trailing edge, the system time has gone backwards and we're treating
243
+ // it as the trailing edge, or we've hit the `maxWait` limit.
244
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
245
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
246
+ }
247
+
248
+ function timerExpired() {
249
+ var time = now();
250
+ if (shouldInvoke(time)) {
251
+ return trailingEdge(time);
252
+ }
253
+ // Restart the timer.
254
+ timerId = setTimeout(timerExpired, remainingWait(time));
255
+ }
256
+
257
+ function trailingEdge(time) {
258
+ timerId = undefined;
259
+
260
+ // Only invoke if we have `lastArgs` which means `func` has been
261
+ // debounced at least once.
262
+ if (trailing && lastArgs) {
263
+ return invokeFunc(time);
264
+ }
265
+ lastArgs = lastThis = undefined;
266
+ return result;
267
+ }
268
+
269
+ function cancel() {
270
+ if (timerId !== undefined) {
271
+ clearTimeout(timerId);
272
+ }
273
+ lastInvokeTime = 0;
274
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
275
+ }
276
+
277
+ function flush() {
278
+ return timerId === undefined ? result : trailingEdge(now());
279
+ }
280
+
281
+ function debounced() {
282
+ var time = now(),
283
+ isInvoking = shouldInvoke(time);
284
+
285
+ lastArgs = arguments;
286
+ lastThis = this;
287
+ lastCallTime = time;
288
+
289
+ if (isInvoking) {
290
+ if (timerId === undefined) {
291
+ return leadingEdge(lastCallTime);
292
+ }
293
+ if (maxing) {
294
+ // Handle invocations in a tight loop.
295
+ timerId = setTimeout(timerExpired, wait);
296
+ return invokeFunc(lastCallTime);
297
+ }
298
+ }
299
+ if (timerId === undefined) {
300
+ timerId = setTimeout(timerExpired, wait);
301
+ }
302
+ return result;
303
+ }
304
+ debounced.cancel = cancel;
305
+ debounced.flush = flush;
306
+ return debounced;
307
+ }
308
+
309
+ /**
310
+ * Checks if `value` is the
311
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
312
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
313
+ *
314
+ * @static
315
+ * @memberOf _
316
+ * @since 0.1.0
317
+ * @category Lang
318
+ * @param {*} value The value to check.
319
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
320
+ * @example
321
+ *
322
+ * _.isObject({});
323
+ * // => true
324
+ *
325
+ * _.isObject([1, 2, 3]);
326
+ * // => true
327
+ *
328
+ * _.isObject(_.noop);
329
+ * // => true
330
+ *
331
+ * _.isObject(null);
332
+ * // => false
333
+ */
334
+ function isObject(value) {
335
+ var type = typeof value;
336
+ return !!value && (type == 'object' || type == 'function');
337
+ }
338
+
339
+ /**
340
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
341
+ * and has a `typeof` result of "object".
342
+ *
343
+ * @static
344
+ * @memberOf _
345
+ * @since 4.0.0
346
+ * @category Lang
347
+ * @param {*} value The value to check.
348
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
349
+ * @example
350
+ *
351
+ * _.isObjectLike({});
352
+ * // => true
353
+ *
354
+ * _.isObjectLike([1, 2, 3]);
355
+ * // => true
356
+ *
357
+ * _.isObjectLike(_.noop);
358
+ * // => false
359
+ *
360
+ * _.isObjectLike(null);
361
+ * // => false
362
+ */
363
+ function isObjectLike(value) {
364
+ return !!value && typeof value == 'object';
365
+ }
366
+
367
+ /**
368
+ * Checks if `value` is classified as a `Symbol` primitive or object.
369
+ *
370
+ * @static
371
+ * @memberOf _
372
+ * @since 4.0.0
373
+ * @category Lang
374
+ * @param {*} value The value to check.
375
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
376
+ * @example
377
+ *
378
+ * _.isSymbol(Symbol.iterator);
379
+ * // => true
380
+ *
381
+ * _.isSymbol('abc');
382
+ * // => false
383
+ */
384
+ function isSymbol(value) {
385
+ return typeof value == 'symbol' ||
386
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
387
+ }
388
+
389
+ /**
390
+ * Converts `value` to a number.
391
+ *
392
+ * @static
393
+ * @memberOf _
394
+ * @since 4.0.0
395
+ * @category Lang
396
+ * @param {*} value The value to process.
397
+ * @returns {number} Returns the number.
398
+ * @example
399
+ *
400
+ * _.toNumber(3.2);
401
+ * // => 3.2
402
+ *
403
+ * _.toNumber(Number.MIN_VALUE);
404
+ * // => 5e-324
405
+ *
406
+ * _.toNumber(Infinity);
407
+ * // => Infinity
408
+ *
409
+ * _.toNumber('3.2');
410
+ * // => 3.2
411
+ */
412
+ function toNumber(value) {
413
+ if (typeof value == 'number') {
414
+ return value;
415
+ }
416
+ if (isSymbol(value)) {
417
+ return NAN;
418
+ }
419
+ if (isObject(value)) {
420
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
421
+ value = isObject(other) ? (other + '') : other;
422
+ }
423
+ if (typeof value != 'string') {
424
+ return value === 0 ? value : +value;
425
+ }
426
+ value = value.replace(reTrim, '');
427
+ var isBinary = reIsBinary.test(value);
428
+ return (isBinary || reIsOctal.test(value))
429
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
430
+ : (reIsBadHex.test(value) ? NAN : +value);
431
+ }
432
+
433
+ var lodash_debounce = debounce;
434
+
435
+ var classnames = {exports: {}};
436
+
437
+ /*!
438
+ Copyright (c) 2018 Jed Watson.
439
+ Licensed under the MIT License (MIT), see
440
+ http://jedwatson.github.io/classnames
441
+ */
442
+
443
+ (function (module) {
444
+ /* global define */
445
+
446
+ (function () {
447
+
448
+ var hasOwn = {}.hasOwnProperty;
449
+
450
+ function classNames() {
451
+ var classes = [];
452
+
453
+ for (var i = 0; i < arguments.length; i++) {
454
+ var arg = arguments[i];
455
+ if (!arg) continue;
456
+
457
+ var argType = typeof arg;
458
+
459
+ if (argType === 'string' || argType === 'number') {
460
+ classes.push(arg);
461
+ } else if (Array.isArray(arg)) {
462
+ if (arg.length) {
463
+ var inner = classNames.apply(null, arg);
464
+ if (inner) {
465
+ classes.push(inner);
466
+ }
467
+ }
468
+ } else if (argType === 'object') {
469
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
470
+ classes.push(arg.toString());
471
+ continue;
472
+ }
473
+
474
+ for (var key in arg) {
475
+ if (hasOwn.call(arg, key) && arg[key]) {
476
+ classes.push(key);
477
+ }
478
+ }
479
+ }
480
+ }
481
+
482
+ return classes.join(' ');
483
+ }
484
+
485
+ if (module.exports) {
486
+ classNames.default = classNames;
487
+ module.exports = classNames;
488
+ } else {
489
+ window.classNames = classNames;
490
+ }
491
+ }());
492
+ } (classnames));
493
+
494
+ var innerSliderUtils = {};
495
+
496
+ Object.defineProperty(innerSliderUtils, "__esModule", {
497
+ value: true
498
+ });
499
+ innerSliderUtils.clamp = clamp;
500
+ innerSliderUtils.canUseDOM = innerSliderUtils.slidesOnLeft = innerSliderUtils.slidesOnRight = innerSliderUtils.siblingDirection = innerSliderUtils.getTotalSlides = innerSliderUtils.getPostClones = innerSliderUtils.getPreClones = innerSliderUtils.getTrackLeft = innerSliderUtils.getTrackAnimateCSS = innerSliderUtils.getTrackCSS = innerSliderUtils.checkSpecKeys = innerSliderUtils.getSlideCount = innerSliderUtils.checkNavigable = innerSliderUtils.getNavigableIndexes = innerSliderUtils.swipeEnd = innerSliderUtils.swipeMove = innerSliderUtils.swipeStart = innerSliderUtils.keyHandler = innerSliderUtils.changeSlide = innerSliderUtils.slideHandler = innerSliderUtils.initializedState = innerSliderUtils.extractObject = innerSliderUtils.canGoNext = innerSliderUtils.getSwipeDirection = innerSliderUtils.getHeight = innerSliderUtils.getWidth = innerSliderUtils.lazySlidesOnRight = innerSliderUtils.lazySlidesOnLeft = innerSliderUtils.lazyEndIndex = innerSliderUtils.lazyStartIndex = innerSliderUtils.getRequiredLazySlides = innerSliderUtils.getOnDemandLazySlides = innerSliderUtils.safePreventDefault = void 0;
501
+
502
+ var _react$4 = _interopRequireDefault$4(React__default);
503
+
504
+ function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
505
+
506
+ function ownKeys$4(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
507
+
508
+ function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$4(Object(source), true).forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$4(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
509
+
510
+ function _defineProperty$4(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
511
+
512
+ function clamp(number, lowerBound, upperBound) {
513
+ return Math.max(lowerBound, Math.min(number, upperBound));
514
+ }
515
+
516
+ var safePreventDefault = function safePreventDefault(event) {
517
+ var passiveEvents = ["onTouchStart", "onTouchMove", "onWheel"];
518
+
519
+ if (!passiveEvents.includes(event._reactName)) {
520
+ event.preventDefault();
521
+ }
522
+ };
523
+
524
+ innerSliderUtils.safePreventDefault = safePreventDefault;
525
+
526
+ var getOnDemandLazySlides = function getOnDemandLazySlides(spec) {
527
+ var onDemandSlides = [];
528
+ var startIndex = lazyStartIndex(spec);
529
+ var endIndex = lazyEndIndex(spec);
530
+
531
+ for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
532
+ if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {
533
+ onDemandSlides.push(slideIndex);
534
+ }
535
+ }
536
+
537
+ return onDemandSlides;
538
+ }; // return list of slides that need to be present
539
+
540
+
541
+ innerSliderUtils.getOnDemandLazySlides = getOnDemandLazySlides;
542
+
543
+ var getRequiredLazySlides = function getRequiredLazySlides(spec) {
544
+ var requiredSlides = [];
545
+ var startIndex = lazyStartIndex(spec);
546
+ var endIndex = lazyEndIndex(spec);
547
+
548
+ for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {
549
+ requiredSlides.push(slideIndex);
550
+ }
551
+
552
+ return requiredSlides;
553
+ }; // startIndex that needs to be present
554
+
555
+
556
+ innerSliderUtils.getRequiredLazySlides = getRequiredLazySlides;
557
+
558
+ var lazyStartIndex = function lazyStartIndex(spec) {
559
+ return spec.currentSlide - lazySlidesOnLeft(spec);
560
+ };
561
+
562
+ innerSliderUtils.lazyStartIndex = lazyStartIndex;
563
+
564
+ var lazyEndIndex = function lazyEndIndex(spec) {
565
+ return spec.currentSlide + lazySlidesOnRight(spec);
566
+ };
567
+
568
+ innerSliderUtils.lazyEndIndex = lazyEndIndex;
569
+
570
+ var lazySlidesOnLeft = function lazySlidesOnLeft(spec) {
571
+ return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;
572
+ };
573
+
574
+ innerSliderUtils.lazySlidesOnLeft = lazySlidesOnLeft;
575
+
576
+ var lazySlidesOnRight = function lazySlidesOnRight(spec) {
577
+ return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;
578
+ }; // get width of an element
579
+
580
+
581
+ innerSliderUtils.lazySlidesOnRight = lazySlidesOnRight;
582
+
583
+ var getWidth = function getWidth(elem) {
584
+ return elem && elem.offsetWidth || 0;
585
+ };
586
+
587
+ innerSliderUtils.getWidth = getWidth;
588
+
589
+ var getHeight = function getHeight(elem) {
590
+ return elem && elem.offsetHeight || 0;
591
+ };
592
+
593
+ innerSliderUtils.getHeight = getHeight;
594
+
595
+ var getSwipeDirection = function getSwipeDirection(touchObject) {
596
+ var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
597
+ var xDist, yDist, r, swipeAngle;
598
+ xDist = touchObject.startX - touchObject.curX;
599
+ yDist = touchObject.startY - touchObject.curY;
600
+ r = Math.atan2(yDist, xDist);
601
+ swipeAngle = Math.round(r * 180 / Math.PI);
602
+
603
+ if (swipeAngle < 0) {
604
+ swipeAngle = 360 - Math.abs(swipeAngle);
605
+ }
606
+
607
+ if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {
608
+ return "left";
609
+ }
610
+
611
+ if (swipeAngle >= 135 && swipeAngle <= 225) {
612
+ return "right";
613
+ }
614
+
615
+ if (verticalSwiping === true) {
616
+ if (swipeAngle >= 35 && swipeAngle <= 135) {
617
+ return "up";
618
+ } else {
619
+ return "down";
620
+ }
621
+ }
622
+
623
+ return "vertical";
624
+ }; // whether or not we can go next
625
+
626
+
627
+ innerSliderUtils.getSwipeDirection = getSwipeDirection;
628
+
629
+ var canGoNext = function canGoNext(spec) {
630
+ var canGo = true;
631
+
632
+ if (!spec.infinite) {
633
+ if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {
634
+ canGo = false;
635
+ } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {
636
+ canGo = false;
637
+ }
638
+ }
639
+
640
+ return canGo;
641
+ }; // given an object and a list of keys, return new object with given keys
642
+
643
+
644
+ innerSliderUtils.canGoNext = canGoNext;
645
+
646
+ var extractObject = function extractObject(spec, keys) {
647
+ var newObject = {};
648
+ keys.forEach(function (key) {
649
+ return newObject[key] = spec[key];
650
+ });
651
+ return newObject;
652
+ }; // get initialized state
653
+
654
+
655
+ innerSliderUtils.extractObject = extractObject;
656
+
657
+ var initializedState = function initializedState(spec) {
658
+ // spec also contains listRef, trackRef
659
+ var slideCount = _react$4["default"].Children.count(spec.children);
660
+
661
+ var listNode = spec.listRef;
662
+ var listWidth = Math.ceil(getWidth(listNode));
663
+ var trackNode = spec.trackRef && spec.trackRef.node;
664
+ var trackWidth = Math.ceil(getWidth(trackNode));
665
+ var slideWidth;
666
+
667
+ if (!spec.vertical) {
668
+ var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;
669
+
670
+ if (typeof spec.centerPadding === "string" && spec.centerPadding.slice(-1) === "%") {
671
+ centerPaddingAdj *= listWidth / 100;
672
+ }
673
+
674
+ slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);
675
+ } else {
676
+ slideWidth = listWidth;
677
+ }
678
+
679
+ var slideHeight = listNode && getHeight(listNode.querySelector('[data-index="0"]'));
680
+ var listHeight = slideHeight * spec.slidesToShow;
681
+ var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;
682
+
683
+ if (spec.rtl && spec.currentSlide === undefined) {
684
+ currentSlide = slideCount - 1 - spec.initialSlide;
685
+ }
686
+
687
+ var lazyLoadedList = spec.lazyLoadedList || [];
688
+ var slidesToLoad = getOnDemandLazySlides(_objectSpread$4(_objectSpread$4({}, spec), {}, {
689
+ currentSlide: currentSlide,
690
+ lazyLoadedList: lazyLoadedList
691
+ }));
692
+ lazyLoadedList = lazyLoadedList.concat(slidesToLoad);
693
+ var state = {
694
+ slideCount: slideCount,
695
+ slideWidth: slideWidth,
696
+ listWidth: listWidth,
697
+ trackWidth: trackWidth,
698
+ currentSlide: currentSlide,
699
+ slideHeight: slideHeight,
700
+ listHeight: listHeight,
701
+ lazyLoadedList: lazyLoadedList
702
+ };
703
+
704
+ if (spec.autoplaying === null && spec.autoplay) {
705
+ state["autoplaying"] = "playing";
706
+ }
707
+
708
+ return state;
709
+ };
710
+
711
+ innerSliderUtils.initializedState = initializedState;
712
+
713
+ var slideHandler = function slideHandler(spec) {
714
+ var waitForAnimate = spec.waitForAnimate,
715
+ animating = spec.animating,
716
+ fade = spec.fade,
717
+ infinite = spec.infinite,
718
+ index = spec.index,
719
+ slideCount = spec.slideCount,
720
+ lazyLoad = spec.lazyLoad,
721
+ currentSlide = spec.currentSlide,
722
+ centerMode = spec.centerMode,
723
+ slidesToScroll = spec.slidesToScroll,
724
+ slidesToShow = spec.slidesToShow,
725
+ useCSS = spec.useCSS;
726
+ var lazyLoadedList = spec.lazyLoadedList;
727
+ if (waitForAnimate && animating) return {};
728
+ var animationSlide = index,
729
+ finalSlide,
730
+ animationLeft,
731
+ finalLeft;
732
+ var state = {},
733
+ nextState = {};
734
+ var targetSlide = infinite ? index : clamp(index, 0, slideCount - 1);
735
+
736
+ if (fade) {
737
+ if (!infinite && (index < 0 || index >= slideCount)) return {};
738
+
739
+ if (index < 0) {
740
+ animationSlide = index + slideCount;
741
+ } else if (index >= slideCount) {
742
+ animationSlide = index - slideCount;
743
+ }
744
+
745
+ if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {
746
+ lazyLoadedList = lazyLoadedList.concat(animationSlide);
747
+ }
748
+
749
+ state = {
750
+ animating: true,
751
+ currentSlide: animationSlide,
752
+ lazyLoadedList: lazyLoadedList,
753
+ targetSlide: animationSlide
754
+ };
755
+ nextState = {
756
+ animating: false,
757
+ targetSlide: animationSlide
758
+ };
759
+ } else {
760
+ finalSlide = animationSlide;
761
+
762
+ if (animationSlide < 0) {
763
+ finalSlide = animationSlide + slideCount;
764
+ if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;
765
+ } else if (!canGoNext(spec) && animationSlide > currentSlide) {
766
+ animationSlide = finalSlide = currentSlide;
767
+ } else if (centerMode && animationSlide >= slideCount) {
768
+ animationSlide = infinite ? slideCount : slideCount - 1;
769
+ finalSlide = infinite ? 0 : slideCount - 1;
770
+ } else if (animationSlide >= slideCount) {
771
+ finalSlide = animationSlide - slideCount;
772
+ if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;
773
+ }
774
+
775
+ if (!infinite && animationSlide + slidesToShow >= slideCount) {
776
+ finalSlide = slideCount - slidesToShow;
777
+ }
778
+
779
+ animationLeft = getTrackLeft(_objectSpread$4(_objectSpread$4({}, spec), {}, {
780
+ slideIndex: animationSlide
781
+ }));
782
+ finalLeft = getTrackLeft(_objectSpread$4(_objectSpread$4({}, spec), {}, {
783
+ slideIndex: finalSlide
784
+ }));
785
+
786
+ if (!infinite) {
787
+ if (animationLeft === finalLeft) animationSlide = finalSlide;
788
+ animationLeft = finalLeft;
789
+ }
790
+
791
+ if (lazyLoad) {
792
+ lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides(_objectSpread$4(_objectSpread$4({}, spec), {}, {
793
+ currentSlide: animationSlide
794
+ })));
795
+ }
796
+
797
+ if (!useCSS) {
798
+ state = {
799
+ currentSlide: finalSlide,
800
+ trackStyle: getTrackCSS(_objectSpread$4(_objectSpread$4({}, spec), {}, {
801
+ left: finalLeft
802
+ })),
803
+ lazyLoadedList: lazyLoadedList,
804
+ targetSlide: targetSlide
805
+ };
806
+ } else {
807
+ state = {
808
+ animating: true,
809
+ currentSlide: finalSlide,
810
+ trackStyle: getTrackAnimateCSS(_objectSpread$4(_objectSpread$4({}, spec), {}, {
811
+ left: animationLeft
812
+ })),
813
+ lazyLoadedList: lazyLoadedList,
814
+ targetSlide: targetSlide
815
+ };
816
+ nextState = {
817
+ animating: false,
818
+ currentSlide: finalSlide,
819
+ trackStyle: getTrackCSS(_objectSpread$4(_objectSpread$4({}, spec), {}, {
820
+ left: finalLeft
821
+ })),
822
+ swipeLeft: null,
823
+ targetSlide: targetSlide
824
+ };
825
+ }
826
+ }
827
+
828
+ return {
829
+ state: state,
830
+ nextState: nextState
831
+ };
832
+ };
833
+
834
+ innerSliderUtils.slideHandler = slideHandler;
835
+
836
+ var changeSlide = function changeSlide(spec, options) {
837
+ var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;
838
+ var slidesToScroll = spec.slidesToScroll,
839
+ slidesToShow = spec.slidesToShow,
840
+ slideCount = spec.slideCount,
841
+ currentSlide = spec.currentSlide,
842
+ previousTargetSlide = spec.targetSlide,
843
+ lazyLoad = spec.lazyLoad,
844
+ infinite = spec.infinite;
845
+ unevenOffset = slideCount % slidesToScroll !== 0;
846
+ indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;
847
+
848
+ if (options.message === "previous") {
849
+ slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;
850
+ targetSlide = currentSlide - slideOffset;
851
+
852
+ if (lazyLoad && !infinite) {
853
+ previousInt = currentSlide - slideOffset;
854
+ targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;
855
+ }
856
+
857
+ if (!infinite) {
858
+ targetSlide = previousTargetSlide - slidesToScroll;
859
+ }
860
+ } else if (options.message === "next") {
861
+ slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;
862
+ targetSlide = currentSlide + slideOffset;
863
+
864
+ if (lazyLoad && !infinite) {
865
+ targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;
866
+ }
867
+
868
+ if (!infinite) {
869
+ targetSlide = previousTargetSlide + slidesToScroll;
870
+ }
871
+ } else if (options.message === "dots") {
872
+ // Click on dots
873
+ targetSlide = options.index * options.slidesToScroll;
874
+ } else if (options.message === "children") {
875
+ // Click on the slides
876
+ targetSlide = options.index;
877
+
878
+ if (infinite) {
879
+ var direction = siblingDirection(_objectSpread$4(_objectSpread$4({}, spec), {}, {
880
+ targetSlide: targetSlide
881
+ }));
882
+
883
+ if (targetSlide > options.currentSlide && direction === "left") {
884
+ targetSlide = targetSlide - slideCount;
885
+ } else if (targetSlide < options.currentSlide && direction === "right") {
886
+ targetSlide = targetSlide + slideCount;
887
+ }
888
+ }
889
+ } else if (options.message === "index") {
890
+ targetSlide = Number(options.index);
891
+ }
892
+
893
+ return targetSlide;
894
+ };
895
+
896
+ innerSliderUtils.changeSlide = changeSlide;
897
+
898
+ var keyHandler = function keyHandler(e, accessibility, rtl) {
899
+ if (e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !accessibility) return "";
900
+ if (e.keyCode === 37) return rtl ? "next" : "previous";
901
+ if (e.keyCode === 39) return rtl ? "previous" : "next";
902
+ return "";
903
+ };
904
+
905
+ innerSliderUtils.keyHandler = keyHandler;
906
+
907
+ var swipeStart = function swipeStart(e, swipe, draggable) {
908
+ e.target.tagName === "IMG" && safePreventDefault(e);
909
+ if (!swipe || !draggable && e.type.indexOf("mouse") !== -1) return "";
910
+ return {
911
+ dragging: true,
912
+ touchObject: {
913
+ startX: e.touches ? e.touches[0].pageX : e.clientX,
914
+ startY: e.touches ? e.touches[0].pageY : e.clientY,
915
+ curX: e.touches ? e.touches[0].pageX : e.clientX,
916
+ curY: e.touches ? e.touches[0].pageY : e.clientY
917
+ }
918
+ };
919
+ };
920
+
921
+ innerSliderUtils.swipeStart = swipeStart;
922
+
923
+ var swipeMove = function swipeMove(e, spec) {
924
+ // spec also contains, trackRef and slideIndex
925
+ var scrolling = spec.scrolling,
926
+ animating = spec.animating,
927
+ vertical = spec.vertical,
928
+ swipeToSlide = spec.swipeToSlide,
929
+ verticalSwiping = spec.verticalSwiping,
930
+ rtl = spec.rtl,
931
+ currentSlide = spec.currentSlide,
932
+ edgeFriction = spec.edgeFriction,
933
+ edgeDragged = spec.edgeDragged,
934
+ onEdge = spec.onEdge,
935
+ swiped = spec.swiped,
936
+ swiping = spec.swiping,
937
+ slideCount = spec.slideCount,
938
+ slidesToScroll = spec.slidesToScroll,
939
+ infinite = spec.infinite,
940
+ touchObject = spec.touchObject,
941
+ swipeEvent = spec.swipeEvent,
942
+ listHeight = spec.listHeight,
943
+ listWidth = spec.listWidth;
944
+ if (scrolling) return;
945
+ if (animating) return safePreventDefault(e);
946
+ if (vertical && swipeToSlide && verticalSwiping) safePreventDefault(e);
947
+ var swipeLeft,
948
+ state = {};
949
+ var curLeft = getTrackLeft(spec);
950
+ touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;
951
+ touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;
952
+ touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));
953
+ var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));
954
+
955
+ if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {
956
+ return {
957
+ scrolling: true
958
+ };
959
+ }
960
+
961
+ if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;
962
+ var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);
963
+ if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;
964
+ var dotCount = Math.ceil(slideCount / slidesToScroll);
965
+ var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);
966
+ var touchSwipeLength = touchObject.swipeLength;
967
+
968
+ if (!infinite) {
969
+ if (currentSlide === 0 && (swipeDirection === "right" || swipeDirection === "down") || currentSlide + 1 >= dotCount && (swipeDirection === "left" || swipeDirection === "up") || !canGoNext(spec) && (swipeDirection === "left" || swipeDirection === "up")) {
970
+ touchSwipeLength = touchObject.swipeLength * edgeFriction;
971
+
972
+ if (edgeDragged === false && onEdge) {
973
+ onEdge(swipeDirection);
974
+ state["edgeDragged"] = true;
975
+ }
976
+ }
977
+ }
978
+
979
+ if (!swiped && swipeEvent) {
980
+ swipeEvent(swipeDirection);
981
+ state["swiped"] = true;
982
+ }
983
+
984
+ if (!vertical) {
985
+ if (!rtl) {
986
+ swipeLeft = curLeft + touchSwipeLength * positionOffset;
987
+ } else {
988
+ swipeLeft = curLeft - touchSwipeLength * positionOffset;
989
+ }
990
+ } else {
991
+ swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;
992
+ }
993
+
994
+ if (verticalSwiping) {
995
+ swipeLeft = curLeft + touchSwipeLength * positionOffset;
996
+ }
997
+
998
+ state = _objectSpread$4(_objectSpread$4({}, state), {}, {
999
+ touchObject: touchObject,
1000
+ swipeLeft: swipeLeft,
1001
+ trackStyle: getTrackCSS(_objectSpread$4(_objectSpread$4({}, spec), {}, {
1002
+ left: swipeLeft
1003
+ }))
1004
+ });
1005
+
1006
+ if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {
1007
+ return state;
1008
+ }
1009
+
1010
+ if (touchObject.swipeLength > 10) {
1011
+ state["swiping"] = true;
1012
+ safePreventDefault(e);
1013
+ }
1014
+
1015
+ return state;
1016
+ };
1017
+
1018
+ innerSliderUtils.swipeMove = swipeMove;
1019
+
1020
+ var swipeEnd = function swipeEnd(e, spec) {
1021
+ var dragging = spec.dragging,
1022
+ swipe = spec.swipe,
1023
+ touchObject = spec.touchObject,
1024
+ listWidth = spec.listWidth,
1025
+ touchThreshold = spec.touchThreshold,
1026
+ verticalSwiping = spec.verticalSwiping,
1027
+ listHeight = spec.listHeight,
1028
+ swipeToSlide = spec.swipeToSlide,
1029
+ scrolling = spec.scrolling,
1030
+ onSwipe = spec.onSwipe,
1031
+ targetSlide = spec.targetSlide,
1032
+ currentSlide = spec.currentSlide,
1033
+ infinite = spec.infinite;
1034
+
1035
+ if (!dragging) {
1036
+ if (swipe) safePreventDefault(e);
1037
+ return {};
1038
+ }
1039
+
1040
+ var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;
1041
+ var swipeDirection = getSwipeDirection(touchObject, verticalSwiping); // reset the state of touch related state variables.
1042
+
1043
+ var state = {
1044
+ dragging: false,
1045
+ edgeDragged: false,
1046
+ scrolling: false,
1047
+ swiping: false,
1048
+ swiped: false,
1049
+ swipeLeft: null,
1050
+ touchObject: {}
1051
+ };
1052
+
1053
+ if (scrolling) {
1054
+ return state;
1055
+ }
1056
+
1057
+ if (!touchObject.swipeLength) {
1058
+ return state;
1059
+ }
1060
+
1061
+ if (touchObject.swipeLength > minSwipe) {
1062
+ safePreventDefault(e);
1063
+
1064
+ if (onSwipe) {
1065
+ onSwipe(swipeDirection);
1066
+ }
1067
+
1068
+ var slideCount, newSlide;
1069
+ var activeSlide = infinite ? currentSlide : targetSlide;
1070
+
1071
+ switch (swipeDirection) {
1072
+ case "left":
1073
+ case "up":
1074
+ newSlide = activeSlide + getSlideCount(spec);
1075
+ slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
1076
+ state["currentDirection"] = 0;
1077
+ break;
1078
+
1079
+ case "right":
1080
+ case "down":
1081
+ newSlide = activeSlide - getSlideCount(spec);
1082
+ slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;
1083
+ state["currentDirection"] = 1;
1084
+ break;
1085
+
1086
+ default:
1087
+ slideCount = activeSlide;
1088
+ }
1089
+
1090
+ state["triggerSlideHandler"] = slideCount;
1091
+ } else {
1092
+ // Adjust the track back to it's original position.
1093
+ var currentLeft = getTrackLeft(spec);
1094
+ state["trackStyle"] = getTrackAnimateCSS(_objectSpread$4(_objectSpread$4({}, spec), {}, {
1095
+ left: currentLeft
1096
+ }));
1097
+ }
1098
+
1099
+ return state;
1100
+ };
1101
+
1102
+ innerSliderUtils.swipeEnd = swipeEnd;
1103
+
1104
+ var getNavigableIndexes = function getNavigableIndexes(spec) {
1105
+ var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;
1106
+ var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;
1107
+ var counter = spec.infinite ? spec.slidesToShow * -1 : 0;
1108
+ var indexes = [];
1109
+
1110
+ while (breakpoint < max) {
1111
+ indexes.push(breakpoint);
1112
+ breakpoint = counter + spec.slidesToScroll;
1113
+ counter += Math.min(spec.slidesToScroll, spec.slidesToShow);
1114
+ }
1115
+
1116
+ return indexes;
1117
+ };
1118
+
1119
+ innerSliderUtils.getNavigableIndexes = getNavigableIndexes;
1120
+
1121
+ var checkNavigable = function checkNavigable(spec, index) {
1122
+ var navigables = getNavigableIndexes(spec);
1123
+ var prevNavigable = 0;
1124
+
1125
+ if (index > navigables[navigables.length - 1]) {
1126
+ index = navigables[navigables.length - 1];
1127
+ } else {
1128
+ for (var n in navigables) {
1129
+ if (index < navigables[n]) {
1130
+ index = prevNavigable;
1131
+ break;
1132
+ }
1133
+
1134
+ prevNavigable = navigables[n];
1135
+ }
1136
+ }
1137
+
1138
+ return index;
1139
+ };
1140
+
1141
+ innerSliderUtils.checkNavigable = checkNavigable;
1142
+
1143
+ var getSlideCount = function getSlideCount(spec) {
1144
+ var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;
1145
+
1146
+ if (spec.swipeToSlide) {
1147
+ var swipedSlide;
1148
+ var slickList = spec.listRef;
1149
+ var slides = slickList.querySelectorAll && slickList.querySelectorAll(".slick-slide") || [];
1150
+ Array.from(slides).every(function (slide) {
1151
+ if (!spec.vertical) {
1152
+ if (slide.offsetLeft - centerOffset + getWidth(slide) / 2 > spec.swipeLeft * -1) {
1153
+ swipedSlide = slide;
1154
+ return false;
1155
+ }
1156
+ } else {
1157
+ if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {
1158
+ swipedSlide = slide;
1159
+ return false;
1160
+ }
1161
+ }
1162
+
1163
+ return true;
1164
+ });
1165
+
1166
+ if (!swipedSlide) {
1167
+ return 0;
1168
+ }
1169
+
1170
+ var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;
1171
+ var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;
1172
+ return slidesTraversed;
1173
+ } else {
1174
+ return spec.slidesToScroll;
1175
+ }
1176
+ };
1177
+
1178
+ innerSliderUtils.getSlideCount = getSlideCount;
1179
+
1180
+ var checkSpecKeys = function checkSpecKeys(spec, keysArray) {
1181
+ return keysArray.reduce(function (value, key) {
1182
+ return value && spec.hasOwnProperty(key);
1183
+ }, true) ? null : console.error("Keys Missing:", spec);
1184
+ };
1185
+
1186
+ innerSliderUtils.checkSpecKeys = checkSpecKeys;
1187
+
1188
+ var getTrackCSS = function getTrackCSS(spec) {
1189
+ checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth"]);
1190
+ var trackWidth, trackHeight;
1191
+ var trackChildren = spec.slideCount + 2 * spec.slidesToShow;
1192
+
1193
+ if (!spec.vertical) {
1194
+ trackWidth = getTotalSlides(spec) * spec.slideWidth;
1195
+ } else {
1196
+ trackHeight = trackChildren * spec.slideHeight;
1197
+ }
1198
+
1199
+ var style = {
1200
+ opacity: 1,
1201
+ transition: "",
1202
+ WebkitTransition: ""
1203
+ };
1204
+
1205
+ if (spec.useTransform) {
1206
+ var WebkitTransform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
1207
+ var transform = !spec.vertical ? "translate3d(" + spec.left + "px, 0px, 0px)" : "translate3d(0px, " + spec.left + "px, 0px)";
1208
+ var msTransform = !spec.vertical ? "translateX(" + spec.left + "px)" : "translateY(" + spec.left + "px)";
1209
+ style = _objectSpread$4(_objectSpread$4({}, style), {}, {
1210
+ WebkitTransform: WebkitTransform,
1211
+ transform: transform,
1212
+ msTransform: msTransform
1213
+ });
1214
+ } else {
1215
+ if (spec.vertical) {
1216
+ style["top"] = spec.left;
1217
+ } else {
1218
+ style["left"] = spec.left;
1219
+ }
1220
+ }
1221
+
1222
+ if (spec.fade) style = {
1223
+ opacity: 1
1224
+ };
1225
+ if (trackWidth) style.width = trackWidth;
1226
+ if (trackHeight) style.height = trackHeight; // Fallback for IE8
1227
+
1228
+ if (window && !window.addEventListener && window.attachEvent) {
1229
+ if (!spec.vertical) {
1230
+ style.marginLeft = spec.left + "px";
1231
+ } else {
1232
+ style.marginTop = spec.left + "px";
1233
+ }
1234
+ }
1235
+
1236
+ return style;
1237
+ };
1238
+
1239
+ innerSliderUtils.getTrackCSS = getTrackCSS;
1240
+
1241
+ var getTrackAnimateCSS = function getTrackAnimateCSS(spec) {
1242
+ checkSpecKeys(spec, ["left", "variableWidth", "slideCount", "slidesToShow", "slideWidth", "speed", "cssEase"]);
1243
+ var style = getTrackCSS(spec); // useCSS is true by default so it can be undefined
1244
+
1245
+ if (spec.useTransform) {
1246
+ style.WebkitTransition = "-webkit-transform " + spec.speed + "ms " + spec.cssEase;
1247
+ style.transition = "transform " + spec.speed + "ms " + spec.cssEase;
1248
+ } else {
1249
+ if (spec.vertical) {
1250
+ style.transition = "top " + spec.speed + "ms " + spec.cssEase;
1251
+ } else {
1252
+ style.transition = "left " + spec.speed + "ms " + spec.cssEase;
1253
+ }
1254
+ }
1255
+
1256
+ return style;
1257
+ };
1258
+
1259
+ innerSliderUtils.getTrackAnimateCSS = getTrackAnimateCSS;
1260
+
1261
+ var getTrackLeft = function getTrackLeft(spec) {
1262
+ if (spec.unslick) {
1263
+ return 0;
1264
+ }
1265
+
1266
+ checkSpecKeys(spec, ["slideIndex", "trackRef", "infinite", "centerMode", "slideCount", "slidesToShow", "slidesToScroll", "slideWidth", "listWidth", "variableWidth", "slideHeight"]);
1267
+ var slideIndex = spec.slideIndex,
1268
+ trackRef = spec.trackRef,
1269
+ infinite = spec.infinite,
1270
+ centerMode = spec.centerMode,
1271
+ slideCount = spec.slideCount,
1272
+ slidesToShow = spec.slidesToShow,
1273
+ slidesToScroll = spec.slidesToScroll,
1274
+ slideWidth = spec.slideWidth,
1275
+ listWidth = spec.listWidth,
1276
+ variableWidth = spec.variableWidth,
1277
+ slideHeight = spec.slideHeight,
1278
+ fade = spec.fade,
1279
+ vertical = spec.vertical;
1280
+ var slideOffset = 0;
1281
+ var targetLeft;
1282
+ var targetSlide;
1283
+ var verticalOffset = 0;
1284
+
1285
+ if (fade || spec.slideCount === 1) {
1286
+ return 0;
1287
+ }
1288
+
1289
+ var slidesToOffset = 0;
1290
+
1291
+ if (infinite) {
1292
+ slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area
1293
+ // if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children
1294
+
1295
+ if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
1296
+ slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);
1297
+ } // shift current slide to center of the frame
1298
+
1299
+
1300
+ if (centerMode) {
1301
+ slidesToOffset += parseInt(slidesToShow / 2);
1302
+ }
1303
+ } else {
1304
+ if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {
1305
+ slidesToOffset = slidesToShow - slideCount % slidesToScroll;
1306
+ }
1307
+
1308
+ if (centerMode) {
1309
+ slidesToOffset = parseInt(slidesToShow / 2);
1310
+ }
1311
+ }
1312
+
1313
+ slideOffset = slidesToOffset * slideWidth;
1314
+ verticalOffset = slidesToOffset * slideHeight;
1315
+
1316
+ if (!vertical) {
1317
+ targetLeft = slideIndex * slideWidth * -1 + slideOffset;
1318
+ } else {
1319
+ targetLeft = slideIndex * slideHeight * -1 + verticalOffset;
1320
+ }
1321
+
1322
+ if (variableWidth === true) {
1323
+ var targetSlideIndex;
1324
+ var trackElem = trackRef && trackRef.node;
1325
+ targetSlideIndex = slideIndex + getPreClones(spec);
1326
+ targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];
1327
+ targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;
1328
+
1329
+ if (centerMode === true) {
1330
+ targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;
1331
+ targetSlide = trackElem && trackElem.children[targetSlideIndex];
1332
+ targetLeft = 0;
1333
+
1334
+ for (var slide = 0; slide < targetSlideIndex; slide++) {
1335
+ targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;
1336
+ }
1337
+
1338
+ targetLeft -= parseInt(spec.centerPadding);
1339
+ targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;
1340
+ }
1341
+ }
1342
+
1343
+ return targetLeft;
1344
+ };
1345
+
1346
+ innerSliderUtils.getTrackLeft = getTrackLeft;
1347
+
1348
+ var getPreClones = function getPreClones(spec) {
1349
+ if (spec.unslick || !spec.infinite) {
1350
+ return 0;
1351
+ }
1352
+
1353
+ if (spec.variableWidth) {
1354
+ return spec.slideCount;
1355
+ }
1356
+
1357
+ return spec.slidesToShow + (spec.centerMode ? 1 : 0);
1358
+ };
1359
+
1360
+ innerSliderUtils.getPreClones = getPreClones;
1361
+
1362
+ var getPostClones = function getPostClones(spec) {
1363
+ if (spec.unslick || !spec.infinite) {
1364
+ return 0;
1365
+ }
1366
+
1367
+ return spec.slideCount;
1368
+ };
1369
+
1370
+ innerSliderUtils.getPostClones = getPostClones;
1371
+
1372
+ var getTotalSlides = function getTotalSlides(spec) {
1373
+ return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);
1374
+ };
1375
+
1376
+ innerSliderUtils.getTotalSlides = getTotalSlides;
1377
+
1378
+ var siblingDirection = function siblingDirection(spec) {
1379
+ if (spec.targetSlide > spec.currentSlide) {
1380
+ if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {
1381
+ return "left";
1382
+ }
1383
+
1384
+ return "right";
1385
+ } else {
1386
+ if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {
1387
+ return "right";
1388
+ }
1389
+
1390
+ return "left";
1391
+ }
1392
+ };
1393
+
1394
+ innerSliderUtils.siblingDirection = siblingDirection;
1395
+
1396
+ var slidesOnRight = function slidesOnRight(_ref) {
1397
+ var slidesToShow = _ref.slidesToShow,
1398
+ centerMode = _ref.centerMode,
1399
+ rtl = _ref.rtl,
1400
+ centerPadding = _ref.centerPadding;
1401
+
1402
+ // returns no of slides on the right of active slide
1403
+ if (centerMode) {
1404
+ var right = (slidesToShow - 1) / 2 + 1;
1405
+ if (parseInt(centerPadding) > 0) right += 1;
1406
+ if (rtl && slidesToShow % 2 === 0) right += 1;
1407
+ return right;
1408
+ }
1409
+
1410
+ if (rtl) {
1411
+ return 0;
1412
+ }
1413
+
1414
+ return slidesToShow - 1;
1415
+ };
1416
+
1417
+ innerSliderUtils.slidesOnRight = slidesOnRight;
1418
+
1419
+ var slidesOnLeft = function slidesOnLeft(_ref2) {
1420
+ var slidesToShow = _ref2.slidesToShow,
1421
+ centerMode = _ref2.centerMode,
1422
+ rtl = _ref2.rtl,
1423
+ centerPadding = _ref2.centerPadding;
1424
+
1425
+ // returns no of slides on the left of active slide
1426
+ if (centerMode) {
1427
+ var left = (slidesToShow - 1) / 2 + 1;
1428
+ if (parseInt(centerPadding) > 0) left += 1;
1429
+ if (!rtl && slidesToShow % 2 === 0) left += 1;
1430
+ return left;
1431
+ }
1432
+
1433
+ if (rtl) {
1434
+ return slidesToShow - 1;
1435
+ }
1436
+
1437
+ return 0;
1438
+ };
1439
+
1440
+ innerSliderUtils.slidesOnLeft = slidesOnLeft;
1441
+
1442
+ var canUseDOM = function canUseDOM() {
1443
+ return !!(typeof window !== "undefined" && window.document && window.document.createElement);
1444
+ };
1445
+
1446
+ innerSliderUtils.canUseDOM = canUseDOM;
1447
+
1448
+ var track = {};
1449
+
1450
+ Object.defineProperty(track, "__esModule", {
1451
+ value: true
1452
+ });
1453
+ track.Track = void 0;
1454
+
1455
+ var _react$3 = _interopRequireDefault$3(React__default);
1456
+
1457
+ var _classnames$3 = _interopRequireDefault$3(classnames.exports);
1458
+
1459
+ var _innerSliderUtils$3 = innerSliderUtils;
1460
+
1461
+ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
1462
+
1463
+ function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
1464
+
1465
+ function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
1466
+
1467
+ function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1468
+
1469
+ function _defineProperties$3(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1470
+
1471
+ function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); if (staticProps) _defineProperties$3(Constructor, staticProps); return Constructor; }
1472
+
1473
+ function _inherits$3(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$3(subClass, superClass); }
1474
+
1475
+ function _setPrototypeOf$3(o, p) { _setPrototypeOf$3 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$3(o, p); }
1476
+
1477
+ function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf$3(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$3(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$3(this, result); }; }
1478
+
1479
+ function _possibleConstructorReturn$3(self, call) { if (call && (_typeof$3(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$3(self); }
1480
+
1481
+ function _assertThisInitialized$3(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1482
+
1483
+ function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
1484
+
1485
+ function _getPrototypeOf$3(o) { _getPrototypeOf$3 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$3(o); }
1486
+
1487
+ function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1488
+
1489
+ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1490
+
1491
+ function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1492
+
1493
+ // given specifications/props for a slide, fetch all the classes that need to be applied to the slide
1494
+ var getSlideClasses = function getSlideClasses(spec) {
1495
+ var slickActive, slickCenter, slickCloned;
1496
+ var centerOffset, index;
1497
+
1498
+ if (spec.rtl) {
1499
+ index = spec.slideCount - 1 - spec.index;
1500
+ } else {
1501
+ index = spec.index;
1502
+ }
1503
+
1504
+ slickCloned = index < 0 || index >= spec.slideCount;
1505
+
1506
+ if (spec.centerMode) {
1507
+ centerOffset = Math.floor(spec.slidesToShow / 2);
1508
+ slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;
1509
+
1510
+ if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) {
1511
+ slickActive = true;
1512
+ }
1513
+ } else {
1514
+ slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow;
1515
+ }
1516
+
1517
+ var focusedSlide;
1518
+
1519
+ if (spec.targetSlide < 0) {
1520
+ focusedSlide = spec.targetSlide + spec.slideCount;
1521
+ } else if (spec.targetSlide >= spec.slideCount) {
1522
+ focusedSlide = spec.targetSlide - spec.slideCount;
1523
+ } else {
1524
+ focusedSlide = spec.targetSlide;
1525
+ }
1526
+
1527
+ var slickCurrent = index === focusedSlide;
1528
+ return {
1529
+ "slick-slide": true,
1530
+ "slick-active": slickActive,
1531
+ "slick-center": slickCenter,
1532
+ "slick-cloned": slickCloned,
1533
+ "slick-current": slickCurrent // dubious in case of RTL
1534
+
1535
+ };
1536
+ };
1537
+
1538
+ var getSlideStyle = function getSlideStyle(spec) {
1539
+ var style = {};
1540
+
1541
+ if (spec.variableWidth === undefined || spec.variableWidth === false) {
1542
+ style.width = spec.slideWidth;
1543
+ }
1544
+
1545
+ if (spec.fade) {
1546
+ style.position = "relative";
1547
+
1548
+ if (spec.vertical) {
1549
+ style.top = -spec.index * parseInt(spec.slideHeight);
1550
+ } else {
1551
+ style.left = -spec.index * parseInt(spec.slideWidth);
1552
+ }
1553
+
1554
+ style.opacity = spec.currentSlide === spec.index ? 1 : 0;
1555
+
1556
+ if (spec.useCSS) {
1557
+ style.transition = "opacity " + spec.speed + "ms " + spec.cssEase + ", " + "visibility " + spec.speed + "ms " + spec.cssEase;
1558
+ }
1559
+ }
1560
+
1561
+ return style;
1562
+ };
1563
+
1564
+ var getKey = function getKey(child, fallbackKey) {
1565
+ return child.key || fallbackKey;
1566
+ };
1567
+
1568
+ var renderSlides = function renderSlides(spec) {
1569
+ var key;
1570
+ var slides = [];
1571
+ var preCloneSlides = [];
1572
+ var postCloneSlides = [];
1573
+
1574
+ var childrenCount = _react$3["default"].Children.count(spec.children);
1575
+
1576
+ var startIndex = (0, _innerSliderUtils$3.lazyStartIndex)(spec);
1577
+ var endIndex = (0, _innerSliderUtils$3.lazyEndIndex)(spec);
1578
+
1579
+ _react$3["default"].Children.forEach(spec.children, function (elem, index) {
1580
+ var child;
1581
+ var childOnClickOptions = {
1582
+ message: "children",
1583
+ index: index,
1584
+ slidesToScroll: spec.slidesToScroll,
1585
+ currentSlide: spec.currentSlide
1586
+ }; // in case of lazyLoad, whether or not we want to fetch the slide
1587
+
1588
+ if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {
1589
+ child = elem;
1590
+ } else {
1591
+ child = /*#__PURE__*/_react$3["default"].createElement("div", null);
1592
+ }
1593
+
1594
+ var childStyle = getSlideStyle(_objectSpread$3(_objectSpread$3({}, spec), {}, {
1595
+ index: index
1596
+ }));
1597
+ var slideClass = child.props.className || "";
1598
+ var slideClasses = getSlideClasses(_objectSpread$3(_objectSpread$3({}, spec), {}, {
1599
+ index: index
1600
+ })); // push a cloned element of the desired slide
1601
+
1602
+ slides.push( /*#__PURE__*/_react$3["default"].cloneElement(child, {
1603
+ key: "original" + getKey(child, index),
1604
+ "data-index": index,
1605
+ className: (0, _classnames$3["default"])(slideClasses, slideClass),
1606
+ tabIndex: "-1",
1607
+ "aria-hidden": !slideClasses["slick-active"],
1608
+ style: _objectSpread$3(_objectSpread$3({
1609
+ outline: "none"
1610
+ }, child.props.style || {}), childStyle),
1611
+ onClick: function onClick(e) {
1612
+ child.props && child.props.onClick && child.props.onClick(e);
1613
+
1614
+ if (spec.focusOnSelect) {
1615
+ spec.focusOnSelect(childOnClickOptions);
1616
+ }
1617
+ }
1618
+ })); // if slide needs to be precloned or postcloned
1619
+
1620
+ if (spec.infinite && spec.fade === false) {
1621
+ var preCloneNo = childrenCount - index;
1622
+
1623
+ if (preCloneNo <= (0, _innerSliderUtils$3.getPreClones)(spec) && childrenCount !== spec.slidesToShow) {
1624
+ key = -preCloneNo;
1625
+
1626
+ if (key >= startIndex) {
1627
+ child = elem;
1628
+ }
1629
+
1630
+ slideClasses = getSlideClasses(_objectSpread$3(_objectSpread$3({}, spec), {}, {
1631
+ index: key
1632
+ }));
1633
+ preCloneSlides.push( /*#__PURE__*/_react$3["default"].cloneElement(child, {
1634
+ key: "precloned" + getKey(child, key),
1635
+ "data-index": key,
1636
+ tabIndex: "-1",
1637
+ className: (0, _classnames$3["default"])(slideClasses, slideClass),
1638
+ "aria-hidden": !slideClasses["slick-active"],
1639
+ style: _objectSpread$3(_objectSpread$3({}, child.props.style || {}), childStyle),
1640
+ onClick: function onClick(e) {
1641
+ child.props && child.props.onClick && child.props.onClick(e);
1642
+
1643
+ if (spec.focusOnSelect) {
1644
+ spec.focusOnSelect(childOnClickOptions);
1645
+ }
1646
+ }
1647
+ }));
1648
+ }
1649
+
1650
+ if (childrenCount !== spec.slidesToShow) {
1651
+ key = childrenCount + index;
1652
+
1653
+ if (key < endIndex) {
1654
+ child = elem;
1655
+ }
1656
+
1657
+ slideClasses = getSlideClasses(_objectSpread$3(_objectSpread$3({}, spec), {}, {
1658
+ index: key
1659
+ }));
1660
+ postCloneSlides.push( /*#__PURE__*/_react$3["default"].cloneElement(child, {
1661
+ key: "postcloned" + getKey(child, key),
1662
+ "data-index": key,
1663
+ tabIndex: "-1",
1664
+ className: (0, _classnames$3["default"])(slideClasses, slideClass),
1665
+ "aria-hidden": !slideClasses["slick-active"],
1666
+ style: _objectSpread$3(_objectSpread$3({}, child.props.style || {}), childStyle),
1667
+ onClick: function onClick(e) {
1668
+ child.props && child.props.onClick && child.props.onClick(e);
1669
+
1670
+ if (spec.focusOnSelect) {
1671
+ spec.focusOnSelect(childOnClickOptions);
1672
+ }
1673
+ }
1674
+ }));
1675
+ }
1676
+ }
1677
+ });
1678
+
1679
+ if (spec.rtl) {
1680
+ return preCloneSlides.concat(slides, postCloneSlides).reverse();
1681
+ } else {
1682
+ return preCloneSlides.concat(slides, postCloneSlides);
1683
+ }
1684
+ };
1685
+
1686
+ var Track = /*#__PURE__*/function (_React$PureComponent) {
1687
+ _inherits$3(Track, _React$PureComponent);
1688
+
1689
+ var _super = _createSuper$3(Track);
1690
+
1691
+ function Track() {
1692
+ var _this;
1693
+
1694
+ _classCallCheck$3(this, Track);
1695
+
1696
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1697
+ args[_key] = arguments[_key];
1698
+ }
1699
+
1700
+ _this = _super.call.apply(_super, [this].concat(args));
1701
+
1702
+ _defineProperty$3(_assertThisInitialized$3(_this), "node", null);
1703
+
1704
+ _defineProperty$3(_assertThisInitialized$3(_this), "handleRef", function (ref) {
1705
+ _this.node = ref;
1706
+ });
1707
+
1708
+ return _this;
1709
+ }
1710
+
1711
+ _createClass$3(Track, [{
1712
+ key: "render",
1713
+ value: function render() {
1714
+ var slides = renderSlides(this.props);
1715
+ var _this$props = this.props,
1716
+ onMouseEnter = _this$props.onMouseEnter,
1717
+ onMouseOver = _this$props.onMouseOver,
1718
+ onMouseLeave = _this$props.onMouseLeave;
1719
+ var mouseEvents = {
1720
+ onMouseEnter: onMouseEnter,
1721
+ onMouseOver: onMouseOver,
1722
+ onMouseLeave: onMouseLeave
1723
+ };
1724
+ return /*#__PURE__*/_react$3["default"].createElement("div", _extends$2({
1725
+ ref: this.handleRef,
1726
+ className: "slick-track",
1727
+ style: this.props.trackStyle
1728
+ }, mouseEvents), slides);
1729
+ }
1730
+ }]);
1731
+
1732
+ return Track;
1733
+ }(_react$3["default"].PureComponent);
1734
+
1735
+ track.Track = Track;
1736
+
1737
+ var dots = {};
1738
+
1739
+ Object.defineProperty(dots, "__esModule", {
1740
+ value: true
1741
+ });
1742
+ dots.Dots = void 0;
1743
+
1744
+ var _react$2 = _interopRequireDefault$2(React__default);
1745
+
1746
+ var _classnames$2 = _interopRequireDefault$2(classnames.exports);
1747
+
1748
+ var _innerSliderUtils$2 = innerSliderUtils;
1749
+
1750
+ function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
1751
+
1752
+ function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
1753
+
1754
+ function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1755
+
1756
+ function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1757
+
1758
+ function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1759
+
1760
+ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1761
+
1762
+ function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1763
+
1764
+ function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }
1765
+
1766
+ function _inherits$2(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }
1767
+
1768
+ function _setPrototypeOf$2(o, p) { _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$2(o, p); }
1769
+
1770
+ function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf$2(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$2(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$2(this, result); }; }
1771
+
1772
+ function _possibleConstructorReturn$2(self, call) { if (call && (_typeof$2(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$2(self); }
1773
+
1774
+ function _assertThisInitialized$2(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1775
+
1776
+ function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
1777
+
1778
+ function _getPrototypeOf$2(o) { _getPrototypeOf$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$2(o); }
1779
+
1780
+ var getDotCount = function getDotCount(spec) {
1781
+ var dots;
1782
+
1783
+ if (spec.infinite) {
1784
+ dots = Math.ceil(spec.slideCount / spec.slidesToScroll);
1785
+ } else {
1786
+ dots = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;
1787
+ }
1788
+
1789
+ return dots;
1790
+ };
1791
+
1792
+ var Dots = /*#__PURE__*/function (_React$PureComponent) {
1793
+ _inherits$2(Dots, _React$PureComponent);
1794
+
1795
+ var _super = _createSuper$2(Dots);
1796
+
1797
+ function Dots() {
1798
+ _classCallCheck$2(this, Dots);
1799
+
1800
+ return _super.apply(this, arguments);
1801
+ }
1802
+
1803
+ _createClass$2(Dots, [{
1804
+ key: "clickHandler",
1805
+ value: function clickHandler(options, e) {
1806
+ // In Autoplay the focus stays on clicked button even after transition
1807
+ // to next slide. That only goes away by click somewhere outside
1808
+ e.preventDefault();
1809
+ this.props.clickHandler(options);
1810
+ }
1811
+ }, {
1812
+ key: "render",
1813
+ value: function render() {
1814
+ var _this$props = this.props,
1815
+ onMouseEnter = _this$props.onMouseEnter,
1816
+ onMouseOver = _this$props.onMouseOver,
1817
+ onMouseLeave = _this$props.onMouseLeave,
1818
+ infinite = _this$props.infinite,
1819
+ slidesToScroll = _this$props.slidesToScroll,
1820
+ slidesToShow = _this$props.slidesToShow,
1821
+ slideCount = _this$props.slideCount,
1822
+ currentSlide = _this$props.currentSlide;
1823
+ var dotCount = getDotCount({
1824
+ slideCount: slideCount,
1825
+ slidesToScroll: slidesToScroll,
1826
+ slidesToShow: slidesToShow,
1827
+ infinite: infinite
1828
+ });
1829
+ var mouseEvents = {
1830
+ onMouseEnter: onMouseEnter,
1831
+ onMouseOver: onMouseOver,
1832
+ onMouseLeave: onMouseLeave
1833
+ };
1834
+ var dots = [];
1835
+
1836
+ for (var i = 0; i < dotCount; i++) {
1837
+ var _rightBound = (i + 1) * slidesToScroll - 1;
1838
+
1839
+ var rightBound = infinite ? _rightBound : (0, _innerSliderUtils$2.clamp)(_rightBound, 0, slideCount - 1);
1840
+
1841
+ var _leftBound = rightBound - (slidesToScroll - 1);
1842
+
1843
+ var leftBound = infinite ? _leftBound : (0, _innerSliderUtils$2.clamp)(_leftBound, 0, slideCount - 1);
1844
+ var className = (0, _classnames$2["default"])({
1845
+ "slick-active": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound
1846
+ });
1847
+ var dotOptions = {
1848
+ message: "dots",
1849
+ index: i,
1850
+ slidesToScroll: slidesToScroll,
1851
+ currentSlide: currentSlide
1852
+ };
1853
+ var onClick = this.clickHandler.bind(this, dotOptions);
1854
+ dots = dots.concat( /*#__PURE__*/_react$2["default"].createElement("li", {
1855
+ key: i,
1856
+ className: className
1857
+ }, /*#__PURE__*/_react$2["default"].cloneElement(this.props.customPaging(i), {
1858
+ onClick: onClick
1859
+ })));
1860
+ }
1861
+
1862
+ return /*#__PURE__*/_react$2["default"].cloneElement(this.props.appendDots(dots), _objectSpread$2({
1863
+ className: this.props.dotsClass
1864
+ }, mouseEvents));
1865
+ }
1866
+ }]);
1867
+
1868
+ return Dots;
1869
+ }(_react$2["default"].PureComponent);
1870
+
1871
+ dots.Dots = Dots;
1872
+
1873
+ var arrows = {};
1874
+
1875
+ Object.defineProperty(arrows, "__esModule", {
1876
+ value: true
1877
+ });
1878
+ arrows.NextArrow = arrows.PrevArrow = void 0;
1879
+
1880
+ var _react$1 = _interopRequireDefault$1(React__default);
1881
+
1882
+ var _classnames$1 = _interopRequireDefault$1(classnames.exports);
1883
+
1884
+ var _innerSliderUtils$1 = innerSliderUtils;
1885
+
1886
+ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
1887
+
1888
+ function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
1889
+
1890
+ function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
1891
+
1892
+ function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1893
+
1894
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1895
+
1896
+ function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1897
+
1898
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1899
+
1900
+ function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1901
+
1902
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
1903
+
1904
+ function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
1905
+
1906
+ function _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }
1907
+
1908
+ function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf$1(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$1(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$1(this, result); }; }
1909
+
1910
+ function _possibleConstructorReturn$1(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$1(self); }
1911
+
1912
+ function _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
1913
+
1914
+ function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
1915
+
1916
+ function _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }
1917
+
1918
+ var PrevArrow = /*#__PURE__*/function (_React$PureComponent) {
1919
+ _inherits$1(PrevArrow, _React$PureComponent);
1920
+
1921
+ var _super = _createSuper$1(PrevArrow);
1922
+
1923
+ function PrevArrow() {
1924
+ _classCallCheck$1(this, PrevArrow);
1925
+
1926
+ return _super.apply(this, arguments);
1927
+ }
1928
+
1929
+ _createClass$1(PrevArrow, [{
1930
+ key: "clickHandler",
1931
+ value: function clickHandler(options, e) {
1932
+ if (e) {
1933
+ e.preventDefault();
1934
+ }
1935
+
1936
+ this.props.clickHandler(options, e);
1937
+ }
1938
+ }, {
1939
+ key: "render",
1940
+ value: function render() {
1941
+ var prevClasses = {
1942
+ "slick-arrow": true,
1943
+ "slick-prev": true
1944
+ };
1945
+ var prevHandler = this.clickHandler.bind(this, {
1946
+ message: "previous"
1947
+ });
1948
+
1949
+ if (!this.props.infinite && (this.props.currentSlide === 0 || this.props.slideCount <= this.props.slidesToShow)) {
1950
+ prevClasses["slick-disabled"] = true;
1951
+ prevHandler = null;
1952
+ }
1953
+
1954
+ var prevArrowProps = {
1955
+ key: "0",
1956
+ "data-role": "none",
1957
+ className: (0, _classnames$1["default"])(prevClasses),
1958
+ style: {
1959
+ display: "block"
1960
+ },
1961
+ onClick: prevHandler
1962
+ };
1963
+ var customProps = {
1964
+ currentSlide: this.props.currentSlide,
1965
+ slideCount: this.props.slideCount
1966
+ };
1967
+ var prevArrow;
1968
+
1969
+ if (this.props.prevArrow) {
1970
+ prevArrow = /*#__PURE__*/_react$1["default"].cloneElement(this.props.prevArrow, _objectSpread$1(_objectSpread$1({}, prevArrowProps), customProps));
1971
+ } else {
1972
+ prevArrow = /*#__PURE__*/_react$1["default"].createElement("button", _extends$1({
1973
+ key: "0",
1974
+ type: "button"
1975
+ }, prevArrowProps), " ", "Previous");
1976
+ }
1977
+
1978
+ return prevArrow;
1979
+ }
1980
+ }]);
1981
+
1982
+ return PrevArrow;
1983
+ }(_react$1["default"].PureComponent);
1984
+
1985
+ arrows.PrevArrow = PrevArrow;
1986
+
1987
+ var NextArrow = /*#__PURE__*/function (_React$PureComponent2) {
1988
+ _inherits$1(NextArrow, _React$PureComponent2);
1989
+
1990
+ var _super2 = _createSuper$1(NextArrow);
1991
+
1992
+ function NextArrow() {
1993
+ _classCallCheck$1(this, NextArrow);
1994
+
1995
+ return _super2.apply(this, arguments);
1996
+ }
1997
+
1998
+ _createClass$1(NextArrow, [{
1999
+ key: "clickHandler",
2000
+ value: function clickHandler(options, e) {
2001
+ if (e) {
2002
+ e.preventDefault();
2003
+ }
2004
+
2005
+ this.props.clickHandler(options, e);
2006
+ }
2007
+ }, {
2008
+ key: "render",
2009
+ value: function render() {
2010
+ var nextClasses = {
2011
+ "slick-arrow": true,
2012
+ "slick-next": true
2013
+ };
2014
+ var nextHandler = this.clickHandler.bind(this, {
2015
+ message: "next"
2016
+ });
2017
+
2018
+ if (!(0, _innerSliderUtils$1.canGoNext)(this.props)) {
2019
+ nextClasses["slick-disabled"] = true;
2020
+ nextHandler = null;
2021
+ }
2022
+
2023
+ var nextArrowProps = {
2024
+ key: "1",
2025
+ "data-role": "none",
2026
+ className: (0, _classnames$1["default"])(nextClasses),
2027
+ style: {
2028
+ display: "block"
2029
+ },
2030
+ onClick: nextHandler
2031
+ };
2032
+ var customProps = {
2033
+ currentSlide: this.props.currentSlide,
2034
+ slideCount: this.props.slideCount
2035
+ };
2036
+ var nextArrow;
2037
+
2038
+ if (this.props.nextArrow) {
2039
+ nextArrow = /*#__PURE__*/_react$1["default"].cloneElement(this.props.nextArrow, _objectSpread$1(_objectSpread$1({}, nextArrowProps), customProps));
2040
+ } else {
2041
+ nextArrow = /*#__PURE__*/_react$1["default"].createElement("button", _extends$1({
2042
+ key: "1",
2043
+ type: "button"
2044
+ }, nextArrowProps), " ", "Next");
2045
+ }
2046
+
2047
+ return nextArrow;
2048
+ }
2049
+ }]);
2050
+
2051
+ return NextArrow;
2052
+ }(_react$1["default"].PureComponent);
2053
+
2054
+ arrows.NextArrow = NextArrow;
2055
+
2056
+ /**
2057
+ * A collection of shims that provide minimal functionality of the ES6 collections.
2058
+ *
2059
+ * These implementations are not meant to be used outside of the ResizeObserver
2060
+ * modules as they cover only a limited range of use cases.
2061
+ */
2062
+ /* eslint-disable require-jsdoc, valid-jsdoc */
2063
+ var MapShim = (function () {
2064
+ if (typeof Map !== 'undefined') {
2065
+ return Map;
2066
+ }
2067
+ /**
2068
+ * Returns index in provided array that matches the specified key.
2069
+ *
2070
+ * @param {Array<Array>} arr
2071
+ * @param {*} key
2072
+ * @returns {number}
2073
+ */
2074
+ function getIndex(arr, key) {
2075
+ var result = -1;
2076
+ arr.some(function (entry, index) {
2077
+ if (entry[0] === key) {
2078
+ result = index;
2079
+ return true;
2080
+ }
2081
+ return false;
2082
+ });
2083
+ return result;
2084
+ }
2085
+ return /** @class */ (function () {
2086
+ function class_1() {
2087
+ this.__entries__ = [];
2088
+ }
2089
+ Object.defineProperty(class_1.prototype, "size", {
2090
+ /**
2091
+ * @returns {boolean}
2092
+ */
2093
+ get: function () {
2094
+ return this.__entries__.length;
2095
+ },
2096
+ enumerable: true,
2097
+ configurable: true
2098
+ });
2099
+ /**
2100
+ * @param {*} key
2101
+ * @returns {*}
2102
+ */
2103
+ class_1.prototype.get = function (key) {
2104
+ var index = getIndex(this.__entries__, key);
2105
+ var entry = this.__entries__[index];
2106
+ return entry && entry[1];
2107
+ };
2108
+ /**
2109
+ * @param {*} key
2110
+ * @param {*} value
2111
+ * @returns {void}
2112
+ */
2113
+ class_1.prototype.set = function (key, value) {
2114
+ var index = getIndex(this.__entries__, key);
2115
+ if (~index) {
2116
+ this.__entries__[index][1] = value;
2117
+ }
2118
+ else {
2119
+ this.__entries__.push([key, value]);
2120
+ }
2121
+ };
2122
+ /**
2123
+ * @param {*} key
2124
+ * @returns {void}
2125
+ */
2126
+ class_1.prototype.delete = function (key) {
2127
+ var entries = this.__entries__;
2128
+ var index = getIndex(entries, key);
2129
+ if (~index) {
2130
+ entries.splice(index, 1);
2131
+ }
2132
+ };
2133
+ /**
2134
+ * @param {*} key
2135
+ * @returns {void}
2136
+ */
2137
+ class_1.prototype.has = function (key) {
2138
+ return !!~getIndex(this.__entries__, key);
2139
+ };
2140
+ /**
2141
+ * @returns {void}
2142
+ */
2143
+ class_1.prototype.clear = function () {
2144
+ this.__entries__.splice(0);
2145
+ };
2146
+ /**
2147
+ * @param {Function} callback
2148
+ * @param {*} [ctx=null]
2149
+ * @returns {void}
2150
+ */
2151
+ class_1.prototype.forEach = function (callback, ctx) {
2152
+ if (ctx === void 0) { ctx = null; }
2153
+ for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
2154
+ var entry = _a[_i];
2155
+ callback.call(ctx, entry[1], entry[0]);
2156
+ }
2157
+ };
2158
+ return class_1;
2159
+ }());
2160
+ })();
2161
+
2162
+ /**
2163
+ * Detects whether window and document objects are available in current environment.
2164
+ */
2165
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
2166
+
2167
+ // Returns global object of a current environment.
2168
+ var global$1 = (function () {
2169
+ if (typeof global !== 'undefined' && global.Math === Math) {
2170
+ return global;
2171
+ }
2172
+ if (typeof self !== 'undefined' && self.Math === Math) {
2173
+ return self;
2174
+ }
2175
+ if (typeof window !== 'undefined' && window.Math === Math) {
2176
+ return window;
2177
+ }
2178
+ // eslint-disable-next-line no-new-func
2179
+ return Function('return this')();
2180
+ })();
2181
+
2182
+ /**
2183
+ * A shim for the requestAnimationFrame which falls back to the setTimeout if
2184
+ * first one is not supported.
2185
+ *
2186
+ * @returns {number} Requests' identifier.
2187
+ */
2188
+ var requestAnimationFrame$1 = (function () {
2189
+ if (typeof requestAnimationFrame === 'function') {
2190
+ // It's required to use a bounded function because IE sometimes throws
2191
+ // an "Invalid calling object" error if rAF is invoked without the global
2192
+ // object on the left hand side.
2193
+ return requestAnimationFrame.bind(global$1);
2194
+ }
2195
+ return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
2196
+ })();
2197
+
2198
+ // Defines minimum timeout before adding a trailing call.
2199
+ var trailingTimeout = 2;
2200
+ /**
2201
+ * Creates a wrapper function which ensures that provided callback will be
2202
+ * invoked only once during the specified delay period.
2203
+ *
2204
+ * @param {Function} callback - Function to be invoked after the delay period.
2205
+ * @param {number} delay - Delay after which to invoke callback.
2206
+ * @returns {Function}
2207
+ */
2208
+ function throttle (callback, delay) {
2209
+ var leadingCall = false, trailingCall = false, lastCallTime = 0;
2210
+ /**
2211
+ * Invokes the original callback function and schedules new invocation if
2212
+ * the "proxy" was called during current request.
2213
+ *
2214
+ * @returns {void}
2215
+ */
2216
+ function resolvePending() {
2217
+ if (leadingCall) {
2218
+ leadingCall = false;
2219
+ callback();
2220
+ }
2221
+ if (trailingCall) {
2222
+ proxy();
2223
+ }
2224
+ }
2225
+ /**
2226
+ * Callback invoked after the specified delay. It will further postpone
2227
+ * invocation of the original function delegating it to the
2228
+ * requestAnimationFrame.
2229
+ *
2230
+ * @returns {void}
2231
+ */
2232
+ function timeoutCallback() {
2233
+ requestAnimationFrame$1(resolvePending);
2234
+ }
2235
+ /**
2236
+ * Schedules invocation of the original function.
2237
+ *
2238
+ * @returns {void}
2239
+ */
2240
+ function proxy() {
2241
+ var timeStamp = Date.now();
2242
+ if (leadingCall) {
2243
+ // Reject immediately following calls.
2244
+ if (timeStamp - lastCallTime < trailingTimeout) {
2245
+ return;
2246
+ }
2247
+ // Schedule new call to be in invoked when the pending one is resolved.
2248
+ // This is important for "transitions" which never actually start
2249
+ // immediately so there is a chance that we might miss one if change
2250
+ // happens amids the pending invocation.
2251
+ trailingCall = true;
2252
+ }
2253
+ else {
2254
+ leadingCall = true;
2255
+ trailingCall = false;
2256
+ setTimeout(timeoutCallback, delay);
2257
+ }
2258
+ lastCallTime = timeStamp;
2259
+ }
2260
+ return proxy;
2261
+ }
2262
+
2263
+ // Minimum delay before invoking the update of observers.
2264
+ var REFRESH_DELAY = 20;
2265
+ // A list of substrings of CSS properties used to find transition events that
2266
+ // might affect dimensions of observed elements.
2267
+ var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
2268
+ // Check if MutationObserver is available.
2269
+ var mutationObserverSupported = typeof MutationObserver !== 'undefined';
2270
+ /**
2271
+ * Singleton controller class which handles updates of ResizeObserver instances.
2272
+ */
2273
+ var ResizeObserverController = /** @class */ (function () {
2274
+ /**
2275
+ * Creates a new instance of ResizeObserverController.
2276
+ *
2277
+ * @private
2278
+ */
2279
+ function ResizeObserverController() {
2280
+ /**
2281
+ * Indicates whether DOM listeners have been added.
2282
+ *
2283
+ * @private {boolean}
2284
+ */
2285
+ this.connected_ = false;
2286
+ /**
2287
+ * Tells that controller has subscribed for Mutation Events.
2288
+ *
2289
+ * @private {boolean}
2290
+ */
2291
+ this.mutationEventsAdded_ = false;
2292
+ /**
2293
+ * Keeps reference to the instance of MutationObserver.
2294
+ *
2295
+ * @private {MutationObserver}
2296
+ */
2297
+ this.mutationsObserver_ = null;
2298
+ /**
2299
+ * A list of connected observers.
2300
+ *
2301
+ * @private {Array<ResizeObserverSPI>}
2302
+ */
2303
+ this.observers_ = [];
2304
+ this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
2305
+ this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
2306
+ }
2307
+ /**
2308
+ * Adds observer to observers list.
2309
+ *
2310
+ * @param {ResizeObserverSPI} observer - Observer to be added.
2311
+ * @returns {void}
2312
+ */
2313
+ ResizeObserverController.prototype.addObserver = function (observer) {
2314
+ if (!~this.observers_.indexOf(observer)) {
2315
+ this.observers_.push(observer);
2316
+ }
2317
+ // Add listeners if they haven't been added yet.
2318
+ if (!this.connected_) {
2319
+ this.connect_();
2320
+ }
2321
+ };
2322
+ /**
2323
+ * Removes observer from observers list.
2324
+ *
2325
+ * @param {ResizeObserverSPI} observer - Observer to be removed.
2326
+ * @returns {void}
2327
+ */
2328
+ ResizeObserverController.prototype.removeObserver = function (observer) {
2329
+ var observers = this.observers_;
2330
+ var index = observers.indexOf(observer);
2331
+ // Remove observer if it's present in registry.
2332
+ if (~index) {
2333
+ observers.splice(index, 1);
2334
+ }
2335
+ // Remove listeners if controller has no connected observers.
2336
+ if (!observers.length && this.connected_) {
2337
+ this.disconnect_();
2338
+ }
2339
+ };
2340
+ /**
2341
+ * Invokes the update of observers. It will continue running updates insofar
2342
+ * it detects changes.
2343
+ *
2344
+ * @returns {void}
2345
+ */
2346
+ ResizeObserverController.prototype.refresh = function () {
2347
+ var changesDetected = this.updateObservers_();
2348
+ // Continue running updates if changes have been detected as there might
2349
+ // be future ones caused by CSS transitions.
2350
+ if (changesDetected) {
2351
+ this.refresh();
2352
+ }
2353
+ };
2354
+ /**
2355
+ * Updates every observer from observers list and notifies them of queued
2356
+ * entries.
2357
+ *
2358
+ * @private
2359
+ * @returns {boolean} Returns "true" if any observer has detected changes in
2360
+ * dimensions of it's elements.
2361
+ */
2362
+ ResizeObserverController.prototype.updateObservers_ = function () {
2363
+ // Collect observers that have active observations.
2364
+ var activeObservers = this.observers_.filter(function (observer) {
2365
+ return observer.gatherActive(), observer.hasActive();
2366
+ });
2367
+ // Deliver notifications in a separate cycle in order to avoid any
2368
+ // collisions between observers, e.g. when multiple instances of
2369
+ // ResizeObserver are tracking the same element and the callback of one
2370
+ // of them changes content dimensions of the observed target. Sometimes
2371
+ // this may result in notifications being blocked for the rest of observers.
2372
+ activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
2373
+ return activeObservers.length > 0;
2374
+ };
2375
+ /**
2376
+ * Initializes DOM listeners.
2377
+ *
2378
+ * @private
2379
+ * @returns {void}
2380
+ */
2381
+ ResizeObserverController.prototype.connect_ = function () {
2382
+ // Do nothing if running in a non-browser environment or if listeners
2383
+ // have been already added.
2384
+ if (!isBrowser || this.connected_) {
2385
+ return;
2386
+ }
2387
+ // Subscription to the "Transitionend" event is used as a workaround for
2388
+ // delayed transitions. This way it's possible to capture at least the
2389
+ // final state of an element.
2390
+ document.addEventListener('transitionend', this.onTransitionEnd_);
2391
+ window.addEventListener('resize', this.refresh);
2392
+ if (mutationObserverSupported) {
2393
+ this.mutationsObserver_ = new MutationObserver(this.refresh);
2394
+ this.mutationsObserver_.observe(document, {
2395
+ attributes: true,
2396
+ childList: true,
2397
+ characterData: true,
2398
+ subtree: true
2399
+ });
2400
+ }
2401
+ else {
2402
+ document.addEventListener('DOMSubtreeModified', this.refresh);
2403
+ this.mutationEventsAdded_ = true;
2404
+ }
2405
+ this.connected_ = true;
2406
+ };
2407
+ /**
2408
+ * Removes DOM listeners.
2409
+ *
2410
+ * @private
2411
+ * @returns {void}
2412
+ */
2413
+ ResizeObserverController.prototype.disconnect_ = function () {
2414
+ // Do nothing if running in a non-browser environment or if listeners
2415
+ // have been already removed.
2416
+ if (!isBrowser || !this.connected_) {
2417
+ return;
2418
+ }
2419
+ document.removeEventListener('transitionend', this.onTransitionEnd_);
2420
+ window.removeEventListener('resize', this.refresh);
2421
+ if (this.mutationsObserver_) {
2422
+ this.mutationsObserver_.disconnect();
2423
+ }
2424
+ if (this.mutationEventsAdded_) {
2425
+ document.removeEventListener('DOMSubtreeModified', this.refresh);
2426
+ }
2427
+ this.mutationsObserver_ = null;
2428
+ this.mutationEventsAdded_ = false;
2429
+ this.connected_ = false;
2430
+ };
2431
+ /**
2432
+ * "Transitionend" event handler.
2433
+ *
2434
+ * @private
2435
+ * @param {TransitionEvent} event
2436
+ * @returns {void}
2437
+ */
2438
+ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
2439
+ var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
2440
+ // Detect whether transition may affect dimensions of an element.
2441
+ var isReflowProperty = transitionKeys.some(function (key) {
2442
+ return !!~propertyName.indexOf(key);
2443
+ });
2444
+ if (isReflowProperty) {
2445
+ this.refresh();
2446
+ }
2447
+ };
2448
+ /**
2449
+ * Returns instance of the ResizeObserverController.
2450
+ *
2451
+ * @returns {ResizeObserverController}
2452
+ */
2453
+ ResizeObserverController.getInstance = function () {
2454
+ if (!this.instance_) {
2455
+ this.instance_ = new ResizeObserverController();
2456
+ }
2457
+ return this.instance_;
2458
+ };
2459
+ /**
2460
+ * Holds reference to the controller's instance.
2461
+ *
2462
+ * @private {ResizeObserverController}
2463
+ */
2464
+ ResizeObserverController.instance_ = null;
2465
+ return ResizeObserverController;
2466
+ }());
2467
+
2468
+ /**
2469
+ * Defines non-writable/enumerable properties of the provided target object.
2470
+ *
2471
+ * @param {Object} target - Object for which to define properties.
2472
+ * @param {Object} props - Properties to be defined.
2473
+ * @returns {Object} Target object.
2474
+ */
2475
+ var defineConfigurable = (function (target, props) {
2476
+ for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
2477
+ var key = _a[_i];
2478
+ Object.defineProperty(target, key, {
2479
+ value: props[key],
2480
+ enumerable: false,
2481
+ writable: false,
2482
+ configurable: true
2483
+ });
2484
+ }
2485
+ return target;
2486
+ });
2487
+
2488
+ /**
2489
+ * Returns the global object associated with provided element.
2490
+ *
2491
+ * @param {Object} target
2492
+ * @returns {Object}
2493
+ */
2494
+ var getWindowOf = (function (target) {
2495
+ // Assume that the element is an instance of Node, which means that it
2496
+ // has the "ownerDocument" property from which we can retrieve a
2497
+ // corresponding global object.
2498
+ var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
2499
+ // Return the local global object if it's not possible extract one from
2500
+ // provided element.
2501
+ return ownerGlobal || global$1;
2502
+ });
2503
+
2504
+ // Placeholder of an empty content rectangle.
2505
+ var emptyRect = createRectInit(0, 0, 0, 0);
2506
+ /**
2507
+ * Converts provided string to a number.
2508
+ *
2509
+ * @param {number|string} value
2510
+ * @returns {number}
2511
+ */
2512
+ function toFloat(value) {
2513
+ return parseFloat(value) || 0;
2514
+ }
2515
+ /**
2516
+ * Extracts borders size from provided styles.
2517
+ *
2518
+ * @param {CSSStyleDeclaration} styles
2519
+ * @param {...string} positions - Borders positions (top, right, ...)
2520
+ * @returns {number}
2521
+ */
2522
+ function getBordersSize(styles) {
2523
+ var positions = [];
2524
+ for (var _i = 1; _i < arguments.length; _i++) {
2525
+ positions[_i - 1] = arguments[_i];
2526
+ }
2527
+ return positions.reduce(function (size, position) {
2528
+ var value = styles['border-' + position + '-width'];
2529
+ return size + toFloat(value);
2530
+ }, 0);
2531
+ }
2532
+ /**
2533
+ * Extracts paddings sizes from provided styles.
2534
+ *
2535
+ * @param {CSSStyleDeclaration} styles
2536
+ * @returns {Object} Paddings box.
2537
+ */
2538
+ function getPaddings(styles) {
2539
+ var positions = ['top', 'right', 'bottom', 'left'];
2540
+ var paddings = {};
2541
+ for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
2542
+ var position = positions_1[_i];
2543
+ var value = styles['padding-' + position];
2544
+ paddings[position] = toFloat(value);
2545
+ }
2546
+ return paddings;
2547
+ }
2548
+ /**
2549
+ * Calculates content rectangle of provided SVG element.
2550
+ *
2551
+ * @param {SVGGraphicsElement} target - Element content rectangle of which needs
2552
+ * to be calculated.
2553
+ * @returns {DOMRectInit}
2554
+ */
2555
+ function getSVGContentRect(target) {
2556
+ var bbox = target.getBBox();
2557
+ return createRectInit(0, 0, bbox.width, bbox.height);
2558
+ }
2559
+ /**
2560
+ * Calculates content rectangle of provided HTMLElement.
2561
+ *
2562
+ * @param {HTMLElement} target - Element for which to calculate the content rectangle.
2563
+ * @returns {DOMRectInit}
2564
+ */
2565
+ function getHTMLElementContentRect(target) {
2566
+ // Client width & height properties can't be
2567
+ // used exclusively as they provide rounded values.
2568
+ var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
2569
+ // By this condition we can catch all non-replaced inline, hidden and
2570
+ // detached elements. Though elements with width & height properties less
2571
+ // than 0.5 will be discarded as well.
2572
+ //
2573
+ // Without it we would need to implement separate methods for each of
2574
+ // those cases and it's not possible to perform a precise and performance
2575
+ // effective test for hidden elements. E.g. even jQuery's ':visible' filter
2576
+ // gives wrong results for elements with width & height less than 0.5.
2577
+ if (!clientWidth && !clientHeight) {
2578
+ return emptyRect;
2579
+ }
2580
+ var styles = getWindowOf(target).getComputedStyle(target);
2581
+ var paddings = getPaddings(styles);
2582
+ var horizPad = paddings.left + paddings.right;
2583
+ var vertPad = paddings.top + paddings.bottom;
2584
+ // Computed styles of width & height are being used because they are the
2585
+ // only dimensions available to JS that contain non-rounded values. It could
2586
+ // be possible to utilize the getBoundingClientRect if only it's data wasn't
2587
+ // affected by CSS transformations let alone paddings, borders and scroll bars.
2588
+ var width = toFloat(styles.width), height = toFloat(styles.height);
2589
+ // Width & height include paddings and borders when the 'border-box' box
2590
+ // model is applied (except for IE).
2591
+ if (styles.boxSizing === 'border-box') {
2592
+ // Following conditions are required to handle Internet Explorer which
2593
+ // doesn't include paddings and borders to computed CSS dimensions.
2594
+ //
2595
+ // We can say that if CSS dimensions + paddings are equal to the "client"
2596
+ // properties then it's either IE, and thus we don't need to subtract
2597
+ // anything, or an element merely doesn't have paddings/borders styles.
2598
+ if (Math.round(width + horizPad) !== clientWidth) {
2599
+ width -= getBordersSize(styles, 'left', 'right') + horizPad;
2600
+ }
2601
+ if (Math.round(height + vertPad) !== clientHeight) {
2602
+ height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
2603
+ }
2604
+ }
2605
+ // Following steps can't be applied to the document's root element as its
2606
+ // client[Width/Height] properties represent viewport area of the window.
2607
+ // Besides, it's as well not necessary as the <html> itself neither has
2608
+ // rendered scroll bars nor it can be clipped.
2609
+ if (!isDocumentElement(target)) {
2610
+ // In some browsers (only in Firefox, actually) CSS width & height
2611
+ // include scroll bars size which can be removed at this step as scroll
2612
+ // bars are the only difference between rounded dimensions + paddings
2613
+ // and "client" properties, though that is not always true in Chrome.
2614
+ var vertScrollbar = Math.round(width + horizPad) - clientWidth;
2615
+ var horizScrollbar = Math.round(height + vertPad) - clientHeight;
2616
+ // Chrome has a rather weird rounding of "client" properties.
2617
+ // E.g. for an element with content width of 314.2px it sometimes gives
2618
+ // the client width of 315px and for the width of 314.7px it may give
2619
+ // 314px. And it doesn't happen all the time. So just ignore this delta
2620
+ // as a non-relevant.
2621
+ if (Math.abs(vertScrollbar) !== 1) {
2622
+ width -= vertScrollbar;
2623
+ }
2624
+ if (Math.abs(horizScrollbar) !== 1) {
2625
+ height -= horizScrollbar;
2626
+ }
2627
+ }
2628
+ return createRectInit(paddings.left, paddings.top, width, height);
2629
+ }
2630
+ /**
2631
+ * Checks whether provided element is an instance of the SVGGraphicsElement.
2632
+ *
2633
+ * @param {Element} target - Element to be checked.
2634
+ * @returns {boolean}
2635
+ */
2636
+ var isSVGGraphicsElement = (function () {
2637
+ // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
2638
+ // interface.
2639
+ if (typeof SVGGraphicsElement !== 'undefined') {
2640
+ return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
2641
+ }
2642
+ // If it's so, then check that element is at least an instance of the
2643
+ // SVGElement and that it has the "getBBox" method.
2644
+ // eslint-disable-next-line no-extra-parens
2645
+ return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
2646
+ typeof target.getBBox === 'function'); };
2647
+ })();
2648
+ /**
2649
+ * Checks whether provided element is a document element (<html>).
2650
+ *
2651
+ * @param {Element} target - Element to be checked.
2652
+ * @returns {boolean}
2653
+ */
2654
+ function isDocumentElement(target) {
2655
+ return target === getWindowOf(target).document.documentElement;
2656
+ }
2657
+ /**
2658
+ * Calculates an appropriate content rectangle for provided html or svg element.
2659
+ *
2660
+ * @param {Element} target - Element content rectangle of which needs to be calculated.
2661
+ * @returns {DOMRectInit}
2662
+ */
2663
+ function getContentRect(target) {
2664
+ if (!isBrowser) {
2665
+ return emptyRect;
2666
+ }
2667
+ if (isSVGGraphicsElement(target)) {
2668
+ return getSVGContentRect(target);
2669
+ }
2670
+ return getHTMLElementContentRect(target);
2671
+ }
2672
+ /**
2673
+ * Creates rectangle with an interface of the DOMRectReadOnly.
2674
+ * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
2675
+ *
2676
+ * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
2677
+ * @returns {DOMRectReadOnly}
2678
+ */
2679
+ function createReadOnlyRect(_a) {
2680
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
2681
+ // If DOMRectReadOnly is available use it as a prototype for the rectangle.
2682
+ var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
2683
+ var rect = Object.create(Constr.prototype);
2684
+ // Rectangle's properties are not writable and non-enumerable.
2685
+ defineConfigurable(rect, {
2686
+ x: x, y: y, width: width, height: height,
2687
+ top: y,
2688
+ right: x + width,
2689
+ bottom: height + y,
2690
+ left: x
2691
+ });
2692
+ return rect;
2693
+ }
2694
+ /**
2695
+ * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
2696
+ * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
2697
+ *
2698
+ * @param {number} x - X coordinate.
2699
+ * @param {number} y - Y coordinate.
2700
+ * @param {number} width - Rectangle's width.
2701
+ * @param {number} height - Rectangle's height.
2702
+ * @returns {DOMRectInit}
2703
+ */
2704
+ function createRectInit(x, y, width, height) {
2705
+ return { x: x, y: y, width: width, height: height };
2706
+ }
2707
+
2708
+ /**
2709
+ * Class that is responsible for computations of the content rectangle of
2710
+ * provided DOM element and for keeping track of it's changes.
2711
+ */
2712
+ var ResizeObservation = /** @class */ (function () {
2713
+ /**
2714
+ * Creates an instance of ResizeObservation.
2715
+ *
2716
+ * @param {Element} target - Element to be observed.
2717
+ */
2718
+ function ResizeObservation(target) {
2719
+ /**
2720
+ * Broadcasted width of content rectangle.
2721
+ *
2722
+ * @type {number}
2723
+ */
2724
+ this.broadcastWidth = 0;
2725
+ /**
2726
+ * Broadcasted height of content rectangle.
2727
+ *
2728
+ * @type {number}
2729
+ */
2730
+ this.broadcastHeight = 0;
2731
+ /**
2732
+ * Reference to the last observed content rectangle.
2733
+ *
2734
+ * @private {DOMRectInit}
2735
+ */
2736
+ this.contentRect_ = createRectInit(0, 0, 0, 0);
2737
+ this.target = target;
2738
+ }
2739
+ /**
2740
+ * Updates content rectangle and tells whether it's width or height properties
2741
+ * have changed since the last broadcast.
2742
+ *
2743
+ * @returns {boolean}
2744
+ */
2745
+ ResizeObservation.prototype.isActive = function () {
2746
+ var rect = getContentRect(this.target);
2747
+ this.contentRect_ = rect;
2748
+ return (rect.width !== this.broadcastWidth ||
2749
+ rect.height !== this.broadcastHeight);
2750
+ };
2751
+ /**
2752
+ * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
2753
+ * from the corresponding properties of the last observed content rectangle.
2754
+ *
2755
+ * @returns {DOMRectInit} Last observed content rectangle.
2756
+ */
2757
+ ResizeObservation.prototype.broadcastRect = function () {
2758
+ var rect = this.contentRect_;
2759
+ this.broadcastWidth = rect.width;
2760
+ this.broadcastHeight = rect.height;
2761
+ return rect;
2762
+ };
2763
+ return ResizeObservation;
2764
+ }());
2765
+
2766
+ var ResizeObserverEntry = /** @class */ (function () {
2767
+ /**
2768
+ * Creates an instance of ResizeObserverEntry.
2769
+ *
2770
+ * @param {Element} target - Element that is being observed.
2771
+ * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
2772
+ */
2773
+ function ResizeObserverEntry(target, rectInit) {
2774
+ var contentRect = createReadOnlyRect(rectInit);
2775
+ // According to the specification following properties are not writable
2776
+ // and are also not enumerable in the native implementation.
2777
+ //
2778
+ // Property accessors are not being used as they'd require to define a
2779
+ // private WeakMap storage which may cause memory leaks in browsers that
2780
+ // don't support this type of collections.
2781
+ defineConfigurable(this, { target: target, contentRect: contentRect });
2782
+ }
2783
+ return ResizeObserverEntry;
2784
+ }());
2785
+
2786
+ var ResizeObserverSPI = /** @class */ (function () {
2787
+ /**
2788
+ * Creates a new instance of ResizeObserver.
2789
+ *
2790
+ * @param {ResizeObserverCallback} callback - Callback function that is invoked
2791
+ * when one of the observed elements changes it's content dimensions.
2792
+ * @param {ResizeObserverController} controller - Controller instance which
2793
+ * is responsible for the updates of observer.
2794
+ * @param {ResizeObserver} callbackCtx - Reference to the public
2795
+ * ResizeObserver instance which will be passed to callback function.
2796
+ */
2797
+ function ResizeObserverSPI(callback, controller, callbackCtx) {
2798
+ /**
2799
+ * Collection of resize observations that have detected changes in dimensions
2800
+ * of elements.
2801
+ *
2802
+ * @private {Array<ResizeObservation>}
2803
+ */
2804
+ this.activeObservations_ = [];
2805
+ /**
2806
+ * Registry of the ResizeObservation instances.
2807
+ *
2808
+ * @private {Map<Element, ResizeObservation>}
2809
+ */
2810
+ this.observations_ = new MapShim();
2811
+ if (typeof callback !== 'function') {
2812
+ throw new TypeError('The callback provided as parameter 1 is not a function.');
2813
+ }
2814
+ this.callback_ = callback;
2815
+ this.controller_ = controller;
2816
+ this.callbackCtx_ = callbackCtx;
2817
+ }
2818
+ /**
2819
+ * Starts observing provided element.
2820
+ *
2821
+ * @param {Element} target - Element to be observed.
2822
+ * @returns {void}
2823
+ */
2824
+ ResizeObserverSPI.prototype.observe = function (target) {
2825
+ if (!arguments.length) {
2826
+ throw new TypeError('1 argument required, but only 0 present.');
2827
+ }
2828
+ // Do nothing if current environment doesn't have the Element interface.
2829
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
2830
+ return;
2831
+ }
2832
+ if (!(target instanceof getWindowOf(target).Element)) {
2833
+ throw new TypeError('parameter 1 is not of type "Element".');
2834
+ }
2835
+ var observations = this.observations_;
2836
+ // Do nothing if element is already being observed.
2837
+ if (observations.has(target)) {
2838
+ return;
2839
+ }
2840
+ observations.set(target, new ResizeObservation(target));
2841
+ this.controller_.addObserver(this);
2842
+ // Force the update of observations.
2843
+ this.controller_.refresh();
2844
+ };
2845
+ /**
2846
+ * Stops observing provided element.
2847
+ *
2848
+ * @param {Element} target - Element to stop observing.
2849
+ * @returns {void}
2850
+ */
2851
+ ResizeObserverSPI.prototype.unobserve = function (target) {
2852
+ if (!arguments.length) {
2853
+ throw new TypeError('1 argument required, but only 0 present.');
2854
+ }
2855
+ // Do nothing if current environment doesn't have the Element interface.
2856
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
2857
+ return;
2858
+ }
2859
+ if (!(target instanceof getWindowOf(target).Element)) {
2860
+ throw new TypeError('parameter 1 is not of type "Element".');
2861
+ }
2862
+ var observations = this.observations_;
2863
+ // Do nothing if element is not being observed.
2864
+ if (!observations.has(target)) {
2865
+ return;
2866
+ }
2867
+ observations.delete(target);
2868
+ if (!observations.size) {
2869
+ this.controller_.removeObserver(this);
2870
+ }
2871
+ };
2872
+ /**
2873
+ * Stops observing all elements.
2874
+ *
2875
+ * @returns {void}
2876
+ */
2877
+ ResizeObserverSPI.prototype.disconnect = function () {
2878
+ this.clearActive();
2879
+ this.observations_.clear();
2880
+ this.controller_.removeObserver(this);
2881
+ };
2882
+ /**
2883
+ * Collects observation instances the associated element of which has changed
2884
+ * it's content rectangle.
2885
+ *
2886
+ * @returns {void}
2887
+ */
2888
+ ResizeObserverSPI.prototype.gatherActive = function () {
2889
+ var _this = this;
2890
+ this.clearActive();
2891
+ this.observations_.forEach(function (observation) {
2892
+ if (observation.isActive()) {
2893
+ _this.activeObservations_.push(observation);
2894
+ }
2895
+ });
2896
+ };
2897
+ /**
2898
+ * Invokes initial callback function with a list of ResizeObserverEntry
2899
+ * instances collected from active resize observations.
2900
+ *
2901
+ * @returns {void}
2902
+ */
2903
+ ResizeObserverSPI.prototype.broadcastActive = function () {
2904
+ // Do nothing if observer doesn't have active observations.
2905
+ if (!this.hasActive()) {
2906
+ return;
2907
+ }
2908
+ var ctx = this.callbackCtx_;
2909
+ // Create ResizeObserverEntry instance for every active observation.
2910
+ var entries = this.activeObservations_.map(function (observation) {
2911
+ return new ResizeObserverEntry(observation.target, observation.broadcastRect());
2912
+ });
2913
+ this.callback_.call(ctx, entries, ctx);
2914
+ this.clearActive();
2915
+ };
2916
+ /**
2917
+ * Clears the collection of active observations.
2918
+ *
2919
+ * @returns {void}
2920
+ */
2921
+ ResizeObserverSPI.prototype.clearActive = function () {
2922
+ this.activeObservations_.splice(0);
2923
+ };
2924
+ /**
2925
+ * Tells whether observer has active observations.
2926
+ *
2927
+ * @returns {boolean}
2928
+ */
2929
+ ResizeObserverSPI.prototype.hasActive = function () {
2930
+ return this.activeObservations_.length > 0;
2931
+ };
2932
+ return ResizeObserverSPI;
2933
+ }());
2934
+
2935
+ // Registry of internal observers. If WeakMap is not available use current shim
2936
+ // for the Map collection as it has all required methods and because WeakMap
2937
+ // can't be fully polyfilled anyway.
2938
+ var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
2939
+ /**
2940
+ * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
2941
+ * exposing only those methods and properties that are defined in the spec.
2942
+ */
2943
+ var ResizeObserver = /** @class */ (function () {
2944
+ /**
2945
+ * Creates a new instance of ResizeObserver.
2946
+ *
2947
+ * @param {ResizeObserverCallback} callback - Callback that is invoked when
2948
+ * dimensions of the observed elements change.
2949
+ */
2950
+ function ResizeObserver(callback) {
2951
+ if (!(this instanceof ResizeObserver)) {
2952
+ throw new TypeError('Cannot call a class as a function.');
2953
+ }
2954
+ if (!arguments.length) {
2955
+ throw new TypeError('1 argument required, but only 0 present.');
2956
+ }
2957
+ var controller = ResizeObserverController.getInstance();
2958
+ var observer = new ResizeObserverSPI(callback, controller, this);
2959
+ observers.set(this, observer);
2960
+ }
2961
+ return ResizeObserver;
2962
+ }());
2963
+ // Expose public methods of ResizeObserver.
2964
+ [
2965
+ 'observe',
2966
+ 'unobserve',
2967
+ 'disconnect'
2968
+ ].forEach(function (method) {
2969
+ ResizeObserver.prototype[method] = function () {
2970
+ var _a;
2971
+ return (_a = observers.get(this))[method].apply(_a, arguments);
2972
+ };
2973
+ });
2974
+
2975
+ var index = (function () {
2976
+ // Export existing implementation if available.
2977
+ if (typeof global$1.ResizeObserver !== 'undefined') {
2978
+ return global$1.ResizeObserver;
2979
+ }
2980
+ return ResizeObserver;
2981
+ })();
2982
+
2983
+ var ResizeObserver_es = /*#__PURE__*/Object.freeze({
2984
+ __proto__: null,
2985
+ 'default': index
2986
+ });
2987
+
2988
+ var require$$8 = /*@__PURE__*/getAugmentedNamespace(ResizeObserver_es);
2989
+
2990
+ Object.defineProperty(innerSlider, "__esModule", {
2991
+ value: true
2992
+ });
2993
+ innerSlider.InnerSlider = void 0;
2994
+
2995
+ var _react = _interopRequireDefault(React__default);
2996
+
2997
+ var _initialState = _interopRequireDefault(initialState);
2998
+
2999
+ var _lodash = _interopRequireDefault(lodash_debounce);
3000
+
3001
+ var _classnames = _interopRequireDefault(classnames.exports);
3002
+
3003
+ var _innerSliderUtils = innerSliderUtils;
3004
+
3005
+ var _track = track;
3006
+
3007
+ var _dots = dots;
3008
+
3009
+ var _arrows = arrows;
3010
+
3011
+ var _resizeObserverPolyfill = _interopRequireDefault(require$$8);
3012
+
3013
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3014
+
3015
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3016
+
3017
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3018
+
3019
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3020
+
3021
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
3022
+
3023
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
3024
+
3025
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
3026
+
3027
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3028
+
3029
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3030
+
3031
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
3032
+
3033
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
3034
+
3035
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
3036
+
3037
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3038
+
3039
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3040
+
3041
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3042
+
3043
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3044
+
3045
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3046
+
3047
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3048
+
3049
+ var InnerSlider = /*#__PURE__*/function (_React$Component) {
3050
+ _inherits(InnerSlider, _React$Component);
3051
+
3052
+ var _super = _createSuper(InnerSlider);
3053
+
3054
+ function InnerSlider(props) {
3055
+ var _this;
3056
+
3057
+ _classCallCheck(this, InnerSlider);
3058
+
3059
+ _this = _super.call(this, props);
3060
+
3061
+ _defineProperty(_assertThisInitialized(_this), "listRefHandler", function (ref) {
3062
+ return _this.list = ref;
3063
+ });
3064
+
3065
+ _defineProperty(_assertThisInitialized(_this), "trackRefHandler", function (ref) {
3066
+ return _this.track = ref;
3067
+ });
3068
+
3069
+ _defineProperty(_assertThisInitialized(_this), "adaptHeight", function () {
3070
+ if (_this.props.adaptiveHeight && _this.list) {
3071
+ var elem = _this.list.querySelector("[data-index=\"".concat(_this.state.currentSlide, "\"]"));
3072
+
3073
+ _this.list.style.height = (0, _innerSliderUtils.getHeight)(elem) + "px";
3074
+ }
3075
+ });
3076
+
3077
+ _defineProperty(_assertThisInitialized(_this), "componentDidMount", function () {
3078
+ _this.props.onInit && _this.props.onInit();
3079
+
3080
+ if (_this.props.lazyLoad) {
3081
+ var slidesToLoad = (0, _innerSliderUtils.getOnDemandLazySlides)(_objectSpread(_objectSpread({}, _this.props), _this.state));
3082
+
3083
+ if (slidesToLoad.length > 0) {
3084
+ _this.setState(function (prevState) {
3085
+ return {
3086
+ lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
3087
+ };
3088
+ });
3089
+
3090
+ if (_this.props.onLazyLoad) {
3091
+ _this.props.onLazyLoad(slidesToLoad);
3092
+ }
3093
+ }
3094
+ }
3095
+
3096
+ var spec = _objectSpread({
3097
+ listRef: _this.list,
3098
+ trackRef: _this.track
3099
+ }, _this.props);
3100
+
3101
+ _this.updateState(spec, true, function () {
3102
+ _this.adaptHeight();
3103
+
3104
+ _this.props.autoplay && _this.autoPlay("update");
3105
+ });
3106
+
3107
+ if (_this.props.lazyLoad === "progressive") {
3108
+ _this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1000);
3109
+ }
3110
+
3111
+ _this.ro = new _resizeObserverPolyfill["default"](function () {
3112
+ if (_this.state.animating) {
3113
+ _this.onWindowResized(false); // don't set trackStyle hence don't break animation
3114
+
3115
+
3116
+ _this.callbackTimers.push(setTimeout(function () {
3117
+ return _this.onWindowResized();
3118
+ }, _this.props.speed));
3119
+ } else {
3120
+ _this.onWindowResized();
3121
+ }
3122
+ });
3123
+
3124
+ _this.ro.observe(_this.list);
3125
+
3126
+ document.querySelectorAll && Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"), function (slide) {
3127
+ slide.onfocus = _this.props.pauseOnFocus ? _this.onSlideFocus : null;
3128
+ slide.onblur = _this.props.pauseOnFocus ? _this.onSlideBlur : null;
3129
+ });
3130
+
3131
+ if (window.addEventListener) {
3132
+ window.addEventListener("resize", _this.onWindowResized);
3133
+ } else {
3134
+ window.attachEvent("onresize", _this.onWindowResized);
3135
+ }
3136
+ });
3137
+
3138
+ _defineProperty(_assertThisInitialized(_this), "componentWillUnmount", function () {
3139
+ if (_this.animationEndCallback) {
3140
+ clearTimeout(_this.animationEndCallback);
3141
+ }
3142
+
3143
+ if (_this.lazyLoadTimer) {
3144
+ clearInterval(_this.lazyLoadTimer);
3145
+ }
3146
+
3147
+ if (_this.callbackTimers.length) {
3148
+ _this.callbackTimers.forEach(function (timer) {
3149
+ return clearTimeout(timer);
3150
+ });
3151
+
3152
+ _this.callbackTimers = [];
3153
+ }
3154
+
3155
+ if (window.addEventListener) {
3156
+ window.removeEventListener("resize", _this.onWindowResized);
3157
+ } else {
3158
+ window.detachEvent("onresize", _this.onWindowResized);
3159
+ }
3160
+
3161
+ if (_this.autoplayTimer) {
3162
+ clearInterval(_this.autoplayTimer);
3163
+ }
3164
+
3165
+ _this.ro.disconnect();
3166
+ });
3167
+
3168
+ _defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (prevProps) {
3169
+ _this.checkImagesLoad();
3170
+
3171
+ _this.props.onReInit && _this.props.onReInit();
3172
+
3173
+ if (_this.props.lazyLoad) {
3174
+ var slidesToLoad = (0, _innerSliderUtils.getOnDemandLazySlides)(_objectSpread(_objectSpread({}, _this.props), _this.state));
3175
+
3176
+ if (slidesToLoad.length > 0) {
3177
+ _this.setState(function (prevState) {
3178
+ return {
3179
+ lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)
3180
+ };
3181
+ });
3182
+
3183
+ if (_this.props.onLazyLoad) {
3184
+ _this.props.onLazyLoad(slidesToLoad);
3185
+ }
3186
+ }
3187
+ } // if (this.props.onLazyLoad) {
3188
+ // this.props.onLazyLoad([leftMostSlide])
3189
+ // }
3190
+
3191
+
3192
+ _this.adaptHeight();
3193
+
3194
+ var spec = _objectSpread(_objectSpread({
3195
+ listRef: _this.list,
3196
+ trackRef: _this.track
3197
+ }, _this.props), _this.state);
3198
+
3199
+ var setTrackStyle = _this.didPropsChange(prevProps);
3200
+
3201
+ setTrackStyle && _this.updateState(spec, setTrackStyle, function () {
3202
+ if (_this.state.currentSlide >= _react["default"].Children.count(_this.props.children)) {
3203
+ _this.changeSlide({
3204
+ message: "index",
3205
+ index: _react["default"].Children.count(_this.props.children) - _this.props.slidesToShow,
3206
+ currentSlide: _this.state.currentSlide
3207
+ });
3208
+ }
3209
+
3210
+ if (_this.props.autoplay) {
3211
+ _this.autoPlay("update");
3212
+ } else {
3213
+ _this.pause("paused");
3214
+ }
3215
+ });
3216
+ });
3217
+
3218
+ _defineProperty(_assertThisInitialized(_this), "onWindowResized", function (setTrackStyle) {
3219
+ if (_this.debouncedResize) _this.debouncedResize.cancel();
3220
+ _this.debouncedResize = (0, _lodash["default"])(function () {
3221
+ return _this.resizeWindow(setTrackStyle);
3222
+ }, 50);
3223
+
3224
+ _this.debouncedResize();
3225
+ });
3226
+
3227
+ _defineProperty(_assertThisInitialized(_this), "resizeWindow", function () {
3228
+ var setTrackStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
3229
+ var isTrackMounted = Boolean(_this.track && _this.track.node); // prevent warning: setting state on unmounted component (server side rendering)
3230
+
3231
+ if (!isTrackMounted) return;
3232
+
3233
+ var spec = _objectSpread(_objectSpread({
3234
+ listRef: _this.list,
3235
+ trackRef: _this.track
3236
+ }, _this.props), _this.state);
3237
+
3238
+ _this.updateState(spec, setTrackStyle, function () {
3239
+ if (_this.props.autoplay) _this.autoPlay("update");else _this.pause("paused");
3240
+ }); // animating state should be cleared while resizing, otherwise autoplay stops working
3241
+
3242
+
3243
+ _this.setState({
3244
+ animating: false
3245
+ });
3246
+
3247
+ clearTimeout(_this.animationEndCallback);
3248
+ delete _this.animationEndCallback;
3249
+ });
3250
+
3251
+ _defineProperty(_assertThisInitialized(_this), "updateState", function (spec, setTrackStyle, callback) {
3252
+ var updatedState = (0, _innerSliderUtils.initializedState)(spec);
3253
+ spec = _objectSpread(_objectSpread(_objectSpread({}, spec), updatedState), {}, {
3254
+ slideIndex: updatedState.currentSlide
3255
+ });
3256
+ var targetLeft = (0, _innerSliderUtils.getTrackLeft)(spec);
3257
+ spec = _objectSpread(_objectSpread({}, spec), {}, {
3258
+ left: targetLeft
3259
+ });
3260
+ var trackStyle = (0, _innerSliderUtils.getTrackCSS)(spec);
3261
+
3262
+ if (setTrackStyle || _react["default"].Children.count(_this.props.children) !== _react["default"].Children.count(spec.children)) {
3263
+ updatedState["trackStyle"] = trackStyle;
3264
+ }
3265
+
3266
+ _this.setState(updatedState, callback);
3267
+ });
3268
+
3269
+ _defineProperty(_assertThisInitialized(_this), "ssrInit", function () {
3270
+ if (_this.props.variableWidth) {
3271
+ var _trackWidth = 0,
3272
+ _trackLeft = 0;
3273
+ var childrenWidths = [];
3274
+ var preClones = (0, _innerSliderUtils.getPreClones)(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
3275
+ slideCount: _this.props.children.length
3276
+ }));
3277
+ var postClones = (0, _innerSliderUtils.getPostClones)(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
3278
+ slideCount: _this.props.children.length
3279
+ }));
3280
+
3281
+ _this.props.children.forEach(function (child) {
3282
+ childrenWidths.push(child.props.style.width);
3283
+ _trackWidth += child.props.style.width;
3284
+ });
3285
+
3286
+ for (var i = 0; i < preClones; i++) {
3287
+ _trackLeft += childrenWidths[childrenWidths.length - 1 - i];
3288
+ _trackWidth += childrenWidths[childrenWidths.length - 1 - i];
3289
+ }
3290
+
3291
+ for (var _i = 0; _i < postClones; _i++) {
3292
+ _trackWidth += childrenWidths[_i];
3293
+ }
3294
+
3295
+ for (var _i2 = 0; _i2 < _this.state.currentSlide; _i2++) {
3296
+ _trackLeft += childrenWidths[_i2];
3297
+ }
3298
+
3299
+ var _trackStyle = {
3300
+ width: _trackWidth + "px",
3301
+ left: -_trackLeft + "px"
3302
+ };
3303
+
3304
+ if (_this.props.centerMode) {
3305
+ var currentWidth = "".concat(childrenWidths[_this.state.currentSlide], "px");
3306
+ _trackStyle.left = "calc(".concat(_trackStyle.left, " + (100% - ").concat(currentWidth, ") / 2 ) ");
3307
+ }
3308
+
3309
+ return {
3310
+ trackStyle: _trackStyle
3311
+ };
3312
+ }
3313
+
3314
+ var childrenCount = _react["default"].Children.count(_this.props.children);
3315
+
3316
+ var spec = _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
3317
+ slideCount: childrenCount
3318
+ });
3319
+
3320
+ var slideCount = (0, _innerSliderUtils.getPreClones)(spec) + (0, _innerSliderUtils.getPostClones)(spec) + childrenCount;
3321
+ var trackWidth = 100 / _this.props.slidesToShow * slideCount;
3322
+ var slideWidth = 100 / slideCount;
3323
+ var trackLeft = -slideWidth * ((0, _innerSliderUtils.getPreClones)(spec) + _this.state.currentSlide) * trackWidth / 100;
3324
+
3325
+ if (_this.props.centerMode) {
3326
+ trackLeft += (100 - slideWidth * trackWidth / 100) / 2;
3327
+ }
3328
+
3329
+ var trackStyle = {
3330
+ width: trackWidth + "%",
3331
+ left: trackLeft + "%"
3332
+ };
3333
+ return {
3334
+ slideWidth: slideWidth + "%",
3335
+ trackStyle: trackStyle
3336
+ };
3337
+ });
3338
+
3339
+ _defineProperty(_assertThisInitialized(_this), "checkImagesLoad", function () {
3340
+ var images = _this.list && _this.list.querySelectorAll && _this.list.querySelectorAll(".slick-slide img") || [];
3341
+ var imagesCount = images.length,
3342
+ loadedCount = 0;
3343
+ Array.prototype.forEach.call(images, function (image) {
3344
+ var handler = function handler() {
3345
+ return ++loadedCount && loadedCount >= imagesCount && _this.onWindowResized();
3346
+ };
3347
+
3348
+ if (!image.onclick) {
3349
+ image.onclick = function () {
3350
+ return image.parentNode.focus();
3351
+ };
3352
+ } else {
3353
+ var prevClickHandler = image.onclick;
3354
+
3355
+ image.onclick = function () {
3356
+ prevClickHandler();
3357
+ image.parentNode.focus();
3358
+ };
3359
+ }
3360
+
3361
+ if (!image.onload) {
3362
+ if (_this.props.lazyLoad) {
3363
+ image.onload = function () {
3364
+ _this.adaptHeight();
3365
+
3366
+ _this.callbackTimers.push(setTimeout(_this.onWindowResized, _this.props.speed));
3367
+ };
3368
+ } else {
3369
+ image.onload = handler;
3370
+
3371
+ image.onerror = function () {
3372
+ handler();
3373
+ _this.props.onLazyLoadError && _this.props.onLazyLoadError();
3374
+ };
3375
+ }
3376
+ }
3377
+ });
3378
+ });
3379
+
3380
+ _defineProperty(_assertThisInitialized(_this), "progressiveLazyLoad", function () {
3381
+ var slidesToLoad = [];
3382
+
3383
+ var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);
3384
+
3385
+ for (var index = _this.state.currentSlide; index < _this.state.slideCount + (0, _innerSliderUtils.getPostClones)(spec); index++) {
3386
+ if (_this.state.lazyLoadedList.indexOf(index) < 0) {
3387
+ slidesToLoad.push(index);
3388
+ break;
3389
+ }
3390
+ }
3391
+
3392
+ for (var _index = _this.state.currentSlide - 1; _index >= -(0, _innerSliderUtils.getPreClones)(spec); _index--) {
3393
+ if (_this.state.lazyLoadedList.indexOf(_index) < 0) {
3394
+ slidesToLoad.push(_index);
3395
+ break;
3396
+ }
3397
+ }
3398
+
3399
+ if (slidesToLoad.length > 0) {
3400
+ _this.setState(function (state) {
3401
+ return {
3402
+ lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad)
3403
+ };
3404
+ });
3405
+
3406
+ if (_this.props.onLazyLoad) {
3407
+ _this.props.onLazyLoad(slidesToLoad);
3408
+ }
3409
+ } else {
3410
+ if (_this.lazyLoadTimer) {
3411
+ clearInterval(_this.lazyLoadTimer);
3412
+ delete _this.lazyLoadTimer;
3413
+ }
3414
+ }
3415
+ });
3416
+
3417
+ _defineProperty(_assertThisInitialized(_this), "slideHandler", function (index) {
3418
+ var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3419
+ var _this$props = _this.props,
3420
+ asNavFor = _this$props.asNavFor,
3421
+ beforeChange = _this$props.beforeChange,
3422
+ onLazyLoad = _this$props.onLazyLoad,
3423
+ speed = _this$props.speed,
3424
+ afterChange = _this$props.afterChange; // capture currentslide before state is updated
3425
+
3426
+ var currentSlide = _this.state.currentSlide;
3427
+
3428
+ var _slideHandler = (0, _innerSliderUtils.slideHandler)(_objectSpread(_objectSpread(_objectSpread({
3429
+ index: index
3430
+ }, _this.props), _this.state), {}, {
3431
+ trackRef: _this.track,
3432
+ useCSS: _this.props.useCSS && !dontAnimate
3433
+ })),
3434
+ state = _slideHandler.state,
3435
+ nextState = _slideHandler.nextState;
3436
+
3437
+ if (!state) return;
3438
+ beforeChange && beforeChange(currentSlide, state.currentSlide);
3439
+ var slidesToLoad = state.lazyLoadedList.filter(function (value) {
3440
+ return _this.state.lazyLoadedList.indexOf(value) < 0;
3441
+ });
3442
+ onLazyLoad && slidesToLoad.length > 0 && onLazyLoad(slidesToLoad);
3443
+
3444
+ if (!_this.props.waitForAnimate && _this.animationEndCallback) {
3445
+ clearTimeout(_this.animationEndCallback);
3446
+ afterChange && afterChange(currentSlide);
3447
+ delete _this.animationEndCallback;
3448
+ }
3449
+
3450
+ _this.setState(state, function () {
3451
+ // asNavForIndex check is to avoid recursive calls of slideHandler in waitForAnimate=false mode
3452
+ if (asNavFor && _this.asNavForIndex !== index) {
3453
+ _this.asNavForIndex = index;
3454
+ asNavFor.innerSlider.slideHandler(index);
3455
+ }
3456
+
3457
+ if (!nextState) return;
3458
+ _this.animationEndCallback = setTimeout(function () {
3459
+ var animating = nextState.animating,
3460
+ firstBatch = _objectWithoutProperties(nextState, ["animating"]);
3461
+
3462
+ _this.setState(firstBatch, function () {
3463
+ _this.callbackTimers.push(setTimeout(function () {
3464
+ return _this.setState({
3465
+ animating: animating
3466
+ });
3467
+ }, 10));
3468
+
3469
+ afterChange && afterChange(state.currentSlide);
3470
+ delete _this.animationEndCallback;
3471
+ });
3472
+ }, speed);
3473
+ });
3474
+ });
3475
+
3476
+ _defineProperty(_assertThisInitialized(_this), "changeSlide", function (options) {
3477
+ var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3478
+
3479
+ var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);
3480
+
3481
+ var targetSlide = (0, _innerSliderUtils.changeSlide)(spec, options);
3482
+ if (targetSlide !== 0 && !targetSlide) return;
3483
+
3484
+ if (dontAnimate === true) {
3485
+ _this.slideHandler(targetSlide, dontAnimate);
3486
+ } else {
3487
+ _this.slideHandler(targetSlide);
3488
+ }
3489
+
3490
+ _this.props.autoplay && _this.autoPlay("update");
3491
+
3492
+ if (_this.props.focusOnSelect) {
3493
+ var nodes = _this.list.querySelectorAll(".slick-current");
3494
+
3495
+ nodes[0] && nodes[0].focus();
3496
+ }
3497
+ });
3498
+
3499
+ _defineProperty(_assertThisInitialized(_this), "clickHandler", function (e) {
3500
+ if (_this.clickable === false) {
3501
+ e.stopPropagation();
3502
+ e.preventDefault();
3503
+ }
3504
+
3505
+ _this.clickable = true;
3506
+ });
3507
+
3508
+ _defineProperty(_assertThisInitialized(_this), "keyHandler", function (e) {
3509
+ var dir = (0, _innerSliderUtils.keyHandler)(e, _this.props.accessibility, _this.props.rtl);
3510
+ dir !== "" && _this.changeSlide({
3511
+ message: dir
3512
+ });
3513
+ });
3514
+
3515
+ _defineProperty(_assertThisInitialized(_this), "selectHandler", function (options) {
3516
+ _this.changeSlide(options);
3517
+ });
3518
+
3519
+ _defineProperty(_assertThisInitialized(_this), "disableBodyScroll", function () {
3520
+ var preventDefault = function preventDefault(e) {
3521
+ e = e || window.event;
3522
+ if (e.preventDefault) e.preventDefault();
3523
+ e.returnValue = false;
3524
+ };
3525
+
3526
+ window.ontouchmove = preventDefault;
3527
+ });
3528
+
3529
+ _defineProperty(_assertThisInitialized(_this), "enableBodyScroll", function () {
3530
+ window.ontouchmove = null;
3531
+ });
3532
+
3533
+ _defineProperty(_assertThisInitialized(_this), "swipeStart", function (e) {
3534
+ if (_this.props.verticalSwiping) {
3535
+ _this.disableBodyScroll();
3536
+ }
3537
+
3538
+ var state = (0, _innerSliderUtils.swipeStart)(e, _this.props.swipe, _this.props.draggable);
3539
+ state !== "" && _this.setState(state);
3540
+ });
3541
+
3542
+ _defineProperty(_assertThisInitialized(_this), "swipeMove", function (e) {
3543
+ var state = (0, _innerSliderUtils.swipeMove)(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
3544
+ trackRef: _this.track,
3545
+ listRef: _this.list,
3546
+ slideIndex: _this.state.currentSlide
3547
+ }));
3548
+ if (!state) return;
3549
+
3550
+ if (state["swiping"]) {
3551
+ _this.clickable = false;
3552
+ }
3553
+
3554
+ _this.setState(state);
3555
+ });
3556
+
3557
+ _defineProperty(_assertThisInitialized(_this), "swipeEnd", function (e) {
3558
+ var state = (0, _innerSliderUtils.swipeEnd)(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {
3559
+ trackRef: _this.track,
3560
+ listRef: _this.list,
3561
+ slideIndex: _this.state.currentSlide
3562
+ }));
3563
+ if (!state) return;
3564
+ var triggerSlideHandler = state["triggerSlideHandler"];
3565
+ delete state["triggerSlideHandler"];
3566
+
3567
+ _this.setState(state);
3568
+
3569
+ if (triggerSlideHandler === undefined) return;
3570
+
3571
+ _this.slideHandler(triggerSlideHandler);
3572
+
3573
+ if (_this.props.verticalSwiping) {
3574
+ _this.enableBodyScroll();
3575
+ }
3576
+ });
3577
+
3578
+ _defineProperty(_assertThisInitialized(_this), "touchEnd", function (e) {
3579
+ _this.swipeEnd(e);
3580
+
3581
+ _this.clickable = true;
3582
+ });
3583
+
3584
+ _defineProperty(_assertThisInitialized(_this), "slickPrev", function () {
3585
+ // this and fellow methods are wrapped in setTimeout
3586
+ // to make sure initialize setState has happened before
3587
+ // any of such methods are called
3588
+ _this.callbackTimers.push(setTimeout(function () {
3589
+ return _this.changeSlide({
3590
+ message: "previous"
3591
+ });
3592
+ }, 0));
3593
+ });
3594
+
3595
+ _defineProperty(_assertThisInitialized(_this), "slickNext", function () {
3596
+ _this.callbackTimers.push(setTimeout(function () {
3597
+ return _this.changeSlide({
3598
+ message: "next"
3599
+ });
3600
+ }, 0));
3601
+ });
3602
+
3603
+ _defineProperty(_assertThisInitialized(_this), "slickGoTo", function (slide) {
3604
+ var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
3605
+ slide = Number(slide);
3606
+ if (isNaN(slide)) return "";
3607
+
3608
+ _this.callbackTimers.push(setTimeout(function () {
3609
+ return _this.changeSlide({
3610
+ message: "index",
3611
+ index: slide,
3612
+ currentSlide: _this.state.currentSlide
3613
+ }, dontAnimate);
3614
+ }, 0));
3615
+ });
3616
+
3617
+ _defineProperty(_assertThisInitialized(_this), "play", function () {
3618
+ var nextIndex;
3619
+
3620
+ if (_this.props.rtl) {
3621
+ nextIndex = _this.state.currentSlide - _this.props.slidesToScroll;
3622
+ } else {
3623
+ if ((0, _innerSliderUtils.canGoNext)(_objectSpread(_objectSpread({}, _this.props), _this.state))) {
3624
+ nextIndex = _this.state.currentSlide + _this.props.slidesToScroll;
3625
+ } else {
3626
+ return false;
3627
+ }
3628
+ }
3629
+
3630
+ _this.slideHandler(nextIndex);
3631
+ });
3632
+
3633
+ _defineProperty(_assertThisInitialized(_this), "autoPlay", function (playType) {
3634
+ if (_this.autoplayTimer) {
3635
+ clearInterval(_this.autoplayTimer);
3636
+ }
3637
+
3638
+ var autoplaying = _this.state.autoplaying;
3639
+
3640
+ if (playType === "update") {
3641
+ if (autoplaying === "hovered" || autoplaying === "focused" || autoplaying === "paused") {
3642
+ return;
3643
+ }
3644
+ } else if (playType === "leave") {
3645
+ if (autoplaying === "paused" || autoplaying === "focused") {
3646
+ return;
3647
+ }
3648
+ } else if (playType === "blur") {
3649
+ if (autoplaying === "paused" || autoplaying === "hovered") {
3650
+ return;
3651
+ }
3652
+ }
3653
+
3654
+ _this.autoplayTimer = setInterval(_this.play, _this.props.autoplaySpeed + 50);
3655
+
3656
+ _this.setState({
3657
+ autoplaying: "playing"
3658
+ });
3659
+ });
3660
+
3661
+ _defineProperty(_assertThisInitialized(_this), "pause", function (pauseType) {
3662
+ if (_this.autoplayTimer) {
3663
+ clearInterval(_this.autoplayTimer);
3664
+ _this.autoplayTimer = null;
3665
+ }
3666
+
3667
+ var autoplaying = _this.state.autoplaying;
3668
+
3669
+ if (pauseType === "paused") {
3670
+ _this.setState({
3671
+ autoplaying: "paused"
3672
+ });
3673
+ } else if (pauseType === "focused") {
3674
+ if (autoplaying === "hovered" || autoplaying === "playing") {
3675
+ _this.setState({
3676
+ autoplaying: "focused"
3677
+ });
3678
+ }
3679
+ } else {
3680
+ // pauseType is 'hovered'
3681
+ if (autoplaying === "playing") {
3682
+ _this.setState({
3683
+ autoplaying: "hovered"
3684
+ });
3685
+ }
3686
+ }
3687
+ });
3688
+
3689
+ _defineProperty(_assertThisInitialized(_this), "onDotsOver", function () {
3690
+ return _this.props.autoplay && _this.pause("hovered");
3691
+ });
3692
+
3693
+ _defineProperty(_assertThisInitialized(_this), "onDotsLeave", function () {
3694
+ return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
3695
+ });
3696
+
3697
+ _defineProperty(_assertThisInitialized(_this), "onTrackOver", function () {
3698
+ return _this.props.autoplay && _this.pause("hovered");
3699
+ });
3700
+
3701
+ _defineProperty(_assertThisInitialized(_this), "onTrackLeave", function () {
3702
+ return _this.props.autoplay && _this.state.autoplaying === "hovered" && _this.autoPlay("leave");
3703
+ });
3704
+
3705
+ _defineProperty(_assertThisInitialized(_this), "onSlideFocus", function () {
3706
+ return _this.props.autoplay && _this.pause("focused");
3707
+ });
3708
+
3709
+ _defineProperty(_assertThisInitialized(_this), "onSlideBlur", function () {
3710
+ return _this.props.autoplay && _this.state.autoplaying === "focused" && _this.autoPlay("blur");
3711
+ });
3712
+
3713
+ _defineProperty(_assertThisInitialized(_this), "render", function () {
3714
+ var className = (0, _classnames["default"])("slick-slider", _this.props.className, {
3715
+ "slick-vertical": _this.props.vertical,
3716
+ "slick-initialized": true
3717
+ });
3718
+
3719
+ var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);
3720
+
3721
+ var trackProps = (0, _innerSliderUtils.extractObject)(spec, ["fade", "cssEase", "speed", "infinite", "centerMode", "focusOnSelect", "currentSlide", "lazyLoad", "lazyLoadedList", "rtl", "slideWidth", "slideHeight", "listHeight", "vertical", "slidesToShow", "slidesToScroll", "slideCount", "trackStyle", "variableWidth", "unslick", "centerPadding", "targetSlide", "useCSS"]);
3722
+ var pauseOnHover = _this.props.pauseOnHover;
3723
+ trackProps = _objectSpread(_objectSpread({}, trackProps), {}, {
3724
+ onMouseEnter: pauseOnHover ? _this.onTrackOver : null,
3725
+ onMouseLeave: pauseOnHover ? _this.onTrackLeave : null,
3726
+ onMouseOver: pauseOnHover ? _this.onTrackOver : null,
3727
+ focusOnSelect: _this.props.focusOnSelect && _this.clickable ? _this.selectHandler : null
3728
+ });
3729
+ var dots;
3730
+
3731
+ if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) {
3732
+ var dotProps = (0, _innerSliderUtils.extractObject)(spec, ["dotsClass", "slideCount", "slidesToShow", "currentSlide", "slidesToScroll", "clickHandler", "children", "customPaging", "infinite", "appendDots"]);
3733
+ var pauseOnDotsHover = _this.props.pauseOnDotsHover;
3734
+ dotProps = _objectSpread(_objectSpread({}, dotProps), {}, {
3735
+ clickHandler: _this.changeSlide,
3736
+ onMouseEnter: pauseOnDotsHover ? _this.onDotsLeave : null,
3737
+ onMouseOver: pauseOnDotsHover ? _this.onDotsOver : null,
3738
+ onMouseLeave: pauseOnDotsHover ? _this.onDotsLeave : null
3739
+ });
3740
+ dots = /*#__PURE__*/_react["default"].createElement(_dots.Dots, dotProps);
3741
+ }
3742
+
3743
+ var prevArrow, nextArrow;
3744
+ var arrowProps = (0, _innerSliderUtils.extractObject)(spec, ["infinite", "centerMode", "currentSlide", "slideCount", "slidesToShow", "prevArrow", "nextArrow"]);
3745
+ arrowProps.clickHandler = _this.changeSlide;
3746
+
3747
+ if (_this.props.arrows) {
3748
+ prevArrow = /*#__PURE__*/_react["default"].createElement(_arrows.PrevArrow, arrowProps);
3749
+ nextArrow = /*#__PURE__*/_react["default"].createElement(_arrows.NextArrow, arrowProps);
3750
+ }
3751
+
3752
+ var verticalHeightStyle = null;
3753
+
3754
+ if (_this.props.vertical) {
3755
+ verticalHeightStyle = {
3756
+ height: _this.state.listHeight
3757
+ };
3758
+ }
3759
+
3760
+ var centerPaddingStyle = null;
3761
+
3762
+ if (_this.props.vertical === false) {
3763
+ if (_this.props.centerMode === true) {
3764
+ centerPaddingStyle = {
3765
+ padding: "0px " + _this.props.centerPadding
3766
+ };
3767
+ }
3768
+ } else {
3769
+ if (_this.props.centerMode === true) {
3770
+ centerPaddingStyle = {
3771
+ padding: _this.props.centerPadding + " 0px"
3772
+ };
3773
+ }
3774
+ }
3775
+
3776
+ var listStyle = _objectSpread(_objectSpread({}, verticalHeightStyle), centerPaddingStyle);
3777
+
3778
+ var touchMove = _this.props.touchMove;
3779
+ var listProps = {
3780
+ className: "slick-list",
3781
+ style: listStyle,
3782
+ onClick: _this.clickHandler,
3783
+ onMouseDown: touchMove ? _this.swipeStart : null,
3784
+ onMouseMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
3785
+ onMouseUp: touchMove ? _this.swipeEnd : null,
3786
+ onMouseLeave: _this.state.dragging && touchMove ? _this.swipeEnd : null,
3787
+ onTouchStart: touchMove ? _this.swipeStart : null,
3788
+ onTouchMove: _this.state.dragging && touchMove ? _this.swipeMove : null,
3789
+ onTouchEnd: touchMove ? _this.touchEnd : null,
3790
+ onTouchCancel: _this.state.dragging && touchMove ? _this.swipeEnd : null,
3791
+ onKeyDown: _this.props.accessibility ? _this.keyHandler : null
3792
+ };
3793
+ var innerSliderProps = {
3794
+ className: className,
3795
+ dir: "ltr",
3796
+ style: _this.props.style
3797
+ };
3798
+
3799
+ if (_this.props.unslick) {
3800
+ listProps = {
3801
+ className: "slick-list"
3802
+ };
3803
+ innerSliderProps = {
3804
+ className: className
3805
+ };
3806
+ }
3807
+
3808
+ return /*#__PURE__*/_react["default"].createElement("div", innerSliderProps, !_this.props.unslick ? prevArrow : "", /*#__PURE__*/_react["default"].createElement("div", _extends({
3809
+ ref: _this.listRefHandler
3810
+ }, listProps), /*#__PURE__*/_react["default"].createElement(_track.Track, _extends({
3811
+ ref: _this.trackRefHandler
3812
+ }, trackProps), _this.props.children)), !_this.props.unslick ? nextArrow : "", !_this.props.unslick ? dots : "");
3813
+ });
3814
+
3815
+ _this.list = null;
3816
+ _this.track = null;
3817
+ _this.state = _objectSpread(_objectSpread({}, _initialState["default"]), {}, {
3818
+ currentSlide: _this.props.initialSlide,
3819
+ slideCount: _react["default"].Children.count(_this.props.children)
3820
+ });
3821
+ _this.callbackTimers = [];
3822
+ _this.clickable = true;
3823
+ _this.debouncedResize = null;
3824
+
3825
+ var ssrState = _this.ssrInit();
3826
+
3827
+ _this.state = _objectSpread(_objectSpread({}, _this.state), ssrState);
3828
+ return _this;
3829
+ }
3830
+
3831
+ _createClass(InnerSlider, [{
3832
+ key: "didPropsChange",
3833
+ value: function didPropsChange(prevProps) {
3834
+ var setTrackStyle = false;
3835
+
3836
+ for (var _i3 = 0, _Object$keys = Object.keys(this.props); _i3 < _Object$keys.length; _i3++) {
3837
+ var key = _Object$keys[_i3];
3838
+
3839
+ if (!prevProps.hasOwnProperty(key)) {
3840
+ setTrackStyle = true;
3841
+ break;
3842
+ }
3843
+
3844
+ if (_typeof(prevProps[key]) === "object" || typeof prevProps[key] === "function") {
3845
+ continue;
3846
+ }
3847
+
3848
+ if (prevProps[key] !== this.props[key]) {
3849
+ setTrackStyle = true;
3850
+ break;
3851
+ }
3852
+ }
3853
+
3854
+ return setTrackStyle || _react["default"].Children.count(this.props.children) !== _react["default"].Children.count(prevProps.children);
3855
+ }
3856
+ }]);
3857
+
3858
+ return InnerSlider;
3859
+ }(_react["default"].Component);
3860
+
3861
+ innerSlider.InnerSlider = InnerSlider;
3862
+
3863
+ var camel2hyphen$1 = function (str) {
3864
+ return str
3865
+ .replace(/[A-Z]/g, function (match) {
3866
+ return '-' + match.toLowerCase();
3867
+ })
3868
+ .toLowerCase();
3869
+ };
3870
+
3871
+ var camel2hyphen_1 = camel2hyphen$1;
3872
+
3873
+ var camel2hyphen = camel2hyphen_1;
3874
+
3875
+ var isDimension = function (feature) {
3876
+ var re = /[height|width]$/;
3877
+ return re.test(feature);
3878
+ };
3879
+
3880
+ var obj2mq = function (obj) {
3881
+ var mq = '';
3882
+ var features = Object.keys(obj);
3883
+ features.forEach(function (feature, index) {
3884
+ var value = obj[feature];
3885
+ feature = camel2hyphen(feature);
3886
+ // Add px to dimension features
3887
+ if (isDimension(feature) && typeof value === 'number') {
3888
+ value = value + 'px';
3889
+ }
3890
+ if (value === true) {
3891
+ mq += feature;
3892
+ } else if (value === false) {
3893
+ mq += 'not ' + feature;
3894
+ } else {
3895
+ mq += '(' + feature + ': ' + value + ')';
3896
+ }
3897
+ if (index < features.length-1) {
3898
+ mq += ' and ';
3899
+ }
3900
+ });
3901
+ return mq;
3902
+ };
3903
+
3904
+ var json2mq = function (query) {
3905
+ var mq = '';
3906
+ if (typeof query === 'string') {
3907
+ return query;
3908
+ }
3909
+ // Handling array of media queries
3910
+ if (query instanceof Array) {
3911
+ query.forEach(function (q, index) {
3912
+ mq += obj2mq(q);
3913
+ if (index < query.length-1) {
3914
+ mq += ', ';
3915
+ }
3916
+ });
3917
+ return mq;
3918
+ }
3919
+ // Handling single media query
3920
+ return obj2mq(query);
3921
+ };
3922
+
3923
+ var json2mq_1 = json2mq;
3924
+
3925
+ var defaultProps = {};
3926
+
3927
+ (function (exports) {
3928
+
3929
+ Object.defineProperty(exports, "__esModule", {
3930
+ value: true
3931
+ });
3932
+ exports["default"] = void 0;
3933
+
3934
+ var _react = _interopRequireDefault(React__default);
3935
+
3936
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
3937
+
3938
+ var defaultProps = {
3939
+ accessibility: true,
3940
+ adaptiveHeight: false,
3941
+ afterChange: null,
3942
+ appendDots: function appendDots(dots) {
3943
+ return /*#__PURE__*/_react["default"].createElement("ul", {
3944
+ style: {
3945
+ display: "block"
3946
+ }
3947
+ }, dots);
3948
+ },
3949
+ arrows: true,
3950
+ autoplay: false,
3951
+ autoplaySpeed: 3000,
3952
+ beforeChange: null,
3953
+ centerMode: false,
3954
+ centerPadding: "50px",
3955
+ className: "",
3956
+ cssEase: "ease",
3957
+ customPaging: function customPaging(i) {
3958
+ return /*#__PURE__*/_react["default"].createElement("button", null, i + 1);
3959
+ },
3960
+ dots: false,
3961
+ dotsClass: "slick-dots",
3962
+ draggable: true,
3963
+ easing: "linear",
3964
+ edgeFriction: 0.35,
3965
+ fade: false,
3966
+ focusOnSelect: false,
3967
+ infinite: true,
3968
+ initialSlide: 0,
3969
+ lazyLoad: null,
3970
+ nextArrow: null,
3971
+ onEdge: null,
3972
+ onInit: null,
3973
+ onLazyLoadError: null,
3974
+ onReInit: null,
3975
+ pauseOnDotsHover: false,
3976
+ pauseOnFocus: false,
3977
+ pauseOnHover: true,
3978
+ prevArrow: null,
3979
+ responsive: null,
3980
+ rows: 1,
3981
+ rtl: false,
3982
+ slide: "div",
3983
+ slidesPerRow: 1,
3984
+ slidesToScroll: 1,
3985
+ slidesToShow: 1,
3986
+ speed: 500,
3987
+ swipe: true,
3988
+ swipeEvent: null,
3989
+ swipeToSlide: false,
3990
+ touchMove: true,
3991
+ touchThreshold: 5,
3992
+ useCSS: true,
3993
+ useTransform: true,
3994
+ variableWidth: false,
3995
+ vertical: false,
3996
+ waitForAnimate: true
3997
+ };
3998
+ var _default = defaultProps;
3999
+ exports["default"] = _default;
4000
+ } (defaultProps));
4001
+
4002
+ /**
4003
+ * Delegate to handle a media query being matched and unmatched.
4004
+ *
4005
+ * @param {object} options
4006
+ * @param {function} options.match callback for when the media query is matched
4007
+ * @param {function} [options.unmatch] callback for when the media query is unmatched
4008
+ * @param {function} [options.setup] one-time callback triggered the first time a query is matched
4009
+ * @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched?
4010
+ * @constructor
4011
+ */
4012
+
4013
+ var QueryHandler_1;
4014
+ var hasRequiredQueryHandler;
4015
+
4016
+ function requireQueryHandler () {
4017
+ if (hasRequiredQueryHandler) return QueryHandler_1;
4018
+ hasRequiredQueryHandler = 1;
4019
+ function QueryHandler(options) {
4020
+ this.options = options;
4021
+ !options.deferSetup && this.setup();
4022
+ }
4023
+
4024
+ QueryHandler.prototype = {
4025
+
4026
+ constructor : QueryHandler,
4027
+
4028
+ /**
4029
+ * coordinates setup of the handler
4030
+ *
4031
+ * @function
4032
+ */
4033
+ setup : function() {
4034
+ if(this.options.setup) {
4035
+ this.options.setup();
4036
+ }
4037
+ this.initialised = true;
4038
+ },
4039
+
4040
+ /**
4041
+ * coordinates setup and triggering of the handler
4042
+ *
4043
+ * @function
4044
+ */
4045
+ on : function() {
4046
+ !this.initialised && this.setup();
4047
+ this.options.match && this.options.match();
4048
+ },
4049
+
4050
+ /**
4051
+ * coordinates the unmatch event for the handler
4052
+ *
4053
+ * @function
4054
+ */
4055
+ off : function() {
4056
+ this.options.unmatch && this.options.unmatch();
4057
+ },
4058
+
4059
+ /**
4060
+ * called when a handler is to be destroyed.
4061
+ * delegates to the destroy or unmatch callbacks, depending on availability.
4062
+ *
4063
+ * @function
4064
+ */
4065
+ destroy : function() {
4066
+ this.options.destroy ? this.options.destroy() : this.off();
4067
+ },
4068
+
4069
+ /**
4070
+ * determines equality by reference.
4071
+ * if object is supplied compare options, if function, compare match callback
4072
+ *
4073
+ * @function
4074
+ * @param {object || function} [target] the target for comparison
4075
+ */
4076
+ equals : function(target) {
4077
+ return this.options === target || this.options.match === target;
4078
+ }
4079
+
4080
+ };
4081
+
4082
+ QueryHandler_1 = QueryHandler;
4083
+ return QueryHandler_1;
4084
+ }
4085
+
4086
+ /**
4087
+ * Helper function for iterating over a collection
4088
+ *
4089
+ * @param collection
4090
+ * @param fn
4091
+ */
4092
+
4093
+ var Util;
4094
+ var hasRequiredUtil;
4095
+
4096
+ function requireUtil () {
4097
+ if (hasRequiredUtil) return Util;
4098
+ hasRequiredUtil = 1;
4099
+ function each(collection, fn) {
4100
+ var i = 0,
4101
+ length = collection.length,
4102
+ cont;
4103
+
4104
+ for(i; i < length; i++) {
4105
+ cont = fn(collection[i], i);
4106
+ if(cont === false) {
4107
+ break; //allow early exit
4108
+ }
4109
+ }
4110
+ }
4111
+
4112
+ /**
4113
+ * Helper function for determining whether target object is an array
4114
+ *
4115
+ * @param target the object under test
4116
+ * @return {Boolean} true if array, false otherwise
4117
+ */
4118
+ function isArray(target) {
4119
+ return Object.prototype.toString.apply(target) === '[object Array]';
4120
+ }
4121
+
4122
+ /**
4123
+ * Helper function for determining whether target object is a function
4124
+ *
4125
+ * @param target the object under test
4126
+ * @return {Boolean} true if function, false otherwise
4127
+ */
4128
+ function isFunction(target) {
4129
+ return typeof target === 'function';
4130
+ }
4131
+
4132
+ Util = {
4133
+ isFunction : isFunction,
4134
+ isArray : isArray,
4135
+ each : each
4136
+ };
4137
+ return Util;
4138
+ }
4139
+
4140
+ var MediaQuery_1;
4141
+ var hasRequiredMediaQuery;
4142
+
4143
+ function requireMediaQuery () {
4144
+ if (hasRequiredMediaQuery) return MediaQuery_1;
4145
+ hasRequiredMediaQuery = 1;
4146
+ var QueryHandler = requireQueryHandler();
4147
+ var each = requireUtil().each;
4148
+
4149
+ /**
4150
+ * Represents a single media query, manages it's state and registered handlers for this query
4151
+ *
4152
+ * @constructor
4153
+ * @param {string} query the media query string
4154
+ * @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design
4155
+ */
4156
+ function MediaQuery(query, isUnconditional) {
4157
+ this.query = query;
4158
+ this.isUnconditional = isUnconditional;
4159
+ this.handlers = [];
4160
+ this.mql = window.matchMedia(query);
4161
+
4162
+ var self = this;
4163
+ this.listener = function(mql) {
4164
+ // Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly
4165
+ self.mql = mql.currentTarget || mql;
4166
+ self.assess();
4167
+ };
4168
+ this.mql.addListener(this.listener);
4169
+ }
4170
+
4171
+ MediaQuery.prototype = {
4172
+
4173
+ constuctor : MediaQuery,
4174
+
4175
+ /**
4176
+ * add a handler for this query, triggering if already active
4177
+ *
4178
+ * @param {object} handler
4179
+ * @param {function} handler.match callback for when query is activated
4180
+ * @param {function} [handler.unmatch] callback for when query is deactivated
4181
+ * @param {function} [handler.setup] callback for immediate execution when a query handler is registered
4182
+ * @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?
4183
+ */
4184
+ addHandler : function(handler) {
4185
+ var qh = new QueryHandler(handler);
4186
+ this.handlers.push(qh);
4187
+
4188
+ this.matches() && qh.on();
4189
+ },
4190
+
4191
+ /**
4192
+ * removes the given handler from the collection, and calls it's destroy methods
4193
+ *
4194
+ * @param {object || function} handler the handler to remove
4195
+ */
4196
+ removeHandler : function(handler) {
4197
+ var handlers = this.handlers;
4198
+ each(handlers, function(h, i) {
4199
+ if(h.equals(handler)) {
4200
+ h.destroy();
4201
+ return !handlers.splice(i,1); //remove from array and exit each early
4202
+ }
4203
+ });
4204
+ },
4205
+
4206
+ /**
4207
+ * Determine whether the media query should be considered a match
4208
+ *
4209
+ * @return {Boolean} true if media query can be considered a match, false otherwise
4210
+ */
4211
+ matches : function() {
4212
+ return this.mql.matches || this.isUnconditional;
4213
+ },
4214
+
4215
+ /**
4216
+ * Clears all handlers and unbinds events
4217
+ */
4218
+ clear : function() {
4219
+ each(this.handlers, function(handler) {
4220
+ handler.destroy();
4221
+ });
4222
+ this.mql.removeListener(this.listener);
4223
+ this.handlers.length = 0; //clear array
4224
+ },
4225
+
4226
+ /*
4227
+ * Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match
4228
+ */
4229
+ assess : function() {
4230
+ var action = this.matches() ? 'on' : 'off';
4231
+
4232
+ each(this.handlers, function(handler) {
4233
+ handler[action]();
4234
+ });
4235
+ }
4236
+ };
4237
+
4238
+ MediaQuery_1 = MediaQuery;
4239
+ return MediaQuery_1;
4240
+ }
4241
+
4242
+ var MediaQueryDispatch_1;
4243
+ var hasRequiredMediaQueryDispatch;
4244
+
4245
+ function requireMediaQueryDispatch () {
4246
+ if (hasRequiredMediaQueryDispatch) return MediaQueryDispatch_1;
4247
+ hasRequiredMediaQueryDispatch = 1;
4248
+ var MediaQuery = requireMediaQuery();
4249
+ var Util = requireUtil();
4250
+ var each = Util.each;
4251
+ var isFunction = Util.isFunction;
4252
+ var isArray = Util.isArray;
4253
+
4254
+ /**
4255
+ * Allows for registration of query handlers.
4256
+ * Manages the query handler's state and is responsible for wiring up browser events
4257
+ *
4258
+ * @constructor
4259
+ */
4260
+ function MediaQueryDispatch () {
4261
+ if(!window.matchMedia) {
4262
+ throw new Error('matchMedia not present, legacy browsers require a polyfill');
4263
+ }
4264
+
4265
+ this.queries = {};
4266
+ this.browserIsIncapable = !window.matchMedia('only all').matches;
4267
+ }
4268
+
4269
+ MediaQueryDispatch.prototype = {
4270
+
4271
+ constructor : MediaQueryDispatch,
4272
+
4273
+ /**
4274
+ * Registers a handler for the given media query
4275
+ *
4276
+ * @param {string} q the media query
4277
+ * @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers
4278
+ * @param {function} options.match fired when query matched
4279
+ * @param {function} [options.unmatch] fired when a query is no longer matched
4280
+ * @param {function} [options.setup] fired when handler first triggered
4281
+ * @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched
4282
+ * @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers
4283
+ */
4284
+ register : function(q, options, shouldDegrade) {
4285
+ var queries = this.queries,
4286
+ isUnconditional = shouldDegrade && this.browserIsIncapable;
4287
+
4288
+ if(!queries[q]) {
4289
+ queries[q] = new MediaQuery(q, isUnconditional);
4290
+ }
4291
+
4292
+ //normalise to object in an array
4293
+ if(isFunction(options)) {
4294
+ options = { match : options };
4295
+ }
4296
+ if(!isArray(options)) {
4297
+ options = [options];
4298
+ }
4299
+ each(options, function(handler) {
4300
+ if (isFunction(handler)) {
4301
+ handler = { match : handler };
4302
+ }
4303
+ queries[q].addHandler(handler);
4304
+ });
4305
+
4306
+ return this;
4307
+ },
4308
+
4309
+ /**
4310
+ * unregisters a query and all it's handlers, or a specific handler for a query
4311
+ *
4312
+ * @param {string} q the media query to target
4313
+ * @param {object || function} [handler] specific handler to unregister
4314
+ */
4315
+ unregister : function(q, handler) {
4316
+ var query = this.queries[q];
4317
+
4318
+ if(query) {
4319
+ if(handler) {
4320
+ query.removeHandler(handler);
4321
+ }
4322
+ else {
4323
+ query.clear();
4324
+ delete this.queries[q];
4325
+ }
4326
+ }
4327
+
4328
+ return this;
4329
+ }
4330
+ };
4331
+
4332
+ MediaQueryDispatch_1 = MediaQueryDispatch;
4333
+ return MediaQueryDispatch_1;
4334
+ }
4335
+
4336
+ var src;
4337
+ var hasRequiredSrc;
4338
+
4339
+ function requireSrc () {
4340
+ if (hasRequiredSrc) return src;
4341
+ hasRequiredSrc = 1;
4342
+ var MediaQueryDispatch = requireMediaQueryDispatch();
4343
+ src = new MediaQueryDispatch();
4344
+ return src;
4345
+ }
4346
+
4347
+ (function (exports) {
4348
+
4349
+ Object.defineProperty(exports, "__esModule", {
4350
+ value: true
4351
+ });
4352
+ exports["default"] = void 0;
4353
+
4354
+ var _react = _interopRequireDefault(React__default);
4355
+
4356
+ var _innerSlider = innerSlider;
4357
+
4358
+ var _json2mq = _interopRequireDefault(json2mq_1);
4359
+
4360
+ var _defaultProps = _interopRequireDefault(defaultProps);
4361
+
4362
+ var _innerSliderUtils = innerSliderUtils;
4363
+
4364
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
4365
+
4366
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4367
+
4368
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4369
+
4370
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
4371
+
4372
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
4373
+
4374
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4375
+
4376
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4377
+
4378
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4379
+
4380
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
4381
+
4382
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4383
+
4384
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
4385
+
4386
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4387
+
4388
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4389
+
4390
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
4391
+
4392
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4393
+
4394
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4395
+
4396
+ var enquire = (0, _innerSliderUtils.canUseDOM)() && requireSrc();
4397
+
4398
+ var Slider = /*#__PURE__*/function (_React$Component) {
4399
+ _inherits(Slider, _React$Component);
4400
+
4401
+ var _super = _createSuper(Slider);
4402
+
4403
+ function Slider(props) {
4404
+ var _this;
4405
+
4406
+ _classCallCheck(this, Slider);
4407
+
4408
+ _this = _super.call(this, props);
4409
+
4410
+ _defineProperty(_assertThisInitialized(_this), "innerSliderRefHandler", function (ref) {
4411
+ return _this.innerSlider = ref;
4412
+ });
4413
+
4414
+ _defineProperty(_assertThisInitialized(_this), "slickPrev", function () {
4415
+ return _this.innerSlider.slickPrev();
4416
+ });
4417
+
4418
+ _defineProperty(_assertThisInitialized(_this), "slickNext", function () {
4419
+ return _this.innerSlider.slickNext();
4420
+ });
4421
+
4422
+ _defineProperty(_assertThisInitialized(_this), "slickGoTo", function (slide) {
4423
+ var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4424
+ return _this.innerSlider.slickGoTo(slide, dontAnimate);
4425
+ });
4426
+
4427
+ _defineProperty(_assertThisInitialized(_this), "slickPause", function () {
4428
+ return _this.innerSlider.pause("paused");
4429
+ });
4430
+
4431
+ _defineProperty(_assertThisInitialized(_this), "slickPlay", function () {
4432
+ return _this.innerSlider.autoPlay("play");
4433
+ });
4434
+
4435
+ _this.state = {
4436
+ breakpoint: null
4437
+ };
4438
+ _this._responsiveMediaHandlers = [];
4439
+ return _this;
4440
+ }
4441
+
4442
+ _createClass(Slider, [{
4443
+ key: "media",
4444
+ value: function media(query, handler) {
4445
+ // javascript handler for css media query
4446
+ enquire.register(query, handler);
4447
+
4448
+ this._responsiveMediaHandlers.push({
4449
+ query: query,
4450
+ handler: handler
4451
+ });
4452
+ } // handles responsive breakpoints
4453
+
4454
+ }, {
4455
+ key: "componentDidMount",
4456
+ value: function componentDidMount() {
4457
+ var _this2 = this;
4458
+
4459
+ // performance monitoring
4460
+ //if ("production" !== 'production') {
4461
+ //const { whyDidYouUpdate } = require('why-did-you-update')
4462
+ //whyDidYouUpdate(React)
4463
+ //}
4464
+ if (this.props.responsive) {
4465
+ var breakpoints = this.props.responsive.map(function (breakpt) {
4466
+ return breakpt.breakpoint;
4467
+ }); // sort them in increasing order of their numerical value
4468
+
4469
+ breakpoints.sort(function (x, y) {
4470
+ return x - y;
4471
+ });
4472
+ breakpoints.forEach(function (breakpoint, index) {
4473
+ // media query for each breakpoint
4474
+ var bQuery;
4475
+
4476
+ if (index === 0) {
4477
+ bQuery = (0, _json2mq["default"])({
4478
+ minWidth: 0,
4479
+ maxWidth: breakpoint
4480
+ });
4481
+ } else {
4482
+ bQuery = (0, _json2mq["default"])({
4483
+ minWidth: breakpoints[index - 1] + 1,
4484
+ maxWidth: breakpoint
4485
+ });
4486
+ } // when not using server side rendering
4487
+
4488
+
4489
+ (0, _innerSliderUtils.canUseDOM)() && _this2.media(bQuery, function () {
4490
+ _this2.setState({
4491
+ breakpoint: breakpoint
4492
+ });
4493
+ });
4494
+ }); // Register media query for full screen. Need to support resize from small to large
4495
+ // convert javascript object to media query string
4496
+
4497
+ var query = (0, _json2mq["default"])({
4498
+ minWidth: breakpoints.slice(-1)[0]
4499
+ });
4500
+ (0, _innerSliderUtils.canUseDOM)() && this.media(query, function () {
4501
+ _this2.setState({
4502
+ breakpoint: null
4503
+ });
4504
+ });
4505
+ }
4506
+ }
4507
+ }, {
4508
+ key: "componentWillUnmount",
4509
+ value: function componentWillUnmount() {
4510
+ this._responsiveMediaHandlers.forEach(function (obj) {
4511
+ enquire.unregister(obj.query, obj.handler);
4512
+ });
4513
+ }
4514
+ }, {
4515
+ key: "render",
4516
+ value: function render() {
4517
+ var _this3 = this;
4518
+
4519
+ var settings;
4520
+ var newProps;
4521
+
4522
+ if (this.state.breakpoint) {
4523
+ newProps = this.props.responsive.filter(function (resp) {
4524
+ return resp.breakpoint === _this3.state.breakpoint;
4525
+ });
4526
+ settings = newProps[0].settings === "unslick" ? "unslick" : _objectSpread(_objectSpread(_objectSpread({}, _defaultProps["default"]), this.props), newProps[0].settings);
4527
+ } else {
4528
+ settings = _objectSpread(_objectSpread({}, _defaultProps["default"]), this.props);
4529
+ } // force scrolling by one if centerMode is on
4530
+
4531
+
4532
+ if (settings.centerMode) {
4533
+ if (settings.slidesToScroll > 1 && "production" !== "production") {
4534
+ console.warn("slidesToScroll should be equal to 1 in centerMode, you are using ".concat(settings.slidesToScroll));
4535
+ }
4536
+
4537
+ settings.slidesToScroll = 1;
4538
+ } // force showing one slide and scrolling by one if the fade mode is on
4539
+
4540
+
4541
+ if (settings.fade) {
4542
+ if (settings.slidesToShow > 1 && "production" !== "production") {
4543
+ console.warn("slidesToShow should be equal to 1 when fade is true, you're using ".concat(settings.slidesToShow));
4544
+ }
4545
+
4546
+ if (settings.slidesToScroll > 1 && "production" !== "production") {
4547
+ console.warn("slidesToScroll should be equal to 1 when fade is true, you're using ".concat(settings.slidesToScroll));
4548
+ }
4549
+
4550
+ settings.slidesToShow = 1;
4551
+ settings.slidesToScroll = 1;
4552
+ } // makes sure that children is an array, even when there is only 1 child
4553
+
4554
+
4555
+ var children = _react["default"].Children.toArray(this.props.children); // Children may contain false or null, so we should filter them
4556
+ // children may also contain string filled with spaces (in certain cases where we use jsx strings)
4557
+
4558
+
4559
+ children = children.filter(function (child) {
4560
+ if (typeof child === "string") {
4561
+ return !!child.trim();
4562
+ }
4563
+
4564
+ return !!child;
4565
+ }); // rows and slidesPerRow logic is handled here
4566
+
4567
+ if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {
4568
+ console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1");
4569
+ settings.variableWidth = false;
4570
+ }
4571
+
4572
+ var newChildren = [];
4573
+ var currentWidth = null;
4574
+
4575
+ for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {
4576
+ var newSlide = [];
4577
+
4578
+ for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {
4579
+ var row = [];
4580
+
4581
+ for (var k = j; k < j + settings.slidesPerRow; k += 1) {
4582
+ if (settings.variableWidth && children[k].props.style) {
4583
+ currentWidth = children[k].props.style.width;
4584
+ }
4585
+
4586
+ if (k >= children.length) break;
4587
+ row.push( /*#__PURE__*/_react["default"].cloneElement(children[k], {
4588
+ key: 100 * i + 10 * j + k,
4589
+ tabIndex: -1,
4590
+ style: {
4591
+ width: "".concat(100 / settings.slidesPerRow, "%"),
4592
+ display: "inline-block"
4593
+ }
4594
+ }));
4595
+ }
4596
+
4597
+ newSlide.push( /*#__PURE__*/_react["default"].createElement("div", {
4598
+ key: 10 * i + j
4599
+ }, row));
4600
+ }
4601
+
4602
+ if (settings.variableWidth) {
4603
+ newChildren.push( /*#__PURE__*/_react["default"].createElement("div", {
4604
+ key: i,
4605
+ style: {
4606
+ width: currentWidth
4607
+ }
4608
+ }, newSlide));
4609
+ } else {
4610
+ newChildren.push( /*#__PURE__*/_react["default"].createElement("div", {
4611
+ key: i
4612
+ }, newSlide));
4613
+ }
4614
+ }
4615
+
4616
+ if (settings === "unslick") {
4617
+ var className = "regular slider " + (this.props.className || "");
4618
+ return /*#__PURE__*/_react["default"].createElement("div", {
4619
+ className: className
4620
+ }, children);
4621
+ } else if (newChildren.length <= settings.slidesToShow) {
4622
+ settings.unslick = true;
4623
+ }
4624
+
4625
+ return /*#__PURE__*/_react["default"].createElement(_innerSlider.InnerSlider, _extends({
4626
+ style: this.props.style,
4627
+ ref: this.innerSliderRefHandler
4628
+ }, settings), newChildren);
4629
+ }
4630
+ }]);
4631
+
4632
+ return Slider;
4633
+ }(_react["default"].Component);
4634
+
4635
+ exports["default"] = Slider;
4636
+ } (slider));
4637
+
4638
+ (function (exports) {
4639
+
4640
+ Object.defineProperty(exports, "__esModule", {
4641
+ value: true
4642
+ });
4643
+ exports["default"] = void 0;
4644
+
4645
+ var _slider = _interopRequireDefault(slider);
4646
+
4647
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
4648
+
4649
+ var _default = _slider["default"];
4650
+ exports["default"] = _default;
4651
+ } (lib));
4652
+
4653
+ var Slider = /*@__PURE__*/getDefaultExportFromCjs(lib);
4654
+
4655
+ var css_248z$2 = "/* Slider */\n.slick-slider\n{\n position: relative;\n\n display: block;\n box-sizing: border-box;\n\n -webkit-user-select: none;\n user-select: none;\n\n -webkit-touch-callout: none;\n -khtml-user-select: none;\n touch-action: pan-y;\n -webkit-tap-highlight-color: transparent;\n}\n\n.slick-list\n{\n position: relative;\n\n display: block;\n overflow: hidden;\n\n margin: 0;\n padding: 0;\n}\n.slick-list:focus\n{\n outline: none;\n}\n.slick-list.dragging\n{\n cursor: pointer;\n cursor: hand;\n}\n\n.slick-slider .slick-track,\n.slick-slider .slick-list\n{\n transform: translate3d(0, 0, 0);\n}\n\n.slick-track\n{\n position: relative;\n top: 0;\n left: 0;\n\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.slick-track:before,\n.slick-track:after\n{\n display: table;\n\n content: '';\n}\n.slick-track:after\n{\n clear: both;\n}\n.slick-loading .slick-track\n{\n visibility: hidden;\n}\n\n.slick-slide\n{\n display: none;\n float: left;\n\n height: 100%;\n min-height: 1px;\n}\n[dir='rtl'] .slick-slide\n{\n float: right;\n}\n.slick-slide img\n{\n display: block;\n}\n.slick-slide.slick-loading img\n{\n display: none;\n}\n.slick-slide.dragging img\n{\n pointer-events: none;\n}\n.slick-initialized .slick-slide\n{\n display: block;\n}\n.slick-loading .slick-slide\n{\n visibility: hidden;\n}\n.slick-vertical .slick-slide\n{\n display: block;\n\n height: auto;\n\n border: 1px solid transparent;\n}\n.slick-arrow.slick-hidden {\n display: none;\n}\n";
4656
+ styleInject(css_248z$2);
4657
+
4658
+ var css_248z$1 = "@charset 'UTF-8';\n/* Slider */\n.slick-loading .slick-list\n{\n background: #fff url('./ajax-loader.gif') center center no-repeat;\n}\n\n/* Icons */\n@font-face\n{\n font-family: 'slick';\n font-weight: normal;\n font-style: normal;\n\n src: url('./fonts/slick.eot');\n src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');\n}\n/* Arrows */\n.slick-prev,\n.slick-next\n{\n font-size: 0;\n line-height: 0;\n\n position: absolute;\n top: 50%;\n\n display: block;\n\n width: 20px;\n height: 20px;\n padding: 0;\n transform: translate(0, -50%);\n\n cursor: pointer;\n\n color: transparent;\n border: none;\n outline: none;\n background: transparent;\n}\n.slick-prev:hover,\n.slick-prev:focus,\n.slick-next:hover,\n.slick-next:focus\n{\n color: transparent;\n outline: none;\n background: transparent;\n}\n.slick-prev:hover:before,\n.slick-prev:focus:before,\n.slick-next:hover:before,\n.slick-next:focus:before\n{\n opacity: 1;\n}\n.slick-prev.slick-disabled:before,\n.slick-next.slick-disabled:before\n{\n opacity: .25;\n}\n\n.slick-prev:before,\n.slick-next:before\n{\n font-family: 'slick';\n font-size: 20px;\n line-height: 1;\n\n opacity: .75;\n color: white;\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.slick-prev\n{\n left: -25px;\n}\n[dir='rtl'] .slick-prev\n{\n right: -25px;\n left: auto;\n}\n.slick-prev:before\n{\n content: '←';\n}\n[dir='rtl'] .slick-prev:before\n{\n content: '→';\n}\n\n.slick-next\n{\n right: -25px;\n}\n[dir='rtl'] .slick-next\n{\n right: auto;\n left: -25px;\n}\n.slick-next:before\n{\n content: '→';\n}\n[dir='rtl'] .slick-next:before\n{\n content: '←';\n}\n\n/* Dots */\n.slick-dotted.slick-slider\n{\n margin-bottom: 30px;\n}\n\n.slick-dots\n{\n position: absolute;\n bottom: -25px;\n\n display: block;\n\n width: 100%;\n padding: 0;\n margin: 0;\n\n list-style: none;\n\n text-align: center;\n}\n.slick-dots li\n{\n position: relative;\n\n display: inline-block;\n\n width: 20px;\n height: 20px;\n margin: 0 5px;\n padding: 0;\n\n cursor: pointer;\n}\n.slick-dots li button\n{\n font-size: 0;\n line-height: 0;\n\n display: block;\n\n width: 20px;\n height: 20px;\n padding: 5px;\n\n cursor: pointer;\n\n color: transparent;\n border: 0;\n outline: none;\n background: transparent;\n}\n.slick-dots li button:hover,\n.slick-dots li button:focus\n{\n outline: none;\n}\n.slick-dots li button:hover:before,\n.slick-dots li button:focus:before\n{\n opacity: 1;\n}\n.slick-dots li button:before\n{\n font-family: 'slick';\n font-size: 6px;\n line-height: 20px;\n\n position: absolute;\n top: 0;\n left: 0;\n\n width: 20px;\n height: 20px;\n\n content: '•';\n text-align: center;\n\n opacity: .25;\n color: black;\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.slick-dots li.slick-active button:before\n{\n opacity: .75;\n color: black;\n}\n";
4659
+ styleInject(css_248z$1);
4660
+
4661
+ var css_248z = ".carousel .slick-arrow {\n display: none !important;\n}";
4662
+ styleInject(css_248z);
4663
+
4664
+ var _excluded = ["className", "autoplay", "children"];
4665
+ var Carousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
4666
+ var className = _ref.className,
4667
+ autoplay = _ref.autoplay,
4668
+ children = _ref.children,
4669
+ props = _objectWithoutProperties$1(_ref, _excluded);
4670
+ var sliderRef = useRef(null);
4671
+ var settings = _objectSpread2({
4672
+ dots: true,
4673
+ fade: true,
4674
+ infinite: true,
4675
+ slidesToShow: 1,
4676
+ slidesToScroll: 1,
4677
+ autoplay: autoplay,
4678
+ speed: 500,
4679
+ autoplaySpeed: 2000,
4680
+ cssEase: 'linear'
4681
+ }, props);
4682
+ useImperativeHandle(ref, function () {
4683
+ return {
4684
+ prev: function prev() {
4685
+ sliderRef.current.slickPrev();
4686
+ },
4687
+ next: function next() {
4688
+ sliderRef.current.slickNext();
4689
+ }
4690
+ };
4691
+ });
4692
+ return /*#__PURE__*/React__default.createElement(Slider, _extends$3({
4693
+ className: classNames('carousel', className),
4694
+ ref: sliderRef
4695
+ }, settings), children);
4696
+ });
4697
+ Carousel.defaultProps = {
4698
+ className: undefined,
4699
+ autoplay: false,
4700
+ children: undefined
4701
+ };
4702
+
4703
+ /* Write props detail information and 'npm run updateStory' will help you generate stories's argTypes */
4704
+ Carousel.propTypes = {
4705
+ /** Css Name */
4706
+ className: PropTypes.string,
4707
+ /** 自動撥放 */
4708
+ autoplay: PropTypes.bool,
4709
+ /** 子元件 */
4710
+ children: PropTypes.arrayOf(PropTypes.any)
4711
+ };
4712
+
4713
+ export { Carousel as default };