File: /home/altinkayamarble/www/wp-content/plugins/akeebabackupwp/app/media/js/solo/modal.min.js
/*
Copyright (c)2014-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
@license GNU General Public License version 3, or later
jsModal - A pure JavaScript modal dialog engine v1.0d
http://jsmodal.com/
Author: Henry Rune Tang Kai <henry@henrys.se>
(c) Copyright 2013 Henry Tang Kai.
License: http://www.opensource.org/licenses/mit-license.php
Date: 2013-7-11
Modified by Akeeba Ltd:
- [Oct 2016] Prefix "akeeba-modal-" instead of generic "modal-" to avoid conflicts with 3PD software e.g. Bootstrap.
- [Oct 2016] Remove support for AJAX content. We use our own AJAX handlers which work around 3PD plugins corrupting content.
? [Oct 2016] Added method show() which just calls open() for backwards compatibility reasons.
? [Oct 2016] Added parameter "inherit" where you can give a query selector for an element whose content will be inherited by the modal.
? [Oct 2016] open() returns the Modal object so that we can interact with it through external code.
? [Nov 2016] Added parameter "iframe" where you can give a URL to load inside an IFRAME.
*/
if("undefined"===typeof akeeba)var akeeba={};
"undefined"===typeof akeeba.Modal&&(akeeba.Modal=function(){var e={},c={},f=document.createElement("div"),a=document.createElement("div"),k=document.createElement("div"),h=document.createElement("div"),l=document.createElement("div"),m=null,q,v;e.show=function(b){try{console.log("Using akeeba.Modal.show() is deprecated. Use .open() instead.")}catch(d){}return e.open(b)};e.open=function(b){c.width=b.width||"auto";c.height=b.height||"auto";c.lock=b.lock||!1;c.hideClose=b.hideClose||!1;c.draggable=b.draggable||
!1;c.closeAfter=b.closeAfter||0;c.closeCallback=b.closeCallback||!1;c.openCallback=b.openCallback||!1;c.hideOverlay=b.hideOverlay||!1;q=function(){e.center({})};h.innerHTML="";var d=null;if(b.content)h.innerHTML=b.content;else if(b.inherit){if(d=b.inherit,"string"==typeof b.inherit&&(d=window.document.querySelector(b.inherit)),null!=d&&d.innerHTML)for(m=d;0<m.childNodes.length;)h.appendChild(m.childNodes[0])}else b.iframe&&(d=window.document.createElement("iframe"),d.setAttribute("src",b.iframe),
d.setAttribute("width",b.width-50),d.setAttribute("height",b.height-40),d.setAttribute("frameborder",0),d.setAttribute("marginheight",0),d.setAttribute("marginwidth",0),h.appendChild(d));a.style.display="block";a.style.width=c.width;a.style.height=c.height;e.center({});if(c.lock||c.hideClose)l.style.visibility="hidden";c.hideOverlay||(f.style.visibility="visible");a.style.visibility="visible";document.onkeypress=function(g){27===g.keyCode&&!0!==c.lock&&e.close()};l.onclick=function(){if(c.hideClose)return!1;
e.close()};f.onclick=function(){if(c.lock)return!1;e.close()};window.addEventListener?window.addEventListener("resize",q,!1):window.attachEvent&&window.attachEvent("onresize",q);c.draggable?(k.style.cursor="move",k.onmousedown=function(g){e.drag(g);return!1}):k.onmousedown=function(){return!1};0<c.closeAfter&&(v=window.setTimeout(function(){e.close()},1E3*c.closeAfter));c.openCallback&&c.openCallback();return this};e.drag=function(b){var d=void 0!==window.event?window.event.clientX:b.clientX,g=void 0!==
window.event?window.event.clientY:b.clientY,r=d-a.offsetLeft,n=g-a.offsetTop;document.onmousemove=function(p){d=void 0!==window.event?window.event.clientX:p.clientX;g=void 0!==window.event?window.event.clientY:p.clientY;a.style.left=0<d-r?d-r+"px":0;a.style.top=0<g-n?g-n+"px":0;document.onmouseup=function(){window.document.onmousemove=null}}};e.close=function(){if(!empty(m)){for(;0<h.childNodes.length;)m.appendChild(h.childNodes[0]);m=null}h.innerHTML="";f.setAttribute("style","");f.style.cssText=
"";f.style.visibility="hidden";a.setAttribute("style","");a.style.cssText="";a.style.display="none";a.style.visibility="hidden";k.style.cursor="default";l.setAttribute("style","");l.style.cssText="";v&&window.clearTimeout(v);c.closeCallback&&c.closeCallback();window.removeEventListener?window.removeEventListener("resize",q,!1):window.detachEvent&&window.detachEvent("onresize",q)};e.center=function(b){var d=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight),g=Math.max(a.clientWidth,
a.offsetWidth),r=Math.max(a.clientHeight,a.offsetHeight),n=0,p=0,t=0,u=0;"number"===typeof window.innerWidth?(n=window.innerWidth,p=window.innerHeight):document.documentElement&&document.documentElement.clientWidth&&(n=document.documentElement.clientWidth,p=document.documentElement.clientHeight);"number"===typeof window.pageYOffset?(u=window.pageYOffset,t=window.pageXOffset):document.body&&document.body.scrollLeft?(u=document.body.scrollTop,t=document.body.scrollLeft):document.documentElement&&document.documentElement.scrollLeft&&
(u=document.documentElement.scrollTop,t=document.documentElement.scrollLeft);b.horizontalOnly||(a.style.top=u+p/2-r/2+"px");a.style.left=t+n/2-g/2+"px";f.style.height=d+"px";f.style.width="100%"};f.setAttribute("id","akeeba-modal-overlay");a.setAttribute("id","akeeba-modal-container");k.setAttribute("id","akeeba-modal-header");h.setAttribute("id","akeeba-modal-content");l.setAttribute("id","akeeba-modal-close");k.appendChild(l);a.appendChild(k);a.appendChild(h);var w=document.querySelectorAll(".akeeba-renderer-fef--dark");
a.className="akeeba-renderer-fef akeeba-wp"+(0<w.length?" akeeba-renderer-fef--dark":"");a.style.zIndex="10000";f.style.zIndex="10000";f.style.visibility="hidden";a.style.display="none";a.style.visibility="hidden";window.addEventListener?window.addEventListener("load",function(){document.body.appendChild(f);document.body.appendChild(a)},!1):window.attachEvent&&window.attachEvent("onload",function(){document.body.appendChild(f);document.body.appendChild(a)});return e}()); //# sourceMappingURL=modal.min.map