1var xt_widget_news={};jQuery(document).ready(function($){xt_widget_news={instances:{},cache:{},init:function(){this.pagination();this.featuredPosts($(document));this.featuredArticles();this.backgroundImages($(document));},pagination:function(){$('.xt-news-pagination').each(function(){xt_widget_news.setInstance(this);});},setInstance:function(elem){var inst={};inst.navigation=$(elem);inst.id=inst.navigation.data('instance');inst.type=inst.navigation.data('type');inst.position=inst.navigation.data('position');inst.animation=inst.navigation.data('animation').replace('_','');inst.animation_dir=inst.navigation.data('animationdir');inst.widget=$('#'+inst.id).find('.xt-widget-wrap');inst.target=$('#'+inst.id).find('.xt-ajax-wrap');inst.loader=$('#'+inst.id).find('.wait');inst.button;inst.page;inst.direction;inst.prev_link;inst.next_link;inst.current_link;inst.cache_enabled=parseInt($('#'+inst.id).closest('.check_cache').data('cache_enabled'));inst.flush_cache=parseInt($('#'+inst.id).closest('.check_cache').data('flush_cache'));inst.cache_id;inst.data=window[inst.id];inst.animations=[];inst.content=false;inst.ajaxing=false;xt_widget_news.instances[inst.id]=inst;inst.navigation.find('a, button').on('click',function(e){e.preventDefault();inst.loader.removeClass('hide') 2inst.navigation.addClass('hide') 3inst.button=$(this);if(inst.button.hasClass('page-disabled')||inst.ajaxing) 4return false;inst.page=inst.button.data('page');inst.direction=inst.button.data('direction');inst.cache_id=inst.id+'-'+inst.page;window[inst.id].page=inst.page;inst.data=window[inst.id];var onSuccess=function(data){if($(data).find('.xt-ajax-wrap').length>0){inst.content=$(data).find('.xt-ajax-wrap').html();}else{inst.content=false;} 5if(inst.content!==false){if(inst.type=='prev-next'){inst.target.html(inst.content);if(inst.position!='top-right'&&inst.position!='top-left') 6xt_widget_news.scrollToTop(inst.widget);}else{inst.loader.addClass('hide') 7inst.navigation.removeClass('hide') 8xt_widget_news.scrollToBottom(inst.button);inst.target.append(inst.content);} 9inst.prev_link=$(data).find('.previous-page');inst.next_link=$(data).find('.next-page');inst.current_link=$(data).find('.current-page');if(inst.navigation.find('.previous-page')){if(inst.prev_link&&!inst.prev_link.hasClass('page-disabled')){inst.navigation.find('.previous-page').removeClass('page-disabled').data('page',inst.prev_link.data('page'));}else{inst.navigation.find('.previous-page').addClass('page-disabled');}} 10if(inst.navigation.find('.next-page')){if(inst.next_link&&!inst.next_link.hasClass('page-disabled')){inst.navigation.find('.next-page').removeClass('page-disabled').data('page',inst.next_link.data('page'));if(inst.type=='infinite'&&inst.next_link.closest('.xt-news-pagination').data('type')=='load-more'){inst.type='load-more';inst.navigation.find('.next-page').html(inst.next_link.html()).unwrap();inst.navigation.off('inview');inst.navigation.data('type',inst.type).removeClass('type-infinite').addClass('type-'+inst.type);inst.loader.removeClass('infinite').addClass(inst.type);}}else{if(inst.type=='load-more'){inst.navigation.find('.next-page').remove();}else{inst.navigation.find('.next-page').addClass('page-disabled');}}} 11if(inst.navigation.find('.current-page')){if(inst.current_link){inst.navigation.find('.current-page').data('page',inst.current_link.data('page')).html(inst.current_link.data('page'));}}}else{if(inst.type!='prev-next'){inst.navigation.fadeOut();}} 12inst.widget.removeClass('loading loading-more');if(inst.type=='prev-next'){xt_widget_news.removeAnimations(inst);if(inst.button.hasClass('next-page')){xt_widget_news.animateIn(inst,'next');}else{xt_widget_news.animateIn(inst,'prev');}} 13setTimeout(function(){xt_widget_news.featuredPosts(inst.target);xt_widget_news.backgroundImages(inst.target);inst.target.trigger("xt_news:loaded");},100);};inst.widget.addClass('loading');if(inst.type=='prev-next'){inst.target.css('min-height',inst.target.height());xt_widget_news.removeAnimations(inst);if(inst.button.hasClass('next-page')){xt_widget_news.animateOut(inst,'next');}else{xt_widget_news.animateOut(inst,'prev');}}else{inst.widget.addClass('loading-more');} 14if(typeof(xt_widget_news.cache[inst.cache_id])!='undefined'){setTimeout(function(){onSuccess(xt_widget_news.cache[inst.cache_id]);},500);return false;} 15inst.ajaxing=true;$.ajax({url:xt_vars.ajaxurl,data:{action:'xt_widget_ajax_render',instance:inst.data,page:inst.page},type:'post',async:true,success:function(data){xt_widget_news.cache[inst.cache_id]=data;onSuccess(data);setTimeout(function(){inst.ajaxing=false;},500);}});});if(inst.type=='infinite'){inst.navigation.on('inview',function(event,
15isInView,visiblePartX,visiblePartY){if(isInView&&!inst.ajaxing){if(visiblePartY==='bottom'||visiblePartY==='both'){inst.navigation.find('a, button').trigger('click');}}});} 16if(inst.cache_enabled==1){if(inst.flush_cache==1){xt_storage.remove('xt_widget_cache');} 17$(window).load(function(){xt_widget_news.cache=xt_storage.get('xt_widget_cache');if(xt_widget_news.cache===null){xt_widget_news.cache={};}});$(window).unload(function(){if(xt_widget_news.cache===null){xt_widget_news.cache={};} 18xt_storage.set('xt_widget_cache',xt_widget_news.cache);});}else{xt_storage.remove('xt_widget_cache');} 19$(window).on('resize',function(){inst.target.css('min-height','');});},removeAnimations:function(inst){$.each(inst.animations,function(index,value){inst.target.removeClass(value);});},animateIn:function(inst,direction){direction=xt_widget_news.getAnimationDirection(inst,direction) 20if(inst.animation==''||direction=='') 21return false;var animation_class='animated '+inst.animation+'In'+direction;inst.target.addClass(animation_class);inst.animations.push(animation_class);},animateOut:function(inst,direction){direction=xt_widget_news.getAnimationDirection(inst.animation_dir,direction) 22if(inst.animation==''||direction=='') 23return false;var animation_class='animated '+inst.animation+'Out'+direction;inst.target.addClass(animation_class);inst.animations.push(animation_class);},getAnimationDirection:function(inst,type){var direction='';if(inst.animation_dir=='left-right'){if(inst.animation=='flip'||inst.animation=='rotate'){direction='Y';}else{if(type=='next'){direction='Right';}else{direction='Left';}}}else if(inst.animation_dir=='up-down'){if(inst.animation=='flip'||inst.animation=='rotate'){direction='X';}else{if(type=='next'){direction='Down';}else{direction='Up';}}} 24return direction;},scrollToTop:function(elem){var scroll_to=elem.offset().top;scroll_to=this.adjustScroll(scroll_to);$('html,body').animate({scrollTop:scroll_to,easing:'ease-in'},400);},scrollToBottom:function(elem){var scroll_to=elem.offset().top+elem.outerHeight(true) 25scroll_to=this.adjustScroll(scroll_to);$('html,body').animate({scrollTop:scroll_to,easing:'ease-in'},400);},adjustScroll:function(top){var top_menu_fixed='.top-menu.sticky.fixed';var main_menu_fixed='.main-menu.sticky.fixed';var admin_bar='#wpadminbar';if($(top_menu_fixed).length>0){top=top-$(top_menu_fixed).outerHeight(true);} 26if($(main_menu_fixed).length>0){top=top-$(main_menu_fixed).outerHeight(true);} 27if($(admin_bar).length>0){top=top-$(admin_bar).outerHeight(true);} 28return top-100;},featuredPosts:function(target){var adjustHeight=function(obj){var height=0;$(obj).closest('.xt-widget-content').find('.column.last').each(function(){if($(this).outerHeight(true)>height) 29height=$(this).outerHeight(true);});if(height>0){$(obj).css({height:height});$(obj).addClass('custom-height').removeClass('auto-height');}};target.find('.has-background.auto-height').each(function(){var $this=$(this);adjustHeight($this);$(this).addClass('loaded');$(window).on('resize',function(){adjustHeight($this);});});},featuredArticles:function(){if($('.inner-page__featured-wrapper').length){const $filterItem=$('.inner-page__featured-wrapper .filters .btn--theme-filter');const $list=$('.inner-page__featured-wrapper .featured__list');$filterItem.on('click',function(){$filterItem.removeClass('btn--filter-active');$(this).addClass('btn--filter-active');$list.addClass('hide');$list.parent().find('.featured__list.'+$(this).data('section')).removeClass('hide');})}},backgroundImages:function(target){target.find('.has-background').on('mouseenter',function(e){var $bg=$(this);var newslist=$bg.closest('.news-list');var title=$bg.find('.xt-post-title');var excerpt=$bg.find('.xt-post-excerpt');var category=$bg.find('.xt-post-category');if(title.length>0&&newslist.hasClass('show-title-on-hover')) 30title.stop().slideDown(200);if(excerpt.length>0&&newslist.hasClass('show-excerpt-on-hover')) 31excerpt.stop().slideDown(200);if(category.length>0&&newslist.hasClass('show-category-on-hover')){category.stop().css({opacity:0,display:'inline-block'}).animate({opacity:1},200);}});target.find('.has-background').on('mouseleave',function(e){var $bg=$(this);var newslist=$bg.closest('.news-list');var title=$bg.find('.xt-post-title');var excerpt=$bg.find('.xt-post-excerpt');var category=$bg.find('.xt-post-category');if(title.length>0&&newslist.hasClass('show-title-on-hover')) 32title.stop().slideUp(100);if(excerpt.length>0&&newslist.hasClass('show-excerpt-on-hover')) 33excerpt.stop().slideUp(100);if(category.length>0&&newslist.hasClass('show-category-on-hover')){category.stop().fadeOut(100,function(){category.css({display:'none'})});}});}} 34xt_widget_news.init();});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.