Файловый менеджер - Редактировать - /home/digitalm/www/zetaworks/wp-content/themes/uncode/library/js/carousel.min.js
Назад
(function($){"use strict";UNCODE.carousel=function(container){var $owlContainers=$(".owl-carousel-container",container);$owlContainers.each(function(){function firstLoaded(el,event){var el=$(el),uncode_slider=el.find(".uncode-slider");el.find(".owl-carousel").css("opacity",1),uncode_slider.addClass("slider-loaded"),typeof UNCODE.bigText!="undefined"&&UNCODE.bigText(el.find(".owl-item.active")),requestTimeout(function(){var lastDelayElems=animate_elems(el.find(".owl-item.index-active")),lastDelayThumb=animate_thumb(el.find(".owl-item.active .t-inside"),event);if(uncode_slider.length&&el.find(".owl-carousel").data("autoplay")){lastDelayElems==undefined&&(lastDelayElems=0),lastDelayThumb==undefined&&(lastDelayThumb=0);var maxDelay=Math.max(lastDelayElems,lastDelayThumb);$("> .owl-carousel",uncode_slider).trigger("stop.owl.autoplay"),requestTimeout(function(){$("> .owl-carousel",uncode_slider).trigger("play.owl.autoplay")},maxDelay)}},500)}function navHover(el){var $owlCont=el,$owlPrev=$owlCont.find(".owl-prev"),$owlNext=$owlCont.find(".owl-next"),$owlDots=$owlCont.find(".owl-dots-inside .owl-dots"),$owlPagination=$owlCont.next(),owlPrevW=$owlPrev.outerWidth(),owlNextW=$owlNext.outerWidth(),owlDotsH=$owlDots.innerHeight(),owlTime=400,owlNested=$owlCont.parent().parent().hasClass("nested-carousel");$("body").hasClass("rtl")?($owlPrev.css("margin-right",-owlPrevW),$owlNext.css("margin-left",-owlNextW)):($owlPrev.css("margin-left",-owlPrevW),$owlNext.css("margin-right",-owlNextW)),owlNested||$owlDots.css("bottom",-owlDotsH),$owlCont.mouseenter(function(){owlNested=$owlCont.parent().parent().hasClass("nested-carousel"),$owlPrev.add($owlNext).css({marginLeft:0,marginRight:0}),owlNested||$owlDots.css({opacity:1,bottom:0})}).mouseleave(function(){owlNested=$owlCont.parent().parent().hasClass("nested-carousel"),$("body").hasClass("rtl")?($owlPrev.css("margin-right",-owlPrevW),$owlNext.css("margin-left",-owlNextW)):($owlPrev.css("margin-left",-owlPrevW),$owlNext.css("margin-right",-owlNextW)),owlNested||$owlDots.css({opacity:1,bottom:-owlDotsH})})}function animate_elems($this){var lastDelay;return $.each($(".animate_when_almost_visible:not(.t-inside), .animate_inner_when_almost_visible:not(.t-inside), .animate_when_parent_almost_visible:not(.t-inside)",$this),function(index,val){var element=$(val),delayAttr=element.attr("data-delay"),$first_item=element.closest('.owl-item[data-index="1"]');if($first_item.length&&$first_item.attr("data-already-reached")!=="true"&&!$first_item.closest("#page-header").length)return!1;delayAttr==undefined&&(delayAttr=0),requestTimeout(function(){element.addClass("start_animation")},delayAttr),lastDelay=delayAttr}),lastDelay}function animate_thumb(items,event){var lastDelay,itemIndex,thiis=$(event.currentTarget),tempIndex=thiis.data("tempIndex")==undefined?$(".owl-item.active",thiis).first().index():thiis.data("tempIndex"),numActives=$(".owl-item.active",thiis).length,stagePadding=thiis.data("stagepadding");return stagePadding=stagePadding==undefined||stagePadding==0?!1:!0,thiis.data("tempIndex",event.item.index),$.each(items,function(index,val){var parent=$(val).closest(".owl-item");if(UNCODE.isUnmodalOpen&&!val.closest("#unmodal-content"))return;if(!$(val).hasClass("start_animation"))if(parent.hasClass("active")||stagePadding||$owlWrapper.hasClass("carousel-animation-first"))var thumbInView=new Waypoint.Inview({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:val,enter:function(direction){var element=$(this.element),delayAttr=parseInt(element.attr("data-delay")),itemIndex=element.closest(".owl-item").index()+1,diffItem=Math.abs(itemIndex-tempIndex)-1;itemIndex>tempIndex&&thiis.data("tempIndex",itemIndex),isNaN(delayAttr)&&(delayAttr=100);if(stagePadding){var objTimeout=requestTimeout(function(){element.addClass("start_animation")},index*delayAttr);lastDelay=index*delayAttr}else{$('.owl-item.cloned[data-index="'+element.closest(".owl-item").data("index")+'"] .t-inside',thiis).addClass("start_animation");var objTimeout=requestTimeout(function(){element.addClass("start_animation")},diffItem*delayAttr);lastDelay=diffItem*delayAttr}parent.data("objTimeout",objTimeout),UNCODE.isUnmodalOpen||this.destroy()}})}),lastDelay}function setItemsHeight(item){$.each($(".owl-item",item),function(index,val){var availableThumbHeight=$(".t-inside",$(val)).height(),innerThumbHeight=$(".t-entry-text-tc",$(val)).outerHeight(),difference=availableThumbHeight-innerThumbHeight;if($(".tmb-content-under",val).length){var visualPart=$(".t-entry-visual",val);visualPart.length&&(difference-=$(".t-entry-visual",val).height())}$(".tmb-content-lateral",val).length||$(".t-entry > *:last-child",val).css("transform","translateY("+difference+"px)")})}function setItemsRelHeight(item){$.each($(".owl-item",item),function(index,val){var $rowContainer=$(item).parents(".row-parent").eq(0),paddingRow=parseInt($rowContainer.css("padding-top"))+parseInt($rowContainer.css("padding-bottom")),$colContainer=$(item).parents(".uncell").eq(0),paddingCol=parseInt($colContainer.css("padding-top"))+parseInt($colContainer.css("padding-bottom")),winHeight=UNCODE.wheight,multiplier_h=parseInt($(item).attr("data-vp-height")),data_viewport_h,consider_menu=$(item).data("vp-menu");consider_menu&&(winHeight-=UNCODE.menuHeight),data_viewport_h=Math.ceil(winHeight/(100/multiplier_h))-(paddingRow+paddingCol),$(".t-inside",val).css("height",data_viewport_h)})}function pauseOnHover(slider){$(".owl-dots, .owl-prev, .owl-next",slider).on({mouseenter:function(){$(slider).addClass("owl-mouseenter"),$(slider).trigger("stop.owl.autoplay")},mouseleave:function(){$(slider).removeClass("owl-mouseenter"),$(slider).trigger("play.owl.autoplay")}})}var $owlContainer=$(this),$owlWrapper=$owlContainer.closest(".owl-carousel-wrapper"),$owlSelector=$('> [class*="owl-carousel"]',$owlContainer),values={},tempTimeStamp,currentIndex,$owlInsideEqual=[];$owlSelector.each(function(){function manageFluidCarouseHeight(){clearRequestTimeout(setFluidResize),setFluidResize=requestTimeout(function(){setItemsRelHeight($elSelector)},100)}var itemID=$(this).attr("id"),$elSelector=$(("#"+itemID).toString());values.id=itemID,values.items=1,values.columns=3,values.fade=!1,values.nav=!1,values.navmobile=!1,values.navskin="light",values.navspeed=400,values.dots=!1,values.dotsmobile=!1,values.loop=!1,values.autoplay=!1,values.timeout=3e3,values.autoheight=!1,values.stagepadding=0,values.margin=0,values.lg=1,values.md=1,values.sm=1,$.each($(this).data(),function(i,v){values[i]=v}),$(this).closest(".uncode-slider").length?(values.navskin="",values.navmobile=!1):values.navskin=" style-"+values.navskin+" style-override";var setIndexActive=function(event,init){var init=typeof init=="undefined"?!1:init,thiis=$(event.currentTarget);if(tempTimeStamp!=event.timeStamp&&(init||!UNCODE.isFullPage||UNCODE.isFullPage&&thiis.closest(".fp-section").hasClass("uncode-scroll-active")))var scrolltop=$(document).scrollTop(),size=event.page.size,i,setIndex=requestTimeout(function(){for(i=0;i<size;i++){var itemCont=event.item.index!=null?event.item.index+i:i,currentItem=thiis.find("> .owl-stage-outer > .owl-stage > .owl-item")[itemCont];thiis.closest(".row-slider").length&&(currentItem==undefined&&(currentItem=thiis.children()[i]),$(currentItem).closest("#page-header").length&&($(".row-container > .row > .row-inner > div > .style-dark",currentItem).closest(".uncode-slider").length?UNCODE.switchColorsMenu(scrolltop,"dark"):$(".row-container > .row > .row-inner > div > .style-light",currentItem).closest(".uncode-slider").length&&UNCODE.switchColorsMenu(scrolltop,"light")));var itendIndex=$(currentItem).attr("data-index");isNaN(itendIndex)&&(itendIndex=1),$elSelector.find(".owl-item:not(.new-indexed)").removeClass("index-active"),$elSelector.find('.owl-item[data-index="'+itendIndex+'"]').addClass("index-active").addClass("new-indexed"),$.fn.counterUp&&$elSelector.find('.owl-item[data-index="'+itendIndex+'"] .counter').each(function(){var $counter=$(this);$counter.addClass("started").counterUp({delay:10,time:1500})})}$elSelector.find(".owl-item.new-indexed").removeClass("new-indexed")},200);tempTimeStamp=event.timeStamp};$elSelector.on("initialized.owl.carousel",function(event){$(".isotope-container",event.currentTarget).length&&window.dispatchEvent(UNCODE.boxEvent),$(".owl-dot.active",$elSelector).on("click",function(){return!1});var thiis=$(event.currentTarget),time=thiis.data("timer-id"),rowParent=thiis.closest(".row-parent");typeof rowParent[0]!="undefined"&&rowParent[0].dispatchEvent(new CustomEvent("owl-carousel-initialized")),time&&clearRequestTimeout(time),thiis.addClass("showControls");var new_time=requestTimeout(function(){thiis.closest(".owl-carousel-container").removeClass("owl-carousel-loading"),thiis.hasClass("owl-height-viewport")&&setItemsRelHeight(thiis),thiis.hasClass("owl-height-equal")&&setItemsHeight(thiis),!UNCODE.isMobile&&!$elSelector.closest(".header-wrapper").length&&navHover($elSelector.parent()),thiis.closest(".unequal, .unexpand").length&&UNCODE.setRowHeight(rowParent[0],!0),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size(thiis)},350);thiis.data("timer-id",new_time);var scrolltop=$(document).scrollTop();thiis.closest(".uncode-slider").find("video").removeAttr("poster"),$(window).on("load",function(){thiis.data("autoplay")&&thiis.trigger("stop.autoplay.owl");if(UNCODE.isUnmodalOpen&&!thiis.closest("#unmodal-content"))return;var carouselInView=new Waypoint.Inview({context:UNCODE.isUnmodalOpen?document.getElementById("unmodal-content"):window,element:thiis[0],exited:function(){var el=$(this.element);el.data("autoplay")&&(el.trigger("stop.owl.autoplay"),el.data("stopped","true"))},enter:function(direction){var el=$(this.element);requestTimeout(function(){el.data("autoplay")&&(el.trigger("play.owl.autoplay"),el.data("stopped","false"))},100)}})}),thiis.closest(".isotope-system").length||requestTimeout(function(){animate_thumb($(".t-inside",el),event)},400);var currentItem=thiis.find("> .owl-stage-outer > .owl-stage > .owl-item")[event.item.index],currentIndex=$(currentItem).attr("data-index");$.each($(".owl-item:not(.active) .start_animation",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("start_animation")}),$.each($(".owl-item:not(.active) .already-animated",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("already-animated")}),$.each($('.owl-item:not(.active) [data-animated="yes"]',$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeAttr("data-animated")}),$.each($(".owl-item.cloned",thiis),function(index,val){$(".t-entry-visual-cont > a",$(val)).attr("data-lbox-clone",!0)}),$.each($(".owl-item:not(.active)",thiis),function(index,val){$(val).attr("data-index")!=currentIndex&&($(".start_animation:not(.t-inside)",val).removeClass("start_animation"),$(".already-animated:not(.t-inside)",val).removeClass("already-animated")),$(val).attr("data-index")!=currentIndex&&$('[data-animated="yes"]:not(.t-inside)',val).removeAttr("data-animated"),$(val).attr("data-index")==currentIndex&&$(".animate_when_almost_visible:not(.t-inside), .animate_inner_when_almost_visible:not(.t-inside)",val).addClass("start_animation")});if(thiis.closest(".uncode-slider").length){var el=thiis.closest(".row-parent")[0];$(el).data("imgready")?firstLoaded(el,event):el.addEventListener("imgLoaded",function(el){firstLoaded(el.target,event)},!1);var transHeight=$(".hmenu .menu-transparent.menu-primary .menu-container").height()-UNCODE.bodyBorder;transHeight!=null&&requestTimeout(function(){thiis.closest(".uncode-slider").find(".owl-prev, .owl-next").css("paddingTop",transHeight/2+"px")},100)}else{var el=thiis;el.closest(".uncode-slider").addClass("slider-loaded")}requestTimeout(function(){typeof UNCODE.bigText!="undefined"&&UNCODE.bigText(thiis),thiis.closest(".uncode-slider").length&&thiis.data("autoplay")&&pauseOnHover(thiis)},500),thiis.closest(".unequal").length&&$owlInsideEqual.push(thiis.closest(".row-parent"));var containerClasses="",containerStyle="";$(".owl-dots-classes",$owlContainer).length&&(containerClasses=$(".owl-dots-classes",$owlContainer).attr("class"),containerStyle=$(".owl-dots-classes",$owlContainer).attr("style"),$(".owl-dots-classes",$owlContainer).remove()),containerClasses!==""&&requestTimeout(function(){containerClasses!==""&&$(".owl-dots",$owlContainer).attr("style",containerStyle),containerStyle!==""&&$(".owl-dots",$owlContainer).addClass(containerClasses)},100),$.each($(".column_child.pos-bottom",thiis),function(index,val){$(val).closest(".row-inner").css({"margin-top":"-1px"})}),$.fn.isotope&&thiis.closest(".isotope-container").length&&(thiis.closest(".isotope-container").data("isotope")&&requestTimeout(function(){thiis.closest(".isotope-container").isotope("layout")},300),$(window).on("load",function(){thiis.closest(".isotope-container").data("isotope")&&thiis.closest(".isotope-container").isotope("layout")})),thiis.data("autoplay")&&$(window).on("menuOpen",function(){thiis.trigger("stop.owl.autoplay"),thiis.data("stopped","true")}).on("menuClose",function(){}),$(window).on("menuClose",function(){thiis.data("autoplay")&&(thiis.trigger("play.owl.autoplay"),thiis.data("stopped","false"))}),setIndexActive(event,!0)}),$elSelector.on("resized.owl.carousel",function(event){var thiis=$(event.currentTarget);thiis.hasClass("owl-height-equal")&&setItemsHeight(thiis),setItemsRelHeight($elSelector),setIndexActive(event),SiteParameters.dynamic_srcset_active==="1"&&UNCODE.refresh_dynamic_srcset_size(thiis),$.fn.isotope&&$(window).on("load",function(){$(event.currentTarget).closest(".isotope-container").data("isotope")&&$(event.currentTarget).closest(".isotope-container").isotope("layout")})});var setFluidResize;window.addEventListener("resize",manageFluidCarouseHeight),$elSelector.on("change.owl.carousel",function(event){UNCODE.isMobile||UNCODE.owlStopVideo(event.currentTarget)}),$elSelector.on("changed.owl.carousel",function(event){var $row=$elSelector.parents(".row")[0];typeof $row!="undefined"&&$row.dispatchEvent(new CustomEvent("owl-carousel-changed")),setIndexActive(event)}),$elSelector.on("translate.owl.carousel",function(event){UNCODE.isMobile&&$(event.currentTarget).addClass("owl-translating")}),$elSelector.on("translated.owl.carousel",function(event){var thiis=$(event.currentTarget),currentItem=thiis.find("> .owl-stage-outer > .owl-stage > .owl-item")[event.item.index],currentIndex=$(currentItem).attr("data-index"),stagePadding=thiis.data("stagepadding");stagePadding=stagePadding==undefined||stagePadding==0?!1:!0,UNCODE.isMobile||UNCODE.owlPlayVideo(thiis),requestTimeout(function(){var lastDelayElems=animate_elems($(".owl-item.index-active",thiis)),lastDelayThumb=animate_thumb($(".owl-item"+(stagePadding?"":".active")+" .t-inside",thiis),event);if(thiis.closest(".uncode-slider").length&&thiis.data("autoplay")){lastDelayElems==undefined&&(lastDelayElems=0),lastDelayThumb==undefined&&(lastDelayThumb=0);var maxDelay=Math.max(lastDelayElems,lastDelayThumb);thiis.trigger("stop.owl.autoplay"),requestTimeout(function(){!thiis.hasClass("owl-mouseenter")&&thiis.data("stopped")!="true"&&thiis.trigger("play.owl.autoplay")},maxDelay)}},200),$.each($(".owl-item:not(.active) .start_animation",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("start_animation")}),$.each($(".owl-item:not(.active) .already-animated",$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeClass("already-animated")}),$.each($('.owl-item:not(.active) [data-animated="yes"]',$(event.target)),function(index,val){$(val).closest(".uncode-slider").length&&$(val).removeAttr("data-animated")}),$.each($(".owl-item:not(.active)",thiis),function(index,val){$(val).attr("data-index")!=currentIndex&&($(".start_animation:not(.t-inside)",val).removeClass("start_animation"),$(".already-animated:not(.t-inside)",val).removeClass("already-animated")),$(val).attr("data-index")!=currentIndex&&$('[data-animated="yes"]:not(.t-inside)',val).removeClass("start_animation"),$(val).attr("data-index")==currentIndex&&$(".animate_when_almost_visible:not(.t-inside), .animate_inner_when_almost_visible:not(.t-inside)",val).addClass("start_animation")}),UNCODE.isMobile&&thiis.removeClass("owl-translating"),setIndexActive(event)}),UNCODE.wwidth<UNCODE.mediaQuery&&$(this).data("stagepadding")>25&&(values.stagepadding=25),$elSelector.not(".showControls").owlCarousel({items:values.items,animateIn:values["fade"]==1?"fadeIn":null,animateOut:values["fade"]==1?"fadeOut":null,nav:values.nav,dots:values.dots,loop:values.loop,stagePadding:values.stagepadding,margin:0,video:!0,autoWidth:!1,autoplay:!1,autoplayTimeout:values.timeout,autoplaySpeed:values.navspeed,autoplayHoverPause:$(this).closest(".uncode-slider").length?!1:!0,autoHeight:$(this).hasClass("owl-height-equal")?!1:values.autoheight,rtl:$("body").hasClass("rtl")?!0:!1,fluidSpeed:!0,navSpeed:values.navspeed,dotsSpeed:values.navspeed/values.items,navClass:["owl-prev"+values.navskin,"owl-next"+values.navskin],navText:['<div class="owl-nav-container btn-default btn-hover-nobg"><i class="fa fa-fw fa-angle-left"></i></div>','<div class="owl-nav-container btn-default btn-hover-nobg"><i class="fa fa-fw fa-angle-right"></i></div>'],navContainer:values.nav&&!SiteParameters.is_frontend_editor?$elSelector:!1,responsiveClass:!0,responsiveBaseElement:".box-container",responsive:{0:{items:values.sm,nav:values.navmobile,dots:values.dotsmobile,dotsSpeed:values.navspeed/values.sm},480:{items:values.sm,nav:values.navmobile,dots:values.dotsmobile,dotsSpeed:values.navspeed/values.sm},570:{items:values.md,nav:values.navmobile,dots:values.dotsmobile,dotsSpeed:values.navspeed/values.md},960:{items:values.lg,dotsSpeed:values.navspeed/values.lg}}});var transDuration=parseFloat(values.navspeed)*.3,transDuration2=parseFloat(values.navspeed)*.8;$(".owl-item .tmb",$elSelector).css({"-webkit-transition-delay":transDuration+"ms","-moz-transition-delay":transDuration+"ms","-o-transition-delay":transDuration+"ms","transition-delay":transDuration+"ms","-webkit-transition-duration":transDuration2+"ms","-moz-transition-duration":transDuration2+"ms","-o-transition-duration":transDuration2+"ms","transition-duration":transDuration2+"ms"}),requestTimeout(function(){for(var i=$owlInsideEqual.length-1;i>=0;i--)UNCODE.setRowHeight($owlInsideEqual[i])},300),$(window).on("load",function(){var $elCarousel=$elSelector.data("owl.carousel");if(typeof $elCarousel!="undefined"){$elCarousel.trigger("refreshed");for(var i=$owlInsideEqual.length-1;i>=0;i--)UNCODE.setRowHeight($owlInsideEqual[i])}}),$(document.body).on("added-owl-item",function(e,carousel_id,$new_slide,randId){$("#"+carousel_id).data("added-id")!=randId&&($("#"+carousel_id).data("added-id",randId).trigger("add.owl.carousel",$new_slide).trigger("refresh.owl.carousel"),$("#"+carousel_id).find(".owl-item").each(function(){var $item=$(this),index=$item.index()+1;$item.attr("data-index",index)}))}),$("body").hasClass("compose-mode")&&typeof window.parent.vc!="undefined"&&window.parent.vc.events.on("removed-owl-item",function(carousel_id,item_index,randId){$("#"+carousel_id).data("added-id")!=randId&&($("#"+carousel_id).data("added-id",randId).trigger("remove.owl.carousel",[item_index-1]).trigger("refresh.owl.carousel"),$("#"+carousel_id).find(".owl-item").each(function(){var $item=$(this),index=$item.index()+1;$item.attr("data-index",index)}))})})})},UNCODE.owlPlayVideo=function(carousel){var player,iframe;$(".owl-item.active .uncode-video-container",carousel).each(function(index,val){var content=$(val).html();if(content==""){var getCloned=$('.owl-item:not(.active) .uncode-video-container[data-id="'+$(this).attr("data-id")+'"]').children().first().clone();$(val).append(getCloned)}if($(this).attr("data-provider")=="vimeo")iframe=$(this).find("iframe"),player=$f(iframe[0]),player.api("play");else if($(this).attr("data-provider")=="youtube")youtubePlayers[$(this).attr("data-id")]!=undefined&&youtubePlayers[$(this).attr("data-id")].playVideo();else{var player=$(this).find("video");player.length&&($(this).find("video")[0].volume=0,$(this).find("video")[0].play(),$(val).css("opacity",1))}})},UNCODE.owlStopVideo=function(carousel){$(".owl-item .uncode-video-container",carousel).each(function(index,val){var player,iframe;if($(this).attr("data-provider")=="vimeo")iframe=$(this).find("iframe"),player=$f(iframe[0]),player.api("pause");else if($(this).attr("data-provider")=="youtube")youtubePlayers[$(this).attr("data-id")]!=undefined&&youtubePlayers[$(this).attr("data-id")].pauseVideo();else{var player=$(this).find("video");player.length&&($(this).find("video")[0].volume=0,$(this).find("video")[0].play())}})}})(jQuery)
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Генерация страницы: 0.03 |
proxy
|
phpinfo
|
Настройка