/*! pace 0.5.6 */ (function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=[].slice,x={}.hasownproperty,y=function(a,b){function c(){this.constructor=a}for(var d in b)x.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},z=[].indexof||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};for(t={catchuptime:500,initialrate:.03,mintime:500,ghosttime:500,maxprogressperframe:10,easefactor:1.25,startonpageload:!0,restartonpushstate:!0,restartonrequestafter:500,target:"body",elements:{checkinterval:100,selectors:["body"]},eventlag:{minsamples:10,samplecount:3,lagthreshold:3},ajax:{trackmethods:["get"],trackwebsockets:!0,ignoreurls:[]}},b=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new date},d=window.requestanimationframe||window.mozrequestanimationframe||window.webkitrequestanimationframe||window.msrequestanimationframe,s=window.cancelanimationframe||window.mozcancelanimationframe,null==d&&(d=function(a){return settimeout(a,50)},s=function(a){return cleartimeout(a)}),f=function(a){var b,c;return b=b(),(c=function(){var d;return d=b()-b,d>=33?(b=b(),a(d,function(){return d(c)})):settimeout(c,33-d)})()},e=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?w.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},u=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?w.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)x.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?u(b[a],e):b[a]=e);return b},p=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=math.abs(d),b++;return c/b},w=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.queryselector("[data-pace-"+a+"]")){if(c=e.getattribute("data-pace-"+a),!b)return c;try{return json.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];cp;p++)j=t[p],c[j]===!0&&(c[j]=t[j]);i=function(a){function b(){return u=b.__super__.constructor.apply(this,arguments)}return y(b,a),b}(error),b=function(){function a(){this.progress=0}return a.prototype.getelement=function(){var a;if(null==this.el){if(a=document.queryselector(c.target),!a)throw new i;this.el=document.createelement("div"),this.el.classname="pace pace-active",document.body.classname=document.body.classname.replace(/pace-done/g,""),document.body.classname+=" pace-running",this.el.innerhtml='
\n
\n
\n
',null!=a.firstchild?a.insertbefore(this.el,a.firstchild):a.appendchild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getelement(),a.classname=a.classname.replace("pace-active",""),a.classname+=" pace-inactive",document.body.classname=document.body.classname.replace("pace-running",""),document.body.classname+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getelement().parentnode.removechild(this.getelement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b;return null==document.queryselector(c.target)?!1:(a=this.getelement(),a.children[0].style.width=""+this.progress+"%",(!this.lastrenderedprogress||this.lastrenderedprogress|0!==this.progress|0)&&(a.children[0].setattribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?b="99":(b=this.progress<10?"0":"",b+=0|this.progress),a.children[0].setattribute("data-progress",""+b)),this.lastrenderedprogress=this.progress)},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),o=window.xmlhttprequest,n=window.xdomainrequest,m=window.websocket,v=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],f.push(null==a[d]&&"function"!=typeof e?a[d]=e:void 0)}catch(g){c=g}return f},z=[],pace.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?w.call(arguments,1):[],z.unshift("ignore"),c=b.apply(null,a),z.shift(),c},pace.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?w.call(arguments,1):[],z.unshift("track"),c=b.apply(null,a),z.shift(),c},i=function(a){var b;if(null==a&&(a="get"),"track"===z[0])return"force";if(!z.length&&c.ajax){if("socket"===a&&c.ajax.trackwebsockets)return!0;if(b=a.touppercase(),z.call(c.ajax.trackmethods,b)>=0)return!0}return!1},j=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return i(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.xmlhttprequest=function(b){var c;return c=new o(b),a(c),c};try{v(window.xmlhttprequest,o)}catch(d){}if(null!=n){window.xdomainrequest=function(){var b;return b=new n,a(b),b};try{v(window.xdomainrequest,n)}catch(d){}}if(null!=m&&c.ajax.trackwebsockets){window.websocket=function(a,b){var d;return d=null!=b?new m(a,b):new m(a),i("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{v(window.websocket,m)}catch(d){}}}return y(b,a),b}(h),q=null,x=function(){return null==q&&(q=new j),q},h=function(a){var b,c,d,e;for(e=c.ajax.ignoreurls,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexof(b))return!0}else if(b.test(a))return!0;return!1},x().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,h(g)?void 0:pace.running||c.restartonrequestafter===!1&&"force"!==i(f)?void 0:(d=arguments,c=c.restartonrequestafter||0,"boolean"==typeof c&&(c=0),settimeout(function(){var b,c,g,h,i,j;if(b="socket"===f?e.readystate<2:0<(h=e.readystate)&&4>h){for(pace.restart(),i=pace.sources,j=[],c=0,g=i.length;g>c;c++){if(j=i[c],j instanceof a){j.watch.apply(j,d);break}j.push(void 0)}return j}},c))}),a=function(){function a(){var a=this;this.elements=[],x().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,h(e)?void 0:(c="socket"===d?new m(b):new n(b),this.elements.push(c))},a}(),n=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.progressevent)for(c=null,a.addeventlistener("progress",function(a){return h.progress=a.lengthcomputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2}),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addeventlistener(b,function(){return h.progress=100});else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readystate)||4===b?h.progress=100:3===a.readystate&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),m=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addeventlistener(b,function(){return f.progress=100})}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.queryselector(this.selector)?this.done():settimeout(function(){return a.check()},c.elements.checkinterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readystate])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readystate]&&(c.progress=c.states[document.readystate]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=b(),b=setinterval(function(){var g;return g=b()-c-50,c=b(),e.push(g),e.length>c.eventlag.samplecount&&e.shift(),a=p(e),++d>=c.eventlag.minsamples&&a=100&&(this.done=!0),b===this.last?this.sincelastupdate+=a:(this.sincelastupdate&&(this.rate=(b-this.last)/this.sincelastupdate),this.catchup=(b-this.progress)/c.catchuptime,this.sincelastupdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-math.pow(this.progress/100,c.easefactor),this.progress+=c*this.rate*a,this.progress=math.min(this.lastprogress+c.maxprogressperframe,this.progress),this.progress=math.max(0,this.progress),this.progress=math.min(100,this.progress),this.lastprogress=this.progress,this.progress},a}(),k=null,g=null,q=null,l=null,o=null,r=null,pace.running=!1,y=function(){return c.restartonpushstate?pace.restart():void 0},null!=window.history.pushstate&&(s=window.history.pushstate,window.history.pushstate=function(){return y(),s.apply(window.history,arguments)}),null!=window.history.replacestate&&(v=window.history.replacestate,window.history.replacestate=function(){return y(),v.apply(window.history,arguments)}),k={ajax:a,elements:d,document:c,eventlag:f},(a=function(){var a,c,d,e,f,g,h,i;for(pace.sources=k=[],g=["ajax","elements","document","eventlag"],c=0,e=g.length;e>c;c++)a=g[c],c[a]!==!1&&k.push(new k[a](c[a]));for(i=null!=(h=c.extrasources)?h:[],d=0,f=i.length;f>d;d++)j=i[d],k.push(new j(c));return pace.bar=q=new b,g=[],l=new l})(),pace.stop=function(){return pace.trigger("stop"),pace.running=!1,q.destroy(),r=!0,null!=o&&("function"==typeof s&&s(o),o=null),a()},pace.restart=function(){return pace.trigger("restart"),pace.stop(),pace.start()},pace.go=function(){var a;return pace.running=!0,q.render(),a=b(),r=!1,o=f(function(b,c){var d,e,f,g,h,i,j,k,m,n,o,p,s,t,u,v;for(k=100-q.progress,e=o=0,f=!0,i=p=0,t=k.length;t>p;i=++p)for(j=k[i],n=null!=g[i]?g[i]:g[i]=[],h=null!=(v=j.elements)?v:[j],j=s=0,u=h.length;u>s;j=++s)g=h[j],m=null!=n[j]?n[j]:n[j]=new l(g),f&=m.done,m.done||(e++,o+=m.tick(b));return d=o/e,q.update(l.tick(b,d)),q.done()||f||r?(q.update(100),pace.trigger("done"),settimeout(function(){return q.finish(),pace.running=!1,pace.trigger("hide")},math.max(c.ghosttime,math.max(c.mintime-(b()-a),0)))):c()})},pace.start=function(a){u(c,a),pace.running=!0;try{q.render()}catch(b){i=b}return document.queryselector(".pace")?(pace.trigger("start"),pace.go()):settimeout(pace.start,50)},"function"==typeof define&&define.amd?define(function(){return pace}):"object"==typeof exports?module.exports=pace:c.startonpageload&&pace.start()}).call(this);