@syncfusion/ej2-circulargauge
Version:
Essential JS 2 CircularGauge Components
12 lines • 159 kB
JavaScript
/*!
* filename: ej2-circulargauge.min.js
* version : 33.2.3
* Copyright Syncfusion Inc. 2001 - 2025. 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.circulargauge=function(e,t,i,n){"use strict";function o(e,i){var n=document.getElementById("gauge-measuretext");null===n&&(n=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(n));var o="position: absolute; visibility: hidden;;left: 0px; top: -100px; white-space: nowrap;"+r(i);return n.innerText=e,n.style.cssText=o,new $(n.clientWidth,n.clientHeight)}function a(e,t){return-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10)}function r(e){return"font-size:"+e.size+"; font-style:"+e.fontStyle+"; font-weight:"+e.fontWeight+"; font-family:"+e.fontFamily+";opacity:"+e.opacity+"; color:"+e.color+";"}function l(e,t,n,o,a){var r={},l=new i.SvgRenderer(""),s=a+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";";r={id:e.id,x:e.x,y:e.y,fill:n,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:s};var d=l.createText(r,e.text);return o.appendChild(d),d}function s(e,t,i,n){n=n||"Path";var o=i.renderer["draw"+n](e);return o.setAttribute("transform",e.transform),o.style.cssText=e.style,t.appendChild(o),o}function d(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function g(e,t){var i=t-e;return i<0?i+360:i}function u(e,t,i,n,o,a){var r;return o-=d(n,o)?1e-4:0,n-=90,o-=90,r=a?(e-i)*(g(n,o)/(t-i))+n:(r=o-(e-i)*(g(n,o)/(t-i)))<0?360+r:r,r=Math.round(r)>=360?r-360:Math.round(r)<0?360+r:r}function h(e,t){var i=Math.atan2(t.y-e.y,t.x-e.x);return i=Math.round((i<0?6.283+i:i)*(180/Math.PI))-270,i+=i<0?360:0}function p(e,t,i){var n=e*Math.PI/180;return new K(Math.cos(n)*t+i.x,Math.sin(n)*t+i.y)}function c(e,i,n,o,a,r,l,s){(t.isNullOrUndefined(l)||l.start!==l.end)&&(n-=d(i,n)?1e-4:0);var u=g(i,n),h=t.isNullOrUndefined(l)?o-a:"Outside"!==l.position||l.isLinearCircularGradient?"Cross"===l.position&&"AntiClockWise"===s.direction?o-(r+a)/2:o-a:o+a,c=t.isNullOrUndefined(l)?o-r:"Outside"!==l.position||l.isLinearCircularGradient?"Cross"===l.position&&"ClockWise"===s.direction?o-(r+a)/2:o-r:o+r,m=t.isNullOrUndefined(l)?o-(a+r)/2:"Outside"!==l.position||l.isLinearCircularGradient?"Cross"===l.position?o-(a+r)/4-("ClockWise"===s.direction?a:r)/2:o-(a+r)/2:o+(a+r)/2,y=t.isNullOrUndefined(l)||"Cross"!==l.position?o:o+(a+r)/4-("ClockWise"===s.direction?a:r)/2,f=t.isNullOrUndefined(l)||"Cross"!==l.position||"ClockWise"!==s.direction?o:o-(a-r)/2,x=t.isNullOrUndefined(l)||"Cross"!==l.position||"AntiClockWise"!==s.direction?o:o+(a-r)/2;return void 0!==a&&void 0!==r?(f="Cross"===l.position&&u>325?x:f,v(p(i,x,e),p(n,f,e),p(i,h,e),p(n,c,e),y,h,c,m,u<180?0:1,e,u,l,s)):C(p(i,o,e),p(n,o,e),o,u<180?0:1)}function m(e,t,i,n,o,a,r,l,s,d,g){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+d.x+" "+d.y+" A "+n+" "+o+" 0 "+l+" 0 "+g.x+" "+g.y+" A "+a+" "+r+" 0 "+l+" 0 "+s.x+" "+s.y+" Z "}function y(e,i,n,o,a,r,l,s,d,g,u,h,p,c,m){var y="M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+g+" 1 "+i.x+" "+i.y+" C "+o.x+" "+o.y+" "+a.x+" "+a.y+" "+h.x+" "+h.y;return t.isNullOrUndefined(s)&&t.isNullOrUndefined(d)?y+" A "+r+" "+l+" 0 "+g+" 0 "+u.x+" "+u.y+" C "+p.x+" "+p.y+" "+c.x+" "+c.y+" "+e.x+" "+e.y+" Z":y+" A "+r+" "+l+" 0 "+g+" 0 "+m.x+" "+m.y+" A "+s+" "+d+" 0 "+g+" 0 "+u.x+" "+u.y+" C "+p.x+" "+p.y+" "+c.x+" "+c.y+" "+e.x+" "+e.y+" Z"}function f(e,t,i,n,o,a,r,l){return"M "+e.x+" "+e.y+" A "+o+" "+o+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+n.x+" "+n.y+" A "+r+" "+a+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function v(e,t,i,n,o,a,r,l,s,d,g,u,h){var p,c,m=u.startWidth,y=u.endWidth,v=Math.abs(m-y);return m>y&&g<=260&&"Cross"!==u.position&&"Outside"!==u.position?(p=r+("ClockWise"===h.direction?-v/2:v/2),c=a+("ClockWise"===h.direction?v/2:-v/2),f(e,t,i,n,o,c,p,s)):y>m&&g<=260&&"Cross"!==u.position&&"Outside"!==u.position?(p=a+("ClockWise"===h.direction?-v/2:v/2),c=r+("ClockWise"===h.direction?v/2:-v/2),f(e,t,i,n,o,c,p,s)):y!==m||0===h.startAngle&&0===h.endAngle?g>260||!u.isLinearCircularGradient&&0===h.startAngle&&0===h.endAngle?u.roundedCornerRadius<=0&&u.startWidth===u.endWidth?f(e,t,i,n,o,a,r,s):x(e,t,i,n,o,a,r,l,s,d,null,null,null,null,m,y,g,u,h):"Cross"===u.position||"Outside"===u.position?f(e,t,i,n,o,l,l,s):f(e,t,i,n,o,a,r,s):f(e,t,i,n,o,a,r,s)}function x(e,i,n,o,a,r,l,s,d,g,h,c,v,x,A,C,P,S,w){if(t.isNullOrUndefined(S))return b(e,i,n,o,a,r,l,d,h,c,v,x);var F=void 0,R=void 0,_=Math.abs(A-C),T=void 0,E=void 0,M=u((S.start+S.end)/2,w.maximum,w.minimum,w.startAngle,w.endAngle,"ClockWise"===w.direction),k=A<C?p(M,l,g):p(M,r,g),O=Math.sqrt(Math.pow(o.x-k.x,2)+Math.pow(o.y-k.y,2))/2,L=Math.sqrt(Math.pow(g.x-n.x,2)+Math.pow(g.y-n.y,2)),I=Math.sqrt(Math.pow(g.x-k.x,2)+Math.pow(g.y-k.y,2));if(S.roundedCornerRadius<=0){if(_=0===_?1:_,o.y="Cross"===S.position&&"ClockWise"===w.direction&&P>325?o.y-_/2:o.y,("Cross"===S.position?330:325)<=P&&P<=360)return T="ClockWise"===w.direction?I/2:P>=345?r-_/2-C/2:"Cross"===S.position?r+_/4-A/2:r-_/2-A/2,E="ClockWise"===w.direction?L/2:"Cross"===S.position?l+_/4-C/4:"Outside"===S.position&&"AntiClockWise"===w.direction?P<345?r-_-C/4:r-_/2:l+_/2-C/2,m(e,i,a,O,O,T,E,d,n,o,k);if(P>260&&P<325&&"Cross"!==S.position&&"Outside"!==S.position){var D=s-_/2,B=s-_/2,z="ClockWise"===w.direction?P>=310:P<345;return P<310?f(e,i,n,o,a,D,B,d):P>=310||z?(D=s-_,f(e,i,n,o,a,B,D,d)):f(e,i,n,o,a,r,l,d)}if("Cross"===S.position){var N="ClockWise"===w.direction?P<=300&&P>=260?l-_/2-A/4:l-_-A/2:P<=300&&P>=260?l+_/4-A/4:l+_/4-A/2;return f(e,i,n,o,a,"ClockWise"===w.direction?P>325?P>340?r-A-_/4:r-_/4:r:r-_/4,N,d)}if("Outside"===S.position){if(P<325&&P>285){var W=void 0,G=A/2,U=W=s+_/2+G+C/2;return o.y="ClockWise"===w.direction&&A!==C&&A>_?o.y-_/2:o.y+G,f(e,i,n,o,a,U,W,d)}return f(e,i,n,o,a,s,s,d)}return f(e,i,n,o,a,r,l,d)}var j=w.endAngle<4?356:360;d=P>j?0:d;var V="ClockWise"===w.direction?327:322,H="ClockWise"===w.direction?328:325;if(C!==A||0===w.startAngle&&0===w.endAngle){if(P<=j&&P>V&&S.roundedCornerRadius>0)return F="ClockWise"===w.direction?P<334&&P>324?O-_/2:O-_/4:O,T=I/2,E="ClockWise"===w.direction?L/2+_/2:L/2,y(e,i,a,h,c,F,O,T,E,d,n,o,x,v,k);if(P>270&&P<H){var X=l+_/2-C/2,Y=l-_/2-C/2;return F=r-_/2-A/2,R="ClockWise"===w.direction?Y:X,y(e,i,a,h,c,F,R,null,null,d,n,o,x,v,null)}return b(e,i,n,o,a,r,l,d,h,c,v,x)}return b(e,i,n,o,a,r,l,d,h,c,v,x)}function b(e,t,i,n,o,a,r,l,s,d,g,u){return"M "+e.x+" "+e.y+" A "+o+" "+o+" 0 "+l+" 1 "+t.x+" "+t.y+" C "+s.x+" "+s.y+" "+d.x+" "+d.y+" "+n.x+" "+n.y+" A "+r+" "+a+" 0 "+l+" 0 "+i.x+" "+i.y+" C "+u.x+" "+u.y+" "+g.x+" "+g.y+" "+e.x+" "+e.y+" Z"}function A(e,t,i,n,o,a,r,l,s,u){var h=g(t,i-=d(t,i)?1e-4:0),c=a-r,m=a-l,y=a-(r+l)/2;return x(p(t,a,e),p(i,a,e),p(t,c,e),p(i,m,e),a,y,y,y,h<180?0:1,e,p(o,a,e),p(o,m,e),p(n,a,e),p(n,c,e),r,l,h,s,u)}function C(e,t,i,n){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+n+" 1 "+t.x+" "+t.y}function P(e,i){var n=null;try{"function"==typeof e?n=t.compile(e):isNaN(parseFloat(e))&&document.querySelectorAll(e).length?"a"===e.charAt(0)&&"A"===e.charAt(0)||1===e.length||(n=t.compile(document.querySelector(e).innerHTML.trim())):(i.isVue||i.isVue3)&&(n=t.compile(e))}catch(i){n=t.compile(e)}return n}function S(e){var i=w(e);i&&t.remove(i)}function w(e){return document.getElementById(e)}function F(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function R(e,t){var i=e.replace(t.element.id,"").split("_Axis_")[1],n=i.indexOf("_Range_")>-1?i.split("_Range_"):i.indexOf("_Pointer_NeedleCap_")>-1?i.split("_Pointer_NeedleCap_"):i.indexOf("_Pointer_NeedleTail_")>-1?i.split("_Pointer_NeedleTail_"):i.indexOf("_Pointer_NeedleRect_")>-1?i.split("_Pointer_NeedleRect_"):i.indexOf("_Pointer_Needle_")>-1?i.split("_Pointer_Needle_"):i.indexOf("_Pointer_RangeBar_")>-1?i.split("_Pointer_RangeBar_"):i.indexOf("_Pointer_Marker_")>-1?i.split("_Pointer_Marker_"):i.indexOf("_Pointer_")>-1?i.split("_Pointer_"):i.split("_Annotation_");return{axisIndex:+n[0],pointerIndex:+n[n.length-1]}}function _(e){return e&&null!==e.match("{value}")?"":e}function T(e,i,n,o,a){var r,l,s="string"==typeof n.width?parseFloat(n.width):n.width,d="string"==typeof n.height?parseFloat(n.height):n.height,g=e.x,u=e.y,h=e.x+-s/2,p=e.y+-d/2,c=a.id.indexOf("Shape")>-1;switch(i){case"Circle":t.merge(a,{rx:s/2,ry:d/2,cx:g,cy:u});break;case"Diamond":r="M "+h+" "+u+" L "+g+" "+(u+-d/2)+" L "+(g+s/2)+" "+u+" L "+g+" "+(u+d/2)+" L "+h+" "+u+" Z",t.merge(a,{d:r});break;case"Rectangle":r="M "+h+" "+(u+-d/2)+" L "+(g+s/2)+" "+(u+-d/2)+" L "+(g+s/2)+" "+(u+d/2)+" L "+h+" "+(u+d/2)+" L "+h+" "+(u+-d/2)+" Z",t.merge(a,{d:r});break;case"Triangle":r=c?"M "+(h+s/2)+" "+p+" L "+(h+s)+" "+(p+d)+"L "+h+" "+(p+d)+" Z":"M "+g+" "+u+" L "+(g-d)+" "+(u-s/2)+"L "+(g-d)+" "+(u+s/2)+" Z",t.merge(a,{d:r});break;case"InvertedTriangle":r=c?"M "+(h+s)+" "+p+" L "+(h+s/2)+" "+(p+d)+"L "+h+" "+p+" Z":"M "+g+" "+u+" L "+(g+d)+" "+(u-s/2)+"L "+(g+d)+" "+(u+s/2)+" Z",t.merge(a,{d:r});break;case"Image":t.merge(a,{href:o,height:d,width:s,x:h,y:p});break;case"RightArrow":r="M "+(g+-s/2)+" "+(u-d/2)+" L "+(g+s/2)+" "+u+" L "+(g+-s/2)+" "+(u+d/2)+" L "+(g+-s/2)+" "+(u+d/2-(l=2))+" L "+(g+s/2-2*l)+" "+u+" L"+(g+-s/2)+" "+(u-d/2+l)+" Z",t.merge(a,{d:r});break;case"LeftArrow":a.fill=a.stroke,a.stroke="transparent",r="M "+(g+s/2)+" "+(u-d/2)+" L "+(g+-s/2)+" "+u+" L "+(g+s/2)+" "+(u+d/2)+" L "+(g+s/2)+" "+(u+d/2-(l=2))+" L "+(g+-s/2+2*l)+" "+u+" L"+(g+s/2)+" "+(u-d/2+l)+" Z",t.merge(a,{d:r})}return a}function E(e,i,n){t.setStyleAttribute(e,{stroke:n.color,"stroke-width":n.width,fill:i})}function M(e,t,i,n,o,a){return o-=d(n,o)?1e-4:0,e=e<n?e+360:e,a?(e-n)/g(n,o)*(t-i)+i:t-(e-n)/g(n,o)*(t-i)}function k(e,t){var i=e.replace(t.element.id,"").split("_Axis_")[1];return{axisIndex:+i[0],rangeIndex:+i.split("Range_")[1]}}function O(e){var t=["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"];switch(e.toLowerCase()){case"tailwind":t=["#0369A1","#14B8A6","#15803D","#334155","#5A61F6","#65A30D","#8B5CF6","#9333EA","#F59E0B","#F97316"];break;case"tailwinddark":t=["#10B981","#22D3EE","#2DD4BF","#4ADE80","#8B5CF6","#E879F9","#F472B6","#F87171","#F97316","#FCD34D"];break;case"tailwind3":t=["#2F4074","#03B4B4","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];break;case"tailwind3dark":t=["#8029F1","#1ABC9C","#0D72DE","#FF5733","#D63384","#F39C12","#EF291F","#91C822"];break;case"fluent":t=["#614570","#4C6FB1","#CC6952","#3F579A","#4EA09B","#6E7A89","#D4515C","#E6AF5D","#639751","#9D4D69"];break;case"fluentdark":t=["#8AB113","#2A72D5","#43B786","#584EC6","#E85F9C","#6E7A89","#EA6266","#EBA844","#26BC7A","#BC4870"];break;case"material3":t=["#6200EE","#E77A16","#82C100","#7107DC","#05BB3D","#D21020","#FAD200","#0085FF","#9204EA","#08EE9B"];break;case"material3dark":t=["#4EAAFF","#FA4EAB","#FFF500","#17EA58","#38FFE7","#FF9E45","#B3F32F","#B93CE4","#FC5664","#9B55FF"];break;case"fluent2":t=["#6200EE","#09AF74","#0076E5","#CB3587","#E7910F","#0364DE","#66CD15","#F3A93C","#107C10","#C19C00"];break;case"fluent2dark":case"fluent2highcontrast":t=["#9BB449","#2A72D5","#43B786","#3F579A","#584EC6","#E85F9C","#6E7A89","#EA6266","#0B6A0B","#C19C00"];break;case"bootstrap5":case"bootstrap5dark":t=["#6610F2","#6f42C1","#D63384","#DC3545","#FD7E14","#FFC107","#198754","#0DCAF0"]}return t}function L(e){var t;switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:"#333232",titleFontColor:"#ffffff",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#000000",tooltipFontSize:"13px",tooltipTextOpacity:1,labelColor:"#DADADA",lineColor:"#C8C8C8",majorTickColor:"#C8C8C8",minorTickColor:"#9A9A9A",pointerColor:"#9A9A9A",capColor:"#9A9A9A",needleColor:"#9A9A9A",needleTailColor:"#9A9A9A",fontSize:"12px",titleFontSize:"15px",labelFontFamily:"Segoe UI",fontFamily:"Segoe UI",fontWeight:"Normal",titleFontWeight:"Normal"};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",tooltipFillColor:"#ffffff",tooltipFontColor:"#000000",tooltipFontSize:"13px",tooltipTextOpacity:1,labelColor:"#FFFFFF",lineColor:"#FFFFFF",majorTickColor:"#FFFFFF",minorTickColor:"#FFFFFF",pointerColor:"#FFFFFF",capColor:"#FFFFFF",needleColor:"#FFFFFF",needleTailColor:"#FFFFFF",fontSize:"12px",titleFontSize:"15px",labelFontFamily:"Segoe UI",fontFamily:"Segoe UI",fontWeight:"Normal",titleFontWeight:"Normal"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"13px",labelColor:"#212529",lineColor:"#DEE2E6",majorTickColor:"#ADB5BD",minorTickColor:"#CED4DA",pointerColor:"#6C757D",capColor:"#6C757D",needleColor:"#6C757D",needleTailColor:"#6C757D",fontFamily:"HelveticaNeue-Medium",fontSize:"12px",titleFontSize:"16px",labelFontFamily:"HelveticaNeue",tooltipFillOpacity:1,tooltipTextOpacity:.9,fontWeight:"Normal",titleFontWeight:"Normal"};break;case"tailwind":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#374151",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"13px",labelColor:"#6B7280",lineColor:"#E5E7EB",majorTickColor:"#9CA3AF",minorTickColor:"#9CA3AF",pointerColor:"#1F2937",capColor:"#1F2937",needleColor:"#1F2937",needleTailColor:"#1F2937",fontFamily:"Inter",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Inter",tooltipFillOpacity:1,tooltipTextOpacity:.9,fontWeight:"Normal",titleFontWeight:"500"};break;case"tailwinddark":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#D1D5DB",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"13px",labelColor:"#9CA3AF",lineColor:"#374151",majorTickColor:"#6B7280",minorTickColor:"#6B7280",pointerColor:"#9CA3AF",capColor:"#9CA3AF",needleColor:"#9CA3AF",needleTailColor:"#9CA3AF",fontFamily:"Inter",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Inter",tooltipFillOpacity:1,tooltipTextOpacity:.9,fontWeight:"Normal",titleFontWeight:"500"};break;case"tailwind3":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#111827",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFontSize:"12px",labelColor:"#4B5563",lineColor:"#E5E7EB",majorTickColor:"#D1D5DB",minorTickColor:"#D1D5DB",pointerColor:"#1F2937",capColor:"#1F2937",needleColor:"#1F2937",needleTailColor:"#1F2937",fontFamily:"Inter",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Inter",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"400",titleFontWeight:"600"};break;case"tailwind3dark":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFontSize:"12px",labelColor:"#D1D5DB",lineColor:"#282F3C",majorTickColor:"#374151",minorTickColor:"#374151",pointerColor:"#6B7280",capColor:"#6B7280",needleColor:"#6B7280",needleTailColor:"#6B7280",fontFamily:"Inter",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Inter",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"400",titleFontWeight:"600"};break;case"bootstrap5":t={backgroundColor:"transparent",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",fontSize:"10px",tooltipFontSize:"12px",labelColor:"#212529",lineColor:"#E9ECEF",majorTickColor:"#CED4DA",minorTickColor:"#CED4DA",pointerColor:"#343A40",capColor:"#343A40",needleColor:"#343A40",needleTailColor:"#343A40",fontFamily:"Segoe UI",titleFontSize:"14px",labelFontFamily:"Segoe UI",tooltipFillOpacity:.9,fontWeight:"400",titleFontWeight:"400"};break;case"bootstrap5dark":t={backgroundColor:"transparent",titleFontColor:"#DEE2E6",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#212529",fontSize:"10px",tooltipFontSize:"12px",labelColor:"#DEE2E6",lineColor:"#343A40",majorTickColor:"#6C757D",minorTickColor:"#6C757D",pointerColor:"#ADB5BD",capColor:"#ADB5BD",needleColor:"#ADB5BD",needleTailColor:"#ADB5BD",fontFamily:"Segoe UI",titleFontSize:"14px",labelFontFamily:"Segoe UI",tooltipFillOpacity:.9,fontWeight:"400",titleFontWeight:"400"};break;case"fluent":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#323130",tooltipFontSize:"13px",labelColor:"#3B3A39",lineColor:"#EDEBE9",majorTickColor:"#C8C6C4",minorTickColor:"#C8C6C4",pointerColor:"#A19F9D",capColor:"#A19F9D",needleColor:"#A19F9D",needleTailColor:"#A19F9D",fontFamily:"Segoe UI",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Segoe UI",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"Normal",titleFontWeight:"600"};break;case"fluentdark":t={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",tooltipFillColor:"#252423",tooltipFontColor:"#F3F2F1",tooltipFontSize:"13px",labelColor:"#C8C6C4",lineColor:"#292827",majorTickColor:"#484644",minorTickColor:"#484644",pointerColor:"#797775",capColor:"#797775",needleColor:"#797775",needleTailColor:"#797775",fontFamily:"Segoe UI",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Segoe UI",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"Normal",titleFontWeight:"600"};break;case"material3":t={backgroundColor:"transparent",titleFontColor:"#1C1B1F",tooltipFillColor:"#313033",tooltipFontColor:"#F4EFF4",tooltipFontSize:"14px",labelColor:" #1E192B",lineColor:"#E7E0EC",majorTickColor:"#C4C7C5",minorTickColor:"#C4C7C5",pointerColor:"#49454E",capColor:"#49454E",needleColor:"#49454E",needleTailColor:"#49454E",fontFamily:"Roboto",fontSize:"12px",titleFontSize:"16px",labelFontFamily:"Roboto",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"400",titleFontWeight:"500"};break;case"material3dark":t={backgroundColor:"transparent",titleFontColor:"#E6E1E5",tooltipFillColor:"#E6E1E5",tooltipFontColor:"#313033",tooltipFontSize:"14px",labelColor:"#E6E1E5",lineColor:"#49454F",majorTickColor:"#444746",minorTickColor:"#444746",pointerColor:"#CAC4D0",capColor:"#CAC4D0",needleColor:"#CAC4D0",needleTailColor:"#CAC4D0",fontFamily:"Roboto",fontSize:"12px",titleFontSize:"16px",labelFontFamily:"Roboto",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"400",titleFontWeight:"500"};break;case"fluent2":t={backgroundColor:"transparent",titleFontColor:"#242424",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#242424",tooltipFontSize:"12px",labelColor:"#242424",lineColor:"#EDEBE9",majorTickColor:"#C8C6C4",minorTickColor:"#C8C6C4",pointerColor:"#A19F9D",capColor:"#A19F9D",needleColor:"#A19F9D",needleTailColor:"#A19F9D",fontFamily:"Segoe UI",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Segoe UI",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"400",titleFontWeight:"600"};break;case"fluent2dark":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",tooltipFillColor:"#292929",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",labelColor:"#FFFFFF",lineColor:"#292827",majorTickColor:"#484644",minorTickColor:"#484644",pointerColor:"#8A8886",capColor:"#8A8886",needleColor:"#8A8886",needleTailColor:"#8A8886",fontFamily:"Segoe UI",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Segoe UI",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"400",titleFontWeight:"600"};break;case"fluent2highcontrast":t={backgroundColor:"transparent",titleFontColor:"#FFFFFF",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFontSize:"12px",labelColor:"#FFFFFF",lineColor:"#292827",majorTickColor:"#484644",minorTickColor:"#484644",pointerColor:"#8A8886",capColor:"#8A8886",needleColor:"#8A8886",needleTailColor:"#8A8886",fontFamily:"Segoe UI",fontSize:"12px",titleFontSize:"14px",labelFontFamily:"Segoe UI",tooltipFillOpacity:1,tooltipTextOpacity:1,fontWeight:"400",titleFontWeight:"600",tooltipBorderColor:"#FFF",legendBorderColor:"#FFF",legendBorderWidth:1};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",tooltipFontSize:"13px",tooltipTextOpacity:1,labelColor:"#212121",lineColor:"#E0E0E0",majorTickColor:"#9E9E9E",minorTickColor:"#9E9E9E",pointerColor:"#757575",capColor:"#757575",needleColor:"#757575",needleTailColor:"#757575",fontSize:"12px",titleFontSize:"15px",labelFontFamily:"Segoe UI",fontFamily:"Segoe UI",fontWeight:"Normal",titleFontWeight:"Normal"}}return t}function I(e,t,i){var n=i.getBoundingClientRect(),o=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,r=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=n.left+o-l,d=n.top+a-r;return new K(e-s,t-d)}function D(e,i,n){var o,a,r=P(e,i),l=r?i.isVue||i.isVue3?r({},i,null,i.element.id+"Template"):r({},null,null,i.element.id+"Template"):[];if(r&&l.length){a=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(a);for(var s=i.isVue||i.isVue3?r({},i,null,i.element.id+"Template"):r({},null,null,i.element.id+"Template"),d=s.length;d>0;)a.appendChild(s[0]),d--;n.appendChild(a),o=new $(n.getBoundingClientRect().width,n.getBoundingClientRect().height),t.remove(a)}return o}function B(e,t,i){var n=t,a=o(t,i).width;if(a>e)for(var r=t.length-1;r>=0;--r)if(n=t.substring(0,r)+"...",(a=o(n,i).width)<=e)return n;return n}function z(e,i,n,a,r){var l,s,d=new Q(a.margin.left,a.margin.top+10,a.availableSize.width-(a.margin.left+a.margin.right),a.availableSize.height-(a.margin.top-a.margin.bottom));if("Title"===r){l=a.element.id+"_EJ2_Title_Tooltip",s=document.getElementById(l);var g=o(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}).width+5;d.width=g<d.width?g:d.width-10,s||W()}else"LegendText"===r&&(l=a.element.id+"_EJ2_Legend_Tooltip",(s=document.getElementById(l))||W(),i=i+(g=o(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}).width+5)>d.width?i-g:i,d.x=i<0?5:i,d.y=n,d.width=g);s?(s.innerText=e,s.style.top=(d.y+15).toString()+"px",s.style.left=d.x.toString()+"px"):((s=t.createElement("div",{id:l,className:"EJ2-CircularGauge-Tooltip"})).innerText=e,s.style.cssText="top:"+(d.y+15).toString()+"px;left:"+d.x.toString()+'px; background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute; border:1px solid rgb(112, 112, 112); padding-left : 3px; padding-right : 2px;padding-bottom: 2px; padding-top : 2px; font-size:12px; text-align: center; font-family: "Segoe UI"; width:'+d.width+"px;",w(a.element.id+"_Secondary_Element").appendChild(s))}function N(e,i,n,o,a){var r=e.target.id,l=document.getElementById(o.element.id+"_svg").getBoundingClientRect();i-=l.left,n-=l.top;var s=document.getElementsByClassName("EJ2-CircularGauge-Tooltip");if(r===o.element.id+"_CircularGaugeTitle"&&e.target.textContent.indexOf("...")>-1)z(o.title,i,n,o,"Title");else if(e.target.textContent.indexOf("...")>-1&&r.indexOf("_gauge_legend_")>-1&&o.legendSettings.visible){for(var d=parseInt(r.split(o.element.id+"_gauge_legend_Axis_")[1].split("_text_")[0],10),g=parseInt(r.split(o.element.id+"_gauge_legend_Axis_")[1].split("_text_")[1],10),u="",h=0,p=o.legendModule.legendCollection;h<p.length;h++){var c=p[h];c.rangeIndex===g&&c.axisIndex===d&&(u=c.originalText)}z(u,i,n,o,"LegendText")}else s.length>0&&(s[0].id.indexOf("Title_Tooltip")>-1||s[0].id.indexOf("Legend_Tooltip")>-1)&&W();a&&!t.isNullOrUndefined(this)&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(W.bind(this),2e3))}function W(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove()}function G(e,t,i){for(var n=0,o=i.length;e<o;e++)n+=i[e];return n}function U(e,t,i){var n=0,o=0,a=t.filter(function(t){return n=Math.min(t.start,t.end),o=Math.max(t.start,t.end),e>=n&&o>=e});return a.length?a[0].rangeColor:i}function j(e,t,i,n){return-i*Math.cos(e/n*(Math.PI/2))+i+t}function V(e,t,i,n,o,a){var r=g(t,i-=d(t,i)&&!a?1e-4:0);return H(e,p(t,n,e),p(i,n,e),n,p(t,o,e),p(i,o,e),o,r<180?0:1)}function H(e,t,i,n,o,a,r,l){return"M "+t.x+" "+t.y+" A "+n+" "+n+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+a.x+" "+a.y+" A "+r+" "+r+" 0 "+l+",0 "+o.x+" "+o.y+" Z"}var X,Y=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),Z=function(){function e(e){this.id=e}return e}(),q=function(e){function t(t,i,n,o,a,r,l,s,d){void 0===s&&(s=""),void 0===d&&(d="");var g=e.call(this,t)||this;return g.opacity=a,g.fill=i,g.stroke=o,g["stroke-width"]=n,g["stroke-dasharray"]=r,g.d=l,g.transform=s,g.style=d,g}return Y(t,e),t}(Z),J=function(e){function t(t,i,n,o,a){var r=e.call(this,t)||this;return r.y=a.y,r.x=a.x,r.height=a.height,r.width=a.width,r.opacity=o,r.fill=i,r.stroke=n.color,r["stroke-width"]=n.width,r["stroke-dasharray"]=n.dashArray,r}return Y(t,e),t}(Z),$=function(){function e(e,t){this.width=e,this.height=t}return e}(),K=function(){function e(e,t){this.x=e,this.y=t}return e}(),Q=function(){function e(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}return e}(),ee=function(e){function t(t,i,n,o,a,r,l){void 0===r&&(r="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=n,s.anchor=o,s.text=a,s.transform=r,s.baseLine=l,s}return Y(t,e),t}(Z),te=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}();!function(e){e.axisLabelFont={size:null,fontWeight:null,color:null,fontStyle:"Normal",fontFamily:null},e.legendLabelFont={size:null,fontWeight:null,color:null,fontStyle:"Normal",fontFamily:null}}(X||(X={}));var ie=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),ne=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property("")],i.prototype,"color",void 0),ne([t.Property(1)],i.prototype,"width",void 0),ne([t.Property("")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property("16px")],i.prototype,"size",void 0),ne([t.Property("")],i.prototype,"color",void 0),ne([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),ne([t.Property("Normal")],i.prototype,"fontWeight",void 0),ne([t.Property("Normal")],i.prototype,"fontStyle",void 0),ne([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property(null)],i.prototype,"fill",void 0),ne([t.Complex({size:null,fontFamily:null,opacity:null,fontWeight:null},ae)],i.prototype,"textStyle",void 0),ne([t.Property(null)],i.prototype,"format",void 0),ne([t.Property(null)],i.prototype,"template",void 0),ne([t.Property(!0)],i.prototype,"enableAnimation",void 0),ne([t.Complex({color:null},oe)],i.prototype,"border",void 0),ne([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property(null)],i.prototype,"fill",void 0),ne([t.Complex({size:"13px",fontFamily:null,opacity:null},ae)],i.prototype,"textStyle",void 0),ne([t.Property(null)],i.prototype,"format",void 0),ne([t.Property(null)],i.prototype,"template",void 0),ne([t.Property(!0)],i.prototype,"enableAnimation",void 0),ne([t.Complex({color:null},oe)],i.prototype,"border",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property(10)],i.prototype,"left",void 0),ne([t.Property(10)],i.prototype,"right",void 0),ne([t.Property(10)],i.prototype,"top",void 0),ne([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),de=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property(!1)],i.prototype,"enable",void 0),ne([t.Property(null)],i.prototype,"fill",void 0),ne([t.Complex({size:null,fontFamily:null,opacity:null,fontWeight:null},ae)],i.prototype,"textStyle",void 0),ne([t.Complex({},re)],i.prototype,"rangeSettings",void 0),ne([t.Complex({},le)],i.prototype,"annotationSettings",void 0),ne([t.Property(null)],i.prototype,"format",void 0),ne([t.Property(null)],i.prototype,"template",void 0),ne([t.Property(!0)],i.prototype,"enableAnimation",void 0),ne([t.Complex({color:null},oe)],i.prototype,"border",void 0),ne([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),ne([t.Property("Pointer")],i.prototype,"type",void 0),i}(t.ChildProperty),ge=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property(0)],i.prototype,"x",void 0),ne([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),ue=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ie(i,e),ne([t.Property(!1)],i.prototype,"visible",void 0),ne([t.Property(!0)],i.prototype,"toggleVisibility",void 0),ne([t.Property("Center")],i.prototype,"alignment",void 0),ne([t.Complex({},oe)],i.prototype,"border",void 0),ne([t.Complex({},oe)],i.prototype,"shapeBorder",void 0),ne([t.Property(8)],i.prototype,"padding",void 0),ne([t.Property(1)],i.prototype,"opacity",void 0),ne([t.Property("Auto")],i.prototype,"position",void 0),ne([t.Property("Circle")],i.prototype,"shape",void 0),ne([t.Property(null)],i.prototype,"height",void 0),ne([t.Property(null)],i.prototype,"width",void 0),ne([t.Complex(X.legendLabelFont,ae)],i.prototype,"textStyle",void 0),ne([t.Property(10)],i.prototype,"shapeHeight",void 0),ne([t.Property(10)],i.prototype,"shapeWidth",void 0),ne([t.Property(5)],i.prototype,"shapePadding",void 0),ne([t.Complex({x:0,y:0},ge)],i.prototype,"location",void 0),ne([t.Property("transparent")],i.prototype,"background",void 0),ne([t.Complex({left:0,right:0,top:0,bottom:0},se)],i.prototype,"margin",void 0),i}(t.ChildProperty),he=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),pe=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},ce=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return he(i,e),pe([t.Property(2)],i.prototype,"width",void 0),pe([t.Property("")],i.prototype,"dashArray",void 0),pe([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),me=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return he(i,e),pe([t.Complex(X.axisLabelFont,ae)],i.prototype,"font",void 0),pe([t.Property("")],i.prototype,"format",void 0),pe([t.Property("Inside")],i.prototype,"position",void 0),pe([t.Property("None")],i.prototype,"hiddenLabel",void 0),pe([t.Property(!1)],i.prototype,"autoAngle",void 0),pe([t.Property(!1)],i.prototype,"useRangeColor",void 0),pe([t.Property(0)],i.prototype,"offset",void 0),pe([t.Property(!0)],i.prototype,"shouldMaintainPadding",void 0),i}(t.ChildProperty),ye=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isLinearCircularGradient=!1,t}return he(i,e),pe([t.Property(0)],i.prototype,"start",void 0),pe([t.Property(0)],i.prototype,"end",void 0),pe([t.Property(null)],i.prototype,"radius",void 0),pe([t.Property(10)],i.prototype,"startWidth",void 0),pe([t.Property(10)],i.prototype,"endWidth",void 0),pe([t.Property(null)],i.prototype,"color",void 0),pe([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),pe([t.Property(1)],i.prototype,"opacity",void 0),pe([t.Property("")],i.prototype,"legendText",void 0),pe([t.Property("Auto")],i.prototype,"position",void 0),pe([t.Property(0)],i.prototype,"offset",void 0),pe([t.Property(null)],i.prototype,"linearGradient",void 0),pe([t.Property(null)],i.prototype,"radialGradient",void 0),i}(t.ChildProperty),fe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return he(i,e),pe([t.Property(2)],i.prototype,"width",void 0),pe([t.Property(null)],i.prototype,"height",void 0),pe([t.Property(null)],i.prototype,"interval",void 0),pe([t.Property(0)],i.prototype,"offset",void 0),pe([t.Property(null)],i.prototype,"color",void 0),pe([t.Property("Inside")],i.prototype,"position",void 0),pe([t.Property(!1)],i.prototype,"useRangeColor",void 0),pe([t.Property("0")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),ve=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return he(i,e),pe([t.Property(null)],i.prototype,"color",void 0),pe([t.Property(null)],i.prototype,"linearGradient",void 0),pe([t.Property(null)],i.prototype,"radialGradient",void 0),pe([t.Complex({color:null,width:8},oe)],i.prototype,"border",void 0),pe([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),xe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return he(i,e),pe([t.Property(null)],i.prototype,"color",void 0),pe([t.Complex({color:null,width:0},oe)],i.prototype,"border",void 0),pe([t.Property("0%")],i.prototype,"length",void 0),pe([t.Property(null)],i.prototype,"linearGradient",void 0),pe([t.Property(null)],i.prototype,"radialGradient",void 0),i}(t.ChildProperty),be=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return he(i,e),pe([t.Property(!0)],i.prototype,"enable",void 0),pe([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),Ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return he(i,e),pe([t.Property(null)],i.prototype,"content",void 0),pe([t.Property(90)],i.prototype,"angle",void 0),pe([t.Property("50%")],i.prototype,"radius",void 0),pe([t.Property("-1")],i.prototype,"zIndex",void 0),pe([t.Property(!1)],i.prototype,"autoAngle",void 0),pe([t.Complex({size:"12px",color:"#686868"},ae)],i.prototype,"textStyle",void 0),pe([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),Ce=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isPointerAnimation=!0,t}return he(i,e),pe([t.Property(null)],i.prototype,"value",void 0),pe([t.Property("Needle")],i.prototype,"type",void 0),pe([t.Property("Auto")],i.prototype,"position",void 0),pe([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),pe([t.Property(null)],i.prototype,"imageUrl",void 0),pe([t.Property(null)],i.prototype,"radius",void 0),pe([t.Property(20)],i.prototype,"pointerWidth",void 0),pe([t.Complex({},ve)],i.prototype,"cap",void 0),pe([t.Complex({},ae)],i.prototype,"textStyle",void 0),pe([t.Complex({},xe)],i.prototype,"needleTail",void 0),pe([t.Property(null)],i.prototype,"color",void 0),pe([t.Complex({color:"#DDDDDD",width:0},oe)],i.prototype,"border",void 0),pe([t.Complex(null,be)],i.prototype,"animation",void 0),pe([t.Property("Circle")],i.prototype,"markerShape",void 0),pe([t.Property(5)],i.prototype,"markerHeight",void 0),pe([t.Property("")],i.prototype,"text",void 0),pe([t.Property(null)],i.prototype,"description",void 0),pe([t.Property(5)],i.prototype,"markerWidth",void 0),pe([t.Property(0)],i.prototype,"offset",void 0),pe([t.Property(null)],i.prototype,"needleStartWidth",void 0),pe([t.Property(null)],i.prototype,"needleEndWidth",void 0),pe([t.Property(!1)],i.prototype,"enableDrag",void 0),pe([t.Property(null)],i.prototype,"linearGradient",void 0),pe([t.Property(null)],i.prototype,"radialGradient",void 0),i}(t.ChildProperty),Pe=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return he(i,e),pe([t.Property(null)],i.prototype,"minimum",void 0),pe([t.Property(null)],i.prototype,"maximum",void 0),pe([t.Property(!1)],i.prototype,"showLastLabel",void 0),pe([t.Property(!1)],i.prototype,"hideIntersectingLabel",void 0),pe([t.Property(null)],i.prototype,"roundingPlaces",void 0),pe([t.Property(null)],i.prototype,"radius",void 0),pe([t.Complex({},ce)],i.prototype,"lineStyle",void 0),pe([t.Collection([{}],ye)],i.prototype,"ranges",void 0),pe([t.Collection([{}],Ce)],i.prototype,"pointers",void 0),pe([t.Collection([{}],Ae)],i.prototype,"annotations",void 0),pe([t.Complex({width:2,height:10},fe)],i.prototype,"majorTicks",void 0),pe([t.Complex({width:2,height:5},fe)],i.prototype,"minorTicks",void 0),pe([t.Property(200)],i.prototype,"startAngle",void 0),pe([t.Property(160)],i.prototype,"endAngle",void 0),pe([t.Property("ClockWise")],i.prototype,"direction",void 0),pe([t.Property(null)],i.prototype,"background",void 0),pe([t.Property(null)],i.prototype,"rangeGap",void 0),pe([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),pe([t.Complex({},me)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),Se=function(){function e(e){}return e.prototype.renderAnnotation=function(e,i,n){var o=this,a=n.availableSize.width,r=t.createElement("div",{id:n.element.id+"_Annotations_"+i});r.style.opacity=n.allowLoadingAnimation?"0":"1";var l=w(n.element.id+"_Secondary_Element");t.isNullOrUndefined(document.getElementById(n.element.id+"_Secondary_Element"))||(document.getElementById(n.element.id+"_Secondary_Element").style.width=a+"px"),e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i,n)}),l&&r.childElementCount&&l.appendChild(r),n.renderReactTemplates()},e.prototype.annotationAnimation=function(e){for(var i=0;i<e.axes.length;i++){var n=document.getElementById(e.element.id+"_Annotations_"+i);t.isNullOrUndefined(n)||"0"===n.style.opacity&&this.annotationAnimate(n,e,i)}},e.prototype.annotationAnimate=function(e,i,n){var o=0;new t.Animation({}).animate(e,{duration:i.loadingAnimationDuration[n],progress:function(t){t.timeStamp>t.delay&&(o=(t.timeStamp-t.delay)/t.duration,e.style.opacity=1*o)},end:function(){e.style.opacity=1,i.isOverAllAnimationComplete=!0}})},e.prototype.createTemplate=function(e,i,n,o){var a=this,l=o.axes[n],s=l.annotations[i],d=t.createElement("div",{id:o.element.id+"_Axis_"+n+"_Annotation_"+i});d.style.cssText="position: absolute; z-index:"+s.zIndex+";transform:"+(s.autoAngle?"rotate("+(s.angle-90)+"deg)":"rotate(0deg)")+";";var g={cancel:!1,name:"annotationRender",content:s.content,axis:l,annotation:s,textStyle:s.textStyle};o.trigger("annotationRender",g,function(u){var h,p;if(!g.cancel){if((h=P(g.content,o))&&h(l,o,g.content,o.element.id+"_Axis"+n+"_ContentTemplate"+i).length)for(var c=(p=Array.prototype.slice.call(h(l,o,g.content,o.element.id+"_Axis"+n+"_ContentTemplate"+i))).length,m=0;m<c;m++)d.appendChild(p[m]);else{var y=t.createElement("div",{innerHTML:t.isNullOrUndefined(g.content)?null:g.content.toString(),id:"StringTemplate"});y.style.cssText=r(g.textStyle),d.appendChild(y)}a.updateLocation(d,l,s,o),e.appendChild(d)}})},e.prototype.updateLocation=function(e,t,i,n){var o=p(i.angle-90,F(i.radius,t.currentRadius),n.midPoint),a=this.measureElementRect(e);e.style.left=o.x-a.width/2+"px",e.style.top=o.y-a.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation"),e.setAttribute("role","region")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(){},e.prototype.measureElementRect=function(e){document.body.appendChild(e);var t=e.getBoundingClientRect();return S(e.id),t},e}(),we=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.addEventListener()}return e.prototype.renderTooltip=function(e){var t=this;this.gaugeId=this.gauge.element.getAttribute("id");var i,n,o,a,r,l=!1,s=!1;if(-1!==e.type.indexOf("touch")?(o=(a=e).target,i=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(o=e.target,i=e.pageX,n=e.pageY),this.tooltip.type.indexOf("Pointer")>-1&&o.id.indexOf("_Pointer_")>=0&&o.id.indexOf(this.gaugeId)>=0){null!==this.pointerEle&&(l=this.pointerEle===o),s=!0;var d=this.gauge.svgObject.getBoundingClientRect(),g=this.gauge.element.getBoundingClientRect(),h=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),c=new Q(Math.abs(g.left-d.left),Math.abs(g.top-d.top),d.width,d.height),m=R(o.id,this.gauge);this.currentAxis=this.gauge.axes[m.axisIndex],this.currentPointer=this.currentAxis.pointers[m.pointerIndex];var y=u(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,f=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,v=f&&null!==f.match("{value}"),x=this.gauge.intl.getNumberFormat({format:_(f),useGrouping:this.gauge.useGroupingSeparator});if(this.tooltipElement(),0!==this.tooltipEle.childElementCount&&!this.gauge.enablePointerDrag&&!this.gauge.tooltip.showAtMousePosition)return null;var b=this.roundedValue(this.currentPointer.currentValue),A=v?f.replace(new RegExp("{value}","g"),x(b)):x(b);(r=p(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?r.x+10:r.x;var C={name:"tooltipRender",cancel:!1,content:A,location:r,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Pointer"},P=function(e){var o=e.tooltip.template;if(null!==o&&1===o.length&&"function"!=typeof o&&(o=o[o[0]]),e.tooltip.showAtMousePosition)e.location=I(i,n,t.gauge.svgObject),t.tooltipRect=c;else if(o){var a=D(o,t.gauge,t.tooltipEle);t.tooltipRect=Math.abs(h.left-d.left)>a.width?t.findPosition(c,y,e.location,!0):c}else t.findPosition(c,y,e.location,!1);if(!e.cancel&&!l){var r={color:e.tooltip.textStyle.color||t.gauge.themeStyle.tooltipFontColor,opacity:e.tooltip.textStyle.opacity||t.gauge.themeStyle.tooltipTextOpacity,fontFamily:e.tooltip.textStyle.fontFamily||t.gauge.themeStyle.fontFamily,fontWeight:e.tooltip.textStyle.fontWeight||t.gauge.themeStyle.fontWeight,fontStyle:e.tooltip.textStyle.fontStyle,size:e.tooltip.textStyle.size||t.gauge.themeStyle.tooltipFontSize};t.svgTooltip=t.svgTooltipCreate(t.svgTooltip,e,o,t.arrowInverted,t.tooltipRect,t.gauge,e.tooltip.fill,r,e.tooltip.border),t.svgTooltip.opacity=t.gauge.themeStyle.tooltipFillOpacity||t.svgTooltip.opacity,t.svgTooltip.appendTo(t.tooltipEle),!o||"LeftTop"!==t.tooltipPosition&&"LeftBottom"!==t.tooltipPosition||(t.tooltipEle.style.left=parseFloat(t.tooltipEle.style.left)-t.tooltipEle.getBoundingClientRect().width-20+"px"),o&&Math.abs(n-t.tooltipEle.getBoundingClientRect().top)<=0&&(t.tooltipEle.style.top=parseFloat(t.tooltipEle.style.top)+20+"px")}};this.gauge.trigger("tooltipRender",C,P),this.gauge.renderReactTemplates()}else if(this.tooltip.type.indexOf("Range")>-1&&o.id.indexOf("_Range_")>=0&&!this.gauge.isDrag&&o.id.indexOf(this.gaugeId)>=0){s=!0;var S=this.gauge.svgObject.getBoundingClientRect(),w=this.gauge.element.getBoundingClientRect(),T=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),E=new Q(Math.abs(w.left-S.left),Math.abs(w.top-S.top),S.width,S.height),M=R(o.id,this.gauge);this.currentAxis=this.gauge.axes[M.axisIndex],this.currentRange=this.currentAxis.ranges[M.pointerIndex];var k=u(this.currentRange.end-Math.abs((this.currentRange.end-this.currentRange.start)/2),this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,O=this.gauge.tooltip.rangeSettings.format||this.currentAxis.labelStyle.format,v=O&&(null!==O.match("{end}")||null!==O.match("{start}")),L=this.gauge.intl.getNumberFormat({format:_(O),useGrouping:this.gauge.useGroupingSeparator});this.tooltipElement();var B=this.roundedValue(this.currentRange.start),z=this.roundedValue(this.currentRange.end),W=this.currentRange.start.toString(),G=this.currentRange.end.toString(),U=v?O.replace(/{start}/g,W).replace(/{end}/g,G):this.gauge.enableRtl?"Start:"+L(B)+" <br>End:"+L(z)+" ":"Start : "+L(B)+"<br>End : "+L(z);(r=p(k,this.currentRange.currentRadius,this.gauge.midPoint)).x=this.tooltip.rangeSettings.template&&(k>=150&&k<=250||k>=330&&k<=360||k>=0&&k<=45)?r.x+10:r.x;var j={name:"tooltipRender",cancel:!1,content:U,location:r,axis:this.currentAxis,tooltip:this.tooltip,range:this.currentRange,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Range"},V={color:this.gauge.tooltip.rangeSettings.textStyle.color,opacity:this.gauge.tooltip.rangeSettings.textStyle.opacity,fontFamily:this.gauge.tooltip.rangeSettings.textStyle.fontFamily,fontStyle:this.gauge.tooltip.rangeSettings.textStyle.fontStyle,fontWeight:this.gauge.tooltip.rangeSettings.textStyle.fontWeight,size:this.gauge.tooltip.rangeSettings.textStyle.size},H=function(e){var o=e.tooltip.rangeSettings.template;if(null!==o&&1===o.length&&"function"!=typeof o&&(o=o[o[0]]),"function"!=typeof o&&o&&(o=(o=o.replace(/[$]{start}/g,W)).replace(/[$]{end}/g,G)),t.tooltip.rangeSettings.showAtMousePosition)e.location=I(i,n,t.gauge.svgObject),t.tooltipRect=E;else if(o){var a=D(o,t.gauge,t.tooltipEle);t.tooltipRect=Math.abs(T.left-S.left)>a.width?t.findPosition(E,k,e.location,!0):E}else t.findPosition(E,k,e.location,!1);e.cancel||(V.color=e.tooltip.rangeSettings.textStyle.color||t.gauge.themeStyle.tooltipFontColor,V.fontFamily=e.tooltip.rangeSettings.textStyle.fontFamily||t.gauge.themeStyle.fontFamily,V.fontWeight=e.tooltip.rangeSettings.textStyle.fontWeight||t.gauge.themeStyle.fontWeight,V.opacity=e.tooltip.rangeSettings.textStyle.opacity||t.gauge.themeStyle.tooltipTextOpacity,V.size=e.tooltip.rangeSettings.textStyle.size||t.gauge.themeStyle.tooltipFontSize,t.svgTooltip=t.svgTooltipCreate(t.svgTooltip,e,o,t.arrowInverted,t.tooltipRect,t.gauge,e.tooltip.rangeSettings.fill,V,e.tooltip.rangeSettings.border),t.svgTooltip.opacity=t.gauge.themeStyle.tooltipFillOpacity||t.svgTooltip.opacity,t.svgTooltip.appendTo(t.tooltipEle),!o||"LeftTop"!==t.tooltipPosition&&"LeftBottom"!==t.tooltipPosition||(t.tooltipEle.style.left=parseFloat(t.tooltipEle.style.left)-t.tooltipEle.getBoundingClientRect().width-20+"px"),o&&Math.abs(n-t.tooltipEle.getBoundingClientRect().top)<=0&&(t.tooltipEle.style.top=parseFloat(t.tooltipEle.style.top)+20+"px"))};this.gauge.trigger("tooltipRender",j,H),this.gauge.renderReactTemplates()}else if(this.tooltip.type.indexOf("Annotation")>-1&&this.checkParentAnnotationId(o)&&!this.gauge.isDrag&&this.annotationTargetElement.id.indexOf(this.gaugeId)>=0){s=!0;var X=this.gauge.svgObject.getBoundingClientRect(),Y=this.gauge.element.getBoundingClientRect(),Z=new Q(Math.abs(Y.left-X.left),Math.abs(Y.top-X.top),X.width,X.height),q=R(this.annotationTargetElement.id,this.gauge);this.currentAxis=this.gauge.axes[q.axisIndex],this.currentAnnotation=this.currentAxis.annotations[q.pointerIndex];var J=this.currentAnnotation.angle-90;this.tooltipElement(),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle);var $=null!==this.gauge.tooltip.annotationSettings.format?this.gauge.tooltip.annotationSettings.format:"";(r=p(J,F(this.currentAnnotation.radius,this.currentAxis.currentRadius),this.gauge.midPoint)).x=this.tooltip.annotationSettings.template&&(J>=150&&J<=250||J>=330&&J<=360||J>=0&&J<=45)?r.x+10:r.x;var K={name:"tooltipRender",cancel:!1,content:$,location:r,axis:this.currentAxis,tooltip:this.tooltip,annotation:this.currentAnnotation,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Annotation"},ee=function(e){var i=e.tooltip.annotationSettings.template;null!==i&&1===i.length&&"function"!=typeof i&&(i=i[i[0]]);var o=t.annotationTargetElement.getBoundingClientRect();if(t.tooltipPosition="RightTop",t.arrowInverted=!0,e.location.x=e.location.x+o.width/2,t.tooltipRect=new Q(Z.x,Z.y,Z.width,Z.height),!e.cancel&&(null!==t.gauge.tooltip.annotationSettings.format||null!==t.gauge.tooltip.annotationSettings.template)){var a={color:e.tooltip.textStyle.color||t.gauge.themeStyle.tooltipFontColor,fontFamily:e.tooltip.textStyle.fontFamily||t.gauge.themeStyle.fontFamily,fontWeight:e.tooltip.textStyle.fontWeight||t.gauge.themeStyle.fontWeight,opacity:e.tooltip.textStyle.opacity||t.gauge.themeStyle.tooltipTextOpacity,fontStyle:e.tooltip.textStyle.fontStyle,size:e.tooltip.textStyle.size||t.gauge.themeStyle.tooltipFontSize};t.svgTooltip=t.svgTooltipCreate(t.svgTooltip,e,i,t.arrowInverted,t.tooltipRect,t.gauge,e.tooltip.annotationSettings.fill,a,e.tooltip.annotationSettings.border),t.svgTooltip.opacity=t.gauge.themeStyle.tooltipFillOpacity||t.svgTooltip.opacity,t.svgTooltip.appendTo(t.tooltipEle),i&&Math.abs(n-t.tooltipEle.getBoundingClientRect().top)<=0&&(t.tooltipEle.style.top=parseFloat(t.tooltipEle.style.top)+20+"px")}};this.gauge.trigger("tooltipRender",K,ee),this.gauge.renderReactTemplates()}else(o.id===this.gauge.element.id+"_CircularGaugeTitle"||o.id.indexOf("_gauge_legend_")>-1)&&e.target.textContent.indexOf("...")>-1?N(e,i,n,this.gauge,!1):this.removeTooltip()&&(this.gauge.isVue||this.gauge.isVue3?this.gauge.clearTemplate([this.tooltipEle.children[0].id],[0]):this.gauge.isAngular||this.gauge.clearTemplate());var te=document.getElementById(this.gaugeId).getBoundingClientRect(),ie=s?this.tooltipEle.getBoundingClientRect():null;if(s&&this.tooltipEle.offsetLeft<0&&ie.left-te.left<0){var ne=this.tooltipEle.style.left.split("px")[0];this.tooltipEle.style.left=parseInt(ne,10)+(te.left-ie.left)+"px"}s&&ie.top<0&&(this.tooltipEle.style.top="0px")},e.prototype.svgTooltipCreate=function(e,n,o,a,r,l,s,d,g){var u={color:g.color||this.gauge.themeStyle.tooltipBorderColor||"",width:g.width,dashArray:g.dashArray};return e=new i.Tooltip({theme:l.theme,enable:!0,data:{value:n.content},template:o,enableRTL:l.enableRtl,enableAnimation:n.tooltip.enableAnimation,content:[t.SanitizeHtmlHelper.sanitize(n.content)],location:n.location,inverted:a,areaBounds:r,fill:s||l.themeStyle.tooltipFillColor,textStyle:d,availableSize:l.availableSize,border:u,enableShadow:!0}),(l.isVue||l.isVue3)&&(e.controlInstance=l),e},e.prototype.tooltipElement=function(){document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip"}),this.tooltipEle.style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle))},e.prototype.checkParentAnnotationId=function(e){for(this.annotationTargetElement=e.parentElement;null!=this.annotationTargetElement;){if(this.annotationTargetElement.id.indexOf("_Annotation_")>=0)return e=this.annotationTargetElement,!0;this.annotationTargetElement=this.annotationTargetElement.parentElement}return!1},e.prototype.roundedValue=function(e){return this.currentAxis.roundingPlaces?parseFloat(e.toFixed(this.currentAxis.roundingPlaces)):e},e.prototype.findPosition=function(e,t,i,n){var o,a,r,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,o=t>=15&&t<=30?i.y:0,this.tooltipRect=new Q(e.x,e.y+a,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new Q(e.x,e.y+i.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new Q(e.x,e.y+i.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!!n||n,a=t>=150&&t<=160&&n?i.y:0,this.tooltipRect=new Q(e.x,e.y+a,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,r=t>=200&&t<=225?Math.abs(e.y-i.y):e.height,this.tooltipRect=new Q(e.x-i.x,e.y,e.width,r),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-i.x),this.tooltipRect=new Q(e.x+10,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,o=t>=270&&t>290?i.x-10:0,this.tooltipRect=new Q(e.x+o,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,r=t>=315&&t<=340?Math.abs(e.y-i.y):e.height,this.tooltipRect=new Q(e.x,e.y,e.width,r),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){var e=!1;if(document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0){var i=document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0];i&&(t.remove(i),e=!0),this.pointerEle=null}return e},e.prototype.mouseUpHandler=function(e){this.removeTooltip(),this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),this.gauge.element.addEventListener("contextmenu",this.removeTooltip))},e.prototype.removeEventListener=function(){if(this.gauge){if(this.gauge.isDestroyed)return;this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.gauge.element.removeEventListener("contextmenu",this.removeTooltip)}},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(){this.tooltipEle=null,this.currentAxis=null,this.tooltip=null,this.currentPointer=null,this.currentRange=null,this.currentAnnotation=null,t.isNullOrUndefined(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,S(this.tooltipId)),this.svgTooltip=null,this.tooltipRect=null,this.pointerEle=null,this.annotationTargetElement=null,this.gauge=null},e}(),Fe=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,n){var o=e.background;this.setRangeColor(e),null!==o&&s(new q(n.element.id+"_AxisOuterLine_"+t,o,0,"transparent",null,"0",c(n.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,n)},e.prototype.checkAngles=function(e){e.startAngle=e.startAngle>=360?360:e.startAngle<=-360?-360:e.startAngle,e.endAngle=e.endAngle>=360?360:e.endAngle<=-360?-360:e.endAngle},e.prototype.drawAxisLine=function(e,t,i,n){var o=e.startAngle,a=e.endAngle,r=e.lineStyle.color||this.gauge.themeStyle.lineColor;e.lineStyle.width>0&&this.gauge.allowComponentRender&&(o=d(o,a)?[0,a=360][0]:o,s(new q(n.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,r,null,e.lineStyle.dashArray,c(n.midPoint,o-90,a-90,e.currentRadius),"",n.allowLoadingAnimation?"visibility: hidden; pointer-events:none;":"pointer-events:none;"),i,n))},e.prototype.drawAxisLabels=function(e,t,i,n){var o,a,r,s,g,h,c,m,y,f,v,x,b,A,C,P=n.renderer.createGroup({id:n.element.id+"_Axis_Labels_"+t,style:n.allowLoadingAnimation?"visibility: hidden;":"pointer-events:auto;"}),S=e.visibleRange.min,w=e.visibleRange.max,F=e.visibleLabels,R=!0,_=e.labelStyle,T=e.currentRadius,E=0;E="Inside"===_.position&&"Outside"===e.majorTicks.position&&"Outside"===e.minorTicks.position||"Outside"===_.position&&"Inside"===e.minorTicks.position&&"Inside"===e.majorTicks.position?e.lineStyle.width+e.currentRadius/20:_.position===e.majorTicks.position?e.currentRadius/20:e.currentRadius/40;var M=e.labelStyle.shouldMaintainPadding?10:E,k=_.font.color||this.gauge.themeStyle.labelColor;"Outside"===_.position?T+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+M/2:"Cross"===_.position?T=T-e.maxLabelSize.height/4-e.labelStyle.offset:T-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(_.autoAngle?M:0),e.hideIntersectingLabel&&(m=p(y=Math.round(u(F[F.length-1].value,w,S,e.startAngle,e.endAngle,"ClockWise"===e.direction)),T,n.midPoint),f=this.findAnchor(m,_,y,F[F.length-1]),v=!e.showLastLabel&&d(e.startAngle,e.endAngle)&&"First"!==_.hiddenLabel?F[0].size.width:F[F.length-1].size.width,x=!e.showLastLabel&&d(e.startAngle,e.endAngle)&&"First"!==_.hiddenLabel?_.autoAngle?F[0].size.width:F[0].size.height:_.autoAngle?F[F.length-1].size.width:F[F.length-1].size.height,x-=this.offsetAxisLabelsize(y,x),m=this.getAxisLabelStartPosition(m,v,f));for(var O=0,L=F.length;O<L;O++)if(C=F[O],A=Math.round(u(C.value,w,S,e.startAngle,e.endAngle,"ClockWise"===e.direction)),o=p(A,T,n.midPoint),b=this.findAnchor(o,_,A,C),e.hideIntersectingLabel&&(c=p(A,T,n.midPoint),s=C.size.width,g=_.autoAngle?s:C.size.height,g-=this.offsetAxisLabelsize(A,g),c=this.getAxisLabelStartPosition(c,s,b),0===O&&(h=p(A,T,n.midPoint),a=C.size.width,r=_.autoAngle?a:C.size.height,r-=this.offsetAxisLabelsize(A,r),h=this.getAxisLabelStartPosition(h,a,b))),!(0===O&&"First"===_.hiddenLabel||O===L-1&&"Last"===_.hiddenLabel)){var I={size:_.font.size||this.gauge.themeStyle.fontSize,color:_.font.color,fontFamily:_.font.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:_.font.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:_.font.fontStyle,opacity:_.font.opacity};if(e.hideIntersectingLabel&&0!==O){var D=O===F.length-1||!d(e.startAngle,e.endAngle)&&!e.showLastLabel||this.FindAxisLabelCollision(m,v,x,c,s,g);R=this.FindAxisLabelCollision(h,a,r,c,s,g)&&D}else R=!0;if(R||O===F.length-1){C.text=!e.showLastLabel&&(d(e.startAngle,e.endAngle)&&"First"!==_.hiddenLabel||!R)&&e.hideIntersectingLabel&&O===L-1?"":C.text,C.text=e.showLastLabel&&e.hideIntersectingLabel&&d(e.startAngle,e.endAngle)&&0===O?"":C.text;var B=l(new ee(n.element.id+"_Axis_"+t+"_Label_"+O,o.x,o.y,b,C.text,_.autoAngle?"rotate("+(A+90)+","+o.x+","+o.y+")":"","auto"),I,_.useRangeColor?U(C.value,e.ranges,k):k,P,"pointer-events:auto;");B.setAttribute("aria-label",C.text),B.setAttribute("role","region"),e.hideIntersectingLabel&&(a=C.size.width,r=_.autoAngle?a:C.size.height,r-=this.offsetAxisLabelsize(A,r),h.x=c.x,h.y=c.y)}}i.appendChild(P)},e.prototype.findAnchor=function(e,t,i,n){if(t.autoAngle)return"middle";var o="Inside"===t.position?i>120&&i<240?"start":300<i||i<60?"end":"middle":i>120&&i<240?"end":300<i||i<60?"start":"middle";return e.y+="Inside"===t.position?i>=240&&i<=300?n.size.height/2:i>=60&&i<=120?0:n.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?n.size.height/2:n.size.height/4,o},e.prototype.FindAxisLabelCollision=function(e,t,i,n,o,a){return e.x>n.x+o||e.x+t<n.x||e.y+i<n.y||e.y>n.y+a},e.prototype.getAxisLabelStartPosition=function(e,t,i){return"end"===i?e.x=e.x-t:"middle"===i&&(e.x=e.x-t/2),e},e.prototype.offsetAxisLabelsize=function(e,t){return e>=20&&e<=60||e>=120&&e<=160||e>=200&&e<=240||e>=300&&e<=340?t/5:0},e.prototype.drawMinorTickLines=function(e,t,i,n){var o=n.renderer.createGroup({id:n.element.id+"_Axis_MinorTickLines_"+t}),a=e.minorTicks,r=null!==a.interval?a.interval:e.visibleRange.interval/2,l=a.useRangeColor,d=a.color||this.gauge.themeStyle.minorTickColor;if(a.width&&a.height&&r){for(var g=0,u=e.visibleRange.min,h=e.visibleRange.max;u<=h;u+=r)this.majorValues.indexOf(+u.toFixed(3))<0&&s(new q(n.element.id+"_Axis_Minor_TickLine_"+t+"_"+g++,"transparent",a.width,l?U(u,e.ranges,d):d,null,a.dashArray,this.calculateTicks(u,a,e),"",n.allowLoadingAnimation?"visibility: hidden;pointer-events: auto;":"pointer-events:auto;"),o,n).setAttribute("data-interval",u.toString());i.appendChild(o)}},e.prototype.drawMajorTickLines=function(e,t,i,n){var o=n.renderer.createGroup({id:n.element.id+"_Axis_MajorTickLines_"+t}),a=e.majorTicks,r=a.useRangeColor;this.majorValues=[];var l=a.color||this.gauge.themeStyle.majorTickColor;if(a.width&&a.height&&e.visibleRange.interval){for(var d=0,g=e.visibleRange.min,u=e.visibleRange.max,h=e.visibleRange.interval;g<=u;g+=h)this.majorValues.push(+g.toFixed(3)),s(new q(n.element.id+"_Axis_Major_TickLine_"+t+"_"+d,"transparent",a.width,r?U(g,e.ranges,l):l,null,a.dashArray,this.calculateTicks(g,a,e),"",n.allowLoadingAnimation?"visibility: hidden;pointer-events:auto;":"pointer-events:auto;"),o,n).setAttribute("data-interval",g.toString()),d++;i.appendChild(o)}},e.prototype.calculateTicks=function(e,t,i){var n=i.lineStyle.width/2+t.offset,o=u(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=p(o,i.currentRadius+("Outside"===t.position?n:"Cross"===t.position?t.height/2-t.offset:-n),this.gauge.midPoint),r=p(o,i.currentRadius+("Outside"===t.position?n:"Cross"===t.position?t.height/2-t.offset:-n)+("Outside"===t.position?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+r.x+" "+r.y+" "},e.prototype.drawRangePath=function(e,i,n,o,a,r,l,s){var h,p,c,m,y,f,v,x,b,A,C=this.gauge.midPoint,P="ClockWise"===e.direction,S=e.visibleRange.min,w=e.visibleRange.max;if(i.isLinearCircularGradient){var F=(i.end-i.start)/i.linearGradient.colorStop.length,R=i.linearGradient.colorStop.length>1?i.start+F*s:i.start,_=i.linearGradient.colorStop.length>1?R+F:i.end;h=Math.min(Math.max(R,S),_),c=Math.min(Math.max(R,_),w)}else h=Math.min(Math.max(i.start,S),i.end),c=Math.min(Math.max(i.start,i.end),w);var T=(m=u(h,w,S,e.startAngle,e.endAngle,P))>(y=u(c,w,S,e.startAngle,e.endAngle,P));if((null!=e.rangeGap&&e.rangeGap>0&&i.start!==i.end||!t.isNullOrUndefined(i.linearGradient)&&!i.isLinearCircularGradient&&s===(!t.isNullOrUndefined(i.linearGradient.colorStop)&&i.linearGradient.colorStop.length-1))&&(m=0!==a||e.startAndEndRangeGap?0===s&&i.isLinearCircularGradient?"AntiClockWise"===e.direction?m-e.rangeGap/Math.PI:m+e.rangeGap/Math.PI:i.isLinearCircularGradient?m:"AntiClockWise"===e.direction?m-e.rangeGap/Math.PI:m+e.rangeGap/Math.PI:m,y=a!==e.ranges.length-1||e.startAndEndRangeGap?!t.isNullOrUndefined(i.linearGradient)&&s===i.linearGradient.colorStop.length-1&&i.isLinearCircularGradient?"AntiClockWise"===e.direction?y+e.rangeGap/Math.PI:y-e.rangeGap/Math.PI:i.isLinearCircularGradient?y:"AntiClockWise"===e.direction?y+e.rangeGap/Math.PI:y-e.rangeGap/Math.PI:y),this.gauge.allowComponentRender)if(h!==c&&(T?m<y+360:m<y)&&(i.start>=S&&i.end<=w||i.end>=S&&i.start<=w)){y=P?y:[m,m=y][0],o=P?o:[n,n=o][0];var E="string"==typeof i.roundedCornerRadius?parseFloat(i.roundedCornerRadius):i.roundedCornerRadius,M=.25*E,k=g(m,y);if(x=((i.currentRadius-n/2)*(m*Math.PI/180)-E/M)/(i.currentRadius-n/2)*180/Math.PI,b=((i.currentRadius-o/2)*(y*Math.PI/180)+E/M)/(i.currentRadius-o/2)*180/Math.PI,f=(i.currentRadius*(m*Math.PI/180)+(k<i.roundedCornerRadius/2&&i.isLinearCircularGradient?k<=1?0:E/4:E))/i.currentRadius*180/Math.PI,v=(i.currentRadius*(y*Math.PI/180)-(k<i.roundedCornerRadius/2&&i.isLinearCircularGradient?k<=1?0:E/4:E))/i.currentRadius*180/Math.PI,f>v&&f-v<=E&&(f=m,v=y),this.gauge.gradientModule&&(!t.isNullOrUndefined(i.linearGradient)&&!t.isNullOrUndefined(i.linearGradient.colorStop)||!t.isNullOrUndefined(i.radialGradient)&&!t.isNullOrUndefined(i.radialGradient.colorStop))){if(i.isLinearCircularGradient){var O=g(m,y-=d(m,y)?1e-4:0),L=i.linearGradient.colorStop.length,I=(e.startAngle===e.endAngle?0===e.startAngle&&0===e.endAngle?360:e.startAngle:e.endAngle-e.startAngle)-O*(L-1),D=void 0;I<=360&&I>=270?D=270:I<=270&&I>=180?D=180:I<=180&&I>=90?D=90:I<=90&&I>=0&&(D=0);var B="AntiClockWise"===e.direction?(e.startAngle===e.endAngle?0:e.startAngle)+O*(L-1-s):e.startAngle+O*s,z=e.startAngle<e.endAngle?"AntiClockWise"===e.direction?e.ranges.length>1?0===a?360-(e.startAngle+O*s):e.startAngle+O*(s+1):e.startAngle+(D+O*(L-1-s)):e.startAngle+O*s:360===e.endAngle||e.startAngle===e.endAngle?"AntiClockWise"===e.direction?e.startAngle===e.endAngle?(0===e.startAngle&&0===e.endAngle?0:360)-e.startAngle+D+O*(L-1-s):O*(L-1-s):O*s:B<360?B:B-360;i.gradientAngle=0===a?e.rangeGap?z+e.rangeGap:z:e.rangeGap>0?e.ranges[a-1].gradientAngle+e.rangeGap:e.ranges[a-1].gradientAngle,"AntiClockWise"===e.direction&&(e.ranges.length>1?s===L-1:0===s)&&(i.gradientAntiAngle=z),0!==a&&(z="AntiClockWise"===e.direction?e.ranges.length>1?e.ranges[a-1].gradientAntiAngle-z+e.startAngle:e.ranges[a-1].gradientAntiAngle+z:i.gradientAngle+z-e.startAngle,i.gradientAngle=null!=e.rangeGap&&e.rangeGap>0&&s===L-1?z+e.ranges[a-1].gradientAngle:z,"AntiClockWise"===e.direction&&(e.ranges.length>1?s===L-1:0===s)&&(i.gradientAntiAngle=z)),z>45&&z<=115||z>=0&&z<=45&&L-1<=2?p="AntiClockWise"===e.direction?"bottom":"top":z>115&&z<170?p="AntiClockWise"===e.direction?"left":"right":z>=170&&z<=280?p="AntiClockWise"===e.direction?"top":"bottom":(z>280&&z<=360||z>=0&&z<=45&&L-1>=2)&&(p="AntiClockWise"===e.direction?"right":"left")}A=this.gauge.gradientModule.getGradientColorString(i,s,p,a)}i.rangeColor=A||i.rangeColor,i.roundedCornerRadius?i.isLinearCircularGradient&&i.linearGradient.colorStop.length>1?0===s||s===i.linearGradient.colorStop.length-1?"ClockWise"===e.direction?this.roundedRangeAppendPathCalculation(i,a,r,n,o,l,s===i.linearGradient.colorStop.length-1?Math.floor(m):Math.floor(f),0!==s?Math.ceil(v):Math.ceil(y),s===i.linearGradient.colorStop.length-1?m:x,0!==s?b:y,C,s):this.roundedRangeAppendPathCalculation(i,a,r,n,o,l,0===s?Math.floor(m):Math.floor(f),s===i.linearGradient.colorStop.length-1?Math.ceil(y):Math.ceil(v),0===s?m:x,s===i.linearGradient.colorStop.length-1?y:b,C,s):this.rangeAppendPathCalculation(i,a,r,n,o,l,Math.floor(m),Math.ceil(y),s):this.roundedRangeAppendPathCalculation(i,a,r,n,o,l,Math.floor(f),Math.ceil(v),x,b,C,s):this.rangeAppendPathCalculation(i,a,r,n,o,l,Math.floor(m),Math.ceil(y),s)}else i.start===i.end&&(i.start>=S&&i.end<=w||i.end>=S&&i.start<=w)&&this.rangeAppendPathCalculation(i,a,r,n,o,l,Math.floor(m),Math.ceil(y),s)},e.prototype.roundedRangeAppendPathCalculation=function(e,t,i,n,o,a,r,l,d,g,u,h){e.pathElement.push(s(new q(e.isLinearCircularGradient?this.gauge.element.id+"_Axis_"+i+"_Range_"+t+"_Circular_"+h:this.gauge.element.id+"_Axis_"+i+"_Range_"+t,e.rangeColor,0,e.rangeColor,e.opacity,"0",A(u,Math.floor(r),Math.ceil(l),d,g,e.currentRadius,n,o,e,this.gauge.axes[i]),"",""),a,this.gauge))},e.prototype.rangeAppendPathCalculation=function(e,t,i,n,o,a,r,l,d){e.pathElement.push(s(new q(e.isLinearCircularGradient?this.gauge.element.id+"_Axis_"+i+"_Range_"+t+"_Circular_"+d:this.gauge.element.id+"_Axis_"+i+"_Range_"+t,e.rangeColor,0,e.rangeColor,e.opacity,"0",c(this.gauge.midPoint,Math.floor(r),Math.ceil(l),e.currentRadius,n,o,e,this.gauge.axes[i]),"",""),a,this.gauge))},e.prototype.drawAxisRange=function(e,i,n){var o,r,l,s,d,g=this,u=document.getElementById(this.gauge.element.id+"_Axis_Ranges_ "+i)?document.getElementById(this.gauge.element.id+"_Axis_Ranges_ "+i):this.gauge.renderer.createGroup({id:this.gauge.element.id+"_Axis_Ranges_"+i,style:this.gauge.allowLoadingAnimation?"opacity: 0;":""});e.ranges.map(function(n,h){if(n.isLinearCircularGradient=!t.isNullOrUndefined(g.gauge.gradientModule)&&!t.isNullOrUndefined(n.linearGradient)&&t.isNullOrUndefined(n.linearGradient.startValue)&&t.isNullOrUndefined(n.linearGradient.endValue)&&!t.isNullOrUndefined(n.linearGradient.colorStop),n.pathElement=[],!t.isNullOrUndefined(n.offset)&&n.offset.length>0?n.currentDistanceFromScale=F(n.offset,e.currentRadius):n.currentDistanceFromScale=n.offset,g.calculateRangeRadius(e,n),o=!t.isNullOrUndefined(n.startWidth)&&n.startWidth.length>0?a(n.startWidth,n.currentRadius):n.startWidth,l=!t.isNullOrUndefined(n.endWidth)&&n.endWidth.length>0?a(n.endWidth,n.currentRadius):n.endWidth,n.currentRadius=g.calculateRangeRadiusWithPosition(e,n,o),n.isLinearCircularGradient)for(var p=0;p<n.linearGradient.colorStop.length;p++)p<=n.linearGradient.colorStop.length-1?(s=0===p?l:s,d=0===p?o:d,r=Math.abs(d-s)/n.linearGradient.colorStop.length,p>0?(o=l,l=d>s?o-r:o+r):l=d>s?o-r:o+r):(o=d>s?o-r:o+r,l=s),g.drawRangePath(e,n,o,l,h,i,u,p);else n.start===n.end&&"AntiClockWise"===e.direction&&e.startAngle===e.endAngle||g.drawRangePath(e,n,o,l,h,i,u,null)}),n.appendChild(u)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=F(i,e.currentRadius)},e.prototype.calculateRangeRadiusWithPosition=function(e,i,n){return!t.isNullOrUndefined(i.position)&&"Auto"!==i.position&&t.isNullOrUndefined(i.radius)?"Outside"===i.position?i.currentRadius+e.lineStyle.width/2+i.currentDistanceFromScale:"Inside"===i.position?i.currentRadius-e.lineStyle.width/2-i.currentDistanceFromScale:i.currentRadius+n/2-i.currentDistanceFromScale:i.currentRadius},e.prototype.setRangeColor=function(e){var t=O(this.gauge.theme);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e.prototype.destroy=function(){this.gauge=null,this.majorValues=[]},e}(),Re=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,i,n,o,a){var r=this;void 0===a&&(a=!0);var l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+i});this.gauge.allowComponentRender&&(e.pointers.map(function(n,d){!t.isNullOrUndefined(n.offset)&&n.offset.length>0?n.currentDistanceFromScale=F(n.offset,e.currentRadius):n.currentDistanceFromScale=n.offset,n.pathElement=[],r.calculatePointerRadius(e,n),o.allowPointerDrag||(o.allowPointerDrag=n.enableDrag),l=o.renderer.createGroup({id:o.element.id+"_Axis_"+i+"_Pointer_"+d}),null!=n.value&&(l.setAttribute("aria-label",n.description||"Pointer:"+n.value.toString()),l.setAttribute("role","region")),r["draw"+n.type+"Pointer"](e,i,d,l,o),r.gauge.allowLoadingAnimation?l.style.visibility="hidden":r.setPointerValue(e,n,n.currentValue),s.appendChild(l),r.gauge.allowLoadingAnimation||!a&&!n.animation.enable&&"Enable"!==t.animationMode||r.gauge.isPropertyChange&&!n.isPointerAnimation||(n.previousValue=r.gauge.isPropertyChange?n.previousValue:e.minimum,r.doPointerAnimation(l,n,e,i))}),n.appendChild(s))},e.prototype.calculatePointerRadius=function(e,i){i.currentRadius=t.isNullOrUndefined(i.radius)?"Auto"!==i.position?this.pointerRadiusForPosition(e,i):e.currentRadius-(e.farSize+5):F(i.radius,e.currentRadius)},e.prototype.pointerRadiusForPosition=function(e,t){if("Text"===t.markerShape){var i=parseInt(t.textStyle.size,10),n="Cross"===t.position?i/5:0;return"Inside"===t.position?e.currentRadius-i/1.2-e.lineStyle.width/2-n-t.currentDistanceFromScale:"Outside"===t.position?e.currentRadius+e.lineStyle.width/2+i/4+n+t.currentDistanceFromScale:e.currentRadius-i/6-n-t.currentDistanceFromScale}var o="RangeBar"===t.type?t.pointerWidth:0,n="Marker"===t.type?"InvertedTriangle"===t.markerShape||"Triangle"===t.markerShape?"Cross"===t.position?t.markerWidth/2:0:t.markerWidth/2:0;return"Inside"===t.position?e.currentRadius-e.lineStyle.width/2-n-t.currentDistanceFromScale:"Outside"===t.position?e.currentRadius+o+e.lineStyle.width/2+n+t.currentDistanceFromScale:e.currentRadius+o/2-t.currentDistanceFromScale-("InvertedTriangle"===t.markerShape||"Triangle"===t.markerShape?n:0)},e.prototype.drawNeedlePointer=function(e,t,i,n,o){var a,r,l,d,g,u,h,c=e.pointers[i],m=c.needleTail,y=c.cap,f=c.needleStartWidth,v=c.needleEndWidth,x=o.midPoint,b=c.pointerWidth/2;r=p(0,c.currentRadius,x),l=0===f&&0===v&&b?"M "+x.x+" "+x.y+" L "+r.x+" "+x.y+" L "+x.x+" "+x.y+" Z":"M "+x.x+" "+(x.y-b-v)+" L "+r.x+" "+(x.y-f/2)+" L "+r.x+" "+(x.y+f/2)+" L "+x.x+" "+(x.y+b+v)+" Z",o.gradientModule&&(g=o.gradientModule.getGradientColorString(c)),c.pathElement.push(s(new q(o.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,g||(c.color||this.gauge.themeStyle.needleColor),c.border.width,c.border.color,null,c.border.dashArray,l),n,o)),a=F(c.needleTail.length,c.currentRadius),d="M "+x.x+" "+(x.y-b)+" L "+r.x+" "+(x.y-b)+" L "+r.x+" "+(x.y+b)+" L "+x.x+" "+(x.y+b),o.gradientModule&&(u=o.gradientModule.getGradientColorString(m)),a&&(r=p(180,a,o.midPoint),l="M "+x.x+" "+(x.y-b)+" L "+r.x+" "+(x.y-b)+" L "+r.x+" "+(x.y+b)+" L "+x.x+" "+(x.y+b)+" Z",c.pathElement.push(s(new q(o.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,u||(c.needleTail.color||this.gauge.themeStyle.needleTailColor),c.needleTail.border.width,c.needleTail.border.color,null,c.needleTail.border.dashArray,l),n,o)),d+=" L "+r.x+" "+(x.y+b)+" L "+r.x+" "+(x.y-b)),o.gradientModule&&(h=o.gradientModule.getGradientColorString(y)),c.cap.radius&&c.pathElement.push(s(T(x,"Circle",new $(2*c.cap.radius,2*c.cap.radius),"",new q(o.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,h||(c.cap.color||this.gauge.themeStyle.capColor),c.cap.border.width,c.cap.border.color,null,c.cap.border.dashArray,"","")),n,o,"Ellipse")),c.pathElement.push(s(new q(o.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",d+" Z"),n,o))},e.prototype.setPointerValue=function(e,i,n){var o=this,a=n===e.visibleRange.min&&"RangeBar"===i.type,r=this.gauge.midPoint,l="ClockWise"===e.direction,s=i.roundedCornerRadius,d=.25*s;s>0&&s<=5&&(d=.25*(s=6));var g=u(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,l),h=u(n,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,l);h=l?g>h?Math.round(g)!==Math.round(h)||a?Math.round(h):Math.round(h)-(i.roundedCornerRadius>0?1.5:.5):g!==h||a?h:h+1:Math.round(g)!==Math.round(h)||a?[g,g=h][0]:[g,g=h>g?h+(i.roundedCornerRadius>0?1.5:.5):h-1][0],n<=e.visibleRange.min+e.visibleRange.interval&&i.roundedCornerRadius&&(s=n===e.visibleRange.min||e.visibleRange.min+1?8:s,d=.25*(s/=2));var p=((i.currentRadius-i.pointerWidth/2)*(g*Math.PI/180)-s/d)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,c=((i.currentRadius-i.pointerWidth/2)*(h*Math.PI/180)+s/d)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,m=n!==e.maximum||e.startAngle!==e.endAngle&&360!==Math.abs(e.startAngle-e.endAngle)||"RangeBar"!==i.type?180:45,y=(i.currentRadius*(g*Math.PI/m)+s)/i.currentRadius*m/Math.PI,f=(i.currentRadius*(h*Math.PI/m)-s)/i.currentRadius*m/Math.PI;y>f&&y-f<=36&&"RangeBar"===i.type&&(y=g,f=h),t.isNullOrUndefined(i.currentRadius)&&this.calculatePointerRadius(e,i),i.pathElement.map(function(t){"RangeBar"===i.type?s&&!a?(t.setAttribute("d",A(r,Math.floor(y),Math.ceil(f),p,c,i.currentRadius,i.pointerWidth,i.pointerWidth)),s=0):t.setAttribute("d",V(r,g,h,i.currentRadius,i.currentRadius-i.pointerWidth,a)):"Marker"===i.type&&"Text"===i.markerShape?o.calculateTextElement(e,i,n,t):t.setAttribute("transform","rotate("+u(n,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,l)+","+r.x+","+r.y+")")})},e.prototype.calculateTextElement=function(e,t,i,n){var o=u(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,"ClockWise"===e.direction),a=p(o,t.currentRadius,this.gauge.midPoint);n.setAttribute("transform","rotate("+(o+90)+","+a.x+","+a.y+")"),n.setAttribute("x",String(a.x)),n.setAttribute("y",String(a.y))},e.prototype.drawMarkerPointer=function(e,i,n,o,a){var r,d=e.pointers[n],g=e.visibleRange.min,h=e.visibleRange.max,c=Math.round(u(d.value,h,g,e.startAngle,e.endAngle,"ClockWise"===e.direction)),m=d.markerShape;a.gradientModule&&(r=a.gradientModule.getGradientColorString(d)),!t.isNullOrUndefined(d.radius)||t.isNullOrUndefined(d.position)||"InvertedTriangle"!==d.markerShape&&"Triangle"!==d.markerShape||(m="Outside"!==d.position&&"Cross"!==d.position||"Triangle"!==d.markerShape?"Inside"===d.position&&"InvertedTriangle"===d.markerShape?"Triangle":d.markerShape:"InvertedTriangle");var y=p("Text"===d.markerShape?c:0,d.currentRadius,a.midPoint);if("Text"===d.markerShape){var f={size:d.textStyle.size,color:d.textStyle.color||this.gauge.themeStyle.pointerColor,fontFamily:d.textStyle.fontFamily,fontStyle:d.textStyle.fontStyle,fontWeight:d.textStyle.fontWeight||this.gauge.themeStyle.fontWeight,opacity:d.textStyle.opacity},v=l(new ee(a.element.id+"_Axis_"+i+"_Pointer_Marker_"+n,y.x,y.y,"middle",d.text,"rotate("+(c+90)+","+y.x+","+y.y+")","auto"),f,f.color,o,"pointer-events : auto; ");v.style.visibility=!d.animation.enable&&"Enable"!==t.animationMode||this.gauge.isPropertyChange&&!d.isPointerAnimation||!this.gauge.animatePointer?"visible":"hidden",d.pathElement.push(v)}else d.pathElement.push(s(T(y,m,new $(d.markerWidth,d.markerHeight),d.imageUrl,new q(a.element.id+"_Axis_"+i+"_Pointer_Marker_"+n,r||(d.color||this.gauge.themeStyle.pointerColor),d.border.width,d.border.color,null,d.border.dashArray,"","")),o,a,"Circle"===d.markerShape?"Ellipse":"Image"===d.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,n,o){var a,r=e.pointers[i];o.gradientModule&&(a=o.gradientModule.getGradientColorString(r)),r.pathElement.push(s(new q(o.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,a||(r.color||this.gauge.themeStyle.pointerColor),r.border.width,r.border.color,1,r.border.dashArray,""),n,o))},e.prototype.doPointerAnimation=function(e,i,n,o){var a=this,r=t.isNullOrUndefined(i.previousValue)?n.visibleRange.min:i.previousValue,l=i.currentValue;((i.animation.enable||"Enable"===t.animationMode)&&r!==l&&this.gauge.animatePointer||!t.isNullOrUndefined(this.gauge.loadingAnimationDuration)&&this.gauge.loadingAnimationDuration[o]>0)&&i.pathElement.map(function(t){"RangeBar"===i.type?a.performRangeBarAnimation(t,r,l,n,i,o):"Marker"===i.type&&"Text"===i.markerShape?a.performTextAnimation(e,r,l,n,i,o):a.performNeedleAnimation(t,r,l,n,i,o)})},e.prototype.performTextAnimation=function(e,i,n,o,a,r){var l,s,d,g=this,h="ClockWise"===o.direction,c=0;i="string"==typeof i?parseInt(i,10):i,n="string"==typeof n?parseInt(n,10):n,e=t.isNullOrUndefined(e.children[0])?e:e.children[0];var m=Math.abs(i-n);new t.Animation({}).animate(e,{duration:this.gauge.isAnimationProgress?t.isNullOrUndefined(a.value)||a.value===o.minimum?0:"Enable"===t.animationMode&&((!a.animation.enable||0===a.animation.duration)&&!this.gauge.allowLoadingAnimation||this.gauge.allowLoadingAnimation&&0===this.gauge.animationDuration&&a.animation.enable&&0===a.animation.duration)?1e3:this.gauge.allowLoadingAnimation?a.animation.enable&&a.animation.duration>0?a.animation.duration:this.gauge.loadingAnimationDuration[r]:a.animation.duration:0,progress:function(t){g.gauge.isAnimationProgress&&t.timeStamp>t.delay&&(d=t.timeStamp/a.animation.duration,l=u(c=n>i?i+d*m:i-d*m,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,h),s=p(l,a.currentRadius,g.gauge.midPoint),e.setAttribute("transform","rotate("+(l+90)+","+s.x+","+s.y+")"),e.setAttribute("x",String(s.x)),e.setAttribute("y",String(s.y)),e.style.visibility="visible")},end:function(){g.gauge.isAnimationProgress&&(g.setPointerValue(o,a,n),a.isPointerAnimation=!1),g.gauge.trigger("animationComplete",{axis:o,pointer:a}),!t.isNullOrUndefined(g.gauge.loadingAnimationDuration)&&g.gauge.loadingAnimationDuration[r]>0&&!t.isNullOrUndefined(g.gauge.annotationsModule)?g.gauge.annotationsModule.annotationAnimation(g.gauge):g.gauge.isOverAllAnimationComplete=!0}})},e.prototype.performNeedleAnimation=function(e,i,n,o,a,r){var l=this,s="ClockWise"===o.direction;i="string"==typeof i?parseInt(i,10):i,n="string"==typeof n?parseInt(n,10):n;var d,g=u(i,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,s),h=u(n,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,s),p=g>h?h+360:h;new t.Animation({}).animate(e,{duration:this.gauge.isAnimationProgress?t.isNullOrUndefined(a.value)||a.value===o.minimum?0:"Enable"===t.animationMode&&((!a.animation.enable||0===a.animation.duration)&&!this.gauge.allowLoadingAnimation||this.gauge.allowLoadingAnimation&&0===this.gauge.animationDuration&&a.animation.enable&&0===a.animation.duration)?1e3:this.gauge.allowLoadingAnimation?a.animation.enable&&a.animation.duration>0?a.animation.duration:this.gauge.loadingAnimationDuration[r]:a.animation.duration:0,progress:function(t){l.gauge.isAnimationProgress&&(d=i<n||Math.round(g)===Math.round(p)?s?p-g:p-g-360:s?p-g-360:p-g,e.style.animation="None",i!==n&&(e.setAttribute("transform","rotate("+j(t.timeStamp,g,d,t.duration)+","+l.gauge.midPoint.x.toString()+","+l.gauge.midPoint.y.toString()+")"),e.style.visibility="visible"))},end:function(){l.gauge.isAnimationProgress&&(l.setPointerValue(o,a,n),l.gauge.animationDuration>0&&(e.style.visibility="visible"),a.isPointerAnimation=!1),("Marker"===a.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&l.gauge.trigger("animationComplete",{axis:o,pointer:a}),!t.isNullOrUndefined(l.gauge.loadingAnimationDuration)&&l.gauge.loadingAnimationDuration[r]>0&&!t.isNullOrUndefined(l.gauge.annotationsModule)?l.gauge.annotationsModule.annotationAnimation(l.gauge):l.gauge.isOverAllAnimationComplete=!0}})},e.prototype.performRangeBarAnimation=function(e,i,n,o,a,r){var l=this;i="string"==typeof i?parseInt(i,10):i,n="string"==typeof n?parseInt(n,10):n;var s,d;e.style.visibility="visible";var g=Math.abs(i-n);new t.Animation({}).animate(e,{duration:this.gauge.isAnimationProgress?t.isNullOrUndefined(a.value)||a.value===o.minimum?0:"Enable"===t.animationMode&&((!a.animation.enable||0===a.animation.duration)&&!this.gauge.allowLoadingAnimation||this.gauge.allowLoadingAnimation&&0===this.gauge.animationDuration&&a.animation.enable&&0===a.animation.duration)?1e3:this.gauge.allowLoadingAnimation?a.animation.enable&&a.animation.duration>0?a.animation.duration:this.gauge.loadingAnimationDuration[r]:a.animation.duration:0,progress:function(e){l.gauge.isAnimationProgress&&(e.duration=l.gauge.isAnimationProgress?e.duration:0,d=e.timeStamp/e.duration,s=n>i?i+d*g:i-d*g,l.setPointerValue(o,a,s))},end:function(){l.gauge.isAnimationProgress&&(l.setPointerValue(o,a,n),a.isPointerAnimation=!1),l.gauge.trigger("animationComplete",{axis:o,pointer:a}),!t.isNullOrUndefined(l.gauge.loadingAnimationDuration)&&l.gauge.loadingAnimationDuration[r]>0&&!t.isNullOrUndefined(l.gauge.annotationsModule)?l.gauge.annotationsModule.annotationAnimation(l.gauge):l.gauge.isOverAllAnimationComplete=!0}})},e.prototype.destroy=function(){this.gauge=null},e}(),_e=function(){function e(e){this.axisOption=[],this.prevAnimatedMajorTickValue=[],this.prevAnimatedMajorTickIndex=[],this.prevAnimatedMinorTickValue=[],this.prevAnimatedMinorTickIndex=[],this.allowAxisCount=[],this.rangeAnimationCount=0,this.gauge=e,this.axisRenderer=new Fe(e),this.pointerRenderer=new Re(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,n=this,o=0,a=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,l=this,s=0,g=this.gauge.axes;s<g.length;s++)!function(s){if(e=Math.min(s.rect.width,s.rect.height)/2,i=null!=s.radius?F(s.radius,e):e,o=Math.max.apply(Math,s.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==s.radius?100*i/o:i,s.currentRadius=i-s.nearSize,l.gauge.moveToCenter&&1===l.gauge.axes.length&&t.isNullOrUndefined(l.gauge.centerXpoint)&&t.isNullOrUndefined(l.gauge.centerYpoint)){var g=void 0,u=s.startAngle,h=p(u-90,i,l.gauge.midPoint);g=s.endAngle;var c=p((g-=d(u,g)?1e-4:0)-90,i,l.gauge.midPoint),m=void 0,y=void 0,f=void 0,v=void 0,x=void 0,b=void 0,A=void 0;u>g&&!(Math.abs(u-g)>90)||(u>=270&&u<=360&&(g>270&&g<=360||g>=0&&g<=180)?(f=Math.abs(l.gauge.gaugeRect.x-Math.abs(h.x-l.gauge.gaugeRect.x)),A=g<=360&&g>=270?l.gauge.midPoint:g<=90?c:p(0,i,l.gauge.midPoint),v=Math.abs(A.x-l.gauge.gaugeRect.width),h=g<=360&&g>=270?c:p(270,i,l.gauge.midPoint),x=Math.abs(h.y-l.gauge.gaugeRect.y),c=g<=360&&g>=270||g>=0&&g<90?l.gauge.midPoint:g>=90&&g<=180?c:p(90,i,l.gauge.midPoint),b=Math.abs(c.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))):u>=0&&u<90&&g>=0&&g<=270?(x=Math.abs(h.y-l.gauge.gaugeRect.y),A=g>=180?p(90,i,l.gauge.midPoint):c,b=Math.abs(A.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height)),h=g>=180?c:l.gauge.midPoint,f=Math.abs(l.gauge.gaugeRect.x-Math.abs(h.x-l.gauge.gaugeRect.x)),c=g>=90?p(0,i,l.gauge.midPoint):c,v=Math.abs(c.x-l.gauge.gaugeRect.width)):u>=90&&u<180&&g>90&&g<=360?(A=g<=180?l.gauge.midPoint:g>=270?p(180,i,l.gauge.midPoint):c,f=Math.abs(A.x-l.gauge.gaugeRect.x),v=Math.abs(h.x-l.gauge.gaugeRect.width),h=g>270?p(g-90,i,l.gauge.midPoint):l.gauge.midPoint,x=Math.abs(l.gauge.gaugeRect.y-h.y),c=g>=180?p(90,i,l.gauge.midPoint):c,b=Math.abs(c.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))):u>=180&&u<=270&&(g<=360&&g>=270||g<=180&&g>=0)&&(A=g>180&&g<270?c:p(180,i,l.gauge.midPoint),f=Math.abs(l.gauge.gaugeRect.x-Math.abs(A.x-l.gauge.gaugeRect.x)),A=g>=180&&g<=360?l.gauge.midPoint:g<=90?c:p(0,i,l.gauge.midPoint),v=Math.abs(A.x-l.gauge.gaugeRect.width),A=g>180&&g<270?l.gauge.midPoint:g>=270&&g<=360?c:p(270,i,l.gauge.midPoint),x=Math.abs(A.y-l.gauge.gaugeRect.y),c=g<=360&&g>=270||g>=0&&g<90?h:270-u<g-90?c:h,b=Math.abs(c.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))),t.isNullOrUndefined(f)||t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||!(f>0||v>0)||!(x>0||b>0)||(m=Math.abs(f+v-a),y=Math.abs(x+b-r),l.gauge.midPoint.x=l.gauge.midPoint.x-f/2+v/2,l.gauge.midPoint.y=l.gauge.midPoint.y-x/2+b/2,e=Math.min(l.gauge.gaugeRect.width,l.gauge.gaugeRect.height)/2+Math.min(m,y)/2,s.currentRadius=(null!=s.radius?F(s.radius,e):e)-s.nearSize))}s.visibleRange.interval=l.calculateNumericInterval(s,s.rect);var C={cancel:!1,name:"radiusCalculate",currentRadius:s.currentRadius,gauge:l.gauge,midPoint:l.gauge.midPoint,axis:s};l.gauge.trigger("radiusCalculate",C,function(){s.currentRadius=C.currentRadius,n.gauge.midPoint=C.midPoint,n.calculateVisibleLabels(s)})}(g[s])},e.prototype.measureAxisSize=function(e,t){var i,n=this;this.computeSize(e.axes,t),e.axes.map(function(e,o){i=G(o,n.farSizes.length-1,n.farSizes),e.rect=new Q(t.x+i,t.y+i,t.width-2*i,t.height-2*i)})},e.prototype.calculateAxisValues=function(e){for(var t=0,i=this.gauge.axes;t<i.length;t++){var n=i[t];this.calculateVisibleRange(n,e),this.calculateVisibleLabels(n)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,n=Math.min(null===e.minimum?0:e.minimum,null!==e.maximum?e.maximum:100),o=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<n?n:t.value>o?o:t.value:n,n=null===e.minimum?Math.min(t.currentValue,n):n,o=null===e.maximum?Math.max(t.currentValue,o):o}),n=n===o?null!==i?n-i:n-1:n,e.visibleRange={min:n,max:o,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,i){if(!(!t.isNullOrUndefined(e.minimum)&&!t.isNullOrUndefined(e.maximum)&&e.minimum!==e.maximum||t.isNullOrUndefined(e.minimum)||t.isNullOrUndefined(e.maximum)))return 0;if(null!==e.majorTicks.interval)return e.majorTicks.interval;var n=e.endAngle-e.startAngle;return n=n<=0?n+360:n,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:i.width/2,n)},e.prototype.calculateNiceInterval=function(e,t,i,n){for(var o=e-t,a=2*Math.PI*i*(n/360),r=Math.max(.01599*a,1),l=o/r,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),d=0,g=[10,5,2,1];d<g.length;d++){var u=s*g[d];if(r<o/u)break;l=u}return l},e.prototype.calculateVisibleLabels=function(e){var i,n=e.labelStyle,o=n.format&&null!==n.format.match("{value}"),a=this.gauge.intl.getNumberFormat({format:_(n.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];var r,l=e.visibleRange.interval,s=e.visibleRange.max;if(t.isNullOrUndefined(e.minimum)&&t.isNullOrUndefined(e.maximum)||e.minimum!==e.maximum)for(var d=this,g=e.visibleRange.min;g<=s&&l;g+=l)!function(t){r=e.roundingPlaces?parseFloat(t.toFixed(e.roundingPlaces)):t,i={cancel:!1,name:"axisLabelRender",axis:e,text:o?n.format.replace(new RegExp("{value}","g"),a(r)):a(r),value:r};var l=function(i){i.cancel||e.visibleLabels.push(new te(i.text,t))};l.bind(d),d.gauge.trigger("axisLabelRender",i,l)}(g);var u=e.visibleLabels.length?e.visibleLabels[e.visibleLabels.length-1].value:null,h=e.visibleRange.max;if(!t.isNullOrUndefined(u)&&u!==h&&!0===e.showLastLabel){i={cancel:!1,name:"axisLabelRender",axis:e,text:o?n.format.replace(new RegExp("{value}","g"),a(h)):a(h),value:h};var p=function(t){t.cancel||e.visibleLabels.push(new te(t.text,h))};p.bind(this),this.gauge.trigger("axisLabelRender",i,p)}this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,n,o,a,r=0,l=0,s=0,d=10;this.farSizes=[],this.calculateAxisValues(t);for(var g=0,u=e;g<u.length;g++){var h=u[g];i=h.lineStyle.width/2,n=0,o=0,a="Cross"===h.majorTicks.position?h.majorTicks.height/2:a,a="Cross"===h.minorTicks.position&&a<h.minorTicks.height/2?h.minorTicks.height/2:a,i=i<(a="Cross"===h.labelStyle.position&&a<h.maxLabelSize.height/2?h.maxLabelSize.height/2:a)?a:i,r=h.majorTicks.offset,l=h.minorTicks.offset,s=h.labelStyle.offset,d=h.labelStyle.shouldMaintainPadding?10:0,n+="Outside"!==h.majorTicks.position||"Outside"!==h.minorTicks.position||"Outside"!==h.labelStyle.position?5:0,n+=("Outside"===h.majorTicks.position?h.majorTicks.height+i:0)+("Outside"===h.labelStyle.position?h.maxLabelSize.height+s+d:0)+("Outside"===h.minorTicks.position&&"Outside"!==h.majorTicks.position?h.minorTicks.height+i:0)+i,n+="Outside"===h.majorTicks.position&&"Outside"===h.minorTicks.position?Math.max(r,l):"Outside"===h.majorTicks.position?r:"Outside"===h.minorTicks.position?l:0,o+=("Inside"===h.majorTicks.position?h.majorTicks.height+i:0)+("Inside"===h.labelStyle.position?h.maxLabelSize.height+s+d:0)+("Inside"===h.minorTicks.position&&"Outside"===h.majorTicks.position?h.minorTicks.height+i:0)+i,o+="Inside"===h.majorTicks.position&&"Inside"===h.minorTicks.position?Math.max(r,l):"Inside"===h.majorTicks.position?r:"Inside"===h.minorTicks.position?l:0,this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=o+n),h.nearSize=n-5,h.farSize=o,n=this.gauge.axes.length===this.farSizes.length+1?0:n,this.farSizes.push(n)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var n,o=this.gauge,a=this.axisRenderer,r=o.renderer.createGroup({id:o.element.id+"_AxesCollection","clip-path":"url(#"+o.element.id+"_GaugeAreaClipRect_)"}),l=t.createElement("div",{id:o.element.id+"_Secondary_Element"});l.style.position="relative",o.element.appendChild(l),o.axes.map(function(l,s){n=o.renderer.createGroup({id:o.element.id+"_Axis_Group_"+s}),i.gauge.allowComponentRender=!t.isNullOrUndefined(l.minimum)&&!t.isNullOrUndefined(l.maximum)&&l.minimum!==l.maximum||t.isNullOrUndefined(l.minimum)||t.isNullOrUndefined(l.maximum),a.checkAngles(l),a.drawAxisOuterLine(l,s,n,o),o.allowRangePreRender&&a.drawAxisRange(l,s,n),a.drawAxisLine(l,s,n,o),o.allowRangePreRender||a.drawAxisRange(l,s,n),a.drawMajorTickLines(l,s,n,o),a.drawMinorTickLines(l,s,n,o),a.drawAxisLabels(l,s,n,o),i.pointerRenderer.drawPointers(l,s,n,o,e),o.annotationsModule&&o.annotationsModule.renderAnnotation(l,s,o),r.appendChild(n)}),o.svgObject.appendChild(o.renderer.drawClipPath({id:o.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:o.availableSize.width,height:o.availableSize.height,fill:"transparent",stroke:"transparent"})),o.svgObject.appendChild(r),o.allowLoadingAnimation&&this.durationSplitUp(0===o.animationDuration&&"Enable"===t.animationMode?3e3:o.animationDuration,r)},e.prototype.labelElementAnimation=function(e,i){var n=this;e&&new t.Animation({}).animate(e,{duration:this.gauge.loadingAnimationDuration[i],progress:function(){e.style.visibility="visible"},end:function(){e.style.visibility="visible";var t=document.getElementById(n.gauge.element.id+"_Axis_Labels_"+i);n.gauge.axes[i].showLastLabel&&parseInt(e.id.split("Label_")[1],10)===t.childElementCount-2&&(t.style.visibility="visible",(e=document.getElementById(n.gauge.element.id+"_Axis_"+i+"_Label_"+(t.childElementCount-1)))&&(e.style.visibility="visible"))}})},e.prototype.elementLabelAnimation=function(e,i,n,o){var a=this;e&&new t.Animation({}).animate(e,{duration:null==o.axes[i].labelStyle.font.size||"0px"!==o.axes[i].labelStyle.font.size&&"0"!==o.axes[i].labelStyle.font.size?o.loadingAnimationDuration[i]/this.axisOption[i].axisLabelCount:0,progress:function(){e.style.visibility="visible"},end:function(){n+=1,a.elementLabelAnimation(document.getElementById(o.element.id+"_Axis_"+i+"_Label_"+n),i,n,o);var t=document.getElementById(a.gauge.element.id+"_Axis_Labels_"+i);a.gauge.axes[i].showLastLabel&&parseInt(e.id.split("Label_")[1],10)===t.childElementCount-2&&((e=document.getElementById(a.gauge.element.id+"_Axis_"+i+"_Label_"+(t.childElementCount-1)))&&(e.style.visibility="visible"),t.style.visibility="visible"),0===a.rangeAnimationCount&&a.axisOption[i].axisLabelCount-1===n&&(t.style.visibility="visible",a.rangeAnimationCount++,a.rangeAnimation(o))}})},e.prototype.axisLineCalculation=function(e,t,i,n){var o=i===t.visibleRange.min,a=n.midPoint,r="ClockWise"===t.direction,l=t.lineStyle.width/2,s=u(t.visibleRange.min,t.visibleRange.max,t.visibleRange.min,t.startAngle,t.endAngle,r),d=u(i,t.visibleRange.max,t.visibleRange.min,t.startAngle,t.endAngle,r);d=r?s>d?Math.round(s)!==Math.round(d)||o?Math.round(d):Math.round(d)-.5:s!==d||o?d:d+1:Math.round(s)!==Math.round(d)||o?[s,s=d][0]:[s,s=d>s?d+.5:d-1][0],e.setAttribute("d",V(a,s,d,t.currentRadius+l,t.currentRadius-l,o))},e.prototype.axisLineAnimation=function(e,i,n){var o=this,a=n.axes[e];if(this.prevAnimatedMajorTickValue.push(a.minimum),this.prevAnimatedMinorTickValue.push(a.minimum),this.prevAnimatedMinorTickIndex.push(0),this.prevAnimatedMajorTickIndex.push(0),this.prevAnimatedTickType="major",this.axisOption[e].isAxisLine){var r,l,s=document.getElementById(n.element.id+"_AxisLine_"+e),d=a.visibleRange.min,g=a.visibleRange.max,u=Math.abs(d-g);new t.Animation({}).animate(s,{duration:i,progress:function(e){s.style.visibility="visible",s.setAttribute("fill",a.lineStyle.color),s.setAttribute("stroke-width","0"),l=e.timeStamp/e.duration,r=g>d?d+l*u:d-l*u,o.axisLineCalculation(s,a,r,n)},end:function(){s.setAttribute("fill","transparent"),s.setAttribute("stroke-width",a.lineStyle.width.toString()),s.setAttribute("d",c(n.midPoint,a.startAngle-90,a.endAngle-90,a.currentRadius)),s.style.visibility="visible",o.axisAnimation(e,i,n)}})}else this.axisOption[e].isMajorTick||this.axisOption[e].isMinorTick?this.axisOption[e].isMajorTick||this.axisOption[e].isMajorTick&&this.axisOption[e].isMinorTick?this.tickElementAnimation(document.getElementById(n.element.id+"_Axis_Major_TickLine_"+e+"_0"),document.getElementById(n.element.id+"_Axis_"+e+"_Label_0"),i,e,this.axisOption[e].isMajorTick&&this.axisOption[e].isMinorTick?0:-1,"major",this.axisOption[e],n):this.axisOption[e].isMinorTick&&this.tickElementAnimation(document.getElementById(n.element.id+"_Axis_Minor_TickLine_"+e+"_0"),document.getElementById(n.element.id+"_Axis_"+e+"_Label_0"),i,e,-1,"minor",this.axisOption[e],n):this.axisOption[e].isAxisLine||this.labelRangeAnimation(n,e)},e.prototype.axisAnimation=function(e,i,n){var o=this,a=document.getElementById(n.element.id+"_AxisLine_"+e),r=this.axisOption[e];new t.Animation({}).animate(a,{duration:0===this.axisOption[e].majorTickCount?0:i/this.axisOption[e].majorTickCount,progress:function(){a.style.visibility="visible"},end:function(){r.isMajorTick?o.tickElementAnimation(document.getElementById(n.element.id+"_Axis_Major_TickLine_"+e+"_0"),document.getElementById(n.element.id+"_Axis_"+e+"_Label_0"),i,e,r.isMajorTick&&r.isMinorTick?0:-1,"major",r,n):r.isMinorTick&&o.tickElementAnimation(document.getElementById(n.element.id+"_Axis_Minor_TickLine_"+e+"_0"),document.getElementById(n.element.id+"_Axis_"+e+"_Label_0"),i,e,-1,"minor",r,n),o.labelRangeAnimation(n,e)}})},e.prototype.tickElementAnimation=function(e,i,n,o,a,r,l,s){var d=this;e&&this.gauge.isAnimationProgress&&new t.Animation({}).animate(e,{duration:l.isMinorTick?0===l.minorTickCount?0:n/l.minorTickCount/this.allowAxisCount[o]:0===l.majorTickCount?0:n/l.majorTickCount/this.allowAxisCount[o],progress:function(){e.style.visibility="visible"},end:function(){if(l.isMajorTick&&l.isMinorTick&&s.allowLoadingAnimation&&d.gauge.isAnimationProgress){e.style.visibility="visible";var t=parseFloat(e.getAttribute("data-interval"));d.prevAnimatedTickType=r,"major"===r?(d.prevAnimatedMajorTickValue[o]=t,d.prevAnimatedMajorTickIndex[o]=a):(d.prevAnimatedMinorTickValue[o]=t,d.prevAnimatedMinorTickIndex[o]=a);var g=null!=s.axes[o].minorTicks.interval?s.axes[o].minorTicks.interval:s.axes[o].visibleRange.interval/2,u=g<s.axes[o].visibleRange.interval?t+g:d.prevAnimatedMinorTickValue[o]+g,h=d.prevAnimatedMajorTickValue[o]+s.axes[o].visibleRange.interval;"major"===(r=u<h?"minor":"major")&&l.majorTickCount!==l.minorTickCount&&0!==a&&"minor"===d.prevAnimatedTickType&&(a=d.prevAnimatedMajorTickIndex[o]),"minor"===r&&l.majorTickCount!==l.minorTickCount&&0!==a&&"major"===d.prevAnimatedTickType&&(a=d.prevAnimatedMinorTickIndex[o]),a="minor"===r?l.majorTickCount===l.minorTickCount?a:t===d.prevAnimatedMajorTickValue[o]?a:a+1:a+1,e="minor"===r?document.getElementById(s.element.id+"_Axis_Minor_TickLine_"+o+"_"+a):document.getElementById(s.element.id+"_Axis_Major_TickLine_"+o+"_"+a),i="minor"===r?null:document.getElementById(s.element.id+"_Axis_"+o+"_Label_"+a),"major"!==r&&0!==a||d.labelElementAnimation(document.getElementById(s.element.id+"_Axis_"+o+"_Label_"+a),o),d.tickElementAnimation(e,i,n,o,a,r,l,s),0!==d.rangeAnimationCount||"minor"!==r||a!==l.minorTickCount-1&&a!==l.minorTickCount||s.axes.length-1!==o||(d.rangeAnimationCount++,d.rangeAnimation(s))}else s.allowLoadingAnimation&&l.isMajorTick&&d.gauge.isAnimationProgress?(e.style.visibility="visible",r="major",a+=1,e=document.getElementById(s.element.id+"_Axis_Major_TickLine_"+o+"_"+a),i=document.getElementById(s.element.id+"_Axis_"+o+"_Label_"+a),d.tickElementAnimation(e,i,n,o,a,r,l,s),"major"!==r&&0!==a||d.labelElementAnimation(document.getElementById(s.element.id+"_Axis_"+o+"_Label_"+a),o),0===d.rangeAnimationCount&&"major"===r&&a===l.majorTickCount-1&&s.axes.length-1===o&&(d.rangeAnimationCount++,d.rangeAnimation(s))):s.allowLoadingAnimation&&d.gauge.isAnimationProgress&&l.isMinorTick&&(e.style.visibility="visible",r="minor",a+=1,e=document.getElementById(s.element.id+"_Axis_Minor_TickLine_"+o+"_"+a),i=document.getElementById(s.element.id+"_Axis_"+o+"_Label_"+a),d.tickElementAnimation(e,i,n,o,a,r,l,s),"minor"===r&&d.labelElementAnimation(document.getElementById(s.element.id+"_Axis_"+o+"_Label_"+a),o),0===d.rangeAnimationCount&&"minor"===r&&a===l.minorTickCount-1&&s.axes.length-1===o&&(d.rangeAnimationCount++,d.rangeAnimation(s)))}}),this.labelRangeAnimation(s,o)},e.prototype.labelRangeAnimation=function(e,i){var n=this.axisOption[i];t.isNullOrUndefined(n)||(n.isMajorTick||n.isMinorTick||!n.isAxisLabel?(0===this.rangeAnimationCount&&!n.isMajorTick&&!n.isMinorTick&&!n.isAxisLabel&&n.isRange||0===this.rangeAnimationCount&&this.gauge.isAnimationProgress&&!n.isMajorTick&&!n.isMinorTick&&!n.isAxisLabel&&n.isRange)&&(this.rangeAnimationCount++,this.rangeAnimation(e)):n.axisLabelCount>0&&("First"===e.axes[i].labelStyle.hiddenLabel?this.elementLabelAnimation(document.getElementById(e.element.id+"_Axis_"+i+"_Label_1"),i,0,e):this.elementLabelAnimation(document.getElementById(e.element.id+"_Axis_"+i+"_Label_0"),i,0,e)))},e.prototype.rangeAnimation=function(e){for(var i=0;i<e.axes.length;i++){var n=document.getElementById(e.element.id+"_Axis_Ranges_"+i);!t.isNullOrUndefined(n)&&e.allowLoadingAnimation&&this.rangeElementAnimation(n,i,e)}},e.prototype.rangeElementAnimation=function(e,i,n){var o=this,a=0,r=e.childElementCount>0&&n.axes[i].ranges[0].start!==n.axes[i].ranges[0].end;new t.Animation({}).animate(e,{duration:r?n.loadingAnimationDuration[i]:0,progress:function(t){t.timeStamp>t.delay&&(a=(t.timeStamp-t.delay)/t.duration,e.style.opacity=1*a)},end:function(){e.style.opacity=1;var a=document.getElementById(o.gauge.element.id+"_Axis_Labels_"+i);t.isNullOrUndefined(a)||(a.style.visibility="visible"),n.allowLoadingAnimation&&0===i&&(o.axisOption=[],n.axes.map(function(e,a){e.pointers.map(function(r,l){var s=document.getElementById(n.element.id+"_Axis_"+a+"_Pointer_"+l);!t.isNullOrUndefined(s)&&o.gauge.isAnimationProgress&&(r.previousValue=o.gauge.isPropertyChange?r.previousValue:e.minimum,n.gaugeAxisLayoutPanel.pointerRenderer.doPointerAnimation(s,r,e,i))}),0===e.pointers.length&&o.gauge.isAnimationProgress?o.gauge.loadingAnimationDuration[i]>0&&!t.isNullOrUndefined(o.gauge.annotationsModule)&&o.gauge.annotationsModule.annotationAnimation(o.gauge):o.gauge.isOverAllAnimationComplete=!0}))}})},e.prototype.durationSplitUp=function(e,i){var n=0;this.gauge.loadingAnimationDuration=[];for(var o=0;o<i.childElementCount;o++){n=0;for(var a=0,r=i.children[o],l=!1,s=!1,d=0,g=0,u=!1,h=0,p=!1,c=!1,m=!1,y=0;y<r.childElementCount;y++){var f=r.children[y].id;f.indexOf("_AxisLine_")>0?(l=!0,n++):f.indexOf("MajorTickLines")>0?(s=!0,a++,d=r.children[y].childElementCount,n++):f.indexOf("MinorTickLines")>0?(u=!0,a++,h=r.children[y].childElementCount,s||n++):f.indexOf("_Axis_Labels_")>0?(p=!0,a++,g=r.children[y].childElementCount,s||u||null==this.gauge.axes[o].labelStyle.font.size||"0px"===this.gauge.axes[o].labelStyle.font.size||"0"===this.gauge.axes[o].labelStyle.font.size||n++):f.indexOf("_Axis_Ranges_")>0?(c=!0,1!==this.gauge.axes[o].ranges.length||t.isNullOrUndefined(this.gauge.axes[o].ranges)||0!==this.gauge.axes[o].ranges[0].start||0!==this.gauge.axes[o].ranges[0].end||n++):f.indexOf("_Axis_Pointers_")>0&&(m=!0,this.gauge.axes[o].pointers.length>0&&1!==this.gauge.axes[o].pointers.length&&this.gauge.axes[o].pointers[0].value!==this.gauge.axes[o].minimum&&n++)}this.allowAxisCount.push(0===a?1:a),this.axisOption.push({isAxisLine:l,isMajorTick:s,isMinorTick:u,isAxisLabel:p,isPointer:m,isRange:c,axisLabelCount:g,majorTickCount:d,minorTickCount:h}),l=!1,s=!1,d=0,u=!1,g=0,h=0,p=!1,c=!1,m=!1,null!=this.gauge.axes[o].annotations&&this.gauge.axes[o].annotations.length>0&&!t.isNullOrUndefined(this.gauge.annotationsModule)&&n++,this.gauge.loadingAnimationDuration.push(0===n?e:e/n)}},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new $(0,0);for(var i={size:t.labelStyle.font.size||this.gauge.themeStyle.fontSize,color:t.labelStyle.font.color||this.gauge.themeStyle.labelColor,fontFamily:t.labelStyle.font.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:t.labelStyle.font.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:t.labelStyle.font.fontStyle,opacity:t.labelStyle.font.opacity},n=0,a=t.visibleLabels;n<a.length;n++){var r=a[n];r.size=o(r.text,i),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e.prototype.destroy=function(){this.gauge=null,this.farSizes=[],t.isNullOrUndefined(this.axisRenderer)||this.axisRenderer.destroy(),this.axisRenderer=null,t.isNullOrUndefined(this.pointerRenderer)||this.pointerRenderer.destroy(),this.pointerRenderer=null,this.axisOption=null,this.prevAnimatedMajorTickValue=null,this.prevAnimatedMajorTickIndex=null,this.prevAnimatedMinorTickIndex=null,this.prevAnimatedMinorTickValue=null,this.allowAxisCount=null},e}(),Te=function(){function e(e){this.legendRegions=[],this.rowCount=0,this.pageButtonSize=8,this.pageXCollections=[],this.maxColumns=0,this.maxWidth=0,this.currentPage=1,this.pagingRegions=[],this.position="Auto",this.gauge=e,this.toggledIndexes=[],this.legend=this.gauge.legendSettings,this.legendID=this.gauge.element.id+"_gauge_legend",this.addEventListener()}return e.prototype.addEventListener=function(){this.gauge.isDestroyed||this.gauge.on("click",this.click,this)},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||this.gauge.off("click",this.click)},e.prototype.getLegendOptions=function(e){this.legendCollection=[];for(var i,n="",o=0;o<e.length;o++)for(var a=0;a<e[o].ranges.length;a++)i=e[o].ranges[a],t.isNullOrUndefined(i.start)||t.isNullOrUndefined(i.end)||i.start===i.end||(n=i.legendText?i.legendText:i.start+" - "+i.end,this.legendCollection.push(new Me(n,n,i.color,this.legend.shape,this.legend.visible,this.legend.border,this.legend.shapeBorder,this.legend.shapeWidth,this.legend.shapeHeight,a,o)))},e.prototype.calculateLegendBounds=function(e,t){var i=this.legend;this.position="Auto"!==i.position?i.position:t.width>t.height?"Right":"Bottom",this.legendBounds="Custom"===this.position?new Q(i.location.x,i.location.y,0,0):new Q(e.x,e.y,0,0),this.isVertical="Left"===this.position||"Right"===this.position,this.isVertical?(this.legendBounds.height=F(i.height,t.height-(e.y-this.gauge.margin.top))||e.height,this.legendBounds.width=F(i.width||"20%",t.width)):(this.legendBounds.width=F(i.width,t.width)||e.width,this.legendBounds.height=F(i.height||"20%",t.height)),this.getLegendBounds(t,this.legendBounds,i),this.getLocation(this.position,i.alignment,this.legendBounds,e,t)},e.prototype.alignLegend=function(e,t,i,n){switch(n){case"Far":e=t-i-e;break;case"Center":e=(t-i)/2}return e},e.prototype.getLocation=function(e,t,i,n,o){var a=this.legend.border.width,r=i.height+a+this.legend.margin.top+this.legend.margin.bottom,l=i.width+a+this.legend.margin.left+this.legend.margin.right,s=this.gauge.margin.bottom;"Bottom"===e?(i.x=this.alignLegend(i.x,o.width,i.width,t),i.y=n.y+(n.height-r)+a+this.legend.margin.top,this.subtractThickness(n,0,0,0,r)):"Top"===e?(i.x=this.alignLegend(i.x,o.width,i.width,t),i.y=n.y+a+this.legend.margin.top,this.subtractThickness(n,0,0,r,0)):"Right"===e?(i.x=n.x+(n.width-i.width)+this.legend.margin.right,i.y=n.y+this.alignLegend(0,o.height-(n.y+s),i.height,t),this.subtractThickness(n,0,l,0,0)):"Custom"===e?this.subtractThickness(n,0,0,0,0):(i.x=i.x+this.legend.margin.left,i.y=n.y+this.alignLegend(0,o.height-(n.y+s),i.height,t),this.subtractThickness(n,l,0,0,0))},e.prototype.renderLegend=function(e,t){var i=this.findFirstLegendPosition(this.legendCollection),n=e.padding;this.legendRegions=[],this.maxItemHeight=Math.max(this.legendCollection[0].textSize.height,e.shapeHeight);var o=this.gauge.renderer.createGroup({id:this.legendID+"_g"}),a=this.createLegendElements(t,o,e,this.legendID);if(i!==this.legendCollection.length){this.totalPages=0;var r=void 0,l=new K(this.gauge.enableRtl?this.isVertical?t.x+this.maxWidth-n-e.shapeWidth/2:t.width+t.x-n-e.shapeWidth:t.x+n+e.shapeWidth/2,t.y+n+this.maxItemHeight/2),s=new ee("",l.x,l.y,"start"),d=2*e.shapePadding+2*n+e.shapeWidth,g=0;this.pageXCollections=[],this.legendCollection[i].location=l;for(var u=this.legendCollection[i],h=0,p=this.legendCollection;h<p.length;h++){var c=p[h];c.render&&""!==c.text&&(r=this.gauge.renderer.createGroup({id:this.legendID+"_g_"+g}),this.getRenderPoint(c,l,d,u,t,g,i),this.renderSymbol(c,r,c.axisIndex,c.rangeIndex),this.renderText(c,r,s,c.axisIndex,c.rangeIndex),r&&(r.style.cursor=e.toggleVisibility?"pointer":"auto"),a&&a.appendChild(r),u=c),g++}this.isPaging?this.renderPagingElements(t,s,o):this.totalPages=1}this.appendChildElement(this.gauge.svgObject,o),this.setStyles(this.toggledIndexes)},e.prototype.renderPagingElements=function(e,t,i){var n=this.gauge.renderer.createGroup({id:this.legendID+"_navigation"});this.pagingRegions=[],i.appendChild(n);var a=this.gauge.themeStyle.labelColor,r=this.gauge.legendSettings;this.isVertical?this.totalPages=Math.ceil(this.totalPages/this.maxColumns):this.totalPages=Math.ceil(this.totalPages/Math.max(1,this.rowCount-1));var d=new q(this.legendID+"_pageup","transparent",5,a,1,"",""),g=this.pageButtonSize;n&&(n.style.cursor="pointer");var u={size:r.textStyle.size||this.gauge.themeStyle.fontSize,color:r.textStyle.color||this.gauge.themeStyle.labelColor,fontFamily:r.textStyle.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:r.textStyle.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:r.textStyle.fontStyle,opacity:r.textStyle.opacity};this.clipPathHeight=(this.rowCount-1)*(this.maxItemHeight+r.padding),this.clipRect.setAttribute("height",this.clipPathHeight.toString());var h=e.x+g/2,p=e.y+this.clipPathHeight+(e.height-this.clipPathHeight)/2,c=o(this.totalPages+"/"+this.totalPages,u);s(T({x:h,y:p},"LeftArrow",new $(g,g),"",d),n,this.gauge,"Path"),this.pagingRegions.push(new Q(this.gauge.enableRtl?h:h+e.width-(2*(g+8)+8+c.width)-.5*g,p-.5*g,g,g)),t.x=h+g/2+8,t.y=p+c.height/4,t.id=this.legendID+"_pagenumber",t.text=this.gauge.enableRtl?this.totalPages+"/1":"1/"+this.totalPages;var m=l(t,u,a,n);h=t.x+8+g/2+c.width,d.id=this.legendID+"_pagedown",s(T({x:h,y:p},"RightArrow",new $(g,g),"",d),n,this.gauge,"Path"),this.pagingRegions.push(new Q(this.gauge.enableRtl?h:h+(e.width-(2*(g+8)+8+c.width)-.5*g),p-.5*g,g,g));var y=this.gauge.enableRtl?r.border.width+g/2:e.width-(2*(g+8)+8+c.width);n.setAttribute("transform","translate("+y+", 0)"),this.translatePage(m,this.currentPage-1,this.currentPage)},e.prototype.translatePage=function(e,t,i){var n=this.clipPathHeight*t,o="translate(0,-"+n+")";if(this.isVertical){var a=this.pageXCollections[t*this.maxColumns];n=(n=this.gauge.enableRtl?this.legendBounds.x+this.maxWidth-a:a-this.legendBounds.x)<0?0:n,o=(this.gauge.enableRtl?"translate(":"translate(-")+n+",0)"}return this.legendTranslateGroup.setAttribute("transform",o),e.textContent=this.gauge.enableRtl?this.totalPages+"/"+i:i+"/"+this.totalPages,this.currentPage=i,n},e.prototype.renderText=function(e,t,i,n,a){var r=this.gauge.legendSettings;i.id=this.legendID+"_Axis_"+n+"_text_"+a;var s=e.visible?r.textStyle.color||this.gauge.themeStyle.labelColor:"#D3D3D3",d={size:r.textStyle.size||this.gauge.themeStyle.fontSize,color:s,fontFamily:r.textStyle.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:r.textStyle.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:r.textStyle.fontStyle,opacity:r.textStyle.opacity};i.text=e.text,i.x=this.gauge.enableRtl?e.location.x-(o(e.text,d).width+r.shapeWidth/2+r.shapePadding):e.location.x+r.shapeWidth/2+r.shapePadding,i.y=e.location.y+this.maxItemHeight/4;var g=l(i,d,s,t,"");g.setAttribute("aria-label",i.text),g.setAttribute("role","region")},e.prototype.renderSymbol=function(e,t,i,n){e.fill=e.fill?e.fill:this.gauge.axes[i].ranges[n].rangeColor,s(T(e.location,e.shape,new $(e.shapeWidth,e.shapeHeight),"",new q(this.legendID+"_Axis_"+i+"_Shape_"+n,e.fill,e.shapeBorder.width,e.shapeBorder.color,null,e.shapeBorder.dashArray,"","")),t,this.gauge,"Circle"===e.shape?"Ellipse":"Path")},e.prototype.getRenderPoint=function(e,t,i,n,o,a,r){var l=this.legend.padding,s={size:this.legend.textStyle.size||this.gauge.themeStyle.fontSize,color:this.legend.textStyle.color||this.gauge.themeStyle.labelColor,fontFamily:this.legend.textStyle.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:this.legend.textStyle.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:this.legend.textStyle.fontStyle,opacity:this.legend.textStyle.opacity};if(this.isVertical)if(a===r||n.location.y+1.5*this.maxItemHeight+2*l>o.y+o.height){e.location.x=n.location.x+(a===r?0:this.gauge.enableRtl?-this.maxColumnWidth-4*this.legend.shapePadding/3:this.maxColumnWidth),e.location.y=t.y;var d=this.legend.shapeWidth/2+l;this.pageXCollections.push(e.location.x+(this.gauge.enableRtl?d:-d)),this.totalPages++}else e.location.x=n.location.x,e.location.y=n.location.y+this.maxItemHeight+l;else{var g=n.location.x+(this.gauge.enableRtl?-n.textSize.width-i:n.textSize.width+i);this.isWithinBounds(g,e.textSize.width+i-l,o,this.legend.shapeWidth/2)?(e.location.y=a===r?n.location.y:n.location.y+this.maxItemHeight+l,e.location.x=t.x):(e.location.y=n.location.y,e.location.x=a===r?n.location.x:g),this.totalPages=this.totalRowCount}var u=this.getAvailWidth(e.location.x,this.legendBounds.width);e.text=B(+u.toFixed(4),e.text,s)},e.prototype.isWithinBounds=function(e,t,i,n){return this.gauge.enableRtl?e-t<i.x-n:e+t>i.x+i.width+n},e.prototype.click=function(e){var t,i=e.target.id,n=["_text_","_Shape_"],o=-1;if(i.indexOf(this.legendID)>-1)for(var a=0,r=n;a<r.length;a++){var l=r[a];if(i.indexOf(l)>-1){var s=parseInt(i.split(this.legendID+"_Axis_")[1].split(l)[0],10),d=parseInt(i.split(this.legendID+"_Axis_")[1].split(l)[1],10);if(this.gauge.legendSettings.toggleVisibility&&!isNaN(d)){var g=this.legendByIndex(s,d,this.legendCollection);if(t=new Ee(s,d,!g.render),0===this.toggledIndexes.length)this.toggledIndexes.push(t);else{for(var u=0;u<this.toggledIndexes.length;u++){if(this.toggledIndexes[u].axisIndex===t.axisIndex&&this.toggledIndexes[u].rangeIndex===t.rangeIndex){o=u;break}o=-1}-1===o?this.toggledIndexes.push(t):this.toggledIndexes[o].isToggled=!this.toggledIndexes[o].isToggled}this.setStyles(this.toggledIndexes)}}}i.indexOf(this.legendID+"_pageup")>-1?this.changePage(e,!this.gauge.enableRtl):i.indexOf(this.legendID+"_pagedown")>-1&&this.changePage(e,!!this.gauge.enableRtl)},e.prototype.setStyles=function(e){for(var i=0;i<e.length;i++){for(var n=0,o=0;o<e[i].rangeIndex;o++)this.gauge.axes[e[i].axisIndex].ranges[o].start===this.gauge.axes[e[i].axisIndex].ranges[o].end&&n++;var a=this.gauge.element.id+"_Axis_"+e[i].axisIndex+"_Range_"+e[i].rangeIndex,r=this.legendID+"_Axis_"+e[i].axisIndex+"_Shape_"+e[i].rangeIndex,l=this.legendID+"_Axis_"+e[i].axisIndex+"_text_"+e[i].rangeIndex,s=this.gauge.svgObject.querySelector("#"+a),d=this.gauge.svgObject.querySelector("#"+r),g=this.gauge.svgObject.querySelector("#"+l);if(e[i].isToggled)t.isNullOrUndefined(s)||(s.style.visibility="visible",d.setAttribute("fill",this.legendCollection[e[i].rangeIndex-n].fill),g.setAttribute("fill",this.legend.textStyle.color||this.gauge.themeStyle.labelColor));else{t.isNullOrUndefined(s)||(s.style.visibility="hidden",d.setAttribute("fill","#D3D3D3"),g.setAttribute("fill","#D3D3D3"))}}},e.prototype.legendByIndex=function(e,t,i){for(var n=0,o=i;n<o.length;n++){var a=o[n];if(a.axisIndex===e&&a.rangeIndex===t)return a}return null},e.prototype.changePage=function(e,t){var i=document.getElementById(this.legendID+"_pagenumber"),n=parseInt(i.textContent.split("/")[this.gauge.enableRtl?1:0],10);t&&n>1?this.translatePage(i,n-2,n-1):!t&&n<this.totalPages&&this.translatePage(i,n,n+1)},e.prototype.getAvailWidth=function(e,t){return this.isVertical&&(t=this.maxWidth),t-(2*this.legend.padding+this.legend.shapeWidth+this.legend.shapePadding)},e.prototype.createLegendElements=function(e,t,i,n){var o=i.padding,a={color:i.border.color||this.gauge.themeStyle.legendBorderColor||"",width:i.border.width||this.gauge.themeStyle.legendBorderWidth||1,dashArray:i.border.dashArray},r=new J(n+"_element",i.background,a,i.opacity,e);r.width=this.isVertical?this.maxWidth:e.width,t?t.appendChild(this.gauge.renderer.drawRectangle(r)):this.gauge.renderer.drawRectangle(r);var l=this.gauge.renderer.createGroup({id:n+"_collections"});t.appendChild(l),this.legendTranslateGroup=this.gauge.renderer.createGroup({id:n+"_translate_g"}),l.appendChild(this.legendTranslateGroup);var s=this.gauge.renderer.createClipPath({id:n+"_clipPath"});return r.id+="_clipPath_rect",r.width=this.isVertical?r.width-o:r.width,this.clipRect=this.gauge.renderer.drawRectangle(r),s.appendChild(this.clipRect),this.appendChildElement(this.gauge.svgObject,s),l.style.cssText="clip-path:url(#"+s.id+")",this.legendTranslateGroup},e.prototype.appendChildElement=function(e,t){var i=e.querySelector("#"+t.id),n=i||w(t.id),o=t;i?e.replaceChild(o,n):e.appendChild(o)},e.prototype.findFirstLegendPosition=function(e){for(var t=0,i=0,n=e;i<n.length;i++){var o=n[i];if(o.render&&""!==o.text)break;t++}return t},e.prototype.getLegendBounds=function(e,t,i){var n=0,a=0,r=i.padding;this.isVertical?n=i.width?0:e.width/100*5:a=i.height?0:e.height/100*5,t.width+=n,t.height+=a;var l={size:i.textStyle.size||this.gauge.themeStyle.fontSize,color:this.legend.textStyle.color||this.gauge.themeStyle.labelColor,fontFamily:i.textStyle.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:i.textStyle.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:i.textStyle.fontStyle,opacity:i.textStyle.opacity},s=0,d=0,g=0,u=[],h=0,p=0;this.maxItemHeight=Math.max(o("MeasureText",l).height,i.shapeHeight);for(var c,m=!1,y=0,f=this.legendCollection;y<f.length;y++){var v=f[y];c={fill:v.fill,text:v.text,shape:v.shape,name:"legendRender",cancel:!1},this.gauge.trigger("legendRender",c),v.render=!c.cancel,v.text=c.text,v.fill=c.fill,v.shape=c.shape,v.textSize=o(v.text,l),v.render&&""!==v.text&&(m=!0,p=i.shapeWidth+2*i.shapePadding+v.textSize.width+2*r,this.isVertical?(h=++g*(this.maxItemHeight+r)+r,g*(this.maxItemHeight+r)+r>t.height&&(h=Math.max(h,g*(this.maxItemHeight+r)+r),d+=s,u.push(s),this.totalPages=Math.max(g,this.totalPages||1),s=0,g=1),s=Math.max(p,s)):(d+=p,t.width<r+d&&(s=Math.max(s,d+r-p),0===g&&p!==d&&(g=1),d=p,h=++g*(this.maxItemHeight+r)+r)))}this.isVertical?(d+=s,this.isPaging=t.width<d+r,h=Math.max(h,(this.totalPages||1)*(this.maxItemHeight+r)+r),this.isPaging=this.isPaging&&this.totalPages>1,u[u.length-1]!==s&&u.push(s)):(this.isPaging=t.height<h,this.totalPages=this.totalRowCount=g,h=Math.max(h,this.maxItemHeight+r+r)),this.maxColumns=0;var x=this.isVertical?this.getMaxColumn(u,t.width,r,d+r):Math.max(d+r,s);m?this.setBounds(x,h,i,t):this.setBounds(0,0,i,t)},e.prototype.subtractThickness=function(e,t,i,n,o){return e.x+=t,e.y+=n,e.width-=t+i,e.height-=n+o,e},e.prototype.setBounds=function(e,i,n,o){e=e<o.width?e:o.width,i=i<o.height?i:o.height,o.width=n.width?o.width:e,o.height=n.height?o.height:i,this.rowCount=Math.max(1,Math.ceil((o.height-n.padding)/(this.maxItemHeight+n.padding))),1===this.rowCount&&("Bottom"===n.position||"Top"===n.position)&&!t.isNullOrUndefined(n.width)&&n.width.indexOf("%")>-1&&(o.width=e)},e.prototype.getMaxColumn=function(e,t,i,n){var o=i;this.maxColumnWidth=Math.max.apply(null,e);for(var a=0;a<e.length;a++)if(o+=this.maxColumnWidth,this.maxColumns++,o+i>t){o-=this.maxColumnWidth,this.maxColumns--;break}return this.isPaging=o<n&&this.totalPages>1,o===i&&(o=t),this.maxColumns=Math.max(1,this.maxColumns),this.maxWidth=o,o},e.prototype.getModuleName=function(){return"Legend"},e.prototype.destroy=function(){this.legendCollection=[],this.legendRenderingCollections=[],this.legendRegions=[],this.titleRect=null,this.pageXCollections=[],this.clipRect=null,this.legendTranslateGroup=null,this.legend=null,this.pagingRegions=[],this.toggledIndexes=[],this.legendBounds=null,this.removeEventListener(),this.gauge=null},e}(),Ee=function(){function e(e,t,i){this.axisIndex=e,this.rangeIndex=t,this.isToggled=i}return e}(),Me=function(){function e(e,t,i,n,o,a,r,l,s,d,g){this.location={x:0,y:0},this.text=e,this.originalText=t,this.fill=i,this.shape=n,this.visible=o,this.border=a,this.shapeBorder=r,this.shapeWidth=l,this.shapeHeight=s,this.rangeIndex=d,this.axisIndex=g}return e}(),ke=function(){function e(e){}return e.prototype.export=function(e,i,o,a,r){return new Promise(function(i,l){var s=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}});a=t.isNullOrUndefined(a)?n.PdfPageOrientation.Landscape:a;var d=e.svgObject.cloneNode(!0),g=d.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==g&&"transparent"!==g?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==g&&"transparent"!==g||d.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):d.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var u=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(d)],{type:"image/svg+xml"})),h=new Image,p=s.getContext("2d");h.onload=function(){p.drawImage(h,0,0),window.URL.revokeObjectURL(u);var t=new n.PdfDocument,l=s.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");t.pageSettings.orientation=a,l=l.slice(l.indexOf(",")+1),t.pages.add().graphics.drawImage(new n.PdfBitmap(l),0,0,e.availableSize.width,e.availableSize.height),r?(t.save(o+".pdf"),t.destroy()):i(null)},h.src=u})},e.prototype.getModuleName=function(){return"PdfExport"},e.prototype.destroy=function(){},e}(),Oe=function(){function e(e){}return e.prototype.export=function(e,i,n,o){var a=this;return new Promise(function(r,l){var s=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1),d=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:e.availableSize.width.toString(),height:e.availableSize.height.toString()}}),g=e.svgObject.cloneNode(!0),u=g.childNodes[0].getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==u&&"transparent"!==u?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==u&&"transparent"!==u||g.childNodes[0].setAttribute("fill","rgba(0, 0, 0, 1)"):g.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)");var h='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+g.outerHTML+"</svg>",p=window.URL.createObjectURL(new Blob("SVG"===i?[h]:[(new XMLSerializer).serializeToString(g)],{type:"image/svg+xml"}));if("SVG"===i)o?a.triggerDownload(n,i,p,s):r(null);else{var c=new Image,m=d.getContext("2d");c.onload=function(){m.drawImage(c,0,0),window.URL.revokeObjectURL(p),o?a.triggerDownload(n,i,d.toDataURL("image/png").replace("image/png","image/octet-stream"),s):"JPEG"===i?r(d.toDataURL("image/jpeg")):"PNG"===i&&r(d.toDataURL("image/png"))},c.src=p}})},e.prototype.getModuleName=function(){return"ImageExport"},e.prototype.destroy=function(){},e.prototype.triggerDownload=function(e,i,n,o){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:n}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))},e}(),Le=function(){function e(e){}return e.prototype.print=function(e,i){var n=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no");n.moveTo(0,0),n.resizeTo(screen.availWidth,screen.availHeight);var o={cancel:!1,htmlContent:this.getHTMLContent(e,i),name:"beforePrint"};e.trigger("beforePrint",o,function(e){o.cancel||t.print(o.htmlContent,n)})},e.prototype.getHTMLContent=function(e,i){var n=t.createElement("div");if(i)i instanceof Array?i.forEach(function(e){n.appendChild(w(e).cloneNode(!0))}):i instanceof Element?n.appendChild(i.cloneNode(!0)):n.appendChild(w(i).cloneNode(!0));else{var o=e.element.cloneNode(!0),a=o.getElementsByTagName("svg")[0];if(!t.isNullOrUndefined(a)&&(a=a.childNodes[0],!t.isNullOrUndefined(a))){var r=a.getAttribute("fill");"Tailwind"!==e.theme&&"Tailwind3"!==e.theme&&"Bootstrap5"!==e.theme&&"Fluent"!==e.theme&&"Material3"!==e.theme&&"Fluent2"!==e.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r?"TailwindDark"!==e.theme&&"Tailwind3Dark"!==e.theme&&"Bootstrap5Dark"!==e.theme&&"FluentDark"!==e.theme&&"Material3Dark"!==e.theme&&"Fluent2Dark"!==e.theme&&"Fluent2HighContrast"!==e.theme||"rgba(255,255,255, 0.0)"!==r&&"transparent"!==r||a.setAttribute("fill","rgba(0, 0, 0, 1)"):a.setAttribute("fill","rgba(255,255,255, 1)")}n.appendChild(o)}return n},e.prototype.getModuleName=function(){return"Print"},e.prototype.destroy=function(){},e}(),Ie=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),De=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Be=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ie(i,e),De([t.Property("#000000")],i.prototype,"color",void 0),De([t.Property(1)],i.prototype,"opacity",void 0),De([t.Property("0%")],i.prototype,"offset",void 0),De([t.Property("")],i.prototype,"style",void 0),i}(t.ChildProperty),ze=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ie(i,e),De([t.Property("0%")],i.prototype,"x",void 0),De([t.Property("0%")],i.prototype,"y",void 0),i}(t.ChildProperty),Ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ie(i,e),De([t.Property(null)],i.prototype,"startValue",void 0),De([t.Property(null)],i.prototype,"endValue",void 0),De([t.Collection([{color:"#000000",opacity:1,offset:"0%",style:""}],Be)],i.prototype,"colorStop",void 0),i}(t.ChildProperty),We=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ie(i,e),De([t.Property("0%")],i.prototype,"radius",void 0),De([t.Complex({x:"0%",y:"0%"},ze)],i.prototype,"outerPosition",void 0),De([t.Complex({x:"0%",y:"0%"},ze)],i.prototype,"innerPosition",void 0),De([t.Collection([{color:"#000000",opacity:1,offset:"0%",style:""}],Be)],i.prototype,"colorStop",void 0),i}(t.ChildProperty),Ge=function(){function e(e){this.gauge=e}return e.prototype.calculateLinearGradientPosition=function(e,i,n){return{id:i,x1:t.isNullOrUndefined(e.linearGradient.startValue)&&-1!==i.indexOf("range")?"right"===n?"100%":"0%":t.isNullOrUndefined(e.linearGradient.startValue)?"0%":(-1===e.linearGradient.startValue.indexOf("%")?e.linearGradient.startValue:parseFloat(e.linearGradient.startValue).toString())+"%",x2:t.isNullOrUndefined(e.linearGradient.endValue)&&-1!==i.indexOf("range")?"left"===n?"100%":"0%":t.isNullOrUndefined(e.linearGradient.endValue)?"100%":(-1===e.linearGradient.endValue.indexOf("%")?e.linearGradient.endValue:parseFloat(e.linearGradient.endValue).toString())+"%",y1:t.isNullOrUndefined(e.linearGradient.startValue)&&-1!==i.indexOf("range")&&"bottom"===n?"100%":"0%",y2:t.isNullOrUndefined(e.linearGradient.endValue)&&-1!==i.indexOf("range")&&"top"===n?"100%":"0%"}},e.prototype.getLinearGradientColor=function(e,n,o,a){var r=new i.SvgRenderer(""),l=t.isNullOrUndefined(e.linearGradient.startValue)&&t.isNullOrUndefined(e.linearGradient.endValue)&&!t.isNullOrUndefined(a)?this.getCircularGradientColor(e.linearGradient.colorStop,n):this.getGradientColor(e.linearGradient.colorStop),s=t.isNullOrUndefined(e.linearGradient.startValue)&&t.isNullOrUndefined(e.linearGradient.endValue)&&!t.isNullOrUndefined(a)?"_"+this.gauge.svgObject.id+"_range_"+a+"_color_"+n+"_linearGradient":"_"+this.gauge.svgObject.id+"_"+this.gauge.gradientCount+"_linearGradient",d=this.calculateLinearGradientPosition(e,s,o);d={id:d.id,x1:d.x1,x2:d.x2,y1:d.y1,y2:d.y2};var g=r.drawGradient("linearGradient",d,l);return this.gauge.svgObject.appendChild(g),"url(#"+s+")"},e.prototype.getCircularGradientColor=function(e,t){for(var i=[],n=t,o=n;o<(t===e.length-1?t+1:t+2);o++){var a={color:e[o].color,colorStop:e[o].offset,opacity:e[o].opacity?e[o].opacity.toString():"1",style:e[o].style};i.push(a),n++}return i},e.prototype.getRadialGradientColor=function(e){var n=new i.SvgRenderer(""),o=this.getGradientColor(e.radialGradient.colorStop),a="_"+this.gauge.svgObject.id+"_"+this.gauge.gradientCount+"_radialGradient",r={id:a,r:t.isNullOrUndefined(e.radialGradient.radius)?"0%":(-1===e.radialGradient.radius.indexOf("%")?e.radialGradient.radius:parseFloat(e.radialGradient.radius).toString())+"%",cx:t.isNullOrUndefined(e.radialGradient.outerPosition)||t.isNullOrUndefined(e.radialGradient.outerPosition.x)?"0%":(-1===e.radialGradient.outerPosition.x.indexOf("%")?e.radialGradient.outerPosition.x:parseFloat(e.radialGradient.outerPosition.x).toString())+"%",cy:t.isNullOrUndefined(e.radialGradient.outerPosition)||t.isNullOrUndefined(e.radialGradient.outerPosition.y)?"0%":(-1===e.radialGradient.outerPosition.y.indexOf("%")?e.radialGradient.outerPosition.y:parseFloat(e.radialGradient.outerPosition.y).toString())+"%",fx:t.isNullOrUndefined(e.radialGradient.innerPosition)||t.isNullOrUndefined(e.radialGradient.innerPosition.x)?"0%":(-1===e.radialGradient.innerPosition.x.indexOf("%")?e.radialGradient.innerPosition.x:parseFloat(e.radialGradient.innerPosition.x).toString())+"%",fy:t.isNullOrUndefined(e.radialGradient.innerPosition)||t.isNullOrUndefined(e.radialGradient.innerPosition.y)?"0%":(-1===e.radialGradient.innerPosition.y.indexOf("%")?e.radialGradient.innerPosition.y:parseFloat(e.radialGradient.innerPosition.y).toString())+"%"},l=n.drawGradient("radialGradient",r,o);return this.gauge.svgObject.appendChild(l),"url(#"+a+")"},e.prototype.getGradientColor=function(e){for(var t=[],i=0;i<e.length;i++){var n={color:e[i].color,colorStop:e[i].offset,opacity:e[i].opacity?e[i].opacity.toString():"1",style:e[i].style};t.push(n)}return t},e.prototype.getGradientColorString=function(e,i,n,o){var a;return e.linearGradient&&!t.isNullOrUndefined(e.linearGradient.colorStop)||e.radialGradient&&!t.isNullOrUndefined(e.radialGradient.colorStop)?(a=e.linearGradient?this.getLinearGradientColor(e,i,n,o):this.getRadialGradientColor(e),this.gauge.gradientCount=this.gauge.gradientCount+1,a):null},e.prototype.getModuleName=function(){return"Gradient"},e.prototype.destroy=function(){this.gauge=null},e}(),Ue=function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(t,i)};return function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),je=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(a<3?o(r):a>3?o(t,i,r):o(t,i))||r);return a>3&&r&&Object.defineProperty(t,i,r),r},Ve=function(e){function n(t,i){var n=e.call(this,t,i)||this;return n.allowLoadingAnimation=!1,n.isRangeUpdate=!1,n.isAnimationProgress=!0,n.isResize=!1,n.isOverAllAnimationComplete=!1,n.isDrag=!1,n.gradientCount=0,r.Inject(Ge),i&&n.appendTo(i),n}Ue(n,e),r=n,n.prototype.preRender=function(){t.isNullOrUndefined(this.element)||(this.unWireEvents(),this.trigger("load",{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents())},n.prototype.render=function(){t.isNullOrUndefined(this.element)||(this.setTheme(),this.calculateBounds(),this.isPropertyChange=!1,this.allowLoadingAnimation=(0===this.animationDuration&&"Enable"===t.animationMode||this.animationDuration>0)&&!this.isOverAllAnimationComplete,this.renderElements(!0),this.renderAnimation(),this.renderComplete())},n.prototype.setTheme=function(){this.themeStyle=L(this.theme)},n.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"click",this.gaugeOnMouseClick),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent)},n.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"click",this.gaugeOnMouseClick,this),t.EventHandler.add(this.element,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),this.resizeEvent=this.gaugeResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeEvent),this.setGaugeStyle(this.element)},n.prototype.gaugeOnMouseClick=function(e){return this.setMouseXY(e),this.legendModule&&this.legendSettings.visible&&this.legendModule.click(e),!1},n.prototype.mouseMove=function(e){var i=this;this.setMouseXY(e);var n=this.getMouseArgs(e,"touchmove","gaugeMouseMove");return this.trigger("gaugeMouseMove",n,function(o){var a,r=!1;if(t.isNullOrUndefined(i.activePointer)||i.activePointer.pathElement[0].id===n.target.id){var l=n.target.id.indexOf("_Pointer_")>-1?parseInt(n.target.id.slice(-1),10):null,s=n.target.id.indexOf("_Axis_")>-1?parseInt(n.target.id.split("_Axis_")[1],10):null;r=!i.allowPointerDrag||t.isNullOrUndefined(s)||t.isNullOrUndefined(l)?i.enablePointerDrag:i.axes[s].pointers[l].enableDrag,i.isPointerDragged=r}if(!n.cancel){(i.isPointerDragged||i.enableRangeDrag)&&"grabbing"!==i.svgObject.getAttribute("cursor")?-1!==n.target.id.indexOf("_Pointer_")&&i.isPointerDragged||i.enableRangeDrag&&-1!==n.target.id.indexOf("_Range_")?i.svgObject.setAttribute("cursor","pointer"):i.svgObject.setAttribute("cursor","auto"):"grabbing"!==i.svgObject.getAttribute("cursor")&&i.svgObject.setAttribute("cursor","auto");var d=w(i.element.id+"_svg"),g=i.element.getBoundingClientRect().left-d.getBoundingClientRect().left;if(i.isPointerDragged&&i.activePointer){i.isDrag=!0,e.preventDefault();var u=parseInt(i.activePointer.pathElement[0].id.slice(-1),10),h=parseInt(i.activePointer.pathElement[0].id.split("_Axis_")[1],10);a={axis:i.activeAxis,pointer:i.activePointer,previousValue:i.activePointer.currentValue,name:"dragMove",type:"pointerMove",currentValue:null,axisIndex:h,pointerIndex:u},i.pointerDrag(new K(n.x+g,n.y),h,u),a.currentValue=i.activePointer.currentValue,i.trigger("dragMove",a),i.activeRange=null}else if(i.enableRangeDrag&&i.activeRange){i.isDrag=!0,e.preventDefault();var h=parseInt(i.activeRange.pathElement[0].id.split("_Axis_")[1],10),p=parseInt(i.activeRange.pathElement[0].id.split("Range_")[1],10);a={axis:i.activeAxis,name:"dragMove",type:"rangeMove",range:i.activeRange,axisIndex:h,rangeIndex:p},i.rangeDrag(new K(n.x+g,n.y),h,p),i.trigger("dragMove",a)}}}),this.notify(t.Browser.touchMoveEvent,e),N(e,e.clientX,e.clientY,this,!1),!1},n.prototype.mouseLeave=function(e){this.setMouseXY(e),this.activeAxis=null,this.activePointer=null,this.activeRange=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove","gaugeMouseLeave");return this.trigger("gaugeMouseLeave",t),!1},n.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},n.prototype.pointerDrag=function(e,t,i){var n=this.activeAxis,o=n.visibleRange,a=M(h(this.midPoint,e),o.max,o.min,n.startAngle,n.endAngle,"ClockWise"===n.direction);a>=o.min&&a<=o.max&&(this.axes[t].pointers[i].value=a,this.activePointer.currentValue=a,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,this.activePointer,a))},n.prototype.rangeDrag=function(e,t,i){if(this.activeAxis){var n=this.activeAxis,o=n.visibleRange,a=M(h(this.midPoint,e),o.max,o.min,n.startAngle,n.endAngle,"ClockWise"===n.direction);if(a>=o.min&&a<=o.max){var r=this.activeRange.currentValue;this.activeRange.currentValue=a;var l=(this.activeRange.end-this.activeRange.start)/2,s=parseFloat(this.activeRange.start.toString())+l,d="string"==typeof this.activeRange.start?parseFloat(this.activeRange.start):this.activeRange.start,g="string"==typeof this.activeRange.end?parseFloat(this.activeRange.end):this.activeRange.end;this.startValue=a<s?a:r<s?r:d<g?this.activeRange.start:this.activeRange.end,this.endValue=a<s?r>s?r:d<g?this.activeRange.end:this.activeRange.start:a,this.axes[t].ranges[i].start=this.startValue,this.axes[t].ranges[i].end=this.endValue,this.isTouch&&this.setRangeValue(t,i,this.startValue,this.endValue)}}},n.prototype.gaugeOnMouseDown=function(e){var i=this;this.setMouseXY(e);var n,o,a=this.getMouseArgs(e,"touchstart","gaugeMouseDown"),r=!1,l=a.target.id.indexOf("_Pointer_")>-1?parseInt(a.target.id.slice(-1),10):null,s=a.target.id.indexOf("_Axis_")>-1?parseInt(a.target.id.split("_Axis_")[1],10):null;return t.isNullOrUndefined(s)||t.isNullOrUndefined(l)||(r=this.allowPointerDrag?this.axes[s].pointers[l].enableDrag:this.enablePointerDrag),this.trigger("gaugeMouseDown",a,function(l){if(!a.cancel&&a.target.id.indexOf(i.element.id+"_Axis_")>=0&&a.target.id.indexOf("_Pointer_")>=0){n=R(a.target.id,i),i.activeAxis=i.axes[n.axisIndex],i.activePointer=i.activeAxis.pointers[n.pointerIndex],t.isNullOrUndefined(i.activePointer.pathElement)&&(i.activePointer.pathElement=[e.target]),"Marker"===i.activePointer.type&&"Text"===i.activePointer.markerShape&&0===i.activePointer.pathElement.length&&(i.activePointer.pathElement=[e.target]);var s=parseInt(i.activePointer.pathElement[0].id.slice(-1),10),d=parseInt(i.activePointer.pathElement[0].id.split("_Axis_")[1],10);i.trigger("dragStart",{axis:i.activeAxis,name:"dragStart",type:"pointerStart",pointer:i.activePointer,currentValue:i.activePointer.currentValue,pointerIndex:s,axisIndex:d}),r&&i.svgObject.setAttribute("cursor","grabbing")}else if(!a.cancel&&a.target.id.indexOf(i.element.id+"_Axis_")>=0&&a.target.id.indexOf("_Range_")>=0){o=k(a.target.id,i),i.activeAxis=i.axes[o.axisIndex],i.activeRange=i.activeAxis.ranges[o.rangeIndex],t.isNullOrUndefined(i.activeRange.pathElement)&&(i.activeRange.pathElement=[e.target]);var g=parseInt(i.activeRange.pathElement[0].id.split("Range_")[1],10),d=parseInt(i.activeRange.pathElement[0].id.split("_Axis_")[1],10);i.trigger("dragStart",{axis:i.activeAxis,name:"dragStart",type:"rangeStart",range:i.activeRange,axisIndex:d,rangeIndex:g}),i.enableRangeDrag&&i.svgObject.setAttribute("cursor","grabbing")}}),!1},n.prototype.mouseEnd=function(e){this.setMouseXY(e);var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");this.isTouch="touch"===e.pointerType||"2"===e.pointerType||"touchend"===e.type,this.trigger("gaugeMouseUp",i);var n=!1;if(this.activeAxis&&this.activePointer){var o=parseInt(this.activePointer.pathElement[0].id.slice(-1),10),a=parseInt(this.activePointer.pathElement[0].id.split("_Axis_")[1],10);t.isNullOrUndefined(a)||t.isNullOrUndefined(o)||(n=this.allowPointerDrag?this.axes[a].pointers[o].enableDrag:this.enablePointerDrag),n&&(this.svgObject.setAttribute("cursor","auto"),this.trigger("dragEnd",{name:"dragEnd",type:"pointerEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue,axisIndex:a,pointerIndex:o}),this.activeAxis=null,this.activePointer=null,this.isPointerDragged=!1)}else if(this.activeAxis&&this.activeRange&&this.enableRangeDrag){this.svgObject.setAttribute("cursor","auto");var r=parseInt(this.activeRange.pathElement[0].id.slice(-1),10),l=parseInt(this.activeRange.pathElement[0].id.split("_Axis_")[1],10);this.trigger("dragEnd",{name:"dragEnd",type:"rangeEnd",axis:this.activeAxis,range:this.activeRange,axisIndex:l,rangeIndex:r}),this.activeAxis=null,this.activeRange=null}if(t.isNullOrUndefined(this.activePointer)||(this.activePointer=null),this.isDrag=!1,this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),e.type.indexOf("touch")>-1&&(i.target.id===this.element.id+"_CircularGaugeTitle"||i.target.id.indexOf("_gauge_legend_")>-1)){var s=e;N(e,s.changedTouches[0].pageX,s.changedTouches[0].pageY,this,!0)}return!1},n.prototype.getMouseArgs=function(e,t,i){var n=this.element.getBoundingClientRect(),o=new K(-n.left,-n.top),a=e.type===t;return o.x+=a?e.changedTouches[0].clientX:e.clientX,o.y+=a?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:o.x,y:o.y,target:e.target}},n.prototype.gaugeResize=function(e){var i=this;if(!this.isDestroyed){var n={gauge:this,previousSize:this.availableSize,name:"resized",cancel:!1,currentSize:this.calculateSvgSize()};this.trigger("resized",n),n.cancel||(this.resizeTo&&clearTimeout(this.resizeTo),!t.isNullOrUndefined(this.element)&&this.element.classList.contains("e-circulargauge")&&(this.animatePointer=!1,this.resizeTo=window.setTimeout(function(){i.isResize=!0,i.isPropertyChange=!0,i.createSvg(),i.calculateBounds(),i.allowLoadingAnimation=!1,i.isOverAllAnimationComplete&&(i.loadingAnimationDuration=[]),i.renderElements(),i.isResize=!1},500)))}return!1},n.prototype.setGaugeStyle=function(e){e.style.touchAction="element",e.style.msTouchAction="element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative",e.style.overflow="hidden"},n.prototype.setCulture=function(){this.intl=new t.Internationalization},n.prototype.createSvg=function(){this.removeSvg(),t.isNullOrUndefined(this.renderer)&&(this.renderer=new i.SvgRenderer(this.element.id)),t.isNullOrUndefined(this.gaugeAxisLayoutPanel)&&(this.gaugeAxisLayoutPanel=new _e(this)),this.availableSize=this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},n.prototype.removeSvg=function(){if(!t.isNullOrUndefined(this.element)){if(S(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}S(this.element.id+"_svg"),this.clearTemplate()}},n.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-circulargauge").length;this.element.id="circulargauge_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new _e(this),this.animatePointer=!0},n.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=2*parseInt(this.element.style.borderWidth.split("px").join(""),10),n=F(this.width,e)||e||600,o=F(this.height,t)||t||450;return n=isNaN(i)?n:n-i,o=isNaN(i)?o:o-i,new $(n,o)},n.prototype.radiusAndCenterCalculation=function(e,i,n,o,a,r,l,s,d,g,u,h){var p,c,m,y,f,v=this.margin.bottom+this.border.width;if(this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerXpoint)&&t.isNullOrUndefined(this.centerYpoint))p=new Q(i,e,n,o);else if(this.allowMargin)p=new Q(i+n/2-a,e+o/2-a,2*a,2*a);else if(!t.isNullOrUndefined(this.legendModule)&&n>o&&("Top"===this.legendSettings.position||"Bottom"===this.legendSettings.position))c=Math.min(n,o)/2,p=new Q(i+n/2-c,e+o/2-c,2*c,2*c);else if(n>o&&(s&&h||l&&u)){m=n/2;var x=u&&h?o/2:.75*o;m>x&&(m=x),p=new Q(i+n/2-m,e+o/2-m,2*m,2*m)}else if(o>n){var b=o/2;p=new Q(i+n/2-a,e+o/2-b,2*a,2*b)}else p=new Q(i+n/2-a,e+o/2-a,2*a,2*a);if(this.gaugeRect=p,this.legendModule&&this.legendSettings.visible&&(this.legendModule.getLegendOptions(this.axes),this.legendModule.calculateLegendBounds(this.gaugeRect,this.availableSize)),this.allowMargin)y=null!==this.centerXpoint?F(this.centerXpoint,this.availableSize.width):this.gaugeRect.x+this.gaugeRect.width/2,f=null!==this.centerYpoint?F(this.centerYpoint,this.availableSize.height):this.gaugeRect.y+this.gaugeRect.height/2;else{if(!t.isNullOrUndefined(this.legendModule)&&(l||s)&&n>o&&("Top"===this.legendSettings.position||"Bottom"===this.legendSettings.position)){A=o-this.gaugeRect.height;this.gaugeRect.width=n-(this.availableSize.width-this.gaugeRect.width)/2,this.gaugeRect.y=this.gaugeRect.y-A,this.gaugeRect.height=this.gaugeRect.height+A+(this.availableSize.height-this.gaugeRect.height)/2}else if(!t.isNullOrUndefined(this.legendModule)&&(l||s)&&n>o&&("Left"===this.legendSettings.position||"Right"===this.legendSettings.position)){var A=this.gaugeRect.height-this.gaugeRect.width;this.gaugeRect.x="Right"===this.legendSettings.position?this.gaugeRect.x+this.margin.right:this.gaugeRect.x,this.gaugeRect.width="Left"===this.legendSettings.position?Math.abs(n-(this.availableSize.width-this.gaugeRect.width+A)/2):Math.abs(n-(this.availableSize.width-this.gaugeRect.width)/2-10)}y=null!==this.centerXpoint?F(this.centerXpoint,this.availableSize.width):this.gaugeRect.x+this.gaugeRect.width/2,!l&&!s||t.isNullOrUndefined(this.legendModule)||(y="Top"===this.legendSettings.position||"Bottom"===this.legendSettings.position?this.availableSize.width/2:"Right"===this.legendSettings.position?this.gaugeRect.width/2+this.margin.right:y),f=l||s?l?.75*this.gaugeRect.height+this.gaugeRect.y-v:.25*this.gaugeRect.height+this.gaugeRect.y:this.gaugeRect.y+this.gaugeRect.height/2,f=d||!l&&!s?f:this.gaugeRect.height/2+this.gaugeRect.y+.75*g*.5,!t.isNullOrUndefined(this.axes)&&this.axes.length>1&&!t.isNullOrUndefined(this.midPoint)&&(u=l||u,h=s||h,u&&h&&(f=this.availableSize.height/2-v))}this.midPoint=new K(y,f)},n.prototype.calculateBounds=function(){var e=this.margin,i=0;this.title&&(i=o(this.title,this.titleStyle).height+5);var n=e.top+i+this.border.width,a=e.left+this.border.width,r=!1,l=!1,s=this.availableSize.width-a-e.right-this.border.width,d=this.availableSize.height-n-this.border.width-e.bottom,g=Math.min(s,d)/2;if(this.centerXpoint=""===this.centerX?null:this.centerX,this.centerYpoint=""===this.centerY?null:this.centerY,this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerXpoint)&&t.isNullOrUndefined(this.centerYpoint),this.allowMargin)this.radiusAndCenterCalculation(n,a,s,d,g,i,!1,!1,null,null,!1,!1);else for(var u=0;u<this.axes.length;u++){var h=270<=this.axes[u].startAngle&&this.axes[u].startAngle<=360&&0<=this.axes[u].endAngle&&this.axes[u].endAngle<=90,p=90>=this.axes[u].startAngle&&this.axes[u].startAngle<=180&&180<=this.axes[u].endAngle&&270<=this.axes[u].endAngle&&0!==this.axes[u].startAngle&&360!==this.axes[u].endAngle;r=h||r,l=p||l;var c=null===this.axes[u].radius||parseInt(this.axes[0].radius.split("%")[0],10)>=100,m=null!==this.axes[u].radius?g*(parseInt(this.axes[0].radius.split("%")[0],10)/100):g;this.radiusAndCenterCalculation(n,a,s,d,g,i,h,p,c,m,r,l)}this.gaugeAxisLayoutPanel.measureAxis(this.gaugeRect)},n.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.renderLegend(),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this}),S("gauge-measuretext")},n.prototype.renderAnimation=function(){if(this.allowLoadingAnimation)for(var e=0;e<this.axes.length;e++)this.gaugeAxisLayoutPanel.axisLineAnimation(e,this.loadingAnimationDuration[e],this)},n.prototype.renderLegend=function(){if(!this.legendModule||!this.legendSettings.visible)return null;this.legendModule.legendCollection.length&&this.legendModule.renderLegend(this.legendSettings,this.legendModule.legendBounds)},n.prototype.renderTitle=function(){if(this.title){var e={color:this.titleStyle.color,size:this.titleStyle.size||this.themeStyle.titleFontSize,fontFamily:this.titleStyle.fontFamily||this.themeStyle.fontFamily,fontStyle:this.titleStyle.fontStyle,fontWeight:this.titleStyle.fontWeight||this.themeStyle.titleFontWeight,opacity:this.titleStyle.opacity},t=e.size;isNaN(Number(t))||(e.size=t+"px");var i=B(Math.abs(this.margin.left+this.margin.right-this.availableSize.width),this.title,e),n=o(i,e),a=l(new ee(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+n.height/4*3,"middle",i),e,e.color||this.themeStyle.titleFontColor,this.svgObject,"");a.setAttribute("aria-label",this.description||this.title),a.setAttribute("role","region"),a.setAttribute("tabindex",this.tabIndex.toString())}},n.prototype.renderBorder=function(){var e=this.border.width;(e>0||this.background||this.themeStyle.backgroundColor)&&this.svgObject.appendChild(this.renderer.drawRectangle(new J(this.element.id+"_CircularGaugeBorder",this.background||this.themeStyle.backgroundColor,this.border,null,new Q(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},n.prototype.setPointerValue=function(e,i,n){var o=this,a=this.axes[e],r=a.pointers[i];r.currentRadius;if(this.allowLoadingAnimation=!1,!this.isDestroyed&&r.currentValue!==n){var l=r.animation.enable||"Enable"===t.animationMode;n=n<a.visibleRange.min?a.visibleRange.min:n,n=n>a.visibleRange.max?a.visibleRange.max:n,r.isPointerAnimation=!0,document.getElementById(this.element.id+"_Axis_"+e+"_Pointer_"+i).style.visibility="visible",t.isNullOrUndefined(r.pathElement)||r.pathElement.map(function(t){"RangeBar"===r.type?(E(t,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(t,r.currentValue,n,a,r,e):(o.isAnimationProgress=!1,o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(a,r,n))):(t.id.indexOf("_Pointer_NeedleCap_")>=0?E(t,r.cap.color,r.cap.border):t.id.indexOf("_Pointer_NeedleTail_")>=0?E(t,r.needleTail.color,r.needleTail.border):t.id.indexOf("_Pointer_NeedleRect_")>=0?E(t,"transparent",{color:"transparent",width:0}):"Marker"===r.type&&"Text"!==r.markerShape&&E(t,r.color,r.border),l?"Marker"===r.type&&"Text"===r.markerShape?o.gaugeAxisLayoutPanel.pointerRenderer.performTextAnimation(t,r.currentValue,n,a,r,e):o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(t,r.currentValue,n,a,r,e):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(a,r,n))}),this.allowLoadingAnimation&&!r.animation.enable&&(this.allowLoadingAnimation=!1,r.value=n)}this.isProtectedOnChange=!0,r.previousValue=r.currentValue,r.currentValue=n,r.value=n,this.isProtectedOnChange=!1},n.prototype.setAnnotationValue=function(e,i,n){if(!this.isDestroyed){this.allowLoadingAnimation=!1;var o=null!==w(this.element.id+"_Annotations_"+e),a=w(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e,styles:this.animationDuration>0?"opacity: 0":"opacity: 1"}),r=this.axes[e].annotations[i];if(null!==n){S(this.element.id+"_Axis_"+e+"_Annotation_"+i),r.content=n,this.annotationsModule.createTemplate(a,i,e,this);var l=w(this.element.id+"_Secondary_Element");o||t.isNullOrUndefined(l)||l.appendChild(a)}}},n.prototype.print=function(e){this.allowPrint&&this.printModule&&this.printModule.print(this,e)},n.prototype.export=function(e,i,n,o){var a=this;return t.isNullOrUndefined(o)&&(o=!0),"PDF"===e&&this.allowPdfExport&&this.pdfExportModule?new Promise(function(t,r){t(a.pdfExportModule.export(a,e,i,n,o))}):this.allowImageExport&&"PDF"!==e&&this.imageExportModule?new Promise(function(t,n){t(a.imageExportModule.export(a,e,i,o))}):null},n.prototype.setMouseXY=function(e){var t,i,n=w(this.element.id+"_svg").getBoundingClientRect(),o=this.element.getBoundingClientRect();if(e.type.indexOf("touch")>-1){this.isTouch=!0;var a=e;i=a.changedTouches[0].clientY,t=a.changedTouches[0].clientX}else this.isTouch="touch"===e.pointerType||"2"===e.pointerType,t=e.clientX,i=e.clientY;this.mouseY=i-o.top-Math.max(n.top-o.top,0),this.mouseX=t-o.left-Math.max(n.left-o.left,0)},n.prototype.setRangeValue=function(e,i,n,o){this.allowLoadingAnimation=!1;var r=w(this.element.id+"_Axis_"+e+"_Range_"+i),l=this.axes[e],s=l.ranges[i],d=l.visibleRange,g="ClockWise"===l.direction,h=Math.min(Math.max(n,d.min),o),p=Math.min(Math.max(n,o),d.max),m=s.start,y=s.end;if(s.start=n,s.end=o,s.start!==s.end&&m===y&&this.legendModule&&this.legendSettings.visible){this.legendModule.getLegendOptions(this.axes);var f=this.legendModule.legendBounds.height+this.legendSettings.margin.top+this.legendSettings.margin.bottom+this.legendSettings.border.width,v=this.legendModule.legendBounds.width+this.legendSettings.margin.left+this.legendSettings.margin.right+this.legendSettings.border.width,x=this.gaugeRect,b=this.legendModule.position;"Bottom"===b&&(x.height=x.height+f),"Top"===b&&(x.height=x.height+f,x.y=x.y-f),"Left"===b&&(x.width=x.width+v,x.x=x.x-v),"Right"===b&&(x.width=x.width+v),this.legendModule.calculateLegendBounds(x,this.availableSize),this.legendModule.legendCollection.length&&this.legendModule.renderLegend(this.legendSettings,this.legendModule.legendBounds)}this.isRangeUpdate=!0;var A,C=u(h,d.max,d.min,l.startAngle,l.endAngle,g),P=u(p,d.max,d.min,l.startAngle,l.endAngle,g);A=!t.isNullOrUndefined(s.startWidth)&&s.startWidth.length>0?a(s.startWidth,s.currentRadius):s.startWidth;var S;S=!t.isNullOrUndefined(s.endWidth)&&s.endWidth.length>0?a(s.endWidth,s.currentRadius):s.endWidth,P=g?P:[C,C=P][0],S=g?S:[A,A=S][0],r.setAttribute("d",c(this.midPoint,Math.round(C),Math.round(P),s.currentRadius,A,S,s,l)),E(r,s.color?s.color:s.rangeColor,{color:s.color?s.color:s.rangeColor,width:0})},n.prototype.destroy=function(){t.isNullOrUndefined(this.element)||this.unWireEvents(),t.isNullOrUndefined(this.tooltipModule)||this.tooltipModule.removeEventListener(),e.prototype.destroy.call(this),t.isNullOrUndefined(this.gaugeAxisLayoutPanel)||this.gaugeAxisLayoutPanel.destroy(),this.availableSize=null,this.midPoint=null,this.activePointer=null,this.activeAxis=null,this.activeRange=null,this.gaugeRect=null,this.gaugeAxisLayoutPanel=null,this.themeStyle=null,this.loadingAnimationDuration=null,this.intl=null,this.removeSvg(),this.resizeEvent=null,this.svgObject=null,this.renderer=null},n.prototype.requiredModules=function(){var e=[],i=!1;return this.axes.map(function(e){e.annotations.map(function(e){i||(i=!t.isNullOrUndefined(e.content)&&0!==e.content.length||"function"==typeof e.content)})}),i&&e.push({member:"Annotations",args:[this,Se],name:"Annotations"}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,we],name:"Tooltip"}),this.allowPrint&&e.push({member:"Print",args:[this,Le],name:"Print"}),this.allowImageExport&&e.push({member:"ImageExport",args:[this,Oe],name:"ImageExport"}),this.allowPdfExport&&e.push({member:"PdfExport",args:[this,ke],name:"PdfExport"}),this.legendSettings.visible&&e.push({member:"Legend",args:[this,Te],name:"Legend"}),e.push({member:"Gradient",args:[this,Ge],name:"Gradient"}),e},n.prototype.getPersistData=function(){return this.addOnPersist([])},n.prototype.onPropertyChanged=function(e,i){if(!this.isDestroyed){this.isPropertyChange=!0;var n=!1;this.allowLoadingAnimation=this.animationDuration>0&&!this.isOverAllAnimationComplete;for(var o=!1,a=!1,r=1===Object.keys(e).length&&e instanceof Object&&!t.isNullOrUndefined(this.activePointer),l=0,s=Object.keys(e);l<s.length;l++)switch(s[l]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),o=!0;break;case"animationDuration":this.allowLoadingAnimation=!0;break;case"title":o=""===e.title||""===i.title,n=!(""===e.title||""===i.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?o=!0:n=!0;break;case"border":case"background":n=!0;break;case"legendSettings":a=!0;break;case"axes":for(var d=this.axes.length,g=0;g<d;g++)if(!t.isNullOrUndefined(e.axes[g]))for(var u=0,h=Object.keys(e.axes[g]);u<h.length;u++)if("pointers"===h[u])for(var p=Object.keys(e.axes[g].pointers).length,c=0;c<p;c++){var m=parseInt(Object.keys(e.axes[g].pointers)[c],10);t.isNullOrUndefined(Object.keys(e.axes[g].pointers[m]))||(this.allowLoadingAnimation=!1,this.loadingAnimationDuration=[],this.isAnimationProgress=this.axes[g].pointers[m].animation.enable,this.axes[g].pointers[m].previousValue=this.axes[g].pointers[m].currentValue,this.axes[g].pointers[m].isPointerAnimation=Object.keys(e.axes[g].pointers[m]).indexOf("value")>-1)}a=!0}r||this.isRangeUpdate||(!o&&n&&(this.removeSvg(),this.renderElements()),(o||this.allowLoadingAnimation)&&(this.removeSvg(),this.calculateBounds(),this.renderElements(),this.allowLoadingAnimation&&(this.allowLoadingAnimation=this.animationDuration>0&&!this.isOverAllAnimationComplete,this.renderAnimation())),!a||n||o||this.allowLoadingAnimation||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1))),this.isRangeUpdate=!1}},n.prototype.getModuleName=function(){return"circulargauge"};var r;return je([t.Property(null)],n.prototype,"width",void 0),je([t.Property(null)],n.prototype,"height",void 0),je([t.Complex({color:"transparent",width:0},oe)],n.prototype,"border",void 0),je([t.Property(null)],n.prototype,"background",void 0),je([t.Property("")],n.prototype,"title",void 0),je([t.Property(0)],n.prototype,"animationDuration",void 0),je([t.Complex({size:null,color:null,fontWeight:null,fontFamily:null},ae)],n.prototype,"titleStyle",void 0),je([t.Complex({},se)],n.prototype,"margin",void 0),je([t.Collection([{}],Pe)],n.prototype,"axes",void 0),je([t.Complex({},de)],n.prototype,"tooltip",void 0),je([t.Property(!1)],n.prototype,"enablePointerDrag",void 0),je([t.Property(!1)],n.prototype,"enableRangeDrag",void 0),je([t.Property(!1)],n.prototype,"allowPrint",void 0),je([t.Property(!1)],n.prototype,"allowImageExport",void 0),je([t.Property(!1)],n.prototype,"allowPdfExport",void 0),je([t.Property(!0)],n.prototype,"allowRangePreRender",void 0),je([t.Property(null)],n.prototype,"centerX",void 0),je([t.Property(null)],n.prototype,"centerY",void 0),je([t.Property(!1)],n.prototype,"moveToCenter",void 0),je([t.Property("Material")],n.prototype,"theme",void 0),je([t.Property(!1)],n.prototype,"useGroupingSeparator",void 0),je([t.Property(null)],n.prototype,"description",void 0),je([t.Property(0)],n.prototype,"tabIndex",void 0),je([t.Property(!0)],n.prototype,"allowMargin",void 0),je([t.Complex({},ue)],n.prototype,"legendSettings",void 0),je([t.Event()],n.prototype,"loaded",void 0),je([t.Event()],n.prototype,"load",void 0),je([t.Event()],n.prototype,"animationComplete",void 0),je([t.Event()],n.prototype,"axisLabelRender",void 0),je([t.Event()],n.prototype,"radiusCalculate",void 0),je([t.Event()],n.prototype,"annotationRender",void 0),je([t.Event()],n.prototype,"legendRender",void 0),je([t.Event()],n.prototype,"tooltipRender",void 0),je([t.Event()],n.prototype,"dragStart",void 0),je([t.Event()],n.prototype,"dragMove",void 0),je([t.Event()],n.prototype,"dragEnd",void 0),je([t.Event()],n.prototype,"gaugeMouseMove",void 0),je([t.Event()],n.prototype,"gaugeMouseLeave",void 0),je([t.Event()],n.prototype,"gaugeMouseDown",void 0),je([t.Event()],n.prototype,"gaugeMouseUp",void 0),je([t.Event()],n.prototype,"resized",void 0),je([t.Event()],n.prototype,"beforePrint",void 0),n=r=je([t.NotifyPropertyChanges],n)}(t.Component);return Ve.Inject(we,Se,Te,Le,ke,Oe,Ge),e.Animation=be,e.Annotation=Ae,e.AnnotationTooltip=le,e.Annotations=Se,e.Axis=Pe,e.Border=oe,e.Cap=ve,e.CircularGauge=Ve,e.ColorStop=Be,e.CustomizeOption=Z,e.Font=ae,e.GaugeLocation=K,e.GaugeTooltip=we,e.Gradient=Ge,e.GradientPosition=ze,e.ImageExport=Oe,e.Index=Ee,e.Label=me,e.Legend=Te,e.LegendOptions=Me,e.LegendSettings=ue,e.Line=ce,e.LinearGradient=Ne,e.Location=ge,e.Margin=se,e.NeedleTail=xe,e.PathOption=q,e.PdfExport=ke,e.Pointer=Ce,e.Print=Le,e.RadialGradient=We,e.Range=ye,e.RangeTooltip=re,e.Rect=Q,e.RectOption=J,e.Size=$,e.TextOption=ee,e.Tick=fe,e.TooltipSettings=de,e.VisibleLabels=te,e.appendPath=s,e.arcPath=m,e.arcRoundedPath=y,e.arcWidthPath=f,e.arcWidthPathCalculation=x,e.calculateShapes=T,e.calculateSum=G,e.getAngleFromLocation=h,e.getAngleFromValue=u,e.getCirclePath=C,e.getCompleteArc=V,e.getCompletePath=H,e.getDegree=g,e.getElement=w,e.getElementSize=D,e.getFontStyle=r,e.getLabelFormat=_,e.getLocationFromAngle=p,e.getMousePosition=I,e.getPathArc=c,e.getPointer=R,e.getRange=k,e.getRangeColor=U,e.getRangePath=v,e.getRoundedPathArc=A,e.getTemplateFunction=P,e.getValueFromAngle=M,e.isCompleteAngle=d,e.linear=j,e.measureText=o,e.removeElement=S,e.removeTooltip=W,e.roundedArcWidthPathCalculation=b,e.setStyles=E,e.showTooltip=z,e.stringToNumber=F,e.textElement=l,e.textTrim=B,e.titleTooltip=N,e.toPixel=a,e}({},ej.base,ej.svgbase,ej.pdfexport),this.ejs=ej;
//# sourceMappingURL=ej2-circulargauge.min.js.map