(()=>{"use strict";class t{constructor(t){this.$element=t,this.key=t.data("key"),this.nonce=t.data("nonce"),this.$element.on("click",".notice-dismiss",(()=>this.onDismissClick()))}onDismissClick(){this.$element.remove(),jQuery.ajax({type:"POST",data:{action:"wpmtst_dismiss_notice",nonce:this.nonce,key:this.key},url:ajaxurl})}}Array.max=function(t){return Math.max.apply(Math,t)},jQuery(document).ready((function(t){t.fn.showInlineBlock=function(){return this.css("display","inline-block")},t("input[type=url]").on("change",(function(){this.value.length&&!/^https*:\/\//.test(this.value)&&(this.value="http://"+this.value)})),t("ul.ui-tabs-nav li a").on("click",(function(){t(this).trigger("blur")})),t(".focus-next-field").on("change",(function(i){t(i.target).is(":checked")&&t(i.target).parent().next().find("input").focus().trigger("select")})),t("#toggle-screen-options").add("#screenshot-screen-options").on("click",(function(i){t(this).trigger("blur"),t("#screenshot-screen-options").slideToggle()})),t("#toggle-help").on("click",(function(i){t(this).toggleClass("closed open").trigger("blur"),t("#help-section").slideToggle()})),t("table.wpm-testimonial_page_testimonial-views th.manage-column").on("click",(function(i){const e={action:"wpmtst_save_view_list_order",name:t(this).attr("id"),order:t(this).hasClass("asc")?"desc":t(this).hasClass("desc")?"asc":"",nonce:wpmtstAdminScriptNonce};t.post(ajaxurl,e,(function(t){}))})),t("table.wpm-testimonial_page_testimonial-views").on("click",".stickit",(function(i){const e=t(this);e.closest(".wp-list-table-wrap").find(".overlay").fadeIn(200),e.trigger("blur").toggleClass("stuck");const n={action:"wpmtst_save_view_sticky",id:t(this).closest("tr").find("td.id").html(),nonce:wpmtstAdminScriptNonce};t.post(ajaxurl,n,(function(t){t&&window.location.reload()}))}))})),window.wpmtstAdmin=new class{constructor(){this.initNotices()}initNotices(i=jQuery("body")){i.find(".wpmtst-notice").each((function(i){new t(jQuery(this))}))}}})();