Current File : /home/n742ef5/.trash/wp-content.3/plugins/security-malware-firewall/js/spbc-modal.min.js |
spbcModal={loaded:!1,loading:!1,opened:!1,opening:!1,load:function(e){this.loaded||(this.loading=!0,callback=function(e,t,o,d){spbcModal.loading=!1,spbcModal.loaded=e,document.dispatchEvent(new CustomEvent("spbcModalContentLoaded",{bubbles:!0}))},"function"==typeof spbc_sendAJAXRequest&&spbc_sendAJAXRequest({action:e},{callback:callback,notJson:!0}))},putError:function(e){this.put("<h2>The error occurred</h2><p>"+e+'</p><a style="text-align: left; margin-top: 40px;" target="_blank" href="https://wordpress.org/support/plugin/security-malware-firewall">Contact tech support</a>')},put:function(e){spbcModal.loading=!1,spbcModal.loaded=e,document.dispatchEvent(new CustomEvent("spbcModalContentLoaded",{bubbles:!0}))},open:function(){function e(){var e="";for(key in this.styles)e+=key+":"+this.styles[key]+";";return e}var t={styles:{"z-index":"9999",position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0,0,0,0.5)",display:"flex","justify-content":"center","align-items":"center"},toString:e},o={styles:{position:"relative",padding:"20px","max-width":"550px","max-height":"500px",background:"#FFF",border:"1px solid rgba(0,0,0,0.75)","border-radius":"4px","box-shadow":"7px 7px 5px 0px rgba(50,50,50,0.75)"},toString:e},d={styles:{position:"absolute",background:"#FFF",width:"20px",height:"20px",border:"2px solid rgba(0,0,0,0.75)","border-radius":"15px",cursor:"pointer",top:"-8px",right:"-8px"},toString:e},n={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(45deg)"},toString:e},s={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(-45deg)"},toString:e},a={styles:{"overflow-y":"auto","max-height":"460px","overflow-x":"hidden"},toString:e},l={styles:{overflow:"hidden"},toString:e},i=document.createElement("style"),l=(i.setAttribute("id","spbc-modal-styles"),i.innerHTML="body.spbc-modal-opened{"+l+"}",i.innerHTML+="#spbc-modal-overlay{"+t+"}",i.innerHTML+="#spbc-modal-close{"+d+"}",i.innerHTML+="#spbc-modal-close:before{"+n+"}",i.innerHTML+="#spbc-modal-close:after{"+s+"}",i.innerHTML+="#spbc-modal-content{"+a+"}",document.body.append(i),document.createElement("div")),t=(l.setAttribute("id","spbc-modal-overlay"),document.body.append(l),document.body.classList.add("spbc-modal-opened"),document.createElement("div")),d=(t.setAttribute("id","spbc-modal-inner"),t.setAttribute("style",o),l.append(t),document.createElement("div")),n=(d.setAttribute("id","spbc-modal-close"),t.append(d),document.createElement("div"));return this.loaded?n.innerHTML=this.loaded:n.innerHTML="Loading...",n.setAttribute("id","spbc-modal-content"),t.append(n),this.opened=!0,this},close:function(){spbcModal.loaded="",spbcModal.loading=!1,document.body.classList.remove("spbc-modal-opened"),document.getElementById("spbc-modal-overlay").remove(),document.getElementById("spbc-modal-styles").remove(),document.dispatchEvent(new CustomEvent("spbcModalClosed",{bubbles:!0}))}},document.addEventListener("click",function(e){(e.target&&"spbc-modal-overlay"===e.target.id||"spbc-modal-close"===e.target.id)&&spbcModal.close()}),document.addEventListener("spbcModalContentLoaded",function(e){spbcModal.opened&&spbcModal.loaded&&(document.getElementById("spbc-modal-content").innerHTML=spbcModal.loaded)});
//# sourceMappingURL=spbc-modal.min.js.map