/*! pace 1.0.2 */ (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,x=[].slice,y={}.hasownproperty,z=function(a,b){function c(){this.constructor=a}for(var d in b)y.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},$=[].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(u={catchuptime:100,initialrate:.03,mintime:250,ghosttime:100,maxprogressperframe:20,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:[]}},c=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?a:+new date},e=window.requestanimationframe||window.mozrequestanimationframe||window.webkitrequestanimationframe||window.msrequestanimationframe,t=window.cancelanimationframe||window.mozcancelanimationframe,null==e&&(e=function(a){return settimeout(a,50)},t=function(a){return cleartimeout(a)}),g=function(a){var b,c;return b=c(),(c=function(){var d;return d=c()-b,d>=33?(b=c(),a(d,function(){return e(c)})):settimeout(c,33-d)})()},f=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?x.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},v=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?x.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)y.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?v(b[a],e):b[a]=e);return b},q=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},x=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=[];cq;q++)k=u[q],d[k]===!0&&(d[k]=u[k]);i=function(a){function b(){return v=b.__super__.constructor.apply(this,arguments)}return z(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(d.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,c,d,e,f,g;if(null==document.queryselector(d.target))return!1;for(a=this.getelement(),d="translate3d("+this.progress+"%, 0, 0)",g=["webkittransform","mstransform","transform"],e=0,f=g.length;f>e;e++)b=g[e],a.children[0].style[b]=d;return(!this.lastrenderedprogress||this.lastrenderedprogress|0!==this.progress|0)&&(a.children[0].setattribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?c="99":(c=this.progress<10?"0":"",c+=0|this.progress),a.children[0].setattribute("data-progress",""+c)),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}(),p=window.xmlhttprequest,o=window.xdomainrequest,n=window.websocket,w=function(a,b){var c,d,e;e=[];for(d in b.prototype)try{e.push(null==a[d]&&"function"!=typeof b[d]?"function"==typeof object.defineproperty?object.defineproperty(a,d,{get:function(){return b.prototype[d]},configurable:!0,enumerable:!0}):a[d]=b.prototype[d]:void 0)}catch(f){c=f}return e},a=[],j.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?x.call(arguments,1):[],a.unshift("ignore"),c=b.apply(null,a),a.shift(),c},j.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?x.call(arguments,1):[],a.unshift("track"),c=b.apply(null,a),a.shift(),c},j=function(a){var b;if(null==a&&(a="get"),"track"===a[0])return"force";if(!a.length&&d.ajax){if("socket"===a&&d.ajax.trackwebsockets)return!0;if(b=a.touppercase(),$.call(d.ajax.trackmethods,b)>=0)return!0}return!1},k=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 j(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.xmlhttprequest=function(b){var c;return c=new p(b),a(c),c};try{w(window.xmlhttprequest,p)}catch(d){}if(null!=o){window.xdomainrequest=function(){var b;return b=new o,a(b),b};try{w(window.xdomainrequest,o)}catch(d){}}if(null!=n&&d.ajax.trackwebsockets){window.websocket=function(a,b){var d;return d=null!=b?new n(a,b):new n(a),j("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d};try{w(window.websocket,n)}catch(d){}}}return z(b,a),b}(h),r=null,y=function(){return null==r&&(r=new k),r},i=function(a){var b,c,d,e;for(e=d.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},y().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,i(g)?void 0:j.running||d.restartonrequestafter===!1&&"force"!==j(f)?void 0:(d=arguments,c=d.restartonrequestafter||0,"boolean"==typeof c&&(c=0),settimeout(function(){var b,c,g,h,i,k;if(b="socket"===f?e.readystate<2:0<(h=e.readystate)&&4>h){for(j.restart(),i=j.sources,k=[],c=0,g=i.length;g>c;c++){if(k=i[c],k instanceof a){k.watch.apply(k,d);break}k.push(void 0)}return k}},c))}),a=function(){function a(){var a=this;this.elements=[],y().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,i(e)?void 0:(c="socket"===d?new n(b):new o(b),this.elements.push(c))},a}(),o=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},!1),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addeventlistener(b,function(){return h.progress=100},!1);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}(),n=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},!1)}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()},d.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=c(),b=setinterval(function(){var g;return g=c()-c-50,c=c(),e.push(g),e.length>d.eventlag.samplecount&&e.shift(),a=q(e),++d>=d.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)/d.catchuptime,this.sincelastupdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-math.pow(this.progress/100,d.easefactor),this.progress+=c*this.rate*a,this.progress=math.min(this.lastprogress+d.maxprogressperframe,this.progress),this.progress=math.max(0,this.progress),this.progress=math.min(100,this.progress),this.lastprogress=this.progress,this.progress},a}(),l=null,h=null,r=null,m=null,p=null,s=null,j.running=!1,z=function(){return d.restartonpushstate?j.restart():void 0},null!=window.history.pushstate&&(t=window.history.pushstate,window.history.pushstate=function(){return z(),t.apply(window.history,arguments)}),null!=window.history.replacestate&&(w=window.history.replacestate,window.history.replacestate=function(){return z(),w.apply(window.history,arguments)}),l={ajax:a,elements:d,document:c,eventlag:f},(b=function(){var a,c,d,e,f,g,h,i;for(j.sources=l=[],g=["ajax","elements","document","eventlag"],c=0,e=g.length;e>c;c++)a=g[c],d[a]!==!1&&l.push(new l[a](d[a]));for(i=null!=(h=d.extrasources)?h:[],d=0,f=i.length;f>d;d++)k=i[d],l.push(new k(d));return j.bar=r=new b,h=[],m=new m})(),j.stop=function(){return j.trigger("stop"),j.running=!1,r.destroy(),s=!0,null!=p&&("function"==typeof t&&t(p),p=null),b()},j.restart=function(){return j.trigger("restart"),j.stop(),j.start()},j.go=function(){var a;return j.running=!0,r.render(),a=c(),s=!1,p=g(function(b,c){var d,e,f,g,h,i,k,l,n,o,p,q,t,u,v,w;for(l=100-r.progress,e=p=0,f=!0,i=q=0,u=l.length;u>q;i=++q)for(k=l[i],o=null!=h[i]?h[i]:h[i]=[],h=null!=(w=k.elements)?w:[k],k=t=0,v=h.length;v>t;k=++t)g=h[k],n=null!=o[k]?o[k]:o[k]=new m(g),f&=n.done,n.done||(e++,p+=n.tick(b));return d=p/e,r.update(m.tick(b,d)),r.done()||f||s?(r.update(100),j.trigger("done"),settimeout(function(){return r.finish(),j.running=!1,j.trigger("hide")},math.max(d.ghosttime,math.max(d.mintime-(c()-a),0)))):c()})},j.start=function(a){v(d,a),j.running=!0;try{r.render()}catch(b){i=b}return document.queryselector(".pace")?(j.trigger("start"),j.go()):settimeout(j.start,50)},"function"==typeof define&&define.amd?define(["pace"],function(){return j}):"object"==typeof exports?module.exports=j:d.startonpageload&&j.start()}).call(this);