UNPKG

@syncfusion/ej2-progressbar

Version:
10 lines 79.4 kB
/*! * filename: ej2-progressbar.min.js * version : 29.2.4 * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ this.ej=this.ej||{},this.ej.progressbar=function(e,t,r){"use strict";function i(e){return"#"+o(e.r)+o(e.g)+o(e.b)}function o(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function n(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 o;return 0!==e.indexOf("rgb")&&0!==e.indexOf("hsl")||(o=(e=e.replace(/\s/g,"").replace(/[()]/g,"")).slice(3).split(",")),i(new P(parseInt(o[3],10),parseInt(o[4],10),parseInt(o[5],10)))}function s(e,t,r,i){var o=(i-90)*(Math.PI/180);return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}}function l(e,t,r,i,o,n,a){var l=s(e,t,r,i),c=s(e,t,r,o),p="0",h=n?"0":"1";p=n?(i>=o?i:i+360)-o<=180?"0":"1":(o>=i?o:o+360)-i<=180?"0":"1";return a?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+h+" "+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),i=0;i<r.length;i++)t.setAttribute(r[i],e[r[i]]);return t}function h(e,t,r,i,o){var n=o?r:-r,a=t+(o?-r:r);return n*Math.cos(e/i*(Math.PI/2))+a}function d(e){return document.getElementById(e)}function u(e){if(!e)return null;var r="string"==typeof e?d(e):e;r&&t.remove(r)}function g(e){var r;switch(e){case"Material":r={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4",tooltipLabelFont:{color:"rgba(249, 250, 251, 1)",fontFamily:"Roboto",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#000000",fontStyle:"Normal",fontFamily:"Roboto"},circularLabelFont:{size:"12",fontWeight:"500",color:"#000000",fontStyle:"Normal",fontFamily:"Roboto"}};break;case"Bootstrap":r={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0",tooltipLabelFont:{color:"#F9FAFB",fontFamily:"Helvetica Neue",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#000000",fontStyle:"Normal",fontFamily:"Helvetica Neue"},circularLabelFont:{size:"12",fontWeight:"500",color:"#000000",fontStyle:"Normal",fontFamily:"Helvetica Neue"}};break;case"Bootstrap4":r={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8",tooltipLabelFont:{color:"#F9FAFB",fontFamily:"Helvetica Neue",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#000000",fontStyle:"Normal",fontFamily:"Helvetica Neue"},circularLabelFont:{size:"12",fontWeight:"500",color:"#000000",fontStyle:"Normal",fontFamily:"Helvetica Neue"}};break;case"HighContrast":r={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff",tooltipLabelFont:{color:"#000000",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"500",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"Tailwind3":r={linearTrackColor:"#E5E7EB",linearProgressColor:"#4F46E5",circularTrackColor:"#E5E7EB",circularProgressColor:"#4F46E5",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,bufferColor:"#818CF8",linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#111827",tooltipLightLabel:"#F9FAFB",success:"#15803D",danger:"#DC2626",warning:"#C2410C",info:"#0E7490",tooltipLabelFont:{color:"#F9FAFB",fontFamily:"Inter",fontWeight:"500"},linearLabelFont:{size:"10",fontWeight:"500",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Inter"},circularLabelFont:{size:"10",fontWeight:"500",color:"#4F46E5",fontStyle:"Normal",fontFamily:"Inter"}};break;case"Tailwind3Dark":r={linearTrackColor:"#282F3C",linearProgressColor:"#6366F1",circularTrackColor:"#282F3C",circularProgressColor:"#6366F1",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,bufferColor:"#3730A3",linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#F9FAFB",tooltipLightLabel:"#1F2937",success:"#22C55E",danger:"#F87171",warning:"#F97316",info:"#38BDF8",tooltipLabelFont:{color:"#1F2937",fontFamily:"Inter",fontWeight:"500"},linearLabelFont:{size:"10",fontWeight:"500",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Inter"},circularLabelFont:{size:"10",fontWeight:"500",color:"#6366F1",fontStyle:"Normal",fontFamily:"Inter"}};break;case"Tailwind":r={linearTrackColor:"#E5E7EB",linearProgressColor:"#4F46E5",circularTrackColor:"#E5E7EB",circularProgressColor:"#4F46E5",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#15803D",danger:"#DC2626",warning:"#C2410C",info:"#0E7490",tooltipLabelFont:{color:"#F9FAFB",fontFamily:"Inter",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Inter"},circularLabelFont:{size:"12",fontWeight:"500",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Inter"}};break;case"TailwindDark":r={linearTrackColor:"#4B5563",linearProgressColor:"#22D3EE",circularTrackColor:"#4B5563",circularProgressColor:"#22D3EE",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#22C55E",danger:"#F87171",warning:"#ea580c",info:"#06B6D4",tooltipLabelFont:{color:"#1F2937",fontFamily:"Inter",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#D1D5DB",fontStyle:"Normal",fontFamily:"Inter"},circularLabelFont:{size:"12",fontWeight:"500",color:"#D1D5DB",fontStyle:"Normal",fontFamily:"Inter"}};break;case"FabricDark":case"BootstrapDark":case"MaterialDark":r={linearTrackColor:"#C8C8C8",linearProgressColor:"#9A9A9A",circularTrackColor:"#C8C8C8",circularProgressColor:"#9A9A9A",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#22b24b",danger:"#ac2a2a",warning:"#ffca1c",info:"#489bd5",tooltipLabelFont:{color:"BootstrapDark"===e?"#1A1A1A":"FabricDark"===e?"#DADADA":"rgba(18, 18, 18, 1)",fontFamily:"BootstrapDark"===e?"Helvetica Neue":"FabricDark"===e?"Segoe UI":"Roboto",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#000000",fontStyle:"Normal",fontFamily:"BootstrapDark"===e?"Helvetica Neue":"FabricDark"===e?"Segoe UI":"Roboto"},circularLabelFont:{size:"12",fontWeight:"500",color:"#000000",fontStyle:"Normal",fontFamily:"BootstrapDark"===e?"Helvetica Neue":"FabricDark"===e?"Segoe UI":"Roboto"}};break;case"Bootstrap5":r={linearTrackColor:"#DEE2E6",linearProgressColor:"#0D6EFD",circularTrackColor:"#DEE2E6",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:2,circularProgressThickness:2,tooltipFill:"#000000E5",tooltipLightLabel:"#FFFFFF",success:"#198754",danger:"#DC3545",warning:"#FFC107",info:"#0DCAF0",tooltipLabelFont:{color:"#F9FAFB",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"400",color:"#0D6EFD",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"Bootstrap5Dark":r={linearTrackColor:"#495057",linearProgressColor:"#0D6EFD",circularTrackColor:"#495057",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:2,circularProgressThickness:2,tooltipFill:"#FFFFFFE5",tooltipLightLabel:"#212529",success:"#198754",danger:"#DC3545",warning:"#FFC107",info:"#0DCAF0",tooltipLabelFont:{color:"#212529",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"400",color:"#0D6EFD",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"Fluent":r={linearTrackColor:"#F3F2F1",linearProgressColor:"#0D6EFD",circularTrackColor:"#F3F2F1",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.45,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387",tooltipLabelFont:{color:"#323130",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#0D6EFD",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"500",color:"#0D6EFD",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"FluentDark":r={linearTrackColor:"#3B4248",linearProgressColor:"#0D6EFD",circularTrackColor:"#3B4248",circularProgressColor:"#0D6EFD",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387",tooltipLabelFont:{color:"#F3F2F1",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#0D6EFD",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"500",color:"#0D6EFD",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"Fluent2":r={linearTrackColor:"#E6E6E6",linearProgressColor:"#0F6CBD",circularTrackColor:"#E6E6E6",circularProgressColor:"#0F6CBD",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:t.Browser.isDevice?4:2,linearProgressThickness:t.Browser.isDevice?4:2,circularTrackThickness:(t.Browser.isDevice,2),circularProgressThickness:(t.Browser.isDevice,2),tooltipFill:"#FFFFFF",tooltipLightLabel:"#242424",success:"#107C10",danger:"#D13438",warning:"#BC4B09",info:"#008AA9",tooltipLabelFont:{color:"#242424",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"12",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"500",color:"#242424",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"Fluent2Dark":r={linearTrackColor:"#333333",linearProgressColor:"#115EA3",circularTrackColor:"#333333",circularProgressColor:"#115EA3",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:t.Browser.isDevice?4:2,linearProgressThickness:t.Browser.isDevice?4:2,circularTrackThickness:(t.Browser.isDevice,2),circularProgressThickness:(t.Browser.isDevice,2),tooltipFill:"#292929",tooltipLightLabel:"#FFFFFF",success:"#107C10",danger:"#DC626D",warning:"#FAA06B",info:"#0099BC",tooltipLabelFont:{color:"#FFFFFF",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"12",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"500",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"Fluent2HighContrast":r={linearTrackColor:"#000000",linearProgressColor:"#1AEBFF",circularTrackColor:"#000000",circularProgressColor:"#1AEBFF",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:t.Browser.isDevice?4:2,linearProgressThickness:t.Browser.isDevice?4:2,circularTrackThickness:(t.Browser.isDevice,2),circularProgressThickness:(t.Browser.isDevice,2),tooltipFill:"#000000",tooltipLightLabel:"#FFFFFF",success:"#107C10",danger:"#C50F1F",warning:"#F7630C",info:"#0099BC",tooltipLabelFont:{color:"#FFFFFF",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"12",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Segoe UI"}};break;case"Material3":r={linearTrackColor:"#E7E0EC",linearProgressColor:"#6750A4",circularTrackColor:"#E7E0EC",circularProgressColor:"#6750A4",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.24,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#313033",tooltipLightLabel:"#F4EFF4",success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387",tooltipLabelFont:{size:"12px",fontWeight:"400",color:"#F4EFF4",fontStyle:"Normal",fontFamily:"Roboto"},linearLabelFont:{size:"10",fontWeight:"400",color:"#FFFFFF",fontStyle:"Normal",fontFamily:"Roboto"},circularLabelFont:{size:"12",fontWeight:"500",color:"#6750A4",fontStyle:"Normal",fontFamily:"Roboto"}};break;case"Material3Dark":r={linearTrackColor:"#49454F",linearProgressColor:"#D0BCFF",circularTrackColor:"#49454F",circularProgressColor:"#D0BCFF",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.24,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#E6E1E5",tooltipLightLabel:"#313033",success:"#0B6A0B",danger:"#D13438",warning:"#CA5010",info:"#038387",tooltipLabelFont:{color:"#313033",fontFamily:"roboto",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:"#371E73",fontStyle:"Normal",fontFamily:"Roboto"},circularLabelFont:{size:"12",fontWeight:"500",color:"#D0BCFF",fontStyle:"Normal",fontFamily:"Roboto"}};break;default:r={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,tooltipFill:"#ffffff",tooltipLightLabel:"#000000",success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3",tooltipLabelFont:{color:"#333333",fontFamily:"Segoe UI",fontWeight:"400"},linearLabelFont:{size:"10",fontWeight:"400",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},circularLabelFont:{size:"12",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}}return r}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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),y=function(){function e(e,t,r,i){this.x=e,this.y=t,this.height=r,this.width=i}return e}(),f=function(){function e(e,t){this.height=e,this.width=t}return e}(),b=function(){function e(e,t){this.x=e,this.y=t}return e}(),v=function(e){function t(t,r,i,o,n,a,s,l,c,p){var h=e.call(this,t,r,i,o,n,p)||this;return h.y=a.y,h.x=a.x,h.height=a.height,h.width=a.width,h.rx=s||0,h.ry=l||0,h.transform=c||"",h.stroke=0!==i&&""!==h.stroke?o:"transparent",h}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}(),C=function(){function e(e,t,r,i,o,n,a,s,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=i,this["font-weight"]=o,this["text-anchor"]=n,this.fill=a,this.x=s,this.y=l,this.width=c||0,this.height=p||0}return e}(),F=function(){function e(e,t){this.x=e,this.y=t}return e}(),R=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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),S=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},k=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return R(r,e),S([t.Property(10)],r.prototype,"top",void 0),S([t.Property(10)],r.prototype,"bottom",void 0),S([t.Property(10)],r.prototype,"left",void 0),S([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return R(r,e),S([t.Property("Normal")],r.prototype,"fontStyle",void 0),S([t.Property("16px")],r.prototype,"size",void 0),S([t.Property("Normal")],r.prototype,"fontWeight",void 0),S([t.Property("")],r.prototype,"color",void 0),S([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),S([t.Property(null)],r.prototype,"opacity",void 0),S([t.Property("Far")],r.prototype,"textAlignment",void 0),S([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),A=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return R(r,e),S([t.Property(!1)],r.prototype,"enable",void 0),S([t.Property(2e3)],r.prototype,"duration",void 0),S([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return R(r,e),S([t.Property(null)],r.prototype,"content",void 0),S([t.Property(0)],r.prototype,"annotationAngle",void 0),S([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),L=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return R(r,e),S([t.Property("")],r.prototype,"color",void 0),S([t.Property(1)],r.prototype,"width",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return R(r,e),S([t.Property(!1)],r.prototype,"enable",void 0),S([t.Property(null)],r.prototype,"fill",void 0),S([t.Property(null)],r.prototype,"format",void 0),S([t.Property(!1)],r.prototype,"showTooltipOnHover",void 0),S([t.Complex({fontFamily:null,size:"12px",fontWeight:null,fontStyle:"Normal",color:null},T)],r.prototype,"textStyle",void 0),S([t.Complex({color:"#cccccc",width:.5},L)],r.prototype,"border",void 0),r}(t.ChildProperty),x=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return R(r,e),S([t.Property("")],r.prototype,"color",void 0),S([t.Property(null)],r.prototype,"start",void 0),S([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),O="http://www.w3.org/2000/svg",W=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 i=new F(0,0),o=this.render(e,t);o?this.setElementStyle(i,o,r):this.control.redraw&&(u(o.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var i={cancel:!1,name:"annotationRender",content:t,location:e};if(this.control.trigger("annotationRender",i),!i.cancel){var o=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);i.content.style.left=o.left+"px",i.content.style.top=o.top+"px",i.content.style.transform="translate(-50%, -50%)",i.content.setAttribute("aria-label","Annotation"),r.appendChild(i.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,i,o=parseFloat(e);if(0===o&&0===t){var n=this.control.progressRect;i=n.x+n.width/2,r=n.y+n.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);i=o*Math.cos(t)+a,r=o*Math.sin(t)+s}return{top:r,left:i}},e}(),D=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,i,o,n){var a=this,s=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),d=l.getAttribute("x"),u=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(d,10):o,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-o:parseInt(p,10)-m,f=parseInt(d,10)-y;l.style.visibility="hidden",s.animate(l,{duration:0===r.animation.duration&&"Enable"===t.animationMode?2e3:c,delay:i,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(d,10),parseInt(p,10),!0),u=h(e.timeStamp,.5,.5,e.duration,!0),n.setAttribute("opacity",u.toString()),l.setAttribute("x",g.toString())):(g=h(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),u=h(e.timeStamp,.5,.5,e.duration,!0),n.setAttribute("opacity",u.toString()),l.setAttribute("width",g.toString())):(g=h(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",d.toString()),a.doLinearAnimation(e,r,i,o,n)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&a.doLinearAnimation(e,r,i,o,n)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,i,o,n){var a=this,s=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),d=0,u=p?-parseInt(p,10):-r,g=o.progressRect.x+o.progressRect.width+(p?parseInt(p,10):r),m=o.enableProgressSegments?o.animation.duration+1e3:o.animation.duration;s.animate(n,{duration:0===o.animation.duration&&"Enable"===t.animationMode?2e3:m,delay:0,progress:function(e){o.enableRtl&&"Round4px"!==o.cornerRadius?(d=h(e.timeStamp,parseInt(c,10)||o.progressRect.x+r,g,e.duration,!0),o.enableProgressSegments?l.setAttribute("d",o.getPathLine(d,r,i)):l.setAttribute("x",d.toString())):(d=h(e.timeStamp,u,g,e.duration,!1),o.enableProgressSegments?l.setAttribute("d",o.getPathLine(d,r,i)):l.setAttribute("x",d.toString()))},end:function(){o.enableRtl&&!o.enableProgressSegments&&"Round4px"!==o.cornerRadius?l.setAttribute("x",c.toString()):o.enableProgressSegments||l.setAttribute("x",u.toString()),o.destroyIndeterminate||a.doLinearIndeterminate(e,r,i,o,n)}})},e.prototype.doStripedAnimation=function(e,r,i){var o=this,n=new t.Animation({}),a=1e3/r.animation.duration;n.animate(e,{duration:0===r.animation.duration&&"Enable"===t.animationMode?2e3:r.animation.duration,delay:r.animation.delay,progress:function(){i+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+i+") rotate(-45)")},end:function(){r.destroyIndeterminate||o.doStripedAnimation(e,r,i)}})},e.prototype.doCircularAnimation=function(e,r,i,o,n,a,c,p,d,u,g,m){var y=this,f=new t.Animation({}),b=a,v=c.startAngle,P=i+p/2,C=0,F=0,R=c.isActive?3e3:c.animation.duration;if(v+="Round"===c.cornerRadius&&359.99!==n&&0!==n?c.enableRtl?.45*p:-.45*p:0,n+="Round"===c.cornerRadius&&359.99!==n&&0!==n?.45*p:0,o+="Round"===c.cornerRadius&&359.99!==n&&0!==n?c.enableRtl?-.45*p:.45*p:0,"Round"===c.cornerRadius&&359.99!==n&&0!==n&&c.startAngle===c.endAngle)for(var S=s(e,r,P,v).x,k=s(e,r,P,o).x;c.enableRtl!==c.startAngle>=180?k<=S:k>=S;)o+=c.enableRtl?.1:-.1,k=s(e,r,P,o).x;var T=t.isNullOrUndefined(u)?v:u,A=t.isNullOrUndefined(u)?n:n-g;b.setAttribute("visibility","Hidden"),f.animate(b,{duration:0===c.animation.duration&&"Enable"===t.animationMode?2e3:R,delay:d,progress:function(t){c.cancelResize=!0,t.timeStamp>=t.delay&&(b.setAttribute("visibility","visible"),c.isActive?(C=y.activeAnimate(t.timeStamp/t.duration,T,A,c.enableRtl),F=h(t.timeStamp,.5,.5,t.duration,!0),m.setAttribute("opacity",F.toString()),b.setAttribute("d",l(e,r,P,v,C%360,c.enableRtl,!0))):(C=h(t.timeStamp,T,A,t.duration,c.enableRtl),b.setAttribute("d",l(e,r,P,v,C%360,c.enableRtl,!0))))},end:function(){c.cancelResize=!1,b.setAttribute("visibility",""),b.setAttribute("d",l(e,r,P,v,o,c.enableRtl,!0)),c.isActive&&y.doCircularAnimation(e,r,i,o,n,a,c,p,d,u,g,m),c.trigger("animationComplete",{value:c.value,trackColor:c.trackColor,progressColor:c.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,i,o,n,a,s,c,p){var h=this,d=new t.Animation({}),u=s+(r.enableProgressSegments?0:c/2),g=0===r.animation.duration&&"Enable"===t.animationMode?2e3:r.animation.duration,m=r.enableProgressSegments?4e3/g:6e3/g;d.animate(p,{progress:function(){e.style.visibility="visible",i+=r.enableRtl?-m:m,o+=r.enableRtl?-m:m,e.setAttribute("d",l(n,a,u,i%360,o%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||h.doCircularIndeterminate(e,r,i,o,n,a,s,c,p)}})},e.prototype.doLabelAnimation=function(e,r,i,o,n,a){var s,l,c=new t.Animation({}),p=new t.Animation({}),d=e.innerHTML,u=0,g=0,m=0,y=o.labelStyle.text,f=o.labelStyle.textAlignment,b=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===o.type&&(s=o.enableRtl?o.progressRect.x+o.progressRect.width+a/2:r-a/2,s=s<=0?0:s,l=o.enableRtl?s-b:b-s),c.animate(e,{duration:0===o.animation.duration&&"Enable"===t.animationMode?2e3:o.animation.duration,delay:n,progress:function(t){o.cancelResize=!0,t.name="SlideRight","Linear"===o.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,i,t.duration,!1),m=parseInt((Math.round(u)/o.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=h(t.timeStamp,s,l,t.duration,o.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===o.type&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,i-r,t.duration,!1),m=parseInt((Math.round(u)/o.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){o.cancelResize=!1,""===y?(e.innerHTML=d,e.setAttribute("x",b.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),u=h(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",u.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,i,o){var n,a,s,l,c,p=new t.Animation({}),d=0,u=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;u&&r.progressAnnotationModule&&(a=document.getElementById(r.element.id+"Annotation0").children[0])&&a.children[0]&&"SPAN"===a.children[0].tagName&&(n=a.children[0]),s=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=s=r.argsData.value<r.minimum?0:s,r.annotateEnd=g+s,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum?0:Math.round(c);var y=t.isNullOrUndefined(i)?g:i,f=t.isNullOrUndefined(i)?s:s-o;r.argsData.value<=r.minimum?n.innerHTML=c+"%":p.animate(e,{duration:0===r.animation.duration&&"Enable"===t.animationMode?2e3:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,u&&n&&(d=h(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(d)-g)/m*100).toString(),10),n.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,n.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,i){var o=1-Math.pow(1-e,3);return t+(i?-o*r:o*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 i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),z=function(e){function r(t,r){var i=e.call(this,t)||this;return i.animation=new D,i.progress=t,i.annotations=r,i}return I(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var i=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=i||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)}),i||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}(W),B=function(){function e(e){this.text=[],this.previousPosition=0,this.control=e}return e.prototype.tooltip=function(e){var t=document.getElementById(this.control.element.id+"_tooltip"),r=t&&parseInt(t.getAttribute("opacity"),10)>0;if(this.previousPosition=t.style.left?parseInt(t.style.left,10):0,this.renderTooltip(e,this.control,!r),this.control.tooltip.enable&&"Circular"===this.control.type&&this.control.animation.enable&&!this.control.tooltip.showTooltipOnHover){t.style.visibility="hidden";i=this.control.secondaryProgress?this.control.circular.delay+this.control.animation.duration:this.control.animation.duration;this.tooltipDelay(this.control,t,i)}if(this.control.animation.enable&&!this.control.tooltip.showTooltipOnHover&&"Circular"!==this.control.type){var i=this.control.secondaryProgress?this.control.linear.delay:this.control.animation.delay;this.control.secondaryProgress&&(t.style.visibility="hidden"),this.toolTipAnimation(t,this.control,i)}},e.prototype.tooltipDelay=function(e,r,i){new t.Animation({}).animate(r,{duration:e.animation.duration,delay:i,progress:function(e){e.element.style.visibility="visible"}})},e.prototype.toolTipAnimation=function(e,r,i){var o=this,n=new t.Animation({}),a=parseInt(e.style.left,10),s=document.getElementById(this.control.element.id+"_tooltip_svg"),l=parseInt(s.getAttribute("width"),10);n.animate(e,{duration:r.animation.duration,delay:i,progress:function(e){if(r.cancelResize=!0,e.name="SlideRight","Linear"===r.type&&e.timeStamp>=e.delay){e.element.style.visibility="visible";var t=o.previousPosition?o.previousPosition:0-(l/2-o.control.progressRect.x-5),i=o.previousPosition?a-t:a+(l/2-o.control.progressRect.x-5),n=h(e.timeStamp,t,i,e.duration,r.enableRtl);e.element.style.left="",e.element.style.left=n+"px".toString()}},end:function(e){r.cancelResize=!1,e.element.style.left="",e.element.style.left=a+"px".toString()}})},e.prototype.renderTooltip=function(e,t,r){this.textFormat=this.format(this.control.tooltip.showTooltipOnHover&&(e.target.id.indexOf("Linearbuffer")>=0||e.target.id.indexOf("Circularbuffer")>=0)?this.control.secondaryProgress:this.control.value),this.triggerTooltipRender(e,r,this.textFormat)},e.prototype.format=function(e){var t,r=e.toString();return this.control.tooltip.format&&(r=this.control.tooltip.format,t=new RegExp("${value}","gm"),r=r.replace(t.source,e.toString())),r},e.prototype.removeTooltip=function(e){var t=this;document.getElementById(this.control.element.id+"_tooltip")&&(this.fadeInInterval=+setTimeout(function(){t.svgTooltip&&t.svgTooltip.fadeOut()},e))},e.prototype.triggerTooltipRender=function(e,t,r){var i={cancel:!1,name:"tooltipRender",text:r+"%"};if(this.control.trigger("tooltipRender",i),r=i.text,!i.cancel)if(this.text=[].concat(i.text),"Linear"===this.control.type){var o=this.control.linear.linearProgressWidth-2.5+this.control.progressRect.x,n="Round4px"===this.control.cornerRadius?this.control.progressRect.y+5:this.control.progressRect.y+this.control.progressRect.height/2-(this.control.progressThickness?this.control.progressThickness:this.control.themeStyle.linearProgressThickness)/2+5;this.createTooltip(this.control,t,(!this.control.tooltip.enable||this.control.tooltip.showTooltipOnHover)&&e.target.id.indexOf("Linearbuffer")>=0?new F(this.control.linear.bufferWidth-2.5+this.control.progressRect.x,n):new F("Round4px"===this.control.cornerRadius?o-5:o,n),this.control.initialClipRect)}else{var a=this.control.circular.endPosition.x-2.5,s=this.control.circular.endPosition.y+this.control.progressRect.y-2.5;this.createTooltip(this.control,t,(!this.control.tooltip.enable||this.control.tooltip.showTooltipOnHover)&&e.target.id.indexOf("Circularbuffer")>=0?new F(this.control.circular.bufferEndPosition.x-2.5,this.control.circular.bufferEndPosition.y+this.control.progressRect.y-2.5):new F(a,s),this.control.initialClipRect)}this.isRendered=!0},e.prototype.createTooltip=function(e,i,o,n){var a=t.extend({},this.control.tooltip.textStyle,null,!0);a.fontWeight=a.fontWeight||this.control.themeStyle.tooltipLabelFont.fontWeight,i?this.svgTooltip=new r.Tooltip({opacity:this.control.tooltip.textStyle.opacity?this.control.tooltip.textStyle.opacity:"Material3"===this.control.theme||"Material3Dark"===this.control.theme||this.control.theme.indexOf("Bootstrap5")>-1?1:.75,header:"",content:this.text,fill:this.control.tooltip.fill,border:this.control.tooltip.border,enableAnimation:!0,location:o,theme:this.control.theme,areaBounds:n,template:null,offset:7.5,marginX:8,marginY:4.5,textStyle:a,arrowPadding:7,availableSize:this.control.progressSize,duration:300,blazorTemplate:{name:"Template",parent:this.control.tooltip},controlInstance:this.control,enableRTL:e.enableRtl,controlName:"Progressbar"},"#"+this.control.element.id+"_tooltip"):this.svgTooltip&&(this.svgTooltip.location=o,this.svgTooltip.content=this.text,this.svgTooltip.header="",this.svgTooltip.offset=7.5,this.svgTooltip.textStyle=a,this.svgTooltip.areaBounds=n,this.svgTooltip.arrowPadding=7,this.svgTooltip.dataBind())},e.prototype.getModuleName=function(){return"ProgressTooltip"},e.prototype.destroy=function(){},e}(),M=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,i,o,n,a){var s=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*n:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*n:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=a/e.segmentCount,h=a-(e.segmentCount-1)*c;h=(h-("Round"===e.cornerRadius?e.segmentCount*(.9*n):0))/e.segmentCount;for(var d,u,g,m,y="Round"===e.cornerRadius?c+.9*n:c,f=e.renderer.createGroup({id:e.element.id+t}),b=Math.ceil(i/p),v=0,P="Round"===e.cornerRadius?i-.9*n:i,C=e.progressThickness||e.themeStyle.linearProgressThickness,F=0;F<b;F++)d=P<h?P:h,v<e.segmentColor.length?(u=e.segmentColor[v],v++):(v=0,u=e.segmentColor[v],v++),g=new r.PathOption(e.element.id+t+F,"none",C,u,o,"0",this.getLinearSegmentPath(s,l,d,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),s+=e.enableRtl?-h-y:h+y,P=(P-=h+y)<0?0:P;return f},e.prototype.getLinearSegmentPath=function(e,t,r,i){return"M "+e+" "+t+" L"+(e+(i?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,i,o,n,a,s,c,p,h){var d=e.startAngle,u=this.widthToAngle(e.minimum,e.maximum,a,e.totalAngle);u-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,h,.45*c,p):0;var g=h-(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,h,h/e.segmentCount,p);m-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,h,.45*c,p):0;var y=this.widthToAngle(0,h,g,p),f=this.widthToAngle(0,h,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,h,.9*c,p):0;for(var b,v,P,C,F,R=e.renderer.createGroup({id:e.element.id+t}),S=Math.floor(u/m),k=Math.ceil((u-f*S)/y),T=(d+(e.enableRtl?-y:y))%360,A=0,w=e.progressThickness||e.themeStyle.circularProgressThickness,L=0;L<k;L++)b=l(i,o,n,d,P=e.enableRtl?e.startAngle-u>T?e.startAngle-u:T:e.startAngle+u<T?e.startAngle+u:T,e.enableRtl),A<e.segmentColor.length?(C=e.segmentColor[A],A++):(A=0,C=e.segmentColor[A],A++),F=new r.PathOption(e.element.id+t+L,"none",w,C,s,"0",b),v=e.renderer.drawPath(F),"Round"===e.cornerRadius&&v.setAttribute("stroke-linecap","round"),R.appendChild(v),d=P+(e.enableRtl?-f:f),T+=e.enableRtl?-y-f:y+f;return R},e.prototype.widthToAngle=function(e,t,r,i){return(r-e)/(t-e)*i},e.prototype.createLinearRange=function(e,t,i){for(var o,n,a,s,l,c,p,h,d,u,g=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),m=t.progressRect.y+t.progressRect.height/2,y=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),f=t.rangeColors,b=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,P=t.minimum,C=t.value,F=t.enableRtl?.1:-.1,R=0;R<f.length;R++)n=f[R].start>=P&&f[R].start<=C&&f[R].end>=P&&f[R].end<=C,l=e*t.calculateProgressRange(f[R].start,P,C),c=e*t.calculateProgressRange(f[R].end,P,C),p=g+(t.enableRtl?-l:l),h=g+(t.enableRtl?-c:c),p=n?t.isGradient&&R>0?p+F:p:g,h=n?h:g,d=t.isGradient?"url(#lineRangeGrad_"+R+")":f[R].color,s=new r.PathOption(t.element.id+"_LinearRange_"+R,"none",b,d,v,"0","M "+p+" "+m+" L"+h+" "+m),a=t.renderer.drawPath(s),"Round"===t.cornerRadius&&i&&a.setAttribute("stroke-linecap","round"),y.appendChild(a),t.isGradient&&(u=f.length-1===R?f[R].color:f[R+1].color,o=this.setLinearGradientColor(R,f[R].color,u,p,h,t),y.appendChild(o));return y},e.prototype.createCircularRange=function(e,t,i,o){for(var n,a,s,c,p,h,d,u,g=o.renderer.createGroup({id:o.element.id+"_CircularRangeGroup"}),m=o.rangeColors,y=o.progressThickness||o.themeStyle.linearProgressThickness,f=o.themeStyle.progressOpacity,b=o.minimum,v=o.value,P=o.startAngle,C=this.widthToAngle(o.minimum,o.maximum,o.value,o.totalAngle),F=0;F<m.length;F++)p=m[F].start>=b&&m[F].start<=v&&m[F].end>=b&&m[F].end<=v,a=this.widthToAngle(b,v,m[F].start,C),s=this.widthToAngle(b,v,m[F].end,C),a=p?(P+(o.enableRtl?-a:a))%360:P,s=p?(P+(o.enableRtl?-s:s))%360:P,d=o.isGradient?"url(#circleRangeGrad_"+F+")":m[F].color,h=new r.PathOption(o.element.id+"_CircularRange_"+F,"none",y,d,f,"0",l(e,t,i,a,s,o.enableRtl)),c=o.renderer.drawPath(h),"Round"===o.cornerRadius&&a!==s&&c.setAttribute("stroke-linecap","round"),g.appendChild(c),o.isGradient&&(u=m.length-1===F?m[F].color:m[F+1].color,n=this.setCircularGradientColor(F,m[F].color,u,a,s,i,e,t,o),g.appendChild(n));return g},e.prototype.setLinearGradientColor=function(e,t,r,i,o,n){var a=[],s={id:"lineRangeGrad_"+e,x1:i.toString(),x2:o.toString()};a[0]={color:t,colorStop:"50%"},a[1]={color:r,colorStop:"100%"};var l=n.renderer.drawGradient("linearGradient",s,a);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,i,o,n,a,l,c){var p=[],h=s(a,l,n,i),d=s(a,l,n,o),u={id:"circleRangeGrad_"+e,x1:h.x.toString(),x2:d.x.toString(),y1:h.y.toString(),y2:d.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",u,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),_=function(){function e(e){this.segment=new M,this.animation=new D,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,i=this.progress,o=i.renderer.createGroup({id:i.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var n=i.trackThickness||i.themeStyle.linearTrackThickness,a=i.argsData.trackColor||i.themeStyle.linearTrackColor;"Round4px"===i.cornerRadius?i.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",a,n,!0,0,i):(t=new r.PathOption(i.element.id+"_Lineartrack",a,0,"none",i.themeStyle.trackOpacity,"0",this.cornerRadius(i.progressRect.x,i.progressRect.y,i.progressRect.width,n,4,"")),e=i.renderer.drawPath(t)):(t=new r.PathOption(i.element.id+"_Lineartrack","none",n,a,i.themeStyle.trackOpacity,"0",i.getPathLine(i.progressRect.x,i.progressRect.width,n)),e=i.renderer.drawPath(t),i.trackWidth=e.getTotalLength(),"Round"!==i.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),i.segmentCount>1&&!this.isRange&&!i.enableProgressSegments&&(i.segmentSize=i.calculateSegmentSize(i.trackWidth,n),e.setAttribute("stroke-dasharray",i.segmentSize))),o.appendChild(e),i.svgObject.appendChild(o)},e.prototype.renderLinearProgress=function(e,i){void 0===i&&(i=0);var o,n,a,s,l,c,p,h,d=this.progress,u=d.value>=d.maximum,g=d.progressRect.width*d.calculateProgressRange(d.value>d.maximum?d.maximum:d.value),m=d.calculateProgressRange(d.argsData.value>d.maximum?d.maximum:d.argsData.value);this.linearProgressWidth=d.progressRect.width*(d.isIndeterminate&&!d.enableProgressSegments?1:m),l=e?r.getElement(d.element.id+"_LinearProgressGroup"):d.renderer.createGroup({id:d.element.id+"_LinearProgressGroup"});var y=d.progressThickness||d.themeStyle.linearProgressThickness,f=d.isStriped?"url(#"+d.element.id+"_LinearStriped)":this.checkingLinearProgressColor();o="Round4px"===d.cornerRadius?new r.PathOption(d.element.id+"_Linearprogress",f,0,"none",d.themeStyle.progressOpacity,"0",this.cornerRadius(d.progressRect.x,d.progressRect.y,this.linearProgressWidth,y,4,u||d.isIndeterminate?"":"start")):new r.PathOption(d.element.id+"_Linearprogress","none",y,f,d.themeStyle.progressOpacity,"0",d.getPathLine(d.progressRect.x,this.linearProgressWidth,y)),d.progressWidth=d.renderer.drawPath(o).getTotalLength(),d.segmentSize=d.enableProgressSegments?d.calculateSegmentSize(d.progressWidth,y):d.segmentSize,null===d.secondaryProgress||d.isIndeterminate||this.renderLinearBuffer(d),null!==d.argsData.value&&("Round4px"===d.cornerRadius?n=d.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",f,y,!1,this.linearProgressWidth,d,d.themeStyle.progressOpacity):d.renderer.drawPath(o):0===d.segmentColor.length||d.isIndeterminate||this.isRange?this.isRange&&!d.isIndeterminate?n=this.segment.createLinearRange(this.linearProgressWidth,d,m):(e?((n=r.getElement(d.element.id+"_Linearprogress")).setAttribute("d",d.getPathLine(d.progressRect.x,this.linearProgressWidth,y)),n.setAttribute("stroke",f)):n=d.renderer.drawPath(o),d.segmentCount>1&&n.setAttribute("stroke-dasharray",d.segmentSize),"Round"===d.cornerRadius&&m&&n.setAttribute("stroke-linecap","round")):(p=d.enableProgressSegments?d.progressWidth:d.trackWidth,n=this.segment.createLinearSegment(d,"_LinearProgressSegment",this.linearProgressWidth,d.themeStyle.progressOpacity,y,p)),l.appendChild(n),d.isStriped&&!d.isIndeterminate&&(h=this.checkingLinearProgressColor(),this.renderLinearStriped(h,l,d)),!d.isActive||d.isIndeterminate||d.isStriped||this.renderActiveState(l,m,this.linearProgressWidth,y,e),!(d.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)||d.isIndeterminate||d.isActive||d.isStriped||(c=null!==d.secondaryProgress?d.animation.delay+(this.bufferWidth-this.linearProgressWidth):d.animation.delay,this.delay=c,a=d.createClipPath(d.clipPath,m,null,e,y,!1,"Round4px"===d.cornerRadius&&u),l.appendChild(d.clipPath),n.style.clipPath="url(#"+d.element.id+"_clippath)",this.animation.doLinearAnimation(a,d,c,e?i:0)),d.isIndeterminate&&(s=d.createClipPath(d.clipPath,d.enableProgressSegments?1:m,null,e,y,d.enableProgressSegments),l.appendChild(d.clipPath),n.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearIndeterminate(d.enableProgressSegments?n:s,this.linearProgressWidth,y,d,s)),d.svgObject.appendChild(l),d.previousWidth=g)},e.prototype.renderLinearBuffer=function(e){var i,o,n,a,s,l=e.secondaryProgress>=e.maximum,c=e.calculateProgressRange(e.secondaryProgress>e.maximum?e.maximum:e.secondaryProgress);this.bufferWidth=n=e.progressRect.width*c;var p=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),h=e.secondaryProgressThickness?e.secondaryProgressThickness:e.progressThickness||e.themeStyle.linearProgressThickness,d=e.secondaryProgressColor?e.secondaryProgressColor:e.themeStyle.bufferColor||this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?i=this.createRoundCornerSegment("_Linearbuffer_",d,h,!1,n,e,e.themeStyle.bufferOpacity):(a=new r.PathOption(e.element.id+"_Linearbuffer",d,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,n,h,4,l?"":"start")),i=e.renderer.drawPath(a)):(a=new r.PathOption(e.element.id+"_Linearbuffer","none",h,d,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,n,h)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(i=e.renderer.drawPath(a),e.segmentCount>1&&!this.isRange&&i.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||i.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?e.progressWidth:e.trackWidth,i=this.segment.createLinearSegment(e,"_LinearBufferSegment",n,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,s))),p.appendChild(i),(e.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)&&(o=e.createClipPath(e.bufferClipPath,c,null,!1,h,!1,"Round4px"===e.cornerRadius&&l),p.appendChild(e.bufferClipPath),i.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(o,e,e.animation.delay,0)),e.svgObject.appendChild(p)},e.prototype.renderLinearLabel=function(e){void 0===e&&(e=!1);var i,o,n,a,s,l,c,p,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,u=this.progress,g=u.labelStyle.textAlignment,m=u.labelStyle.text,y=u.progressRect.width*u.calculateProgressRange(u.value>u.maximum?u.maximum:u.value),f=u.renderer.createGroup({id:u.element.id+"_LinearLabelGroup"});document.getElementById(f.id)&&document.getElementById(f.id).remove();var b=(u.value-u.minimum)/(u.maximum-u.minimum)*100,v=u.value<u.minimum?0:+b.toFixed(2),P={cancel:!1,text:m||String(v)+"%",color:u.labelStyle.color||this.progress.themeStyle.linearLabelFont.color};u.trigger("textRender",P),P.cancel||(a=r.measureText(P.text,u.labelStyle,u.themeStyle.linearLabelFont),l=u.enableRtl?u.progressRect.x+u.progressRect.width-a.width/2:u.progressRect.x+a.width/2,u.labelOnTrack?"Near"===g?o=l+(u.enableRtl?-5:5):"Center"===g?(p=u.enableRtl?u.progressRect.x+u.progressRect.width-y/2:u.progressRect.x+y/2,u.enableRtl?p<=l:p>=l,o=y<a.width/2?l:p,!y&&!u.enableRtl&&o/2<u.progressRect.x+5&&(o+=5)):(c=u.enableRtl?u.progressRect.x+u.progressRect.width-y+a.width/2:u.progressRect.x+y-a.width/2,c+=u.enableRtl?5:-5,o=(u.enableRtl?c<=l:c>=l)?c:l,!y&&!u.enableRtl&&o/2<u.progressRect.x+5&&(o+=5)):"Near"===g?o=l+(u.enableRtl?-5:5):"Center"===g?o=(u.progressRect.x+u.progressRect.width)/2:(o=u.enableRtl?u.progressRect.x+a.width/2:u.progressRect.x+u.progressRect.width-a.width/2,o+=u.enableRtl?5:-5),n="Round4px"===this.progress.cornerRadius?u.progressRect.y+d/2+a.height/4:u.progressRect.y+u.progressRect.height/2+a.height/4,s=new C(u.element.id+"_linearLabel",u.labelStyle.size||u.themeStyle.linearLabelFont.size,u.labelStyle.fontStyle||u.themeStyle.linearLabelFont.fontStyle,u.labelStyle.fontFamily||u.themeStyle.linearLabelFont.fontFamily,u.labelStyle.fontWeight||u.themeStyle.linearLabelFont.fontWeight,"middle",P.color,o,n),i=u.renderer.createText(s,P.text),f.appendChild(i),(u.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)&&!u.isIndeterminate&&(h=u.renderer.createClipPath({id:u.element.id+"_clippathLabel"}),u.createClipPath(h,1,null,!1,u.progressThickness||u.themeStyle.linearProgressThickness,!0),f.appendChild(h),i.style.clipPath="url(#"+u.element.id+"_clippathLabel)",this.animation.doLabelAnimation(i,e?u.previousLabelWidth:0,y-(e?u.previousLabelWidth:0),u,this.d