"use strict";define("galleriesCommon/utils/galleriesHelperFunctions",["skinExports","lodash","coreUtils"],function(t,i,e){function o(i){var e=t[i];return e&&e.heightDiff||0}function s(i){var e=t[i];return e&&e.widthDiff||0}function a(t,i,o,s,a){var l=o,n=this.getSkinHeightDiff(s),r=e.matrix.calculations.getItemHeight(o,a,t,n);return Math.floor(i*r+(i-1)*l)+n}function l(t,e,o){var s=0,a=parseInt(e.imgHeightDiff&&e.imgHeightDiff.value,10)||0,l=parseInt(e.topPadding&&e.topPadding.value,10)||0;return a||l?s=a+l:t&&t.exports&&(s="mobileView"===o&&i.isNumber(t.exports.m_heightDiff)?t.exports.m_heightDiff:t.exports.heightDiff||0),s}function n(t,e){var o=0;return t&&t.exports&&(o="mobileView"===e&&i.isNumber(t.exports.m_widthDiff)?t.exports.m_widthDiff:t.exports.widthDiff||0),o}return{getSkinHeightDiff:o,getSkinWidthDiff:s,getGalleryHeight:a,getDisplayerHeightDiff:l,getDisplayerWidthDiff:n,MIN_GALLERY_HEIGHT:70}}),define("galleriesCommon/mixins/galleryAutoPlayMixin",["santaProps"],function(t){function i(t){return t.items.length>0}function e(t,e){return i(t)&&e.autoplay}return{propTypes:{compProp:t.Types.Component.compProp.isRequired,compData:t.Types.Component.compData.isRequired,isZoomOpened:t.Types.isZoomOpened.isRequired,id:t.Types.Component.id.isRequired,isPlayingAllowed:t.Types.RenderFlags.isPlayingAllowed},getInitialState:function(){var t=e(this.props.compData,this.props.compProp);return{$showAutoPlayButton:this.shouldShowAutoPlay()?"showPlayButton":"hidePlayButton",shouldAutoPlay:t,$slideshow:t&&!this.props.isZoomOpened&&this.props.isPlayingAllowed?"autoplayOn":"autoplayOff"}},shouldShowAutoPlay:function(){return!this.props.compProp.isHidden&&(i(this.props.compData)&&this.props.compProp.showAutoplay)},toggleAutoPlay:function(){if(i(this.props.compData)){var t="autoplayOff";if("autoplayOff"===this.state.$slideshow){if(!this.props.isPlayingAllowed)return;t="autoplayOn"}this.setState({shouldAutoPlay:!this.state.shouldAutoPlay,$slideshow:t},function(){this.updateAutoplayState(),this.handleAction(t)})}},componentWillReceiveProps:function(t){var i=this.state.shouldAutoPlay&&!t.isZoomOpened&&t.isPlayingAllowed?"autoplayOn":"autoplayOff";i!==this.state.$slideshow&&this.setState({$slideshow:i},this.updateAutoplayState)},updateAutoplayState:function(){this.clearTimeoutNamed(this.props.id),"autoplayOn"===this.state.$slideshow&&this.setTimeoutNamed(this.props.id,this.autoplayCallback,this.getAutoplayInterval())},autoplayCallback:function(){this.props.isZoomOpened||("LTR"===this.props.compProp.autoPlayDirection?this.prev():this.next())},getAutoplayInterval:function(){var t=this.props.compProp.autoplayInterval;return Math.floor(1e3*t)}}}),define("galleriesCommon",["galleriesCommon/utils/galleriesHelperFunctions","galleriesCommon/mixins/galleryAutoPlayMixin"],function(t,i){return{utils:{galleriesHelperFunctions:t},mixins:{galleryAutoPlayMixin:i}}}); //# sourceMappingURL=galleriesCommon.min.js.map