merge full screen key binding (f)
authorHakim El Hattab <hakim.elhattab@gmail.com>
Mon, 15 Oct 2012 00:17:49 +0000 (20:17 -0400)
committerHakim El Hattab <hakim.elhattab@gmail.com>
Mon, 15 Oct 2012 00:17:49 +0000 (20:17 -0400)
1  2 
js/reveal.js
js/reveal.min.js

diff --cc js/reveal.js
index 43e29f451895426848b7e7ec15ffd7c356259133,e95092e4aecf890df46f2a05a1415fa096aaeae7..3372029b4e2eb7708b38683f034140b6ab6c8137
@@@ -740,6 -734,6 +742,26 @@@ var Reveal = (function()
                return dom.wrapper.classList.contains( 'overview' );
        }
  
++      /**
++       * Handling the fullscreen functionality via the fullscreen API
++       * 
++       * @see http://fullscreen.spec.whatwg.org/ 
++       * @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode 
++       */
++      function enterFullscreen() {
++              var element = document.body;
++              
++              // Check which implementation is available
++              var requestMethod = element.requestFullScreen ||
++                                                      element.webkitRequestFullScreen ||
++                                                      element.mozRequestFullScreen ||
++                                                      element.msRequestFullScreen;
++              
++              if( requestMethod ) {
++                      requestMethod.apply( element );
++              }
++      }
++
        /**
         * Enters the paused mode which fades everything on screen to 
         * black.
                // another timeout
                cueAutoSlide();
        }
-       
 -      /**
 -       * Handling the fullscreen functionality via the fullscreen API
 -       * @see http://fullscreen.spec.whatwg.org/ 
 -       * @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode 
 -       */
 -      function enterFullscreen() {
 -              var element = document.body;
 -              
 -              // Check which implementation is available
 -              var requestMethod = element.requestFullScreen ||
 -                                                      element.webkitRequestFullScreen ||
 -                                                      element.mozRequestFullScreen ||
 -                                                      element.msRequestFullScreen;
 -              if (requestMethod) {
 -                      requestMethod.apply(element);
 -              }
 -      }
 -
        // Expose some methods publicly
        return {
                initialize: initialize,
index 14d3ab43f2a8157b224455b06cb9db2633901bdc,3338ba34d7b284ebd2641d29d64b2e9c599693e7..b4f40837191c64c0866a81ed0b957c55ffde6743
@@@ -4,76 -4,4 +4,77 @@@
   * MIT licensed
   * 
   * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
 - */var Reveal=function(){"use strict";function v(e){if(!l&&!f){document.body.setAttribute("class","no-transforms");return}x(n,e);m();g();y()}function m(){a.theme=document.querySelector("#theme");a.wrapper=document.querySelector(".reveal");if(!a.wrapper.querySelector(".progress")&&n.progress){var e=document.createElement("div");e.classList.add("progress");e.innerHTML="<span></span>";a.wrapper.appendChild(e)}if(!a.wrapper.querySelector(".controls")&&n.controls){var t=document.createElement("aside");t.classList.add("controls");t.innerHTML='<a class="left" href="#">&#x25C4;</a><a class="right" href="#">&#x25BA;</a><a class="up" href="#">&#x25B2;</a><a class="down" href="#">&#x25BC;</a>';a.wrapper.appendChild(t)}if(!a.wrapper.querySelector(".state-background")){var r=document.createElement("div");r.classList.add("state-background");a.wrapper.appendChild(r)}if(!a.wrapper.querySelector(".pause-overlay")){var i=document.createElement("div");i.classList.add("pause-overlay");a.wrapper.appendChild(i)}a.progress=document.querySelector(".reveal .progress");a.progressbar=document.querySelector(".reveal .progress span");if(n.controls){a.controls=document.querySelector(".reveal .controls");a.controlsLeft=document.querySelector(".reveal .controls .left");a.controlsRight=document.querySelector(".reveal .controls .right");a.controlsUp=document.querySelector(".reveal .controls .up");a.controlsDown=document.querySelector(".reveal .controls .down")}}function g(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";document.body.style.height="120%";window.addEventListener("load",C,!1);window.addEventListener("orientationchange",C,!1)}}function y(){function o(){head.js.apply(null,t);b()}var e=[],t=[];for(var r=0,i=n.dependencies.length;r<i;r++){var s=n.dependencies[r];if(!s.condition||s.condition()){s.async?t.push(s.src):e.push(s.src);typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],s.callback)}}if(e.length){head.ready(o);head.js.apply(null,e)}else o()}function b(){E();w();J();Y()}function w(){f===!1&&(n.transition="linear");n.controls&&a.controls&&(a.controls.style.display="block");n.progress&&a.progress&&(a.progress.style.display="block");if(n.theme&&a.theme){var e=a.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,r=e.match(t)[0];if(n.theme!==r){e=e.replace(t,n.theme);a.theme.setAttribute("href",e)}}n.transition!=="default"&&a.wrapper.classList.add(n.transition);if(n.mouseWheel){document.addEventListener("DOMMouseScroll",_,!1);document.addEventListener("mousewheel",_,!1)}n.rollingLinks&&H()}function E(){document.addEventListener("touchstart",A,!1);document.addEventListener("touchmove",O,!1);document.addEventListener("touchend",M,!1);window.addEventListener("hashchange",D,!1);n.keyboard&&document.addEventListener("keydown",L,!1);if(n.controls&&a.controls){a.controlsLeft.addEventListener("click",N(et),!1);a.controlsRight.addEventListener("click",N(tt),!1);a.controlsUp.addEventListener("click",N(nt),!1);a.controlsDown.addEventListener("click",N(rt),!1)}}function S(){document.removeEventListener("keydown",L,!1);document.removeEventListener("touchstart",A,!1);document.removeEventListener("touchmove",O,!1);document.removeEventListener("touchend",M,!1);window.removeEventListener("hashchange",D,!1);if(n.controls&&a.controls){a.controlsLeft.removeEventListener("click",N(et),!1);a.controlsRight.removeEventListener("click",N(tt),!1);a.controlsUp.removeEventListener("click",N(nt),!1);a.controlsDown.removeEventListener("click",N(rt),!1)}}function x(e,t){for(var n in t)e[n]=t[n]}function T(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function N(e){return function(t){t.preventDefault();e.call()}}function C(){setTimeout(function(){window.scrollTo(0,1)},0)}function k(e,t){var n=document.createEvent("HTMLEvents",1,2);n.initEvent(e,!0,!0);x(n,t);a.wrapper.dispatchEvent(n)}function L(e){if(document.querySelector(":focus")!==null||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey)return;var t=!0;switch(e.keyCode){case 80:case 33:it();break;case 78:case 34:st();break;case 72:case 37:et();break;case 76:case 39:tt();break;case 75:case 38:nt();break;case 74:case 40:rt();break;case 36:Z(0);break;case 35:Z(Number.MAX_VALUE);break;case 32:I()?j():st();break;case 13:I()?j():t=!1;break;case 66:case 190:U();break;case 70:ot();break;default:t=!1}if(t)e.preventDefault();else if(e.keyCode===27&&f){F();e.preventDefault()}Y()}function A(e){d.startX=e.touches[0].clientX;d.startY=e.touches[0].clientY;d.startCount=e.touches.length;e.touches.length===2&&(d.startSpan=T({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:d.startX,y:d.startY}))}function O(e){if(!d.handled){var t=e.touches[0].clientX,n=e.touches[0].clientY;if(e.touches.length===2&&d.startCount===2){var r=T({x:e.touches[1].clientX,y:e.touches[1].clientY},{x:d.startX,y:d.startY});if(Math.abs(d.startSpan-r)>d.threshold){d.handled=!0;r<d.startSpan?B():j()}}else if(e.touches.length===1){var i=t-d.startX,s=n-d.startY;if(i>d.threshold&&Math.abs(i)>Math.abs(s)){d.handled=!0;et()}else if(i<-d.threshold&&Math.abs(i)>Math.abs(s)){d.handled=!0;tt()}else if(s>d.threshold){d.handled=!0;nt()}else if(s<-d.threshold){d.handled=!0;rt()}}e.preventDefault()}else navigator.userAgent.match(/android/gi)&&e.preventDefault()}function M(e){d.handled=!1}function _(e){clearTimeout(c);c=setTimeout(function(){var t=e.detail||-e.wheelDelta;t>0?st():it()},100)}function D(e){J()}function P(e){if(I()){e.preventDefault();j();r=this.getAttribute("data-index-h");i=this.getAttribute("data-index-v");X()}}function H(){if(f&&!("msPerspective"in document.body.style)){var e=document.querySelectorAll(".reveal .slides section a:not(.image)");for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r.textContent&&!r.querySelector("img")&&(!r.className||!r.classList.contains(r,"roll"))){r.classList.add("roll");r.innerHTML='<span data-title="'+r.text+'">'+r.innerHTML+"</span>"}}}}function B(){if(n.overview){a.wrapper.classList.add("overview");var t=document.querySelectorAll(e);for(var s=0,o=t.length;s<o;s++){var u=t[s],f="translateZ(-2500px) translate("+(s-r)*105+"%, 0%)";u.setAttribute("data-index-h",s);u.style.display="block";u.style.WebkitTransform=f;u.style.MozTransform=f;u.style.msTransform=f;u.style.OTransform=f;u.style.transform=f;u.classList.contains("stack")||u.addEventListener("click",P,!0);var l=u.querySelectorAll("section");for(var c=0,h=l.length;c<h;c++){var p=l[c],d="translate(0%, "+(c-(s===r?i:0))*105+"%)";p.setAttribute("data-index-h",s);p.setAttribute("data-index-v",c);p.style.display="block";p.style.WebkitTransform=d;p.style.MozTransform=d;p.style.msTransform=d;p.style.OTransform=d;p.style.transform=d;p.addEventListener("click",P,!0)}}}}function j(){if(n.overview){a.wrapper.classList.remove("overview");var e=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));for(var t=0,r=e.length;t<r;t++){var i=e[t];i.style.WebkitTransform="";i.style.MozTransform="";i.style.msTransform="";i.style.OTransform="";i.style.transform="";i.removeEventListener("click",P)}X()}}function F(e){typeof e=="boolean"?e?B():j():I()?j():B()}function I(){return a.wrapper.classList.contains("overview")}function q(){a.wrapper.classList.add("paused")}function R(){a.wrapper.classList.remove("paused")}function U(){z()?R():q()}function z(){return a.wrapper.classList.contains("paused")}function W(e,t){var r=Array.prototype.slice.call(document.querySelectorAll(e)),i=r.length;if(i){if(n.loop){t%=i;t<0&&(t=i+t)}t=Math.max(Math.min(t,i-1),0);for(var s=0;s<i;s++){var o=r[s];if(I()===!1){var a=Math.abs((t-s)%(i-3))||0;o.style.display=a>3?"none":"block"}r[s].classList.remove("past");r[s].classList.remove("present");r[s].classList.remove("future");s<t?r[s].classList.add("past"):s>t&&r[s].classList.add("future");o.querySelector("section")&&r[s].classList.add("stack")}r[t].classList.add("present");var f=r[t].getAttribute("data-state");f&&(u=u.concat(f.split(" ")))}else t=0;return t}function X(f,l){s=o;var c=u.concat();u.length=0;var h=r,d=i;r=W(e,f===undefined?r:f);i=W(t,l===undefined?i:l);e:for(var v=0,m=u.length;v<m;v++){for(var g=0;g<c.length;g++)if(c[g]===u[v]){c.splice(g,1);continue e}document.documentElement.classList.add(u[v]);k(u[v])}while(c.length)document.documentElement.classList.remove(c.pop());n.progress&&a.progress&&(a.progressbar.style.width=r/(document.querySelectorAll(e).length-1)*window.innerWidth+"px");I()&&B();V();clearTimeout(p);p=setTimeout(K,1500);var y=document.querySelectorAll(e),b=y[r],w=b.querySelectorAll("section");o=w[i]||b;r!==h||i!==d?k("slidechanged",{indexh:r,indexv:i,previousSlide:s,currentSlide:o}):s=null;s&&s.classList.remove("present")}function V(){if(!n.controls||!a.controls)return;var e=$();[a.controlsLeft,a.controlsRight,a.controlsUp,a.controlsDown].forEach(function(e){e.classList.remove("enabled")});e.left&&a.controlsLeft.classList.add("enabled");e.right&&a.controlsRight.classList.add("enabled");e.up&&a.controlsUp.classList.add("enabled");e.down&&a.controlsDown.classList.add("enabled")}function $(){var n=document.querySelectorAll(e),s=document.querySelectorAll(t);return{left:r>0,right:r<n.length-1,up:i>0,down:i<s.length-1}}function J(){var e=window.location.hash,t=e.slice(2).split("/"),n=e.replace(/#|\//gi,"");if(isNaN(parseInt(t[0],10))&&n.length){var s=document.querySelector("#"+n);if(s){var o=Reveal.getIndices(s);Z(o.h,o.v)}else Z(r,i)}else{var u=parseInt(t[0],10)||0,a=parseInt(t[1],10)||0;Z(u,a)}}function K(){if(n.history){var e="/";if(r>0||i>0)e+=r;i>0&&(e+="/"+i);window.location.hash=e}}function Q(){if(document.querySelector(t+".present")){var n=document.querySelectorAll(t+".present .fragment:not(.visible)");if(n.length){n[0].classList.add("visible");k("fragmentshown",{fragment:n[0]});return!0}}else{var r=document.querySelectorAll(e+".present .fragment:not(.visible)");if(r.length){r[0].classList.add("visible");k("fragmentshown",{fragment:r[0]});return!0}}return!1}function G(){if(document.querySelector(t+".present")){var n=document.querySelectorAll(t+".present .fragment.visible");if(n.length){n[n.length-1].classList.remove("visible");k("fragmenthidden",{fragment:n[n.length-1]});return!0}}else{var r=document.querySelectorAll(e+".present .fragment.visible");if(r.length){r[r.length-1].classList.remove("visible");k("fragmenthidden",{fragment:r[r.length-1]});return!0}}return!1}function Y(){clearTimeout(h);n.autoSlide&&(h=setTimeout(st,n.autoSlide))}function Z(e,t){X(e,t)}function et(){(I()||G()===!1)&&X(r-1,0)}function tt(){(I()||Q()===!1)&&X(r+1,0)}function nt(){(I()||G()===!1)&&X(r,i-1)}function rt(){(I()||Q()===!1)&&X(r,i+1)}function it(){if(G()===!1)if($().up)nt();else{var e=document.querySelector(".reveal .slides>section.past:nth-child("+r+")");if(e){i=e.querySelectorAll("section").length+1||0;r--;X()}}}function st(){Q()===!1&&($().down?rt():tt());Y()}function ot(){var e=document.body,t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullScreen;t&&t.apply(e)}var e=".reveal .slides>section",t=".reveal .slides>section.present>section",n={controls:!0,progress:!0,history:!1,keyboard:!0,overview:!0,loop:!1,autoSlide:0,mouseWheel:!0,rollingLinks:!0,theme:null,transition:"default",dependencies:[]},r=0,i=0,s,o,u=[],a={},f="WebkitPerspective"in document.body.style||"MozPerspective"in document.body.style||"msPerspective"in document.body.style||"OPerspective"in document.body.style||"perspective"in document.body.style,l="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style,c=0,h=0,p=0,d={startX:0,startY:0,startSpan:0,startCount:0,handled:!1,threshold:40};return{initialize:v,navigateTo:Z,navigateLeft:et,navigateRight:tt,navigateUp:nt,navigateDown:rt,navigatePrev:it,navigateNext:st,toggleOverview:F,addEventListeners:E,removeEventListeners:S,getIndices:function(t){var n=r,s=i;if(t){var o=!!t.parentNode.nodeName.match(/section/gi),u=o?t.parentNode:t,a=Array.prototype.slice.call(document.querySelectorAll(e));n=Math.max(a.indexOf(u),0);o&&(s=Math.max(Array.prototype.slice.call(t.parentNode.children).indexOf(t),0))}return{h:n,v:s}},getPreviousSlide:function(){return s},getCurrentSlide:function(){return o},getQueryHash:function(){var e={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(t){e[t.split("=").shift()]=t.split("=").pop()});return e},addEventListener:function(e,t,n){"addEventListener"in window&&(a.wrapper||document.querySelector(".reveal")).addEventListener(e,t,n)},removeEventListener:function(e,t,n){"addEventListener"in window&&(a.wrapper||document.querySelector(".reveal")).removeEventListener(e,t,n)}}}();
 + */
- var Reveal=(function(){var l=".reveal .slides>section",b=".reveal .slides>section.present>section",R={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},Y=R.autoSlide,m=0,e=0,y,G,ai=[],f={},T="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,n="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,z=0,k=0,D=0,ab={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80};
- function i(aj){if((!n&&!T)){document.body.setAttribute("class","no-transforms");return;}t(R,aj);P();d();V();}function P(){f.theme=document.querySelector("#theme");
- f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&R.progress){var am=document.createElement("div");am.classList.add("progress");
- am.innerHTML="<span></span>";f.wrapper.appendChild(am);}if(!f.wrapper.querySelector(".controls")&&R.controls){var al=document.createElement("aside");al.classList.add("controls");
- al.innerHTML='<a class="left" href="#">&#x25C4;</a><a class="right" href="#">&#x25BA;</a><a class="up" href="#">&#x25B2;</a><a class="down" href="#">&#x25BC;</a>';
- f.wrapper.appendChild(al);}if(!f.wrapper.querySelector(".state-background")){var ak=document.createElement("div");ak.classList.add("state-background");
- f.wrapper.appendChild(ak);}if(!f.wrapper.querySelector(".pause-overlay")){var aj=document.createElement("div");aj.classList.add("pause-overlay");f.wrapper.appendChild(aj);
++var Reveal=(function(){var l=".reveal .slides>section",b=".reveal .slides>section.present>section",R={controls:true,progress:true,history:false,keyboard:true,overview:true,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},Y=R.autoSlide,m=0,e=0,y,G,aj=[],f={},T="WebkitPerspective" in document.body.style||"MozPerspective" in document.body.style||"msPerspective" in document.body.style||"OPerspective" in document.body.style||"perspective" in document.body.style,n="WebkitTransform" in document.body.style||"MozTransform" in document.body.style||"msTransform" in document.body.style||"OTransform" in document.body.style||"transform" in document.body.style,z=0,k=0,D=0,ac={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80};
++function i(ak){if((!n&&!T)){document.body.setAttribute("class","no-transforms");return;}t(R,ak);P();d();V();}function P(){f.theme=document.querySelector("#theme");
++f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&R.progress){var an=document.createElement("div");an.classList.add("progress");
++an.innerHTML="<span></span>";f.wrapper.appendChild(an);}if(!f.wrapper.querySelector(".controls")&&R.controls){var am=document.createElement("aside");am.classList.add("controls");
++am.innerHTML='<a class="left" href="#">&#x25C4;</a><a class="right" href="#">&#x25BA;</a><a class="up" href="#">&#x25B2;</a><a class="down" href="#">&#x25BC;</a>';
++f.wrapper.appendChild(am);}if(!f.wrapper.querySelector(".state-background")){var al=document.createElement("div");al.classList.add("state-background");
++f.wrapper.appendChild(al);}if(!f.wrapper.querySelector(".pause-overlay")){var ak=document.createElement("div");ak.classList.add("pause-overlay");f.wrapper.appendChild(ak);
 +}f.progress=document.querySelector(".reveal .progress");f.progressbar=document.querySelector(".reveal .progress span");if(R.controls){f.controls=document.querySelector(".reveal .controls");
 +f.controlsLeft=document.querySelector(".reveal .controls .left");f.controlsRight=document.querySelector(".reveal .controls .right");f.controlsUp=document.querySelector(".reveal .controls .up");
 +f.controlsDown=document.querySelector(".reveal .controls .down");}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
- document.body.style.height="120%";window.addEventListener("load",ac,false);window.addEventListener("orientationchange",ac,false);}}function V(){var ak=[],ao=[];
- for(var al=0,aj=R.dependencies.length;al<aj;al++){var am=R.dependencies[al];if(!am.condition||am.condition()){if(am.async){ao.push(am.src);}else{ak.push(am.src);
- }if(typeof am.callback==="function"){head.ready(am.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],am.callback);}}}function an(){head.js.apply(null,ao);H();}if(ak.length){head.ready(an);
- head.js.apply(null,ak);}else{an();}}function H(){E();K();J();N();}function K(){if(T===false){R.transition="linear";}if(R.controls&&f.controls){f.controls.style.display="block";
- }if(R.progress&&f.progress){f.progress.style.display="block";}if(R.theme&&f.theme){var al=f.theme.getAttribute("href");var aj=/[^\/]*?(?=\.css)/;var ak=al.match(aj)[0];
- if(R.theme!==ak){al=al.replace(aj,R.theme);f.theme.setAttribute("href",al);}}if(R.transition!=="default"){f.wrapper.classList.add(R.transition);}if(R.mouseWheel){document.addEventListener("DOMMouseScroll",p,false);
- document.addEventListener("mousewheel",p,false);}if(R.rollingLinks){M();}}function E(){document.addEventListener("touchstart",A,false);document.addEventListener("touchmove",ae,false);
- document.addEventListener("touchend",W,false);window.addEventListener("hashchange",w,false);if(R.keyboard){document.addEventListener("keydown",ag,false);
++document.body.style.height="120%";window.addEventListener("load",ad,false);window.addEventListener("orientationchange",ad,false);}}function V(){var al=[],ap=[];
++for(var am=0,ak=R.dependencies.length;am<ak;am++){var an=R.dependencies[am];if(!an.condition||an.condition()){if(an.async){ap.push(an.src);}else{al.push(an.src);
++}if(typeof an.callback==="function"){head.ready(an.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],an.callback);}}}function ao(){head.js.apply(null,ap);H();}if(al.length){head.ready(ao);
++head.js.apply(null,al);}else{ao();}}function H(){E();K();J();N();}function K(){if(T===false){R.transition="linear";}if(R.controls&&f.controls){f.controls.style.display="block";
++}if(R.progress&&f.progress){f.progress.style.display="block";}if(R.theme&&f.theme){var am=f.theme.getAttribute("href");var ak=/[^\/]*?(?=\.css)/;var al=am.match(ak)[0];
++if(R.theme!==al){am=am.replace(ak,R.theme);f.theme.setAttribute("href",am);}}if(R.transition!=="default"){f.wrapper.classList.add(R.transition);}if(R.mouseWheel){document.addEventListener("DOMMouseScroll",p,false);
++document.addEventListener("mousewheel",p,false);}if(R.rollingLinks){M();}}function E(){document.addEventListener("touchstart",A,false);document.addEventListener("touchmove",af,false);
++document.addEventListener("touchend",W,false);window.addEventListener("hashchange",w,false);if(R.keyboard){document.addEventListener("keydown",ah,false);
 +}if(R.controls&&f.controls){f.controlsLeft.addEventListener("click",q(B),false);f.controlsRight.addEventListener("click",q(j),false);f.controlsUp.addEventListener("click",q(u),false);
- f.controlsDown.addEventListener("click",q(F),false);}}function U(){document.removeEventListener("keydown",ag,false);document.removeEventListener("touchstart",A,false);
- document.removeEventListener("touchmove",ae,false);document.removeEventListener("touchend",W,false);window.removeEventListener("hashchange",w,false);if(R.controls&&f.controls){f.controlsLeft.removeEventListener("click",q(B),false);
++f.controlsDown.addEventListener("click",q(F),false);}}function U(){document.removeEventListener("keydown",ah,false);document.removeEventListener("touchstart",A,false);
++document.removeEventListener("touchmove",af,false);document.removeEventListener("touchend",W,false);window.removeEventListener("hashchange",w,false);if(R.controls&&f.controls){f.controlsLeft.removeEventListener("click",q(B),false);
 +f.controlsRight.removeEventListener("click",q(j),false);f.controlsUp.removeEventListener("click",q(u),false);f.controlsDown.removeEventListener("click",q(F),false);
- }}function t(ak,aj){for(var al in aj){ak[al]=aj[al];}}function S(al,aj){var am=al.x-aj.x,ak=al.y-aj.y;return Math.sqrt(am*am+ak*ak);}function q(aj){return function(ak){ak.preventDefault();
- aj.call();};}function ac(){setTimeout(function(){window.scrollTo(0,1);},0);}function r(ak,aj){var al=document.createEvent("HTMLEvents",1,2);al.initEvent(ak,true,true);
- t(al,aj);f.wrapper.dispatchEvent(al);}function ag(ak){if(document.querySelector(":focus")!==null||ak.shiftKey||ak.altKey||ak.ctrlKey||ak.metaKey){return;
- }var aj=true;switch(ak.keyCode){case 80:case 33:Z();break;case 78:case 34:x();break;case 72:case 37:B();break;case 76:case 39:j();break;case 75:case 38:u();
- break;case 74:case 40:F();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:L()?ad():x();break;case 13:L()?ad():aj=false;break;case 66:case 190:aa();
- break;default:aj=false;}if(aj){ak.preventDefault();}else{if(ak.keyCode===27&&T){X();ak.preventDefault();}}N();}function A(aj){ab.startX=aj.touches[0].clientX;
- ab.startY=aj.touches[0].clientY;ab.startCount=aj.touches.length;if(aj.touches.length===2&&R.overview){ab.startSpan=S({x:aj.touches[1].clientX,y:aj.touches[1].clientY},{x:ab.startX,y:ab.startY});
- }}function ae(ao){if(!ab.handled){var am=ao.touches[0].clientX;var al=ao.touches[0].clientY;if(ao.touches.length===2&&ab.startCount===2&&R.overview){var an=S({x:ao.touches[1].clientX,y:ao.touches[1].clientY},{x:ab.startX,y:ab.startY});
- if(Math.abs(ab.startSpan-an)>ab.threshold){ab.handled=true;if(an<ab.startSpan){I();}else{ad();}}ao.preventDefault();}else{if(ao.touches.length===1&&ab.startCount!==2){var ak=am-ab.startX,aj=al-ab.startY;
- if(ak>ab.threshold&&Math.abs(ak)>Math.abs(aj)){ab.handled=true;B();}else{if(ak<-ab.threshold&&Math.abs(ak)>Math.abs(aj)){ab.handled=true;j();}else{if(aj>ab.threshold){ab.handled=true;
- u();}else{if(aj<-ab.threshold){ab.handled=true;F();}}}}ao.preventDefault();}}}else{if(navigator.userAgent.match(/android/gi)){ao.preventDefault();}}}function W(aj){ab.handled=false;
- }function p(aj){clearTimeout(z);z=setTimeout(function(){var ak=aj.detail||-aj.wheelDelta;if(ak>0){x();}else{Z();}},100);}function w(aj){J();}function C(aj){if(L()){aj.preventDefault();
- ad();m=this.getAttribute("data-index-h");e=this.getAttribute("data-index-v");a();}}function M(){if(T&&!("msPerspective" in document.body.style)){var ak=document.querySelectorAll(".reveal .slides section a:not(.image)");
- for(var al=0,aj=ak.length;al<aj;al++){var am=ak[al];if(am.textContent&&!am.querySelector("img")&&(!am.className||!am.classList.contains(am,"roll"))){am.classList.add("roll");
- am.innerHTML='<span data-title="'+am.text+'">'+am.innerHTML+"</span>";}}}}function I(){if(R.overview){f.wrapper.classList.add("overview");var aj=document.querySelectorAll(l);
- for(var ao=0,am=aj.length;ao<am;ao++){var al=aj[ao],at="translateZ(-2500px) translate("+((ao-m)*105)+"%, 0%)";al.setAttribute("data-index-h",ao);al.style.display="block";
- al.style.WebkitTransform=at;al.style.MozTransform=at;al.style.msTransform=at;al.style.OTransform=at;al.style.transform=at;if(!al.classList.contains("stack")){al.addEventListener("click",C,true);
- }var ar=al.querySelectorAll("section");for(var an=0,ak=ar.length;an<ak;an++){var aq=ar[an],ap="translate(0%, "+((an-(ao===m?e:0))*105)+"%)";aq.setAttribute("data-index-h",ao);
- aq.setAttribute("data-index-v",an);aq.style.display="block";aq.style.WebkitTransform=ap;aq.style.MozTransform=ap;aq.style.msTransform=ap;aq.style.OTransform=ap;
- aq.style.transform=ap;aq.addEventListener("click",C,true);}}}}function ad(){if(R.overview){f.wrapper.classList.remove("overview");var am=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
- for(var al=0,aj=am.length;al<aj;al++){var ak=am[al];ak.style.WebkitTransform="";ak.style.MozTransform="";ak.style.msTransform="";ak.style.OTransform="";
- ak.style.transform="";ak.removeEventListener("click",C);}a();}}function X(aj){if(typeof aj==="boolean"){aj?I():ad();}else{L()?ad():I();}}function L(){return f.wrapper.classList.contains("overview");
- }function c(){f.wrapper.classList.add("paused");}function o(){f.wrapper.classList.remove("paused");}function aa(){if(af()){o();}else{c();}}function af(){return f.wrapper.classList.contains("paused");
- }function ah(am,ar){var ak=Array.prototype.slice.call(document.querySelectorAll(am)),aq=ak.length;if(aq){if(R.loop){ar%=aq;if(ar<0){ar=aq+ar;}}ar=Math.max(Math.min(ar,aq-1),0);
- for(var ao=0;ao<aq;ao++){var ap=ak[ao];if(L()===false){var aj=Math.abs((ar-ao)%(aq-3))||0;ap.style.display=aj>3?"none":"block";}ak[ao].classList.remove("past");
- ak[ao].classList.remove("present");ak[ao].classList.remove("future");if(ao<ar){ak[ao].classList.add("past");}else{if(ao>ar){ak[ao].classList.add("future");
- }}if(ap.querySelector("section")){ak[ao].classList.add("stack");}}ak[ar].classList.add("present");var al=ak[ar].getAttribute("data-state");if(al){ai=ai.concat(al.split(" "));
- }var an=ak[ar].getAttribute("data-autoslide");if(an){Y=parseInt(an);}else{Y=R.autoSlide;}}else{ar=0;}return ar;}function a(ap,au){y=G;var am=ai.concat();
- ai.length=0;var at=m,ak=e;m=ah(l,ap===undefined?m:ap);e=ah(b,au===undefined?e:au);stateLoop:for(var an=0,aq=ai.length;an<aq;an++){for(var al=0;al<am.length;
- al++){if(am[al]===ai[an]){am.splice(al,1);continue stateLoop;}}document.documentElement.classList.add(ai[an]);r(ai[an]);}while(am.length){document.documentElement.classList.remove(am.pop());
++}}function t(al,ak){for(var am in ak){al[am]=ak[am];}}function S(am,ak){var an=am.x-ak.x,al=am.y-ak.y;return Math.sqrt(an*an+al*al);}function q(ak){return function(al){al.preventDefault();
++ak.call();};}function ad(){setTimeout(function(){window.scrollTo(0,1);},0);}function r(al,ak){var am=document.createEvent("HTMLEvents",1,2);am.initEvent(al,true,true);
++t(am,ak);f.wrapper.dispatchEvent(am);}function ah(al){if(document.querySelector(":focus")!==null||al.shiftKey||al.altKey||al.ctrlKey||al.metaKey){return;
++}var ak=true;switch(al.keyCode){case 80:case 33:Z();break;case 78:case 34:x();break;case 72:case 37:B();break;case 76:case 39:j();break;case 75:case 38:u();
++break;case 74:case 40:F();break;case 36:O(0);break;case 35:O(Number.MAX_VALUE);break;case 32:L()?ae():x();break;case 13:L()?ae():ak=false;break;case 66:case 190:aa();
++break;case 70:ab();break;default:ak=false;}if(ak){al.preventDefault();}else{if(al.keyCode===27&&T){X();al.preventDefault();}}N();}function A(ak){ac.startX=ak.touches[0].clientX;
++ac.startY=ak.touches[0].clientY;ac.startCount=ak.touches.length;if(ak.touches.length===2&&R.overview){ac.startSpan=S({x:ak.touches[1].clientX,y:ak.touches[1].clientY},{x:ac.startX,y:ac.startY});
++}}function af(ap){if(!ac.handled){var an=ap.touches[0].clientX;var am=ap.touches[0].clientY;if(ap.touches.length===2&&ac.startCount===2&&R.overview){var ao=S({x:ap.touches[1].clientX,y:ap.touches[1].clientY},{x:ac.startX,y:ac.startY});
++if(Math.abs(ac.startSpan-ao)>ac.threshold){ac.handled=true;if(ao<ac.startSpan){I();}else{ae();}}ap.preventDefault();}else{if(ap.touches.length===1&&ac.startCount!==2){var al=an-ac.startX,ak=am-ac.startY;
++if(al>ac.threshold&&Math.abs(al)>Math.abs(ak)){ac.handled=true;B();}else{if(al<-ac.threshold&&Math.abs(al)>Math.abs(ak)){ac.handled=true;j();}else{if(ak>ac.threshold){ac.handled=true;
++u();}else{if(ak<-ac.threshold){ac.handled=true;F();}}}}ap.preventDefault();}}}else{if(navigator.userAgent.match(/android/gi)){ap.preventDefault();}}}function W(ak){ac.handled=false;
++}function p(ak){clearTimeout(z);z=setTimeout(function(){var al=ak.detail||-ak.wheelDelta;if(al>0){x();}else{Z();}},100);}function w(ak){J();}function C(ak){if(L()){ak.preventDefault();
++ae();m=this.getAttribute("data-index-h");e=this.getAttribute("data-index-v");a();}}function M(){if(T&&!("msPerspective" in document.body.style)){var al=document.querySelectorAll(".reveal .slides section a:not(.image)");
++for(var am=0,ak=al.length;am<ak;am++){var an=al[am];if(an.textContent&&!an.querySelector("img")&&(!an.className||!an.classList.contains(an,"roll"))){an.classList.add("roll");
++an.innerHTML='<span data-title="'+an.text+'">'+an.innerHTML+"</span>";}}}}function I(){if(R.overview){f.wrapper.classList.add("overview");var ak=document.querySelectorAll(l);
++for(var ap=0,an=ak.length;ap<an;ap++){var am=ak[ap],au="translateZ(-2500px) translate("+((ap-m)*105)+"%, 0%)";am.setAttribute("data-index-h",ap);am.style.display="block";
++am.style.WebkitTransform=au;am.style.MozTransform=au;am.style.msTransform=au;am.style.OTransform=au;am.style.transform=au;if(!am.classList.contains("stack")){am.addEventListener("click",C,true);
++}var at=am.querySelectorAll("section");for(var ao=0,al=at.length;ao<al;ao++){var ar=at[ao],aq="translate(0%, "+((ao-(ap===m?e:0))*105)+"%)";ar.setAttribute("data-index-h",ap);
++ar.setAttribute("data-index-v",ao);ar.style.display="block";ar.style.WebkitTransform=aq;ar.style.MozTransform=aq;ar.style.msTransform=aq;ar.style.OTransform=aq;
++ar.style.transform=aq;ar.addEventListener("click",C,true);}}}}function ae(){if(R.overview){f.wrapper.classList.remove("overview");var an=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
++for(var am=0,ak=an.length;am<ak;am++){var al=an[am];al.style.WebkitTransform="";al.style.MozTransform="";al.style.msTransform="";al.style.OTransform="";
++al.style.transform="";al.removeEventListener("click",C);}a();}}function X(ak){if(typeof ak==="boolean"){ak?I():ae();}else{L()?ae():I();}}function L(){return f.wrapper.classList.contains("overview");
++}function ab(){var ak=document.body;var al=ak.requestFullScreen||ak.webkitRequestFullScreen||ak.mozRequestFullScreen||ak.msRequestFullScreen;if(al){al.apply(ak);
++}}function c(){f.wrapper.classList.add("paused");}function o(){f.wrapper.classList.remove("paused");}function aa(){if(ag()){o();}else{c();}}function ag(){return f.wrapper.classList.contains("paused");
++}function ai(an,at){var al=Array.prototype.slice.call(document.querySelectorAll(an)),ar=al.length;if(ar){if(R.loop){at%=ar;if(at<0){at=ar+at;}}at=Math.max(Math.min(at,ar-1),0);
++for(var ap=0;ap<ar;ap++){var aq=al[ap];if(L()===false){var ak=Math.abs((at-ap)%(ar-3))||0;aq.style.display=ak>3?"none":"block";}al[ap].classList.remove("past");
++al[ap].classList.remove("present");al[ap].classList.remove("future");if(ap<at){al[ap].classList.add("past");}else{if(ap>at){al[ap].classList.add("future");
++}}if(aq.querySelector("section")){al[ap].classList.add("stack");}}al[at].classList.add("present");var am=al[at].getAttribute("data-state");if(am){aj=aj.concat(am.split(" "));
++}var ao=al[at].getAttribute("data-autoslide");if(ao){Y=parseInt(ao);}else{Y=R.autoSlide;}}else{at=0;}return at;}function a(aq,av){y=G;var an=aj.concat();
++aj.length=0;var au=m,al=e;m=ai(l,aq===undefined?m:aq);e=ai(b,av===undefined?e:av);stateLoop:for(var ao=0,ar=aj.length;ao<ar;ao++){for(var am=0;am<an.length;
++am++){if(an[am]===aj[ao]){an.splice(am,1);continue stateLoop;}}document.documentElement.classList.add(aj[ao]);r(aj[ao]);}while(an.length){document.documentElement.classList.remove(an.pop());
 +}if(R.progress&&f.progress){f.progressbar.style.width=(m/(document.querySelectorAll(l).length-1))*window.innerWidth+"px";}if(L()){I();}s();clearTimeout(D);
- D=setTimeout(h,1500);var aj=document.querySelectorAll(l);var ar=aj[m],ao=ar.querySelectorAll("section");G=ao[e]||ar;if(m!==at||e!==ak){r("slidechanged",{indexh:m,indexv:e,previousSlide:y,currentSlide:G});
- }else{y=null;}if(y){y.classList.remove("present");}}function s(){if(!R.controls||!f.controls){return;}var aj=g();[f.controlsLeft,f.controlsRight,f.controlsUp,f.controlsDown].forEach(function(ak){ak.classList.remove("enabled");
- });if(aj.left){f.controlsLeft.classList.add("enabled");}if(aj.right){f.controlsRight.classList.add("enabled");}if(aj.up){f.controlsUp.classList.add("enabled");
- }if(aj.down){f.controlsDown.classList.add("enabled");}}function g(){var aj=document.querySelectorAll(l),ak=document.querySelectorAll(b);return{left:m>0,right:m<aj.length-1,up:e>0,down:e<ak.length-1};
- }function J(){var ao=window.location.hash;var an=ao.slice(2).split("/"),al=ao.replace(/#|\//gi,"");if(isNaN(parseInt(an[0],10))&&al.length){var aj=document.querySelector("#"+al);
- if(aj){var ap=Reveal.getIndices(aj);O(ap.h,ap.v);}else{O(m,e);}}else{var am=parseInt(an[0],10)||0,ak=parseInt(an[1],10)||0;O(am,ak);}}function h(){if(R.history){var aj="/";
- if(m>0||e>0){aj+=m;}if(e>0){aj+="/"+e;}window.location.hash=aj;}}function v(){if(document.querySelector(b+".present")){var ak=document.querySelectorAll(b+".present .fragment:not(.visible)");
- if(ak.length){ak[0].classList.add("visible");r("fragmentshown",{fragment:ak[0]});return true;}}else{var aj=document.querySelectorAll(l+".present .fragment:not(.visible)");
- if(aj.length){aj[0].classList.add("visible");r("fragmentshown",{fragment:aj[0]});return true;}}return false;}function Q(){if(document.querySelector(b+".present")){var ak=document.querySelectorAll(b+".present .fragment.visible");
- if(ak.length){ak[ak.length-1].classList.remove("visible");r("fragmenthidden",{fragment:ak[ak.length-1]});return true;}}else{var aj=document.querySelectorAll(l+".present .fragment.visible");
- if(aj.length){aj[aj.length-1].classList.remove("visible");r("fragmenthidden",{fragment:aj[aj.length-1]});return true;}}return false;}function N(){clearTimeout(k);
- if(Y){k=setTimeout(x,Y);}}function O(ak,aj){a(ak,aj);}function B(){if(L()||Q()===false){a(m-1,0);}}function j(){if(L()||v()===false){a(m+1,0);}}function u(){if(L()||Q()===false){a(m,e-1);
- }}function F(){if(L()||v()===false){a(m,e+1);}}function Z(){if(Q()===false){if(g().up){u();}else{var aj=document.querySelector(".reveal .slides>section.past:nth-child("+m+")");
- if(aj){e=(aj.querySelectorAll("section").length+1)||0;m--;a();}}}}function x(){if(v()===false){g().down?F():j();}N();}return{initialize:i,navigateTo:O,navigateLeft:B,navigateRight:j,navigateUp:u,navigateDown:F,navigatePrev:Z,navigateNext:x,toggleOverview:X,addEventListeners:E,removeEventListeners:U,getIndices:function(aj){var an=m,al=e;
- if(aj){var ao=!!aj.parentNode.nodeName.match(/section/gi);var am=ao?aj.parentNode:aj;var ak=Array.prototype.slice.call(document.querySelectorAll(l));an=Math.max(ak.indexOf(am),0);
- if(ao){al=Math.max(Array.prototype.slice.call(aj.parentNode.children).indexOf(aj),0);}}return{h:an,v:al};},getPreviousSlide:function(){return y;},getCurrentSlide:function(){return G;
- },getQueryHash:function(){var aj={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(ak){aj[ak.split("=").shift()]=ak.split("=").pop();});return aj;
- },addEventListener:function(ak,al,aj){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(ak,al,aj);}},removeEventListener:function(ak,al,aj){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(ak,al,aj);
++D=setTimeout(h,1500);var ak=document.querySelectorAll(l);var at=ak[m],ap=at.querySelectorAll("section");G=ap[e]||at;if(m!==au||e!==al){r("slidechanged",{indexh:m,indexv:e,previousSlide:y,currentSlide:G});
++}else{y=null;}if(y){y.classList.remove("present");}}function s(){if(!R.controls||!f.controls){return;}var ak=g();[f.controlsLeft,f.controlsRight,f.controlsUp,f.controlsDown].forEach(function(al){al.classList.remove("enabled");
++});if(ak.left){f.controlsLeft.classList.add("enabled");}if(ak.right){f.controlsRight.classList.add("enabled");}if(ak.up){f.controlsUp.classList.add("enabled");
++}if(ak.down){f.controlsDown.classList.add("enabled");}}function g(){var ak=document.querySelectorAll(l),al=document.querySelectorAll(b);return{left:m>0,right:m<ak.length-1,up:e>0,down:e<al.length-1};
++}function J(){var ap=window.location.hash;var ao=ap.slice(2).split("/"),am=ap.replace(/#|\//gi,"");if(isNaN(parseInt(ao[0],10))&&am.length){var ak=document.querySelector("#"+am);
++if(ak){var aq=Reveal.getIndices(ak);O(aq.h,aq.v);}else{O(m,e);}}else{var an=parseInt(ao[0],10)||0,al=parseInt(ao[1],10)||0;O(an,al);}}function h(){if(R.history){var ak="/";
++if(m>0||e>0){ak+=m;}if(e>0){ak+="/"+e;}window.location.hash=ak;}}function v(){if(document.querySelector(b+".present")){var al=document.querySelectorAll(b+".present .fragment:not(.visible)");
++if(al.length){al[0].classList.add("visible");r("fragmentshown",{fragment:al[0]});return true;}}else{var ak=document.querySelectorAll(l+".present .fragment:not(.visible)");
++if(ak.length){ak[0].classList.add("visible");r("fragmentshown",{fragment:ak[0]});return true;}}return false;}function Q(){if(document.querySelector(b+".present")){var al=document.querySelectorAll(b+".present .fragment.visible");
++if(al.length){al[al.length-1].classList.remove("visible");r("fragmenthidden",{fragment:al[al.length-1]});return true;}}else{var ak=document.querySelectorAll(l+".present .fragment.visible");
++if(ak.length){ak[ak.length-1].classList.remove("visible");r("fragmenthidden",{fragment:ak[ak.length-1]});return true;}}return false;}function N(){clearTimeout(k);
++if(Y){k=setTimeout(x,Y);}}function O(al,ak){a(al,ak);}function B(){if(L()||Q()===false){a(m-1,0);}}function j(){if(L()||v()===false){a(m+1,0);}}function u(){if(L()||Q()===false){a(m,e-1);
++}}function F(){if(L()||v()===false){a(m,e+1);}}function Z(){if(Q()===false){if(g().up){u();}else{var ak=document.querySelector(".reveal .slides>section.past:nth-child("+m+")");
++if(ak){e=(ak.querySelectorAll("section").length+1)||0;m--;a();}}}}function x(){if(v()===false){g().down?F():j();}N();}return{initialize:i,navigateTo:O,navigateLeft:B,navigateRight:j,navigateUp:u,navigateDown:F,navigatePrev:Z,navigateNext:x,toggleOverview:X,addEventListeners:E,removeEventListeners:U,getIndices:function(ak){var ao=m,am=e;
++if(ak){var ap=!!ak.parentNode.nodeName.match(/section/gi);var an=ap?ak.parentNode:ak;var al=Array.prototype.slice.call(document.querySelectorAll(l));ao=Math.max(al.indexOf(an),0);
++if(ap){am=Math.max(Array.prototype.slice.call(ak.parentNode.children).indexOf(ak),0);}}return{h:ao,v:am};},getPreviousSlide:function(){return y;},getCurrentSlide:function(){return G;
++},getQueryHash:function(){var ak={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(al){ak[al.split("=").shift()]=al.split("=").pop();});return ak;
++},addEventListener:function(al,am,ak){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(al,am,ak);}},removeEventListener:function(al,am,ak){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(al,am,ak);
 +}}};})();