correction to vertical centering and overview mode, clean up of vertical slide storage

This commit is contained in:
Hakim El Hattab 2012-11-10 15:28:34 -05:00
parent b4815a3a83
commit 891a66b5c4
3 changed files with 154 additions and 122 deletions

View File

@ -509,7 +509,6 @@ body {
width: 80%;
left: 50%;
top: 50%;
padding: 20px 0px;
overflow: visible;
z-index: 1;
@ -537,6 +536,7 @@ body {
display: none;
position: absolute;
width: 100%;
padding: 20px 0px;
z-index: 10;
line-height: 1.2em;
@ -579,10 +579,10 @@ body {
.reveal.center,
.reveal.center .slides {
min-height: auto;
padding: 0;
}
/*********************************************
* DEFAULT TRANSITION
*********************************************/
@ -1056,7 +1056,6 @@ body {
}
.reveal.overview .slides section {
padding: 20px 0;
height: 600px;
overflow: hidden;
opacity: 1!important;
@ -1078,13 +1077,12 @@ body {
.reveal.overview .slides section:hover {
background: rgba(0,0,0,0.3);
}
.reveal.overview .slides section.present {
background: rgba(0,0,0,0.3);
}
.reveal.overview .slides>section.stack {
background: none;
padding: 0;
background: none;
overflow: visible;
}

View File

@ -1,5 +1,5 @@
/*!
* reveal.js 2.2 r42
* reveal.js 2.2 r43
* http://lab.hakim.se/reveal-js
* MIT licensed
*
@ -519,6 +519,35 @@ var Reveal = (function(){
}
/**
* Stores the vertical index of a stack so that the same
* vertical slide can be selected when navigating to and
* from the stack.
*
* @param {HTMLElement} stack The vertical stack element
* @param {int} v Index to memorize
*/
function setPreviousVerticalIndex( stack, v ) {
if( stack ) {
stack.setAttribute( 'data-previous-indexv', v || 0 );
}
}
/**
* Retrieves the vertical index which was stored using
* #setPreviousVerticalIndex() or 0 if no previous index
* exists.
*
* @param {HTMLElement} stack The vertical stack element
*/
function getPreviousVerticalIndex( stack ) {
if( stack && stack.classList.contains( 'stack' ) ) {
return parseInt( stack.getAttribute( 'data-previous-indexv' ) || 0 );
}
return 0;
}
/**
* Displays the overview of slides (quick nav) by
* scaling down and arranging all slide elements.
@ -547,16 +576,15 @@ var Reveal = (function(){
hslide.style.OTransform = htransform;
hslide.style.transform = htransform;
if( !hslide.classList.contains( 'stack' ) ) {
// Navigate to this slide on click
hslide.addEventListener( 'click', onOverviewSlideClicked, true );
}
if( hslide.classList.contains( 'stack' ) ) {
var verticalSlides = hslide.querySelectorAll( 'section' );
for( var j = 0, len2 = verticalSlides.length; j < len2; j++ ) {
var verticalIndex = i === indexh ? indexv : getPreviousVerticalIndex( hslide );
var vslide = verticalSlides[j],
vtransform = 'translate(0%, ' + ( ( j - ( i === indexh ? indexv : 0 ) ) * 105 ) + '%)';
vtransform = 'translate(0%, ' + ( ( j - verticalIndex ) * 105 ) + '%)';
vslide.setAttribute( 'data-index-h', i );
vslide.setAttribute( 'data-index-v', j );
@ -572,6 +600,15 @@ var Reveal = (function(){
}
}
else {
// Navigate to this slide on click
hslide.addEventListener( 'click', onOverviewSlideClicked, true );
}
}
layout();
}
@ -604,7 +641,7 @@ var Reveal = (function(){
element.removeEventListener( 'click', onOverviewSlideClicked );
}
slide();
slide( indexh, indexv );
}
}
@ -706,14 +743,14 @@ var Reveal = (function(){
// If no vertical index is specified and the upcoming slide is a
// stack, resume at its previous vertical index
if( v === undefined && horizontalSlides[ h ] && horizontalSlides[ h ].classList.contains( 'stack' ) ) {
v = parseInt( horizontalSlides[ h ].getAttribute( 'data-previous-indexv' ) || 0 );
if( v === undefined ) {
v = getPreviousVerticalIndex( horizontalSlides[ h ] );
}
// If we were on a vertical stack, remember what vertical index
// it was on so we can resume at the same position when returning
if( previousSlide && previousSlide.parentNode.classList.contains( 'stack' ) ) {
previousSlide.parentNode.setAttribute( 'data-previous-indexv', indexv );
setPreviousVerticalIndex( previousSlide.parentNode, indexv );
}
// Remember the state before this slide
@ -1442,10 +1479,7 @@ var Reveal = (function(){
deactivateOverview();
indexh = this.getAttribute( 'data-index-h' );
indexv = this.getAttribute( 'data-index-v' );
slide();
slide( parseInt( this.getAttribute( 'data-index-h' ) ), parseInt( this.getAttribute( 'data-index-v' ) ) );
}
}

174
js/reveal.min.js vendored
View File

@ -1,96 +1,96 @@
/*!
* reveal.js 2.2 r42
* reveal.js 2.2 r43
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
*/
var Reveal=(function(){var ap=".reveal .slides section",m=".reveal .slides>section",b=".reveal .slides>section.present>section",V={controls:true,progress:true,history:false,keyboard:true,overview:true,center:false,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},ac=V.autoSlide,n=0,e=0,A,J,aq=[],f={},X="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,p="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,B=0,l=0,F=0,ah={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80};
function j(ar){if((!p&&!X)){document.body.setAttribute("class","no-transforms");return;}v(V,ar);d();Z();}function S(){f.theme=document.querySelector("#theme");
f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&V.progress){var av=document.createElement("div");av.classList.add("progress");
av.innerHTML="<span></span>";f.wrapper.appendChild(av);}if(!f.wrapper.querySelector(".controls")&&V.controls){var au=document.createElement("aside");au.classList.add("controls");
au.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>';f.wrapper.appendChild(au);
}if(!f.wrapper.querySelector(".state-background")){var at=document.createElement("div");at.classList.add("state-background");f.wrapper.appendChild(at);
}if(!f.wrapper.querySelector(".pause-overlay")){var ar=document.createElement("div");ar.classList.add("pause-overlay");f.wrapper.appendChild(ar);}f.progress=document.querySelector(".reveal .progress");
f.progressbar=document.querySelector(".reveal .progress span");if(V.controls){f.controls=document.querySelector(".reveal .controls");f.controlsLeft=I(document.querySelectorAll(".navigate-left"));
var Reveal=(function(){var ar=".reveal .slides section",m=".reveal .slides>section",b=".reveal .slides>section.present>section",W={controls:true,progress:true,history:false,keyboard:true,overview:true,center:false,loop:false,autoSlide:0,mouseWheel:true,rollingLinks:true,theme:null,transition:"default",dependencies:[]},ae=W.autoSlide,n=0,e=0,A,J,at=[],f={},Z="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,p="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,B=0,l=0,F=0,aj={startX:0,startY:0,startSpan:0,startCount:0,handled:false,threshold:80};
function j(au){if((!p&&!Z)){document.body.setAttribute("class","no-transforms");return;}v(W,au);d();ab();}function S(){f.theme=document.querySelector("#theme");
f.wrapper=document.querySelector(".reveal");if(!f.wrapper.querySelector(".progress")&&W.progress){var ax=document.createElement("div");ax.classList.add("progress");
ax.innerHTML="<span></span>";f.wrapper.appendChild(ax);}if(!f.wrapper.querySelector(".controls")&&W.controls){var aw=document.createElement("aside");aw.classList.add("controls");
aw.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>';f.wrapper.appendChild(aw);
}if(!f.wrapper.querySelector(".state-background")){var av=document.createElement("div");av.classList.add("state-background");f.wrapper.appendChild(av);
}if(!f.wrapper.querySelector(".pause-overlay")){var au=document.createElement("div");au.classList.add("pause-overlay");f.wrapper.appendChild(au);}f.progress=document.querySelector(".reveal .progress");
f.progressbar=document.querySelector(".reveal .progress span");if(W.controls){f.controls=document.querySelector(".reveal .controls");f.controlsLeft=I(document.querySelectorAll(".navigate-left"));
f.controlsRight=I(document.querySelectorAll(".navigate-right"));f.controlsUp=I(document.querySelectorAll(".navigate-up"));f.controlsDown=I(document.querySelectorAll(".navigate-down"));
f.controlsPrev=I(document.querySelectorAll(".navigate-prev"));f.controlsNext=I(document.querySelectorAll(".navigate-next"));}}function d(){if(navigator.userAgent.match(/(iphone|ipod|android)/i)){document.documentElement.style.overflow="scroll";
document.body.style.height="120%";window.addEventListener("load",ai,false);window.addEventListener("orientationchange",ai,false);}}function Z(){var at=[],ax=[];
for(var au=0,ar=V.dependencies.length;au<ar;au++){var av=V.dependencies[au];if(!av.condition||av.condition()){if(av.async){ax.push(av.src);}else{at.push(av.src);
}if(typeof av.callback==="function"){head.ready(av.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],av.callback);}}}function aw(){if(ax.length){head.js.apply(null,ax);
}K();}if(at.length){head.ready(aw);head.js.apply(null,at);}else{aw();}}function K(){S();G();N();T();M();R();setTimeout(function(){t("ready",{indexh:n,indexv:e,currentSlide:J});
},1);}function N(){if(X===false){V.transition="linear";}if(V.controls&&f.controls){f.controls.style.display="block";}if(V.progress&&f.progress){f.progress.style.display="block";
}if(V.transition!=="default"){f.wrapper.classList.add(V.transition);}if(V.center){f.wrapper.classList.add("center");}if(V.mouseWheel){document.addEventListener("DOMMouseScroll",q,false);
document.addEventListener("mousewheel",q,false);}if(V.rollingLinks){Q();}if(V.theme&&f.theme){var au=f.theme.getAttribute("href");var ar=/[^\/]*?(?=\.css)/;
var at=au.match(ar)[0];if(V.theme!==at){au=au.replace(ar,V.theme);f.theme.setAttribute("href",au);}}}function G(){document.addEventListener("touchstart",C,false);
document.addEventListener("touchmove",ak,false);document.addEventListener("touchend",aa,false);window.addEventListener("hashchange",y,false);window.addEventListener("resize",g,false);
if(V.keyboard){document.addEventListener("keydown",am,false);}if(V.progress&&f.progress){f.progress.addEventListener("click",s(an),false);}if(V.controls&&f.controls){f.controlsLeft.forEach(function(ar){ar.addEventListener("click",s(D),false);
});f.controlsRight.forEach(function(ar){ar.addEventListener("click",s(k),false);});f.controlsUp.forEach(function(ar){ar.addEventListener("click",s(w),false);
});f.controlsDown.forEach(function(ar){ar.addEventListener("click",s(H),false);});f.controlsPrev.forEach(function(ar){ar.addEventListener("click",s(ad),false);
});f.controlsNext.forEach(function(ar){ar.addEventListener("click",s(z),false);});}}function Y(){document.removeEventListener("keydown",am,false);document.removeEventListener("touchstart",C,false);
document.removeEventListener("touchmove",ak,false);document.removeEventListener("touchend",aa,false);window.removeEventListener("hashchange",y,false);window.removeEventListener("resize",g,false);
if(V.progress&&f.progress){f.progress.removeEventListener("click",s(an),false);}if(V.controls&&f.controls){f.controlsLeft.forEach(function(ar){ar.removeEventListener("click",s(D),false);
});f.controlsRight.forEach(function(ar){ar.removeEventListener("click",s(k),false);});f.controlsUp.forEach(function(ar){ar.removeEventListener("click",s(w),false);
});f.controlsDown.forEach(function(ar){ar.removeEventListener("click",s(H),false);});f.controlsPrev.forEach(function(ar){ar.removeEventListener("click",s(ad),false);
});f.controlsNext.forEach(function(ar){ar.removeEventListener("click",s(z),false);});}}function v(at,ar){for(var au in ar){at[au]=ar[au];}}function I(ar){return Array.prototype.slice.call(ar);
}function af(ar,au,at){ar.forEach(function(av){av[au].apply(av,at);});}function W(au,ar){var av=au.x-ar.x,at=au.y-ar.y;return Math.sqrt(av*av+at*at);}function s(ar){return function(at){at.preventDefault();
ar.call(null,at);};}function ai(){setTimeout(function(){window.scrollTo(0,1);},0);}function t(at,ar){var au=document.createEvent("HTMLEvents",1,2);au.initEvent(at,true,true);
v(au,ar);f.wrapper.dispatchEvent(au);}function Q(){if(X&&!("msPerspective" in document.body.style)){var at=document.querySelectorAll(ap+" a:not(.image)");
for(var au=0,ar=at.length;au<ar;au++){var av=at[au];if(av.textContent&&!av.querySelector("img")&&(!av.className||!av.classList.contains(av,"roll"))){av.classList.add("roll");
av.innerHTML='<span data-title="'+av.text+'">'+av.innerHTML+"</span>";}}}}function T(){if(V.center){var av=I(document.querySelectorAll(ap));var aw=-f.wrapper.offsetHeight/2;
for(var au=0,at=av.length;au<at;au++){var ar=av[au];if(ar.style.display==="none"){continue;}if(ar.classList.contains("stack")){ar.style.top=0;}else{ar.style.top=Math.max(-(ar.offsetHeight/2)-20,aw)+"px";
}}}}function L(){if(V.overview){f.wrapper.classList.add("overview");var ar=document.querySelectorAll(m);for(var ax=0,av=ar.length;ax<av;ax++){var au=ar[ax],aB="translateZ(-2500px) translate("+((ax-n)*105)+"%, 0%)";
au.setAttribute("data-index-h",ax);au.style.display="block";au.style.WebkitTransform=aB;au.style.MozTransform=aB;au.style.msTransform=aB;au.style.OTransform=aB;
au.style.transform=aB;if(!au.classList.contains("stack")){au.addEventListener("click",E,true);}var aA=au.querySelectorAll("section");for(var aw=0,at=aA.length;
aw<at;aw++){var az=aA[aw],ay="translate(0%, "+((aw-(ax===n?e:0))*105)+"%)";az.setAttribute("data-index-h",ax);az.setAttribute("data-index-v",aw);az.style.display="block";
az.style.WebkitTransform=ay;az.style.MozTransform=ay;az.style.msTransform=ay;az.style.OTransform=ay;az.style.transform=ay;az.addEventListener("click",E,true);
}}}}function aj(){if(V.overview){f.wrapper.classList.remove("overview");var av=I(document.querySelectorAll(ap));for(var au=0,ar=av.length;au<ar;au++){var at=av[au];
at.style.WebkitTransform="";at.style.MozTransform="";at.style.msTransform="";at.style.OTransform="";at.style.transform="";at.removeEventListener("click",E);
}a();}}function ab(ar){if(typeof ar==="boolean"){ar?L():aj();}else{O()?aj():L();}}function O(){return f.wrapper.classList.contains("overview");}function ag(){var ar=document.body;
var at=ar.requestFullScreen||ar.webkitRequestFullScreen||ar.mozRequestFullScreen||ar.msRequestFullScreen;if(at){at.apply(ar);}}function c(){f.wrapper.classList.add("paused");
}function r(){f.wrapper.classList.remove("paused");}function ae(){if(al()){r();}else{c();}}function al(){return f.wrapper.classList.contains("paused");
}function a(ay,aC){A=J;var ar=document.querySelectorAll(m);if(aC===undefined&&ar[ay]&&ar[ay].classList.contains("stack")){aC=parseInt(ar[ay].getAttribute("data-previous-indexv")||0);
}if(A&&A.parentNode.classList.contains("stack")){A.parentNode.setAttribute("data-previous-indexv",e);}var av=aq.concat();aq.length=0;var aB=n,au=e;n=ao(m,ay===undefined?n:ay);
e=ao(b,aC===undefined?e:aC);T();stateLoop:for(var aw=0,az=aq.length;aw<az;aw++){for(var at=0;at<av.length;at++){if(av[at]===aq[aw]){av.splice(at,1);continue stateLoop;
}}document.documentElement.classList.add(aq[aw]);t(aq[aw]);}while(av.length){document.documentElement.classList.remove(av.pop());}if(O()){L();}clearTimeout(F);
F=setTimeout(i,1500);var aA=ar[n],ax=aA.querySelectorAll("section");J=ax[e]||aA;if(n!==aB||e!==au){t("slidechanged",{indexh:n,indexv:e,previousSlide:A,currentSlide:J});
}else{A=null;}if(A){A.classList.remove("present");}u();o();}function ao(av,aA){var at=I(document.querySelectorAll(av)),az=at.length;if(az){if(V.loop){aA%=az;
if(aA<0){aA=az+aA;}}aA=Math.max(Math.min(aA,az-1),0);for(var ax=0;ax<az;ax++){var ay=at[ax];if(O()===false){var ar=Math.abs((aA-ax)%(az-3))||0;ay.style.display=ar>3?"none":"block";
}at[ax].classList.remove("past");at[ax].classList.remove("present");at[ax].classList.remove("future");if(ax<aA){at[ax].classList.add("past");}else{if(ax>aA){at[ax].classList.add("future");
}}if(ay.querySelector("section")){at[ax].classList.add("stack");}}at[aA].classList.add("present");var au=at[aA].getAttribute("data-state");if(au){aq=aq.concat(au.split(" "));
}var aw=at[aA].getAttribute("data-autoslide");if(aw){ac=parseInt(aw);}else{ac=V.autoSlide;}}else{aA=0;}return aA;}function o(){if(V.progress&&f.progress){var au=I(document.querySelectorAll(m));
var at=document.querySelectorAll(ap+":not(.stack)").length;var ar=0;mainLoop:for(var aw=0;aw<au.length;aw++){var ax=au[aw];var ay=I(ax.querySelectorAll("section"));
for(var av=0;av<ay.length;av++){if(ay[av].classList.contains("present")){break mainLoop;}ar++;}if(ax.classList.contains("present")){break;}if(ax.classList.contains("stack")===false){ar++;
}}f.progressbar.style.width=(ar/(at-1))*window.innerWidth+"px";}}function u(){if(V.controls&&f.controls){var ar=h();f.controlsLeft.concat(f.controlsRight).concat(f.controlsUp).concat(f.controlsDown).concat(f.controlsPrev).concat(f.controlsNext).forEach(function(at){at.classList.remove("enabled");
});if(ar.left){f.controlsLeft.forEach(function(at){at.classList.add("enabled");});}if(ar.right){f.controlsRight.forEach(function(at){at.classList.add("enabled");
});}if(ar.up){f.controlsUp.forEach(function(at){at.classList.add("enabled");});}if(ar.down){f.controlsDown.forEach(function(at){at.classList.add("enabled");
});}if(ar.left||ar.up){f.controlsPrev.forEach(function(at){at.classList.add("enabled");});}if(ar.right||ar.down){f.controlsNext.forEach(function(at){at.classList.add("enabled");
});}}}function h(){var ar=document.querySelectorAll(m),at=document.querySelectorAll(b);return{left:n>0,right:n<ar.length-1,up:e>0,down:e<at.length-1};}function M(){var ax=window.location.hash;
var aw=ax.slice(2).split("/"),at=ax.replace(/#|\//gi,"");if(isNaN(parseInt(aw[0],10))&&at.length){var au=document.querySelector("#"+at);if(au){var ay=Reveal.getIndices(au);
a(ay.h,ay.v);}else{a(n,e);}}else{var av=parseInt(aw[0],10)||0,ar=parseInt(aw[1],10)||0;a(av,ar);}}function i(){if(V.history){var ar="/";if(J&&typeof J.getAttribute("id")==="string"){ar="/"+J.getAttribute("id");
}else{if(n>0||e>0){ar+=n;}if(e>0){ar+="/"+e;}}window.location.hash=ar;}}function P(ar){var aw=n,au=e;if(ar){var ax=!!ar.parentNode.nodeName.match(/section/gi);
var av=ax?ar.parentNode:ar;var at=I(document.querySelectorAll(m));aw=Math.max(at.indexOf(av),0);if(ax){au=Math.max(I(ar.parentNode.children).indexOf(ar),0);
}}return{h:aw,v:au};}function x(){if(document.querySelector(b+".present")){var at=document.querySelectorAll(b+".present .fragment:not(.visible)");if(at.length){at[0].classList.add("visible");
t("fragmentshown",{fragment:at[0]});return true;}}else{var ar=document.querySelectorAll(m+".present .fragment:not(.visible)");if(ar.length){ar[0].classList.add("visible");
t("fragmentshown",{fragment:ar[0]});return true;}}return false;}function U(){if(document.querySelector(b+".present")){var at=document.querySelectorAll(b+".present .fragment.visible");
if(at.length){at[at.length-1].classList.remove("visible");t("fragmenthidden",{fragment:at[at.length-1]});return true;}}else{var ar=document.querySelectorAll(m+".present .fragment.visible");
if(ar.length){ar[ar.length-1].classList.remove("visible");t("fragmenthidden",{fragment:ar[ar.length-1]});return true;}}return false;}function R(){clearTimeout(l);
if(ac){l=setTimeout(z,ac);}}function D(){if(h().left&&O()||U()===false){a(n-1);}}function k(){if(h().right&&O()||x()===false){a(n+1);}}function w(){if(h().up&&O()||U()===false){a(n,e-1);
}}function H(){if(h().down&&O()||x()===false){a(n,e+1);}}function ad(){if(U()===false){if(h().up){w();}else{var ar=document.querySelector(m+".past:nth-child("+n+")");
if(ar){e=(ar.querySelectorAll("section").length+1)||undefined;n--;a();}}}}function z(){if(x()===false){h().down?H():k();}R();}function am(au){var at=document.activeElement;
var av=!!(document.activeElement&&(document.activeElement.type||document.activeElement.href||document.activeElement.contentEditable!=="inherit"));if(av||au.shiftKey||au.altKey||au.ctrlKey||au.metaKey){return;
}var ar=true;switch(au.keyCode){case 80:case 33:ad();break;case 78:case 34:z();break;case 72:case 37:D();break;case 76:case 39:k();break;case 75:case 38:w();
break;case 74:case 40:H();break;case 36:a(0);break;case 35:a(Number.MAX_VALUE);break;case 32:O()?aj():z();break;case 13:O()?aj():ar=false;break;case 66:case 190:ae();
break;case 70:ag();break;default:ar=false;}if(ar){au.preventDefault();}else{if(au.keyCode===27&&X){ab();au.preventDefault();}}R();}function C(ar){ah.startX=ar.touches[0].clientX;
ah.startY=ar.touches[0].clientY;ah.startCount=ar.touches.length;if(ar.touches.length===2&&V.overview){ah.startSpan=W({x:ar.touches[1].clientX,y:ar.touches[1].clientY},{x:ah.startX,y:ah.startY});
}}function ak(ax){if(!ah.handled){var av=ax.touches[0].clientX;var au=ax.touches[0].clientY;if(ax.touches.length===2&&ah.startCount===2&&V.overview){var aw=W({x:ax.touches[1].clientX,y:ax.touches[1].clientY},{x:ah.startX,y:ah.startY});
if(Math.abs(ah.startSpan-aw)>ah.threshold){ah.handled=true;if(aw<ah.startSpan){L();}else{aj();}}ax.preventDefault();}else{if(ax.touches.length===1&&ah.startCount!==2){var at=av-ah.startX,ar=au-ah.startY;
if(at>ah.threshold&&Math.abs(at)>Math.abs(ar)){ah.handled=true;D();}else{if(at<-ah.threshold&&Math.abs(at)>Math.abs(ar)){ah.handled=true;k();}else{if(ar>ah.threshold){ah.handled=true;
w();}else{if(ar<-ah.threshold){ah.handled=true;H();}}}}ax.preventDefault();}}}else{if(navigator.userAgent.match(/android/gi)){ax.preventDefault();}}}function aa(ar){ah.handled=false;
}function q(ar){clearTimeout(B);B=setTimeout(function(){var at=ar.detail||-ar.wheelDelta;if(at>0){z();}else{ad();}},100);}function an(at){var ar=I(document.querySelectorAll(m)).length;
var au=Math.floor((at.clientX/f.wrapper.offsetWidth)*ar);a(au);}function y(ar){M();}function g(ar){T();}function E(ar){if(O()){ar.preventDefault();aj();
n=this.getAttribute("data-index-h");e=this.getAttribute("data-index-v");a();}}return{initialize:j,slide:a,left:D,right:k,up:w,down:H,prev:ad,next:z,prevFragment:U,nextFragment:x,navigateTo:a,navigateLeft:D,navigateRight:k,navigateUp:w,navigateDown:H,navigatePrev:ad,navigateNext:z,toggleOverview:ab,addEventListeners:G,removeEventListeners:Y,getIndices:P,getPreviousSlide:function(){return A;
},getCurrentSlide:function(){return J;},getQueryHash:function(){var ar={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(at){ar[at.split("=").shift()]=at.split("=").pop();
});return ar;},addEventListener:function(at,au,ar){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(at,au,ar);
}},removeEventListener:function(at,au,ar){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(at,au,ar);
document.body.style.height="120%";window.addEventListener("load",ak,false);window.addEventListener("orientationchange",ak,false);}}function ab(){var av=[],az=[];
for(var aw=0,au=W.dependencies.length;aw<au;aw++){var ax=W.dependencies[aw];if(!ax.condition||ax.condition()){if(ax.async){az.push(ax.src);}else{av.push(ax.src);
}if(typeof ax.callback==="function"){head.ready(ax.src.match(/([\w\d_\-]*)\.?[^\\\/]*$/i)[0],ax.callback);}}}function ay(){if(az.length){head.js.apply(null,az);
}K();}if(av.length){head.ready(ay);head.js.apply(null,av);}else{ay();}}function K(){S();G();N();T();M();R();setTimeout(function(){t("ready",{indexh:n,indexv:e,currentSlide:J});
},1);}function N(){if(Z===false){W.transition="linear";}if(W.controls&&f.controls){f.controls.style.display="block";}if(W.progress&&f.progress){f.progress.style.display="block";
}if(W.transition!=="default"){f.wrapper.classList.add(W.transition);}if(W.center){f.wrapper.classList.add("center");}if(W.mouseWheel){document.addEventListener("DOMMouseScroll",q,false);
document.addEventListener("mousewheel",q,false);}if(W.rollingLinks){Q();}if(W.theme&&f.theme){var aw=f.theme.getAttribute("href");var au=/[^\/]*?(?=\.css)/;
var av=aw.match(au)[0];if(W.theme!==av){aw=aw.replace(au,W.theme);f.theme.setAttribute("href",aw);}}}function G(){document.addEventListener("touchstart",C,false);
document.addEventListener("touchmove",am,false);document.addEventListener("touchend",ac,false);window.addEventListener("hashchange",y,false);window.addEventListener("resize",g,false);
if(W.keyboard){document.addEventListener("keydown",ao,false);}if(W.progress&&f.progress){f.progress.addEventListener("click",s(ap),false);}if(W.controls&&f.controls){f.controlsLeft.forEach(function(au){au.addEventListener("click",s(D),false);
});f.controlsRight.forEach(function(au){au.addEventListener("click",s(k),false);});f.controlsUp.forEach(function(au){au.addEventListener("click",s(w),false);
});f.controlsDown.forEach(function(au){au.addEventListener("click",s(H),false);});f.controlsPrev.forEach(function(au){au.addEventListener("click",s(af),false);
});f.controlsNext.forEach(function(au){au.addEventListener("click",s(z),false);});}}function aa(){document.removeEventListener("keydown",ao,false);document.removeEventListener("touchstart",C,false);
document.removeEventListener("touchmove",am,false);document.removeEventListener("touchend",ac,false);window.removeEventListener("hashchange",y,false);window.removeEventListener("resize",g,false);
if(W.progress&&f.progress){f.progress.removeEventListener("click",s(ap),false);}if(W.controls&&f.controls){f.controlsLeft.forEach(function(au){au.removeEventListener("click",s(D),false);
});f.controlsRight.forEach(function(au){au.removeEventListener("click",s(k),false);});f.controlsUp.forEach(function(au){au.removeEventListener("click",s(w),false);
});f.controlsDown.forEach(function(au){au.removeEventListener("click",s(H),false);});f.controlsPrev.forEach(function(au){au.removeEventListener("click",s(af),false);
});f.controlsNext.forEach(function(au){au.removeEventListener("click",s(z),false);});}}function v(av,au){for(var aw in au){av[aw]=au[aw];}}function I(au){return Array.prototype.slice.call(au);
}function ah(au,aw,av){au.forEach(function(ax){ax[aw].apply(ax,av);});}function X(aw,au){var ax=aw.x-au.x,av=aw.y-au.y;return Math.sqrt(ax*ax+av*av);}function s(au){return function(av){av.preventDefault();
au.call(null,av);};}function ak(){setTimeout(function(){window.scrollTo(0,1);},0);}function t(av,au){var aw=document.createEvent("HTMLEvents",1,2);aw.initEvent(av,true,true);
v(aw,au);f.wrapper.dispatchEvent(aw);}function Q(){if(Z&&!("msPerspective" in document.body.style)){var av=document.querySelectorAll(ar+" a:not(.image)");
for(var aw=0,au=av.length;aw<au;aw++){var ax=av[aw];if(ax.textContent&&!ax.querySelector("img")&&(!ax.className||!ax.classList.contains(ax,"roll"))){ax.classList.add("roll");
ax.innerHTML='<span data-title="'+ax.text+'">'+ax.innerHTML+"</span>";}}}}function T(){if(W.center){var ax=I(document.querySelectorAll(ar));var ay=-f.wrapper.offsetHeight/2;
for(var aw=0,av=ax.length;aw<av;aw++){var au=ax[aw];if(au.style.display==="none"){continue;}if(au.classList.contains("stack")){au.style.top=0;}else{au.style.top=Math.max(-(au.offsetHeight/2)-20,ay)+"px";
}}}}function V(au,av){if(au){au.setAttribute("data-previous-indexv",av||0);}}function Y(au){if(au&&au.classList.contains("stack")){return parseInt(au.getAttribute("data-previous-indexv")||0);
}return 0;}function L(){if(W.overview){f.wrapper.classList.add("overview");var av=document.querySelectorAll(m);for(var aA=0,ay=av.length;aA<ay;aA++){var ax=av[aA],aE="translateZ(-2500px) translate("+((aA-n)*105)+"%, 0%)";
ax.setAttribute("data-index-h",aA);ax.style.display="block";ax.style.WebkitTransform=aE;ax.style.MozTransform=aE;ax.style.msTransform=aE;ax.style.OTransform=aE;
ax.style.transform=aE;if(ax.classList.contains("stack")){var aD=ax.querySelectorAll("section");for(var az=0,aw=aD.length;az<aw;az++){var au=aA===n?e:Y(ax);
var aC=aD[az],aB="translate(0%, "+((az-au)*105)+"%)";aC.setAttribute("data-index-h",aA);aC.setAttribute("data-index-v",az);aC.style.display="block";aC.style.WebkitTransform=aB;
aC.style.MozTransform=aB;aC.style.msTransform=aB;aC.style.OTransform=aB;aC.style.transform=aB;aC.addEventListener("click",E,true);}}else{ax.addEventListener("click",E,true);
}}T();}}function al(){if(W.overview){f.wrapper.classList.remove("overview");var ax=I(document.querySelectorAll(ar));for(var aw=0,au=ax.length;aw<au;aw++){var av=ax[aw];
av.style.WebkitTransform="";av.style.MozTransform="";av.style.msTransform="";av.style.OTransform="";av.style.transform="";av.removeEventListener("click",E);
}a(n,e);}}function ad(au){if(typeof au==="boolean"){au?L():al();}else{O()?al():L();}}function O(){return f.wrapper.classList.contains("overview");}function ai(){var au=document.body;
var av=au.requestFullScreen||au.webkitRequestFullScreen||au.mozRequestFullScreen||au.msRequestFullScreen;if(av){av.apply(au);}}function c(){f.wrapper.classList.add("paused");
}function r(){f.wrapper.classList.remove("paused");}function ag(){if(an()){r();}else{c();}}function an(){return f.wrapper.classList.contains("paused");
}function a(aA,aE){A=J;var au=document.querySelectorAll(m);if(aE===undefined){aE=Y(au[aA]);}if(A&&A.parentNode.classList.contains("stack")){V(A.parentNode,e);
}var ax=at.concat();at.length=0;var aD=n,aw=e;n=aq(m,aA===undefined?n:aA);e=aq(b,aE===undefined?e:aE);T();stateLoop:for(var ay=0,aB=at.length;ay<aB;ay++){for(var av=0;
av<ax.length;av++){if(ax[av]===at[ay]){ax.splice(av,1);continue stateLoop;}}document.documentElement.classList.add(at[ay]);t(at[ay]);}while(ax.length){document.documentElement.classList.remove(ax.pop());
}if(O()){L();}clearTimeout(F);F=setTimeout(i,1500);var aC=au[n],az=aC.querySelectorAll("section");J=az[e]||aC;if(n!==aD||e!==aw){t("slidechanged",{indexh:n,indexv:e,previousSlide:A,currentSlide:J});
}else{A=null;}if(A){A.classList.remove("present");}u();o();}function aq(ax,aC){var av=I(document.querySelectorAll(ax)),aB=av.length;if(aB){if(W.loop){aC%=aB;
if(aC<0){aC=aB+aC;}}aC=Math.max(Math.min(aC,aB-1),0);for(var az=0;az<aB;az++){var aA=av[az];if(O()===false){var au=Math.abs((aC-az)%(aB-3))||0;aA.style.display=au>3?"none":"block";
}av[az].classList.remove("past");av[az].classList.remove("present");av[az].classList.remove("future");if(az<aC){av[az].classList.add("past");}else{if(az>aC){av[az].classList.add("future");
}}if(aA.querySelector("section")){av[az].classList.add("stack");}}av[aC].classList.add("present");var aw=av[aC].getAttribute("data-state");if(aw){at=at.concat(aw.split(" "));
}var ay=av[aC].getAttribute("data-autoslide");if(ay){ae=parseInt(ay);}else{ae=W.autoSlide;}}else{aC=0;}return aC;}function o(){if(W.progress&&f.progress){var aw=I(document.querySelectorAll(m));
var av=document.querySelectorAll(ar+":not(.stack)").length;var au=0;mainLoop:for(var ay=0;ay<aw.length;ay++){var az=aw[ay];var aA=I(az.querySelectorAll("section"));
for(var ax=0;ax<aA.length;ax++){if(aA[ax].classList.contains("present")){break mainLoop;}au++;}if(az.classList.contains("present")){break;}if(az.classList.contains("stack")===false){au++;
}}f.progressbar.style.width=(au/(av-1))*window.innerWidth+"px";}}function u(){if(W.controls&&f.controls){var au=h();f.controlsLeft.concat(f.controlsRight).concat(f.controlsUp).concat(f.controlsDown).concat(f.controlsPrev).concat(f.controlsNext).forEach(function(av){av.classList.remove("enabled");
});if(au.left){f.controlsLeft.forEach(function(av){av.classList.add("enabled");});}if(au.right){f.controlsRight.forEach(function(av){av.classList.add("enabled");
});}if(au.up){f.controlsUp.forEach(function(av){av.classList.add("enabled");});}if(au.down){f.controlsDown.forEach(function(av){av.classList.add("enabled");
});}if(au.left||au.up){f.controlsPrev.forEach(function(av){av.classList.add("enabled");});}if(au.right||au.down){f.controlsNext.forEach(function(av){av.classList.add("enabled");
});}}}function h(){var au=document.querySelectorAll(m),av=document.querySelectorAll(b);return{left:n>0,right:n<au.length-1,up:e>0,down:e<av.length-1};}function M(){var az=window.location.hash;
var ay=az.slice(2).split("/"),av=az.replace(/#|\//gi,"");if(isNaN(parseInt(ay[0],10))&&av.length){var aw=document.querySelector("#"+av);if(aw){var aA=Reveal.getIndices(aw);
a(aA.h,aA.v);}else{a(n,e);}}else{var ax=parseInt(ay[0],10)||0,au=parseInt(ay[1],10)||0;a(ax,au);}}function i(){if(W.history){var au="/";if(J&&typeof J.getAttribute("id")==="string"){au="/"+J.getAttribute("id");
}else{if(n>0||e>0){au+=n;}if(e>0){au+="/"+e;}}window.location.hash=au;}}function P(au){var ay=n,aw=e;if(au){var az=!!au.parentNode.nodeName.match(/section/gi);
var ax=az?au.parentNode:au;var av=I(document.querySelectorAll(m));ay=Math.max(av.indexOf(ax),0);if(az){aw=Math.max(I(au.parentNode.children).indexOf(au),0);
}}return{h:ay,v:aw};}function x(){if(document.querySelector(b+".present")){var av=document.querySelectorAll(b+".present .fragment:not(.visible)");if(av.length){av[0].classList.add("visible");
t("fragmentshown",{fragment:av[0]});return true;}}else{var au=document.querySelectorAll(m+".present .fragment:not(.visible)");if(au.length){au[0].classList.add("visible");
t("fragmentshown",{fragment:au[0]});return true;}}return false;}function U(){if(document.querySelector(b+".present")){var av=document.querySelectorAll(b+".present .fragment.visible");
if(av.length){av[av.length-1].classList.remove("visible");t("fragmenthidden",{fragment:av[av.length-1]});return true;}}else{var au=document.querySelectorAll(m+".present .fragment.visible");
if(au.length){au[au.length-1].classList.remove("visible");t("fragmenthidden",{fragment:au[au.length-1]});return true;}}return false;}function R(){clearTimeout(l);
if(ae){l=setTimeout(z,ae);}}function D(){if(h().left&&O()||U()===false){a(n-1);}}function k(){if(h().right&&O()||x()===false){a(n+1);}}function w(){if(h().up&&O()||U()===false){a(n,e-1);
}}function H(){if(h().down&&O()||x()===false){a(n,e+1);}}function af(){if(U()===false){if(h().up){w();}else{var au=document.querySelector(m+".past:nth-child("+n+")");
if(au){e=(au.querySelectorAll("section").length+1)||undefined;n--;a();}}}}function z(){if(x()===false){h().down?H():k();}R();}function ao(aw){var av=document.activeElement;
var ax=!!(document.activeElement&&(document.activeElement.type||document.activeElement.href||document.activeElement.contentEditable!=="inherit"));if(ax||aw.shiftKey||aw.altKey||aw.ctrlKey||aw.metaKey){return;
}var au=true;switch(aw.keyCode){case 80:case 33:af();break;case 78:case 34:z();break;case 72:case 37:D();break;case 76:case 39:k();break;case 75:case 38:w();
break;case 74:case 40:H();break;case 36:a(0);break;case 35:a(Number.MAX_VALUE);break;case 32:O()?al():z();break;case 13:O()?al():au=false;break;case 66:case 190:ag();
break;case 70:ai();break;default:au=false;}if(au){aw.preventDefault();}else{if(aw.keyCode===27&&Z){ad();aw.preventDefault();}}R();}function C(au){aj.startX=au.touches[0].clientX;
aj.startY=au.touches[0].clientY;aj.startCount=au.touches.length;if(au.touches.length===2&&W.overview){aj.startSpan=X({x:au.touches[1].clientX,y:au.touches[1].clientY},{x:aj.startX,y:aj.startY});
}}function am(az){if(!aj.handled){var ax=az.touches[0].clientX;var aw=az.touches[0].clientY;if(az.touches.length===2&&aj.startCount===2&&W.overview){var ay=X({x:az.touches[1].clientX,y:az.touches[1].clientY},{x:aj.startX,y:aj.startY});
if(Math.abs(aj.startSpan-ay)>aj.threshold){aj.handled=true;if(ay<aj.startSpan){L();}else{al();}}az.preventDefault();}else{if(az.touches.length===1&&aj.startCount!==2){var av=ax-aj.startX,au=aw-aj.startY;
if(av>aj.threshold&&Math.abs(av)>Math.abs(au)){aj.handled=true;D();}else{if(av<-aj.threshold&&Math.abs(av)>Math.abs(au)){aj.handled=true;k();}else{if(au>aj.threshold){aj.handled=true;
w();}else{if(au<-aj.threshold){aj.handled=true;H();}}}}az.preventDefault();}}}else{if(navigator.userAgent.match(/android/gi)){az.preventDefault();}}}function ac(au){aj.handled=false;
}function q(au){clearTimeout(B);B=setTimeout(function(){var av=au.detail||-au.wheelDelta;if(av>0){z();}else{af();}},100);}function ap(av){var au=I(document.querySelectorAll(m)).length;
var aw=Math.floor((av.clientX/f.wrapper.offsetWidth)*au);a(aw);}function y(au){M();}function g(au){T();}function E(au){if(O()){au.preventDefault();al();
a(parseInt(this.getAttribute("data-index-h")),parseInt(this.getAttribute("data-index-v")));}}return{initialize:j,slide:a,left:D,right:k,up:w,down:H,prev:af,next:z,prevFragment:U,nextFragment:x,navigateTo:a,navigateLeft:D,navigateRight:k,navigateUp:w,navigateDown:H,navigatePrev:af,navigateNext:z,toggleOverview:ad,addEventListeners:G,removeEventListeners:aa,getIndices:P,getPreviousSlide:function(){return A;
},getCurrentSlide:function(){return J;},getQueryHash:function(){var au={};location.search.replace(/[A-Z0-9]+?=(\w*)/gi,function(av){au[av.split("=").shift()]=av.split("=").pop();
});return au;},addEventListener:function(av,aw,au){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).addEventListener(av,aw,au);
}},removeEventListener:function(av,aw,au){if("addEventListener" in window){(f.wrapper||document.querySelector(".reveal")).removeEventListener(av,aw,au);
}}};})();