AlkantarClanX12

Your IP : 18.221.238.204


Current Path : /home/thanudqk/www/wordpress_leaderboard/wp-content/themes/thegem/js/
Upload File :
Current File : /home/thanudqk/www/wordpress_leaderboard/wp-content/themes/thegem/js/tg-popups.min.js

!function(e){const o={setCookie(e,o,t){let i="";if(t){const e=new Date;e.setTime(e.getTime()+24*t*60*60*1e3),i="; expires="+e.toUTCString()}document.cookie=e+"="+(o||"")+"; path=/"+i+";"},getCookie(e){const o=document.cookie.split(";");for(const t of o)if(t.indexOf(e+"=")>-1)return t.split("=")[1];return null}};e((function(){e(".gem-popup").each((function(){(t=>{if(!(!t.show_on_mobile&&e(window).width()<768||!t.show_on_tablet&&e(window).width()>767&&e(window).width()<992)){if(t.show_after_x_page_views&&t.show_page_views>0){let e="pageViews"+t.id,i=1;if(o.getCookie(e)&&(i+=parseInt(o.getCookie(e))),i<t.show_page_views)return void o.setCookie(e,i,t.cookie_time)}if(t.show_up_to_x_times){let e="popupShown"+t.id;if(o.getCookie(e)&&parseInt(o.getCookie(e))>=t.show_popup_count)return}t.images_preloading&&e("#"+t.id).show().hide(),t.triggers.forEach((function(o){if("on_page_load"==o.trigger_type)e((function(){setTimeout(i,1e3*o.popup_delay)}));else if("on_scroll"==o.trigger_type){let t=e(window).scrollTop();const n=()=>{let s=e(window).scrollTop();"down"==o.scroll_direction&&s>t&&100*s/e(document).height()>parseInt(o.within)&&(i(),e(window).off("scroll",n)),"up"==o.scroll_direction&&s<t&&100*(e(document).height()-s-e(window).height())/e(document).height()>parseInt(o.within)&&(i(),e(window).off("scroll",n)),t=s};e(window).scroll(n)}else if("on_click"==o.trigger_type)e("#"+o.unique_id).on("click",(function(e){e.preventDefault(),i()}));else if("on_exit"==o.trigger_type){const o=t=>{!t.toElement&&!t.relatedTarget&&t.clientY<10&&(i(),e(document).off("mouseout",o))};e(document).on("mouseout",o)}else if("after_activity"==o.trigger_type){const t=()=>{let t;function n(){i(),e(document).off("mousemove",s),e(document).off("keypress",s)}function s(){clearTimeout(t),t=setTimeout(n,1e3*parseInt(o.inactivity))}e(window).on("load",s),e(document).on("mousemove",s),e(document).on("keypress",s)};e((function(){t()}))}}))}function i(){e.fancybox.open({src:"#"+t.id,type:"inline",opts:{animationEffect:""==t.animation_exit?"fade":"popup",animationDuration:""==t.animation_exit?366:500,slideClass:"fancybox-popup-wrapper",baseClass:"popup-overlay overlay-"+t.id,afterLoad:function(e,o){void 0!==window.tgpLazyItems&&window.tgpLazyItems.scrollHandle()},beforeShow:function(o,i){e(i.src).addClass("animate__popup_animated").removeClass("animate__popup_"+t.animation_exit).addClass("animate__popup_"+t.animation_entrance)},afterShow:function(e,i){if(t.show_up_to_x_times){let e="popupShown"+t.id,i=1;o.getCookie(e)&&(i+=parseInt(o.getCookie(e))),o.setCookie(e,i,t.cookie_time)}},beforeClose:function(o,i){e(i.src).removeClass("animate__popup_"+t.animation_entrance).addClass("animate__popup_"+t.animation_exit)}}})}})(e(this).data("popup-settings"))}))}))}(jQuery);