var FPF_Update_Notice=function(){function e(){this.init()}var t=e.prototype;return t.init=function(){this.getContainer()&&(this.initEvents(),this.load())},t.initEvents=function(){document.addEventListener("click",function(e){this.onClose(e)}.bind(this))},t.onClose=function(e){e.target.closest(".fpf-update-notice-wrapper--actions--notice-close")&&(e.preventDefault(),FPF_Cookie.set("fpf_update_notice_hidden","1",1),document.querySelector(".fpf-update-notice-wrapper").remove())},t.getContainer=function(){return document.querySelector(".fpframework-admin-container--content")||document.querySelector(".fpf-page-content")},t.load=function(){var n=this.getContainer(),t={action:"fpf_show_update_notice",nonce:fpf_js_object.nonce,plugin_name:fpf_update_notice_js_object.plugin_name,plugin_alias:fpf_update_notice_js_object.plugin_alias,plugin_version:fpf_update_notice_js_object.plugin_version},e=Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&");fetch(fpf_js_object.ajax_url+"?"+e).then(function(e){return e.json()}).then(function(e){if(e.html){if(!FPF_Cookie.get("fpf_update_notice_hidden")){var t=document.createElement("div");t.innerHTML=e.html,n.insertBefore(t.firstChild,n.firstChild)}n.parentElement.querySelector(".fpf-plugin-version-updated")&&(n.parentElement.querySelector(".fpf-plugin-version-updated").classList.add("hidden"),n.parentElement.querySelector(".fpf-plugin-version-outdated").classList.remove("hidden"))}})},e}();document.addEventListener("DOMContentLoaded",function(e){new FPF_Update_Notice});

