blob: 24920e46b10566ef11d4507445dc251b0d8886fc [file] [log] [blame]
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).ProgressBar=t()}}(function(){return function t(e,n,i){function r(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var c=n[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return r(n||t)},c,c.exports,t,e,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(t,e,n){(function(){var t=this||Function("return this")(),i=function(){"use strict";function i(){}function r(t,e){var n;for(n in t)Object.hasOwnProperty.call(t,n)&&e(n)}function o(t,e){return r(e,function(n){t[n]=e[n]}),t}function s(t,e){r(e,function(n){void 0===t[n]&&(t[n]=e[n])})}function a(t,e,n,i,r,o,s){var a,h,c,p=o>t?0:(t-o)/r;for(a in e)e.hasOwnProperty(a)&&(h=s[a],c="function"==typeof h?h:f[h],e[a]=u(n[a],i[a],c,p));return e}function u(t,e,n,i){return t+(e-t)*n(i)}function h(t,e){var n=l.prototype.filter,i=t._filterArgs;r(n,function(r){void 0!==n[r][e]&&n[r][e].apply(t,i)})}function c(t,e,n,i,r,o,s,u,c,p,l){m=e+n+i,v=Math.min(l||y(),m),S=v>=m,x=i-(m-v),t.isPlaying()&&(S?(c(s,t._attachment,x),t.stop(!0)):(t._scheduleId=p(t._timeoutHandler,g),h(t,"beforeTween"),e+n>v?a(1,r,o,s,1,1,u):a(v,r,o,s,i,e+n,u),h(t,"afterTween"),c(r,t._attachment,x)))}function p(t,e){var n={},i=typeof e;return"string"===i||"function"===i?r(t,function(t){n[t]=e}):r(t,function(t){n[t]||(n[t]=e[t]||d)}),n}function l(t,e){this._currentState=t||{},this._configured=!1,this._scheduleFunction=_,void 0!==e&&this.setConfig(e)}var f,_,d="linear",g=1e3/60,w=Date.now?Date.now:function(){return+new Date},y="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:w;_="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout:setTimeout;var m,v,S,x;return l.prototype.tween=function(t){return this._isTweening?this:(void 0===t&&this._configured||this.setConfig(t),this._timestamp=y(),this._start(this.get(),this._attachment),this.resume())},l.prototype.setConfig=function(t){t=t||{},this._configured=!0,this._attachment=t.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=t.delay||0,this._start=t.start||i,this._step=t.step||i,this._finish=t.finish||i,this._duration=t.duration||500,this._currentState=o({},t.from)||this.get(),this._originalState=this.get(),this._targetState=o({},t.to)||this.get();var e=this;this._timeoutHandler=function(){c(e,e._timestamp,e._delay,e._duration,e._currentState,e._originalState,e._targetState,e._easing,e._step,e._scheduleFunction)};var n=this._currentState,r=this._targetState;return s(r,n),this._easing=p(n,t.easing||d),this._filterArgs=[n,this._originalState,r,this._easing],h(this,"tweenCreated"),this},l.prototype.get=function(){return o({},this._currentState)},l.prototype.set=function(t){this._currentState=t},l.prototype.pause=function(){return this._pausedAtTime=y(),this._isPaused=!0,this},l.prototype.resume=function(){return this._isPaused&&(this._timestamp+=y()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},l.prototype.seek=function(t){t=Math.max(t,0);var e=y();return this._timestamp+t===0?this:(this._timestamp=e-t,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,c(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,e),this.pause()),this)},l.prototype.stop=function(e){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=i,(t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame||t.mozCancelRequestAnimationFrame||t.clearTimeout)(this._scheduleId),e&&(h(this,"beforeTween"),a(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),h(this,"afterTween"),h(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},l.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},l.prototype.setScheduleFunction=function(t){this._scheduleFunction=t},l.prototype.dispose=function(){var t;for(t in this)this.hasOwnProperty(t)&&delete this[t]},l.prototype.filter={},l.prototype.formula={linear:function(t){return t}},f=l.prototype.formula,o(l,{now:y,each:r,tweenProps:a,tweenProp:u,applyFilter:h,shallowCopy:o,defaults:s,composeEasingObject:p}),"function"==typeof SHIFTY_DEBUG_NOW&&(t.timeoutHandler=c),"object"==typeof n?e.exports=l:void 0===t.Tweenable&&(t.Tweenable=l),l}();i.shallowCopy(i.prototype.formula,{easeInQuad:function(t){return Math.pow(t,2)},easeOutQuad:function(t){return-(Math.pow(t-1,2)-1)},easeInOutQuad:function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},easeInCubic:function(t){return Math.pow(t,3)},easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},easeInQuart:function(t){return Math.pow(t,4)},easeOutQuart:function(t){return-(Math.pow(t-1,4)-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeInQuint:function(t){return Math.pow(t,5)},easeOutQuint:function(t){return Math.pow(t-1,5)+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-Math.pow(t-1,2))},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeOutBounce:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},elastic:function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},swingFromTo:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},swingFrom:function(t){var e=1.70158;return t*t*((e+1)*t-e)},swingTo:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},bounce:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bouncePast:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?2-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},easeFromTo:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeFrom:function(t){return Math.pow(t,4)},easeTo:function(t){return Math.pow(t,.25)}}),function(){function t(t,e,n,i,r,o){function s(t){return((c*t+p)*t+l)*t}function a(t){return(3*c*t+2*p)*t+l}function u(t,e){return function(t){return((f*t+_)*t+d)*t}(function(t,e){var n,i,r,o,u,c;for(r=t,c=0;8>c;c++){if(o=s(r)-t,h(o)<e)return r;if(u=a(r),h(u)<1e-6)break;r-=o/u}if(n=0,i=1,r=t,n>r)return n;if(r>i)return i;for(;i>n;){if(o=s(r),h(o-t)<e)return r;t>o?n=r:i=r,r=.5*(i-n)+n}return r}(t,e))}function h(t){return t>=0?t:0-t}var c=0,p=0,l=0,f=0,_=0,d=0;return l=3*e,p=3*(i-e)-l,c=1-l-p,d=3*n,_=3*(r-n)-d,f=1-d-_,u(t,function(t){return 1/(200*t)}(o))}function e(e,n,i,r){return function(o){return t(o,e,n,i,r,1)}}i.setBezierFunction=function(t,n,r,o,s){var a=e(n,r,o,s);return a.displayName=t,a.x1=n,a.y1=r,a.x2=o,a.y2=s,i.prototype.formula[t]=a},i.unsetBezierFunction=function(t){delete i.prototype.formula[t]}}(),function(){var t=new i;t._filterArgs=[],i.interpolate=function(e,n,r,o,s){var a=i.shallowCopy({},e),u=s||0,h=i.composeEasingObject(e,o||"linear");t.set({});var c=t._filterArgs;c.length=0,c[0]=a,c[1]=e,c[2]=n,c[3]=h,i.applyFilter(t,"tweenCreated"),i.applyFilter(t,"beforeTween");var p=function(t,e,n,r,o,s){return i.tweenProps(r,e,t,n,1,s,o)}(e,a,n,r,h,u);return i.applyFilter(t,"afterTween"),p}}(),function(t){function e(e){t.each(e,function(t){var i=e[t];"string"==typeof i&&i.match(w)&&(e[t]=function(t){return r(w,t,n)}(i))})}function n(t){var e=function(t){return 3===(t=t.replace(/#/,"")).length&&(t=t.split(""),t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),m[0]=i(t.substr(0,2)),m[1]=i(t.substr(2,2)),m[2]=i(t.substr(4,2)),m}(t);return"rgb("+e[0]+","+e[1]+","+e[2]+")"}function i(t){return parseInt(t,16)}function r(t,e,n){var i=e.match(t),r=e.replace(t,y);if(i)for(var o,s=i.length,a=0;s>a;a++)o=i.shift(),r=r.replace(y,n(o));return r}function o(t){for(var e=t.match(_),n=e.length,i=t.match(g)[0],r=0;n>r;r++)i+=parseInt(e[r],10)+",";return i=i.slice(0,-1)+")"}function s(e){var n={};return t.each(e,function(t){var i=e[t];if("string"==typeof i){var r=h(i);n[t]={formatString:function(t){var e=t.match(f);return e?(1===e.length||t[0].match(l))&&e.unshift(""):e=["",""],e.join(y)}(i),chunkNames:function(t,e){var n,i=[],r=t.length;for(n=0;r>n;n++)i.push("_"+e+"_"+n);return i}(r,t)}}}),n}function a(e,n){t.each(n,function(t){for(var i=h(e[t]),r=i.length,o=0;r>o;o++)e[n[t].chunkNames[o]]=+i[o];delete e[t]})}function u(e,n){t.each(n,function(t){var i=e[t],s=function(t,e){v.length=0;for(var n=e.length,i=0;n>i;i++)v.push(t[e[i]]);return v}(function(t,e){for(var n,i={},r=e.length,o=0;r>o;o++)n=e[o],i[n]=t[n],delete t[n];return i}(e,n[t].chunkNames),n[t].chunkNames);i=function(t,e){for(var n=t,i=e.length,r=0;i>r;r++)n=n.replace(y,+e[r].toFixed(4));return n}(n[t].formatString,s),e[t]=function(t){return r(d,t,o)}(i)})}function h(t){return t.match(_)}function c(e,n){t.each(n,function(t){var i,r=n[t].chunkNames,o=r.length,s=e[t];if("string"==typeof s){var a=s.split(" "),u=a[a.length-1];for(i=0;o>i;i++)e[r[i]]=a[i]||u}else for(i=0;o>i;i++)e[r[i]]=s;delete e[t]})}function p(e,n){t.each(n,function(t){var i=n[t].chunkNames,r=i.length,o=e[i[0]];if("string"===typeof o){for(var s="",a=0;r>a;a++)s+=" "+e[i[a]],delete e[i[a]];e[t]=s.substr(1)}else e[t]=o})}var l=/(\d|\-|\.)/,f=/([^\-0-9\.]+)/g,_=/[0-9.\-]+/g,d=new RegExp("rgb\\("+_.source+/,\s*/.source+_.source+/,\s*/.source+_.source+"\\)","g"),g=/^.*\(/,w=/#([0-9]|[a-f]){3,6}/gi,y="VAL",m=[],v=[];t.prototype.filter.token={tweenCreated:function(t,n,i,r){e(t),e(n),e(i),this._tokenData=s(t)},beforeTween:function(t,e,n,i){c(i,this._tokenData),a(t,this._tokenData),a(e,this._tokenData),a(n,this._tokenData)},afterTween:function(t,e,n,i){u(t,this._tokenData),u(e,this._tokenData),u(n,this._tokenData),p(i,this._tokenData)}}}(i)}).call(null)},{}],2:[function(t,e,n){var i=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,i.apply(this,arguments)};(o.prototype=new i).constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var n=50-e/2;return r.render(this._pathTemplate,{radius:n,"2radius":2*n})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":7,"./utils":8}],3:[function(t,e,n){var i=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",i.apply(this,arguments)};(o.prototype=new i).constructor=o,o.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":7,"./utils":8}],4:[function(t,e,n){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./utils":8}],5:[function(t,e,n){var i=t("shifty"),r=t("./utils"),o={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},s=function t(e,n){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");n=r.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},n);var i;i=r.isString(e)?document.querySelector(e):e,this.path=i,this._opts=n,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};s.prototype.value=function(){var t=1-this._getComputedDashOffset()/this.path.getTotalLength();return parseFloat(t.toFixed(6),10)},s.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var n=this._easing(this._opts.easing);e(this._calculateTo(t,n),this._opts.shape||this,this._opts.attachment)}},s.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},s.prototype.animate=function(t,e,n){e=e||{},r.isFunction(e)&&(n=e,e={});var o=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),u=this._resolveFromAndTo(t,a,o);this.stop(),this.path.getBoundingClientRect();var h=this._getComputedDashOffset(),c=this._progressToOffset(t),p=this;this._tweenable=new i,this._tweenable.tween({from:r.extend({offset:h},u.from),to:r.extend({offset:c},u.to),duration:e.duration,easing:a,step:function(t){p.path.style.strokeDashoffset=t.offset;var n=e.shape||p;e.step(t,n,e.attachment)},finish:function(t){r.isFunction(n)&&n()}})},s.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},s.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},s.prototype._resolveFromAndTo=function(t,e,n){return n.from&&n.to?{from:n.from,to:n.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},s.prototype._calculateFrom=function(t){return i.interpolate(this._opts.from,this._opts.to,this.value(),t)},s.prototype._calculateTo=function(t,e){return i.interpolate(this._opts.from,this._opts.to,t,e)},s.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},s.prototype._easing=function(t){return o.hasOwnProperty(t)?o[t]:t},e.exports=s},{"./utils":8,shifty:1}],6:[function(t,e,n){var i=t("./shape"),r=t("./circle"),o=t("./utils"),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,i.apply(this,arguments)};(s.prototype=new i).constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,n){t.text.style&&(n.style.top="auto",n.style.bottom="0",t.text.alignToBottom?o.setStyle(n,"transform","translate(-50%, 0)"):o.setStyle(n,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,e.exports=s},{"./circle":2,"./shape":7,"./utils":8}],7:[function(t,e,n){var i=t("./path"),r=t("./utils"),o="Object is destroyed",s=function t(e,n){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},n,!0),r.isObject(n)&&void 0!==n.svgStyle&&(this._opts.svgStyle=n.svgStyle),r.isObject(n)&&r.isObject(n.text)&&void 0!==n.text.style&&(this._opts.text.style=n.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new i(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,n){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,n)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var n=null;(t.trailColor||t.trailWidth)&&(n=this._createTrail(t),e.appendChild(n));var i=this._createPath(t);return e.appendChild(i),{svg:e,path:i,trail:n}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),n=r.extend({},t);return n.trailColor||(n.trailColor="#eee"),n.trailWidth||(n.trailWidth=n.strokeWidth),n.color=n.trailColor,n.strokeWidth=n.trailWidth,n.fill=null,this._createPathElement(e,n)},s.prototype._createPathElement=function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),n.setAttribute("stroke",e.color),n.setAttribute("stroke-width",e.strokeWidth),e.fill?n.setAttribute("fill",e.fill):n.setAttribute("fill-opacity","0"),n},s.prototype._createTextContainer=function(t,e){var n=document.createElement("div");n.className=t.text.className;var i=t.text.style;return i&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(n,i),i.color||(n.style.color=t.color)),this._initializeTextContainer(t,e,n),n},s.prototype._initializeTextContainer=function(t,e,n){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),n=parseFloat(e.getPropertyValue("width"),10),i=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,n/i)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",n/i),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},e.exports=s},{"./path":5,"./utils":8}],8:[function(t,e,n){function i(t,e,n){t=t||{},e=e||{},n=n||!1;for(var r in e)if(e.hasOwnProperty(r)){var o=t[r],a=e[r];n&&s(o)&&s(a)?t[r]=i(o,a,n):t[r]=a}return t}function r(t,e,n){for(var i=t.style,r=0;r<u.length;++r){i[u[r]+o(e)]=n}i[e]=n}function o(t){return t.charAt(0).toUpperCase()+t.slice(1)}function s(t){if(function(t){return"[object Array]"===Object.prototype.toString.call(t)}(t))return!1;return"object"===typeof t&&!!t}function a(t,e){for(var n in t)if(t.hasOwnProperty(n)){e(t[n],n)}}var u="Webkit Moz O ms".split(" "),h=.001;e.exports={extend:i,render:function(t,e){var n=t;for(var i in e)if(e.hasOwnProperty(i)){var r=e[i],o="\\{"+i+"\\}",s=new RegExp(o,"g");n=n.replace(s,r)}return n},setStyle:r,setStyles:function(t,e){a(e,function(e,n){null!==e&&void 0!==e&&(s(e)&&!0===e.prefix?r(t,n,e.value):t.style[n]=e)})},capitalize:o,isString:function(t){return"string"==typeof t||t instanceof String},isFunction:function(t){return"function"==typeof t},isObject:s,forEachObject:a,floatEquals:function(t,e){return Math.abs(t-e)<h},removeChildren:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}}},{}]},{},[4])(4)});