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

@syncfusion/ej2-circulargauge

Package Overview
Dependencies
Maintainers
4
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-circulargauge - npm Package Compare versions

Comparing version 17.2.28-beta to 17.2.34

16

CHANGELOG.md

@@ -7,2 +7,8 @@ <!-- markdownlint-disable MD004 -->

### CircularGauge
#### Bug Fixes
- `#I238300` - The issue with animation in circular gauge and flickering has been resolved
## 17.1.50 (2019-06-04)

@@ -14,3 +20,3 @@

- #I237023 - The issue with pointer animation on setting more than 80% of the pointer radius has been fixed.
- `#I237023` - The issue with pointer animation on setting more than 80% of the pointer radius has been fixed.

@@ -23,3 +29,3 @@ ## 17.1.48 (2019-05-21)

- #I236468 - When drag the range bar pointer, the console error thrown is resolved now.
- `#I236468` - When drag the range bar pointer, the console error thrown is resolved now.

@@ -32,3 +38,3 @@ ## 17.1.44 (2019-05-07)

- #I234531 - The issue with rendering circular gauge when setting cancel argument to true in the "axisLabelRender" event has been fixed.
- `#I234531` - The issue with rendering circular gauge when setting cancel argument to true in the "axisLabelRender" event has been fixed.

@@ -41,4 +47,4 @@ ## 17.1.43 (2019-04-30)

- #I234082 - Circular gauge tooltip is not shown in IE browser issue has been fixed.
- #I234174 - Tooltip content width and adding a border to control container alignment issues have been fixed
- `#I234082` - Circular gauge tooltip is not shown in IE browser issue has been fixed.
- `#I234174` - Tooltip content width and adding a border to control container alignment issues have been fixed

@@ -45,0 +51,0 @@ ## 16.4.54 (2019-02-19)

