diff --git a/compiled/js/timeline-min.js b/compiled/js/timeline-min.js
index ed2ad9c0..529b9b60 100644
--- a/compiled/js/timeline-min.js
+++ b/compiled/js/timeline-min.js
@@ -2,5 +2,5 @@
eval)(t):"xml"==r?t=y.responseXML:"json"==r&&(t=b.test(t)?null:$.parseJSON(t))}catch(a){i=a}i?o(i,"parsererror",y,e,n):s(t,y,e,n)}else o(y.statusText||null,y.status?"error":"abort",y,e,n)}},a(y,e)===!1)return y.abort(),o(null,"abort",y,e,n),y;if(e.xhrFields)for(g in e.xhrFields)y[g]=e.xhrFields[g];var w="async"in e?e.async:!0;y.open(e.type,e.url,w,e.username,e.password);for(g in f)T.apply(y,f[g]);return e.timeout>0&&(L=setTimeout(function(){y.onreadystatechange=l,y.abort(),o(null,"timeout",y,e,n)},e.timeout)),y.send(e.data?e.data:null),y},$.get=function(t,e,i,n){return $.ajax(u.apply(null,arguments))},$.post=function(t,e,i,n){var a=u.apply(null,arguments);return a.type="POST",$.ajax(a)},$.getJSON=function(t,e,i){var n=u.apply(null,arguments);return n.dataType="json",$.ajax(n)},$.fn.load=function(t,e,i){if(!this.length)return this;var n=this,a=t.split(/\s/),s,o=u(t,e,i),r=o.success;return a.length>1&&(o.url=a[0],s=a[1]),o.success=function(t){n.html(s?$("
").html(t.replace(v,"")).find(s):t),r&&r.apply(n,arguments)},$.ajax(o),this};var x=encodeURIComponent;$.param=function(t,e){var i=[];return i.add=function(t,e){this.push(x(t)+"="+x(e))},m(i,t,e),i.join("&").replace(/%20/g,"+")}}(e),function($){$.fn.serializeArray=function(){var t=[],e;return $([].slice.call(this.get(0).elements)).each(function(){e=$(this);var i=e.attr("type");"fieldset"!=this.nodeName.toLowerCase()&&!this.disabled&&"submit"!=i&&"reset"!=i&&"button"!=i&&("radio"!=i&&"checkbox"!=i||this.checked)&&t.push({name:e.attr("name"),value:e.val()})}),t},$.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},$.fn.submit=function(t){if(t)this.bind("submit",t);else if(this.length){var e=$.Event("submit");this.eq(0).trigger(e),e.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function($){"__proto__"in{}||$.extend($.zepto,{Z:function(t,e){return t=t||[],$.extend(t,$.fn),t.selector=e||"",t.__Z=!0,t},isZ:function(t){return"array"===$.type(t)&&"__Z"in t}});try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t){try{return e(t)}catch(i){return null}}}}(e),t.getJSON=e.getJSON,t.ajax=e.ajax}(TL),TL.Class=function(){},TL.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments)},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n,e.superclass=this.prototype;for(var a in this)this.hasOwnProperty(a)&&"prototype"!==a&&"superclass"!==a&&(e[a]=this[a]);return t.statics&&(TL.Util.extend(e,t.statics),delete t.statics),t.includes&&(TL.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=TL.Util.extend({},n.options,t.options)),TL.Util.extend(n,t),e.extend=TL.Class.extend,e.include=function(t){TL.Util.extend(this.prototype,t)},e},TL.Events={addEventListener:function(t,e,i){var n=this._tl_events=this._tl_events||{};return n[t]=n[t]||[],n[t].push({action:e,context:i||this}),this},hasEventListeners:function(t){var e="_tl_events";return e in this&&t in this[e]&&this[e][t].length>0},removeEventListener:function(t,e,i){if(!this.hasEventListeners(t))return this;for(var n=0,a=this._tl_events,s=a[t].length;s>n;n++)if(a[t][n].action===e&&(!i||a[t][n].context===i))return a[t].splice(n,1),this;return this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;for(var i=TL.Util.mergeData({type:t,target:this},e),n=this._tl_events[t].slice(),a=0,s=n.length;s>a;a++)n[a].action.call(n[a].context||this,i);return this}},TL.Events.on=TL.Events.addEventListener,TL.Events.off=TL.Events.removeEventListener,TL.Events.fire=TL.Events.fireEvent,function(){var t=navigator.userAgent.toLowerCase(),e=document.documentElement,i="ActiveXObject"in window,n=-1!==t.indexOf("webkit"),a=-1!==t.indexOf("phantom"),s=-1!==t.search("android [23]"),o="undefined"!=typeof orientation,r=navigator.msPointerEnabled&&navigator.msMaxTouchPoints&&!window.PointerEvent,l=window.PointerEvent&&navigator.pointerEnabled&&navigator.maxTouchPoints||r,h=i&&"transition"in e.style,d="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!s,c="MozPerspective"in e.style,u="OTransition"in e.style,m=window.opera,f="devicePixelRatio"in window&&window.devicePixelRatio>1;if(!f&&"matchMedia"in window){var _=window.matchMedia("(min-resolution:144dpi)");f=_&&_.matches}var p=!window.L_NO_TOUCH&&!a&&(l||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);TL.Browser={ie:i,ua:t,ie9:Boolean(i&&t.match(/MSIE 9/i)),ielt9:i&&!document.addEventListener,webkit:n,firefox:-1!==t.indexOf("gecko")&&!n&&!window.opera&&!i,android:-1!==t.indexOf("android"),android23:s,chrome:-1!==t.indexOf("chrome"),ie3d:h,webkit3d:d,gecko3d:c,opera3d:u,any3d:!window.L_DISABLE_3D&&(h||d||c||u)&&!a,mobile:o,mobileWebkit:o&&n,mobileWebkit3d:o&&d,mobileOpera:o&&window.opera,touch:!!p,msPointer:!!r,pointer:!!l,retina:!!f,orientation:function(){var t=window.innerWidth,e=window.innerHeight,i="portrait";return t>e&&(i="landscape"),90==Math.abs(window.orientation),trace(i),i}}}(),TL.Load=function(t){function e(t){var e=0,n=!1;for(e=0;e
v;++v)c[a].push({urls:[d[v]],callback:v===y-1?u:null,obj:m,context:f});if(!h[a]&&(L=h[a]=c[a].shift())){for(l||(l=t.head||t.getElementsByTagName("head")[0]),w=L.urls,v=0,y=w.length;y>v;++v)b=w[v],p?T=r.gecko?e("style"):e("link",{href:b,rel:"stylesheet"}):(T=e("script",{src:b}),T.async=!1),T.className="lazyload",T.setAttribute("charset","utf-8"),r.ie&&!p?T.onreadystatechange=function(){/loaded|complete/.test(T.readyState)&&(T.onreadystatechange=null,_())}:p&&(r.gecko||r.webkit)?r.webkit?(L.urls[v]=T.href,o()):(T.innerHTML='@import "'+b+'";',s(T)):T.onload=T.onerror=_,g.push(T);for(v=0,y=g.length;y>v;++v)l.appendChild(g[v])}}function s(t){var e;try{e=!!t.sheet.cssRules}catch(n){return d+=1,void(200>d?setTimeout(function(){s(t)},50):e&&i("css"))}i("css")}function o(){var t=h.css,e;if(t){for(e=u.length;--e>=0;)if(u[e].href===t.urls[0]){i("css");break}d+=1,t&&(200>d?setTimeout(o,50):i("css"))}}var r,l,h={},d=0,c={css:[],js:[]},u=t.styleSheets;return{css:function(t,e,i,n){a("css",t,e,i,n)},js:function(t,e,i,n){a("js",t,e,i,n)}}}(this.document),TL.TimelineConfig=TL.Class.extend({includes:[],initialize:function(t){if(this.title="",this.scale="",this.events=[],this.eras=[],this.event_dict={},this.messages={errors:[],warnings:[]},"object"==typeof t&&t.events){if(this.scale=t.scale,this.events=[],this._ensureValidScale(t.events),t.title){var e=this._assignID(t.title);this._tidyFields(t.title),this.title=t.title,this.event_dict[e]=this.title}for(var i=0;in||n>275759){this.scale="cosmological";break}}}}var a=TL.DateUtil.SCALE_DATE_CLASSES[this.scale];a||this.logError("Don't know how to process dates on scale "+this.scale)},_processDates:function(t){var e=TL.DateUtil.SCALE_DATE_CLASSES[this.scale];if(!(t.start_date instanceof e)){var i=t.start_date;if(t.start_date=new e(i),"undefined"!=typeof t.end_date&&!(t.end_date instanceof e)){var n=t.end_date,a=!0;for(property in i)a=a&&i[property]==n[property];a?(trace("End date same as start date is redundant; dropping end date"),delete t.end_date):t.end_date=new e(n)}}},getEarliestDate:function(){var t=this.events[0].start_date;return this.eras&&this.eras.length>0&&this.eras[0].start_date.isBefore(t)?this.eras[0].start_date:t},getLatestDate:function(){for(var t=[],e=0;e1)return TL.Language.formatNumber(Math.abs(i/s[0]),s[1])}return i.toString()}return trace("Language file dateformats missing cosmological. Falling back."),TL.Language.formatNumber(i,e)},TL.Language.prototype.formatJSDate=function(t,e){var i=this,n=function(t,e){var n=i.period_labels[t];if(n)var t=12>e?n[0]:n[1];return""+t+""},a=!1,s=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,o=/[^-+\dA-Z]/g;e||(e="full");var r=this.dateformats[e]||TL.Language.fallback.dateformats[e];r||(r=e);var l=a?"getUTC":"get",h=t[l+"Date"](),d=t[l+"Day"](),c=t[l+"Month"](),u=t[l+"FullYear"](),m=t[l+"Hours"](),f=t[l+"Minutes"](),_=t[l+"Seconds"](),p=t[l+"Milliseconds"](),g=a?0:t.getTimezoneOffset(),v="",y={d:h,dd:TL.Util.pad(h),ddd:this.date.day_abbr[d],dddd:this.date.day[d],m:c+1,mm:TL.Util.pad(c+1),mmm:this.date.month_abbr[c],mmmm:this.date.month[c],yy:String(u).slice(2),yyyy:0>u&&this.has_negative_year_modifier()?Math.abs(u):u,h:m%12||12,hh:TL.Util.pad(m%12||12),H:m,HH:TL.Util.pad(m),M:f,MM:TL.Util.pad(f),s:_,ss:TL.Util.pad(_),l:TL.Util.pad(p,3),L:TL.Util.pad(p>99?Math.round(p/10):p),t:n("t",m),tt:n("tt",m),T:n("T",m),TT:n("TT",m),Z:a?"UTC":(String(t).match(s)||[""]).pop().replace(o,""),o:(g>0?"-":"+")+TL.Util.pad(100*Math.floor(Math.abs(g)/60)+Math.abs(g)%60,4),S:["th","st","nd","rd"][h%10>3?0:(h%100-h%10!=10)*h%10]},T=r.replace(TL.Language.DATE_FORMAT_TOKENS,function(t){return t in y?y[t]:t.slice(1,t.length-1)});return this._applyEra(T,u)},TL.Language.prototype.has_negative_year_modifier=function(){return Boolean(this.era_labels.negative_year.prefix||this.era_labels.negative_year.suffix)},TL.Language.prototype._applyEra=function(t,e){var i=0>e?this.era_labels.negative_year:this.era_labels.positive_year,n="";return i.prefix&&(n+=""+i.prefix+" "),n+=t,i.suffix&&(n+=" "+i.suffix+""),n},TL.Language.DATE_FORMAT_TOKENS=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,TL.Language.languages={en:{name:"English",lang:"en",messages:{loading:"Loading",wikipedia:"From Wikipedia, the free encyclopedia",error:"Error"},date:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],month_abbr:["Jan.","Feb.","March","April","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],day:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],day_abbr:["Sun.","Mon.","Tues.","Wed.","Thurs.","Fri.","Sat."]},era_labels:{positive_year:{prefix:"",suffix:""},negative_year:{prefix:"",suffix:"BCE"}},period_labels:{t:["a","p"],tt:["am","pm"],T:["A","P"],TT:["AM","PM"]},dateformats:{year:"yyyy",month_short:"mmm",month:"mmmm yyyy",full_short:"mmm d",full:"mmmm d',' yyyy",time:"h:MM:ss TT' 'mmmm d',' yyyy''",time_short:"h:MM:ss TT",time_no_seconds_short:"h:MM TT",time_no_minutes_short:"h TT",time_no_seconds_small_date:"h:MM TT' 'mmmm d',' yyyy''",time_milliseconds:"l",full_long:"mmm d',' yyyy 'at' h:MM TT",full_long_small_date:"h:MM TT' mmm d',' yyyy''"},bigdateformats:{fallback:[[1e9,"%.2f billion years ago"],[1e6,"%.1f million years ago"],[1e3,"%.1f thousand years ago"],[1,"%f years ago"]],compact:[[1e9,"%.2f bya"],[1e6,"%.1f mya"],[1e3,"%.1f kya"],[1,"%f years ago"]],verbose:[[1e9,"%.2f billion years ago"],[1e6,"%.1f million years ago"],[1e3,"%.1f thousand years ago"],[1,"%f years ago"]]}}},TL.Language.fallback=new TL.Language,TL.I18NMixins={getLanguage:function(){return this.options&&this.options.language?this.options.language:(trace("Expected a language option"),TL.Language.fallback)},_:function(t){return this.getLanguage()._(t)}},TL.Easings={ease:[.25,.1,.25,1],linear:[0,0,1,1],easein:[.42,0,1,1],easeout:[0,0,.58,1],easeinout:[.42,0,.58,1]},TL.Ease={KeySpline:function(t){function e(t,e){return 1-3*e+3*t}function i(t,e){return 3*e-6*t}function n(t){return 3*t}function a(t,a,s){return((e(a,s)*t+i(a,s))*t+n(a))*t}function s(t,a,s){return 3*e(a,s)*t*t+2*i(a,s)*t+n(a)}function o(e){for(var i=e,n=0;4>n;++n){var o=s(i,t[0],t[2]);if(0==o)return i;var r=a(i,t[0],t[2])-e;i-=r/o}return i}this.get=function(e){return t[0]==t[1]&&t[2]==t[3]?e:a(o(e),t[1],t[3])}},easeInSpline:function(t){var e=new TL.Ease.KeySpline(TL.Easings.easein);return e.get(t)},easeInOutExpo:function(t){var e=new TL.Ease.KeySpline(TL.Easings.easein);return e.get(t)},easeOut:function(t){return Math.sin(t*Math.PI/2)},easeOutStrong:function(t){return 1==t?1:1-Math.pow(2,-10*t)},easeIn:function(t){return t*t},easeInStrong:function(t){return 0==t?0:Math.pow(2,10*(t-1))},easeOutBounce:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},bounce:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bouncePast:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?2-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},swingTo:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},swingFrom:function(t){var e=1.70158;return t*t*((e+1)*t-e)},elastic:function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},spring:function(t){return 1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t)},blink:function(t,e){return Math.round(t*(e||5))%2},pulse:function(t,e){return-Math.cos(t*((e||5)-.5)*2*Math.PI)/2+.5},wobble:function(t){return-Math.cos(t*Math.PI*(9*t))/2+.5},sinusoidal:function(t){return-Math.cos(t*Math.PI)/2+.5},flicker:function(t){var t=t+(Math.random()-.5)/5;return easings.sinusoidal(0>t?0:t>1?1:t)},mirror:function(t){return.5>t?easings.sinusoidal(2*t):easings.sinusoidal(1-2*(t-.5))},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}},TL.Animate=function(t,e){var i=new tlanimate(t,e),n;return i},window.tlanimate=function(){function t(t,e,i){if(Array.prototype.indexOf)return t.indexOf(e);for(i=0;i1e12&&(t=L()),b&&(t=L()),i=n;i--;)P[i](t);P.length&&U(e)}function i(t){1===P.push(t)&&U(e)}function n(e){var i,n=t(P,e);n>=0&&(i=P.slice(n+1),P.length=n,P=P.concat(i))}function a(t,e){var i={},n;return(n=t.match(E))&&(i.rotate=_(n[1],e?e.rotate:null)),(n=t.match(S))&&(i.scale=_(n[1],e?e.scale:null)),(n=t.match(N))&&(i.skewx=_(n[1],e?e.skewx:null),i.skewy=_(n[3],e?e.skewy:null)),(n=t.match(C))&&(i.translatex=_(n[1],e?e.translatex:null),i.translatey=_(n[3],e?e.translatey:null)),i}function s(t){var e="";return"rotate"in t&&(e+="rotate("+t.rotate+"deg) "),"scale"in t&&(e+="scale("+t.scale+") "),"translatex"in t&&(e+="translate("+t.translatex+"px,"+t.translatey+"px) "),"skewx"in t&&(e+="skew("+t.skewx+"deg,"+t.skewy+"deg)"),e}function o(t,e,i){return"#"+(1<<24|t<<16|e<<8|i).toString(16).slice(1)}function r(t){var e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return(e?o(e[1],e[2],e[3]):t).replace(/#(\w)(\w)(\w)$/,"#$1$1$2$2$3$3")}function l(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function h(t){return"function"==typeof t}function d(t){return Math.sin(t*Math.PI/2)}function c(t,e,a,s,o,r){function l(t){var i=t-f;return i>c||_?(r=isFinite(r)?r:1,_?g&&e(r):e(r),n(l),a&&a.apply(u)):void e(isFinite(r)?m*s(i/c)+o:s(i/c))}s=h(s)?s:p.easings[s]||d;var c=t||x,u=this,m=r-o,f=L(),_=0,g=0;return i(l),{stop:function(t){_=1,g=t,t||(a=null)}}}function u(t,e){var i=t.length,n=[],a,s;for(a=0;i>a;++a)n[a]=[t[a][0],t[a][1]];for(s=1;i>s;++s)for(a=0;i-s>a;++a)n[a][0]=(1-e)*n[a][0]+e*n[parseInt(a+1,10)][0],n[a][1]=(1-e)*n[a][1]+e*n[parseInt(a+1,10)][1];return[n[0][0],n[0][1]]}function m(t,e,i){var n=[],a,s,o,r;for(a=0;6>a;a++)o=Math.min(15,parseInt(e.charAt(a),16)),r=Math.min(15,parseInt(i.charAt(a),16)),s=Math.floor((r-o)*t+o),s=s>15?15:0>s?0:s,n[a]=s.toString(16);return"#"+n.join("")}function f(t,e,i,n,a,s,o){if("transform"==a){o={};for(var r in i[s][a])o[r]=r in n[s][a]?Math.round(((n[s][a][r]-i[s][a][r])*t+i[s][a][r])*x)/x:i[s][a][r];return o}return"string"==typeof i[s][a]?m(t,i[s][a],n[s][a]):(o=Math.round(((n[s][a]-i[s][a])*t+i[s][a])*x)/x,a in I||(o+=e[s][a]||"px"),o)}function _(t,e,i,n,a){return(i=D.exec(t))?(a=parseFloat(i[2]))&&e+("+"==i[1]?1:-1)*a:parseFloat(t)}function p(t,e){var i=t?i=isFinite(t.length)?t:[t]:[],n,o=e.complete,d=e.duration,m=e.easing,p=e.bezier,g=[],v=[],y=[],T=[],L,w;for(p&&(L=e.left,w=e.top,delete e.right,delete e.bottom,delete e.left,delete e.top),n=i.length;n--;){if(g[n]={},v[n]={},y[n]={},p){var b=O(i[n],"left"),x=O(i[n],"top"),D=[_(h(L)?L(i[n]):L||0,parseFloat(b)),_(h(w)?w(i[n]):w||0,parseFloat(x))];T[n]=h(p)?p(i[n],D):p,T[n].push(D),T[n].unshift([parseInt(b,10),parseInt(x,10)])}for(var E in e){switch(E){case"complete":case"duration":case"easing":case"bezier":continue}var S=O(i[n],E),N,C=h(e[E])?e[E](i[n]):e[E];"string"!=typeof C||!k.test(C)||k.test(S)?(g[n][E]="transform"==E?a(S):"string"==typeof C&&k.test(C)?r(S).slice(1):parseFloat(S),v[n][E]="transform"==E?a(C,g[n][E]):"string"==typeof C&&"#"==C.charAt(0)?r(C).slice(1):_(C,parseFloat(S)),"string"==typeof C&&(N=C.match(M))&&(y[n][E]=N[1])):delete e[E]}}return c.apply(i,[d,function(t,a,o){for(n=i.length;n--;){p&&(o=u(T[n],t),i[n].style.left=o[0]+"px",i[n].style.top=o[1]+"px");for(var r in e)a=f(t,y,g,v,r,n),"transform"==r?i[n].style[A]=s(a):"opacity"!=r||j?i[n].style[l(r)]=a:i[n].style.filter="alpha(opacity="+100*a+")"}},o,m])}var g=document,v=window,y=v.performance,T=y&&(y.now||y.webkitNow||y.msNow||y.mozNow),L=T?function(){return T.call(y)}:function(){return+new Date},w=g.documentElement,b=!1,x=1e3,k=/^rgb\(|#/,D=/^([+\-])=([\d\.]+)/,M=/^(?:[\+\-]=?)?\d+(?:\.\d+)?(%|in|cm|mm|em|ex|pt|pc|px)$/,E=/rotate\(((?:[+\-]=)?([\-\d\.]+))deg\)/,S=/scale\(((?:[+\-]=)?([\d\.]+))\)/,N=/skew\(((?:[+\-]=)?([\-\d\.]+))deg, ?((?:[+\-]=)?([\-\d\.]+))deg\)/,C=/translate\(((?:[+\-]=)?([\-\d\.]+))px, ?((?:[+\-]=)?([\-\d\.]+))px\)/,I={lineHeight:1,zoom:1,zIndex:1,opacity:1,transform:1},A=function(){var t=g.createElement("a").style,e=["webkitTransform","MozTransform","OTransform","msTransform","Transform"],i;for(i=0;i1e12!=L()>1e12}),p.tween=c,p.getStyle=O,p.bezier=u,p.transform=A,p.parseTransform=a,p.formatTransform=s,p.easings={},p}(),TL.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},TL.Point.prototype={add:function(t){return this.clone()._add(t)},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(t)},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t,e){return new TL.Point(this.x/t,this.y/t,e)},multiplyBy:function(t){return new TL.Point(this.x*t,this.y*t)},distanceTo:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},clone:function(){return new TL.Point(this.x,this.y)},toString:function(){return"Point("+TL.Util.formatNum(this.x)+", "+TL.Util.formatNum(this.y)+")"}},TL.DomMixins={show:function(t){t||(this._el.container.style.display="block")},hide:function(t){this._el.container.style.display="none"},addTo:function(t){t.appendChild(this._el.container),this.onAdd()},removeFrom:function(t){t.removeChild(this._el.container),this.onRemove()},animatePosition:function(t,e){var i={duration:this.options.duration,easing:this.options.ease};for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]+"px");this.animator&&this.animator.stop(),this.animator=TL.Animate(e,i)},onLoaded:function(){this.fire("loaded",this.data)},onAdd:function(){this.fire("added",this.data)},onRemove:function(){this.fire("removed",this.data)},setPosition:function(t,e){for(var i in t)t.hasOwnProperty(i)&&(e?e.style[i]=t[i]+"px":this._el.container.style[i]=t[i]+"px")},getPosition:function(){return TL.Dom.getPosition(this._el.container)}},TL.Dom={get:function(t){return"string"==typeof t?document.getElementById(t):t},getByClass:function(t){return t?document.getElementsByClassName(t):void 0},create:function(t,e,i){var n=document.createElement(t);return n.className=e,i&&i.appendChild(n),n},createText:function(t,e){var i=document.createTextNode(t);return e&&e.appendChild(i),i},getTranslateString:function(t){return TL.Dom.TRANSLATE_OPEN+t.x+"px,"+t.y+"px"+TL.Dom.TRANSLATE_CLOSE},setPosition:function(t,e){t._tl_pos=e,TL.Browser.webkit3d?(t.style[TL.Dom.TRANSFORM]=TL.Dom.getTranslateString(e),TL.Browser.android&&(t.style["-webkit-perspective"]="1000",t.style["-webkit-backface-visibility"]="hidden")):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){for(var e={x:0,y:0};t&&!isNaN(t.offsetLeft)&&!isNaN(t.offsetTop);)e.x+=t.offsetLeft,e.y+=t.offsetTop,t=t.offsetParent;return e},testProp:function(t){for(var e=document.documentElement.style,i=0;i0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},addClass:function(t,e){TL.DomUtil.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(t,e){
t.className=t.className.replace(/(\S+)\s*/g,function(t,i){return i===e?"":t}).replace(/^\s+/,"")},setOpacity:function(t,e){TL.Browser.ie?t.style.filter="alpha(opacity="+Math.round(100*e)+")":t.style.opacity=e},testProp:function(t){for(var e=document.documentElement.style,i=0;it.data.date_obj},floor:function(t){for(var e=new Date(this.data.date_obj.getTime()),i=0;i0&&t.month<=12&&(t.month=t.month-1),t},_createDateObj:function(){var t=this._getDateData();this.data.date_obj=new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond),this.data.date_obj.getFullYear()!=t.year&&this.data.date_obj.setFullYear(t.year)},findBestFormat:function(t){for(var e=TL.Date.DATE_PARTS,i="",n=0;nt.year},getTime:function(){return this.year}}),function(t){t.SCALES=[["millisecond",1,function(t){}],["second",1e3,function(t){t.setMilliseconds(0)}],["minute",6e4,function(t){t.setSeconds(0)}],["hour",36e5,function(t){t.setMinutes(0)}],["day",864e5,function(t){t.setHours(0)}],["month",2592e6,function(t){t.setDate(1)}],["year",31536e6,function(t){t.setMonth(0)}],["decade",31536e7,function(t){var e=t.getFullYear();t.setFullYear(e-e%10)}],["century",31536e8,function(t){var e=t.getFullYear();t.setFullYear(e-e%100)}],["millennium",31536e9,function(t){var e=t.getFullYear();t.setFullYear(e-e%1e3)}]],t.DATE_PARTS=["millisecond","second","minute","hour","day","month","year"];var e=/^([\+-]?\d+?)(-\d{2}?)?(-\d{2}?)?$/,i=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;t.parseISODate=function(t){var e=new Date(t);if(isNaN(e))throw"Invalid date: "+t;return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),millisecond:e.getMilliseconds()}},t.parseDate=function(n){if(n.match(e)){var a=n.match(e).slice(1),s={year:a[0].replace("+","")};return a[1]&&(s.month=a[1].replace("-","")),a[2]&&(s.day=a[2].replace("-","")),s}if(n.match(i))return t.parseISODate(n);if(n.match(/^\-?\d+$/))return{year:n};var o={};if(n.match(/\d+\/\d+\/\d+/)){var r=n.match(/\d+\/\d+\/\d+/)[0];n=TL.Util.trim(n.replace(r,""));var l=r.split("/");o.month=l[0],o.day=l[1],o.year=l[2]}if(n.match(/\d+\/\d+/)){var r=n.match(/\d+\/\d+/)[0];n=TL.Util.trim(n.replace(r,""));var l=r.split("/");o.month=l[0],o.year=l[1]}if(n.match(":")){var h=n.split(":");o.hour=h[0],o.minute=h[1],h[2]&&(second_parts=h[2].split("."),o.second=second_parts[0],o.millisecond=second_parts[1])}return o},t.BEST_DATEFORMATS={base:{millisecond:"time_short",second:"time",minute:"time_no_seconds_small_date",hour:"time_no_seconds_small_date",day:"full",month:"month",year:"year",decade:"year",century:"year",millennium:"year",age:"fallback",epoch:"fallback",era:"fallback",eon:"fallback",eon2:"fallback"},"short":{millisecond:"time_short",second:"time_short",minute:"time_no_seconds_short",hour:"time_no_minutes_short",day:"full_short",month:"month_short",year:"year",decade:"year",century:"year",millennium:"year",age:"fallback",epoch:"fallback",era:"fallback",eon:"fallback",eon2:"fallback"}}}(TL.Date),TL.BigDate=TL.Date.extend({initialize:function(t,e,i){TL.BigYear==t.constructor?this.data={date_obj:t}:(this.data=JSON.parse(JSON.stringify(t)),this._createDateObj()),this._setFormat(e,i)},_createDateObj:function(){var t=this._getDateData();this.data.date_obj=new TL.BigYear(t.year)},floor:function(t){for(var e=0;e4)throw new Error("Invalid time: misuse of : or . as separator.");if(e.hour=parseInt(a[0]),i&&"p"==i.toLowerCase()[0]&&12!=e.hour?e.hour+=12:i&&"a"==i.toLowerCase()[0]&&12==e.hour&&(e.hour=0),isNaN(e.hour)||e.hour<0||e.hour>23)throw new Error("Invalid time (hour) "+e.hour);if(a.length>1&&(e.minute=parseInt(a[1]),isNaN(e.minute)))throw new Error("Invalid time (minute)");if(a.length>2){var o=a[2].split(/[\.,]/);if(a=o.concat(a.slice(3)),a.length>2)throw new Error("Invalid time (seconds and fractional seconds)");if(e.second=parseInt(a[0]),isNaN(e.second))throw new Error("Invalid time (second)");if(2==a.length){var r=parseInt(a[1]);if(isNaN(r))throw new Error("Invalid time (fractional seconds)");e.millisecond=100*r}}return e},SCALE_DATE_CLASSES:{human:TL.Date,cosmological:TL.BigDate}},TL.Draggable=TL.Class.extend({includes:TL.Events,_el:{},mousedrag:{down:"mousedown",up:"mouseup",leave:"mouseleave",move:"mousemove"},touchdrag:{down:"touchstart",up:"touchend",leave:"mouseleave",move:"touchmove"},initialize:function(t,e,i){this._el={drag:t,move:t},i&&(this._el.move=i),this.options={enable:{x:!0,y:!0},constraint:{top:!1,bottom:!1,left:!1,right:!1},momentum_multiplier:2e3,duration:1e3,ease:TL.Ease.easeInOutQuint},this.animator=null,this.dragevent=this.mousedrag,TL.Browser.touch&&(this.dragevent=this.touchdrag),this.data={sliding:!1,direction:"none",pagex:{start:0,end:0},pagey:{start:0,end:0},pos:{start:{x:0,y:0},end:{x:0,y:0}},new_pos:{x:0,y:0},new_pos_parent:{x:0,y:0},time:{start:0,end:0},touch:!1},TL.Util.mergeData(this.options,e)},enable:function(t){this.data.pos.start=0,this._el.move.style.left=this.data.pos.start.x+"px",this._el.move.style.top=this.data.pos.start.y+"px",this._el.move.style.position="absolute"},disable:function(){TL.DomEvent.removeListener(this._el.drag,this.dragevent.down,this._onDragStart,this),TL.DomEvent.removeListener(this._el.drag,this.dragevent.up,this._onDragEnd,this)},stopMomentum:function(){this.animator&&this.animator.stop()},updateConstraint:function(t){this.options.constraint=t},_onDragStart:function(t){TL.Browser.touch?t.originalEvent?(this.data.pagex.start=t.originalEvent.touches[0].screenX,this.data.pagey.start=t.originalEvent.touches[0].screenY):(this.data.pagex.start=t.targetTouches[0].screenX,this.data.pagey.start=t.targetTouches[0].screenY):(this.data.pagex.start=t.pageX,this.data.pagey.start=t.pageY),this.options.enable.x&&(this._el.move.style.left=this.data.pagex.start-this._el.move.offsetWidth/2+"px"),this.options.enable.y&&(this._el.move.style.top=this.data.pagey.start-this._el.move.offsetHeight/2+"px"),this.data.pos.start=TL.Dom.getPosition(this._el.drag),this.data.time.start=(new Date).getTime(),this.fire("dragstart",this.data),TL.DomEvent.addListener(this._el.drag,this.dragevent.move,this._onDragMove,this),TL.DomEvent.addListener(this._el.drag,this.dragevent.leave,this._onDragEnd,this)},_onDragEnd:function(t){this.data.sliding=!1,TL.DomEvent.removeListener(this._el.drag,this.dragevent.move,this._onDragMove,this),TL.DomEvent.removeListener(this._el.drag,this.dragevent.leave,this._onDragEnd,this),this.fire("dragend",this.data),this._momentum()},_onDragMove:function(t){t.preventDefault(),this.data.sliding=!0,TL.Browser.touch?t.originalEvent?(this.data.pagex.end=t.originalEvent.touches[0].screenX,this.data.pagey.end=t.originalEvent.touches[0].screenY):(this.data.pagex.end=t.targetTouches[0].screenX,this.data.pagey.end=t.targetTouches[0].screenY):(this.data.pagex.end=t.pageX,this.data.pagey.end=t.pageY),this.data.pos.end=TL.Dom.getPosition(this._el.drag),this.data.new_pos.x=-(this.data.pagex.start-this.data.pagex.end-this.data.pos.start.x),this.data.new_pos.y=-(this.data.pagey.start-this.data.pagey.end-this.data.pos.start.y),this.options.enable.x&&(this._el.move.style.left=this.data.new_pos.x+"px"),this.options.enable.y&&(this._el.move.style.top=this.data.new_pos.y+"px"),this.fire("dragmove",this.data)},_momentum:function(){var t={x:0,y:0,time:0},e={x:0,y:0,time:0},i=!1,n="";TL.Browser.touch,t.time=10*((new Date).getTime()-this.data.time.start),e.time=10*((new Date).getTime()-this.data.time.start),e.x=this.options.momentum_multiplier*(Math.abs(this.data.pagex.end)-Math.abs(this.data.pagex.start)),e.y=this.options.momentum_multiplier*(Math.abs(this.data.pagey.end)-Math.abs(this.data.pagey.start)),t.x=Math.round(e.x/e.time),t.y=Math.round(e.y/e.time),this.data.new_pos.x=Math.min(this.data.pos.end.x+t.x),this.data.new_pos.y=Math.min(this.data.pos.end.y+t.y),this.options.enable.x?this.data.new_pos.x<0&&(this.data.new_pos.x=0):this.data.new_pos.x=this.data.pos.start.x,this.options.enable.y?this.data.new_pos.y<0&&(this.data.new_pos.y=0):this.data.new_pos.y=this.data.pos.start.y,e.time<3e3&&(i=!0),Math.abs(e.x)>1e4&&(this.data.direction="left",e.x>0&&(this.data.direction="right")),Math.abs(e.y)>1e4&&(this.data.direction="up",e.y>0&&(this.data.direction="down")),this._animateMomentum(),i&&this.fire("swipe_"+this.data.direction,this.data)},_animateMomentum:function(){var t={x:this.data.new_pos.x,y:this.data.new_pos.y},e={duration:this.options.duration,easing:TL.Ease.easeOutStrong};this.options.enable.y&&((this.options.constraint.top||this.options.constraint.bottom)&&(t.y>this.options.constraint.bottom?t.y=this.options.constraint.bottom:t.ythis.options.constraint.left?t.x=this.options.constraint.left:t.xMath.abs(e.y)&&(t.preventDefault(),this._el.move.style.left=this.data.new_pos.x+"px"),this.options.enable.y&&Math.abs(e.y)>Math.abs(e.y)&&(t.preventDefault(),this._el.move.style.top=this.data.new_pos.y+"px"),this.fire("dragmove",this.data)},_momentum:function(){var t={x:0,y:0,time:0},e={x:0,y:0,time:0},i={x:!1,y:!1},n=!1,a="";this.data.direction=null,t.time=10*((new Date).getTime()-this.data.time.start),e.time=10*((new Date).getTime()-this.data.time.start),e.x=this.options.momentum_multiplier*(Math.abs(this.data.pagex.end)-Math.abs(this.data.pagex.start)),e.y=this.options.momentum_multiplier*(Math.abs(this.data.pagey.end)-Math.abs(this.data.pagey.start)),t.x=Math.round(e.x/e.time),t.y=Math.round(e.y/e.time),this.data.new_pos.x=Math.min(this.data.new_pos.x+t.x),this.data.new_pos.y=Math.min(this.data.new_pos.y+t.y),this.options.enable.x?this.options.constraint.left&&this.data.new_pos.x>this.options.constraint.left&&(this.data.new_pos.x=this.options.constraint.left):this.data.new_pos.x=this.data.pos.start.x,this.options.enable.y?this.data.new_pos.y<0&&(this.data.new_pos.y=0):this.data.new_pos.y=this.data.pos.start.y,e.time<2e3&&(n=!0),this.options.enable.x&&this.options.enable.y?Math.abs(e.x)>Math.abs(e.y)?i.x=!0:i.y=!0:this.options.enable.x?Math.abs(e.x)>Math.abs(e.y)&&(i.x=!0):Math.abs(e.y)>Math.abs(e.x)&&(i.y=!0),i.x&&(Math.abs(e.x)>this._el.drag.offsetWidth/2&&(n=!0),Math.abs(e.x)>1e4&&(this.data.direction="left",e.x>0&&(this.data.direction="right"))),i.y&&(Math.abs(e.y)>this._el.drag.offsetHeight/2&&(n=!0),Math.abs(e.y)>1e4&&(this.data.direction="up",e.y>0&&(this.data.direction="down"))),e.time<1e3||this._animateMomentum(),n&&this.data.direction?this.fire("swipe_"+this.data.direction,this.data):this.data.direction?this.fire("swipe_nodirection",this.data):this.options.snap&&(this.animator.stop(),this.animator=TL.Animate(this._el.move,{top:this.data.pos.start.y,left:this.data.pos.start.x,duration:this.options.duration,easing:TL.Ease.easeOutStrong}))},_animateMomentum:function(){var t={x:this.data.new_pos.x,y:this.data.new_pos.y},e={duration:this.options.duration,easing:TL.Ease.easeOutStrong};this.options.enable.y&&((this.options.constraint.top||this.options.constraint.bottom)&&(t.y>this.options.constraint.bottom?t.y=this.options.constraint.bottom:t.y=this.options.constraint.left&&(t.x=this.options.constraint.left),this.options.constraint.right&&t.x",this._el.button_zoomin.innerHTML="",this._el.button_zoomout.innerHTML=""},_initEvents:function(){TL.DomEvent.addListener(this._el.button_backtostart,"click",this._onButtonBackToStart,this),TL.DomEvent.addListener(this._el.button_zoomin,"click",this._onButtonZoomIn,this),TL.DomEvent.addListener(this._el.button_zoomout,"click",this._onButtonZoomOut,this)},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),TL.Message=TL.Class.extend({includes:[TL.Events,TL.DomMixins,TL.I18NMixins],_el:{},initialize:function(t,e,i){this._el={parent:{},container:{},message_container:{},loading_icon:{},message:{}},this.options={width:600,height:600,message_class:"tl-message",message_icon_class:"tl-loading-icon"},TL.Util.mergeData(this.data,t),TL.Util.mergeData(this.options,e),this._el.container=TL.Dom.create("div",this.options.message_class),i&&(i.appendChild(this._el.container),this._el.parent=i),this.animator={},this._initLayout(),this._initEvents()},updateMessage:function(t){this._updateMessage(t)},updateDisplay:function(t,e){this._updateDisplay(t,e)},_updateMessage:function(t){t?this._el.message.innerHTML=t:this._el.message.innerHTML=this._("loading")},_onMouseClick:function(){this.fire("clicked",this.options)},_initLayout:function(){this._el.message_container=TL.Dom.create("div","tl-message-container",this._el.container),this._el.loading_icon=TL.Dom.create("div",this.options.message_icon_class,this._el.message_container),this._el.message=TL.Dom.create("div","tl-message-content",this._el.message_container),this._updateMessage()},_initEvents:function(){TL.DomEvent.addListener(this._el.container,"click",this._onMouseClick,this)},_updateDisplay:function(t,e,i){}}),TL.MediaType=function(t){for(var e={},i=[{type:"youtube",name:"YouTube",match_str:"^(https?:)?/*(www.)?youtube|youtu.be",cls:TL.Media.YouTube},{type:"vimeo",name:"Vimeo",match_str:"^(https?:)?/*(player.)?vimeo.com",cls:TL.Media.Vimeo},{type:"dailymotion",name:"DailyMotion",match_str:"^(https?:)?/*(www.)?dailymotion.com",cls:TL.Media.DailyMotion},{type:"vine",name:"Vine",match_str:"^(https?:)?/*(www.)?vine.co",cls:TL.Media.Vine},{type:"soundcloud",name:"SoundCloud",match_str:"^(https?:)?/*(player.)?soundcloud.com",cls:TL.Media.SoundCloud},{type:"twitter",name:"Twitter",match_str:"^(https?:)?/*(www.)?twitter.com",cls:TL.Media.Twitter},{type:"twitterembed",name:"TwitterEmbed",match_str:'",n=t.author_url.split("twitter.com/")[1],a=t.html.split("—")[1].split('')[0],o=a.split('">')[1].split("")[0],i=i.replace(/",e+="",e+="",e+=" ",this._el.content_item.innerHTML=e,this.onLoaded()},updateMediaDisplay:function(){},_updateMediaDisplay:function(){}}),TL.Media.Vimeo=TL.Media.extend({includes:[TL.Events],_loadMedia:function(){var t,e=this;this.loadingMessage(),this._el.content_item=TL.Dom.create("div","tl-media-item tl-media-iframe tl-media-vimeo tl-media-shadow",this._el.content),this.media_id=this.data.url.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0],t="https://player.vimeo.com/video/"+this.media_id+"?api=1&title=0&byline=0&portrait=0&color=ffffff",this.player=TL.Dom.create("iframe","",this._el.content_item),this.player.addEventListener("load",function(t){e.onMediaLoaded()}),this.player.width="100%",this.player.height="100%",this.player.frameBorder="0",this.player.src=t,this.onLoaded()},_updateMediaDisplay:function(){this._el.content_item.style.height=TL.Util.ratio.r16_9({w:this._el.content_item.offsetWidth})+"px"},_stopMedia:function(){try{this.player.contentWindow.postMessage(JSON.stringify({method:"pause"}),"https://player.vimeo.com")}catch(t){trace(t)}}}),TL.Media.Vine=TL.Media.extend({includes:[TL.Events],_loadMedia:function(){var t,e=this;this.loadingMessage(),this._el.content_item=TL.Dom.create("div","tl-media-item tl-media-iframe tl-media-vine tl-media-shadow",this._el.content),this.media_id=this.data.url.split("vine.co/v/")[1],t="https://vine.co/v/"+this.media_id+"/embed/simple",this._el.content_item.innerHTML="",this.onLoaded()},_updateMediaDisplay:function(){var t=TL.Util.ratio.square({w:this._el.content_item.offsetWidth,h:this.options.height});this._el.content_item.style.height=t.h+"px"}}),TL.Media.Website=TL.Media.extend({includes:[TL.Events],_loadMedia:function(){var t=this;this.loadingMessage(),this.media_id=this.data.url.replace(/.*?:\/\//g,""),this.options.api_key_embedly?(api_url="http://api.embed.ly/1/extract?key="+this.options.api_key_embedly+"&url="+this.media_id+"&callback=?",TL.getJSON(api_url,function(e){t.createMedia(e)})):this.createCardContent()},createCardContent:function(){!function(t,e){var i="embedly-platform",n="script";if(!e.getElementById(i)){t.embedly=t.embedly||function(){(t.embedly.q=t.embedly.q||[]).push(arguments)};var a=e.createElement(n);a.id=i,a.async=1,a.src=("https:"===document.location.protocol?"https":"http")+"://cdn.embedly.com/widgets/platform.js";var s=e.getElementsByTagName(n)[0];s.parentNode.insertBefore(a,s)}}(window,document);var t=''+this.data.url+"";this._setContent(t)},createMedia:function(t){var e="";e+="",t.images&&t.images[0]&&(trace(t.images[0].url),e+=""),t.favicon_url&&(e+=""),e+=""+t.provider_name+"
",e+=""+t.description+"
",this._setContent(e)},_setContent:function(t){this._el.content_item=TL.Dom.create("div","tl-media-item tl-media-website",this._el.content),this._el.content_container.className="tl-media-content-container tl-media-content-container-text",this._el.content_item.innerHTML=t,this.onLoaded()},updateMediaDisplay:function(){},_updateMediaDisplay:function(){}}),TL.Media.Wikipedia=TL.Media.extend({includes:[TL.Events],_loadMedia:function(){var t,e,i=this;this.loadingMessage(),this._el.content_item=TL.Dom.create("div","tl-media-item tl-media-wikipedia",this._el.content),this._el.content_container.className="tl-media-content-container tl-media-content-container-text",this.media_id=this.data.url.split("wiki/")[1].split("#")[0].replace("_"," "),this.media_id=this.media_id.replace(" ","%20"),e=this.data.url.split("//")[1].split(".wikipedia")[0],t="http://"+e+".wikipedia.org/w/api.php?action=query&prop=extracts|pageimages&redirects=&titles="+this.media_id+"&exintro=1&format=json&callback=?",TL.ajax({type:"GET",url:t,dataType:"json",success:function(t){i.createMedia(t)},error:function(t,e){var n="";n+="Unable to load Wikipedia entry.
"+i.media_id+"
"+e,i.loadErrorDisplay(n)}})},createMedia:function(t){var e="";if(t.query){var i="",e={entry:{},title:"",text:"",extract:"",paragraphs:1,page_image:"",text_array:[]};e.entry=TL.Util.getObjectAttributeByIndex(t.query.pages,0),e.extract=e.entry.extract,e.title=e.entry.title,e.page_image=e.entry.thumbnail,e.extract.match("")?e.text_array=e.extract.split("
"):e.text_array.push(e.extract);for(var n=0;n"+e.text_array[n+1]);i+="",i+="",i+="
"+this._("wikipedia")+" ",e.page_image,i+=e.text,e.extract.match("REDIRECT")||(this._el.content_item.innerHTML=i,this.onLoaded())}},updateMediaDisplay:function(){},_updateMediaDisplay:function(){}}),TL.Media.YouTube=TL.Media.extend({includes:[TL.Events],_loadMedia:function(){var t=this,e;this.loadingMessage(),this.youtube_loaded=!1,this._el.content_item=TL.Dom.create("div","tl-media-item tl-media-youtube tl-media-shadow",this._el.content),this._el.content_item.id=TL.Util.unique_ID(7),e=TL.Util.getUrlVars(this.data.url),this.media_id={},this.data.url.match("v=")?this.media_id.id=e.v:this.data.url.match("/embed/")?this.media_id.id=this.data.url.split("embed/")[1].split(/[?&]/)[0]:this.data.url.match(/v\/|v=|youtu\.be\//)?this.media_id.id=this.data.url.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/)[0]:trace("YOUTUBE IN URL BUT NOT A VALID VIDEO"),this.media_id.start=TL.Util.parseYouTubeTime(e.t),this.media_id.hd=Boolean("undefined"!=typeof e.hd),TL.Load.js("https://www.youtube.com/iframe_api",function(){t.createMedia()})},_updateMediaDisplay:function(){this._el.content_item.style.height=TL.Util.ratio.r16_9({w:this.options.width})+"px",this._el.content_item.style.width=this.options.width+"px"},_stopMedia:function(){if(this.youtube_loaded)try{this.player.getPlayerState()==YT.PlayerState.PLAYING&&this.player.pauseVideo()}catch(t){trace(t)}},createMedia:function(){var t=this;clearTimeout(this.timer),"undefined"!=typeof YT&&"undefined"!=typeof YT.Player?this.player=new YT.Player(this._el.content_item.id,{playerVars:{enablejsapi:1,color:"white",autohide:1,showinfo:0,theme:"light",start:this.media_id.start,fs:0,rel:0},videoId:this.media_id.id,events:{onReady:function(){t.onPlayerReady(),t.onLoaded()},onStateChange:t.onStateChange}}):this.timer=setTimeout(function(){t.createMedia()},1e3)},onPlayerReady:function(t){this.youtube_loaded=!0,this._el.content_item=document.getElementById(this._el.content_item.id),this.onMediaLoaded()},onStateChange:function(t){t.data==YT.PlayerState.ENDED&&(t.target.seekTo(0),t.target.pauseVideo())}}),TL.Slide=TL.Class.extend({includes:[TL.Events,TL.DomMixins,TL.I18NMixins],_el:{},initialize:function(t,e,i){this._el={container:{},scroll_container:{},background:{},content_container:{},content:{}},this._media=null,this._mediaclass={},this._text={},this._state={loaded:!1},this.has={headline:!1,text:!1,media:!1,title:!1,background:{image:!1,color:!1,color_value:""}},this.has.title=i,this.data={unique_id:null,background:null,start_date:null,end_date:null,location:null,text:null,media:null,autolink:!0},this.options={duration:1e3,slide_padding_lr:40,ease:TL.Ease.easeInSpline,width:600,height:600,skinny_size:650,media_name:""},this.active=!1,this.animator={},TL.Util.mergeData(this.options,e),TL.Util.mergeData(this.data,t),this._initLayout(),this._initEvents()},show:function(){this.animator=TL.Animate(this._el.slider_container,{left:-(this._el.container.offsetWidth*n)+"px",duration:this.options.duration,easing:this.options.ease})},hide:function(){},setActive:function(t){this.active=t,this.active?(this.data.background&&this.fire("background_change",this.has.background),this.loadMedia()):this.stopMedia()},addTo:function(t){t.appendChild(this._el.container)},removeFrom:function(t){t.removeChild(this._el.container)},updateDisplay:function(t,e,i){this._updateDisplay(t,e,i)},loadMedia:function(){this._media&&!this._state.loaded&&(this._media.loadMedia(),this._state.loaded=!0)},stopMedia:function(){this._media&&this._state.loaded&&this._media.stopMedia()},getBackground:function(){return this.has.background},scrollToTop:function(){this._el.container.scrollTop=0},getFormattedDate:function(){if(TL.Util.trim(this.data.display_date).length>0)return this.data.display_date;var t="";return this.has.title||(this.data.end_date&&(t=" — "+this.data.end_date.getDisplayDate(this.getLanguage())),this.data.start_date&&(t=this.data.start_date.getDisplayDate(this.getLanguage())+t)),t},_initLayout:function(){this._el.container=TL.Dom.create("div","tl-slide"),this.has.title&&(this._el.container.className="tl-slide tl-slide-titleslide"),this.data.unique_id&&(this._el.container.id=this.data.unique_id),this._el.scroll_container=TL.Dom.create("div","tl-slide-scrollable-container",this._el.container),this._el.content_container=TL.Dom.create("div","tl-slide-content-container",this._el.scroll_container),this._el.content=TL.Dom.create("div","tl-slide-content",this._el.content_container),this._el.background=TL.Dom.create("div","tl-slide-background",this._el.container),this.data.background&&(this.data.background.url&&(this.has.background.image=!0,this._el.container.className+=" tl-full-image-background",this.has.background.color_value="#000",this._el.background.style.backgroundImage="url('"+this.data.background.url+"')",this._el.background.style.display="block"),this.data.background.color&&(this.has.background.color=!0,this._el.container.className+=" tl-full-color-background",this.has.background.color_value=this.data.background.color),this.data.background.text_background&&(this._el.container.className+=" tl-text-background")),this.data.media&&this.data.media.url&&""!=this.data.media.url&&(this.has.media=!0),this.data.text&&this.data.text.text&&(this.has.text=!0),this.data.text&&this.data.text.headline&&(this.has.headline=!0),this.has.media&&(this.data.media.mediatype=TL.MediaType(this.data.media),this.options.media_name=this.data.media.mediatype.name,this.options.media_type=this.data.media.mediatype.type,this.options.autolink=this.data.autolink,this._media=new this.data.media.mediatype.cls(this.data.media,this.options)),(this.has.text||this.has.headline)&&(this._text=new TL.Media.Text(this.data.text,{title:this.has.title,language:this.options.language,autolink:this.data.autolink}),this._text.addDateText(this.getFormattedDate())),this.has.text||this.has.headline||!this.has.media?this.has.headline&&this.has.media&&!this.has.text?(this._el.container.className+=" tl-slide-media-only",this._text.addTo(this._el.content),this._media.addTo(this._el.content)):this.has.text&&this.has.media?(this._media.addTo(this._el.content),this._text.addTo(this._el.content)):(this.has.text||this.has.headline)&&(this._el.container.className+=" tl-slide-text-only",this._text.addTo(this._el.content)):(this._el.container.className+=" tl-slide-media-only",this._media.addTo(this._el.content)),this.onLoaded()},_initEvents:function(){},_updateDisplay:function(t,e,i){var n,a=this.options.slide_padding_lr,s=this.options.slide_padding_lr;t?this.options.width=t:this.options.width=this._el.container.offsetWidth,n=this.options.width-2*this.options.slide_padding_lr,TL.Browser.mobile&&this.options.width<=this.options.skinny_size?(a=0,s=0,n=this.options.width):"landscape"==i||this.options.width<=this.options.skinny_size&&(a=50,s=50,n=this.options.width-a-s),this._el.content.style.paddingLeft=a+"px",this._el.content.style.paddingRight=s+"px",this._el.content.style.width=n+"px",e?this.options.height=e:this.options.height=this._el.container.offsetHeight,this._media&&(!this.has.text&&this.has.headline?this._media.updateDisplay(n,this.options.height-this._text.headlineHeight(),i):this.has.text||this.has.headline?this.options.width<=this.options.skinny_size?this._media.updateDisplay(n,this.options.height,i):this._media.updateDisplay(n/2,this.options.height,i):this._media.updateDisplay(n,this.options.height,i))}}),TL.SlideNav=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t,e,i){this._el={container:{},content_container:{},icon:{},title:{},description:{}},this.mediatype={},this.data={title:"Navigation",description:"Description",date:"Date"},this.options={direction:"previous"},this.animator=null,TL.Util.mergeData(this.options,e),TL.Util.mergeData(this.data,t),this._el.container=TL.Dom.create("div","tl-slidenav-"+this.options.direction),TL.Browser.mobile&&this._el.container.setAttribute("ontouchstart"," "),this._initLayout(),this._initEvents(),i&&i.appendChild(this._el.container)},update:function(t){var e={title:"",description:"",date:t.getFormattedDate()};t.data.text&&t.data.text.headline&&(e.title=t.data.text.headline),this._update(e)},setColor:function(t){t?this._el.content_container.className="tl-slidenav-content-container tl-slidenav-inverted":this._el.content_container.className="tl-slidenav-content-container"},_onMouseClick:function(){this.fire("clicked",this.options)},_update:function(t){this.data=TL.Util.mergeData(this.data,t),this._el.title.innerHTML=TL.Util.unlinkify(this.data.title),this._el.description.innerHTML=TL.Util.unlinkify(this.data.date)},_initLayout:function(){this._el.content_container=TL.Dom.create("div","tl-slidenav-content-container",this._el.container),this._el.icon=TL.Dom.create("div","tl-slidenav-icon",this._el.content_container),this._el.title=TL.Dom.create("div","tl-slidenav-title",this._el.content_container),this._el.description=TL.Dom.create("div","tl-slidenav-description",this._el.content_container),this._el.icon.innerHTML=" ",this._update()},_initEvents:function(){TL.DomEvent.addListener(this._el.container,"click",this._onMouseClick,this)}}),TL.StorySlider=TL.Class.extend({includes:TL.Events,initialize:function(t,e,i,n){this._el={container:{},background:{},slider_container_mask:{},slider_container:{},slider_item_container:{}},this._nav={},this._nav.previous={},this._nav.next={},this.slide_spacing=0,this._slides=[],this._swipable,this.preloadTimer,this._message,this.current_id="",this.data={},this.options={id:"",layout:"portrait",width:600,height:600,default_bg_color:{r:255,g:255,b:255},slide_padding_lr:40,start_at_slide:1,slide_default_fade:"0%",duration:1e3,ease:TL.Ease.easeInOutQuint,dragging:!0,trackResize:!0},"object"==typeof t?(this._el.container=t,this.options.id=TL.Util.unique_ID(6,"tl")):(this.options.id=t,this._el.container=TL.Dom.get(t)),
-this._el.container.id||(this._el.container.id=this.options.id),this.animator=null,TL.Util.mergeData(this.options,i),TL.Util.mergeData(this.data,e),n&&this.init()},init:function(){this._initLayout(),this._initEvents(),this._initData(),this._updateDisplay(),this.goTo(this.options.start_at_slide),this._onLoaded()},_addSlide:function(t){t.addTo(this._el.slider_item_container),t.on("added",this._onSlideAdded,this),t.on("background_change",this._onBackgroundChange,this)},_createSlide:function(t,e,i){var n=new TL.Slide(t,this.options,e);this._addSlide(n),0>i?this._slides.push(n):this._slides.splice(i,0,n)},_createSlides:function(t){for(var e=0;e=0&&(this.current_id=this._slides[t].data.unique_id,this.animator&&this.animator.stop(),this._swipable&&this._swipable.stopMomentum(),e?(this._el.slider_container.style.left=-(this.slide_spacing*t)+"px",this._onSlideChange(i)):this.animator=TL.Animate(this._el.slider_container,{left:-(this.slide_spacing*t)+"px",duration:this.options.duration,easing:this.options.ease,complete:this._onSlideChange(i)}),this._slides[t].setActive(!0),this._slides[t+1]?(this.showNav(this._nav.next,!0),this._nav.next.update(this._slides[t+1])):this.showNav(this._nav.next,!1),this._slides[t-1]?(this.showNav(this._nav.previous,!0),this._nav.previous.update(this._slides[t-1])):this.showNav(this._nav.previous,!1),this.preloadTimer=setTimeout(function(){n.preloadSlides(t)},this.options.duration))},goToId:function(t,e,i){this.goTo(this._findSlideIndex(t),e,i)},preloadSlides:function(t){this._slides[t+1]&&(this._slides[t+1].loadMedia(),this._slides[t+1].scrollToTop()),this._slides[t+2]&&(this._slides[t+2].loadMedia(),this._slides[t+2].scrollToTop()),this._slides[t-1]&&(this._slides[t-1].loadMedia(),this._slides[t-1].scrollToTop()),this._slides[t-2]&&(this._slides[t-2].loadMedia(),this._slides[t-2].scrollToTop())},next:function(){var t=this._findSlideIndex(this.current_id);t+1=0?this.goTo(t-1):this.goTo(t)},showNav:function(t,e){this.options.width<=500&&TL.Browser.mobile||(e?t.show():t.hide())},changeBackground:function(t){var e={r:256,g:256,b:256},i;t.color_value&&""!=t.color_value?(e=TL.Util.hexToRgb(t.color_value),e||(trace("Invalid color value "+t.color_value),e=this.options.default_bg_color)):(e=this.options.default_bg_color,t.color_value="rgb("+e.r+" , "+e.g+", "+e.b+")"),i=e.r+","+e.g+","+e.b,this._el.background.style.backgroundImage="none",t.color_value?this._el.background.style.backgroundColor=t.color_value:this._el.background.style.backgroundColor="transparent",e.r<255||e.g<255||e.b<255||t.image?(this._nav.next.setColor(!0),this._nav.previous.setColor(!0)):(this._nav.next.setColor(!1),this._nav.previous.setColor(!1))},_updateDisplay:function(t,e,i,n){var a,s;s="undefined"==typeof n?this.options.layout:n,this.options.layout=s,this.slide_spacing=2*this.options.width,t?this.options.width=t:this.options.width=this._el.container.offsetWidth,e?this.options.height=e:this.options.height=this._el.container.offsetHeight,a=this.options.height/2,this._nav.next.setPosition({top:a}),this._nav.previous.setPosition({top:a});for(var o=0;oOK"),this._message.addTo(this._el.container))},_initEvents:function(){this._nav.next.on("clicked",this._onNavigation,this),this._nav.previous.on("clicked",this._onNavigation,this),this._message&&this._message.on("clicked",this._onMessageClick,this),this._swipable&&(this._swipable.on("swipe_left",this._onNavigation,this),this._swipable.on("swipe_right",this._onNavigation,this),this._swipable.on("swipe_nodirection",this._onSwipeNoDirection,this))},_initData:function(){this.data.title&&this._createSlide(this.data.title,!0,-1),this._createSlides(this.data.events)},_onBackgroundChange:function(t){var e=this._findSlideIndex(this.current_id),i=this._slides[e].getBackground();this.changeBackground(t),this.fire("colorchange",i)},_onMessageClick:function(t){this._message.hide()},_onSwipeNoDirection:function(t){this.goToId(this.current_id)},_onNavigation:function(t){"next"==t.direction||"left"==t.direction?this.next():("previous"==t.direction||"right"==t.direction)&&this.previous(),this.fire("nav_"+t.direction,this.data)},_onSlideAdded:function(t){trace("slideadded"),this.fire("slideAdded",this.data)},_onSlideRemoved:function(t){this.fire("slideRemoved",this.data)},_onSlideChange:function(t){t||this.fire("change",{unique_id:this.current_id})},_onMouseClick:function(t){},_fireMouseEvent:function(t){if(this._loaded){var e=t.type;e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)&&("contextmenu"===e&&TL.DomEvent.preventDefault(t),this.fire(e,{latlng:"something",layerPoint:"something else"}))}},_onLoaded:function(){this.fire("loaded",this.data)}}),TL.TimeNav=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t,e,i,n){this._el={parent:{},container:{},slider:{},slider_background:{},line:{},marker_container_mask:{},marker_container:{},marker_item_container:{},timeaxis:{},timeaxis_background:{},attribution:{}},this.collapsed=!1,"object"==typeof t?this._el.container=t:this._el.container=TL.Dom.get(t),this.config=e,this.options={width:600,height:600,duration:1e3,ease:TL.Ease.easeInOutQuint,has_groups:!1,optimal_tick_width:50,scale_factor:2,marker_padding:5,timenav_height_min:150,marker_height_min:30,marker_width_min:100,zoom_sequence:[.5,1,2,3,5,8,13,21,34,55,89]},this.animator=null,this.ready=!1,this._markers=[],this._eras=[],this.has_eras=!1,this._groups=[],this._calculated_row_height=100,this.current_id="",this.timescale={},this.timeaxis={},this.axishelper={},this.max_rows=6,this.animate_css=!1,this._swipable,TL.Util.mergeData(this.options,i),n&&this.init()},init:function(){this._initLayout(),this._initEvents(),this._initData(),this._updateDisplay(),this._onLoaded()},positionMarkers:function(){this._positionMarkers()},updateDisplay:function(t,e,i,n){this._updateDisplay(t,e,i,n)},_getTimeScale:function(){var t=0;try{t=parseInt(this.options.marker_height_min)}catch(e){trace("Invalid value for marker_height_min option."),t=30}return 0==t&&(trace("marker_height_min option must not be zero."),t=30),this.max_rows=Math.round((this.options.height-this._el.timeaxis_background.offsetHeight-this.options.marker_padding)/t),this.max_rows<1&&(this.max_rows=1),new TL.TimeScale(this.config,{display_width:this._el.container.offsetWidth,screen_multiplier:this.options.scale_factor,max_rows:this.max_rows})},_updateTimeScale:function(t){this.options.scale_factor=t,this._updateDrawTimeline()},zoomIn:function(){var t=TL.Util.findNextGreater(this.options.zoom_sequence,this.options.scale_factor);t==this.options.zoom_sequence[this.options.zoom_sequence.length-1]?this.fire("zoomtoggle",{zoom:"in",show:!1}):this.fire("zoomtoggle",{zoom:"in",show:!0}),this.setZoomFactor(t)},zoomOut:function(){var t=TL.Util.findNextLesser(this.options.zoom_sequence,this.options.scale_factor);t==this.options.zoom_sequence[0]?this.fire("zoomtoggle",{zoom:"out",show:!1}):this.fire("zoomtoggle",{zoom:"out",show:!0}),this.setZoomFactor(t)},setZoom:function(t){var e=this.options.zoom_sequence[t];"number"==typeof e?this.setZoomFactor(e):console.warn("Invalid zoom level. Please use a number between 0 and "+(this.options.zoom_sequence.length-1))},setZoomFactor:function(t){this.options.scale_factor=t,this.goToId(this.current_id,!this._updateDrawTimeline(!0),!0)},_createGroups:function(){var t=this.timescale.getGroupLabels();if(t){this.options.has_groups=!0;for(var e=0;et-this.options.marker_padding&&(o=!0),this._groups[n].setRowPosition(s,this._calculated_row_height+this.options.marker_padding/2),this._groups[n].setAlternateRowColor(TL.Util.isEven(n),o),a+=this._groups[n].data.rows}},_addMarker:function(t){t.addTo(this._el.marker_item_container),t.on("markerclick",this._onMarkerClick,this),t.on("added",this._onMarkerAdded,this)},_createMarker:function(t,e){var i=new TL.TimeMarker(t,this.options);this._addMarker(i),0>e?this._markers.push(i):this._markers.splice(e,0,i)},_createMarkers:function(t){for(var e=0;ee?this._eras.push(i):this._eras.splice(e,0,i)},_addEra:function(t){t.addTo(this._el.marker_item_container),t.on("added",this._onEraAdded,this)},_removeEra:function(t){t.removeFrom(this._el.marker_item_container)},_destroyEra:function(t){this._removeEra(this._eras[t]),this._eras.splice(t,1)},_positionEras:function(t){for(var e=0,i=0;i5&&(e=0),this._eras[i].setColor(e)}},createMarker:function(t,e){this._createMarker(t,e)},createMarkers:function(t){this._createMarkers(t)},destroyMarker:function(t){this._destroyMarker(t)},destroyMarkerId:function(t){this.destroyMarker(this._findMarkerIndex(t))},goTo:function(t,e,i){var n=this,a=this.options.ease,s=this.options.duration,o=0>t?0:t;this._resetMarkersActive(),t>=0&&t=0&&tMath.abs(t.wheelDeltaY)?t.wheelDeltaX/6:0),e&&(t.preventDefault&&t.preventDefault(),t.returnValue=!1),i=parseInt(this._el.slider.style.left.replace("px",""))+e,i>n.left?i=n.left:iTimeline JS",this.timeaxis=new TL.TimeAxis(this._el.timeaxis,this.options),this._swipable=new TL.Swipable(this._el.slider_background,this._el.slider,{enable:{x:!0,y:!1},constraint:{top:!1,bottom:!1,left:this.options.width/2,right:!1},snap:!1}),this._swipable.enable()},_initEvents:function(){this._swipable.on("dragmove",this._onDragMove,this),TL.DomEvent.addListener(this._el.container,"mousewheel",this._onMouseScroll,this),TL.DomEvent.addListener(this._el.container,"DOMMouseScroll",this._onMouseScroll,this)},_initData:function(){this._createMarkers(this.config.events),this.config.eras&&(this.has_eras=!0,this._createEras(this.config.eras)),this._drawTimeline()}}),TL.TimeMarker=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t,e){this._el={container:{},content_container:{},media_container:{},timespan:{},line_left:{},line_right:{},content:{},text:{},media:{}},this._text={},this._state={loaded:!1},this.data={unique_id:"",background:null,date:{year:0,month:0,day:0,hour:0,minute:0,second:0,millisecond:0,thumbnail:"",format:""},text:{headline:"",text:""},media:null},this.options={duration:1e3,ease:TL.Ease.easeInSpline,width:600,height:600,marker_width_min:100},this.active=!1,this.animator={},this.has_end_date=!1,TL.Util.mergeData(this.options,e),TL.Util.mergeData(this.data,t),this._initLayout(),this._initEvents()},show:function(){},hide:function(){},setActive:function(t){this.active=t,this.active&&this.has_end_date?this._el.container.className="tl-timemarker tl-timemarker-with-end tl-timemarker-active":this.active?this._el.container.className="tl-timemarker tl-timemarker-active":this.has_end_date?this._el.container.className="tl-timemarker tl-timemarker-with-end":this._el.container.className="tl-timemarker"},addTo:function(t){t.appendChild(this._el.container)},removeFrom:function(t){t.removeChild(this._el.container)},updateDisplay:function(t,e){this._updateDisplay(t,e)},loadMedia:function(){this._media&&!this._state.loaded&&(this._media.loadMedia(),this._state.loaded=!0)},stopMedia:function(){this._media&&this._state.loaded&&this._media.stopMedia()},getLeft:function(){return this._el.container.style.left.slice(0,-2)},getTime:function(){return this.data.start_date.getTime()},getEndTime:function(){return this.data.end_date?this.data.end_date.getTime():!1},setHeight:function(t){var e=12,i=1;this._el.content_container.style.height=t+"px",this._el.timespan_content.style.height=t+"px",30>=t?this._el.content.className="tl-timemarker-content tl-timemarker-content-small":this._el.content.className="tl-timemarker-content",56>=t?TL.DomUtil.addClass(this._el.content_container,"tl-timemarker-content-container-small"):TL.DomUtil.removeClass(this._el.content_container,"tl-timemarker-content-container-small"),TL.Browser.webkit?(i=Math.floor(t/(e+2)),1>i&&(i=1),this._text.className="tl-headline",this._text.style.webkitLineClamp=i):(i=t/e,i>1?this._text.className="tl-headline tl-headline-fadeout":this._text.className="tl-headline",this._text.style.height=i*e+"px")},setWidth:function(t){this.data.end_date&&(this._el.container.style.width=t+"px",t>this.options.marker_width_min?(this._el.content_container.style.width=t+"px",this._el.content_container.className="tl-timemarker-content-container tl-timemarker-content-container-long"):(this._el.content_container.style.width=this.options.marker_width_min+"px",this._el.content_container.className="tl-timemarker-content-container"))},setClass:function(t){this._el.container.className=t},setRowPosition:function(t,e){this.setPosition({top:t}),this._el.timespan.style.height=e+"px"},_onMarkerClick:function(t){this.fire("markerclick",{unique_id:this.data.unique_id})},_initLayout:function(){if(this._el.container=TL.Dom.create("div","tl-timemarker"),this.data.unique_id&&(this._el.container.id=this.data.unique_id+"-marker"),this.data.end_date&&(this.has_end_date=!0,this._el.container.className="tl-timemarker tl-timemarker-with-end"),this._el.timespan=TL.Dom.create("div","tl-timemarker-timespan",this._el.container),this._el.timespan_content=TL.Dom.create("div","tl-timemarker-timespan-content",this._el.timespan),this._el.content_container=TL.Dom.create("div","tl-timemarker-content-container",this._el.container),this._el.content=TL.Dom.create("div","tl-timemarker-content",this._el.content_container),this._el.line_left=TL.Dom.create("div","tl-timemarker-line-left",this._el.timespan),this._el.line_right=TL.Dom.create("div","tl-timemarker-line-right",this._el.timespan),this.data.media)if(this._el.media_container=TL.Dom.create("div","tl-timemarker-media-container",this._el.content),this.data.media.thumbnail&&""!=this.data.media.thumbnail)this._el.media=TL.Dom.create("img","tl-timemarker-media",this._el.media_container),this._el.media.src=TL.Util.transformImageURL(this.data.media.thumbnail);else{var t=TL.MediaType(this.data.media).type;this._el.media=TL.Dom.create("span","tl-icon-"+t,this._el.media_container)}this._el.text=TL.Dom.create("div","tl-timemarker-text",this._el.content),this._text=TL.Dom.create("h2","tl-headline",this._el.text),this.data.text.headline&&""!=this.data.text.headline?this._text.innerHTML=TL.Util.unlinkify(this.data.text.headline):this.data.text.text&&""!=this.data.text.text?this._text.innerHTML=TL.Util.unlinkify(this.data.text.text):this.data.media.caption&&""!=this.data.media.caption&&(this._text.innerHTML=TL.Util.unlinkify(this.data.media.caption)),this.onLoaded()},_initEvents:function(){TL.DomEvent.addListener(this._el.container,"click",this._onMarkerClick,this)},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),TL.TimeEra=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t,e){this._el={container:{},background:{},content_container:{},content:{},text:{}},this._text={},this._state={loaded:!1},this.data={unique_id:"",date:{year:0,month:0,day:0,hour:0,minute:0,second:0,millisecond:0,thumbnail:"",format:""},text:{headline:"",text:""}},this.options={duration:1e3,ease:TL.Ease.easeInSpline,width:600,height:600,marker_width_min:100},this.active=!1,this.animator={},this.has_end_date=!1,TL.Util.mergeData(this.options,e),TL.Util.mergeData(this.data,t),this._initLayout(),this._initEvents()},show:function(){},hide:function(){},setActive:function(t){},addTo:function(t){t.appendChild(this._el.container)},removeFrom:function(t){t.removeChild(this._el.container)},updateDisplay:function(t,e){this._updateDisplay(t,e)},getLeft:function(){return this._el.container.style.left.slice(0,-2)},getTime:function(){return this.data.start_date.getTime()},getEndTime:function(){return this.data.end_date?this.data.end_date.getTime():!1},setHeight:function(t){var e=12,i=1;this._el.content_container.style.height=t+"px",this._el.content.className="tl-timeera-content",TL.Browser.webkit?(i=Math.floor(t/(e+2)),1>i&&(i=1),this._text.className="tl-headline",this._text.style.webkitLineClamp=i):(i=t/e,i>1?this._text.className="tl-headline tl-headline-fadeout":this._text.className="tl-headline",this._text.style.height=i*e+"px")},setWidth:function(t){this.data.end_date&&(this._el.container.style.width=t+"px",t>this.options.marker_width_min?(this._el.content_container.style.width=t+"px",this._el.content_container.className="tl-timeera-content-container tl-timeera-content-container-long"):(this._el.content_container.style.width=this.options.marker_width_min+"px",this._el.content_container.className="tl-timeera-content-container"))},setClass:function(t){this._el.container.className=t},setRowPosition:function(t,e){this.setPosition({top:t})},setColor:function(t){this._el.container.className="tl-timeera tl-timeera-color"+t},_initLayout:function(){this._el.container=TL.Dom.create("div","tl-timeera"),this.data.unique_id&&(this._el.container.id=this.data.unique_id+"-era"),this.data.end_date&&(this.has_end_date=!0,this._el.container.className="tl-timeera tl-timeera-with-end"),this._el.content_container=TL.Dom.create("div","tl-timeera-content-container",this._el.container),this._el.background=TL.Dom.create("div","tl-timeera-background",this._el.content_container),this._el.content=TL.Dom.create("div","tl-timeera-content",this._el.content_container),this._el.text=TL.Dom.create("div","tl-timeera-text",this._el.content),this._text=TL.Dom.create("h2","tl-headline",this._el.text),this.data.text.headline&&""!=this.data.text.headline&&(this._text.innerHTML=TL.Util.unlinkify(this.data.text.headline)),this.onLoaded()},_initEvents:function(){},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),TL.TimeGroup=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t){this._el={parent:{},container:{},message:{}},this.options={width:600,height:600},this.data={label:"",rows:1},this._el.container=TL.Dom.create("div","tl-timegroup"),TL.Util.mergeData(this.data,t),this.animator={},this._initLayout(),this._initEvents()},updateDisplay:function(t,e){},setRowPosition:function(t,e){this.options.height=e*this.data.rows,this.setPosition({top:t}),this._el.container.style.height=this.options.height+"px"},setAlternateRowColor:function(t,e){var i="tl-timegroup";t&&(i+=" tl-timegroup-alternate"),e&&(i+=" tl-timegroup-hidden"),this._el.container.className=i},_onMouseClick:function(){this.fire("clicked",this.options)},_initLayout:function(){this._el.message=TL.Dom.create("div","tl-timegroup-message",this._el.container),this._el.message.innerHTML=this.data.label},_initEvents:function(){TL.DomEvent.addListener(this._el.container,"click",this._onMouseClick,this)},_updateDisplay:function(t,e,i){}}),TL.TimeScale=TL.Class.extend({initialize:function(t,e){var i=t.events;this._scale=t.scale,e=TL.Util.mergeData({display_width:500,screen_multiplier:3,max_rows:null},e),this._display_width=e.display_width,this._screen_multiplier=e.screen_multiplier,this._pixel_width=this._screen_multiplier*this._display_width,this._group_labels=void 0,this._positions=[],this._pixels_per_milli=0,this._earliest=t.getEarliestDate().getTime(),this._latest=t.getLatestDate().getTime(),this._span_in_millis=this._latest-this._earliest,this._span_in_millis<=0&&(this._span_in_millis=this._computeDefaultSpan(t)),this._average=this._span_in_millis/i.length,this._pixels_per_milli=this.getPixelWidth()/this._span_in_millis,this._axis_helper=TL.AxisHelper.getBestHelper(this),this._scaled_padding=1/this.getPixelsPerTick()*(this._display_width/2),this._computePositionInfo(i,e.max_rows)},_computeDefaultSpan:function(t){if("human"==t.scale){for(var e={},i=0;i=0;i--)if(e.hasOwnProperty(TL.Date.SCALES[i][0])){var a=TL.Date.SCALES[TL.Date.SCALES.length-1];return TL.Date.SCALES[i+1]&&(a=TL.Date.SCALES[i+1]),a[1]}return 31536e6}return 2e5},getGroupLabels:function(){return this._group_labels||[]},getScale:function(){return this._scale},getNumberOfRows:function(){return this._number_of_rows},getPixelWidth:function(){return this._pixel_width},getPosition:function(t){return(t-this._earliest)*this._pixels_per_milli},getPositionInfo:function(t){return this._positions[t]},getPixelsPerTick:function(){return this._axis_helper.getPixelsPerTick(this._pixels_per_milli)},getTicks:function(){return{major:this._axis_helper.getMajorTicks(this),minor:this._axis_helper.getMinorTicks(this)}},getDateFromTime:function(t){if("human"==this._scale)return new TL.Date(t);if("cosmological"==this._scale)return new TL.BigDate(new TL.BigYear(t));throw"Don't know how to get date from time for "+this._scale},getMajorScale:function(){return this._axis_helper.major.name},getMinorScale:function(){return this._axis_helper.minor.name},_assessGroups:function(t){for(var e=[],i=!1,n=0;n0)s.row=i.length,i.push(s),e--;else{var l=Math.min.apply(null,o),h=o.indexOf(l);s.row=h,s.end>i[h].end&&(i[h]=s),n++}}return{n_rows:i.length,n_overlaps:n}},_computePositionInfo:function(t,e,i){i=i||100;for(var n=[],a=!1,s=0;si?o.end=o.start+o.width:o.end=o.start+i}else o.width=i,o.end=o.start+i;t[s].group?n.indexOf(t[s].group)<0&&n.push(t[s].group):a=!0}if(n.length){a&&n.push("");for(var l=[],s=0;s=0;d--)h.positions[d].end>o.start&&h.n_overlaps++;h.positions.push(o)}for(var c=n.length;;){var u=Math.max(0,e-c);if(!u)break;if(l.sort(function(t,e){return t.n_overlaps>e.n_overlaps?-1:t.n_overlapsn&&(a=Math.round(i/e.getPixelsPerTick()));for(var s=1,o=0;o1?s>=a?(s=1,r.tick_text.style.opacity=1,r.tick.className="tl-timeaxis-tick"):(s++,r.tick_text.style.opacity=0,r.tick.className="tl-timeaxis-tick tl-timeaxis-tick-hidden"):(r.tick_text.style.opacity=1,r.tick.className="tl-timeaxis-tick")}}},_initLayout:function(){this._el.content_container=TL.Dom.create("div","tl-timeaxis-content-container",this._el.container),this._el.major=TL.Dom.create("div","tl-timeaxis-major",this._el.content_container),this._el.minor=TL.Dom.create("div","tl-timeaxis-minor",this._el.content_container),this.onLoaded()},_initEvents:function(){},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),TL.AxisHelper=TL.Class.extend({initialize:function(t){if(!t)throw"Axis helper must be configured with options";this.scale=t.scale,this.minor=t.minor,this.major=t.major},getPixelsPerTick:function(t){return t*this.minor.factor},getMajorTicks:function(t){return this._getTicks(t,this.major)},getMinorTicks:function(t){return this._getTicks(t,this.minor)},_getTicks:function(t,e){for(var i=t._scaled_padding*e.factor,n=t._earliest-i,a=t._latest+i,s=[],o=n;a>o;o+=e.factor)s.push(t.getDateFromTime(o).floor(e.name));return{name:e.name,ticks:s}}}),function(t){var e={},i=function(i,n){e[i]=[];for(var a=0;ai){if(null==s)return r;var h=Math.abs(i-l),d=Math.abs(i-l);return d>h?r:s}s=r}return a[a.length-1]}}(TL.AxisHelper),TL.Timeline=TL.Class.extend({includes:[TL.Events,TL.I18NMixins],initialize:function(t,e,i){var n=this;if(i||(i={}),this.version="3.2.6",this.ready=!1,this._el={container:{},storyslider:{},timenav:{},menubar:{}},"object"==typeof t?this._el.container=t:this._el.container=TL.Dom.get(t),this._storyslider={},this._style_sheet=new TL.StyleSheet,this._timenav={},this.message=new TL.Message({},{message_class:"tl-message-full"}),this._menubar={},this._loaded={storyslider:!1,timenav:!1},this.config=null,this.options={script_path:"",height:this._el.container.offsetHeight,width:this._el.container.offsetWidth,debug:!1,is_embed:!1,is_full_embed:!1,hash_bookmark:!1,default_bg_color:{r:255,g:255,b:255},scale_factor:2,layout:"landscape",timenav_position:"bottom",optimal_tick_width:60,base_class:"tl-timeline",timenav_height:null,timenav_height_percentage:25,timenav_mobile_height_percentage:40,timenav_height_min:175,marker_height_min:30,marker_width_min:100,marker_padding:5,start_at_slide:0,start_at_end:!1,menubar_height:0,skinny_size:650,medium_size:800,relative_date:!1,use_bc:!1,duration:1e3,ease:TL.Ease.easeInOutQuint,dragging:!0,trackResize:!0,map_type:"stamen:toner-lite",slide_padding_lr:100,slide_default_fade:"0%",zoom_sequence:[.5,1,2,3,5,8,13,21,34,55,89],language:"en",ga_property_id:null,track_events:["back_to_start","nav_next","nav_previous","zoom_in","zoom_out"]},this.animator_timenav=null,this.animator_storyslider=null,this.animator_menubar=null,"string"==typeof i.default_bg_color){var a=TL.Util.hexToRgb(i.default_bg_color);a?i.default_bg_color=a:(delete i.default_bg_color,trace("Invalid default background color. Ignoring."))}TL.Util.mergeData(this.options,i),window.addEventListener("resize",function(t){n.updateDisplay()}),TL.debug=this.options.debug,this._el.container.className+=" tl-timeline",this.options.is_embed&&(this._el.container.className+=" tl-timeline-embed"),this.options.is_full_embed&&(this._el.container.className+=" tl-timeline-full-embed"),this.message.addTo(this._el.container),this.options.relative_date?"undefined"!=typeof moment?n._loadLanguage(e):TL.Load.js(this.options.script_path+"/library/moment.js",function(){n._loadLanguage(e),trace("LOAD MOMENTJS")}):n._loadLanguage(e)},_loadLanguage:function(t){var e=this;this.options.language=new TL.Language(this.options),this._initData(t)},goToId:function(t){this.current_id!=t&&(this.current_id=t,this._timenav.goToId(this.current_id),this._storyslider.goToId(this.current_id,!1,!0),this.fire("change",{unique_id:this.current_id},this))},goTo:function(t){this.config.title?0==t?this.goToId(this.config.title.unique_id):this.goToId(this.config.events[t-1].unique_id):this.goToId(this.config.events[t].unique_id)},goToStart:function(){this.goTo(0)},goToEnd:function(){var t=this.config.events.length-1;this.goTo(this.config.title?t+1:t)},goToPrev:function(){this.goTo(this._getSlideIndex(this.current_id)-1)},goToNext:function(){this.goTo(this._getSlideIndex(this.current_id)+1)},add:function(t){var e=this.config.addEvent(t),i=this._getEventIndex(e),n=this.config.events[i];this._storyslider.createSlide(n,this.config.title?i+1:i),this._storyslider._updateDrawSlides(),this._timenav.createMarker(n,i),this._timenav._updateDrawTimeline(!1),this.fire("added",{unique_id:e})},remove:function(t){if(t>=0&&t0&&t<=this.config.events.length)return this.config.events[t-1]}else if(t>=0&&t=0&&t"+this._("error")+": "+this.config.getErrors("
"))},_initLayout:function(){var t=this;this._el.container.innerHTML="","top"==this.options.timenav_position?(this._el.timenav=TL.Dom.create("div","tl-timenav",this._el.container),this._el.storyslider=TL.Dom.create("div","tl-storyslider",this._el.container)):(this._el.storyslider=TL.Dom.create("div","tl-storyslider",this._el.container),this._el.timenav=TL.Dom.create("div","tl-timenav",this._el.container)),this._el.menubar=TL.Dom.create("div","tl-menubar",this._el.container),this.options.width=this._el.container.offsetWidth,this.options.height=this._el.container.offsetHeight,this._el.storyslider.style.top="1px",this.options.timenav_height=this._calculateTimeNavHeight(this.options.timenav_height),this._timenav=new TL.TimeNav(this._el.timenav,this.config,this.options),this._timenav.on("loaded",this._onTimeNavLoaded,this),this._timenav.on("update_timenav_min",this._updateTimeNavHeightMin,this),this._timenav.options.height=this.options.timenav_height,this._timenav.init(),this.options.initial_zoom&&this.setZoom(this.options.initial_zoom),this._storyslider=new TL.StorySlider(this._el.storyslider,this.config,this.options),this._storyslider.on("loaded",this._onStorySliderLoaded,this),this._storyslider.init(),this._menubar=new TL.MenuBar(this._el.menubar,this._el.container,this.options),"portrait"==this.options.layout?this.options.storyslider_height=this.options.height-this.options.timenav_height-1:this.options.storyslider_height=this.options.height-1,this._updateDisplay(this._timenav.options.height,!0,2e3)},_initEvents:function(){this._timenav.on("change",this._onTimeNavChange,this),this._timenav.on("zoomtoggle",this._onZoomToggle,this),this._storyslider.on("change",this._onSlideChange,this),this._storyslider.on("colorchange",this._onColorChange,this),this._storyslider.on("nav_next",this._onStorySliderNext,this),this._storyslider.on("nav_previous",this._onStorySliderPrevious,this),this._menubar.on("zoom_in",this._onZoomIn,this),this._menubar.on("zoom_out",this._onZoomOut,this),this._menubar.on("back_to_start",this._onBackToStart,this)},_initGoogleAnalytics:function(){!function(t,e,i,n,a,s,o){t.GoogleAnalyticsObject=a,t[a]=t[a]||function(){(t[a].q=t[a].q||[]).push(arguments)},t[a].l=1*new Date,s=e.createElement(i),o=e.getElementsByTagName(i)[0],s.async=1,s.src=n,o.parentNode.insertBefore(s,o)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",this.options.ga_property_id,"auto")},_initAnalytics:function(){if(null!==this.options.ga_property_id){this._initGoogleAnalytics(),ga("send","pageview");var t=this.options.track_events;for(i=0;ithis.config.events.length?this.goToEnd():this.goTo(this.options.start_at_slide),this.options.hash_bookmark&&this._updateHashBookmark(this.current_id)))}}),TL.Timeline.source_path=function(){var t=document.getElementsByTagName("script"),e=t[t.length-1].src;return e.substr(0,e.lastIndexOf("/"))}();
\ No newline at end of file
+this._el.container.id||(this._el.container.id=this.options.id),this.animator=null,TL.Util.mergeData(this.options,i),TL.Util.mergeData(this.data,e),n&&this.init()},init:function(){this._initLayout(),this._initEvents(),this._initData(),this._updateDisplay(),this.goTo(this.options.start_at_slide),this._onLoaded()},_addSlide:function(t){t.addTo(this._el.slider_item_container),t.on("added",this._onSlideAdded,this),t.on("background_change",this._onBackgroundChange,this)},_createSlide:function(t,e,i){var n=new TL.Slide(t,this.options,e);this._addSlide(n),0>i?this._slides.push(n):this._slides.splice(i,0,n)},_createSlides:function(t){for(var e=0;e=0&&(this.current_id=this._slides[t].data.unique_id,this.animator&&this.animator.stop(),this._swipable&&this._swipable.stopMomentum(),e?(this._el.slider_container.style.left=-(this.slide_spacing*t)+"px",this._onSlideChange(i)):this.animator=TL.Animate(this._el.slider_container,{left:-(this.slide_spacing*t)+"px",duration:this.options.duration,easing:this.options.ease,complete:this._onSlideChange(i)}),this._slides[t].setActive(!0),this._slides[t+1]?(this.showNav(this._nav.next,!0),this._nav.next.update(this._slides[t+1])):this.showNav(this._nav.next,!1),this._slides[t-1]?(this.showNav(this._nav.previous,!0),this._nav.previous.update(this._slides[t-1])):this.showNav(this._nav.previous,!1),this.preloadTimer=setTimeout(function(){n.preloadSlides(t)},this.options.duration))},goToId:function(t,e,i){this.goTo(this._findSlideIndex(t),e,i)},preloadSlides:function(t){this._slides[t+1]&&(this._slides[t+1].loadMedia(),this._slides[t+1].scrollToTop()),this._slides[t+2]&&(this._slides[t+2].loadMedia(),this._slides[t+2].scrollToTop()),this._slides[t-1]&&(this._slides[t-1].loadMedia(),this._slides[t-1].scrollToTop()),this._slides[t-2]&&(this._slides[t-2].loadMedia(),this._slides[t-2].scrollToTop())},next:function(){var t=this._findSlideIndex(this.current_id);t+1=0?this.goTo(t-1):this.goTo(t)},showNav:function(t,e){this.options.width<=500&&TL.Browser.mobile||(e?t.show():t.hide())},changeBackground:function(t){var e={r:256,g:256,b:256},i;t.color_value&&""!=t.color_value?(e=TL.Util.hexToRgb(t.color_value),e||(trace("Invalid color value "+t.color_value),e=this.options.default_bg_color)):(e=this.options.default_bg_color,t.color_value="rgb("+e.r+" , "+e.g+", "+e.b+")"),i=e.r+","+e.g+","+e.b,this._el.background.style.backgroundImage="none",t.color_value?this._el.background.style.backgroundColor=t.color_value:this._el.background.style.backgroundColor="transparent",e.r<255||e.g<255||e.b<255||t.image?(this._nav.next.setColor(!0),this._nav.previous.setColor(!0)):(this._nav.next.setColor(!1),this._nav.previous.setColor(!1))},_updateDisplay:function(t,e,i,n){var a,s;s="undefined"==typeof n?this.options.layout:n,this.options.layout=s,this.slide_spacing=2*this.options.width,t?this.options.width=t:this.options.width=this._el.container.offsetWidth,e?this.options.height=e:this.options.height=this._el.container.offsetHeight,a=this.options.height/2,this._nav.next.setPosition({top:a}),this._nav.previous.setPosition({top:a});for(var o=0;oOK"),this._message.addTo(this._el.container))},_initEvents:function(){this._nav.next.on("clicked",this._onNavigation,this),this._nav.previous.on("clicked",this._onNavigation,this),this._message&&this._message.on("clicked",this._onMessageClick,this),this._swipable&&(this._swipable.on("swipe_left",this._onNavigation,this),this._swipable.on("swipe_right",this._onNavigation,this),this._swipable.on("swipe_nodirection",this._onSwipeNoDirection,this))},_initData:function(){this.data.title&&this._createSlide(this.data.title,!0,-1),this._createSlides(this.data.events)},_onBackgroundChange:function(t){var e=this._findSlideIndex(this.current_id),i=this._slides[e].getBackground();this.changeBackground(t),this.fire("colorchange",i)},_onMessageClick:function(t){this._message.hide()},_onSwipeNoDirection:function(t){this.goToId(this.current_id)},_onNavigation:function(t){"next"==t.direction||"left"==t.direction?this.next():("previous"==t.direction||"right"==t.direction)&&this.previous(),this.fire("nav_"+t.direction,this.data)},_onSlideAdded:function(t){trace("slideadded"),this.fire("slideAdded",this.data)},_onSlideRemoved:function(t){this.fire("slideRemoved",this.data)},_onSlideChange:function(t){t||this.fire("change",{unique_id:this.current_id})},_onMouseClick:function(t){},_fireMouseEvent:function(t){if(this._loaded){var e=t.type;e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)&&("contextmenu"===e&&TL.DomEvent.preventDefault(t),this.fire(e,{latlng:"something",layerPoint:"something else"}))}},_onLoaded:function(){this.fire("loaded",this.data)}}),TL.TimeNav=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t,e,i,n){this._el={parent:{},container:{},slider:{},slider_background:{},line:{},marker_container_mask:{},marker_container:{},marker_item_container:{},timeaxis:{},timeaxis_background:{},attribution:{}},this.collapsed=!1,"object"==typeof t?this._el.container=t:this._el.container=TL.Dom.get(t),this.config=e,this.options={width:600,height:600,duration:1e3,ease:TL.Ease.easeInOutQuint,has_groups:!1,optimal_tick_width:50,scale_factor:2,marker_padding:5,timenav_height_min:150,marker_height_min:30,marker_width_min:100,zoom_sequence:[.5,1,2,3,5,8,13,21,34,55,89]},this.animator=null,this.ready=!1,this._markers=[],this._eras=[],this.has_eras=!1,this._groups=[],this._calculated_row_height=100,this.current_id="",this.timescale={},this.timeaxis={},this.axishelper={},this.max_rows=6,this.animate_css=!1,this._swipable,TL.Util.mergeData(this.options,i),n&&this.init()},init:function(){this._initLayout(),this._initEvents(),this._initData(),this._updateDisplay(),this._onLoaded()},positionMarkers:function(){this._positionMarkers()},updateDisplay:function(t,e,i,n){this._updateDisplay(t,e,i,n)},_getTimeScale:function(){var t=0;try{t=parseInt(this.options.marker_height_min)}catch(e){trace("Invalid value for marker_height_min option."),t=30}return 0==t&&(trace("marker_height_min option must not be zero."),t=30),this.max_rows=Math.round((this.options.height-this._el.timeaxis_background.offsetHeight-this.options.marker_padding)/t),this.max_rows<1&&(this.max_rows=1),new TL.TimeScale(this.config,{display_width:this._el.container.offsetWidth,screen_multiplier:this.options.scale_factor,max_rows:this.max_rows})},_updateTimeScale:function(t){this.options.scale_factor=t,this._updateDrawTimeline()},zoomIn:function(){var t=TL.Util.findNextGreater(this.options.zoom_sequence,this.options.scale_factor);t==this.options.zoom_sequence[this.options.zoom_sequence.length-1]?this.fire("zoomtoggle",{zoom:"in",show:!1}):this.fire("zoomtoggle",{zoom:"in",show:!0}),this.setZoomFactor(t)},zoomOut:function(){var t=TL.Util.findNextLesser(this.options.zoom_sequence,this.options.scale_factor);t==this.options.zoom_sequence[0]?this.fire("zoomtoggle",{zoom:"out",show:!1}):this.fire("zoomtoggle",{zoom:"out",show:!0}),this.setZoomFactor(t)},setZoom:function(t){var e=this.options.zoom_sequence[t];"number"==typeof e?this.setZoomFactor(e):console.warn("Invalid zoom level. Please use a number between 0 and "+(this.options.zoom_sequence.length-1))},setZoomFactor:function(t){this.options.scale_factor=t,this.goToId(this.current_id,!this._updateDrawTimeline(!0),!0)},_createGroups:function(){var t=this.timescale.getGroupLabels();if(t){this.options.has_groups=!0;for(var e=0;et-this.options.marker_padding&&(o=!0),this._groups[n].setRowPosition(s,this._calculated_row_height+this.options.marker_padding/2),this._groups[n].setAlternateRowColor(TL.Util.isEven(n),o),a+=this._groups[n].data.rows}},_addMarker:function(t){t.addTo(this._el.marker_item_container),t.on("markerclick",this._onMarkerClick,this),t.on("added",this._onMarkerAdded,this)},_createMarker:function(t,e){var i=new TL.TimeMarker(t,this.options);this._addMarker(i),0>e?this._markers.push(i):this._markers.splice(e,0,i)},_createMarkers:function(t){for(var e=0;ee?this._eras.push(i):this._eras.splice(e,0,i)},_addEra:function(t){t.addTo(this._el.marker_item_container),t.on("added",this._onEraAdded,this)},_removeEra:function(t){t.removeFrom(this._el.marker_item_container)},_destroyEra:function(t){this._removeEra(this._eras[t]),this._eras.splice(t,1)},_positionEras:function(t){for(var e=0,i=0;i5&&(e=0),this._eras[i].setColor(e)}},createMarker:function(t,e){this._createMarker(t,e)},createMarkers:function(t){this._createMarkers(t)},destroyMarker:function(t){this._destroyMarker(t)},destroyMarkerId:function(t){this.destroyMarker(this._findMarkerIndex(t))},goTo:function(t,e,i){var n=this,a=this.options.ease,s=this.options.duration,o=0>t?0:t;this._resetMarkersActive(),t>=0&&t=0&&tMath.abs(t.wheelDeltaY)?t.wheelDeltaX/6:0),e&&(t.preventDefault&&t.preventDefault(),t.returnValue=!1),i=parseInt(this._el.slider.style.left.replace("px",""))+e,i>n.left?i=n.left:iTimeline JS",this.timeaxis=new TL.TimeAxis(this._el.timeaxis,this.options),this._swipable=new TL.Swipable(this._el.slider_background,this._el.slider,{enable:{x:!0,y:!1},constraint:{top:!1,bottom:!1,left:this.options.width/2,right:!1},snap:!1}),this._swipable.enable()},_initEvents:function(){this._swipable.on("dragmove",this._onDragMove,this),TL.DomEvent.addListener(this._el.container,"mousewheel",this._onMouseScroll,this),TL.DomEvent.addListener(this._el.container,"DOMMouseScroll",this._onMouseScroll,this)},_initData:function(){this._createMarkers(this.config.events),this.config.eras&&(this.has_eras=!0,this._createEras(this.config.eras)),this._drawTimeline()}}),TL.TimeMarker=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t,e){this._el={container:{},content_container:{},media_container:{},timespan:{},line_left:{},line_right:{},content:{},text:{},media:{}},this._text={},this._state={loaded:!1},this.data={unique_id:"",background:null,date:{year:0,month:0,day:0,hour:0,minute:0,second:0,millisecond:0,thumbnail:"",format:""},text:{headline:"",text:""},media:null},this.options={duration:1e3,ease:TL.Ease.easeInSpline,width:600,height:600,marker_width_min:100},this.active=!1,this.animator={},this.has_end_date=!1,TL.Util.mergeData(this.options,e),TL.Util.mergeData(this.data,t),this._initLayout(),this._initEvents()},show:function(){},hide:function(){},setActive:function(t){this.active=t,this.active&&this.has_end_date?this._el.container.className="tl-timemarker tl-timemarker-with-end tl-timemarker-active":this.active?this._el.container.className="tl-timemarker tl-timemarker-active":this.has_end_date?this._el.container.className="tl-timemarker tl-timemarker-with-end":this._el.container.className="tl-timemarker"},addTo:function(t){t.appendChild(this._el.container)},removeFrom:function(t){t.removeChild(this._el.container)},updateDisplay:function(t,e){this._updateDisplay(t,e)},loadMedia:function(){this._media&&!this._state.loaded&&(this._media.loadMedia(),this._state.loaded=!0)},stopMedia:function(){this._media&&this._state.loaded&&this._media.stopMedia()},getLeft:function(){return this._el.container.style.left.slice(0,-2)},getTime:function(){return this.data.start_date.getTime()},getEndTime:function(){return this.data.end_date?this.data.end_date.getTime():!1},setHeight:function(t){var e=12,i=1;this._el.content_container.style.height=t+"px",this._el.timespan_content.style.height=t+"px",30>=t?this._el.content.className="tl-timemarker-content tl-timemarker-content-small":this._el.content.className="tl-timemarker-content",56>=t?TL.DomUtil.addClass(this._el.content_container,"tl-timemarker-content-container-small"):TL.DomUtil.removeClass(this._el.content_container,"tl-timemarker-content-container-small"),TL.Browser.webkit?(i=Math.floor(t/(e+2)),1>i&&(i=1),this._text.className="tl-headline",this._text.style.webkitLineClamp=i):(i=t/e,i>1?this._text.className="tl-headline tl-headline-fadeout":this._text.className="tl-headline",this._text.style.height=i*e+"px")},setWidth:function(t){this.data.end_date&&(this._el.container.style.width=t+"px",t>this.options.marker_width_min?(this._el.content_container.style.width=t+"px",this._el.content_container.className="tl-timemarker-content-container tl-timemarker-content-container-long"):(this._el.content_container.style.width=this.options.marker_width_min+"px",this._el.content_container.className="tl-timemarker-content-container"))},setClass:function(t){this._el.container.className=t},setRowPosition:function(t,e){this.setPosition({top:t}),this._el.timespan.style.height=e+"px"},_onMarkerClick:function(t){this.fire("markerclick",{unique_id:this.data.unique_id})},_initLayout:function(){if(this._el.container=TL.Dom.create("div","tl-timemarker"),this.data.unique_id&&(this._el.container.id=this.data.unique_id+"-marker"),this.data.end_date&&(this.has_end_date=!0,this._el.container.className="tl-timemarker tl-timemarker-with-end"),this._el.timespan=TL.Dom.create("div","tl-timemarker-timespan",this._el.container),this._el.timespan_content=TL.Dom.create("div","tl-timemarker-timespan-content",this._el.timespan),this._el.content_container=TL.Dom.create("div","tl-timemarker-content-container",this._el.container),this._el.content=TL.Dom.create("div","tl-timemarker-content",this._el.content_container),this._el.line_left=TL.Dom.create("div","tl-timemarker-line-left",this._el.timespan),this._el.line_right=TL.Dom.create("div","tl-timemarker-line-right",this._el.timespan),this.data.media)if(this._el.media_container=TL.Dom.create("div","tl-timemarker-media-container",this._el.content),this.data.media.thumbnail&&""!=this.data.media.thumbnail)this._el.media=TL.Dom.create("img","tl-timemarker-media",this._el.media_container),this._el.media.src=TL.Util.transformImageURL(this.data.media.thumbnail);else{var t=TL.MediaType(this.data.media).type;this._el.media=TL.Dom.create("span","tl-icon-"+t,this._el.media_container)}this._el.text=TL.Dom.create("div","tl-timemarker-text",this._el.content),this._text=TL.Dom.create("h2","tl-headline",this._el.text),this.data.text.headline&&""!=this.data.text.headline?this._text.innerHTML=TL.Util.unlinkify(this.data.text.headline):this.data.text.text&&""!=this.data.text.text?this._text.innerHTML=TL.Util.unlinkify(this.data.text.text):this.data.media.caption&&""!=this.data.media.caption&&(this._text.innerHTML=TL.Util.unlinkify(this.data.media.caption)),this.onLoaded()},_initEvents:function(){TL.DomEvent.addListener(this._el.container,"click",this._onMarkerClick,this)},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),TL.TimeEra=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t,e){this._el={container:{},background:{},content_container:{},content:{},text:{}},this._text={},this._state={loaded:!1},this.data={unique_id:"",date:{year:0,month:0,day:0,hour:0,minute:0,second:0,millisecond:0,thumbnail:"",format:""},text:{headline:"",text:""}},this.options={duration:1e3,ease:TL.Ease.easeInSpline,width:600,height:600,marker_width_min:100},this.active=!1,this.animator={},this.has_end_date=!1,TL.Util.mergeData(this.options,e),TL.Util.mergeData(this.data,t),this._initLayout(),this._initEvents()},show:function(){},hide:function(){},setActive:function(t){},addTo:function(t){t.appendChild(this._el.container)},removeFrom:function(t){t.removeChild(this._el.container)},updateDisplay:function(t,e){this._updateDisplay(t,e)},getLeft:function(){return this._el.container.style.left.slice(0,-2)},getTime:function(){return this.data.start_date.getTime()},getEndTime:function(){return this.data.end_date?this.data.end_date.getTime():!1},setHeight:function(t){var e=12,i=1;this._el.content_container.style.height=t+"px",this._el.content.className="tl-timeera-content",TL.Browser.webkit?(i=Math.floor(t/(e+2)),1>i&&(i=1),this._text.className="tl-headline",this._text.style.webkitLineClamp=i):(i=t/e,i>1?this._text.className="tl-headline tl-headline-fadeout":this._text.className="tl-headline",this._text.style.height=i*e+"px")},setWidth:function(t){this.data.end_date&&(this._el.container.style.width=t+"px",t>this.options.marker_width_min?(this._el.content_container.style.width=t+"px",this._el.content_container.className="tl-timeera-content-container tl-timeera-content-container-long"):(this._el.content_container.style.width=this.options.marker_width_min+"px",this._el.content_container.className="tl-timeera-content-container"))},setClass:function(t){this._el.container.className=t},setRowPosition:function(t,e){this.setPosition({top:t})},setColor:function(t){this._el.container.className="tl-timeera tl-timeera-color"+t},_initLayout:function(){this._el.container=TL.Dom.create("div","tl-timeera"),this.data.unique_id&&(this._el.container.id=this.data.unique_id+"-era"),this.data.end_date&&(this.has_end_date=!0,this._el.container.className="tl-timeera tl-timeera-with-end"),this._el.content_container=TL.Dom.create("div","tl-timeera-content-container",this._el.container),this._el.background=TL.Dom.create("div","tl-timeera-background",this._el.content_container),this._el.content=TL.Dom.create("div","tl-timeera-content",this._el.content_container),this._el.text=TL.Dom.create("div","tl-timeera-text",this._el.content),this._text=TL.Dom.create("h2","tl-headline",this._el.text),this.data.text.headline&&""!=this.data.text.headline&&(this._text.innerHTML=TL.Util.unlinkify(this.data.text.headline)),this.onLoaded()},_initEvents:function(){},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),TL.TimeGroup=TL.Class.extend({includes:[TL.Events,TL.DomMixins],_el:{},initialize:function(t){this._el={parent:{},container:{},message:{}},this.options={width:600,height:600},this.data={label:"",rows:1},this._el.container=TL.Dom.create("div","tl-timegroup"),TL.Util.mergeData(this.data,t),this.animator={},this._initLayout(),this._initEvents()},updateDisplay:function(t,e){},setRowPosition:function(t,e){this.options.height=e*this.data.rows,this.setPosition({top:t}),this._el.container.style.height=this.options.height+"px"},setAlternateRowColor:function(t,e){var i="tl-timegroup";t&&(i+=" tl-timegroup-alternate"),e&&(i+=" tl-timegroup-hidden"),this._el.container.className=i},_onMouseClick:function(){this.fire("clicked",this.options)},_initLayout:function(){this._el.message=TL.Dom.create("div","tl-timegroup-message",this._el.container),this._el.message.innerHTML=this.data.label},_initEvents:function(){TL.DomEvent.addListener(this._el.container,"click",this._onMouseClick,this)},_updateDisplay:function(t,e,i){}}),TL.TimeScale=TL.Class.extend({initialize:function(t,e){var i=t.events;this._scale=t.scale,e=TL.Util.mergeData({display_width:500,screen_multiplier:3,max_rows:null},e),this._display_width=e.display_width,this._screen_multiplier=e.screen_multiplier,this._pixel_width=this._screen_multiplier*this._display_width,this._group_labels=void 0,this._positions=[],this._pixels_per_milli=0,this._earliest=t.getEarliestDate().getTime(),this._latest=t.getLatestDate().getTime(),this._span_in_millis=this._latest-this._earliest,this._span_in_millis<=0&&(this._span_in_millis=this._computeDefaultSpan(t)),this._average=this._span_in_millis/i.length,this._pixels_per_milli=this.getPixelWidth()/this._span_in_millis,this._axis_helper=TL.AxisHelper.getBestHelper(this),this._scaled_padding=1/this.getPixelsPerTick()*(this._display_width/2),this._computePositionInfo(i,e.max_rows)},_computeDefaultSpan:function(t){if("human"==t.scale){for(var e={},i=0;i=0;i--)if(e.hasOwnProperty(TL.Date.SCALES[i][0])){var a=TL.Date.SCALES[TL.Date.SCALES.length-1];return TL.Date.SCALES[i+1]&&(a=TL.Date.SCALES[i+1]),a[1]}return 31536e6}return 2e5},getGroupLabels:function(){return this._group_labels||[]},getScale:function(){return this._scale},getNumberOfRows:function(){return this._number_of_rows},getPixelWidth:function(){return this._pixel_width},getPosition:function(t){return(t-this._earliest)*this._pixels_per_milli},getPositionInfo:function(t){return this._positions[t]},getPixelsPerTick:function(){return this._axis_helper.getPixelsPerTick(this._pixels_per_milli)},getTicks:function(){return{major:this._axis_helper.getMajorTicks(this),minor:this._axis_helper.getMinorTicks(this)}},getDateFromTime:function(t){if("human"==this._scale)return new TL.Date(t);if("cosmological"==this._scale)return new TL.BigDate(new TL.BigYear(t));throw"Don't know how to get date from time for "+this._scale},getMajorScale:function(){return this._axis_helper.major.name},getMinorScale:function(){return this._axis_helper.minor.name},_assessGroups:function(t){for(var e=[],i=!1,n=0;n0)s.row=i.length,i.push(s),e--;else{var l=Math.min.apply(null,o),h=o.indexOf(l);s.row=h,s.end>i[h].end&&(i[h]=s),n++}}return{n_rows:i.length,n_overlaps:n}},_computePositionInfo:function(t,e,i){i=i||100;for(var n=[],a=!1,s=0;si?o.end=o.start+o.width:o.end=o.start+i}else o.width=i,o.end=o.start+i;t[s].group?n.indexOf(t[s].group)<0&&n.push(t[s].group):a=!0}if(n.length){a&&n.push("");for(var l=[],s=0;s=0;d--)h.positions[d].end>o.start&&h.n_overlaps++;h.positions.push(o)}for(var c=n.length;;){var u=Math.max(0,e-c);if(!u)break;if(l.sort(function(t,e){return t.n_overlaps>e.n_overlaps?-1:t.n_overlapsn&&(a=Math.round(i/e.getPixelsPerTick()));for(var s=1,o=0;o1?s>=a?(s=1,r.tick_text.style.opacity=1,r.tick.className="tl-timeaxis-tick"):(s++,r.tick_text.style.opacity=0,r.tick.className="tl-timeaxis-tick tl-timeaxis-tick-hidden"):(r.tick_text.style.opacity=1,r.tick.className="tl-timeaxis-tick")}}},_initLayout:function(){this._el.content_container=TL.Dom.create("div","tl-timeaxis-content-container",this._el.container),this._el.major=TL.Dom.create("div","tl-timeaxis-major",this._el.content_container),this._el.minor=TL.Dom.create("div","tl-timeaxis-minor",this._el.content_container),this.onLoaded()},_initEvents:function(){},_updateDisplay:function(t,e,i){t&&(this.options.width=t),e&&(this.options.height=e)}}),TL.AxisHelper=TL.Class.extend({initialize:function(t){if(!t)throw"Axis helper must be configured with options";this.scale=t.scale,this.minor=t.minor,this.major=t.major},getPixelsPerTick:function(t){return t*this.minor.factor},getMajorTicks:function(t){return this._getTicks(t,this.major)},getMinorTicks:function(t){return this._getTicks(t,this.minor)},_getTicks:function(t,e){for(var i=t._scaled_padding*e.factor,n=t._earliest-i,a=t._latest+i,s=[],o=n;a>o;o+=e.factor)s.push(t.getDateFromTime(o).floor(e.name));return{name:e.name,ticks:s}}}),function(t){var e={},i=function(i,n){e[i]=[];for(var a=0;ai){if(null==s)return r;var h=Math.abs(i-l),d=Math.abs(i-l);return d>h?r:s}s=r}return a[a.length-1]}}(TL.AxisHelper),TL.Timeline=TL.Class.extend({includes:[TL.Events,TL.I18NMixins],initialize:function(t,e,i){var n=this;if(i||(i={}),this.version="3.2.6",this.ready=!1,this._el={container:{},storyslider:{},timenav:{},menubar:{}},"object"==typeof t?this._el.container=t:this._el.container=TL.Dom.get(t),this._storyslider={},this._style_sheet=new TL.StyleSheet,this._timenav={},this.message=new TL.Message({},{message_class:"tl-message-full"}),this._menubar={},this._loaded={storyslider:!1,timenav:!1},this.config=null,this.options={script_path:"",height:this._el.container.offsetHeight,width:this._el.container.offsetWidth,debug:!1,is_embed:!1,is_full_embed:!1,hash_bookmark:!1,default_bg_color:{r:255,g:255,b:255},scale_factor:2,layout:"landscape",timenav_position:"bottom",optimal_tick_width:60,base_class:"tl-timeline",timenav_height:null,timenav_height_percentage:25,timenav_mobile_height_percentage:40,timenav_height_min:175,marker_height_min:30,marker_width_min:100,marker_padding:5,start_at_slide:0,start_at_end:!1,menubar_height:0,skinny_size:650,medium_size:800,relative_date:!1,use_bc:!1,duration:1e3,ease:TL.Ease.easeInOutQuint,dragging:!0,trackResize:!0,map_type:"stamen:toner-lite",slide_padding_lr:100,slide_default_fade:"0%",zoom_sequence:[.5,1,2,3,5,8,13,21,34,55,89],language:"en",ga_property_id:null,track_events:["back_to_start","nav_next","nav_previous","zoom_in","zoom_out"]},this.animator_timenav=null,this.animator_storyslider=null,this.animator_menubar=null,"string"==typeof i.default_bg_color){var a=TL.Util.hexToRgb(i.default_bg_color);a?i.default_bg_color=a:(delete i.default_bg_color,trace("Invalid default background color. Ignoring."))}TL.Util.mergeData(this.options,i),window.addEventListener("resize",function(t){n.updateDisplay()}),TL.debug=this.options.debug,this._el.container.className+=" tl-timeline",this.options.is_embed&&(this._el.container.className+=" tl-timeline-embed"),this.options.is_full_embed&&(this._el.container.className+=" tl-timeline-full-embed"),this.message.addTo(this._el.container),this.options.relative_date?"undefined"!=typeof moment?n._loadLanguage(e):TL.Load.js(this.options.script_path+"/library/moment.js",function(){n._loadLanguage(e),trace("LOAD MOMENTJS")}):n._loadLanguage(e)},_loadLanguage:function(t){var e=this;this.options.language=new TL.Language(this.options),this._initData(t)},goToId:function(t){this.current_id!=t&&(this.current_id=t,this._timenav.goToId(this.current_id),this._storyslider.goToId(this.current_id,!1,!0),this.fire("change",{unique_id:this.current_id},this))},goTo:function(t){this.config.title?0==t?this.goToId(this.config.title.unique_id):this.goToId(this.config.events[t-1].unique_id):this.goToId(this.config.events[t].unique_id)},goToStart:function(){this.goTo(0)},goToEnd:function(){var t=this.config.events.length-1;this.goTo(this.config.title?t+1:t)},goToPrev:function(){this.goTo(this._getSlideIndex(this.current_id)-1)},goToNext:function(){this.goTo(this._getSlideIndex(this.current_id)+1)},add:function(t){var e=this.config.addEvent(t),i=this._getEventIndex(e),n=this.config.events[i];this._storyslider.createSlide(n,this.config.title?i+1:i),this._storyslider._updateDrawSlides(),this._timenav.createMarker(n,i),this._timenav._updateDrawTimeline(!1),this.fire("added",{unique_id:e})},remove:function(t){if(t>=0&&t0&&t<=this.config.events.length)return this.config.events[t-1]}else if(t>=0&&t=0&&t"+this._("error")+": "+this.config.getErrors("
"))},_initLayout:function(){var t=this;this._el.container.innerHTML="","top"==this.options.timenav_position?(this._el.timenav=TL.Dom.create("div","tl-timenav",this._el.container),this._el.storyslider=TL.Dom.create("div","tl-storyslider",this._el.container)):(this._el.storyslider=TL.Dom.create("div","tl-storyslider",this._el.container),this._el.timenav=TL.Dom.create("div","tl-timenav",this._el.container)),this._el.menubar=TL.Dom.create("div","tl-menubar",this._el.container),this.options.width=this._el.container.offsetWidth,this.options.height=this._el.container.offsetHeight,this._el.storyslider.style.top="1px",this.options.timenav_height=this._calculateTimeNavHeight(this.options.timenav_height),this._timenav=new TL.TimeNav(this._el.timenav,this.config,this.options),this._timenav.on("loaded",this._onTimeNavLoaded,this),this._timenav.on("update_timenav_min",this._updateTimeNavHeightMin,this),this._timenav.options.height=this.options.timenav_height,this._timenav.init(),this.options.initial_zoom&&this.setZoom(this.options.initial_zoom),this._storyslider=new TL.StorySlider(this._el.storyslider,this.config,this.options),this._storyslider.on("loaded",this._onStorySliderLoaded,this),this._storyslider.init(),this._menubar=new TL.MenuBar(this._el.menubar,this._el.container,this.options),"portrait"==this.options.layout?this.options.storyslider_height=this.options.height-this.options.timenav_height-1:this.options.storyslider_height=this.options.height-1,this._updateDisplay(this._timenav.options.height,!0,2e3)},_initEvents:function(){this._timenav.on("change",this._onTimeNavChange,this),this._timenav.on("zoomtoggle",this._onZoomToggle,this),this._storyslider.on("change",this._onSlideChange,this),this._storyslider.on("colorchange",this._onColorChange,this),this._storyslider.on("nav_next",this._onStorySliderNext,this),this._storyslider.on("nav_previous",this._onStorySliderPrevious,this),this._menubar.on("zoom_in",this._onZoomIn,this),this._menubar.on("zoom_out",this._onZoomOut,this),this._menubar.on("back_to_start",this._onBackToStart,this)},_initGoogleAnalytics:function(){!function(t,e,i,n,a,s,o){t.GoogleAnalyticsObject=a,t[a]=t[a]||function(){(t[a].q=t[a].q||[]).push(arguments)},t[a].l=1*new Date,s=e.createElement(i),o=e.getElementsByTagName(i)[0],s.async=1,s.src=n,o.parentNode.insertBefore(s,o)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create",this.options.ga_property_id,"auto")},_initAnalytics:function(){if(null!==this.options.ga_property_id){this._initGoogleAnalytics(),ga("send","pageview");var t=this.options.track_events;for(i=0;ithis.config.events.length?this.goToEnd():this.goTo(this.options.start_at_slide),this.options.hash_bookmark&&this._updateHashBookmark(this.current_id)))}}),TL.Timeline.source_path=function(){var t=document.getElementsByTagName("script"),e=t[t.length-1].src;return e.substr(0,e.lastIndexOf("/"))}();
\ No newline at end of file
diff --git a/compiled/js/timeline.js b/compiled/js/timeline.js
index 959502a4..18df65b1 100644
--- a/compiled/js/timeline.js
+++ b/compiled/js/timeline.js
@@ -9986,11 +9986,11 @@ TL.TimeNav = TL.Class.extend({
},
_calculateMarkerHeight: function(h) {
- return Math.floor((h /this.timescale.getNumberOfRows()) - this.options.marker_padding);
+ return ((h /this.timescale.getNumberOfRows()) - this.options.marker_padding);
},
_calculateRowHeight: function(h) {
- return Math.floor(h /this.timescale.getNumberOfRows());
+ return (h /this.timescale.getNumberOfRows());
},
_calculateAvailableHeight: function() {
diff --git a/source/js/timenav/TL.TimeNav.js b/source/js/timenav/TL.TimeNav.js
index 21468c17..9df22700 100644
--- a/source/js/timenav/TL.TimeNav.js
+++ b/source/js/timenav/TL.TimeNav.js
@@ -285,11 +285,11 @@ TL.TimeNav = TL.Class.extend({
},
_calculateMarkerHeight: function(h) {
- return Math.floor((h /this.timescale.getNumberOfRows()) - this.options.marker_padding);
+ return ((h /this.timescale.getNumberOfRows()) - this.options.marker_padding);
},
_calculateRowHeight: function(h) {
- return Math.floor(h /this.timescale.getNumberOfRows());
+ return (h /this.timescale.getNumberOfRows());
},
_calculateAvailableHeight: function() {