videoconf/static/revealjs/js/reveal.min.js

9 lines
42 KiB
JavaScript
Raw Normal View History

2016-02-29 19:31:32 +01:00
/*!
* reveal.js 3.0.0 (2015-02-02, 04:33)
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2015 Hakim El Hattab, http://hakim.se
*/
!function(a,b){"function"==typeof define&&define.amd?define(function(){return a.Reveal=b(),a.Reveal}):"object"==typeof exports?module.exports=b():a.Reveal=b()}(this,function(){"use strict";function a(a){if(b(),Bc.transforms2d||Bc.transforms3d){Ac.wrapper=document.querySelector(".reveal"),Ac.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",J,!1);var d=kc.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,o(wc,a),o(wc,d),z(),c()}else{document.body.setAttribute("class","no-transforms");for(var e=document.getElementsByTagName("img"),f=0,g=e.length;g>f;f++){var h=e[f];h.getAttribute("data-src")&&(h.setAttribute("src",h.getAttribute("data-src")),h.removeAttribute("data-src"))}}}function b(){Bc.transforms3d="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,Bc.transforms2d="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,Bc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,Bc.requestAnimationFrame="function"==typeof Bc.requestAnimationFrameMethod,Bc.canvas=!!document.createElement("canvas").getContext,Bc.touch=!!("ontouchstart"in window),qc=navigator.userAgent.match(/(iphone|ipod|ipad|android)/gi)}function c(){function a(){e.length&&head.js.apply(null,e),d()}function b(b){head.ready(b.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],function(){"function"==typeof b.callback&&b.callback.apply(this),0===--f&&a()})}for(var c=[],e=[],f=0,g=0,h=wc.dependencies.length;h>g;g++){var i=wc.dependencies[g];(!i.condition||i.condition())&&(i.async?e.push(i.src):c.push(i.src),b(i))}c.length?(f=c.length,head.js.apply(null,c)):a()}function d(){e(),k(),ab(),l(),sb(),hb(!0),setTimeout(function(){Ac.slides.classList.remove("no-transition"),xc=!0,B("ready",{indexh:lc,indexv:mc,currentSlide:oc})},1),y()&&(n(),"complete"===document.readyState?g():window.addEventListener("load",g))}function e(){Ac.slides.classList.add("no-transition"),Ac.background=h(Ac.wrapper,"div","backgrounds",null),Ac.progress=h(Ac.wrapper,"div","progress","<span></span>"),Ac.progressbar=Ac.progress.querySelector("span"),h(Ac.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),Ac.slideNumber=h(Ac.wrapper,"div","slide-number",""),h(Ac.wrapper,"div","pause-overlay",null),Ac.controls=document.querySelector(".reveal .controls"),Ac.theme=document.querySelector("#theme"),Ac.wrapper.setAttribute("role","application"),Ac.controlsLeft=p(document.querySelectorAll(".navigate-left")),Ac.controlsRight=p(document.querySelectorAll(".navigate-right")),Ac.controlsUp=p(document.querySelectorAll(".navigate-up")),Ac.controlsDown=p(document.querySelectorAll(".navigate-down")),Ac.controlsPrev=p(document.querySelectorAll(".navigate-prev")),Ac.controlsNext=p(document.querySelectorAll(".navigate-next")),Ac.statusDiv=f()}function f(){var a=document.getElementById("aria-status-div");return a||(a=document.createElement("div"),a.style.position="absolute",a.style.height="1px",a.style.width="1px",a.style.overflow="hidden",a.style.clip="rect( 1px, 1px, 1px, 1px )",a.setAttribute("id","aria-status-div"),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),Ac.wrapper.appendChild(a)),a}function g(){var a=L(window.innerWidth,window.innerHeight),b=Math.floor(a.width*(1+wc.margin)),c=Math.floor(a.height*(1+wc.margin)),d=a.width,e=a.height;t("@page{size:"+b+"px "+c+"px; margin: 0;}"),t(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+d+"px; max-height:"+e+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=b+"px",document.body.style.height=c+"px",p(Ac.wrapper.querySelectorAll(sc)).forEach(function(a){if(a.classList.contains("stack")===
"boolean"==typeof b&&b!==X()&&W(b),"boolean"==typeof c&&c!==R()&&Q(c)}}function Ab(a){a=p(a);var b=[],c=[],d=[];a.forEach(function(a){if(a.hasAttribute("data-fragment-index")){var d=parseInt(a.getAttribute("data-fragment-index"),10);b[d]||(b[d]=[]),b[d].push(a)}else c.push([a])}),b=b.concat(c);var e=0;return b.forEach(function(a){a.forEach(function(a){d.push(a),a.setAttribute("data-fragment-index",e)}),e++}),d}function Bb(a,b){if(oc&&wc.fragments){var c=Ab(oc.querySelectorAll(".fragment"));if(c.length){if("number"!=typeof a){var d=Ab(oc.querySelectorAll(".fragment.visible")).pop();a=d?parseInt(d.getAttribute("data-fragment-index")||0,10):-1}"number"==typeof b&&(a+=b);var e=[],f=[];return p(c).forEach(function(b,c){b.hasAttribute("data-fragment-index")&&(c=parseInt(b.getAttribute("data-fragment-index"),10)),a>=c?(b.classList.contains("visible")||e.push(b),b.classList.add("visible"),b.classList.remove("current-fragment"),Ac.statusDiv.innerHTML=b.textContent,c===a&&b.classList.add("current-fragment")):(b.classList.contains("visible")&&f.push(b),b.classList.remove("visible"),b.classList.remove("current-fragment"))}),f.length&&B("fragmenthidden",{fragment:f[0],fragments:f}),e.length&&B("fragmentshown",{fragment:e[0],fragments:e}),gb(),eb(),!(!e.length&&!f.length)}}return!1}function Cb(){return Bb(null,1)}function Db(){return Bb(null,-1)}function Eb(){if(Fb(),oc){var a=oc.querySelector(".current-fragment"),b=a?a.getAttribute("data-autoslide"):null,c=oc.parentNode?oc.parentNode.getAttribute("data-autoslide"):null,d=oc.getAttribute("data-autoslide");Fc=b?parseInt(b,10):d?parseInt(d,10):c?parseInt(c,10):wc.autoSlide,p(oc.querySelectorAll("video, audio")).forEach(function(a){a.hasAttribute("data-autoplay")&&Fc&&1e3*a.duration>Fc&&(Fc=1e3*a.duration+1e3)}),!Fc||Ic||X()||R()||kc.isLastSlide()&&!mb().next&&wc.loop!==!0||(Gc=setTimeout(Nb,Fc),Hc=Date.now()),rc&&rc.setPlaying(-1!==Gc)}}function Fb(){clearTimeout(Gc),Gc=-1}function Gb(){Fc&&!Ic&&(Ic=!0,B("autoslidepaused"),clearTimeout(Gc),rc&&rc.setPlaying(!1))}function Hb(){Fc&&Ic&&(Ic=!1,B("autoslideresumed"),Eb())}function Ib(){wc.rtl?(R()||Cb()===!1)&&lb().left&&$(lc+1):(R()||Db()===!1)&&lb().left&&$(lc-1)}function Jb(){wc.rtl?(R()||Db()===!1)&&lb().right&&$(lc-1):(R()||Cb()===!1)&&lb().right&&$(lc+1)}function Kb(){(R()||Db()===!1)&&lb().up&&$(lc,mc-1)}function Lb(){(R()||Cb()===!1)&&lb().down&&$(lc,mc+1)}function Mb(){if(Db()===!1)if(lb().up)Kb();else{var a;if(a=wc.rtl?p(Ac.wrapper.querySelectorAll(tc+".future")).pop():p(Ac.wrapper.querySelectorAll(tc+".past")).pop()){var b=a.querySelectorAll("section").length-1||void 0,c=lc-1;$(c,b)}}}function Nb(){Cb()===!1&&(lb().down?Lb():wc.rtl?Ib():Jb()),Eb()}function Ob(){wc.autoSlideStoppable&&Gb()}function Pb(a){a.shiftKey&&63===a.charCode&&(Ac.overlay?I():H(!0))}function Qb(a){if("function"==typeof wc.keyboardCondition&&wc.keyboardCondition()===!1)return!0;var b=Ic;Ob(a);var c=document.activeElement&&"inherit"!==document.activeElement.contentEditable,d=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName);if(!(c||d||a.shiftKey&&32!==a.keyCode||a.altKey||a.ctrlKey||a.metaKey)){if(X()&&-1===[66,190,191].indexOf(a.keyCode))return!1;var e=!1;if("object"==typeof wc.keyboard)for(var f in wc.keyboard)if(parseInt(f,10)===a.keyCode){var g=wc.keyboard[f];"function"==typeof g?g.apply(null,[a]):"string"==typeof g&&"function"==typeof kc[g]&&kc[g].call(),e=!0}if(e===!1)switch(e=!0,a.keyCode){case 80:case 33:Mb();break;case 78:case 34:Nb();break;case 72:case 37:Ib();break;case 76:case 39:Jb();break;case 75:case 38:Kb();break;case 74:case 40:Lb();break;case 36:$(0);break;case 35:$(Number.MAX_VALUE);break;case 32:R()?P():a.shiftKey?Mb():Nb();break;case 13:R()?P():e=!1;break;case 58:case 59:case 66:case 190:case 191:W();break;case 70:T();break;case 65:wc.autoSlideStoppable&&Y(b);break;default:e=!1}e?a.preventDefault&&a.preventDefault():27!==a.keyCode&&79!==a.keyCode||!Bc.transforms3d||(Ac.overlay?I():Q(),a.preventDefault&&a.preventDefault()),Eb()}}function Rb(a){Jc.startX=a.touches[0].clientX,Jc.st