/*!
* filename: ej2-circulargauge.umd.min.js
* version : 17.2.28-beta
* version : 17.2.34
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new W(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),_(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,t,o,n,r){var a,l={},s=new i.SvgRenderer(""),u=r+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";";return l={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:u},a=s.createText(l,e.text),n.appendChild(a),a}function d(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function p(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function h(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=y(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function m(e,t,i,o,n,r){return n-=y(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function y(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new V(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=y(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):C(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=y(t,i)?1e-4:0),u=r-a,d=r-l,p=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,d,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,d,e),r,p,p,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,d,p){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+p+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+d+" "+u+" 0 "+p+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=y(t,i)?1e-4:0);return A(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function C(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function A(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function M(e){return document.getElementById(e)}function S(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function _(e){var i=M(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,i,o){var n,r,a=S(e),l=a?a({},null,null,i.element.id+"Template"):[];if(a&&l.length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a({},null,null,i.element.id+"Template"),u=s.length;u>0;)r.appendChild(s[0]),u--;o.appendChild(r),n=new W(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function F(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new V(e-s,t-u)}function L(e){return e&&null!==e.match("{value}")?"":e}function k(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,d=e.y,p=e.x+-l/2,h=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:d});break;case"Diamond":a="M "+p+" "+d+" L "+u+" "+(d+-s/2)+" L "+(u+l/2)+" "+d+" L "+u+" "+(d+s/2)+" L "+p+" "+d+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+p+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+s/2)+" L "+p+" "+(d+s/2)+" L "+p+" "+(d+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+d+" L "+(u-s)+" "+(d-l/2)+"L "+(u-s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+d+" L "+(u+s)+" "+(d-l/2)+"L "+(u+s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:p,y:h})}return r}function z(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var O,I=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),j=function(){return function(e){this.id=e}}(),B=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var d=e.call(this,t)||this;return d.opacity=r,d.fill=i,d.stroke=n,d["stroke-width"]=o,d["stroke-dasharray"]=a,d.d=l,d.transform=s,d.style=u,d}return I(t,e),t}(j),N=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return I(t,e),t}(j),W=function(){return function(e,t){this.width=e,this.height=t}}(),V=function(){return function(e,t){this.x=e,this.y=t}}(),D=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),G=function(e){function t(t,i,o,n,r,a,l){void 0===a&&(a="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=o,s.anchor=n,s.text=r,s.transform=a,s.baseLine=l,s}return I(t,e),t}(j),U=function(){return function(e,t,i){this.text=e,this.value=t,this.size=i}}(),H=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property(null)],i.prototype,"fill",void 0),X([t.Complex({size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);(O||(O={})).axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"};var K=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(O.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(0)],i.prototype,"start",void 0),Q([t.Property(0)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:null,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:null,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([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 K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),se=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(!1)],i.prototype,"showLastLabel",void 0),Q([t.Property(null)],i.prototype,"roundingPlaces",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],le)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Property(null)],i.prototype,"rangeGap",void 0),Q([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue="animationComplete",de="axisLabelRender",pe="tooltipRender",he="gaugeMouseLeave",ce=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=this.gauge.availableSize.width,r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=M(this.elementId+"_Secondary_Element");document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount&&(a.appendChild(r),t.updateBlazorTemplate(r.id+"_ContentTemplate","ContentTemplate"))},e.prototype.createTemplate=function(e,i,o){var n=this,a=this.gauge.axes[o],l=a.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+l.zIndex+";transform:"+(l.autoAngle?"rotate("+(l.angle-90)+"deg)":"rotate(0deg)")+";"}),u={cancel:!1,name:"annotationRender",content:l.content,axis:a,annotation:l,textStyle:l.textStyle};this.gauge.trigger("annotationRender",u,function(i){var o,d;if(u.cancel)t.resetBlazorTemplate(e.id+"_ContentTemplate","_ContentTemplate");else{if((o=S(u.content))&&(window.Blazor||o(a,null,null,e.id+"_ContentTemplate").length))for(var p=(d=Array.prototype.slice.call(o(window.Blazor?{}:a,null,null,e.id+"_ContentTemplate"))).length,h=0;h<p;h++)s.appendChild(d[h]);else s.appendChild(t.createElement("div",{innerHTML:u.content,styles:r(u.textStyle)}));n.updateLocation(s,a,l),e.appendChild(s)}})},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),ge=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=this,u=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(u=this.pointerEle===r);var d=this.gauge.svgObject.getBoundingClientRect(),p=this.gauge.element.getBoundingClientRect(),h=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),g=new D(Math.abs(p.left-d.left),Math.abs(p.top-d.top),d.width,d.height),m=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[m.axisIndex],this.currentPointer=this.currentAxis.pointers[m.pointerIndex];var y=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,v=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,x=v&&null!==v.match("{value}"),b=this.gauge.intl.getNumberFormat({format:L(v),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var P=void 0;P=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var R=x?v.replace(new RegExp("{value}","g"),b(P)):b(P);(l=f(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?l.x+10:l.x;var w={name:pe,cancel:!1,content:R,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger(pe,w,function(e){var r=w.tooltip.template;if(null!==r&&1===r.length&&(r=r[r[0]]),s.tooltip.showAtMousePosition)w.location=F(o,n,s.gauge.svgObject),s.tooltipRect=g;else if(r){var a=T(r,s.gauge,s.tooltipEle);s.tooltipRect=Math.abs(h.left-d.left)>a.width?s.findPosition(g,y,R,w.location):g}else s.findPosition(g,y,R,w.location);w.cancel||u||(w.tooltip.textStyle.color=w.tooltip.textStyle.color||s.gauge.themeStyle.tooltipFontColor,w.tooltip.textStyle.fontFamily=s.gauge.themeStyle.fontFamily||w.tooltip.textStyle.fontFamily,w.tooltip.textStyle.opacity=s.gauge.themeStyle.tooltipTextOpacity||w.tooltip.textStyle.opacity,s.svgTooltip=new i.Tooltip({enable:!0,data:{value:w.content},template:r,enableAnimation:w.tooltip.enableAnimation,content:[w.content],location:w.location,inverted:s.arrowInverted,areaBounds:s.tooltipRect,fill:w.tooltip.fill||s.gauge.themeStyle.tooltipFillColor,textStyle:w.tooltip.textStyle,availableSize:s.gauge.availableSize,border:w.tooltip.border}),s.svgTooltip.opacity=s.gauge.themeStyle.tooltipFillOpacity||s.svgTooltip.opacity,s.svgTooltip.appendTo(s.tooltipEle),s.gauge.tooltip.template&&t.updateBlazorTemplate(s.gauge.element.id+"Template","Template"),r&&Math.abs(n-s.tooltipEle.getBoundingClientRect().top)<=0&&(s.tooltipEle.style.top=parseFloat(s.tooltipEle.style.top)+20+"px"))})}else this.removeTooltip(),this.gauge.tooltip.template&&t.resetBlazorTemplate(this.gauge.element.id+"Template","Template")},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0){var e=document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0];e&&t.remove(e),this.pointerEle=null}},e.prototype.mouseUpHandler=function(e){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))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),me=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&d(new B(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle,a=e.lineStyle.color||this.gauge.themeStyle.lineColor;e.lineStyle.width>0&&(n=y(n,r)?[0,r=360][0]:n,d(new B(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,a,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),d=e.visibleRange.min,p=e.visibleRange.max,h=e.visibleLabels,g=e.labelStyle,m=e.currentRadius,y=g.font.color||this.gauge.themeStyle.labelColor;"Outside"===g.position?m+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:m-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var v=0,x=h.length;v<x;v++)0===v&&"First"===g.hiddenLabel||v===x-1&&"Last"===g.hiddenLabel||(l=h[v],n=f(a=Math.round(c(l.value,p,d,e.startAngle,e.endAngle,"ClockWise"===e.direction)),m,o.midPoint),r=this.findAnchor(n,g,a,l),g.font.fontFamily=this.gauge.themeStyle.labelFontFamily||g.font.fontFamily,u(new G(o.element.id+"_Axis_"+t+"_Label_"+v,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?z(l.value,e.ranges,y):y,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor,s=r.color||this.gauge.themeStyle.minorTickColor;if(r.width&&r.height&&a){for(var u=e.visibleRange.min,p=e.visibleRange.max;u<=p;u+=a)this.majorValues.indexOf(+u.toFixed(3))<0&&d(new B(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+u,"transparent",r.width,l?z(u,e.ranges,s):s,null,"0",this.calculateTicks(u,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;this.majorValues=[];var l=r.color||this.gauge.themeStyle.majorTickColor;if(r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,u=e.visibleRange.max,p=e.visibleRange.interval;s<=u;s+=p)this.majorValues.push(+s.toFixed(3)),d(new B(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?z(s,e.ranges,l):l,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,p,h,g,m,y,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,C=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,w),i.end),s=Math.min(Math.max(i.start,i.end),C),r=c(l,C,w,e.startAngle,e.endAngle,R),a=c(s,C,w,e.startAngle,e.endAngle,R);var M=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(M?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,p=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],p=R?p:[u,u=p][0];var S=i.roundedCornerRadius,_=.25*S;m=((i.currentRadius-u/2)*(r*Math.PI/180)-S/_)/(i.currentRadius-u/2)*180/Math.PI,y=((i.currentRadius-p/2)*(a*Math.PI/180)+S/_)/(i.currentRadius-p/2)*180/Math.PI,h=(i.currentRadius*(r*Math.PI/180)+S)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-S)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?d(new B(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(h),Math.ceil(g),m,y,i.currentRadius,u,p),"","pointer-events:none;"),f,o):d(new B(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,p),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),ye=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,s){e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+s}),r["draw"+i.type+"Pointer"](e,t,s,a,o),r.setPointerValue(e,i,i.currentValue),l.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(l)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,p=e.pointers[i],h=n.midPoint,c=p.pointerWidth/2;a=f(0,p.currentRadius,h);var g=p.color||this.gauge.themeStyle.needleColor;l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+h.y+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new B(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,g,p.border.width,p.border.color,null,"0",l),o,n)),r=s(p.needleTail.length,p.currentRadius),u="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c),r&&(a=f(180,r,n.midPoint),l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new B(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,p.needleTail.color||this.gauge.themeStyle.needleTailColor,p.needleTail.border.width,p.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(h.y+c)+" L "+a.x+" "+(h.y-c));var m=p.cap.color||this.gauge.themeStyle.capColor;p.cap.radius&&p.pathElement.push(d(k(h,"Circle",new W(2*p.cap.radius,2*p.cap.radius),"",new B(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,m,p.cap.border.width,p.cap.border.color,null,"0","","")),o,n,"Ellipse")),p.pathElement.push(d(new B(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,i,o){var n=this.gauge.midPoint,r="ClockWise"===e.direction,a=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r),l=c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r);l=r?a===l?l+1:l:a===l?[a,a=l-1][0]:[a,a=l][0];var s,u,d,p,h=i.roundedCornerRadius,g=.25*h;o<=g&&(h=8,g=.25*(h/=2)),d=((i.currentRadius-i.pointerWidth/2)*(a*Math.PI/180)-h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,p=((i.currentRadius-i.pointerWidth/2)*(l*Math.PI/180)+h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,s=(i.currentRadius*(a*Math.PI/180)+h)/i.currentRadius*180/Math.PI,u=(i.currentRadius*(l*Math.PI/180)-h)/i.currentRadius*180/Math.PI,t.isNullOrUndefined(i.currentRadius)&&this.calculatePointerRadius(e,i),i.pathElement.map(function(t){"RangeBar"===i.type?i.roundedCornerRadius&&o?(t.setAttribute("d",P(n,Math.floor(s),Math.ceil(u),d,p,i.currentRadius,i.pointerWidth,i.pointerWidth)),h=0):t.setAttribute("d",w(n,a,l,i.currentRadius,i.currentRadius-i.pointerWidth)):t.setAttribute("transform","rotate("+c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r)+","+n.x+","+n.y+")"),t.setAttribute("aria-label",i.description||"Pointer:"+o.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(d(k(a,r.markerShape,new W(r.markerWidth,r.markerHeight),r.imageUrl,new B(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(d(new B(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,d="ClockWise"===n.direction,p=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),m=p>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(p)===Math.round(m)?d?m-p:m-p-360:d?m-p-360:m-p,e.style.animation="None",e.setAttribute("transform","rotate("+h(t.timeStamp,p,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger(ue,{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u,d,p=this,g="ClockWise"===n.direction,m=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),y=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),v=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),f=r.roundedCornerRadius,x=.25*a;f&&(o<=x&&(a=8,x=.25*(a/=2)),y=(r.currentRadius*(y*Math.PI/180)+f)/r.currentRadius*180/Math.PI,v=(r.currentRadius*(v*Math.PI/180)-f)/r.currentRadius*180/Math.PI,d=((r.currentRadius-r.pointerWidth/2)*(m*Math.PI/180)-a/x)/(r.currentRadius-r.pointerWidth/2)*180/Math.PI),u=m>v?v+360:v,new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(m)===Math.round(u)?g?u-m:u-m-360:g?u-m-360:u-m,g?f?e.setAttribute("d",P(p.gauge.midPoint,Math.floor(y),h(t.timeStamp,Math.floor(y),s,t.duration)+1e-4,d,h(t.timeStamp,Math.floor(y+f/2),s,t.duration)+1e-4,a,r.pointerWidth,r.pointerWidth)):e.setAttribute("d",w(p.gauge.midPoint,y,h(t.timeStamp,m,s,t.duration)+1e-4,a,l)):f?(s+=f,e.setAttribute("d",P(p.gauge.midPoint,h(t.timeStamp,Math.floor(d),s,t.duration),Math.floor(d)+1e-4,h(t.timeStamp,Math.floor(y-f-f/2),s,t.duration),Math.floor(d+f/2)+1e-4,a,r.pointerWidth,r.pointerWidth))):e.setAttribute("d",w(p.gauge.midPoint,h(t.timeStamp,m,s,t.duration),y+1e-4,a,l))},end:function(e){p.setPointerValue(n,r,o),p.gauge.trigger(ue,{axis:n,pointer:r})}})},e}(),ve=function(){function e(e){this.gauge=e,this.axisRenderer=new me(e),this.pointerRenderer=new ye(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=this,n=0,r=this.gauge.margin.left+this.gauge.margin.right,a=this.gauge.margin.top+this.gauge.margin.bottom,l=function(l){if(e=Math.min(l.rect.width,l.rect.height)/2,i=null!=l.radius?s(l.radius,e):e,n=Math.max.apply(Math,l.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=n>100&&null==l.radius?100*i/n:i,l.currentRadius=i-l.nearSize,u.gauge.moveToCenter&&1===u.gauge.axes.length&&t.isNullOrUndefined(u.gauge.centerX)&&t.isNullOrUndefined(u.gauge.centerY)){var d=void 0,p=void 0,h=f((d=y(d=l.startAngle,l.endAngle)?[0,p=360][0]:d)-90,i,u.gauge.midPoint);p=l.endAngle;var c=f((p-=y(d,p)?1e-4:0)-90,i,u.gauge.midPoint),g=void 0,m=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;d>p&&!(Math.abs(d-p)>90)||(d>=270&&d<=360&&(p>270&&p<=360||p>=0&&p<=180)?(v=Math.abs(u.gauge.gaugeRect.x-Math.abs(h.x-u.gauge.gaugeRect.x)),R=p<=360&&p>=270?u.gauge.midPoint:p<=90?c:f(0,i,u.gauge.midPoint),x=Math.abs(R.x-u.gauge.gaugeRect.width),h=p<=360&&p>=270?c:f(270,i,u.gauge.midPoint),b=Math.abs(h.y-u.gauge.gaugeRect.y),c=p<=360&&p>=270||p>=0&&p<90?u.gauge.midPoint:p>=90&&p<=180?c:f(90,i,u.gauge.midPoint),P=Math.abs(c.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height))):d>=0&&d<90&&p>=0&&p<=270?(b=Math.abs(h.y-u.gauge.gaugeRect.y),R=p>=180?f(90,i,u.gauge.midPoint):c,P=Math.abs(R.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height)),h=p>=180?c:u.gauge.midPoint,v=Math.abs(u.gauge.gaugeRect.x-Math.abs(h.x-u.gauge.gaugeRect.x)),c=p>=90?f(0,i,u.gauge.midPoint):c,x=Math.abs(c.x-u.gauge.gaugeRect.width)):d>=90&&d<180&&p>90&&p<=360?(R=p<=180?u.gauge.midPoint:p>=270?f(180,i,u.gauge.midPoint):c,v=Math.abs(R.x-u.gauge.gaugeRect.x),x=Math.abs(h.x-u.gauge.gaugeRect.width),h=p>270?f(p-90,i,u.gauge.midPoint):u.gauge.midPoint,b=Math.abs(u.gauge.gaugeRect.y-h.y),c=p>=180?f(90,i,u.gauge.midPoint):c,P=Math.abs(c.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height))):d>=180&&d<=270&&(p<=360&&p>=270||p<=180&&p>=0)&&(R=p>180&&p<270?c:f(180,i,u.gauge.midPoint),v=Math.abs(u.gauge.gaugeRect.x-Math.abs(R.x-u.gauge.gaugeRect.x)),R=p>=180&&p<=360?u.gauge.midPoint:c,x=Math.abs(R.x-u.gauge.gaugeRect.width),R=p>180&&p<270?u.gauge.midPoint:p>=270&&p<=360?c:f(270,i,u.gauge.midPoint),b=Math.abs(R.y-u.gauge.gaugeRect.y),P=Math.abs(h.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>0||x>0)||!(b>0||P>0)||(g=Math.abs(v+x-r),m=Math.abs(b+P-a),u.gauge.midPoint.x=u.gauge.midPoint.x-v/2+x/2,u.gauge.midPoint.y=u.gauge.midPoint.y-b/2+P/2,e=Math.min(u.gauge.gaugeRect.width,u.gauge.gaugeRect.height)/2+Math.min(g,m)/2,l.currentRadius=(null!=l.radius?s(l.radius,e):e)-l.nearSize))}l.visibleRange.interval=u.calculateNumericInterval(l,l.rect);var w;w={cancel:!1,name:"radiusCalculate",currentRadius:l.currentRadius,gauge:u.gauge,midPoint:u.gauge.midPoint,axis:l},u.gauge.trigger("radiusCalculate",w,function(e){l.currentRadius=w.currentRadius,o.gauge.midPoint=w.midPoint}),u.calculateVisibleLabels(l)},u=this,d=0,p=this.gauge.axes;d<p.length;d++){l(p[d])}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=p(n,o.farSizes.length,o.farSizes),e.rect=new D(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 o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,d=[10,5,2,1];u<d.length;u++){var p=s*d[u];if(a<n/p)break;l=p}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:L(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=function(a,s,u){r=e.roundingPlaces?parseFloat(a.toFixed(e.roundingPlaces)):a,t={cancel:!1,name:de,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},l.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new U(t.text,a))})},l=this,s=e.visibleRange.min,u=e.visibleRange.interval,d=e.visibleRange.max;s<=d&&u;s+=u)a(s);var p=e.visibleLabels.length?e.visibleLabels[e.visibleLabels.length-1].value:null,h=e.visibleRange.max;p!==h&&!0===e.showLastLabel&&(t={cancel:!1,name:de,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(h)):n(h),value:h},this.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new U(t.text,h))})),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,d=0;this.farSizes=[],this.calculateAxisValues(t);for(var p=0,h=e;p<h.length;p++){var c=h[p];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,d=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+d:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+d)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new W(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),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}(),fe=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),xe=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},be=function(e){function r(t,i){return e.call(this,t,i)||this}return fe(r,e),r.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},r.prototype.render=function(){this.setTheme(),this.calculateBounds(),this.renderElements()},r.prototype.setTheme=function(){this.themeStyle=function(e){var t;switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:"#333232",titleFontColor:"#ffffff",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#000000",labelColor:"#DADADA",lineColor:"#C8C8C8",majorTickColor:"#C8C8C8",minorTickColor:"#9A9A9A",pointerColor:"#9A9A9A",capColor:"#9A9A9A",needleColor:"#9A9A9A",needleTailColor:"#9A9A9A"};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",tooltipFillColor:"#ffffff",tooltipFontColor:"#000000",labelColor:"#FFFFFF",lineColor:"#FFFFFF",majorTickColor:"#FFFFFF",minorTickColor:"#FFFFFF",pointerColor:"#FFFFFF",capColor:"#FFFFFF",needleColor:"#FFFFFF",needleTailColor:"#FFFFFF"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",labelColor:"#212529",lineColor:"#DEE2E6",majorTickColor:"#ADB5BD",minorTickColor:"#CED4DA",pointerColor:"#6C757D",capColor:"#6C757D",needleColor:"#6C757D",needleTailColor:"#6C757D",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",labelFontFamily:"HelveticaNeue",tooltipFillOpacity:1,tooltipTextOpacity:.9};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",labelColor:"#212121",lineColor:"#E0E0E0",majorTickColor:"#9E9E9E",minorTickColor:"#9E9E9E",pointerColor:"#757575",capColor:"#757575",needleColor:"#757575",needleTailColor:"#757575"}}return t}(this.theme)},r.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,"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.gaugeResize)},r.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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},r.prototype.mouseMove=function(e){var i=this,o=this.getMouseArgs(e,"touchmove","gaugeMouseMove");return this.trigger("gaugeMouseMove",o,function(e){var t;i.tooltipModule;o.cancel||i.enablePointerDrag&&i.activePointer&&(t={axis:i.activeAxis,pointer:i.activePointer,previousValue:i.activePointer.currentValue,name:"dragMove",currentValue:null},i.pointerDrag(new V(o.x,o.y)),t.currentValue=i.activePointer.currentValue,i.trigger("dragMove",t))}),this.notify(t.Browser.touchMoveEvent,e),!1},r.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove",he);return this.trigger(he,t),!1},r.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},r.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=m(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},r.prototype.gaugeOnMouseDown=function(e){var i,o=this,n=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",n,function(r){!n.cancel&&n.target.id.indexOf("_Pointer_")>=0&&n.target.id.indexOf(o.element.id+"_Axis_")>=0&&(i=E(n.target.id,o),o.activeAxis=o.axes[i.axisIndex],o.activePointer=o.activeAxis.pointers[i.pointerIndex],t.isNullOrUndefined(o.activePointer.pathElement)&&(o.activePointer.pathElement=[e.target]),o.trigger("dragStart",{axis:o.activeAxis,name:"dragStart",pointer:o.activePointer,currentValue:o.activePointer.currentValue}),o.svgObject.setAttribute("cursor","pointer"))}),!1},r.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},r.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new V(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},r.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new W(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new W(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},r.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},r.prototype.setCulture=function(){this.intl=new t.Internationalization},r.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},r.prototype.removeSvg=function(){if(_(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},r.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 ve(this),this.animatePointer=!0},r.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=2*parseInt(this.element.style.borderWidth.split("px").join(""),10),o=s(this.width,e)||e||600,n=s(this.height,t)||t||450;o=isNaN(i)?o:o-i,n=isNaN(i)?n:n-i,this.availableSize=new W(o,n)},r.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,d=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,l,u):new D(a+l/2-d,r+u/2-d,2*d,2*d),this.gaugeRect=e;var p=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,h=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new V(p,h),this.gaugeAxisLayoutPanel.measureAxis(e)},r.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},r.prototype.renderTitle=function(){if(this.title){this.titleStyle.fontFamily=this.themeStyle.fontFamily||this.titleStyle.fontFamily,this.titleStyle.size=this.themeStyle.fontSize||this.titleStyle.size;var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color||this.themeStyle.titleFontColor,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},r.prototype.renderBorder=function(){var e=this.border.width;(e>0||this.background||this.themeStyle.backgroundColor)&&this.svgObject.appendChild(this.renderer.drawRectangle(new N(this.element.id+"_CircularGaugeBorder",this.background||this.themeStyle.backgroundColor,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},r.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=(i=i<n.visibleRange.min?n.visibleRange.min:i)>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),this.isProtectedOnChange=!0,r.currentValue=i,r.value=i,this.isProtectedOnChange=!1},r.prototype.setAnnotationValue=function(e,i,o){var n=null!==M(this.element.id+"_Annotations_"+e),r=M(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(_(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||M(this.element.id+"_Secondary_Element").appendChild(r))},r.prototype.setRangeValue=function(e,t,i,o){var r,l=M(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],d=s.visibleRange,p="ClockWise"===s.direction,h=Math.min(Math.max(i,d.min),o),g=Math.min(Math.max(i,o),d.max),m=c(h,d.max,d.min,s.startAngle,s.endAngle,p),y=c(g,d.max,d.min,s.startAngle,s.endAngle,p);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,y=p?y:[m,m=y][0],v=p?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(m),Math.round(y),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},r.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},r.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,ce]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,ge]}),e},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.onPropertyChanged=function(e,i){for(var o=!1,n=!1,r=!1,a=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(),n=!0;break;case"title":n=""===e.title||""===i.title,o=!(""===e.title||""===i.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?n=!0:o=!0;break;case"border":case"background":o=!0;break;case"axes":r=!0}}a||(!n&&o&&(this.removeSvg(),this.renderElements()),n&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!r||o||n||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1)))},r.prototype.getModuleName=function(){return"circulargauge"},xe([t.Property(null)],r.prototype,"width",void 0),xe([t.Property(null)],r.prototype,"height",void 0),xe([t.Complex({color:"transparent",width:0},Y)],r.prototype,"border",void 0),xe([t.Property(null)],r.prototype,"background",void 0),xe([t.Property("")],r.prototype,"title",void 0),xe([t.Complex({size:"15px",color:null},Z)],r.prototype,"titleStyle",void 0),xe([t.Complex({},q)],r.prototype,"margin",void 0),xe([t.Collection([{}],se)],r.prototype,"axes",void 0),xe([t.Complex({},J)],r.prototype,"tooltip",void 0),xe([t.Property(!1)],r.prototype,"enablePointerDrag",void 0),xe([t.Property(null)],r.prototype,"centerX",void 0),xe([t.Property(null)],r.prototype,"centerY",void 0),xe([t.Property(!1)],r.prototype,"moveToCenter",void 0),xe([t.Property("Material")],r.prototype,"theme",void 0),xe([t.Property(!1)],r.prototype,"useGroupingSeparator",void 0),xe([t.Property(null)],r.prototype,"description",void 0),xe([t.Property(1)],r.prototype,"tabIndex",void 0),xe([t.Event()],r.prototype,"loaded",void 0),xe([t.Event()],r.prototype,"load",void 0),xe([t.Event()],r.prototype,"animationComplete",void 0),xe([t.Event()],r.prototype,"axisLabelRender",void 0),xe([t.Event()],r.prototype,"radiusCalculate",void 0),xe([t.Event()],r.prototype,"annotationRender",void 0),xe([t.Event()],r.prototype,"tooltipRender",void 0),xe([t.Event()],r.prototype,"dragStart",void 0),xe([t.Event()],r.prototype,"dragMove",void 0),xe([t.Event()],r.prototype,"dragEnd",void 0),xe([t.Event()],r.prototype,"gaugeMouseMove",void 0),xe([t.Event()],r.prototype,"gaugeMouseLeave",void 0),xe([t.Event()],r.prototype,"gaugeMouseDown",void 0),xe([t.Event()],r.prototype,"gaugeMouseUp",void 0),xe([t.Event()],r.prototype,"resized",void 0),r=xe([t.NotifyPropertyChanges],r)}(t.Component);e.CircularGauge=be,e.Annotations=ce,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=le,e.Axis=se,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=ge,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=d,e.calculateSum=p,e.linear=h,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=m,e.isCompleteAngle=y,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=C,e.getCompletePath=A,e.getElement=M,e.getTemplateFunction=S,e.removeElement=_,e.getPointer=E,e.getElementSize=T,e.getMousePosition=F,e.getLabelFormat=L,e.calculateShapes=k,e.getRangeColor=z,e.CustomizeOption=j,e.PathOption=B,e.RectOption=N,e.Size=W,e.GaugeLocation=V,e.Rect=D,e.TextOption=G,e.VisibleLabels=U,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new W(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),S(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,t,o,n,r){var a,l={},s=new i.SvgRenderer(""),u=r+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";";return l={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:u},a=s.createText(l,e.text),n.appendChild(a),a}function d(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function p(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function h(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=y(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function m(e,t,i,o,n,r){return n-=y(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function y(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new V(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=y(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):C(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=y(t,i)?1e-4:0),u=r-a,d=r-l,p=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,d,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,d,e),r,p,p,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,d,p){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+p+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+d+" "+u+" 0 "+p+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=y(t,i)?1e-4:0);return A(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function C(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function A(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function M(e){return document.getElementById(e)}function _(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e){var i=M(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,i,o){var n,r,a=_(e),l=a?a({},null,null,i.element.id+"Template"):[];if(a&&l.length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a({},null,null,i.element.id+"Template"),u=s.length;u>0;)r.appendChild(s[0]),u--;o.appendChild(r),n=new W(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function F(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new V(e-s,t-u)}function L(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,d=e.y,p=e.x+-l/2,h=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:d});break;case"Diamond":a="M "+p+" "+d+" L "+u+" "+(d+-s/2)+" L "+(u+l/2)+" "+d+" L "+u+" "+(d+s/2)+" L "+p+" "+d+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+p+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+s/2)+" L "+p+" "+(d+s/2)+" L "+p+" "+(d+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+d+" L "+(u-s)+" "+(d-l/2)+"L "+(u-s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+d+" L "+(u+s)+" "+(d-l/2)+"L "+(u+s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:p,y:h})}return r}function k(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var O,I=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),B=function(){return function(e){this.id=e}}(),j=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var d=e.call(this,t)||this;return d.opacity=r,d.fill=i,d.stroke=n,d["stroke-width"]=o,d["stroke-dasharray"]=a,d.d=l,d.transform=s,d.style=u,d}return I(t,e),t}(B),N=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return I(t,e),t}(B),W=function(){return function(e,t){this.width=e,this.height=t}}(),V=function(){return function(e,t){this.x=e,this.y=t}}(),D=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),G=function(e){function t(t,i,o,n,r,a,l){void 0===a&&(a="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=o,s.anchor=n,s.text=r,s.transform=a,s.baseLine=l,s}return I(t,e),t}(B),U=function(){return function(e,t,i){this.text=e,this.value=t,this.size=i}}(),H=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property(null)],i.prototype,"fill",void 0),X([t.Complex({size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);(O||(O={})).axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"};var K=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(O.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(0)],i.prototype,"start",void 0),Q([t.Property(0)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:null,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:null,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([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 K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),se=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(!1)],i.prototype,"showLastLabel",void 0),Q([t.Property(null)],i.prototype,"roundingPlaces",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],le)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Property(null)],i.prototype,"rangeGap",void 0),Q([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue="animationComplete",de="axisLabelRender",pe="tooltipRender",he="gaugeMouseLeave",ce="dragStart",ge="dragMove",me=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=this.gauge.availableSize.width,r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=M(this.elementId+"_Secondary_Element");if(document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount){a.appendChild(r);for(var l=0;l<this.gauge.axes[i].annotations.length;l++)t.updateBlazorTemplate(this.gauge.element.id+"_Axis"+i+"_ContentTemplate"+l,"ContentTemplate",this.gauge.axes[i].annotations[l])}},e.prototype.createTemplate=function(e,i,o){var n=this,a=this.gauge.axes[o],l=a.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+l.zIndex+";transform:"+(l.autoAngle?"rotate("+(l.angle-90)+"deg)":"rotate(0deg)")+";"}),u={cancel:!1,name:"annotationRender",content:l.content,axis:a,annotation:l,textStyle:l.textStyle};this.gauge.trigger("annotationRender",u,function(d){var p,h;if(!u.cancel){if((p=_(u.content))&&(window.Blazor||p(a,null,null,n.gauge.element.id+"_Axis"+o+"_ContentTemplate"+i).length))for(var c=(h=Array.prototype.slice.call(p(window.Blazor?{}:a,null,null,n.gauge.element.id+"_Axis"+o+"_ContentTemplate"+i))).length,g=0;g<c;g++)s.appendChild(h[g]);else s.appendChild(t.createElement("div",{innerHTML:u.content,styles:r(u.textStyle)}));n.updateLocation(s,a,l),e.appendChild(s)}})},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),ye=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=this,u=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(u=this.pointerEle===r);var d=this.gauge.svgObject.getBoundingClientRect(),p=this.gauge.element.getBoundingClientRect(),h=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),g=new D(Math.abs(p.left-d.left),Math.abs(p.top-d.top),d.width,d.height),m=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[m.axisIndex],this.currentPointer=this.currentAxis.pointers[m.pointerIndex];var y=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,v=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,x=v&&null!==v.match("{value}"),b=this.gauge.intl.getNumberFormat({format:L(v),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var P=void 0;P=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var R=x?v.replace(new RegExp("{value}","g"),b(P)):b(P);(l=f(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?l.x+10:l.x;var w={name:pe,cancel:!1,content:R,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge,appendInBodyTag:!1};this.gauge.trigger(pe,w,function(e){var r=w.tooltip.template;if(null!==r&&1===r.length&&(r=r[r[0]]),s.tooltip.showAtMousePosition)w.location=F(o,n,s.gauge.svgObject),s.tooltipRect=g;else if(r){var a=T(r,s.gauge,s.tooltipEle);s.tooltipRect=Math.abs(h.left-d.left)>a.width?s.findPosition(g,y,R,w.location):g}else s.findPosition(g,y,R,w.location);if(!w.cancel&&!u&&(w.tooltip.textStyle.color=w.tooltip.textStyle.color||s.gauge.themeStyle.tooltipFontColor,w.tooltip.textStyle.fontFamily=s.gauge.themeStyle.fontFamily||w.tooltip.textStyle.fontFamily,w.tooltip.textStyle.opacity=s.gauge.themeStyle.tooltipTextOpacity||w.tooltip.textStyle.opacity,s.svgTooltip=new i.Tooltip({enable:!0,data:{value:w.content},template:r,enableAnimation:w.tooltip.enableAnimation,content:[w.content],location:w.location,inverted:s.arrowInverted,areaBounds:s.tooltipRect,fill:w.tooltip.fill||s.gauge.themeStyle.tooltipFillColor,textStyle:w.tooltip.textStyle,availableSize:s.gauge.availableSize,border:w.tooltip.border}),s.svgTooltip.opacity=s.gauge.themeStyle.tooltipFillOpacity||s.svgTooltip.opacity,s.svgTooltip.appendTo(s.tooltipEle),s.gauge.tooltip.template&&t.updateBlazorTemplate(s.gauge.element.id+"Template","Template"),r&&Math.abs(n-s.tooltipEle.getBoundingClientRect().top)<=0&&(s.tooltipEle.style.top=parseFloat(s.tooltipEle.style.top)+20+"px"),w.appendInBodyTag)){var l=document.getElementsByClassName("EJ2-CircularGauge-Tooltip e-control e-tooltip");t.isNullOrUndefined(l)||s.removeTooltip(),document.body.appendChild(s.tooltipEle),s.tooltipEle.style.zIndex="100000000001";var p=s.tooltipEle.getBoundingClientRect();o+p.width<=window.innerWidth&&p.x<=0?(s.tooltipEle.style.left=o+20+"px",s.tooltipEle.style.top=p.top+20+"px"):p.x<=0&&o+p.width>=window.innerWidth&&(s.tooltipEle.style.left=o-p.width+20+"px",s.tooltipEle.style.top=p.top+20+"px")}})}else this.removeTooltip(),this.gauge.tooltip.template&&t.resetBlazorTemplate(this.gauge.element.id+"Template","Template")},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0){var e=document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0];e&&t.remove(e),this.pointerEle=null}},e.prototype.mouseUpHandler=function(e){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))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),ve=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&d(new j(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle,a=e.lineStyle.color||this.gauge.themeStyle.lineColor;e.lineStyle.width>0&&(n=y(n,r)?[0,r=360][0]:n,d(new j(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,a,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),d=e.visibleRange.min,p=e.visibleRange.max,h=e.visibleLabels,g=e.labelStyle,m=e.currentRadius,y=g.font.color||this.gauge.themeStyle.labelColor;"Outside"===g.position?m+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:m-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var v=0,x=h.length;v<x;v++)0===v&&"First"===g.hiddenLabel||v===x-1&&"Last"===g.hiddenLabel||(l=h[v],n=f(a=Math.round(c(l.value,p,d,e.startAngle,e.endAngle,"ClockWise"===e.direction)),m,o.midPoint),r=this.findAnchor(n,g,a,l),g.font.fontFamily=this.gauge.themeStyle.labelFontFamily||g.font.fontFamily,u(new G(o.element.id+"_Axis_"+t+"_Label_"+v,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?k(l.value,e.ranges,y):y,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor,s=r.color||this.gauge.themeStyle.minorTickColor;if(r.width&&r.height&&a){for(var u=e.visibleRange.min,p=e.visibleRange.max;u<=p;u+=a)this.majorValues.indexOf(+u.toFixed(3))<0&&d(new j(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+u,"transparent",r.width,l?k(u,e.ranges,s):s,null,"0",this.calculateTicks(u,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;this.majorValues=[];var l=r.color||this.gauge.themeStyle.majorTickColor;if(r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,u=e.visibleRange.max,p=e.visibleRange.interval;s<=u;s+=p)this.majorValues.push(+s.toFixed(3)),d(new j(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?k(s,e.ranges,l):l,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,p,h,g,m,y,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,C=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,w),i.end),s=Math.min(Math.max(i.start,i.end),C),r=c(l,C,w,e.startAngle,e.endAngle,R),a=c(s,C,w,e.startAngle,e.endAngle,R);var M=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(M?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,p=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],p=R?p:[u,u=p][0];var _=i.roundedCornerRadius,S=.25*_;m=((i.currentRadius-u/2)*(r*Math.PI/180)-_/S)/(i.currentRadius-u/2)*180/Math.PI,y=((i.currentRadius-p/2)*(a*Math.PI/180)+_/S)/(i.currentRadius-p/2)*180/Math.PI,h=(i.currentRadius*(r*Math.PI/180)+_)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-_)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?d(new j(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(h),Math.ceil(g),m,y,i.currentRadius,u,p),"","pointer-events:none;"),f,o):d(new j(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,p),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),fe=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,s){e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+s}),r["draw"+i.type+"Pointer"](e,t,s,a,o),r.setPointerValue(e,i,i.currentValue),l.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(l)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,p=e.pointers[i],h=n.midPoint,c=p.pointerWidth/2;a=f(0,p.currentRadius,h);var g=p.color||this.gauge.themeStyle.needleColor;l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+h.y+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new j(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,g,p.border.width,p.border.color,null,"0",l),o,n)),r=s(p.needleTail.length,p.currentRadius),u="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c),r&&(a=f(180,r,n.midPoint),l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new j(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,p.needleTail.color||this.gauge.themeStyle.needleTailColor,p.needleTail.border.width,p.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(h.y+c)+" L "+a.x+" "+(h.y-c));var m=p.cap.color||this.gauge.themeStyle.capColor;p.cap.radius&&p.pathElement.push(d(z(h,"Circle",new W(2*p.cap.radius,2*p.cap.radius),"",new j(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,m,p.cap.border.width,p.cap.border.color,null,"0","","")),o,n,"Ellipse")),p.pathElement.push(d(new j(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,i,o){var n=this.gauge.midPoint,r="ClockWise"===e.direction,a=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r),l=c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r);l=r?a===l?l+1:l:a===l?[a,a=l-1][0]:[a,a=l][0];var s,u,d,p,h=i.roundedCornerRadius,g=.25*h;o<=g&&(h=8,g=.25*(h/=2)),d=((i.currentRadius-i.pointerWidth/2)*(a*Math.PI/180)-h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,p=((i.currentRadius-i.pointerWidth/2)*(l*Math.PI/180)+h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,s=(i.currentRadius*(a*Math.PI/180)+h)/i.currentRadius*180/Math.PI,u=(i.currentRadius*(l*Math.PI/180)-h)/i.currentRadius*180/Math.PI,t.isNullOrUndefined(i.currentRadius)&&this.calculatePointerRadius(e,i),i.pathElement.map(function(t){"RangeBar"===i.type?i.roundedCornerRadius&&o?(t.setAttribute("d",P(n,Math.floor(s),Math.ceil(u),d,p,i.currentRadius,i.pointerWidth,i.pointerWidth)),h=0):t.setAttribute("d",w(n,a,l,i.currentRadius,i.currentRadius-i.pointerWidth)):t.setAttribute("transform","rotate("+c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r)+","+n.x+","+n.y+")"),t.setAttribute("aria-label",i.description||"Pointer:"+o.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(d(z(a,r.markerShape,new W(r.markerWidth,r.markerHeight),r.imageUrl,new j(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(d(new j(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,d="ClockWise"===n.direction,p=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),m=p>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(p)===Math.round(m)?d?m-p:m-p-360:d?m-p-360:m-p,e.style.animation="None",e.setAttribute("transform","rotate("+h(t.timeStamp,p,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger(ue,{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u,d,p=this,g="ClockWise"===n.direction,m=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),y=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),v=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),f=r.roundedCornerRadius,x=.25*a;f&&(y=(r.currentRadius*(y*Math.PI/180)+f)/r.currentRadius*180/Math.PI,v=(r.currentRadius*(v*Math.PI/180)-f)/r.currentRadius*180/Math.PI,d=((r.currentRadius-r.pointerWidth/2)*(m*Math.PI/180)-a/x)/(r.currentRadius-r.pointerWidth/2)*180/Math.PI),u=m>v?v+360:v,new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(m)===Math.round(u)?g?u-m:u-m-360:g?u-m-360:u-m,g?f?e.setAttribute("d",P(p.gauge.midPoint,Math.floor(y),h(t.timeStamp,Math.floor(y),s,t.duration)+1e-4,d,h(t.timeStamp,Math.floor(y+f/2),s,t.duration)+1e-4,a,r.pointerWidth,r.pointerWidth)):e.setAttribute("d",w(p.gauge.midPoint,y,h(t.timeStamp,m,s,t.duration)+1e-4,a,l)):f?(s+=f,e.setAttribute("d",P(p.gauge.midPoint,h(t.timeStamp,Math.floor(d),s,t.duration),Math.floor(d)+1e-4,h(t.timeStamp,Math.floor(y-f-f/2),s,t.duration),Math.floor(d+f/2)+1e-4,a,r.pointerWidth,r.pointerWidth))):e.setAttribute("d",w(p.gauge.midPoint,h(t.timeStamp,m,s,t.duration),y+1e-4,a,l))},end:function(e){p.setPointerValue(n,r,o),p.gauge.trigger(ue,p.gauge.isBlazor?{}:{axis:n,pointer:r})}})},e}(),xe=function(){function e(e){this.gauge=e,this.axisRenderer=new ve(e),this.pointerRenderer=new fe(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=this,n=0,r=this.gauge.margin.left+this.gauge.margin.right,a=this.gauge.margin.top+this.gauge.margin.bottom,l=function(l){if(e=Math.min(l.rect.width,l.rect.height)/2,i=null!=l.radius?s(l.radius,e):e,n=Math.max.apply(Math,l.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=n>100&&null==l.radius?100*i/n:i,l.currentRadius=i-l.nearSize,u.gauge.moveToCenter&&1===u.gauge.axes.length&&t.isNullOrUndefined(u.gauge.centerX)&&t.isNullOrUndefined(u.gauge.centerY)){var d=void 0,p=void 0,h=f((d=y(d=l.startAngle,l.endAngle)?[0,p=360][0]:d)-90,i,u.gauge.midPoint);p=l.endAngle;var c=f((p-=y(d,p)?1e-4:0)-90,i,u.gauge.midPoint),g=void 0,m=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;d>p&&!(Math.abs(d-p)>90)||(d>=270&&d<=360&&(p>270&&p<=360||p>=0&&p<=180)?(v=Math.abs(u.gauge.gaugeRect.x-Math.abs(h.x-u.gauge.gaugeRect.x)),R=p<=360&&p>=270?u.gauge.midPoint:p<=90?c:f(0,i,u.gauge.midPoint),x=Math.abs(R.x-u.gauge.gaugeRect.width),h=p<=360&&p>=270?c:f(270,i,u.gauge.midPoint),b=Math.abs(h.y-u.gauge.gaugeRect.y),c=p<=360&&p>=270||p>=0&&p<90?u.gauge.midPoint:p>=90&&p<=180?c:f(90,i,u.gauge.midPoint),P=Math.abs(c.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height))):d>=0&&d<90&&p>=0&&p<=270?(b=Math.abs(h.y-u.gauge.gaugeRect.y),R=p>=180?f(90,i,u.gauge.midPoint):c,P=Math.abs(R.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height)),h=p>=180?c:u.gauge.midPoint,v=Math.abs(u.gauge.gaugeRect.x-Math.abs(h.x-u.gauge.gaugeRect.x)),c=p>=90?f(0,i,u.gauge.midPoint):c,x=Math.abs(c.x-u.gauge.gaugeRect.width)):d>=90&&d<180&&p>90&&p<=360?(R=p<=180?u.gauge.midPoint:p>=270?f(180,i,u.gauge.midPoint):c,v=Math.abs(R.x-u.gauge.gaugeRect.x),x=Math.abs(h.x-u.gauge.gaugeRect.width),h=p>270?f(p-90,i,u.gauge.midPoint):u.gauge.midPoint,b=Math.abs(u.gauge.gaugeRect.y-h.y),c=p>=180?f(90,i,u.gauge.midPoint):c,P=Math.abs(c.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height))):d>=180&&d<=270&&(p<=360&&p>=270||p<=180&&p>=0)&&(R=p>180&&p<270?c:f(180,i,u.gauge.midPoint),v=Math.abs(u.gauge.gaugeRect.x-Math.abs(R.x-u.gauge.gaugeRect.x)),R=p>=180&&p<=360?u.gauge.midPoint:c,x=Math.abs(R.x-u.gauge.gaugeRect.width),R=p>180&&p<270?u.gauge.midPoint:p>=270&&p<=360?c:f(270,i,u.gauge.midPoint),b=Math.abs(R.y-u.gauge.gaugeRect.y),P=Math.abs(h.y-(u.gauge.gaugeRect.y+u.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>0||x>0)||!(b>0||P>0)||(g=Math.abs(v+x-r),m=Math.abs(b+P-a),u.gauge.midPoint.x=u.gauge.midPoint.x-v/2+x/2,u.gauge.midPoint.y=u.gauge.midPoint.y-b/2+P/2,e=Math.min(u.gauge.gaugeRect.width,u.gauge.gaugeRect.height)/2+Math.min(g,m)/2,l.currentRadius=(null!=l.radius?s(l.radius,e):e)-l.nearSize))}l.visibleRange.interval=u.calculateNumericInterval(l,l.rect);var w;w={cancel:!1,name:"radiusCalculate",currentRadius:l.currentRadius,gauge:u.gauge,midPoint:u.gauge.midPoint,axis:l},u.gauge.trigger("radiusCalculate",w,function(e){l.currentRadius=w.currentRadius,o.gauge.midPoint=w.midPoint}),u.calculateVisibleLabels(l)},u=this,d=0,p=this.gauge.axes;d<p.length;d++){l(p[d])}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=p(n,o.farSizes.length,o.farSizes),e.rect=new D(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 o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,d=[10,5,2,1];u<d.length;u++){var p=s*d[u];if(a<n/p)break;l=p}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:L(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=function(a,s,u){r=e.roundingPlaces?parseFloat(a.toFixed(e.roundingPlaces)):a,t={cancel:!1,name:de,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},l.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new U(t.text,a))})},l=this,s=e.visibleRange.min,u=e.visibleRange.interval,d=e.visibleRange.max;s<=d&&u;s+=u)a(s);var p=e.visibleLabels.length?e.visibleLabels[e.visibleLabels.length-1].value:null,h=e.visibleRange.max;p!==h&&!0===e.showLastLabel&&(t={cancel:!1,name:de,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(h)):n(h),value:h},this.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new U(t.text,h))})),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,d=0;this.farSizes=[],this.calculateAxisValues(t);for(var p=0,h=e;p<h.length;p++){var c=h[p];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,d=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+d:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+d)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new W(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),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}(),be=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Pe=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Re=function(e){function r(t,i){return e.call(this,t,i)||this}return be(r,e),r.prototype.preRender=function(){this.isBlazor=window.Blazor,this.unWireEvents(),this.trigger("load",{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},r.prototype.render=function(){this.setTheme(),this.calculateBounds(),this.renderElements()},r.prototype.setTheme=function(){this.themeStyle=function(e){var t;switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:"#333232",titleFontColor:"#ffffff",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#000000",labelColor:"#DADADA",lineColor:"#C8C8C8",majorTickColor:"#C8C8C8",minorTickColor:"#9A9A9A",pointerColor:"#9A9A9A",capColor:"#9A9A9A",needleColor:"#9A9A9A",needleTailColor:"#9A9A9A"};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",tooltipFillColor:"#ffffff",tooltipFontColor:"#000000",labelColor:"#FFFFFF",lineColor:"#FFFFFF",majorTickColor:"#FFFFFF",minorTickColor:"#FFFFFF",pointerColor:"#FFFFFF",capColor:"#FFFFFF",needleColor:"#FFFFFF",needleTailColor:"#FFFFFF"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",labelColor:"#212529",lineColor:"#DEE2E6",majorTickColor:"#ADB5BD",minorTickColor:"#CED4DA",pointerColor:"#6C757D",capColor:"#6C757D",needleColor:"#6C757D",needleTailColor:"#6C757D",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",labelFontFamily:"HelveticaNeue",tooltipFillOpacity:1,tooltipTextOpacity:.9};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",labelColor:"#212121",lineColor:"#E0E0E0",majorTickColor:"#9E9E9E",minorTickColor:"#9E9E9E",pointerColor:"#757575",capColor:"#757575",needleColor:"#757575",needleTailColor:"#757575"}}return t}(this.theme)},r.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,"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.gaugeResize)},r.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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},r.prototype.mouseMove=function(e){var i=this,o=this.getMouseArgs(e,"touchmove","gaugeMouseMove");return this.trigger("gaugeMouseMove",o,function(e){var t,n;i.tooltipModule;o.cancel||i.enablePointerDrag&&i.activePointer&&(t={axis:i.activeAxis,pointer:i.activePointer,previousValue:i.activePointer.currentValue,name:ge,currentValue:null},n={previousValue:i.activePointer.currentValue,name:ge,currentValue:null,pointerIndex:parseInt(i.activePointer.pathElement[0].id.slice(-1),10)},i.pointerDrag(new V(o.x,o.y)),t.currentValue=n.currentValue=i.activePointer.currentValue,i.trigger(ge,i.isBlazor?n:t))}),this.notify(t.Browser.touchMoveEvent,e),!1},r.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove",he);return this.trigger(he,t),!1},r.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},r.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=m(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},r.prototype.gaugeOnMouseDown=function(e){var i,o=this,n=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",n,function(r){!n.cancel&&n.target.id.indexOf("_Pointer_")>=0&&n.target.id.indexOf(o.element.id+"_Axis_")>=0&&(i=E(n.target.id,o),o.activeAxis=o.axes[i.axisIndex],o.activePointer=o.activeAxis.pointers[i.pointerIndex],t.isNullOrUndefined(o.activePointer.pathElement)&&(o.activePointer.pathElement=[e.target]),o.trigger(ce,o.isBlazor?{name:ce,currentValue:o.activePointer.currentValue,pointerIndex:parseInt(o.activePointer.pathElement[0].id.slice(-1),10)}:{axis:o.activeAxis,name:ce,pointer:o.activePointer,currentValue:o.activePointer.currentValue}),o.svgObject.setAttribute("cursor","pointer"))}),!1},r.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp"),o={cancel:i.cancel,target:i.target,name:i.name,x:i.x,y:i.y};"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",this.isBlazor?o:i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",this.isBlazor?{name:"dragEnd",currentValue:this.activePointer.currentValue,pointerIndex:parseInt(this.activePointer.pathElement[0].id.slice(-1),10)}:{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},r.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new V(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},r.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new W(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new W(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",t.isBlazor?{}:i)},500)),!1},r.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},r.prototype.setCulture=function(){this.intl=new t.Internationalization},r.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},r.prototype.removeSvg=function(){for(var e=0;e<this.axes.length;e++)for(var i=0;i<this.axes[e].annotations.length;i++)t.resetBlazorTemplate(this.element.id+"_Axis"+e+"_ContentTemplate"+i,"_ContentTemplate");if(S(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},r.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 xe(this),this.animatePointer=!0},r.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=2*parseInt(this.element.style.borderWidth.split("px").join(""),10),o=s(this.width,e)||e||600,n=s(this.height,t)||t||450;o=isNaN(i)?o:o-i,n=isNaN(i)?n:n-i,this.availableSize=new W(o,n)},r.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,d=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,l,u):new D(a+l/2-d,r+u/2-d,2*d,2*d),this.gaugeRect=e;var p=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,h=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new V(p,h),this.gaugeAxisLayoutPanel.measureAxis(e)},r.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",this.isBlazor?{}:{gauge:this})},r.prototype.renderTitle=function(){if(this.title){this.titleStyle.fontFamily=this.themeStyle.fontFamily||this.titleStyle.fontFamily,this.titleStyle.size=this.themeStyle.fontSize||this.titleStyle.size;var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color||this.themeStyle.titleFontColor,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},r.prototype.renderBorder=function(){var e=this.border.width;(e>0||this.background||this.themeStyle.backgroundColor)&&this.svgObject.appendChild(this.renderer.drawRectangle(new N(this.element.id+"_CircularGaugeBorder",this.background||this.themeStyle.backgroundColor,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},r.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=(i=i<n.visibleRange.min?n.visibleRange.min:i)>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),this.isProtectedOnChange=!0,r.currentValue=i,r.value=i,this.isProtectedOnChange=!1},r.prototype.setAnnotationValue=function(e,i,o){var n=null!==M(this.element.id+"_Annotations_"+e),r=M(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(S(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||M(this.element.id+"_Secondary_Element").appendChild(r))},r.prototype.setRangeValue=function(e,t,i,o){var r,l=M(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],d=s.visibleRange,p="ClockWise"===s.direction,h=Math.min(Math.max(i,d.min),o),g=Math.min(Math.max(i,o),d.max),m=c(h,d.max,d.min,s.startAngle,s.endAngle,p),y=c(g,d.max,d.min,s.startAngle,s.endAngle,p);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,y=p?y:[m,m=y][0],v=p?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(m),Math.round(y),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},r.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},r.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,me]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,ye]}),e},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.onPropertyChanged=function(e,i){for(var o=!1,n=!1,r=!1,a=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(),n=!0;break;case"title":n=""===e.title||""===i.title,o=!(""===e.title||""===i.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?n=!0:o=!0;break;case"border":case"background":o=!0;break;case"axes":r=!0}}a||(!n&&o&&(this.removeSvg(),this.renderElements()),n&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!r||o||n||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1)))},r.prototype.getModuleName=function(){return"circulargauge"},Pe([t.Property(null)],r.prototype,"width",void 0),Pe([t.Property(null)],r.prototype,"height",void 0),Pe([t.Complex({color:"transparent",width:0},Y)],r.prototype,"border",void 0),Pe([t.Property(null)],r.prototype,"background",void 0),Pe([t.Property("")],r.prototype,"title",void 0),Pe([t.Complex({size:"15px",color:null},Z)],r.prototype,"titleStyle",void 0),Pe([t.Complex({},q)],r.prototype,"margin",void 0),Pe([t.Collection([{}],se)],r.prototype,"axes",void 0),Pe([t.Complex({},J)],r.prototype,"tooltip",void 0),Pe([t.Property(!1)],r.prototype,"enablePointerDrag",void 0),Pe([t.Property(null)],r.prototype,"centerX",void 0),Pe([t.Property(null)],r.prototype,"centerY",void 0),Pe([t.Property(!1)],r.prototype,"moveToCenter",void 0),Pe([t.Property("Material")],r.prototype,"theme",void 0),Pe([t.Property(!1)],r.prototype,"useGroupingSeparator",void 0),Pe([t.Property(null)],r.prototype,"description",void 0),Pe([t.Property(1)],r.prototype,"tabIndex",void 0),Pe([t.Event()],r.prototype,"loaded",void 0),Pe([t.Event()],r.prototype,"load",void 0),Pe([t.Event()],r.prototype,"animationComplete",void 0),Pe([t.Event()],r.prototype,"axisLabelRender",void 0),Pe([t.Event()],r.prototype,"radiusCalculate",void 0),Pe([t.Event()],r.prototype,"annotationRender",void 0),Pe([t.Event()],r.prototype,"tooltipRender",void 0),Pe([t.Event()],r.prototype,"dragStart",void 0),Pe([t.Event()],r.prototype,"dragMove",void 0),Pe([t.Event()],r.prototype,"dragEnd",void 0),Pe([t.Event()],r.prototype,"gaugeMouseMove",void 0),Pe([t.Event()],r.prototype,"gaugeMouseLeave",void 0),Pe([t.Event()],r.prototype,"gaugeMouseDown",void 0),Pe([t.Event()],r.prototype,"gaugeMouseUp",void 0),Pe([t.Event()],r.prototype,"resized",void 0),r=Pe([t.NotifyPropertyChanges],r)}(t.Component);e.CircularGauge=Re,e.Annotations=me,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=le,e.Axis=se,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=ye,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=d,e.calculateSum=p,e.linear=h,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=m,e.isCompleteAngle=y,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=C,e.getCompletePath=A,e.getElement=M,e.getTemplateFunction=_,e.removeElement=S,e.getPointer=E,e.getElementSize=T,e.getMousePosition=F,e.getLabelFormat=L,e.calculateShapes=z,e.getRangeColor=k,e.CustomizeOption=B,e.PathOption=j,e.RectOption=N,e.Size=W,e.GaugeLocation=V,e.Rect=D,e.TextOption=G,e.VisibleLabels=U,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-circulargauge.umd.min.js.map
/*!
* filename: ej2-circulargauge.min.js
* version : 17.2.28-beta
* version : 17.2.34
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

*/
this.ej=this.ej||{},this.ej.circulargauge=function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new V(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),_(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,t,o,n,r){var a,l={},s=new i.SvgRenderer(""),u=r+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";";return l={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:u},a=s.createText(l,e.text),n.appendChild(a),a}function d(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function p(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function h(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=y(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function m(e,t,i,o,n,r){return n-=y(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function y(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new D(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=y(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):C(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=y(t,i)?1e-4:0),u=r-a,d=r-l,p=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,d,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,d,e),r,p,p,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,d,p){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+p+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+d+" "+u+" 0 "+p+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=y(t,i)?1e-4:0);return A(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function C(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function A(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function M(e){return document.getElementById(e)}function S(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function _(e){var i=M(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,i,o){var n,r,a=S(e),l=a?a({},null,null,i.element.id+"Template"):[];if(a&&l.length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a({},null,null,i.element.id+"Template"),u=s.length;u>0;)r.appendChild(s[0]),u--;o.appendChild(r),n=new V(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function F(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new D(e-s,t-u)}function L(e){return e&&null!==e.match("{value}")?"":e}function k(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,d=e.y,p=e.x+-l/2,h=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:d});break;case"Diamond":a="M "+p+" "+d+" L "+u+" "+(d+-s/2)+" L "+(u+l/2)+" "+d+" L "+u+" "+(d+s/2)+" L "+p+" "+d+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+p+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+s/2)+" L "+p+" "+(d+s/2)+" L "+p+" "+(d+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+d+" L "+(u-s)+" "+(d-l/2)+"L "+(u-s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+d+" L "+(u+s)+" "+(d-l/2)+"L "+(u+s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:p,y:h})}return r}function z(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}function O(e){var t;switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:"#333232",titleFontColor:"#ffffff",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#000000",labelColor:"#DADADA",lineColor:"#C8C8C8",majorTickColor:"#C8C8C8",minorTickColor:"#9A9A9A",pointerColor:"#9A9A9A",capColor:"#9A9A9A",needleColor:"#9A9A9A",needleTailColor:"#9A9A9A"};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",tooltipFillColor:"#ffffff",tooltipFontColor:"#000000",labelColor:"#FFFFFF",lineColor:"#FFFFFF",majorTickColor:"#FFFFFF",minorTickColor:"#FFFFFF",pointerColor:"#FFFFFF",capColor:"#FFFFFF",needleColor:"#FFFFFF",needleTailColor:"#FFFFFF"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",labelColor:"#212529",lineColor:"#DEE2E6",majorTickColor:"#ADB5BD",minorTickColor:"#CED4DA",pointerColor:"#6C757D",capColor:"#6C757D",needleColor:"#6C757D",needleTailColor:"#6C757D",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",labelFontFamily:"HelveticaNeue",tooltipFillOpacity:1,tooltipTextOpacity:.9};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",labelColor:"#212121",lineColor:"#E0E0E0",majorTickColor:"#9E9E9E",minorTickColor:"#9E9E9E",pointerColor:"#757575",capColor:"#757575",needleColor:"#757575",needleTailColor:"#757575"}}return t}var I,j=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),B=function(){function e(e){this.id=e}return e}(),N=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var d=e.call(this,t)||this;return d.opacity=r,d.fill=i,d.stroke=n,d["stroke-width"]=o,d["stroke-dasharray"]=a,d.d=l,d.transform=s,d.style=u,d}return j(t,e),t}(B),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),V=function(){function e(e,t){this.width=e,this.height=t}return e}(),D=function(){function e(e,t){this.x=e,this.y=t}return e}(),G=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}(),U=function(e){function t(t,i,o,n,r,a,l){void 0===a&&(a="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=o,s.anchor=n,s.text=r,s.transform=a,s.baseLine=l,s}return j(t,e),t}(B),H=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}(),X=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Y=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property("")],i.prototype,"color",void 0),Y([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property("16px")],i.prototype,"size",void 0),Y([t.Property("")],i.prototype,"color",void 0),Y([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),Y([t.Property("Normal")],i.prototype,"fontWeight",void 0),Y([t.Property("Normal")],i.prototype,"fontStyle",void 0),Y([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property(10)],i.prototype,"left",void 0),Y([t.Property(10)],i.prototype,"right",void 0),Y([t.Property(10)],i.prototype,"top",void 0),Y([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),K=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property(!1)],i.prototype,"enable",void 0),Y([t.Property(null)],i.prototype,"fill",void 0),Y([t.Complex({size:"13px"},q)],i.prototype,"textStyle",void 0),Y([t.Property(null)],i.prototype,"format",void 0),Y([t.Property(null)],i.prototype,"template",void 0),Y([t.Property(!0)],i.prototype,"enableAnimation",void 0),Y([t.Complex({},Z)],i.prototype,"border",void 0),Y([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}(I||(I={}));var Q=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),$=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(2)],i.prototype,"width",void 0),$([t.Property("")],i.prototype,"dashArray",void 0),$([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Complex(I.axisLabelFont,q)],i.prototype,"font",void 0),$([t.Property("")],i.prototype,"format",void 0),$([t.Property("Inside")],i.prototype,"position",void 0),$([t.Property("None")],i.prototype,"hiddenLabel",void 0),$([t.Property(!1)],i.prototype,"autoAngle",void 0),$([t.Property(!1)],i.prototype,"useRangeColor",void 0),$([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(0)],i.prototype,"start",void 0),$([t.Property(0)],i.prototype,"end",void 0),$([t.Property(null)],i.prototype,"radius",void 0),$([t.Property(10)],i.prototype,"startWidth",void 0),$([t.Property(10)],i.prototype,"endWidth",void 0),$([t.Property(null)],i.prototype,"color",void 0),$([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),$([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(2)],i.prototype,"width",void 0),$([t.Property(null)],i.prototype,"height",void 0),$([t.Property(null)],i.prototype,"interval",void 0),$([t.Property(0)],i.prototype,"offset",void 0),$([t.Property(null)],i.prototype,"color",void 0),$([t.Property("Inside")],i.prototype,"position",void 0),$([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"color",void 0),$([t.Complex({color:null,width:8},Z)],i.prototype,"border",void 0),$([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"color",void 0),$([t.Complex({color:null,width:0},Z)],i.prototype,"border",void 0),$([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(!0)],i.prototype,"enable",void 0),$([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"content",void 0),$([t.Property(90)],i.prototype,"angle",void 0),$([t.Property("50%")],i.prototype,"radius",void 0),$([t.Property("-1")],i.prototype,"zIndex",void 0),$([t.Property(!1)],i.prototype,"autoAngle",void 0),$([t.Complex({size:"12px",color:"#686868"},q)],i.prototype,"textStyle",void 0),$([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"value",void 0),$([t.Property("Needle")],i.prototype,"type",void 0),$([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),$([t.Property(null)],i.prototype,"imageUrl",void 0),$([t.Property(null)],i.prototype,"radius",void 0),$([t.Property(20)],i.prototype,"pointerWidth",void 0),$([t.Complex({},ne)],i.prototype,"cap",void 0),$([t.Complex({},re)],i.prototype,"needleTail",void 0),$([t.Property(null)],i.prototype,"color",void 0),$([t.Complex({color:"#DDDDDD",width:0},Z)],i.prototype,"border",void 0),$([t.Complex(null,ae)],i.prototype,"animation",void 0),$([t.Property("Circle")],i.prototype,"markerShape",void 0),$([t.Property(5)],i.prototype,"markerHeight",void 0),$([t.Property(null)],i.prototype,"description",void 0),$([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),ue=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return Q(i,e),$([t.Property(null)],i.prototype,"minimum",void 0),$([t.Property(null)],i.prototype,"maximum",void 0),$([t.Property(!1)],i.prototype,"showLastLabel",void 0),$([t.Property(null)],i.prototype,"roundingPlaces",void 0),$([t.Property(null)],i.prototype,"radius",void 0),$([t.Complex({},ee)],i.prototype,"lineStyle",void 0),$([t.Collection([{}],ie)],i.prototype,"ranges",void 0),$([t.Collection([{}],se)],i.prototype,"pointers",void 0),$([t.Collection([{}],le)],i.prototype,"annotations",void 0),$([t.Complex({width:2,height:10},oe)],i.prototype,"majorTicks",void 0),$([t.Complex({width:2,height:5},oe)],i.prototype,"minorTicks",void 0),$([t.Property(200)],i.prototype,"startAngle",void 0),$([t.Property(160)],i.prototype,"endAngle",void 0),$([t.Property("ClockWise")],i.prototype,"direction",void 0),$([t.Property(null)],i.prototype,"background",void 0),$([t.Property(null)],i.prototype,"rangeGap",void 0),$([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),$([t.Complex({},te)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),de=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=this.gauge.availableSize.width,r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=M(this.elementId+"_Secondary_Element");document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount&&(a.appendChild(r),t.updateBlazorTemplate(r.id+"_ContentTemplate","ContentTemplate"))},e.prototype.createTemplate=function(e,i,o){var n=this,a=this.gauge.axes[o],l=a.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+l.zIndex+";transform:"+(l.autoAngle?"rotate("+(l.angle-90)+"deg)":"rotate(0deg)")+";"}),u={cancel:!1,name:"annotationRender",content:l.content,axis:a,annotation:l,textStyle:l.textStyle};this.gauge.trigger("annotationRender",u,function(i){var o,d;if(u.cancel)t.resetBlazorTemplate(e.id+"_ContentTemplate","_ContentTemplate");else{if((o=S(u.content))&&(window.Blazor?{}:o(a,null,null,e.id+"_ContentTemplate").length))for(var p=(d=Array.prototype.slice.call(o(window.Blazor?{}:a,null,null,e.id+"_ContentTemplate"))).length,h=0;h<p;h++)s.appendChild(d[h]);else s.appendChild(t.createElement("div",{innerHTML:u.content,styles:r(u.textStyle)}));n.updateLocation(s,a,l),e.appendChild(s)}})},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),pe=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=this,u=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(u=this.pointerEle===r);var d=this.gauge.svgObject.getBoundingClientRect(),p=this.gauge.element.getBoundingClientRect(),h=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),g=new G(Math.abs(p.left-d.left),Math.abs(p.top-d.top),d.width,d.height),m=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[m.axisIndex],this.currentPointer=this.currentAxis.pointers[m.pointerIndex];var y=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,v=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,x=v&&null!==v.match("{value}"),b=this.gauge.intl.getNumberFormat({format:L(v),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var P=void 0;P=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var R=x?v.replace(new RegExp("{value}","g"),b(P)):b(P);(l=f(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?l.x+10:l.x;var w={name:"tooltipRender",cancel:!1,content:R,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger("tooltipRender",w,function(e){var r=w.tooltip.template;if(null!==r&&1===r.length&&(r=r[r[0]]),s.tooltip.showAtMousePosition)w.location=F(o,n,s.gauge.svgObject),s.tooltipRect=g;else if(r){var a=T(r,s.gauge,s.tooltipEle);s.tooltipRect=Math.abs(h.left-d.left)>a.width?s.findPosition(g,y,R,w.location):g}else s.findPosition(g,y,R,w.location);w.cancel||u||(w.tooltip.textStyle.color=w.tooltip.textStyle.color||s.gauge.themeStyle.tooltipFontColor,w.tooltip.textStyle.fontFamily=s.gauge.themeStyle.fontFamily||w.tooltip.textStyle.fontFamily,w.tooltip.textStyle.opacity=s.gauge.themeStyle.tooltipTextOpacity||w.tooltip.textStyle.opacity,s.svgTooltip=new i.Tooltip({enable:!0,data:{value:w.content},template:r,enableAnimation:w.tooltip.enableAnimation,content:[w.content],location:w.location,inverted:s.arrowInverted,areaBounds:s.tooltipRect,fill:w.tooltip.fill||s.gauge.themeStyle.tooltipFillColor,textStyle:w.tooltip.textStyle,availableSize:s.gauge.availableSize,border:w.tooltip.border}),s.svgTooltip.opacity=s.gauge.themeStyle.tooltipFillOpacity||s.svgTooltip.opacity,s.svgTooltip.appendTo(s.tooltipEle),s.gauge.tooltip.template&&t.updateBlazorTemplate(s.gauge.element.id+"Template","Template"),r&&Math.abs(n-s.tooltipEle.getBoundingClientRect().top)<=0&&(s.tooltipEle.style.top=parseFloat(s.tooltipEle.style.top)+20+"px"))})}else this.removeTooltip(),this.gauge.tooltip.template&&t.resetBlazorTemplate(this.gauge.element.id+"Template","Template")},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new G(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new G(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new G(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new G(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new G(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new G(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new G(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new G(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0){var e=document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0];e&&t.remove(e),this.pointerEle=null}},e.prototype.mouseUpHandler=function(e){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))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),he=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&d(new N(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle,a=e.lineStyle.color||this.gauge.themeStyle.lineColor;e.lineStyle.width>0&&(n=y(n,r)?[0,r=360][0]:n,d(new N(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,a,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),d=e.visibleRange.min,p=e.visibleRange.max,h=e.visibleLabels,g=e.labelStyle,m=e.currentRadius,y=g.font.color||this.gauge.themeStyle.labelColor;"Outside"===g.position?m+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:m-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var v=0,x=h.length;v<x;v++)0===v&&"First"===g.hiddenLabel||v===x-1&&"Last"===g.hiddenLabel||(l=h[v],n=f(a=Math.round(c(l.value,p,d,e.startAngle,e.endAngle,"ClockWise"===e.direction)),m,o.midPoint),r=this.findAnchor(n,g,a,l),g.font.fontFamily=this.gauge.themeStyle.labelFontFamily||g.font.fontFamily,u(new U(o.element.id+"_Axis_"+t+"_Label_"+v,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?z(l.value,e.ranges,y):y,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor,s=r.color||this.gauge.themeStyle.minorTickColor;if(r.width&&r.height&&a){for(var u=e.visibleRange.min,p=e.visibleRange.max;u<=p;u+=a)this.majorValues.indexOf(+u.toFixed(3))<0&&d(new N(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+u,"transparent",r.width,l?z(u,e.ranges,s):s,null,"0",this.calculateTicks(u,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;this.majorValues=[];var l=r.color||this.gauge.themeStyle.majorTickColor;if(r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,u=e.visibleRange.max,p=e.visibleRange.interval;s<=u;s+=p)this.majorValues.push(+s.toFixed(3)),d(new N(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?z(s,e.ranges,l):l,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,p,h,g,m,y,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,C=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,w),i.end),s=Math.min(Math.max(i.start,i.end),C),r=c(l,C,w,e.startAngle,e.endAngle,R),a=c(s,C,w,e.startAngle,e.endAngle,R);var M=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(M?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,p=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],p=R?p:[u,u=p][0];var S=i.roundedCornerRadius,_=.25*S;m=((i.currentRadius-u/2)*(r*Math.PI/180)-S/_)/(i.currentRadius-u/2)*180/Math.PI,y=((i.currentRadius-p/2)*(a*Math.PI/180)+S/_)/(i.currentRadius-p/2)*180/Math.PI,h=(i.currentRadius*(r*Math.PI/180)+S)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-S)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?d(new N(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(h),Math.ceil(g),m,y,i.currentRadius,u,p),"","pointer-events:none;"),f,o):d(new N(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,p),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),ce=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,u){l=e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+u}),r["draw"+i.type+"Pointer"](e,t,u,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,p=e.pointers[i],h=n.midPoint,c=p.pointerWidth/2;a=f(0,p.currentRadius,h);var g=p.color||this.gauge.themeStyle.needleColor;l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+h.y+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,g,p.border.width,p.border.color,null,"0",l),o,n)),r=s(p.needleTail.length,p.currentRadius),u="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c),r&&(a=f(180,r,n.midPoint),l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,p.needleTail.color||this.gauge.themeStyle.needleTailColor,p.needleTail.border.width,p.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(h.y+c)+" L "+a.x+" "+(h.y-c));var m=p.cap.color||this.gauge.themeStyle.capColor;p.cap.radius&&p.pathElement.push(d(k(h,"Circle",new V(2*p.cap.radius,2*p.cap.radius),"",new N(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,m,p.cap.border.width,p.cap.border.color,null,"0","","")),o,n,"Ellipse")),p.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,i,o){var n=this.gauge.midPoint,r="ClockWise"===e.direction,a=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r),l=c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r);l=r?a===l?l+1:l:a===l?[a,a=l-1][0]:[a,a=l][0];var s,u,d,p,h=i.roundedCornerRadius,g=.25*h;o<=g&&(h=8,g=.25*(h/=2)),d=((i.currentRadius-i.pointerWidth/2)*(a*Math.PI/180)-h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,p=((i.currentRadius-i.pointerWidth/2)*(l*Math.PI/180)+h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,s=(i.currentRadius*(a*Math.PI/180)+h)/i.currentRadius*180/Math.PI,u=(i.currentRadius*(l*Math.PI/180)-h)/i.currentRadius*180/Math.PI,t.isNullOrUndefined(i.currentRadius)&&this.calculatePointerRadius(e,i),i.pathElement.map(function(t){"RangeBar"===i.type?i.roundedCornerRadius&&o?(t.setAttribute("d",P(n,Math.floor(s),Math.ceil(u),d,p,i.currentRadius,i.pointerWidth,i.pointerWidth)),h=0):t.setAttribute("d",w(n,a,l,i.currentRadius,i.currentRadius-i.pointerWidth)):t.setAttribute("transform","rotate("+c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r)+","+n.x+","+n.y+")"),t.setAttribute("aria-label",i.description||"Pointer:"+o.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(d(k(a,r.markerShape,new V(r.markerWidth,r.markerHeight),r.imageUrl,new N(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,d="ClockWise"===n.direction,p=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),m=p>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(p)===Math.round(m)?d?m-p:m-p-360:d?m-p-360:m-p,e.style.animation="None",e.setAttribute("transform","rotate("+h(t.timeStamp,p,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u,d,p=this,g="ClockWise"===n.direction,m=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),y=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),v=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),f=r.roundedCornerRadius,x=.25*a;f&&(o<=x&&(a=8,x=.25*(a/=2)),y=(r.currentRadius*(y*Math.PI/180)+f)/r.currentRadius*180/Math.PI,v=(r.currentRadius*(v*Math.PI/180)-f)/r.currentRadius*180/Math.PI,d=((r.currentRadius-r.pointerWidth/2)*(m*Math.PI/180)-a/x)/(r.currentRadius-r.pointerWidth/2)*180/Math.PI),u=m>v?v+360:v,new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(m)===Math.round(u)?g?u-m:u-m-360:g?u-m-360:u-m,g?f?e.setAttribute("d",P(p.gauge.midPoint,Math.floor(y),h(t.timeStamp,Math.floor(y),s,t.duration)+1e-4,d,h(t.timeStamp,Math.floor(y+f/2),s,t.duration)+1e-4,a,r.pointerWidth,r.pointerWidth)):e.setAttribute("d",w(p.gauge.midPoint,y,h(t.timeStamp,m,s,t.duration)+1e-4,a,l)):f?(s+=f,e.setAttribute("d",P(p.gauge.midPoint,h(t.timeStamp,Math.floor(d),s,t.duration),Math.floor(d)+1e-4,h(t.timeStamp,Math.floor(y-f-f/2),s,t.duration),Math.floor(d+f/2)+1e-4,a,r.pointerWidth,r.pointerWidth))):e.setAttribute("d",w(p.gauge.midPoint,h(t.timeStamp,m,s,t.duration),y+1e-4,a,l))},end:function(e){p.setPointerValue(n,r,o),p.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e}(),ge=function(){function e(e){this.gauge=e,this.axisRenderer=new he(e),this.pointerRenderer=new ce(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=this,n=0,r=this.gauge.margin.left+this.gauge.margin.right,a=this.gauge.margin.top+this.gauge.margin.bottom,l=this,u=0,d=this.gauge.axes;u<d.length;u++)!function(u){if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?s(u.radius,e):e,n=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=n>100&&null==u.radius?100*i/n:i,u.currentRadius=i-u.nearSize,l.gauge.moveToCenter&&1===l.gauge.axes.length&&t.isNullOrUndefined(l.gauge.centerX)&&t.isNullOrUndefined(l.gauge.centerY)){var d=void 0,p=void 0,h=f((d=y(d=u.startAngle,u.endAngle)?[0,p=360][0]:d)-90,i,l.gauge.midPoint);p=u.endAngle;var c=f((p-=y(d,p)?1e-4:0)-90,i,l.gauge.midPoint),g=void 0,m=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;d>p&&!(Math.abs(d-p)>90)||(d>=270&&d<=360&&(p>270&&p<=360||p>=0&&p<=180)?(v=Math.abs(l.gauge.gaugeRect.x-Math.abs(h.x-l.gauge.gaugeRect.x)),R=p<=360&&p>=270?l.gauge.midPoint:p<=90?c:f(0,i,l.gauge.midPoint),x=Math.abs(R.x-l.gauge.gaugeRect.width),h=p<=360&&p>=270?c:f(270,i,l.gauge.midPoint),b=Math.abs(h.y-l.gauge.gaugeRect.y),c=p<=360&&p>=270||p>=0&&p<90?l.gauge.midPoint:p>=90&&p<=180?c:f(90,i,l.gauge.midPoint),P=Math.abs(c.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))):d>=0&&d<90&&p>=0&&p<=270?(b=Math.abs(h.y-l.gauge.gaugeRect.y),R=p>=180?f(90,i,l.gauge.midPoint):c,P=Math.abs(R.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height)),h=p>=180?c:l.gauge.midPoint,v=Math.abs(l.gauge.gaugeRect.x-Math.abs(h.x-l.gauge.gaugeRect.x)),c=p>=90?f(0,i,l.gauge.midPoint):c,x=Math.abs(c.x-l.gauge.gaugeRect.width)):d>=90&&d<180&&p>90&&p<=360?(R=p<=180?l.gauge.midPoint:p>=270?f(180,i,l.gauge.midPoint):c,v=Math.abs(R.x-l.gauge.gaugeRect.x),x=Math.abs(h.x-l.gauge.gaugeRect.width),h=p>270?f(p-90,i,l.gauge.midPoint):l.gauge.midPoint,b=Math.abs(l.gauge.gaugeRect.y-h.y),c=p>=180?f(90,i,l.gauge.midPoint):c,P=Math.abs(c.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))):d>=180&&d<=270&&(p<=360&&p>=270||p<=180&&p>=0)&&(R=p>180&&p<270?c:f(180,i,l.gauge.midPoint),v=Math.abs(l.gauge.gaugeRect.x-Math.abs(R.x-l.gauge.gaugeRect.x)),R=p>=180&&p<=360?l.gauge.midPoint:c,x=Math.abs(R.x-l.gauge.gaugeRect.width),R=p>180&&p<270?l.gauge.midPoint:p>=270&&p<=360?c:f(270,i,l.gauge.midPoint),b=Math.abs(R.y-l.gauge.gaugeRect.y),P=Math.abs(h.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>0||x>0)||!(b>0||P>0)||(g=Math.abs(v+x-r),m=Math.abs(b+P-a),l.gauge.midPoint.x=l.gauge.midPoint.x-v/2+x/2,l.gauge.midPoint.y=l.gauge.midPoint.y-b/2+P/2,e=Math.min(l.gauge.gaugeRect.width,l.gauge.gaugeRect.height)/2+Math.min(g,m)/2,u.currentRadius=(null!=u.radius?s(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=l.calculateNumericInterval(u,u.rect);var w;w={cancel:!1,name:"radiusCalculate",currentRadius:u.currentRadius,gauge:l.gauge,midPoint:l.gauge.midPoint,axis:u},l.gauge.trigger("radiusCalculate",w,function(e){u.currentRadius=w.currentRadius,o.gauge.midPoint=w.midPoint}),l.calculateVisibleLabels(u)}(d[u])},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=p(n,o.farSizes.length-1,o.farSizes),e.rect=new G(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 o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,d=[10,5,2,1];u<d.length;u++){var p=s*d[u];if(a<n/p)break;l=p}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:L(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=this,l=e.visibleRange.min,s=e.visibleRange.interval,u=e.visibleRange.max;l<=u&&s;l+=s)!function(l,s,u){r=e.roundingPlaces?parseFloat(l.toFixed(e.roundingPlaces)):l,t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},a.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new H(t.text,l))})}(l);var d=e.visibleLabels.length?e.visibleLabels[e.visibleLabels.length-1].value:null,p=e.visibleRange.max;d!==p&&!0===e.showLastLabel&&(t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(p)):n(p),value:p},this.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new H(t.text,p))})),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,d=0;this.farSizes=[],this.calculateAxisValues(t);for(var p=0,h=e;p<h.length;p++){var c=h[p];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,d=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+d:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+d)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new V(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),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}(),me=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ye=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},ve=function(e){function r(t,i){return e.call(this,t,i)||this}return me(r,e),r.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},r.prototype.render=function(){this.setTheme(),this.calculateBounds(),this.renderElements()},r.prototype.setTheme=function(){this.themeStyle=O(this.theme)},r.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,"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.gaugeResize)},r.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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},r.prototype.mouseMove=function(e){var i=this,o=this.getMouseArgs(e,"touchmove","gaugeMouseMove");return this.trigger("gaugeMouseMove",o,function(e){var t;i.tooltipModule;o.cancel||i.enablePointerDrag&&i.activePointer&&(t={axis:i.activeAxis,pointer:i.activePointer,previousValue:i.activePointer.currentValue,name:"dragMove",currentValue:null},i.pointerDrag(new D(o.x,o.y)),t.currentValue=i.activePointer.currentValue,i.trigger("dragMove",t))}),this.notify(t.Browser.touchMoveEvent,e),!1},r.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove","gaugeMouseLeave");return this.trigger("gaugeMouseLeave",t),!1},r.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},r.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=m(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},r.prototype.gaugeOnMouseDown=function(e){var i,o=this,n=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",n,function(r){!n.cancel&&n.target.id.indexOf("_Pointer_")>=0&&n.target.id.indexOf(o.element.id+"_Axis_")>=0&&(i=E(n.target.id,o),o.activeAxis=o.axes[i.axisIndex],o.activePointer=o.activeAxis.pointers[i.pointerIndex],t.isNullOrUndefined(o.activePointer.pathElement)&&(o.activePointer.pathElement=[e.target]),o.trigger("dragStart",{axis:o.activeAxis,name:"dragStart",pointer:o.activePointer,currentValue:o.activePointer.currentValue}),o.svgObject.setAttribute("cursor","pointer"))}),!1},r.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},r.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new D(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},r.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new V(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new V(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},r.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},r.prototype.setCulture=function(){this.intl=new t.Internationalization},r.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},r.prototype.removeSvg=function(){if(_(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},r.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 ge(this),this.animatePointer=!0},r.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=2*parseInt(this.element.style.borderWidth.split("px").join(""),10),o=s(this.width,e)||e||600,n=s(this.height,t)||t||450;o=isNaN(i)?o:o-i,n=isNaN(i)?n:n-i,this.availableSize=new V(o,n)},r.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,d=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new G(a,r,l,u):new G(a+l/2-d,r+u/2-d,2*d,2*d),this.gaugeRect=e;var p=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,h=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new D(p,h),this.gaugeAxisLayoutPanel.measureAxis(e)},r.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},r.prototype.renderTitle=function(){if(this.title){this.titleStyle.fontFamily=this.themeStyle.fontFamily||this.titleStyle.fontFamily,this.titleStyle.size=this.themeStyle.fontSize||this.titleStyle.size;var e=o(this.title,this.titleStyle),t=u(new U(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color||this.themeStyle.titleFontColor,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},r.prototype.renderBorder=function(){var e=this.border.width;(e>0||this.background||this.themeStyle.backgroundColor)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background||this.themeStyle.backgroundColor,this.border,null,new G(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},r.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=i<n.visibleRange.min?n.visibleRange.min:i,i=i>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),this.isProtectedOnChange=!0,r.currentValue=i,r.value=i,this.isProtectedOnChange=!1},r.prototype.setAnnotationValue=function(e,i,o){var n=null!==M(this.element.id+"_Annotations_"+e),r=M(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(_(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||M(this.element.id+"_Secondary_Element").appendChild(r))},r.prototype.setRangeValue=function(e,t,i,o){var r,l=M(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],d=s.visibleRange,p="ClockWise"===s.direction,h=Math.min(Math.max(i,d.min),o),g=Math.min(Math.max(i,o),d.max),m=c(h,d.max,d.min,s.startAngle,s.endAngle,p),y=c(g,d.max,d.min,s.startAngle,s.endAngle,p);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,y=p?y:[m,m=y][0],v=p?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(m),Math.round(y),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},r.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},r.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,de]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,pe]}),e},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.onPropertyChanged=function(e,i){for(var o=!1,n=!1,r=!1,a=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(),n=!0;break;case"title":n=""===e.title||""===i.title,o=!(""===e.title||""===i.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?n=!0:o=!0;break;case"border":case"background":o=!0;break;case"axes":r=!0}a||(!n&&o&&(this.removeSvg(),this.renderElements()),n&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!r||o||n||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1)))},r.prototype.getModuleName=function(){return"circulargauge"},ye([t.Property(null)],r.prototype,"width",void 0),ye([t.Property(null)],r.prototype,"height",void 0),ye([t.Complex({color:"transparent",width:0},Z)],r.prototype,"border",void 0),ye([t.Property(null)],r.prototype,"background",void 0),ye([t.Property("")],r.prototype,"title",void 0),ye([t.Complex({size:"15px",color:null},q)],r.prototype,"titleStyle",void 0),ye([t.Complex({},J)],r.prototype,"margin",void 0),ye([t.Collection([{}],ue)],r.prototype,"axes",void 0),ye([t.Complex({},K)],r.prototype,"tooltip",void 0),ye([t.Property(!1)],r.prototype,"enablePointerDrag",void 0),ye([t.Property(null)],r.prototype,"centerX",void 0),ye([t.Property(null)],r.prototype,"centerY",void 0),ye([t.Property(!1)],r.prototype,"moveToCenter",void 0),ye([t.Property("Material")],r.prototype,"theme",void 0),ye([t.Property(!1)],r.prototype,"useGroupingSeparator",void 0),ye([t.Property(null)],r.prototype,"description",void 0),ye([t.Property(1)],r.prototype,"tabIndex",void 0),ye([t.Event()],r.prototype,"loaded",void 0),ye([t.Event()],r.prototype,"load",void 0),ye([t.Event()],r.prototype,"animationComplete",void 0),ye([t.Event()],r.prototype,"axisLabelRender",void 0),ye([t.Event()],r.prototype,"radiusCalculate",void 0),ye([t.Event()],r.prototype,"annotationRender",void 0),ye([t.Event()],r.prototype,"tooltipRender",void 0),ye([t.Event()],r.prototype,"dragStart",void 0),ye([t.Event()],r.prototype,"dragMove",void 0),ye([t.Event()],r.prototype,"dragEnd",void 0),ye([t.Event()],r.prototype,"gaugeMouseMove",void 0),ye([t.Event()],r.prototype,"gaugeMouseLeave",void 0),ye([t.Event()],r.prototype,"gaugeMouseDown",void 0),ye([t.Event()],r.prototype,"gaugeMouseUp",void 0),ye([t.Event()],r.prototype,"resized",void 0),r=ye([t.NotifyPropertyChanges],r)}(t.Component);return ve.Inject(pe,de),e.CircularGauge=ve,e.Annotations=de,e.Line=ee,e.Label=te,e.Range=ie,e.Tick=oe,e.Cap=ne,e.NeedleTail=re,e.Animation=ae,e.Annotation=le,e.Pointer=se,e.Axis=ue,e.Border=Z,e.Font=q,e.Margin=J,e.TooltipSettings=K,e.GaugeTooltip=pe,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=d,e.calculateSum=p,e.linear=h,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=m,e.isCompleteAngle=y,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=C,e.getCompletePath=A,e.getElement=M,e.getTemplateFunction=S,e.removeElement=_,e.getPointer=E,e.getElementSize=T,e.getMousePosition=F,e.getLabelFormat=L,e.calculateShapes=k,e.getRangeColor=z,e.CustomizeOption=B,e.PathOption=N,e.RectOption=W,e.Size=V,e.GaugeLocation=D,e.Rect=G,e.TextOption=U,e.VisibleLabels=H,e}({},ej.base,ej.svgbase),this.ejs=ej;
this.ej=this.ej||{},this.ej.circulargauge=function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new V(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),_(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,t,o,n,r){var a,l={},s=new i.SvgRenderer(""),u=r+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";";return l={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:u},a=s.createText(l,e.text),n.appendChild(a),a}function d(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function p(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function h(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=y(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function m(e,t,i,o,n,r){return n-=y(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function y(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new D(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=y(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):C(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=y(t,i)?1e-4:0),u=r-a,d=r-l,p=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,d,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,d,e),r,p,p,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,d,p){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+p+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+d+" "+u+" 0 "+p+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=y(t,i)?1e-4:0);return A(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function C(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function A(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function M(e){return document.getElementById(e)}function S(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function _(e){var i=M(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e,i,o){var n,r,a=S(e),l=a?a({},null,null,i.element.id+"Template"):[];if(a&&l.length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a({},null,null,i.element.id+"Template"),u=s.length;u>0;)r.appendChild(s[0]),u--;o.appendChild(r),n=new V(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function F(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new D(e-s,t-u)}function L(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,d=e.y,p=e.x+-l/2,h=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:d});break;case"Diamond":a="M "+p+" "+d+" L "+u+" "+(d+-s/2)+" L "+(u+l/2)+" "+d+" L "+u+" "+(d+s/2)+" L "+p+" "+d+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+p+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+-s/2)+" L "+(u+l/2)+" "+(d+s/2)+" L "+p+" "+(d+s/2)+" L "+p+" "+(d+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+d+" L "+(u-s)+" "+(d-l/2)+"L "+(u-s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+d+" L "+(u+s)+" "+(d-l/2)+"L "+(u+s)+" "+(d+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:p,y:h})}return r}function k(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}function I(e){var t;switch(e.toLowerCase()){case"materialdark":case"fabricdark":case"bootstrapdark":t={backgroundColor:"#333232",titleFontColor:"#ffffff",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#000000",labelColor:"#DADADA",lineColor:"#C8C8C8",majorTickColor:"#C8C8C8",minorTickColor:"#9A9A9A",pointerColor:"#9A9A9A",capColor:"#9A9A9A",needleColor:"#9A9A9A",needleTailColor:"#9A9A9A"};break;case"highcontrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",tooltipFillColor:"#ffffff",tooltipFontColor:"#000000",labelColor:"#FFFFFF",lineColor:"#FFFFFF",majorTickColor:"#FFFFFF",minorTickColor:"#FFFFFF",pointerColor:"#FFFFFF",capColor:"#FFFFFF",needleColor:"#FFFFFF",needleTailColor:"#FFFFFF"};break;case"bootstrap4":t={backgroundColor:"#FFFFFF",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",labelColor:"#212529",lineColor:"#DEE2E6",majorTickColor:"#ADB5BD",minorTickColor:"#CED4DA",pointerColor:"#6C757D",capColor:"#6C757D",needleColor:"#6C757D",needleTailColor:"#6C757D",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",labelFontFamily:"HelveticaNeue",tooltipFillOpacity:1,tooltipTextOpacity:.9};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",labelColor:"#212121",lineColor:"#E0E0E0",majorTickColor:"#9E9E9E",minorTickColor:"#9E9E9E",pointerColor:"#757575",capColor:"#757575",needleColor:"#757575",needleTailColor:"#757575"}}return t}var O,B=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),j=function(){function e(e){this.id=e}return e}(),N=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var d=e.call(this,t)||this;return d.opacity=r,d.fill=i,d.stroke=n,d["stroke-width"]=o,d["stroke-dasharray"]=a,d.d=l,d.transform=s,d.style=u,d}return B(t,e),t}(j),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return B(t,e),t}(j),V=function(){function e(e,t){this.width=e,this.height=t}return e}(),D=function(){function e(e,t){this.x=e,this.y=t}return e}(),G=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}(),U=function(e){function t(t,i,o,n,r,a,l){void 0===a&&(a="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=o,s.anchor=n,s.text=r,s.transform=a,s.baseLine=l,s}return B(t,e),t}(j),H=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}(),X=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),Y=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property("")],i.prototype,"color",void 0),Y([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property("16px")],i.prototype,"size",void 0),Y([t.Property("")],i.prototype,"color",void 0),Y([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),Y([t.Property("Normal")],i.prototype,"fontWeight",void 0),Y([t.Property("Normal")],i.prototype,"fontStyle",void 0),Y([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property(10)],i.prototype,"left",void 0),Y([t.Property(10)],i.prototype,"right",void 0),Y([t.Property(10)],i.prototype,"top",void 0),Y([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),K=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property(!1)],i.prototype,"enable",void 0),Y([t.Property(null)],i.prototype,"fill",void 0),Y([t.Complex({size:"13px"},J)],i.prototype,"textStyle",void 0),Y([t.Property(null)],i.prototype,"format",void 0),Y([t.Property(null)],i.prototype,"template",void 0),Y([t.Property(!0)],i.prototype,"enableAnimation",void 0),Y([t.Complex({},Z)],i.prototype,"border",void 0),Y([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}(O||(O={}));var Q=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),$=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(2)],i.prototype,"width",void 0),$([t.Property("")],i.prototype,"dashArray",void 0),$([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Complex(O.axisLabelFont,J)],i.prototype,"font",void 0),$([t.Property("")],i.prototype,"format",void 0),$([t.Property("Inside")],i.prototype,"position",void 0),$([t.Property("None")],i.prototype,"hiddenLabel",void 0),$([t.Property(!1)],i.prototype,"autoAngle",void 0),$([t.Property(!1)],i.prototype,"useRangeColor",void 0),$([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(0)],i.prototype,"start",void 0),$([t.Property(0)],i.prototype,"end",void 0),$([t.Property(null)],i.prototype,"radius",void 0),$([t.Property(10)],i.prototype,"startWidth",void 0),$([t.Property(10)],i.prototype,"endWidth",void 0),$([t.Property(null)],i.prototype,"color",void 0),$([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),$([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(2)],i.prototype,"width",void 0),$([t.Property(null)],i.prototype,"height",void 0),$([t.Property(null)],i.prototype,"interval",void 0),$([t.Property(0)],i.prototype,"offset",void 0),$([t.Property(null)],i.prototype,"color",void 0),$([t.Property("Inside")],i.prototype,"position",void 0),$([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"color",void 0),$([t.Complex({color:null,width:8},Z)],i.prototype,"border",void 0),$([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"color",void 0),$([t.Complex({color:null,width:0},Z)],i.prototype,"border",void 0),$([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(!0)],i.prototype,"enable",void 0),$([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"content",void 0),$([t.Property(90)],i.prototype,"angle",void 0),$([t.Property("50%")],i.prototype,"radius",void 0),$([t.Property("-1")],i.prototype,"zIndex",void 0),$([t.Property(!1)],i.prototype,"autoAngle",void 0),$([t.Complex({size:"12px",color:"#686868"},J)],i.prototype,"textStyle",void 0),$([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Q(i,e),$([t.Property(null)],i.prototype,"value",void 0),$([t.Property("Needle")],i.prototype,"type",void 0),$([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),$([t.Property(null)],i.prototype,"imageUrl",void 0),$([t.Property(null)],i.prototype,"radius",void 0),$([t.Property(20)],i.prototype,"pointerWidth",void 0),$([t.Complex({},ne)],i.prototype,"cap",void 0),$([t.Complex({},re)],i.prototype,"needleTail",void 0),$([t.Property(null)],i.prototype,"color",void 0),$([t.Complex({color:"#DDDDDD",width:0},Z)],i.prototype,"border",void 0),$([t.Complex(null,ae)],i.prototype,"animation",void 0),$([t.Property("Circle")],i.prototype,"markerShape",void 0),$([t.Property(5)],i.prototype,"markerHeight",void 0),$([t.Property(null)],i.prototype,"description",void 0),$([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),ue=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return Q(i,e),$([t.Property(null)],i.prototype,"minimum",void 0),$([t.Property(null)],i.prototype,"maximum",void 0),$([t.Property(!1)],i.prototype,"showLastLabel",void 0),$([t.Property(null)],i.prototype,"roundingPlaces",void 0),$([t.Property(null)],i.prototype,"radius",void 0),$([t.Complex({},ee)],i.prototype,"lineStyle",void 0),$([t.Collection([{}],ie)],i.prototype,"ranges",void 0),$([t.Collection([{}],se)],i.prototype,"pointers",void 0),$([t.Collection([{}],le)],i.prototype,"annotations",void 0),$([t.Complex({width:2,height:10},oe)],i.prototype,"majorTicks",void 0),$([t.Complex({width:2,height:5},oe)],i.prototype,"minorTicks",void 0),$([t.Property(200)],i.prototype,"startAngle",void 0),$([t.Property(160)],i.prototype,"endAngle",void 0),$([t.Property("ClockWise")],i.prototype,"direction",void 0),$([t.Property(null)],i.prototype,"background",void 0),$([t.Property(null)],i.prototype,"rangeGap",void 0),$([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),$([t.Complex({},te)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),de=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=this.gauge.availableSize.width,r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=M(this.elementId+"_Secondary_Element");if(document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount){a.appendChild(r);for(var l=0;l<this.gauge.axes[i].annotations.length;l++)t.updateBlazorTemplate(this.gauge.element.id+"_Axis"+i+"_ContentTemplate"+l,"ContentTemplate",this.gauge.axes[i].annotations[l])}},e.prototype.createTemplate=function(e,i,o){var n=this,a=this.gauge.axes[o],l=a.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+l.zIndex+";transform:"+(l.autoAngle?"rotate("+(l.angle-90)+"deg)":"rotate(0deg)")+";"}),u={cancel:!1,name:"annotationRender",content:l.content,axis:a,annotation:l,textStyle:l.textStyle};this.gauge.trigger("annotationRender",u,function(d){var p,h;if(!u.cancel){if((p=S(u.content))&&(window.Blazor?{}:p(a,null,null,n.gauge.element.id+"_Axis"+o+"_ContentTemplate"+i).length))for(var c=(h=Array.prototype.slice.call(p(window.Blazor?{}:a,null,null,n.gauge.element.id+"_Axis"+o+"_ContentTemplate"+i))).length,g=0;g<c;g++)s.appendChild(h[g]);else s.appendChild(t.createElement("div",{innerHTML:u.content,styles:r(u.textStyle)}));n.updateLocation(s,a,l),e.appendChild(s)}})},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),pe=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=this,u=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(u=this.pointerEle===r);var d=this.gauge.svgObject.getBoundingClientRect(),p=this.gauge.element.getBoundingClientRect(),h=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),g=new G(Math.abs(p.left-d.left),Math.abs(p.top-d.top),d.width,d.height),m=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[m.axisIndex],this.currentPointer=this.currentAxis.pointers[m.pointerIndex];var y=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,v=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,x=v&&null!==v.match("{value}"),b=this.gauge.intl.getNumberFormat({format:L(v),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var P=void 0;P=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var R=x?v.replace(new RegExp("{value}","g"),b(P)):b(P);(l=f(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?l.x+10:l.x;var w={name:"tooltipRender",cancel:!1,content:R,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge,appendInBodyTag:!1};this.gauge.trigger("tooltipRender",w,function(e){var r=w.tooltip.template;if(null!==r&&1===r.length&&(r=r[r[0]]),s.tooltip.showAtMousePosition)w.location=F(o,n,s.gauge.svgObject),s.tooltipRect=g;else if(r){var a=T(r,s.gauge,s.tooltipEle);s.tooltipRect=Math.abs(h.left-d.left)>a.width?s.findPosition(g,y,R,w.location):g}else s.findPosition(g,y,R,w.location);if(!w.cancel&&!u&&(w.tooltip.textStyle.color=w.tooltip.textStyle.color||s.gauge.themeStyle.tooltipFontColor,w.tooltip.textStyle.fontFamily=s.gauge.themeStyle.fontFamily||w.tooltip.textStyle.fontFamily,w.tooltip.textStyle.opacity=s.gauge.themeStyle.tooltipTextOpacity||w.tooltip.textStyle.opacity,s.svgTooltip=new i.Tooltip({enable:!0,data:{value:w.content},template:r,enableAnimation:w.tooltip.enableAnimation,content:[w.content],location:w.location,inverted:s.arrowInverted,areaBounds:s.tooltipRect,fill:w.tooltip.fill||s.gauge.themeStyle.tooltipFillColor,textStyle:w.tooltip.textStyle,availableSize:s.gauge.availableSize,border:w.tooltip.border}),s.svgTooltip.opacity=s.gauge.themeStyle.tooltipFillOpacity||s.svgTooltip.opacity,s.svgTooltip.appendTo(s.tooltipEle),s.gauge.tooltip.template&&t.updateBlazorTemplate(s.gauge.element.id+"Template","Template"),r&&Math.abs(n-s.tooltipEle.getBoundingClientRect().top)<=0&&(s.tooltipEle.style.top=parseFloat(s.tooltipEle.style.top)+20+"px"),w.appendInBodyTag)){var l=document.getElementsByClassName("EJ2-CircularGauge-Tooltip e-control e-tooltip");t.isNullOrUndefined(l)||s.removeTooltip(),document.body.appendChild(s.tooltipEle),s.tooltipEle.style.zIndex="100000000001";var p=s.tooltipEle.getBoundingClientRect();o+p.width<=window.innerWidth&&p.x<=0?(s.tooltipEle.style.left=o+20+"px",s.tooltipEle.style.top=p.top+20+"px"):p.x<=0&&o+p.width>=window.innerWidth&&(s.tooltipEle.style.left=o-p.width+20+"px",s.tooltipEle.style.top=p.top+20+"px")}})}else this.removeTooltip(),this.gauge.tooltip.template&&t.resetBlazorTemplate(this.gauge.element.id+"Template","Template")},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new G(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new G(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new G(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new G(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new G(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new G(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new G(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new G(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0){var e=document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0];e&&t.remove(e),this.pointerEle=null}},e.prototype.mouseUpHandler=function(e){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))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),he=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&d(new N(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle,a=e.lineStyle.color||this.gauge.themeStyle.lineColor;e.lineStyle.width>0&&(n=y(n,r)?[0,r=360][0]:n,d(new N(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,a,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),d=e.visibleRange.min,p=e.visibleRange.max,h=e.visibleLabels,g=e.labelStyle,m=e.currentRadius,y=g.font.color||this.gauge.themeStyle.labelColor;"Outside"===g.position?m+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:m-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var v=0,x=h.length;v<x;v++)0===v&&"First"===g.hiddenLabel||v===x-1&&"Last"===g.hiddenLabel||(l=h[v],n=f(a=Math.round(c(l.value,p,d,e.startAngle,e.endAngle,"ClockWise"===e.direction)),m,o.midPoint),r=this.findAnchor(n,g,a,l),g.font.fontFamily=this.gauge.themeStyle.labelFontFamily||g.font.fontFamily,u(new U(o.element.id+"_Axis_"+t+"_Label_"+v,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?k(l.value,e.ranges,y):y,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor,s=r.color||this.gauge.themeStyle.minorTickColor;if(r.width&&r.height&&a){for(var u=e.visibleRange.min,p=e.visibleRange.max;u<=p;u+=a)this.majorValues.indexOf(+u.toFixed(3))<0&&d(new N(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+u,"transparent",r.width,l?k(u,e.ranges,s):s,null,"0",this.calculateTicks(u,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;this.majorValues=[];var l=r.color||this.gauge.themeStyle.majorTickColor;if(r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,u=e.visibleRange.max,p=e.visibleRange.interval;s<=u;s+=p)this.majorValues.push(+s.toFixed(3)),d(new N(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?k(s,e.ranges,l):l,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,p,h,g,m,y,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,C=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,w),i.end),s=Math.min(Math.max(i.start,i.end),C),r=c(l,C,w,e.startAngle,e.endAngle,R),a=c(s,C,w,e.startAngle,e.endAngle,R);var M=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(M?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,p=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],p=R?p:[u,u=p][0];var S=i.roundedCornerRadius,_=.25*S;m=((i.currentRadius-u/2)*(r*Math.PI/180)-S/_)/(i.currentRadius-u/2)*180/Math.PI,y=((i.currentRadius-p/2)*(a*Math.PI/180)+S/_)/(i.currentRadius-p/2)*180/Math.PI,h=(i.currentRadius*(r*Math.PI/180)+S)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-S)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?d(new N(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(h),Math.ceil(g),m,y,i.currentRadius,u,p),"","pointer-events:none;"),f,o):d(new N(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,p),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),ce=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,u){l=e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+u}),r["draw"+i.type+"Pointer"](e,t,u,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,p=e.pointers[i],h=n.midPoint,c=p.pointerWidth/2;a=f(0,p.currentRadius,h);var g=p.color||this.gauge.themeStyle.needleColor;l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+h.y+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,g,p.border.width,p.border.color,null,"0",l),o,n)),r=s(p.needleTail.length,p.currentRadius),u="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c),r&&(a=f(180,r,n.midPoint),l="M "+h.x+" "+(h.y-c)+" L "+a.x+" "+(h.y-c)+" L "+a.x+" "+(h.y+c)+" L "+h.x+" "+(h.y+c)+" Z",p.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,p.needleTail.color||this.gauge.themeStyle.needleTailColor,p.needleTail.border.width,p.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(h.y+c)+" L "+a.x+" "+(h.y-c));var m=p.cap.color||this.gauge.themeStyle.capColor;p.cap.radius&&p.pathElement.push(d(z(h,"Circle",new V(2*p.cap.radius,2*p.cap.radius),"",new N(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,m,p.cap.border.width,p.cap.border.color,null,"0","","")),o,n,"Ellipse")),p.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,i,o){var n=this.gauge.midPoint,r="ClockWise"===e.direction,a=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r),l=c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r);l=r?a===l?l+1:l:a===l?[a,a=l-1][0]:[a,a=l][0];var s,u,d,p,h=i.roundedCornerRadius,g=.25*h;o<=g&&(h=8,g=.25*(h/=2)),d=((i.currentRadius-i.pointerWidth/2)*(a*Math.PI/180)-h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,p=((i.currentRadius-i.pointerWidth/2)*(l*Math.PI/180)+h/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,s=(i.currentRadius*(a*Math.PI/180)+h)/i.currentRadius*180/Math.PI,u=(i.currentRadius*(l*Math.PI/180)-h)/i.currentRadius*180/Math.PI,t.isNullOrUndefined(i.currentRadius)&&this.calculatePointerRadius(e,i),i.pathElement.map(function(t){"RangeBar"===i.type?i.roundedCornerRadius&&o?(t.setAttribute("d",P(n,Math.floor(s),Math.ceil(u),d,p,i.currentRadius,i.pointerWidth,i.pointerWidth)),h=0):t.setAttribute("d",w(n,a,l,i.currentRadius,i.currentRadius-i.pointerWidth)):t.setAttribute("transform","rotate("+c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r)+","+n.x+","+n.y+")"),t.setAttribute("aria-label",i.description||"Pointer:"+o.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(d(z(a,r.markerShape,new V(r.markerWidth,r.markerHeight),r.imageUrl,new N(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(d(new N(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,d="ClockWise"===n.direction,p=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),m=p>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(p)===Math.round(m)?d?m-p:m-p-360:d?m-p-360:m-p,e.style.animation="None",e.setAttribute("transform","rotate("+h(t.timeStamp,p,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u,d,p=this,g="ClockWise"===n.direction,m=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),y=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),v=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),f=r.roundedCornerRadius,x=.25*a;f&&(y=(r.currentRadius*(y*Math.PI/180)+f)/r.currentRadius*180/Math.PI,v=(r.currentRadius*(v*Math.PI/180)-f)/r.currentRadius*180/Math.PI,d=((r.currentRadius-r.pointerWidth/2)*(m*Math.PI/180)-a/x)/(r.currentRadius-r.pointerWidth/2)*180/Math.PI),u=m>v?v+360:v,new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(m)===Math.round(u)?g?u-m:u-m-360:g?u-m-360:u-m,g?f?e.setAttribute("d",P(p.gauge.midPoint,Math.floor(y),h(t.timeStamp,Math.floor(y),s,t.duration)+1e-4,d,h(t.timeStamp,Math.floor(y+f/2),s,t.duration)+1e-4,a,r.pointerWidth,r.pointerWidth)):e.setAttribute("d",w(p.gauge.midPoint,y,h(t.timeStamp,m,s,t.duration)+1e-4,a,l)):f?(s+=f,e.setAttribute("d",P(p.gauge.midPoint,h(t.timeStamp,Math.floor(d),s,t.duration),Math.floor(d)+1e-4,h(t.timeStamp,Math.floor(y-f-f/2),s,t.duration),Math.floor(d+f/2)+1e-4,a,r.pointerWidth,r.pointerWidth))):e.setAttribute("d",w(p.gauge.midPoint,h(t.timeStamp,m,s,t.duration),y+1e-4,a,l))},end:function(e){p.setPointerValue(n,r,o),p.gauge.trigger("animationComplete",p.gauge.isBlazor?{}:{axis:n,pointer:r})}})},e}(),ge=function(){function e(e){this.gauge=e,this.axisRenderer=new he(e),this.pointerRenderer=new ce(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=this,n=0,r=this.gauge.margin.left+this.gauge.margin.right,a=this.gauge.margin.top+this.gauge.margin.bottom,l=this,u=0,d=this.gauge.axes;u<d.length;u++)!function(u){if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?s(u.radius,e):e,n=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=n>100&&null==u.radius?100*i/n:i,u.currentRadius=i-u.nearSize,l.gauge.moveToCenter&&1===l.gauge.axes.length&&t.isNullOrUndefined(l.gauge.centerX)&&t.isNullOrUndefined(l.gauge.centerY)){var d=void 0,p=void 0,h=f((d=y(d=u.startAngle,u.endAngle)?[0,p=360][0]:d)-90,i,l.gauge.midPoint);p=u.endAngle;var c=f((p-=y(d,p)?1e-4:0)-90,i,l.gauge.midPoint),g=void 0,m=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;d>p&&!(Math.abs(d-p)>90)||(d>=270&&d<=360&&(p>270&&p<=360||p>=0&&p<=180)?(v=Math.abs(l.gauge.gaugeRect.x-Math.abs(h.x-l.gauge.gaugeRect.x)),R=p<=360&&p>=270?l.gauge.midPoint:p<=90?c:f(0,i,l.gauge.midPoint),x=Math.abs(R.x-l.gauge.gaugeRect.width),h=p<=360&&p>=270?c:f(270,i,l.gauge.midPoint),b=Math.abs(h.y-l.gauge.gaugeRect.y),c=p<=360&&p>=270||p>=0&&p<90?l.gauge.midPoint:p>=90&&p<=180?c:f(90,i,l.gauge.midPoint),P=Math.abs(c.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))):d>=0&&d<90&&p>=0&&p<=270?(b=Math.abs(h.y-l.gauge.gaugeRect.y),R=p>=180?f(90,i,l.gauge.midPoint):c,P=Math.abs(R.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height)),h=p>=180?c:l.gauge.midPoint,v=Math.abs(l.gauge.gaugeRect.x-Math.abs(h.x-l.gauge.gaugeRect.x)),c=p>=90?f(0,i,l.gauge.midPoint):c,x=Math.abs(c.x-l.gauge.gaugeRect.width)):d>=90&&d<180&&p>90&&p<=360?(R=p<=180?l.gauge.midPoint:p>=270?f(180,i,l.gauge.midPoint):c,v=Math.abs(R.x-l.gauge.gaugeRect.x),x=Math.abs(h.x-l.gauge.gaugeRect.width),h=p>270?f(p-90,i,l.gauge.midPoint):l.gauge.midPoint,b=Math.abs(l.gauge.gaugeRect.y-h.y),c=p>=180?f(90,i,l.gauge.midPoint):c,P=Math.abs(c.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))):d>=180&&d<=270&&(p<=360&&p>=270||p<=180&&p>=0)&&(R=p>180&&p<270?c:f(180,i,l.gauge.midPoint),v=Math.abs(l.gauge.gaugeRect.x-Math.abs(R.x-l.gauge.gaugeRect.x)),R=p>=180&&p<=360?l.gauge.midPoint:c,x=Math.abs(R.x-l.gauge.gaugeRect.width),R=p>180&&p<270?l.gauge.midPoint:p>=270&&p<=360?c:f(270,i,l.gauge.midPoint),b=Math.abs(R.y-l.gauge.gaugeRect.y),P=Math.abs(h.y-(l.gauge.gaugeRect.y+l.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>0||x>0)||!(b>0||P>0)||(g=Math.abs(v+x-r),m=Math.abs(b+P-a),l.gauge.midPoint.x=l.gauge.midPoint.x-v/2+x/2,l.gauge.midPoint.y=l.gauge.midPoint.y-b/2+P/2,e=Math.min(l.gauge.gaugeRect.width,l.gauge.gaugeRect.height)/2+Math.min(g,m)/2,u.currentRadius=(null!=u.radius?s(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=l.calculateNumericInterval(u,u.rect);var w;w={cancel:!1,name:"radiusCalculate",currentRadius:u.currentRadius,gauge:l.gauge,midPoint:l.gauge.midPoint,axis:u},l.gauge.trigger("radiusCalculate",w,function(e){u.currentRadius=w.currentRadius,o.gauge.midPoint=w.midPoint}),l.calculateVisibleLabels(u)}(d[u])},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=p(n,o.farSizes.length-1,o.farSizes),e.rect=new G(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 o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),n=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,d=[10,5,2,1];u<d.length;u++){var p=s*d[u];if(a<n/p)break;l=p}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:L(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=this,l=e.visibleRange.min,s=e.visibleRange.interval,u=e.visibleRange.max;l<=u&&s;l+=s)!function(l,s,u){r=e.roundingPlaces?parseFloat(l.toFixed(e.roundingPlaces)):l,t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},a.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new H(t.text,l))})}(l);var d=e.visibleLabels.length?e.visibleLabels[e.visibleLabels.length-1].value:null,p=e.visibleRange.max;d!==p&&!0===e.showLastLabel&&(t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(p)):n(p),value:p},this.gauge.trigger("axisLabelRender",t,function(i){t.cancel||e.visibleLabels.push(new H(t.text,p))})),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,d=0;this.farSizes=[],this.calculateAxisValues(t);for(var p=0,h=e;p<h.length;p++){var c=h[p];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,d=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+d:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+d)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new V(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),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}(),me=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 o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),ye=function(e,t,i,o){var n,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},ve=function(e){function r(t,i){return e.call(this,t,i)||this}return me(r,e),r.prototype.preRender=function(){this.isBlazor=window.Blazor,this.unWireEvents(),this.trigger("load",{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},r.prototype.render=function(){this.setTheme(),this.calculateBounds(),this.renderElements()},r.prototype.setTheme=function(){this.themeStyle=I(this.theme)},r.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,"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.gaugeResize)},r.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,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},r.prototype.mouseMove=function(e){var i=this,o=this.getMouseArgs(e,"touchmove","gaugeMouseMove");return this.trigger("gaugeMouseMove",o,function(e){var t,n;i.tooltipModule;o.cancel||i.enablePointerDrag&&i.activePointer&&(t={axis:i.activeAxis,pointer:i.activePointer,previousValue:i.activePointer.currentValue,name:"dragMove",currentValue:null},n={previousValue:i.activePointer.currentValue,name:"dragMove",currentValue:null,pointerIndex:parseInt(i.activePointer.pathElement[0].id.slice(-1),10)},i.pointerDrag(new D(o.x,o.y)),t.currentValue=n.currentValue=i.activePointer.currentValue,i.trigger("dragMove",i.isBlazor?n:t))}),this.notify(t.Browser.touchMoveEvent,e),!1},r.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove","gaugeMouseLeave");return this.trigger("gaugeMouseLeave",t),!1},r.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},r.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=m(v(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},r.prototype.gaugeOnMouseDown=function(e){var i,o=this,n=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",n,function(r){!n.cancel&&n.target.id.indexOf("_Pointer_")>=0&&n.target.id.indexOf(o.element.id+"_Axis_")>=0&&(i=E(n.target.id,o),o.activeAxis=o.axes[i.axisIndex],o.activePointer=o.activeAxis.pointers[i.pointerIndex],t.isNullOrUndefined(o.activePointer.pathElement)&&(o.activePointer.pathElement=[e.target]),o.trigger("dragStart",o.isBlazor?{name:"dragStart",currentValue:o.activePointer.currentValue,pointerIndex:parseInt(o.activePointer.pathElement[0].id.slice(-1),10)}:{axis:o.activeAxis,name:"dragStart",pointer:o.activePointer,currentValue:o.activePointer.currentValue}),o.svgObject.setAttribute("cursor","pointer"))}),!1},r.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp"),o={cancel:i.cancel,target:i.target,name:i.name,x:i.x,y:i.y};"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",this.isBlazor?o:i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",this.isBlazor?{name:"dragEnd",currentValue:this.activePointer.currentValue,pointerIndex:parseInt(this.activePointer.pathElement[0].id.slice(-1),10)}:{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},r.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new D(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},r.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new V(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new V(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",t.isBlazor?{}:i)},500)),!1},r.prototype.setGaugeStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},r.prototype.setCulture=function(){this.intl=new t.Internationalization},r.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},r.prototype.removeSvg=function(){for(var e=0;e<this.axes.length;e++)for(var i=0;i<this.axes[e].annotations.length;i++)t.resetBlazorTemplate(this.element.id+"_Axis"+e+"_ContentTemplate"+i,"_ContentTemplate");if(_(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},r.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 ge(this),this.animatePointer=!0},r.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=2*parseInt(this.element.style.borderWidth.split("px").join(""),10),o=s(this.width,e)||e||600,n=s(this.height,t)||t||450;o=isNaN(i)?o:o-i,n=isNaN(i)?n:n-i,this.availableSize=new V(o,n)},r.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,d=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new G(a,r,l,u):new G(a+l/2-d,r+u/2-d,2*d,2*d),this.gaugeRect=e;var p=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,h=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new D(p,h),this.gaugeAxisLayoutPanel.measureAxis(e)},r.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",this.isBlazor?{}:{gauge:this})},r.prototype.renderTitle=function(){if(this.title){this.titleStyle.fontFamily=this.themeStyle.fontFamily||this.titleStyle.fontFamily,this.titleStyle.size=this.themeStyle.fontSize||this.titleStyle.size;var e=o(this.title,this.titleStyle),t=u(new U(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color||this.themeStyle.titleFontColor,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},r.prototype.renderBorder=function(){var e=this.border.width;(e>0||this.background||this.themeStyle.backgroundColor)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background||this.themeStyle.backgroundColor,this.border,null,new G(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},r.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=i<n.visibleRange.min?n.visibleRange.min:i,i=i>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),this.isProtectedOnChange=!0,r.currentValue=i,r.value=i,this.isProtectedOnChange=!1},r.prototype.setAnnotationValue=function(e,i,o){var n=null!==M(this.element.id+"_Annotations_"+e),r=M(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(_(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||M(this.element.id+"_Secondary_Element").appendChild(r))},r.prototype.setRangeValue=function(e,t,i,o){var r,l=M(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],d=s.visibleRange,p="ClockWise"===s.direction,h=Math.min(Math.max(i,d.min),o),g=Math.min(Math.max(i,o),d.max),m=c(h,d.max,d.min,s.startAngle,s.endAngle,p),y=c(g,d.max,d.min,s.startAngle,s.endAngle,p);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,y=p?y:[m,m=y][0],v=p?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(m),Math.round(y),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},r.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},r.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,de]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,pe]}),e},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.onPropertyChanged=function(e,i){for(var o=!1,n=!1,r=!1,a=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(),n=!0;break;case"title":n=""===e.title||""===i.title,o=!(""===e.title||""===i.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?n=!0:o=!0;break;case"border":case"background":o=!0;break;case"axes":r=!0}a||(!n&&o&&(this.removeSvg(),this.renderElements()),n&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!r||o||n||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1)))},r.prototype.getModuleName=function(){return"circulargauge"},ye([t.Property(null)],r.prototype,"width",void 0),ye([t.Property(null)],r.prototype,"height",void 0),ye([t.Complex({color:"transparent",width:0},Z)],r.prototype,"border",void 0),ye([t.Property(null)],r.prototype,"background",void 0),ye([t.Property("")],r.prototype,"title",void 0),ye([t.Complex({size:"15px",color:null},J)],r.prototype,"titleStyle",void 0),ye([t.Complex({},q)],r.prototype,"margin",void 0),ye([t.Collection([{}],ue)],r.prototype,"axes",void 0),ye([t.Complex({},K)],r.prototype,"tooltip",void 0),ye([t.Property(!1)],r.prototype,"enablePointerDrag",void 0),ye([t.Property(null)],r.prototype,"centerX",void 0),ye([t.Property(null)],r.prototype,"centerY",void 0),ye([t.Property(!1)],r.prototype,"moveToCenter",void 0),ye([t.Property("Material")],r.prototype,"theme",void 0),ye([t.Property(!1)],r.prototype,"useGroupingSeparator",void 0),ye([t.Property(null)],r.prototype,"description",void 0),ye([t.Property(1)],r.prototype,"tabIndex",void 0),ye([t.Event()],r.prototype,"loaded",void 0),ye([t.Event()],r.prototype,"load",void 0),ye([t.Event()],r.prototype,"animationComplete",void 0),ye([t.Event()],r.prototype,"axisLabelRender",void 0),ye([t.Event()],r.prototype,"radiusCalculate",void 0),ye([t.Event()],r.prototype,"annotationRender",void 0),ye([t.Event()],r.prototype,"tooltipRender",void 0),ye([t.Event()],r.prototype,"dragStart",void 0),ye([t.Event()],r.prototype,"dragMove",void 0),ye([t.Event()],r.prototype,"dragEnd",void 0),ye([t.Event()],r.prototype,"gaugeMouseMove",void 0),ye([t.Event()],r.prototype,"gaugeMouseLeave",void 0),ye([t.Event()],r.prototype,"gaugeMouseDown",void 0),ye([t.Event()],r.prototype,"gaugeMouseUp",void 0),ye([t.Event()],r.prototype,"resized",void 0),r=ye([t.NotifyPropertyChanges],r)}(t.Component);return ve.Inject(pe,de),e.CircularGauge=ve,e.Annotations=de,e.Line=ee,e.Label=te,e.Range=ie,e.Tick=oe,e.Cap=ne,e.NeedleTail=re,e.Animation=ae,e.Annotation=le,e.Pointer=se,e.Axis=ue,e.Border=Z,e.Font=J,e.Margin=q,e.TooltipSettings=K,e.GaugeTooltip=pe,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=d,e.calculateSum=p,e.linear=h,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=m,e.isCompleteAngle=y,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=C,e.getCompletePath=A,e.getElement=M,e.getTemplateFunction=S,e.removeElement=_,e.getPointer=E,e.getElementSize=T,e.getMousePosition=F,e.getLabelFormat=L,e.calculateShapes=z,e.getRangeColor=k,e.CustomizeOption=j,e.PathOption=N,e.RectOption=W,e.Size=V,e.GaugeLocation=D,e.Rect=G,e.TextOption=U,e.VisibleLabels=H,e}({},ej.base,ej.svgbase),this.ejs=ej;
//# sourceMappingURL=ej2-circulargauge.min.js.map
/*!
* filename: index.d.ts
* version : 17.2.28-beta
* version : 17.2.34
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

{
"_from": "@syncfusion/ej2-circulargauge@*",
"_id": "@syncfusion/ej2-circulargauge@17.1.1",
"_id": "@syncfusion/ej2-circulargauge@17.2.28",
"_inBundle": false,
"_integrity": "sha512-PMmGJG9sYCjG0quARu/5M07VMG8/LdxNjnn+f5Kf6+sdhIwyMgCtcH6NTrIvjioIREOKdIW2czhUX1odUT+Hsw==",
"_integrity": "sha512-3uyYDpY/cOraPWZI0YD4lzrp6QBLAg3ApuN8sqPp3Z6AKTEOa8XNtos/L96m6wEHkGQWtR399pGI560E/BJ6mA==",
"_location": "/@syncfusion/ej2-circulargauge",

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

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-circulargauge/-/ej2-circulargauge-17.1.1.tgz",
"_shasum": "c811dcdcd5425305d84b9383dbe34b9378fc1c07",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-circulargauge/-/ej2-circulargauge-17.2.28.tgz",
"_shasum": "d84c59ed5ade09202a333c806a796cbf1e652fd7",
"_spec": "@syncfusion/ej2-circulargauge@*",

@@ -39,5 +39,5 @@ "_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~17.2.28-beta",
"@syncfusion/ej2-popups": "~17.2.28-beta",
"@syncfusion/ej2-svg-base": "~17.2.28-beta"
"@syncfusion/ej2-base": "~17.2.34",
"@syncfusion/ej2-popups": "~17.2.34",
"@syncfusion/ej2-svg-base": "~17.2.34"
},

@@ -73,4 +73,4 @@ "deprecated": false,

},
"version": "17.2.28-beta",
"version": "17.2.34",
"sideEffects": false
}
import { stringToNumber, getLocationFromAngle, getFontStyle } from '../utils/helper';
import { getElement, getTemplateFunction, measureElementRect } from '../utils/helper';
import { annotationRender } from '../model/constants';
import { createElement, updateBlazorTemplate, resetBlazorTemplate } from '@syncfusion/ej2-base';
import { createElement, updateBlazorTemplate } from '@syncfusion/ej2-base';
/**

@@ -36,3 +36,5 @@ * Annotation Module handles the Annotation of the axis.

parentElement.appendChild(element);
updateBlazorTemplate(element.id + '_ContentTemplate', 'ContentTemplate');
for (var i = 0; i < this.gauge.axes[index].annotations.length; i++) {
updateBlazorTemplate(this.gauge.element.id + '_Axis' + index + '_ContentTemplate' + i, 'ContentTemplate', this.gauge.axes[index].annotations[i]);
}
}

@@ -62,4 +64,4 @@ };

templateFn = getTemplateFunction(argsData.content);
if (templateFn && (!window[blazor] ? templateFn(axis, null, null, element.id + '_ContentTemplate').length : {})) {
templateElement = Array.prototype.slice.call(templateFn(!window[blazor] ? axis : {}, null, null, element.id + '_ContentTemplate'));
if (templateFn && (!window[blazor] ? templateFn(axis, null, null, _this.gauge.element.id + '_Axis' + axisIndex + '_ContentTemplate' + annotationIndex).length : {})) {
templateElement = Array.prototype.slice.call(templateFn(!window[blazor] ? axis : {}, null, null, _this.gauge.element.id + '_Axis' + axisIndex + '_ContentTemplate' + annotationIndex));
var length_1 = templateElement.length;

@@ -79,5 +81,2 @@ for (var i = 0; i < length_1; i++) {

}
else {
resetBlazorTemplate(element.id + '_ContentTemplate', '_ContentTemplate');
}
});

@@ -84,0 +83,0 @@ };

@@ -10,3 +10,2 @@ import { Property, Complex, ChildProperty, Collection } from '@syncfusion/ej2-base';import { Font, Border } from '../model/base';import { Position, PointerType, GaugeDirection, HiddenLabel, GaugeShape } from '../utils/enum';import { FontModel, BorderModel } from '../model/base-model';import { Size, Rect, VisibleLabels } from '../utils/helper';import { Theme } from '../model/theme';

* The width of the line in pixels.
* @aspDefaultValueIgnore
* @default 2

@@ -13,0 +12,0 @@ */

@@ -13,3 +13,2 @@ import { ChildProperty } from '@syncfusion/ej2-base';

* The width of the line in pixels.
* @aspDefaultValueIgnore
* @default 2

@@ -16,0 +15,0 @@ */

@@ -232,7 +232,2 @@ import { stringToNumber, Size, calculateShapes, appendPath } from '../utils/helper';

if (roundRadius) {
if (end <= minRadius) {
radius = end === 1 || 2 ? 8 : radius;
radius /= 2;
minRadius = radius * 0.25;
}
minAngle = ((((pointer.currentRadius) * ((minAngle * Math.PI) / 180) +

@@ -273,3 +268,3 @@ roundRadius) / (pointer.currentRadius)) * 180) / Math.PI;

_this.setPointerValue(axis, pointer, end);
_this.gauge.trigger(animationComplete, { axis: axis, pointer: pointer });
_this.gauge.trigger(animationComplete, _this.gauge.isBlazor ? {} : { axis: axis, pointer: pointer });
}

@@ -276,0 +271,0 @@ });

@@ -1,2 +0,2 @@

import { Property, NotifyPropertyChanges, Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';import { Complex, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';import { Event, EmitType, EventHandler, Collection, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';import { remove, createElement } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { ILoadedEventArgs, IAnimationCompleteEventArgs, IVisiblePointer, IThemeStyle } from './model/interface';import { IAxisLabelRenderEventArgs, IRadiusCalculateEventArgs, IPointerDragEventArgs, IResizeEventArgs } from './model/interface';import { ITooltipRenderEventArgs, IAnnotationRenderEventArgs, IMouseEventArgs } from './model/interface';import { TextOption, textElement, RectOption, getAngleFromLocation, getValueFromAngle, removeElement } from './utils/helper';import { Size, stringToNumber, measureText, Rect, GaugeLocation, getElement, getPointer, setStyles, toPixel } from './utils/helper';import { getAngleFromValue, getPathArc } from './utils/helper';import { GaugeTheme } from './utils/enum';import { Border, Margin, Font, TooltipSettings } from './model/base';import { BorderModel, MarginModel, FontModel, TooltipSettingsModel } from './model/base-model';import { Axis, Range, Pointer, Annotation, VisibleRangeModel } from './axes/axis';import { Annotations } from './annotations/annotations';import { GaugeTooltip } from './user-interaction/tooltip';import { AxisModel } from './axes/axis-model';import { load, loaded, gaugeMouseMove, gaugeMouseLeave, gaugeMouseDown } from './model/constants';import { gaugeMouseUp, dragEnd, dragMove, dragStart, resized } from './model/constants';import { AxisLayoutPanel } from './axes/axis-panel';import { getThemeStyle } from './model/theme';
import { Property, NotifyPropertyChanges, Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';import { Complex, Browser, isNullOrUndefined, resetBlazorTemplate } from '@syncfusion/ej2-base';import { Event, EmitType, EventHandler, Collection, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';import { remove, createElement } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { ILoadedEventArgs, IAnimationCompleteEventArgs, IVisiblePointer, IThemeStyle } from './model/interface';import { IAxisLabelRenderEventArgs, IRadiusCalculateEventArgs, IPointerDragEventArgs, IResizeEventArgs } from './model/interface';import { ITooltipRenderEventArgs, IAnnotationRenderEventArgs, IMouseEventArgs } from './model/interface';import { TextOption, textElement, RectOption, getAngleFromLocation, getValueFromAngle, removeElement } from './utils/helper';import { Size, stringToNumber, measureText, Rect, GaugeLocation, getElement, getPointer, setStyles, toPixel } from './utils/helper';import { getAngleFromValue, getPathArc } from './utils/helper';import { GaugeTheme } from './utils/enum';import { Border, Margin, Font, TooltipSettings } from './model/base';import { BorderModel, MarginModel, FontModel, TooltipSettingsModel } from './model/base-model';import { Axis, Range, Pointer, Annotation, VisibleRangeModel } from './axes/axis';import { Annotations } from './annotations/annotations';import { GaugeTooltip } from './user-interaction/tooltip';import { AxisModel } from './axes/axis-model';import { load, loaded, gaugeMouseMove, gaugeMouseLeave, gaugeMouseDown } from './model/constants';import { gaugeMouseUp, dragEnd, dragMove, dragStart, resized } from './model/constants';import { AxisLayoutPanel } from './axes/axis-panel';import { getThemeStyle } from './model/theme';
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -3,0 +3,0 @@

@@ -249,2 +249,4 @@ /**

themeStyle: IThemeStyle;
/** @private */
isBlazor: boolean;
/**

@@ -251,0 +253,0 @@ * Constructor for creating the widget

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

import { Property, NotifyPropertyChanges, Component } from '@syncfusion/ej2-base';
import { Complex, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';
import { Complex, Browser, isNullOrUndefined, resetBlazorTemplate } from '@syncfusion/ej2-base';
import { Event, EventHandler, Collection, Internationalization } from '@syncfusion/ej2-base';

@@ -63,2 +63,4 @@ import { remove, createElement } from '@syncfusion/ej2-base';

CircularGauge.prototype.preRender = function () {
var blazor = 'Blazor';
this.isBlazor = window[blazor];
this.unWireEvents();

@@ -117,2 +119,3 @@ this.trigger(load, { gauge: this });

var dragArgs;
var dragBlazorArgs;
var tooltip = _this.tooltipModule;

@@ -128,5 +131,11 @@ if (!args.cancel) {

};
dragBlazorArgs = {
previousValue: _this.activePointer.currentValue,
name: dragMove,
currentValue: null,
pointerIndex: parseInt(_this.activePointer.pathElement[0].id.slice(-1), 10)
};
_this.pointerDrag(new GaugeLocation(args.x, args.y));
dragArgs.currentValue = _this.activePointer.currentValue;
_this.trigger(dragMove, dragArgs);
dragArgs.currentValue = dragBlazorArgs.currentValue = _this.activePointer.currentValue;
_this.trigger(dragMove, _this.isBlazor ? dragBlazorArgs : dragArgs);
}

@@ -195,3 +204,7 @@ }

}
_this.trigger(dragStart, {
_this.trigger(dragStart, _this.isBlazor ? {
name: dragStart,
currentValue: _this.activePointer.currentValue,
pointerIndex: parseInt(_this.activePointer.pathElement[0].id.slice(-1), 10)
} : {
axis: _this.activeAxis,

@@ -214,9 +227,16 @@ name: dragStart,

var args = this.getMouseArgs(e, 'touchend', gaugeMouseUp);
var blazorArgs = {
cancel: args.cancel, target: args.target, name: args.name, x: args.x, y: args.y
};
var isTouch = e.pointerType === 'touch' || e.pointerType === '2' || e.type === 'touchend';
var tooltipInterval;
var tooltip = this.tooltipModule;
this.trigger(gaugeMouseUp, args);
this.trigger(gaugeMouseUp, this.isBlazor ? blazorArgs : args);
if (this.activeAxis && this.activePointer) {
this.trigger(dragEnd, {
this.trigger(dragEnd, this.isBlazor ? {
name: dragEnd,
currentValue: this.activePointer.currentValue,
pointerIndex: parseInt(this.activePointer.pathElement[0].id.slice(-1), 10)
} : {
name: dragEnd,
axis: this.activeAxis,

@@ -273,3 +293,3 @@ pointer: this.activePointer,

args.currentSize = _this.availableSize;
_this.trigger(resized, args);
_this.trigger(resized, _this.isBlazor ? {} : args);
}, 500);

@@ -314,2 +334,7 @@ }

CircularGauge.prototype.removeSvg = function () {
for (var i = 0; i < this.axes.length; i++) {
for (var j = 0; j < this.axes[i].annotations.length; j++) {
resetBlazorTemplate(this.element.id + '_Axis' + i + '_ContentTemplate' + j, '_ContentTemplate');
}
}
removeElement(this.element.id + '_Secondary_Element');

@@ -391,3 +416,3 @@ if (this.svgObject) {

this.element.appendChild(this.svgObject);
this.trigger(loaded, { gauge: this });
this.trigger(loaded, this.isBlazor ? {} : { gauge: this });
};

@@ -394,0 +419,0 @@ /**

@@ -117,2 +117,6 @@ /**

pointer: Pointer;
/**
* event tooltip argument as append to body
*/
appendInBodyTag: Boolean;
}

@@ -152,7 +156,7 @@ /**

*/
axis: Axis;
axis?: Axis;
/**
* pointer event argument
*/
pointer: Pointer;
pointer?: Pointer;
/**

@@ -166,2 +170,6 @@ * currentValue event argument

previousValue?: number;
/**
* index of the current pointer argument
*/
pointerIndex?: number;
}

@@ -168,0 +176,0 @@ /**

import { Tooltip } from '@syncfusion/ej2-svg-base';
import { getPointer, Rect, getMousePosition, getElementSize } from '../utils/helper';
import { getAngleFromValue, getLabelFormat, getLocationFromAngle } from '../utils/helper';
import { Browser, createElement, remove, updateBlazorTemplate, resetBlazorTemplate } from '@syncfusion/ej2-base';
import { Browser, createElement, remove, isNullOrUndefined, updateBlazorTemplate, resetBlazorTemplate } from '@syncfusion/ej2-base';
import { tooltipRender } from '../model/constants';

@@ -86,3 +86,4 @@ /**

name: tooltipRender, cancel: false, content: content_1, location: location, axis: this.currentAxis,
tooltip: this.tooltip, pointer: this.currentPointer, event: e, gauge: this.gauge
tooltip: this.tooltip, pointer: this.currentPointer, event: e, gauge: this.gauge,
appendInBodyTag: false
};

@@ -135,2 +136,19 @@ this.gauge.trigger(tooltipRender, tooltipArgs_1, function (observedArgs) {

}
if (tooltipArgs_1.appendInBodyTag) {
var bodyToolElement = document.getElementsByClassName('EJ2-CircularGauge-Tooltip e-control e-tooltip');
if (!isNullOrUndefined(bodyToolElement)) {
_this.removeTooltip();
}
document.body.appendChild(_this.tooltipEle);
_this.tooltipEle.style.zIndex = '100000000001';
var bounds = _this.tooltipEle.getBoundingClientRect();
if (pageX + bounds['width'] <= window.innerWidth && bounds['x'] <= 0) {
_this.tooltipEle.style.left = pageX + 20 + 'px';
_this.tooltipEle.style.top = bounds['top'] + 20 + 'px';
}
else if (bounds['x'] <= 0 && pageX + bounds['width'] >= window.innerWidth) {
_this.tooltipEle.style.left = pageX - bounds['width'] + 20 + 'px';
_this.tooltipEle.style.top = bounds['top'] + 20 + 'px';
}
}
}

@@ -137,0 +155,0 @@ });

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc