| 1 |
"use strict";function _typeof(e){return(_typeof="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})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _inherits(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var i=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,i?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}window.addEventListener("DOMContentLoaded",function(){var t=function(){_inherits(t,elementorModules.frontend.handlers.Base);var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.apply(this,arguments)}return _createClass(t,[{key:"runCarousel",value:function(){var e,t,n,y=jQuery(".carousel-"+this.getID()),i=this.getElementSettings("navigation"),r=i.includes("arrows"),o=i.includes("fraction"),i=i.includes("dots"),s=this.getElementSettings("autoplay_speed"),l="true"==this.getElementSettings("pause_on_hover"),s=null!=s&&""!=s&&s,c="true"==this.getElementSettings("loop"),a="true"==this.getElementSettings("group_cells")||1,u="true"==this.getElementSettings("match_height"),h=this.getElementSettings("animation_style"),m=this.getElementSettings("show_hidden"),f=this.getElementSettings("slide_position")||"center",d=c,p=!0,g="true"==this.getElementSettings("observer"),_=this.getElementSettings("overflow_container"),b="true"==this.getElementSettings("grab_cursor"),v=elementorFrontend.isEditMode(),w=this.getElementSettings("layout");switch(h){case"circular":t=.15,e=.8;break;case"fade_blur":case"fade":t=.05,e=.8;break;default:t=.05,p=!(e=.8)}p&&!v&&this.$element.closest('[data-element_type="'+_+'"]').css({"overflow-x":"hidden"}),"layout_5"==w&&this.$element.find(".ui-e-item").each(function(){n=jQuery(this).find(".ui-e-content").height(),jQuery(this).find(".ui-e-testimonial-avatar").css({height:n+"px","max-height":n+"px"})});var P,k,S={cellSelector:".ui-e-wrp",cellAlign:f,contain:d,groupCells:a||1,wrapAround:c,adaptiveHeight:!1,autoPlay:s,pauseAutoPlayOnHover:l,prevNextButtons:!1,pageDots:i,draggable:b,dragThreshold:10,selectedAttraction:t,friction:e};y.on("ready.flickity",function(){y.hasClass("flickity-enabled")&&setTimeout(function(){y.flickity("resize"),u&&y.find(".ui-e-wrp, .ui-e-animations-wrp, .ui-e-item-wrp, .ui-e-item").css({height:"100%"})},200)}),r&&(this.$element.find(".ui-e-next").on("click",function(){y.flickity("next",c,!1)}),this.$element.find(".ui-e-previous").on("click",function(){y.flickity("previous",c,!1)})),p&&600<jQuery(window).width()&&y.on("scroll.flickity",function(e,t){var f,d,p;return!(jQuery(window).width()<600||!y.data("flickity")||!y.data("flickity").slides)&&(f=y.width(),d=y.offset().left,p=y.find(".ui-e-wrp").width(),void y.data("flickity").slides.forEach(function(e,t){var t=y.find(".ui-e-wrp:nth-child("+(t+1)+")"),e=jQuery(e.cells[0].element).offset().left,n=1,i=0,r=0,o=0,s=0,l=10,c="auto",a=e-d,u=e-(d+f-p+1);a<=-p?(c="none",n=r=0,"left"!=m&&"both"!=m||(n=1)):p<=u?(c="none",n=r=0,"right"!=m&&"both"!=m||(n=1)):a<0&&-p<a?(r=18*(1-(a=1-Math.abs(a)/p)),o=1.8*(1-a)*p,s=(d-e)/p*-180,n=a,i=2*(3.5-3.5*Math.min(1,a/.9)),l=-1,"left"!=m&&"both"!=m||(n=1,i=0)):0<u&&u<p&&(r=-18*(1-(e=1-u/p)),o=-1.8*(1-e)*p,s=-1*(1-e)*p*.52,n=e,i=2*(3.5-3.5*Math.min(1,e/.9)),l=-1,"right"!=m&&"both"!=m||(n=1,i=0)),"circular"===h&&(t.css({"will-change":"transform, opacity",transform:"translate3d(0, "+p+", 0)",opacity:n,"z-index":l}),t.find(".ui-e-item-wrp").css({"will-change":"transform, opacity",transform:"perspective("+p+"px) translateX("+o+"px) rotateY("+r+"deg) translateZ( "+s+"px)",transition:"none"})),"fade_blur"===h&&(t.css({"will-change":"opacity, filter",opacity:n,"z-index":l}),t.find(".ui-e-item-wrp").css({"will-change":"opacity, filter",filter:"blur("+i+"px)",transition:"none"})),t.css({"pointer-events":c}),t.parent().css({"pointer-events":c})}))}),g&&!v?new Waypoint({element:jQuery(this.$element),handler:function(){y.flickity(S)},offset:"140%"}):y.flickity(S),o&&(_=y.data("flickity"),P=_.selectedIndex,w=_.cells.length,k=this.$element.find(".ui-e-current"),f=this.$element.find(".ui-e-total"),k.text(P+1),f.text(w),y.on("change.flickity",function(e,t){k.text((P=t)+1)}))}},{key:"bindEvents",value:function(){this.runCarousel()}}]),t}();jQuery(window).on("elementor/frontend/init",function(){function e(e){elementorFrontend.elementsHandler.addHandler(t,{$element:e})}elementorFrontend.hooks.addAction("frontend/element_ready/uicore-testimonial-carousel.default",e),elementorFrontend.hooks.addAction("frontend/element_ready/uicore-testimonial-slider.default",e),elementorFrontend.hooks.addAction("frontend/element_ready/uicore-logo-carousel.default",e)})}); |