/*! * reveal.js Zoom plugin */const h={id:"zoom",init:function(n){n.getRevealElement().addEventListener("mousedown",function(o){var d=/Linux/.test(window.navigator.platform)?"ctrl":"alt",l=(n.getConfig().zoomKey?n.getConfig().zoomKey:d)+"Key",s=n.getConfig().zoomLevel?n.getConfig().zoomLevel:2;o[l]&&!n.isOverview()&&(o.preventDefault(),c.to({x:o.clientX,y:o.clientY,scale:s,pan:!1}))})},destroy:()=>{c.reset()}};var c=function(){var n=1,o=0,d=0,l=-1,s=-1,r="transform"in document.body.style;function m(e,t){var i=y();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);n=t,document.documentElement.classList&&(n!==1?document.documentElement.classList.add("zoomed"):document.documentElement.classList.remove("zoomed"))}function u(){var e=.12*window.innerWidth,t=.12*window.innerHeight,i=y();dwindow.innerHeight-t&&window.scroll(i.x,i.y+(1-(window.innerHeight-d)/t)*(14/n)),owindow.innerWidth-e&&window.scroll(i.x+(1-(window.innerWidth-o)/e)*(14/n),i.y)}function y(){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){n!==1&&e.keyCode===27&&c.out()}),document.addEventListener("mousemove",function(e){n!==1&&(o=e.clientX,d=e.clientY)}),{to:function(e){if(n!==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(u,1e3/60)},800)))}},out:function(){clearTimeout(l),clearInterval(s),m({x:0,y:0},1),n=1},magnify:function(e){this.to(e)},reset:function(){this.out()},zoomLevel:function(){return n}}}();/*! * zoom.js 0.3 (modified for use with reveal.js) * http://lab.hakim.se/zoom-js * MIT licensed * * Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se */const f=()=>h;export{f as default};