Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-progressbar

Package Overview
Dependencies
Maintainers
3
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-progressbar - npm Package Compare versions

Comparing version 20.1.55 to 20.1.57

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

### ProgressBar
#### Bug Fixes
- `#I378263` - Progress bar is now working properly on resize.
## 20.1.52 (2022-05-04)

@@ -7,0 +13,0 @@

4

dist/ej2-progressbar.umd.min.js
/*!
* filename: ej2-progressbar.umd.min.js
* version : 20.1.55
* version : 20.1.57
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new b(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new b(255,255,255)}function a(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new b(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function s(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,a){var l=s(e,t,r,n),c=s(e,t,r,i),p="0",u=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return a?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function u(e,t,r,n,i){var o=t+(i?-r:r);return(i?r:-r)*Math.cos(e/n*(Math.PI/2))+o}function h(e){return document.getElementById(e)}function d(e){if(!e)return null;var r="string"==typeof e?h(e):e;r&&t.remove(r)}var g=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(){return function(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}}(),y=function(){return function(e,t){this.height=e,this.width=t}}(),f=function(){return function(e,t){this.x=e,this.y=t}}(),v=function(e){function t(t,r,n,i,o,a,s,l,c,p){var u=e.call(this,t,r,n,i,o,p)||this;return u.y=a.y,u.x=a.x,u.height=a.height,u.width=a.width,u.rx=s||0,u.ry=l||0,u.transform=c||"",u.stroke=0!==n&&""!==u.stroke?i:"transparent",u}return g(t,e),t}(r.PathOption),b=function(){return function(e,t,r){this.r=e,this.g=t,this.b=r}}(),P=function(){return function(e,t,r,n,i,o,a,s,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=a,this.x=s,this.y=l,this.width=c||0,this.height=p||0}}(),R="annotationRender",S=function(){return function(e,t){this.x=e,this.y=t}}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),k=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},A=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(10)],r.prototype,"top",void 0),k([t.Property(10)],r.prototype,"bottom",void 0),k([t.Property(10)],r.prototype,"left",void 0),k([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("Normal")],r.prototype,"fontStyle",void 0),k([t.Property("16px")],r.prototype,"size",void 0),k([t.Property("Normal")],r.prototype,"fontWeight",void 0),k([t.Property("")],r.prototype,"color",void 0),k([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),k([t.Property(1)],r.prototype,"opacity",void 0),k([t.Property("Far")],r.prototype,"textAlignment",void 0),k([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(!1)],r.prototype,"enable",void 0),k([t.Property(2e3)],r.prototype,"duration",void 0),k([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),F=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(null)],r.prototype,"content",void 0),k([t.Property(0)],r.prototype,"annotationAngle",void 0),k([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("")],r.prototype,"color",void 0),k([t.Property(null)],r.prototype,"start",void 0),k([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),x=359.99,L="progressCompleted",O="http://www.w3.org/2000/svg",_=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){this.annotation=e;return t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(d(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:R,content:t,location:e};if(this.control.trigger(R,n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var a=Math.round(this.control.progressSize.width/2.25),s=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+a,r=i*Math.sin(t)+s}return{top:r,left:n}},e}(),z=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),h=l.getAttribute("x"),d=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(h,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(h,10)-y;l.style.visibility="hidden",s.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,parseInt(h,10),parseInt(p,10),!0),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("x",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("width",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",h.toString()),a.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&a.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),h=0,d=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;s.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(h=u(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString())):(h=u(e.timeStamp,d,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",d.toString()),i.destroyIndeterminate||a.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),a=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,a,s,c,p,h,d,g){var m=this,y=new t.Animation({}),f=a,v=s.startAngle,b=n+c/2,P=0,R=0,S=s.isActive?3e3:s.animation.duration;v+="Round"===s.cornerRadius&&o!==x&&0!==o?s.enableRtl?.45*c:-.45*c:0,o+="Round"===s.cornerRadius&&o!==x&&0!==o?.45*c:0,i+="Round"===s.cornerRadius&&o!==x&&0!==o?s.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(h)?v:h,k=t.isNullOrUndefined(h)?o:o-d;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){s.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),s.isActive?(P=m.activeAnimate(t.timeStamp/t.duration,C,k,s.enableRtl),R=u(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",R.toString()),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))):(P=u(t.timeStamp,C,k,t.duration,s.enableRtl),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))))},end:function(){s.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,s.enableRtl,!0)),s.isActive&&m.doCircularAnimation(e,r,n,i,o,a,s,c,p,h,d,g),s.trigger("animationComplete",{value:s.value,trackColor:s.trackColor,progressColor:s.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,a,s,c,p){var u=this,h=new t.Animation({}),d=s+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;h.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,a,d,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||u.doCircularIndeterminate(e,r,n,i,o,a,s,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,a){var s,l,c=new t.Animation({}),p=new t.Animation({}),h=e.innerHTML,d=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(s=(s=i.enableRtl?i.progressRect.x+i.progressRect.width+a/2:r-a/2)<=0?0:s,l=i.enableRtl?s-v:v-s),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,t.name="SlideRight","Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n,t.duration,!1),m=parseInt((Math.round(d)/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=u(t.timeStamp,s,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n-r,t.duration,!1),m=parseInt((Math.round(d)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=h,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),d=u(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",d.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,a,s,l,c,p=new t.Animation({}),h=0,d=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;d&&r.progressAnnotationModule&&(a=document.getElementById(r.element.id+"Annotation0").children[0])&&a.children[0]&&"SPAN"===a.children[0].tagName&&(o=a.children[0]),s=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=s=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:s,r.annotateEnd=g+s,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?s:s-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,d&&o&&(h=u(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(h)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),I=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),D=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new z,n.progress=t,n.annotations=r,n}return I(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(_),M=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,a){var s=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=a/e.segmentCount,u=a-(e.segmentCount-1)*c;u=(u-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var h,d,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,P="Round"===e.cornerRadius?n-.9*o:n,R=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)h=P<u?P:u,b<e.segmentColor.length?(d=e.segmentColor[b],b++):(b=0,d=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",R,d,i,"0",this.getLinearSegmentPath(s,l,h,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),s+=e.enableRtl?-u-y:u+y,P=(P-=u+y)<0?0:P;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,a,s,c,p,u){var h=e.startAngle,d=this.widthToAngle(e.minimum,e.maximum,a,e.totalAngle);d-="Round"===e.cornerRadius&&e.totalAngle===x?this.widthToAngle(0,u,.45*c,p):0;var g=u-(e.totalAngle===x?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(e.totalAngle===x?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,u,u/e.segmentCount,p);m-="Round"===e.cornerRadius&&e.totalAngle===x?this.widthToAngle(0,u,.45*c,p):0;var y=this.widthToAngle(0,u,g,p),f=this.widthToAngle(0,u,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,u,.9*c,p):0;for(var v,b,P,R,S,C=e.renderer.createGroup({id:e.element.id+t}),k=Math.floor(d/m),A=Math.ceil((d-f*k)/y),w=(h+(e.enableRtl?-y:y))%360,T=0,F=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<A;E++)v=l(n,i,o,h,P=e.enableRtl?e.startAngle-d>w?e.startAngle-d:w:e.startAngle+d<w?e.startAngle+d:w,e.enableRtl),T<e.segmentColor.length?(R=e.segmentColor[T],T++):(T=0,R=e.segmentColor[T],T++),S=new r.PathOption(e.element.id+t+E,"none",F,R,s,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),h=P+(e.enableRtl?-f:f),w+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,a,s,l,c,p,u,h,d=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,P=t.value,R=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=P&&y[S].end>=b&&y[S].end<=P,s=e*t.calculateProgressRange(y[S].start,b,P),l=e*t.calculateProgressRange(y[S].end,b,P),c=d+(t.enableRtl?-s:s),p=d+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+R:c:d,p=i?p:d,u=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,a=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,u,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(a),m.appendChild(o),t.isGradient&&(h=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,h,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,a,s,c,p,u,h,d,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,P=i.startAngle,R=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,a=this.widthToAngle(v,b,m[S].start,R),s=this.widthToAngle(v,b,m[S].end,R),a=p?(P+(i.enableRtl?-a:a))%360:P,s=p?(P+(i.enableRtl?-s:s))%360:P,h=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,u=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,h,f,"0",l(e,t,n,a,s,i.enableRtl)),c=i.renderer.drawPath(u),g.appendChild(c),i.isGradient&&(d=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,d,a,s,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var a=[],s={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};a[0]={color:t,colorStop:"50%"},a[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",s,a);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,a,l,c){var p=[],u=s(a,l,o,n),h=s(a,l,o,i),d={id:"circleRangeGrad_"+e,x1:u.x.toString(),x2:h.x.toString(),y1:u.y.toString(),y2:h.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",d,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),G=function(){function e(e){this.segment=new M,this.animation=new z,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,a=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",a,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",a,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,a,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,a,s,l,c,p,u,h=this.progress,d=h.value===h.maximum,g=h.progressRect.width*h.calculateProgressRange(h.value),m=h.calculateProgressRange(h.argsData.value);o=h.progressRect.width*(h.isIndeterminate&&!h.enableProgressSegments?1:m),l=e?r.getElement(h.element.id+"_LinearProgressGroup"):h.renderer.createGroup({id:h.element.id+"_LinearProgressGroup"});var y=h.progressThickness||h.themeStyle.linearProgressThickness,f=h.isStriped?"url(#"+h.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===h.cornerRadius?new r.PathOption(h.element.id+"_Linearprogress",f,0,"none",h.themeStyle.progressOpacity,"0",this.cornerRadius(h.progressRect.x,h.progressRect.y,o,y,4,d||h.isIndeterminate?"":"start")):new r.PathOption(h.element.id+"_Linearprogress","none",y,f,h.themeStyle.progressOpacity,"0",h.getPathLine(h.progressRect.x,o,y)),h.progressWidth=h.renderer.drawPath(n).getTotalLength(),h.segmentSize=h.enableProgressSegments?h.calculateSegmentSize(h.progressWidth,y):h.segmentSize,null===h.secondaryProgress||h.isIndeterminate||this.renderLinearBuffer(h),null!==h.argsData.value&&("Round4px"===h.cornerRadius?i=h.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",f,y,!1,o,h,h.themeStyle.progressOpacity):h.renderer.drawPath(n):0===h.segmentColor.length||h.isIndeterminate||this.isRange?this.isRange&&!h.isIndeterminate?i=this.segment.createLinearRange(o,h):(e?((i=r.getElement(h.element.id+"_Linearprogress")).setAttribute("d",h.getPathLine(h.progressRect.x,o,y)),i.setAttribute("stroke",f)):i=h.renderer.drawPath(n),h.segmentCount>1&&i.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&m&&i.setAttribute("stroke-linecap","round")):(p=h.enableProgressSegments?h.progressWidth:h.trackWidth,i=this.segment.createLinearSegment(h,"_LinearProgressSegment",o,h.themeStyle.progressOpacity,y,p)),l.appendChild(i),h.isStriped&&!h.isIndeterminate&&(u=this.checkingLinearProgressColor(),this.renderLinearStriped(u,l,h)),!h.isActive||h.isIndeterminate||h.isStriped||this.renderActiveState(l,m,o,y,e),!h.animation.enable||h.isIndeterminate||h.isActive||h.isStriped||(c=null!==h.secondaryProgress?h.animation.delay+(this.bufferWidth-o):h.animation.delay,this.delay=c,a=h.createClipPath(h.clipPath,m,null,e,y,!1,"Round4px"===h.cornerRadius&&d),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearAnimation(a,h,c,e?t:0)),h.isIndeterminate&&(s=h.createClipPath(h.clipPath,h.enableProgressSegments?1:m,null,e,y,h.enableProgressSegments),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearIndeterminate(h.enableProgressSegments?i:s,o,y,h,s)),h.svgObject.appendChild(l),h.previousWidth=g)},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,a,s=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,u=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",u,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",u,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,s?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,u,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,a))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&s),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(e){void 0===e&&(e=!1);var t,n,i,s,l,c,p,u,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,g=this.progress,m=g.labelStyle.textAlignment,y=g.labelStyle.text,f=this.checkingLinearProgressColor(),v=g.progressRect.width*g.calculateProgressRange(g.value),b=g.renderer.createGroup({id:g.element.id+"_LinearLabelGroup"});document.getElementById(b.id)&&document.getElementById(b.id).remove();var R=(g.value-g.minimum)/(g.maximum-g.minimum)*100,S=g.value<g.minimum||g.value>g.maximum?0:Math.round(R),C=o(a(f)),k=Math.round((299*C.r+587*C.g+114*C.b)/1e3),A={cancel:!1,text:y||String(S)+"%",color:g.labelStyle.color};g.trigger("textRender",A),A.cancel||(s=r.measureText(A.text,g.labelStyle),c=g.enableRtl?g.progressRect.x+g.progressRect.width-s.width/2:g.progressRect.x+s.width/2,g.labelOnTrack?"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?(u=g.enableRtl?g.progressRect.x+g.progressRect.width-v/2:g.progressRect.x+v/2,n=(g.enableRtl?u<=c:u>=c)?u:c):(p=g.enableRtl?g.progressRect.x+g.progressRect.width-v+s.width/2:g.progressRect.x+v-s.width/2,p+=g.enableRtl?5:-5,n=(g.enableRtl?p<=c:p>=c)?p:c):"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?n=(g.progressRect.x+g.progressRect.width)/2:(n=g.enableRtl?g.progressRect.x+s.width/2:g.progressRect.x+g.progressRect.width-s.width/2,n+=g.enableRtl?5:-5),i="Round4px"===this.progress.cornerRadius?g.progressRect.y+d/2+s.height/4:g.progressRect.y+g.progressRect.height/2+s.height/4,l=new P(g.element.id+"_linearLabel",g.labelStyle.size||g.themeStyle.linearFontSize,g.labelStyle.fontStyle||g.themeStyle.linearFontStyle,g.labelStyle.fontFamily||g.themeStyle.linearFontFamily,g.labelStyle.fontWeight,"middle",A.color||(k>=128?"black":"white"),n,i),t=g.renderer.createText(l,A.text),b.appendChild(t),g.animation.enable&&!g.isIndeterminate&&(h=g.renderer.createClipPath({id:g.element.id+"_clippathLabel"}),g.createClipPath(h,1,null,!1,g.progressThickness||g.themeStyle.linearProgressThickness,!0),b.appendChild(h),t.setAttribute("style","clip-path:url(#"+g.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(t,e?g.previousLabelWidth:0,v-(e?g.previousLabelWidth:0),g,this.delay,s.width)),g.svgObject.appendChild(b),g.previousLabelWidth=v)},e.prototype.renderActiveState=function(e,t,n,i,o){var a,s,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?a=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),a=l.renderer.drawPath(s)):(o?(a=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),a=l.renderer.drawPath(s)),l.segmentCount>1&&!this.isRange&&a.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&a.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);a.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(a),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,a)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(O,"linearGradient"),a=[];a=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var s=0;s<a.length;s++)n=document.createElementNS(O,"stop"),n=p(a[s],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var a="";switch(o){case"start":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":a="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" v"+-n+" z";break;case"none":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:a="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return a},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,a,s){for(var l,c,p,u,h=a.progressRect.x,d=a.progressRect.y,g=a.progressRect.width,m=a.gapWidth||a.themeStyle.linearGapWidth,y=(g-(a.segmentCount-1)*m)/a.segmentCount,f=a.renderer.createGroup({id:a.element.id+e+"SegmentGroup"}),v=1;v<=a.segmentCount;v++)if(c=1===v||v===a.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(a.element.id+e+v,t,0,"none",a.themeStyle.trackOpacity,"0",this.cornerRadius(h,d,y,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m;else if(p=o<y?o:y,l=new r.PathOption(a.element.id+e+v,t,0,"none",s,"0",this.cornerRadius(h,d,p,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m,(o-=y+m)<=0)break;return f},e}(),B=function(){function e(e){this.segment=new M,this.animation=new z,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var a=n.argsData.trackColor||n.themeStyle.circularTrackColor,s=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,u=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var h=new r.PathOption(n.element.id+"_Circulartrack",s,p,a,n.themeStyle.trackOpacity,"0",u),d=n.renderer.drawPath(h);n.trackWidth=d.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),d.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||d.setAttribute("stroke-linecap","round"),i.appendChild(d),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,a,s,p,u,h,d,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),a=null===(a=c(y.innerRadius,this.availableSize))?0:a,y.previousTotalEnd=u=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-u:u))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(u-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,a,f,i,y.enableRtl,y.enablePieProgress),P=this.checkingCircularProgressColor(),R=y.enablePieProgress?P:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,k=new r.PathOption(y.element.id+"_Circularprogress",R,C,P,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(k).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,a,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?h=this.segment.createCircularRange(this.centerX,this.centerY,a,y):(n?(s=(h=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),h.setAttribute("stroke",P),h.setAttribute("d",b)):h=y.renderer.drawPath(k),y.segmentCount>1&&!y.enablePieProgress&&h.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&h.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,h=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,a,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(h),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,a,C,b,v,u,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,d=y.createClipPath(y.clipPath,null,n?s:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,a,v,u,d,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&d.setAttribute("d",l(this.centerX,this.centerY,a+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?h:d,y,f,v,this.centerX,this.centerY,a,S,d))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,a,s,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),u=(e.startAngle+(e.enableRtl?-p:p))%360,h=l(this.centerX,this.centerY,t,e.startAngle,u,e.enableRtl,e.enablePieProgress),d=this.checkingCircularProgressColor(),g=e.enablePieProgress?d:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,d,e.themeStyle.bufferOpacity,"0",h);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?n:e.totalAngle,a=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,s,a)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,u,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(e){void 0===e&&(e=!1);var t,n,i,o,a,s=this.progress,l=s.labelStyle.text,c=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(c.id)&&document.getElementById(c.id).remove();var p=(s.value-s.minimum)/(s.maximum-s.minimum)*100,u=s.value<s.minimum||s.value>s.maximum?0:Math.round(p),h={cancel:!1,text:l||String(u)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(o=r.measureText(h.text,s.labelStyle),i=this.centerY+o.height/2,a=new P(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,i,s.progressRect.width,s.progressRect.height),n=s.renderer.createText(a,h.text),c.appendChild(n),s.animation.enable&&!s.isIndeterminate&&(t=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,t=s.value<s.minimum||s.value>s.maximum?0:t,this.animation.doLabelAnimation(n,e?s.previousWidth:s.startAngle,t,s,this.delay)),s.svgObject.appendChild(c),s.previousWidth=t)},e.prototype.renderActiveState=function(e,t,n,i,o,a,s){var l,c,p=this.progress,u=n+1;s?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",u,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var h=p.createClipPath(p.clipPath,null,"",s);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,a,h,p,u,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),W=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),N=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},H=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new G(n),n.circular=new B(n),n.annotateAnimation=new z,n.destroyIndeterminate=!1,n}return W(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new m(0,0,0,0),this.progressSize=new y(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger(L,this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect();if(r.getElement(this.svgObject.id)){var n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"}},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e;r=t<r&&"Round"===this.cornerRadius?t:r;var i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&this.totalAngle===x?this.segmentCount:this.segmentCount-1,n=this.totalAngle===x||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,a,s){var l,c,p,u,h,d,g=this.progressRect.x,y=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(u=g,d=y*t,u+=a?0:-4,h=this.progressRect.y,d+=!a&&s||this.isIndeterminate?4:0):(u=this.enableRtl&&!a?g+y+("Round"===this.cornerRadius?o/10:0):g-("Round"===this.cornerRadius?o/10:0),d=y*t,h=this.progressRect.y+this.progressRect.height/2-o/2,d+="Round"!==this.cornerRadius||a?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect"+(a?"label":""))).setAttribute("width",d.toString()),this.isActive&&l.setAttribute("x",u.toString())):(c=new v(this.element.id+"_clippathrect"+(a?"label":""),"transparent",1,"transparent",1,new m(u,h,o,d)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=function(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;case"Tailwind":t={linearTrackColor:"#E5E7EB",linearProgressColor:"#4F46E5",circularTrackColor:"#E5E7EB",circularProgressColor:"#4F46E5",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Inter",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#15803D",danger:"#DC2626",warning:"#C2410C",info:"#0E7490"};break;case"TailwindDark":t={linearTrackColor:"#4B5563",linearProgressColor:"#22D3EE",circularTrackColor:"#4B5563",circularProgressColor:"#22D3EE",backgroundColor:"transparent",fontColor:"#D1D5DB",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Interr",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#22C55E",danger:"#F87171",warning:"#ea580c",info:"#06B6D4"};break;case"FabricDark":case"BootstrapDark":case"MaterialDark":t={linearTrackColor:"#C8C8C8",linearProgressColor:"#9A9A9A",circularTrackColor:"#C8C8C8",circularProgressColor:"#9A9A9A",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#22b24b",danger:"#ac2a2a",warning:"#ffca1c",info:"#489bd5"};break;case"Bootstrap5":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#0D6EFD",circularTrackColor:"#E9ECEF",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#198754",danger:"#DC3545",warning:"#FFC107",info:"#0DCAF0"};break;case"Bootstrap5Dark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#21B26F",danger:"#E4606D",warning:"#FFC107",info:"#0DCAF0"};break;case"Fluent":t={linearTrackColor:"#F3F2F1",linearProgressColor:"#0D6EFD",circularTrackColor:"#F3F2F1",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;case"FluentDark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new y(0,0),previousSize:new y(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){e.isDestroyed?clearTimeout(e.resizeTo):(t.currentSize=e.progressSize,e.trigger("resized",t),null!==e.width&&null!==e.height||t.cancel||(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements()))},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger(L,this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(!0),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):(this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth),this.showProgressValue&&this.linear.renderLinearLabel(!0));break;case"animation":this.createSVG(),this.renderElements()}}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},N([t.Property("Linear")],n.prototype,"type",void 0),N([t.Property(null)],n.prototype,"value",void 0),N([t.Property(null)],n.prototype,"secondaryProgress",void 0),N([t.Property(0)],n.prototype,"minimum",void 0),N([t.Property(100)],n.prototype,"maximum",void 0),N([t.Property(0)],n.prototype,"startAngle",void 0),N([t.Property(0)],n.prototype,"endAngle",void 0),N([t.Property("100%")],n.prototype,"radius",void 0),N([t.Property("100%")],n.prototype,"innerRadius",void 0),N([t.Property(1)],n.prototype,"segmentCount",void 0),N([t.Property(null)],n.prototype,"gapWidth",void 0),N([t.Property("")],n.prototype,"segmentColor",void 0),N([t.Property("Auto")],n.prototype,"cornerRadius",void 0),N([t.Property(null)],n.prototype,"height",void 0),N([t.Property(null)],n.prototype,"width",void 0),N([t.Property(!1)],n.prototype,"isIndeterminate",void 0),N([t.Property(!1)],n.prototype,"isActive",void 0),N([t.Property(!1)],n.prototype,"isGradient",void 0),N([t.Property(!1)],n.prototype,"isStriped",void 0),N([t.Property("Auto")],n.prototype,"role",void 0),N([t.Property(!1)],n.prototype,"enableRtl",void 0),N([t.Property(!0)],n.prototype,"labelOnTrack",void 0),N([t.Property(null)],n.prototype,"trackColor",void 0),N([t.Property(null)],n.prototype,"progressColor",void 0),N([t.Property(0)],n.prototype,"trackThickness",void 0),N([t.Property(0)],n.prototype,"progressThickness",void 0),N([t.Property(!1)],n.prototype,"enablePieProgress",void 0),N([t.Property("Fabric")],n.prototype,"theme",void 0),N([t.Property(!1)],n.prototype,"showProgressValue",void 0),N([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),N([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},w)],n.prototype,"labelStyle",void 0),N([t.Complex({},A)],n.prototype,"margin",void 0),N([t.Complex({},T)],n.prototype,"animation",void 0),N([t.Event()],n.prototype,"load",void 0),N([t.Event()],n.prototype,"textRender",void 0),N([t.Event()],n.prototype,"loaded",void 0),N([t.Event()],n.prototype,"valueChanged",void 0),N([t.Event()],n.prototype,"progressCompleted",void 0),N([t.Event()],n.prototype,"animationComplete",void 0),N([t.Event()],n.prototype,"mouseClick",void 0),N([t.Event()],n.prototype,"mouseMove",void 0),N([t.Event()],n.prototype,"mouseUp",void 0),N([t.Event()],n.prototype,"mouseDown",void 0),N([t.Event()],n.prototype,"mouseLeave",void 0),N([t.Collection([{}],F)],n.prototype,"annotations",void 0),N([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=N([t.NotifyPropertyChanges],n)}(t.Component);e.ProgressBar=H,e.Margin=A,e.Font=w,e.Animation=T,e.ProgressAnnotationSettings=F,e.RangeColor=E,e.ProgressAnnotation=D,e.Rect=m,e.Size=y,e.Pos=f,e.RectOption=v,e.ColorValue=b,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=a,e.TextOption=P,e.degreeToLocation=s,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=u,e.annotationRender=R,e.getElement=h,e.removeElement=d,e.ProgressLocation=S,e.ProgressAnimation=z,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new b(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new b(255,255,255)}function a(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new b(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function s(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,a){var l=s(e,t,r,n),c=s(e,t,r,i),p="0",u=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return a?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function u(e,t,r,n,i){var o=t+(i?-r:r);return(i?r:-r)*Math.cos(e/n*(Math.PI/2))+o}function h(e){return document.getElementById(e)}function d(e){if(!e)return null;var r="string"==typeof e?h(e):e;r&&t.remove(r)}var g=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(){return function(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}}(),y=function(){return function(e,t){this.height=e,this.width=t}}(),f=function(){return function(e,t){this.x=e,this.y=t}}(),v=function(e){function t(t,r,n,i,o,a,s,l,c,p){var u=e.call(this,t,r,n,i,o,p)||this;return u.y=a.y,u.x=a.x,u.height=a.height,u.width=a.width,u.rx=s||0,u.ry=l||0,u.transform=c||"",u.stroke=0!==n&&""!==u.stroke?i:"transparent",u}return g(t,e),t}(r.PathOption),b=function(){return function(e,t,r){this.r=e,this.g=t,this.b=r}}(),P=function(){return function(e,t,r,n,i,o,a,s,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=a,this.x=s,this.y=l,this.width=c||0,this.height=p||0}}(),R="annotationRender",S=function(){return function(e,t){this.x=e,this.y=t}}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),k=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},A=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(10)],r.prototype,"top",void 0),k([t.Property(10)],r.prototype,"bottom",void 0),k([t.Property(10)],r.prototype,"left",void 0),k([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("Normal")],r.prototype,"fontStyle",void 0),k([t.Property("16px")],r.prototype,"size",void 0),k([t.Property("Normal")],r.prototype,"fontWeight",void 0),k([t.Property("")],r.prototype,"color",void 0),k([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),k([t.Property(1)],r.prototype,"opacity",void 0),k([t.Property("Far")],r.prototype,"textAlignment",void 0),k([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(!1)],r.prototype,"enable",void 0),k([t.Property(2e3)],r.prototype,"duration",void 0),k([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),F=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(null)],r.prototype,"content",void 0),k([t.Property(0)],r.prototype,"annotationAngle",void 0),k([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("")],r.prototype,"color",void 0),k([t.Property(null)],r.prototype,"start",void 0),k([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),x=359.99,L="progressCompleted",O="http://www.w3.org/2000/svg",_=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){this.annotation=e;return t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(d(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:R,content:t,location:e};if(this.control.trigger(R,n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var a=Math.round(this.control.progressSize.width/2.25),s=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+a,r=i*Math.sin(t)+s}return{top:r,left:n}},e}(),z=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),h=l.getAttribute("x"),d=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(h,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(h,10)-y;l.style.visibility="hidden",s.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,parseInt(h,10),parseInt(p,10),!0),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("x",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("width",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",h.toString()),a.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&a.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),h=0,d=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;s.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(h=u(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString())):(h=u(e.timeStamp,d,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",d.toString()),i.destroyIndeterminate||a.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),a=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,a,s,c,p,h,d,g){var m=this,y=new t.Animation({}),f=a,v=s.startAngle,b=n+c/2,P=0,R=0,S=s.isActive?3e3:s.animation.duration;v+="Round"===s.cornerRadius&&o!==x&&0!==o?s.enableRtl?.45*c:-.45*c:0,o+="Round"===s.cornerRadius&&o!==x&&0!==o?.45*c:0,i+="Round"===s.cornerRadius&&o!==x&&0!==o?s.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(h)?v:h,k=t.isNullOrUndefined(h)?o:o-d;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){s.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),s.isActive?(P=m.activeAnimate(t.timeStamp/t.duration,C,k,s.enableRtl),R=u(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",R.toString()),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))):(P=u(t.timeStamp,C,k,t.duration,s.enableRtl),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))))},end:function(){s.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,s.enableRtl,!0)),s.isActive&&m.doCircularAnimation(e,r,n,i,o,a,s,c,p,h,d,g),s.trigger("animationComplete",{value:s.value,trackColor:s.trackColor,progressColor:s.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,a,s,c,p){var u=this,h=new t.Animation({}),d=s+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;h.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,a,d,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||u.doCircularIndeterminate(e,r,n,i,o,a,s,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,a){var s,l,c=new t.Animation({}),p=new t.Animation({}),h=e.innerHTML,d=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(s=(s=i.enableRtl?i.progressRect.x+i.progressRect.width+a/2:r-a/2)<=0?0:s,l=i.enableRtl?s-v:v-s),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,t.name="SlideRight","Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n,t.duration,!1),m=parseInt((Math.round(d)/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=u(t.timeStamp,s,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n-r,t.duration,!1),m=parseInt((Math.round(d)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=h,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),d=u(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",d.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,a,s,l,c,p=new t.Animation({}),h=0,d=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;d&&r.progressAnnotationModule&&(a=document.getElementById(r.element.id+"Annotation0").children[0])&&a.children[0]&&"SPAN"===a.children[0].tagName&&(o=a.children[0]),s=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=s=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:s,r.annotateEnd=g+s,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?s:s-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,d&&o&&(h=u(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(h)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),I=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),D=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new z,n.progress=t,n.annotations=r,n}return I(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(_),M=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,a){var s=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=a/e.segmentCount,u=a-(e.segmentCount-1)*c;u=(u-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var h,d,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,P="Round"===e.cornerRadius?n-.9*o:n,R=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)h=P<u?P:u,b<e.segmentColor.length?(d=e.segmentColor[b],b++):(b=0,d=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",R,d,i,"0",this.getLinearSegmentPath(s,l,h,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),s+=e.enableRtl?-u-y:u+y,P=(P-=u+y)<0?0:P;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,a,s,c,p,u){var h=e.startAngle,d=this.widthToAngle(e.minimum,e.maximum,a,e.totalAngle);d-="Round"===e.cornerRadius&&e.totalAngle===x?this.widthToAngle(0,u,.45*c,p):0;var g=u-(e.totalAngle===x?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(e.totalAngle===x?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,u,u/e.segmentCount,p);m-="Round"===e.cornerRadius&&e.totalAngle===x?this.widthToAngle(0,u,.45*c,p):0;var y=this.widthToAngle(0,u,g,p),f=this.widthToAngle(0,u,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,u,.9*c,p):0;for(var v,b,P,R,S,C=e.renderer.createGroup({id:e.element.id+t}),k=Math.floor(d/m),A=Math.ceil((d-f*k)/y),w=(h+(e.enableRtl?-y:y))%360,T=0,F=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<A;E++)v=l(n,i,o,h,P=e.enableRtl?e.startAngle-d>w?e.startAngle-d:w:e.startAngle+d<w?e.startAngle+d:w,e.enableRtl),T<e.segmentColor.length?(R=e.segmentColor[T],T++):(T=0,R=e.segmentColor[T],T++),S=new r.PathOption(e.element.id+t+E,"none",F,R,s,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),h=P+(e.enableRtl?-f:f),w+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,a,s,l,c,p,u,h,d=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,P=t.value,R=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=P&&y[S].end>=b&&y[S].end<=P,s=e*t.calculateProgressRange(y[S].start,b,P),l=e*t.calculateProgressRange(y[S].end,b,P),c=d+(t.enableRtl?-s:s),p=d+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+R:c:d,p=i?p:d,u=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,a=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,u,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(a),m.appendChild(o),t.isGradient&&(h=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,h,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,a,s,c,p,u,h,d,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,P=i.startAngle,R=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,a=this.widthToAngle(v,b,m[S].start,R),s=this.widthToAngle(v,b,m[S].end,R),a=p?(P+(i.enableRtl?-a:a))%360:P,s=p?(P+(i.enableRtl?-s:s))%360:P,h=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,u=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,h,f,"0",l(e,t,n,a,s,i.enableRtl)),c=i.renderer.drawPath(u),g.appendChild(c),i.isGradient&&(d=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,d,a,s,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var a=[],s={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};a[0]={color:t,colorStop:"50%"},a[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",s,a);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,a,l,c){var p=[],u=s(a,l,o,n),h=s(a,l,o,i),d={id:"circleRangeGrad_"+e,x1:u.x.toString(),x2:h.x.toString(),y1:u.y.toString(),y2:h.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",d,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),G=function(){function e(e){this.segment=new M,this.animation=new z,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,a=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",a,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",a,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,a,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,a,s,l,c,p,u,h=this.progress,d=h.value===h.maximum,g=h.progressRect.width*h.calculateProgressRange(h.value),m=h.calculateProgressRange(h.argsData.value);o=h.progressRect.width*(h.isIndeterminate&&!h.enableProgressSegments?1:m),l=e?r.getElement(h.element.id+"_LinearProgressGroup"):h.renderer.createGroup({id:h.element.id+"_LinearProgressGroup"});var y=h.progressThickness||h.themeStyle.linearProgressThickness,f=h.isStriped?"url(#"+h.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===h.cornerRadius?new r.PathOption(h.element.id+"_Linearprogress",f,0,"none",h.themeStyle.progressOpacity,"0",this.cornerRadius(h.progressRect.x,h.progressRect.y,o,y,4,d||h.isIndeterminate?"":"start")):new r.PathOption(h.element.id+"_Linearprogress","none",y,f,h.themeStyle.progressOpacity,"0",h.getPathLine(h.progressRect.x,o,y)),h.progressWidth=h.renderer.drawPath(n).getTotalLength(),h.segmentSize=h.enableProgressSegments?h.calculateSegmentSize(h.progressWidth,y):h.segmentSize,null===h.secondaryProgress||h.isIndeterminate||this.renderLinearBuffer(h),null!==h.argsData.value&&("Round4px"===h.cornerRadius?i=h.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",f,y,!1,o,h,h.themeStyle.progressOpacity):h.renderer.drawPath(n):0===h.segmentColor.length||h.isIndeterminate||this.isRange?this.isRange&&!h.isIndeterminate?i=this.segment.createLinearRange(o,h):(e?((i=r.getElement(h.element.id+"_Linearprogress")).setAttribute("d",h.getPathLine(h.progressRect.x,o,y)),i.setAttribute("stroke",f)):i=h.renderer.drawPath(n),h.segmentCount>1&&i.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&m&&i.setAttribute("stroke-linecap","round")):(p=h.enableProgressSegments?h.progressWidth:h.trackWidth,i=this.segment.createLinearSegment(h,"_LinearProgressSegment",o,h.themeStyle.progressOpacity,y,p)),l.appendChild(i),h.isStriped&&!h.isIndeterminate&&(u=this.checkingLinearProgressColor(),this.renderLinearStriped(u,l,h)),!h.isActive||h.isIndeterminate||h.isStriped||this.renderActiveState(l,m,o,y,e),!h.animation.enable||h.isIndeterminate||h.isActive||h.isStriped||(c=null!==h.secondaryProgress?h.animation.delay+(this.bufferWidth-o):h.animation.delay,this.delay=c,a=h.createClipPath(h.clipPath,m,null,e,y,!1,"Round4px"===h.cornerRadius&&d),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearAnimation(a,h,c,e?t:0)),h.isIndeterminate&&(s=h.createClipPath(h.clipPath,h.enableProgressSegments?1:m,null,e,y,h.enableProgressSegments),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearIndeterminate(h.enableProgressSegments?i:s,o,y,h,s)),h.svgObject.appendChild(l),h.previousWidth=g)},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,a,s=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,u=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",u,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",u,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,s?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,u,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,a))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&s),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(e){void 0===e&&(e=!1);var t,n,i,s,l,c,p,u,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,g=this.progress,m=g.labelStyle.textAlignment,y=g.labelStyle.text,f=this.checkingLinearProgressColor(),v=g.progressRect.width*g.calculateProgressRange(g.value),b=g.renderer.createGroup({id:g.element.id+"_LinearLabelGroup"});document.getElementById(b.id)&&document.getElementById(b.id).remove();var R=(g.value-g.minimum)/(g.maximum-g.minimum)*100,S=g.value<g.minimum||g.value>g.maximum?0:Math.round(R),C=o(a(f)),k=Math.round((299*C.r+587*C.g+114*C.b)/1e3),A={cancel:!1,text:y||String(S)+"%",color:g.labelStyle.color};g.trigger("textRender",A),A.cancel||(s=r.measureText(A.text,g.labelStyle),c=g.enableRtl?g.progressRect.x+g.progressRect.width-s.width/2:g.progressRect.x+s.width/2,g.labelOnTrack?"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?(u=g.enableRtl?g.progressRect.x+g.progressRect.width-v/2:g.progressRect.x+v/2,n=(g.enableRtl?u<=c:u>=c)?u:c):(p=g.enableRtl?g.progressRect.x+g.progressRect.width-v+s.width/2:g.progressRect.x+v-s.width/2,p+=g.enableRtl?5:-5,n=(g.enableRtl?p<=c:p>=c)?p:c):"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?n=(g.progressRect.x+g.progressRect.width)/2:(n=g.enableRtl?g.progressRect.x+s.width/2:g.progressRect.x+g.progressRect.width-s.width/2,n+=g.enableRtl?5:-5),i="Round4px"===this.progress.cornerRadius?g.progressRect.y+d/2+s.height/4:g.progressRect.y+g.progressRect.height/2+s.height/4,l=new P(g.element.id+"_linearLabel",g.labelStyle.size||g.themeStyle.linearFontSize,g.labelStyle.fontStyle||g.themeStyle.linearFontStyle,g.labelStyle.fontFamily||g.themeStyle.linearFontFamily,g.labelStyle.fontWeight,"middle",A.color||(k>=128?"black":"white"),n,i),t=g.renderer.createText(l,A.text),b.appendChild(t),g.animation.enable&&!g.isIndeterminate&&(h=g.renderer.createClipPath({id:g.element.id+"_clippathLabel"}),g.createClipPath(h,1,null,!1,g.progressThickness||g.themeStyle.linearProgressThickness,!0),b.appendChild(h),t.setAttribute("style","clip-path:url(#"+g.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(t,e?g.previousLabelWidth:0,v-(e?g.previousLabelWidth:0),g,this.delay,s.width)),g.svgObject.appendChild(b),g.previousLabelWidth=v)},e.prototype.renderActiveState=function(e,t,n,i,o){var a,s,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?a=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),a=l.renderer.drawPath(s)):(o?(a=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),a=l.renderer.drawPath(s)),l.segmentCount>1&&!this.isRange&&a.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&a.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);a.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(a),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,a)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(O,"linearGradient"),a=[];a=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var s=0;s<a.length;s++)n=document.createElementNS(O,"stop"),n=p(a[s],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var a="";switch(o){case"start":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":a="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" v"+-n+" z";break;case"none":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:a="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return a},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,a,s){for(var l,c,p,u,h=a.progressRect.x,d=a.progressRect.y,g=a.progressRect.width,m=a.gapWidth||a.themeStyle.linearGapWidth,y=(g-(a.segmentCount-1)*m)/a.segmentCount,f=a.renderer.createGroup({id:a.element.id+e+"SegmentGroup"}),v=1;v<=a.segmentCount;v++)if(c=1===v||v===a.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(a.element.id+e+v,t,0,"none",a.themeStyle.trackOpacity,"0",this.cornerRadius(h,d,y,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m;else if(p=o<y?o:y,l=new r.PathOption(a.element.id+e+v,t,0,"none",s,"0",this.cornerRadius(h,d,p,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m,(o-=y+m)<=0)break;return f},e}(),B=function(){function e(e){this.segment=new M,this.animation=new z,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var a=n.argsData.trackColor||n.themeStyle.circularTrackColor,s=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,u=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var h=new r.PathOption(n.element.id+"_Circulartrack",s,p,a,n.themeStyle.trackOpacity,"0",u),d=n.renderer.drawPath(h);n.trackWidth=d.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),d.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||d.setAttribute("stroke-linecap","round"),i.appendChild(d),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,a,s,p,u,h,d,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),a=null===(a=c(y.innerRadius,this.availableSize))?0:a,y.previousTotalEnd=u=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-u:u))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(u-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,a,f,i,y.enableRtl,y.enablePieProgress),P=this.checkingCircularProgressColor(),R=y.enablePieProgress?P:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,k=new r.PathOption(y.element.id+"_Circularprogress",R,C,P,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(k).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,a,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?h=this.segment.createCircularRange(this.centerX,this.centerY,a,y):(n?(s=(h=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),h.setAttribute("stroke",P),h.setAttribute("d",b)):h=y.renderer.drawPath(k),y.segmentCount>1&&!y.enablePieProgress&&h.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&h.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,h=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,a,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(h),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,a,C,b,v,u,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,d=y.createClipPath(y.clipPath,null,n?s:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,a,v,u,d,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&d.setAttribute("d",l(this.centerX,this.centerY,a+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?h:d,y,f,v,this.centerX,this.centerY,a,S,d))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,a,s,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),u=(e.startAngle+(e.enableRtl?-p:p))%360,h=l(this.centerX,this.centerY,t,e.startAngle,u,e.enableRtl,e.enablePieProgress),d=this.checkingCircularProgressColor(),g=e.enablePieProgress?d:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,d,e.themeStyle.bufferOpacity,"0",h);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?n:e.totalAngle,a=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,s,a)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,u,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(e){void 0===e&&(e=!1);var t,n,i,o,a,s=this.progress,l=s.labelStyle.text,c=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(c.id)&&document.getElementById(c.id).remove();var p=(s.value-s.minimum)/(s.maximum-s.minimum)*100,u=s.value<s.minimum||s.value>s.maximum?0:Math.round(p),h={cancel:!1,text:l||String(u)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(o=r.measureText(h.text,s.labelStyle),i=this.centerY+o.height/2,a=new P(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,i,s.progressRect.width,s.progressRect.height),n=s.renderer.createText(a,h.text),c.appendChild(n),s.animation.enable&&!s.isIndeterminate&&(t=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,t=s.value<s.minimum||s.value>s.maximum?0:t,this.animation.doLabelAnimation(n,e?s.previousWidth:s.startAngle,t,s,this.delay)),s.svgObject.appendChild(c),s.previousWidth=t)},e.prototype.renderActiveState=function(e,t,n,i,o,a,s){var l,c,p=this.progress,u=n+1;s?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",u,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var h=p.createClipPath(p.clipPath,null,"",s);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,a,h,p,u,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),W=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),N=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},H=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new G(n),n.circular=new B(n),n.annotateAnimation=new z,n.destroyIndeterminate=!1,n}return W(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new m(0,0,0,0),this.progressSize=new y(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger(L,this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect();if(r.getElement(this.svgObject.id)){var n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"}},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e;r=t<r&&"Round"===this.cornerRadius?t:r;var i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&this.totalAngle===x?this.segmentCount:this.segmentCount-1,n=this.totalAngle===x||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,a,s){var l,c,p,u,h,d,g=this.progressRect.x,y=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(u=g,d=y*t,u+=a?0:-4,h=this.progressRect.y,d+=!a&&s||this.isIndeterminate?4:0):(u=this.enableRtl&&!a?g+y+("Round"===this.cornerRadius?o/10:0):g-("Round"===this.cornerRadius?o/10:0),d=y*t,h=this.progressRect.y+this.progressRect.height/2-o/2,d+="Round"!==this.cornerRadius||a?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect"+(a?"label":""))).setAttribute("width",d.toString()),this.isActive&&l.setAttribute("x",u.toString())):(c=new v(this.element.id+"_clippathrect"+(a?"label":""),"transparent",1,"transparent",1,new m(u,h,o,d)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=function(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;case"Tailwind":t={linearTrackColor:"#E5E7EB",linearProgressColor:"#4F46E5",circularTrackColor:"#E5E7EB",circularProgressColor:"#4F46E5",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Inter",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#15803D",danger:"#DC2626",warning:"#C2410C",info:"#0E7490"};break;case"TailwindDark":t={linearTrackColor:"#4B5563",linearProgressColor:"#22D3EE",circularTrackColor:"#4B5563",circularProgressColor:"#22D3EE",backgroundColor:"transparent",fontColor:"#D1D5DB",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Interr",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#22C55E",danger:"#F87171",warning:"#ea580c",info:"#06B6D4"};break;case"FabricDark":case"BootstrapDark":case"MaterialDark":t={linearTrackColor:"#C8C8C8",linearProgressColor:"#9A9A9A",circularTrackColor:"#C8C8C8",circularProgressColor:"#9A9A9A",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#22b24b",danger:"#ac2a2a",warning:"#ffca1c",info:"#489bd5"};break;case"Bootstrap5":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#0D6EFD",circularTrackColor:"#E9ECEF",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#198754",danger:"#DC3545",warning:"#FFC107",info:"#0DCAF0"};break;case"Bootstrap5Dark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#21B26F",danger:"#E4606D",warning:"#FFC107",info:"#0DCAF0"};break;case"Fluent":t={linearTrackColor:"#F3F2F1",linearProgressColor:"#0D6EFD",circularTrackColor:"#F3F2F1",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;case"FluentDark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new y(0,0),previousSize:new y(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){e.isDestroyed?clearTimeout(e.resizeTo):(t.currentSize=e.progressSize,e.trigger("resized",t),(null===e.width||null===e.height||e.width.indexOf("%")>-1||e.height.indexOf("%")>-1)&&!t.cancel&&(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements()))},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger(L,this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(!0),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):(this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth),this.showProgressValue&&this.linear.renderLinearLabel(!0));break;case"animation":this.createSVG(),this.renderElements()}}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},N([t.Property("Linear")],n.prototype,"type",void 0),N([t.Property(null)],n.prototype,"value",void 0),N([t.Property(null)],n.prototype,"secondaryProgress",void 0),N([t.Property(0)],n.prototype,"minimum",void 0),N([t.Property(100)],n.prototype,"maximum",void 0),N([t.Property(0)],n.prototype,"startAngle",void 0),N([t.Property(0)],n.prototype,"endAngle",void 0),N([t.Property("100%")],n.prototype,"radius",void 0),N([t.Property("100%")],n.prototype,"innerRadius",void 0),N([t.Property(1)],n.prototype,"segmentCount",void 0),N([t.Property(null)],n.prototype,"gapWidth",void 0),N([t.Property("")],n.prototype,"segmentColor",void 0),N([t.Property("Auto")],n.prototype,"cornerRadius",void 0),N([t.Property(null)],n.prototype,"height",void 0),N([t.Property(null)],n.prototype,"width",void 0),N([t.Property(!1)],n.prototype,"isIndeterminate",void 0),N([t.Property(!1)],n.prototype,"isActive",void 0),N([t.Property(!1)],n.prototype,"isGradient",void 0),N([t.Property(!1)],n.prototype,"isStriped",void 0),N([t.Property("Auto")],n.prototype,"role",void 0),N([t.Property(!1)],n.prototype,"enableRtl",void 0),N([t.Property(!0)],n.prototype,"labelOnTrack",void 0),N([t.Property(null)],n.prototype,"trackColor",void 0),N([t.Property(null)],n.prototype,"progressColor",void 0),N([t.Property(0)],n.prototype,"trackThickness",void 0),N([t.Property(0)],n.prototype,"progressThickness",void 0),N([t.Property(!1)],n.prototype,"enablePieProgress",void 0),N([t.Property("Fabric")],n.prototype,"theme",void 0),N([t.Property(!1)],n.prototype,"showProgressValue",void 0),N([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),N([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},w)],n.prototype,"labelStyle",void 0),N([t.Complex({},A)],n.prototype,"margin",void 0),N([t.Complex({},T)],n.prototype,"animation",void 0),N([t.Event()],n.prototype,"load",void 0),N([t.Event()],n.prototype,"textRender",void 0),N([t.Event()],n.prototype,"loaded",void 0),N([t.Event()],n.prototype,"valueChanged",void 0),N([t.Event()],n.prototype,"progressCompleted",void 0),N([t.Event()],n.prototype,"animationComplete",void 0),N([t.Event()],n.prototype,"mouseClick",void 0),N([t.Event()],n.prototype,"mouseMove",void 0),N([t.Event()],n.prototype,"mouseUp",void 0),N([t.Event()],n.prototype,"mouseDown",void 0),N([t.Event()],n.prototype,"mouseLeave",void 0),N([t.Collection([{}],F)],n.prototype,"annotations",void 0),N([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=N([t.NotifyPropertyChanges],n)}(t.Component);e.ProgressBar=H,e.Margin=A,e.Font=w,e.Animation=T,e.ProgressAnnotationSettings=F,e.RangeColor=E,e.ProgressAnnotation=D,e.Rect=m,e.Size=y,e.Pos=f,e.RectOption=v,e.ColorValue=b,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=a,e.TextOption=P,e.degreeToLocation=s,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=u,e.annotationRender=R,e.getElement=h,e.removeElement=d,e.ProgressLocation=S,e.ProgressAnimation=z,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-progressbar.umd.min.js.map
/*!
* filename: ej2-progressbar.min.js
* version : 20.1.55
* version : 20.1.57
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.progressbar=function(e,t,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new P(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new P(255,255,255)}function a(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new P(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function s(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,a){var l=s(e,t,r,n),c=s(e,t,r,i),p="0",u=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return a?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function u(e,t,r,n,i){var o=i?r:-r,a=t+(i?-r:r);return o*Math.cos(e/n*(Math.PI/2))+a}function h(e){return document.getElementById(e)}function d(e){if(!e)return null;var r="string"==typeof e?h(e):e;r&&t.remove(r)}function g(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;case"Tailwind":t={linearTrackColor:"#E5E7EB",linearProgressColor:"#4F46E5",circularTrackColor:"#E5E7EB",circularProgressColor:"#4F46E5",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Inter",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#15803D",danger:"#DC2626",warning:"#C2410C",info:"#0E7490"};break;case"TailwindDark":t={linearTrackColor:"#4B5563",linearProgressColor:"#22D3EE",circularTrackColor:"#4B5563",circularProgressColor:"#22D3EE",backgroundColor:"transparent",fontColor:"#D1D5DB",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Interr",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#22C55E",danger:"#F87171",warning:"#ea580c",info:"#06B6D4"};break;case"FabricDark":case"BootstrapDark":case"MaterialDark":t={linearTrackColor:"#C8C8C8",linearProgressColor:"#9A9A9A",circularTrackColor:"#C8C8C8",circularProgressColor:"#9A9A9A",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#22b24b",danger:"#ac2a2a",warning:"#ffca1c",info:"#489bd5"};break;case"Bootstrap5":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#0D6EFD",circularTrackColor:"#E9ECEF",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#198754",danger:"#DC3545",warning:"#FFC107",info:"#0DCAF0"};break;case"Bootstrap5Dark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#21B26F",danger:"#E4606D",warning:"#FFC107",info:"#0DCAF0"};break;case"Fluent":t={linearTrackColor:"#F3F2F1",linearProgressColor:"#0D6EFD",circularTrackColor:"#F3F2F1",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;case"FluentDark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}var m=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),y=function(){function e(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}return e}(),f=function(){function e(e,t){this.height=e,this.width=t}return e}(),v=function(){function e(e,t){this.x=e,this.y=t}return e}(),b=function(e){function t(t,r,n,i,o,a,s,l,c,p){var u=e.call(this,t,r,n,i,o,p)||this;return u.y=a.y,u.x=a.x,u.height=a.height,u.width=a.width,u.rx=s||0,u.ry=l||0,u.transform=c||"",u.stroke=0!==n&&""!==u.stroke?i:"transparent",u}return m(t,e),t}(r.PathOption),P=function(){function e(e,t,r){this.r=e,this.g=t,this.b=r}return e}(),R=function(){function e(e,t,r,n,i,o,a,s,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=a,this.x=s,this.y=l,this.width=c||0,this.height=p||0}return e}(),S=function(){function e(e,t){this.x=e,this.y=t}return e}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),k=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},A=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(10)],r.prototype,"top",void 0),k([t.Property(10)],r.prototype,"bottom",void 0),k([t.Property(10)],r.prototype,"left",void 0),k([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("Normal")],r.prototype,"fontStyle",void 0),k([t.Property("16px")],r.prototype,"size",void 0),k([t.Property("Normal")],r.prototype,"fontWeight",void 0),k([t.Property("")],r.prototype,"color",void 0),k([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),k([t.Property(1)],r.prototype,"opacity",void 0),k([t.Property("Far")],r.prototype,"textAlignment",void 0),k([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(!1)],r.prototype,"enable",void 0),k([t.Property(2e3)],r.prototype,"duration",void 0),k([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),F=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(null)],r.prototype,"content",void 0),k([t.Property(0)],r.prototype,"annotationAngle",void 0),k([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("")],r.prototype,"color",void 0),k([t.Property(null)],r.prototype,"start",void 0),k([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),x="http://www.w3.org/2000/svg",L=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){return this.annotation=e,t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(d(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:"annotationRender",content:t,location:e};if(this.control.trigger("annotationRender",n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var a=Math.round(this.control.progressSize.width/2.25),s=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+a,r=i*Math.sin(t)+s}return{top:r,left:n}},e}(),O=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),h=l.getAttribute("x"),d=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(h,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(h,10)-y;l.style.visibility="hidden",s.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,parseInt(h,10),parseInt(p,10),!0),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("x",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("width",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",h.toString()),a.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&a.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),h=0,d=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;s.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(h=u(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString())):(h=u(e.timeStamp,d,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",d.toString()),i.destroyIndeterminate||a.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),a=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,a,s,c,p,h,d,g){var m=this,y=new t.Animation({}),f=a,v=s.startAngle,b=n+c/2,P=0,R=0,S=s.isActive?3e3:s.animation.duration;v+="Round"===s.cornerRadius&&359.99!==o&&0!==o?s.enableRtl?.45*c:-.45*c:0,o+="Round"===s.cornerRadius&&359.99!==o&&0!==o?.45*c:0,i+="Round"===s.cornerRadius&&359.99!==o&&0!==o?s.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(h)?v:h,k=t.isNullOrUndefined(h)?o:o-d;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){s.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),s.isActive?(P=m.activeAnimate(t.timeStamp/t.duration,C,k,s.enableRtl),R=u(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",R.toString()),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))):(P=u(t.timeStamp,C,k,t.duration,s.enableRtl),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))))},end:function(){s.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,s.enableRtl,!0)),s.isActive&&m.doCircularAnimation(e,r,n,i,o,a,s,c,p,h,d,g),s.trigger("animationComplete",{value:s.value,trackColor:s.trackColor,progressColor:s.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,a,s,c,p){var u=this,h=new t.Animation({}),d=s+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;h.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,a,d,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||u.doCircularIndeterminate(e,r,n,i,o,a,s,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,a){var s,l,c=new t.Animation({}),p=new t.Animation({}),h=e.innerHTML,d=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(s=i.enableRtl?i.progressRect.x+i.progressRect.width+a/2:r-a/2,s=s<=0?0:s,l=i.enableRtl?s-v:v-s),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,t.name="SlideRight","Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n,t.duration,!1),m=parseInt((Math.round(d)/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=u(t.timeStamp,s,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n-r,t.duration,!1),m=parseInt((Math.round(d)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=h,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),d=u(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",d.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,a,s,l,c,p=new t.Animation({}),h=0,d=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;d&&r.progressAnnotationModule&&(a=document.getElementById(r.element.id+"Annotation0").children[0])&&a.children[0]&&"SPAN"===a.children[0].tagName&&(o=a.children[0]),s=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=s=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:s,r.annotateEnd=g+s,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?s:s-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,d&&o&&(h=u(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(h)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),_=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),z=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new O,n.progress=t,n.annotations=r,n}return _(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(L),I=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,a){var s=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=a/e.segmentCount,u=a-(e.segmentCount-1)*c;u=(u-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var h,d,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,P="Round"===e.cornerRadius?n-.9*o:n,R=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)h=P<u?P:u,b<e.segmentColor.length?(d=e.segmentColor[b],b++):(b=0,d=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",R,d,i,"0",this.getLinearSegmentPath(s,l,h,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),s+=e.enableRtl?-u-y:u+y,P=(P-=u+y)<0?0:P;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,a,s,c,p,u){var h=e.startAngle,d=this.widthToAngle(e.minimum,e.maximum,a,e.totalAngle);d-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,u,.45*c,p):0;var g=u-(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,u,u/e.segmentCount,p);m-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,u,.45*c,p):0;var y=this.widthToAngle(0,u,g,p),f=this.widthToAngle(0,u,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,u,.9*c,p):0;for(var v,b,P,R,S,C=e.renderer.createGroup({id:e.element.id+t}),k=Math.floor(d/m),A=Math.ceil((d-f*k)/y),w=(h+(e.enableRtl?-y:y))%360,T=0,F=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<A;E++)v=l(n,i,o,h,P=e.enableRtl?e.startAngle-d>w?e.startAngle-d:w:e.startAngle+d<w?e.startAngle+d:w,e.enableRtl),T<e.segmentColor.length?(R=e.segmentColor[T],T++):(T=0,R=e.segmentColor[T],T++),S=new r.PathOption(e.element.id+t+E,"none",F,R,s,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),h=P+(e.enableRtl?-f:f),w+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,a,s,l,c,p,u,h,d=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,P=t.value,R=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=P&&y[S].end>=b&&y[S].end<=P,s=e*t.calculateProgressRange(y[S].start,b,P),l=e*t.calculateProgressRange(y[S].end,b,P),c=d+(t.enableRtl?-s:s),p=d+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+R:c:d,p=i?p:d,u=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,a=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,u,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(a),m.appendChild(o),t.isGradient&&(h=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,h,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,a,s,c,p,u,h,d,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,P=i.startAngle,R=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,a=this.widthToAngle(v,b,m[S].start,R),s=this.widthToAngle(v,b,m[S].end,R),a=p?(P+(i.enableRtl?-a:a))%360:P,s=p?(P+(i.enableRtl?-s:s))%360:P,h=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,u=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,h,f,"0",l(e,t,n,a,s,i.enableRtl)),c=i.renderer.drawPath(u),g.appendChild(c),i.isGradient&&(d=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,d,a,s,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var a=[],s={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};a[0]={color:t,colorStop:"50%"},a[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",s,a);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,a,l,c){var p=[],u=s(a,l,o,n),h=s(a,l,o,i),d={id:"circleRangeGrad_"+e,x1:u.x.toString(),x2:h.x.toString(),y1:u.y.toString(),y2:h.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",d,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),D=function(){function e(e){this.segment=new I,this.animation=new O,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,a=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",a,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",a,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,a,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,a,s,l,c,p,u,h=this.progress,d=h.value===h.maximum,g=h.progressRect.width*h.calculateProgressRange(h.value),m=h.calculateProgressRange(h.argsData.value);o=h.progressRect.width*(h.isIndeterminate&&!h.enableProgressSegments?1:m),l=e?r.getElement(h.element.id+"_LinearProgressGroup"):h.renderer.createGroup({id:h.element.id+"_LinearProgressGroup"});var y=h.progressThickness||h.themeStyle.linearProgressThickness,f=h.isStriped?"url(#"+h.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===h.cornerRadius?new r.PathOption(h.element.id+"_Linearprogress",f,0,"none",h.themeStyle.progressOpacity,"0",this.cornerRadius(h.progressRect.x,h.progressRect.y,o,y,4,d||h.isIndeterminate?"":"start")):new r.PathOption(h.element.id+"_Linearprogress","none",y,f,h.themeStyle.progressOpacity,"0",h.getPathLine(h.progressRect.x,o,y)),h.progressWidth=h.renderer.drawPath(n).getTotalLength(),h.segmentSize=h.enableProgressSegments?h.calculateSegmentSize(h.progressWidth,y):h.segmentSize,null===h.secondaryProgress||h.isIndeterminate||this.renderLinearBuffer(h),null!==h.argsData.value&&("Round4px"===h.cornerRadius?i=h.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",f,y,!1,o,h,h.themeStyle.progressOpacity):h.renderer.drawPath(n):0===h.segmentColor.length||h.isIndeterminate||this.isRange?this.isRange&&!h.isIndeterminate?i=this.segment.createLinearRange(o,h):(e?((i=r.getElement(h.element.id+"_Linearprogress")).setAttribute("d",h.getPathLine(h.progressRect.x,o,y)),i.setAttribute("stroke",f)):i=h.renderer.drawPath(n),h.segmentCount>1&&i.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&m&&i.setAttribute("stroke-linecap","round")):(p=h.enableProgressSegments?h.progressWidth:h.trackWidth,i=this.segment.createLinearSegment(h,"_LinearProgressSegment",o,h.themeStyle.progressOpacity,y,p)),l.appendChild(i),h.isStriped&&!h.isIndeterminate&&(u=this.checkingLinearProgressColor(),this.renderLinearStriped(u,l,h)),!h.isActive||h.isIndeterminate||h.isStriped||this.renderActiveState(l,m,o,y,e),!h.animation.enable||h.isIndeterminate||h.isActive||h.isStriped||(c=null!==h.secondaryProgress?h.animation.delay+(this.bufferWidth-o):h.animation.delay,this.delay=c,a=h.createClipPath(h.clipPath,m,null,e,y,!1,"Round4px"===h.cornerRadius&&d),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearAnimation(a,h,c,e?t:0)),h.isIndeterminate&&(s=h.createClipPath(h.clipPath,h.enableProgressSegments?1:m,null,e,y,h.enableProgressSegments),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearIndeterminate(h.enableProgressSegments?i:s,o,y,h,s)),h.svgObject.appendChild(l),h.previousWidth=g)},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,a,s=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,u=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",u,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",u,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,s?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,u,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,a))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&s),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(e){void 0===e&&(e=!1);var t,n,i,s,l,c,p,u,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,g=this.progress,m=g.labelStyle.textAlignment,y=g.labelStyle.text,f=this.checkingLinearProgressColor(),v=g.progressRect.width*g.calculateProgressRange(g.value),b=g.renderer.createGroup({id:g.element.id+"_LinearLabelGroup"});document.getElementById(b.id)&&document.getElementById(b.id).remove();var P=(g.value-g.minimum)/(g.maximum-g.minimum)*100,S=g.value<g.minimum||g.value>g.maximum?0:Math.round(P),C=o(a(f)),k=Math.round((299*C.r+587*C.g+114*C.b)/1e3),A={cancel:!1,text:y||String(S)+"%",color:g.labelStyle.color};g.trigger("textRender",A),A.cancel||(s=r.measureText(A.text,g.labelStyle),c=g.enableRtl?g.progressRect.x+g.progressRect.width-s.width/2:g.progressRect.x+s.width/2,g.labelOnTrack?"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?(u=g.enableRtl?g.progressRect.x+g.progressRect.width-v/2:g.progressRect.x+v/2,n=(g.enableRtl?u<=c:u>=c)?u:c):(p=g.enableRtl?g.progressRect.x+g.progressRect.width-v+s.width/2:g.progressRect.x+v-s.width/2,p+=g.enableRtl?5:-5,n=(g.enableRtl?p<=c:p>=c)?p:c):"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?n=(g.progressRect.x+g.progressRect.width)/2:(n=g.enableRtl?g.progressRect.x+s.width/2:g.progressRect.x+g.progressRect.width-s.width/2,n+=g.enableRtl?5:-5),i="Round4px"===this.progress.cornerRadius?g.progressRect.y+d/2+s.height/4:g.progressRect.y+g.progressRect.height/2+s.height/4,l=new R(g.element.id+"_linearLabel",g.labelStyle.size||g.themeStyle.linearFontSize,g.labelStyle.fontStyle||g.themeStyle.linearFontStyle,g.labelStyle.fontFamily||g.themeStyle.linearFontFamily,g.labelStyle.fontWeight,"middle",A.color||(k>=128?"black":"white"),n,i),t=g.renderer.createText(l,A.text),b.appendChild(t),g.animation.enable&&!g.isIndeterminate&&(h=g.renderer.createClipPath({id:g.element.id+"_clippathLabel"}),g.createClipPath(h,1,null,!1,g.progressThickness||g.themeStyle.linearProgressThickness,!0),b.appendChild(h),t.setAttribute("style","clip-path:url(#"+g.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(t,e?g.previousLabelWidth:0,v-(e?g.previousLabelWidth:0),g,this.delay,s.width)),g.svgObject.appendChild(b),g.previousLabelWidth=v)},e.prototype.renderActiveState=function(e,t,n,i,o){var a,s,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?a=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),a=l.renderer.drawPath(s)):(o?(a=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),a=l.renderer.drawPath(s)),l.segmentCount>1&&!this.isRange&&a.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&a.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);a.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(a),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,a)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(x,"linearGradient"),a=[];a=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var s=0;s<a.length;s++)n=document.createElementNS(x,"stop"),n=p(a[s],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var a="",s=r,l=i;switch(o){case"start":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":a="M"+e+","+t+" h"+(s-l)+" a"+l+","+l+" 0 0 1 "+l+","+l+" v"+(n-2*l)+" a"+l+","+l+" 0 0 1 "+-l+","+l+" h"+(i-s)+" v"+-n+" z";break;case"none":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:a="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return a},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,a,s){for(var l,c,p,u,h=a.progressRect.x,d=a.progressRect.y,g=a.progressRect.width,m=a.gapWidth||a.themeStyle.linearGapWidth,y=(g-(a.segmentCount-1)*m)/a.segmentCount,f=a.renderer.createGroup({id:a.element.id+e+"SegmentGroup"}),v=1;v<=a.segmentCount;v++)if(c=1===v||v===a.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(a.element.id+e+v,t,0,"none",a.themeStyle.trackOpacity,"0",this.cornerRadius(h,d,y,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m;else if(p=o<y?o:y,l=new r.PathOption(a.element.id+e+v,t,0,"none",s,"0",this.cornerRadius(h,d,p,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m,(o-=y+m)<=0)break;return f},e}(),M=function(){function e(e){this.segment=new I,this.animation=new O,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var a=n.argsData.trackColor||n.themeStyle.circularTrackColor,s=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,u=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var h=new r.PathOption(n.element.id+"_Circulartrack",s,p,a,n.themeStyle.trackOpacity,"0",u),d=n.renderer.drawPath(h);n.trackWidth=d.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),d.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||d.setAttribute("stroke-linecap","round"),i.appendChild(d),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,a,s,p,u,h,d,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),a=null===(a=c(y.innerRadius,this.availableSize))?0:a,y.previousTotalEnd=u=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-u:u))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(u-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,a,f,i,y.enableRtl,y.enablePieProgress),P=this.checkingCircularProgressColor(),R=y.enablePieProgress?P:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,k=new r.PathOption(y.element.id+"_Circularprogress",R,C,P,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(k).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,a,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?h=this.segment.createCircularRange(this.centerX,this.centerY,a,y):(n?(s=(h=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),h.setAttribute("stroke",P),h.setAttribute("d",b)):h=y.renderer.drawPath(k),y.segmentCount>1&&!y.enablePieProgress&&h.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&h.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,h=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,a,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(h),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,a,C,b,v,u,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,d=y.createClipPath(y.clipPath,null,n?s:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,a,v,u,d,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&d.setAttribute("d",l(this.centerX,this.centerY,a+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?h:d,y,f,v,this.centerX,this.centerY,a,S,d))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,a,s,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),u=(e.startAngle+(e.enableRtl?-p:p))%360,h=l(this.centerX,this.centerY,t,e.startAngle,u,e.enableRtl,e.enablePieProgress),d=this.checkingCircularProgressColor(),g=e.enablePieProgress?d:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,d,e.themeStyle.bufferOpacity,"0",h);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?n:e.totalAngle,a=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,s,a)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,u,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(e){void 0===e&&(e=!1);var t,n,i,o,a,s=this.progress,l=s.labelStyle.text,c=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(c.id)&&document.getElementById(c.id).remove();var p=(s.value-s.minimum)/(s.maximum-s.minimum)*100,u=s.value<s.minimum||s.value>s.maximum?0:Math.round(p),h={cancel:!1,text:l||String(u)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(o=r.measureText(h.text,s.labelStyle),i=this.centerY+o.height/2,a=new R(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,i,s.progressRect.width,s.progressRect.height),n=s.renderer.createText(a,h.text),c.appendChild(n),s.animation.enable&&!s.isIndeterminate&&(t=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,t=s.value<s.minimum||s.value>s.maximum?0:t,this.animation.doLabelAnimation(n,e?s.previousWidth:s.startAngle,t,s,this.delay)),s.svgObject.appendChild(c),s.previousWidth=t)},e.prototype.renderActiveState=function(e,t,n,i,o,a,s){var l,c,p=this.progress,u=n+1;s?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",u,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var h=p.createClipPath(p.clipPath,null,"",s);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,a,h,p,u,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),G=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),B=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},W=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new D(n),n.circular=new M(n),n.annotateAnimation=new O,n.destroyIndeterminate=!1,n}return G(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new y(0,0,0,0),this.progressSize=new f(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect();if(r.getElement(this.svgObject.id)){var n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"}},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e;r=t<r&&"Round"===this.cornerRadius?t:r;var i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&359.99===this.totalAngle?this.segmentCount:this.segmentCount-1,n=359.99===this.totalAngle||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,a,s){var l,c,p,u,h,d,g=this.progressRect.x,m=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(u=g,d=m*t,u+=a?0:-4,h=this.progressRect.y,d+=!a&&s||this.isIndeterminate?4:0):(u=this.enableRtl&&!a?g+m+("Round"===this.cornerRadius?o/10:0):g-("Round"===this.cornerRadius?o/10:0),d=m*t,h=this.progressRect.y+this.progressRect.height/2-o/2,d+="Round"!==this.cornerRadius||a?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect"+(a?"label":""))).setAttribute("width",d.toString()),this.isActive&&l.setAttribute("x",u.toString())):(c=new b(this.element.id+"_clippathrect"+(a?"label":""),"transparent",1,"transparent",1,new y(u,h,o,d)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=g(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new f(0,0),previousSize:new f(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);t.currentSize=e.progressSize,e.trigger("resized",t),null!==e.width&&null!==e.height||t.cancel||(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements())},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++)switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(!0),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):(this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth),this.showProgressValue&&this.linear.renderLinearLabel(!0));break;case"animation":this.createSVG(),this.renderElements()}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},B([t.Property("Linear")],n.prototype,"type",void 0),B([t.Property(null)],n.prototype,"value",void 0),B([t.Property(null)],n.prototype,"secondaryProgress",void 0),B([t.Property(0)],n.prototype,"minimum",void 0),B([t.Property(100)],n.prototype,"maximum",void 0),B([t.Property(0)],n.prototype,"startAngle",void 0),B([t.Property(0)],n.prototype,"endAngle",void 0),B([t.Property("100%")],n.prototype,"radius",void 0),B([t.Property("100%")],n.prototype,"innerRadius",void 0),B([t.Property(1)],n.prototype,"segmentCount",void 0),B([t.Property(null)],n.prototype,"gapWidth",void 0),B([t.Property("")],n.prototype,"segmentColor",void 0),B([t.Property("Auto")],n.prototype,"cornerRadius",void 0),B([t.Property(null)],n.prototype,"height",void 0),B([t.Property(null)],n.prototype,"width",void 0),B([t.Property(!1)],n.prototype,"isIndeterminate",void 0),B([t.Property(!1)],n.prototype,"isActive",void 0),B([t.Property(!1)],n.prototype,"isGradient",void 0),B([t.Property(!1)],n.prototype,"isStriped",void 0),B([t.Property("Auto")],n.prototype,"role",void 0),B([t.Property(!1)],n.prototype,"enableRtl",void 0),B([t.Property(!0)],n.prototype,"labelOnTrack",void 0),B([t.Property(null)],n.prototype,"trackColor",void 0),B([t.Property(null)],n.prototype,"progressColor",void 0),B([t.Property(0)],n.prototype,"trackThickness",void 0),B([t.Property(0)],n.prototype,"progressThickness",void 0),B([t.Property(!1)],n.prototype,"enablePieProgress",void 0),B([t.Property("Fabric")],n.prototype,"theme",void 0),B([t.Property(!1)],n.prototype,"showProgressValue",void 0),B([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),B([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},w)],n.prototype,"labelStyle",void 0),B([t.Complex({},A)],n.prototype,"margin",void 0),B([t.Complex({},T)],n.prototype,"animation",void 0),B([t.Event()],n.prototype,"load",void 0),B([t.Event()],n.prototype,"textRender",void 0),B([t.Event()],n.prototype,"loaded",void 0),B([t.Event()],n.prototype,"valueChanged",void 0),B([t.Event()],n.prototype,"progressCompleted",void 0),B([t.Event()],n.prototype,"animationComplete",void 0),B([t.Event()],n.prototype,"mouseClick",void 0),B([t.Event()],n.prototype,"mouseMove",void 0),B([t.Event()],n.prototype,"mouseUp",void 0),B([t.Event()],n.prototype,"mouseDown",void 0),B([t.Event()],n.prototype,"mouseLeave",void 0),B([t.Collection([{}],F)],n.prototype,"annotations",void 0),B([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=B([t.NotifyPropertyChanges],n)}(t.Component);return W.Inject(z),e.ProgressBar=W,e.Margin=A,e.Font=w,e.Animation=T,e.ProgressAnnotationSettings=F,e.RangeColor=E,e.ProgressAnnotation=z,e.Rect=y,e.Size=f,e.Pos=v,e.RectOption=b,e.ColorValue=P,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=a,e.TextOption=R,e.degreeToLocation=s,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=u,e.annotationRender="annotationRender",e.getElement=h,e.removeElement=d,e.ProgressLocation=S,e.ProgressAnimation=O,e}({},ej.base,ej.svgbase),this.ejs=ej;
this.ej=this.ej||{},this.ej.progressbar=function(e,t,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new P(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new P(255,255,255)}function a(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new P(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function s(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,a){var l=s(e,t,r,n),c=s(e,t,r,i),p="0",u=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return a?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+u+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function u(e,t,r,n,i){var o=i?r:-r,a=t+(i?-r:r);return o*Math.cos(e/n*(Math.PI/2))+a}function h(e){return document.getElementById(e)}function d(e){if(!e)return null;var r="string"==typeof e?h(e):e;r&&t.remove(r)}function g(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;case"Tailwind":t={linearTrackColor:"#E5E7EB",linearProgressColor:"#4F46E5",circularTrackColor:"#E5E7EB",circularProgressColor:"#4F46E5",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Inter",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#15803D",danger:"#DC2626",warning:"#C2410C",info:"#0E7490"};break;case"TailwindDark":t={linearTrackColor:"#4B5563",linearProgressColor:"#22D3EE",circularTrackColor:"#4B5563",circularProgressColor:"#22D3EE",backgroundColor:"transparent",fontColor:"#D1D5DB",linearFontFamily:"Inter",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Interr",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#22C55E",danger:"#F87171",warning:"#ea580c",info:"#06B6D4"};break;case"FabricDark":case"BootstrapDark":case"MaterialDark":t={linearTrackColor:"#C8C8C8",linearProgressColor:"#9A9A9A",circularTrackColor:"#C8C8C8",circularProgressColor:"#9A9A9A",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#22b24b",danger:"#ac2a2a",warning:"#ffca1c",info:"#489bd5"};break;case"Bootstrap5":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#0D6EFD",circularTrackColor:"#E9ECEF",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#198754",danger:"#DC3545",warning:"#FFC107",info:"#0DCAF0"};break;case"Bootstrap5Dark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#21B26F",danger:"#E4606D",warning:"#FFC107",info:"#0DCAF0"};break;case"Fluent":t={linearTrackColor:"#F3F2F1",linearProgressColor:"#0D6EFD",circularTrackColor:"#F3F2F1",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;case"FluentDark":t={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",fontColor:"#0D6EFD",linearFontFamily:"Helvetica Neue",linearFontStyle:"Normal",linearFontSize:"12",circularFontFamily:"Helvetica Neue",circularFontStyle:"Normal",circularFontSize:"14",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}var m=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),y=function(){function e(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}return e}(),f=function(){function e(e,t){this.height=e,this.width=t}return e}(),v=function(){function e(e,t){this.x=e,this.y=t}return e}(),b=function(e){function t(t,r,n,i,o,a,s,l,c,p){var u=e.call(this,t,r,n,i,o,p)||this;return u.y=a.y,u.x=a.x,u.height=a.height,u.width=a.width,u.rx=s||0,u.ry=l||0,u.transform=c||"",u.stroke=0!==n&&""!==u.stroke?i:"transparent",u}return m(t,e),t}(r.PathOption),P=function(){function e(e,t,r){this.r=e,this.g=t,this.b=r}return e}(),R=function(){function e(e,t,r,n,i,o,a,s,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=a,this.x=s,this.y=l,this.width=c||0,this.height=p||0}return e}(),S=function(){function e(e,t){this.x=e,this.y=t}return e}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),k=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},A=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(10)],r.prototype,"top",void 0),k([t.Property(10)],r.prototype,"bottom",void 0),k([t.Property(10)],r.prototype,"left",void 0),k([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("Normal")],r.prototype,"fontStyle",void 0),k([t.Property("16px")],r.prototype,"size",void 0),k([t.Property("Normal")],r.prototype,"fontWeight",void 0),k([t.Property("")],r.prototype,"color",void 0),k([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),k([t.Property(1)],r.prototype,"opacity",void 0),k([t.Property("Far")],r.prototype,"textAlignment",void 0),k([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(!1)],r.prototype,"enable",void 0),k([t.Property(2e3)],r.prototype,"duration",void 0),k([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),F=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property(null)],r.prototype,"content",void 0),k([t.Property(0)],r.prototype,"annotationAngle",void 0),k([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),k([t.Property("")],r.prototype,"color",void 0),k([t.Property(null)],r.prototype,"start",void 0),k([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),x="http://www.w3.org/2000/svg",L=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){return this.annotation=e,t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(d(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:"annotationRender",content:t,location:e};if(this.control.trigger("annotationRender",n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var a=Math.round(this.control.progressSize.width/2.25),s=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+a,r=i*Math.sin(t)+s}return{top:r,left:n}},e}(),O=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),h=l.getAttribute("x"),d=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(h,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(h,10)-y;l.style.visibility="hidden",s.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,parseInt(h,10),parseInt(p,10),!0),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("x",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=a.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),d=u(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("width",g.toString())):(g=u(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",h.toString()),a.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&a.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var a=this,s=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),h=0,d=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;s.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(h=u(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString())):(h=u(e.timeStamp,d,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(h,r,n)):l.setAttribute("x",h.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",d.toString()),i.destroyIndeterminate||a.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),a=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,a,s,c,p,h,d,g){var m=this,y=new t.Animation({}),f=a,v=s.startAngle,b=n+c/2,P=0,R=0,S=s.isActive?3e3:s.animation.duration;v+="Round"===s.cornerRadius&&359.99!==o&&0!==o?s.enableRtl?.45*c:-.45*c:0,o+="Round"===s.cornerRadius&&359.99!==o&&0!==o?.45*c:0,i+="Round"===s.cornerRadius&&359.99!==o&&0!==o?s.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(h)?v:h,k=t.isNullOrUndefined(h)?o:o-d;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){s.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),s.isActive?(P=m.activeAnimate(t.timeStamp/t.duration,C,k,s.enableRtl),R=u(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",R.toString()),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))):(P=u(t.timeStamp,C,k,t.duration,s.enableRtl),f.setAttribute("d",l(e,r,b,v,P%360,s.enableRtl,!0))))},end:function(){s.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,s.enableRtl,!0)),s.isActive&&m.doCircularAnimation(e,r,n,i,o,a,s,c,p,h,d,g),s.trigger("animationComplete",{value:s.value,trackColor:s.trackColor,progressColor:s.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,a,s,c,p){var u=this,h=new t.Animation({}),d=s+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;h.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,a,d,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||u.doCircularIndeterminate(e,r,n,i,o,a,s,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,a){var s,l,c=new t.Animation({}),p=new t.Animation({}),h=e.innerHTML,d=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(s=i.enableRtl?i.progressRect.x+i.progressRect.width+a/2:r-a/2,s=s<=0?0:s,l=i.enableRtl?s-v:v-s),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,t.name="SlideRight","Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n,t.duration,!1),m=parseInt((Math.round(d)/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=u(t.timeStamp,s,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),d=u(t.timeStamp,r,n-r,t.duration,!1),m=parseInt((Math.round(d)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=h,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),d=u(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",d.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,a,s,l,c,p=new t.Animation({}),h=0,d=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;d&&r.progressAnnotationModule&&(a=document.getElementById(r.element.id+"Annotation0").children[0])&&a.children[0]&&"SPAN"===a.children[0].tagName&&(o=a.children[0]),s=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=s=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:s,r.annotateEnd=g+s,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?s:s-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,d&&o&&(h=u(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(h)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),_=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),z=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new O,n.progress=t,n.annotations=r,n}return _(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(L),I=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,a){var s=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=a/e.segmentCount,u=a-(e.segmentCount-1)*c;u=(u-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var h,d,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,P="Round"===e.cornerRadius?n-.9*o:n,R=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)h=P<u?P:u,b<e.segmentColor.length?(d=e.segmentColor[b],b++):(b=0,d=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",R,d,i,"0",this.getLinearSegmentPath(s,l,h,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),s+=e.enableRtl?-u-y:u+y,P=(P-=u+y)<0?0:P;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,a,s,c,p,u){var h=e.startAngle,d=this.widthToAngle(e.minimum,e.maximum,a,e.totalAngle);d-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,u,.45*c,p):0;var g=u-(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,u,u/e.segmentCount,p);m-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,u,.45*c,p):0;var y=this.widthToAngle(0,u,g,p),f=this.widthToAngle(0,u,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,u,.9*c,p):0;for(var v,b,P,R,S,C=e.renderer.createGroup({id:e.element.id+t}),k=Math.floor(d/m),A=Math.ceil((d-f*k)/y),w=(h+(e.enableRtl?-y:y))%360,T=0,F=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<A;E++)v=l(n,i,o,h,P=e.enableRtl?e.startAngle-d>w?e.startAngle-d:w:e.startAngle+d<w?e.startAngle+d:w,e.enableRtl),T<e.segmentColor.length?(R=e.segmentColor[T],T++):(T=0,R=e.segmentColor[T],T++),S=new r.PathOption(e.element.id+t+E,"none",F,R,s,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),h=P+(e.enableRtl?-f:f),w+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,a,s,l,c,p,u,h,d=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,P=t.value,R=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=P&&y[S].end>=b&&y[S].end<=P,s=e*t.calculateProgressRange(y[S].start,b,P),l=e*t.calculateProgressRange(y[S].end,b,P),c=d+(t.enableRtl?-s:s),p=d+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+R:c:d,p=i?p:d,u=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,a=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,u,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(a),m.appendChild(o),t.isGradient&&(h=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,h,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,a,s,c,p,u,h,d,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,P=i.startAngle,R=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,a=this.widthToAngle(v,b,m[S].start,R),s=this.widthToAngle(v,b,m[S].end,R),a=p?(P+(i.enableRtl?-a:a))%360:P,s=p?(P+(i.enableRtl?-s:s))%360:P,h=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,u=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,h,f,"0",l(e,t,n,a,s,i.enableRtl)),c=i.renderer.drawPath(u),g.appendChild(c),i.isGradient&&(d=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,d,a,s,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var a=[],s={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};a[0]={color:t,colorStop:"50%"},a[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",s,a);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,a,l,c){var p=[],u=s(a,l,o,n),h=s(a,l,o,i),d={id:"circleRangeGrad_"+e,x1:u.x.toString(),x2:h.x.toString(),y1:u.y.toString(),y2:h.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",d,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),D=function(){function e(e){this.segment=new I,this.animation=new O,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,a=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",a,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",a,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,a,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,a,s,l,c,p,u,h=this.progress,d=h.value===h.maximum,g=h.progressRect.width*h.calculateProgressRange(h.value),m=h.calculateProgressRange(h.argsData.value);o=h.progressRect.width*(h.isIndeterminate&&!h.enableProgressSegments?1:m),l=e?r.getElement(h.element.id+"_LinearProgressGroup"):h.renderer.createGroup({id:h.element.id+"_LinearProgressGroup"});var y=h.progressThickness||h.themeStyle.linearProgressThickness,f=h.isStriped?"url(#"+h.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===h.cornerRadius?new r.PathOption(h.element.id+"_Linearprogress",f,0,"none",h.themeStyle.progressOpacity,"0",this.cornerRadius(h.progressRect.x,h.progressRect.y,o,y,4,d||h.isIndeterminate?"":"start")):new r.PathOption(h.element.id+"_Linearprogress","none",y,f,h.themeStyle.progressOpacity,"0",h.getPathLine(h.progressRect.x,o,y)),h.progressWidth=h.renderer.drawPath(n).getTotalLength(),h.segmentSize=h.enableProgressSegments?h.calculateSegmentSize(h.progressWidth,y):h.segmentSize,null===h.secondaryProgress||h.isIndeterminate||this.renderLinearBuffer(h),null!==h.argsData.value&&("Round4px"===h.cornerRadius?i=h.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",f,y,!1,o,h,h.themeStyle.progressOpacity):h.renderer.drawPath(n):0===h.segmentColor.length||h.isIndeterminate||this.isRange?this.isRange&&!h.isIndeterminate?i=this.segment.createLinearRange(o,h):(e?((i=r.getElement(h.element.id+"_Linearprogress")).setAttribute("d",h.getPathLine(h.progressRect.x,o,y)),i.setAttribute("stroke",f)):i=h.renderer.drawPath(n),h.segmentCount>1&&i.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&m&&i.setAttribute("stroke-linecap","round")):(p=h.enableProgressSegments?h.progressWidth:h.trackWidth,i=this.segment.createLinearSegment(h,"_LinearProgressSegment",o,h.themeStyle.progressOpacity,y,p)),l.appendChild(i),h.isStriped&&!h.isIndeterminate&&(u=this.checkingLinearProgressColor(),this.renderLinearStriped(u,l,h)),!h.isActive||h.isIndeterminate||h.isStriped||this.renderActiveState(l,m,o,y,e),!h.animation.enable||h.isIndeterminate||h.isActive||h.isStriped||(c=null!==h.secondaryProgress?h.animation.delay+(this.bufferWidth-o):h.animation.delay,this.delay=c,a=h.createClipPath(h.clipPath,m,null,e,y,!1,"Round4px"===h.cornerRadius&&d),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearAnimation(a,h,c,e?t:0)),h.isIndeterminate&&(s=h.createClipPath(h.clipPath,h.enableProgressSegments?1:m,null,e,y,h.enableProgressSegments),l.appendChild(h.clipPath),i.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),this.animation.doLinearIndeterminate(h.enableProgressSegments?i:s,o,y,h,s)),h.svgObject.appendChild(l),h.previousWidth=g)},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,a,s=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,u=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",u,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",u,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,s?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,u,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,a))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&s),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(e){void 0===e&&(e=!1);var t,n,i,s,l,c,p,u,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,g=this.progress,m=g.labelStyle.textAlignment,y=g.labelStyle.text,f=this.checkingLinearProgressColor(),v=g.progressRect.width*g.calculateProgressRange(g.value),b=g.renderer.createGroup({id:g.element.id+"_LinearLabelGroup"});document.getElementById(b.id)&&document.getElementById(b.id).remove();var P=(g.value-g.minimum)/(g.maximum-g.minimum)*100,S=g.value<g.minimum||g.value>g.maximum?0:Math.round(P),C=o(a(f)),k=Math.round((299*C.r+587*C.g+114*C.b)/1e3),A={cancel:!1,text:y||String(S)+"%",color:g.labelStyle.color};g.trigger("textRender",A),A.cancel||(s=r.measureText(A.text,g.labelStyle),c=g.enableRtl?g.progressRect.x+g.progressRect.width-s.width/2:g.progressRect.x+s.width/2,g.labelOnTrack?"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?(u=g.enableRtl?g.progressRect.x+g.progressRect.width-v/2:g.progressRect.x+v/2,n=(g.enableRtl?u<=c:u>=c)?u:c):(p=g.enableRtl?g.progressRect.x+g.progressRect.width-v+s.width/2:g.progressRect.x+v-s.width/2,p+=g.enableRtl?5:-5,n=(g.enableRtl?p<=c:p>=c)?p:c):"Near"===m?n=c+(g.enableRtl?-5:5):"Center"===m?n=(g.progressRect.x+g.progressRect.width)/2:(n=g.enableRtl?g.progressRect.x+s.width/2:g.progressRect.x+g.progressRect.width-s.width/2,n+=g.enableRtl?5:-5),i="Round4px"===this.progress.cornerRadius?g.progressRect.y+d/2+s.height/4:g.progressRect.y+g.progressRect.height/2+s.height/4,l=new R(g.element.id+"_linearLabel",g.labelStyle.size||g.themeStyle.linearFontSize,g.labelStyle.fontStyle||g.themeStyle.linearFontStyle,g.labelStyle.fontFamily||g.themeStyle.linearFontFamily,g.labelStyle.fontWeight,"middle",A.color||(k>=128?"black":"white"),n,i),t=g.renderer.createText(l,A.text),b.appendChild(t),g.animation.enable&&!g.isIndeterminate&&(h=g.renderer.createClipPath({id:g.element.id+"_clippathLabel"}),g.createClipPath(h,1,null,!1,g.progressThickness||g.themeStyle.linearProgressThickness,!0),b.appendChild(h),t.setAttribute("style","clip-path:url(#"+g.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(t,e?g.previousLabelWidth:0,v-(e?g.previousLabelWidth:0),g,this.delay,s.width)),g.svgObject.appendChild(b),g.previousLabelWidth=v)},e.prototype.renderActiveState=function(e,t,n,i,o){var a,s,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?a=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),a=l.renderer.drawPath(s)):(o?(a=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),a=l.renderer.drawPath(s)),l.segmentCount>1&&!this.isRange&&a.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&a.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);a.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(a),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,a)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(x,"linearGradient"),a=[];a=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var s=0;s<a.length;s++)n=document.createElementNS(x,"stop"),n=p(a[s],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var a="",s=r,l=i;switch(o){case"start":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":a="M"+e+","+t+" h"+(s-l)+" a"+l+","+l+" 0 0 1 "+l+","+l+" v"+(n-2*l)+" a"+l+","+l+" 0 0 1 "+-l+","+l+" h"+(i-s)+" v"+-n+" z";break;case"none":a="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:a="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return a},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,a,s){for(var l,c,p,u,h=a.progressRect.x,d=a.progressRect.y,g=a.progressRect.width,m=a.gapWidth||a.themeStyle.linearGapWidth,y=(g-(a.segmentCount-1)*m)/a.segmentCount,f=a.renderer.createGroup({id:a.element.id+e+"SegmentGroup"}),v=1;v<=a.segmentCount;v++)if(c=1===v||v===a.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(a.element.id+e+v,t,0,"none",a.themeStyle.trackOpacity,"0",this.cornerRadius(h,d,y,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m;else if(p=o<y?o:y,l=new r.PathOption(a.element.id+e+v,t,0,"none",s,"0",this.cornerRadius(h,d,p,n,4,c)),u=a.renderer.drawPath(l),f.appendChild(u),h+=y+m,(o-=y+m)<=0)break;return f},e}(),M=function(){function e(e){this.segment=new I,this.animation=new O,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var a=n.argsData.trackColor||n.themeStyle.circularTrackColor,s=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,u=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var h=new r.PathOption(n.element.id+"_Circulartrack",s,p,a,n.themeStyle.trackOpacity,"0",u),d=n.renderer.drawPath(h);n.trackWidth=d.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),d.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||d.setAttribute("stroke-linecap","round"),i.appendChild(d),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,a,s,p,u,h,d,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),a=null===(a=c(y.innerRadius,this.availableSize))?0:a,y.previousTotalEnd=u=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-u:u))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(u-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,a,f,i,y.enableRtl,y.enablePieProgress),P=this.checkingCircularProgressColor(),R=y.enablePieProgress?P:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,k=new r.PathOption(y.element.id+"_Circularprogress",R,C,P,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(k).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,a,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?h=this.segment.createCircularRange(this.centerX,this.centerY,a,y):(n?(s=(h=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),h.setAttribute("stroke",P),h.setAttribute("d",b)):h=y.renderer.drawPath(k),y.segmentCount>1&&!y.enablePieProgress&&h.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&h.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,h=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,a,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(h),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,a,C,b,v,u,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,d=y.createClipPath(y.clipPath,null,n?s:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,a,v,u,d,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&d.setAttribute("d",l(this.centerX,this.centerY,a+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),h.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?h:d,y,f,v,this.centerX,this.centerY,a,S,d))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,a,s,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),u=(e.startAngle+(e.enableRtl?-p:p))%360,h=l(this.centerX,this.centerY,t,e.startAngle,u,e.enableRtl,e.enablePieProgress),d=this.checkingCircularProgressColor(),g=e.enablePieProgress?d:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,d,e.themeStyle.bufferOpacity,"0",h);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?n:e.totalAngle,a=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,s,a)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,u,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(e){void 0===e&&(e=!1);var t,n,i,o,a,s=this.progress,l=s.labelStyle.text,c=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(c.id)&&document.getElementById(c.id).remove();var p=(s.value-s.minimum)/(s.maximum-s.minimum)*100,u=s.value<s.minimum||s.value>s.maximum?0:Math.round(p),h={cancel:!1,text:l||String(u)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(o=r.measureText(h.text,s.labelStyle),i=this.centerY+o.height/2,a=new R(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,i,s.progressRect.width,s.progressRect.height),n=s.renderer.createText(a,h.text),c.appendChild(n),s.animation.enable&&!s.isIndeterminate&&(t=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,t=s.value<s.minimum||s.value>s.maximum?0:t,this.animation.doLabelAnimation(n,e?s.previousWidth:s.startAngle,t,s,this.delay)),s.svgObject.appendChild(c),s.previousWidth=t)},e.prototype.renderActiveState=function(e,t,n,i,o,a,s){var l,c,p=this.progress,u=n+1;s?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",u,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var h=p.createClipPath(p.clipPath,null,"",s);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,a,h,p,u,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),G=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),B=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a},W=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new D(n),n.circular=new M(n),n.annotateAnimation=new O,n.destroyIndeterminate=!1,n}return G(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new y(0,0,0,0),this.progressSize=new f(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect();if(r.getElement(this.svgObject.id)){var n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"}},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e;r=t<r&&"Round"===this.cornerRadius?t:r;var i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&359.99===this.totalAngle?this.segmentCount:this.segmentCount-1,n=359.99===this.totalAngle||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,a,s){var l,c,p,u,h,d,g=this.progressRect.x,m=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(u=g,d=m*t,u+=a?0:-4,h=this.progressRect.y,d+=!a&&s||this.isIndeterminate?4:0):(u=this.enableRtl&&!a?g+m+("Round"===this.cornerRadius?o/10:0):g-("Round"===this.cornerRadius?o/10:0),d=m*t,h=this.progressRect.y+this.progressRect.height/2-o/2,d+="Round"!==this.cornerRadius||a?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect"+(a?"label":""))).setAttribute("width",d.toString()),this.isActive&&l.setAttribute("x",u.toString())):(c=new b(this.element.id+"_clippathrect"+(a?"label":""),"transparent",1,"transparent",1,new y(u,h,o,d)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=g(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new f(0,0),previousSize:new f(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);t.currentSize=e.progressSize,e.trigger("resized",t),(null===e.width||null===e.height||e.width.indexOf("%")>-1||e.height.indexOf("%")>-1)&&!t.cancel&&(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements())},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++)switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(!0),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):(this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth),this.showProgressValue&&this.linear.renderLinearLabel(!0));break;case"animation":this.createSVG(),this.renderElements()}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},B([t.Property("Linear")],n.prototype,"type",void 0),B([t.Property(null)],n.prototype,"value",void 0),B([t.Property(null)],n.prototype,"secondaryProgress",void 0),B([t.Property(0)],n.prototype,"minimum",void 0),B([t.Property(100)],n.prototype,"maximum",void 0),B([t.Property(0)],n.prototype,"startAngle",void 0),B([t.Property(0)],n.prototype,"endAngle",void 0),B([t.Property("100%")],n.prototype,"radius",void 0),B([t.Property("100%")],n.prototype,"innerRadius",void 0),B([t.Property(1)],n.prototype,"segmentCount",void 0),B([t.Property(null)],n.prototype,"gapWidth",void 0),B([t.Property("")],n.prototype,"segmentColor",void 0),B([t.Property("Auto")],n.prototype,"cornerRadius",void 0),B([t.Property(null)],n.prototype,"height",void 0),B([t.Property(null)],n.prototype,"width",void 0),B([t.Property(!1)],n.prototype,"isIndeterminate",void 0),B([t.Property(!1)],n.prototype,"isActive",void 0),B([t.Property(!1)],n.prototype,"isGradient",void 0),B([t.Property(!1)],n.prototype,"isStriped",void 0),B([t.Property("Auto")],n.prototype,"role",void 0),B([t.Property(!1)],n.prototype,"enableRtl",void 0),B([t.Property(!0)],n.prototype,"labelOnTrack",void 0),B([t.Property(null)],n.prototype,"trackColor",void 0),B([t.Property(null)],n.prototype,"progressColor",void 0),B([t.Property(0)],n.prototype,"trackThickness",void 0),B([t.Property(0)],n.prototype,"progressThickness",void 0),B([t.Property(!1)],n.prototype,"enablePieProgress",void 0),B([t.Property("Fabric")],n.prototype,"theme",void 0),B([t.Property(!1)],n.prototype,"showProgressValue",void 0),B([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),B([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},w)],n.prototype,"labelStyle",void 0),B([t.Complex({},A)],n.prototype,"margin",void 0),B([t.Complex({},T)],n.prototype,"animation",void 0),B([t.Event()],n.prototype,"load",void 0),B([t.Event()],n.prototype,"textRender",void 0),B([t.Event()],n.prototype,"loaded",void 0),B([t.Event()],n.prototype,"valueChanged",void 0),B([t.Event()],n.prototype,"progressCompleted",void 0),B([t.Event()],n.prototype,"animationComplete",void 0),B([t.Event()],n.prototype,"mouseClick",void 0),B([t.Event()],n.prototype,"mouseMove",void 0),B([t.Event()],n.prototype,"mouseUp",void 0),B([t.Event()],n.prototype,"mouseDown",void 0),B([t.Event()],n.prototype,"mouseLeave",void 0),B([t.Collection([{}],F)],n.prototype,"annotations",void 0),B([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=B([t.NotifyPropertyChanges],n)}(t.Component);return W.Inject(z),e.ProgressBar=W,e.Margin=A,e.Font=w,e.Animation=T,e.ProgressAnnotationSettings=F,e.RangeColor=E,e.ProgressAnnotation=z,e.Rect=y,e.Size=f,e.Pos=v,e.RectOption=b,e.ColorValue=P,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=a,e.TextOption=R,e.degreeToLocation=s,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=u,e.annotationRender="annotationRender",e.getElement=h,e.removeElement=d,e.ProgressLocation=S,e.ProgressAnimation=O,e}({},ej.base,ej.svgbase),this.ejs=ej;
//# sourceMappingURL=ej2-progressbar.min.js.map
/*!
* filename: index.d.ts
* version : 20.1.55
* version : 20.1.57
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-progressbar@*",
"_id": "@syncfusion/ej2-progressbar@20.1.52",
"_id": "@syncfusion/ej2-progressbar@20.1.55",
"_inBundle": false,
"_integrity": "sha512-1W/GihnxD6Wn1h7ohRCjGFYKKDCevmuR/QMva/CKe/irK4fd30j+voIYzwn/Y1OEmckXlcw3ZYe3s28djViMKA==",
"_integrity": "sha512-e6/RlZmMWVrXwSMrrDBdYLId7bf3iHdXZnwfDrSiW4QjL+1CjrMnk8cf+jojUSsbDnfe0d4m2AHA0MtG9/neqA==",
"_location": "/@syncfusion/ej2-progressbar",

@@ -26,4 +26,4 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-progressbar/-/ej2-progressbar-20.1.52.tgz",
"_shasum": "64212ab138201500dcbf35a466592b872a73d6df",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-progressbar/-/ej2-progressbar-20.1.55.tgz",
"_shasum": "634e1685a8dc4aa40e15bc0152e4ce981dbf6ccb",
"_spec": "@syncfusion/ej2-progressbar@*",

@@ -36,3 +36,3 @@ "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~20.1.55",
"@syncfusion/ej2-base": "~20.1.56",
"@syncfusion/ej2-data": "~20.1.55",

@@ -59,4 +59,4 @@ "@syncfusion/ej2-svg-base": "~20.1.55"

"typings": "index.d.ts",
"version": "20.1.55",
"version": "20.1.57",
"sideEffects": false
}

@@ -322,3 +322,4 @@ var __extends = (this && this.__extends) || (function () {

_this.trigger('resized', arg);
if ((_this.width === null || _this.height === null) && !arg.cancel) {
if ((_this.width === null || _this.height === null || _this.width.indexOf("%") > -1 || _this.height.indexOf("%") > -1)
&& !arg.cancel) {
_this.secElement ? _this.secElement.innerHTML = '' : _this.secElement;

@@ -325,0 +326,0 @@ _this.calculateProgressBarSize();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc