UNPKG

@syncfusion/ej2-circulargauge

Version:
10 lines 157 kB
/*! * filename: ej2-circulargauge.umd.min.js * version : 33.2.3 * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base"),require("@syncfusion/ej2-pdf-export")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base","@syncfusion/ej2-pdf-export"],t):t((e=e||self).ej={},e.ej2Base,e.ej2SvgBase,e.ej2PdfExport)}(this,function(e,F,B,D){"use strict";z=function(e,t){return(z=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])}))(e,t)};var z,t=function(e,t){function i(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)};function f(e,t){var i=document.getElementById("gauge-measuretext"),t=(null===i&&(i=F.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(i)),"position: absolute; visibility: hidden;;left: 0px; top: -100px; white-space: nowrap;"+W(t));return i.innerText=e,i.style.cssText=t,new x(i.clientWidth,i.clientHeight)}function N(e,t){return-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10)}function W(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 G(e,t,i,n,o){var a=new B.SvgRenderer(""),o=o+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";",i={id:e.id,x:e.x,y:e.y,fill:i,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:o},t=a.createText(i,e.text);return n.appendChild(t),t}function m(e,t,i,n){i=i.renderer["draw"+(n=n||"Path")](e);return i.setAttribute("transform",e.transform),i.style.cssText=e.style,t.appendChild(i),i}function k(e,t){t=(t=t-e)<=0?360+t:t;return 0!==Math.floor(t/360)}function C(e,t){t-=e;return t<0?360+t:t}function O(e,t,i,n,o,a){var r;return o-=k(n,o)?1e-4:0,n-=90,o-=90,r=a?(e-i)*(C(n,o)/(t-i))+n:(r=o-(e-i)*(C(n,o)/(t-i)))<0?360+r:r,r=360<=Math.round(r)?r-360:Math.round(r)<0?360+r:r}function j(e,t){t=Math.atan2(t.y-e.y,t.x-e.x),t=Math.round((t<0?6.283+t:t)*(180/Math.PI))-270;return t+=t<0?360:0}function M(e,t,i){e=e*Math.PI/180;return new de(Math.cos(e)*t+i.x,Math.sin(e)*t+i.y)}function U(e,t,i,n,o,a,r,l){!F.isNullOrUndefined(r)&&r.start===r.end||(i-=k(t,i)?1e-4:0);var s=C(t,i),d=F.isNullOrUndefined(r)?n-o:"Outside"!==r.position||r.isLinearCircularGradient?"Cross"===r.position&&"AntiClockWise"===l.direction?n-(a+o)/2:n-o:n+o,g=F.isNullOrUndefined(r)?n-a:"Outside"!==r.position||r.isLinearCircularGradient?"Cross"===r.position&&"ClockWise"===l.direction?n-(a+o)/2:n-a:n+a,h=F.isNullOrUndefined(r)?n-(o+a)/2:"Outside"!==r.position||r.isLinearCircularGradient?"Cross"===r.position?n-(o+a)/4-("ClockWise"===l.direction?o:a)/2:n-(o+a)/2:n+(o+a)/2,u=F.isNullOrUndefined(r)||"Cross"!==r.position?n:n+(o+a)/4-("ClockWise"===l.direction?o:a)/2,p=F.isNullOrUndefined(r)||"Cross"!==r.position||"ClockWise"!==l.direction?n:n-(o-a)/2,c=F.isNullOrUndefined(r)||"Cross"!==r.position||"AntiClockWise"!==l.direction?n:n+(o-a)/2;return void 0!==o&&void 0!==a?(p="Cross"===r.position&&325<s?c:p,X(M(t,c,e),M(i,p,e),M(t,d,e),M(i,g,e),u,d,g,h,s<180?0:1,e,s,r,l)):J(M(t,n,e),M(i,n,e),n,s<180?0:1)}function V(e,t,i,n,o,a,r,l,s,d,g){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+d.x+" "+d.y+" A "+n+" "+o+" 0 "+l+" 0 "+g.x+" "+g.y+" A "+a+" "+r+" 0 "+l+" 0 "+s.x+" "+s.y+" Z "}function H(e,t,i,n,o,a,r,l,s,d,g,h,u,p,c){i="M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+n.x+" "+n.y+" "+o.x+" "+o.y+" "+h.x+" "+h.y;return F.isNullOrUndefined(l)&&F.isNullOrUndefined(s)?i+" A "+a+" "+r+" 0 "+d+" 0 "+g.x+" "+g.y+" C "+u.x+" "+u.y+" "+p.x+" "+p.y+" "+e.x+" "+e.y+" Z":i+" A "+a+" "+r+" 0 "+d+" 0 "+c.x+" "+c.y+" A "+l+" "+s+" 0 "+d+" 0 "+g.x+" "+g.y+" C "+u.x+" "+u.y+" "+p.x+" "+p.y+" "+e.x+" "+e.y+" Z"}function R(e,t,i,n,o,a,r,l){return"M "+e.x+" "+e.y+" A "+o+" "+o+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+n.x+" "+n.y+" A "+r+" "+a+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function X(e,t,i,n,o,a,r,l,s,d,g,h,u){var p,c=h.startWidth,m=h.endWidth,y=Math.abs(c-m);return m<c&&g<=260&&"Cross"!==h.position&&"Outside"!==h.position?(p=r+("ClockWise"===u.direction?-y/2:y/2),R(e,t,i,n,o,a+("ClockWise"===u.direction?y/2:-y/2),p,s)):c<m&&g<=260&&"Cross"!==h.position&&"Outside"!==h.position?(p=a+("ClockWise"===u.direction?-y/2:y/2),R(e,t,i,n,o,r+("ClockWise"===u.direction?y/2:-y/2),p,s)):m!==c||0===u.startAngle&&0===u.endAngle?260<g||!h.isLinearCircularGradient&&0===u.startAngle&&0===u.endAngle?h.roundedCornerRadius<=0&&h.startWidth===h.endWidth?R(e,t,i,n,o,a,r,s):Y(e,t,i,n,o,a,r,l,s,d,null,null,null,null,c,m,g,h,u):"Cross"===h.position||"Outside"===h.position?R(e,t,i,n,o,l,l,s):R(e,t,i,n,o,a,r,s):R(e,t,i,n,o,a,r,s)}function Y(e,t,i,n,o,a,r,l,s,d,g,h,u,p,c,m,y,f,x){var v,b,A,C,P,S,w;return F.isNullOrUndefined(f)?Z(e,t,i,n,o,a,r,s,g,h,u,p):(0,C=Math.abs(c-m),0,v=M(O((f.start+f.end)/2,x.maximum,x.minimum,x.startAngle,x.endAngle,"ClockWise"===x.direction),c<m?r:a,d),b=Math.sqrt(Math.pow(n.x-v.x,2)+Math.pow(n.y-v.y,2))/2,A=Math.sqrt(Math.pow(d.x-i.x,2)+Math.pow(d.y-i.y,2)),d=Math.sqrt(Math.pow(d.x-v.x,2)+Math.pow(d.y-v.y,2)),f.roundedCornerRadius<=0?(C=0===C?1:C,n.y="Cross"===f.position&&"ClockWise"===x.direction&&325<y?n.y-C/2:n.y,("Cross"===f.position?330:325)<=y&&y<=360?V(e,t,o,b,b,"ClockWise"===x.direction?d/2:345<=y?a-C/2-m/2:"Cross"===f.position?a+C/4-c/2:a-C/2-c/2,"ClockWise"===x.direction?A/2:"Cross"===f.position?r+C/4-m/4:"Outside"===f.position&&"AntiClockWise"===x.direction?y<345?a-C-m/4:a-C/2:r+C/2-m/2,s,i,n,v):260<y&&y<325&&"Cross"!==f.position&&"Outside"!==f.position?(w=l-C/2,P="ClockWise"===x.direction?310<=y:y<345,y<310?R(e,t,i,n,o,w,w,s):310<=y||P?R(e,t,i,n,o,w,w=l-C,s):R(e,t,i,n,o,a,r,s)):"Cross"===f.position?(P="ClockWise"===x.direction?y<=300&&260<=y?r-C/2-c/4:r-C-c/2:y<=300&&260<=y?r+C/4-c/4:r+C/4-c/2,R(e,t,i,n,o,"ClockWise"===x.direction?325<y?340<y?a-c-C/4:a-C/4:a:a-C/4,P,s)):"Outside"===f.position?y<325&&285<y?(w=void 0,S=w=l+C/2+(P=c/2)+m/2,n.y="ClockWise"===x.direction&&c!==m&&C<c?n.y-C/2:n.y+P,R(e,t,i,n,o,S,w,s)):R(e,t,i,n,o,l,l,s):R(e,t,i,n,o,a,r,s)):(s=(P=x.endAngle<4?356:360)<y?0:s,S="ClockWise"===x.direction?327:322,w="ClockWise"===x.direction?328:325,m!==c||0===x.startAngle&&0===x.endAngle?y<=P&&S<y&&0<f.roundedCornerRadius?H(e,t,o,g,h,"ClockWise"===x.direction?y<334&&324<y?b-C/2:b-C/4:b,b,d/2,"ClockWise"===x.direction?A/2+C/2:A/2,s,i,n,p,u,v):270<y&&y<w?H(e,t,o,g,h,a-C/2-c/2,"ClockWise"===x.direction?r-C/2-m/2:r+C/2-m/2,null,null,s,i,n,p,u,null):Z(e,t,i,n,o,a,r,s,g,h,u,p):Z(e,t,i,n,o,a,r,s,g,h,u,p)))}function Z(e,t,i,n,o,a,r,l,s,d,g,h){return"M "+e.x+" "+e.y+" A "+o+" "+o+" 0 "+l+" 1 "+t.x+" "+t.y+" C "+s.x+" "+s.y+" "+d.x+" "+d.y+" "+n.x+" "+n.y+" A "+r+" "+a+" 0 "+l+" 0 "+i.x+" "+i.y+" C "+h.x+" "+h.y+" "+g.x+" "+g.y+" "+e.x+" "+e.y+" Z"}function q(e,t,i,n,o,a,r,l,s,d){var g=C(t,i-=k(t,i)?1e-4:0),h=a-r,u=a-l,p=a-(r+l)/2;return Y(M(t,a,e),M(i,a,e),M(t,h,e),M(i,u,e),a,p,p,p,g<180?0:1,e,M(o,a,e),M(o,u,e),M(n,a,e),M(n,h,e),r,l,g,s,d)}function J(e,t,i,n){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+n+" 1 "+t.x+" "+t.y}function $(t,e){var i=null;try{"function"==typeof t?i=F.compile(t):isNaN(parseFloat(t))&&document.querySelectorAll(t).length?"a"===t.charAt(0)&&"A"===t.charAt(0)||1===t.length||(i=F.compile(document.querySelector(t).innerHTML.trim())):(e.isVue||e.isVue3)&&(i=F.compile(t))}catch(e){i=F.compile(t)}return i}function K(e){e=h(e);e&&F.remove(e)}function h(e){return document.getElementById(e)}function w(e,t){return null!=e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function Q(e,t){e=e.replace(t.element.id,"").split("_Axis_")[1],t=-1<e.indexOf("_Range_")?e.split("_Range_"):-1<e.indexOf("_Pointer_NeedleCap_")?e.split("_Pointer_NeedleCap_"):-1<e.indexOf("_Pointer_NeedleTail_")?e.split("_Pointer_NeedleTail_"):-1<e.indexOf("_Pointer_NeedleRect_")?e.split("_Pointer_NeedleRect_"):-1<e.indexOf("_Pointer_Needle_")?e.split("_Pointer_Needle_"):-1<e.indexOf("_Pointer_RangeBar_")?e.split("_Pointer_RangeBar_"):-1<e.indexOf("_Pointer_Marker_")?e.split("_Pointer_Marker_"):-1<e.indexOf("_Pointer_")?e.split("_Pointer_"):e.split("_Annotation_");return{axisIndex:+t[0],pointerIndex:+t[t.length-1]}}function ee(e){return e&&null!==e.match("{value}")?"":e}function te(e,t,i,n,o){var a,r="string"==typeof i.width?parseFloat(i.width):i.width,l="string"==typeof i.height?parseFloat(i.height):i.height,s=e.x,d=e.y,g=e.x+-r/2,h=e.y+-l/2,u=-1<o.id.indexOf("Shape");switch(t){case"Circle":F.merge(o,{rx:r/2,ry:l/2,cx:s,cy:d});break;case"Diamond":F.merge(o,{d:"M "+g+" "+d+" L "+s+" "+(d+-l/2)+" L "+(s+r/2)+" "+d+" L "+s+" "+(d+l/2)+" L "+g+" "+d+" Z"});break;case"Rectangle":F.merge(o,{d:"M "+g+" "+(d+-l/2)+" L "+(s+r/2)+" "+(d+-l/2)+" L "+(s+r/2)+" "+(d+l/2)+" L "+g+" "+(d+l/2)+" L "+g+" "+(d+-l/2)+" Z"});break;case"Triangle":F.merge(o,{d:u?"M "+(g+r/2)+" "+h+" L "+(g+r)+" "+(h+l)+"L "+g+" "+(h+l)+" Z":"M "+s+" "+d+" L "+(s-l)+" "+(d-r/2)+"L "+(s-l)+" "+(d+r/2)+" Z"});break;case"InvertedTriangle":F.merge(o,{d:u?"M "+(g+r)+" "+h+" L "+(g+r/2)+" "+(h+l)+"L "+g+" "+h+" Z":"M "+s+" "+d+" L "+(s+l)+" "+(d-r/2)+"L "+(s+l)+" "+(d+r/2)+" Z"});break;case"Image":F.merge(o,{href:n,height:l,width:r,x:g,y:h});break;case"RightArrow":F.merge(o,{d:"M "+(s+-r/(a=2))+" "+(d-l/2)+" L "+(s+r/2)+" "+d+" L "+(s+-r/2)+" "+(d+l/2)+" L "+(s+-r/2)+" "+(d+l/2-a)+" L "+(s+r/2-2*a)+" "+d+" L"+(s+-r/2)+" "+(d-l/2+a)+" Z"});break;case"LeftArrow":o.fill=o.stroke,o.stroke="transparent",F.merge(o,{d:"M "+(s+r/(a=2))+" "+(d-l/2)+" L "+(s+-r/2)+" "+d+" L "+(s+r/2)+" "+(d+l/2)+" L "+(s+r/2)+" "+(d+l/2-a)+" L "+(s+-r/2+2*a)+" "+d+" L"+(s+r/2)+" "+(d-l/2+a)+" Z"})}return o}function ie(e){this.id=e}t(oe,ne=ie);var ne,y=oe;function oe(e,t,i,n,o,a,r,l,s){void 0===l&&(l=""),void 0===s&&(s="");e=ne.call(this,e)||this;return e.opacity=o,e.fill=t,e.stroke=n,e["stroke-width"]=i,e["stroke-dasharray"]=a,e.d=r,e.transform=l,e.style=s,e}t(le,ae=ie);var ae,re=le;function le(e,t,i,n,o){e=ae.call(this,e)||this;return e.y=o.y,e.x=o.x,e.height=o.height,e.width=o.width,e.opacity=n,e.fill=t,e.stroke=i.color,e["stroke-width"]=i.width,e["stroke-dasharray"]=i.dashArray,e}var se,x=function(e,t){this.width=e,this.height=t},de=function(e,t){this.x=e,this.y=t},_=function(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n},ge=(t(he,se=ie),he);function he(e,t,i,n,o,a,r){void 0===a&&(a="");e=se.call(this,e)||this;return e.transform="",e.baseLine="auto",e.x=t,e.y=i,e.anchor=n,e.text=o,e.transform=a,e.baseLine=r,e}var ue=function(e,t,i){this.text=e,this.value=t,this.size=i};function pe(e,t,i){F.setStyleAttribute(e,{stroke:i.color,"stroke-width":i.width,fill:t})}function ce(e,t,i,n,o,a){return o-=k(n,o)?1e-4:0,e=e<n?e+360:e,a?(e-n)/C(n,o)*(t-i)+i:t-(e-n)/C(n,o)*(t-i)}function me(e,t){e=e.replace(t.element.id,"").split("_Axis_")[1];return{axisIndex:+e[0],rangeIndex:+e.split("Range_")[1]}}(t=We=We||{}).axisLabelFont={size:null,fontWeight:null,color:null,fontStyle:"Normal",fontFamily:null},t.legendLabelFont={size:null,fontWeight:null,color:null,fontStyle:"Normal",fontFamily:null};ye=function(e,t){return(ye=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])}))(e,t)};var ye,fe,t=function(e,t){function i(){this.constructor=e}ye(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},i=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;0<=l;l--)(o=e[l])&&(r=(a<3?o(r):3<a?o(t,i,r):o(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},n=(fe=F.ChildProperty,t(xe,fe),i([F.Property("")],xe.prototype,"color",void 0),i([F.Property(1)],xe.prototype,"width",void 0),i([F.Property("")],xe.prototype,"dashArray",void 0),xe);function xe(){return null!==fe&&fe.apply(this,arguments)||this}ve=F.ChildProperty,t(be,ve),i([F.Property("16px")],be.prototype,"size",void 0),i([F.Property("")],be.prototype,"color",void 0),i([F.Property("segoe UI")],be.prototype,"fontFamily",void 0),i([F.Property("Normal")],be.prototype,"fontWeight",void 0),i([F.Property("Normal")],be.prototype,"fontStyle",void 0),i([F.Property(1)],be.prototype,"opacity",void 0);var ve,o=be;function be(){return null!==ve&&ve.apply(this,arguments)||this}Ae=F.ChildProperty,t(a,Ae),i([F.Property(null)],a.prototype,"fill",void 0),i([F.Complex({size:null,fontFamily:null,opacity:null,fontWeight:null},o)],a.prototype,"textStyle",void 0),i([F.Property(null)],a.prototype,"format",void 0),i([F.Property(null)],a.prototype,"template",void 0),i([F.Property(!0)],a.prototype,"enableAnimation",void 0),i([F.Complex({color:null},n)],a.prototype,"border",void 0),i([F.Property(!1)],a.prototype,"showAtMousePosition",void 0);var Ae,Ce=a;function a(){return null!==Ae&&Ae.apply(this,arguments)||this}Pe=F.ChildProperty,t(we,Pe),i([F.Property(null)],we.prototype,"fill",void 0),i([F.Complex({size:"13px",fontFamily:null,opacity:null},o)],we.prototype,"textStyle",void 0),i([F.Property(null)],we.prototype,"format",void 0),i([F.Property(null)],we.prototype,"template",void 0),i([F.Property(!0)],we.prototype,"enableAnimation",void 0),i([F.Complex({color:null},n)],we.prototype,"border",void 0);var Pe,Se=we;function we(){return null!==Pe&&Pe.apply(this,arguments)||this}Fe=F.ChildProperty,t(_e,Fe),i([F.Property(10)],_e.prototype,"left",void 0),i([F.Property(10)],_e.prototype,"right",void 0),i([F.Property(10)],_e.prototype,"top",void 0),i([F.Property(10)],_e.prototype,"bottom",void 0);var Fe,Re=_e;function _e(){return null!==Fe&&Fe.apply(this,arguments)||this}Te=F.ChildProperty,t(r,Te),i([F.Property(!1)],r.prototype,"enable",void 0),i([F.Property(null)],r.prototype,"fill",void 0),i([F.Complex({size:null,fontFamily:null,opacity:null,fontWeight:null},o)],r.prototype,"textStyle",void 0),i([F.Complex({},Ce)],r.prototype,"rangeSettings",void 0),i([F.Complex({},Se)],r.prototype,"annotationSettings",void 0),i([F.Property(null)],r.prototype,"format",void 0),i([F.Property(null)],r.prototype,"template",void 0),i([F.Property(!0)],r.prototype,"enableAnimation",void 0),i([F.Complex({color:null},n)],r.prototype,"border",void 0),i([F.Property(!1)],r.prototype,"showAtMousePosition",void 0),i([F.Property("Pointer")],r.prototype,"type",void 0);var Te,Ee=r;function r(){return null!==Te&&Te.apply(this,arguments)||this}ke=F.ChildProperty,t(Me,ke),i([F.Property(0)],Me.prototype,"x",void 0),i([F.Property(0)],Me.prototype,"y",void 0);var ke,Oe=Me;function Me(){return null!==ke&&ke.apply(this,arguments)||this}Le=F.ChildProperty,t(l,Le),i([F.Property(!1)],l.prototype,"visible",void 0),i([F.Property(!0)],l.prototype,"toggleVisibility",void 0),i([F.Property("Center")],l.prototype,"alignment",void 0),i([F.Complex({},n)],l.prototype,"border",void 0),i([F.Complex({},n)],l.prototype,"shapeBorder",void 0),i([F.Property(8)],l.prototype,"padding",void 0),i([F.Property(1)],l.prototype,"opacity",void 0),i([F.Property("Auto")],l.prototype,"position",void 0),i([F.Property("Circle")],l.prototype,"shape",void 0),i([F.Property(null)],l.prototype,"height",void 0),i([F.Property(null)],l.prototype,"width",void 0),i([F.Complex(We.legendLabelFont,o)],l.prototype,"textStyle",void 0),i([F.Property(10)],l.prototype,"shapeHeight",void 0),i([F.Property(10)],l.prototype,"shapeWidth",void 0),i([F.Property(5)],l.prototype,"shapePadding",void 0),i([F.Complex({x:0,y:0},Oe)],l.prototype,"location",void 0),i([F.Property("transparent")],l.prototype,"background",void 0),i([F.Complex({left:0,right:0,top:0,bottom:0},Re)],l.prototype,"margin",void 0);var Le,t=l;function l(){return null!==Le&&Le.apply(this,arguments)||this}Ie=function(e,t){return(Ie=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])}))(e,t)};var Ie,Be,i=function(e,t){function i(){this.constructor=e}Ie(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},s=function(e,t,i,n){var o,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var l=e.length-1;0<=l;l--)(o=e[l])&&(r=(a<3?o(r):3<a?o(t,i,r):o(t,i))||r);return 3<a&&r&&Object.defineProperty(t,i,r),r},De=(Be=F.ChildProperty,i(ze,Be),s([F.Property(2)],ze.prototype,"width",void 0),s([F.Property("")],ze.prototype,"dashArray",void 0),s([F.Property(null)],ze.prototype,"color",void 0),ze);function ze(){return null!==Be&&Be.apply(this,arguments)||this}Ne=F.ChildProperty,i(d,Ne),s([F.Complex(We.axisLabelFont,o)],d.prototype,"font",void 0),s([F.Property("")],d.prototype,"format",void 0),s([F.Property("Inside")],d.prototype,"position",void 0),s([F.Property("None")],d.prototype,"hiddenLabel",void 0),s([F.Property(!1)],d.prototype,"autoAngle",void 0),s([F.Property(!1)],d.prototype,"useRangeColor",void 0),s([F.Property(0)],d.prototype,"offset",void 0),s([F.Property(!0)],d.prototype,"shouldMaintainPadding",void 0);var Ne,We=d;function d(){return null!==Ne&&Ne.apply(this,arguments)||this}Ge=F.ChildProperty,i(g,Ge),s([F.Property(0)],g.prototype,"start",void 0),s([F.Property(0)],g.prototype,"end",void 0),s([F.Property(null)],g.prototype,"radius",void 0),s([F.Property(10)],g.prototype,"startWidth",void 0),s([F.Property(10)],g.prototype,"endWidth",void 0),s([F.Property(null)],g.prototype,"color",void 0),s([F.Property(0)],g.prototype,"roundedCornerRadius",void 0),s([F.Property(1)],g.prototype,"opacity",void 0),s([F.Property("")],g.prototype,"legendText",void 0),s([F.Property("Auto")],g.prototype,"position",void 0),s([F.Property(0)],g.prototype,"offset",void 0),s([F.Property(null)],g.prototype,"linearGradient",void 0),s([F.Property(null)],g.prototype,"radialGradient",void 0);var Ge,je=g;function g(){var e=null!==Ge&&Ge.apply(this,arguments)||this;return e.isLinearCircularGradient=!1,e}Ue=F.ChildProperty,i(u,Ue),s([F.Property(2)],u.prototype,"width",void 0),s([F.Property(null)],u.prototype,"height",void 0),s([F.Property(null)],u.prototype,"interval",void 0),s([F.Property(0)],u.prototype,"offset",void 0),s([F.Property(null)],u.prototype,"color",void 0),s([F.Property("Inside")],u.prototype,"position",void 0),s([F.Property(!1)],u.prototype,"useRangeColor",void 0),s([F.Property("0")],u.prototype,"dashArray",void 0);var Ue,Ve=u;function u(){return null!==Ue&&Ue.apply(this,arguments)||this}He=F.ChildProperty,i(Ye,He),s([F.Property(null)],Ye.prototype,"color",void 0),s([F.Property(null)],Ye.prototype,"linearGradient",void 0),s([F.Property(null)],Ye.prototype,"radialGradient",void 0),s([F.Complex({color:null,width:8},n)],Ye.prototype,"border",void 0),s([F.Property(8)],Ye.prototype,"radius",void 0);var He,Xe=Ye;function Ye(){return null!==He&&He.apply(this,arguments)||this}Ze=F.ChildProperty,i(Je,Ze),s([F.Property(null)],Je.prototype,"color",void 0),s([F.Complex({color:null,width:0},n)],Je.prototype,"border",void 0),s([F.Property("0%")],Je.prototype,"length",void 0),s([F.Property(null)],Je.prototype,"linearGradient",void 0),s([F.Property(null)],Je.prototype,"radialGradient",void 0);var Ze,qe=Je;function Je(){return null!==Ze&&Ze.apply(this,arguments)||this}$e=F.ChildProperty,i(Qe,$e),s([F.Property(!0)],Qe.prototype,"enable",void 0),s([F.Property(1e3)],Qe.prototype,"duration",void 0);var $e,Ke=Qe;function Qe(){return null!==$e&&$e.apply(this,arguments)||this}et=F.ChildProperty,i(p,et),s([F.Property(null)],p.prototype,"content",void 0),s([F.Property(90)],p.prototype,"angle",void 0),s([F.Property("50%")],p.prototype,"radius",void 0),s([F.Property("-1")],p.prototype,"zIndex",void 0),s([F.Property(!1)],p.prototype,"autoAngle",void 0),s([F.Complex({size:"12px",color:"#686868"},o)],p.prototype,"textStyle",void 0),s([F.Property(null)],p.prototype,"description",void 0);var et,tt=p;function p(){return null!==et&&et.apply(this,arguments)||this}it=F.ChildProperty,i(c,it),s([F.Property(null)],c.prototype,"value",void 0),s([F.Property("Needle")],c.prototype,"type",void 0),s([F.Property("Auto")],c.prototype,"position",void 0),s([F.Property(0)],c.prototype,"roundedCornerRadius",void 0),s([F.Property(null)],c.prototype,"imageUrl",void 0),s([F.Property(null)],c.prototype,"radius",void 0),s([F.Property(20)],c.prototype,"pointerWidth",void 0),s([F.Complex({},Xe)],c.prototype,"cap",void 0),s([F.Complex({},o)],c.prototype,"textStyle",void 0),s([F.Complex({},qe)],c.prototype,"needleTail",void 0),s([F.Property(null)],c.prototype,"color",void 0),s([F.Complex({color:"#DDDDDD",width:0},n)],c.prototype,"border",void 0),s([F.Complex(null,Ke)],c.prototype,"animation",void 0),s([F.Property("Circle")],c.prototype,"markerShape",void 0),s([F.Property(5)],c.prototype,"markerHeight",void 0),s([F.Property("")],c.prototype,"text",void 0),s([F.Property(null)],c.prototype,"description",void 0),s([F.Property(5)],c.prototype,"markerWidth",void 0),s([F.Property(0)],c.prototype,"offset",void 0),s([F.Property(null)],c.prototype,"needleStartWidth",void 0),s([F.Property(null)],c.prototype,"needleEndWidth",void 0),s([F.Property(!1)],c.prototype,"enableDrag",void 0),s([F.Property(null)],c.prototype,"linearGradient",void 0),s([F.Property(null)],c.prototype,"radialGradient",void 0);var it,nt=c;function c(){var e=null!==it&&it.apply(this,arguments)||this;return e.isPointerAnimation=!0,e}ot=F.ChildProperty,i(v,ot),s([F.Property(null)],v.prototype,"minimum",void 0),s([F.Property(null)],v.prototype,"maximum",void 0),s([F.Property(!1)],v.prototype,"showLastLabel",void 0),s([F.Property(!1)],v.prototype,"hideIntersectingLabel",void 0),s([F.Property(null)],v.prototype,"roundingPlaces",void 0),s([F.Property(null)],v.prototype,"radius",void 0),s([F.Complex({},De)],v.prototype,"lineStyle",void 0),s([F.Collection([{}],je)],v.prototype,"ranges",void 0),s([F.Collection([{}],nt)],v.prototype,"pointers",void 0),s([F.Collection([{}],tt)],v.prototype,"annotations",void 0),s([F.Complex({width:2,height:10},Ve)],v.prototype,"majorTicks",void 0),s([F.Complex({width:2,height:5},Ve)],v.prototype,"minorTicks",void 0),s([F.Property(200)],v.prototype,"startAngle",void 0),s([F.Property(160)],v.prototype,"endAngle",void 0),s([F.Property("ClockWise")],v.prototype,"direction",void 0),s([F.Property(null)],v.prototype,"background",void 0),s([F.Property(null)],v.prototype,"rangeGap",void 0),s([F.Property(!1)],v.prototype,"startAndEndRangeGap",void 0),s([F.Complex({},We)],v.prototype,"labelStyle",void 0);var ot,i=v;function v(){var e=null!==ot&&ot.apply(this,arguments)||this;return e.visibleLabels=[],e}var at="animationComplete",rt="axisLabelRender",lt="tooltipRender",st="gaugeMouseLeave",dt="gaugeMouseUp",gt="dragStart",ht="dragMove",ut="dragEnd",pt="resized",ct=(mt.prototype.renderAnnotation=function(e,i,n){var o=this,t=n.availableSize.width,a=F.createElement("div",{id:n.element.id+"_Annotations_"+i}),r=(a.style.opacity=n.allowLoadingAnimation?"0":"1",h(n.element.id+"_Secondary_Element"));F.isNullOrUndefined(document.getElementById(n.element.id+"_Secondary_Element"))||(document.getElementById(n.element.id+"_Secondary_Element").style.width=t+"px"),e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(a,t,i,n)}),r&&a.childElementCount&&r.appendChild(a),n.renderReactTemplates()},mt.prototype.annotationAnimation=function(e){for(var t=0;t<e.axes.length;t++){var i=document.getElementById(e.element.id+"_Annotations_"+t);F.isNullOrUndefined(i)||"0"===i.style.opacity&&this.annotationAnimate(i,e,t)}},mt.prototype.annotationAnimate=function(t,e,i){var n;new F.Animation({}).animate(t,{duration:e.loadingAnimationDuration[i],progress:function(e){e.timeStamp>e.delay&&(n=(e.timeStamp-e.delay)/e.duration,t.style.opacity=n)},end:function(){t.style.opacity=1,e.isOverAllAnimationComplete=!0}})},mt.prototype.createTemplate=function(a,r,l,s){var d=this,g=s.axes[l],h=g.annotations[r],u=F.createElement("div",{id:s.element.id+"_Axis_"+l+"_Annotation_"+r}),p=(u.style.cssText="position: absolute; z-index:"+h.zIndex+";transform:"+(h.autoAngle?"rotate("+(h.angle-90)+"deg)":"rotate(0deg)")+";",{cancel:!1,name:"annotationRender",content:h.content,axis:g,annotation:h,textStyle:h.textStyle});s.trigger("annotationRender",p,function(e){if(!p.cancel){if((o=$(p.content,s))&&o(g,s,p.content,s.element.id+"_Axis"+l+"_ContentTemplate"+r).length)for(var t,i=(t=Array.prototype.slice.call(o(g,s,p.content,s.element.id+"_Axis"+l+"_ContentTemplate"+r))).length,n=0;n<i;n++)u.appendChild(t[n]);else{var o=F.createElement("div",{innerHTML:F.isNullOrUndefined(p.content)?null:p.content.toString(),id:"StringTemplate"});o.style.cssText=W(p.textStyle),u.appendChild(o)}d.updateLocation(u,g,h,s),a.appendChild(u)}})},mt.prototype.updateLocation=function(e,t,i,n){t=M(i.angle-90,w(i.radius,t.currentRadius),n.midPoint),n=this.measureElementRect(e);e.style.left=t.x-n.width/2+"px",e.style.top=t.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation"),e.setAttribute("role","region")},mt.prototype.getModuleName=function(){return"Annotations"},mt.prototype.destroy=function(){},mt.prototype.measureElementRect=function(e){document.body.appendChild(e);var t=e.getBoundingClientRect();return K(e.id),t},mt);function mt(e){}function yt(e,t,i){var n=i.getBoundingClientRect(),o=i.ownerDocument.defaultView.pageXOffset,a=i.ownerDocument.defaultView.pageYOffset,r=i.ownerDocument.documentElement.clientTop,i=i.ownerDocument.documentElement.clientLeft,o=n.left+o-i,i=n.top+a-r;return new de(e-o,t-i)}function ft(e,t,i){var n,o,e=$(e,t),a=e?t.isVue||t.isVue3?e({},t,null,t.element.id+"Template"):e({},null,null,t.element.id+"Template"):[];if(e&&a.length){o=t.createElement("div",{id:t.element.id+"_Measure_Element"}),t.element.appendChild(o);for(var r=t.isVue||t.isVue3?e({},t,null,t.element.id+"Template"):e({},null,null,t.element.id+"Template"),l=r.length;0<l;)o.appendChild(r[0]),l--;i.appendChild(o),n=new x(i.getBoundingClientRect().width,i.getBoundingClientRect().height),F.remove(o)}return n}function xt(e,t,i){var n=t;if(e<f(t,i).width)for(var o=t.length-1;0<=o;--o)if(f(n=t.substring(0,o)+"...",i).width<=e)return n;return n}function vt(e,t,i,n,o){var a,r,l,s=new _(n.margin.left,n.margin.top+10,n.availableSize.width-(n.margin.left+n.margin.right),n.availableSize.height-(n.margin.top-n.margin.bottom));"Title"===o?(a=n.element.id+"_EJ2_Title_Tooltip",r=document.getElementById(a),l=f(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}).width+5,s.width=l<s.width?l:s.width-10,r||At()):"LegendText"===o&&(a=n.element.id+"_EJ2_Legend_Tooltip",(r=document.getElementById(a))||At(),t=t+(l=f(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}).width+5)>s.width?t-l:t,s.x=t<0?5:t,s.y=i,s.width=l),r?(r.innerText=e,r.style.top=(s.y+15).toString()+"px",r.style.left=s.x.toString()+"px"):((r=F.createElement("div",{id:a,className:"EJ2-CircularGauge-Tooltip"})).innerText=e,r.style.cssText="top:"+(s.y+15).toString()+"px;left:"+s.x.toString()+'px; background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute; border:1px solid rgb(112, 112, 112); padding-left : 3px; padding-right : 2px;padding-bottom: 2px; padding-top : 2px; font-size:12px; text-align: center; font-family: "Segoe UI"; width:'+s.width+"px;",h(n.element.id+"_Secondary_Element").appendChild(r))}function bt(e,t,i,n,o){var a=e.target.id,r=document.getElementById(n.element.id+"_svg").getBoundingClientRect(),r=(t-=r.left,i-=r.top,document.getElementsByClassName("EJ2-CircularGauge-Tooltip"));if(a===n.element.id+"_CircularGaugeTitle"&&-1<e.target.textContent.indexOf("..."))vt(n.title,t,i,n,"Title");else if(-1<e.target.textContent.indexOf("...")&&-1<a.indexOf("_gauge_legend_")&&n.legendSettings.visible){for(var l=parseInt(a.split(n.element.id+"_gauge_legend_Axis_")[1].split("_text_")[0],10),s=parseInt(a.split(n.element.id+"_gauge_legend_Axis_")[1].split("_text_")[1],10),d="",g=0,h=n.legendModule.legendCollection;g<h.length;g++){var u=h[g];u.rangeIndex===s&&u.axisIndex===l&&(d=u.originalText)}vt(d,t,i,n,"LegendText")}else 0<r.length&&(-1<r[0].id.indexOf("Title_Tooltip")||-1<r[0].id.indexOf("Legend_Tooltip"))&&At();o&&!F.isNullOrUndefined(this)&&(clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(At.bind(this),2e3))}function At(){0<document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length&&document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove()}b.prototype.renderTooltip=function(e){var n,t,o,a,r,l,s,d,g,h,u=this,p=(this.gaugeId=this.gauge.element.getAttribute("id"),!1),i=!1,c=(-1!==e.type.indexOf("touch")?(t=e.target,n=e.changedTouches[0].pageX,e.changedTouches[0]):(t=e.target,n=e.pageX,e)).pageY;if(-1<this.tooltip.type.indexOf("Pointer")&&0<=t.id.indexOf("_Pointer_")&&0<=t.id.indexOf(this.gaugeId)){null!==this.pointerEle&&(p=this.pointerEle===t);var i=!0,m=this.gauge.svgObject.getBoundingClientRect(),y=this.gauge.element.getBoundingClientRect(),f=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),x=new _(Math.abs(y.left-m.left),Math.abs(y.top-m.top),m.width,m.height),y=Q(t.id,this.gauge),v=(this.currentAxis=this.gauge.axes[y.axisIndex],this.currentPointer=this.currentAxis.pointers[y.pointerIndex],O(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360),y=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,b=y&&null!==y.match("{value}"),A=this.gauge.intl.getNumberFormat({format:ee(y),useGrouping:this.gauge.useGroupingSeparator});if(this.tooltipElement(),0!==this.tooltipEle.childElementCount&&!this.gauge.enablePointerDrag&&!this.gauge.tooltip.showAtMousePosition)return null;var C=this.roundedValue(this.currentPointer.currentValue),y=b?y.replace(new RegExp("{value}","g"),A(C)):A(C),C=((A=M(v,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(150<=v&&v<=250||330<=v&&v<=360||0<=v&&v<=45)?A.x+10:A.x,{name:lt,cancel:!1,content:y,location:A,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Pointer"});this.gauge.trigger(lt,C,function(e){var t,i=e.tooltip.template;null!==i&&1===i.length&&"function"!=typeof i&&(i=i[i[0]]),e.tooltip.showAtMousePosition?(e.location=yt(n,c,u.gauge.svgObject),u.tooltipRect=x):i?(t=ft(i,u.gauge,u.tooltipEle),u.tooltipRect=Math.abs(f.left-m.left)>t.width?u.findPosition(x,v,e.location,!0):x):u.findPosition(x,v,e.location,!1),e.cancel||p||(t={color:e.tooltip.textStyle.color||u.gauge.themeStyle.tooltipFontColor,opacity:e.tooltip.textStyle.opacity||u.gauge.themeStyle.tooltipTextOpacity,fontFamily:e.tooltip.textStyle.fontFamily||u.gauge.themeStyle.fontFamily,fontWeight:e.tooltip.textStyle.fontWeight||u.gauge.themeStyle.fontWeight,fontStyle:e.tooltip.textStyle.fontStyle,size:e.tooltip.textStyle.size||u.gauge.themeStyle.tooltipFontSize},u.svgTooltip=u.svgTooltipCreate(u.svgTooltip,e,i,u.arrowInverted,u.tooltipRect,u.gauge,e.tooltip.fill,t,e.tooltip.border),u.svgTooltip.opacity=u.gauge.themeStyle.tooltipFillOpacity||u.svgTooltip.opacity,u.svgTooltip.appendTo(u.tooltipEle),!i||"LeftTop"!==u.tooltipPosition&&"LeftBottom"!==u.tooltipPosition||(u.tooltipEle.style.left=parseFloat(u.tooltipEle.style.left)-u.tooltipEle.getBoundingClientRect().width-20+"px"),i&&Math.abs(c-u.tooltipEle.getBoundingClientRect().top)<=0&&(u.tooltipEle.style.top=parseFloat(u.tooltipEle.style.top)+20+"px"))}),this.gauge.renderReactTemplates()}else-1<this.tooltip.type.indexOf("Range")&&0<=t.id.indexOf("_Range_")&&!this.gauge.isDrag&&0<=t.id.indexOf(this.gaugeId)?(i=!0,o=this.gauge.svgObject.getBoundingClientRect(),y=this.gauge.element.getBoundingClientRect(),a=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),r=new _(Math.abs(y.left-o.left),Math.abs(y.top-o.top),o.width,o.height),C=Q(t.id,this.gauge),this.currentAxis=this.gauge.axes[C.axisIndex],this.currentRange=this.currentAxis.ranges[C.pointerIndex],l=O(this.currentRange.end-Math.abs((this.currentRange.end-this.currentRange.start)/2),this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,b=(y=this.gauge.tooltip.rangeSettings.format||this.currentAxis.labelStyle.format)&&(null!==y.match("{end}")||null!==y.match("{start}")),C=this.gauge.intl.getNumberFormat({format:ee(y),useGrouping:this.gauge.useGroupingSeparator}),this.tooltipElement(),P=this.roundedValue(this.currentRange.start),S=this.roundedValue(this.currentRange.end),s=this.currentRange.start.toString(),d=this.currentRange.end.toString(),b=b?y.replace(/{start}/g,s).replace(/{end}/g,d):this.gauge.enableRtl?"Start:"+C(P)+" <br>End:"+C(S)+" ":"Start : "+C(P)+"<br>End : "+C(S),(A=M(l,this.currentRange.currentRadius,this.gauge.midPoint)).x=this.tooltip.rangeSettings.template&&(150<=l&&l<=250||330<=l&&l<=360||0<=l&&l<=45)?A.x+10:A.x,y={name:lt,cancel:!1,content:b,location:A,axis:this.currentAxis,tooltip:this.tooltip,range:this.currentRange,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Range"},g={color:this.gauge.tooltip.rangeSettings.textStyle.color,opacity:this.gauge.tooltip.rangeSettings.textStyle.opacity,fontFamily:this.gauge.tooltip.rangeSettings.textStyle.fontFamily,fontStyle:this.gauge.tooltip.rangeSettings.textStyle.fontStyle,fontWeight:this.gauge.tooltip.rangeSettings.textStyle.fontWeight,size:this.gauge.tooltip.rangeSettings.textStyle.size},this.gauge.trigger(lt,y,function(e){var t,i=e.tooltip.rangeSettings.template;"function"!=typeof(i=null!==i&&1===i.length&&"function"!=typeof i?i[i[0]]:i)&&(i=i&&(i=i.replace(/[$]{start}/g,s)).replace(/[$]{end}/g,d)),u.tooltip.rangeSettings.showAtMousePosition?(e.location=yt(n,c,u.gauge.svgObject),u.tooltipRect=r):i?(t=ft(i,u.gauge,u.tooltipEle),u.tooltipRect=Math.abs(a.left-o.left)>t.width?u.findPosition(r,l,e.location,!0):r):u.findPosition(r,l,e.location,!1),e.cancel||(g.color=e.tooltip.rangeSettings.textStyle.color||u.gauge.themeStyle.tooltipFontColor,g.fontFamily=e.tooltip.rangeSettings.textStyle.fontFamily||u.gauge.themeStyle.fontFamily,g.fontWeight=e.tooltip.rangeSettings.textStyle.fontWeight||u.gauge.themeStyle.fontWeight,g.opacity=e.tooltip.rangeSettings.textStyle.opacity||u.gauge.themeStyle.tooltipTextOpacity,g.size=e.tooltip.rangeSettings.textStyle.size||u.gauge.themeStyle.tooltipFontSize,u.svgTooltip=u.svgTooltipCreate(u.svgTooltip,e,i,u.arrowInverted,u.tooltipRect,u.gauge,e.tooltip.rangeSettings.fill,g,e.tooltip.rangeSettings.border),u.svgTooltip.opacity=u.gauge.themeStyle.tooltipFillOpacity||u.svgTooltip.opacity,u.svgTooltip.appendTo(u.tooltipEle),!i||"LeftTop"!==u.tooltipPosition&&"LeftBottom"!==u.tooltipPosition||(u.tooltipEle.style.left=parseFloat(u.tooltipEle.style.left)-u.tooltipEle.getBoundingClientRect().width-20+"px"),i&&Math.abs(c-u.tooltipEle.getBoundingClientRect().top)<=0&&(u.tooltipEle.style.top=parseFloat(u.tooltipEle.style.top)+20+"px"))}),this.gauge.renderReactTemplates()):-1<this.tooltip.type.indexOf("Annotation")&&this.checkParentAnnotationId(t)&&!this.gauge.isDrag&&0<=this.annotationTargetElement.id.indexOf(this.gaugeId)?(i=!0,P=this.gauge.svgObject.getBoundingClientRect(),C=this.gauge.element.getBoundingClientRect(),h=new _(Math.abs(C.left-P.left),Math.abs(C.top-P.top),P.width,P.height),S=Q(this.annotationTargetElement.id,this.gauge),this.currentAxis=this.gauge.axes[S.axisIndex],this.currentAnnotation=this.currentAxis.annotations[S.pointerIndex],b=this.currentAnnotation.angle-90,this.tooltipElement(),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle),y=null!==this.gauge.tooltip.annotationSettings.format?this.gauge.tooltip.annotationSettings.format:"",(A=M(b,w(this.currentAnnotation.radius,this.currentAxis.currentRadius),this.gauge.midPoint)).x=this.tooltip.annotationSettings.template&&(150<=b&&b<=250||330<=b&&b<=360||0<=b&&b<=45)?A.x+10:A.x,C={name:lt,cancel:!1,content:y,location:A,axis:this.currentAxis,tooltip:this.tooltip,annotation:this.currentAnnotation,event:e,gauge:this.gauge,appendInBodyTag:!1,type:"Annotation"},this.gauge.trigger(lt,C,function(e){var t=e.tooltip.annotationSettings.template,i=(null!==t&&1===t.length&&"function"!=typeof t&&(t=t[t[0]]),u.annotationTargetElement.getBoundingClientRect());u.tooltipPosition="RightTop",u.arrowInverted=!0,e.location.x=e.location.x+i.width/2,u.tooltipRect=new _(h.x,h.y,h.width,h.height),e.cancel||null===u.gauge.tooltip.annotationSettings.format&&null===u.gauge.tooltip.annotationSettings.template||(i={color:e.tooltip.textStyle.color||u.gauge.themeStyle.tooltipFontColor,fontFamily:e.tooltip.textStyle.fontFamily||u.gauge.themeStyle.fontFamily,fontWeight:e.tooltip.textStyle.fontWeight||u.gauge.themeStyle.fontWeight,opacity:e.tooltip.textStyle.opacity||u.gauge.themeStyle.tooltipTextOpacity,fontStyle:e.tooltip.textStyle.fontStyle,size:e.tooltip.textStyle.size||u.gauge.themeStyle.tooltipFontSize},u.svgTooltip=u.svgTooltipCreate(u.svgTooltip,e,t,u.arrowInverted,u.tooltipRect,u.gauge,e.tooltip.annotationSettings.fill,i,e.tooltip.annotationSettings.border),u.svgTooltip.opacity=u.gauge.themeStyle.tooltipFillOpacity||u.svgTooltip.opacity,u.svgTooltip.appendTo(u.tooltipEle),t&&Math.abs(c-u.tooltipEle.getBoundingClientRect().top)<=0&&(u.tooltipEle.style.top=parseFloat(u.tooltipEle.style.top)+20+"px"))}),this.gauge.renderReactTemplates()):(t.id===this.gauge.element.id+"_CircularGaugeTitle"||-1<t.id.indexOf("_gauge_legend_"))&&-1<e.target.textContent.indexOf("...")?bt(e,n,c,this.gauge,!1):this.removeTooltip()&&(this.gauge.isVue||this.gauge.isVue3?this.gauge.clearTemplate([this.tooltipEle.children[0].id],[0]):this.gauge.isAngular||this.gauge.clearTemplate());var P=document.getElementById(this.gaugeId).getBoundingClientRect(),S=i?this.tooltipEle.getBoundingClientRect():null;i&&this.tooltipEle.offsetLeft<0&&S.left-P.left<0&&(b=this.tooltipEle.style.left.split("px")[0],this.tooltipEle.style.left=parseInt(b,10)+(P.left-S.left)+"px"),i&&S.top<0&&(this.tooltipEle.style.top="0px")},b.prototype.svgTooltipCreate=function(e,t,i,n,o,a,r,l,s){s={color:s.color||this.gauge.themeStyle.tooltipBorderColor||"",width:s.width,dashArray:s.dashArray};return e=new B.Tooltip({theme:a.theme,enable:!0,data:{value:t.content},template:i,enableRTL:a.enableRtl,enableAnimation:t.tooltip.enableAnimation,content:[F.SanitizeHtmlHelper.sanitize(t.content)],location:t.location,inverted:n,areaBounds:o,fill:r||a.themeStyle.tooltipFillColor,textStyle:l,availableSize:a.availableSize,border:s,enableShadow:!0}),(a.isVue||a.isVue3)&&(e.controlInstance=a),e},b.prototype.tooltipElement=function(){document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=F.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip"}),this.tooltipEle.style.cssText="position: absolute;pointer-events:none;",document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle))},b.prototype.checkParentAnnotationId=function(e){for(this.annotationTargetElement=e.parentElement;null!=this.annotationTargetElement;){if(0<=this.annotationTargetElement.id.indexOf("_Annotation_"))return e=this.annotationTargetElement,!0;this.annotationTargetElement=this.annotationTargetElement.parentElement}return!1},b.prototype.roundedValue=function(e){return this.currentAxis.roundingPlaces?parseFloat(e.toFixed(this.currentAxis.roundingPlaces)):e},b.prototype.findPosition=function(e,t,i,n){var o,a,r,l;switch(!0){case 0<=t&&t<45:this.arrowInverted=!0,o=15<=t&&t<=30?i.y:0,this.tooltipRect=new _(e.x,e.y+a,e.width,e.height),this.tooltipPosition="RightBottom";break;case 45<=t&&t<90:this.arrowInverted=!1,this.tooltipRect=new _(e.x,e.y+i.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case 90<=t&&t<135:this.arrowInverted=!1,this.tooltipRect=new _(e.x,e.y+i.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case 135<=t&&t<180:this.arrowInverted=n&&!0,a=150<=t&&t<=160&&n?i.y:0,this.tooltipRect=new _(e.x,e.y+a,e.width,e.height),this.tooltipPosition="LeftBottom";break;case 180<=t&&t<225:this.arrowInverted=!0,r=200<=t&&t<=225?Math.abs(e.y-i.y):e.height,this.tooltipRect=new _(e.x-i.x,e.y,e.width,r),this.tooltipPosition="LeftTop";break;case 225<=t&&t<270:this.arrowInverted=!1,l=250<=t&&t<=290?e.width:Math.abs(e.x-i.x),this.tooltipRect=new _(e.x+10,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case 270<=t&&t<315:this.arrowInverted=!1,o=270<=t&&290<t?i.x-10:0,this.tooltipRect=new _(e.x+o,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case 315<=t&&t<=360:this.arrowInverted=!0,r=315<=t&&t<=340?Math.abs(e.y-i.y):e.height,this.tooltipRect=new _(e.x,e.y,e.width,r),this.tooltipPosition="RightTop"}return this.tooltipRect},b.prototype.removeTooltip=function(){var e,t=!1;return 0<document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length&&((e=document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0])&&(F.remove(e),t=!0),this.pointerEle=null),t},b.prototype.mouseUpHandler=function(e){this.removeTooltip(),this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},b.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(F.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(F.Browser.touchEndEvent,this.mouseUpHandler,this),this.gauge.element.addEventListener("contextmenu",this.removeTooltip))},b.prototype.removeEventListener=function(){!this.gauge||this.gauge.isDestroyed||(this.gauge.off(F.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(F.Browser.touchEndEvent,this.mouseUpHandler),this.gauge.element.removeEventListener("contextmenu",this.removeTooltip))},b.prototype.getModuleName=function(){return"Tooltip"},b.prototype.destroy=function(){this.tooltipEle=null,this.currentAxis=null,this.tooltip=null,this.currentPointer=null,this.currentRange=null,this.currentAnnotation=null,F.isNullOrUndefined(this.svgTooltip)||(this.svgTooltip.destroy(),this.svgTooltip.controlInstance=null,K(this.tooltipId)),this.svgTooltip=null,this.tooltipRect=null,this.pointerEle=null,this.annotationTargetElement=null,this.gauge=null};var Ct=b;function b(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.addEventListener()}function Pt(e,t,i){for(var n=0,o=i.length;e<o;e++)n+=i[e];return n}function St(t,e,i){var n=0,o=0,e=e.filter(function(e){return n=Math.min(e.start,e.end),o=Math.max(e.start,e.end),n<=t&&t<=o});return e.length?e[0].rangeColor:i}A.prototype.drawAxisOuterLine=function(e,t,i,n){var o=e.background;this.setRangeColor(e),null!==o&&m(new y(n.element.id+"_AxisOuterLine_"+t,o,0,"transparent",null,"0",U(n.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,n)},A.prototype.checkAngles=function(e){e.startAngle=360<=e.startAngle?360:e.startAngle<=-360?-360:e.startAngle,e.endAngle=360<=e.endAngle?360:e.endAngle<=-360?-360:e.endAngle},A.prototype.drawAxisLine=function(e,t,i,n){var o=e.startAngle,a=e.endAngle,r=e.lineStyle.color||this.gauge.themeStyle.lineColor;0<e.lineStyle.width&&this.gauge.allowComponentRender&&(o=k(o,a)?[0,a=360][0]:o,m(new y(n.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,r,null,e.lineStyle.dashArray,U(n.midPoint,o-90,a-90,e.currentRadius),"",n.allowLoadingAnimation?"visibility: hidden; pointer-events:none;":"pointer-events:none;"),i,n))},A.prototype.drawAxisLabels=function(e,t,i,n){var o,a,r,l,s,d,g,h,u,p,c,m=n.renderer.createGroup({id:n.element.id+"_Axis_Labels_"+t,style:n.allowLoadingAnimation?"visibility: hidden;":"pointer-events:auto;"}),y=e.visibleRange.min,f=e.visibleRange.max,x=e.visibleLabels,v=!0,b=e.labelStyle,A=e.currentRadius,C="Inside"===b.position&&"Outside"===e.majorTicks.position&&"Outside"===e.minorTicks.position||"Outside"===b.position&&"Inside"===e.minorTicks.position&&"Inside"===e.majorTicks.position?e.lineStyle.width+e.currentRadius/20:b.position===e.majorTicks.position?e.currentRadius/20:e.currentRadius/40,C=e.labelStyle.shouldMaintainPadding?10:C,P=b.font.color||this.gauge.themeStyle.labelColor;"Outside"===b.position?A+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+C/2:"Cross"===b.position?A=A-e.maxLabelSize.height/4-e.labelStyle.offset:A-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(b.autoAngle?C:0),e.hideIntersectingLabel&&(g=M(C=Math.round(O(x[x.length-1].value,f,y,e.startAngle,e.endAngle,"ClockWise"===e.direction)),A,n.midPoint),h=this.findAnchor(g,b,C,x[x.length-1]),u=(!e.showLastLabel&&k(e.startAngle,e.endAngle)&&"First"!==b.hiddenLabel?x[0]:x[x.length-1]).size.width,p=!e.showLastLabel&&k(e.startAngle,e.endAngle)&&"First"!==b.hiddenLabel?b.autoAngle?x[0].size.width:x[0].size.height:b.autoAngle?x[x.length-1].size.width:x[x.length-1].size.height,p-=this.offsetAxisLabelsize(C,p),g=this.getAxisLabelStartPosition(g,u,h));for(var S=0,w=x.length;S<w;S++){var F,R,_=x[S],T=M(c=Math.round(O(_.value,f,y,e.startAngle,e.endAngle,"ClockWise"===e.direction)),A,n.midPoint),E=this.findAnchor(T,b,c,_);e.hideIntersectingLabel&&(d=M(c,A,n.midPoint),r=_.size.width,l=b.autoAngle?r:_.size.height,l-=this.offsetAxisLabelsize(c,l),d=this.getAxisLabelStartPosition(d,r,E),0===S)&&(s=M(c,A,n.midPoint),o=_.size.width,a=b.autoAngle?o:_.size.height,a-=this.offsetAxisLabelsize(c,a),s=this.getAxisLabelStartPosition(s,o,E)),0===S&&"First"===b.hiddenLabel||S===w-1&&"Last"===b.hiddenLabel||(F={size:b.font.size||this.gauge.themeStyle.fontSize,color:b.font.color,fontFamily:b.font.fontFamily||this.gauge.themeStyle.labelFontFamily,fontWeight:b.font.fontWeight||this.gauge.themeStyle.fontWeight,fontStyle:b.font.fontStyle,opacity:b.font.opacity},((v=!e.hideIntersectingLabel||0===S||(R=S===x.length-1||!k(e.startAngle,e.endAngle)&&!e.showLastLabel||this.FindAxisLabelCollision(g,u,p,d,r,l),this.FindAxisLabelCollision(s,o,a,d,r,l)&&R))||S===x.length-1)&&(_.text=!e.showLastLabel&&(k(e.startAngle,e.endAngle)&&"First"!==b.hiddenLabel||!v)&&e.hideIntersectingLabel&&S===w-1?"":_.text,_.text=e.showLastLabel&&e.hideIntersectingLabel&&k(e.startAngle,e.endAngle)&&0===S?"":_.text,(R=G(new ge(n.element.id+"_Axis_"+t+"_Label_"+S,T.x,T.y,E,_.text,b.autoAngle?"rotate("+(c+90)+","+T.x+","+T.y+")":"","auto"),F,b.useRangeColor?St(_.value,e.ranges,P):P,m,"pointer-events:auto;")).setAttribute("aria-label",_.text),R.setAttribute("role","region"),e.hideIntersectingLabel)&&(o=_.size.width,a=b.autoAngle?o:_.size.height,a-=this.offsetAxisLabelsize(c,a),s.x=d.x,s.y=d.y))}i.appendChild(m)},A.prototype.findAnchor=function(e,t,i,n){var o;return t.autoAngle?"middle":(o="Inside"===t.position?120<i&&i<240?"start":300<i||i<60?"end":"middle":120<i&&i<240?"end":300<i||i<60?"start":"middle",e.y+="Inside"===t.position?240<=i&&i<=300?n.size.height/2:60<=i&&i<=120?0:n.size.height/4:240<=i&&i<=300?0:60<=i&&i<=120?n.size.height/2:n.size.height/4,o)},A.prototype.FindAxisLabelCollision=function(e,t,i,n,o,a){return e.x>n.x+o||e.x+t<n.x||e.y+i<n.y||e.y>n.y+a},A.prototype.getAxisLabelStartPosition=function(e,t,i){return"end"===i?e.x=e.x-t:"middle"===i&&(e.x=e.x-t/2),e},A.prototype.offsetAxisLabelsize=function(e,t){return 20<=e&&e<=60||120<=e&&e<=160||200<=e&&e<=240||300<=e&&e<=340?t/5:0},A.prototype.drawMinorTickLines=function(e,t,i,n){var o=n.renderer.createGroup({id:n.element.id+"_Axis_MinorTickLines_"+t}),a=e.minorTicks,r=null!==a.interval?a.interval:e.visibleRange.interval/2,l=a.useRangeColor,s=a.color||this.gauge.themeStyle.minorTickColor;if(a.width&&a.height&&r){for(var d=0,g=e.visibleRange.min,h=e.visibleRange.max;g<=h;g+=r)this.majorValues.indexOf(+g.toFixed(3))<0&&m(new y(n.element.id+"_Axis_Minor_TickLine_"+t+"_"+d++,"transparent",a.width,l?St(g,e.ranges,s):s,null,a.dashArray,this.calculateTicks(g,a,e),"",n.allowLoadingAnimation?"visibility: hidden;pointer-events: auto;":"pointer-events:auto;"),o,n).setAttribute("data-interval",g.toString());i.appendChild(o)}},A.prototype.drawMajorTickLines=function(e,t,i,n){var o=n.renderer.createGroup({id:n.element.id+"_Axis_MajorTickLines_"+t}),a=e.majorTicks,r=a.useRangeColor,l=(this.majorValues=[],a.color||this.gauge.themeStyle.majorTickColor);if(a.width&&a.height&&e.visibleRange.interval){for(var s=0,d=e.visibleRange.min,g=e.visibleRange.max,h=e.visibleRange.interval;d<=g;d+=h)this.majorValues.push(+d.toFixed(3)),m(new y(n.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",a.width,r?St(d,e.ranges,l):l,null,a.dashArray,this.calculateTicks(d,a,e),"",n.allowLoadingAnimation?"visibility: hidden;pointer-events:auto;":"pointer-events:auto;"),o,n).setAttribute("data-interval",d.toString()),s++;i.appendChild(o)}},A.prototype.calculateTicks=function(e,t,i){var n=i.lineStyle.width/2+t.offset,e=O(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),o=M(e,i.currentRadius+("Outside"===t.position?n:"Cross"===t.position?t.height/2-t.offset:-n),this.gauge.midPoint),e=M(e,i.currentRadius+("Outside"===t.position?n:"Cross"===t.position?t.height/2-t.offset:-n)+("Outside"===t.position?t.height:-t.height),this.gauge.midPoint);return"M "+o.x+" "+o.y+" L "+e.x+" "+e.y+" "},A.prototype.drawRangePath=function(e,t,i,n,o,a,r,l){var s,d,g,h,u,p,c,m,y,f=this.gauge.midPoint,x="ClockWise"===e.direction,v=e.visibleRange.min,b=e.visibleRange.max,A=(m=t.isLinearCircularGradient?(g=(t.end-t.start)/t.linearGradient.colorStop.length,m=1<t.linearGradient.colorStop.length?t.start+g*l:t.start,g=1<t.linearGradient.colorStop.length?m+g:t.end