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