presentazione-papero/js/reveal.min.js

9 lines
34 KiB
JavaScript
Raw Normal View History

2013-03-17 13:10:04 +01:00
/*!
2014-04-06 10:03:46 +02:00
* reveal.js 3.0.0-dev (2014-04-06, 10:03)
2013-03-17 13:10:04 +01:00
* http://lab.hakim.se/reveal-js
* MIT licensed
*
2014-02-16 17:12:05 +01:00
* Copyright (C) 2014 Hakim El Hattab, http://hakim.se
2013-03-17 13:10:04 +01:00
*/
var Reveal=function(){"use strict";function a(a){if(b(),!mc.transforms2d&&!mc.transforms3d)return document.body.setAttribute("class","no-transforms"),void 0;window.addEventListener("load",C,!1);var d=Reveal.getQueryHash();"undefined"!=typeof d.dependencies&&delete d.dependencies,l(hc,a),l(hc,d),t(),c()}function b(){mc.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,mc.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,mc.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,mc.requestAnimationFrame="function"==typeof mc.requestAnimationFrameMethod,mc.canvas=!!document.createElement("canvas").getContext,bc=navigator.userAgent.match(/(iphone|ipod|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=hc.dependencies.length;h>g;g++){var i=hc.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(),U(),i(),hb(),_(!0),setTimeout(function(){lc.slides.classList.remove("no-transition"),ic=!0,v("ready",{indexh:Yb,indexv:Zb,currentSlide:_b})},1)}function e(){lc.theme=document.querySelector("#theme"),lc.wrapper=document.querySelector(".reveal"),lc.slides=document.querySelector(".reveal .slides"),lc.slides.classList.add("no-transition"),lc.background=f(lc.wrapper,"div","backgrounds",null),lc.progress=f(lc.wrapper,"div","progress","<span></span>"),lc.progressbar=lc.progress.querySelector("span"),f(lc.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),lc.slideNumber=f(lc.wrapper,"div","slide-number",""),f(lc.wrapper,"div","state-background",null),f(lc.wrapper,"div","pause-overlay",null),lc.controls=document.querySelector(".reveal .controls"),lc.controlsLeft=m(document.querySelectorAll(".navigate-left")),lc.controlsRight=m(document.querySelectorAll(".navigate-right")),lc.controlsUp=m(document.querySelectorAll(".navigate-up")),lc.controlsDown=m(document.querySelectorAll(".navigate-down")),lc.controlsPrev=m(document.querySelectorAll(".navigate-prev")),lc.controlsNext=m(document.querySelectorAll(".navigate-next"))}function f(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function g(){s()&&document.body.classList.add("print-pdf"),lc.background.innerHTML="",lc.background.classList.add("no-transition"),m(document.querySelectorAll(ec)).forEach(function(a){var b;b=s()?h(a,a):h(a,lc.background),m(a.querySelectorAll("section")).forEach(function(a){s()?h(a,a):h(a,b)})}),hc.parallaxBackgroundImage?(lc.background.style.backgroundImage='url("'+hc.parallaxBackgroundImage+'")',lc.background.style.backgroundSize=hc.parallaxBackgroundSize,setTimeout(function(){lc.wrapper.classList.add("has-parallax-background")},1)):(lc.background.style.backgroundImage="",lc.wrapper.classList.remove("has-parallax-background"))}function h(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundVideo:a.getAttribute("data-background-video"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");if(d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test
2014-04-04 09:22:15 +02:00
},Xb.prototype.render=function(){var a=this.playing?this.progress:0,b=this.diameter/2-this.thickness,c=this.diameter/2,d=this.diameter/2,e=14;this.progressOffset+=.1*(1-this.progressOffset);var f=-Math.PI/2+a*2*Math.PI,g=-Math.PI/2+this.progressOffset*2*Math.PI;this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(c,d,b+2,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(c,d,b,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#666",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(c,d,b,g,f,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(c-e/2,d-e/2),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,e/2-2,e),this.context.fillRect(e/2+2,0,e/2-2,e)):(this.context.beginPath(),this.context.translate(2,0),this.context.moveTo(0,0),this.context.lineTo(e-2,e/2),this.context.lineTo(0,e),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},Xb.prototype.on=function(a,b){this.canvas.addEventListener(a,b,!1)},Xb.prototype.off=function(a,b){this.canvas.removeEventListener(a,b,!1)},Xb.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},{initialize:a,configure:i,sync:T,slide:S,left:vb,right:wb,up:xb,down:yb,prev:zb,next:Ab,navigateFragment:ob,prevFragment:qb,nextFragment:pb,navigateTo:S,navigateLeft:vb,navigateRight:wb,navigateUp:xb,navigateDown:yb,navigatePrev:zb,navigateNext:Ab,layout:C,availableRoutes:bb,availableFragments:cb,toggleOverview:I,togglePause:O,toggleAutoSlide:Q,isOverview:J,isPaused:P,isAutoSliding:R,addEventListeners:j,removeEventListeners:k,getState:lb,setState:mb,getProgress:fb,getIndices:jb,getTotalSlides:kb,getSlide:function(a,b){var c=document.querySelectorAll(ec)[a],d=c&&c.querySelectorAll("section");return"undefined"!=typeof b?d?d[b]:void 0:c},getPreviousSlide:function(){return $b},getCurrentSlide:function(){return _b},getScale:function(){return kc},getConfig:function(){return hc},getQueryHash:function(){var a={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(b){a[b.split("=").shift()]=b.split("=").pop()});for(var b in a){var c=a[b];a[b]=n(unescape(c))}return a},isFirstSlide:function(){return null==document.querySelector(dc+".past")?!0:!1},isLastSlide:function(){return _b?_b.nextElementSibling?!1:K(_b)&&_b.parentNode.nextElementSibling?!1:!0:!1},isReady:function(){return ic},addEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).addEventListener(a,b,c)},removeEventListener:function(a,b,c){"addEventListener"in window&&(lc.wrapper||document.querySelector(".reveal")).removeEventListener(a,b,c)}}}();