/*!
 * reveal.js Zoom plugin
 */var h={id:"zoom",init:function(o){o.getRevealElement().addEventListener("mousedown",function(n){var d=/Linux/.test(window.navigator.platform)?"ctrl":"alt",l=(o.getConfig().zoomKey?o.getConfig().zoomKey:d)+"Key",s=o.getConfig().zoomLevel?o.getConfig().zoomLevel:2;n[l]&&!o.isOverview()&&(n.preventDefault(),c.to({x:n.clientX,y:n.clientY,scale:s,pan:!1}))})},destroy:function(){c.reset()}},c=function(){var o=1,n=0,d=0,l=-1,s=-1,r="transform"in document.body.style;function m(e,t){var i=u();if(e.width=e.width||1,e.height=e.height||1,e.x-=(window.innerWidth-e.width*t)/2,e.y-=(window.innerHeight-e.height*t)/2,r)if(t===1)document.body.style.transform="";else{var w=i.x+"px "+i.y+"px",a="translate("+-e.x+"px,"+-e.y+"px) scale("+t+")";document.body.style.transformOrigin=w,document.body.style.transform=a}else t===1?(document.body.style.position="",document.body.style.left="",document.body.style.top="",document.body.style.width="",document.body.style.height="",document.body.style.zoom=""):(document.body.style.position="relative",document.body.style.left=-(i.x+e.x)/t+"px",document.body.style.top=-(i.y+e.y)/t+"px",document.body.style.width=100*t+"%",document.body.style.height=100*t+"%",document.body.style.zoom=t);o=t,document.documentElement.classList&&(o!==1?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function y(){var e=.12*window.innerWidth,t=.12*window.innerHeight,i=u();d<t?window.scroll(i.x,i.y-14/o*(1-d/t)):d>window.innerHeight-t&&window.scroll(i.x,i.y+(1-(window.innerHeight-d)/t)*(14/o)),n<e?window.scroll(i.x-14/o*(1-n/e),i.y):n>window.innerWidth-e&&window.scroll(i.x+(1-(window.innerWidth-n)/e)*(14/o),i.y)}function u(){return{x:window.scrollX!==void 0?window.scrollX:window.pageXOffset,y:window.scrollY!==void 0?window.scrollY:window.pageYOffset}}return r&&(document.body.style.transition="transform 0.8s ease"),document.addEventListener("keyup",function(e){o!==1&&e.keyCode===27&&c.out()}),document.addEventListener("mousemove",function(e){o!==1&&(n=e.clientX,d=e.clientY)}),{to:function(e){if(o!==1)c.out();else{if(e.x=e.x||0,e.y=e.y||0,e.element){var t=e.element.getBoundingClientRect();e.x=t.left-20,e.y=t.top-20,e.width=t.width+40,e.height=t.height+40}e.width!==void 0&&e.height!==void 0&&(e.scale=Math.max(Math.min(window.innerWidth/e.width,window.innerHeight/e.height),1)),e.scale>1&&(e.x*=e.scale,e.y*=e.scale,m(e,e.scale),e.pan!==!1&&(l=setTimeout(function(){s=setInterval(y,1e3/60)},800)))}},out:function(){clearTimeout(l),clearInterval(s),m({x:0,y:0},1),o=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return o}}}();function f(){return h}export{f as default};
