AlkantarClanX12
Current Path : /home/thanudqk/siampokernew.org/wp-content/plugins/wp-optimize/js/ |
Current File : /home/thanudqk/siampokernew.org/wp-content/plugins/wp-optimize/js/minify-3-1-4.min.js |
!function(e){var i=window.wp_optimize||{},t=i.send_command,n=wpoptimize.refresh_frequency||3e4;if(!t)return void console.error("WP-Optimize Minify: wp_optimize.send_command is required.");var s={};s.init=function(){function i(i){e('input[name="enable_defer_js"]').each(function(i,t){e(t).closest("fieldset").removeClass("selected").find(".defer-js-settings").slideUp("fast")}),e('input[name="enable_defer_js"]:checked').closest("fieldset").addClass("selected").find(".defer-js-settings").slideDown("fast")}var n=this;return this.enabled=!1,e(document).on("wp-optimize/minify/toggle-status",function(i,t){t.hasOwnProperty("enabled")&&(e('[data-whichpage="wpo_minify"]').toggleClass("is-enabled",t.enabled),n.enabled=t.enabled,n.enabled&&n.getFiles())}),e(".purge_minify_cache").click(function(){e.blockUI(),t("purge_minify_cache",null,function(e){n.updateFilesLists(e.files),n.updateStats(e.files)}).always(function(){e.unblockUI()})}),e(".purge_all_minify_cache").click(function(){e.blockUI(),t("purge_all_minify_cache",null,function(e){n.updateFilesLists(e.files),n.updateStats(e.files)}).always(function(){e.unblockUI()})}),e(".minify_increment_cache").click(function(){e.blockUI(),t("minify_increment_cache",null,function(e){e.hasOwnProperty("files")&&(n.updateFilesLists(e.files),n.updateStats(e.files)),console.log(e)}).always(function(){e.unblockUI()})}),e("input[type=checkbox].wpo-save-setting").on("change",function(i){var s=e(this),a=s.prop("checked"),o=s.prop("name"),l={};l[o]=a,e.blockUI(),t("save_minify_settings",l,function(e){e.success?(s.trigger("wp-optimize/minify/saved_setting"),e.hasOwnProperty("files")&&(n.updateFilesLists(e.files),n.updateStats(e.files))):console.log("Settings not saved",l)}).always(function(){e.unblockUI()})}),e("#wpo_min_enable_minify").on("wp-optimize/minify/saved_setting",function(){this.enabled=e(this).prop("checked"),e(document).trigger("wp-optimize/minify/toggle-status",{enabled:this.enabled})}),e("#wpo_min_enable_minify").on("wp-optimize/minify/saved_setting",function(){e(this).closest(".wpo_section").toggleClass("wpo-feature-is-disabled",!e(this).is(":checked"))}),e("#wpo_min_enable_minify_css, #wpo_min_enable_minify_js").on("wp-optimize/minify/saved_setting",function(){e('#wp-optimize-nav-tab-wrapper__wpo_minify a[data-tab="'+e(this).data("tabname")+'"] span.disabled').toggleClass("hidden",e(this).is(":checked"))}).each(function(){e('#wp-optimize-nav-tab-wrapper__wpo_minify a[data-tab="'+e(this).data("tabname")+'"] span.disabled').toggleClass("hidden",e(this).is(":checked"))}),e("#wpo_min_enable_minify_debug").on("wp-optimize/minify/saved_setting",function(){e.blockUI({message:"<h1>"+wpoptimize.page_refresh+"</h1>"}),location.href=e("#wp-optimize-nav-tab-wpo_minify-advanced").prop("href")}),e("#wpo_min_edit_default_exclutions").on("wp-optimize/minify/saved_setting",function(){e(".wpo-minify-default-exclusions").toggleClass("hidden",!e(this).prop("checked"))}),e(".wp-optimize-save-minify-settings").click(function(i){i.preventDefault();var s=e(this),a=s.closest("form"),o=s.next(),l=o.next();o.show(),e.blockUI();var c=e(a).serializeArray().reduce(function(e,i){return e[i.name]=i.value,e},{});e(a).find('input[type="checkbox"]').each(function(i){var t=e(this).attr("name");c[t]=e(this).is(":checked")?"true":"false"}),t("save_minify_settings",c,function(i){i.hasOwnProperty("error")?(console.log(i.error),e(".wpo-error__enabling-cache").removeClass("wpo_hidden").find("p").text(i.error.message)):e(".wpo-error__enabling-cache").addClass("wpo_hidden").find("p").text(""),i.hasOwnProperty("files")&&(n.updateFilesLists(i.files),n.updateStats(i.files)),o.hide(),l.show(),setTimeout(function(){l.fadeOut("slow",function(){l.hide()})},5e3)}).always(function(){e.unblockUI()})}),e(".wp-optimize-minify-status-information-notice").on("click",".notice-dismiss",function(e){e.preventDefault(),t("hide_minify_notice")}),e("#wpo_min_jsprocessed, #wpo_min_cssprocessed").on("click",".log",function(i){i.preventDefault(),e(this).nextAll(".wpo_min_log").slideToggle("fast")}),this.enabled=e("#wpo_min_enable_minify").prop("checked"),e(document).trigger("wp-optimize/minify/toggle-status",{enabled:this.enabled}),this.enabled||e('#wp-optimize-nav-tab-wrapper__wpo_minify a[data-tab="status"]').is(".nav-tab-active")||e('#wp-optimize-nav-tab-wrapper__wpo_minify a[data-tab="status"]').trigger("click"),e('input[name="enable_defer_js"]').on("change",i),i(),this},s.getFiles=function(){if(this.enabled){var e={stamp:(new Date).getTime()};t("get_minify_cached_files",e,function(e){s.updateFilesLists(e),s.updateStats(e)}),n&&setTimeout(s.getFiles.bind(this),n)}},s.updateFilesLists=function(i){var t=[];i.js.length>0&&e(i.js).each(function(){t.push(this.uid),0==e("#"+this.uid).length&&e("#wpo_min_jsprocessed ul.processed").append('\t\t\t\t\t<li id="'+this.uid+'">\t\t\t\t\t\t<span class="filename"><a href="'+this.file_url+'" target="_blank">'+this.filename+"</a> ("+this.fsize+')</span>\t\t\t\t\t\t<a href="#" class="log">'+wpoptimize.toggle_info+'</a>\t\t\t\t\t\t<div class="hidden wpo_min_log">'+this.log+"</div>\t\t\t\t\t</li>\t\t\t\t")}),e("#wpo_min_jsprocessed ul.processed .no-files-yet").toggle(!i.js.length),i.css.length>0&&e(i.css).each(function(){t.push(this.uid),0==e("#"+this.uid).length&&e("#wpo_min_cssprocessed ul.processed").append('\t\t\t\t\t<li id="'+this.uid+'">\t\t\t\t\t\t<span class="filename"><a href="'+this.file_url+'" target="_blank">'+this.filename+"</a> ("+this.fsize+')</span>\t\t\t\t\t\t<a href="#" class="log">'+wpoptimize.toggle_info+'</a>\t\t\t\t\t\t<div class="hidden wpo_min_log">'+this.log+"</div>\t\t\t\t\t</li>\t\t\t\t")}),e("#wpo_min_cssprocessed ul.processed .no-files-yet").toggle(!i.css.length),e("#wpo_min_jsprocessed ul.processed > li, #wpo_min_cssprocessed ul.processed > li").each(function(){-1==jQuery.inArray(e(this).attr("id"),t)&&(e(this).is(".no-files-yet")||e(this).remove())})},s.updateStats=function(i){i.cachesize.length>0&&(e("#wpo_min_cache_size").html(i.cachesize),e("#wpo_min_cache_total_size").html(i.total_cache_size),e("#wpo_min_cache_time").html(i.cacheTime),e("#wpo_min_cache_path").html(i.cachePath))},i.minify=s}(jQuery);