(function(){var p,u,w,b,k,d,g,nt,tt,it,rt,f,n,ut,ft,e,et,t,o,ot,i,s,h,c,r,l,a,st,v,y,ht,ct,lt=[].slice;et='<span class="odometer-value"><\/span>';ut='<span class="odometer-ribbon"><span class="odometer-ribbon-inner">'+et+"<\/span><\/span>";b='<span class="odometer-digit"><span class="odometer-digit-spacer">8<\/span><span class="odometer-digit-inner">'+ut+"<\/span><\/span>";g='<span class="odometer-formatting-mark"><\/span>';w="(,ddd).dd";nt=/^\(?([^)]*)\)?(?:(.)(d+))?$/;tt=30;d=2e3;p=20;it=2;k=.5;rt=1e3/tt;u=1e3/p;ft="transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd";r=document.createElement("div").style;e=null!=r.transition||null!=r.webkitTransition||null!=r.mozTransition||null!=r.oTransition;h=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;f=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;o=function(n){var t;return t=document.createElement("div"),t.innerHTML=n,t.children[0]};s=function(n,t){return n.className=n.className.replace(new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi")," ")};t=function(n,t){return s(n,t),n.className+=" "+t};l=function(n,t){var i;if(null!=document.createEvent)return(i=document.createEvent("HTMLEvents"),i.initEvent(t,!0,!0),n.dispatchEvent(i))};i=function(){var t,n;return null!=(t=null!=(n=window.performance)&&"function"==typeof n.now?n.now():void 0)?t:+new Date};c=function(n,t){return null==t&&(t=0),t?(n*=Math.pow(10,t),n+=.5,n=Math.floor(n),n/=Math.pow(10,t)):Math.round(n)};a=function(n){return 0>n?Math.ceil(n):Math.floor(n)};ot=function(n){return n-c(n)};v=!1;(st=function(){var r,n,u,t,i;if(!v&&null!=window.jQuery){for(v=!0,t=["html","text"],i=[],n=0,u=t.length;u>n;n++)r=t[n],i.push(function(n){var t;return t=window.jQuery.fn[n],window.jQuery.fn[n]=function(n){var i;return null==n||null==(null!=(i=this[0])?i.odometer:void 0)?t.apply(this,arguments):this[0].odometer.update(n)}}(r));return i}})();setTimeout(st,0);n=function(){function n(t){var a,r,f,s,h,u,c,e,l,o,i=this;if(this.options=t,this.el=this.options.el,null!=this.el.odometer)return this.el.odometer;this.el.odometer=this;e=n.options;for(r in e)s=e[r],null==this.options[r]&&(this.options[r]=s);null==(h=this.options).duration&&(h.duration=d);this.MAX_VALUES=this.options.duration/rt/it|0;this.resetFormat();this.value=this.cleanValue(null!=(l=this.options.value)?l:"");this.renderInside();this.render();try{for(o=["innerHTML","innerText","textContent"],u=0,c=o.length;c>u;u++)f=o[u],null!=this.el[f]&&!function(n){return Object.defineProperty(i.el,n,{get:function(){var t;return"innerHTML"===n?i.inside.outerHTML:null!=(t=i.inside.innerText)?t:i.inside.textContent},set:function(n){return i.update(n)}})}(f)}catch(v){a=v;this.watchForMutations()}}return n.prototype.renderInside=function(){return this.inside=document.createElement("div"),this.inside.className="odometer-inside",this.el.innerHTML="",this.el.appendChild(this.inside)},n.prototype.watchForMutations=function(){var t,n=this;if(null!=f)try{return null==this.observer&&(this.observer=new f(function(){var t;return t=n.el.innerText,n.renderInside(),n.render(n.value),n.update(t)})),this.watchMutations=!0,this.startWatchingMutations()}catch(i){t=i}},n.prototype.startWatchingMutations=function(){if(this.watchMutations)return this.observer.observe(this.el,{childList:!0})},n.prototype.stopWatchingMutations=function(){var n;if(null!=(n=this.observer))return n.disconnect()},n.prototype.cleanValue=function(n){var t;return"string"==typeof n&&(n=n.replace(null!=(t=this.format.radix)?t:".","<radix>"),n=n.replace(/[.,]/g,""),n=n.replace("<radix>","."),n=parseFloat(n,10)||0),c(n,this.format.precision)},n.prototype.bindTransitionEnd=function(){var u,n,t,f,i,r,e=this;if(!this.transitionEndBound){for(this.transitionEndBound=!0,n=!1,i=ft.split(" "),r=[],t=0,f=i.length;f>t;t++)u=i[t],r.push(this.el.addEventListener(u,function(){return n?!0:(n=!0,setTimeout(function(){return e.render(),n=!1,l(e.el,"odometerdone")},0),!0)},!1));return r}},n.prototype.resetFormat=function(){var n,i,r,u,f,e,o,t;if(n=null!=(o=this.options.format)?o:w,n||(n="d"),r=nt.exec(n),!r)throw new Error("Odometer: Unparsable digit format");return t=r.slice(1,4),e=t[0],f=t[1],i=t[2],u=(null!=i?i.length:void 0)||0,this.format={repeating:e,radix:f,precision:u}},n.prototype.render=function(n){var f,i,o,t,r,u,s;for(null==n&&(n=this.value),this.stopWatchingMutations(),this.resetFormat(),this.inside.innerHTML="",r=this.options.theme,f=this.el.className.split(" "),t=[],u=0,s=f.length;s>u;u++)i=f[u],i.length&&((o=/^odometer-theme-(.+)$/.exec(i))?r=o[1]:/^odometer(-|$)/.test(i)||t.push(i));return t.push("odometer"),e||t.push("odometer-no-transitions"),r?t.push("odometer-theme-"+r):t.push("odometer-auto-theme"),this.el.className=t.join(" "),this.ribbons={},this.formatDigits(n),this.startWatchingMutations()},n.prototype.formatDigits=function(n){var t,i,s,f,r,u,h,c,e,o;if(this.digits=[],this.options.formatFunction)for(s=this.options.formatFunction(n),e=s.split("").reverse(),r=0,h=e.length;h>r;r++)i=e[r],i.match(/0-9/)?(t=this.renderDigit(),t.querySelector(".odometer-value").innerHTML=i,this.digits.push(t),this.insertDigit(t)):this.addSpacer(i);else for(f=!this.format.precision||!ot(n)||!1,o=n.toString().split("").reverse(),u=0,c=o.length;c>u;u++)t=o[u],"."===t&&(f=!0),this.addDigit(t,f)},n.prototype.update=function(n){var i,r=this;return n=this.cleanValue(n),(i=n-this.value)?(s(this.el,"odometer-animating-up odometer-animating-down odometer-animating"),i>0?t(this.el,"odometer-animating-up"):t(this.el,"odometer-animating-down"),this.stopWatchingMutations(),this.animate(n),this.startWatchingMutations(),setTimeout(function(){return r.el.offsetHeight,t(r.el,"odometer-animating")},0),this.value=n):void 0},n.prototype.renderDigit=function(){return o(b)},n.prototype.insertDigit=function(n,t){return null!=t?this.inside.insertBefore(n,t):this.inside.children.length?this.inside.insertBefore(n,this.inside.children[0]):this.inside.appendChild(n)},n.prototype.addSpacer=function(n,i,r){var u;return u=o(g),u.innerHTML=n,r&&t(u,r),this.insertDigit(u,i)},n.prototype.addDigit=function(n,t){var r,i,u,f;if(null==t&&(t=!0),"-"===n)return this.addSpacer(n,null,"odometer-negation-mark");if("."===n)return this.addSpacer(null!=(f=this.format.radix)?f:".",null,"odometer-radix-mark");if(t)for(u=!1;;){if(!this.format.repeating.length){if(u)throw new Error("Bad odometer format without digits");this.resetFormat();u=!0}if(r=this.format.repeating[this.format.repeating.length-1],this.format.repeating=this.format.repeating.substring(0,this.format.repeating.length-1),"d"===r)break;this.addSpacer(r)}return i=this.renderDigit(),i.querySelector(".odometer-value").innerHTML=n,this.digits.push(i),this.insertDigit(i)},n.prototype.animate=function(n){return e&&"count"!==this.options.animation?this.animateSlide(n):this.animateCount(n)},n.prototype.animateCount=function(n){var r,o,f,s,e,t=this;if(o=+n-this.value)return s=f=i(),r=this.value,(e=function(){var c,a,v;return i()-s>t.options.duration?(t.value=n,t.render(),void l(t.el,"odometerdone")):(c=i()-f,c>u&&(f=i(),v=c/t.options.duration,a=o*v,r+=a,t.render(Math.round(r))),null!=h?h(e):setTimeout(e,u))})()},n.prototype.getDigitCount=function(){var t,r,u,n,i,f;for(n=1<=arguments.length?lt.call(arguments,0):[],t=i=0,f=n.length;f>i;t=++i)u=n[t],n[t]=Math.abs(u);return r=Math.max.apply(Math,n),Math.ceil(Math.log(r+1)/Math.log(10))},n.prototype.getFractionalDigitCount=function(){var t,u,i,f,n,r,e;for(n=1<=arguments.length?lt.call(arguments,0):[],u=/^\-?\d*\.(\d*?)0*$/,t=r=0,e=n.length;e>r;t=++r)f=n[t],n[t]=f.toString(),i=u.exec(n[t]),n[t]=null==i?0:i[1].length;return Math.max.apply(Math,n)},n.prototype.resetDigits=function(){return this.digits=[],this.ribbons=[],this.inside.innerHTML="",this.resetFormat()},n.prototype.animateSlide=function(n){var b,c,ut,f,d,l,u,e,p,r,i,ft,v,w,s,h,o,et,y,g,nt,ot,st,ht,tt,it,rt;if(h=this.value,e=this.getFractionalDigitCount(h,n),e&&(n*=Math.pow(10,e),h*=Math.pow(10,e)),ut=n-h){for(this.bindTransitionEnd(),f=this.getDigitCount(h,n),d=[],b=0,i=y=0;f>=0?f>y:y>f;i=f>=0?++y:--y){if(o=a(h/Math.pow(10,f-i-1)),u=a(n/Math.pow(10,f-i-1)),l=u-o,Math.abs(l)>this.MAX_VALUES){for(r=[],ft=l/(this.MAX_VALUES+this.MAX_VALUES*b*k),c=o;l>0&&u>c||0>l&&c>u;)r.push(Math.round(c)),c+=ft;r[r.length-1]!==u&&r.push(u);b++}else r=function(){rt=[];for(var n=o;u>=o?u>=n:n>=u;u>=o?n++:n--)rt.push(n);return rt}.apply(this);for(i=g=0,ot=r.length;ot>g;i=++g)p=r[i],r[i]=Math.abs(p%10);d.push(r)}for(this.resetDigits(),it=d.reverse(),i=nt=0,st=it.length;st>nt;i=++nt)for(r=it[i],this.digits[i]||this.addDigit(" ",i>=e),null==(et=this.ribbons)[i]&&(et[i]=this.digits[i].querySelector(".odometer-ribbon-inner")),this.ribbons[i].innerHTML="",0>ut&&(r=r.reverse()),v=tt=0,ht=r.length;ht>tt;v=++tt)p=r[v],s=document.createElement("div"),s.className="odometer-value",s.innerHTML=p,this.ribbons[i].appendChild(s),v===r.length-1&&t(s,"odometer-last-value"),0===v&&t(s,"odometer-first-value");return 0>o&&this.addDigit("-"),w=this.inside.querySelector(".odometer-radix-mark"),null!=w&&w.parent.removeChild(w),e?this.addSpacer(this.format.radix,this.digits[e-1],"odometer-radix-mark"):void 0}},n}();n.options=null!=(ht=window.odometerOptions)?ht:{};setTimeout(function(){var t,f,i,r,u;if(window.odometerOptions){r=window.odometerOptions;u=[];for(t in r)f=r[t],u.push(null!=(i=n.options)[t]?(i=n.options)[t]:i[t]=f);return u}},0);n.init=function(){var t,r,i,f,e,u;if(null!=document.querySelectorAll){for(r=document.querySelectorAll(n.options.selector||".odometer"),u=[],i=0,f=r.length;f>i;i++)t=r[i],u.push(t.odometer=new n({el:t,value:null!=(e=t.innerText)?e:t.textContent}));return u}};null!=(null!=(ct=document.documentElement)?ct.doScroll:void 0)&&null!=document.createEventObject?(y=document.onreadystatechange,document.onreadystatechange=function(){return"complete"===document.readyState&&n.options.auto!==!1&&n.init(),null!=y?y.apply(this,arguments):void 0}):document.addEventListener("DOMContentLoaded",function(){if(n.options.auto!==!1)return n.init()},!1);"function"==typeof define&&define.amd?define([],function(){return n}):"undefined"!=typeof exports&&null!==exports?module.exports=n:window.Odometer=n}).call(this)