seasons 0.9.3.beta1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,129 @@
1
+ var Mustache=function(){var j=function(){};j.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":!0},context:{},render:function(a,b,d,c){if(!c)this.context=b,this.buffer=[];if(!this.includes("",a))if(c)return a;else{this.send(a);return}a=this.render_pragmas(a);a=this.render_section(a,b,d);if(c)return this.render_tags(a,b,d,c);this.render_tags(a,b,d,c)},send:function(a){a!==""&&this.buffer.push(a)},render_pragmas:function(a){if(!this.includes("%",a))return a;
2
+ var b=this;return a.replace(RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag,"g"),function(a,c,e){if(!b.pragmas_implemented[c])throw{message:"This implementation of mustache doesn't understand the '"+c+"' pragma"};b.pragmas[c]={};e&&(a=e.split("="),b.pragmas[c][a[0]]=a[1]);return""})},render_partial:function(a,b,d){a=this.trim(a);if(!d||d[a]===void 0)throw{message:"unknown_partial '"+a+"'"};return typeof b[a]!="object"?this.render(d[a],b,d,!0):this.render(d[a],b[a],d,!0)},render_section:function(a,
3
+ b,d){if(!this.includes("#",a)&&!this.includes("^",a))return a;var c=this;return a.replace(RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg"),function(a,g,i,f){a=c.find(i,b);if(g=="^")return!a||c.is_array(a)&&a.length===0?c.render(f,b,d,!0):"";else if(g=="#")return c.is_array(a)?c.map(a,function(a){return c.render(f,c.create_context(a),d,!0)}).join(""):c.is_object(a)?c.render(f,c.create_context(a),d,!0):typeof a==="function"?a.call(b,
4
+ f,function(a){return c.render(a,b,d,!0)}):a?c.render(f,b,d,!0):""})},render_tags:function(a,b,d,c){for(var e=this,g=function(){return RegExp(e.otag+"(=|!|>|\\{|%|\\$)?([^\\/#\\^]+?)\\1?"+e.ctag+"+","g")},i=g(),f=function(a,c,f){switch(c){case "!":return"";case "=":return e.set_delimiters(f),i=g(),"";case ">":return e.render_partial(f,b,d);case "{":return e.find(f,b);case "$":return encodeURIComponent(e.find(f,b));default:return e.escape(e.find(f,b))}},a=a.split("\n"),h=0;h<a.length;h++)a[h]=a[h].replace(i,
5
+ f,this),c||this.send(a[h]);if(c)return a.join("\n")},set_delimiters:function(a){a=a.split(" ");this.otag=this.escape_regex(a[0]);this.ctag=this.escape_regex(a[1])},escape_regex:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\)","g");return a.replace(arguments.callee.sRE,"\\$1")},find:function(a,b){var a=this.trim(a),d;b[a]===!1||b[a]===0||b[a]?d=b[a]:(this.context[a]===!1||this.context[a]===0||this.context[a])&&(d=this.context[a]);
6
+ return typeof d==="function"?d.apply(b):d!==void 0?d:""},includes:function(a,b){return b.indexOf(this.otag+a)!=-1},escape:function(a){return String(a===null?"":a).replace(/&(?!\w+;)|["'<>\\]/g,function(a){switch(a){case "&":return"&amp;";case "\\":return"\\\\";case '"':return"&quot;";case "'":return"&#39;";case "<":return"&lt;";case ">":return"&gt;";default:return a}})},create_context:function(a){if(this.is_object(a))return a;else{var b=".";if(this.pragmas["IMPLICIT-ITERATOR"])b=this.pragmas["IMPLICIT-ITERATOR"].iterator;
7
+ var d={};d[b]=a;return d}},is_object:function(a){return a&&typeof a=="object"},is_array:function(a){return Object.prototype.toString.call(a)==="[object Array]"},trim:function(a){return a.replace(/^\s*|\s*$/g,"")},map:function(a,b){if(typeof a.map=="function")return a.map(b);else{for(var d=[],c=a.length,e=0;e<c;e++)d.push(b(a[e]));return d}}};return{name:"mustache.js",version:"0.3.1-dev",to_html:function(a,b,d,c){var e=new j;if(c)e.send=c;e.render(a,b,d);if(!c)return e.buffer.join("\n")}}}();
8
+ (function(){'use strict';var g=void 0,h=null,n,aa=this,ba=Date.now||function(){return+new Date};function p(a,b){var c=a.split("."),d=aa;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&b!==g?d[e]=b:d=d[e]?d[e]:d[e]={}};var da={},q,ea,fa,ga;if(!1 in Array)Array.isArray=function(a){return Object.prototype.toString.apply(a)==="[object Array]"};function ha(a){return Array.prototype.slice.call(a,0)}function ia(a,b){var c=a.slice(b+1||a.length);a.length=b<0?a.length+b:b;a.push.apply(a,c)};p("treesaver.VERSION","0.9.3b-61-g5f8f6a5");var ja,ka,la=window.navigator.userAgent.toLowerCase(),ma=document.compatMode!=="BackCompat"&&"XMLHttpRequest"in window&&"addEventListener"in document&&"getComputedStyle"in window&&"querySelectorAll"in document&&"localStorage"in window&&"JSON"in window,r=!!window.TS_WITHIN_NATIVE_IOS_APP,oa=r||na==="android"||/mobile/.test(la),pa=window.screen.width<=600,qa=r?"safari":/webkit/.test(la)?/chrome|safari/.test(la)?/(chrome|safari)/.exec(la)[0]:"webkit":/opera/.test(la)?"opera":/msie/.test(la)?"msie":!/compatible/.test(la)&&
9
+ /mozilla/.test(la)?"mozilla":"unknown",na=(/(android|ipad|iphone|ipod|win|mac|linux)/.exec(window.navigator.platform?window.navigator.platform.toLowerCase():/android/.test(la)?"android":"unknown")||["unknown"])[0],ra=function(){switch(qa){case "chrome":case "safari":case "webkit":return"-webkit-";case "mozilla":return"-moz-";case "msie":return"-ms-";case "opera":return"-o-";default:return""}}(),ta=function(){switch(qa){case "chrome":case "safari":case "webkit":return"Webkit";case "mozilla":return"Moz";
10
+ case "msie":return"ms";case "opera":return"O";default:return""}}();function ua(a,b,c){var d=document.documentElement.style,b=b&&ta?ta+a[0].toUpperCase()+a.substr(1):!1;return!c&&typeof d[a]!=="undefined"||!!b&&typeof d[b]!=="undefined"}
11
+ var va=r||"orientation"in window,wa=r||"createTouch"in document||/android/.test(la),xa=!r&&function(){if(window.navigator.plugins&&window.navigator.plugins.length)return!!window.navigator.plugins["Shockwave Flash"];else if("ActiveXObject"in window)try{return!!new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(a){}return!1}(),ya="CSSFontFaceRule"in window,za="getContext"in document.createElement("canvas");
12
+ if("createElementNS"in document)var Aa="createElementNS"in document&&"createSVGRect"in document.createElementNS("http://www.w3.org/2000/svg","svg"),Ba=Aa&&/SVG/.test(document.createElementNS("http://www.w3.org/2000/svg","animate").toString()),Ca=Aa&&/SVG/.test(document.createElementNS("http://www.w3.org/2000/svg","clipPath").toString());var Da,Ea=document.createElement("div");Ea.innerHTML="<svg/>";Da=(Ea.firstChild&&Ea.firstChild.namespaceURI)=="http://www.w3.org/2000/svg";
13
+ var Fa="canPlayType"in document.createElement("video"),Ga="localStorage"in window,Ha=!r&&"applicationCache"in window,Ia=r||window.navigator.standalone,Ja=r||ua("transformProperty")||ua("transform",!0,!0),Ka;
14
+ if(!(Ka=r)){var La=ua("perspectiveProperty")||ua("perspective",!0,!0);if(La&&"WebkitPerspective"in document.documentElement.style&&qa!=="safari"){var Ma=document.createElement("style"),Na=document.createElement("div"),Pa="@media (perspective)",Qa;Pa+=",("+ra+"perspective)";Ma.textContent=Pa+"{#ts-test {height:3px}}";Na.setAttribute("id","ts-test");document.documentElement.appendChild(Ma);document.documentElement.appendChild(Na);Qa=Na.offsetHeight===3;document.documentElement.removeChild(Ma);document.documentElement.removeChild(Na);
15
+ La=Qa}Ka=La}var Ra=Ka,Sa=r||ua("transitionProperty",!0);function t(a){return a?"":"no-"}var Ta=!1;
16
+ function Ua(){ja||(ja=[],ja.push("js",t(za)+"canvas",t(Ga)+"localstorage",t(Fa)+"video",t(Ha)+"applicationcache",t(ya)+"fontface",t(wa)+"touch",t(Ja)+"csstransforms",t(Ra)+"csstransforms3d",t(Sa)+"csstransitions",t(Aa)+"svg",t(Da)+"inlinesvg",t(Ba)+"smil",t(Ca)+"svgclippaths",t(ma)+"treesaver",t(xa)+"flash",t(va)+"orientation",t(Ia)+"fullscreen",t(oa)+"mobile",t(pa)+"smallscreen",t(v.nc())+"cached",t(r)+"nativeapp","browser-"+qa,"os-"+na));ka=[t(!v.Ja())+"offline"];va&&ka.push("orientation-"+(window.orientation?
17
+ "horizontal":"vertical"));var a=document.documentElement.className;Ta||(Ta=!0,a=a?a.replace(/no-js|no-treesaver/g,""):"",a+=" "+ja.join(" "));Va.lastIndex=0;a=a.replace(Va,"");a+=" "+ka.join(" ");document.documentElement.className=a.split(/\s+/).join(" ")}var Wa=["offline","orientation-vertical","orientation-horizontal"],Va=function(){var a=Wa.map(function(a){return"((no-)?"+a+")"});return RegExp(a.join("|"),"g")}();
18
+ function Xa(a,b){return!a.length?!0:a.every(function(a){var d=a.substr(0,3)==="no-",a=d?a.substr(3):a,e=ja.concat(b?ka:[]);return d?e.indexOf(a)===-1:e.indexOf(a)!==-1?!0:!b&&Wa.indexOf(a)!==-1?!0:!1})};var Ya=[],Za={},$a=h,ab=-1,bb=-1,cb=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,25)},db=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||window.clearTimeout;
19
+ function eb(){var a=ba();Ya.forEach(function(b,c){if(ab!==-1&&!b.Rb&&(!$a||b.name&&$a.indexOf(b.name)!==-1)&&!(a-b.eb<=b.kc)){b.eb=a;b.rb-=1;if(b.rb<=0&&(!b.Gb||b.rb<0))if(ia(Ya,c),delete Za[b.name],b.Gb)return;b.gc.apply(b.oc,b.bc)}});ab=-1;Ya.length&&ab===-1&&(ab=cb.call(window,eb,document.body))}
20
+ function fb(a,b,c,d,e,f,i){var o=ba(),k=f?Za[f]:h;k||(k={gc:a,name:f,oc:i,eb:e?-Infinity:o},Ya.push(k),f&&(Za[f]=k));k.bc=d||[];k.rb=c;k.kc=Math.max(b,25);k.Gb=e;k.Rb=!1;ab===-1&&(ab=cb.call(window,eb,document.body))}function gb(a,b,c,d,e){fb(a,b,1,c,!1,d,e)}function jb(a,b,c,d,e,f){fb(a,b,c,d,!1,e,f)}function kb(a,b,c){fb(a,0,1,[],!1,b,c)}function lb(a){$a=a;bb!==-1&&window.clearTimeout(bb)}function mb(){$a=h;bb!==-1&&(window.clearTimeout(bb),bb=-1)}
21
+ function w(a){delete Za[a];Ya.forEach(function(b,c){if(b.name===a)ia(Ya,c),b.Rb=!0})}p("treesaver.scheduler.repeat",jb);ba();if("Node"in window&&Node.prototype&&!("contains"in Node.prototype))Node.prototype.contains=function(a){return!!(this.compareDocumentPosition(a)&16)};
22
+ if("classList"in document.documentElement)var x=function(a,b){b.split(/\s+/).forEach(function(b){a.classList.add(b)})},nb=function(a,b){return a.classList.remove(b)},y=function(a,b){return a.classList.contains(b)},ob=function(a){return ha(a.classList)};else x=function(a,b){a.className?y(a,b)||(a.className+=" "+b):a.className=b},nb=function(a,b){a.className=a.className.replace(RegExp("(^|\\s)"+b+"(\\s|$)"),"$2")},y=function(a,b){return!(!a.className||!RegExp("(^|\\s)"+b+"(\\s|$)").test(a.className))},
23
+ ob=function(a){return!a.className?[]:a.className.split(/\s+/)};function B(a,b){b||(b=document);return ha(b.querySelectorAll(a))}function pb(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function qb(a){if("outerHTML"in a)return a.outerHTML;var a=a.cloneNode(!0),b;rb.appendChild(a);b=rb.innerHTML;rb.removeChild(a);return b}function sb(a){rb.innerHTML=a;a=rb.firstChild;pb(rb);return!a||a.nodeType!==1?h:a}
24
+ function tb(a,b){for(var c=a,d=b.toUpperCase();(c=c.parentNode)!==h&&c.nodeType===1;)if(c.nodeName===d)return c;return h}var ub=[];function vb(a){ub.push(a);a.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=");var a=wb,b=[];Za.clearImgCache||fb(a,3E3,1,b,!0,"clearImgCache",g)}function wb(){ub=[]}var rb=document.createElement("div");rb.style.display="none";function C(a,b,c){var d=document.createEvent("UIEvents"),e;d.initEvent(b,!1,!0);if(c)for(e in c)d[e]=c[e];a.dispatchEvent(d)}function D(a,b,c){a.addEventListener(b,c,!1)}function G(a,b,c){a.removeEventListener(b,c,!1)}p("treesaver.addListener",D);p("treesaver.removeListener",G);function xb(a,b,c){c=c?window.localStorage:window.sessionStorage;c.removeItem(a);try{c.setItem(a,window.JSON.stringify(b))}catch(d){}}function yb(a){return(a=window.sessionStorage.getItem(a)||window.localStorage.getItem(a))?zb(a):h};var Ab,Bb,Cb,Db="pushState"in window.history;function Eb(){var a=document.location.href.indexOf("#");return a===-1?"":document.location.href.substr(a+1)}if(document.location.hash){var Fb=Eb();Fb[0]==="-"&&Fb.length>=2&&document.location.replace(Fb.substr(1))}Bb=function(a,b,c){window.history.pushState(a,b,c)};Ab=function(a,b,c){window.history.replaceState(a,b,c)};
25
+ if(!Db){Bb=function(a,b,c){Gb(a,b,c,!1)};Ab=function(a,b,c){Gb(a,b,c,!0)};var Gb=function(a,b,c,d){var e="-"+window.escape(c);xb("history:"+e,{state:a,title:b});c===document.location.pathname&&(e="");Cb=e;d?document.location.replace("#"+e):document.location.hash="#"+e};window.onhashchange=function(){var a=Eb();a!==Cb&&(a=(Cb=a)?yb("history:"+a):{},C(window,"popstate",{state:a?a.state:h}))}};var v={Zb:1E4,Fb:{ac:"treesaver.online",$b:"treesaver.offline"},Xb:["offline","online"],Wb:"uncached,idle,checking,downloading,updateready,obsolete".split(","),Ia:!1};v.load=function(){if(!v.Ia)v.Ia=!0,v.Xb.forEach(function(a){D(document,a,v)}),Ha&&v.fb&&v.Wb.forEach(function(a){D(window.applicationCache,a,v)})};v.yc=function(){if(v.Ia)v.Ia=!1,v.Xb.forEach(function(a){G(window,a,v)}),Ha&&v.fb&&v.Wb.forEach(function(a){G(window.applicationCache,a,v)})};
26
+ v.Nb="onLine"in window.navigator?window.navigator.onLine:!0;v.Ja=function(){return v.Nb};v.pb=function(a){v.Nb=a;Ua();C(window,a?v.Fb.ac:v.Fb.$b)};v.fb=Ha&&!!window.applicationCache.status;v.nc=function(){return v.fb};v.handleEvent=function(a){switch(a.type){case "online":v.pb(!0);break;case "offline":v.pb(!1);break;case "updateready":window.applicationCache.swapCache()}};v.sc=/^https?:\/\//i;v.oa=function(a){if(a&&a[0]==="/"||v.sc.test(a))return a;var b=document.createElement("a");b.href=a;return b.href};
27
+ v.get=function(a,b,c){var d={M:new XMLHttpRequest,url:a,zb:b};gb(function(){v.tc(d)},c||v.Zb,[],v.Lb(d));d.M.onreadystatechange=v.fc(d);try{d.M.open("GET",d.url,!0),d.M.send(h)}catch(e){v.ob(d)}};v.Lb=function(a){return"fetch:"+a.url};v.fc=function(a){return function(){a.M.readyState===4&&(a.M.status===0||a.M.status===200||a.M.status===304?(a.zb(a.M.responseText,a.url),v.Cb(a)):v.ob(a))}};v.Cb=function(a){w(v.Lb(a));a.M.onreadystatechange=h};v.ob=function(a){a.zb(h,a.url);v.Cb(a)};
28
+ v.tc=function(a){a.M.abort();v.ob(a)};p("treesaver.isOnline",v.Ja);p("treesaver.setOnlineStatus",v.pb);p("treesaver.ajaxGet",v.get);var Hb,Ib,Jb,Kb=/<body>\s*([\s\S]+?)\s*<\/body>/i;function Lb(a){return(a=Kb.exec(a))&&a[1]?a[1]:h}function Mb(a){Jb=document.createElement("div");if(a&&(a=Lb(a))){var b=document.createElement("div");b.style.display="none";b.innerHTML=a;ha(b.childNodes).forEach(function(a){/^div$/i.test(a.nodeName)&&Jb.appendChild(a)});pb(b)}Nb()}function Nb(){Hb=Ob;var a=Ib.slice(0);Ib=[];a.forEach(function(a){a()})}function Pb(a){return Jb?B("."+a,Jb):[]}var Ob=2;var Qb=document.createElement("style");Qb.setAttribute("type","text/css");B("head").length&&(B("head")[0].appendChild(Qb),Qb=document.styleSheets[document.styleSheets.length-1],Qb.insertRule(".offscreen{position:absolute;top:-200%;right:-200%;visibility:hidden;}",0),Qb.insertRule(".viewer .grid{top:50%;left:50%;margin:0}",0));var Rb=/^-?\d+(?:px)?$/i;function Sb(a,b){if(!a)return!1;var c=a.m||a.m===0?a.m:a.b;return b.e>=(a.K||a.K===0?a.K:a.e)&&b.b>=c&&b.e<=a.Ka&&b.b<=a.V}function I(a){return a&&Rb.test(a)?parseFloat(a)||0:h}function J(a){return a&&a.offsetHeight||0}function Tb(a){return a&&a.offsetWidth||0}function K(a,b,c){a.style[b]=c+"px";return c}function Ub(a,b){"transformProperty"in a.style?a.style.transformProperty=b:a.style[ta+"Transform"]=b}function Xb(a,b,c){Ub(a,"translate("+b+"px,"+c+"px)")}
29
+ Ra&&(Xb=function(a,b,c){Ub(a,"translate3d("+b+"px,"+c+"px,0)")});function Yb(a,b){return Math.ceil(a)+b-a%b}
30
+ function N(a){if(a){var b=document.defaultView.getComputedStyle(a,h);a.getAttribute("style");this.display=b.display;this.position=b.position;this.marginTop=I(b.marginTop)||0;this.marginBottom=I(b.marginBottom)||0;this.marginLeft=I(b.marginLeft)||0;this.marginRight=I(b.marginRight)||0;this.marginHeight=this.marginTop+this.marginBottom;this.marginWidth=this.marginLeft+this.marginRight;this.borderTop=I(b.borderTopWidth);this.borderBottom=I(b.borderBottomWidth);this.borderLeft=I(b.borderLeftWidth);this.borderRight=
31
+ I(b.borderRightWidth);this.paddingTop=I(b.paddingTop);this.paddingBottom=I(b.paddingBottom);this.paddingLeft=I(b.paddingLeft);this.paddingRight=I(b.paddingRight);this.F=this.borderTop+this.paddingTop;this.ga=this.borderBottom+this.paddingBottom;this.O=this.F+this.ga;this.cc=this.borderLeft+this.paddingLeft;this.dc=this.borderRight+this.paddingRight;this.Ca=this.cc+this.dc;this.Q=Tb(a);this.n=J(a);this.e=this.Q-this.Ca;this.b=this.n-this.O;this.K=I(b.minWidth)||0;this.m=I(b.minHeight)||0;a=I(b.maxWidth);
32
+ this.Ka=!a||a===-1?Infinity:a;a=I(b.maxHeight);this.V=!a||a===-1?Infinity:a;this.lineHeight=I(b.lineHeight)||h}}N.prototype.H=function(){var a=new N,b;for(b in this)a[b]!==this[b]&&(a[b]=this[b]);return a};function Zb(a,b,c){this.X=a;this.u=b;this.g=c}var $b=new Zb(Infinity,Infinity,Infinity);Zb.prototype.xb=function(){return!this.X&&!this.u&&!this.g};function ac(a,b){if(a.X!==b.X)return b.X-a.X;else if(a.g!==b.g)return a.g-b.g;return b.u-a.u}Zb.prototype.H=function(){return new this.constructor(this.X,this.u,this.g)};function bc(){this.g=this.f=this.index=0;this.t=[];this.la=[];this.va=0}bc.prototype.H=function(){var a=new this.constructor;a.index=this.index;a.f=this.f;a.g=this.g;a.J=this.J;a.t=this.t.slice(0);a.la=this.la.slice(0);a.va=this.va;return a};bc.prototype.Z=function(a){return!!a&&a.index===this.index&&a.f===this.f&&a.g===this.g&&a.t.length===this.t.length};
33
+ function cc(a,b){if(a.g)return!1;var c,d,e;for(c=a.index,d=b.j.length;c<d;c+=1){e=b.j[c];if(!e.Ha)return!1;if(!dc(a,c)&&!e.u.ca)return!1}if(!a.t.length&&a.f===b.o.length)return!0;for(c=a.t.slice(0);c.length;)if(e=b.o[c.pop()],!e.ca)return!1;for(c=a.f,d=b.o.length;c<d;c+=1)if(e=b.o[c],!e.ca)return!1;return!0}function ec(a,b){var c;if(b<a.f)(c=a.t.indexOf(b))!==-1?ia(a.t,c):(c=a.la.indexOf(b))!==-1&&ia(a.la,c);else{if(b>a.f)for(;a.f<b;a.f+=1)a.t.push(a.f);a.f=b+1}}
34
+ function fc(a,b){a.t.indexOf(b)===-1&&(ec(a,b),a.t.push(b))}function dc(a,b){return a.f<=b?!1:a.t.indexOf(b)!==-1?!1:a.la.indexOf(b)!==-1?!1:!0};function gc(a,b,c,d){this.k=a;this.K=parseInt(b||0,10);this.m=parseInt(c||0,10);this.r=d}gc.prototype.ba=function(){return!this.r?!0:Xa(this.r,!0)};function hc(a,b,c){c&&x(b,c);b.innerHTML=a.k;B("img[data-src], iframe[data-src], video[data-src]",b).forEach(function(a){a.setAttribute("src",a.getAttribute("data-src"))})};if(!1 in String.prototype)String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};function ic(a,b,c){this.Bc=c.index;this.f=c.f;c.f+=1;this.ma=h;this.q={};this.ca=!y(a,"required");this.Yb=y(a,"zoomable");this.Na=y(a,"scroll");ha(a.childNodes).forEach(function(a){if(a.nodeType!==1)a.data&&a.data.trim();else{var b=a.getAttribute("data-sizes"),c=parseInt(a.getAttribute(a.hasAttribute("width")?"width":"data-minwidth"),10),i=parseInt(a.getAttribute(a.hasAttribute("height")?"height":"data-minheight"),10),o=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):h;
35
+ if(!o||Xa(o))a.removeAttribute("hidden"),nb(a,"hidden"),jc(a),a=qb(a),b=b?b.split(" "):["fallback"],kc(this,b,a,c,i,o)}},this);this.q.fallback&&(lc(this,this.q.fallback[0].k,a,b,c),delete this.q.fallback)}
36
+ function lc(a,b,c,d,e){var f=c.parentNode,i=document.createElement("div");i.innerHTML=b;b=i.childNodes.length===1?i.firstChild:i;f.insertBefore(b,c);a.Yb&&(x(b,"zoomable"),b.setAttribute("data-figureindex",a.f),(r||wa)&&b.setAttribute("onclick","void(0)"));mc(b,d);a.ma=new nc(b,d,e,!0);a.ma.u=a;a.ma.j&&a.ma.j.forEach(function(a){a.u=this;a.zc=!0},a);f.removeChild(b)}
37
+ function oc(a,b){var c=-Infinity,d,e=Infinity,f,i,o=a.q;a.q.lightbox&&(o={lightbox:a.q.lightbox});for(i in o)a.q[i].forEach(function(a){if(a.ba()){var l=a.K*a.m;a.K&&a.K>b.e||a.m&&a.m>b.b?!f&&this.Na&&l<=e&&(e=l,d={name:i,qa:a}):l>=c&&(c=l,f={name:i,qa:a})}},a);return f||d}function kc(a,b,c,d,e,f){var i=new gc(c,d,e,f);b.forEach(function(a){this.q[a]?this.q[a].push(i):this.q[a]=[i]},a)}function pc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&b==="figure"};function nc(a,b,c,d){var e=qc(a),f,i="";if(a.nodeType!==1)this.sa=!0;else if(J(a)){this.index=c.index;c.index+=1;this.$=!e&&rc(a);this.j=[];this.o=[];f=!1;if(this.$&&!y(a,"keeptogether"))sc(this,a,b,c,d),f=!!this.o.length,this.$=!!this.j.length;this.Pa=this.Pa||!e;this.lc=y(a,"keepwithnext");this.ec=y(a,"columnbreak");this.na=this.na||!this.Pa||y(a,"keeptogether");this.d=new N(a);if(!this.d.lineHeight)this.d.lineHeight=b;if(!this.na)this.na=this.d.O+this.d.lineHeight===this.d.n;this.ra=this.na?this.d.n:
38
+ !this.$?this.d.F+this.d.lineHeight:!this.ka?this.d.F+this.j[0].ra+(this.d.F?this.j[0].d.marginTop:0):this.d.F+this.j[0].ra;this.k=qb(a);this.Ob=this.$?this.k.substr(0,this.k.indexOf(">")+1):h;this.Qa=this.$?this.k.slice(this.k.lastIndexOf("<")):h;if(f)this.k=this.Ob,this.j.forEach(function(a){this.k+=a.k},this),this.k+=this.Qa;this.$&&(a=a.cloneNode(!0),this.d.marginTop&&K(a,"marginTop",0),this.d.borderTop&&K(a,"borderTopWidth",0),this.d.paddingTop&&K(a,"paddingTop",0),i=qb(a));this.pc=this.$?i.substr(0,
39
+ i.indexOf(">")+1):h}else this.sa=!0}function tc(a){return a.nextSibling?a.nextSibling:a.parent?tc(a.parent):h}
40
+ function sc(a,b,c,d,e){var f,i=a instanceof nc,o=b.nodeName.toLowerCase()==="ol"&&"start"in b,k=o?b.start:h;k===-1&&(k=1);ha(b.childNodes).forEach(function(b){if(o&&b.nodeName.toLowerCase()==="li"){if(b.value&&b.value!==-1)k=b.value;b.setAttribute("value",k);k+=1}if(pc(b)){if(e)return;b=new ic(b,c,d);a.o.push(b);if(b=b.ma)if(b.Ha=!0,i)a.ka=!0}else if(b=new nc(b,c,d,!!e),i&&!a.ka)a.ka=b.ka;if(b&&!b.sa){a.j=a.j.concat(b,b.j||[]);if(b.o.length)a.o=a.o.concat(b.o),delete b.o;b.parent=i?a:h;if(f)f.nextSibling=
41
+ b;f=b}})}function uc(a){for(var a=a.parent,b=[];a;)b.unshift(a.pc),a=a.parent;return b.join("")}function vc(a){for(var a=a.parent,b=[];a;)b.push(a.Qa),a=a.parent;return b.join("")}
42
+ function rc(a){if(wc(a))return!1;if(xc(a))return!0;var b,c,d,e=!1;for(b=0,c=a.childNodes.length;b<c;b+=1)if(d=a.childNodes[b],d.nodeType===3&&/[^\s]/.test(d.data))return!1;else if(d.nodeType===1){if(wc(d)||xc(d))return!0;e=!0;d=document.defaultView.getComputedStyle(d,h);if(/inline/.test(d.display))return!1;else if(/block/.test(d.display))return!0}return e}var yc="img,video,object,embed,iframe,audio,canvas,svg,table".split(",");
43
+ function qc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&yc.indexOf(b)!==-1}var zc="p,h1,h2,h3,h4,h5,h6".split(",");function wc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&zc.indexOf(b)!==-1}var Ac="div,article,ul,ol,figure,aside".split(",");function xc(a){var b=a.nodeName.toLowerCase();return a.nodeType===1&&Ac.indexOf(b)!==-1}
44
+ function mc(a,b){if(a.nodeType===1){var c,d;a.removeAttribute("id");if(!pc(a)){if(rc(a)&&!y(a,"keeptogether"))for(c=a.childNodes.length-1;c>=0;c-=1)d=a.childNodes[c],d.nodeType!==1?a.removeChild(d):mc(d,b);if(!window.TS_NO_AUTOMETRICS)if(c=new N(a),c.marginTop%b&&K(a,"marginTop",Yb(c.marginTop,b)),c.marginBottom%b&&K(a,"marginBottom",Yb(c.marginBottom,b)),qc(a)||y(a,"keeptogether"))c.n%b&&K(a,"paddingBottom",c.paddingBottom+b-c.n%b);else{c.lineHeight?c.lineHeight%b&&K(a,"lineHeight",Yb(c.lineHeight,
45
+ b)):(c.lineHeight=b,K(a,"lineHeight",b));c.F%b&&K(a,"paddingTop",Yb(c.F,b)-c.borderTop);if(c.ga%b)c.paddingBottom=K(a,"paddingBottom",Yb(c.ga,b)-c.borderBottom);c.n=J(a);c.n%b&&(c.paddingBottom+=b-c.n%b,K(a,"paddingBottom",c.paddingBottom))}}}};function Bc(a,b){this.lineHeight=I(document.defaultView.getComputedStyle(a,h).lineHeight)||1;this.Y=a.offsetWidth;B("figure",a).forEach(function(a){a.style.display="none"});mc(a,this.lineHeight);this.o=[];this.j=[];this.Wa=b;sc(this,a,this.lineHeight,{index:0,f:0})};function Cc(a,b){var c=new N(a);this.z=!y(a,"fixed");(this.m=c.m)&&K(a,"minHeight",0);this.b=c.n;this.Da=Math.max(0,b-this.b)}Cc.prototype.wa=function(a){if(!this.z)return this;this.b=Math.max(0,a-this.Da);return this};function Dc(a,b){var c=new N(a);this.z=!y(a,"fixed");(this.m=c.m)&&K(a,"minHeight",0);this.b=c.n;this.Da=Math.max(0,b-this.b);this.q=(c=a.getAttribute("data-sizes"))?c.split(" "):[]}Dc.prototype.wa=function(a){if(!this.z)return this;this.b=Math.max(0,a-this.Da);return this};function Ec(a){document.body.appendChild(a);this.r=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):h;this.Bb=ob(a).map(function(a){return a.toLowerCase()});this.z=!y(a,"fixed");Fc(this);this.xa=this.size=new N(a);this.z?this.size.K=Math.max(this.size.K||0,this.size.e):(this.size.m=this.size.b,this.size.K=this.size.e);this.lineHeight=this.size.lineHeight||1;this.Y=this.aa=this.W=0;this.cols=[];B(".column",a).forEach(function(a){var c=new Cc(a,this.size.b);this.cols.push(c);
46
+ this.W+=c.b;this.aa=Math.max(this.aa,c.b);if(this.Y){if(this.Y!==a.offsetWidth)this.error=!0}else this.Y=a.offsetWidth},this);this.I=[];B(".container",a).forEach(function(a){this.I.push(new Dc(a,this.size.b))},this);this.k=qb(a);document.body.removeChild(a)}var Gc={onlypage:!0,odd:!0,even:!0,sizetocontainer:!0},Hc=/^(no-)?page-(\d+)$/;
47
+ function Fc(a){var b=!1,c,d;a.L={};a.La={};a.Pb={};a.Bb.forEach(function(a){if(a in Gc)this.L[a]=!0;else if(c=Hc.exec(a))d=parseInt(c[2],10),isNaN(d)||(a.substr(0,3)==="no-"?this.Pb[d]=!0:(b=!0,this.La[d]=!0))},a);if(!b)a.La=h}
48
+ Ec.prototype.wa=function(a){if(!this.z)return this;var b=Math.min(this.size.V,Math.max(a-(this.size.marginHeight+this.size.O),this.size.m));b-=(b-this.size.m||0)%this.lineHeight;this.W=this.aa=0;this.cols.forEach(function(a){this.W+=a.wa(b).b;this.aa=Math.max(this.aa,a.b)},this);this.I.forEach(function(a){a.wa(b)},this);this.xa=this.size.H();this.xa.b=b;this.xa.n=b+this.size.O;this.xa.V=this.L.sizetocontainer?this.size.V:Math.min(this.size.V,b+this.lineHeight*3);return this};
49
+ function Ic(a,b){return b.size.e+20*b.I.length-(a.size.e+20*a.I.length)}Ec.prototype.ia=function(){return!this.r?!0:Xa(this.r,!0)};
50
+ function Jc(a,b,c){var d=h,e=-Infinity,f,i,o=a.j.length,k,l,E,A,j,u,z,F,H,L,M,m,X;E=0;A=b.length;for(;E<A;E+=1){j=b[E];m=0;X=!1;f=c.H();z=f.g;F=j.W-z;z&&j.W&&(X=!0);u=0;i=f.va+1;u+=j.cols.length*50;j.lineHeight!==a.lineHeight&&(u-=2E3);j.Y&&j.Y!==a.Y&&(u-=Infinity);j.L.onlypage&&(u+=f.va?-Infinity:4E3);j.La&&(j.La[i]?u+=3E3:u-=Infinity);j.Pb[i]&&(u-=Infinity);u+=i%2?j.L.odd?2E3:j.L.even?-Infinity:0:j.L.even?2E3:j.L.odd?-Infinity:0;i=j;k=a;l=f;var R=M=L=H=g,s=g,ca=g,sa=g,Vb=g,Y=g,hb=g,$c=g,Wb=[];H=
51
+ 0;L=i.I.length;for(;H<L;H+=1){M=i.I[H];Wb[H]=h;ca=l.f;hb=l.t.slice(0);c:for(;hb.length||ca<k.o.length;){sa=($c=!!hb.length)?hb.shift():ca;Vb=k.o[sa];R=M.q.length-1;d:for(;R>=0;R-=1){s=M.q[R];e:{var Y=Vb,ib=s,Oa=g,ad=g;if(Y.q[ib])for(Oa=0,ad=Y.q[ib].length;Oa<ad;Oa+=1)if(Y.q[ib][Oa].ba()){Y=Y.q[ib][Oa];break e}Y=h}if(Y){if(M.z&&Y.m&&Y.m>M.b)continue d;Wb[H]={f:sa,qa:Y,size:s,z:M.z};ec(l,sa);break c}}if(!Vb.ca)break;$c||(ca+=1)}}i=Wb;l=0;H=i.length;for(;l<H;l+=1)L=j.I[l],(M=i[l])?(k=a.o[M.f],u+=2E3+
52
+ M.qa.m*5,k.ca||(u+=4E3),L.z||(u+=5E3),m+=1):L.z||(u-=5E3);b:for(;j.W&&f.index<o&&z<=j.W;){k=a.j[f.index];l=k.d.n+k.d.marginTop;if(k.na&&(l>j.aa||l>F))break b;if(l>F){if(k.na)break b;if(k.children){f.index+=1;continue b}z+=l}z+=l;u+=l;F-=l;X=!0;f.index=k.nextSibling?k.nextSibling.index:f.index+1}if(X)F>0&&(f=F/j.W,f-=m*0.2,f>0.5&&(u-=F,u-=f*f*2E3));else if(m){if((k=a.j[f.index])&&k.u&&!k.u.ca&&(f.g||k.zc))u=-Infinity}else u=-Infinity;u>e&&(e=u,d={P:j,I:i})}return d};function Kc(a){wa&&a.setAttribute("onclick","void(0)")}function jc(a){var b=B(".scroll",a);y(a,"scroll")&&b.unshift(a);b.forEach(Kc)};function Lc(a,b,c){var d=Jc(a,b,c),b=document.createElement("div"),e=c.H(),f=!1;!d||!d.P?(c.J=cc(c,a)||c.f===a.o.length,c.J?this.sa=!0:this.error=!0):(this.size=d.P.xa.H(),this.yb=new Zb(c.index,c.f,c.g),x(b,"offscreen"),document.body.appendChild(b),b.innerHTML=d.P.k,this.a=b.firstChild,K(this.a,"width",this.size.e),K(this.a,"height",this.size.b),B("[data-ts-template=document]",this.a).forEach(function(b){b.innerHTML=Mustache.to_html(b.innerHTML,a.Wa.l)}),B(".container",this.a).forEach(function(b,
53
+ e){var k=d.I[e],l,E,A;if(k){E=k.f;l=a.o[E];a:{var j=a.lineHeight,u,z,F;A=!0;u=k.size;z=k.qa;F=J(b);hc(z,b,u);if(k.z){y(b,"bottom")?(A=!1,b.style.top="auto"):b.style.bottom="auto";z=new N(b);k=z.n;if(k>F)if(l.Na)k=F,K(b,"height",k-z.O);else{nb(b,u);pb(b);A=!1;break a}else j&&k%j&&(k=Yb(k,j));l.Na&&(x(b,"scroll"),Kc(b));for(j=b;j=j.nextSibling;)if(j.nodeType===1&&!y(j,"fixed")&&(y(j,"column")||y(j,"container")||y(j,"group")))x(j,"flexed"),J(j)<=k?K(j,"height",0):A?K(j,"top",(j&&j.offsetTop||0)+k):K(j,
54
+ "bottom",J(j.offsetParent)-((j&&j.offsetTop||0)+J(j))+k)}A=!0}if(A){if(ec(c,E),f=!0,l.Yb&&(x(b,"zoomable"),b.setAttribute("data-figureindex",E),(r||wa)&&b.setAttribute("onclick","void(0)")),e===0&&d.P.L.sizetocontainer)this.size.b=J(b)+d.P.I[0].Da,this.size.n=this.size.b+this.size.O,K(this.a,"height",this.size.b)}else!l.ca&&l.ma?fc(c,l.f):y(b,"flexed")||(ec(c,E),c.la.push(E)),b.parentNode.removeChild(b)}else b.parentNode.removeChild(b)},this),B(".column",this.a).forEach(function(b,e){var f=J(b),l=
55
+ 0,E,A,j=!0,u=0,z=0,F=0,H=0,L=[],M=a.j.length,m=a.j[c.index],X,R,s;E=[];var ca,z=!1,sa=d.P.aa/f>1.5;if(m&&(f%a.lineHeight&&(f-=f%a.lineHeight),f&&!(f<d.P.cols[e].m))){m.parent&&L.push(uc(m));u=c.g?m.d.n-c.g:0;a:for(;c.index<M&&l<f;){m=a.j[c.index];R=(X=m.nextSibling)||tc(m);if(m.Ha&&dc(c,m.u.f)&&(!j||!c.g)){c.index=R?R.index:M;continue a}s=m.parent;E=f-l;j&&!F?(F=-u,z=c.overflow?m.d.lineHeight:m.ra):(F=Math.max(F,m.d.marginTop),z=F+m.ra);H=Math.max(m.d.marginBottom,X?X.d.marginTop:0);ca=m.d.n+F;z=
56
+ E<z;if(!z&&m.lc&&X&&!(c.g||j&&!sa))z=E>=ca&&E<ca+H+X.ra;z&&(z=!j||sa);z&&(z=!m.ka);m.ec&&!j&&(z=!0);if(z){if(s){for(;s&&s.index===m.index-1;)L.pop(),c.index=s.index,s.Ha&&fc(c,s.u.f),m=s,s=m.parent;s&&L.push(vc(m))}break a}m.Ha&&ec(c,m.u.f);if(m.ka||m.j.length&&E<ca){m.d.F&&(l+=j?0:F,F=0,l+=m.d.F);L.push(m.Ob);c.index+=1;continue a}l+=ca;L.push(m.k);j=!1;A=A||m;c.g=0;if(f>l+H){c.index=R?R.index:M;if(!X&&s){E=[];do E.push(s.Qa),s.d.ga?(l+=H+s.d.ga,H=s.d.marginBottom):H=Math.max(H,s.d.marginBottom);
57
+ while(!s.nextSibling&&(s=s.parent));if(f>l+H)L.push(E.join(""));else{s&&L.push(vc(m));l=f;break a}}F=H;continue a}s&&L.push(vc(m));if(m.Pa){if(l<=f)c.index=R?R.index:M,l=f}else l=f,c.index=R?R.index:M;break a}j=m;if(f>=l||!j)c.g=0;else if(c.g=l-f,l=c.g-j.d.ga,l<=0)c.g=0,c.index=j.index+1;else if(l=(j.d.b-l)%j.d.lineHeight)f-=l,c.g+=l;K(b,"height",f);b.innerHTML=L.join("");if(A&&b.firstChild)if(b.firstChild.style.marginTop=-u+"px",A.parent&&!u){for(s=A.parent;s;)s.d.F&&(A=s),s=s.parent;if(s!==A){s=
58
+ A.parent;for(m=b.firstChild;s;)m=m.firstChild,s=s.parent,m&&(m.style.marginTop=0)}}else{if(A.j.length&&!u)for(m=b.firstChild;A;)A.j.length&&m.firstChild?(A=A.j[0],m=m.firstChild,m.style.marginTop=0):A=h}else pb(b)}}),e.Z(c)?this.error=!0:!f&&d.P.L.sizetocontainer?this.sa=!0:(K(this.a,"marginTop",-this.size.n/2),K(this.a,"marginLeft",-this.size.Q/2),c.J=d.P.L.onlypage||cc(c,a),c.J&&x(this.a,"last-page"),this.k=b.innerHTML,this.end=new Zb(c.index,c.f,c.g),c.va+=1),this.v(),document.body.removeChild(b))}
59
+ Lc.prototype.N=function(){if(this.s)return this.a;this.a=sb(this.k);this.s=!0;return this.a};Lc.prototype.v=function(){this.s=!1;Ub(this.a,"none");B("img",this.a).forEach(vb);this.a=h};Lc.prototype.H=function(){var a=Object.H(this);a.a=this.a&&this.a.cloneNode(!0)||h;a.s=this.s;return a};function Mc(a,b,c){this.i=[];this.Za=[];this.bb=a;this.Wa=c;if(b)if(b.nodeName!=="ARTICLE")this.error=!0;else{this.loaded=!0;a=document.createElement("div");c=document.createElement("div");a.style.display="none";x(a,"offscreen grid");x(c,"column");b.removeAttribute("id");pb(a);if(this.ya=b.getAttribute("data-theme")||b.getAttribute("data-grids")||h)x(a,this.ya),x(c,this.ya),Nc(this,this.bb);for(;b.firstChild;)c.appendChild(b.firstChild);a.appendChild(c);c.style.display="block";a.style.display="block";
60
+ document.body.appendChild(a);this.content=new Bc(c,this.Wa);document.body.removeChild(a);a.removeChild(c);pb(c);Oc(this)}}function Nc(a,b){a.bb=a.ya?b.filter(function(a){return a.Bb.indexOf(this.ya)!==-1},a):b.slice(0)}function Pc(a,b){a.Za=a.bb.filter(function(a){return a.ia()&&Sb(a.size,{e:b.e-a.size.Ca,b:b.b-a.size.O-a.size.marginHeight})}).map(function(a){return a.wa(b.b)});a.Za.sort(Ic)}function Qc(a,b){if(!a.ua||a.ua.e!==b.e||a.ua.b!==b.b)a.ua=b,a.Ma=Sb(a.pa,b);return!a.Ma}
61
+ function Oc(a){w("paginate");a.i=[];a.B=0;a.ua&&Pc(a,a.ua);a.ha=new bc;a.pa=h;a.Ma=!0;a.R=!1}
62
+ Mc.prototype.rc=function(a,b,c){w("paginate");for(var d,b=b||0;!this.ha.J;)if(d=new Lc(this.content,this.Za,this.ha),d.sa){if(this.ha.J)break}else{if(d.error){if(this.ha.J)break;this.error=!0;C(document,"treesaver.paginationerror",{wb:this});this.ha.J=!0;break}this.i.push(d);this.B+=1;this.error=!1;var e=this.pa||{},f=d.size||{},i=f.O||(f.n?f.n-f.b:0),o=f.Ca||(f.Q?f.Q-f.e:0);this.pa={e:Math.max(e.e||0,f.e+o||0),b:Math.max(e.b||0,f.b+i||0),Ka:Math.min(e.Ka||Infinity,f.Ka+o||Infinity),V:Math.min(e.V||
63
+ Infinity,f.V+i||Infinity)};if(!(b&&this.B<=b||c&&(c===$b||!(ac(c,d.end)>=0)))&&!this.ha.J){a&&(C(document,"treesaver.paginationprogress",{wb:this}),Rc(this,ha(arguments)));return}}this.R=!0;C(document,"treesaver.paginationprogress",{wb:this,Cc:!0})};function Rc(a,b){gb(Mc.prototype.rc,200,b,"paginate",a)}
64
+ function Sc(a,b,c){a.Ma||Oc(a);var d=[],e=b>=0?b+c-1:Infinity;!a.R&&e>a.i.length-1&&Rc(a,[!0,e]);if(a.R)c=Math.min(c,a.B-(b>=0?b:b-1));else if(d.length=c,b<0)return d;if(b<0)for(e=-b;e<=c;e+=1)d[e+b]=a.i[a.B-e];else for(e=b;e<b+c;e+=1)d[e-b]=a.i[e];return d}
65
+ function Tc(){var a=O.c[P.index],b=Q;if(!a.content)return-1;var c,d;if(!b||b.xb())return 0;a.Ma||Oc(a);if(!a.R&&(b===$b||!a.B||!(ac(b,a.i[a.B-1].end)>=0)))return Rc(a,[!0,h,b]),-1;if(b===$b)return a.R?a.B-1:-1;for(c=0,d=a.B;c<d;c+=1)if(ac(a.i[c].end,b)<0)return c;return a.R?a.B-1:-1};function S(a,b){this.index=a;this.anchor=b}var Uc=new S(Infinity),Vc=new S(0);S.prototype.xb=function(){return this.index===0};S.prototype.Z=function(a){return this.index===a.index};function Wc(){this.h=[];this.parent=h}Wc.prototype.appendChild=function(a){a.parent=this;this.h.push(a);return a};Wc.prototype.replaceChild=function(a,b){var c=this.h.indexOf(b);return c!==-1?(a.parent=b.parent,b.parent=h,this.h.splice(c,1,a)[0]):h};Wc.prototype.insertBefore=function(a,b){var c=this.h.indexOf(b);a.parent=this;c===0?this.h.unshift(a):c>1&&this.h.splice(c,0,a);return a};Wc.prototype.removeChild=function(a){var a=this.h.indexOf(a),b=h;if(a!==-1)b=this.h.splice(a,1)[0],b.parent=h;return b};var Xc=/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,Yc="source,scheme,authority,userInfo,user,password,host,port,relative,path,directory,file,query,anchor".split(",");function Zc(a){for(var b=Yc.length,a=Xc.exec(a),c={};b--;)c[Yc[b]]=a[b]||h;return c}
66
+ function bd(a){var b="";a.scheme&&(b+=a.scheme+":");a.source&&/^(?:[^:\/?#]+:)?\/\//.test(a.source)&&(b+="//");a.authority&&(a.userInfo&&(b+=a.user||"",a.userInfo.indexOf(":")!==-1&&(b+=":"),b+=a.password||"",b+="@"),b+=a.host||"",a.port!==h&&(b+=":"+a.port));a.relative&&(a.path&&(b+=a.directory||"",b+=a.file||""),a.query&&(b+="?"+a.query),a.anchor&&(b+="#"+a.anchor));return b}
67
+ function cd(a){a=Zc(a);return a.file?/^(index|default)\.(html?|php|asp|aspx)$/i.test(a.file)||T&&T.get("DirectoryIndex","index.html")===a.file:!1}function dd(a){a=Zc(a);a.anchor=h;return bd(a)}function ed(a){a=Zc(a);a.file=h;return bd(a)};function U(a,b){if(a)this.url=a,this.path=Zc(a).relative,this.l=b||{},this.c=[],this.Oa={},this.ub=[],this.h=[],this.refresh=0}var fd=/<title>\s*(.+?)\s*<\/title>/i;U.prototype=new Wc;n=U.prototype;
68
+ n.parse=function(a){var b=document.createElement("div"),c=[];if(!a||typeof a!=="string"||a.trim()==="")return[];b.innerHTML=a;c=B("article",b).filter(function(a){return tb(a,"article")===h});if(c.length===0)c.push(document.createElement("article")),c[0].innerHTML=b.innerHTML;return c.map(function(a,b){var c=a.getAttribute("id")||(b===0?h:"_"+b),i=new Mc(gd,a,this);c&&(this.Oa[c]=b,this.ub[b]=c);return i},this)};
69
+ n.Z=function(a){var b=a;if(!b)return!1;if(typeof a!=="string"&&a.url)b=a.url;return cd(b)&&cd(this.url)?b===this.url:cd(b)?ed(b)===this.url:cd(this.url)?b===ed(this.url):b===this.url};n.ia=function(){return this.r?Xa(this.r,!0):!0};n.$a=function(a){return this.c[a]||h};n.vc=function(a){this.c=a};n.ab=function(){return this.l};n.jc=function(){return this.url};n.hc=function(){return this.c.length};function hd(a){return(a=fd.exec(a))&&a[1]?a[1]:h}
70
+ n.load=function(a){var b=this,c=h;if(!this.ta){this.ta=!0;if(!r&&(c=yb("cache:"+this.url),!a&&c))this.c=this.parse(c),this.title=hd(c),this.loaded=!0,C(document,"treesaver.loaded",{document:this});v.get(this.url,function(a){b.ta=!1;if(a){if(r||c!==a)r||xb("cache:"+b.url,a,!0),b.c=b.parse(a),b.title=hd(a),b.loaded=!0,C(document,"treesaver.loaded",{document:b})}else if(r||!c)b.mc=!0,b.loaded=!1,C(document,"treesaver.loadfailed",{document:b})})}};p("treesaver.Document",U);
71
+ p("treesaver.Document.prototype.setArticles",U.prototype.vc);p("treesaver.Document.prototype.getNumberOfArticles",U.prototype.hc);p("treesaver.Document.prototype.getArticle",U.prototype.$a);p("treesaver.Document.prototype.parse",U.prototype.parse);p("treesaver.Document.prototype.getUrl",U.prototype.jc);p("treesaver.Document.prototype.getMeta",U.prototype.ab);function zb(a){return window.JSON.parse(a)}p("treesaver.jsonParse",zb);if(!Object.keys)Object.keys=function(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b};Object.H=function(a){function b(){}b.prototype=a;return new b};function id(a){this.url=a}id.prototype=new Wc;n=id.prototype;n.w=[];
72
+ function jd(a,b){var c=h,d=h,e={},f=h,i=0,o=h;typeof b==="string"?c=b:(c=b.url,d=b.contents,Object.keys(b).forEach(function(a){e[a]=b[a]}),b.refresh&&(i=parseInt(b.refresh,10)),b.requires&&(typeof b.requires==="string"?f=b.requires.split(/\s|,\s/g):Array.isArray(b.requires)&&(f=b.requires.map(function(a){return a.toString()})),f=f.filter(function(a){return a.trim()!==""})));if(!c)return h;c=dd(v.oa(c));o=new U(c,e);if(i)o.refresh=i;d&&Array.isArray(d)&&d.forEach(function(a){o.appendChild(jd(this,
73
+ a))},a);if(f)o.r=f;return o}n.update=function(){var a=0;this.w=[];this.Xa={};this.Ya={};kd(this,this.h,function(b){this.Xa[b.url]?this.Xa[b.url].push(b):this.Xa[b.url]=[b];this.w.push(b);this.Ya[b.url]?this.Ya[b.url].push(a):this.Ya[b.url]=[a];a+=1},this);C(document,"treesaver.index.updated",{index:this})};function kd(a,b,c,d){return b.every(function(a){return c.call(d,a)!==!1&&kd(this,a.h,c,d)},a)}n.ic=function(){return this.w.length};
74
+ function ld(a,b){var c=-1,d=0;kd(a,a.h,function(a){a.Z(b)&&(c=d);d+=1},a);return c}n.Fa=function(a){var b=[];return a?(kd(this,this.h,function(c){c.Z(a)&&b.push(c)},this),b):this.w};
75
+ n.parse=function(a){var b={h:[],D:{},l:{}};if(!a)return b;if(typeof a==="string")try{a=zb(a)}catch(c){return b}if(Object.prototype.toString.apply(a)!=="[object Object]")return b;if(!a.contents||!Array.isArray(a.contents))return b;b.h=a.contents.map(function(a){return jd(this,a)},this);b.h=b.h.filter(function(a){return a!==h});b.h=b.h.map(function(a){return this.appendChild(a)},this);if(a.settings)b.D={},Object.keys(a.D).forEach(function(c){b.D[c]=a.D[c]});Object.keys(a).forEach(function(c){c!=="settings"&&
76
+ (b.l[c]=a[c])});return b};n.set=function(a,b){return this.D[a]=b};n.get=function(a,b){return this.D.hasOwnProperty(a)?this.D[a]:b};n.ab=function(){return this.l};
77
+ n.load=function(){var a=this,b=h,c=h;if(!this.ta)if(this.url){this.ta=!0;if(!r&&(b=yb("cache:"+this.url)))c=this.parse(b),this.h=c.h,this.l=c.l,this.D=c.D,this.loaded=!0,C(document,"treesaver.index.loaded",{index:this}),this.update();v.get(this.url,function(d){a.ta=!1;if(d){if(r||b!==d)r||xb("cache:"+a.url,d,!0),c=a.parse(d),a.h=c.h,a.l=c.l,a.D=c.D,a.loaded=!0,C(document,"treesaver.index.loaded",{index:a}),a.update()}else if(r||!b)a.mc=!0,a.loaded=!1,C(document,"treesaver.index.loadfailed",{index:a})})}else C(document,
78
+ "treesaver.index.loadfailed",{index:this})};p("treesaver.Index",id);p("treesaver.Index.prototype.get",id.prototype.get);p("treesaver.Index.prototype.set",id.prototype.set);p("treesaver.Index.prototype.update",id.prototype.update);p("treesaver.Index.prototype.getDocuments",id.prototype.Fa);p("treesaver.Index.prototype.getNumberOfDocuments",id.prototype.ic);p("treesaver.Index.prototype.getMeta",id.prototype.ab);var T,gd,V,W,P,O,md,Q,nd,Z,od,pd,qd,rd;function sd(){var a=ga;W=V=-1;P=Vc;gd=td();if(!gd)return!1;Z=new U(dd(document.location.href),{});if(a)Z.c=Z.parse(a),Z.title=document.title,Z.loaded=!0;D(document,"treesaver.index.loaded",ud);D(document,"treesaver.index.updated",vd);T=new id(wd());T.appendChild(Z);T.update();T.load();xd(Z,Vc,h,h,!0);yd();zd();Ad.forEach(function(a){D(document,a,Bd)});D(window,"popstate",Bd);return!0}
79
+ function Cd(){Q=md=O=h;W=V=-1;pd=od=P=h;G(document,"treesaver.index.loaded",ud);G(document,"treesaver.index.updated",vd);Ad.forEach(function(a){G(document,a,Bd)});G(window,"popstate",Bd)}function vd(a){a.index.Fa().forEach(function(a){a.refresh&&jb(function(){a.load(!0)},a.refresh*1E3,Infinity,[],a.url)})}
80
+ function ud(a){var a=a.index,b=a.Fa(Z.url);if(b.length)b.forEach(function(a){Z.l=a.l;Z.children=a.children;Z.r=a.r;Z.refresh=a.refresh;a.parent.replaceChild(Z,a)}),W=ld(a,Z),document.title=Z.l.title||Z.title}function td(){var a=[];Pb("grid").forEach(function(b){var c=b.getAttribute("data-requires");if(!c||Xa(c.split(" ")))b=new Ec(b),b.error||a.push(b)});return a}
81
+ function yd(){var a=Pb("loading")[0];a||(a=document.createElement("div"));document.body.appendChild(a);a.style.top="50%";a.style.left="50%";K(a,"margin-top",-J(a)/2);K(a,"margin-left",-Tb(a)/2);document.body.removeChild(a);od=qb(a);a=a.cloneNode(!0);document.body.appendChild(a);pd=new N(a);document.body.removeChild(a)}
82
+ function zd(){var a=Pb("error")[0];a||(a=document.createElement("div"));document.body.appendChild(a);a.style.top="50%";a.style.left="50%";K(a,"margin-top",-J(a)/2);K(a,"margin-left",-Tb(a)/2);document.body.removeChild(a);qd=qb(a);a=a.cloneNode(!0);document.body.appendChild(a);rd=new N(a);document.body.removeChild(a)}var Ad=["treesaver.loaded","treesaver.loadfailed","treesaver.paginationprogress"];
83
+ function Bd(a){if(a.type==="treesaver.paginationprogress")C(document,"treesaver.pageschanged");else if(a.type==="treesaver.loaded")document.title=O.l.title||O.title,C(document,"treesaver.pageschanged");else if(a.type==="treesaver.loadfailed"&&a.document===O)v.Ja()&&(document.location=O.url);else if(a.type==="popstate"){var b=-1,c=h,d;a.state?(d=(b=a.state.index)||b===0?T.w[b]:h)?(c=a.state.position,xd(d,Vc,c?new Zb(c.X,c.u,c.g):h,b,!0)):Dd(a.state.url):(b=ld(T,Z),xd(Z,Vc,h,b))}}
84
+ function wd(){var a=B("link[rel~=index]")[0];return!a?h:v.oa(a.href)}function Ed(){return V!==-1?V>=1?!0:Fd():!Q&&Fd()}function Fd(){return P.index>0||Gd()}function Gd(){for(var a=W-1;a>=0;a-=1)if(T.w[a].ia())return!0;return!1}function Hd(a,b){if(!Fd())return h;if(P.index>0){var c=new S(P.index-1),d=W,e=O;return b?e:xd(e,c,a?$b:h,d)}else{if(Gd()){c=W-1;for(e=d=h;c>=0;c-=1)if(d=T.w[c],d.ia())break;d?(e=d.loaded?new S(d.c.length-1):Uc,c=b?d:xd(d,e,a?$b:h,c)):c=h}else c=h;return c}}
85
+ function Id(){if(V===-1)return!Q&&Hd(!0)?!0:!1;var a=V-1;if(a<0)return Hd(!0)?!0:!1;V=a;Q=h;C(document,"treesaver.pageschanged");return!0}function Jd(){return V!==-1?V<O.c[P.index].B-1?!0:O.c[P.index].R&&Kd():Q===$b?Kd():!1}function Kd(){return P.index<O.c.length-1||Ld()}function Ld(){for(var a=W+1,b=T.w.length;a<b;a+=1)if(T.w[a].ia())return!0;return!1}
86
+ function Md(a){if(!Kd())return h;if(P.index<O.c.length-1){var b=new S(P.index+1),c=W,d=O;return a?d:xd(d,b,h,c)}else{if(Ld()){b=W+1;c=h;for(d=T.w.length;b<d;b+=1)if(c=T.w[b],c.ia())break;a=c?a?c:xd(c,Vc,h,b):h}else a=h;return a}}function Nd(){if(V===-1)return Q===$b?Md():!1;var a=V+1;if(a>=O.c[P.index].B)return O.c[P.index].R?Md():!1;V=a;Q=h;C(document,"treesaver.pageschanged");return!0}
87
+ function Dd(a){var b=Zc(a).anchor,c=T.Fa(dd(a)),a=-1,d=h;return c.length!==0&&(c=c[0],a=ld(T,c),d=c.loaded&&b?new S(c.Oa[b]||0):new S(0,b),a!==-1)?xd(c,d,h,a):!1}
88
+ function Od(a){P.index===Infinity&&O.loaded?P=new S(O.c.length-1):P.anchor&&O.loaded&&(P=new S(O.Oa[P.anchor]||0));O.c[P.index]&&Qc(O.c[P.index],a)&&(V=-1,nd=0);var b=[],c,d,e;if(O.c[P.index]&&V===-1&&(V=Tc(),V===-1))return b.length=3,b[1]=Pd(),b;c=V-1;if(c<0){if((d=Hd(!1,!0))&&d.loaded&&d===O)Qc(d.c[P.index-1],a),b=Sc(d.c[P.index-1],c,-c);else if(d&&d.loaded&&d.c[d.c.length-1].R)b=Sc(d.c[d.c.length-1],c,-c);else for(d=0,e=-c;d<e;d+=1)b[d]=h;d=3+c;c=0}else d=3;O.c[P.index]&&(b=b.concat(Sc(O.c[P.index],
89
+ c,d)));if(d=3-b.length)if((c=Md(!0))&&c===O)Qc(c.c[P.index+1],a),b=b.concat(Sc(c.c[P.index+1],0,d));else if(c)c.loaded?(Qc(c.c[0],a),b=b.concat(Sc(c.c[0],0,d))):(c.load(),b.length=3);for(d=1,e=b.length;d<e;d+=1)b[d]||(b[d]=O.error?{N:Lc.prototype.N,v:Lc.prototype.v,k:qd,size:rd}:Pd());if((!Q||Q===$b)&&b[1]&&b[1].yb)Q=b[1].yb;O.c[P.index]&&!nd&&(a=O.c[P.index],nd=a.pa?a.pa.e:0);for(d=0;d<b.length;d+=1)for(a=d+1;a<b.length;a+=1)b[d]&&b[d]===b[a]&&(b[a]=b[d].H());return b}
90
+ function Qd(){return O.url}function Rd(){return V+1||1}function Sd(){return!O.c[P.index]||P===Uc?1:O.c[P.index].B||1}function Td(){return W+1||1}function Ud(){return T.w.length}
91
+ function xd(a,b,c,d,e){var f=h,i=h,f=h,o;if(!a)return!1;f=a.ub[b&&b.index||0]||h||!!b.anchor&&b.anchor;i=a.url+(f?"#"+f:"");f=a.path+(f?"#"+f:"");if(a.Z(O)&&d!==W&&!P.Z(b))return md=o=O.$a(b.index),P=b,Q!==c&&(Q=c,V=-1),V=-1,e?Ab({index:d,url:i,position:c},a.l.title,f):Bb({index:d,url:i,position:c},a.l.title,f),C(document,"treesaver.pageschanged"),C(document,"treesaver.articlechanged",{article:o}),!0;document.title=a.l.title||a.title;O=a;Q!==c&&(Q=c,V=-1);V=-1;P=b;md=O.$a(b&&b.index||0);if(a.loaded){if(a.error)v.Ja()&&
92
+ (document.location=a.url)}else a.load();W=d||d===0?d:ld(T,a);e?Ab({index:d,url:i,position:c},a.l.title||"",f):Bb({index:d,url:i,position:c},a.l.title||"",f);C(document,"treesaver.pageschanged");C(document,"treesaver.documentchanged",{document:a,url:i,path:f});C(document,"treesaver.articlechanged",{article:md});return!0}function Pd(){return{N:Lc.prototype.N,v:Lc.prototype.v,k:od,size:pd}}p("treesaver.canGoToNextPage",Jd);p("treesaver.canGoToPreviousPage",Ed);p("treesaver.canGoToNextDocument",Ld);
93
+ p("treesaver.canGoToPreviousDocument",Gd);p("treesaver.getCurrentUrl",Qd);p("treesaver.getCurrentPageNumber",Rd);p("treesaver.getCurrentPageCount",Sd);p("treesaver.getCurrentDocumentNumber",Td);p("treesaver.getCurrentDocument",function(){return O});p("treesaver.getDocumentCount",Ud);p("treesaver.goToDocumentByURL",Dd);function Vd(a){this.r=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):h;jc(a);this.k=a.parentNode.innerHTML;this.size=new N(a);delete this.size.e;delete this.size.b}
94
+ Vd.prototype.N=function(){if(!this.s)this.s=!0,this.a=sb(this.k),this.T=B(".viewer",this.a)[0],this.Qb=B(".pagewidth",this.a),this.nextPage=B(".next",this.a),this.gb=B(".nextArticle",this.a),this.lb=B(".prev",this.a),this.kb=B(".prevArticle",this.a),this.ib=[],this.jb=[],this.Ga=[],this.cb=[],this.Ra=[],this.Sa=[],this.mb=[],this.nb=[],B("[data-ts-template]",this.a).forEach(function(a){var b,c;switch(a.getAttribute("data-ts-template")){case "position":b=this.ib;c=this.jb;break;case "index":b=this.Ga;
95
+ c=this.cb;break;case "currentdocument":b=this.Ra;c=this.Sa;break;case "publication":b=this.mb;c=this.nb;break;default:return}b.push(a);c.push(a.innerHTML)},this),this.Mb=B(".menu",this.a),this.qb=B(".sidebar",this.a),this.i=[],Wd.forEach(function(a){D(document,a,this)},this),this.Aa=!1,Xd(this);return this.a};
96
+ Vd.prototype.v=function(){if(this.s)Yd(),this.s=!1,Wd.forEach(function(a){G(document,a,this)},this),this.nb=this.mb=this.Sa=this.Ra=this.cb=this.Ga=this.jb=this.ib=this.kb=this.lb=this.gb=this.nextPage=this.qb=this.Mb=this.Qb=this.T=this.a=h,this.i.forEach(function(a){a&&a.v()}),this.hb=this.i=h,w("idletimer"),w("updateTOC"),Yd()};function Yd(){w("selectPages");w("animatePages")}var Wd="treesaver.index.updated,treesaver.pageschanged,treesaver.documentchanged,keydown,click,mousewheel,DOMMouseScroll".split(",");
97
+ wa?Wd.push("touchstart","touchmove","touchend","touchcancel"):Wd.push("mouseover");
98
+ Vd.prototype.handleEvent=function(a){switch(a.type){case "treesaver.pageschanged":return Zd(this);case "treesaver.index.updated":return kb(this.Vb,"updateTOC",this),Zd(this);case "treesaver.documentchanged":$d(this);ae(this);break;case "mouseover":a.touches||Xd(this);break;case "touchstart":var b=be(a.target),c=ce(b),d,e,f;if(q.contains(be(a.target)))if(a.stopPropagation(),a.preventDefault(),this.U&&!c)de(this);else{if(c)for(d=c;d;){e=d.id;if(e==="prevPage"||e==="nextPage"){c=h;break}d=d.parentNode}b=
99
+ this.T.contains(b);d=a.touches[0].pageX;e=a.touches[0].pageY;f=ba();this.za={Ec:d,Fc:e,startTime:f,Jb:d,Kb:e,Dc:f,Ta:0,Ua:0,Db:0,ea:0,tb:0,xc:0,fa:a.touches.length,Ac:b,qc:this.C,Tb:c,Ab:c&&c.scrollWidth!==c.clientWidth};if(this.za.fa===2)this.za.wc=a.touches[1].pageX;lb(["resumeTasks"])}break;case "touchmove":if(c=this.za)a.stopPropagation(),a.preventDefault(),b=ba(),d=a.touches[0].pageX,e=a.touches[0].pageY,c.Db=c.Ib-b,c.Ta=d-c.Jb,c.Ua=e-c.Kb,c.Ib=b,c.Jb=a.touches[0].pageX,c.Kb=a.touches[0].pageY,
100
+ c.xc+=c.Db,c.ea+=c.Ta,c.tb+=c.Ua,c.fa=Math.min(a.touches.length,c.fa),c.Ub=c.fa===1&&Math.abs(c.ea)>=30&&Math.abs(c.ea)*2>Math.abs(c.tb),c.Tb&&(c.Va||c.Ab||!c.Ub)?(c.Va=c.Va||c.Ab||Math.abs(c.tb)>=30,a=c.Tb,b=-c.Ua,a.scrollLeft+=-c.Ta,a.scrollTop+=b,c.Ac||Xd(this)):c.fa===2?c.sb=a.touches[1].pageX-c.wc:(this.C=c.qc+c.ea,this.Ba(!0));break;case "touchend":d=this.za;e=!1;c=be(a.target);b=this.U||this.T.contains(c);ee(this);if(d&&(a.stopPropagation(),a.preventDefault(),d.Va?b?this.S():Xd(this):d.fa===
101
+ 1?d.Ib?d.Ub&&((e=d.ea>0?fe(this):ge(this))?this.S():Xd(this)):(d=document.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,a.view,1,a.changedTouches[0].screenX,a.changedTouches[0].screenY,a.changedTouches[0].clientX,a.changedTouches[0].clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,h),c.dispatchEvent(d)&&b?this.Aa?this.S():Xd(this):b?this.S():Xd(this),e=!0):d.fa===2&&Math.abs(d.sb)>=30&&(d.ea<0&&d.sb<0?e=Md():d.ea>0&&d.sb>0&&(e=Hd()),e?this.S():Xd(this)),!e))this.vb=ba(),this.C=0,this.Ba();
102
+ break;case "touchcancel":return ee(this);case "keydown":a:if(this.U)de(this),a.preventDefault();else if(!/input|select|textarea/i.test(a.target.tagName)&&!he(a)){switch(a.keyCode){case 34:case 39:case 40:case 74:case 32:ge(this);break;case 33:case 37:case 38:case 75:fe(this);break;case 72:Hd();break;case 76:Md();break;default:b=g;break a}this.S();a.preventDefault()}return b;case "click":return this.click(a);case "mousewheel":case "DOMMouseScroll":if(he(a))c=!0;else if(ce(be(a.target)))c=!0;else if(this.U)de(this),
103
+ a.preventDefault();else if(b=ba(),!(this.Hb&&b-this.Hb<1500))this.Hb=b,b=a.wheelDelta?a.wheelDelta:a.detail?-a.detail:0,d=this.T.contains(be(a.target)),b&&d&&(a.preventDefault(),a.stopPropagation(),b>0?fe(this):ge(this),this.S());return c}};function he(a){return a.ctrlKey||a.shiftKey||a.altKey||a.metaKey}n=Vd.prototype;
104
+ n.click=function(a){if(he(a))return!0;if(!("which"in a&&a.which!==1||a.button)){var b=be(a.target),c,d,e=c=d=c=!1,f=h;if(this.U){if(this.A.a.contains(b)&&(c=b.nodeName==="A"?b:tb(b,"A"))&&c.href)if(d=v.oa(c.href),!Dd(d))return;de(this);a.stopPropagation();a.preventDefault()}else{this.Mb.forEach(function(a){y(a,"menu-active")&&(e=a.contains(b),nb(a,"menu-active"))},this);(c=this.qb.some(function(a){return a.contains(b)}))||this.qb.forEach(function(a){ie(a)},this);if(this.i[0]&&this.i[0].a.contains(b))fe(this),
105
+ d=!0;else if(this.i[2]&&this.i[2].a.contains(b))ge(this),d=!0;else for(c=this.i[1]&&this.i[1].a.contains(b);!d&&b&&b!==q;){if(c)y(b,"zoomable")&&(d=je(this,b));else if(y(b,"prev"))fe(this),d=!0;else if(y(b,"next"))ge(this),d=!0;else if(y(b,"prevArticle"))Hd(),d=!0;else if(y(b,"nextArticle"))Md(),d=!0;else if(y(b,"menu"))e||x(b,"menu-active"),d=!0;else if(y(b,"sidebar")||y(b,"open-sidebar")||y(b,"toggle-sidebar")||y(b,"close-sidebar"))if(f=ke(b))y(b,"sidebar")||y(b,"open-sidebar")?le(f):y(b,"toggle-sidebar")?
106
+ me(f):ie(f),d=!0;if(!d&&b.href){if(b.getAttribute("target")==="lightbox"){b=b.parentNode;continue}d=v.oa(b.href);if(!Dd(d))return;d=!0}b=b.parentNode}d&&(a.stopPropagation(),a.preventDefault())}}};function be(a){a?a.nodeType!==1&&a.parentNode&&(a=a.parentNode||q):a=q;return a}function ee(a){kb(mb,"resumeTasks");a.za=h}function ce(a){for(;a&&a!=document.documentElement;){if(y(a,"scroll"))return a;a=a.parentNode}}function fe(a){if(Ed())return ne(a,-1),Id()}
107
+ function ge(a){if(Jd())return ne(a,1),Nd()}function Xd(a){if(!a.Aa)a.Aa=!0,x(a.a,"active"),C(document,"treesaver.active");var b=a.S,c=Za.idletimer;c?c.eb=ba():fb(b,5E3,1,h,!1,"idletimer",a)}n.S=function(){if(this.Aa)this.Aa=!1,nb(this.a,"active"),C(document,"treesaver.idle");w("idletimer")};function le(a){C(document,"treesaver.sidebaractive",{sidebar:a});x(a,"sidebar-active")}function ie(a){y(a,"sidebar-active")&&C(document,"treesaver.sidebarinactive",{sidebar:a});nb(a,"sidebar-active")}
108
+ function me(a){y(a,"sidebar-active")?ie(a):le(a)}function ke(a){if(y(a,"sidebar"))return a;for(;(a=a.parentNode)!==h&&a.nodeType===1;)if(y(a,"sidebar"))return a;return h}
109
+ function je(a,b){var c;c=parseInt(b.getAttribute("data-figureindex"),10);c=isNaN(c)?h:O.c[P.index].content.o[c];if(!c)return!1;a.S();if(!a.U){var d=oe(),e=pe,f,i,o,k=h;for(f=0,i=e.length;f<i;f+=1)if(o=e[f],o.ba()&&o.Ea(d)){k=o;break}a.A=k;if(!a.A)return!1;a.U=!0;a.A.N();a.a.parentNode.appendChild(a.A.a)}a.A.a=a.A.a;K(a.A.a,"width",Tb(a.a));K(a.A.a,"height",J(a.a));d=a.A;d.p=d.p;e=new N(d.p);e={e:e.e,b:e.b};o=oc(c,e);f=Tb(d.p.offsetParent);i=J(d.p.offsetParent);var l;d.p=d.p;d.s&&o?(hc(o.qa,d.p,o.name),
110
+ d.p.style.bottom="auto",d.p.style.right="auto",l=new N(d.p),o=l.e,k=l.b,c.Na&&(o=Math.min(e.e,o),k=Math.min(e.b,k),K(d.p,"width",o),K(d.p,"height",k),x(d.p,"scroll"),Kc(d.p)),K(d.p,"left",(f-o-l.Ca)/2),K(d.p,"top",(i-k-l.O)/2),c=!0):c=!1;return!c?(de(a),!1):!0}function de(a){if(a.U)a.U=!1,a.a.parentNode.removeChild(a.A.a),a.A.v(),a.A=h}n.ba=function(){return!this.r?!0:Xa(this.r,!0)};n.Ea=function(a){return Sb(this.size,a)};
111
+ function $d(a){var b=Qd();a.Ga.forEach(function(a){var d=B("a[href]",a).filter(function(a){return v.oa(a.href)===b}),e=[];d.length&&(e=ha(a.children),e.forEach(function(a){d.some(function(b){return a.contains(b)})?x(a,"current"):nb(a,"current")}))})}function ae(a){a.ib.forEach(function(a,c){a.innerHTML=Mustache.to_html(this.jb[c],{pagenumber:Rd(),pagecount:Sd(),url:Qd(),documentnumber:Td(),documentcount:Ud()})},a)}
112
+ function qe(a){a.mb.forEach(function(a,c){a.innerHTML=Mustache.to_html(this.nb[c],T.l)},a)}function re(a){a.Ra.forEach(function(a,c){a.innerHTML=Mustache.to_html(this.Sa[c],O.l)},a)}function se(a){var b=nd;b&&a.Qb.forEach(function(a){K(a,"width",b)},a)}function te(a,b){a.nodeName==="BUTTON"?a.disabled=!b:b?nb(a,"disabled"):x(a,"disabled")}function ue(a){if(a.nextPage){var b=Jd();a.nextPage.forEach(function(a){te(a,b)},a)}}function ve(a){if(a.gb){var b=Kd();a.gb.forEach(function(a){te(a,b)},a)}}
113
+ function we(a){if(a.lb){var b=Ed();a.lb.forEach(function(a){te(a,b)},a)}}function xe(a){if(a.kb){var b=Fd();a.kb.forEach(function(a){te(a,b)},a)}}function Zd(a){kb(a.uc,"selectPages",a)}n.uc=function(){Yd();ye(this);ne(this);ae(this);re(this);qe(this);se(this);ue(this);ve(this);we(this);xe(this)};n.Vb=function(){w("updateTOC");var a={contents:T.h.map(function(a){return a.l})};this.Ga.forEach(function(b,c){b.innerHTML=Mustache.to_html(this.cb[c],a)},this);$d(this)};
114
+ function ye(a){var b=a.i;a.i=Od(a.hb);b.forEach(function(a){if(a){var b=a.a;this.i.indexOf(a)===-1&&(a.v(),b&&b.parentNode===this.T&&this.T.removeChild(b))}},a);a.i.forEach(function(a,b){if(a){var e=a.a||a.N();e.parentNode||this.T.appendChild(e);e.setAttribute("id",b===0?"previousPage":b===1?"currentPage":"nextPage")}},a)}
115
+ function ne(a,b){var c=a.i[0],d=a.i[1],e=a.i[2],f,i=d.size.Q/2;a.da=[0,0,0];c&&(f=Math.max(d.size.marginLeft,c.size.marginRight),a.da[0]=-(i+f+c.size.Q/2));e&&(f=Math.max(d.size.marginRight,e.size.marginLeft),a.da[2]=i+f+e.size.Q/2);b?(b>0?(d.a.setAttribute("id","nextPage"),e?(b=-a.da[2],e.a.setAttribute("id","currentPage")):b=-(d.size.Q+d.size.marginRight)):(d.a.setAttribute("id","previousPage"),c?(b=-a.da[0],c.a.setAttribute("id","currentPage")):b=d.size.Q+d.size.marginLeft),a.da=a.da.map(function(a){return a+
116
+ b}),a.vb=ba(),a.C-=b):a.C=a.C||0;a.Ba()}n.Ba=function(a){!a&&this.C?(lb(["animatePages","resumeTasks"]),a=1-(ba()-this.vb||0)/400,a=Math.max(0,Math.min(1,a)),(this.C=Math.round(this.C*a))?kb(this.Ba,"animatePages",this):(this.C=0,kb(mb,"resumeTasks"))):w("animatePages");this.i.forEach(function(a,c){a&&a.a&&Xb(a.a,this.da[c]+this.C,0)},this)};function ze(a){B(".container",a);this.r=a.hasAttribute("data-requires")?a.getAttribute("data-requires").split(" "):h;this.k=a.parentNode.innerHTML;this.size=new N(a);delete this.size.e;delete this.size.b}ze.prototype.N=function(){if(!this.s)this.s=!0,this.a=sb(this.k),this.p=B(".container",this.a)[0];return this.a};ze.prototype.v=function(){if(this.s)this.s=!1,this.a=h};ze.prototype.Ea=function(a){return Sb(this.size,a)};ze.prototype.ba=function(){return!this.r?!0:Xa(this.r,!0)};var $,Ae,pe;function Be(){var a=[];Pb("chrome").forEach(function(b){var c;c=b.getAttribute("data-requires");if(!c||Xa(c.split(" ")))$.ja.appendChild(b),c=new Vd(b),a.push(c),$.ja.removeChild(b)});return a}function Ce(){var a=[];Pb("lightbox").forEach(function(b){var c;c=b.getAttribute("data-requires");if(!c||Xa(c.split(" ")))$.ja.appendChild(b),c=new ze(b),a.push(c),$.ja.removeChild(b)});return a}
117
+ function De(){if($.orientation!==window.orientation)Ua(),$.orientation=window.orientation,$.orientation%180?$.viewport.setAttribute("content","width=device-height, height=device-width"):$.viewport.setAttribute("content","width=device-width, height=device-height"),va&&!ea&&!Ia&&window.scrollTo(0,0)}function oe(){if(r||!ea)return(window.pageYOffset||window.pageXOffset)&&window.scrollTo(0,0),{e:window.innerWidth,b:window.innerHeight};else{var a=q;return{e:Tb(a),b:J(a)}}}
118
+ function Ee(){var a=oe(),b;if(a.b!==$.size.b||a.e!==$.size.e){$.size=a;if(!$.G||!$.G.ba()||!$.G.Ea(a)){b=Ae;var c,d,e,f=h;for(c=0,d=b.length;c<d;c+=1)if(e=b[c],e.ba()&&e.Ea(a)){f=e;break}b=f;if(!b)return;pb($.ja);$.G&&$.G.v();$.ja.appendChild(b.N());$.G=b;C(document,"treesaver.chromechanged",{node:b.a})}b=$.G;K(b.a,"width",a.e);K(b.a,"height",a.b);b.hb=h;b.hb={e:Tb(b.T),b:J(b.T)};O&&(Zd(b),kb(b.Vb,"updateTOC",b))}}
119
+ if(r){var Fe=function(a){return function(){$.G&&Xd($.G);a()}};p("treesaver.nextPage",Fe(Nd));p("treesaver.previousPage",Fe(Id));p("treesaver.nextArticle",Fe(Md));p("treesaver.previousArticle",Fe(Hd))};/*
120
+ Copyright 2011 Filipe Fortes ( www.fortes.com ).
121
+ Version: 0.1.
122
+
123
+ Licensed under MIT and GPLv2.
124
+ */
125
+ function Ge(){if(ea)q.innerHTML=fa;else if(ga)q.innerHTML=ga;He();ab!==-1&&db.call(window,ab);mb();ab=-1;Ya=[];Za={};Jb=h;Hb=0;Ib=[];v.yc();document.documentElement.className="js no-treesaver";document.documentElement.style.display="block"}function He(){w("unboot");G(document,"DOMContentLoaded",Ie);delete da.Sb;delete da.Eb}
126
+ function Ie(){da.Eb=!0;(q=document.getElementById("ts_container"))?(ea=!0,fa=q.innerHTML):(ea=!1,q=document.body);ga=document.body.innerHTML;pb(q);document.documentElement.style.display="block";Je()}
127
+ function Je(){if(da.Sb&&da.Eb&&document.body){He();D(window,"unload",Ke);var a;$={orientation:0,size:{e:0,b:0}};pb(q);a=$;var b;ea?b=q:(b=document.createElement("div"),b.setAttribute("id","chromeContainer"),q.appendChild(b));a.ja=b;a=$;b=B("meta[name=viewport]")[0];b||(b=document.createElement("meta"),b.setAttribute("name","viewport"),B("head")[0].appendChild(b));a.viewport=b;Ae=Be();pe=Ce();Ae.length?(Ee(),jb(Ee,100,Infinity,[],"checkState"),va&&!ea&&!Ia&&(D(window,"orientationchange",De),gb(window.scrollTo,
128
+ 100,[0,0])),a=!0):a=!1;(!a||!sd())&&Ke()}}function Ke(){G(window,"unload",Ke);Cd();va&&!ea&&G(window,"orientationchange",De);$.G&&$.G.v();pe=Ae=$=h;Ge()}
129
+ if(ma){document.documentElement.style.display="none";v.load();Ua();var Le=function(){da.Sb=!0;Je()},Me,Ne=document.querySelectorAll("link[rel~=resources]");(Me=Ne.length?Ne[0].getAttribute("href"):h)?Hb?Hb===Ob?Le():Ib.push(Le):(Hb=1,Ib=[Le],v.get(Me,Mb)):Le();/complete|loaded/.test(document.readyState)?Ie():D(document,"DOMContentLoaded",Ie);gb(Ge,5E3,[],"unboot")};}).call(window);
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: seasons
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: true
5
+ segments:
6
+ - 0
7
+ - 9
8
+ - 3
9
+ - beta1
10
+ version: 0.9.3.beta1
11
+ platform: ruby
12
+ authors:
13
+ - Scott Kellum
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-10-06 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: compass
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 11
31
+ version: "0.11"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ description: The Compass variant of the Seasons framework to style Treesaver.
35
+ email:
36
+ - scott@treesaver.net
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - seasons.gemspec
45
+ - lib/seasons.rb
46
+ - stylesheets/seasons/_core.sass
47
+ - stylesheets/seasons/_tools.sass
48
+ - stylesheets/seasons/tools/_basic-functions.sass
49
+ - stylesheets/seasons/tools/_css3.sass
50
+ - stylesheets/seasons/tools/_grid-tools.sass
51
+ - stylesheets/seasons/tools/_modular-scale.sass
52
+ - stylesheets/seasons/tools/_reset.sass
53
+ - templates/project/_chrome.scss
54
+ - templates/project/_config.sass
55
+ - templates/project/_skin.scss
56
+ - templates/project/style.sass
57
+ - templates/project/treesaver-0.9.3b.js
58
+ - templates/project/toc.json
59
+ - templates/project/resources.html
60
+ - templates/project/index.html
61
+ - templates/project/article.html
62
+ - templates/project/img.jpg
63
+ - templates/project/manifest.rb
64
+ has_rdoc: true
65
+ homepage: http://www.treesaver.net/
66
+ licenses: []
67
+
68
+ post_install_message:
69
+ rdoc_options: []
70
+
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ segments:
85
+ - 1
86
+ - 3
87
+ - 5
88
+ version: 1.3.5
89
+ requirements: []
90
+
91
+ rubyforge_project: seasons
92
+ rubygems_version: 1.3.6
93
+ signing_key:
94
+ specification_version: 3
95
+ summary: The Compass variant of the Seasons framework to style Treesaver.
96
+ test_files: []
97
+