/** * Spotlight.js v0.4.0 (Bundle) * Copyright 2019 Nextapps GmbH * Author: Thomas Wilkerling * Licence: Apache-2.0 * https://github.com/nextapps-de/spotlight */ (function(){'use strict';var aa={};function ba(a){for(var b=a.classList,c={},d=0;d
'; k(O,"transition","none");document.body.appendChild(O);K=l("scene",O)[0];P=l("footer",O)[0];ma=l("title",P)[0];na=l("description",P)[0];oa=l("arrow-left",O)[0];pa=l("arrow-right",O)[0];Q=l("fullscreen",O)[0];qa=l("page",O)[0];R=l("player",O)[0];V=document.documentElement||document.body;document.cancelFullScreen||(document.cancelFullScreen=document.exitFullscreen||document.webkitCancelFullScreen||document.webkitExitFullscreen||document.mozCancelFullScreen||function(){});V.requestFullScreen||(V.requestFullScreen= V.webkitRequestFullScreen||V.msRequestFullScreen||V.mozRequestFullScreen||k(Q,"display","none")||function(){});ra=[[window,"keydown",xa],[window,"wheel",ya],[window,"hashchange",za],[K,"mousedown",Aa],[K,"mouseleave",Ba],[K,"mouseup",Ba],[K,"mousemove",Ca],[K,"touchstart",Aa,{passive:!0}],[K,"touchcancel",Ba],[K,"touchend",Ba],[K,"touchmove",Ca,{passive:!0}],[Q,"",Ea],[oa,"",Fa],[pa,"",Y],[R,"",Ga],[l("autofit",O)[0],"",Ha],[l("zoom-in",O)[0],"",Ia],[l("zoom-out",O)[0],"",Ja],[l("close",O)[0],"", Ka],[l("theme",O)[0],"",va]];fa(document,"",La)},{once:!0});function Ma(a){for(var b=0;b.5*(0>a?1:a?-1:0)?Ja():Ia())}function za(){L&&"#spotlight"===location.hash&&Ka(!0)}function Ga(a){("boolean"===typeof a?a:!S)?S||(S=setInterval(Y,1*I.player||5E3),f(R,"on")):S&&(S=clearInterval(S),h(R,"on"));return S} function Z(){U?clearTimeout(U):f(O,"menu");var a=I.autohide;U="false"!==a?setTimeout(function(){h(O,"menu");U=null},1*a||2E3):1}function Pa(a){"boolean"===typeof a&&(U=a?U:0);U?(U=clearTimeout(U),h(O,"menu")):Z();return p(a)}function Aa(a){A=!0;B=!1;var b=Qa(a);u=document.body.clientWidth;v=document.body.clientHeight;x=N.width*z;y=N.height*z;C=x<=u;ka=b.x;la=b.y;return p(a,!0)} function Ba(a){if(A&&!B)return A=!1,Pa(a);C&&B&&(ea(K,"transform","translateX("+-(100*(G-1)-r/u*100)+"%)"),r<-(v/10)&&Y()||r>v/10&&Fa()||k(K,"transform","translateX(-"+100*(G-1)+"%)"),r=0,C=!1,k(L,"transform",""));A=!1;return p(a)}function Ca(a){if(A){T||(T=requestAnimationFrame(Ra));var b=Qa(a),c=(x-u)/2;B=!0;C=x<=u;r-=ka-(ka=b.x);C?D=!0:r>c?r=c:0v&&(c=(y-v)/2,t-=la-(la=b.y),t>c?t=c:0b&&(b=1);b!==z&&(Sa(z=b),t=r=0,D=!0,Ra());a||Z()}function Oa(){location.hash="spotlight";location.hash="show";Ma(!0);k(O,"transition","");f(V,"hide-scrollbars");f(O,"show");Z()} function Ka(a){Ma(!1);history.go(!0===a?-1:-2);h(V,"hide-scrollbars");h(O,"show");S&&Ga(!1);N.parentNode.removeChild(N);N=L=null}function Fa(){S||Z();if(1G;G=a;W(b);return!0}}function va(a){"boolean"===typeof a?F=a:(F=!F,Z());F?f(O,"white"):h(O,"white")} function W(a){t=r=0;z=1;var b=I.animation,c=!0,d=!0,e=!0,g=!1;if(b||""===b){g=e=d=c=!1;b=b.split(",");for(var m=0;m