12345678910 |
- /*!
- * filename: ej2-charts.min.js
- * version : 19.1.65
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
- * Use of this code is subject to the terms of our license.
- * A copy of the current license can be obtained at any time by e-mailing
- * licensing@syncfusion.com. Any infringement will be prosecuted under
- * applicable laws.
- */
- this.ej=this.ej||{},this.ej.charts=function(e,t,i,r,o,n,a,s,l){"use strict";function h(e){var t;switch(e){case"Fabric":t=["#4472c4","#ed7d31","#ffc000","#70ad47","#5b9bd5","#c1c1c1","#6f6fe2","#e269ae","#9e480e","#997300"];break;case"Bootstrap4":case"Bootstrap":t=["#a16ee5","#f7ce69","#55a5c2","#7ddf1e","#ff6ea6","#7953ac","#b99b4f","#407c92","#5ea716","#b91c52"];break;case"HighContrastLight":case"Highcontrast":case"HighContrast":t=["#79ECE4","#E98272","#DFE6B6","#C6E773","#BA98FF","#FA83C3","#00C27A","#43ACEF","#D681EF","#D8BC6E"];break;case"MaterialDark":t=["#00bdae","#404041","#357cd2","#e56590","#f8b883","#70ad47","#dd8abd","#7f84e8","#7bb4eb","#ea7a57"];break;case"FabricDark":t=["#4472c4","#ed7d31","#ffc000","#70ad47","#5b9bd5","#c1c1c1","#6f6fe2","#e269ae","#9e480e","#997300"];break;case"BootstrapDark":t=["#a16ee5","#f7ce69","#55a5c2","#7ddf1e","#ff6ea6","#7953ac","#b99b4f","#407c92","#5ea716","#b91c52"];break;default:t=["#00bdae","#404041","#357cd2","#e56590","#f8b883","#70ad47","#dd8abd","#7f84e8","#7bb4eb","#ea7a57"]}return t}function c(e){var t,i="MaterialDark"===e?"#303030":"FabricDark"===e?"#201F1F":"1A1A1A";switch(e){case"HighContrastLight":case"Highcontrast":case"HighContrast":t={axisLabel:"#ffffff",axisTitle:"#ffffff",axisLine:"#ffffff",majorGridLine:"#BFBFBF",minorGridLine:"#969696",majorTickLine:"#BFBFBF",minorTickLine:"#969696",chartTitle:"#ffffff",legendLabel:"#ffffff",background:"#000000",areaBorder:"#ffffff",errorBar:"#ffffff",crosshairLine:"#ffffff",crosshairFill:"#ffffff",crosshairLabel:"#000000",tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696",markerShadow:"#BFBFBF",selectionRectFill:"rgba(255, 217, 57, 0.3)",selectionRectStroke:"#ffffff",selectionCircleStroke:"#FFD939"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":t={axisLabel:"#DADADA",axisTitle:"#ffffff",axisLine:" #6F6C6C",majorGridLine:"#414040",minorGridLine:"#514F4F",majorTickLine:"#414040",minorTickLine:" #4A4848",chartTitle:"#ffffff",legendLabel:"#DADADA",background:i,areaBorder:" #9A9A9A",errorBar:"#ffffff",crosshairLine:"#F4F4F4",crosshairFill:"#F4F4F4",crosshairLabel:"#282727",tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A",markerShadow:null,selectionRectFill:"rgba(56,169,255, 0.1)",selectionRectStroke:"#38A9FF",selectionCircleStroke:"#282727"};break;case"Bootstrap4":t={axisLabel:"#212529",axisTitle:"#212529",axisLine:"#CED4DA",majorGridLine:"#CED4DA",minorGridLine:"#DEE2E6",majorTickLine:"#ADB5BD",minorTickLine:"#CED4DA",chartTitle:"#212529",legendLabel:"#212529",background:"#FFFFFF",areaBorder:"#DEE2E6",errorBar:"#000000",crosshairLine:"#6C757D",crosshairFill:"#495057",crosshairLabel:"#FFFFFF",tooltipFill:"rgba(0, 0, 0, 0.9)",tooltipBoldLabel:"rgba(255,255,255)",tooltipLightLabel:"rgba(255,255,255, 0.9)",tooltipHeaderLine:"rgba(255,255,255, 0.2)",markerShadow:null,selectionRectFill:"rgba(255,255,255, 0.1)",selectionRectStroke:"rgba(0, 123, 255)",selectionCircleStroke:"#495057"};break;default:t={axisLabel:"#686868",axisTitle:"#424242",axisLine:"#b5b5b5",majorGridLine:"#dbdbdb",minorGridLine:"#eaeaea",majorTickLine:"#b5b5b5",minorTickLine:"#d6d6d6",chartTitle:"#424242",legendLabel:"#353535",background:"#FFFFFF",areaBorder:"Gray",errorBar:"#000000",crosshairLine:"#4f4f4f",crosshairFill:"#4f4f4f",crosshairLabel:"#e5e5e5",tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff",markerShadow:null,selectionRectFill:"rgba(41, 171, 226, 0.1)",selectionRectStroke:"#29abe2",selectionCircleStroke:"#29abe2"}}return t}function d(e){var t;switch(e){case"HighContrastLight":t={backRect:"#333",thumb:"#bfbfbf",circle:"#fff",circleHover:"#685708",arrow:"#333",grip:"#333",arrowHover:"#fff",backRectBorder:"#969696"};break;case"Bootstrap":t={backRect:"#f5f5f5",thumb:"#e6e6e6",circle:"#fff",circleHover:"#eee",arrow:"#8c8c8c",grip:"#8c8c8c"};break;case"Fabric":t={backRect:"#f8f8f8",thumb:"#eaeaea",circle:"#fff",circleHover:"#eaeaea",arrow:"#a6a6a6",grip:"#a6a6a6"};break;default:t={backRect:"#f5f5f5",thumb:"#e0e0e0",circle:"#fff",circleHover:"#eee",arrow:"#9e9e9e",grip:"#9e9e9e"}}return t}function p(e,i,r){var o=t.extend([],e,null);return o.sort(function(e,t){for(var o=0,n=0,a=0;a<i.length;a++)o+=e[i[a]],n+=t[i[a]];return!r&&o<n||r&&o>n?-1:o===n?0:1}),o}function u(e){return-1!==e.indexOf("<br>")}function g(e){for(var i,r=t.extend([],e.points,null,!0),o=[],n=0,a=0;a<r.length;a++)i=r[a],t.isNullOrUndefined(i.x)||""===i.x||(i.index=n++,o.push(i));return o}function y(e,r,o,n){var a,s,l,h,c,d=new i.SvgRenderer(n.element.id),p=[],g={id:"rotate_text",x:n.initialClipRect.x,y:n.initialClipRect.y,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,transform:"rotate("+o+", 0, 0)","text-anchor":"middle"};a=u(r)?(p=r.split("<br>"))[0]:r;var y=d.createText(g,a);if(n.delayRedraw||n.redraw||n.element.appendChild(n.svgObject),"string"!=typeof p&&p.length>1)for(var m=1,v=p.length;m<v;m++)s=i.measureText(p[m],e).height,l=g.y+m*s,h=p[m],c=d.createTSpan({x:g.x,id:g.id,y:l},h),y.appendChild(c);n.svgObject.appendChild(y);var f=y.getBoundingClientRect();return t.remove(y),n.delayRedraw||n.redraw||t.remove(n.svgObject),new i.Size(f.right-f.left,f.bottom-f.top)}function m(e){if(!e)return null;var i="string"==typeof e?he(e):e;i&&t.remove(i)}function v(e,t){return Math.log(e)/Math.log(t)}function f(e,r,o,n,a,s,l,h){var c=document.getElementById(a),d=i.measureText(e,{fontFamily:"Segoe UI",size:"12px",fontStyle:"Normal",fontWeight:"Regular"}),p=d.width+5;r=r+p>n?r-(p+15):r,o=h?o-d.height/2:o+15,c?(c.innerHTML=e,c.style.top=o.toString()+"px",c.style.left=(r+15).toString()+"px"):(c=t.createElement("div",{innerHTML:e,id:a,styles:"top:"+o.toString()+"px;left:"+(r+15).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; font-family: "Segoe UI"'}),s.appendChild(c),parseInt(c.style.left.replace("px",""),10)<0&&(c.style.left="0px")),l&&setTimeout(function(){m(a)},1500)}function b(e,t){return e<t.max&&e>t.min}function x(e,t){return e<=t.max&&e>=t.min}function w(e,t){return"Logarithmic"===t.valueType?v(e,t.logBase):e}function S(e,t,i,r){var o=w(t.xValue,r.xAxis),n=e?w(e.xValue,r.xAxis):o,a=i?w(i.xValue,r.xAxis):o,s=Math.floor(r.xAxis.visibleRange.min),l=Math.ceil(r.xAxis.visibleRange.max);return n>=s&&n<=l||o>=s&&o<=l||a>=s&&a<=l||s>=n&&s<=a}function C(e){for(var t=0,i=0,r=e;i<r.length;i++)t+=r[i];return t}function P(e,i,r,o,n){var a=0;if(null!==o)for(s=i+1;s<r;s++)-1===o.indexOf(s)&&(a+=e[s][n.yName]);else for(var s=i+1;s<r;s++)t.isNullOrUndefined(e[s][n.yName])||(a+=e[s][n.yName]);return a}function L(e,t){return e.x+=t.left,e.y+=t.top,e.width-=t.left+t.right,e.height-=t.top+t.bottom,e}function R(e,t){return e.x+=t.x,e.y+=t.y,e.width-=t.x+t.width,e.height-=t.y+t.height,e}function M(e,t,i){var r=e*Math.PI/180;return new Vi(Math.cos(r)*t+i.x,Math.sin(r)*t+i.y)}function A(e){return e*(Math.PI/180)}function T(e,t,i,r){for(var o=[],n=0;n<4;n++){var a=e[n],s=a.x-t,l=a.y-i,h=s*Math.cos(A(r))-l*Math.sin(A(r)),c=s*Math.sin(A(r))+l*Math.cos(A(r));a.x=h+t,a.y=c+i,o.push(new Vi(a.x,a.y))}return o}function k(e,i){var r,o,n,a,s,l,h,c,d=[e,i];for(a=0;a<d.length;a++){var p=d[a];for(s=0;s<p.length;s++){var u=(s+1)%p.length,g=p[s],y=p[u],m=new Vi(y.y-g.y,g.x-y.x);for(r=o=void 0,l=0;l<e.length;l++)n=m.x*e[l].x+m.y*e[l].y,(t.isNullOrUndefined(r)||n<r)&&(r=n),(t.isNullOrUndefined(o)||n>o)&&(o=n);for(h=c=void 0,l=0;l<i.length;l++)n=m.x*i[l].x+m.y*i[l].y,(t.isNullOrUndefined(h)||n<h)&&(h=n),(t.isNullOrUndefined(c)||n>c)&&(c=n);if(o<h||c<r)return!1}}return!0}function _(e,t,i,r,o,n){var a=M(270,i,new Vi(e,t)),s=M(270,i,new Vi(e+o/10,t));return"M "+e+" "+t+" L "+(e+i)+" "+t+" A "+i+" "+i+" 0 1 1 "+a.x+" "+a.y+" Z M "+(e+o/10)+" "+(t-r/10)+" L"+(e+i)+" "+(t-r/10)+" A "+i+" "+i+" 0 0 0 "+s.x+" "+s.y+" Z"}function O(e,t){var i=Math.atan2(t.y-e.y,t.x-e.x);return(i=i<0?6.283+i:i)*(180/Math.PI)}function E(e,t){for(var i=[],r=0;r<=t-1;r++)i.push(e[r]);return i}function z(e,t){var i=t.visibleRange,r=(e-i.min)/i.delta;return t.isInversed?1-r:r}function I(e,t,i,r,o,n){e="Logarithmic"===i.valueType?v(e>1?e:1,i.logBase):e,t="Logarithmic"===r.valueType?v(t>1?t:1,r.logBase):t,e+="Category"===i.valueType&&"BetweenTicks"===i.labelPlacement&&"Radar"!==n.type?.5:0;var a=n.chart.radius*z(t,r),s=B(N(e,i),n.chart.primaryXAxis.startAngle);return{x:n.clipRect.width/2+n.clipRect.x+a*s.x,y:n.clipRect.height/2+n.clipRect.y+a*s.y}}function D(e,t){void 0===t&&(t=!1);var i=["NaN","NaN"];return e.indexOf("_Point_")>-1?i=e.split("_Series_")[1].split("_Point_"):e.indexOf("_shape_")>-1&&(!t||t&&-1===e.indexOf("_legend_"))?(i=e.split("_shape_"))[0]="0":e.indexOf("_text_")>-1&&(!t||t&&-1===e.indexOf("_legend_"))&&((i=e.split("_text_"))[0]="0"),new Jt(parseInt(i[0],10),parseInt(i[1],10))}function B(e,t){t=t<0?t+360:t;var i=Math.PI*(1.5-2*e);return i+=t*Math.PI/180,{x:Math.cos(i),y:Math.sin(i)}}function N(e,t){var i,r,o=t.visibleRange;return"Category"!==t.valueType?(i=o.max-("DateTime"===t.valueType?t.dateTimeInterval:o.interval)-o.min,r=t.visibleLabels.length-1,i=0===i?1:i):(i=1===t.visibleLabels.length?1:t.visibleLabels[t.visibleLabels.length-1].value-t.visibleLabels[0].value,r=t.visibleLabels.length),t.isInversed?(e-o.min)/i*(1-1/r):1-(e-o.min)/i*(1-1/r)}function F(e,i,r,o,n){var a=he(e),s="top:"+r.toString()+"px;left:"+o.toString()+"px;color:black !important; background:#FFFFFF !important; position:absolute;border:1px solid #707070;font-size:"+n+";border-radius:2px; z-index:1";a?(a.setAttribute("innerHTML"," "+i+" "),a.setAttribute("styles",s)):(a=t.createElement("div",{id:e,innerHTML:" "+i+" ",styles:s}),document.body.appendChild(a))}function V(e,t,r,o,n,a){for(var s,l,h,c,d,p=t.opposedPosition,u=n?"start":"auto",g=e.availableSize.width,y=t.scrollbarSettings.enable||t.zoomingScrollBar&&t.zoomingScrollBar.svgObject?t.scrollBarHeight:0,m=0;m<2;m++)s=i.measureText(m?t.endLabel:t.startLabel,t.labelStyle),n?(c=m?new Vi(a.x-y,a.y+3):new Vi(t.rect.x-y,a.y+a.height-3),l=a.x+(p?a.width+5+y:-(s.width+5+5+y)),h=a.y+(m?0:a.height-s.height-5),l+=l<0||g<l+s.width+5?p?-s.width/2:s.width/2:0,d=i.findDirection(3,3,new i.Rect(l,h,s.width+5,s.height+5),c,5,!1,!1,!p,c.x,c.y+(m?-3:3))):(c=m?new Vi(a.x+a.width-3,a.y+a.height+y):new Vi(a.x+3,a.y+a.height+y),l=a.x+(m?a.width-s.width-5:0),h=p?a.y-s.height-10-y:a.y+a.height+5+y,d=i.findDirection(3,3,new i.Rect(l,h,s.width+5,s.height+5),c,5,p,!p,!1,c.x+(m?3:-3),c.y)),l+=2.5,h=h+s.height/4*3+2.5,r.appendChild(e.renderer.drawPath(new i.PathOption(e.element.id+"_Zoom_"+o+"_AxisLabel_Shape_"+m,e.themeStyle.crosshairFill,2,e.themeStyle.crosshairFill,1,null,d))),Ve(e.renderer,new i.TextOption(e.element.id+"_Zoom_"+o+"_AxisLabel_"+m,l,h,u,m?t.endLabel:t.startLabel),{color:e.themeStyle.crosshairLabel,fontFamily:"Segoe UI",fontWeight:"Regular",size:"11px"},e.themeStyle.crosshairLabel,r);return r}function j(e,t,i,r,o){return void 0===r&&(r=0),void 0===o&&(o=0),e>=i.x-r&&e<=i.x+i.width+r&&t>=i.y-o&&t<=i.y+i.height+o}function H(e,t,i){return(i.isInversed?1-e/t:e/t)*i.visibleRange.delta+i.visibleRange.min}function X(e,t,i){return(i.isInversed?e/t:1-e/t)*i.visibleRange.delta+i.visibleRange.min}function Y(e){var t=e.clipRect;e.chart.requireInvertedAxis?(t.x=e.yAxis.rect.x,t.y=e.xAxis.rect.y,t.width=e.yAxis.rect.width,t.height=e.xAxis.rect.height):(t.x=e.xAxis.rect.x,t.y=e.yAxis.rect.y,t.width=e.xAxis.rect.width,t.height=e.yAxis.rect.height)}function G(e){return e.substr(0,1).toLowerCase()+e.substr(1)}function W(e,t,r){var o,n,a,s;return r?(o=t.rect.x,n=e.rect.y,a=t.rect.width,s=e.rect.height):(o=e.rect.x,n=t.rect.y,a=e.rect.width,s=t.rect.height),new i.Rect(o,n,a,s)}function U(e,i){for(var r,o,n,a=Number.MAX_VALUE,s=0;s<i.length;s++){var l=i[s];if(r=[],l.visible&&(e.name===l.xAxisName||"primaryXAxis"===e.name&&null===l.xAxisName||e.name===l.chart.primaryXAxis.name&&!l.xAxisName))if((r=l.points.map(function(e){return e.xValue})).sort(function(e,t){return e-t}),1===r.length)n="DateTime"===e.valueType&&l.xMin===l.xMax?l.xMin-2592e6:l.xMin,0!==(o=r[0]-(t.isNullOrUndefined(n)?e.visibleRange.min:n))&&(a=Math.min(a,o));else for(var h=0;h<r.length;h++){var c=r[h];h>0&&c&&0!==(o=c-r[h-1])&&(a=Math.min(a,o))}}return a===Number.MAX_VALUE&&(a=1),a}function Z(e){var t;switch(e){case"Linear":t=q}return t}function q(e,t,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+t}function Q(e,i,r,o,n,a,s){var l=a.x,h=a.y,c=0;e.style.visibility="hidden",new t.Animation({}).animate(e,{duration:r,delay:i,progress:function(t){t.timeStamp>t.delay&&(t.element.style.visibility="visible",c=(t.timeStamp-t.delay)/t.duration,e.setAttribute("transform","translate("+l+" "+h+") scale("+c+") translate("+-l+" "+-h+")"))},end:function(){e.style.visibility="","Scatter"!==o.type&&"Bubble"!==o.type||s||n!==o.points.length-1||o.chart.trigger("animationComplete",{series:o.chart.isBlazor?{}:o})}})}function $(e,r,o,n,a){var s=function(t){e.setAttribute("x",t.x+""),e.setAttribute("y",t.y+""),e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")};new t.Animation({}).animate(t.createElement("div"),{duration:o,delay:r,progress:function(e){s(new i.Rect(q(e.timeStamp,a.x,n.x-a.x,e.duration),q(e.timeStamp,a.y,n.y-a.y,e.duration),q(e.timeStamp,a.width,n.width-a.width,e.duration),q(e.timeStamp,a.height,n.height-a.height,e.duration)))},end:function(){s(n)}})}function J(e,i,r,o,n){if(!r||!o&&!e)return null;var a=300;n&&(a=n);var s,l,h,c=o||e.getAttribute("d"),d=c.split(/(?=[LMCZAQ])/),p=i.split(/(?=[LMCZAQ])/),u=[],g=[];e.setAttribute("d",c),new t.Animation({}).animate(t.createElement("div"),{duration:a,progress:function(t){s="",d.map(function(e,i){if(u=e.split(" "),g=p[i]?p[i].split(" "):u,"Z"===u[0]?s+="Z ":s+=u[0]+" "+q(t.timeStamp,+u[1],+g[1]-+u[1],t.duration)+" "+q(t.timeStamp,+u[2],+g[2]-+u[2],t.duration)+" ","C"===u[0]||"Q"===u[0])for(l=3,h="Q"===u[0]?4:6;l<h;)s+=q(t.timeStamp,+u[l],+g[l]-+u[l],t.duration)+" "+q(t.timeStamp,+u[++l],+g[l]-+u[l],t.duration)+" ",++l;"A"===u[0]&&(s+="0 0 1 "+q(t.timeStamp,+u[6],+g[6]-+u[6],t.duration)+" "+q(t.timeStamp,+u[7],+g[7]-+u[7],t.duration)+" ")}),e.setAttribute("d",s)},end:function(){e.setAttribute("d",i)}})}function K(e,t,i,r){void 0===r&&(r="drawClipPath");var o=Ne(e,t.id,t,i);if(o){var n=i.createDefs();return n.appendChild(o),n}return i[r](t)}function ee(e,t,i,r,o){var n={cancel:!1,name:ai,axis:o,text:i,value:t,labelStyle:r};if(e.trigger(ai,n),!n.cancel){var a=-1!==n.text.indexOf("<br>"),s=o.enableTrim?a?De(o.maximumLabelWidth,n.text,o.labelStyle):Ie(o.maximumLabelWidth,n.text,o.labelStyle):n.text;o.visibleLabels.push(new ki(s,n.value,n.labelStyle,n.text))}}function te(e){return null!=e.minimum&&null!=e.maximum}function ie(e){return e.zoomFactor<1&&e.zoomPosition>=0}function re(e,i){var r="Horizontal"===i.orientation?e.width:e.height;if(t.isNullOrUndefined(i.desiredIntervals)){var o=("Horizontal"===i.orientation?.533:1)*i.maximumLabels;return o=Math.max(r*(o/100),1)}return i.desiredIntervals}function oe(e,i,r,o,n){new t.Animation({}).animate(e,{duration:r,delay:i,name:o,progress:function(e){e.element.style.visibility="visible"},end:function(e){n?t.remove(e.element):e.element.style.visibility="visible"}})}function ne(e,t,r,o,n,a,s,l,h,c){var d=s||new i.SvgRenderer(""),p=ae(e,r,t,n,o,h,c);return d["draw"+p.functionName](p.renderOption,l?new Int32Array([l.x,l.y]):null)}function ae(e,r,o,n,a,s,l){var h,c,d,p="Path",u=s,g=u&&"Circle"===o?r.width-2:r.width,y=u&&"Circle"===o?r.height-2:r.height,m=u?l.targetWidth:0,v=e.x,f=e.y,b=e.y+-y/2,x=e.x+-g/2;switch(o){case"Bubble":case"Circle":p="Ellipse",t.merge(n,{rx:g/2,ry:y/2,cx:v,cy:f});break;case"Cross":h="M "+x+" "+f+" L "+(v+g/2)+" "+f+" M "+v+" "+(f+y/2)+" L "+v+" "+(f+-y/2),t.merge(n,{d:h,stroke:n.fill});break;case"Multiply":h="M "+(v-m)+" "+(f-m)+" L "+(v+m)+" "+(f+m)+" M "+(v-m)+" "+(f+m)+" L "+(v+m)+" "+(f-m),t.merge(n,{d:h,stroke:n.fill});break;case"HorizontalLine":h="M "+x+" "+f+" L "+(v+g/2)+" "+f,t.merge(n,{d:h});break;case"VerticalLine":h="M "+v+" "+(f+y/2)+" L "+v+" "+(f+-y/2),t.merge(n,{d:h});break;case"Diamond":h="M "+x+" "+f+" L "+v+" "+(f+-y/2)+" L "+(v+g/2)+" "+f+" L "+v+" "+(f+y/2)+" L "+x+" "+f+" z",t.merge(n,{d:h});break;case"ActualRect":h="M "+x+" "+(f+-y/8)+" L "+(v+m)+" "+(f+-y/8)+" L "+(v+m)+" "+(f+y/8)+" L "+x+" "+(f+y/8)+" L "+x+" "+(f+-y/8)+" z",t.merge(n,{d:h});break;case"TargetRect":h="M "+(x+m)+" "+(f+-y/2)+" L "+(v+m/2)+" "+(f+-y/2)+" L "+(v+m/2)+" "+(f+y/2)+" L "+(x+m)+" "+(f+y/2)+" L "+(x+m)+" "+(f+-y/2)+" z",t.merge(n,{d:h});break;case"Rectangle":case"Hilo":case"HiloOpenClose":case"Candle":case"Waterfall":case"BoxAndWhisker":case"StepArea":case"StackingStepArea":case"Square":case"Flag":h="M "+x+" "+(f+-y/2)+" L "+(v+g/2)+" "+(f+-y/2)+" L "+(v+g/2)+" "+(f+y/2)+" L "+x+" "+(f+y/2)+" L "+x+" "+(f+-y/2)+" z",t.merge(n,{d:h});break;case"Pyramid":case"Triangle":h="M "+x+" "+(f+y/2)+" L "+v+" "+(f+-y/2)+" L "+(v+g/2)+" "+(f+y/2)+" L "+x+" "+(f+y/2)+" z",t.merge(n,{d:h});break;case"Funnel":case"InvertedTriangle":h="M "+(v+g/2)+" "+(f-y/2)+" L "+v+" "+(f+y/2)+" L "+(v-g/2)+" "+(f-y/2)+" L "+(v+g/2)+" "+(f-y/2)+" z",t.merge(n,{d:h});break;case"Pentagon":for(var w=0;w<=5;w++)c=g/2*Math.cos(Math.PI/180*(72*w)),d=y/2*Math.sin(Math.PI/180*(72*w)),h=0===w?"M "+(v+c)+" "+(f+d)+" ":h.concat("L "+(v+c)+" "+(f+d)+" ");h=h.concat("Z"),t.merge(n,{d:h});break;case"Image":p="Image",t.merge(n,{href:a,height:y,width:g,x:x,y:b})}return n=ze(e,new i.Size(g,y),o,n).renderOption,{renderOption:n,functionName:p}}function se(e,t,r){var o=t.x<r.x?r.x:t.x>r.x+r.width?r.x+r.width:t.x,n=t.y<r.y?r.y:t.y>r.y+r.height?r.y+r.height:t.y;return new i.Rect(o>e.x?e.x:o,n>e.y?e.y:n,Math.abs(o-e.x),Math.abs(n-e.y))}function le(e,t,i){return e>i?i:e<t?t:e}function he(e){return document.getElementById(e)}function ce(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(r){i=t.compile(e)}return i}function de(e,t,i,r,o,n,a,s,l,h){var c=e.getBoundingClientRect();t.accumulationDataLabelModule.calculateLabelSize(i,e,n,r,o,a,s,l,h,c,!0)}function pe(e,t,i,r,o,n){var a=document.getElementById(t.element.id+"_Series_"+(void 0===r.index?r.category:r.index)+"_DataLabelCollections");a&&(0===i.index&&(t.dataLabelCollections=[]),t.dataLabelModule.calculateTemplateLabelSize(a,e,i,r,r.marker.dataLabel,o,r.clipRect,n,!0))}function ue(e,t,i,r,o,n,a,s,l,h,c,d,p,u,g){var y,m=ce(i);try{var v=window.Blazor?a?o:{point:o}:{chart:r,series:n,point:o},f=a?a+"_template":"template",b=m?m(v,r,f,a||e.id.replace(/[^a-zA-Z0-9]/g,"")):[];if(b.length)for(var x=(y=Array.prototype.slice.call(b)).length,w=0;w<x;w++)e.appendChild(y[w]);var S=void 0;"accumulationchart"===r.getModuleName()?(S=de.bind(this,e,r,h,c,l,c[t],d,p,u,g),r.isReact&&r.renderReactTemplates(S)):"chart"===r.getModuleName()&&(S=o&&n?pe.bind(this,e,r,o,n,s,g):S,r.isReact&&r.renderReactTemplates(S))}catch(t){return e}return e}function ge(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 ye(e,i,r){void 0===i&&(i=!1),r||document.body.appendChild(e);var o=e.getBoundingClientRect();return i?t.remove(e):r||m(e.id),o}function me(e,t){for(var i,r=0,o=e.length;r<o;r++)e[r].id.indexOf(t)>-1&&(i=e[r]);return i}function ve(e,t,i,r,o){e="Logarithmic"===i.valueType?v(e>0?e:Math.pow(i.logBase,i.visibleRange.min),i.logBase):e,t="Logarithmic"===r.valueType?v(t>0?t:Math.pow(r.logBase,r.visibleRange.min),r.logBase):t,e=z(e,i),t=z(t,r);var n=o?i.rect.height:i.rect.width,a=o?r.rect.width:r.rect.height;return new Vi(o?t*a:e*n,o?(1-e)*n:(1-t)*a)}function fe(e,t,i,r,o,n){if(void 0===i&&(i=!1),void 0===r&&(r=!1),void 0===o&&(o="x"),void 0===n&&(n="y"),!(e&&e.hasChildNodes()&&t))return null;be(!1,t,e,i,r,o,n)}function be(e,t,r,o,n,a,s,l,h,c,d,p,u){if(void 0===n&&(n=!1),void 0===a&&(a="x"),void 0===s&&(s="y"),void 0===c&&(c=!1),void 0===d&&(d=!1),void 0===p&&(p=null),e)return null;var g=t.querySelector("#"+r.id),y=g||he(r.id),m=r,v=u||300;o&&n&&y?(l=l||("DIV"===y.tagName?new Vi(+y.style[a].split("px")[0],+y.style[s].split("px")[0]):new Vi(+y.getAttribute(a),+y.getAttribute(s))),h&&"undefined"!==h?J(r,r.getAttribute("d"),o,h,v):d&&p?$(m,0,v,new i.Rect(+y.getAttribute("x"),+y.getAttribute("y"),+y.getAttribute("width"),+y.getAttribute("height")),p):Fe(m,v,l,"DIV"===m.tagName?new Vi(+m.style[a].split("px")[0],+m.style[s].split("px")[0]):new Vi(+m.getAttribute(a),+m.getAttribute(s)),a,s)):o&&n&&!y&&c&&oe(m,0,600,"FadeIn"),g?t.replaceChild(m,y):t.appendChild(m)}function xe(e,t,r,o,n){var a=Math.abs(e-r),s=Math.abs(t-o),l=Math.max(we(Math.min(e,r),a,n.x,n.width),n.x),h=Math.max(we(Math.min(t,o),s,n.y,n.height),n.y);return new i.Rect(l,h,Math.min(a,n.width),Math.min(s,n.height))}function we(e,t,i,r){return e<i?e=i:e+t>r+i&&(e=r+i-t),e}function Se(e,t,i){var r=t.yAxis.labelFormat,o=[],n=null!==r.match("{value}");switch(t.seriesType){case"XY":"PolarRadar"===t.chart.chartAreaType?-1!==t.drawType.indexOf("Stacking")?("Logarithmic"===t.yAxis.valueType&&w(t.stackedValues.endValues[e.index],t.yAxis)||x(t.stackedValues.endValues[e.index],t.yAxis.visibleRange))&&o.push(e.text||e.yValue.toString()):("Logarithmic"===t.yAxis.valueType&&w(e.yValue,t.yAxis)||x(e.yValue,t.yAxis.visibleRange))&&o.push(e.text||e.yValue.toString()):o.push(e.text||e.yValue.toString());break;case"HighLow":o.push(e.text||Math.max(e.high,e.low).toString()),o.push(e.text||Math.min(e.high,e.low).toString());break;case"HighLowOpenClose":o.push(e.text||Math.max(e.high,e.low).toString()),o.push(e.text||Math.min(e.high,e.low).toString()),o.push(e.text||Math.max(e.open,e.close).toString()),o.push(e.text||Math.min(e.open,e.close).toString());break;case"BoxPlot":o.push(e.text||e.median.toString()),o.push(e.text||e.maximum.toString()),o.push(e.text||e.minimum.toString()),o.push(e.text||e.upperQuartile.toString()),o.push(e.text||e.lowerQuartile.toString());for(var a=0,s=e.outliers;a<s.length;a++){var l=s[a];o.push(e.text||l.toString())}}if(r&&!e.text){t.yAxis.format=i.intl.getNumberFormat({format:n?"":r,useGrouping:i.useGroupingSeparator});for(var h=0;h<o.length;h++)o[h]=n?r.replace("{value}",t.yAxis.format(parseFloat(o[h]))):t.yAxis.format(parseFloat(o[h]))}return o}function Ce(e){window.clearInterval(e)}function Pe(e,t,r){var o=new i.Rect(e.x+r.x,e.y+r.y,e.width,e.height);return t.some(function(e){return o.x<e.x+e.width&&o.x+o.width>e.x&&o.y<e.y+e.height&&o.height+o.y>e.y})}function Le(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.height+e.y>t.y}function Re(e,t){return e.x<=t.x&&e.x+e.width>=t.x+t.width&&e.y<=t.y&&e.height+e.y>=t.y+t.height}function Me(e,t,r){return new i.Rect(e.x-t.width/2-r.left,e.y-t.height/2-r.top,t.width+r.left+r.right,t.height+r.top+r.bottom)}function Ae(e){return"#"+Te(e.r)+Te(e.g)+Te(e.b)}function Te(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function ke(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new Xi(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new Xi(255,255,255)}function _e(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var i=document.getElementById("chartmeasuretext");i.style.color=e,e=window.getComputedStyle(i).color,t.remove(i);var r=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return Ae(new Xi(parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10)))}function Oe(e,t){(e=(e=_e(e)).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var i,r="#",o=0;o<3;o++)i=parseInt(e.substr(2*o,2),16),r+=("00"+(i=Math.round(Math.min(Math.max(0,i+i*t),255))).toString(16)).substr(i.toString(16).length);return r}function Ee(e){var t=Math.floor(e.length/2);return e.length%2?e[t]:(e[t-1]+e[t])/2}function ze(e,i,r,o){var n="",a=i.height,s=i.width,l=e.x,h=e.y;switch(r){case"MultiColoredLine":case"Line":case"StackingLine":case"StackingLine100":n="M "+(l+-s/2)+" "+h+" L "+(l+s/2)+" "+h,t.merge(o,{d:n});break;case"StepLine":o.fill="transparent",n="M "+(l+-s/2-2.5)+" "+(h+a/2)+" L "+(l+-s/2+s/10)+" "+(h+a/2)+" L "+(l+-s/2+s/10)+" "+h+" L "+(l+-s/10)+" "+h+" L "+(l+-s/10)+" "+(h+a/2)+" L "+(l+s/5)+" "+(h+a/2)+" L "+(l+s/5)+" "+(h+-a/2)+" L "+(l+s/2)+" "+(h+-a/2)+"L "+(l+s/2)+" "+(h+a/2)+" L"+(l+s/2+2.5)+" "+(h+a/2),t.merge(o,{d:n});break;case"UpArrow":o.fill=o.stroke,o.stroke="transparent",n="M "+(l+-s/2)+" "+(h+a/2)+" L "+l+" "+(h-a/2)+" L "+(l+s/2)+" "+(h+a/2)+"L "+(l+s/2-2)+" "+(h+a/2)+" L "+l+" "+(h-a/2+4)+"L"+(l-s/2+2)+" "+(h+a/2)+" Z",t.merge(o,{d:n});break;case"DownArrow":n="M "+(l-s/2)+" "+(h-a/2)+" L "+l+" "+(h+a/2)+" L "+(l+s/2)+" "+(h-a/2)+"L "+(l+s/2-2)+" "+(h-a/2)+" L "+l+" "+(h+a/2-4)+"L"+(l-s/2+2)+" "+(h-a/2)+" Z",t.merge(o,{d:n});break;case"RightArrow":n="M "+(l+-s/2)+" "+(h-a/2)+" L "+(l+s/2)+" "+h+" L "+(l+-s/2)+" "+(h+a/2)+" L "+(l+-s/2)+" "+(h+a/2-2)+" L "+(l+s/2-4)+" "+h+" L"+(l+-s/2)+" "+(h-a/2+2)+" Z",t.merge(o,{d:n});break;case"LeftArrow":o.fill=o.stroke,o.stroke="transparent",n="M "+(l+s/2)+" "+(h-a/2)+" L "+(l+-s/2)+" "+h+" L "+(l+s/2)+" "+(h+a/2)+" L "+(l+s/2)+" "+(h+a/2-2)+" L "+(l+-s/2+4)+" "+h+" L"+(l+s/2)+" "+(h-a/2+2)+" Z",t.merge(o,{d:n});break;case"Column":case"Pareto":case"StackingColumn":case"StackingColumn100":case"RangeColumn":case"Histogram":n="M "+(l-s/5*3)+" "+(h-a/5)+" L "+(l+-s/10*3)+" "+(h-a/5)+" L "+(l+-s/10*3)+" "+(h+a/2)+" L "+(l-s/5*3)+" "+(h+a/2)+" Z M "+(l+-s/10-s/20)+" "+(h-a/4-5)+" L "+(l+s/10+s/20)+" "+(h-a/4-5)+" L "+(l+s/10+s/20)+" "+(h+a/2)+" L "+(l+-s/10-s/20)+" "+(h+a/2)+" Z M "+(l+s/10*3)+" "+h+" L "+(l+s/5*3)+" "+h+" L "+(l+s/5*3)+" "+(h+a/2)+" L "+(l+s/10*3)+" "+(h+a/2)+" Z",t.merge(o,{d:n});break;case"Bar":case"StackingBar":case"StackingBar100":n="M "+(l+-s/2+-2.5)+" "+(h-a/5*3)+" L "+(l+s/10*3)+" "+(h-a/5*3)+" L "+(l+s/10*3)+" "+(h-a/10*3)+" L "+(l-s/2-2.5)+" "+(h-a/10*3)+" Z M "+(l+-s/2+-2.5)+" "+(h-a/5+.5)+" L "+(l+s/2+2.5)+" "+(h-a/5+.5)+" L "+(l+s/2+2.5)+" "+(h+a/10+.5)+" L "+(l-s/2-2.5)+" "+(h+a/10+.5)+" Z M "+(l-s/2-2.5)+" "+(h+a/5+1)+" L "+(l+-s/4)+" "+(h+a/5+1)+" L "+(l+-s/4)+" "+(h+a/2+1)+" L "+(l-s/2-2.5)+" "+(h+a/2+1)+" Z",t.merge(o,{d:n});break;case"Spline":o.fill="transparent",n="M "+(l-s/2)+" "+(h+a/5)+" Q "+l+" "+(h-a)+" "+l+" "+(h+a/5)+" M "+l+" "+(h+a/5)+" Q "+(l+s/2)+" "+(h+a/2)+" "+(l+s/2)+" "+(h-a/2),t.merge(o,{d:n});break;case"Area":case"MultiColoredArea":case"RangeArea":case"StackingArea":case"StackingArea100":n="M "+(l-s/2-2.5)+" "+(h+a/2)+" L "+(l+-s/4+-1.25)+" "+(h-a/2)+" L "+l+" "+(h+a/4)+" L "+(l+s/4+1.25)+" "+(h+-a/2+a/4)+" L "+(l+a/2+2.5)+" "+(h+a/2)+" Z",t.merge(o,{d:n});break;case"SplineArea":n="M "+(l-s/2)+" "+(h+a/5)+" Q "+l+" "+(h-a)+" "+l+" "+(h+a/5)+" Z M "+l+" "+(h+a/5)+" Q "+(l+s/2)+" "+(h+a/2)+" "+(l+s/2)+" "+(h-a/2)+" Z",t.merge(o,{d:n});break;case"Pie":case"Doughnut":o.stroke="transparent",n=_(l,h,Math.min(a,s)/2,a,s,r),t.merge(o,{d:n})}return{renderOption:o}}function Ie(e,t,r){var o=t,n=i.measureText(t,r).width;if(n>e)for(var a=t.length-1;a>=0;--a)if(o=t.substring(0,a)+"...",(n=i.measureText(o,r).width)<=e)return o;return o}function De(e,t,r){for(var o=[],n=t.split("<br>"),a=0;a<n.length;a++){t=n[a];var s=i.measureText(t,r).width;if(s>e){for(var l=t.length-1;l>=0;--l)if(t=t.substring(0,l)+"...",(s=i.measureText(t,r).width)<=e){o.push(t);break}}else o.push(t)}return o}function Be(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function Ne(e,t,i,r){if(!e)return null;var o=he(t);return o&&i&&r.setElementAttributes(i,"clipPath"===o.tagName?o.childNodes[0]:o),o}function Fe(e,i,r,o,n,a){void 0===n&&(n="x"),void 0===a&&(a="y");var s="DIV"===e.tagName,l=function(t,i){s?(e.style[n]=t+"px",e.style[a]=i+"px"):(e.setAttribute(n,t+""),e.setAttribute(a,i+""))};l(r.x,r.y),new t.Animation({}).animate(t.createElement("div"),{duration:i,progress:function(e){l(q(e.timeStamp,r.x,o.x-r.x,e.duration),q(e.timeStamp,r.y,o.y-r.y,e.duration))},end:function(){l(o.x,o.y)}})}function Ve(e,t,r,o,n,a,s,l,h,c,d,p,u,g){void 0===a&&(a=!1),void 0===h&&(h=!1);var y,m,v,f,b={};b={id:t.id,x:t.x,y:t.y,fill:o||"black","font-size":r.size,"font-style":r.fontStyle,"font-family":r.fontFamily,"font-weight":r.fontWeight,"text-anchor":t.anchor,labelRotation:t.labelRotation,transform:t.transform,opacity:r.opacity,"dominant-baseline":t.baseLine};var x="string"==typeof t.text?t.text:a?t.text[t.text.length-1]:t.text[0],w=d?d.x:0,S=d?d.y:0,C=e.createText(b,x,w,S);if(C.style.fontFamily=r.fontFamily,C.style.fontStyle=r.fontStyle,C.style.fontSize=r.size,C.style.fontWeight=r.fontWeight,C.style.color=r.color,C.style.textAnchor=t.anchor,"string"!=typeof t.text&&t.text.length>1)for(var P=1,L=t.text.length;P<L;P++)m=i.measureText(t.text[P],r).height,v=t.y+(a?-P*m:P*m),f=a?t.text[t.text.length-(P+1)]:t.text[P],g?y=e.createText(b,f,null,null,v,!0):(y=e.createTSpan({x:t.x,id:t.id,y:v},f),C.appendChild(y));return u||be(e instanceof i.CanvasRenderer,n,C,s,l,"x","y",null,null,h,!1,null,c),C}function je(e){var r=e.element.clientWidth||e.element.offsetWidth,o=e.element.clientHeight;e.stockChart&&(r=e.stockChart.element.clientWidth);var n,a=450;if("rangeNavigator"===e.getModuleName()){var s=e,l=s.tooltip.enable?35:0,h=s.periodSelectorSettings.periods.length?s.periodSelectorSettings.height:0;n=s.margin.top+s.margin.bottom+l;var c=i.measureText("tempString",s.labelStyle).height;a=(e.series.length?t.Browser.isDevice?80:120:(s.enableGrouping?55+c:40)+n)+h,s.disableRangeSelector&&(a=h)}e.availableSize=new i.Size(Be(e.width,r)||r||600,Be(e.height,o||a)||o||a)}function He(e){e.canvasRender=new i.CanvasRenderer(e.element.id),e.renderer=e.enableCanvas?e.canvasRender:new i.SvgRenderer(e.element.id),je(e),e.stockChart&&"chart"===e.getModuleName()?e.svgObject=e.stockChart.chartObject:e.stockChart&&"rangeNavigator"===e.getModuleName()?e.svgObject=e.stockChart.selectorObject:e.enableCanvas?e.svgObject=e.renderer.createCanvas({id:e.element.id+"_canvas",width:e.availableSize.width,height:e.availableSize.height}):e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height})}function Xe(e,t,i){var r=[];switch(t.textOverflow){case"Wrap":r=Ge(e,i,t);break;case"Trim":r.push(Ie(i,e,t));break;default:r.push(e)}return r}function Ye(e,t){return"Near"===t.textAlignment?e.x:"Center"===t.textAlignment?e.x+e.width/2:e.x+e.width}function Ge(e,t,r){for(var o,n=e.split(" "),a="",s=[],l=0,h=n.length;l<h;l++)o=n[l],i.measureText(a.concat(o),r).width<t?a=a.concat((""===a?"":" ")+o):""!==a?(s.push(Ie(t,a,r)),a=o):(s.push(Ie(t,o,r)),o=""),a&&l===h-1&&s.push(Ie(t,a,r));return s}function We(e,t){for(var i=e.replace(t," "),r=e.match(t),o=" ",n=" ",a=0,s={0:"₀",1:"₁",2:"₂",3:"₃",4:"₄",5:"₅",6:"₆",7:"₇",8:"₈",9:"₉"},l={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹"},h=0;h<=i.length-1;h++)if(" "===i[h]){o=t===si?r[a].replace(/~/g,""):r[a].replace(/\^/g,"");for(var c=0;c<o.length;c++)n+=t===si?s[o[c]]:l[o[c]];a++}else n+=i[h];return n.trim()}function Ue(e){for(var i=0;i<e.annotations.length;i++)t.resetBlazorTemplate((e.element.id+"_Annotation_"+i).replace(/[^a-zA-Z0-9]/g,""),"ContentTemplate");t.resetBlazorTemplate(e.element.id+"_tooltipparent_template_blazorTemplate","Template"),t.resetBlazorTemplate(e.element.id+"_DataLabel")}function Ze(e,t){return Number(t)===e.start?e.colors[0]:Number(t)===e.end?e.colors[e.colors.length-1]:Ae(qe(Number(t),e))}function qe(e,t){var i=t.start,r=t.end,o=0,n=r-i;o=(e-i)/n;var a,s;if(t.colors.length<=2)a="#"===t.colors[0].charAt(0)?t.colors[0]:_e(t.colors[0]),s="#"===t.colors[t.colors.length-1].charAt(0)?t.colors[t.colors.length-1]:_e(t.colors[t.colors.length-1]);else{a="#"===t.colors[0].charAt(0)?t.colors[0]:_e(t.colors[0]),s="#"===t.colors[t.colors.length-1].charAt(0)?t.colors[t.colors.length-1]:_e(t.colors[t.colors.length-1]);for(var l=n/(t.colors.length-1),h=t.colors.length-1,c=[],d={},p=1;p<h;p++)d={b:i+p*l,color:t.colors[p]},c.push(d);for(var u=0;u<c.length;u++)i<=e&&e<=c[u].b&&0===u?(s="#"===c[u].color.charAt(0)?c[u].color:_e(c[u].color),o=e<=c[u].b?1-Math.abs((e-c[u].b)/l):(e-c[u].b)/l):c[u].b<=e&&e<=r&&u===c.length-1&&(a="#"===c[u].color.charAt(0)?c[u].color:_e(c[u].color),o=e<c[u].b?1-Math.abs((e-c[u].b)/l):(e-c[u].b)/l),u!==c.length-1&&u<c.length&&c[u].b<=e&&e<=c[u+1].b&&(a="#"===c[u].color.charAt(0)?c[u].color:_e(c[u].color),s="#"===c[u+1].color.charAt(0)?c[u+1].color:_e(c[u+1].color),o=Math.abs(e-c[u+1].b)/l)}return Qe(o,a,s)}function Qe(e,t,i){var r=i.split("#")[1],o=t.split("#")[1],n=$e(e,parseInt(o.substr(0,2),16),parseInt(r.substr(0,2),16)),a=$e(e,parseInt(o.substr(2,2),16),parseInt(r.substr(2,2),16)),s=$e(e,parseInt(o.substr(4,2),16),parseInt(r.substr(4,2),16));return new Xi(n,a,s)}function $e(e,t,i){var r=i-t;return Math.round(t+r*e)}function Je(e,t){for(var i,r=e.axis.rect,o="Horizontal"===e.axis.orientation,n=!1,a=5,s=0,l=e.axis.series;s<l.length;s++)(d=l[s]).marker.height>a&&(a=d.marker.height);for(var h=0,c=e.axis.series;h<c.length;h++){var d=c[h];if(d.visible&&(i=d.yMin.toString(),n=d.yData.some(function(e){return e===i})),n)break}e.svgObject=t.createSvg({id:e.component.element.id+"_scrollBar_svg"+e.axis.name,width:e.isVertical?e.height:e.width,height:e.isVertical?e.width:e.height,style:"position: absolute;top: "+((e.axis.opposedPosition&&o?-16:n?a:0)+r.y)+"px;left: "+((e.axis.opposedPosition&&!o?16:0)+r.x-(e.isVertical?e.height:0))+"px;cursor:auto;"}),e.elements.push(e.svgObject)}function Ke(e,t){for(var i=0,r=t;i<r.length;i++){var o=r[i];if(e===o.index)return o}return t[0]}function et(e,t){for(var i=0,r=t;i<r.length;i++){var o=r[i];if(o.index===e)return o}return null}function tt(e,t,i){var r=(e-t.min)/t.delta;return i?1-r:r}function it(e,t,i,r){return(e=tt(e,t,r))*i}function rt(e,t,i,r){return(r?1-e/t:e/t)*i.delta+i.min}function ot(e,t,i){var r=[];return e.map(function(e){e.xValue>=t&&e.xValue<=i&&r.push({x:e.x,y:e.y})}),r}function nt(e,t){return e.reduce(function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e})}function at(e,i){var r=i.navigatorStyleSettings.thumb,o=t.isNullOrUndefined(r.width)?t.Browser.isDevice?15:20:r.width,n=t.isNullOrUndefined(r.height)?t.Browser.isDevice?15:20:r.height,a="HighContrast"===e?"#969696":"#6F6C6C",s="HighContrast"===e?"#4A4848":"#414040",l="MaterialDark"===e?"#303030":"FabricDark"===e?"#201F1F":"1A1A1A",h={gridLineColor:"#E0E0E0",axisLineColor:"#000000",labelFontColor:"#686868",unselectedRectColor:i.series.length?"rgba(255, 255, 255, 0.6)":"#EEEEEE",thumpLineColor:"rgba(189, 189, 189, 1)",thumbBackground:"rgba(250, 250, 250, 1)",gripColor:"#757575",background:"#FFFFFF",thumbHoverColor:"#EEEEEE",selectedRegionColor:i.series.length?"transparent":"#FF4081",tooltipBackground:"rgb(0, 8, 22)",tooltipFontColor:"#dbdbdb",thumbWidth:o,thumbHeight:n};switch(e){case"Fabric":h.selectedRegionColor=i.series.length?"transparent":"#007897";break;case"Bootstrap":h.selectedRegionColor=i.series.length?"transparent":"#428BCA";break;case"HighContrastLight":h={gridLineColor:"#bdbdbd",axisLineColor:"#969696",labelFontColor:"#ffffff",unselectedRectColor:i.series.length?"rgba(255, 255, 255, 0.3)":"#EEEEEE",thumpLineColor:"#ffffff",thumbBackground:"#262626",gripColor:"#ffffff",background:l,thumbHoverColor:"#BFBFBF",selectedRegionColor:i.series.length?"transparent":"#FFD939",tooltipBackground:"#ffffff",tooltipFontColor:"#000000",thumbWidth:o,thumbHeight:n};break;case"Highcontrast":case"HighContrast":h={gridLineColor:s,axisLineColor:a,labelFontColor:"#DADADA",unselectedRectColor:i.series.length?"rgba(43, 43, 43, 0.6)":"#514F4F",thumpLineColor:"#969696",thumbBackground:"#333232",gripColor:"#DADADA",background:"#000000",thumbHoverColor:"#BFBFBF",selectedRegionColor:i.series.length?"rgba(22, 22, 22, 0.6)":"#FFD939",tooltipBackground:"#F4F4F4",tooltipFontColor:"#282727",thumbWidth:o,thumbHeight:n};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":h={labelFontColor:"#DADADA",axisLineColor:" #6F6C6C",gridLineColor:"#414040",tooltipBackground:"#F4F4F4",tooltipFontColor:"#333232",unselectedRectColor:i.series.length?"rgba(43, 43, 43, 0.6)":"#514F4F",thumpLineColor:"#969696",thumbBackground:"#333232",gripColor:"#DADADA",background:l,thumbHoverColor:"#BFBFBF",selectedRegionColor:i.series.length?"rgba(22, 22, 22, 0.6)":"FabricDark"===e?"#007897":"BootstrapDark"===e?"#428BCA":"#FF4081",thumbWidth:o,thumbHeight:n};break;case"Bootstrap4":h={gridLineColor:"#E0E0E0",axisLineColor:"#CED4DA",labelFontColor:"#212529",unselectedRectColor:i.series.length?"rgba(255, 255, 255, 0.6)":"#514F4F",thumpLineColor:"rgba(189, 189, 189, 1)",thumbBackground:"#FFFFFF",gripColor:"#495057",background:"rgba(255, 255, 255, 0.6)",thumbHoverColor:"#EEEEEE",selectedRegionColor:i.series.length?"transparent":"#FFD939",tooltipBackground:"rgba(0, 0, 0, 0.9)",tooltipFontColor:"rgba(255, 255, 255)",thumbWidth:o,thumbHeight:n};break;default:h.selectedRegionColor=i.series.length?"transparent":"#FF4081"}return h}function st(e,t,i){for(var r=[],o=0;o<e;++o){for(var n=[],a=0;a<t;++a)n[a]=i;r[o]=n}return r}function lt(e){var t={majorTickLineColor:"#424242",minorTickLineColor:"#424242",background:"#FFFFFF",labelFontColor:"rgba(0,0,0,0.54)",categoryFontColor:"#666666",labelFontFamily:"SegoeUI",tooltipFill:"rgba(0, 8, 22, 0.75)",legendLabel:"#353535",tooltipBoldLabel:"#ffffff",featuredMeasureColor:"#181818",comparativeMeasureColor:"#181818",titleFontColor:"rgba(0,0,0,0.87)",dataLabelFontColor:"#ffffff",titleFontFamily:"SegoeUI",subTitleFontColor:" rgba(0,0,0,0.54)",subTitleFontFamily:"SegoeUI",firstRangeColor:"#959595",secondRangeColor:"#BDBDBD",thirdRangeColor:"#E3E2E2",rangeStrokes:[{color:"#959595"},{color:"#BDBDBD"},{color:"#E3E2E2"}]};switch(e){case"Fabric":t={majorTickLineColor:"#424242",minorTickLineColor:"#424242",background:"#FFFFFF",labelFontColor:"#666666",categoryFontColor:"#666666",labelFontFamily:"SegoeUI",tooltipFill:"rgba(0, 8, 22, 0.75)",legendLabel:"#353535",tooltipBoldLabel:"#ffffff",featuredMeasureColor:"#181818",comparativeMeasureColor:"#181818",titleFontColor:"#333333",dataLabelFontColor:"#ffffff",titleFontFamily:"SegoeUI",subTitleFontColor:"#666666",subTitleFontFamily:"SegoeUI",firstRangeColor:"#959595",secondRangeColor:"#BDBDBD",thirdRangeColor:"#E3E2E2",rangeStrokes:[{color:"#959595"},{color:"#BDBDBD"},{color:"#E3E2E2"}]};break;case"Bootstrap":t={majorTickLineColor:"#424242",minorTickLineColor:"#424242",background:"#FFFFFF",labelFontColor:"rgba(0,0,0,0.54)",categoryFontColor:"rgba(0,0,0,0.54)",labelFontFamily:"Helvetica",tooltipFill:"rgba(0, 0, 0, 0.9)",legendLabel:"#212529",tooltipBoldLabel:"rgba(255,255,255)",featuredMeasureColor:"#181818",comparativeMeasureColor:"#181818",titleFontColor:"rgba(0,0,0,0.87)",dataLabelFontColor:"#ffffff",titleFontFamily:"Helvetica-Bold",subTitleFontColor:" rgba(0,0,0,0.54)",subTitleFontFamily:"Helvetica",firstRangeColor:"#959595",secondRangeColor:"#BDBDBD",thirdRangeColor:"#E3E2E2",rangeStrokes:[{color:"#959595"},{color:"#BDBDBD"},{color:"#E3E2E2"}]};break;case"HighContrast":t={majorTickLineColor:"#FFFFFF",minorTickLineColor:"#FFFFFF",background:"#000000",labelFontColor:"#FFFFFF",categoryFontColor:"#FFFFFF",labelFontFamily:"SegoeUI",tooltipFill:"#ffffff",legendLabel:"#ffffff",tooltipBoldLabel:"#000000",featuredMeasureColor:"#000000",comparativeMeasureColor:"#000000",titleFontColor:"#FFFFFF",dataLabelFontColor:"#ffffff",titleFontFamily:"HelveticaNeue",subTitleFontColor:"#FFFFFF",subTitleFontFamily:"SegoeUI",firstRangeColor:"#959595",secondRangeColor:"#BDBDBD",thirdRangeColor:"#E3E2E2",rangeStrokes:[{color:"#757575"},{color:"#BDBDBD"},{color:"#EEEEEE"}]};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":t={majorTickLineColor:"#F0F0F0",minorTickLineColor:"#F0F0F0",background:"#000000",labelFontColor:"#FFFFFF",categoryFontColor:"#FFFFFF",labelFontFamily:"Helvetica",tooltipFill:"#F4F4F4",legendLabel:"#DADADA",tooltipBoldLabel:"#282727",featuredMeasureColor:"#181818",comparativeMeasureColor:"#181818",titleFontColor:"#FFFFFF",dataLabelFontColor:"#ffffff",titleFontFamily:"Helvetica-Bold",subTitleFontColor:"#FFFFFF",subTitleFontFamily:"Helvetica",firstRangeColor:"#8D8D8D",secondRangeColor:"#ADADAD",thirdRangeColor:"#EEEEEE",rangeStrokes:[{color:"#8D8D8D"},{color:"#ADADAD"},{color:"#EEEEEE"}]};break;case"Bootstrap4":t={majorTickLineColor:"#424242",minorTickLineColor:"#424242",background:"#FFFFFF",labelFontColor:"#202528",categoryFontColor:"#202528",labelFontFamily:"HelveticaNeue",tooltipFill:"rgba(0, 0, 0, 0.9)",legendLabel:"#212529",tooltipBoldLabel:"rgba(255,255,255)",featuredMeasureColor:"#181818",comparativeMeasureColor:"#181818",titleFontColor:"#202528",dataLabelFontColor:"#ffffff",titleFontFamily:"HelveticaNeue-Bold",subTitleFontColor:"HelveticaNeue",subTitleFontFamily:"#202528",firstRangeColor:"#959595",secondRangeColor:"#BDBDBD",thirdRangeColor:"#E3E2E2",rangeStrokes:[{color:"#959595"},{color:"#BDBDBD"},{color:"#E3E2E2"}]};break;default:t=t}return t}function ht(e){e.renderer=new i.SvgRenderer(e.element.id),yt(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height})}function ct(e){return document.getElementById(e)}function dt(e,t,i){var r=t,o=ft(t,i).width;if(o>e)for(var n=t.length-1;n>=0;--n)if(r=t.substring(0,n)+"...",(o=ft(r,i).width)<=e||r.length<4)return r.length<4&&(r=" "),r;return r}function pt(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(r){i=t.compile(e)}return i}function ut(e,i,r){for(var o=e[0].outerHTML,n=Object.keys(r),a=0;a<n.length;a++)o=o.replace(new RegExp("{{:"+n[a]+"}}","g"),r[n[a].toString()]);return t.createElement("div",{id:i,innerHTML:o,styles:"position: absolute"})}function gt(){for(var e=1;1+.5*e!=1;)e*=.5;return e}function yt(e){var t=e.element.clientWidth,i=e.element.clientHeight;e.availableSize=new Gs(vt(e.width,t)||t||600,vt(e.height,i)||i||450)}function mt(e,i,r,o,n){var a,s;new t.Animation({}).animate(i,{duration:o,delay:r,name:n,progress:function(e){a=(e.timeStamp-e.delay)/e.duration,s=0+1*a,e.element.style.opacity=s.toString()},end:function(t){t.element.style.opacity=1..toString(),e.trigger("animationComplete",event)}})}function vt(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function ft(e,i){var r=document.getElementById("smithchartmeasuretext");return null===r&&(r=t.createElement("text",{id:"smithchartmeasuretext"}),document.body.appendChild(r)),r.innerHTML=e,r.style.position="absolute",r.style.visibility="hidden",r.style.left="0",r.style.top="-100",r.style.whiteSpace="nowrap",r.style.fontSize=i.size,r.style.fontWeight=i.fontWeight,r.style.fontStyle=i.fontStyle,r.style.fontFamily=i.fontFamily,r.style.lineHeight="normal",new Gs(r.clientWidth,r.clientHeight)}function bt(e){var i=document.getElementById(e);return i?t.remove(i):null}function xt(e,t,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+t}function wt(e,t,i,r){return-t*Math.sin(e/r*(Math.PI/2))+i+t}function St(e){var t;switch(e){case"Linear":t=xt;break;case"Reverse":t=wt}return t}function Ct(e,t,r,o){var n={id:e.id,x:e.x,y:e.y,fill:r,"font-size":t.size,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,opacity:t.opacity},a=e.text,s=new i.SvgRenderer("").createText(n,a);return o.appendChild(s),s}function Pt(e){var t;switch(e.toLowerCase()){case"highcontrastlight":t=["#79ECE4","#E98272","#DFE6B6","#C6E773","#BA98FF","#FA83C3","#00C27A","#43ACEF","#D681EF","#D8BC6E"];break;case"fabric":t=["#4472c4","#ed7d31","#ffc000","#70ad47","#5b9bd5","#c1c1c1","#6f6fe2","#e269ae","#9e480e","#997300"];break;case"bootstrap":t=["#a16ee5","#f7ce69","#55a5c2","#7ddf1e","#ff6ea6","#7953ac","#b99b4f","#407c92","#5ea716","#b91c52"];break;default:t=["#00bdae","#404041","#357cd2","#e56590","#f8b883","#70ad47","#dd8abd","#7f84e8","#7bb4eb","#ea7a57"]}return t}function Lt(e){var t;switch(e.toLowerCase()){case"highcontrast":t={axisLabel:"#ffffff",axisLine:"#ffffff",majorGridLine:"#BFBFBF",minorGridLine:"#969696",chartTitle:"#ffffff",legendLabel:"#ffffff",background:"#000000",areaBorder:"#ffffff",tooltipFill:"#ffffff",dataLabel:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"materialdark":case"bootstrapdark":case"fabricdark":t={axisLabel:"#DADADA",axisLine:" #6F6C6C",majorGridLine:"#414040",minorGridLine:"#514F4F",chartTitle:"#ffffff",legendLabel:"#DADADA",background:"#000000",areaBorder:" #9A9A9A",tooltipFill:"#F4F4F4",dataLabel:"#DADADA",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"bootstrap4":t={axisLabel:"#212529",axisLine:"#ADB5BD",majorGridLine:"#CED4DA",minorGridLine:"#DEE2E6",chartTitle:"#212529",legendLabel:"#212529",background:"#FFFFFF",areaBorder:"#DEE2E6",tooltipFill:"#000000",dataLabel:"#212529",tooltipBoldLabel:"#FFFFFF",tooltipLightLabel:"#FFFFFF",tooltipHeaderLine:"#FFFFFF",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",labelFontFamily:"HelveticaNeue",tooltipFillOpacity:1,tooltipTextOpacity:.9};break;default:t={axisLabel:"#686868",axisLine:"#b5b5b5",majorGridLine:"#dbdbdb",minorGridLine:"#eaeaea",chartTitle:"#424242",legendLabel:"#353535",background:"#FFFFFF",areaBorder:"Gray",tooltipFill:"rgba(0, 8, 22, 0.75)",dataLabel:"#424242",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return t}function Rt(e){var t;switch(e.toLowerCase()){case"bootstrapdark":case"fabricdark":case"materialdark":case"highcontrast":t={axisLineColor:"#ffffff",dataLabelColor:"#ffffff",rangeBandColor:"#ffffff",tooltipFill:"#ffffff",background:"#000000",tooltipFontColor:"#363F4C",trackerLineColor:"#ffffff"};break;case"bootstrap4":t={axisLineColor:"#6C757D",dataLabelColor:"#212529",rangeBandColor:"#212529",tooltipFill:"#000000",background:"#FFFFFF",tooltipFontColor:"#FFFFFF",trackerLineColor:"#212529",fontFamily:"HelveticaNeue-Medium",tooltipFillOpacity:1,tooltipTextOpacity:.9,labelFontFamily:"HelveticaNeue"};break;default:t={axisLineColor:"#000000",dataLabelColor:"#424242",rangeBandColor:"#000000",background:"#FFFFFF",tooltipFill:"#363F4C",tooltipFontColor:"#ffffff",trackerLineColor:"#000000"}}return t}function Mt(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function At(e){var t=e.element.clientWidth?e.element.clientWidth:e.element.parentElement?e.element.parentElement.clientWidth:100,i=e.element.clientHeight?e.element.clientHeight:e.element.parentElement?e.element.parentElement.clientHeight:50;e.availableSize=new Jl(Mt(e.width,t)||t,Mt(e.height,i)||i||(e.isDevice?Math.min(window.innerWidth,window.innerHeight):i))}function Tt(e){e.renderer=new i.SvgRenderer(e.element.id),At(e),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height})}function kt(e,t){return t&&t.appendChild(e),e}function _t(e,t,i){return kt(e.renderer.drawCircle(t),i)}function Ot(e,t,i,r,o){return"M "+e.x+" "+(t+e.y)+" Q "+e.x+" "+e.y+" "+(e.x+t)+" "+e.y+" L "+(e.x+e.width-i)+" "+e.y+" Q "+(e.x+e.width)+" "+e.y+" "+(e.x+e.width)+" "+(e.y+i)+" L "+(e.x+e.width)+" "+(e.y+e.height-o)+" Q "+(e.x+e.width)+" "+(e.y+e.height)+" "+(e.x+e.width-o)+" "+(e.y+e.height)+" L "+(e.x+r)+" "+(e.y+e.height)+" Q "+e.x+" "+(e.y+e.height)+" "+e.x+" "+(e.y+e.height-r)+" L "+e.x+" "+(t+e.y)+" Z"}function Et(e,t,i){return t.d=Ot(t.rect,t.topLeft,t.topRight,t.bottomLeft,t.bottomRight),kt(e.renderer.drawPath(t),i)}function zt(e,t,i){return kt(e.renderer.drawPath(t),i)}function It(e,i){var r=document.getElementById("sparklinesmeasuretext");return null===r&&(r=t.createElement("text",{id:"sparklinesmeasuretext"}),document.body.appendChild(r)),r.innerHTML=e,r.style.fontStyle=i.fontStyle,r.style.fontFamily=i.fontFamily,r.style.visibility="hidden",r.style.top="-100",r.style.left="0",r.style.position="absolute",r.style.fontSize=i.size,r.style.fontWeight=i.fontWeight,r.style.whiteSpace="nowrap",r.style.lineHeight="normal",new Jl(r.clientWidth,r.clientHeight)}function Dt(e,t,r,o){var n={id:e.id,x:e.x,y:e.y,transform:e.transform,opacity:t.opacity,fill:r,"font-family":t.fontFamily,"font-weight":t.fontWeight,"font-size":t.size,"font-style":t.fontStyle,"text-anchor":e.anchor,"dominant-baseline":e.baseLine},a=new i.SvgRenderer("").createText(n,e.text);return a.style["user-select"]="none",a.style["-moz-user-select"]="none",a.style["-webkit-touch-callout"]="none",a.style["-webkit-user-select"]="none",a.style["-khtml-user-select"]="none",a.style["-ms-user-select"]="none",a.style["-o-user-select"]="none",o.appendChild(a),a}function Bt(e){var i=document.getElementById(e);return i?t.remove(i):null}function Nt(e){return document.getElementById(e)}function Ft(e,t,i){return e>=i.x&&e<=i.x+i.width&&t>=i.y&&t<=i.y+i.height}!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisTitleFont={size:"14px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.chartTitleFont={size:"15px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.chartSubTitleFont={size:"11px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.crosshairLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.tooltipLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.legendLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.legendTitleFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.stripLineLabelFont={size:"12px",fontWeight:"Regular",color:"#353535",fontStyle:"Normal",fontFamily:"Segoe UI"},e.stockEventFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}(e.Theme||(e.Theme={}));var Vt=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),jt=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Ht=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("Line")],i.prototype,"type",void 0),jt([t.Property(null)],i.prototype,"color",void 0),jt([t.Property(1)],i.prototype,"width",void 0),jt([t.Property(null)],i.prototype,"length",void 0),jt([t.Property("")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),Xt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("Normal")],i.prototype,"fontStyle",void 0),jt([t.Property("16px")],i.prototype,"size",void 0),jt([t.Property("Normal")],i.prototype,"fontWeight",void 0),jt([t.Property("")],i.prototype,"color",void 0),jt([t.Property("Center")],i.prototype,"textAlignment",void 0),jt([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),jt([t.Property(1)],i.prototype,"opacity",void 0),jt([t.Property("Trim")],i.prototype,"textOverflow",void 0),i}(t.ChildProperty),Yt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("")],i.prototype,"color",void 0),jt([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Gt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"x",void 0),jt([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),Wt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Complex({},Yt)],i.prototype,"border",void 0),jt([t.Property("transparent")],i.prototype,"background",void 0),jt([t.Property(1)],i.prototype,"opacity",void 0),jt([t.Property(null)],i.prototype,"backgroundImage",void 0),i}(t.ChildProperty),Ut=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(10)],i.prototype,"left",void 0),jt([t.Property(10)],i.prototype,"right",void 0),jt([t.Property(10)],i.prototype,"top",void 0),jt([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),Zt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"left",void 0),jt([t.Property(0)],i.prototype,"right",void 0),jt([t.Property(0)],i.prototype,"top",void 0),jt([t.Property(0)],i.prototype,"bottom",void 0),i}(t.ChildProperty),qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(!0)],i.prototype,"enable",void 0),jt([t.Property(1e3)],i.prototype,"duration",void 0),jt([t.Property(0)],i.prototype,"delay",void 0),i}(t.ChildProperty),Qt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"series",void 0),jt([t.Property(0)],i.prototype,"point",void 0),i}(t.ChildProperty),$t=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(0)],i.prototype,"topLeft",void 0),jt([t.Property(0)],i.prototype,"topRight",void 0),jt([t.Property(0)],i.prototype,"bottomLeft",void 0),jt([t.Property(0)],i.prototype,"bottomRight",void 0),i}(t.ChildProperty),Jt=function(){function e(e,t){this.series=e,this.point=t}return e}(),Kt=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(null)],i.prototype,"fill",void 0),jt([t.Complex({color:"transparent",width:0},Yt)],i.prototype,"border",void 0),jt([t.Property("Gap")],i.prototype,"mode",void 0),i}(t.ChildProperty),ei=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(!1)],i.prototype,"enable",void 0),jt([t.Property(null)],i.prototype,"minY",void 0),jt([t.Property(null)],i.prototype,"maxY",void 0),jt([t.Property(null)],i.prototype,"fill",void 0),i}(t.ChildProperty),ti=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Vt(r,i),jt([t.Property(!1)],r.prototype,"enable",void 0),jt([t.Property(!0)],r.prototype,"enableMarker",void 0),jt([t.Property(!1)],r.prototype,"shared",void 0),jt([t.Property(null)],r.prototype,"fill",void 0),jt([t.Property(null)],r.prototype,"header",void 0),jt([t.Property(.75)],r.prototype,"opacity",void 0),jt([t.Complex(e.Theme.tooltipLabelFont,Xt)],r.prototype,"textStyle",void 0),jt([t.Property(null)],r.prototype,"format",void 0),jt([t.Property(null)],r.prototype,"template",void 0),jt([t.Property(!0)],r.prototype,"enableAnimation",void 0),jt([t.Property(300)],r.prototype,"duration",void 0),jt([t.Property(1e3)],r.prototype,"fadeOutDuration",void 0),jt([t.Property(!1)],r.prototype,"enableTextWrap",void 0),jt([t.Complex({color:"#cccccc",width:.5},Yt)],r.prototype,"border",void 0),r}(t.ChildProperty),ii=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property("Years")],i.prototype,"intervalType",void 0),jt([t.Property(1)],i.prototype,"interval",void 0),jt([t.Property(null)],i.prototype,"text",void 0),jt([t.Property(!1)],i.prototype,"selected",void 0),i}(t.ChildProperty),ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Vt(i,e),jt([t.Property(43)],i.prototype,"height",void 0),jt([t.Property("Bottom")],i.prototype,"position",void 0),jt([t.Collection([],ii)],i.prototype,"periods",void 0),i}(t.ChildProperty),oi=function(){function e(e,t){e<t?(this.mStart=e,this.mEnd=t):(this.mStart=t,this.mEnd=e)}return Object.defineProperty(e.prototype,"start",{get:function(){return this.mStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this.mEnd},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delta",{get:function(){return this.mEnd-this.mStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"median",{get:function(){return this.mStart+(this.mEnd-this.mStart)/2},enumerable:!0,configurable:!0}),e}(),ni=function(){function e(e){this.isColumn=0,this.chart=e}return e.prototype.calculateNumericNiceInterval=function(e,i,r){var o=re(r,e),n=i/o;if(!t.isNullOrUndefined(e.desiredIntervals))return n;for(var a=Math.pow(10,Math.floor(v(n,10))),s=0,l=e.intervalDivs;s<l.length;s++){var h=a*l[s];if(o<i/h)break;n=h}return n},e.prototype.getActualRange=function(e,t){this.initializeDoubleRange(e),!e.startFromZero&&this.isColumn>0?(e.actualRange.interval=e.interval||this.calculateNumericNiceInterval(e,e.doubleRange.delta,t),e.actualRange.max=e.doubleRange.end+e.actualRange.interval,e.doubleRange.start-e.actualRange.interval<0&&e.doubleRange.start>0?e.actualRange.min=0:e.actualRange.min=e.doubleRange.start-e.actualRange.interval):(e.actualRange.interval=e.interval||this.calculateNumericNiceInterval(e,e.doubleRange.delta,t),e.actualRange.min=e.doubleRange.start,e.actualRange.max=e.doubleRange.end)},e.prototype.initializeDoubleRange=function(e){null!==e.minimum?this.min=e.minimum:null!==this.min&&this.min!==Number.POSITIVE_INFINITY||(this.min=0),null!==e.maximum?this.max=e.maximum:null!==this.max&&this.max!==Number.NEGATIVE_INFINITY||(this.max=5),this.min===this.max&&(this.max=e.valueType.indexOf("Category")>-1?this.max:this.min+1),e.doubleRange=new oi(this.min,this.max),e.actualRange={}},e.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t,this.chart)},e.prototype.calculateRange=function(e){if(this.min=null,this.max=null,!te(e))for(var t=0,i=e.series;t<i.length;t++){var r=i[t];r.visible&&(this.paddingInterval=0,e.maxPointLength=r.points.length,((r.type.indexOf("Column")>-1||r.type.indexOf("Histogram")>-1)&&"Horizontal"===e.orientation||r.type.indexOf("Bar")>-1&&"Vertical"===e.orientation)&&("Double"!==r.xAxis.valueType&&"DateTime"!==r.xAxis.valueType||"Auto"!==r.xAxis.rangePadding||(this.paddingInterval=.5*U(r.xAxis,e.series))),"Horizontal"===e.orientation&&(this.chart.requireInvertedAxis?this.yAxisRange(e,r):this.findMinMax(r.xMin-this.paddingInterval,r.xMax+this.paddingInterval)),"Vertical"===e.orientation&&(this.isColumn+="Column"===r.type||"Bar"===r.type||"Column"===r.drawType?1:0,this.chart.requireInvertedAxis?this.findMinMax(r.xMin-this.paddingInterval,r.xMax+this.paddingInterval):this.yAxisRange(e,r)))}},e.prototype.yAxisRange=function(e,t){t.dragSettings.enable&&this.chart.dragY&&(this.chart.dragY>=e.visibleRange.max&&(t.yMax=this.chart.dragY+e.visibleRange.interval),this.chart.dragY<=e.visibleRange.min&&(t.yMin=this.chart.dragY-e.visibleRange.interval)),this.findMinMax(t.yMin,t.yMax)},e.prototype.findMinMax=function(e,t){(null===this.min||this.min>e)&&(this.min=e),(null===this.max||this.max<t)&&(this.max=t),this.max===this.min&&this.max<0&&this.min<0&&(this.max=0)},e.prototype.applyRangePadding=function(e,t){var i=e.actualRange.min,r=e.actualRange.max;if(!te(e)){var o=e.actualRange.interval,n=e.getRangePadding(this.chart);"Additional"===n||"Round"===n?this.findAdditional(e,i,r,o):"Normal"===n?this.findNormal(e,i,r,o,t):this.updateActualRange(e,i,r,o)}e.actualRange.delta=e.actualRange.max-e.actualRange.min,this.calculateVisibleRange(t,e)},e.prototype.updateActualRange=function(e,t,i,r){e.actualRange={min:null!=e.minimum?e.minimum:t,max:null!=e.maximum?e.maximum:i,interval:null!=e.interval?e.interval:r,delta:e.actualRange.delta}},e.prototype.findAdditional=function(e,t,i,r){var o,n;o=Math.floor(t/r)*r,n=Math.ceil(i/r)*r,"Additional"===e.rangePadding&&(o-=r,n+=r),this.updateActualRange(e,o,n,r)},e.prototype.findNormal=function(e,t,i,r,o){var n,a,s=t;t<0?(s=0,.365*r>=r+(n=t+.05*t)%r&&(n-=r),n%r<0&&(n=n-r-n%r)):(n=t<5/6*i?0:t-.5*(i-t))%r>0&&(n-=n%r),.365*r>=r-(a=i>0?i+.05*(i-s):i-.05*(i-s))%r&&(a+=r),a%r>0&&(a=a+r-a%r),e.doubleRange=new oi(n,a),0===n&&(r=this.calculateNumericNiceInterval(e,e.doubleRange.delta,o),a=Math.ceil(a/r)*r),this.updateActualRange(e,n,a,r)},e.prototype.calculateVisibleRange=function(e,i){if(i.visibleRange={max:i.actualRange.max,min:i.actualRange.min,delta:i.actualRange.delta,interval:i.actualRange.interval},"Cartesian"===this.chart.chartAreaType){var r=!t.isNullOrUndefined(i.zoomingScrollBar)&&i.zoomingScrollBar.isLazyLoad;(i.zoomFactor<1||i.zoomPosition>0)&&!r&&(i.calculateVisibleRangeOnZooming(this.chart),i.calculateAxisRange(e,this.chart),i.visibleRange.interval=i.enableAutoIntervalOnZooming&&"Category"!==i.valueType?this.calculateNumericNiceInterval(i,i.doubleRange.delta,e):i.visibleRange.interval)}i.triggerRangeRender(this.chart,i.visibleRange.min,i.visibleRange.max,i.visibleRange.interval)},e.prototype.calculateVisibleLabels=function(e,i){e.visibleLabels=[];var r,o=e.visibleRange.min;!("chart"===i.getModuleName()&&"PolarRadar"===i.chartAreaType)&&(e.zoomFactor<1||e.zoomPosition>0||this.paddingInterval)&&(o=e.visibleRange.min-e.visibleRange.min%e.visibleRange.interval);var n=this.getFormat(e),a=null!==n.match("{value}"),s=0,l=0;e.labelFormat&&e.labelFormat.indexOf("n")>-1&&(l=parseInt(e.labelFormat.substring(1,e.labelFormat.length),10)),e.format=i.intl.getNumberFormat({format:a?"":n,useGrouping:i.useGroupingSeparator}),e.startLabel=e.format(e.visibleRange.min),e.endLabel=e.format(e.visibleRange.max),e.visibleRange.interval&&(e.visibleRange.interval+"").indexOf(".")>=0&&(s=(e.visibleRange.interval+"").split(".")[1].length);for(var h;o<=e.visibleRange.max&&h!==o;o+=e.visibleRange.interval)h=o,r=t.extend({},t.getValue("properties",e.labelStyle),null,!0),x(o,e.visibleRange)&&ee(i,o,this.formatValue(e,a,n,o),r,e);o&&(o+"").indexOf(".")>=0&&(o+"").split(".")[1].length>10&&(o=(o+"").split(".")[1].length>(l||s)?+o.toFixed(l||s):o)<=e.visibleRange.max&&ee(i,o,this.formatValue(e,a,n,o),r,e),e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},e.prototype.getFormat=function(e){return e.labelFormat?0===e.labelFormat.indexOf("p")&&-1===e.labelFormat.indexOf("{value}")&&e.isStack100?"{value}%":e.labelFormat:e.isStack100?"{value}%":""},e.prototype.formatValue=function(e,t,i,r){return t?i.replace("{value}",e.format(r)):e.format(r)},e}(),ai="axisLabelRender",si=/~\d+~/g,li=/\^\d+\^/g,hi="onZooming",ci=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),di=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},pi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property("0")],i.prototype,"x",void 0),di([t.Property("0")],i.prototype,"y",void 0),di([t.Property(null)],i.prototype,"content",void 0),di([t.Property("Center")],i.prototype,"horizontalAlignment",void 0),di([t.Property("Pixel")],i.prototype,"coordinateUnits",void 0),di([t.Property("Chart")],i.prototype,"region",void 0),di([t.Property("Middle")],i.prototype,"verticalAlignment",void 0),di([t.Property(null)],i.prototype,"xAxisName",void 0),di([t.Property(null)],i.prototype,"yAxisName",void 0),di([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),ui=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property("")],i.prototype,"color",void 0),di([t.Property(1)],i.prototype,"width",void 0),di([t.Property("Rectangle")],i.prototype,"type",void 0),i}(t.ChildProperty),gi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property(null)],i.prototype,"start",void 0),di([t.Property(null)],i.prototype,"end",void 0),di([t.Property("")],i.prototype,"text",void 0),di([t.Property(null)],i.prototype,"maximumTextWidth",void 0),di([t.Property(null)],i.prototype,"customAttributes",void 0),di([t.Property("")],i.prototype,"type",void 0),i}(t.ChildProperty),yi=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return ci(r,i),di([t.Property(!0)],r.prototype,"visible",void 0),di([t.Property(!1)],r.prototype,"startFromAxis",void 0),di([t.Property(null)],r.prototype,"start",void 0),di([t.Property(null)],r.prototype,"end",void 0),di([t.Property(null)],r.prototype,"size",void 0),di([t.Property("#808080")],r.prototype,"color",void 0),di([t.Property(null)],r.prototype,"dashArray",void 0),di([t.Property("Auto")],r.prototype,"sizeType",void 0),di([t.Property(!1)],r.prototype,"isRepeat",void 0),di([t.Property(null)],r.prototype,"repeatEvery",void 0),di([t.Property(null)],r.prototype,"repeatUntil",void 0),di([t.Property(!1)],r.prototype,"isSegmented",void 0),di([t.Property(null)],r.prototype,"segmentStart",void 0),di([t.Property(null)],r.prototype,"segmentEnd",void 0),di([t.Property(null)],r.prototype,"segmentAxisName",void 0),di([t.Complex({color:"transparent",width:1},Yt)],r.prototype,"border",void 0),di([t.Property("")],r.prototype,"text",void 0),di([t.Property(null)],r.prototype,"rotation",void 0),di([t.Property("Middle")],r.prototype,"horizontalAlignment",void 0),di([t.Property("Middle")],r.prototype,"verticalAlignment",void 0),di([t.Complex(e.Theme.stripLineLabelFont,Xt)],r.prototype,"textStyle",void 0),di([t.Property("Behind")],r.prototype,"zIndex",void 0),di([t.Property(1)],r.prototype,"opacity",void 0),r}(t.ChildProperty),mi=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return ci(r,i),di([t.Property("Center")],r.prototype,"alignment",void 0),di([t.Property("Wrap")],r.prototype,"overflow",void 0),di([t.Complex(e.Theme.axisLabelFont,Xt)],r.prototype,"textStyle",void 0),di([t.Complex({color:null,width:1,type:"Rectangle"},ui)],r.prototype,"border",void 0),di([t.Collection([],gi)],r.prototype,"categories",void 0),r}(t.ChildProperty),vi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property(null)],i.prototype,"minimum",void 0),di([t.Property(null)],i.prototype,"maximum",void 0),i}(t.ChildProperty),fi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ci(i,e),di([t.Property(!1)],i.prototype,"enable",void 0),di([t.Property(null)],i.prototype,"pointsLength",void 0),di([t.Complex({},vi)],i.prototype,"range",void 0),i}(t.ChildProperty),bi=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xi=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},wi=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.axes=[],t.nearSizes=[],t.farSizes=[],t}return bi(i,e),i.prototype.computeSize=function(e,t){var i=0;e.visible&&e.internalVisibility&&(i+=e.findTickSize(e.crossInAxis)+t+e.findLabelSize(e.crossInAxis,5)+.5*e.lineStyle.width),e.opposedPosition?this.farSizes.push(i):this.nearSizes.push(i)},xi([t.Property("100%")],i.prototype,"height",void 0),xi([t.Complex({},Yt)],i.prototype,"border",void 0),i}(t.ChildProperty),Si=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.axes=[],t.nearSizes=[],t.farSizes=[],t.padding=0,t}return bi(i,e),i.prototype.computeSize=function(e,t){var i=0;e.visible&&e.internalVisibility&&(i+=e.findTickSize(e.crossInAxis)+t+e.findLabelSize(e.crossInAxis,5)+.5*e.lineStyle.width),e.opposedPosition?this.farSizes.push(i):this.nearSizes.push(i)},xi([t.Property("100%")],i.prototype,"width",void 0),xi([t.Complex({},Yt)],i.prototype,"border",void 0),i}(t.ChildProperty),Ci=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(1)],i.prototype,"width",void 0),xi([t.Property("")],i.prototype,"dashArray",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Pi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(.7)],i.prototype,"width",void 0),xi([t.Property("")],i.prototype,"dashArray",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Li=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(1)],i.prototype,"width",void 0),xi([t.Property("")],i.prototype,"dashArray",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Ri=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(1)],i.prototype,"width",void 0),xi([t.Property(5)],i.prototype,"height",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Mi=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return bi(i,e),xi([t.Property(.7)],i.prototype,"width",void 0),xi([t.Property(5)],i.prototype,"height",void 0),xi([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Ai=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return bi(r,i),xi([t.Property(!1)],r.prototype,"enable",void 0),xi([t.Property(null)],r.prototype,"fill",void 0),xi([t.Complex(e.Theme.crosshairLabelFont,Xt)],r.prototype,"textStyle",void 0),r}(t.ChildProperty),Ti=function(r){function o(e,t,o,n){var a=r.call(this,e,t,o,n)||this;return a.visibleLabels=[],a.series=[],a.rect=new i.Rect(void 0,void 0,0,0),a.axisBottomLine=null,a.intervalDivs=[10,5,2,1],a.isStack100=!1,a.crossAt=null,a.updatedRect=null,a.multiLevelLabelHeight=0,a.isChart=!0,a.isIntervalInDecimal=!0,a.titleCollection=[],a.titleSize=new i.Size(0,0),a.internalVisibility=!0,a.angle=a.labelRotation,a}return bi(o,r),o.prototype.findTickSize=function(e){return"Inside"===this.tickPosition?0:!e||e.visibleRange&&!this.isInside(e.visibleRange)?this.majorTickLines.height:0},o.prototype.isInside=function(e){return b(this.crossAt,e)||!this.opposedPosition&&this.crossAt>=e.max||this.opposedPosition&&this.crossAt<=e.min},o.prototype.findLabelSize=function(e,t){var r=0,o="Horizontal"===this.orientation;if(this.title&&(this.titleSize=i.measureText(this.title,this.titleStyle),r=this.titleSize.height+t,this.rect.width||this.rect.height)){var n=o?this.rect.width:this.rect.height;this.titleCollection=Xe(this.title,this.titleStyle,n),r*=this.titleCollection.length}if("Inside"===this.labelPosition)return r+t;var a,s,l=r+t+this.titlePadding+this.labelPadding+("Vertical"===this.orientation?this.maxLabelSize.width:this.maxLabelSize.height)+this.multiLevelLabelHeight;if(e&&this.placeNextToAxisLine){var h=e.visibleRange,c="Horizontal"===e.orientation?e.rect.width:e.rect.height;if(!h||!c)return 0;this.isInside(h)&&(l=(a=(s=this.findDifference(e))*((c-((a=s*(c/h.delta))<l?l-a:0))/h.delta))<l?l-a:0)}return l},o.prototype.updateCrossValue=function(){var e=this.crossAt;if(null===e||!this.isInside(this.crossInAxis.visibleRange))return this.updatedRect=this.rect,null;var i=this.crossInAxis.visibleRange;this.opposedPosition?this.crossAt<i.min&&(e=i.min):this.crossAt>i.max&&(e=i.max),this.updatedRect=t.extend({},this.rect,null,!0),"Horizontal"===this.orientation?(e=this.crossInAxis.rect.height-z(e,this.crossInAxis)*this.crossInAxis.rect.height,this.updatedRect.y=this.crossInAxis.rect.y+e):(e=z(e,this.crossInAxis)*this.crossInAxis.rect.width,this.updatedRect.x=this.crossInAxis.rect.x+e)},o.prototype.findDifference=function(e){var t=0;return t=this.opposedPosition?e.isInversed?e.visibleRange.min:e.visibleRange.max:e.isInversed?e.visibleRange.max:e.visibleRange.min,Math.abs(this.crossAt-t)},o.prototype.calculateVisibleRangeOnZooming=function(e){if(ie(this)){var t=this.actualRange,i=void 0,r=void 0;r=!this.isInversed||e.zoomModule?(i=this.actualRange.min+this.zoomPosition*this.actualRange.delta)+this.zoomFactor*this.actualRange.delta:(i=this.actualRange.max-this.zoomPosition*this.actualRange.delta)-this.zoomFactor*this.actualRange.delta,i<t.min&&(r+=t.min-i,i=t.min),r>t.max&&(i-=r-t.max,r=t.max),this.doubleRange=new oi(i,r),this.visibleRange={min:this.doubleRange.start,max:this.doubleRange.end,delta:this.doubleRange.delta,interval:this.visibleRange.interval}}},o.prototype.calculateAxisRange=function(e,i){if(i.enableAutoIntervalOnBothAxis){if("Horizontal"===this.orientation&&"X"===i.zoomSettings.mode)for(l=0;l<this.series.length;l++){for(var r=[],o=0,n=this.series[l].visiblePoints;o<n.length;o++)(p=n[o]).xValue>this.visibleRange.min&&p.xValue<this.visibleRange.max&&r.push(p.yValue);for(var a=0,s=i.axisCollections;a<s.length;a++)"Vertical"!==(y=s[a]).orientation||t.isNullOrUndefined(y.series[l])||(y.series[l].yMin=Math.min.apply(Math,r),y.series[l].yMax=Math.max.apply(Math,r),y.baseModule.calculateRangeAndInterval(e,y))}if("Vertical"===this.orientation&&"Y"===i.zoomSettings.mode)for(var l=0;l<this.series.length;l++){for(var h=[],c=0,d=this.series[l].visiblePoints;c<d.length;c++){var p=d[c];p.yValue>this.visibleRange.min&&p.yValue<this.visibleRange.max&&h.push(p.xValue)}for(var u=0,g=i.axisCollections;u<g.length;u++){var y=g[u];"Horizontal"!==y.orientation||t.isNullOrUndefined(y.series[l])||(y.series[l].xMin=Math.min.apply(Math,h),y.series[l].xMax=Math.max.apply(Math,h),y.baseModule.calculateRangeAndInterval(e,y))}}}},o.prototype.triggerRangeRender=function(e,t,i,r){var o={cancel:!1,name:"axisRangeCalculated",axis:this,minimum:t,maximum:i,interval:r};e.trigger("axisRangeCalculated",o),o.cancel||(this.visibleRange={min:o.minimum,max:o.maximum,interval:o.interval,delta:o.maximum-o.minimum})},o.prototype.getRangePadding=function(e){var t=this.rangePadding;if("Auto"!==t)return t;switch(this.orientation){case"Horizontal":t=e.requireInvertedAxis?this.isStack100||this.baseModule.chart.stockChart?"Round":"Normal":"None";break;case"Vertical":t=e.requireInvertedAxis?"None":this.isStack100||this.baseModule.chart.stockChart?"Round":"Normal"}return t},o.prototype.getMaxLabelWidth=function(e){var r,o,n=0,a=!1;this.angle=this.labelRotation,this.maxLabelSize=new i.Size(0,0);for(var s,l=this.labelIntersectAction,h=0,c=this.visibleLabels.length;h<c;h++){(o=u((s=this.visibleLabels[h]).originalText))?(s.size=i.measureText(s.originalText.replace(/<br>/g," "),this.labelStyle),s.breakLabelSize=i.measureText(this.enableTrim?s.text.join("<br>"):s.originalText,this.labelStyle)):s.size=i.measureText(s.text,this.labelStyle);var d=o?s.breakLabelSize.width:s.size.width;d>this.maxLabelSize.width&&(this.maxLabelSize.width=d,this.rotatedLabel=s.text);var p=o?s.breakLabelSize.height:s.size.height;if(p>this.maxLabelSize.height&&(this.maxLabelSize.height=p),o&&(s.text=this.enableTrim?s.text:s.originalText.split("<br>")),"None"!==l&&"Hide"!==l&&"Trim"!==l&&("None"!==l||this.angle%360==0)&&"Horizontal"===this.orientation&&this.rect.width>0&&!a){var g=o?s.breakLabelSize.width:s.size.width;switch(r=z(s.value,this)*this.rect.width+this.rect.x,r-=g/2,"Shift"===this.edgeLabelPlacement&&(0===h&&r<this.rect.x&&(r=this.rect.x),h===this.visibleLabels.length-1&&r+g>this.rect.x+this.rect.width&&(r=this.rect.x+this.rect.width-g)),l){case"MultipleRows":h>0&&this.findMultiRows(h,r,s,o);break;case"Rotate45":case"Rotate90":h>0&&(this.isInversed?r+g>=n:r<=n)&&(this.angle="Rotate45"===l?45:90,a=!0);break;default:if(o){for(var m=void 0,v=[],f=void 0,b=0;b<s.text.length;b++)if((m=Ge(s.text[b],this.rect.width/this.visibleLabels.length,this.labelStyle)).length>1)for(var x=0;x<m.length;x++)f=m[x],v.push(f);else v.push(m[0]);s.text=v}else s.text=Ge(s.text,this.rect.width/this.visibleLabels.length,this.labelStyle);var w=s.size.height*s.text.length;w>this.maxLabelSize.height&&(this.maxLabelSize.height=w)}n=this.isInversed?r:r+g}}if(0!==this.angle&&"Horizontal"===this.orientation){this.rotatedLabel=t.isNullOrUndefined(this.rotatedLabel)?"":this.rotatedLabel;var S=-360===this.angle||0===this.angle||-180===this.angle||180===this.angle||360===this.angle;"Outside"===this.labelPosition&&!S&&u(this.rotatedLabel)?this.maxLabelSize=new i.Size(this.maxLabelSize.height,this.maxLabelSize.width):this.maxLabelSize=y(this.labelStyle,this.rotatedLabel,this.angle,e)}e.multiLevelLabelModule&&this.multiLevelLabels.length>0&&e.multiLevelLabelModule.getMultilevelLabelsHeight(this)},o.prototype.findMultiRows=function(e,t,i,r){for(var o,n,a,s=[],l=e-1;l>=0;l--)o=this.visibleLabels[l],a=r?o.breakLabelSize.width:o.size.width,n=z(o.value,this)*this.rect.width+this.rect.x,(this.isInversed?t+i.size.width>n-.5*a:t<n+.5*a)?(s.push(o.index),i.index=i.index>o.index?i.index:o.index+1):i.index=s.indexOf(o.index)>-1?i.index:o.index;var h=(r?i.breakLabelSize.height:i.size.height)*i.index+5*(i.index-1);h>this.maxLabelSize.height&&(this.maxLabelSize.height=h)},o.prototype.getModule=function(e){"Double"===this.valueType?this.baseModule=new ni(e):this.baseModule=e[G(this.valueType)+"Module"]},xi([t.Complex(e.Theme.axisLabelFont,Xt)],o.prototype,"labelStyle",void 0),xi([t.Complex({},Ai)],o.prototype,"crosshairTooltip",void 0),xi([t.Property("")],o.prototype,"title",void 0),xi([t.Complex(e.Theme.axisTitleFont,Xt)],o.prototype,"titleStyle",void 0),xi([t.Property("")],o.prototype,"labelFormat",void 0),xi([t.Property("")],o.prototype,"skeleton",void 0),xi([t.Property("DateTime")],o.prototype,"skeletonType",void 0),xi([t.Property("Center")],o.prototype,"lineBreakAlignment",void 0),xi([t.Property(0)],o.prototype,"plotOffset",void 0),xi([t.Property(null)],o.prototype,"plotOffsetLeft",void 0),xi([t.Property(null)],o.prototype,"plotOffsetTop",void 0),xi([t.Property(null)],o.prototype,"plotOffsetRight",void 0),xi([t.Property(null)],o.prototype,"plotOffsetBottom",void 0),xi([t.Property(!1)],o.prototype,"isIndexed",void 0),xi([t.Property(10)],o.prototype,"logBase",void 0),xi([t.Property(0)],o.prototype,"columnIndex",void 0),xi([t.Property(0)],o.prototype,"rowIndex",void 0),xi([t.Property(1)],o.prototype,"span",void 0),xi([t.Property(null)],o.prototype,"desiredIntervals",void 0),xi([t.Property(3)],o.prototype,"maximumLabels",void 0),xi([t.Property(1)],o.prototype,"zoomFactor",void 0),xi([t.Property(0)],o.prototype,"zoomPosition",void 0),xi([t.Property(!0)],o.prototype,"enableScrollbarOnZooming",void 0),xi([t.Property(!1)],o.prototype,"opposedPosition",void 0),xi([t.Property(!0)],o.prototype,"enableAutoIntervalOnZooming",void 0),xi([t.Property("Auto")],o.prototype,"rangePadding",void 0),xi([t.Property("Double")],o.prototype,"valueType",void 0),xi([t.Property("None")],o.prototype,"edgeLabelPlacement",void 0),xi([t.Property("Auto")],o.prototype,"intervalType",void 0),xi([t.Property("BetweenTicks")],o.prototype,"labelPlacement",void 0),xi([t.Property("Outside")],o.prototype,"tickPosition",void 0),xi([t.Property("Outside")],o.prototype,"labelPosition",void 0),xi([t.Property("")],o.prototype,"name",void 0),xi([t.Property(!0)],o.prototype,"visible",void 0),xi([t.Property(0)],o.prototype,"minorTicksPerInterval",void 0),xi([t.Property(0)],o.prototype,"labelRotation",void 0),xi([t.Property(null)],o.prototype,"crossesAt",void 0),xi([t.Property(!0)],o.prototype,"placeNextToAxisLine",void 0),xi([t.Property(null)],o.prototype,"crossesInAxis",void 0),xi([t.Property(null)],o.prototype,"minimum",void 0),xi([t.Property(null)],o.prototype,"maximum",void 0),xi([t.Property(null)],o.prototype,"interval",void 0),xi([t.Property(34)],o.prototype,"maximumLabelWidth",void 0),xi([t.Property(!1)],o.prototype,"enableTrim",void 0),xi([t.Property(5)],o.prototype,"labelPadding",void 0),xi([t.Property(5)],o.prototype,"titlePadding",void 0),xi([t.Complex({},Ri)],o.prototype,"majorTickLines",void 0),xi([t.Complex({},Mi)],o.prototype,"minorTickLines",void 0),xi([t.Complex({},Ci)],o.prototype,"majorGridLines",void 0),xi([t.Complex({},Pi)],o.prototype,"minorGridLines",void 0),xi([t.Complex({},Li)],o.prototype,"lineStyle",void 0),xi([t.Property("Trim")],o.prototype,"labelIntersectAction",void 0),xi([t.Property(!1)],o.prototype,"isInversed",void 0),xi([t.Property(100)],o.prototype,"coefficient",void 0),xi([t.Property(0)],o.prototype,"startAngle",void 0),xi([t.Property(!0)],o.prototype,"startFromZero",void 0),xi([t.Property(null)],o.prototype,"description",void 0),xi([t.Property(2)],o.prototype,"tabIndex",void 0),xi([t.Collection([],yi)],o.prototype,"stripLines",void 0),xi([t.Collection([],mi)],o.prototype,"multiLevelLabels",void 0),xi([t.Complex({color:null,width:0,type:"Rectangle"},ui)],o.prototype,"border",void 0),xi([t.Complex({},fi)],o.prototype,"scrollbarSettings",void 0),o}(t.ChildProperty),ki=function(){function e(e,t,r,o,n,a,s){void 0===n&&(n=new i.Size(0,0)),void 0===a&&(a=new i.Size(0,0)),void 0===s&&(s=1),this.text=e,this.originalText=o,this.value=t,this.labelStyle=r,this.size=n,this.breakLabelSize=a,this.index=s}return e}(),_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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Oi=function(){function e(e,t,i,r,o,n){this.verticalStandardMean=e,this.horizontalStandardMean=i,this.verticalSquareRoot=t,this.horizontalSquareRoot=r,this.verticalMean=o,this.horizontalMean=n}return e}(),Ei=function(){function e(e,t,i,r,o){this.startAngle=e,this.endAngle=t,this.innerRadius=i,this.radius=r,this.currentXPosition=o}return e}(),zi=function(){function e(e){this.id=e}return e}(),Ii=function(){function e(e,t){this.startValues=e,this.endValues=t}return e}(),Di=function(e){function t(t,i,r,o,n,a,s,l,h){var c=e.call(this,t,i,r.width,r.color,o,h)||this;return c.y=n.y,c.x=n.x,c.height=n.height,c.width=n.width,c.rx=a||0,c.ry=s||0,c.transform=l||"",c.stroke=0!==r.width&&""!==c.stroke?r.color:"transparent",c}return _i(t,e),t}(i.PathOption),Bi=function(){function e(e,t,i,r,o,n,a,s){this.height=e,this.width=t,this.href=i,this.x=r,this.y=o,this.id=n,this.visibility=a,this.preserveAspectRatio=s}return e}(),Ni=function(e){function t(t,i,r,o,n,a,s){var l=e.call(this,t,i,r.width,r.color,o)||this;return l.cy=a,l.cx=n,l.r=s,l}return _i(t,e),t}(i.PathOption),Fi=function(){function e(e,t,i){this.id=e,this.points=t,this.fill=i}return e}(),Vi=function(){function e(e,t){this.x=e,this.y=t}return e}(),ji=function(){function e(e,t){this.x=0,this.y=0,this.x=e,this.y=t}return e}(),Hi=function(){function e(e,t,i,r){this.left=e,this.right=t,this.top=i,this.bottom=r}return e}(),Xi=function(){function e(e,t,i){this.r=e,this.g=t,this.b=i}return e}(),Yi=function(){function e(e,t,i){void 0===i&&(i=0),this.point=e,this.series=t,this.lierIndex=i}return e}(),Gi=function(){function e(e,t,i){void 0===i&&(i=0),this.point=e,this.series=t,this.index=i}return e}(),Wi=function(){function e(e,t){this.controlPoint1=e,this.controlPoint2=t}return e}(),Ui=function(){function e(e){this.chart=e,this.padding=5}return e.prototype.measureAxis=function(e){var t=this.chart;this.crossAt(t),this.seriesClipRect=new i.Rect(e.x,e.y,e.width,e.height),this.initialClipRect=e,this.leftSize=0,this.rightSize=0,this.topSize=0,this.bottomSize=0,this.measureRowAxis(t,this.initialClipRect),this.initialClipRect=L(this.initialClipRect,new Hi(this.leftSize,this.rightSize,0,0)),this.measureColumnAxis(t,this.initialClipRect),this.initialClipRect=L(this.initialClipRect,new Hi(0,0,this.topSize,this.bottomSize)),this.chart.delayRedraw||this.calculateAxisSize(this.initialClipRect),this.leftSize=0,this.rightSize=0,this.topSize=0,this.bottomSize=0,this.measureRowAxis(t,this.initialClipRect),this.seriesClipRect=L(this.seriesClipRect,new Hi(this.leftSize,this.rightSize,0,0)),this.measureColumnAxis(t,this.initialClipRect),this.seriesClipRect=L(this.seriesClipRect,new Hi(0,0,this.topSize,this.bottomSize)),this.chart.delayRedraw||(t.refreshAxis(),this.calculateAxisSize(this.seriesClipRect))},e.prototype.measureRowAxis=function(e,t){var r;this.calculateRowSize(t);for(var o=0,n=e.rows;o<n.length;o++)(r=n[o]).nearSizes=[],r.farSizes=[],this.arrangeAxis(r),this.measureDefinition(r,e,new i.Size(e.availableSize.width,r.computedHeight)),this.leftSize<C(r.nearSizes)&&(this.leftSize=C(r.nearSizes)),this.rightSize<C(r.farSizes)&&(this.rightSize=C(r.farSizes))},e.prototype.measureColumnAxis=function(e,t){var r;this.calculateColumnSize(t);for(var o=0,n=e.columns;o<n.length;o++)(r=n[o]).farSizes=[],r.nearSizes=[],this.arrangeAxis(r),this.measureDefinition(r,e,new i.Size(r.computedWidth,e.availableSize.height)),this.bottomSize<C(r.nearSizes)&&(this.bottomSize=C(r.nearSizes)),this.topSize<C(r.farSizes)&&(this.topSize=C(r.farSizes))},e.prototype.measureDefinition=function(e,t,i){for(var r=0,o=e.axes;r<o.length;r++){var n=o[r];n.scrollBarHeight=t.scrollBarModule&&t.zoomModule&&t.zoomSettings.enableScrollbar&&n.enableScrollbarOnZooming&&t.zoomModule.isZoomed&&(n.zoomFactor<1||n.zoomPosition>0)?16:0,n.scrollBarHeight=t.scrollBarModule&&(t.zoomModule&&t.zoomSettings.enableScrollbar&&n.enableScrollbarOnZooming&&t.zoomModule.isZoomed&&(n.zoomFactor<1||n.zoomPosition>0)||n.scrollbarSettings.enable)?16:0,n.getModule(t),n.baseModule.calculateRangeAndInterval(i,n),e.computeSize(n,n.scrollBarHeight)}e.farSizes.length>0&&(e.farSizes[e.farSizes.length-1]-=10),e.nearSizes.length>0&&(e.nearSizes[e.nearSizes.length-1]-=10)},e.prototype.calculateAxisSize=function(e){var t,i,r,o,n,a,s,l=this.chart,h=0,c=0,d=0;this.calculateRowSize(e);for(var p=0,u=l.rows.length;p<u;p++){h=0,c=0;for(var g=0,y=(t=l.rows[p]).axes.length;g<y;g++){if(o=t.axes[g],s=o.plotOffset,0===o.rect.height){o.rect.height=t.computedHeight,d=0;for(var m=p+1,v=p+o.span;m<v;m++)d+=(r=l.rows[m]).computedHeight;o.rect.y=t.computedTop-d+(o.plotOffsetTop?o.plotOffsetTop:s),o.rect.height=o.rect.height+d-this.getAxisOffsetValue(o.plotOffsetTop,o.plotOffsetBottom,o.plotOffset),o.rect.width=0}o.opposedPosition?(n=e.x+e.width+C(E(t.farSizes,c)),o.rect.x=o.rect.x>=n?o.rect.x:n,c++):(n=e.x-C(E(t.nearSizes,h)),o.rect.x=o.rect.x<=n?o.rect.x:n,h++)}}this.calculateColumnSize(e);for(var p=0,u=l.columns.length;p<u;p++){h=0,c=0;for(var g=0,f=(i=l.columns[p]).axes.length;g<f;g++){if(o=i.axes[g],s=o.plotOffset,0===o.rect.width){for(var m=p,b=p+o.span;m<b;m++)r=l.columns[m],o.rect.width+=r.computedWidth;o.rect.x=i.computedLeft+(o.plotOffsetLeft?o.plotOffsetLeft:s),o.rect.width-=this.getAxisOffsetValue(o.plotOffsetLeft,o.plotOffsetRight,o.plotOffset),o.rect.height=0}o.opposedPosition?(a=e.y-C(E(i.farSizes,c)),o.rect.y=o.rect.y<=a?o.rect.y:a,c++):(a=e.y+e.height+C(E(i.nearSizes,h)),o.rect.y=o.rect.y>=a?o.rect.y:a,h++)}}},e.prototype.measure=function(){for(var e,t,i,r,o,n=this.chart,a=0,s=n.axisCollections;a<s.length;a++){var l=s[a];if("Vertical"===l.orientation){n.verticalAxes.push(l),r=this.getActualRow(l),e=n.rows[r],this.pushAxis(e,l),o=r+l.span>n.rows.length?n.rows.length:r+l.span;for(h=r+1;h<o;h++)(i=n.rows[h]).axes[e.axes.length-1]=l,n.rows[h]=i;n.rows[r]=e}else{n.horizontalAxes.push(l),r=this.getActualColumn(l),t=n.columns[r],this.pushAxis(t,l),o=r+l.span>n.columns.length?n.columns.length:r+l.span;for(var h=r+1;h<o;h++)(i=n.columns[h]).axes[t.axes.length-1]=l,n.columns[h]=i;n.columns[r]=t}}},e.prototype.getAxisOffsetValue=function(e,t,i){return e?e+(t||i):t?t+i:2*i},e.prototype.crossAt=function(e){for(var t=0,i=e.axisCollections;t<i.length;t++){var r=i[t];if(null!==r.crossesAt)if(r.crossesInAxis)for(var o=2,n=e.axisCollections.length;o<n;o++)r.crossesInAxis!==e.axisCollections[o].name||(r.crossInAxis=e.axisCollections[o],r.crossAt=this.updateCrossAt(r.crossInAxis,r.crossesAt));else e.requireInvertedAxis?r.crossInAxis="Horizontal"===r.orientation?e.primaryXAxis:e.primaryYAxis:r.crossInAxis="Horizontal"===r.orientation?e.primaryYAxis:e.primaryXAxis,r.crossAt=this.updateCrossAt(r.crossInAxis,r.crossesAt)}},e.prototype.updateCrossAt=function(e,t){switch(e.valueType){case"DateTime":var i={skeleton:"full",type:"dateTime"},o=this.chart.intl.getDateParser(i),n=this.chart.intl.getDateFormat(i);return Date.parse(o(n(new Date(r.DataUtil.parse.parseJson({val:t}).val))));case"Category":return parseFloat(t)?parseFloat(t):e.labels.indexOf(t);case"Logarithmic":return v(t,e.logBase);default:return t}},e.prototype.pushAxis=function(e,t){for(var i=0,r=e.axes.length;i<=r;i++)if(!e.axes[i]){e.axes[i]=t;break}},e.prototype.arrangeAxis=function(e){for(var t=[],i=0,r=e.axes.length;i<=r;i++)e.axes[i]&&t.push(e.axes[i]);e.axes=t},e.prototype.getActualColumn=function(e){var t=this.chart.columns.length,i=e.columnIndex;return i>=t?t-1:i<0?0:i},e.prototype.getActualRow=function(e){var t=this.chart.rows.length,i=e.rowIndex;return i>=t?t-1:i<0?0:i},e.prototype.calculateRowSize=function(e){for(var t,i=this.chart,r=e.y+e.height,o=0,n=Math.max(0,e.height),a=0,s=i.rows.length;a<s;a++)o=-1!==(t=i.rows[a]).height.indexOf("%")?Math.min(n,e.height*parseInt(t.height,10)/100):Math.min(n,parseInt(t.height,10)),o=a!==s-1?o:n,t.computedHeight=o,r-=o,t.computedTop=r,n-=o},e.prototype.calculateColumnSize=function(e){for(var t,i=this.chart,r=e.x,o=0,n=Math.max(0,e.width),a=0,s=i.columns.length;a<s;a++)o=-1!==(t=i.columns[a]).width.indexOf("%")?Math.min(n,e.width*parseInt(t.width,10)/100):Math.min(n,parseInt(t.width,10)),o=a!==s-1?o:n,t.computedWidth=o,t.computedLeft=r,r+=o,n-=o},e.prototype.renderAxes=function(){for(var e,t,i,r=this.chart,o=r.renderer.createGroup({id:r.element.id+"AxisInsideCollection"}),n=r.renderer.createGroup({id:r.element.id+"AxisOutsideCollection"}),a=0,s=r.axisCollections.length;a<s;a++)e=r.axisCollections[a],this.element=r.renderer.createGroup({id:r.element.id+"AxisGroup"+a+"Inside"}),t=r.renderer.createGroup({id:r.element.id+"AxisGroup"+a+"Outside"}),i=this.findAxisPosition(e),"Horizontal"===e.orientation?(e.updateCrossValue(),e.visible&&e.internalVisibility&&e.lineStyle.width>0&&this.drawAxisLine(e,a,e.plotOffset,0,i?t:this.element,e.updatedRect),(e.majorGridLines.width>0||e.majorTickLines.width>0)&&this.drawXAxisGridLine(e,a,i||"Inside"===e.tickPosition?t:this.element,e.updatedRect),e.visible&&e.internalVisibility&&(this.drawXAxisLabels(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawXAxisBorder(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawXAxisTitle(e,a,i?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect))):(e.updateCrossValue(),e.visible&&e.internalVisibility&&e.lineStyle.width>0&&this.drawAxisLine(e,a,0,e.plotOffset,i?t:this.element,e.updatedRect),(e.majorGridLines.width>0||e.majorTickLines.width>0)&&this.drawYAxisGridLine(e,a,i||"Inside"===e.tickPosition?t:this.element,e.updatedRect),e.visible&&e.internalVisibility&&(this.drawYAxisLabels(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawYAxisBorder(e,a,i||"Inside"===e.labelPosition?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect),this.drawYAxisTitle(e,a,i?t:this.element,e.placeNextToAxisLine?e.updatedRect:e.rect))),this.chart.enableCanvas||(o.appendChild(this.element),t&&t.childNodes.length>0&&n.appendChild(t)),r.scrollBarModule&&(r.zoomSettings.enableScrollbar&&e.enableScrollbarOnZooming||e.scrollbarSettings.enable)&&this.renderScrollbar(r,e);this.element=r.renderer.createGroup({id:r.element.id+"DefinitionLine"});for(var l=0,s=r.rows.length;l<s;l++){var h=r.rows[l];h.border.color&&this.drawBottomLine(h,l,!0)}for(var l=0,s=r.columns.length;l<s;l++){var c=r.columns[l];c.border.color&&this.drawBottomLine(c,l,!1)}return this.chart.enableCanvas||o.appendChild(this.element),be(r.enableCanvas,r.svgObject,o,r.redraw),n},e.prototype.renderScrollbar=function(e,i){(!t.isNullOrUndefined(e.zoomModule)&&e.zoomModule.isZoomed&&(i.zoomFactor<1||i.zoomPosition>0)||i.scrollbarSettings.enable&&(i.zoomFactor<=1||i.zoomPosition>=0))&&(!i.zoomingScrollBar.isScrollUI||e.visibleSeries[0].type.indexOf("Bar")>=0)?(e.scrollElement||(e.scrollElement=Ne(e.redraw,e.element.id+"_scrollElement")||t.createElement("div",{id:e.element.id+"_scrollElement"})),be(!1,e.scrollElement,i.zoomingScrollBar.render(!0),!0)):1===i.zoomFactor&&0===i.zoomPosition&&i.zoomingScrollBar.svgObject&&!i.scrollbarSettings.enable&&i.zoomingScrollBar.destroy(),i.zoomingScrollBar.isScrollUI&&(i.zoomingScrollBar.isScrollUI=!1)},e.prototype.findAxisPosition=function(e){return null!==e.crossAt&&e.isInside(e.crossInAxis.visibleRange)},e.prototype.drawBottomLine=function(e,t,i){var r,o,n,a,s,l=this.chart,h={};i?(n=a=(e=e).computedTop+e.computedHeight,o=(r=this.seriesClipRect.x)+this.seriesClipRect.width,s="Row"):(r=o=(e=e).computedLeft,a=(n=this.seriesClipRect.y)+this.seriesClipRect.height,s="Column"),h={id:l.element.id+"_AxisBottom_"+s+t,x1:r,y1:n,x2:o,y2:a,"stroke-width":e.border.width,stroke:e.border.color},this.htmlObject=l.renderer.drawLine(h),this.element.appendChild(this.htmlObject)},e.prototype.drawAxisLine=function(e,t,i,r,o,n){var a=this.chart,s={},l=he(a.element.id+"AxisLine_"+t),h=l?l.getAttribute("d"):"";l=null,s={id:a.element.id+"AxisLine_"+t,d:"M "+(n.x-i)+" "+(n.y-r)+" L "+(n.x+n.width+i)+" "+(n.y+n.height+r),"stroke-dasharray":e.lineStyle.dashArray,"stroke-width":e.lineStyle.width,stroke:e.lineStyle.color||a.themeStyle.axisLine},this.htmlObject=a.renderer.drawPath(s),be(a.enableCanvas,o,this.htmlObject,a.redraw,!0,"x","y",null,h)},e.prototype.drawYAxisGridLine=function(e,i,r,o){var n,a,s="Logarithmic"===e.valueType,l=e.valueType.indexOf("Category")>-1,h=0,c="",d="",p=e.opposedPosition?e.majorTickLines.height:-e.majorTickLines.height,u=e.opposedPosition?.5*e.lineStyle.width:.5*-e.lineStyle.width,g="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?.5:0,y=t.isNullOrUndefined(e.crossesAt)?e.opposedPosition?e.scrollBarHeight:-e.scrollBarHeight:0,m="Inside"===e.tickPosition,v=m?o.x-p-u:o.x+p+u+y,f=e.visibleLabels.length,x=this.chart.themeStyle;e.valueType.indexOf("Category")>-1&&"BetweenTicks"===e.labelPlacement&&f>0&&(f+=1);for(var w=e.minorGridLines,S=e.minorTickLines,C=0;C<f;C++)(h=-1*(h=z(n=e.visibleLabels[C]?e.visibleLabels[C].value-g:e.visibleLabels[C-1].value+e.visibleRange.interval-g,e)*o.height)+(o.y+o.height))>=o.y&&o.y+o.height>=h&&((b(n,e.visibleRange)||this.isBorder(e,C,h))&&(c="M "+this.seriesClipRect.x+" "+h+" L "+(this.seriesClipRect.x+this.seriesClipRect.width)+" "+h,this.renderGridLine(e,i,c,e.majorGridLines,"_MajorGridLine_",C,this.element,x.majorGridLine,e.majorGridLines.dashArray)),d="M "+(o.x+u+(m?y:0))+" "+h+" L "+v+" "+h,this.renderGridLine(e,i,d,e.majorTickLines,"_MajorTickLine_",C,r,x.majorTickLine),(w.width>0||S.width>0)&&e.minorTicksPerInterval>0&&(0!==C||!ie(e)||s||l||this.renderMinorGridOnZooming(e,n,o,C,i,x,r),a=this.drawAxisMinorLine(e,n,o,C),this.renderGridLine(e,i,a[0],w,"_MinorGridLine_",C,this.element,x.minorGridLine,w.dashArray),this.renderGridLine(e,i,a[1],S,"_MinorTickLine_",C,r,x.minorTickLine),C===f-1&&ie(e)&&s&&!l&&this.renderMinorGridOnZooming(e,n+e.visibleRange.interval,o,C,i,x,r)))},e.prototype.isBorder=function(e,t,i){var r=this.chart.chartArea.border,o=this.seriesClipRect,n=e.orientation,a="Horizontal"===n?o.x:o.y,s="Horizontal"===n?o.width:o.height,l="Horizontal"===n?0:e.visibleLabels.length-1,h="Horizontal"===n?e.visibleLabels.length-1:0;return e.plotOffset>0||((i===a||i===a+s)&&(r.width<=0||"transparent"===r.color)||(i!==a&&t===l||i!==a+s&&t===h))},e.prototype.drawYAxisLabels=function(e,r,o,n){var a,s,l,h=this.chart,c=0,d=0,p=e.labelPadding,g="Inside"===e.labelPosition,y=e.opposedPosition,m=(e.labelPosition===e.tickPosition?e.majorTickLines.height:0)+p+.5*e.lineStyle.width;m=e.opposedPosition?m:-m;var v=y&&g||!y&&!g?"end":"start";v=h.isRtlEnabled?e.opposedPosition?"end":"start":v;for(var f,b,x,w=h.renderer.createGroup({id:h.element.id+"AxisLabels"+r}),S=t.isNullOrUndefined(e.crossesAt)?e.scrollBarHeight*(y?1:-1):0,C=0,P=e.visibleLabels.length;C<P;C++){l=u(e.visibleLabels[C].originalText),c=g?n.x-m:n.x+m+S,a=l?e.visibleLabels[C].breakLabelSize:e.visibleLabels[C].size,d=z(e.visibleLabels[C].value,e)*n.height+(h.stockChart?7:0),d=Math.floor(-1*d+(n.y+n.height)),f=a.height/8*e.visibleLabels[C].text.length/2,b=a.height/4*3+3,d=l?"Inside"===e.labelPosition?d-a.height/2-f+b:d-f:"Inside"===e.labelPosition?d+b:d+a.height/4,x=e.majorGridLines.width>e.majorTickLines.width?e.majorGridLines.width:e.majorTickLines.width,"Far"===e.labelStyle.textAlignment?d=d-x-10:"Near"===e.labelStyle.textAlignment?d=d+x+10:"Center"===e.labelStyle.textAlignment&&(d=d),c=l?this.getAxisLabelXvalue(c,e,a.width):c;var L=l?this.getAnchor(e):v;if(s=new i.TextOption(h.element.id+r+"_AxisLabel_"+C,c,d,L,e.visibleLabels[C].text),e.edgeLabelPlacement)switch(e.edgeLabelPlacement){case"None":break;case"Hide":((0===C||e.isInversed&&C===P-1)&&s.y>n.y+n.height||(C===P-1||e.isInversed&&0===C)&&s.y-.5*a.height<n.y)&&(s.text="");break;case"Shift":(0===C||e.isInversed&&C===P-1)&&s.y>n.y+n.height?s.y=d=n.y+n.height:(C===P-1||e.isInversed&&0===C)&&s.y-.5*a.height<n.y&&(s.y=d=n.y+.5*a.height)}Ve(h.renderer,s,e.labelStyle,e.labelStyle.color||h.themeStyle.axisLabel,w,!1,h.redraw,!0,!0,null,null,null,null,h.enableCanvas)}this.chart.enableCanvas||(h.delayRedraw?e.visible&&e.internalVisibility&&this.createZoomingLabel(this.chart,w,e,r,n):be(h.enableCanvas,o,w,h.redraw))},e.prototype.getAxisLabelXvalue=function(e,t,i){var r=t.lineBreakAlignment,o="Inside"===t.labelPosition,n=t.opposedPosition;return n&&o||!n&&!o?"Right"===r?e:"Center"===r?e-i/2:e-i:"Left"===r?e:"Center"===r?e+i/2:e+i},e.prototype.drawYAxisBorder=function(e,t,i,r){if(e.border.width>0){var o=void 0,n=void 0,a="Outside"===e.labelPosition?e.scrollBarHeight:0;a=(e.opposedPosition?1:-1)*a;for(var s=r.height/e.visibleRange.delta*("DateTime"===e.valueType?e.dateTimeInterval:e.visibleRange.interval),l=void 0,h=e.maxLabelSize.width+10+(e.tickPosition===e.labelPosition?e.majorTickLines.height:0),c="",d="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?-.5:0,p=e.opposedPosition&&"Inside"===e.labelPosition||!e.opposedPosition&&"Outside"===e.labelPosition?r.x-h+a:r.x+h+a,u=0,g=e.visibleLabels.length;u<g;u++)switch(n=z(e.visibleLabels[u].value+d,e),n=(e.isInversed?1-n:n)*r.height,"Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?(o=-1*n+(r.y+r.height),l=-1*n-s+(r.y+r.height)):(o=-1*n+s/2+(r.y+r.height),l=-1*n-s/2+(r.y+r.height)),e.border.type){case"Rectangle":case"WithoutTopBorder":o>r.y+r.height?c+="M "+p+" "+(r.y+r.height)+" L "+p+" "+l+" ":Math.floor(r.y)>l?c+="M "+(r.x+a)+" "+o+" L "+p+" "+o+" L "+p+" "+r.y+" ":(c+="M "+(r.x+a)+" "+o+" L "+p+" "+o+" L "+p+" "+l+" ",u===e.visibleLabels.length-1&&(c+="M "+(r.x+a)+" "+l+" L "+p+" "+l+" "));break;case"WithoutTopandBottomBorder":o>r.y+r.height||l<Math.floor(r.y)||(c+="M "+(r.x+a)+" "+o+" L "+p+" "+o+" M "+p+" "+l+" L "+(r.x+a)+" "+l)}""!==(c+="Rectangle"===e.border.type?"M "+(r.x+a)+" "+r.y+" L "+(r.x+a)+" "+(r.y+r.height)+" ":"")&&this.createAxisBorderElement(e,t,c,i)}e.multiLevelLabels.length>0&&this.chart.multiLevelLabelModule&&this.chart.multiLevelLabelModule.renderYAxisMultiLevelLabels(e,t,i,r)},e.prototype.drawYAxisTitle=function(e,t,r,o){if(e.title){var n=this.chart,a=e.opposedPosition?90:-90,s=("Inside"===e.tickPosition?0:e.majorTickLines.height+e.titlePadding)+("Inside"===e.labelPosition?0:e.maxLabelSize.width+e.multiLevelLabelHeight+this.padding);s=e.opposedPosition?s+e.scrollBarHeight:-s-e.scrollBarHeight;var l=o.x+s,h=o.y+.5*o.height,c=e.titleSize.height*(e.titleCollection.length-1),d=new i.TextOption(n.element.id+"_AxisTitle_"+t,l,h-e.labelPadding-c,"middle",e.titleCollection,"rotate("+a+","+l+","+h+")",null,a),p=Ve(n.renderer,d,e.titleStyle,e.titleStyle.color||n.themeStyle.axisTitle,r,null,null,null,null,null,null,null,null,n.enableCanvas);p.setAttribute("tabindex",e.tabIndex.toString()),p.setAttribute("aria-label",e.description||e.title)}},e.prototype.drawXAxisGridLine=function(e,i,r,o){var n,a,s="Logarithmic"===e.valueType,l=e.valueType.indexOf("Category")>-1,h=0,c="",d="",p=e.opposedPosition?-e.majorTickLines.height:e.majorTickLines.height,u=e.opposedPosition?.5*-e.lineStyle.width:.5*e.lineStyle.width,g=t.isNullOrUndefined(e.crossesAt)?e.opposedPosition?-e.scrollBarHeight:e.scrollBarHeight:0,y=e.valueType.indexOf("Category")>-1&&"BetweenTicks"===e.labelPlacement?.5:0,m=e.visibleLabels.length,v="Inside"===e.tickPosition,f=v?o.y-p-u:o.y+p+u+g,x=this.chart.themeStyle;e.valueType.indexOf("Category")>-1&&m>0&&"BetweenTicks"===e.labelPlacement&&(m+=1);for(var w=0;w<m;w++)(h=z(n="DateTimeCategory"!==e.valueType?e.visibleLabels[w]?e.visibleLabels[w].value-y:e.visibleLabels[w-1].value+e.visibleRange.interval-y:e.visibleLabels[w]?e.visibleLabels[w].value-y:e.visibleRange.max,e)*o.width+o.x)>=o.x&&o.x+o.width>=h&&((b(n,e.visibleRange)||this.isBorder(e,w,h))&&(c="M "+h+" "+(this.seriesClipRect.y+this.seriesClipRect.height)+" L "+h+" "+this.seriesClipRect.y,this.renderGridLine(e,i,c,e.majorGridLines,"_MajorGridLine_",w,this.element,x.majorGridLine,e.majorGridLines.dashArray)),d="M "+h+" "+(o.y+u+(v?g:0))+" L "+h+" "+f,this.renderGridLine(e,i,d,e.majorTickLines,"_MajorTickLine_",w,r,x.majorTickLine),e.minorTicksPerInterval>0&&(e.minorGridLines.width>0||e.minorTickLines.width>0)&&(0!==w||!ie(e)||s||l||this.renderMinorGridOnZooming(e,n,o,w,i,x,r),a=this.drawAxisMinorLine(e,n,o,w),this.renderGridLine(e,i,a[0],e.minorGridLines,"_MinorGridLine_",w,this.element,x.minorGridLine,e.minorGridLines.dashArray),this.renderGridLine(e,i,a[1],e.minorTickLines,"_MinorTickLine_",w,r,x.minorTickLine),w===m-1&&ie(e)&&s&&!l&&this.renderMinorGridOnZooming(e,n+e.visibleRange.interval,o,w,i,x,r)))},e.prototype.renderMinorGridOnZooming=function(e,t,i,r,o,n,a){var s=this.drawAxisMinorLine(e,t,i,r,!0);this.renderGridLine(e,o,s[0],e.minorGridLines,"_MinorGridLine_",-1,this.element,n.minorGridLine,e.minorGridLines.dashArray),this.renderGridLine(e,o,s[1],e.minorTickLines,"_MinorTickLine_",-1,a,n.minorTickLine)},e.prototype.drawAxisMinorLine=function(e,t,i,r,o){var n,a=t,s=0,l=0,h=e.visibleRange,c="Inside"===e.tickPosition,d=[],p=e.opposedPosition?-e.minorTickLines.height:e.minorTickLines.height,u=1,g=1,y=c?i.y-p:i.y+p,m=c?i.x+p:i.x-p,v="",f="";if("Logarithmic"===e.valueType&&(g=(n=Math.pow(e.logBase,a-h.interval))+(u=(Math.pow(e.logBase,a)-n)/(e.minorTicksPerInterval+1))),"Horizontal"===e.orientation)for(x=0;x<e.minorTicksPerInterval;x++)a=this.findLogNumeric(e,g,a,r,o),g+=u,b(a,h)&&(l=(a-h.min)/(h.max-h.min),l=Math.ceil((e.isInversed?1-l:l)*i.width),s=Math.floor(l+i.x),v=v.concat("M "+s+" "+this.seriesClipRect.y+"L "+s+" "+(this.seriesClipRect.y+this.seriesClipRect.height)),s=Math.floor(l+i.x),f=f.concat("M "+s+" "+i.y+"L "+s+" "+(y+e.scrollBarHeight)));else for(var x=0;x<e.minorTicksPerInterval;x++)b(a=this.findLogNumeric(e,g,a,r,o),h)&&(l=(a-h.min)/(h.max-h.min),l=-1*Math.ceil((e.isInversed?1-l:l)*i.height),s=Math.floor(l+i.y+i.height),v=v.concat("M "+this.seriesClipRect.x+" "+s+"L "+(this.seriesClipRect.x+this.seriesClipRect.width)+" "+s+" "),s=Math.floor(l+i.y+i.height),f=f.concat("M "+i.x+" "+s+"L "+(m-e.scrollBarHeight)+" "+s+" ")),g+=u;return d.push(v),d.push(f),d},e.prototype.findLogNumeric=function(e,t,i,r,o){var n,a=e.visibleRange;if("Logarithmic"===e.valueType)i=v(t,e.logBase);else if("DateTime"===e.valueType)n=e.dateTimeInterval/(e.minorTicksPerInterval+1),i=o?i-n:i+n;else if("DateTimeCategory"===e.valueType){var s="BetweenTicks"===e.labelPlacement?.5:0;i+=((e.visibleLabels[r+1]?e.visibleLabels[r+1].value-s:e.visibleRange.max)-(e.visibleLabels[r]?e.visibleLabels[r].value-s:e.visibleRange.min))/(e.minorTicksPerInterval+1)}else n=a.interval/(e.minorTicksPerInterval+1),i=o?i-n:i+n;return i},e.prototype.drawXAxisLabels=function(e,r,o,n){var a,s,l,h,c,d,p,g,y,m=this.chart,v=0,f=0,b=e.labelPadding,x=m.renderer.createGroup({id:m.element.id+"AxisLabels"+r}),w="Inside"===e.labelPosition,S=e.opposedPosition,C=e.labelPosition===e.tickPosition?e.majorTickLines.height:0,P=C+b+.5*e.lineStyle.width,L=e.angle%360,R=0===L||-180===L||180===L,M=e.isInversed?n.x+n.width:n.x,A=0,_=e.visibleLabels.length,O=e.scrollbarSettings.enable||!w&&t.isNullOrUndefined(e.crossesAt)&&(e.zoomFactor<1||e.zoomPosition>0)?e.scrollBarHeight:0,E=[],I=!1;P+=90===L||270===L||-90===L||-270===L?w?5:-5:0;for(var D=!S&&!w||S&&w,B=D?360>=L&&L>=180||-1>=L&&L>=-180:1<=L&&L<=180||-181>=L&&L>=-360,N=0,F=_;N<F;N++){y=u((g=e.visibleLabels[N]).originalText),v=z(g.value,e)*n.width+n.x,s=g.size,p=n.width/_,d=y?g.breakLabelSize.width:s.width,A=("Trim"===e.labelIntersectAction||"Wrap"===e.labelIntersectAction)&&0===L&&d>p?p:d,a=s.height/4,v-=y||0!==L?0:A/2,0!==L&&(v-=y?"Left"===e.lineBreakAlignment?g.breakLabelSize.width/2:"Right"===e.lineBreakAlignment?-g.breakLabelSize.width/2:0:-90===L||270===L?-a:90===L||-270===L?a:0),"Far"===e.labelStyle.textAlignment?v=v+A-10:"Near"===e.labelStyle.textAlignment?v=v-A+10:"Center"===e.labelStyle.textAlignment&&(v=v),y&&"Center"!==e.lineBreakAlignment&&0===L&&(v+="Left"===e.lineBreakAlignment?-A/2:A/2);var V=y?R?s.height:g.breakLabelSize.width/2:0;if(P=y?C+b+.5*e.lineStyle.width:P,w&&L?f=y?S?n.y+P+V:n.y-P-V:S?n.y+P+a:n.y-P-a:(l=y?D?P+O+(L?V:3*a):-(P+O+V):D?P+O+(L?1:3)*a:-(P+O+(L?a:g.index>1?2*a:0)),f=n.y+l*g.index),h=y?this.getAnchor(e):m.isRtlEnabled||B?"end":"",c=new i.TextOption(m.element.id+r+"_AxisLabel_"+N,v,f,h),e.edgeLabelPlacement&&0===L)switch(e.edgeLabelPlacement){case"None":break;case"Hide":if((0===N||e.isInversed&&N===F-1)&&c.x<n.x||(N===F-1||e.isInversed&&0===N)&&c.x+A>n.x+n.width)continue;break;case"Shift":(0===N||e.isInversed&&N===F-1)&&c.x<n.x?(p-=n.x-c.x,c.x=v=n.x):(N===F-1||e.isInversed&&0===N)&&c.x+A>n.x+n.width&&(s.width>p&&"Trim"===e.labelIntersectAction?p-=c.x+A-(n.x+n.width):p=A,c.x=v=n.x+n.width-p)}c.text=this.getLabelText(g,e,p);var j=void 0,H=void 0;if(y&&0===L?"Right"===e.lineBreakAlignment?(j=c.x-A,H=c.x):"Center"===e.lineBreakAlignment?(j=c.x-A/2,H=c.x+A/2):(j=c.x,H=c.x+A):(j=c.x,H=c.x+A),0!==L||"Hide"!==e.labelIntersectAction||0===N||!(e.isInversed?H>=M:j<=M)){if(M=y?"Right"===e.lineBreakAlignment?e.isInversed?c.x-A:c.x:"Center"===e.lineBreakAlignment?e.isInversed?c.x-A/2:c.x+A/2:e.isInversed?c.x:c.x+A:e.isInversed?c.x:c.x+A,0!==L){var X=void 0,Y=void 0;if(y){var G=0,W=0;X=g.breakLabelSize.height,W=g.breakLabelSize.height-4,"Center"===e.lineBreakAlignment?G=-g.breakLabelSize.width/2:"Right"===e.lineBreakAlignment&&(G=-g.breakLabelSize.width),D&&(W=g.breakLabelSize.height/(c.text.length+1)),Y=new i.Rect(c.x+G,c.y-W,g.breakLabelSize.width,X)}else X=f-(c.y-(g.size.height/2+10)),Y=new i.Rect(c.x,c.y-(g.size.height/2-5),g.size.width,X);var U=this.getRectanglePoints(Y),Z=y?Y.x+Y.width/2:v,q=y?Y.y+Y.height/2:f-X/2;c.transform=y?"rotate("+L+","+Z+","+q+")":"rotate("+L+","+v+","+f+")",E.push(T(U,Z,q,L)),I=!1;for(var Q=N;Q>0;Q--)if(E[N]&&E[Q-1]&&k(E[N],E[Q-1])){I=!0,E[N]=null;break}}Ve(m.renderer,c,g.labelStyle,g.labelStyle.color||m.themeStyle.axisLabel,x,e.opposedPosition!==("Inside"===e.labelPosition),m.redraw,!0,null,null,null,g.size,I,m.enableCanvas)}}this.chart.enableCanvas||(m.delayRedraw?e.visible&&e.internalVisibility&&this.createZoomingLabel(this.chart,x,e,r,n):o.appendChild(x))},e.prototype.getAnchor=function(e){return"Center"===e.lineBreakAlignment?"middle":"Left"===e.lineBreakAlignment?"start":"end"},e.prototype.getRectanglePoints=function(e){return[new Vi(e.x,e.y),new Vi(e.x+e.width,e.y),new Vi(e.x+e.width,e.y+e.height),new Vi(e.x,e.y+e.height)]},e.prototype.getLabelText=function(e,t,i){if(u(e.originalText)){for(var r=[],o=void 0,n=0;n<e.text.length;n++)o=this.findAxisLabel(t,e.text[n],i),r.push(o);return r}return this.findAxisLabel(t,e.text,i)},e.prototype.drawXAxisBorder=function(e,t,i,r){if(e.border.width>0){for(var o="Outside"===e.labelPosition?e.scrollBarHeight:0,n=void 0,a=r.y+(e.opposedPosition?-1:1)*o,s=void 0,l=r.width/e.visibleRange.delta*("DateTime"===e.valueType?e.dateTimeInterval:e.visibleRange.interval),h=void 0,c=e.maxLabelSize.height+(e.tickPosition===e.labelPosition?e.majorTickLines.height:0),d="",p="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?-.5:0,u=e.opposedPosition&&"Inside"===e.labelPosition||!e.opposedPosition&&"Outside"===e.labelPosition?r.y+c+10+o:r.y-c-10-o,g=0,y=e.visibleLabels.length;g<y;g++)switch(s=z(e.visibleLabels[g].value+p,e),s=(e.isInversed?1-s:s)*r.width,"Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?(n=s+r.x,h=s+l+r.x):(n=s-.5*l+r.x,h=s+.5*l+r.x),e.border.type){case"Rectangle":case"WithoutTopBorder":n<r.x?d+="M "+r.x+" "+u+" L "+h+" "+u+" ":Math.floor(h)>r.width+r.x&&1!==e.visibleLabels.length?d+="M "+n+" "+a+" L "+n+" "+u+" L "+(r.width+r.x)+" "+u+" ":(d+="M "+n+" "+a+" L "+n+" "+u+" L "+h+" "+u+" ",0===g&&(d+="M "+n+" "+a+" L "+n+" "+u+" M "+n+" "+u+" L "+r.x+" "+u),g===e.visibleLabels.length-1&&(d+="M "+h+" "+a+" L "+h+" "+u+" M "+h+" "+u+" L "+(r.width+r.x)+" "+u));break;case"WithoutTopandBottomBorder":n<r.x||Math.floor(h)>r.width+r.x||(d+="M "+n+" "+a+" L "+n+" "+u+" M "+h+" "+a+" L "+h+" "+u)}""!==(d+="Rectangle"===e.border.type?"M "+r.x+" "+a+"L "+(r.x+r.width)+" "+a:"")&&this.createAxisBorderElement(e,t,d,i)}this.chart.multiLevelLabelModule&&e.multiLevelLabels.length>0&&this.chart.multiLevelLabelModule.renderXAxisMultiLevelLabels(e,t,i,r)},e.prototype.createAxisBorderElement=function(e,t,r,o){var n=he(this.chart.element.id+"_BorderLine_"+t),a=n?n.getAttribute("d"):"",s=this.chart.renderer.drawPath(new i.PathOption(this.chart.element.id+"_BorderLine_"+t,"transparent",e.border.width,e.border.color||this.chart.themeStyle.axisLine,1,"",r));s.setAttribute("style","pointer-events: none"),be(this.chart.enableCanvas,o,s,this.chart.redraw,!0,"x","y",null,a,!0)},e.prototype.findAxisLabel=function(e,t,i){return"Trim"===e.labelIntersectAction?e.angle%360!=0||e.enableTrim?t:Ie(i,t,e.labelStyle):t},e.prototype.drawXAxisTitle=function(e,r,o,n){if(e.title){var a=this.chart,s=i.measureText(e.title,e.titleStyle),l=t.isNullOrUndefined(e.crossesAt)?e.scrollBarHeight:0,h=("Inside"===e.tickPosition?0:e.majorTickLines.height+e.titlePadding)+("Inside"===e.labelPosition?0:e.maxLabelSize.height+e.multiLevelLabelHeight+e.labelPadding),c=e.titleSize.height*(e.titleCollection.length-1);h=e.opposedPosition?-(h+s.height/4+l+c):h+3*s.height/4+l;var d=new i.TextOption(a.element.id+"_AxisTitle_"+r,n.x+.5*n.width,n.y+h,"middle",e.titleCollection),p=Ve(a.renderer,d,e.titleStyle,e.titleStyle.color||a.themeStyle.axisTitle,o,null,null,null,null,null,null,null,null,a.enableCanvas);p.setAttribute("aria-label",e.description||e.title),p.setAttribute("tabindex",e.tabIndex.toString())}},e.prototype.renderGridLine=function(e,t,r,o,n,a,s,l,h){void 0===h&&(h=null);var c,d,p=this.chart;o.width>0&&e.visible&&e.internalVisibility&&r&&(c=(d=he(p.element.id+n+t+"_"+a))?d.getAttribute("d"):null,d=null,this.htmlObject=p.renderer.drawPath(new i.PathOption(p.element.id+n+t+"_"+a,"transparent",o.width,o.color||l,null,h,r)),be(p.enableCanvas,s,this.htmlObject,p.redraw,!0,"x","y",null,c,!0))},e.prototype.findParentNode=function(e,t,i){return document.getElementById(e+"AxisGroup"+i+"Inside").contains(document.getElementById(t.id))?document.getElementById(e+"AxisGroup"+i+"Inside"):document.getElementById(e+"AxisGroup"+i+"Outside")},e.prototype.createZoomingLabel=function(e,t,i,r,o){var n=this.findParentNode(e.element.id,t,r);t.setAttribute("opacity","0.3");var a=e.renderer.createGroup({id:e.element.id+"AxisLabels_Zoom"+r});a=V(e,i,a,r,"Vertical"===i.orientation,o),n.replaceChild(t,document.getElementById(t.id)),he(e.element.id+"AxisLabels_Zoom"+r)?n.replaceChild(a,document.getElementById(a.id)):n.appendChild(a)},e}(),Zi=function(){function e(e){this.currentPoints=[],this.previousPoints=[],this.insideRegion=!1,this.chart=e,this.lierIndex=0}return e.prototype.getData=function(){for(var e,t,i,r,o=this.chart,n=null,a=null,s=o.visibleSeries.length-1;s>=0;s--){if(a=o.visibleSeries[s],e="Scatter"===a.type||"Scatter"===a.drawType||a.marker.visible?(a.marker.height+5)/2:0,t="Scatter"===a.type||"Scatter"===a.drawType||a.marker.visible?(a.marker.width+5)/2:0,i=o.mouseX,r=o.mouseY,a.dragSettings.enable&&a.isRectSeries)if("Bar"===a.type&&o.isTransposed||!o.isTransposed&&"Bar"!==a.type){var l=a.marker.height/2;r=a.yAxis.isInversed?r-l:r+l}else{var h=a.marker.width/2;i=a.yAxis.isInversed?i+h:i-h}if(a.visible&&j(i,r,a.clipRect,e,t)&&(n=this.getRectPoint(a,a.clipRect,i,r)),n)return new Yi(n,a)}return new Yi(n,a)},e.prototype.isSelected=function(e){return(e.selectionMode.indexOf("Drag")>-1||e.selectionMode.indexOf("Lasso")>-1)&&e.selectionModule&&null!==e.selectionModule.rectPoints},e.prototype.getRectPoint=function(e,t,i,r){var o,n,a,s,l,h,c=0;if(this.chart.isScrolling)return null;for(var d=0,p=e.points;d<p.length;d++){var u=p[d];if(u.regionData||u.regions&&u.regions.length){if(u.regionData&&"PolarRadar"===this.chart.chartAreaType&&e.drawType.indexOf("Column")>-1&&(o=i-(e.clipRect.width/2+e.clipRect.x),n=r-(e.clipRect.height/2+e.clipRect.y),c=2*Math.PI*(u.regionData.currentXPosition<0?1+u.regionData.currentXPosition:u.regionData.currentXPosition),a=(Math.atan2(n,o)+.5*Math.PI-c)%(2*Math.PI),a=a<0?2*Math.PI+a:a,a+=2*Math.PI*e.chart.primaryXAxis.startAngle,s=u.regionData.startAngle,s-=c,s=s<0?2*Math.PI+s:s,l=u.regionData.endAngle,l-=c,l=l<0?2*Math.PI+l:l,h=Math.sqrt(Math.pow(Math.abs(o),2)+Math.pow(Math.abs(n),2)),a>=s&&a<=l&&(h>=u.regionData.innerRadius&&h<=u.regionData.radius||h<=u.regionData.innerRadius&&h>=u.regionData.radius)&&h<=e.chart.radius))return u;if((e.dragSettings.enable&&e.isRectSeries||e.isRectSeries&&e.marker.visible)&&this.isPointInThresholdRegion(i,r,u,t,e))return this.insideRegion=!0,u;if(!this.insideRegion&&this.checkRegionContainsPoint(u.regions,t,i,r))return u;if(this.insideRegion&&this.checkRegionContainsPoint(u.regions,t,i,r))return u}}return null},e.prototype.checkRegionContainsPoint=function(e,t,r,o){var n=this;return e.some(function(e,a){return n.lierIndex=a,j(r,o,new i.Rect(("Cartesian"===n.chart.chartAreaType?t.x:0)+e.x,("Cartesian"===n.chart.chartAreaType?t.y:0)+e.y,e.width,e.height))})},e.prototype.isPointInThresholdRegion=function(e,t,r,o,n){var a,s=this,l="Bar"===n.type,h=n.yAxis.isInversed,c=n.chart.isTransposed,d=0,p=0,u=a=20;return h&&c?l?(d=r.regions[0].height-10,a=r.regions[0].width):(p=-10,u=r.regions[0].height):h||r.yValue<0?l?(p=-10,u=r.regions[0].height):(d=r.regions[0].height-10,a=r.regions[0].width):c?l?(d=-10,a=r.regions[0].width):(p=r.regions[0].width-10,u=r.regions[0].height):l?(p=r.regions[0].width-10,u=r.regions[0].height):(d=-10,a=r.regions[0].width),r.regions.some(function(r){return j(e,t,new i.Rect(("Cartesian"===s.chart.chartAreaType?o.x:0)+r.x+p,("Cartesian"===s.chart.chartAreaType?o.y:0)+r.y+d,a,u))})},e.prototype.getClosest=function(e,t,i){var r,o,n=i||e.xData;if(t>=e.xAxis.visibleRange.min&&t<=e.xAxis.visibleRange.max)for(var a=0;a<n.length;a++)o=n[a],(null==r||Math.abs(o-t)<Math.abs(r-t))&&(r=o);return-1!==e.xData.indexOf(r)?r:null},e.prototype.getClosestX=function(e,t,i){var r,o=t.clipRect;r=e.requireInvertedAxis?X(e.mouseY-o.y,o.height,t.xAxis):H(e.mouseX-o.x,o.width,t.xAxis);for(var n=this.getClosest(t,r,i),a=0,s=t.points;a<s.length;a++){var l=s[a];if(n===l.xValue&&l.visible)return new Yi(l,t)}return null},e.prototype.mergeXvalues=function(e){for(var t=[],i=0;i<e.length;i++)t=t.concat(e[i].xData);return t.filter(function(e,i){return i===t.indexOf(e)})},e}(),qi=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qi=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},$i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(!1)],i.prototype,"visible",void 0),Qi([t.Property(!0)],i.prototype,"showZero",void 0),Qi([t.Property(null)],i.prototype,"name",void 0),Qi([t.Property("transparent")],i.prototype,"fill",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),Qi([t.Property(0)],i.prototype,"angle",void 0),Qi([t.Property(!1)],i.prototype,"enableRotation",void 0),Qi([t.Property("Auto")],i.prototype,"position",void 0),Qi([t.Property(5)],i.prototype,"rx",void 0),Qi([t.Property(5)],i.prototype,"ry",void 0),Qi([t.Property("Center")],i.prototype,"alignment",void 0),Qi([t.Complex({width:null,color:null},Yt)],i.prototype,"border",void 0),Qi([t.Complex({left:5,right:5,top:5,bottom:5},Ut)],i.prototype,"margin",void 0),Qi([t.Complex({size:"11px",color:"",fontStyle:"Normal",fontWeight:"Normal",fontFamily:"Segoe UI"},Xt)],i.prototype,"font",void 0),Qi([t.Property(null)],i.prototype,"template",void 0),Qi([t.Property("Hide")],i.prototype,"labelIntersectAction",void 0),i}(t.ChildProperty),Ji=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(!1)],i.prototype,"visible",void 0),Qi([t.Property("Circle")],i.prototype,"shape",void 0),Qi([t.Property("")],i.prototype,"imageUrl",void 0),Qi([t.Property(5)],i.prototype,"height",void 0),Qi([t.Property(5)],i.prototype,"width",void 0),Qi([t.Complex({width:2,color:null},Yt)],i.prototype,"border",void 0),Qi([t.Complex({x:0,y:0},Gt)],i.prototype,"offset",void 0),Qi([t.Property(null)],i.prototype,"fill",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),Qi([t.Complex({},$i)],i.prototype,"dataLabel",void 0),i}(t.ChildProperty),Ki=function(){function e(){this.symbolLocations=null,this.regions=null,this.percentage=null,this.regionData=null,this.isSelect=!1,this.marker={visible:!1},this.isPointInRange=!0}return e}(),er=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.clipRect=new i.Rect(0,0,0,0),t}return qi(r,e),r.prototype.setDataSource=function(e,t){e&&(this.points=e.points),t.trendLineModule.initDataSource(this),t.visibleSeriesCount++},Qi([t.Property("")],r.prototype,"name",void 0),Qi([t.Property("0")],r.prototype,"dashArray",void 0),Qi([t.Property(!0)],r.prototype,"visible",void 0),Qi([t.Property("Linear")],r.prototype,"type",void 0),Qi([t.Property(2)],r.prototype,"period",void 0),Qi([t.Property(2)],r.prototype,"polynomialOrder",void 0),Qi([t.Property(0)],r.prototype,"backwardForecast",void 0),Qi([t.Property(0)],r.prototype,"forwardForecast",void 0),Qi([t.Complex({},qt)],r.prototype,"animation",void 0),Qi([t.Complex({},Ji)],r.prototype,"marker",void 0),Qi([t.Property(!0)],r.prototype,"enableTooltip",void 0),Qi([t.Property(null)],r.prototype,"intercept",void 0),Qi([t.Property("")],r.prototype,"fill",void 0),Qi([t.Property(1)],r.prototype,"width",void 0),Qi([t.Property("SeriesType")],r.prototype,"legendShape",void 0),r}(t.ChildProperty),tr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(1)],i.prototype,"width",void 0),Qi([t.Property(10)],i.prototype,"length",void 0),Qi([t.Property(null)],i.prototype,"color",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ir=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(null)],i.prototype,"value",void 0),Qi([t.Property(null)],i.prototype,"color",void 0),Qi([t.Property("0")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),rr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return qi(i,e),Qi([t.Property(!1)],i.prototype,"visible",void 0),Qi([t.Property("Fixed")],i.prototype,"type",void 0),Qi([t.Property("Both")],i.prototype,"direction",void 0),Qi([t.Property("Vertical")],i.prototype,"mode",void 0),Qi([t.Property(null)],i.prototype,"color",void 0),Qi([t.Property(1)],i.prototype,"verticalError",void 0),Qi([t.Property(1)],i.prototype,"width",void 0),Qi([t.Property(1)],i.prototype,"horizontalError",void 0),Qi([t.Property(3)],i.prototype,"verticalPositiveError",void 0),Qi([t.Property(3)],i.prototype,"verticalNegativeError",void 0),Qi([t.Property(1)],i.prototype,"horizontalPositiveError",void 0),Qi([t.Property(1)],i.prototype,"horizontalNegativeError",void 0),Qi([t.Complex(null,tr)],i.prototype,"errorBarCap",void 0),i}(t.ChildProperty),or=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.currentViewData=[],t.clipRect=new i.Rect(0,0,0,0),t.seriesType="XY",t.isRectTypeSeries=!1,t}return qi(o,e),o.prototype.processJsonData=function(){var e=0,i=new Ki,o=this instanceof nr&&"Histogram"===this.type?"x":this.xName,n=this instanceof nr&&this.marker.dataLabel.name?this.marker.dataLabel.name:"";this instanceof nr&&("Waterfall"!==this.type&&"Histogram"!==this.type||(this.currentViewData=this.chart[G(this.type)+"SeriesModule"].processInternalData(t.extend([],this.currentViewData,null,!0),this)),"Pareto"===this.category&&(this.currentViewData=p(t.extend([],this.currentViewData,null,!0),[this.yName],!0),"Line"===this.type&&(this.currentViewData=this.chart.paretoSeriesModule.performCumulativeCalculation(this.currentViewData,this))),this.isRectTypeSeries=this.type.indexOf("Column")>-1||this.type.indexOf("Bar")>-1||this.type.indexOf("Histogram")>-1);var a=Object.keys(this.currentViewData).length;if(this.points=[],this.xMin=1/0,this.xMax=-1/0,this.yMin=1/0,this.yMax=-1/0,this.sizeMax=-1/0,this.getSeriesType(),"Category"===this.xAxis.valueType)for(;e<a;)i=this.dataPoint(e,n,o),this.pushCategoryData(i,e,i.x),this.pushData(i,e),this.setEmptyPoint(i,e),e++;else if(this.xAxis.valueType.indexOf("DateTime")>-1)for(var s={skeleton:"full",type:"dateTime"},l=this.chart.intl.getDateParser(s),h=this.chart.intl.getDateFormat(s);e<a;)i=this.dataPoint(e,n,o),t.isNullOrUndefined(i.x)||""===i.x?i.visible=!1:(i.x=new Date(r.DataUtil.parse.parseJson({val:i.x}).val),"DateTime"===this.xAxis.valueType?i.xValue=Date.parse(i.x.toString()):this.chart.isBlazor?this.pushCategoryData(i,e,Date.parse(i.x.toString()).toString()):this.pushCategoryData(i,e,Date.parse(l(h(i.x))).toString()),this.pushData(i,e),this.setEmptyPoint(i,e)),e++;else for(;e<a;)(i=this.dataPoint(e,n,o)).xValue=i.x,this.pushData(i,e),this.setEmptyPoint(i,e),e++;if(this instanceof nr)if(this.type.indexOf("Spline")>-1||this.drawType.indexOf("Spline")>-1&&"PolarRadar"===this.chart.chartAreaType){var c=this.type.indexOf("Area")>-1||this.drawType.indexOf("Area")>-1;this.chart["spline"+(c?"Area":"")+"SeriesModule"].findSplinePoint(this)}else this.type.indexOf("Histogram")>-1&&(this.xAxis.maximum||this.xAxis.minimum)&&this.chart.histogramSeriesModule.calculateBinValues(this)},o.prototype.pushData=function(e,t){e.index=t,e.yValue=e.y,this.xMin=Math.min(this.xMin,e.xValue),this.xMax=Math.max(this.xMax,e.xValue),this.xData.push(e.xValue)},o.prototype.dataPoint=function(e,i,r){this.points[e]=new Ki;var o=this.points[e],n=this.currentViewData,a=this.enableComplexProperty?t.getValue:this.getObjectValue;return o.x=a(r,n[e]),o.high=a(this.high,n[e]),o.low=a(this.low,n[e]),o.open=a(this.open,n[e]),o.close=a(this.close,n[e]),o.volume=a(this.volume,n[e]),o.interior=a(this.pointColorMapping,n[e]),this instanceof nr&&(o.y=a(this.yName,n[e]),o.size=a(this.size,n[e]),o.text=a(i,n[e]),o.tooltip=a(this.tooltipMappingName,n[e]),this.chart.rangeColorSettings&&this.chart.rangeColorSettings.length>0&&this.isAdvancedColorSupported()&&(this.colorName&&this.colorName.length>0?o.colorValue=a(this.colorName,n[e]):o.colorValue=a(this.yName,n[e]),o.interior=this.getPointFillColor(o.interior,o.colorValue))),o},o.prototype.isAdvancedColorSupported=function(){return 1===this.chart.visibleSeries.length&&("Column"===this.chart.series[0].type||"Bar"===this.chart.series[0].type||"Scatter"===this.chart.series[0].type||"Bubble"===this.chart.series[0].type)},o.prototype.getPointFillColor=function(e,t){var i=e;if(t&&this.chart.rangeColorSettings&&this.chart.rangeColorSettings.length>0)for(var r=0,o=this.chart.rangeColorSettings;r<o.length;r++){var n=o[r];t>=n.start&&t<=n.end&&(i=n.colors.length>1?Ze(n,t):n.colors[0])}return i},o.prototype.getObjectValue=function(e,t){return t[e]},o.prototype.setEmptyPoint=function(e,i){if(!this.findVisibility(e))return e.visible=!0,null;switch(e.isEmpty=!0,this instanceof nr&&e.isPointInRange?this.emptyPointSettings.mode:"Drop"){case"Zero":e.visible=!0,this instanceof nr&&this.seriesType.indexOf("HighLow")>-1?(e.high=e.low=0,this.seriesType.indexOf("HighLowOpenClose")>-1&&(e.open=e.close=0)):e.y=e.yValue=this.yData[i]=0;break;case"Average":this instanceof nr&&(this.seriesType.indexOf("HighLow")>-1?(e.high=t.isNullOrUndefined(e.high)||isNaN(+e.high)?this.getAverage(this.high,i):e.high,e.low=t.isNullOrUndefined(e.low)||isNaN(+e.low)?this.getAverage(this.low,i):e.low,this.seriesType.indexOf("HighLowOpenClose")>-1&&(e.open=t.isNullOrUndefined(e.open)||isNaN(+e.open)?this.getAverage(this.open,i):e.open,e.close=t.isNullOrUndefined(e.close)||isNaN(+e.close)?this.getAverage(this.close,i):e.close)):e.y=e.yValue=this.yData[i]=this.getAverage(this.yName,i)),e.visible=!0;break;case"Drop":case"Gap":this.yData[i]=null,e.visible=!1}},o.prototype.findVisibility=function(e){var i,r=this instanceof nr?this.seriesType:"HighLowOpenClose",o=this.yAxis.minimum,n=this.yAxis.maximum;switch(r){case"XY":return"PolarRadar"===this.chart.chartAreaType&&(!t.isNullOrUndefined(o)&&e.yValue<o||!t.isNullOrUndefined(n)&&e.yValue>n)?(e.isPointInRange=!1,!0):(this.setXYMinMax(e.yValue),this.yData.push(e.yValue),this instanceof nr&&"Bubble"===this.type&&(this.sizeMax=Math.max(this.sizeMax,t.isNullOrUndefined(e.size)||isNaN(+e.size)?this.sizeMax:e.size)),t.isNullOrUndefined(e.x)||t.isNullOrUndefined(e.y)||isNaN(+e.y));case"HighLow":return this.setHiloMinMax(e.high,e.low),t.isNullOrUndefined(e.x)||t.isNullOrUndefined(e.low)||isNaN(+e.low)||t.isNullOrUndefined(e.high)||isNaN(+e.high);case"HighLowOpenClose":return this.setHiloMinMax(e.high,e.low),t.isNullOrUndefined(e.x)||t.isNullOrUndefined(e.low)||isNaN(+e.low)||t.isNullOrUndefined(e.open)||isNaN(+e.open)||t.isNullOrUndefined(e.close)||isNaN(+e.close)||t.isNullOrUndefined(e.high)||isNaN(+e.high);case"BoxPlot":return i=(e.y||[null]).filter(function(e){return!t.isNullOrUndefined(e)&&!isNaN(e)}).sort(function(e,t){return e-t}),e.y=i,this.yMin=Math.min(this.yMin,Math.min.apply(Math,i)),this.yMax=Math.max(this.yMax,Math.max.apply(Math,i)),!i.length}},o.prototype.setXYMinMax=function(e){var i,r="Logarithmic"===this.yAxis.valueType||"Logarithmic"===this.xAxis.valueType,o=e<0;i=this.isRectTypeSeries&&!te(this.yAxis)?r?e:o?e:0:e,this.yMin=r?Math.min(this.yMin,t.isNullOrUndefined(i)||isNaN(i)||0===i?this.yMin:i):Math.min(this.yMin,t.isNullOrUndefined(i)||isNaN(i)?this.yMin:i),this.yMax=Math.max(this.yMax,t.isNullOrUndefined(e)||isNaN(e)?this.yMax:e)},o.prototype.setHiloMinMax=function(e,i){this.yMin=Math.min(this.yMin,Math.min(t.isNullOrUndefined(i)||isNaN(i)?this.yMin:i,t.isNullOrUndefined(e)||isNaN(e)?this.yMin:e)),this.yMax=Math.max(this.yMax,Math.max(t.isNullOrUndefined(i)||isNaN(i)?this.yMax:i,t.isNullOrUndefined(e)||isNaN(e)?this.yMax:e))},o.prototype.getSeriesType=function(){var e;if(this instanceof nr){var t="PolarRadar"===this.chart.chartAreaType?this.drawType:this.type;if(t)switch(t){case"RangeColumn":case"RangeArea":case"Hilo":e="HighLow";break;case"HiloOpenClose":case"Candle":e="HighLowOpenClose";break;case"BoxAndWhisker":e="BoxPlot";break;default:e="XY"}}this.seriesType=e},o.prototype.pushCategoryData=function(e,t,i){if(!this.chart.tooltip.shared&&!this.visible)return null;this.xAxis.isIndexed?(this.xAxis.labels[t]?this.xAxis.labels[t]+=", "+i:this.xAxis.labels.push(i),e.xValue=t):(this.xAxis.labels.indexOf(i)<0&&this.xAxis.labels.push(i),e.xValue=this.xAxis.labels.indexOf(i))},o.prototype.getAverage=function(e,t,i){return void 0===i&&(i=this.currentViewData),((i[t-1]?i[t-1][e]||0:0)+(i[t+1]?i[t+1][e]||0:0))/2},o.prototype.refreshDataManager=function(e){var i=this;this.chart=e;var o;if(!((o=e.isAngular?Object.keys(this.dataSource).length?this.dataSource:e.dataSource:this.dataSource||e.dataSource)instanceof r.DataManager)&&t.isNullOrUndefined(this.query))return void this.dataManagerSuccess({result:o,count:o.length},!1);this.dataModule.getData(this.dataModule.generateQuery().requiresCount()).then(function(e){return i.dataManagerSuccess(e)})},o.prototype.dataManagerSuccess=function(e,t){if(void 0===t&&(t=!0),this.currentViewData=e.count?e.result:[],this.chart.allowServerDataBinding=!1,this instanceof nr){this.chart.stockChart&&(this.chart.stockChart.series[this.index].localData=this.currentViewData);var i={name:"seriesRender",series:this,data:this.currentViewData,fill:this.interior};this.chart.trigger("seriesRender",i),this.interior=i.fill,this.currentViewData=i.data}!this.chart.stockChart||this instanceof nr||(this.currentViewData=this.chart.stockChart.findCurrentData(this.chart.stockChart.series[0].localData,this.chart.stockChart.series[0].xName)),this.processJsonData(),this.recordsCount=e.count,this.refreshChart(t),this.currentViewData=null},o.prototype.refreshChart=function(e){var t=this.chart;if(this instanceof nr&&(t.visibleSeriesCount+=e?1:0),t.refreshTechnicalIndicator(this),this instanceof nr&&"TrendLine"!==this.category)for(var i=0,r=this.trendlines;i<r.length;i++)r[i].setDataSource(this,t);t.visibleSeries.length===t.visibleSeriesCount&&(t.refreshBound(),t.trigger("loaded",{chart:t.isBlazor?{}:t}),this.chart.stockChart&&this.chart.stockChart.initialRender&&(this.chart.stockChart.initialRender=!1,this.chart.stockChart.stockChartDataManagerSuccess())),this instanceof nr&&(t.visibleSeriesCount+=e?0:1)},Qi([t.Property("")],o.prototype,"xName",void 0),Qi([t.Property("")],o.prototype,"colorName",void 0),Qi([t.Property("")],o.prototype,"high",void 0),Qi([t.Property("")],o.prototype,"low",void 0),Qi([t.Property("")],o.prototype,"open",void 0),Qi([t.Property("")],o.prototype,"close",void 0),Qi([t.Property("")],o.prototype,"volume",void 0),Qi([t.Property("")],o.prototype,"pointColorMapping",void 0),Qi([t.Property(!0)],o.prototype,"visible",void 0),Qi([t.Property(null)],o.prototype,"xAxisName",void 0),Qi([t.Property(null)],o.prototype,"yAxisName",void 0),Qi([t.Complex(null,qt)],o.prototype,"animation",void 0),Qi([t.Property(null)],o.prototype,"fill",void 0),Qi([t.Property(1)],o.prototype,"width",void 0),Qi([t.Property("0")],o.prototype,"dashArray",void 0),Qi([t.Property("")],o.prototype,"dataSource",void 0),Qi([t.Property()],o.prototype,"query",void 0),Qi([t.Collection([],ir)],o.prototype,"segments",void 0),Qi([t.Property("X")],o.prototype,"segmentAxis",void 0),Qi([t.Property(!1)],o.prototype,"enableComplexProperty",void 0),o}(t.ChildProperty),nr=function(e){function i(t,i,r,o){var n=e.call(this,t,i,r,o)||this;return n.visibleSeriesCount=0,n.category="Series",n.isRectSeries=!1,n.drawPoints=[],n.delayedAnimation=!1,n}return qi(i,e),i.prototype.refreshAxisLabel=function(){if("Category"!==this.xAxis.valueType)return null;this.xAxis.labels=[];for(var e=0,t=this.xAxis.series;e<t.length;e++){var i=t[e];if(i.visible&&"TrendLine"!==i.category){i.xMin=1/0,i.xMax=-1/0;for(var r=0,o=i.points;r<o.length;r++){var n=o[r];i.pushCategoryData(n,n.index,n.x),i.xMin=Math.min(i.xMin,n.xValue),i.xMax=Math.max(i.xMax,n.xValue)}}}},i.prototype.findSeriesCollection=function(e,t,i){for(var r=[],o=0,n=t.axes;o<n.length;o++)for(var a=0,s=n[o].series;a<s.length;a++)for(var l=s[a],h=0,c=e.axes;h<c.length;h++)for(var d=0,p=c[h].series;d<p.length;d++){var u=p[d];u===l&&u.visible&&this.rectSeriesInChart(u,i)&&r.push(u)}return r},i.prototype.rectSeriesInChart=function(e,t){var i=e.type.toLowerCase();return-1!==i.indexOf("column")||-1!==i.indexOf("bar")||-1!==i.indexOf("histogram")||-1!==i.indexOf("hiloopenclose")||-1!==i.indexOf("candle")||-1!==i.indexOf("pareto")||-1!==i.indexOf("hilo")||-1!==e.drawType.indexOf("Column")||-1!==i.indexOf("waterfall")||-1!==i.indexOf("boxandwhisker")||t},i.prototype.calculateStackedValue=function(e,t){for(var i=0,r=t.columns;i<r.length;i++)for(var o=r[i],n=0,a=t.rows;n<a.length;n++){var s=a[n];this.calculateStackingValues(this.findSeriesCollection(o,s,!0),e)}},i.prototype.calculateStackingValues=function(e,t){var i,r,o,n,a,s=[],l=[],h=[],c=[];t&&(c=this.findFrequencies(e));for(var d=[],p=[],u=[],y=0,m=e;y<m.length;y++){var v=m[y];if(-1!==v.type.indexOf("Stacking")||-1!==v.drawType.indexOf("Stacking")&&"PolarRadar"===v.chart.chartAreaType){l[o=-1!==v.type.indexOf("StackingArea")?"StackingArea100":-1!==v.type.indexOf("StackingLine")?"StackingLine100":v.stackingGroup]||(l[o]=[],h[o]=[]),s=v.yData,i=[],r=[],d.push(v);for(var f=0,b=(u=g(v)).length;f<b;f++)n=0,a=+s[f],void 0===l[o][u[f].xValue]&&(l[o][u[f].xValue]=0),void 0===h[o][u[f].xValue]&&(h[o][u[f].xValue]=0),t?(a=a/c[o][u[f].xValue]*100,a=isNaN(a)?0:a,u[f].percentage=+a.toFixed(2)):p[f]=p[f]?p[f]+Math.abs(a):Math.abs(a),a>=0?(n=l[o][u[f].xValue],l[o][u[f].xValue]+=a):(n=h[o][u[f].xValue],h[o][u[f].xValue]+=a),i.push(n),r.push(a+n),t&&r[f]>100&&(r[f]=100);v.stackedValues=new Ii(i,r);var x="Logarithmic"===v.yAxis.valueType,w=-1!==v.type.indexOf("Column")||-1!==v.type.indexOf("Bar");v.yMin=x&&w&&v.yMin<1?v.yMin:Math.min.apply(0,i),v.yMax=Math.max.apply(0,r),v.yMin>Math.min.apply(0,r)&&(v.yMin=t?-100:x&&w&&v.yMin<1?v.yMin:Math.min.apply(0,r)),v.yMax<Math.max.apply(0,i)&&(v.yMax=0)}}this.findPercentageOfStacking(d,p,t)},i.prototype.findPercentageOfStacking=function(e,t,i){for(var r=0,o=e;r<o.length;r++){var n=o[r];if(i)return null;for(var a=0,s=g(n);a<s.length;a++){var l=s[a];l.percentage=Math.abs(+(l.y/t[l.index]*100).toFixed(2))}}},i.prototype.findFrequencies=function(e){for(var t,i=[],r=[],o=0,n=e;o<n.length;o++){var a=n[o];if(a.yAxis.isStack100=-1!==a.type.indexOf("100"),r=g(a),-1!==a.type.indexOf("Stacking")){i[t=-1!==a.type.indexOf("StackingArea")?"StackingArea100":-1!==a.type.indexOf("StackingLine")?"StackingLine100":a.stackingGroup]||(i[t]=[]);for(var s=0,l=r.length;s<l;s++)void 0===i[t][r[s].xValue]&&(i[t][r[s].xValue]=0),a.yData[s]>0?i[t][r[s].xValue]+=a.yData[s]:i[t][r[s].xValue]-=a.yData[s]}}return i},i.prototype.renderSeries=function(e){var t=G(this.type);e[(t=t.replace("100",""))+"SeriesModule"]&&("Indicator"!==this.category&&"TrendLine"!==this.category&&this.createSeriesElements(e),this.visiblePoints=g(this),e[t+"SeriesModule"].render(this,this.xAxis,this.yAxis,e.requireInvertedAxis),"Indicator"!==this.category&&(this.errorBar.visible&&this.chart.errorBarModule.render(this),this.marker.dataLabel.visible&&e.dataLabelModule.render(this,this.chart,this.marker.dataLabel),this.appendSeriesElement(e.seriesElements,e)),this.chart.enableCanvas||this.performAnimation(e,t,this.errorBar,this.marker,this.marker.dataLabel))},i.prototype.createSeriesElements=function(e){if("Indicator"!==this.category){var t=e.element.id,i=this.marker.border.width+8+5,r="Scatter"===this.type||"Bubble"===this.type?e.svgRenderer:e.renderer,o=void 0===this.index?this.category:this.index,n=void 0,a=void 0,s=void 0;if("Scatter"===this.type?(n=e.primaryYAxis.maximum||e.primaryXAxis.maximum?0:(this.marker.height+i)/2,a=e.primaryYAxis.maximum||e.primaryXAxis.maximum?0:(this.marker.width+i)/2):(n=0,a=0),"PolarRadar"===e.chartAreaType){var l="Scatter"===this.drawType?Math.max(this.marker.width,this.marker.height):0;s=new Ni(t+"_ChartSeriesClipRect_"+o,"transparent",{width:1,color:"Gray"},1,this.clipRect.width/2+this.clipRect.x,this.clipRect.height/2+this.clipRect.y,e.radius+l),this.clipRectElement=K(e.redraw,s,r,"drawCircularClipPath")}else s=new Di(t+"_ChartSeriesClipRect_"+o,"transparent",{width:1,color:"Gray"},1,{x:-a,y:-n,width:this.clipRect.width+2*a,height:this.clipRect.height+2*n}),this.clipRectElement=K(e.redraw,s,r);var h="Cartesian"===e.chartAreaType?"translate("+this.clipRect.x+","+this.clipRect.y+")":"";this.symbolElement=null,this.seriesElement=r.createGroup({id:t+"SeriesGroup"+o,transform:h,"clip-path":"url(#"+t+"_ChartSeriesClipRect_"+o+")"}),this.chart.enableCanvas&&"Scatter"!==this.type&&"Bubble"!==this.type||this.seriesElement.appendChild(this.clipRectElement)}},i.prototype.appendSeriesElement=function(e,t){var i=this.marker,r=i.dataLabel,o=t.redraw;"TrendLine"!==this.category&&(be(t.enableCanvas,t.seriesElements,this.seriesElement,o),this.errorBar.visible&&("PolarRadar"===t.chartAreaType?be(t.enableCanvas,t.seriesElements,this.seriesElement,o):be(t.enableCanvas,t.seriesElements,this.errorBarElement,o)),"Scatter"!==this.type&&"Bubble"!==this.type||be(!1,t.seriesElements,this.seriesElement,o)),i.visible&&("Cartesian"===t.chartAreaType||"Scatter"!==this.drawType&&"PolarRadar"===t.chartAreaType)&&"Scatter"!==this.type&&"Bubble"!==this.type&&"Candle"!==this.type&&"Hilo"!==this.type&&"HiloOpenClose"!==this.type&&this.symbolElement&&be(t.enableCanvas,t.seriesElements,this.symbolElement,o),r.visible&&this.textElement&&(be(t.enableCanvas,t.dataLabelElements,this.shapeElement,o),be(t.enableCanvas,t.dataLabelElements,this.textElement,o)),!t.enableCanvas&&t.dataLabelElements.hasChildNodes()&&t.seriesElements.appendChild(t.dataLabelElements)},i.prototype.performAnimation=function(e,i,r,o,n){this.animation.enable&&e.animateSeries&&(e[i+"SeriesModule"].doAnimation(this),r.visible&&e.errorBarModule.doErrorBarAnimation(this),o.visible&&e.markerRender.doMarkerAnimation(this),n.visible&&"edge"!==t.Browser.info.name&&!t.Browser.isIE&&e.dataLabelModule.doDataLabelAnimation(this))},i.prototype.setPointColor=function(e,t){return t=e.interior||t,e.isEmpty?this.emptyPointSettings.fill||t:t},i.prototype.setBorderColor=function(e,t){return t.width=e.isEmpty?this.emptyPointSettings.border.width||t.width:t.width,t.color=e.isEmpty?this.emptyPointSettings.border.color||t.color:t.color,t},Qi([t.Property("")],i.prototype,"name",void 0),Qi([t.Property("")],i.prototype,"yName",void 0),Qi([t.Property("Line")],i.prototype,"drawType",void 0),Qi([t.Property(!0)],i.prototype,"isClosed",void 0),Qi([t.Property("#2ecd71")],i.prototype,"bearFillColor",void 0),Qi([t.Property("#e74c3d")],i.prototype,"bullFillColor",void 0),Qi([t.Property(!1)],i.prototype,"enableSolidCandles",void 0),Qi([t.Property("")],i.prototype,"size",void 0),Qi([t.Property(null)],i.prototype,"binInterval",void 0),Qi([t.Property(!1)],i.prototype,"showNormalDistribution",void 0),Qi([t.Property("")],i.prototype,"stackingGroup",void 0),Qi([t.Complex({color:"transparent",width:0},Yt)],i.prototype,"border",void 0),Qi([t.Property(1)],i.prototype,"opacity",void 0),Qi([t.Property(0)],i.prototype,"zOrder",void 0),Qi([t.Property("Line")],i.prototype,"type",void 0),Qi([t.Complex(null,rr)],i.prototype,"errorBar",void 0),Qi([t.Complex(null,Ji)],i.prototype,"marker",void 0),Qi([t.Complex({},ei)],i.prototype,"dragSettings",void 0),Qi([t.Collection([],er)],i.prototype,"trendlines",void 0),Qi([t.Property(!0)],i.prototype,"enableTooltip",void 0),Qi([t.Property("")],i.prototype,"tooltipFormat",void 0),Qi([t.Property("")],i.prototype,"tooltipMappingName",void 0),Qi([t.Property("SeriesType")],i.prototype,"legendShape",void 0),Qi([t.Property("")],i.prototype,"legendImageUrl",void 0),Qi([t.Property(null)],i.prototype,"selectionStyle",void 0),Qi([t.Property(null)],i.prototype,"unSelectedStyle",void 0),Qi([t.Property(null)],i.prototype,"nonHighlightStyle",void 0),Qi([t.Property(1)],i.prototype,"minRadius",void 0),Qi([t.Property(3)],i.prototype,"maxRadius",void 0),Qi([t.Property("Natural")],i.prototype,"splineType",void 0),Qi([t.Property(.5)],i.prototype,"cardinalSplineTension",void 0),Qi([t.Complex(null,Kt)],i.prototype,"emptyPointSettings",void 0),Qi([t.Property(!0)],i.prototype,"showMean",void 0),Qi([t.Property("Normal")],i.prototype,"boxPlotMode",void 0),Qi([t.Property(null)],i.prototype,"columnWidth",void 0),Qi([t.Property(0)],i.prototype,"columnSpacing",void 0),Qi([t.Property("#C64E4A")],i.prototype,"negativeFillColor",void 0),Qi([t.Property("#4E81BC")],i.prototype,"summaryFillColor",void 0),Qi([t.Property()],i.prototype,"intermediateSumIndexes",void 0),Qi([t.Property()],i.prototype,"sumIndexes",void 0),Qi([t.Complex({color:"black",width:2},Ht)],i.prototype,"connector",void 0),Qi([t.Complex(null,$t)],i.prototype,"cornerRadius",void 0),i}(or),ar=function(){function e(e,t){this.initDataManager(e,t)}return e.prototype.initDataManager=function(e,t){this.dataManager=e instanceof r.DataManager?e:new r.DataManager(e),this.query=t instanceof r.Query?t:new r.Query},e.prototype.generateQuery=function(){return this.query.clone()},e.prototype.getData=function(e){var t=this;if(this.dataManager.ready){var i=new r.Deferred;return this.dataManager.ready.then(function(){t.dataManager.executeQuery(e).then(function(e){i.resolve(e)})}).catch(function(e){i.reject(e)}),i.promise}return this.dataManager.executeQuery(e)},e}(),sr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),lr=function(e){function r(t){var i=e.call(this,t)||this;return i.elementId=t.element.id,i}return sr(r,e),r.prototype.addEventListener=function(){this.chart.isDestroyed||(this.chart.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.chart.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},r.prototype.removeEventListener=function(){this.chart.isDestroyed||(this.chart.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.chart.off(t.Browser.touchEndEvent,this.mouseUpHandler))},r.prototype.mouseUpHandler=function(){var e=this.chart;!e.isTouch||e.crosshair.enable||this.isSelected(e)||this.markerMove(!0)},r.prototype.mouseMoveHandler=function(){var e=this.chart;e.crosshair.enable&&!e.tooltip.enable||e.isTouch&&!e.startMove||this.isSelected(e)||this.markerMove(!1)},r.prototype.markerMove=function(e){var i=this,r=this.chart;this.currentPoints=[];var o,n,a,s;if(r.tooltip.shared&&r.tooltip.enable){if(!j(r.mouseX,r.mouseY,r.chartAxisLayoutPanel.seriesClipRect))return null;if(r.tooltip.enable)for(var l="PolarRadar"===r.chartAreaType?this.getData():null,h=this.mergeXvalues(this.chart.visibleSeries),c=0,d=r.visibleSeries;c<d.length;c++){var p=d[c];p.enableTooltip&&"Indicator"!==p.category&&("Cartesian"===r.chartAreaType&&p.visible?o=this.getClosestX(r,p,h):"PolarRadar"===r.chartAreaType&&p.visible&&null!==l.point&&(o=new Yi(p.points[l.point.index],p)),o&&(this.currentPoints.push(o),o=null))}}else o=this.getData(),s=o.series,n=this.previousPoints[0],a=s&&("Bubble"===s.type||"Scatter"===s.drawType||"Scatter"===s.type||"Candle"!==s.type&&"Hilo"!==s.type&&"HiloOpenClose"!==s.type&&s.marker.visible&&0!==s.marker.width&&0!==s.marker.height),o.lierIndex=this.lierIndex,o.point&&a&&(!n||n.point!==o.point||n&&n.lierIndex>3&&n.lierIndex!==this.lierIndex)&&this.currentPoints.push(o),o.point&&a&&r.isPointMouseDown&&this.currentPoints.push(o);var u=this.previousPoints.length;if(this.currentPoints.length>0&&(0===u||r.isPointMouseDown||u>0&&this.previousPoints[0].point!==this.currentPoints[0].point)){this.previousPoints.length>0&&this.removeHighlightedMarker();for(var g=this,y=0,m=this.currentPoints;y<m.length;y++)!function(e){(e&&e.point||"Candle"!==s.type&&"Hilo"!==s.type&&"HiloOpenClose"!==s.type)&&(Ce(g.markerExplode),g.isRemove=!0,e.point.symbolLocations.map(function(t,r){e.series.isRectSeries&&!e.point.marker.visible||i.drawTrackBall(e.series,e.point,t,r)}))}(m[y]);this.previousPoints=t.extend([],this.currentPoints,null,!0)}r.tooltip.enable||!(0===this.currentPoints.length&&this.isRemove||e&&this.isRemove)&&j(r.mouseX,r.mouseY,r.chartAxisLayoutPanel.seriesClipRect)||(this.isRemove=!1,this.markerExplode=+setTimeout(function(){i.removeHighlightedMarker()},2e3)),this.currentPoints=[]},r.prototype.drawTrackBall=function(e,r,o,n){var a=r.marker,s=e.marker,l=a.shape||s.shape;if("None"===l)return null;var h,c=e.symbolElement||e.seriesElement;this.chart.highlightModule&&"None"!==this.chart.highlightMode&&(h=this.chart.highlightModule.generateStyle(e)),this.chart.selectionModule&&"None"!==this.chart.selectionMode&&(h=this.chart.selectionModule.generateStyle(e));for(var d=this.elementId+"_Series_"+e.index+"_Point_"+r.index+"_Trackball"+(n||""),p=new i.Size((a.width||s.width)+5,(a.height||s.height)+5),u=a.border||e.border,g="BoxAndWhisker"===e.type||"Bubble"===e.type||"Scatter"===e.type,y=u.color&&"transparent"!==u.color?u.color:a.fill||r.interior||(g?r.color:e.interior),m=ke(_e(y)),v=a.border?a.border.width:s.border.width,f=e.chart.themeStyle.markerShadow||"rgba("+m.r+","+m.g+","+m.b+",0.2)",b=0;b<2;b++){var x=new i.PathOption(d+"_"+b,b?a.fill||r.color||(g?e.interior:"#ffffff"):"transparent",v+(b?0:8),b?y:f,a.opacity||s.opacity,null,null),w=ne(o,l,p,s.imageUrl,x,"",this.chart.svgRenderer,e.clipRect);w.setAttribute("class","EJ2-Trackball");var S=-1!==c.id.indexOf("Symbol")?"_Symbol":"",C=document.getElementById(this.elementId+"_Series_"+e.index+"_Point_"+r.index+S);""===h||t.isNullOrUndefined(h)||t.isNullOrUndefined(C)||!C.hasAttribute("class")||h!==C.getAttribute("class")||w.classList.add(h),w.setAttribute("clip-path",c.getAttribute("clip-path")),w.setAttribute("transform",c.getAttribute("transform")),this.chart.svgObject.appendChild(w)}},r.prototype.removeHighlightedMarker=function(){for(var e=document.getElementsByClassName("EJ2-Trackball"),i=0,r=e.length;i<r;i++)t.remove(e[0]);this.previousPoints=[]},r}(Zi),hr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cr=function(e){function r(t){var i=e.call(this,t)||this;return i.addEventListener(),i}return hr(r,e),r.prototype.render=function(e){var t=this,i=e.chart.redraw;this.createElement(e,i);for(var r=0,o=e.points;r<o.length;r++)!function(r){r.visible&&r.symbolLocations&&r.symbolLocations.length&&r.symbolLocations.map(function(o,n){"None"!==e.marker.shape&&t.renderMarker(e,r,o,n,i)})}(o[r])},r.prototype.renderMarker=function(e,r,o,n,a){var s,l,h,c,d=void 0===e.index?e.category:e.index,p=e.marker,u={color:p.border.color,width:p.border.width},g=p.border.color;o.x=o.x+p.offset.x,o.y=o.y-p.offset.y;var y,m="BoxAndWhisker"===e.type,v=p.fill||(m?r.interior||e.interior:"#ffffff"),f=m?me(e.seriesElement.childNodes,"Series_"+e.index+"_Point_"+r.index):e.symbolElement;u.color=g||e.setPointColor(r,e.interior);var b=this.elementId+"_Series_"+d+"_Point_"+r.index+"_Symbol"+(n||""),x={cancel:!1,name:"pointRender",series:e,point:r,fill:r.isEmpty?e.emptyPointSettings.fill||v:v,border:{color:"BoxAndWhisker"===e.type?t.isNullOrUndefined(g)||"transparent"===g?Oe(v,-.6):g:u.color,width:u.width},height:p.height,width:p.width,shape:p.shape};if(x.border=e.setBorderColor(r,{width:x.border.width,color:x.border.color}),e.isRectSeries&&"BoxAndWhisker"!==e.type||(this.chart.trigger("pointRender",x),r.color=x.fill),r.color=x.fill,x.cancel)o=null,r.marker={visible:!1};else{var w=void 0;w="RangeArea"===e.type||"RangeColumn"===e.type||"RangeColumn"===e.drawType?n?r.low:r.high:m?r.outliers[n]:r.y;var S=x.point.marker.fill||x.fill,C=void 0;C=t.isNullOrUndefined(x.point.marker.border)?{color:x.border.color,width:x.border.width}:{color:x.point.marker.border.color||x.border.color,width:x.point.marker.border.width||x.border.width};var P=x.point.marker.width||x.width,L=x.point.marker.height||x.height,R=x.point.marker.opacity||p.opacity,M=x.point.marker.shape||x.shape;c=new i.PathOption(b,S,C.width,C.color,R,null),(void 0!==f&&null!==f||this.chart.enableCanvas)&&(a&&he(c.id)&&(y=he(c.id),h="Circle"===M?"c":"",s={x:+y.getAttribute(h+"x"),y:+y.getAttribute(h+"y")},l=y.getAttribute("d")),y=ne(o,M,new i.Size(P,L),p.imageUrl,c,r.x.toString()+":"+w.toString(),this.chart.renderer,e.clipRect),be(this.chart.enableCanvas,f,y,a,!0,h+"x",h+"y",s,l,!1,!1,null,e.chart.duration)),r.marker={border:C,fill:S,height:L,visible:!0,shape:M,width:P}}},r.prototype.createElement=function(e,t){var i,r,o=e.marker,n=o.border.width+8+5,a=e.chart.svgRenderer,s=void 0===e.index?e.category:e.index,l="Cartesian"===e.chart.chartAreaType?"translate("+e.clipRect.x+","+e.clipRect.y+")":"";if(o.visible){var h=(o.height+n)/2,c=(o.width+n)/2;i="Cartesian"===e.chart.chartAreaType?K(t,r=new Di(this.elementId+"_ChartMarkerClipRect_"+s,"transparent",{width:1,color:"Gray"},1,{x:-c,y:-h,width:e.clipRect.width+2*c,height:e.clipRect.height+2*h}),a):K(t,r=new Ni(this.elementId+"_ChartMarkerClipRect_"+s,"transparent",{width:1,color:"Gray"},1,e.clipRect.width/2+e.clipRect.x,e.clipRect.height/2+e.clipRect.y,e.chart.radius+Math.max(h,c)),a,"drawCircularClipPath"),r={id:this.elementId+"SymbolGroup"+s,transform:l,"clip-path":"url(#"+this.elementId+"_ChartMarkerClipRect_"+s+")"},e.symbolElement=a.createGroup(r),e.symbolElement.appendChild(i),this.chart.enableCanvas&&document.getElementById(this.chart.element.id+"_tooltip_svg").appendChild(e.symbolElement)}},r.prototype.getRangeLowPoint=function(e,t){var i=e.x,r=e.y;return t.chart.requireInvertedAxis?(r+=e.height/2,i+=t.yAxis.isInversed?e.width:0):(r+=t.yAxis.isInversed?0:e.height,i+=e.width/2),{x:i,y:r}},r.prototype.doMarkerAnimation=function(e){if("Scatter"!==e.type&&"Bubble"!==e.type&&"Candle"!==e.type&&"Hilo"!==e.type&&"HiloOpenClose"!==e.type&&("PolarRadar"!==e.chart.chartAreaType||"Scatter"!==e.drawType))for(var t=e.symbolElement.childNodes,i=e.animation.delay+e.animation.duration,r=e.chart.animated?e.chart.duration:200,o=1,n="RangeArea"===e.type||"RangeColumn"===e.type?2:1,a=0;a<e.points.length;a++)if(e.points[a].symbolLocations){if(!e.points[a].symbolLocations.length||!t[o])continue;if(Q(t[o],i,r,e,a,e.points[a].symbolLocations[0],!1),2===n){var s=this.getRangeLowPoint(e.points[a].regions[0],e);Q(t[o+1],i,r,e,a,s,!1)}o+=n}},r}(lr),dr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pr=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ur=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return dr(i,e),pr([t.Property(0)],i.prototype,"x",void 0),pr([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),gr=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return dr(r,i),pr([t.Property(!0)],r.prototype,"visible",void 0),pr([t.Property(null)],r.prototype,"height",void 0),pr([t.Property(null)],r.prototype,"width",void 0),pr([t.Complex({x:0,y:0},ur)],r.prototype,"location",void 0),pr([t.Property("Auto")],r.prototype,"position",void 0),pr([t.Property("Series")],r.prototype,"mode",void 0),pr([t.Property(8)],r.prototype,"padding",void 0),pr([t.Property("Center")],r.prototype,"alignment",void 0),pr([t.Complex(e.Theme.legendLabelFont,Xt)],r.prototype,"textStyle",void 0),pr([t.Property(10)],r.prototype,"shapeHeight",void 0),pr([t.Property(10)],r.prototype,"shapeWidth",void 0),pr([t.Complex({},Yt)],r.prototype,"border",void 0),pr([t.Complex({left:0,right:0,top:0,bottom:0},Ut)],r.prototype,"margin",void 0),pr([t.Complex({left:0,right:0,top:0,bottom:0},Zt)],r.prototype,"containerPadding",void 0),pr([t.Property(5)],r.prototype,"shapePadding",void 0),pr([t.Property("transparent")],r.prototype,"background",void 0),pr([t.Property(1)],r.prototype,"opacity",void 0),pr([t.Property(!0)],r.prototype,"toggleVisibility",void 0),pr([t.Property(null)],r.prototype,"description",void 0),pr([t.Property(3)],r.prototype,"tabIndex",void 0),pr([t.Property(null)],r.prototype,"title",void 0),pr([t.Complex(e.Theme.legendTitleFont,Xt)],r.prototype,"titleStyle",void 0),pr([t.Property("Top")],r.prototype,"titlePosition",void 0),pr([t.Property(100)],r.prototype,"maximumTitleWidth",void 0),pr([t.Property(!0)],r.prototype,"enablePages",void 0),pr([t.Property(!1)],r.prototype,"isInversed",void 0),r}(t.ChildProperty),yr=function(){function e(e){this.pageXCollections=[],this.legendTitleCollections=[],this.legendRegions=[],this.pagingRegions=[],this.chart=e,this.legend=e.legendSettings,this.legendID=e.element.id+"_chart_legend",this.isChartControl="chart"===e.getModuleName(),this.isBulletChartControl="bulletChart"===e.getModuleName(),this.bulletChart=this.chart,this.fivePixel=5,this.rowCount=0,this.pageButtonSize=8,this.maxColumns=0,this.maxWidth=0,this.currentPage=1,this.backwardArrowOpacity=0,this.forwardArrowOpacity=1,this.arrowWidth=2*(this.fivePixel+this.pageButtonSize+this.fivePixel),this.arrowHeight=this.arrowWidth,this.isTop=!1,this.isTitle=!1,this.currentPageNumber=1}return e.prototype.calculateLegendBounds=function(e,t,r){var o=this.legend,n=this.isBulletChartControl?"40%":"20%";this.getPosition(o.position,t),this.legendBounds=new i.Rect(e.x,e.y,0,0),this.isVertical="Left"===this.position||"Right"===this.position,this.isVertical?(this.legendBounds.height=Be(o.height,t.height-(e.y-this.chart.margin.top))||e.height,this.legendBounds.width=Be(o.width||n,t.width)):(this.legendBounds.width=Be(o.width,t.width)||e.width,this.legendBounds.height=Be(o.height||n,t.height)),this.library.getLegendBounds(t,this.legendBounds,o),this.isBulletChartControl||(this.legendBounds.width+=this.legend.containerPadding.left+this.legend.containerPadding.right,this.legendBounds.height+=this.legend.containerPadding.top+this.legend.containerPadding.bottom),this.getLocation(this.position,o.alignment,this.legendBounds,e,t,r)},e.prototype.getPosition=function(e,t){var i=this.chart,r=this.chart;this.isChartControl||this.isBulletChartControl?this.position="Auto"!==e?e:"Bottom":("Auto"===e&&((i||r).visibleSeries&&"Funnel"===(i||r).visibleSeries[0].type||"Pyramid"===(i||r).visibleSeries[0].type)&&(e="Top"),this.position="Auto"!==e?e:t.width>t.height?"Right":"Bottom")},e.prototype.setBounds=function(e,t,i,r){var o=i.title&&"Top"===i.titlePosition?this.legendTitleSize.height+this.fivePixel:0;this.isVertical&&this.isPaging&&!i.enablePages&&!this.isBulletChartControl&&(o=i.title&&"Top"===i.titlePosition?this.legendTitleSize.height+this.fivePixel:0,o+=this.pageButtonSize+this.fivePixel),e=Math.min(e,r.width),t=Math.min(t,r.height),"Gradient"===i.mode?(r.width=i.width?r.width:this.isVertical?e:.75*r.width,r.height=i.height?r.height:this.isVertical?.75*r.height:t):(r.width=i.width?r.width:e,r.height=i.height?r.height:t),this.isBulletChartControl||this.isTop&&"None"!==i.titleStyle.textOverflow&&(this.calculateLegendTitle(i,r),r.height+="Wrap"===i.titleStyle.textOverflow&&this.legendTitleCollections.length>1?this.legendTitleSize.height-this.legendTitleSize.height/this.legendTitleCollections.length:0),this.rowCount=Math.max(1,Math.ceil((r.height-i.padding-o)/(this.maxItemHeight+i.padding)))},e.prototype.getLocation=function(e,t,i,r,o,n){var a=this.legend.border.width,s=this.isBulletChartControl,l=this.bulletChart,h="Inside"===l.labelPosition,c="Inside"===l.tickPosition,d="Vertical"===l.orientation,p=s&&""!==l.categoryField?n.width+this.chart.border.width+3*a:0,u=this.chart.margin.bottom,g=i.height+a+this.legend.margin.top+this.legend.margin.bottom,y=i.width+a+this.legend.margin.left+this.legend.margin.right;"Bottom"===e?(i.x=this.alignLegend(i.x,o.width,i.width,t),i.y=r.y+(r.height-g)+a+this.legend.margin.top,i.y+=!s||l.opposedPosition||h||c||d?d&&""!==l.categoryField?n.height+2*a:0:l.majorTickLines.height+u+this.legend.border.width+2*a,L(r,new Hi(0,0,0,g))):"Top"===e?(i.x=this.alignLegend(i.x,o.width,i.width,t),i.y=r.y+a+this.legend.margin.top,i.y-=!s||!l.opposedPosition||h||c||d?0:l.majorTickLines.height+this.chart.margin.top,L(r,new Hi(0,0,g-=s?2*-a:0,0))):"Right"===e?(i.x=r.x+(r.width-i.width)-this.legend.margin.right,i.y=r.y+this.alignLegend(0,o.height-(r.y+u),i.height,t),y+=s&&l.opposedPosition&&!h&&!c&&d?this.chart.margin.left+this.chart.margin.right+l.majorTickLines.height:0,L(r,new Hi(0,y,0,0))):"Left"===e?(i.x=i.x+this.legend.margin.left,i.y=r.y+this.alignLegend(0,o.height-(r.y+u),i.height,t),y+=!s||l.opposedPosition||h||c||!d?"Vertical"!==l.orientation&&""!==l.categoryField?p:0:i.x-this.chart.margin.left+a+l.majorTickLines.height,L(r,new Hi(y,0,0,0))):(i.x=this.legend.location.x,i.y=this.legend.location.y,L(r,new Hi(0,0,0,0)))},e.prototype.alignLegend=function(e,t,i,r){switch(r){case"Far":e=t-i-e;break;case"Center":e=(t-i)/2}return e},e.prototype.renderLegend=function(e,t,r,o){var n=0,a=0,s=(new i.Rect(0,0,0,0),new i.Rect(0,0,0,0)),l=this.findFirstLegendPosition(this.legendCollections),h=t.padding,c=t.enablePages,d=t.titlePosition,p=this.isPaging&&!t.enablePages&&this.isVertical?this.pageButtonSize:0,u=e.renderer.createGroup({id:this.legendID+"_g"}),g=this.createLegendElements(e,r,u,t,this.legendID,o);this.legendRegions=[];for(var y=0,m=0;m<this.legendCollections.length;m++)if(""!==this.legendCollections[m].text){y=Math.max(this.legendCollections[m].textSize.height,y);break}if(this.maxItemHeight=Math.max(y,t.shapeHeight),c||!this.isPaging||this.isVertical?this.isPaging||this.isVertical||(a=this.isTitle&&"Left"===d?this.fivePixel+this.legendTitleSize.width:0):(a=this.isTitle&&"Left"===d?this.legendTitleSize.width:0,a+=this.pageButtonSize+2*this.fivePixel),n=this.isTitle&&(this.isTop||this.isVertical)?this.legendTitleSize.height:0,"Gradient"===e.legendSettings.mode&&this.legendCollections.length>1)this.getLinearLegend(r,e,t,g),this.totalPages=1;else if(l!==this.legendCollections.length){var v=void 0,f=0,b=this.legendCollections[l],x=new Vi(this.isBulletChartControl?r.x+a+h+t.shapeWidth/2:r.x+a+h+t.shapeWidth/2+t.containerPadding.left,this.isBulletChartControl?r.y+n+p+h+this.maxItemHeight/2:r.y+n+p+h+this.maxItemHeight/2+t.containerPadding.top),w=e.isRtlEnabled?"end":"start",S=new i.TextOption("",x.x,x.y,w),C=t.shapePadding+h+t.shapeWidth;if(this.totalPages=this.totalPages=this.isChartControl||this.isBulletChartControl?this.totalPages:0,this.pageXCollections=[],this.legendCollections[l].location=x,!t.enablePages&&this.isPaging){var P=x.x-this.fivePixel,L=x.y-this.fivePixel,R=this.isTitle&&!this.isVertical&&"Left"===d?this.legendTitleSize.width+this.fivePixel:0,M=this.isVertical?this.pageButtonSize+Math.abs(L-r.y):0,A=this.isTitle&&!this.isVertical&&"Right"===d?this.legendTitleSize.width+this.fivePixel:0;A+=this.isVertical?0:this.fivePixel+this.pageButtonSize+this.fivePixel,s=new i.Rect(P,L,r.width-A-R,r.height-M)}else s=r;for(var T=0,k=this.legendCollections;T<k.length;T++){var _=k[T];"accumulationchart"===this.chart.getModuleName()&&(_.fill=(this.chart||this.chart).visibleSeries[0].points[_.pointIndex].color),this.accessbilityText=this.isBulletChartControl?"Legend of bullet chart"+_.text:"Click to show or hide the "+_.text+" series",_.render&&""!==_.text&&((v=e.renderer.createGroup({id:this.legendID+this.generateId(_,"_g_",f)}))&&(v.setAttribute("tabindex",t.tabIndex.toString()),v.setAttribute("aria-label",t.description||this.accessbilityText)),this.library.getRenderPoint(_,x,C,b,s,f,l),this.renderSymbol(_,v,f),this.renderText(e,_,v,S,f),v&&v.setAttribute("style","outline: none; cursor: "+(!t.toggleVisibility&&("None"===e.selectionMode||"None"===e.highlightMode||"None"===e.selectionMode)||this.isBulletChartControl?"auto":"pointer")),g&&g.appendChild(v),b=_),f++}this.isPaging?this.renderPagingElements(e,r,S,u):this.totalPages=1}be(e.enableCanvas,e.svgObject,u,o)},e.prototype.getLinearLegend=function(e,t,r,o){var n="http://www.w3.org/2000/svg",a=this.legendCollections[0],s=this.legendCollections[1],l=this.chart.renderer.createDefs(),h=document.createElementNS(n,"linearGradient"),c=[],d=[];r.title&&(this.isVertical?(e.y+=this.legendTitleSize.height,e.height-=this.legendTitleSize.height):"Left"===r.titlePosition?(e.x+=this.legendTitleSize.width,e.width-=this.legendTitleSize.width):"Right"===r.titlePosition?e.width-=this.legendTitleSize.width:"Top"===r.titlePosition&&(e.y+=this.legendTitleSize.height,e.height-=this.legendTitleSize.height));for(var p=0,u=this.chart.rangeColorSettings;p<u.length;p++){var g=u[p];if(d.indexOf(g.start)<0&&d.push(g.start),g.colors.length>2){var y=g.end-g.start,m=g.colors.length-1;if(y>0){y/=m;for(f=1;f<m;f++){var v=g.start+y*f;d.push(v)}}else for(var f=1;f<m;f++)d.push(g.start)}d.indexOf(g.end)<0&&d.push(g.end);for(var b=0,x=g.colors;b<x.length;b++){var w=x[b];c.indexOf(w)<0&&c.push(w)}g.colors.length>0&&g.colors.length<2&&c.push(g.colors[0])}var S=this.isVertical?"0":"100",C=this.isVertical?"100":"0";h.setAttribute("id",this.generateId(a,"linearGradient",0)),h.setAttribute("x1","0%"),h.setAttribute("y1","0%"),h.setAttribute("x2",S+"%"),h.setAttribute("y2",C+"%");for(var P=d[d.length-1]-d[0],L=0;L<c.length;L++){var R=d[L]-d[0];R/=P;var M=document.createElementNS(n,"stop");M.setAttribute("offset",R.toString()),M.setAttribute("stop-color",c[L]),M.setAttribute("stop-opacity",1..toString()),h.appendChild(M)}var A,T,k,_,O=a.text.toString(),E=s.text.toString(),z=i.measureText(O,r.textStyle),I=i.measureText(E,r.textStyle),D=z.width>I.width?z.width:I.width,B=z.height>I.height?z.height:I.height,N=2*D+4*r.padding,F=e.width,V=e.height,j=e.x+D+2*r.padding,H=e.y+r.padding;if(this.isVertical){if(N=2*B+4*r.padding,F=e.width-2*r.padding,V=e.height-N,j=e.x+r.padding,H=e.y+B+2*r.padding,A=e.y+r.padding+B,T=H+V+B,k=e.x+.5*e.width-.5*D,_=k,F>30){var X=F-30;F=30,j+=X/2}}else if(F=e.width-N,V=e.height-2*r.padding,k=e.x+r.padding+(D-z.width),_=e.x+F+3*r.padding+D,A=e.y+.5*e.height+.25*B,T=A,V>30){var Y=V-30;V=30,H+=Y/2}var G=new i.TextOption("",k,A,"",O);G.id=this.legendID+this.generateId(a,"_text_",1);var W=a.visible?r.textStyle.color||t.themeStyle.legendLabel:"#D3D3D3",U=this.chart.enableCanvas;Ve(t.renderer,G,r.textStyle,W,o,!1,!1,!1,!1,null,this.currentPageNumber&&U?new i.Rect(0,-this.translatePage(null,this.currentPageNumber-1,this.currentPageNumber),0,0):null),(G=new i.TextOption("",_,T,"",E)).id=this.legendID+this.generateId(a,"_text_",2),Ve(t.renderer,G,r.textStyle,W,o,!1,!1,!1,!1,null,this.currentPageNumber&&U?new i.Rect(0,-this.translatePage(null,this.currentPageNumber-1,this.currentPageNumber),0,0):null);var Z=t.renderer.drawRectangle({width:F,height:V,x:j,y:H,fill:"url(#"+this.generateId(a,"linearGradient",0)+")"});l.appendChild(h),o.appendChild(l),o.appendChild(Z)},e.prototype.findFirstLegendPosition=function(e){for(var t=0,i=0,r=e;i<r.length;i++){var o=r[i];if(o.render&&""!==o.text)break;t++}return t},e.prototype.calculateLegendTitle=function(e,t){if(e.title){this.isTop="Top"===e.titlePosition;var r="Trim"===e.titleStyle.textOverflow?2*e.padding:0;this.isTop||this.isVertical?this.legendTitleCollections=Xe(e.title,e.titleStyle,t.width-r):this.legendTitleCollections[0]=Ie(e.maximumTitleWidth,e.title,e.titleStyle);var o=this.isTop?e.title:this.legendTitleCollections[0];this.legendTitleSize=i.measureText(o,e.titleStyle),this.legendTitleSize.height*=this.legendTitleCollections.length}else this.legendTitleSize=new i.Size(0,0)},e.prototype.renderLegendTitle=function(e,t,r,o){var n=t.padding,a=t.titleStyle.textAlignment;this.isTop="Top"===t.titlePosition;var s="Near"===a?"start":"Far"===a?"end":"middle",l=Ye(r,t.titleStyle);s=this.isTop||this.isVertical?s:"",l="Near"===a?l+n:"Far"===a?l-n:l,l=this.isTop||this.isVertical?l:r.x+("Left"===t.titlePosition?5:r.width-this.legendTitleSize.width-5);var h=r.height/2+this.legendTitleSize.height/4,c=r.y+(this.isTop||this.isVertical?this.legendTitleSize.height/this.legendTitleCollections.length:h),d=new i.TextOption(this.legendID+"_title",l,c,s,this.legendTitleCollections);Ve(e.renderer,d,t.titleStyle,t.titleStyle.color,o)},e.prototype.createLegendElements=function(e,t,i,r,o,n){var a=r.padding,s=new Di(o+"_element",r.background,r.border,r.opacity,t),l=e.renderer.createGroup({id:o+"_collections"}),h=e.enableCanvas,c=e.renderer.createClipPath({id:o+"_clipPath"});return i?i.appendChild(e.renderer.drawRectangle(s)):e.renderer.drawRectangle(s),r.title&&this.renderLegendTitle(e,r,t,i),h||i.appendChild(l),this.legendTranslateGroup=e.renderer.createGroup({id:o+"_translate_g"}),h||l.appendChild(this.legendTranslateGroup),s.y+=a+(this.isTop?this.legendTitleSize.height:0),s.id+="_clipPath_rect",s.width=!this.isChartControl&&"bulletChart"!==e.getModuleName()&&this.isVertical?this.maxWidth-a+r.containerPadding.left+r.containerPadding.right:t.width,h?this.pagingClipRect=s:(this.clipRect=e.renderer.drawRectangle(s),c.appendChild(this.clipRect)),be(h,e.svgObject,c,n),h||l.setAttribute("style","clip-path:url(#"+c.id+")"),this.legendTranslateGroup},e.prototype.renderSymbol=function(e,t,r){var o,n,a=this.isBulletChartControl?this.chart:null,s=e.visible?e.fill:"#D3D3D3",l="chart"===this.chart.getModuleName()&&"SeriesType"===e.shape&&e.type.toLowerCase().indexOf("line")>-1&&-1===e.type.toLowerCase().indexOf("area"),h="chart"===this.chart.getModuleName()&&("Scatter"===e.type||"Bubble"===e.type),c=this.chart.enableCanvas,d="SeriesType"===e.shape?e.type:e.shape,p=l?"Series"===this.legend.mode?this.chart.visibleSeries[r].width:this.chart.visibleSeries[0].width:this.isBulletChartControl&&"Multiply"===e.shape?4:1;if(d="Scatter"===d?e.markerShape:d,h&&r<this.chart.visibleSeries.length){var u=this.chart.visibleSeries[r].border;o=u.color?u.color:s,p=u.width?u.width:1}var g=new i.PathOption(this.legendID+this.generateId(e,"_shape_",r),s,p,h?o:s,1,"",""),y=i.measureText(e.text,this.legend.textStyle),m=this.legend.isInversed?e.location.x+y.width+this.legend.shapePadding:e.location.x,v=e.location.y;c?(n=-this.translatePage(null,this.currentPageNumber-1,this.currentPageNumber),ne({x:m,y:v},d,new i.Size(this.legend.shapeWidth,this.legend.shapeHeight),"",g,this.accessbilityText,this.chart.renderer,this.currentPageNumber?new i.Rect(0,n,0,0):null,this.isBulletChartControl,a),this.legendRegions.push({rect:new i.Rect(e.location.x,e.location.y,this.legend.shapeWidth,this.legend.shapeHeight+n),index:r})):t.appendChild(ne({x:m,y:v},d,new i.Size(this.legend.shapeWidth,this.legend.shapeHeight),e.url,g,this.accessbilityText,this.chart.renderer,null,this.isBulletChartControl,a)),("Line"===d&&e.markerVisibility&&"Image"!==e.markerShape||"Doughnut"===e.type&&"Doughnut"===d)&&(g.id=this.legendID+this.generateId(e,"_shape_marker_",r),d="Doughnut"===e.type?"Circle":e.markerShape,g.fill="Doughnut"===e.type?"#FFFFFF":g.fill,c?ne({x:m,y:v},d,new i.Size(this.legend.shapeWidth/2,this.legend.shapeHeight/2),"",g,this.accessbilityText,this.chart.renderer,this.currentPageNumber?new i.Rect(0,-this.translatePage(null,this.currentPageNumber-1,this.currentPageNumber),0,0):null,this.isBulletChartControl,a):t.appendChild(ne({x:m,y:v},d,new i.Size(this.legend.shapeWidth/2,this.legend.shapeHeight/2),"",g,this.accessbilityText,null,null,this.isBulletChartControl,a)))},e.prototype.renderText=function(e,t,r,o,n){var a=e.legendSettings,s=t.visible?a.textStyle.color||e.themeStyle.legendLabel:"#D3D3D3",l=this.chart.enableCanvas;o.id=this.legendID+this.generateId(t,"_text_",n),o.text=t.text,o.x=a.isInversed?t.location.x-a.shapeWidth/2:t.location.x+a.shapeWidth/2+a.shapePadding,o.y=t.location.y+this.maxItemHeight/4;var h=Ve(e.renderer,o,a.textStyle,s,r,!1,!1,!1,!1,null,this.currentPageNumber&&l?new i.Rect(0,-this.translatePage(null,this.currentPageNumber-1,this.currentPageNumber),0,0):null);if(h&&h.setAttribute("aria-label",a.description||this.accessbilityText),l){var c=i.measureText(o.text,a.textStyle);this.legendRegions[n].rect.y=o.y<this.legendRegions[n].rect.y?o.y:this.legendRegions[n].rect.y,this.legendRegions[n].rect.width+=c.width,this.legendRegions[n].rect.height=c.height,this.legendRegions[n].rect.y-=.5*c.height}},e.prototype.renderPagingElements=function(e,t,r,o){var n=e.renderer.createGroup({id:this.legendID+"_navigation"}),a=e.enableCanvas,s=this.isBulletChartControl?0:this.legendTitleSize.height,l=e.legendSettings,h=new i.PathOption(this.legendID+"_pageup","transparent",5,"#545454",1,"",""),c=this.pageButtonSize,d=l.enablePages||!this.isPaging||this.isVertical||this.isBulletChartControl?this.rowCount-1:1,p=this.isTitle&&"Left"===l.titlePosition?this.legendTitleSize.width:0;this.pagingRegions=[],this.backwardArrowOpacity=1!==this.currentPage?1:0,this.forwardArrowOpacity=this.currentPage===this.totalPages?0:1,a||o.appendChild(n),this.isChartControl||this.isBulletChartControl||!this.isVertical?this.totalPages=Math.ceil(this.totalPages/Math.max(1,this.rowCount-1)):this.totalPages=Math.ceil(this.totalPages/this.maxColumns),n&&n.setAttribute("style","cursor: pointer"),this.clipPathHeight=d*(this.maxItemHeight+l.padding),a?(this.pagingClipRect.height=this.legendBounds.height-this.clipPathHeight-(this.pagingClipRect.y-this.legendBounds.y)-l.border.width,this.pagingClipRect.y=this.pagingClipRect.y+this.clipPathHeight,this.pagingClipRect.x+=l.border.width,this.pagingClipRect.width-=l.border.width+l.border.width/2,this.chart.renderer.clearRect(new i.Rect(this.pagingClipRect.x,this.pagingClipRect.y,this.pagingClipRect.width,this.pagingClipRect.height))):this.clipRect.setAttribute("height",this.clipPathHeight.toString());var u,g=t.x+c/2,y=t.y+this.clipPathHeight+(s+t.height-this.clipPathHeight)/2;!this.isPaging||l.enablePages||this.isVertical||this.isBulletChartControl||(g=t.x+this.fivePixel+this.pageButtonSize+p,y=l.title&&this.isTop?t.y+8+s+c/1+.5:t.y+8+c+.5);var m=i.measureText(this.totalPages+"/"+this.totalPages,l.textStyle);a?ne({x:g,y:y},"LeftArrow",new i.Size(c,c),"",h,"LeftArrow",this.chart.renderer,new i.Rect(t.width-(2*(c+8)+8+m.width),0,0,0)):!this.isVertical||l.enablePages||this.isBulletChartControl?(h.opacity=this.isBulletChartControl?h.opacity:l.enablePages?1:this.backwardArrowOpacity,n.appendChild(ne({x:g,y:y},"LeftArrow",new i.Size(c,c),"",h,"LeftArrow"))):(g=t.x+t.width/2,y=t.y+c/2+8+s,h.opacity=this.backwardArrowOpacity,n.appendChild(ne({x:g,y:y},"UpArrow",new i.Size(c,c),"",h,"UpArrow"))),this.pagingRegions.push(new i.Rect(g+t.width-(2*(c+8)+8+m.width)-.5*c,y-.5*c,c,c)),r.x=g+c/2+8,r.y=y+m.height/4,r.id=this.legendID+"_pagenumber",r.text="1/"+this.totalPages,a&&this.totalNoOfPages&&(r.text=this.currentPageNumber+"/"+this.totalNoOfPages),(l.enablePages||this.isBulletChartControl)&&(u=Ve(e.renderer,r,l.textStyle,l.textStyle.color,n,!1,!1,!1,!1,null,new i.Rect(t.width-(2*(c+8)+8+m.width),0,0,0))),g=r.x+8+c/2+m.width,!this.isPaging||l.enablePages||this.isVertical||(g=t.x+t.width-this.fivePixel-this.pageButtonSize-(l.title&&"Right"===l.titlePosition?this.legendTitleSize.width+this.fivePixel:0)),h.id=this.legendID+"_pagedown",h.opacity=l.enablePages?1:this.forwardArrowOpacity,a?ne({x:g,y:y},"RightArrow",new i.Size(c,c),"",h,"RightArrow",this.chart.renderer,new i.Rect(t.width-(2*(c+8)+8+m.width),0,0,0)):!this.isVertical||l.enablePages||this.isBulletChartControl?n.appendChild(ne({x:g,y:y},"RightArrow",new i.Size(c,c),"",h,"RightArrow")):(g=t.x+t.width/2,y=t.y+t.height-c/2-8,n.appendChild(ne({x:g,y:y},"DownArrow",new i.Size(c,c),"",h,"DownArrow"))),this.pagingRegions.push(new i.Rect(g+(t.width-(2*(c+8)+8+m.width)-.5*c),y-.5*c,c,c)),a||!l.enablePages&&!this.isBulletChartControl?(1===this.currentPageNumber&&this.calTotalPage&&(l.enablePages||this.isBulletChartControl)&&(this.totalNoOfPages=this.totalPages,this.calTotalPage=!1),l.enablePages||this.isBulletChartControl||this.translatePage(null,this.currentPage-1,this.currentPage,l)):n.setAttribute("transform","translate("+(t.width-(2*(c+8)+8+m.width))+", 0)"),(l.enablePages||this.isBulletChartControl)&&this.translatePage(u,this.currentPage-1,this.currentPage,l)},e.prototype.translatePage=function(e,t,i,r){var o=this.clipPathHeight*t,n="translate(0,-"+o+")";return this.isChartControl||this.isBulletChartControl||!this.isVertical||(n="translate(-"+(o=(o=this.pageXCollections[t*this.maxColumns]-this.legendBounds.x)<0?0:o)+",0)"),this.chart.enableCanvas||this.legendTranslateGroup.setAttribute("transform",n),this.chart.enableCanvas||!r.enablePages&&!this.isBulletChartControl||(e.textContent=i+"/"+this.totalPages),this.currentPage=i,o},e.prototype.changePage=function(e,t){var i=this.chart.legendSettings,r=document.getElementById(this.legendID+"_pageup"),o=document.getElementById(this.legendID+"_pagedown"),n=i.enablePages||this.isBulletChartControl?document.getElementById(this.legendID+"_pagenumber"):null,a=i.enablePages||this.isBulletChartControl?parseInt(n.textContent.split("/")[0],10):this.currentPage;t&&a>1?this.translatePage(n,a-2,a-1,i):!t&&a<this.totalPages&&this.translatePage(n,a,a+1,i),!this.isPaging||i.enablePages||this.isBulletChartControl||(this.currentPage===this.totalPages?this.hideArrow(o):this.showArrow(o),1===this.currentPage?this.hideArrow(r):this.showArrow(r))},e.prototype.hideArrow=function(e){e.setAttribute("opacity","0")},e.prototype.showArrow=function(e){e.setAttribute("opacity","1")},e.prototype.generateId=function(e,t,i){return this.isChartControl?t+i:t+e.pointIndex},e.prototype.move=function(e){var t=this,i=this.chart.mouseX,r=this.chart.mouseY;if(e.target.textContent.indexOf("...")>-1){var o=e.target.id.split(this.legendID+"_text_");if(2===o.length){var n=parseInt(o[1],10),a=this.chart.element;isNaN(n)||(this.chart.isTouch&&m(this.chart.element.id+"_EJ2_Legend_Tooltip"),this.isChartControl?f(this.chart.series[n].name,i,r,a.offsetWidth,a.id+"_EJ2_Legend_Tooltip",he(this.chart.element.id+"_Secondary_Element")):f(this.chart.visibleSeries[0].points[n].x.toString(),i+10,r+10,a.offsetWidth,a.id+"_EJ2_Legend_Tooltip",he(this.chart.element.id+"_Secondary_Element")))}}else m(this.chart.element.id+"_EJ2_Legend_Tooltip");this.chart.isTouch&&(clearTimeout(this.clearTooltip),this.clearTooltip=+setTimeout(function(){m(t.chart.element.id+"_EJ2_Legend_Tooltip")},1e3))},e}(),mr=function(){function e(e,t,i,r,o,n,a,s,l,h){this.location={x:0,y:0},this.text=e,this.fill=t,this.shape=i,this.url=n,this.visible=r,this.type=o,this.markerVisibility=s,this.markerShape=a,this.pointIndex=l,this.seriesIndex=h}return e}(),vr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fr=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},br=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.clipRect=new i.Rect(0,0,0,0),t}return vr(r,e),r.prototype.setDataSource=function(e,t){e&&(this.xData=e.xData,this.yData=e.yData,this.points=e.points),t[G(this.type)+"IndicatorModule"].initDataSource(this,t),t.visibleSeriesCount+=this.targetSeries.length},fr([t.Property("Sma")],r.prototype,"type",void 0),fr([t.Property(14)],r.prototype,"period",void 0),fr([t.Property(14)],r.prototype,"kPeriod",void 0),fr([t.Property(3)],r.prototype,"dPeriod",void 0),fr([t.Property(80)],r.prototype,"overBought",void 0),fr([t.Property(20)],r.prototype,"overSold",void 0),fr([t.Property(2)],r.prototype,"standardDeviation",void 0),fr([t.Property("Close")],r.prototype,"field",void 0),fr([t.Property(12)],r.prototype,"slowPeriod",void 0),fr([t.Property(26)],r.prototype,"fastPeriod",void 0),fr([t.Property(!0)],r.prototype,"showZones",void 0),fr([t.Complex({color:"#ff9933",width:2},Ht)],r.prototype,"macdLine",void 0),fr([t.Property("Both")],r.prototype,"macdType",void 0),fr([t.Property("#2ecd71")],r.prototype,"macdPositiveColor",void 0),fr([t.Property("#e74c3d")],r.prototype,"macdNegativeColor",void 0),fr([t.Property("rgba(211,211,211,0.25)")],r.prototype,"bandColor",void 0),fr([t.Complex({color:"#ffb735",width:1},Ht)],r.prototype,"upperLine",void 0),fr([t.Complex({color:"#f2ec2f",width:1},Ht)],r.prototype,"lowerLine",void 0),fr([t.Complex({color:"#f2ec2f",width:1},Ht)],r.prototype,"periodLine",void 0),fr([t.Property("")],r.prototype,"seriesName",void 0),r}(or),xr=function(){function e(e){this.control=e}return e.prototype.print=function(e){this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight);var i={cancel:!1,htmlContent:this.getHTMLContent(e),name:"beforePrint"};this.control.trigger("beforePrint",i),i.cancel||t.print(i.htmlContent,this.printWindow)},e.prototype.getHTMLContent=function(e){var i=t.createElement("div");if(e)if(e instanceof Array)for(var r=0;r<e.length;r++){var o=e[r];i.appendChild(he(o).cloneNode(!0))}else e instanceof Element?i.appendChild(e.cloneNode(!0)):i.appendChild(he(e).cloneNode(!0));else i.appendChild(this.control.element.cloneNode(!0));return i},e.prototype.export=function(e,i,r,n,a,s,l,h,c){var d=this,p=this.getControlsValue(n,l);a=a||p.width,s=s||p.height;var u,g=this.control.svgObject,y=this.control.enableCanvas;y||(g=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:a.toString(),height:s.toString()}}));var v=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1);r=t.isNullOrUndefined(r)?o.PdfPageOrientation.Landscape:r;var f='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+p.svg.outerHTML+"</svg>",b=window.URL.createObjectURL(new Blob("SVG"===e?[f]:[(new XMLSerializer).serializeToString(p.svg)],{type:"image/svg+xml"}));if("SVG"===e)if("msie"===t.Browser.info.name){var x=new Blob([(new XMLSerializer).serializeToString(p.svg)],{type:"application/octet-stream"});window.navigator.msSaveOrOpenBlob(x,i+"."+e.toLocaleLowerCase())}else this.triggerDownload(i,e,b,v);else if("msie"===t.Browser.info.name){var w=g;y||(w=this.createCanvas()),u=w.toDataURL(),"PDF"===e?this.exportPdf(w,r,a,s,v,i,h,c):this.doexport(e,u,i)}else{var S=new Image,C=g.getContext("2d");S.onload=function(){C.drawImage(S,0,0),window.URL.revokeObjectURL(b),"PDF"===e?d.exportPdf(g,r,a,s,v,i,h,c):window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(g.toBlob(null),i+"."+e.toLocaleLowerCase()):d.triggerDownload(i,e,g.toDataURL("image/"+e.toLowerCase()),v)},S.src=b}y||m(document.getElementById(this.control.element.id+"_canvas"))},e.prototype.getDataUrl=function(e){var i=this.getControlsValue([e]),r=this.control.svgObject,o=this.control.enableCanvas;o||(r=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:i.width.toString(),height:i.height.toString()}}));var n=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(i.svg)],{type:"image/svg+xml"}));if("msie"===t.Browser.info.name){var a=r;o||(a=this.createCanvas());var s={name:"afterExport",cancel:!1,dataUrl:r.toDataURL("image/png")};return e.trigger("afterExport",s),{element:a,dataUrl:a.toDataURL()}}var l=new Image,h=r.getContext("2d");return l.onload=function(){h.drawImage(l,0,0),window.URL.revokeObjectURL(n);var t={name:"afterExport",cancel:!1,dataUrl:r.toDataURL("image/png")};return e.trigger("afterExport",t),t.dataUrl},l.src=n,{element:r,blobUrl:n}},e.prototype.triggerDownload=function(e,i,r,o){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:r}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))},e.prototype.getControlsValue=function(e,r){var o=0,n=0,a=this.control.enableCanvas,s=new i.SvgRenderer("").createSvg({id:"Svg_Export_Element",width:200,height:200});return e.map(function(e){var i=e.svgObject.cloneNode(!0),l=e.renderer.createGroup({style:t.isNullOrUndefined(r)||r?"transform: translateY("+n+"px)":"transform: translateX("+o+"px)"});a||l.appendChild(i),o=t.isNullOrUndefined(r)||r?Math.max(e.availableSize.width,o):o+e.availableSize.width,n=t.isNullOrUndefined(r)||r?n+e.availableSize.height:Math.max(e.availableSize.height,n),a||s.appendChild(l)}),a||(s.setAttribute("width",o+""),s.setAttribute("height",n+"")),{width:o,height:n,svg:s}},e.prototype.createCanvas=function(){var e=this.control;this.canvasRender(!0,e);var t=e.svgObject;return this.canvasRender(!1,e),t},e.prototype.canvasRender=function(e,t){t.enableCanvas=e,t.preRender(),t.render()},e.prototype.exportPdf=function(e,t,i,r,n,a,s,l){var h=new o.PdfDocument,c=h.pageSettings.margins,d=h.pageSettings.width,p=h.pageSettings.height,u=e.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");h.pageSettings.orientation=t;var g=d<i?i+c.left+c.right:d,y=p<r?r+c.top+c.bottom:p;if(void 0!==s){var m=new o.PdfStandardFont(1,s.fontSize||15),v=new o.PdfPageTemplateElement(g,40);v.graphics.drawString(s.content+"",m,null,new o.PdfSolidBrush(new o.PdfColor(0,0,0)),s.x,s.y,null),h.template.top=v}if(void 0!==l){var m=new o.PdfStandardFont(1,l.fontSize||15),f=new o.PdfPageTemplateElement(g,40);f.graphics.drawString(l.content+"",m,null,new o.PdfSolidBrush(new o.PdfColor(0,0,0)),l.x,l.y,null),h.template.bottom=f}h.pageSettings.size=new o.SizeF(g,y),u=u.slice(u.indexOf(",")+1),h.pages.add().graphics.drawImage(new o.PdfBitmap(u),0,0,i,r),n&&(h.save(a+".pdf"),h.destroy())},e.prototype.doexport=function(e,t,i){var r=[],o=e||"JPG";r=[t],this.exportImage(r,i,o,t)},e.prototype.exportImage=function(e,i,r,o){for(var n=[],a=e instanceof HTMLElement?0:e.length,s=0;s<a;s++){for(var l=(o=(o=e[s]).replace(/^data:[a-z]*;,/,"")).split(","),h=atob(l[1]),c=new ArrayBuffer(h.length),d=new Uint8Array(c),p=0;p<h.length;p++)d[p]=h.charCodeAt(p);n.push(c)}for(var u=0;u<n.length;u++){var g=new Blob([n[u]],{type:"application/octet-stream"});"msie"===t.Browser.info.name&&window.navigator.msSaveOrOpenBlob(g,i+"."+r.toLocaleLowerCase())}},e}(),wr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Sr=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Cr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wr(i,e),Sr([t.Property()],i.prototype,"start",void 0),Sr([t.Property()],i.prototype,"end",void 0),Sr([t.Property([])],i.prototype,"colors",void 0),Sr([t.Property("")],i.prototype,"label",void 0),i}(t.ChildProperty),Pr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wr(i,e),Sr([t.Property(!1)],i.prototype,"enable",void 0),Sr([t.Property("")],i.prototype,"dashArray",void 0),Sr([t.Complex({color:null,width:1},Yt)],i.prototype,"line",void 0),Sr([t.Property("Both")],i.prototype,"lineType",void 0),i}(t.ChildProperty),Lr=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return wr(i,e),Sr([t.Property(!1)],i.prototype,"enableSelectionZooming",void 0),Sr([t.Property(!1)],i.prototype,"enablePinchZooming",void 0),Sr([t.Property(!1)],i.prototype,"enableMouseWheelZooming",void 0),Sr([t.Property(!0)],i.prototype,"enableDeferredZooming",void 0),Sr([t.Property("XY")],i.prototype,"mode",void 0),Sr([t.Property(["Zoom","ZoomIn","ZoomOut","Pan","Reset"])],i.prototype,"toolbarItems",void 0),Sr([t.Property(!1)],i.prototype,"enablePan",void 0),Sr([t.Property(!1)],i.prototype,"enableScrollbar",void 0),i}(t.ChildProperty),Rr=function(r){function o(e,i){var o=r.call(this,e,i)||this;return o.rotatedDataLabelCollections=[],o.animated=!1,o.isPointMouseDown=!1,o.isScrolling=!1,o.checkResize=0,o.visible=0,o.clickCount=0,o.singleClickTimer=0,o.chartAreaType="Cartesian",o.isRtlEnabled=!1,o.chartid=57723,t.setValue("mergePersistData",o.mergePersistChartData,o),o}return wr(o,r),o.prototype.mergePersistChartData=function(){var e=window.localStorage.getItem(this.getModuleName()+this.element.id);if(!t.isNullOrUndefined(e)&&""!==e){var i=JSON.parse(e),r=Object.keys(i);this.isProtectedOnChange=!0;for(var o=0,n=r;o<n.length;o++){var a=n[o];"object"!=typeof this[a]||t.isNullOrUndefined(this[a])?this[a]=i[a]:t.extend(this[a],i[a])}this.isProtectedOnChange=!1}},o.prototype.isIdHasSpecialCharacter=function(e){var t=/^[A-Za-z0-9 ]+$/,i="";if(t.test(e))return e;for(var r=0;r<e.length;r++)t.test(e[r])||-1!==e.indexOf("-")||-1!==e.indexOf("_")||-1!==e.indexOf("\\")?i+=e[r]:i+="\\"+e[r];return i},o.prototype.preRender=function(){this.element.id=this.isIdHasSpecialCharacter(this.element.id);this.isBlazor=window.Blazor,this.allowServerDataBinding=!1,this.unWireEvents(),this.initPrivateVariable(),this.setCulture(),this.wireEvents(),this.stockChart&&(null===this.stockChart.tooltip.header&&(this.tooltip.header="<b>${point.x}</b>"),null===this.stockChart.tooltip.format&&(this.tooltip.format="High : <b>${point.high}</b><br/>Low : <b>${point.low}</b><br/>Open : <b>${point.open}</b><br/>Close : <b>${point.close}</b>",""!==this.stockChart.series[0].volume&&(this.tooltip.format+="<br/>Volume : <b>${point.volume}</b>")),this.animateSeries=!1)},o.prototype.initPrivateVariable=function(){if(this.animateSeries=!0,this.delayRedraw=!1,this.horizontalAxes=[],this.verticalAxes=[],this.refreshAxis(),this.refreshDefinition(this.rows),this.refreshDefinition(this.columns),this.tooltipModule&&(this.tooltipModule.previousPoints=[]),""===this.element.id){var e=document.getElementsByClassName("e-chart").length;this.element.id="chart_"+this.chartid+"_"+e}this.svgId=this.stockChart?this.stockChart.element.id+"_stockChart_chart":this.element.id+(this.enableCanvas?"_canvas":"_svg")},o.prototype.render=function(){var e=this;this.svgRenderer=new i.SvgRenderer(this.element.id);var t={chart:this.isBlazor?{}:this,theme:this.theme,name:"load",cancel:!1};this.stockChart?(this.isRtlEnabled="rtl"===window.getComputedStyle(document.querySelector("body")).direction,this.cartesianChartRendering(t)):this.trigger("load",t,function(){t.cancel||e.cartesianChartRendering(t)})},o.prototype.cartesianChartRendering=function(e){this.theme=this.isBlazor?e.theme:this.theme,this.createChartSvg(),this.setTheme(),this.markerRender=new cr(this),this.calculateAreaType(),this.calculateVisibleSeries(),this.initTechnicalIndicators(),this.initTrendLines(),this.calculateVisibleAxis(),this.processData(),this.renderComplete(),this.allowServerDataBinding=!0},o.prototype.getLocalizedLabel=function(e){return this.localeObject.getConstant(e)},o.prototype.animate=function(e){this.redraw=!0,this.animated=!0,this.duration=e||1e3},o.prototype.refreshBound=function(){if(this.rotatedDataLabelCollections=[],this.legendModule&&this.legendSettings.visible&&this.legendModule.getLegendOptions(this.visibleSeries,this),this.tooltip.enable&&this.tooltipModule&&(this.tooltipModule.previousPoints=[]),this.calculateStackValues(),this.calculateBounds(),this.stockChart&&!this.stockChart.rangeFound&&(this.stockChart.enablePeriodSelector||this.stockChart.enableSelector))return null;this.renderElements(),m("chartmeasuretext"),this.removeSelection()},o.prototype.calculateStackValues=function(){for(var e,t=!1,i=0,r=this.visibleSeries.length;i<r;i++)(e=this.visibleSeries[i]).position=e.rectCount=void 0,-1===e.type.indexOf("Stacking")&&(-1===e.drawType.indexOf("Stacking")||"PolarRadar"!==this.chartAreaType)||t||(e.calculateStackedValue(e.type.indexOf("100")>-1,this),t=!0)},o.prototype.removeSelection=function(){for(var e=0,t=this.visibleSeries;e<t.length;e++){var r=t[e];if(r.visible)for(var o=0,n=r.points;o<n.length;o++)n[o].isSelect=!1}he(this.element.id+"_ej2_drag_multi_group")?(this.selectionMode.indexOf("Drag")>-1&&(this.selectionModule.filterArray=[]),m(this.element.id+"_ej2_drag_multi_group"),this.selectionModule.calculateDragSelectedElements(this,new i.Rect(0,0,0,0),!0)):he(this.element.id+"_ej2_drag_group")&&("Lasso"!==this.selectionMode&&(this.selectionModule.filterArray=[]),m(this.element.id+"_ej2_drag_group"),this.selectionModule.calculateDragSelectedElements(this,new i.Rect(0,0,0,0),!0))},o.prototype.renderElements=function(){this.renderBorder(),this.renderTitle(),this.renderAreaBorder(),this.renderSeriesElements(this.renderAxes()),this.renderLegend(),this.applyZoomkit(),this.performSelection(),this.setSecondaryElementPosition();for(var e=0,i=this.visibleSeries;e<i.length;e++){var r=i[e];t.updateBlazorTemplate(this.element.id+"_DataLabel","Template",r.marker.dataLabel)}this.renderAnnotation()},o.prototype.renderAxes=function(){this.yAxisElements=this.renderer.createGroup({id:this.element.id+"yAxisCollection"});var e;return this.rows.length>0&&this.columns.length>0&&(e=this.chartAxisLayoutPanel.renderAxes()),this.stripLineModule&&this.stripLineModule.renderStripLine(this,"Behind",this.axisCollections),e},o.prototype.renderLegend=function(){if(this.legendModule&&this.legendModule.legendCollections.length&&this.legendSettings.visible){this.legendModule.calTotalPage=!0;var e=this.legendSettings.border.width,t=this.legendModule.legendBounds,r=new i.Rect(t.x,t.y,t.width,t.height);this.enableCanvas&&(r=new i.Rect(r.x-e/2,r.y-e/2,r.width+e,r.height+e),this.renderer.canvasClip(r)),this.legendModule.renderLegend(this,this.legendSettings,t),this.enableCanvas&&this.renderer.canvasRestore()}this.redraw||(this.stockChart?he(this.stockChart.chartObject.id)||this.stockChart.mainObject.appendChild(this.svgObject):this.element.appendChild(this.svgObject))},o.prototype.setSecondaryElementPosition=function(){var e=he(this.element.id+"_Secondary_Element");if(e){var t=this.element.getBoundingClientRect(),i=he(this.svgId).getBoundingClientRect();e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px"}},o.prototype.initializeModuleElements=function(){this.dataLabelCollections=[];var e=this.element.id;this.series.length&&(this.seriesElements="Scatter"===this.series[0].type||"Bubble"===this.series[0].type?this.svgRenderer.createGroup({id:e+"SeriesCollection"}):this.renderer.createGroup({id:e+"SeriesCollection"})),this.indicators.length&&(this.indicatorElements=this.renderer.createGroup({id:e+"IndicatorCollection"})),this.hasTrendlines()&&(this.trendLineElements=this.renderer.createGroup({id:e+"TrendLineCollection"})),this.dataLabelElements=this.renderer.createGroup({id:e+"DataLabelCollection"})},o.prototype.hasTrendlines=function(){for(var e,t=0,i=this.series;t<i.length&&!(e=!!i[t].trendlines.length);t++);return e},o.prototype.renderSeriesElements=function(e){this.initializeModuleElements();var t=this.element.id;if("g"!==this.element.tagName){var i=Ne(this.redraw,t+"_Secondary_Element")||this.createElement("div");i.id=t+"_Secondary_Element",i.setAttribute("style","position: relative"),be(!1,this.element,i,this.redraw)}if(this.enableCanvas){var r=document.getElementById(t+"_Secondary_Element");r=r||this.createElement("div",{id:t+"_Secondary_Element",attrs:{style:"position: relative; left:0px; top:0px"}});var o=this.svgRenderer.createSvg({id:t+"_tooltip_svg",width:this.availableSize.width,height:this.availableSize.height});o.setAttribute("style","position: absolute; pointer-events: none"),r.appendChild(o)}this.tooltip.enable&&be(this.enableCanvas,this.svgObject,this.renderer.createGroup({id:t+"_UserInteraction",style:"pointer-events:none;"}),this.redraw),this.rows.length>0&&this.columns.length>0&&(this.initializeIndicator(),this.initializeTrendLine(),this.renderSeries(),this.trendLineElements&&be(this.enableCanvas,this.svgObject,this.trendLineElements,this.redraw),this.appendElementsAfterSeries(e))},o.prototype.renderSeries=function(){for(var e=0,t=this.visibleSeries;e<t.length;e++){var i=t[e];("TrendLine"===i.category?this.series[i.sourceIndex].trendlines[i.index].visible:i.visible)&&(this.visible++,Y(i),this.enableCanvas&&(this.renderCanvasSeries(i),this.renderer.canvasClip(this.chartAxisLayoutPanel.seriesClipRect)),i.renderSeries(this),this.enableCanvas&&this.renderer.canvasRestore())}this.visible=0;var r={id:this.element.id+"_ChartAreaClipRect_",x:this.chartAxisLayoutPanel.seriesClipRect.x,y:this.chartAxisLayoutPanel.seriesClipRect.y,width:this.chartAxisLayoutPanel.seriesClipRect.width,height:this.chartAxisLayoutPanel.seriesClipRect.height,fill:"transparent","stroke-width":1,stroke:"Gray"};if(this.seriesElements){this.enableCanvas||this.seriesElements.appendChild(K(this.redraw,r,this.renderer));var o=document.getElementById(this.element.id+"_series_svg");o?be(!1,o,this.seriesElements,this.redraw):be(this.enableCanvas,this.svgObject,this.seriesElements,this.redraw)}},o.prototype.renderCanvasSeries=function(e){var t,i;if("Bubble"===e.type||"Scatter"===e.type){t=t||this.svgRenderer.createSvg({id:this.element.id+"_series_svg",width:this.availableSize.width,height:this.availableSize.height}),(i=i||this.createElement("div",{id:this.element.id+"_series"})).setAttribute("style","position: absolute");var r=document.getElementById(this.element.id+"_Secondary_Element");i.appendChild(t),r.appendChild(i)}t=!this.enableCanvas||"Bubble"!==e.type&&"Scatter"!==e.type?this.svgObject:t;(!this.enableCanvas||"Bubble"!==e.type&&"Scatter"!==e.type)&&this.enableCanvas},o.prototype.initializeIndicator=function(){for(var e=0,t=this.indicators;e<t.length;e++){var i=t[e];this[G(i.type)+"IndicatorModule"]&&this[G(i.type)+"IndicatorModule"].createIndicatorElements(this,i,i.index)}this.indicatorElements&&be(this.enableCanvas,this.svgObject,this.indicatorElements,this.redraw)},o.prototype.initializeTrendLine=function(){for(var e=0,t=this.visibleSeries;e<t.length;e++){var i=t[e];i.trendlines.length&&this.trendLineModule.getTrendLineElements(i,this)}},o.prototype.appendElementsAfterSeries=function(e){"PolarRadar"===this.chartAreaType&&be(this.enableCanvas,this.svgObject,this.yAxisElements,this.redraw),be(this.enableCanvas,this.svgObject,e,this.redraw),(this.zoomModule&&this.zoomSettings.enableScrollbar&&this.scrollElement.childElementCount||this.scrollElement&&this.scrollElement.childElementCount)&&be(!1,he(this.element.id+"_Secondary_Element"),this.scrollElement,this.redraw),this.stripLineModule&&this.stripLineModule.renderStripLine(this,"Over",this.axisCollections),this.tooltip.enable||be(this.enableCanvas,this.svgObject,this.renderer.createGroup({id:this.element.id+"_UserInteraction",style:"pointer-events:none;"}),this.redraw),this.stockChart&&this.stockChart.calculateStockEvents()},o.prototype.applyZoomkit=function(){"PolarRadar"!==this.chartAreaType&&(this.redraw||!this.zoomModule||this.zoomSettings.enablePan&&!this.zoomModule.performedUI||this.zoomModule.applyZoomToolkit(this,this.axisCollections))},o.prototype.renderAnnotation=function(){this.annotationModule&&this.annotationModule.renderAnnotations(he((this.stockChart?this.stockChart.element.id:this.element.id)+"_Secondary_Element"))},o.prototype.performSelection=function(){var e=[];this.selectionModule&&(e=t.extend([],this.selectionModule.selectedDataIndexes,null,!0),this.selectionModule.invokeSelection(this)),this.highlightModule&&this.highlightModule.invokeHighlight(this),e.length>0&&(this.selectionModule.selectedDataIndexes=e,this.selectionModule.redrawSelection(this,this.selectionMode))},o.prototype.processData=function(e){void 0===e&&(e=!0),this.visibleSeriesCount=0;for(var t=!0,i=0,r=this.visibleSeries;i<r.length;i++){var o=r[i];o.visible||this.legendSettings.visible?"Indicator"!==o.category&&"TrendLine"!==o.category&&this.initializeDataModule(o):this.visibleSeriesCount++}for(var n=0,a=this.indicators;n<a.length;n++){var s=a[n];if(s.dataSource){var l=s;this.initializeDataModule(l),t=!1}}e&&(!this.visibleSeries.length||this.visibleSeriesCount===this.visibleSeries.length&&t)&&(this.refreshBound(),this.trigger("loaded",{chart:this.isBlazor?{}:this}))},o.prototype.initializeDataModule=function(e){e.xData=[],e.yData=[];var t;t=this.isAngular?Object.keys(e.dataSource).length?e.dataSource:this.dataSource:e.dataSource||this.dataSource,e.dataModule=new ar(t,e.query),e.points=[],e.refreshDataManager(this)},o.prototype.calculateBounds=function(){var e=this.margin,t=0,r=0,o=0,n=e.left,a=this.availableSize.width-n-e.right-this.border.width;if(this.titleCollection=[],this.subTitleCollection=[],this.title&&(this.titleCollection=Xe(this.title,this.titleStyle,a),t=i.measureText(this.title,this.titleStyle).height*this.titleCollection.length+15,this.subTitle)){for(var s=0,l=0,h=this.titleCollection;l<h.length;l++){var c=h[l];s=(o=i.measureText(c,this.titleStyle).width)>s?o:s}this.subTitleCollection=Xe(this.subTitle,this.subTitleStyle,s),r=i.measureText(this.subTitle,this.subTitleStyle).height*this.subTitleCollection.length+15}var d=e.top+r+t+.5*this.chartArea.border.width,p=this.availableSize.height-d-this.border.width-e.bottom;this.initialClipRect=new i.Rect(n,d,a,p),this.legendModule&&this.legendSettings.visible&&this.legendModule.calculateLegendBounds(this.initialClipRect,this.availableSize,null),this.chartAxisLayoutPanel.measureAxis(this.initialClipRect)},o.prototype.print=function(e){new xr(this).print(e)},o.prototype.initTrendLines=function(){this.isProtectedOnChange=!0;for(var e=0,t=this.visibleSeries;e<t.length;e++)for(var i=t[e],r=0,o=0,n=i.trendlines;o<n.length;o++){var a=n[o];this.trendLineModule&&(a.index=r,a.sourceIndex=i.index,this.trendLineModule.initSeriesCollection(a,this),a.targetSeries&&(a.targetSeries.xAxisName=i.xAxisName,a.targetSeries.yAxisName=i.yAxisName,this.visibleSeries.push(a.targetSeries))),r++}this.isProtectedOnChange=!1},o.prototype.calculateAreaType=function(){var e=this.series[0];this.chartArea.border.width=this.stockChart?0:this.chartArea.border.width,e&&(this.requireInvertedAxis=-1!==e.type.indexOf("Bar")&&!this.isTransposed||-1===e.type.indexOf("Bar")&&this.isTransposed&&"PolarRadar"!==this.chartAreaType),this.chartAxisLayoutPanel="PolarRadar"===this.chartAreaType?this.polarSeriesModule||this.radarSeriesModule:new Ui(this)},o.prototype.calculateVisibleAxis=function(){var e,t=[this.primaryXAxis,this.primaryYAxis];t="Cartesian"===this.chartAreaType?t.concat(this.axes):t,this.paretoSeriesModule&&"Pareto"===this.series[0].type&&(t=t.concat(this.paretoSeriesModule.paretoAxes)),this.axisCollections=[],this.zoomModule&&(this.zoomModule.isPanning=this.zoomModule.isAxisZoomed(t)&&this.zoomSettings.enablePan,this.svgObject.setAttribute("cursor",this.zoomModule.isPanning?"pointer":"auto"),this.scrollBarModule&&(this.scrollBarModule.axes=t)),this.scrollSettingEnabled&&this.scrollBarModule&&(this.scrollBarModule.axes=t);for(var i=0,r=t.length;i<r;i++){(e=t[i]).series=[],e.labels=[];for(var o=0,n=this.visibleSeries;o<n.length;o++){var a=n[o];this.initAxis(a,e,!0)}for(var s=0,l=this.indicators;s<l.length;s++){var h=l[s];this.initAxis(h,e,!1)}this.scrollBarModule&&!e.zoomingScrollBar&&this.scrollBarModule.injectTo(e,this),null!=e.orientation&&this.axisCollections.push(e)}this.rows.length>0&&this.columns.length>0&&this.chartAxisLayoutPanel.measure()},o.prototype.initAxis=function(e,t,i){e.xAxisName===t.name||null==e.xAxisName&&"primaryXAxis"===t.name?(t.orientation=this.requireInvertedAxis?"Vertical":"Horizontal",e.xAxis=t,i&&t.series.push(e)):(e.yAxisName===t.name||null==e.yAxisName&&"primaryYAxis"===t.name)&&(t.orientation=this.requireInvertedAxis?"Horizontal":"Vertical",e.yAxis=t,i&&t.series.push(e))},o.prototype.initTechnicalIndicators=function(){for(var e=0,t=0,i=this.indicators;t<i.length;t++){var r=i[t],o=r,n=G(o.type);if(this[n+"IndicatorModule"]){o.index=e,this[n+"IndicatorModule"].initSeriesCollection(o,this);for(var a=0,s=o.targetSeries;a<s.length;a++){var l=s[a];(r.seriesName||r.dataSource)&&this.visibleSeries.push(l)}}e++}},o.prototype.refreshTechnicalIndicator=function(e){if(this.indicators.length){if(e instanceof nr&&"Indicator"!==e.category)for(var t=0,i=this.indicators;t<i.length;t++){var r=i[t];r.seriesName!==e.name||r.dataSource||r.setDataSource(e,this)}else e instanceof br&&e.setDataSource(e instanceof nr?e:null,this)}},o.prototype.calculateVisibleSeries=function(){var e;this.visibleSeries=[];for(var t=this.palettes.length?this.palettes:h(this.theme),i=t.length,r=this.series.sort(function(e,t){return e.zOrder-t.zOrder}),o=0,n=r.length;o<n;o++){switch(e=r[o],e.category="Pareto"===r[0].type?"Pareto":"Series",e.index=o,e.interior=e.fill||t[o%i],e.type){case"Bar":case"StackingBar":case"StackingBar100":if(-1===r[0].type.indexOf("Bar"))continue;break;case"Polar":case"Radar":if("PolarRadar"!==this.chartAreaType)continue;if("PolarRadar"===this.chartAreaType&&(null===e.xAxisName&&null!==e.yAxisName||null!==e.xAxisName&&null===e.yAxisName||null!==e.xAxisName&&null!==e.yAxisName))continue;break;case"Pareto":this.visibleSeries.push(e),this.paretoSeriesModule.initSeries(e,this);continue;default:if("PolarRadar"===this.chartAreaType||r[0].type.indexOf("Bar")>-1)continue}this.visibleSeries.push(e),r[o]=e}},o.prototype.renderTitle=function(){var e,t=this.margin;if(this.title){var r=this.titleStyle.textAlignment,o="Near"===r?"start":"Far"===r?"end":"middle",n=i.measureText(this.title,this.titleStyle);e=new i.Rect(t.left,0,this.availableSize.width-t.left-t.right,0);var a=new i.TextOption(this.element.id+"_ChartTitle",Ye(e,this.titleStyle),this.margin.top+3*n.height/4,o,this.titleCollection,"","auto"),s=Ne(this.redraw,this.element.id+"_ChartTitle",a,this.renderer)||Ve(this.renderer,a,this.titleStyle,this.titleStyle.color||this.themeStyle.chartTitle,this.svgObject,null,null,null,null,null,null,null,null,this.enableCanvas);s&&(s.setAttribute("aria-label",this.description||this.title),s.setAttribute("tabindex",this.tabIndex.toString())),this.subTitle&&this.renderSubTitle(a)}},o.prototype.renderSubTitle=function(e){for(var t=0,r=0,o=this.titleStyle.textAlignment,n=0,a=this.titleCollection;n<a.length;n++){var s=a[n];t=(r=i.measureText(s,this.titleStyle).width)>t?r:t}var l=i.measureText(this.subTitle,this.subTitleStyle),h=new i.Rect("Center"===o?e.x-.5*t:"Far"===o?e.x-t:e.x,0,t,0),c=new i.TextOption(this.element.id+"_ChartSubTitle",Ye(h,this.subTitleStyle),e.y*e.text.length+3*l.height/4+10,function(e){return"Near"===e?"start":"Far"===e?"end":"middle"}(this.subTitleStyle.textAlignment),this.subTitleCollection,"","auto"),d=Ne(this.redraw,this.element.id+"_ChartSubTitle",c,this.renderer)||Ve(this.renderer,c,this.subTitleStyle,this.subTitleStyle.color||this.themeStyle.chartTitle,this.svgObject,null,null,null,null,null,null,null,null,this.enableCanvas);d&&(d.setAttribute("aria-label",this.description||this.subTitle),d.setAttribute("tabindex",this.tabIndex.toString()))},o.prototype.renderBorder=function(){var e=this.border.width,t=this.backgroundImage,r=t?"transparent":this.background||this.themeStyle.background,o=new Di(this.element.id+"_ChartBorder",r,this.border,1,new i.Rect(.5*e,.5*e,this.availableSize.width-e,this.availableSize.height-e));if(this.htmlObject=Ne(this.redraw,this.element.id+"_ChartBorder",o,this.renderer)||this.renderer.drawRectangle(o),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw),t){var n=new Bi(this.availableSize.height-e,this.availableSize.width-e,t,0,0,this.element.id+"_ChartBackground","visible","none");this.htmlObject=Ne(this.redraw,this.element.id+"_ChartBackground",n,this.renderer)||this.renderer.drawImage(n),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw)}},o.prototype.renderAreaBorder=function(){if("PolarRadar"===this.chartAreaType)return null;var e=he(this.element.id+"_ChartAreaBorder"),t=e?new i.Rect(+e.getAttribute("x"),+e.getAttribute("y"),+e.getAttribute("width"),+e.getAttribute("height")):null,r=new Di(this.element.id+"_ChartAreaBorder",this.chartArea.background,{width:this.chartArea.border.width,color:this.chartArea.border.color||this.themeStyle.areaBorder},this.chartArea.opacity,this.chartAxisLayoutPanel.seriesClipRect);this.htmlObject=this.renderer.drawRectangle(r),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw,!0,"x","y",null,null,!0,!0,t),this.htmlObject=null;var o=this.chartArea.backgroundImage;if(o){var n=this.chartArea.border.width,a=new Bi(this.initialClipRect.height-n,this.initialClipRect.width-n,o,this.initialClipRect.x,this.initialClipRect.y,this.element.id+"_ChartAreaBackground","visible","none");this.htmlObject=this.renderer.drawImage(a),be(this.enableCanvas,this.svgObject,this.htmlObject,this.redraw,!0,"x","y",null,null,!0,!0)}},o.prototype.addSeries=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];r=new nr(this,"series",r),this.series.push(r)}this.refresh()},o.prototype.removeSeries=function(e){this.redraw=!1,this.series.splice(e,1),this.refresh()},o.prototype.clearSeries=function(){this.series=[],this.refresh()},o.prototype.addAxes=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];r=new Ti(this,"axes",r),this.isBlazor&&(r.interval=isNaN(r.interval)?null:r.interval,r.desiredIntervals=isNaN(r.desiredIntervals)?null:r.desiredIntervals),this.axes.push(r)}this.refresh()},o.prototype.removeAxis=function(e){this.redraw=!1,this.axes.splice(e,1),this.refresh()},o.prototype.destroy=function(){this.scrollBarModule&&this.scrollBarModule.destroy(),this.markerRender&&(this.markerRender.removeEventListener(),this.markerRender=null),this.horizontalAxes=[],this.verticalAxes=[],this.visibleSeries=[],this.axisCollections=[],this.rotatedDataLabelCollections=[],this.seriesElements=null,this.chartAxisLayoutPanel=null,this.dataLabelCollections=null,this.dataLabelElements=null,this.yAxisElements=null,this.element&&(this.unWireEvents(),this.isReact&&this.clearTemplate(),r.prototype.destroy.call(this),this.enableCanvas||(this.removeSvg(),this.svgObject=null))},o.prototype.getModuleName=function(){return"chart"},o.prototype.getPersistData=function(){var e=["loaded","animationComplete","primaryXAxis","primaryYAxis"];return this.addOnPersist(e)},o.prototype.createChartSvg=function(){this.removeSvg(),He(this)},o.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,i=t.Browser.touchMoveEvent,r=t.Browser.touchEndEvent,o=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,e,this.chartOnMouseDown),t.EventHandler.remove(this.element,i,this.mouseMove),t.EventHandler.remove(this.element,r,this.mouseEnd),t.EventHandler.remove(this.element,"click",this.chartOnMouseClick),t.EventHandler.remove(this.element,"contextmenu",this.chartRightClick),t.EventHandler.remove(this.element,o,this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBound),this.touchObject&&(this.touchObject.destroy(),this.touchObject=null)},o.prototype.wireEvents=function(){if(this.element){var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.chartOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"click",this.chartOnMouseClick,this),t.EventHandler.add(this.element,"contextmenu",this.chartRightClick,this),t.EventHandler.add(this.element,e,this.mouseLeave,this),this.resizeBound=this.chartResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBound),this.longPressBound=this.longPress.bind(this),this.touchObject=new t.Touch(this.element,{tapHold:this.longPressBound,tapHoldThreshold:500}),this.setStyle(this.element)}},o.prototype.chartRightClick=function(e){return!this.crosshair.enable||!this.crosshairModule||2!==e.buttons&&0!==e.which&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},o.prototype.setStyle=function(e){var t=this.zoomSettings,i=t.enableSelectionZooming||t.enablePinchZooming||"None"!==this.selectionMode||this.crosshair.enable||"None"!==this.highlightMode;e.style.touchAction=i?"none":"element",e.style.msTouchAction=i?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative",e.style.display="block",e.style.overflow="hidden"},o.prototype.isOrientation=function(){return"orientation"in window&&"onorientationchange"in window},o.prototype.longPress=function(e){return this.mouseX=e&&e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].clientX:0,this.mouseY=e&&e.originalEvent.changedTouches?e.originalEvent.changedTouches[0].clientY:0,this.startMove=!0,this.setMouseXY(this.mouseX,this.mouseY),this.notify("tapHold",e),!1},o.prototype.setMouseXY=function(e,t){if(he(this.svgId)){var i=he(this.svgId).getBoundingClientRect(),r=this.element.getBoundingClientRect();this.mouseY=t-r.top-Math.max(i.top-r.top,0),this.mouseX=e-r.left-Math.max(i.left-r.left,0)}},o.prototype.export=function(e,t){this.exportModule&&(this.exportModule.export(e,t),this.afterExport&&this.exportModule.getDataUrl(this))},o.prototype.chartResize=function(){var e=this;this.animateSeries=!1;var t={chart:this.isBlazor?{}:this,name:"resized",currentSize:new i.Size(0,0),previousSize:new i.Size(this.availableSize.width,this.availableSize.height)},r={name:"beforeResize",cancelResizedEvent:!1};return this.resizeTo&&clearTimeout(this.resizeTo),this.trigger("beforeResize",r),r.cancelResizedEvent||(this.resizeTo=+setTimeout(function(){if(e.isDestroyed||e.stockChart)return void clearTimeout(e.resizeTo);e.createChartSvg(),t.currentSize=e.availableSize,e.trigger("resized",t),e.refreshAxis(),e.refreshBound(),e.trigger("loaded",{chart:e.isBlazor?{}:e})},500)),!1},o.prototype.mouseMove=function(e){var t,i,r;return"touchmove"===e.type?(this.isTouch=!0,t=(r=e).changedTouches[0].clientX,i=r.changedTouches[0].clientY):(this.isTouch="touch"===e.pointerType||"2"===e.pointerType||this.isTouch,t=e.clientX,i=e.clientY),he(this.svgId)&&(this.setMouseXY(t,i),this.chartOnMouseMove(e)),!1},o.prototype.mouseLeave=function(e){var t,i,r;return"touchleave"===e.type?(this.isTouch=!0,t=(r=e).changedTouches[0].clientX,i=r.changedTouches[0].clientY):(this.isTouch="touch"===e.pointerType||"2"===e.pointerType,t=e.clientX,i=e.clientY),this.setMouseXY(t,i),this.chartOnMouseLeave(e),!1},o.prototype.chartOnMouseLeave=function(e){var i=e.target,r=t.Browser.isPointer?"pointerleave":"mouseleave";return this.trigger("chartMouseLeave",{target:i.id,x:this.mouseX,y:this.mouseY}),m(this.element.id+"_EJ2_AxisLabel_Tooltip"),this.isChartDrag=this.isPointMouseDown=!1,this.notify(r,e),!1},o.prototype.chartOnMouseClick=function(e){var t=this,i=e.target;this.trigger("chartMouseClick",{target:i.id,x:this.mouseX,y:this.mouseY}),this.clickCount++;var r=0;if(this.isAngular){r=this.pointDoubleClick.observers.length>0?400:0}else r=this.pointDoubleClick?400:0;return 1===this.clickCount&&this.pointClick?this.singleClickTimer=+setTimeout(function(){t.clickCount=0,t.triggerPointEvent("pointClick",e)},r):2===this.clickCount&&this.pointDoubleClick&&(clearTimeout(this.singleClickTimer),this.clickCount=0,this.triggerPointEvent("pointDoubleClick",e)),this.axisLabelClick&&this.triggerAxisLabelClickEvent("axisLabelClick",e),this.notify("click",e),!1},o.prototype.triggerPointEvent=function(e,t){var i=t,r=new Zi(this).getData();r.series&&r.point&&this.trigger(e,{series:this.isBlazor?{}:r.series,point:r.point,seriesIndex:r.series.index,pointIndex:r.point.index,x:this.mouseX,y:this.mouseY,pageX:i.pageX,pageY:i.pageY})},o.prototype.triggerAxisLabelClickEvent=function(e,t){var i=t.target,r=t;if(-1!==i.id.indexOf("_AxisLabel_")){var o=i.id.split("_AxisLabel_"),n=+o[0].slice(-1),a=+o[1],s=this.axisCollections[n];!s.visible||0!==n&&1!==n||this.trigger(e,{chart:this,axis:s,text:s.visibleLabels[a].text,labelID:i.id,index:a,location:new Vi(r.pageX,r.pageY),value:s.visibleLabels[a].value})}},o.prototype.chartOnMouseMove=function(e){var i=e.target;return this.trigger("chartMouseMove",{target:i.id,x:this.mouseX,y:this.mouseY}),this.pointMove&&this.triggerPointEvent("pointMove",e),this.isTouch||(this.titleTooltip(e,this.mouseX,this.mouseY),this.axisTooltip(e,this.mouseX,this.mouseY)),this.dataEditingModule&&this.dataEditingModule.pointMouseMove(e),this.notify(t.Browser.touchMoveEvent,e),this.isTouch=!1,!1},o.prototype.titleTooltip=function(e,t,i,r){var o=e.target.id,n=o===this.element.id+"_ChartTitle"||o===this.element.id+"_ChartSubTitle"||o.indexOf("_AxisTitle")>-1||o.indexOf("_legend_title")>-1,a=0;o.indexOf("_AxisTitle")>-1&&(a=parseInt(o.replace(this.element.id,"").replace("AxisLabel_","").split("_")[2],10)),n&&e.target.textContent.indexOf("...")>-1?f(o===this.element.id+"_ChartTitle"?this.title:o.indexOf("_AxisTitle")>-1?this.axisCollections[a].title:o.indexOf("_ChartSubTitle")>-1?this.subTitle:this.legendSettings.title,t,i,this.element.offsetWidth,this.element.id+"_EJ2_Title_Tooltip",he(this.element.id+"_Secondary_Element"),r):m(this.element.id+"_EJ2_Title_Tooltip")},o.prototype.axisTooltip=function(e,t,i,r){var o=e.target.id;if((o.indexOf("AxisLabel")>-1||o.indexOf("Axis_MultiLevelLabel")>-1)&&e.target.textContent.indexOf("...")>-1){var n=this.legendSettings.visible||""===this.primaryXAxis.title;f(this.findAxisLabel(o),t,i,this.element.offsetWidth,this.element.id+"_EJ2_AxisLabel_Tooltip",he(this.element.id+"_Secondary_Element"),r,n)}else m(this.element.id+"_EJ2_AxisLabel_Tooltip")},o.prototype.findAxisLabel=function(e){var t;return e.indexOf("AxisLabel")>-1?(t=e.replace(this.element.id,"").replace("AxisLabel_","").split("_"),this.axisCollections[parseInt(t[0],10)].visibleLabels[parseInt(t[1],10)].originalText):(t=e.replace(this.element.id,"").replace("Axis_MultiLevelLabel_Level_","").replace("Text_","").split("_"),this.axisCollections[parseInt(t[0],10)].multiLevelLabels[parseInt(t[1],10)].categories[parseInt(t[2],10)].text)},o.prototype.chartOnMouseDown=function(e){var i,r,o,n,a=t.Browser.isDevice?20:30,s=this.element.getBoundingClientRect(),l=e.target;this.trigger("chartMouseDown",{target:l.id,x:this.mouseX,y:this.mouseY}),"touchstart"===e.type?(this.isTouch=!0,i=(n=e).changedTouches[0].clientX,r=n.changedTouches[0].clientY,o=n.target):(this.isTouch="touch"===e.pointerType,i=e.clientX,r=e.clientY,o=e.target);var h=he(this.svgId).getBoundingClientRect();return this.mouseDownX=this.previousMouseMoveX=i-s.left-Math.max(h.left-s.left,0),this.mouseDownY=this.previousMouseMoveY=r-s.top-Math.max(h.top-s.top,0),this.isTouch&&(this.isDoubleTap=(new Date).getTime()<this.threshold&&-1===o.id.indexOf(this.element.id+"_Zooming_")&&(this.mouseDownX-a>=this.mouseX||this.mouseDownX+a>=this.mouseX)&&(this.mouseDownY-a>=this.mouseY||this.mouseDownY+a>=this.mouseY)&&(this.mouseX-a>=this.mouseDownX||this.mouseX+a>=this.mouseDownX)&&(this.mouseY-a>=this.mouseDownY||this.mouseY+a>=this.mouseDownY)),this.dataEditingModule&&this.dataEditingModule.pointMouseDown(),this.notify(t.Browser.touchStartEvent,e),!1},o.prototype.mouseEnd=function(e){var t,i,r;return"touchend"===e.type?(i=(r=e).changedTouches[0].clientX,this.isTouch=!0,t=r.changedTouches[0].clientY):(t=e.clientY,i=e.clientX,this.isTouch="touch"===e.pointerType||"2"===e.pointerType),this.setMouseXY(i,t),this.chartOnMouseUp(e),!1},o.prototype.chartOnMouseUp=function(e){var i=e.target;return this.trigger("chartMouseUp",{target:i.id,x:this.mouseX,y:this.mouseY}),this.isChartDrag=!1,this.isTouch&&(this.titleTooltip(e,this.mouseX,this.mouseY,this.isTouch),this.axisTooltip(e,this.mouseX,this.mouseY,this.isTouch),this.threshold=(new Date).getTime()+300),this.dataEditingModule&&this.dataEditingModule.pointMouseUp(),!this.enableCanvas&&this.seriesElements&&this.seriesElements.removeAttribute("clip-path"),this.notify(t.Browser.touchEndEvent,e),!1},o.prototype.setCulture=function(){this.intl=new t.Internationalization,this.setLocaleConstants(),this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},o.prototype.setAnnotationValue=function(e,t){var i,r=he(this.element.id+"_Annotation_Collections"),o=this.annotations[e];null!==t&&(o.content=t,r?(m(this.element.id+"_Annotation_"+e),i=this.createElement("div"),this.annotationModule.processAnnotation(o,e,i),r.appendChild(i.children[0])):this.annotationModule.renderAnnotations(he(this.element.id+"_Secondary_Element")))},o.prototype.setLocaleConstants=function(){this.defaultLocalConstants={ZoomIn:"Zoom in",Zoom:"Zoom",ZoomOut:"Zoom out",Pan:"Pan",Reset:"Reset",ResetZoom:"Reset Zoom"}},o.prototype.setTheme=function(){this.themeStyle=c(this.theme)},o.prototype.requiredModules=function(){var e,t=this,i=[],r=this.series,o=!1,n=!1,a=!1,s=!1,l=this.zoomSettings;return this.chartAreaType=r.length>0&&("Polar"===r[0].type||"Radar"===r[0].type)?"PolarRadar":"Cartesian",this.tooltip.enable&&i.push({member:"Tooltip",args:[this]}),r.map(function(o){t.isLegend=t.legendSettings.visible&&(""!==o.name||!!t.isLegend),e=-1!==o.type.indexOf("100")?o.type.replace("100","")+"Series":o.type+"Series",n=o.errorBar.visible||n,s=o.marker.dataLabel.visible||s,a=o.dragSettings.enable||a,i.some(function(t){return t.member===e})||i.push({member:e,args:[t,r]}),"PolarRadar"===t.chartAreaType&&i.push({member:o.drawType+"Series",args:[t,r]}),"Pareto"===o.type&&(i.push({member:"ColumnSeries",args:[t,r]}),i.push({member:"LineSeries",args:[t,r]}))}),this.findIndicatorModules(i),this.findTrendLineModules(i),i=this.findAxisModule(i),o=this.annotations.some(function(e){return null!==e.content}),n&&i.push({member:"ErrorBar",args:[this,r]}),this.isLegend&&i.push({member:"Legend",args:[this]}),(this.enableExport||this.allowExport)&&i.push({member:"Export",args:[this]}),"PolarRadar"!==this.chartAreaType&&!this.scrollSettingEnabled&&(l.enableSelectionZooming||l.enableMouseWheelZooming||l.enablePinchZooming||l.enablePan||l.enableScrollbar)&&(i.push({member:"Zoom",args:[this,this.zoomSettings]}),l.enableScrollbar&&i.push({member:"ScrollBar",args:[this]})),"None"===this.selectionMode||"PolarRadar"===this.chartAreaType&&this.selectionMode.indexOf("Drag")>-1||i.push({member:"Selection",args:[this]}),"None"!==this.highlightMode&&i.push({member:"Highlight",args:[this]}),s&&i.push({member:"DataLabel",args:[this,r]}),a&&i.push({member:"DataEditing",args:[this]}),o&&i.push({member:"Annotation",args:[this]}),"PolarRadar"!==this.chartAreaType&&this.crosshair.enable&&i.push({member:"Crosshair",args:[this]}),i},o.prototype.findAxisModule=function(e){var t=[];t.push(this.primaryXAxis),t.push(this.primaryYAxis);for(var i=!1,r=!1,o=!1,n=!1,a=!1,s=!1,l=0,h=t=t.concat(this.axes);l<h.length;l++){var c=h[l];i="DateTime"===c.valueType||i,r="Category"===c.valueType||r,o="Logarithmic"===c.valueType||o,a="DateTimeCategory"===c.valueType||a,n=this.findStriplineVisibility(c.stripLines)||n,s=c.multiLevelLabels.length>0||s,this.scrollSettingEnabled=!!c.scrollbarSettings.enable||this.scrollSettingEnabled}return i&&e.push({member:"DateTime",args:[this]}),r&&e.push({member:"Category",args:[this]}),o&&e.push({member:"Logarithmic",args:[this]}),n&&e.push({member:"StripLine",args:[this]}),s&&e.push({member:"MultiLevelLabel",args:[this]}),a&&e.push({member:"DateTimeCategory",args:[this]}),this.scrollSettingEnabled&&e.push({member:"ScrollBar",args:[this]}),e},o.prototype.findIndicatorModules=function(e){var t,i,r=this.indicators;if(this.indicators.length){e.push({member:"LineSeries",args:[this]}),r.map(function(e){t=t||"Macd"===e.type,i=i||"BollingerBands"===e.type}),t&&e.push({member:"ColumnSeries",args:[this]}),i&&e.push({member:"RangeAreaSeries",args:[this]});for(var o=0,n=this.indicators;o<n.length;o++){var a=n[o];e.push({member:a.type+"Indicator",args:[this]})}}},o.prototype.findTrendLineModules=function(e){for(var t,i,r=this,o=0,n=this.series;o<n.length;o++)!function(o){var n;o.trendlines.map(function(e){n=n||e.marker.visible,t=!(!t&&"Linear"!==e.type&&"MovingAverage"!==e.type),i=!(!i&&t)}),n&&e.push({member:"Marker",args:[r,o]})}(n[o]);(t||i)&&e.push({member:"TrendLine",args:[this]}),t&&e.push({member:"LineSeries",args:[this]}),i&&e.push({member:"SplineSeries",args:[this]})},o.prototype.findStriplineVisibility=function(e){for(var t=!1,i=0,r=e;i<r.length;i++)if(r[i].visible){t=!0;break}return t},o.prototype.removeSvg=function(){if(this.redraw)return null;if(Ue(this),this.enableCanvas&&this.svgObject&&"CANVAS"===this.svgObject.tagName)return this.renderer.clearRect(new i.Rect(0,0,this.availableSize.width,this.availableSize.height)),this.svgObject.parentNode&&t.remove(this.svgObject),null;m(this.element.id+"_Secondary_Element"),this.isReact&&this.clearTemplate();var e=0;if(this.zoomModule&&this.zoomModule.pinchTarget&&(this.zoomModule.pinchTarget.id="",this.zoomModule.pinchTarget.setAttribute("opacity","0"),this.svgObject.appendChild(this.zoomModule.pinchTarget),e=1),!t.isNullOrUndefined(this.resizeTo)){if(this.resizeTo!==this.checkResize&&this.isBlazor&&this.element.childElementCount)for(var r=document.querySelectorAll(".e-chart"),o=0;o<r.length;o++)for(var n=r[o];n.firstChild;)t.remove(n.firstChild);this.checkResize=this.resizeTo}if(this.svgObject){for(;this.svgObject.childNodes.length>e;)this.svgObject.removeChild(this.svgObject.firstChild);this.svgObject.hasChildNodes()||!this.svgObject.parentNode||this.stockChart||t.remove(this.svgObject)}},o.prototype.refreshDefinition=function(e){for(var t=0,i=e;t<i.length;t++)i[t].axes=[]},o.prototype.refreshAxis=function(){var e=this.primaryXAxis;e.rect=new i.Rect(void 0,void 0,0,0),(e=this.primaryYAxis).isStack100=!1,e.rect=new i.Rect(void 0,void 0,0,0);for(var t=0,r=this.axes;t<r.length;t++)(e=a=r[t]).rect=new i.Rect(void 0,void 0,0,0),e.isStack100=!1;if(this.paretoSeriesModule&&"Pareto"===this.series[0].type)for(var o=0,n=this.paretoSeriesModule.paretoAxes;o<n.length;o++){var a=n[o];(e=a).rect=new i.Rect(void 0,void 0,0,0),e.isStack100=!1}},o.prototype.axisChange=function(e){return!(!e.name&&!e.valueType)&&(this.refreshDefinition(this.columns),this.refreshDefinition(this.rows),this.calculateVisibleAxis(),this.processData(),!0)},o.prototype.getVisibleSeries=function(e,t){for(var i=0,r=e;i<r.length;i++){var o=r[i];if(t===o.index)return o}return null},o.prototype.refreshLiveData=function(){this.calculateVisibleSeries(),this.initTechnicalIndicators(),this.initTrendLines(),this.refreshDefinition(this.columns),this.refreshDefinition(this.rows),this.calculateVisibleAxis(),this.processData(!1),this.isBlazor||(this.enableCanvas?this.createChartSvg():this.removeSvg(),this.refreshAxis(),this.refreshBound(),this.trigger("loaded",{chart:this.isBlazor?{}:this}))},o.prototype.removeStyles=function(){m(this.element.id+"_ej2_chart_selection"),m(this.element.id+"_ej2_chart_highlight")},o.prototype.onPropertyChanged=function(e,i){var r=!1,o=!1;if(this.animateSeries=!1,!this.delayRedraw){for(var n=0,a=Object.keys(e);n<a.length;n++)switch(a[n]){case"primaryXAxis":o=this.axisChange(e.primaryXAxis),e.primaryXAxis.edgeLabelPlacement&&(r=!0),e.primaryXAxis.crosshairTooltip||(o=!0);break;case"primaryYAxis":o=this.axisChange(e.primaryYAxis),e.primaryYAxis.edgeLabelPlacement&&(r=!0),e.primaryYAxis.crosshairTooltip||(o=!0);break;case"axes":for(var s=0,l=Object.keys(e.axes);s<l.length;s++){var h=l[s];o=o||this.axisChange(e.axes[h]),e.axes[h].crosshairTooltip||(o=!0)}break;case"height":case"width":this.createChartSvg(),o=!0;break;case"subTitle":case"title":o=!0;break;case"titleStyle":e.titleStyle&&(e.titleStyle.size||e.titleStyle.textOverflow)?o=!0:r=!0;break;case"subTitleStyle":e.subTitleStyle&&(e.subTitleStyle.size||e.subTitleStyle.textOverflow)?o=!0:r=!0;break;case"border":r=!0;break;case"dataSource":this.processData(!1),o=!0;break;case"enableCanvas":this.refresh();break;case"series":for(var c=this.series.length,d=!1,p=void 0,u=void 0,g=0;g<c;g++)p=e.series[g],this.isBlazor&&p&&(p.visible!==i.series[g].visible||p.isClosed||p.marker||p.emptyPointSettings||p.type||p.boxPlotMode||p.showMean)&&(u=!0),p&&(p.dataSource||p.query||p.errorBar||p.xName||p.yName||p.size||p.high||p.low||p.open||p.close||p.fill||p.name||p.marker||u)&&(t.extend(this.getVisibleSeries(this.visibleSeries,g),p,null,!0),d=!0);d&&(this.calculateVisibleSeries(),this.initTechnicalIndicators(),this.initTrendLines(),this.refreshDefinition(this.columns),this.refreshDefinition(this.rows),this.calculateVisibleAxis(),this.processData(!1),o=!0);break;case"indicators":o=!0;break;case"zoomSettings":(e.zoomSettings.enableScrollbar||i.zoomSettings.enableScrollbar)&&(o=!0),r=!0;break;case"background":r=!0;break;case"chartArea":e.chartArea.border&&e.chartArea.border.width&&(o=!0),r=!0;break;case"legendSettings":e.legendSettings.background&&e.legendSettings.opacity||(o=!0),r=!0;break;case"palettes":this.calculateVisibleSeries(),r=!0;break;case"selectedDataIndexes":case"selectionMode":this.selectionModule&&e.selectionMode&&-1===e.selectionMode.indexOf("Drag")&&(this.selectionModule.currentMode=this.selectionMode,this.selectionModule.styleId=this.element.id+"_ej2_chart_selection",this.selectionModule.redrawSelection(this,i.selectionMode));break;case"isMultiSelect":this.selectionModule&&!e.isMultiSelect&&this.selectionModule.selectedDataIndexes.length>1&&(this.selectionModule.currentMode=this.selectionMode,this.selectionModule.styleId=this.element.id+"_ej2_chart_selection",this.selectionModule.redrawSelection(this,i.selectionMode));break;case"highlightMode":case"selectionPattern":case"highlightPattern":this.removeStyles(),r=!0;break;case"theme":this.animateSeries=!0;break;case"locale":case"currencyCode":this.isBlazor?(this.setCulture(),r=!0):this.refresh();break;case"tooltip":this.tooltipModule&&(this.tooltipModule.previousPoints=[])}!o&&r&&(this.removeSvg(),this.renderElements(),this.trigger("loaded",{chart:this.isBlazor?{}:this})),o&&(this.enableCanvas?this.createChartSvg():this.removeSvg(),this.isReact&&this.clearTemplate(),this.refreshAxis(),this.refreshBound(),this.trigger("loaded",{chart:this.isBlazor?{}:this}),this.redraw=!1,this.animated=!1)}},Sr([t.Property(null)],o.prototype,"width",void 0),Sr([t.Property(null)],o.prototype,"height",void 0),Sr([t.Property("")],o.prototype,"title",void 0),Sr([t.Property("")],o.prototype,"dataSource",void 0),Sr([t.Complex(e.Theme.chartTitleFont,Xt)],o.prototype,"titleStyle",void 0),Sr([t.Property("")],o.prototype,"subTitle",void 0),Sr([t.Complex(e.Theme.chartSubTitleFont,Xt)],o.prototype,"subTitleStyle",void 0),Sr([t.Complex({},Ut)],o.prototype,"margin",void 0),Sr([t.Complex({color:"#DDDDDD",width:0},Yt)],o.prototype,"border",void 0),Sr([t.Property(null)],o.prototype,"background",void 0),Sr([t.Complex({border:{color:null,width:.5},background:"transparent"},Wt)],o.prototype,"chartArea",void 0),Sr([t.Complex({name:"primaryXAxis"},Ti)],o.prototype,"primaryXAxis",void 0),Sr([t.Complex({name:"primaryYAxis"},Ti)],o.prototype,"primaryYAxis",void 0),Sr([t.Collection([{}],wi)],o.prototype,"rows",void 0),Sr([t.Collection([{}],Si)],o.prototype,"columns",void 0),Sr([t.Collection([{}],Ti)],o.prototype,"axes",void 0),Sr([t.Collection([{}],nr)],o.prototype,"series",void 0),Sr([t.Collection([{}],pi)],o.prototype,"annotations",void 0),Sr([t.Property([])],o.prototype,"palettes",void 0),Sr([t.Property("Material")],o.prototype,"theme",void 0),Sr([t.Complex({},ti)],o.prototype,"tooltip",void 0),Sr([t.Complex({},Pr)],o.prototype,"crosshair",void 0),Sr([t.Complex({},gr)],o.prototype,"legendSettings",void 0),Sr([t.Collection([{}],Cr)],o.prototype,"rangeColorSettings",void 0),Sr([t.Complex({},Lr)],o.prototype,"zoomSettings",void 0),Sr([t.Property("None")],o.prototype,"selectionMode",void 0),Sr([t.Property("None")],o.prototype,"highlightMode",void 0),Sr([t.Property("None")],o.prototype,"selectionPattern",void 0),Sr([t.Property("None")],o.prototype,"highlightPattern",void 0),Sr([t.Property(!1)],o.prototype,"isMultiSelect",void 0),Sr([t.Property(!1)],o.prototype,"allowMultiSelection",void 0),Sr([t.Property(!0)],o.prototype,"enableExport",void 0),Sr([t.Property(!1)],o.prototype,"allowExport",void 0),Sr([t.Collection([],Qt)],o.prototype,"selectedDataIndexes",void 0),Sr([t.Property(!1)],o.prototype,"useGroupingSeparator",void 0),Sr([t.Property(!1)],o.prototype,"enableAutoIntervalOnBothAxis",void 0),Sr([t.Property(!1)],o.prototype,"isTransposed",void 0),Sr([t.Property(!1)],o.prototype,"enableCanvas",void 0),Sr([t.Property(null)],o.prototype,"backgroundImage",void 0),Sr([t.Collection([],br)],o.prototype,"indicators",void 0),Sr([t.Property(!0)],o.prototype,"enableAnimation",void 0),Sr([t.Property(null)],o.prototype,"description",void 0),Sr([t.Property(1)],o.prototype,"tabIndex",void 0),Sr([t.Property(!0)],o.prototype,"enableSideBySidePlacement",void 0),Sr([t.Event()],o.prototype,"resized",void 0),Sr([t.Event()],o.prototype,"beforeResize",void 0),Sr([t.Event()],o.prototype,"annotationRender",void 0),Sr([t.Event()],o.prototype,"beforePrint",void 0),Sr([t.Event()],o.prototype,"loaded",void 0),Sr([t.Event()],o.prototype,"beforeExport",void 0),Sr([t.Event()],o.prototype,"afterExport",void 0),Sr([t.Event()],o.prototype,"load",void 0),Sr([t.Event()],o.prototype,"animationComplete",void 0),Sr([t.Event()],o.prototype,"legendRender",void 0),Sr([t.Event()],o.prototype,"textRender",void 0),Sr([t.Event()],o.prototype,"pointRender",void 0),Sr([t.Event()],o.prototype,"seriesRender",void 0),Sr([t.Event()],o.prototype,"axisLabelRender",void 0),Sr([t.Event()],o.prototype,"axisLabelClick",void 0),Sr([t.Event()],o.prototype,"axisRangeCalculated",void 0),Sr([t.Event()],o.prototype,"axisMultiLabelRender",void 0),Sr([t.Event()],o.prototype,"legendClick",void 0),Sr([t.Event()],o.prototype,"multiLevelLabelClick",void 0),Sr([t.Event()],o.prototype,"tooltipRender",void 0),Sr([t.Event()],o.prototype,"sharedTooltipRender",void 0),Sr([t.Event()],o.prototype,"chartMouseMove",void 0),Sr([t.Event()],o.prototype,"chartMouseClick",void 0),Sr([t.Event()],o.prototype,"pointClick",void 0),Sr([t.Event()],o.prototype,"pointDoubleClick",void 0),Sr([t.Event()],o.prototype,"pointMove",void 0),Sr([t.Event()],o.prototype,"chartMouseLeave",void 0),Sr([t.Event()],o.prototype,"chartMouseDown",void 0),Sr([t.Event()],o.prototype,"chartMouseUp",void 0),Sr([t.Event()],o.prototype,"dragComplete",void 0),Sr([t.Event()],o.prototype,"selectionComplete",void 0),Sr([t.Event()],o.prototype,"zoomComplete",void 0),Sr([t.Event()],o.prototype,"onZooming",void 0),Sr([t.Event()],o.prototype,"scrollStart",void 0),Sr([t.Event()],o.prototype,"scrollEnd",void 0),Sr([t.Event()],o.prototype,"scrollChanged",void 0),Sr([t.Event()],o.prototype,"dragStart",void 0),Sr([t.Event()],o.prototype,"drag",void 0),Sr([t.Event()],o.prototype,"dragEnd",void 0),Sr([t.Property("USD")],o.prototype,"currencyCode",void 0),o=Sr([t.NotifyPropertyChanges],o)}(t.Component),Mr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ar=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mr(t,e),t.prototype.calculateDateTimeNiceInterval=function(e,t,i,r,o){void 0===o&&(o=!0);var n,a=new Date(i),s=new Date(r),l=Math.abs((a.getTime()-s.getTime())/864e5);switch(e.actualIntervalType=e.intervalType,e.intervalType){case"Years":n=this.calculateNumericNiceInterval(e,l/365,t);break;case"Quarter":n=this.calculateNumericNiceInterval(e,l/365*4,t);break;case"Months":n=this.calculateNumericNiceInterval(e,l/30,t);break;case"Weeks":n=this.calculateNumericNiceInterval(e,l/7,t);break;case"Days":n=this.calculateNumericNiceInterval(e,l,t);break;case"Hours":n=this.calculateNumericNiceInterval(e,24*l,t);break;case"Minutes":n=this.calculateNumericNiceInterval(e,24*l*60,t);break;case"Seconds":n=this.calculateNumericNiceInterval(e,24*l*60*60,t);break;case"Auto":return(n=this.calculateNumericNiceInterval(e,l/365,t))>=1?(e.actualIntervalType="Years",n):(n=this.calculateNumericNiceInterval(e,l/365*4,t))>=1&&!o?(e.actualIntervalType="Quarter",n):(n=this.calculateNumericNiceInterval(e,l/30,t))>=1?(e.actualIntervalType="Months",n):(n=this.calculateNumericNiceInterval(e,l/7,t))>=1&&!o?(e.actualIntervalType="Weeks",n):(n=this.calculateNumericNiceInterval(e,l,t))>=1?(e.actualIntervalType="Days",n):(n=this.calculateNumericNiceInterval(e,24*l,t))>=1?(e.actualIntervalType="Hours",n):(n=this.calculateNumericNiceInterval(e,24*l*60,t))>=1?(e.actualIntervalType="Minutes",n):(n=this.calculateNumericNiceInterval(e,24*l*60*60,t),e.actualIntervalType="Seconds",n)}return n},t.prototype.getSkeleton=function(e,t,i,r){var o,n=e.actualIntervalType;return e.skeleton?e.skeleton:("Years"===n?o=r?e.isChart?(e.valueType,"y"):"y":e.isChart?"DateTime"===e.valueType&&e.isIntervalInDecimal?"y":"yMMM":"y":"Quarter"===n?o=r?"y":"yMMM":"Months"===n?r?(e.isChart,o="m"):o=e.isChart?"MMMd":"MMM":o="Weeks"===n?r?"m":"MEd":"Days"===n?r?"d":e.isChart?this.getDayFormat(e,t,i):"MMMd":"Hours"===n?r?"t":e.isChart?"DateTime"===e.valueType?"Hm":"EHm":"h":"Minutes"===n?r?"T":e.isChart?"Hms":"hm":r?"T":e.isChart?"Hms":"hms",o)},t.prototype.getMonthFormat=function(e,t,i){return new Date(t).getFullYear()===new Date(i).getFullYear()?e.isIntervalInDecimal?"MMM":"MMM d":"y MMM"},t.prototype.getDayFormat=function(e,t,i){return"DateTime"===e.valueType?new Date(t).getMonth()!==new Date(i).getMonth()?"MMMd":e.isIntervalInDecimal?"d":"Ehm":"yMd"},t.prototype.findCustomFormats=function(e,t,i){var r=e.labelFormat?e.labelFormat:"";return!e.isChart||e.skeleton||"Months"!==e.actualIntervalType||r||(r="DateTime"===e.valueType?this.getMonthFormat(e,t,i):"yMMM"),r},t}(ni),Tr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kr=function(e){function i(t){return e.call(this,t)||this}return Tr(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t,this.chart)},i.prototype.getActualRange=function(e,t){var i={skeleton:"full",type:"dateTime"},o=this.chart.intl.getDateParser(i),n=this.chart.intl.getDateFormat(i);null!==e.minimum?this.min=this.chart.isBlazor?Date.parse(e.minimum.toString()):Date.parse(o(n(new Date(r.DataUtil.parse.parseJson({val:e.minimum}).val)))):null!==this.min&&this.min!==Number.POSITIVE_INFINITY||(this.min=Date.parse(o(n(new Date(1970,1,1))))),null!==e.maximum?this.max=this.chart.isBlazor?Date.parse(e.maximum.toString()):Date.parse(o(n(new Date(r.DataUtil.parse.parseJson({val:e.maximum}).val)))):null!==this.max&&this.max!==Number.NEGATIVE_INFINITY||(this.max=Date.parse(o(n(new Date(1970,5,1))))),this.min===this.max&&(this.max=this.max+2592e6,this.min=this.min-2592e6),e.actualRange={},e.doubleRange=new oi(this.min,this.max);var a=this.calculateDateTimeNiceInterval(e,t,e.doubleRange.start,e.doubleRange.end);e.interval?e.actualRange.interval=e.interval:e.actualRange.interval=a,e.actualRange.min=e.doubleRange.start,e.actualRange.max=e.doubleRange.end},i.prototype.applyRangePadding=function(e,t){this.min=e.actualRange.min,this.max=e.actualRange.max;var i,r,o=e.actualRange.interval;if(!te(e)){var n=e.getRangePadding(this.chart);i=new Date(this.min),r=new Date(this.max);var a=e.actualIntervalType;if("None"===n)this.min=i.getTime(),this.max=r.getTime();else if("Additional"===n||"Round"===n)switch(a){case"Years":this.getYear(i,r,n,o);break;case"Months":this.getMonth(i,r,n,o);break;case"Days":this.getDay(i,r,n,o);break;case"Hours":this.getHour(i,r,n,o);break;case"Minutes":var s=i.getMinutes()/o*o,l=r.getMinutes()+(i.getMinutes()-s);"Round"===n?(this.min=new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),s,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),l,59).getTime()):(this.min=new Date(i.getFullYear(),r.getMonth(),i.getDate(),i.getHours(),s+-o,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),l+o,0).getTime());break;case"Seconds":var h=i.getSeconds()/o*o,c=r.getSeconds()+(i.getSeconds()-h);"Round"===n?(this.min=new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),h,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),c,0).getTime()):(this.min=new Date(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),h+-o,0).getTime(),this.max=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),c+o,0).getTime())}}e.actualRange.min=(e.minimum,this.min),e.actualRange.max=(e.maximum,this.max),e.actualRange.delta=e.actualRange.max-e.actualRange.min,e.doubleRange=new oi(e.actualRange.min,e.actualRange.max),this.calculateVisibleRange(t,e)},i.prototype.getYear=function(e,t,i,r){var o=e.getFullYear(),n=t.getFullYear();"Additional"===i?(this.min=new Date(o-r,1,1,0,0,0).getTime(),this.max=new Date(n+r,1,1,0,0,0).getTime()):(this.min=new Date(o,0,0,0,0,0).getTime(),this.max=new Date(n,11,30,23,59,59).getTime())},i.prototype.getMonth=function(e,t,i,r){var o=e.getMonth(),n=t.getMonth();"Round"===i?(this.min=new Date(e.getFullYear(),o,0,0,0,0).getTime(),this.max=new Date(t.getFullYear(),n,new Date(t.getFullYear(),t.getMonth(),0).getDate(),23,59,59).getTime()):(this.min=new Date(e.getFullYear(),o+-r,1,0,0,0).getTime(),this.max=new Date(t.getFullYear(),n+r,2===n?28:30,0,0,0).getTime())},i.prototype.getDay=function(e,t,i,r){var o=e.getDate(),n=t.getDate();"Round"===i?(this.min=new Date(e.getFullYear(),e.getMonth(),o,0,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),n,23,59,59).getTime()):(this.min=new Date(e.getFullYear(),e.getMonth(),o+-r,0,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),n+r,0,0,0).getTime())},i.prototype.getHour=function(e,t,i,r){var o=e.getHours()/r*r,n=t.getHours()+(e.getHours()-o);"Round"===i?(this.min=new Date(e.getFullYear(),e.getMonth(),e.getDate(),o,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n,59,59).getTime()):(this.min=new Date(e.getFullYear(),e.getMonth(),e.getDate(),o+-r,0,0).getTime(),this.max=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n+r,0,0).getTime())},i.prototype.calculateVisibleRange=function(e,i){i.visibleRange={min:i.actualRange.min,max:i.actualRange.max,interval:i.actualRange.interval,delta:i.actualRange.delta};var r=!t.isNullOrUndefined(i.zoomingScrollBar)&&i.zoomingScrollBar.isLazyLoad;ie(i)&&!r&&(i.calculateVisibleRangeOnZooming(this.chart),i.calculateAxisRange(e,this.chart),i.visibleRange.interval=i.enableAutoIntervalOnZooming?this.calculateDateTimeNiceInterval(i,e,i.visibleRange.min,i.visibleRange.max):i.visibleRange.interval),i.dateTimeInterval=this.increaseDateTimeInterval(i,i.visibleRange.min,i.visibleRange.interval).getTime()-i.visibleRange.min,i.triggerRangeRender(this.chart,i.visibleRange.min,i.visibleRange.max,i.visibleRange.interval)},i.prototype.calculateVisibleLabels=function(e,i){e.visibleLabels=[];var r,o,n=e.visibleRange.min,a=e.visibleLabels;for(te(e)||(n=this.alignRangeStart(e,n,e.visibleRange.interval).getTime());n<=e.visibleRange.max;)r=t.extend({},t.getValue("properties",e.labelStyle),null,!0),o=a.length?e.visibleLabels[a.length-1].value:n,e.format=i.intl.getDateFormat({format:this.findCustomFormats(e,n,o)||this.blazorCustomFormat(e),type:G(e.skeletonType),skeleton:this.getSkeleton(e,n,o,i.isBlazor)}),e.startLabel=e.format(new Date(e.visibleRange.min)),e.endLabel=e.format(new Date(e.visibleRange.max)),x(n,e.visibleRange)&&ee(i,n,e.format(new Date(n)),r,e),n=this.increaseDateTimeInterval(e,n,e.visibleRange.interval).getTime();"Months"!==e.actualIntervalType&&"Days"!==e.actualIntervalType||!e.isChart||(e.format=i.intl.getDateFormat({format:e.labelFormat||("Months"!==e.actualIntervalType||e.skeleton?"":"y MMM"),type:G(e.skeletonType),skeleton:e.skeleton||("Days"===e.actualIntervalType?"MMMd":"")})),e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},i.prototype.blazorCustomFormat=function(e){return this.chart.isBlazor?"Years"===e.actualIntervalType?e.isIntervalInDecimal?"yyyy":"MMM y":"Days"!==e.actualIntervalType||e.isIntervalInDecimal?"":"ddd HH tt":""},i.prototype.increaseDateTimeInterval=function(e,t,i){var r=new Date(t);e.interval?(e.isIntervalInDecimal=i%1==0,e.visibleRange.interval=i):(i=Math.ceil(i),e.visibleRange.interval=i);var o=e.actualIntervalType;if(e.isIntervalInDecimal)switch(o){case"Years":return r.setFullYear(r.getFullYear()+i),r;case"Quarter":return r.setMonth(r.getMonth()+3*i),r;case"Months":return r.setMonth(r.getMonth()+i),r;case"Weeks":return r.setDate(r.getDate()+7*i),r;case"Days":return r.setDate(r.getDate()+i),r;case"Hours":return r.setHours(r.getHours()+i),r;case"Minutes":return r.setMinutes(r.getMinutes()+i),r;case"Seconds":return r.setSeconds(r.getSeconds()+i),r}else r=this.getDecimalInterval(r,i,o);return r},i.prototype.alignRangeStart=function(e,t,i){var r=new Date(t);switch(e.actualIntervalType){case"Years":var o=Math.floor(Math.floor(r.getFullYear()/i)*i);return r=new Date(o,r.getMonth(),r.getDate(),0,0,0);case"Months":var n=Math.floor(Math.floor(r.getMonth()/i)*i);return r=new Date(r.getFullYear(),n,r.getDate(),0,0,0);case"Days":var a=Math.floor(Math.floor(r.getDate()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),a,0,0,0);case"Hours":var s=Math.floor(Math.floor(r.getHours()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),s,0,0);case"Minutes":var l=Math.floor(Math.floor(r.getMinutes()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),l,0,0);case"Seconds":var h=Math.floor(Math.floor(r.getSeconds()/i)*i);return r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),h,0)}return r},i.prototype.getDecimalInterval=function(e,t,i){var r=Math.floor(t),o=t-r;switch(i){case"Years":var n=Math.round(12*o);return e.setFullYear(e.getFullYear()+r),e.setMonth(e.getMonth()+n),e;case"Quarter":return e.setMonth(e.getMonth()+3*t),e;case"Months":var a=Math.round(30*o);return e.setMonth(e.getMonth()+r),e.setDate(e.getDate()+a),e;case"Weeks":return e.setDate(e.getDate()+7*t),e;case"Days":var s=Math.round(24*o);return e.setDate(e.getDate()+r),e.setHours(e.getHours()+s),e;case"Hours":var l=Math.round(60*o);return e.setHours(e.getHours()+r),e.setMinutes(e.getMinutes()+l),e;case"Minutes":var h=Math.round(60*o);return e.setMinutes(e.getMinutes()+r),e.setSeconds(e.getSeconds()+h),e;case"Seconds":var c=Math.round(1e3*o);return e.setSeconds(e.getSeconds()+r),e.setMilliseconds(e.getMilliseconds()+c),e}return e},i.prototype.getModuleName=function(){return"DateTime"},i.prototype.destroy=function(){},i}(Ar),_r=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Or=function(e){function i(t){return e.call(this,t)||this}return _r(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t)},i.prototype.getActualRange=function(e,t){this.initializeDoubleRange(e),e.actualRange={},e.interval?e.actualRange.interval=Math.ceil(e.interval):e.actualRange.interval=Math.max(1,Math.floor(e.doubleRange.delta/re(t,e))),e.actualRange.min=e.doubleRange.start,e.actualRange.max=e.doubleRange.end,e.actualRange.delta=e.doubleRange.delta},i.prototype.applyRangePadding=function(e,t){var i="BetweenTicks"===e.labelPlacement&&"PolarRadar"!==this.chart.chartAreaType?.5:0;i>0?(e.actualRange.min-=i,e.actualRange.max+=i):e.actualRange.max+=e.actualRange.max?0:.5,e.doubleRange=new oi(e.actualRange.min,e.actualRange.max),e.actualRange.delta=e.doubleRange.delta,this.calculateVisibleRange(t,e)},i.prototype.calculateVisibleLabels=function(e){e.visibleLabels=[];var i,r=Math.ceil(e.visibleRange.min);(e.zoomFactor<1||e.zoomPosition>0)&&(r=e.visibleRange.min-e.visibleRange.min%e.visibleRange.interval);var o;for(e.startLabel=e.labels[Math.round(e.visibleRange.min)],e.endLabel=e.labels[Math.floor(e.visibleRange.max)];r<=e.visibleRange.max;r+=e.visibleRange.interval)i=t.extend({},t.getValue("properties",e.labelStyle),null,!0),x(r,e.visibleRange)&&e.labels.length>0&&(o=Math.round(r),ee(this.chart,o,e.labels[o]?e.labels[o].toString():o.toString(),i,e));e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},i.prototype.getModuleName=function(){return"Category"},i.prototype.destroy=function(){},i}(Ar),Er=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zr=function(e){function i(t){return e.call(this,t)||this}return Er(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.calculateRange(t),this.getActualRange(t,e),this.calculateVisibleRange(e,t),this.calculateVisibleLabels(t,this.chart)},i.prototype.getActualRange=function(e,t){this.initializeDoubleRange(e),this.min=this.min<0?0:this.min;var i=v(this.min,e.logBase);i=isFinite(i)?i:this.min;var r=1===this.max?1:v(this.max,e.logBase);r=isFinite(i)?r:this.max,this.min=Math.floor(i/1),e.series&&e.series.some(function(e){return(-1!==e.type.indexOf("Column")||-1!==e.type.indexOf("Bar"))&&-1===e.type.indexOf("Range")})&&(this.min=this.min<=0?+this.min-1:this.min),this.max=Math.ceil(r/1),e.actualRange.interval=e.interval||this.calculateLogNiceInterval(this.max-this.min,t,e),e.actualRange.min=this.min,e.actualRange.max=this.max,e.actualRange.delta=this.max-this.min},i.prototype.calculateVisibleRange=function(e,i){i.visibleRange={interval:i.actualRange.interval,max:i.actualRange.max,min:i.actualRange.min,delta:i.actualRange.delta};var r=!t.isNullOrUndefined(i.zoomingScrollBar)&&i.zoomingScrollBar.isLazyLoad;(i.zoomFactor<1||i.zoomPosition>0)&&!r&&(i.calculateVisibleRangeOnZooming(this.chart),i.visibleRange.interval=i.enableAutoIntervalOnZooming?this.calculateLogNiceInterval(i.doubleRange.delta,e,i):i.visibleRange.interval,i.visibleRange.interval=0===Math.floor(i.visibleRange.interval)?1:Math.floor(i.visibleRange.interval),i.triggerRangeRender(this.chart,i.visibleRange.min,i.visibleRange.max,i.visibleRange.interval))},i.prototype.calculateLogNiceInterval=function(e,t,i){for(var r=re(t,i),o=e,n=Math.pow(i.logBase,Math.floor(v(o,10))),a=0,s=i.intervalDivs.length;a<s;a++){var l=n*i.intervalDivs[a];if(r<e/l)break;o=l}return o},i.prototype.calculateVisibleLabels=function(e,i){var r=e.visibleRange.min;e.visibleLabels=[];var o,n;(e.zoomFactor<1||e.zoomPosition>0)&&(r=e.visibleRange.min-e.visibleRange.min%e.visibleRange.interval);var a=this.getFormat(e),s=null!==a.match("{value}"),l=Math.pow(e.logBase,e.visibleRange.min);for(e.format=i.intl.getNumberFormat({format:s?"":a,useGrouping:i.useGroupingSeparator,maximumFractionDigits:l<1?20:3}),e.startLabel=e.format(l<1?+l.toPrecision(1):l),e.endLabel=e.format(Math.pow(e.logBase,e.visibleRange.max));r<=e.visibleRange.max;r+=e.visibleRange.interval)o=t.extend({},t.getValue("properties",e.labelStyle),null,!0),x(r,e.visibleRange)&&(n=Math.pow(e.logBase,r),ee(this.chart,r,this.formatValue(e,s,a,n<1?+n.toPrecision(1):n),o,e));e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},i.prototype.getModuleName=function(){return"Logarithmic"},i.prototype.destroy=function(){},i}(ni),Ir=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Dr=function(e){function i(t){return e.call(this,t)||this}return Ir(i,e),i.prototype.calculateRangeAndInterval=function(e,t){this.axisSize=e,this.calculateRange(t),this.getActualRange(t,e),this.applyRangePadding(t,e),this.calculateVisibleLabels(t)},i.prototype.calculateVisibleLabels=function(e){e.visibleLabels=[];var i,r="BetweenTicks"===e.labelPlacement?.5:0;"Auto"===e.intervalType?this.calculateDateTimeNiceInterval(e,this.axisSize,parseInt(e.labels[0],10),parseInt(e.labels[e.labels.length-1],10)):e.actualIntervalType=e.intervalType,e.format=this.chart.intl.getDateFormat({format:e.labelFormat||this.blazorCustomFormat(e),type:G(e.skeletonType),skeleton:this.getSkeleton(e,null,null,this.chart.isBlazor)});for(var o=0;o<e.labels.length;o++)i=t.extend({},t.getValue("properties",e.labelStyle),null,!0),this.sameInterval(e.labels.map(Number)[o],e.labels.map(Number)[o-1],e.actualIntervalType,o)&&!e.isIndexed||x(o-r,e.visibleRange)&&ee(this.chart,o,e.isIndexed?this.getIndexedAxisLabel(e.labels[o],e.format):e.format(new Date(e.labels.map(Number)[o])),i,e);e.getMaxLabelWidth&&e.getMaxLabelWidth(this.chart)},i.prototype.blazorCustomFormat=function(e){return this.chart.isBlazor&&"Years"===e.actualIntervalType?"yyyy":""},i.prototype.getIndexedAxisLabel=function(e,t){for(var i=e.split(","),r=0;r<i.length;r++)i[r]=t(new Date(parseInt(i[r],10)));return i.join(", ")},i.prototype.sameInterval=function(e,t,i,r){var o;if(0===r)o=!1;else switch(i){case"Years":o=new Date(e).getFullYear()===new Date(t).getFullYear();break;case"Months":o=new Date(e).getFullYear()===new Date(t).getFullYear()&&new Date(e).getMonth()===new Date(t).getMonth();break;case"Days":o=Math.abs(e-t)<864e5&&new Date(e).getDay()===new Date(t).getDay();break;case"Hours":o=Math.abs(e-t)<36e5&&new Date(e).getDay()===new Date(t).getDay();break;case"Minutes":o=Math.abs(e-t)<6e4&&new Date(e).getMinutes()===new Date(t).getMinutes();break;case"Seconds":o=Math.abs(e-t)<1e3&&new Date(e).getDay()===new Date(t).getDay()}return o},i.prototype.getModuleName=function(){return"DateTimeCategory"},i.prototype.destroy=function(){},i}(Or),Br=function(){function e(){}return e.prototype.measureStripLine=function(e,t,r,o,n,a){var s,l,h=e.orientation,c="DateTime"===e.valueType;if(t.isRepeat&&null!==t.size)s=o,l=null;else if("DateTimeCategory"===e.valueType){var d=t.start,p=t.end;s=null!=d&&"number"!=typeof d?e.labels.indexOf(this.dateToMilliSeconds(d,a).toString()):d,l=null!=p&&"number"!=typeof p?e.labels.indexOf(this.dateToMilliSeconds(p,a).toString()):p}else s=null===t.start?null:c&&this.isCoreDate(t.start)?this.dateToMilliSeconds(t.start,a):+t.start,l=null===t.end?null:c&&this.isCoreDate(t.start)?this.dateToMilliSeconds(t.end,a):+t.end;var u=this.getFromTovalue(s,l,t.size,t.startFromAxis,e,t),g="Vertical"===h?(u.to-u.from)*e.rect.height:r.height,y="Horizontal"===h?(u.to-u.from)*e.rect.width:r.width,m="Vertical"===h?r.x:u.from*e.rect.width+e.rect.x,v="Horizontal"===h?r.y:e.rect.y+e.rect.height-("Pixel"===t.sizeType?u.from:u.to)*e.rect.height;if(t.isSegmented&&null!=t.segmentStart&&null!=t.segmentEnd&&"Pixel"!==t.sizeType){var d=c&&this.isCoreDate(t.segmentStart)?this.dateToMilliSeconds(t.segmentStart,a):+t.segmentStart,p=c&&this.isCoreDate(t.segmentEnd)?this.dateToMilliSeconds(t.segmentEnd,a):+t.segmentEnd,f=this.getFromTovalue(d,p,null,null,n,t);"Vertical"===n.orientation?(v=n.rect.y+n.rect.height-f.to*n.rect.height,g=(f.to-f.from)*n.rect.height):(m=f.from*n.rect.width+n.rect.x,y=(f.to-f.from)*n.rect.width)}return 0!==g&&0!==y||"Pixel"===t.sizeType&&(null!==t.start||t.startFromAxis)?new i.Rect(m,v,y,g):new i.Rect(0,0,0,0)},e.prototype.getFromTovalue=function(e,i,r,o,n,a){var s=!a.isRepeat&&o?n.visibleRange.min:e,l=this.getToValue(Math.max(e,t.isNullOrUndefined(i)?e:i),s,r,n,i,a);return s=this.findValue(s,n),l=this.findValue(l,n),{from:z(n.isInversed?l:s,n),to:z(n.isInversed?s:l,n)}},e.prototype.getToValue=function(e,t,i,r,o,n){var a=n.sizeType,s=null===o;if("DateTime"!==r.valueType)return"Pixel"===n.sizeType?t:s?t+i:e;var l=new Date(t);switch("Auto"===a&&(a=r.actualIntervalType,i*=r.visibleRange.interval),a){case"Years":return s?new Date(l.setFullYear(l.getFullYear()+i)):e;case"Months":return s?new Date(l.setMonth(l.getMonth()+i)):e;case"Days":return s?new Date(l.setDate(l.getDate()+i)):e;case"Hours":return s?new Date(l.setHours(l.getHours()+i)):e;case"Minutes":return s?new Date(l.setMinutes(l.getMinutes()+i)):e;case"Seconds":return s?new Date(l.setSeconds(l.getSeconds()+i)):e;default:return t}},e.prototype.findValue=function(e,t){return e<t.visibleRange.min?e=t.visibleRange.min:e>t.visibleRange.max&&(e=t.visibleRange.max),e},e.prototype.dateParse=function(e,t){var i=t.intl.getDateParser({skeleton:"full",type:"dateTime"}),o=t.intl.getDateFormat({skeleton:"full",type:"dateTime"});return new Date(Date.parse(i(o(new Date(r.DataUtil.parse.parseJson({val:e}).val)))))},e.prototype.renderStripLine=function(e,t,i){var r,o=e.element.id+"_stripline_"+t+"_",n=e.chartAxisLayoutPanel.seriesClipRect,a=0,s=0,l=null,h=new Di(o+"ClipRect","transparent",{width:1,color:"Gray"},1,{x:e.initialClipRect.x,y:e.initialClipRect.y,width:e.initialClipRect.width,height:e.initialClipRect.height}),c=e.renderer.createGroup({id:o+"collections","clip-path":"url(#"+o+"ClipRect)"});e.enableCanvas||c.appendChild(K(e.redraw,h,e.renderer));for(var d=0,p=i;d<p.length;d++)for(var u=p[d],g=0,y=0,m=u.stripLines;y<m.length;y++){var v=m[y];if(v.visible&&v.zIndex===t)if(v.isSegmented&&null!=v.segmentStart&&null!=v.segmentEnd&&"Pixel"!==v.sizeType&&(l=this.getSegmentAxis(i,u,v)),v.isRepeat&&null!=v.repeatEvery&&null!==v.size&&"Pixel"!==v.sizeType)for(a=null!=v.repeatUntil?"DateTime"===u.valueType?this.dateToMilliSeconds(v.repeatUntil,e):+v.repeatUntil:u.actualRange.max,s="DateTime"===u.valueType&&this.isCoreDate(v.start)?this.dateToMilliSeconds(v.start,e):v.start,(v.startFromAxis&&"DateTime"===u.valueType&&"Auto"===v.sizeType||v.start<u.visibleRange.min)&&(s=u.visibleLabels[0].value===u.visibleRange.min?u.visibleRange.min:u.visibleLabels[0].value-("DateTime"===u.valueType?u.dateTimeInterval:u.visibleRange.interval)),s=v.startFromAxis&&"DateTime"!==u.valueType?u.visibleRange.min:s;s<a;)r=x(s+("DateTime"===u.valueType?u.dateTimeInterval*+v.size:v.size),u.visibleRange),(s>=u.visibleRange.min&&s<u.visibleRange.max||r)&&this.renderStripLineElement(u,v,n,o,c,e,s,l,g),g++,s=this.getStartValue(u,v,s,e);else this.renderStripLineElement(u,v,n,o,c,e,null,l,g),g++}be(e.enableCanvas,e.svgObject,c,e.redraw)},e.prototype.isCoreDate=function(e){return"string"==typeof e},e.prototype.dateToMilliSeconds=function(e,t){return this.dateParse(e,t).getTime()},e.prototype.renderPath=function(e,t,r,o,n,a){var s=he(r),l=s?s.getAttribute("d"):"",h="Vertical"===a.orientation?"M"+t.x+" "+t.y+" L"+(t.x+t.width)+" "+t.y:"M"+t.x+" "+t.y+" L"+t.x+" "+(t.y+t.height);be(n.enableCanvas,o,n.renderer.drawPath(new i.PathOption(r,"",e.size,e.color,e.opacity,e.dashArray,h)),n.redraw,!0,"x","y",null,l,!0)},e.prototype.renderRectangle=function(e,t,r,o,n){var a=he(r),s=a?new i.Rect(+a.getAttribute("x"),+a.getAttribute("y"),+a.getAttribute("width"),+a.getAttribute("height")):null;be(n.enableCanvas,o,n.renderer.drawRectangle(new Di(r,e.color,e.border,e.opacity,t,0,0,"",e.dashArray)),n.redraw,!0,"x","y",null,null,!0,!0,s)},e.prototype.renderText=function(e,t,r,o,n,a){var s,l=i.measureText(e.text,e.textStyle),h=null===e.rotation,c=h?l.height/8*3:0,d=t.y+t.height/2+c,p=h?"Vertical"===a.orientation?0:-90:e.rotation,u=t.x+t.width/2;"Horizontal"===a.orientation?(u=this.getTextStart(u+c*this.factor(e.horizontalAlignment),t.width,e.horizontalAlignment),d=this.getTextStart(d-c,t.height,e.verticalAlignment)+("Start"!==e.verticalAlignment||h?0:l.height/4),s=h?this.invertAlignment(e.verticalAlignment):e.horizontalAlignment):(u=this.getTextStart(u,t.width,e.horizontalAlignment),d=this.getTextStart(d+c*this.factor(e.verticalAlignment)-5,t.height,e.verticalAlignment),s=e.horizontalAlignment),Ve(n.renderer,new i.TextOption(r,u,d,s,e.text,"rotate("+p+" "+u+","+d+")","middle"),e.textStyle,e.textStyle.color,o,null,null,null,null,null,null,null,null,n.enableCanvas)},e.prototype.invertAlignment=function(e){switch(e){case"Start":e="End";break;case"End":e="Start"}return e},e.prototype.getStartValue=function(e,t,i,r){return"DateTime"===e.valueType?this.getToValue(null,i,+t.repeatEvery,e,null,t):i+ +t.repeatEvery},e.prototype.getSegmentAxis=function(e,t,i){var r;if(null==i.segmentAxisName)return"Horizontal"===t.orientation?e[1]:e[0];for(var o=0;o<e.length;o++)i.segmentAxisName===e[o].name&&(r=e[o]);return r},e.prototype.renderStripLineElement=function(e,t,i,r,o,n,a,s,l){var h=this.measureStripLine(e,t,i,a,s,n);"Pixel"===t.sizeType?this.renderPath(t,h,r+"path_"+e.name+"_"+l,o,n,e):0!==h.height&&0!==h.width&&this.renderRectangle(t,h,r+"rect_"+e.name+"_"+l,o,n),""!==t.text&&this.renderText(t,h,r+"text_"+e.name+"_"+l,o,n,e)},e.prototype.factor=function(e){var t=0;switch(e){case"Start":t=1;break;case"End":t=-1}return t},e.prototype.getTextStart=function(e,t,i){switch(i){case"Start":e=e-t/2+5;break;case"End":e=e+t/2-5}return e},e.prototype.getModuleName=function(){return"StripLine"},e.prototype.destroy=function(){},e}(),Nr=function(){function e(e){this.chart=e}return e.prototype.enableComplexProperty=function(e){for(var i=[],r=[],o=e.xAxis.visibleRange,n=e.yAxis.visibleRange,a=e.points,s=e.clipRect,l=Math.abs(o.delta/s.width),h=Math.abs(n.delta/s.height),c=a[0]&&a[0].x>l?0:l,d=a[0]&&a[0].y>h?0:h,p=0,u=0,g=0,y=a;g<y.length;g++){var m=y[g];m.symbolLocations=[],p=m.xValue?m.xValue:o.min,u=m.yValue?m.yValue:n.min,(Math.abs(c-p)>=l||Math.abs(d-u)>=h)&&(i.push(m),c=p,d=u)}for(var v,f=0;f<i.length;f++)v=i[f],t.isNullOrUndefined(v.x)||""===v.x||r.push(v);return r},e.prototype.getLineDirection=function(e,t,i,r,o,n){var a="";if(null!=e){var s=o(e.xValue,e.yValue,i.xAxis,i.yAxis,r,i),l=o(t.xValue,t.yValue,i.xAxis,i.yAxis,r,i);a=n+" "+s.x+" "+s.y+" L "+l.x+" "+l.y+" "}return a},e.prototype.appendLinePath=function(e,t,i){var r=he(e.id),o=t.chart,n=r?r.getAttribute("d"):null,a=t.chart.renderer.drawPath(e,new Int32Array([t.clipRect.x,t.clipRect.y]));a&&a.setAttribute("clip-path",i),t.pathElement=a,t.chart.enableCanvas||t.seriesElement.appendChild(a),t.isRectSeries=!1,J(r,e.d,t.chart.redraw,n,o.duration)},e.prototype.renderMarker=function(e){e.marker&&e.marker.visible&&e.chart.markerRender.render(e)},e.prototype.doProgressiveAnimation=function(e,i){var r,o=new t.Animation({}),n=e.pathElement,a=n.getAttribute("stroke-dasharray"),s=e.pathElement.getTotalLength();n.style.visibility="hidden",o.animate(n,{duration:i.duration,delay:i.delay,progress:function(e){e.timeStamp>=e.delay&&(n.style.visibility="visible",r=Math.abs(Math.round((e.timeStamp-e.delay)*s/e.duration)),n.setAttribute("stroke-dasharray",r+","+s))},end:function(){n.setAttribute("stroke-dasharray",a),e.chart.trigger("animationComplete",{series:e.chart.isBlazor?{}:e})}})},e.prototype.storePointLocation=function(e,t,r,o){var n=t.marker&&t.marker.width?t.marker.width:0,a=t.marker&&t.marker.height?t.marker.height:0;e.symbolLocations.push(o(e.xValue,e.yValue,t.xAxis,t.yAxis,r,t)),e.regions.push(new i.Rect(e.symbolLocations[0].x-n,e.symbolLocations[0].y-a,2*n,2*a))},e.prototype.withinYRange=function(e,t){return e.yValue>=t.visibleRange.min&&e.yValue<=t.visibleRange.max},e.prototype.getFirstLastVisiblePoint=function(e){for(var t=null,i=null,r=0,o=e;r<o.length;r++){var n=o[r];null===t&&n.visible&&(t=i=n),i=n.visible?n:i}return{first:t||e[0],last:i||e[e.length-1]}},e.prototype.doLinearAnimation=function(e,i){var r,o=e.clipRectElement.childNodes[0].childNodes[0],n=e.chart.animated?e.chart.duration:i.duration,a=Z("Linear"),s=+o.getAttribute("height"),l=+o.getAttribute("width"),h=+o.getAttribute("x"),c=e.chart.requireInvertedAxis?+o.getAttribute("height")+ +o.getAttribute("y"):+o.getAttribute("y");o.style.visibility="hidden",new t.Animation({}).animate(o,{duration:n,delay:i.delay,progress:function(t){t.timeStamp>=t.delay&&(o.style.visibility="visible",e.chart.requireInvertedAxis?(r=a(t.timeStamp-t.delay,0,s,t.duration),o.setAttribute("transform","translate("+h+" "+c+") scale(1,"+r/s+") translate("+-h+" "+-c+")")):(r=a(t.timeStamp-t.delay,0,l,t.duration),o.setAttribute("transform","translate("+h+" "+c+") scale("+r/l+", 1) translate("+-h+" "+-c+")")))},end:function(){o.setAttribute("transform","translate(0,0)"),e.chart.trigger("animationComplete",{series:e.chart.isBlazor?{}:e})}})},e}(),Fr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Vr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fr(t,e),t.prototype.render=function(e,t,r,o){for(var n,a,s="",l=null,h="M",c=e.chart&&"PolarRadar"===e.chart.chartAreaType,d=e.emptyPointSettings&&"Drop"===e.emptyPointSettings.mode,p=c?I:ve,u="TrendLine"===e.category?e.points:this.enableComplexProperty(e),g=0,y=u;g<y.length;g++){var m=y[g];m.regions=[],m.symbolLocations=[],m.visible&&S(u[m.index-1],m,u[m.index+1],e)?(s+=this.getLineDirection(l,m,e,o,p,h),h=l?"L":h,l=m,this.storePointLocation(m,e,o,p)):(l=d?l:null,h=d?h:"M")}if(c&&e.isClosed){var v=this.getFirstLastVisiblePoint(u);a=p(v.last.xValue,v.last.yValue,t,r,o,e),n=p(v.first.xValue,v.first.yValue,t,r,o,e),s=s.concat(h+" "+a.x+" "+a.y+" L "+n.x+" "+n.y)}var f="Indicator"===e.category?e.chart.element.id+"_Indicator_"+e.index+"_"+e.name:"TrendLine"===e.category?e.chart.element.id+"_Series_"+e.sourceIndex+"_TrendLine_"+e.index:e.chart.element.id+"_Series_"+(void 0===e.index?e.category:e.index),b=new i.PathOption(f,"none",e.width,e.interior,e.opacity,e.dashArray,s);this.appendLinePath(b,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doProgressiveAnimation(e,t)},t.prototype.getModuleName=function(){return"LineSeries"},t.prototype.destroy=function(){},t}(Nr),jr=function(){function e(){}return e.prototype.getSideBySideInfo=function(e){e.chart.enableSideBySidePlacement&&!e.position&&this.getSideBySidePositions(e);var t=e.chart.enableSideBySidePlacement?e.position:0,i=e.chart.enableSideBySidePlacement?e.rectCount:1;e.isRectSeries=!0;var r,o=e.chart.visibleSeries,n=e.chart.enableSideBySidePlacement?e.columnSpacing:0,a=null===e.columnWidth||isNaN(+e.columnWidth)?"Histogram"===e.type?1:.7:e.columnWidth,s=U(e.xAxis,o)*a,l=t/i-.5,h=new oi(l,l+1/i);return isNaN(h.start)||isNaN(h.end)||(r=n*(h=new oi(h.start*s,h.end*s)).delta,h=new oi(h.start+r/2,h.end-r/2)),h},e.prototype.getRectangle=function(e,t,r,o,n){var a=ve(e,t,n.xAxis,n.yAxis,n.chart.requireInvertedAxis),s=ve(r,o,n.xAxis,n.yAxis,n.chart.requireInvertedAxis);return new i.Rect(Math.min(a.x,s.x),Math.min(a.y,s.y),Math.abs(s.x-a.x),Math.abs(s.y-a.y))},e.prototype.getSideBySidePositions=function(e){for(var t=e.chart,i=0,r=t.columns;i<r.length;i++)for(var o=r[i],n=0,a=t.rows;n<a.length;n++){var s=a[n];this.findRectPosition(e.findSeriesCollection(o,s,!1))}},e.prototype.findRectPosition=function(e){for(var t=[],i={rectCount:0,position:null},r=0;r<e.length;r++)-1!==(o=e[r]).type.indexOf("Stacking")?o.stackingGroup?void 0===t[o.stackingGroup]?(o.position=i.rectCount,t[o.stackingGroup]=i.rectCount++):o.position=t[o.stackingGroup]:null===i.position?(o.position=i.rectCount,i.position=i.rectCount++):o.position=i.position:o.position=i.rectCount++;for(r=0;r<e.length;r++){var o=e[r];o.rectCount=i.rectCount}},e.prototype.updateSymbolLocation=function(e,t,i){i.chart.requireInvertedAxis?this.updateYRegion(e,t,i):this.updateXRegion(e,t,i),"Histogram"===i.type&&(e.minimum=+e.x-i.histogramValues.binWidth/2,e.maximum=+e.x+i.histogramValues.binWidth/2)},e.prototype.updateXRegion=function(e,t,i){e.symbolLocations.push({x:t.x+t.width/2,y:"BoxPlot"===i.seriesType||-1!==i.seriesType.indexOf("HighLow")||e.yValue>=0==!i.yAxis.isInversed?t.y:t.y+t.height}),this.getRegion(e,t,i),"RangeColumn"===i.type&&e.symbolLocations.push({x:t.x+t.width/2,y:t.y+t.height})},e.prototype.updateYRegion=function(e,t,i){e.symbolLocations.push({x:"BoxPlot"===i.seriesType||-1!==i.seriesType.indexOf("HighLow")||e.yValue>=0==!i.yAxis.isInversed?t.x+t.width:t.x,y:t.y+t.height/2}),this.getRegion(e,t,i),"RangeColumn"===i.type&&e.symbolLocations.push({x:t.x,y:t.y+t.height/2})},e.prototype.renderMarker=function(e){e.marker&&e.marker.visible&&e.chart.markerRender.render(e)},e.prototype.getRegion=function(e,t,r){if(0===e.y){var o=r.marker&&r.marker.width?r.marker.width:0,n=r.marker&&r.marker.height?r.marker.height:0;e.regions.push(new i.Rect(e.symbolLocations[0].x-o,e.symbolLocations[0].y-n,2*o,2*n))}else e.regions.push(t)},e.prototype.triggerEvent=function(e,t,i,r){var o={cancel:!1,name:"pointRender",series:e,point:t,fill:e.setPointColor(t,i),border:e.setBorderColor(t,r)};return e.chart.trigger("pointRender",o),t.color=o.fill,o},e.prototype.drawRectangle=function(e,t,r,o){var n=e.chart;if((n.requireInvertedAxis?r.height:r.width)<=0)return null;var a;a=0===t.y?this.calculateRoundedRectPath(r,0,0,0,0):this.calculateRoundedRectPath(r,e.cornerRadius.topLeft,e.cornerRadius.topRight,e.cornerRadius.bottomLeft,e.cornerRadius.bottomRight);var s="Indicator"===e.category?n.element.id+"_Indicator_"+e.index+"_"+e.name+"_Point_"+t.index:n.element.id+"_Series_"+e.index+"_Point_"+t.index,l=Ne(n.redraw,s),h=l?l.getAttribute("d"):"",c=new i.PathOption(s,o.fill,o.border.width,o.border.color,e.opacity,e.dashArray,a),d=n.renderer.drawPath(c,new Int32Array([e.clipRect.x,e.clipRect.y]));switch(e.seriesType){case"XY":d.setAttribute("aria-label",t.x.toString()+":"+t.yValue.toString());break;case"HighLow":d.setAttribute("aria-label",t.x.toString()+":"+t.high.toString()+":"+t.low.toString())}be(e.chart.enableCanvas,e.seriesElement,d,n.redraw),e.chart.enableCanvas||J(d,a,n.redraw,h,n.duration)},e.prototype.animate=function(e){for(var t=e.seriesElement.childNodes,i="Indicator"===e.category?0:1,r=0,o=g(e);r<o.length;r++){var n=o[r];(n.symbolLocations.length||"BoxAndWhisker"===e.type&&n.regions.length)&&(this.animateRect(t[i],e,n),i++)}},e.prototype.animateRect=function(e,i,r){var o,n,a,s,l=i.animation,h=i.chart.animated?i.chart.duration:l.duration,c=Z("Linear"),d=r.yValue<0,p=+r.regions[0].height,u=+r.regions[0].width;i.chart.requireInvertedAxis?(n=+r.regions[0].y,i.type.indexOf("Stacking")>-1?(o=z(0,i.yAxis)*i.yAxis.rect.width,a=o,s=n):(o=+r.regions[0].x,s=d?n:n+p,a=-1!==i.seriesType.indexOf("HighLow")||-1!==i.type.indexOf("Waterfall")?o+u/2:d!==i.yAxis.isInversed?o+u:o)):(o=+r.regions[0].x,i.type.indexOf("Stacking")>-1?(n=(1-z(0,i.yAxis))*i.yAxis.rect.height,a=o,s=n):(n=+r.regions[0].y,s=-1!==i.seriesType.indexOf("HighLow")||-1!==i.type.indexOf("Waterfall")?n+p/2:d!==i.yAxis.isInversed?n:n+p,a=d?o:o+u));var g;t.isNullOrUndefined(e)||(e.style.visibility="hidden",new t.Animation({}).animate(e,{duration:h,delay:l.delay,progress:function(t){t.timeStamp>=t.delay&&(e.style.visibility="visible",i.chart.requireInvertedAxis?(u=u||1,g=c(t.timeStamp-t.delay,0,u,t.duration),e.setAttribute("transform","translate("+a+" "+s+") scale("+g/u+", 1) translate("+-a+" "+-s+")")):(p=p||1,g=c(t.timeStamp-t.delay,0,p,t.duration),e.setAttribute("transform","translate("+a+" "+s+") scale(1,"+g/p+") translate("+-a+" "+-s+")")))},end:function(){e.setAttribute("transform","translate(0,0)");var t=i.seriesElement;if((e===t.lastElementChild||r.index===i.points.length-1||"Waterfall"===i.type&&e===t.children[t.childElementCount-2])&&(i.chart.trigger("animationComplete",{series:i.chart.isBlazor?{}:i}),"Waterfall"===i.type))for(var o=t.childNodes,n=0;n<o.length;n++)-1!==o[n].id.indexOf("Connector")&&(o[n].style.visibility="visible",o[n].setAttribute("transform","translate(0,0)"))}}))},e.prototype.calculateRoundedRectPath=function(e,t,i,r,o){return"M "+e.x+" "+(t+e.y)+" Q "+e.x+" "+e.y+" "+(e.x+t)+" "+e.y+" L "+(e.x+e.width-i)+" "+e.y+" Q "+(e.x+e.width)+" "+e.y+" "+(e.x+e.width)+" "+(e.y+i)+" L "+(e.x+e.width)+" "+(e.y+e.height-o)+" Q "+(e.x+e.width)+" "+(e.y+e.height)+" "+(e.x+e.width-o)+" "+(e.y+e.height)+" L "+(e.x+r)+" "+(e.y+e.height)+" Q "+e.x+" "+(e.y+e.height)+" "+e.x+" "+(e.y+e.height-r)+" L "+e.x+" "+(t+e.y)+" Z"},e}(),Hr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Hr(t,e),t.prototype.render=function(e){for(var t,i,r=this.getSideBySideInfo(e),o=Math.max(e.yAxis.visibleRange.min,0),n=0,a=e.points;n<a.length;n++){var s=a[n];if(s.symbolLocations=[],s.regions=[],s.visible&&S(e.points[s.index-1],s,e.points[s.index+1],e)){t=this.getRectangle(s.xValue+r.start,s.yValue,s.xValue+r.end,o,e);var l="Indicator"===e.category?s.color:e.interior;(i=this.triggerEvent(e,s,l,{width:e.border.width,color:e.border.color})).cancel||(this.updateSymbolLocation(s,t,e),this.drawRectangle(e,s,t,i))}}this.renderMarker(e)},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.getModuleName=function(){return"ColumnSeries"},t.prototype.destroy=function(){},t}(jr),Yr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Gr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yr(t,e),t.prototype.getAreaPathDirection=function(e,t,i,r,o,n,a){var s,l="";return null===n&&(l+=a+" "+(s=o(e,t,i.xAxis,i.yAxis,r,i)).x+" "+s.y+" "),l},t.prototype.getAreaEmptyDirection=function(e,t,i,r,o){var n="";return n+=this.getAreaPathDirection(e.x,e.y,i,r,o,null,"L"),n+=this.getAreaPathDirection(t.x,t.y,i,r,o,null,"L")},t.prototype.setPointColor=function(e,t,i,r,o){if(""===i.pointColorMapping){for(var n=void 0,a=0;a<o.length;a++)if(n=o[a],(r?e.xValue:e.yValue)<=this.getAxisValue(n.value,r?i.xAxis:i.yAxis,i.chart)||!n.value){e.interior=n.color;break}return null==e.interior&&(e.interior=i.interior),!1}return!!t&&i.setPointColor(e,i.interior)!==i.setPointColor(t,i.interior)},t.prototype.sortSegments=function(e,t){var i=this,r="X"===e.segmentAxis?e.xAxis:e.yAxis;return[].concat(t).sort(function(t,o){return i.getAxisValue(t.value,r,e.chart)-i.getAxisValue(o.value,r,e.chart)})},t.prototype.applySegmentAxis=function(e,t,i){var r=this;if(""!==e.pointColorMapping)return t.map(function(t){r.appendLinePath(t,e,"")}),null;var o,n="X"===e.segmentAxis,a=n?e.xAxis:e.yAxis,s=e.chart;this.includeSegment(i,a,e,i.length);for(var l,h,c,d=i.length,p=this,u=0;u<d;u++)!function(r){o=i[r],l=p.getAxisValue(o.value,a,e.chart),(h=p.createClipRect(r?p.getAxisValue(i[r-1].value,a,e.chart):a.visibleRange.min,l,e,r,n))&&t.map(function(t){J(he((c={"clip-path":h,"stroke-dasharray":o.dashArray,opacity:t.opacity,stroke:e.type.indexOf("Line")>-1?o.color||e.interior:e.border.color,"stroke-width":t["stroke-width"],fill:e.type.indexOf("Line")>-1?"none":o.color||e.interior,id:t.id+"_Segment_"+r,d:t.d}).id),c.d,s.redraw),e.seriesElement.appendChild(s.renderer.drawPath(c))})}(u)},t.prototype.includeSegment=function(e,t,i,r){if(r<=0)return e.push({value:t.visibleRange.max,color:i.interior}),null;this.getAxisValue(e[r-1].value,t,i.chart)<t.visibleRange.max&&e.push({value:t.visibleRange.max,color:i.interior})},t.prototype.createClipRect=function(e,t,i,r,o){var n,a=i.chart.requireInvertedAxis,s=ve(o?e:i.xAxis.visibleRange.min,o?i.yAxis.visibleRange.max:t,i.xAxis,i.yAxis,a),l=ve(o?t:i.xAxis.visibleRange.max,o?i.yAxis.visibleRange.min:e,i.xAxis,i.yAxis,a);return(l=a?[s,s=l][0]:l).x-s.x>0&&l.y-s.y>0?(n=new Di(i.chart.element.id+"_ChartSegment"+i.index+"ClipRect_"+r,"transparent",{width:1,color:"Gray"},1,{x:s.x,y:s.y,width:l.x-s.x,height:l.y-s.y}),i.seriesElement.appendChild(K(i.chart.redraw,n,i.chart.renderer)),"url(#"+i.chart.element.id+"_ChartSegment"+i.index+"ClipRect_"+r+")"):null},t.prototype.getAxisValue=function(e,t,i){if(null===e&&(e=t.visibleRange.max),"DateTime"===t.valueType){var o={skeleton:"full",type:"dateTime"};return Date.parse(i.intl.getDateParser(o)(i.intl.getDateFormat(o)(new Date(r.DataUtil.parse.parseJson({val:e}).val))))}if(t.valueType.indexOf("Category")>-1){var n="DateTimeCategory"===t.valueType?e.getTime().toString():e;return t.labels.indexOf(n)<0?+e:t.labels.indexOf(n)}return+e},t}(Nr),Wr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ur=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wr(t,e),t.prototype.render=function(e,t,r,o){var n=null,a="",s=e.chart&&"PolarRadar"===e.chart.chartAreaType,l=Math.max(e.yAxis.visibleRange.min,0);s&&(l=this.getFirstLastVisiblePoint(e.points).first.yValue);for(var h,c,d=e.emptyPointSettings&&"Drop"===e.emptyPointSettings.mode,p=e.border?e.border.width:0,u=e.border?e.border.color:"transparent",g="PolarRadar"===e.chart.chartAreaType?I:ve,y=this.enableComplexProperty(e),m=0;m<y.length;m++)h=(c=y[m]).xValue,c.symbolLocations=[],c.regions=[],c.visible&&S(y[m-1],c,y[m+1],e)&&(a+=this.getAreaPathDirection(h,l,e,o,g,n,"M"),n=n||new Vi(h,l),a+=this.getAreaPathDirection(h,c.yValue,e,o,g,null,"L"),y[m+1]&&!y[m+1].visible&&(!s||s&&this.withinYRange(y[m+1],r))&&!d&&(a+=this.getAreaEmptyDirection({x:h,y:l},n,e,o,g),n=null),this.storePointLocation(c,e,o,g));if(s&&""!==a){var v="",f=this.chart;v+=this.getAreaPathDirection(0,l,e,o,g,null,"L"),(t.isInversed||r.isInversed)&&(a+="Polar"===e.type?f.polarSeriesModule.getPolarIsInversedPath(t,v):f.radarSeriesModule.getRadarIsInversedPath(t,v)),a=a.concat(a+" Z")}this.appendLinePath(new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,p,u,e.opacity,e.dashArray,e.points.length>1&&""!==a?a+this.getAreaPathDirection(e.points[e.points.length-1].xValue,"PolarRadar"===e.chart.chartAreaType?e.points[e.points.length-1].yValue:l,e,o,g,null,"L"):""),e,""),this.renderMarker(e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"AreaSeries"},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t}(Gr),Zr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Zr(t,e),t.prototype.render=function(e){for(var t,i,r=Math.max(e.yAxis.visibleRange.min,0),o=this.getSideBySideInfo(e),n=0,a=e.points;n<a.length;n++){var s=a[n];s.symbolLocations=[],s.regions=[],s.visible&&S(e.points[s.index-1],s,e.points[s.index+1],e)&&(t=this.getRectangle(s.xValue+o.start,s.yValue,s.xValue+o.end,r,e),(i=this.triggerEvent(e,s,e.interior,{width:e.border.width,color:e.border.color})).cancel||(this.updateSymbolLocation(s,t,e),this.drawRectangle(e,s,t,i)))}this.renderMarker(e)},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"BarSeries"},t}(jr),Qr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleAxisLabelRect=[],t}return Qr(t,e),t.prototype.measureAxis=function(e){var t=this.chart;this.initialClipRect=e,this.seriesClipRect=new i.Rect(e.x,e.y,e.width,e.height),this.measureRowAxis(t,this.initialClipRect),this.measureColumnAxis(t,this.initialClipRect),this.calculateAxisSize()},t.prototype.measureRowAxis=function(e,t){this.calculateRowSize(t);var r=e.rows[0];this.measureDefinition(r,e,new i.Size(e.availableSize.width,r.computedHeight))},t.prototype.measureColumnAxis=function(e,t){this.calculateColumnSize(t);var r=e.columns[0];this.measureDefinition(r,e,new i.Size(r.computedWidth,e.availableSize.height))},t.prototype.measureDefinition=function(e,t,i){for(var r=0,o=e.axes;r<o.length;r++){var n=o[r];n.getModule(t),n.baseModule.calculateRangeAndInterval(i,n)}},t.prototype.calculateAxisSize=function(){var e=this.chart;this.centerX=.5*this.initialClipRect.width+this.initialClipRect.x,this.centerY=.5*this.initialClipRect.height+this.initialClipRect.y,e.radius=Math.min(this.initialClipRect.width,this.initialClipRect.height)/2-5-e.primaryXAxis.majorTickLines.height-e.primaryXAxis.maxLabelSize.height,e.radius=e.primaryXAxis.coefficient*e.radius/100,this.seriesClipRect.y=this.centerY-e.radius,this.seriesClipRect.x=this.centerX-e.radius,this.seriesClipRect.height=2*e.radius,this.seriesClipRect.width=2*e.radius,this.calculateRowSize(this.seriesClipRect),e.primaryYAxis.rect=this.seriesClipRect,this.calculateColumnSize(this.seriesClipRect),e.primaryXAxis.rect=this.seriesClipRect},t.prototype.measure=function(){var e=this.chart;e.verticalAxes.push(e.primaryYAxis);var t=e.rows[0];t.axes[0]=e.primaryYAxis,e.rows[0]=t,e.horizontalAxes.push(e.primaryXAxis);var i=e.columns[0];i.axes[0]=e.primaryXAxis,e.columns[0]=i},t.prototype.calculateRowSize=function(e){var t=this.chart,i=t.rows[0];i.computedHeight=e.height/2,i.computedTop=e.y,t.rows[0]=i},t.prototype.calculateColumnSize=function(e){var t=this.chart,i=t.columns[0];i.computedLeft=e.x,i.computedWidth=e.width,t.columns[0]=i},t.prototype.renderAxes=function(){var e,t=this.chart;this.startAngle=t.primaryXAxis.startAngle;for(var i=t.renderer.createGroup({id:t.element.id+"AxisCollection"}),r=t.renderer.createGroup({id:t.element.id+"AxisOutsideCollection"}),o=0,n=t.axisCollections.length;o<n;o++)this.element=t.renderer.createGroup({id:t.element.id+"AxisGroup"+o}),"Horizontal"===(e=t.axisCollections[o]).orientation?((e.majorGridLines.width>0||e.majorTickLines.width>0)&&this.drawXAxisGridLine(e,o),e.visible&&e.internalVisibility&&this.drawXAxisLabels(e,o)):(this.drawYAxisGridLine(e,o),e.lineStyle.width>0&&this.drawYAxisLine(e,o),e.visible&&e.internalVisibility&&this.drawYAxisLabels(e,o)),i.appendChild(this.element);return i.appendChild(this.element),be(t.enableCanvas,t.svgObject,i,t.redraw),r},t.prototype.drawYAxisLine=function(e,t){var i=this.chart,r={},o=B(N(e.visibleLabels[0].value,e),this.startAngle),n="M "+this.centerX+" "+this.centerY+"L "+(this.centerX+i.radius*o.x)+" "+(this.centerY+i.radius*o.y);r={id:i.element.id+"AxisLine_"+t,d:n,"stroke-dasharray":e.lineStyle.dashArray,"stroke-width":e.lineStyle.width,stroke:e.lineStyle.color||i.themeStyle.axisLine};var a=i.renderer.drawPath(r);this.setPointerEventNone(a),i.yAxisElements.appendChild(a)},t.prototype.drawYAxisLabels=function(e,t){var r,o,n,a,s=this.chart,l=0,h=0,c=this.startAngle<0?this.startAngle+360:this.startAngle,d=[],p=[];p[0]=!0;for(var u=e.labelIntersectAction,g=s.renderer.createGroup({id:s.element.id+"AxisLabels"+t}),y=B(N(e.visibleLabels[0].value,e),this.startAngle),m=0,v=e.visibleLabels.length;m<v;m++){if(a=!1,n=s.radius*z(e.visibleLabels[m].value,e),r=e.visibleLabels[m].size,n=s.radius*z(e.visibleLabels[m].value,e),l=this.centerX+n*y.x+(e.majorTickLines.height+r.width/2+2.5)*Math.cos(c*Math.PI/180)*("Inside"===e.labelPosition?1:-1),h=this.centerY+n*y.y+(e.majorTickLines.height+r.height/2)*Math.sin(c*Math.PI/180)*("Inside"===e.labelPosition?1:-1),h+=r.height/4,d[m]=this.getLabelRegion(l,h,e.visibleLabels[m],"middle"),0!==m&&"Hide"===u){for(var f=m;f>=0;f--){if(f=0===f?0:f===m?f-1:f,p[f]&&Le(d[m],d[f])){a=!0,p[m]=!1;break}p[m]=!0}if(a)continue;for(var b=0,x=this.visibleAxisLabelRect;b<x.length;b++){var w=x[b];if(Le(d[m],w)){a=!0;break}}}a||(this.visibleAxisLabelRect.push(d[m]),o=new i.TextOption(s.element.id+t+"_AxisLabel_"+m,l,h,"middle",e.visibleLabels[m].text),Ve(s.renderer,o,e.labelStyle,e.labelStyle.color||s.themeStyle.axisLabel,g,!1,s.redraw,!0,!0,null,null,null,null,s.enableCanvas))}s.yAxisElements.appendChild(g)},t.prototype.drawYAxisGridLine=function(e,t){var r,o,n,a,s,l,h,c=this.chart,d="",p="",u=this.startAngle<0?this.startAngle+360:this.startAngle,g={color:e.majorGridLines.color||c.themeStyle.majorGridLine,width:e.majorGridLines.width};if(e.majorGridLines.width>0)if("Polar"===c.visibleSeries[0].type){for(y=0;y<e.visibleLabels.length;y++)l=(h=he(c.element.id+"_MajorGridLine_"+t+"_"+y))?h.getAttribute("r"):null,o=c.radius*z(e.visibleLabels[y].value,e),r=new Ni(c.element.id+"_MajorGridLine_"+t+"_"+y,"transparent",g,e.majorGridLines.width,this.centerX,this.centerY,o),be(c.enableCanvas,this.element,c.renderer.drawCircle(r),c.redraw,!0,"r","r",new Vi(+l,+l),null,!0);o!==c.radius&&(r=new Ni(c.element.id+"_MajorGridLine_"+t+"_"+e.visibleLabels.length+1,"transparent",g,e.majorGridLines.width,this.centerX,this.centerY,c.radius),be(c.enableCanvas,this.element,c.renderer.drawCircle(r),c.redraw,!0,"r","r",new Vi(+l,+l),null,!0))}else{for(var y=0;y<e.visibleLabels.length;y++)o=c.radius*z(e.visibleLabels[y].value,e),p=this.renderRadarGrid(o,"",c),l=(h=he(c.element.id+"_MajorGridLine_"+t+"_"+y))?h.getAttribute("d"):null,r=new i.PathOption(c.element.id+"_MajorGridLine_"+t+"_"+y,"transparent",e.majorGridLines.width,e.majorGridLines.color||c.themeStyle.majorGridLine,null,null,p),be(c.enableCanvas,this.element,c.renderer.drawPath(r),c.redraw,!0,"x","y",null,l,!0);o!==c.radius&&(p=this.renderRadarGrid(c.radius,"",c),l=(h=he(c.element.id+"_MajorGridLine_"+t+"_"+e.visibleLabels.length))?h.getAttribute("d"):null,r=new i.PathOption(c.element.id+"_MajorGridLine_"+t+"_"+e.visibleLabels.length,"transparent",e.majorGridLines.width,e.majorGridLines.color||c.themeStyle.majorGridLine,null,null,p),be(c.enableCanvas,this.element,c.renderer.drawPath(r),c.redraw,!0,"x","y",null,l,!0))}if(e.majorTickLines.width>0){n=B(N(e.visibleLabels[0].value,e),this.startAngle);for(var m=0;m<e.visibleLabels.length;m++)o=c.radius*z(e.visibleLabels[m].value,e),d="M "+(a=this.centerX+o*n.x)+" "+(s=this.centerY+o*n.y)+" L "+(a+e.majorTickLines.height*Math.cos(u*Math.PI/180)*("Inside"===e.tickPosition?1:-1))+" "+(s+e.majorTickLines.height*Math.sin(u*Math.PI/180)*("Inside"===e.tickPosition?1:-1)),this.renderTickLine(e,t,d,"",m)}},t.prototype.renderRadarGrid=function(e,t,i){for(var r,o,n,a,s,l,h=0,c=i.primaryXAxis.visibleLabels.length;h<c;h++)r=B(N(i.primaryXAxis.visibleLabels[h].value,i.primaryXAxis),this.startAngle),o=h+1<c?B(N(i.primaryXAxis.visibleLabels[h+1].value,i.primaryXAxis),this.startAngle):B(N(i.primaryXAxis.visibleLabels[0].value,i.primaryXAxis),this.startAngle),n=this.centerX+e*r.x,a=this.centerY+e*r.y,s=this.centerX+e*o.x,l=this.centerY+e*o.y,t=t.concat((h?"L ":"M ")+" "+n+" "+a+" L "+s+" "+l+" ");return t},t.prototype.drawXAxisGridLine=function(e,t){for(var i,r,o,n,a,s=this.chart,l="",h="",c="",d="",p=this.centerX,u=this.centerY,g=e.visibleLabels.length,y=0;y<g;y++)i=e.visibleLabels[y].value,r=B(N(e.visibleLabels[y].value,e),this.startAngle),l="M "+p+" "+u+" L "+(o=this.centerX+s.radius*r.x)+" "+(n=this.centerY+s.radius*r.y),h="M "+o+" "+n+" L "+(o+e.majorTickLines.height*r.x*("Inside"===e.tickPosition?-1:1))+" "+(n+e.majorTickLines.height*r.y*("Inside"===e.tickPosition?-1:1)),e.minorTicksPerInterval>0&&(e.minorGridLines.width>0||e.minorTickLines.width>0)&&"Category"!==e.valueType&&"Radar"!==s.visibleSeries[0].type&&(c=(a=this.drawAxisMinorLine(e,i,c,d))[0],d=a[1]),this.renderTickLine(e,t,h,d,y),this.renderGridLine(e,t,l,c,y)},t.prototype.drawAxisMinorLine=function(e,t,i,r){for(var o,n,a,s=t,l=e.visibleRange,h=[],c=0;c<e.minorTicksPerInterval;c++)if(s+=("DateTime"===e.valueType?e.dateTimeInterval:e.visibleRange.interval)/(e.minorTicksPerInterval+1),b(s,l)){a=B(N(s,e),this.startAngle),o=this.centerX+this.chart.radius*a.x,n=this.centerY+this.chart.radius*a.y;var d=o+e.minorTickLines.height*a.x*("Inside"===e.tickPosition?-1:1),p=n+e.minorTickLines.height*a.y*("Inside"===e.tickPosition?-1:1);i=i.concat("M "+this.centerX+" "+this.centerY+"L "+o+" "+n),r=r.concat("M "+o+" "+n+"L "+d+" "+p)}return h.push(i),h.push(r),h},t.prototype.drawXAxisLabels=function(e,t){this.visibleAxisLabelRect=[];var r;this.chart.legendModule&&(r=this.chart.legendModule.legendBounds);var o,n,a,s,l,h,c,d=this.chart,p=0,u=0,g=d.renderer.createGroup({id:d.element.id+"AxisLabels"+t}),y="Inside"===e.labelPosition,m="",v=[],f=[];f[0]=!0;var b=e.labelIntersectAction,x="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?.5:0,w=d.radius+e.majorTickLines.height;w=y?-w:w;for(var S=0,C=e.visibleLabels.length;S<C;S++){if(c=!1,n=B(N(e.visibleLabels[S].value+x,e),this.startAngle),isNaN(n.x)||isNaN(n.y)||(p=this.centerX+(w+e.majorTickLines.height+5)*n.x,u=this.centerY+(w+e.majorTickLines.height+5)*n.y,m=parseFloat(p.toFixed(1))===parseFloat(this.centerX.toFixed(1))?"middle":p<this.centerX&&!y||p>this.centerX&&y?"end":"start"),h=e.visibleLabels[S],a=h.text,e.enableTrim||"Trim"===b)for(var P=e.visibleLabels[S].originalText,L=void 0,R=void 0,M=e.labelPosition,A=d.availableSize.width,T=P.length,k=T-1;k>=0;--k)if(L=P.substring(0,k)+"...",R=i.measureText(L,e.labelStyle).width,p===A/2?p-R/2>=0&&p+R/2<=A:"Outside"===M&&(p>=A/2&&p+R<=A||p<=A/2&&p-R>=0)||"Inside"===M&&(p+R<=A/2||p-R>=A/2)){a=k===T-1?P:L,h.size.width=i.measureText(a,e.labelStyle).width,h.text=a;break}if(v[S]=this.getLabelRegion(p,u,h,m),0===S?s=p:S===e.visibleLabels.length-1&&"Category"!==e.valueType&&(l=i.measureText(a,e.labelStyle).height,a=(l+=p)>s?"":a),0!==S&&"Hide"===b)for(var _=S;_>=0;_--){if(_=0===_?0:_===S?_-1:_,f[_]&&Le(v[S],v[_])){c=!0,f[S]=!1;break}f[S]=!0}if(!c&&r&&(c=Le(v[S],r))){var O=this.getAvailableSpaceToTrim(r,v[S]);O>0&&(a=Ie(O,e.visibleLabels[S].originalText,e.labelStyle),c=!1)}o=new i.TextOption(d.element.id+t+"_AxisLabel_"+S,p,u,m,a,"","central"),c||(this.visibleAxisLabelRect.push(v[S]),Ve(d.renderer,o,h.labelStyle,h.labelStyle.color||d.themeStyle.axisLabel,g,!1,d.redraw,!0,!0,null,null,null,null,d.enableCanvas))}this.element.appendChild(g)},t.prototype.getAvailableSpaceToTrim=function(e,t){var i=e.x,r=i+e.width,o=t.x,n=o+t.width,a=0;return o>i&&o<r&&n>r?a=n-r:o>i&&o<r&&n<r?a=0:n>i&&n<r&&o<i?a=i-o:n>i&&n>r&&o<i&&(a=i-o),a},t.prototype.getLabelRegion=function(e,t,r,o){return"middle"===o?e-=r.size.width/2:"end"===o?e-=r.size.width:e=e,t-=r.size.height/2,new i.Rect(e,t,r.size.width,r.size.height)},t.prototype.renderTickLine=function(e,t,r,o,n){var a,s,l,h=this.chart;e.majorTickLines.width>0&&(s=(l=he(h.element.id+"_MajorTickLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MajorTickLine_"+t+"_"+n,"transparent",e.majorTickLines.width,e.majorTickLines.color||h.themeStyle.majorTickLine,null,null,r),l=h.renderer.drawPath(a),this.setPointerEventNone(l),be(h.enableCanvas,h.yAxisElements,l,h.redraw,!0,"x","y",null,s)),e.minorTickLines.width>0&&(s=(l=he(h.element.id+"_MinorTickLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MinorTickLine_"+t+"_"+n,"transparent",e.minorTickLines.width,e.minorTickLines.color||h.themeStyle.minorTickLine,null,null,o),l=h.renderer.drawPath(a),this.setPointerEventNone(l),be(h.enableCanvas,h.yAxisElements,l,h.redraw,!0,"x","y",null,s))},t.prototype.renderGridLine=function(e,t,r,o,n){var a,s,l,h=this.chart;e.majorGridLines.width>0&&(s=(l=he(h.element.id+"_MajorGridLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MajorGridLine_"+t+"_"+n,"transparent",e.majorGridLines.width,e.majorGridLines.color||h.themeStyle.majorGridLine,null,e.majorGridLines.dashArray,r),be(h.enableCanvas,this.element,h.renderer.drawPath(a),h.redraw,!0,"x","y",null,s)),e.minorGridLines.width>0&&(s=(l=he(h.element.id+"_MinorGridLine_"+t+"_"+n))?l.getAttribute("d"):null,a=new i.PathOption(h.element.id+"_MinorGridLine_"+t+"_"+n,"transparent",e.minorGridLines.width,e.minorGridLines.color||h.themeStyle.minorGridLine,null,e.minorGridLines.dashArray,o),be(h.enableCanvas,this.element,h.renderer.drawPath(a),h.redraw,!0,"x","y",null,s))},t.prototype.setPointerEventNone=function(e){e&&e.setAttribute("style","pointer-events:none")},t}(Nr),Jr=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kr=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Jr(r,e),r.prototype.render=function(e,i,r,o){for(var n=G(e.drawType),a=r.minimum,s=r.maximum,l=0,h=e.points;l<h.length;l++){var c=h[l];c.visible=c.visible&&!(!t.isNullOrUndefined(a)&&c.yValue<a||!t.isNullOrUndefined(s)&&c.yValue>s)}e.points.length&&(e.drawType.indexOf("Column")>-1?this.columnDrawTypeRender(e,i,r):e.chart[n+"SeriesModule"].render(e,i,r,o))},r.prototype.columnDrawTypeRender=function(e,t,r){var o,n,a,s,l,h,c,d,p,u,g,y,m,f,b,x,w,C,P,L,R=t.actualRange.min,M=e.clipRect.width/2+e.clipRect.x,A=e.clipRect.height/2+e.clipRect.y,T="RangeColumn"===e.drawType,k="Polar"===e.type,_="Logarithmic"===r.valueType,O="StackingColumn"===e.drawType,E="",I=0,D=(e.points[1]?e.points[1].xValue:2*e.points[0].xValue)-e.points[0].xValue,B="Category"===t.valueType&&"BetweenTicks"===t.labelPlacement?0:t.isInversed?-D/2:D/2,N="DateTime"===t.valueType?t.dateTimeInterval:1;this.getSeriesPosition(e);var F=t.isInversed?e.rectCount-1-e.position:e.position;do{I+=N,R+=N}while(R<=t.actualRange.max-("Category"===t.valueType?0:1));for(var V=0,j=e.points;V<j.length;V++){var H=j[V];H.symbolLocations=[],H.regions=[],H.visible&&S(e.points[H.index-1],H,e.points[H.index+1],e)&&(l=(t.isInversed?t.visibleRange.max-H.xValue:H.xValue-t.visibleRange.min)+(D/e.rectCount*F-B)+I/360*t.startAngle,l/=I,a=2*Math.PI*(l+t.startAngle),s=2*Math.PI*(l+t.startAngle+D/e.rectCount/I),0===a&&0===s?(s=2*Math.PI,L="1"):L="0",c=a,d=s,a=a-.5*Math.PI+e.columnSpacing/2,s=s-.5*Math.PI-1e-6-e.columnSpacing/2,O||T?(m=T?H.low:e.stackedValues.startValues[H.index],f=T?H.high:e.stackedValues.endValues[H.index],f=(f=_?v(0===f?1:f,r.logBase):f)>r.actualRange.max?r.actualRange.max:f):(m=r.visibleRange.min,f=H.yValue>r.actualRange.max?r.actualRange.max:H.yValue),p=M+(h=m===f?0:e.chart.radius*z(f,r))*Math.cos(a),u=M+h*Math.cos(s),g=A+h*Math.sin(a),y=A+h*Math.sin(s),x=M+(b=e.chart.radius*z(0===m&&0!==r.visibleRange.min?r.visibleRange.min:m,r))*Math.cos(a),w=A+b*Math.sin(a),C=M+b*Math.cos(s),P=A+b*Math.sin(s),E=k?"M "+p+" "+g+" A "+h+" "+h+" 0 "+L+" 1 "+u+" "+y+" L "+C+" "+P+" A "+b+" "+b+" 1 0 0 "+x+" "+w+" Z":"M "+p+" "+g+" L "+u+" "+y+" L "+C+" "+P+" L "+x+" "+w+" Z",H.regionData=new Ei(c,d,b,h,l),n=this.triggerEvent(e.chart,e,H),o=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+H.index,n.fill,n.border.width,n.border.color,e.opacity,e.dashArray,E),n.cancel||(this.appendLinePath(o,e,""),k?(H.symbolLocations.push({x:M+h*Math.cos(a+(s-a)/2),y:A+h*Math.sin(a+(s-a)/2)}),T&&H.symbolLocations.push({x:M+b*Math.cos(a+(s-a)/2),y:A+b*Math.sin(a+(s-a)/2)})):(H.symbolLocations.push({x:(p+u)/2,y:(g+y)/2}),T&&H.symbolLocations.push({x:(C+x)/2,y:(P+w)/2}))))}this.renderMarker(e),e.isRectSeries=!0},r.prototype.triggerEvent=function(e,t,i){var r={cancel:!1,name:"pointRender",series:t,point:i,fill:t.setPointColor(i,t.interior),border:t.setBorderColor(i,{width:t.border.width,color:t.border.color})};return e.trigger("pointRender",r),i.color=r.fill,r},r.prototype.getSeriesPosition=function(e){for(var t=[],i=[],r={rectCount:0,position:null},o=0,n=e.chart.visibleSeries;o<n.length;o++){var a=n[o];!a.visible||"Polar"!==a.type&&"Radar"!==a.type||-1===a.drawType.indexOf("Column")||t.push(a)}for(l=0;l<t.length;l++){var s=t[l];-1!==s.drawType.indexOf("Stacking")?s.stackingGroup?void 0===i[s.stackingGroup]?(s.position=r.rectCount,i[s.stackingGroup]=r.rectCount++):s.position=i[s.stackingGroup]:null===r.position?(s.position=r.rectCount,r.position=r.rectCount++):s.position=r.position:s.position=r.rectCount++}for(var l=0;l<t.length;l++)t[l].rectCount=r.rectCount},r.prototype.doAnimation=function(e){var t=e.animation.duration,i=e.animation.delay,r=e.seriesElement.childNodes,o=1;if("Scatter"===e.drawType)for(var n=0,a=e.points;n<a.length;n++){var s=a[n];s.symbolLocations.length&&r[o]&&(Q(r[o],i,t,e,s.index,s.symbolLocations[0],!1),o++)}else for(o=1;o<r.length;o++)this.doPolarRadarAnimation(r[o],i,t,e)},r.prototype.doPolarRadarAnimation=function(e,i,r,o){var n=o.clipRect.width/2+o.clipRect.x,a=o.clipRect.height/2+o.clipRect.y,s=0;e.style.visibility="hidden",new t.Animation({}).animate(e,{duration:r,delay:i,progress:function(t){t.timeStamp>t.delay&&(t.element.style.visibility="visible",s=(t.timeStamp-t.delay)/t.duration,e.setAttribute("transform","translate("+n+" "+a+") scale("+s+") translate("+-n+" "+-a+")"))},end:function(){e.style.visibility="visible",e.removeAttribute("transform"),o.chart.trigger("animationComplete",{series:o.chart.isBlazor?{}:o})}})},r.prototype.getPolarIsInversedPath=function(e,t){var i,r,o,n=this.chart.radius,a=t,s=e.isInversed?"1 1 ":"1 0 ";return i=B(N(e.visibleLabels[0].value,e),this.startAngle),r=this.centerX+n*i.x,o=this.centerY+n*i.y,a+="L "+r+" "+o+" A "+n+" "+n+" 0 "+s+r+" "+(this.centerY+n)+" A "+n+" "+n+" 0 "+s+r+" "+o+" "},r.prototype.getModuleName=function(){return"PolarSeries"},r.prototype.destroy=function(){},r}($r),eo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),to=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return eo(i,e),i.prototype.render=function(e,i,r,o){for(var n=G(e.drawType),a=r.minimum,s=r.maximum,l=0,h=e.points;l<h.length;l++){var c=h[l];c.visible=c.visible&&!(!t.isNullOrUndefined(a)&&c.yValue<a||!t.isNullOrUndefined(s)&&c.yValue>s)}e.points.length&&(-1===e.drawType.indexOf("Column")?e.chart[n+"SeriesModule"].render(e,i,r,o):this.columnDrawTypeRender(e,i,r))},i.prototype.getRadarIsInversedPath=function(e,t){var i,r,o=this.chart.radius,n=e.visibleLabels.length,a=t;r=B(N(e.visibleLabels[0].value,e),this.startAngle),i=this.centerY+o*r.y,a+=" L "+(this.centerX+o*r.x)+" "+i+" ";for(var s=n-1;s>=0;s--)r=B(N(e.visibleLabels[s].value,e),this.startAngle),i=this.centerY+o*r.y,a+="L "+(this.centerX+o*r.x)+" "+i+" ";return a},i.prototype.getModuleName=function(){return"RadarSeries"},i.prototype.destroy=function(){},i}(Kr),io=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ro=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return io(t,e),t.prototype.render=function(e){for(var t,i,r=this.getSideBySideInfo(e),o=e.stackedValues,n=0,a=e.points;n<a.length;n++){var s=a[n];s.symbolLocations=[],s.regions=[],s.visible&&S(e.points[s.index-1],s,e.points[s.index+1],e)&&(t=this.getRectangle(s.xValue+r.start,o.endValues[s.index],s.xValue+r.end,o.startValues[s.index],e),(i=this.triggerEvent(e,s,e.interior,{width:e.border.width,color:e.border.color})).cancel||(this.drawRectangle(e,s,t,i),this.updateSymbolLocation(s,t,e)))}this.renderMarker(e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingBarSeries"},t.prototype.doAnimation=function(e){this.animate(e)},t}(jr),oo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),no=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oo(t,e),t.prototype.render=function(e){for(var t,i=this.getSideBySideInfo(e),r=Math.max(e.border.width,1),o=0,n=e.points;o<n.length;o++){var a=n[o],s="",l=void 0,h=void 0;a.regions=[],a.symbolLocations=[],a.visible&&S(e.points[a.index-1],a,e.points[a.index+1],e)&&(h=this.getRectangle(a.xValue+i.median,Math.max(a.high,a.low),a.xValue+i.median,Math.min(a.high,a.low),e),e.chart.requireInvertedAxis?(h.y-=r/2,h.height=r):(h.x-=r/2,h.width=r),l=this.getRectangle(a.xValue+i.start,Math.max(a.open,a.close),a.xValue+i.end,Math.min(a.open,a.close),e),s=this.getPathString(h,l,e),(t=this.triggerPointRenderEvent(e,a)).cancel||(this.drawCandle(e,a,l,t,s),this.updateSymbolLocation(a,h,e),this.updateSymbolLocation(a,l,e)))}},t.prototype.triggerPointRenderEvent=function(e,t){var i=this.getCandleColor(t,e),r={color:e.border.color,width:Math.max(e.border.width,1)};return this.triggerEvent(e,t,i,r)},t.prototype.getCandleColor=function(e,t){var i=t.points[e.index-1];return!1===t.enableSolidCandles?i&&i.close>e.close?t.bullFillColor:t.bearFillColor:e.open>e.close?t.bullFillColor:t.bearFillColor},t.prototype.getPathString=function(e,t,i){var r="",o=i.chart.requireInvertedAxis?e.y+e.height/2:e.x+e.width/2;return r+=i.chart.requireInvertedAxis?"M "+e.x+" "+o+" L "+t.x+" "+o:"M "+o+" "+e.y+" L "+o+" "+t.y,r=r.concat(" M "+t.x+" "+t.y+" L "+(t.x+t.width)+" "+t.y+" L "+(t.x+t.width)+" "+(t.y+t.height)+" L "+t.x+" "+(t.y+t.height)+" Z"),r+=i.chart.requireInvertedAxis?" M "+(t.x+t.width)+" "+o+" L "+(e.x+e.width)+" "+o:" M "+o+" "+(t.y+t.height)+" L "+o+" "+(e.y+e.height)},t.prototype.drawCandle=function(e,t,r,o,n){if((e.chart.requireInvertedAxis?r.height:r.width)<=0)return null;var a=e.enableSolidCandles?o.fill:t.open>t.close?o.fill:"transparent";o.border.color=o.fill;var s=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+t.index,a,o.border.width,o.border.color,e.opacity,e.dashArray,n),l=he(s.id),h=l?l.getAttribute("d"):null,c=e.chart.renderer.drawPath(s,new Int32Array([e.clipRect.x,e.clipRect.y]));c.setAttribute("aria-label",t.x.toString()+":"+t.high.toString()+":"+t.low.toString()+":"+t.close.toString()+":"+t.open.toString()),e.chart.enableCanvas||e.seriesElement.appendChild(c),J(l,n,e.chart.redraw,h)},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.getModuleName=function(){return"CandleSeries"},t.prototype.destroy=function(){},t}(jr),ao=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ao(t,e),t.prototype.render=function(e){e.isRectSeries=!0;for(var t,i,r=this.getSideBySideInfo(e),o=e.stackedValues,n=g(e),a=0,s=n;a<s.length;a++){var l=s[a];l.symbolLocations=[],l.regions=[],l.visible&&S(n[l.index-1],l,n[l.index+1],e)&&(t=this.getRectangle(l.xValue+r.start,o.endValues[l.index],l.xValue+r.end,o.startValues[l.index],e),(i=this.triggerEvent(e,l,e.interior,{width:e.border.width,color:e.border.color})).cancel||(this.drawRectangle(e,l,t,i),this.updateSymbolLocation(l,t,e)))}this.renderMarker(e)},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingColumnSeries"},t}(jr),lo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return lo(t,e),t.prototype.render=function(e,t,r,o){var n,a,s,l="",h="M",c=null,d=this.enableComplexProperty(e);n="Category"===t.valueType&&"BetweenTicks"===t.labelPlacement?.5:0;for(var p=0,u=d;p<u.length;p++){var g=u[p];g.symbolLocations=[],g.regions=[],g.visible&&S(d[g.index-1],g,d[g.index+1],e)?(null!=c?(s=ve(g.xValue,g.yValue,t,r,o),a=ve(c.xValue,c.yValue,t,r,o),l=l.concat(h+" "+a.x+" "+a.y+" L "+s.x+" "+a.y+" L "+s.x+" "+s.y+" "),h="L"):(a=ve(g.xValue-n,g.yValue,t,r,o),l=l.concat(h+" "+a.x+" "+a.y+" "),h="L"),this.storePointLocation(g,e,o,ve),c=g):(c="Drop"===e.emptyPointSettings.mode?c:null,h="Drop"===e.emptyPointSettings.mode?h:"M")}d.length>0&&(a=ve(d[d.length-1].xValue+n,d[d.length-1].yValue,t,r,o),l=l.concat(h+" "+a.x+" "+a.y+" "));var y=new i.PathOption(e.chart.element.id+"_Series_"+e.index,"transparent",e.width,e.interior,e.opacity,e.dashArray,l);this.appendLinePath(y,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StepLineSeries"},t}(Nr),co=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return co(t,e),t.prototype.render=function(e,t,r,o){var n,a,s,l,h,c=null,d="",p=this.enableComplexProperty(e),u=p.length,g=Math.max(e.yAxis.visibleRange.min,0),y=null;h="Category"===t.valueType&&"BetweenTicks"===t.labelPlacement?.5:0;for(var m=0;m<u;m++)l=(s=p[m]).xValue,s.symbolLocations=[],s.regions=[],s.visible&&S(p[m-1],s,p[m+1],e)&&(null===c&&(c=new Vi(l,0),d+="M "+(n=ve(l-h,g,t,r,o)).x+" "+n.y+" ",d+="L "+(n=ve(l-h,s.yValue,t,r,o)).x+" "+n.y+" "),null!=y?(n=ve(s.xValue,s.yValue,t,r,o),a=ve(y.xValue,y.yValue,t,r,o),d+="L "+n.x+" "+a.y+" L "+n.x+" "+n.y+" "):"Gap"===e.emptyPointSettings.mode&&(d+="L "+(n=ve(s.xValue,s.yValue,t,r,o)).x+" "+n.y+" "),this.storePointLocation(s,e,o,ve),y=s),p[m+1]&&!p[m+1].visible&&"Drop"!==e.emptyPointSettings.mode&&(d+="L "+(n=ve(l+h,g,t,r,o)).x+" "+n.y,c=null,y=null);u>1&&""!==d?(d+="L "+(a=ve((c={x:p[u-1].xValue+h,y:p[u-1].yValue}).x,c.y,t,r,o)).x+" "+a.y+" ",d+="L "+(a=ve((c={x:p[u-1].xValue+h,y:g}).x,c.y,t,r,o)).x+" "+a.y+" "):d="";var v=new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,d);this.appendLinePath(v,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StepAreaSeries"},t}(Nr),uo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),go=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return uo(t,e),t.prototype.render=function(e,t,r,o){var n,a,s="PolarRadar"===e.chart.chartAreaType,l=s?I:ve,h="",c=this.enableComplexProperty(e),d=c.length,p=e.stackedValues,u=s?Math.max(e.yAxis.visibleRange.min,p.endValues[0]):Math.max(e.yAxis.visibleRange.min,p.startValues[0]),g=0;d>0&&(n=l(c[0].xValue,u,t,r,o,e),h=h.concat("M "+n.x+" "+n.y+" "));for(var y=e.chart&&"PolarRadar"===e.chart.chartAreaType,m=0;m<d;m++)if(c[m].symbolLocations=[],c[m].regions=[],c[m].visible&&S(c[m-1],c[m],c[m+1],e))n=l(c[m].xValue,p.endValues[m],t,r,o,e),h=h.concat("L "+n.x+" "+n.y+" "),c[m].symbolLocations.push(l(c[m].xValue,p.endValues[m],t,r,o,e)),c[m].regions.push(new i.Rect(c[m].symbolLocations[0].x-e.marker.width,c[m].symbolLocations[0].y-e.marker.height,2*e.marker.width,2*e.marker.height));else if(!y&&"Drop"!==e.emptyPointSettings.mode){for(b=m-1;b>=g;b--)a=l(c[b].xValue,p.startValues[b],t,r,o,e),h=h.concat("L "+a.x+" "+a.y+" ");c[m+1]&&c[m+1].visible&&(!y||y&&this.withinYRange(c[m+1],r))&&(n=l(c[m+1].xValue,p.startValues[m+1],t,r,o,e),h=h.concat("M "+n.x+" "+n.y+" ")),g=m+1}if("PolarRadar"===e.chart.chartAreaType&&c.length>1){var v=this.getFirstLastVisiblePoint(e.points),f=this.chart;h+="L "+(a=l((n={x:v.first.xValue,y:p.endValues[v.first.index]}).x,n.y,t,r,o,e)).x+" "+a.y+" ",1===this.chart.visible&&(t.isInversed||r.isInversed)&&(this.chart.enableAnimation=!1,h="Polar"===e.type?f.polarSeriesModule.getPolarIsInversedPath(t,h):f.radarSeriesModule.getRadarIsInversedPath(t,h))}if(!y||y&&e.index!==this.getFirstSeriesIndex(e.chart.visibleSeries))for(var b=d-1;b>=g;b--)if(!y||c[b].visible){var x=this.getPreviousSeries(e);"Drop"===x.emptyPointSettings.mode&&x.points[b].isEmpty||(a=l(c[b].xValue,p.startValues[b],t,r,o,e),p.startValues[b]===p.endValues[b]&&(a.y=Math.floor(a.y)),h=h.concat((b===d-1&&s?"M":"L")+" "+a.x+" "+a.y+" "))}var w=new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,h);this.appendLinePath(w,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingAreaSeries"},t.prototype.getPreviousSeries=function(e){for(var t=e.chart.visibleSeries,i=0,r=t.length;i<r;i++)if(e.index===t[i].index&&0!==i)return t[i-1];return t[0]},t.prototype.getFirstSeriesIndex=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];if(r.visible)return r.index}return 0},t}(Nr),yo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yo(t,e),t.prototype.render=function(e,t,r,o){var n,a,s,l,h,c,d,p,u,g,y=null,m="",v=e.stackedValues,f=this.enableComplexProperty(e),b=Math.max(e.yAxis.visibleRange.min,v.startValues[0]),x=f.length,w=null,C=0;p="Category"===t.valueType&&"BetweenTicks"===t.labelPlacement?.5:0;for(var P=0;P<x;P++)if(l=f[P],d=l.xValue,l.symbolLocations=[],l.regions=[],g=l.index,l.visible&&S(f[P-1],l,f[P+1],e)&&(null===y&&(y=new Vi(d,0),m+="M "+(n=ve(d-p,b,t,r,o)).x+" "+n.y+" ",m+="L "+(n=ve(d-p,v.endValues[g],t,r,o)).x+" "+n.y+" "),null!=w?(n=ve(l.xValue,v.endValues[g],t,r,o),a=ve(w.xValue,v.endValues[w.index],t,r,o),m+="L "+n.x+" "+a.y+" L "+n.x+" "+n.y+" "):"Gap"===e.emptyPointSettings.mode&&(m+="L "+(n=ve(l.xValue,v.endValues[g],t,r,o)).x+" "+n.y+" "),f[P].symbolLocations.push(ve(f[P].xValue,v.endValues[g],t,r,o)),f[P].regions.push(new i.Rect(f[P].symbolLocations[0].x-e.marker.width,f[P].symbolLocations[0].y-e.marker.height,2*e.marker.width,2*e.marker.height)),w=l),f[P+1]&&!f[P+1].visible&&"Drop"!==e.emptyPointSettings.mode){for(var L=void 0,R=P;R>=C;R--)g=f[R].index,L=0===R?0:f[R-1].index,0!==R&&(v.startValues[g]<v.startValues[L]||v.startValues[g]>v.startValues[L])?(n=ve(f[g].xValue,v.startValues[g],t,r,o),m=m.concat("L "+n.x+" "+n.y+" "),n=ve(f[g].xValue,v.startValues[L],t,r,o)):n=ve(f[g].xValue,v.startValues[g],t,r,o),m=m.concat("L "+n.x+" "+n.y+" ");C=P+1,y=null,w=null}if(""!==m){x>1&&(g=f[x-1].index,m+="L "+(a=ve((y={x:f[x-1].xValue+p,y:v.endValues[g]}).x,y.y,t,r,o)).x+" "+a.y+" ",m+="L "+(a=ve((y={x:f[x-1].xValue+p,y:v.startValues[g]}).x,y.y,t,r,o)).x+" "+a.y+" ");for(R=x-1;R>=C;R--){var M=void 0;f[R].visible&&(g=f[R].index,h=ve(f[R].xValue,v.startValues[g],t,r,o),m=m.concat("L "+h.x+" "+h.y+" ")),0===R||f[R-1].visible||(M=this.getNextVisiblePointIndex(f,R)),0!==R&&(u=M||R-1,g=M?f[M].index:f[R-1].index,c=ve(f[u].xValue,v.startValues[g],t,r,o),m=m.concat("L "+h.x+" "+c.y+" "))}s=new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,m),this.appendLinePath(s,e,""),this.renderMarker(e)}},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingStepAreaSeries"},t.prototype.getNextVisiblePointIndex=function(e,t){var i;for(i=t-1;i>=0;i--)if(e[i].visible)return i;return 0},t}(Nr),vo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return vo(t,e),t.prototype.render=function(e,t,r,o){for(var n,a,s="PolarRadar"===e.chart.chartAreaType?I:ve,l="",h=this.enableComplexProperty(e),c=h.length,d=e.stackedValues,p=0;p<c;p++)h[p].regions=[],h[p].symbolLocations=[],h[p].visible&&S(h[p-1],h[p],h[p+1],e)?(n=s(h[p].xValue,d.endValues[p],t,r,o,e),l=l.concat((p?"L":"M")+" "+n.x+" "+n.y+" "),h[p].symbolLocations.push(s(h[p].xValue,d.endValues[p],t,r,o,e)),h[p].regions.push(new i.Rect(h[p].symbolLocations[0].x-e.marker.width,h[p].symbolLocations[0].y-e.marker.height,2*e.marker.width,2*e.marker.height))):"Drop"!==e.emptyPointSettings.mode&&h[p+1]&&h[p+1].visible&&(n=s(h[p+1].xValue,d.endValues[p+1],t,r,o,e),l=l.concat("M "+n.x+" "+n.y+" "));"PolarRadar"===e.chart.chartAreaType&&h.length>1&&(l+="L "+(a=s((n={y:d.endValues[0],x:e.points[0].xValue}).x,n.y,t,r,o,e)).x+" "+a.y+" ");var u=new i.PathOption(e.chart.element.id+"_Series_"+e.index,"none",e.width,e.interior,e.opacity,e.dashArray,l);this.appendLinePath(u,e,""),this.renderMarker(e)},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StackingLineSeries"},t}(Nr),bo=function(){function e(){}return e.prototype.render=function(e,t,i,r){e.isRectSeries=!1;for(var o,n,a=e.marker,s=this.enableComplexProperty(e),l="PolarRadar"===e.chart.chartAreaType?I:ve,h=e.chart.redraw,c=0,d=s;c<d.length;c++){var p=d[c];n=h&&p.symbolLocations?p.symbolLocations[0]:null,p.symbolLocations=[],p.regions=[],p.visible&&S(s[p.index-1],p,s[p.index+1],e)&&(o={cancel:!1,name:"pointRender",series:e,point:p,fill:e.setPointColor(p,e.interior),border:e.setBorderColor(p,{width:e.border.width,color:e.border.color}),height:a.height,width:a.width,shape:a.shape},e.chart.trigger("pointRender",o),o.cancel?p.marker={visible:!0}:(p.symbolLocations.push(l(p.xValue,p.yValue,t,i,r,e)),p.color=o.fill,this.refresh(e,p,o,n)))}},e.prototype.enableComplexProperty=function(e){for(var i=[],r=[],o=e.yAxis.visibleRange,n=e.xAxis.visibleRange,a=e.clipRect,s=e.points,l=Math.abs(o.delta/a.height),h=Math.abs(n.delta/a.width),c=s[0]&&s[0].y>l?0:l,d=s[0]&&s[0].x>h?0:h,p=0,u=0,g=0,y=s;g<y.length;g++){var m=y[g];m.symbolLocations=[],p=m.yValue?m.yValue:o.min,u=m.xValue?m.xValue:n.min,(Math.abs(c-p)>=l||Math.abs(d-u)>=h)&&(r.push(m),c=p,d=u)}for(var v,f=0;f<r.length;f++)v=r[f],t.isNullOrUndefined(v.x)||""===v.x||i.push(v);return i},e.prototype.refresh=function(e,t,r,o){var n,a,s=e.chart,l=e.marker,h=new i.PathOption(s.element.id+"_Series_"+e.index+"_Point_"+t.index,r.fill,r.border.width,r.border.color,e.opacity,null);s.redraw&&he(h.id)&&(n="Circle"===r.shape?"c":"",a=he(h.id).getAttribute("d")),be(!1,e.seriesElement,ne(t.symbolLocations[0],r.shape,new i.Size(r.width,r.height),l.imageUrl,h,t.x.toString()+":"+t.yValue.toString(),e.chart.svgRenderer,e.clipRect),s.redraw,!0,n+"x",n+"y",o,a),t.regions.push(new i.Rect(t.symbolLocations[0].x-l.width,t.symbolLocations[0].y-l.height,2*l.width,2*l.height)),t.marker={border:r.border,fill:r.fill,height:r.height,visible:!0,width:r.width,shape:r.shape}},e.prototype.doAnimation=function(e){for(var t=e.animation.duration,i=e.animation.delay,r=e.seriesElement.childNodes,o=1,n=0,a=e.points;n<a.length;n++){var s=a[n];s.symbolLocations.length&&r[o]&&(Q(r[o],i,t,e,s.index,s.symbolLocations[0],!1),o++)}},e.prototype.getModuleName=function(){return"ScatterSeries"},e.prototype.destroy=function(){},e}(),xo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xo(t,e),t.prototype.render=function(e){for(var t,i,r=this.getSideBySideInfo(e),o=0,n=e.points;o<n.length;o++){var a=n[o];a.symbolLocations=[],a.regions=[],a.visible&&S(e.points[a.index-1],a,e.points[a.index+1],e)&&(t=this.getRectangle(a.xValue+r.start,a.high,a.xValue+r.end,a.low,e),(i=this.triggerEvent(e,a,e.interior,{width:e.border.width,color:e.border.color})).cancel||(this.updateSymbolLocation(a,t,e),this.drawRectangle(e,a,t,i)))}this.renderMarker(e)},t.prototype.getModuleName=function(){return"RangeColumnSeries"},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.destroy=function(){},t}(jr),So=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return So(t,e),t.prototype.render=function(e){for(var t,r,o,n,a=this.getSideBySideInfo(e),s=Math.max(e.yAxis.visibleRange.min,0),l=0,h="",c=0,d=null,p=e.chart.requireInvertedAxis,u=0,g=e.chart.redraw,y=0,m=e.points;y<m.length;y++){var v=m[y];if(v.symbolLocations=[],v.regions=[],v.visible&&S(e.points[v.index-1],v,e.points[v.index+1],e)){var f=this.isIntermediateSum(e,v.index),b=this.isSumIndex(e,v.index);c+=f||!0===b?0:v.yValue,o=!0===f?u:null===l||b?s:l,t=this.getRectangle(v.xValue+a.start,c,v.xValue+a.end,o,e),r=this.triggerPointRenderEvent(e,v),f&&(u=c),l=c,r.cancel||(this.updateSymbolLocation(v,t,e),this.drawRectangle(e,v,t,r));var x=v.regions[0];if(null!==d){var w=p?d.x:d.y,C=p?x.x:x.y,P=void 0,L=void 0,R=x.y,M=x.x,A=e.points[v.index-1];0===v.yValue?(P=p?d.x+d.width:d.y+d.height,L=p?v.symbolLocations[0].x:v.symbolLocations[0].y):(P=p?0===A.yValue?A.symbolLocations[0].x:d.x+d.width:0===A.yValue?A.symbolLocations[0].y:d.y+d.height,L=p?x.x+x.width:x.y+x.height),Math.round(w)===Math.round(C)||Math.round(P)===Math.round(C)?(n=p?0===x.x&&0===d.x?L:x.x:x.y,n=0===v.yValue?p?v.symbolLocations[0].x:v.symbolLocations[0].y:n):n=L,p?(0===A.yValue&&(d.y=d.y+d.height/2+t.height/2-d.height),0===v.yValue&&(R=x.y+x.height/2-t.height/2),h=h.concat("M "+n+" "+(d.y+d.height)+" L "+n+" "+R+" ")):(0===A.yValue&&(d.x=d.x+d.width/2-t.width/2,M=x.x+x.width/2+t.width/2-x.width),h=h.concat("M "+d.x+" "+n+" L "+(M+x.width)+" "+n+" "))}d=v.regions[0]}}var T=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Connector_","none",e.connector.width,e.connector.color,e.opacity,e.connector.dashArray,h);g&&he(T.id)&&(h=he(T.id).getAttribute("d"));var k=Ne(g,T.id,T,e.chart.renderer)||e.chart.renderer.drawPath(T,new Int32Array([e.clipRect.x,e.clipRect.y]));k.style.visibility=e.chart.enableCanvas?null:e.animation.enable&&e.chart.animateSeries?"hidden":"visible",be(e.chart.enableCanvas,e.seriesElement,k,g,!0,null,null,null,h),this.renderMarker(e)},t.prototype.isIntermediateSum=function(e,t){return void 0!==e.intermediateSumIndexes&&-1!==e.intermediateSumIndexes.indexOf(t)},t.prototype.isSumIndex=function(e,t){return void 0!==e.sumIndexes&&-1!==e.sumIndexes.indexOf(t)},t.prototype.triggerPointRenderEvent=function(e,t){var i,r=this.isIntermediateSum(e,t.index),o=this.isSumIndex(e,t.index);return i=r||o?e.summaryFillColor:t.y<0?e.negativeFillColor:e.interior,this.triggerEvent(e,t,i,{color:e.border.color,width:e.border.width})},t.prototype.processInternalData=function(e,t){var i,r=e,o=t.intermediateSumIndexes,n=t.sumIndexes;if(void 0!==o&&o.length>0)for(var a=0;a<o.length;a++)for(l=0;l<r.length;l++)l===o[a]&&(i=0===a?P(r,-1,o[a],null,t):P(r,o[a-1],o[a],null,t),r[l][t.yName]=i);if(void 0!==n&&n.length>0)for(var s=0;s<n.length;s++)for(var l=0;l<r.length;l++)l===n[s]&&(i=void 0!==o?P(r,o[s]-1,n[s],n,t):P(r,-1,n[s],null,t),r[l][t.yName]=i);return r},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.getModuleName=function(){return"WaterfallSeries"},t.prototype.destroy=function(){},t}(jr),Po=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Po(t,e),t.prototype.render=function(e){for(var t,i,r=this.getSideBySideInfo(e),o=0,n=e.points;o<n.length;o++){var a=n[o];a.symbolLocations=[],a.regions=[],a.visible&&S(e.points[a.index-1],a,e.points[a.index+1],e)&&(t=this.getRectangle(a.xValue+r.median,a.high,a.xValue+r.median,a.low,e),(i=this.triggerPointRenderEvent(e,a)).cancel||(e.chart.requireInvertedAxis?(t.height=i.border.width,t.y=t.y-t.height/2):(t.width=i.border.width,t.x=t.x-t.width/2),i.border.width=0,this.updateSymbolLocation(a,t,e),this.drawRectangle(e,a,t,i)))}},t.prototype.triggerPointRenderEvent=function(t,i){var r={color:t.fill,width:Math.max(t.border.width,2)};return e.prototype.triggerEvent.call(this,t,i,t.interior,r)},t.prototype.getModuleName=function(){return"HiloSeries"},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.destroy=function(){},t}(jr),Ro=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ro(t,e),t.prototype.render=function(e){for(var t,i,r,o,n=this.getSideBySideInfo(e),a=Math.max(e.border.width,2),s=0,l=e.points;s<l.length;s++){var h=l[s];if(h.symbolLocations=[],h.regions=[],h.visible&&S(e.points[h.index-1],h,e.points[h.index+1],e)){if(t=this.getRectangle(h.xValue+n.start,Math.max(h.high,h.low),h.xValue+n.end,Math.min(h.high,h.low),e),h.regions.push(this.getRectangle(h.xValue+n.median,Math.max(h.high,h.low),h.xValue+n.median,Math.min(h.high,h.low),e)),this.updateTickRegion(!e.chart.requireInvertedAxis,h.regions[0],a),h.regions.push(this.getRectangle(h.xValue+n.start,Math.max(h.open,h.close),h.xValue+n.median,Math.max(h.open,h.close),e)),h.regions.push(this.getRectangle(h.xValue+n.median,Math.min(h.open,h.close),h.xValue+n.end,Math.min(h.open,h.close),e)),!(o=this.triggerPointRenderEvent(e,h)).cancel){this.updateSymbolLocation(h,h.regions[0],e),i=h.open>h.close?1:2,r=h.open>h.close?2:1;var c={x:h.regions[i].x,y:h.regions[i].y},d={x:h.regions[r].x,y:h.regions[r].y};this.drawHiloOpenClosePath(e,h,c,d,t,o)}this.updateTickRegion(e.chart.requireInvertedAxis,h.regions[1],a),this.updateTickRegion(e.chart.requireInvertedAxis,h.regions[2],a)}}},t.prototype.updateTickRegion=function(e,t,i){e?(t.x-=i/2,t.width=i):(t.y-=i/2,t.height=i)},t.prototype.triggerPointRenderEvent=function(e,t){var i=t.open<=t.close?e.bearFillColor:e.bullFillColor,r={color:e.border.color,width:Math.max(e.border.width,1)};return this.triggerEvent(e,t,i,r)},t.prototype.drawHiloOpenClosePath=function(e,t,r,o,n,a){var s;e.chart.requireInvertedAxis?(s="M "+n.x+" "+(n.y+n.height/2)+" L "+(n.x+n.width)+" "+(n.y+n.height/2)+" ",s+="M "+r.x+" "+(n.y+n.height/2)+" L "+r.x+" "+(n.y+n.height)+" ",s+="M "+o.x+" "+(n.y+n.height/2)+" L "+o.x+" "+n.y+" "):(s="M "+(n.x+n.width/2)+" "+(n.y+n.height)+" L "+(n.x+n.width/2)+" "+n.y+" ",s+="M "+n.x+" "+r.y+" L "+(n.x+n.width/2)+" "+r.y+" ",s+="M "+(n.x+n.width/2)+" "+o.y+" L "+(n.x+n.width)+" "+o.y+" ");var l=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+t.index,a.fill,a.border.width,a.fill,e.opacity,e.dashArray,s);J(he(l.id),s,e.chart.redraw);var h=e.chart.renderer.drawPath(l,new Int32Array([e.clipRect.x,e.clipRect.y]));h.setAttribute("aria-label",t.x.toString()+":"+t.high.toString()+":"+t.low.toString()+":"+t.close.toString()+":"+t.open.toString()),e.chart.enableCanvas||e.seriesElement.appendChild(h)},t.prototype.getModuleName=function(){return"HiloOpenCloseSeries"},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.destroy=function(){},t}(jr),Ao=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ao(t,e),t.prototype.render=function(e,t,r,o){for(var n,a="",s="M",l=void 0,h=this.enableComplexProperty(e),c=0,d=h.length;c<d;c++){(n=h[c]).symbolLocations=[],n.regions=[];var p=Math.min(n.low,n.high),u=Math.max(n.low,n.high);if(r.isInversed){var g=p;p=u,u=g}var y=ve(n.xValue,p,t,r,o),m=ve(n.xValue,u,t,r,o);n.symbolLocations.push(m),n.symbolLocations.push(y);var v=new i.Rect(Math.min(y.x,m.x),Math.min(y.y,m.y),Math.max(Math.abs(m.x-y.x),e.marker.width),Math.max(Math.abs(m.y-y.y),e.marker.width));o?v.y-=e.marker.width/2:v.x-=e.marker.width/2,n.regions.push(v),n.visible&&S(h[n.index-1],n,h[n.index+1],e)?(a=a.concat(s+" "+y.x+" "+y.y+" "),l=!1,(c+1<h.length&&!h[c+1].visible||c===h.length-1)&&(s="M",a=(a=this.closeRangeAreaPath(h,n,e,a,c)).concat(" Z"),l=!0),s="L"):(!1===l&&0!==c&&(a=this.closeRangeAreaPath(h,n,e,a,c),l=!0),s="M",n.symbolLocations=[])}var f="Indicator"===e.category?e.chart.element.id+"_Indicator_"+e.index+"_"+e.name:e.chart.element.id+"_Series_"+e.index,b=new i.PathOption(f,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,a);this.appendLinePath(b,e,""),this.renderMarker(e)},t.prototype.closeRangeAreaPath=function(e,t,i,r,o){for(var n=o;n>=0&&(e[n].visible&&e[n].symbolLocations[0]);n--)r+="L "+(t=e[n]).symbolLocations[0].x+" "+t.symbolLocations[0].y+" ";return r},t.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},t.prototype.getModuleName=function(){return"RangeAreaSeries"},t.prototype.destroy=function(){},t}(Nr),ko=function(){function e(){}return e.prototype.render=function(e,t,r,o){var n,a,s,l,h,c,d=e.marker,p=e.points,u=Math.max(e.chart.initialClipRect.height,e.chart.initialClipRect.width),g=u/100,y=e.maxRadius*g,m=e.minRadius*g,v=null,f=e.chart.redraw;if(null===e.maxRadius||null===e.minRadius){for(var b=0,x=e.chart.visibleSeries;b<x.length;b++){var w=x[b];"Bubble"!==w.type||!0!==w.visible||null!==w.maxRadius&&null!==w.minRadius||(v=w.sizeMax>v?w.sizeMax:v)}m=y=1,l=u/5/2*y}else v=e.sizeMax,l=y-m;for(var C=0,P=p;C<P.length;C++){var L=P[C];L.symbolLocations=[],L.regions=[],L.visible&&S(p[L.index-1],L,p[L.index+1],e)&&(s=(s=null===e.maxRadius||null===e.minRadius?l*Math.abs(+L.size/v):m+l*Math.abs(+L.size/v))||m,a={cancel:!1,name:"pointRender",series:e,point:L,fill:e.setPointColor(L,e.interior),border:e.setBorderColor(L,{width:e.border.width,color:e.border.color}),height:2*s,width:2*s},e.chart.trigger("pointRender",a),a.cancel?L.marker={visible:!1}:(L.symbolLocations.push(ve(L.xValue,L.yValue,t,r,o)),L.color=a.fill,n=new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+L.index,a.fill,a.border.width,a.border.color,e.opacity,null),h=ne(L.symbolLocations[0],"Circle",new i.Size(a.width,a.height),d.imageUrl,n,L.x.toString()+":"+L.yValue.toString(),e.chart.svgRenderer,e.clipRect),be(!1,e.seriesElement,h,f),L.regions.push(new i.Rect(L.symbolLocations[0].x-s,L.symbolLocations[0].y-s,2*s,2*s)),L.marker={border:a.border,fill:a.fill,height:a.height,visible:!0,shape:"Circle",width:a.width},c=f?L.symbolLocations[0]:null,f&&Fe(h,300,c,L.symbolLocations[0],"cx","cy")))}},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"BubbleSeries"},e.prototype.doAnimation=function(e){for(var t=e.animation.duration,i=e.animation.delay,r=e.seriesElement.childNodes,o=1,n=0,a=e.points;n<a.length;n++){var s=a[n];s.symbolLocations.length&&(Q(r[o],i,t,e,s.index,s.symbolLocations[0],!1),o++)}},e}(),_o=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Oo=function(e){function i(t){var i=e.call(this,t)||this;return i.splinePoints=[],i}return _o(i,e),i.prototype.findSplinePoint=function(e){var t,i,r=[],o=[],n=0;r=this.filterEmptyPoints(e);for(var a=0;a<r.length;a++)null!==(i=r[a]).x&&""!==i.x&&(i.index=n,n++,o.push(i));if(this.splinePoints=this.findSplineCoefficients(o,e),o.length>1){e.drawPoints=[];for(var s=0,l=o;s<l.length;s++){var h=l[s];if(0!==h.index){var c=this.getPreviousIndex(o,h.index-1,e);t=this.getControlPoints(o[c],h,this.splinePoints[c],this.splinePoints[h.index],e),e.drawPoints.push(t);var d=e.yMax-e.yMin;h.yValue&&t.controlPoint1.y&&t.controlPoint2.y&&d>1&&(e.yMin=Math.min(e.yMin,h.yValue,t.controlPoint1.y,t.controlPoint2.y),e.yMax=Math.ceil(Math.max(e.yMax,h.yValue,t.controlPoint1.y,t.controlPoint2.y)),e.yMin="Logarithmic"!==e.yAxis.valueType?Math.floor(e.yMin):e.yMin)}}"PolarRadar"===e.chart.chartAreaType&&e.isClosed&&(t=this.getControlPoints({xValue:o[o.length-1].xValue,yValue:o[o.length-1].yValue},{xValue:o[o.length-1].xValue+1,yValue:o[0].yValue},this.splinePoints[0],this.splinePoints[o[o.length-1].index],e),e.drawPoints.push(t))}},i.prototype.getPreviousIndex=function(e,i,r){if("Drop"!==r.emptyPointSettings.mode)return i;for(;t.isNullOrUndefined(e[i])&&i>-1;)i-=1;return i},i.prototype.getNextIndex=function(e,i,r){if("Drop"!==r.emptyPointSettings.mode)return i;for(;t.isNullOrUndefined(e[i])&&i<e.length;)i+=1;return i},i.prototype.filterEmptyPoints=function(e,i){if("Drop"!==e.emptyPointSettings.mode&&this.isPointInRange(e.points))return i||e.points;for(var r=i||t.extend([],e.points,null,!0),o=0;o<r.length;o++)r[o].index=o,r[o].isEmpty&&(r[o].symbolLocations=[],r[o].regions=[],r.splice(o,1),o--);return r},i.prototype.isPointInRange=function(e){for(var t=0,i=e;t<i.length;t++)if(!i[t].isPointInRange)return!1;return!0},i.prototype.findSplineCoefficients=function(e,t){var i,r,o,n,a,s,l,h=e.length,c=[],d=[],p=[],u=[],g=[],y=t.cardinalSplineTension?t.cardinalSplineTension:.5;switch(y=y<0?0:y>1?1:y,t.splineType){case"Monotonic":for(v=0;v<h-1;v++)p[v]=e[v+1].xValue-e[v].xValue,u[v]=e[v+1].yValue-e[v].yValue,g[v]=u[v]/p[v];l=g.length,c[0]=g[0],c[h-1]=g[l-1];for(var m=0;m<p.length;m++)l>m+1&&(g[m]*g[m+1]<=0?c[m+1]=0:(s=p[m]+p[m+1],c[m+1]=3*s/((s+p[m+1])/g[m]+(s+p[m])/g[m+1])));break;case"Cardinal":for(v=0;v<h;v++)c[v]=0===v?h>2?y*(e[v+2].xValue-e[v].xValue):0:v===h-1?h>2?y*(e[h-1].xValue-e[h-3].xValue):0:y*(e[v+1].xValue-e[v-1].xValue);break;default:"Clamped"===t.splineType?(c[0]=3*(e[1].yValue-e[0].yValue)/(e[1].xValue-e[0].xValue)-3,d[0]=.5,c[e.length-1]=3*(e[e.length-1].yValue-e[e.length-2].yValue)/(e[e.length-1].xValue-e[e.length-2].xValue),c[0]=d[0]=Math.abs(c[0])===1/0?0:c[0],c[e.length-1]=d[e.length-1]=Math.abs(c[e.length-1])===1/0?0:c[e.length-1]):(c[0]=d[0]=0,c[e.length-1]=0);for(var v=1;v<h-1;v++)if(i=e[v].xValue-e[v-1].xValue,r=e[v+1].xValue-e[v-1].xValue,o=e[v+1].xValue-e[v].xValue,n=e[v+1].yValue-e[v].yValue||null,a=e[v].yValue-e[v-1].yValue||null,0===i||0===r||0===o)c[v]=0,d[v]=0;else{var f=1/(i*c[v-1]+2*r);c[v]=-f*o,d[v]=f*(6*(n/o-a/i)-i*d[v-1])}for(var b=h-2;b>=0;b--)c[b]=c[b]*c[b+1]+d[b]}return c},i.prototype.getControlPoints=function(e,t,i,r,o){var n,a,s,l=i,h=r,c=e.xValue,d=e.yValue,p=t.xValue,u=t.yValue;switch(o.splineType){case"Cardinal":"DateTime"===o.xAxis.valueType&&(l=i/this.dateTimeInterval(o),h=r/this.dateTimeInterval(o)),n=new Vi(c+i/3,d+l/3),a=new Vi(p-r/3,u-h/3),s=new Wi(n,a);break;case"Monotonic":var g=(p-c)/3;n=new Vi(c+g,d+i*g),a=new Vi(p-g,u-r*g),s=new Wi(n,a);break;default:var y=p-c,m=1/3*(d+2*u-1/3*(y*=y)*(.5*i+r));n=new Vi((2*c+p)*(1/3),1/3*(2*d+u-1/3*y*(i+.5*r))),a=new Vi((c+2*p)*(1/3),m),s=new Wi(n,a)}return s},i.prototype.dateTimeInterval=function(e){var t=e.xAxis.actualIntervalType;return"Years"===t?31536e6:"Months"===t?2592e6:"Days"===t?864e5:"Hours"===t?36e5:"Minutes"===t?6e4:"Seconds"===t?1e3:2592e6},i.prototype.doAnimation=function(e){var t=e.animation;this.doLinearAnimation(e,t)},i}(Nr),Eo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Eo(t,e),t.prototype.render=function(e,t,r,o){var n=null,a="",s="M",l=[],h="TrendLine"===e.category?e.points:this.enableComplexProperty(e);l=this.filterEmptyPoints(e,h);for(var c,d="PolarRadar"===e.chart.chartAreaType?I:ve,p=0,u=l;p<u.length;p++){var g=u[p];c=this.getPreviousIndex(l,g.index-1,e),g.symbolLocations=[],g.regions=[],g.visible&&S(l[c],g,l[this.getNextIndex(l,g.index-1,e)],e)?(null!==n&&(a=this.getSplineDirection(e.drawPoints[c],n,g,t,r,o,e,s,d,a),s="L"),n=g,this.storePointLocation(g,e,o,d)):(s="M",n=null,g.symbolLocations=[])}if(l.length>0&&e.drawPoints.length>0&&"PolarRadar"===e.chart.chartAreaType&&e.isClosed){var y=this.getFirstLastVisiblePoint(l);a=this.getSplineDirection(e.drawPoints[e.drawPoints.length-1],y.last,{xValue:y.first.xValue,yValue:y.first.yValue},t,r,o,e,s,d,a),s="L"}var m="TrendLine"===e.category?e.chart.element.id+"_Series_"+e.sourceIndex+"_TrendLine_"+e.index:e.chart.element.id+"_Series_"+e.index,v=new i.PathOption(m,"transparent",e.width,e.interior,e.opacity,e.dashArray,a);this.appendLinePath(v,e,""),this.renderMarker(e)},t.prototype.getSplineDirection=function(e,t,i,r,o,n,a,s,l,h){var c=e.controlPoint1,d=e.controlPoint2,p=l(t.xValue,t.yValue,r,o,n,a),u=l(i.xValue,i.yValue,r,o,n,a),g=l(c.x,c.y,r,o,n,a),y=l(d.x,d.y,r,o,n,a);return h.concat(s+" "+p.x+" "+p.y+" C "+g.x+" "+g.y+" "+y.x+" "+y.y+" "+u.x+" "+u.y+" ")},t.prototype.getModuleName=function(){return"SplineSeries"},t.prototype.destroy=function(){},t}(Oo),Io=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Do=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Io(t,e),t.prototype.render=function(t){e.prototype.render.call(this,t),t.showNormalDistribution&&this.renderNormalDistribution(t)},t.prototype.calculateBinInterval=function(e,t){for(var i=C(e)/e.length,r=0,o=0,n=e;o<n.length;o++){var a=n[o];r+=(a-i)*(a-i)}t.histogramValues.mean=i,t.histogramValues.sDValue=Math.round(Math.sqrt(r/e.length-1)),t.histogramValues.binWidth=t.binInterval||Math.round(3.5*t.histogramValues.sDValue/Math.pow(e.length,1/3))},t.prototype.processInternalData=function(e,t){for(var i,r=[],o=[],n=Object.keys(e),a=0;a<n.length;a++){var s=n[a];o.push(e[s][t.yName])}t.histogramValues={yValues:o};var l=Math.min.apply(Math,t.histogramValues.yValues),h=Math.max.apply(Math,t.histogramValues.yValues);this.calculateBinInterval(t.histogramValues.yValues,t);for(var c,d=t.histogramValues.binWidth,p=0;p<e.length;)c=o.filter(function(e){return e>=l&&e<l+d}).length,l+d===h&&(c+=o.filter(function(e){return e>=h}).length),r.push((i={x:l+d/2},i[t.yName]=c,i)),l+=d,p+=c;return r},t.prototype.calculateBinValues=function(e){var t,i,r=e.histogramValues.yValues.length,o=e.histogramValues.binWidth,n=e.histogramValues.mean,a=e.histogramValues.sDValue,s=e.xAxis.minimum?parseInt(e.xAxis.minimum.toString()):e.xMin,l=((e.xAxis.maximum?parseInt(e.xAxis.maximum.toString()):e.xMax)-s)/499;if(e.points.length)for(var h=0;h<500;h++)t=s+h*l,i=Math.exp(-(t-n)*(t-n)/(2*a*a))/(a*Math.sqrt(2*Math.PI))*o*r,e.yMin=e.yMin>i?i:e.yMin,e.yMax=e.yMax<i?i:e.yMax},t.prototype.renderNormalDistribution=function(e){var t,r,o=e.xAxis.actualRange.min,n=e.xAxis.actualRange.max,a="",s="M",l=e.histogramValues.yValues.length,h=e.histogramValues.binWidth,c=e.histogramValues.mean,d=e.histogramValues.sDValue,p=(n-o)/499;if(e.points.length)for(var u=0;u<500;u++)a+=s+" "+(r=ve(t=o+u*p,Math.exp(-(t-c)*(t-c)/(2*d*d))/(d*Math.sqrt(2*Math.PI))*h*l,e.xAxis,e.yAxis,e.chart.requireInvertedAxis)).x+" "+r.y+" ",s="L";var g=e.chart.renderer.drawPath(new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_NDLine","transparent",2,e.chart.themeStyle.errorBar,e.opacity,e.dashArray,a),new Int32Array([e.clipRect.x,e.clipRect.y]));g.style.visibility=e.chart.enableCanvas?null:e.animation.enable&&e.chart.animateSeries?"hidden":"visible",e.chart.enableCanvas||e.seriesElement.appendChild(g)},t.prototype.doAnimation=function(t){e.prototype.doAnimation.call(this,t),t.showNormalDistribution&&oe(t.seriesElement.lastElementChild,t.animation.duration,500,"FadeIn")},t.prototype.getModuleName=function(){return"HistogramSeries"},t.prototype.destroy=function(){},t}(Xr),Bo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Bo(t,e),t.prototype.render=function(e,t,r,o){var n,a,s,l,h,c,d=null,p="",u=null,g=null,y=[],m=[],v=0;y=this.filterEmptyPoints(e);for(C=0;C<y.length;C++)null!==(c=y[C]).x&&""!==c.x&&(c.index=v,v++,m.push(c));for(var f,b=m.length,x="PolarRadar"===e.chart.chartAreaType?I:ve,w="PolarRadar"===e.chart.chartAreaType?e.points[0].yValue:Math.max(e.yAxis.visibleRange.min,0),C=0;C<b;C++)(c=m[C]).symbolLocations=[],c.regions=[],f=this.getPreviousIndex(m,c.index-1,e),c.visible&&S(m[f],c,m[this.getNextIndex(m,c.index-1,e)],e)?(d?(l=e.drawPoints[f].controlPoint1,h=e.drawPoints[f].controlPoint2,n=x(c.xValue,c.yValue,t,r,o,e),a=x(l.x,l.y,t,r,o,e),s=x(h.x,h.y,t,r,o,e),p=p.concat("C "+a.x+" "+a.y+" "+s.x+" "+s.y+" "+n.x+" "+n.y+" ")):(p+="M "+(u=x(c.xValue,w,t,r,o,e)).x+" "+u.y+" ",p+="L "+(g=x(c.xValue,c.yValue,t,r,o,e)).x+" "+g.y+" "),this.storePointLocation(c,e,o,x),d=c):(d=null,c.symbolLocations=[]),(C+1<b&&!m[C+1].visible||C===b-1)&&n&&u&&(u=x(c.xValue,w,t,r,o,e),p=p.concat("L "+u.x+" "+u.y));this.appendLinePath(new i.PathOption(e.chart.element.id+"_Series_"+e.index,e.interior,e.border.width,e.border.color,e.opacity,e.dashArray,p),e,""),this.renderMarker(e)},t.prototype.getModuleName=function(){return"SplineAreaSeries"},t.prototype.destroy=function(){},t}(Oo),Fo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fo(t,e),t.prototype.initSeriesCollection=function(e,t){e.targetSeries=[];var i=new nr(e,"targetSeries",{},!0);this.setSeriesProperties(i,e,e.type,e.fill,e.width,t)},t.prototype.setSeriesProperties=function(e,t,i,r,o,n){e.name=i.length<=4?i.toLocaleUpperCase():i,e.xName="x",e.yName="y",e.fill=r||"#606eff",e.dashArray=t.dashArray,e.width=o,e.xAxisName=t.xAxisName,e.animation=t.animation,e.yAxisName=t.yAxisName,e.clipRectElement=t.clipRectElement,e.points=[],e.enableTooltip=!0,e.interior=e.fill,e.category="Indicator",e.index=t.index,e.chart=n,e.xMin=1/0,e.xMax=-1/0,e.yMin=1/0,e.yMax=-1/0,e.xData=[],e.yData=[],e.marker.visible=!1,t.targetSeries.push(e)},t.prototype.createIndicatorElements=function(e,t,r){(t.seriesName||t.dataSource)&&Y(t.targetSeries[0]);var o=new i.Rect(0,0,0,0);(t.seriesName||t.dataSource)&&(o=t.targetSeries[0].clipRect);var n=new Di(e.element.id+"_ChartIndicatorClipRect_"+r,"transparent",{width:1,color:"Gray"},1,{x:0,y:0,width:o.width,height:o.height}),a=K(e.redraw,n,e.renderer);t.indicatorElement=e.renderer.createGroup({id:e.element.id+"IndicatorGroup"+r,transform:"translate("+o.x+","+o.y+")","clip-path":"url(#"+e.element.id+"_ChartIndicatorClipRect_"+r+")"}),t.indicatorElement.appendChild(a);for(var s=0,l=t.targetSeries;s<l.length;s++){var h=l[s];h.clipRectElement=a;var c=h.chart.renderer.createGroup({id:h.chart.element.id+"_Indicator_"+t.index+"_"+h.name+"_Group"});t.indicatorElement.appendChild(c),h.seriesElement=c}e.indicatorElements.appendChild(t.indicatorElement)},t.prototype.getDataPoint=function(e,t,i,r,o,n){void 0===n&&(n=null);var a=new Ki;return a.x=e,a.y=t,a.xValue=i.xValue,a.color=r.fill,a.index=o,a.yValue=t,a.visible=!0,r.xMin=Math.min(r.xMin,a.xValue),r.yMin=Math.min(r.yMin,a.yValue),r.xMax=Math.max(r.xMax,a.xValue),r.yMax=Math.max(r.yMax,a.yValue),r.xData.push(a.xValue),n&&"Macd"===n.type&&"Column"===r.type&&(a.y>=0?a.color=n.macdPositiveColor:a.color=n.macdNegativeColor),a},t.prototype.getRangePoint=function(e,t,i,r,o,n){var a=new Ki;return a.x=e,a.high=t,a.low=i,a.xValue=r.xValue,a.color=o.fill,a.index=n,a.visible=!0,o.xData.push(a.xValue),a},t.prototype.setSeriesRange=function(e,t,i){void 0===i&&(i=null),i?i.points=e:t.targetSeries[0].points=e},t}(Nr),jo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jo(t,e),t.prototype.initDataSource=function(e,t){var i=[],r=e.points;if(r&&r.length){var o=r,n=G(e.field),a=e.targetSeries[0];if(o&&o.length&&o.length>=e.period){for(var s=0,l=0,h=0;h<e.period;h++)l+=o[h][n];s=l/e.period,i.push(this.getDataPoint(o[e.period-1].x,s,o[e.period-1],a,i.length));for(var c=e.period;c<o.length;)l-=o[c-e.period][n],s=(l+=o[c][n])/e.period,i.push(this.getDataPoint(o[c].x,s,o[c],a,i.length)),c++}this.setSeriesRange(i,e)}},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"SmaIndicator"},t}(Vo),Xo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xo(t,e),t.prototype.initDataSource=function(e,t){var i=G(e.field),r=[],o=e.targetSeries[0],n=e.points;if(n&&n.length&&n.length>=e.period){for(var a=0,s=0,l=2/(e.period+1),h=0;h<e.period;h++)a+=n[h][i];s=a/e.period,r.push(this.getDataPoint(n[e.period-1].x,s,n[e.period-1],o,r.length));for(var c=e.period;c<n.length;){var d=r[c-e.period][o.yName],p=(n[c][i]-d)*l+d;r.push(this.getDataPoint(n[c].x,p,n[c],o,r.length)),c++}}this.setSeriesRange(r,e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"EmaIndicator"},t}(Vo),Go=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Go(t,e),t.prototype.initDataSource=function(e,t){var i=[],r=G(e.field),o=e.points;if(o&&o.length&&o.length>=e.period){var n=e.targetSeries[0],a=e.points;if(a.length&&a.length>=e.period){for(var s=0,l=[],h=0,c=a.length,d=e.period;c>=d;){s=0;for(u=h=a.length-c;u<h+d;u++)s+=a[u][r];s/=d,l.push(s),c--}for(var p=0;p<d-1;p++){s=0;for(u=0;u<p+1;u++)s+=a[u][r];s/=p+1,l.splice(p,0,s)}for(h=e.period;h<=l.length;){s=0;for(var u=h-e.period;u<h;u++)s+=l[u];s/=e.period,i.push(this.getDataPoint(a[h-1].x,s,a[h-1],n,i.length)),h++}}}this.setSeriesRange(i,e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"TmaIndicator"},t}(Vo),Uo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uo(t,e),t.prototype.initDataSource=function(e){var t=[],i=e.points;i.length>0&&i.length>e.period&&(t=this.calculateADPoints(e,i)),this.setSeriesRange(t,e)},t.prototype.calculateADPoints=function(e,t){var i=[],r=0,o=0,n=0,a=0,s=0,l=e.targetSeries[0];for(o=0;o<t.length;o++)n=Number(t[o].high),a=Number(t[o].low),r+=((s=Number(t[o].close))-a-(n-s))/(n-a)*Number(t[o].volume),i[o]=this.getDataPoint(t[o].x,r,t[o],l,i.length);return i},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"AccumulationDistributionIndicator"},t}(Vo),qo=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return qo(t,e),t.prototype.initDataSource=function(e,t){var i=e.points;i.length>0&&i.length>e.period&&this.calculateATRPoints(e,i)},t.prototype.calculateATRPoints=function(e,t){for(var i=0,r=0,o=0,n=0,a=0,s=[],l=[],h=e.period,c=0,d=e.targetSeries[0],p=0;p<t.length;p++)r=Number(t[p].high)-Number(t[p].low),p>0&&(o=Math.abs(Number(t[p].high)-Number(t[p-1].close)),n=Math.abs(Number(t[p].low)-Number(t[p-1].close))),c+=a=Math.max(r,o,n),p>=h?(i=(Number(l[p-1].y)*(h-1)+a)/h,s.push(this.getDataPoint(t[p].x,i,t[p],d,s.length))):(i=c/h,p===h-1&&s.push(this.getDataPoint(t[p].x,i,t[p],d,s.length))),l[p]={x:t[p].x,y:i};this.setSeriesRange(s,e)},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"AtrIndicator"},t}(Vo),$o=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.initSeriesCollection=function(t,i){e.prototype.initSeriesCollection.call(this,t,i);var r=new nr(t,"targetSeries",{},!0);e.prototype.setSeriesProperties.call(this,r,t,"UpperLine",t.upperLine.color,t.upperLine.width,i)},t.prototype.initDataSource=function(e,t){var i=[],r=[],o=e.points;if(o&&o.length){var n=e.targetSeries[1],a=e.targetSeries[0],s=e.period;if(o.length>=e.period)for(var l=0;l<o.length;l++)i.push(this.getDataPoint(o[l].x,100,o[l],n,i.length)),l<s||r.push(this.getDataPoint(o[l].x,Number(o[l].close)/Number(o[l-s].close)*100,o[l],a,r.length));this.setSeriesRange(r,e,e.targetSeries[0]),this.setSeriesRange(i,e,e.targetSeries[1])}},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"MomentumIndicator"},t}(Vo),Ko=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),en=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ko(t,e),t.prototype.initSeriesCollection=function(t,i){if(e.prototype.initSeriesCollection.call(this,t,i),t.showZones){var r=new nr(t,"targetSeries",{},!0);e.prototype.setSeriesProperties.call(this,r,t,"LowerLine",t.lowerLine.color,t.lowerLine.width,i);var o=new nr(t,"targetSeries",{},!0);e.prototype.setSeriesProperties.call(this,o,t,"UpperLine",t.upperLine.color,t.upperLine.width,i)}},t.prototype.initDataSource=function(e,t){var i=[],r=[],o=[],n=e.targetSeries[0],a=e.points;if(a.length&&a.length>=e.period){if(e.showZones)for(c=0;c<a.length;c++)o.push(this.getDataPoint(a[c].x,e.overBought,a[c],e.targetSeries[1],o.length)),r.push(this.getDataPoint(a[c].x,e.overSold,a[c],e.targetSeries[2],r.length));for(var s=Number(a[0].close),l=0,h=0,c=1;c<=e.period;c++){var d=Number(a[c].close);d>s?l+=d-s:h+=s-d,s=d}l/=e.period,h/=e.period,i.push(this.getDataPoint(a[e.period].x,100-100/(1+l/h),a[e.period],n,i.length));for(var p=e.period+1;p<a.length;p++){var u=Number(a[p].close);u>s?(l=(l*(e.period-1)+(u-s))/e.period,h=h*(e.period-1)/e.period):u<s&&(h=(h*(e.period-1)+(s-u))/e.period,l=l*(e.period-1)/e.period),s=u,i.push(this.getDataPoint(a[p].x,100-100/(1+l/h),a[p],n,i.length))}}this.setSeriesRange(i,e,e.targetSeries[0]),e.showZones&&(this.setSeriesRange(o,e,e.targetSeries[1]),this.setSeriesRange(r,e,e.targetSeries[2]))},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"RsiIndicator"},t}(Vo),tn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tn(t,e),t.prototype.initSeriesCollection=function(t,i){e.prototype.initSeriesCollection.call(this,t,i);var r=new nr(t,"targetSeries",{},!0);if(this.setSeriesProperties(r,t,"PeriodLine",t.periodLine.color,t.periodLine.width,i),t.showZones){var o=new nr(t,"targetSeries",{},!0);this.setSeriesProperties(o,t,"UpperLine",t.upperLine.color,t.upperLine.width,i);var n=new nr(t,"targetSeries",{},!0);this.setSeriesProperties(n,t,"LowerLine",t.lowerLine.color,t.lowerLine.width,i)}},t.prototype.initDataSource=function(e,t){var i=[],r=[],o=[],n=[],a=[],s=e.points;if(s.length&&s.length>=e.period){if(e.showZones)for(var l=0;l<s.length;l++)r.push(this.getDataPoint(s[l].x,e.overBought,s[l],e.targetSeries[2],r.length)),o.push(this.getDataPoint(s[l].x,e.overSold,s[l],e.targetSeries[3],o.length));a=this.calculatePeriod(e.period,e.kPeriod,s,e.targetSeries[1]),n=this.smaCalculation(e.period,e.kPeriod,a,e.targetSeries[1]),i=this.smaCalculation(e.period+e.kPeriod-1,e.dPeriod,a,e.targetSeries[0])}this.setSeriesRange(i,e,e.targetSeries[0]),this.setSeriesRange(n,e,e.targetSeries[1]),e.showZones&&(this.setSeriesRange(r,e,e.targetSeries[2]),this.setSeriesRange(o,e,e.targetSeries[3]))},t.prototype.smaCalculation=function(e,t,i,r){var o=[];if(i.length>=e+t){for(var n=e+(t-1),a=[],s=[],l=0;l<i.length;l++){var h=Number(i[l].y);a.push(h)}for(var c=a.length;c>=n;){for(var d=0,l=e-1;l<e+t-1;l++)d+=a[l];d/=t,s.push(d.toFixed(2)),a.splice(0,1),c=a.length}for(var p=n-1,l=0;l<i.length;l++)l<p||(o.push(this.getDataPoint(i[l].x,Number(s[l-p]),i[l],r,o.length)),i[l].y=Number(s[l-p]))}return o},t.prototype.calculatePeriod=function(e,t,i,r){for(var o=[],n=[],a=[],s=[],l=0;l<i.length;l++)o[l]=i[l].low,n[l]=i[l].high,a[l]=i[l].close;if(i.length>e){for(var h=[],c=[],d=0;d<e-1;++d)c.push(0),h.push(0),s.push(this.getDataPoint(i[d].x,i[d].close,i[d],r,s.length));for(d=e-1;d<i.length;++d){for(var p=Number.MAX_VALUE,u=Number.MIN_VALUE,l=0;l<e;++l)p=Math.min(p,o[d-l]),u=Math.max(u,n[d-l]);c.push(u),h.push(p)}for(d=e-1;d<i.length;++d){var g=0,y=0;g+=a[d]-h[d],y+=c[d]-h[d],s.push(this.getDataPoint(i[d].x,g/y*100,i[d],r,s.length))}}return s},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"StochasticIndicator"},t}(Vo),on=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return on(t,e),t.prototype.initSeriesCollection=function(e,t){e.targetSeries=[];var i=new nr(e,"targetSeries",{},!0);i.type="RangeArea","transparent"!==e.bandColor&&"none"!==e.bandColor&&this.setSeriesProperties(i,e,"BollingerBand",e.bandColor,0,t);var r=new nr(e,"targetSeries",{},!0);this.setSeriesProperties(r,e,"BollingerBand",e.fill,e.width,t);var o=new nr(e,"targetSeries",{},!0);this.setSeriesProperties(o,e,"UpperLine",e.upperLine.color,e.upperLine.width,t);var n=new nr(e,"targetSeries",{},!0);this.setSeriesProperties(n,e,"LowerLine",e.lowerLine.color,e.lowerLine.width,t)},t.prototype.initDataSource=function(e,t){var i="transparent"!==e.bandColor&&"none"!==e.bandColor,r=i?1:0,o=[],n=[],a=[],s=[],l=e.targetSeries[r+1],h=e.targetSeries[r+2],c=e.targetSeries[r],d=i?e.targetSeries[0]:null,p=e.points;if(p.length&&p.length>=e.period){for(var u=0,g=0,y=e.standardDeviation,m=p.length,v=Math.round(e.period),f=[],b=[],x=[],w=0;w<v;w++)u+=Number(p[w].close);for(var S=u/e.period,C=0;C<m;C++){var P=Number(p[C].close);if(C>=v-1&&C<m){C-e.period>=0?(S=(u+=P-Number(p[C-v].close))/e.period,f[C]=S,b[C]=Math.pow(P-S,2),g+=b[C]-b[C-v]):(f[C]=S,b[C]=Math.pow(P-S,2),g+=b[C]);var L=Math.sqrt(g/e.period),R=f[C]-y*L,M=f[C]+y*L;if(C+1===v)for(var A=0;A<v-1;A++)x[A]={X:p[A].x,mb:f[C],lb:R,ub:M,visible:!0};x[C]={X:p[C].x,mb:f[C],lb:R,ub:M,visible:!0}}else C<e.period-1&&(f[C]=S,b[C]=Math.pow(P-S,2),g+=b[C])}for(var T=-1,k=-1,_=0;_<m;_++)if(_>=v-1){n.push(this.getDataPoint(p[_].x,x[_].ub,p[_],l,n.length)),a.push(this.getDataPoint(p[_].x,x[_].lb,p[_],h,a.length)),o.push(this.getDataPoint(p[_].x,x[_].mb,p[_],c,o.length)),i&&s.push(this.getRangePoint(p[_].x,n[++T].y,a[++k].y,p[_],d,s.length))}}i&&this.setSeriesRange(s,e,e.targetSeries[0]),this.setSeriesRange(o,e,e.targetSeries[r]),this.setSeriesRange(n,e,e.targetSeries[r+1]),this.setSeriesRange(a,e,e.targetSeries[r+2])},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"BollingerBandsIndicator"},t}(Vo),an=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return an(t,e),t.prototype.initSeriesCollection=function(t,i){if(e.prototype.initSeriesCollection.call(this,t,i),"Line"===t.macdType||"Both"===t.macdType){var r=new nr(t,"targetSeries",{},!0);this.setSeriesProperties(r,t,"MacdLine",t.macdLine.color,t.macdLine.width,i)}if("Histogram"===t.macdType||"Both"===t.macdType){var o=new nr(t,"targetSeries",{},!0);o.type="Column",this.setSeriesProperties(o,t,"Histogram",t.macdPositiveColor,t.width,i)}},t.prototype.initDataSource=function(e,t){var i,r,o=[],n=e.fastPeriod,a=e.slowPeriod,s=e.period,l=n+s,h=[],c=[],d=e.points,p=e.targetSeries[0];if("Histogram"===e.macdType?i=e.targetSeries[1]:(r=e.targetSeries[1],"Both"===e.macdType&&(i=e.targetSeries[2])),d&&l<d.length&&a<=n&&a>0&&l-2>=0){var u=this.calculateEMAValues(a,d,"close"),g=this.calculateEMAValues(n,d,"close"),y=this.getMACDVales(e,u,g);h=this.getMACDPoints(e,y,d,r||p);var m=this.calculateEMAValues(s,h,"y");o=this.getSignalPoints(e,m,d,p),i&&(c=this.getHistogramPoints(e,y,m,d,i))}this.setSeriesRange(o,e,e.targetSeries[0]),i&&this.setSeriesRange(c,e,i),r&&this.setSeriesRange(h,e,r)},t.prototype.calculateEMAValues=function(e,t,i){for(var r=0,o=0,n=[],a=2/(e+1),s=0;s<e;s++)r+=Number(t[s][i]);o=r/e,n.push(o);for(var l=o,h=e;h<t.length;h++)l=(Number(t[h][i])-l)*a+l,n.push(l);return n},t.prototype.getMACDPoints=function(e,t,i,r){for(var o=[],n=e.fastPeriod-1,a=0;n<i.length;)o.push(this.getDataPoint(i[n].x,t[a],i[n],r,o.length)),n++,a++;return o},t.prototype.getSignalPoints=function(e,t,i,r){for(var o=e.fastPeriod+e.period-2,n=0,a=[];o<i.length;)a.push(this.getDataPoint(i[o].x,t[n],i[o],r,a.length)),o++,n++;return a},t.prototype.getMACDVales=function(e,t,i){for(var r=[],o=e.fastPeriod-e.slowPeriod,n=0;n<i.length;n++)r.push(t[n+o]-i[n]);return r},t.prototype.getHistogramPoints=function(e,t,i,r,o){for(var n=e.fastPeriod+e.period-2,a=0,s=[];n<r.length;)s.push(this.getDataPoint(r[n].x,t[a+(e.period-1)]-i[a],r[n],o,s.length,e)),n++,a++;return s},t.prototype.destroy=function(){},t.prototype.getModuleName=function(){return"MacdIndicator"},t}(Vo),ln=function(){function e(){}return e.prototype.initSeriesCollection=function(e,t){var i=new nr(e,"targetSeries",{},!0);"Linear"===e.type||"MovingAverage"===e.type?i.type="Line":i.type="Spline",this.setSeriesProperties(i,e,e.type,e.fill,e.width,t)},e.prototype.setSeriesProperties=function(e,t,i,r,o,n){e.name=t.name,e.xName="x",e.yName="y",e.fill=r||"blue",e.width=o,e.dashArray=t.dashArray,e.clipRectElement=t.clipRectElement,e.points=[],e.enableTooltip=t.enableTooltip,e.index=t.index,e.sourceIndex=t.sourceIndex,e.interior=e.fill,e.animation=t.animation,e.legendShape="HorizontalLine",e.marker=t.marker,e.category="TrendLine",e.chart=n,e.xMin=1/0,e.xMax=-1/0,e.yMin=1/0,e.yMax=-1/0,e.xData=[],e.yData=[],t.targetSeries=e,n.isBlazor&&(t.targetSeries.border={},t.targetSeries.connector={})},e.prototype.createTrendLineElements=function(e,t,i,r,o){t.trendLineElement=r,t.targetSeries.clipRectElement=o,t.targetSeries.seriesElement=r,e.trendLineElements&&e.trendLineElements.appendChild(t.trendLineElement)},e.prototype.getDataPoint=function(e,t,i,r){var o=new Ki;return o.x="DateTime"===i.xAxis.valueType?new Date(Number(e)):e,o.y=t,o.xValue=Number(e),o.color=i.fill,o.index=r,o.yValue=Number(t),o.visible=!0,i.xMin=Math.min(i.xMin,o.xValue),i.yMin=Math.min(i.yMin,o.yValue),i.xMax=Math.max(i.xMax,o.xValue),i.yMax=Math.max(i.yMax,o.yValue),i.xData.push(o.xValue),o},e.prototype.findSlopeIntercept=function(e,t,i,r){for(var o=0,n=0,a=0,s=0,l=0,h=0,c=0;l<r.length;)isNaN(t[l])&&(t[l]=(t[l-1]+t[l+1])/2),o+=e[l],n+=t[l],a+=e[l]*t[l],s+=e[l]*e[l],l++;var d=i.type;if(!i.intercept||"Linear"!==d&&"Exponential"!==d)h=(r.length*a-o*n)/(r.length*s-o*o),h="Linear"===d?h:Math.abs(h),c="Exponential"===d||"Power"===d?Math.exp((n-h*o)/r.length):(n-h*o)/r.length;else switch(c=i.intercept,d){case"Linear":h=(a-i.intercept*o)/s;break;case"Exponential":h=(a-Math.log(Math.abs(i.intercept))*o)/s}return{slope:h,intercept:c}},e.prototype.initDataSource=function(e){var t=e.points;if(t&&t.length){var i=e.targetSeries;switch(e.type){case"Linear":this.setLinearRange(t,e,i);break;case"Exponential":this.setExponentialRange(t,e,i);break;case"MovingAverage":this.setMovingAverageRange(t,e,i);break;case"Polynomial":this.setPolynomialRange(t,e,i);break;case"Power":this.setPowerRange(t,e,i);break;case"Logarithmic":this.setLogarithmicRange(t,e,i)}"Linear"!==e.type&&"MovingAverage"!==e.type&&i.chart.splineSeriesModule.findSplinePoint(i)}},e.prototype.setExponentialRange=function(e,t,i){for(var r=[],o=[],n=0;n<e.length;){var a=e[n],s=a.yValue?Math.log(a.yValue):0;r.push(a.xValue),o.push(s),n++}var l=this.findSlopeIntercept(r,o,t,e);i.points=this.getExponentialPoints(t,e,r,o,i,l)},e.prototype.setLogarithmicRange=function(e,t,i){for(var r=[],o=[],n=[],a=0;a<e.length;){var s=e[a],l=s.xValue?Math.log(s.xValue):0;n.push(s.xValue),r.push(l),o.push(s.yValue),a++}var h=this.findSlopeIntercept(r,o,t,e);i.points=this.getLogarithmicPoints(t,e,n,o,i,h)},e.prototype.setPolynomialRange=function(e,t,i){for(var r=[],o=[],n=0;n<e.length;){var a=e[n];r.push(a.xValue),o.push(a.yValue),n++}i.points=this.getPolynomialPoints(t,e,r,o,i)},e.prototype.setPowerRange=function(e,t,i){for(var r=[],o=[],n=[],a=0;a<e.length;){var s=e[a],l=s.xValue?Math.log(s.xValue):0,h=s.yValue?Math.log(s.yValue):0;n.push(s.xValue),r.push(l),o.push(h),a++}var c=this.findSlopeIntercept(r,o,t,e);i.points=this.getPowerPoints(t,e,n,o,i,c)},e.prototype.setLinearRange=function(e,t,i){for(var r=[],o=[],n=0;n<e.length;){var a=e[n];r.push(a.xValue),o.push(a.yValue),n++}var s=this.findSlopeIntercept(r,o,t,e);i.points=this.getLinearPoints(t,e,r,o,i,s)},e.prototype.setMovingAverageRange=function(e,t,i){for(var r=[],o=[],n=[],a=0;a<e.length;){var s=e[a];n.push(s.xValue),r.push(a+1),o.push(s.yValue),a++}i.points=this.getMovingAveragePoints(t,e,n,o,i)},e.prototype.getLogarithmicPoints=function(e,t,i,r,o,n){var a=Math.round(t.length/2),s=[],l=i[0]-e.backwardForecast,h=l?Math.log(l):0,c=n.intercept+n.slope*h,d=i[a-1],p=d?Math.log(d):0,u=n.intercept+n.slope*p,g=i[i.length-1]+e.forwardForecast,y=g?Math.log(g):0,m=n.intercept+n.slope*y;return s.push(this.getDataPoint(l,c,o,s.length)),s.push(this.getDataPoint(d,u,o,s.length)),s.push(this.getDataPoint(g,m,o,s.length)),s},e.prototype.getPowerPoints=function(e,t,i,r,o,n){var a=Math.round(t.length/2),s=[],l=i[0]-e.backwardForecast;l=l>-1?l:0;var h=n.intercept*Math.pow(l,n.slope),c=i[a-1],d=n.intercept*Math.pow(c,n.slope),p=i[i.length-1]+e.forwardForecast,u=n.intercept*Math.pow(p,n.slope);return s.push(this.getDataPoint(l,h,o,s.length)),s.push(this.getDataPoint(c,d,o,s.length)),s.push(this.getDataPoint(p,u,o,s.length)),s},e.prototype.getPolynomialPoints=function(e,t,i,r,o){var n=t.length<=e.polynomialOrder?t.length:e.polynomialOrder;n=Math.max(2,n),n=Math.min(6,n),e.polynomialOrder=n,e.polynomialSlopes=[],e.polynomialSlopes.length=e.polynomialOrder+1;for(var a=0;a<i.length;){for(var s=i[a],l=r[a],h=0;h<=e.polynomialOrder;)e.polynomialSlopes[h]||(e.polynomialSlopes[h]=0),e.polynomialSlopes[h]+=Math.pow(s,h)*l,++h;a++}var c=[];c.length=1+2*e.polynomialOrder;var d=[];d.length=e.polynomialOrder+1;for(var p=0;p<e.polynomialOrder+1;)d[p]=[],d[p].length=3,p++;for(var u=0;u<i.length;){for(var g=i[u],y=1,m=0;m<c.length;)c[m]||(c[m]=0),c[m]+=y,y*=g,++m;++u}for(var v=0;v<=e.polynomialOrder;){for(var f=0;f<=e.polynomialOrder;)d[v][f]=c[v+f],++f;++v}return this.gaussJordanElimination(d,e.polynomialSlopes)||(e.polynomialSlopes=null),this.getPoints(e,t,i,o)},e.prototype.getMovingAveragePoints=function(e,t,i,r,o){var n=[],a=e.period>=t.length?t.length-1:e.period;a=Math.max(2,a);for(var s,l,h,c,d=0;d<t.length-1;){s=h=c=0;for(var p=d;h<a;p++)h++,r[p]||c++,s+=r[p];(s=a-c<=0?null:s/(a-c))&&!isNaN(s)&&(l=i[a-1+d],n.push(this.getDataPoint(l,s,o,n.length))),d++}return n},e.prototype.getLinearPoints=function(e,t,i,r,o,n){var a=[],s=i.indexOf(Math.max.apply(null,i)),l=i[i.indexOf(Math.min.apply(null,i))]-e.backwardForecast,h=n.slope*l+n.intercept,c=i[s]+e.forwardForecast,d=n.slope*c+n.intercept;return a.push(this.getDataPoint(l,h,o,a.length)),a.push(this.getDataPoint(c,d,o,a.length)),a},e.prototype.getExponentialPoints=function(e,t,i,r,o,n){var a=Math.round(t.length/2),s=[],l=i[0]-e.backwardForecast,h=n.intercept*Math.exp(n.slope*l),c=i[a-1],d=n.intercept*Math.exp(n.slope*c),p=i[i.length-1]+e.forwardForecast,u=n.intercept*Math.exp(n.slope*p);return s.push(this.getDataPoint(l,h,o,s.length)),s.push(this.getDataPoint(c,d,o,s.length)),s.push(this.getDataPoint(p,u,o,s.length)),s},e.prototype.getPoints=function(e,t,i,r){var o,n,a=e.polynomialSlopes,s=[],l=1,h=1;for(t.sort(function(e,t){return e.xValue-t.xValue}),i.sort(function(e,t){return e-t});h<=a.length;)1===h?(o=i[0]-e.backwardForecast,n=this.getPolynomialYValue(a,o),s.push(this.getDataPoint(o,n,r,s.length))):h===a.length?(o=i[t.length-1]+e.forwardForecast,n=this.getPolynomialYValue(a,o),s.push(this.getDataPoint(o,n,r,s.length))):(l+=(t.length+e.forwardForecast)/a.length,o=i[parseInt(l.toString(),10)-1],n=this.getPolynomialYValue(a,o),s.push(this.getDataPoint(o,n,r,s.length))),h++;return s},e.prototype.getPolynomialYValue=function(e,t){for(var i=0,r=0;r<e.length;)i+=e[r]*Math.pow(t,r),r++;return i},e.prototype.gaussJordanElimination=function(e,t){var i=e.length,r=[],o=[],n=[];r.length=i,o.length=i,n.length=i;for(var a=0;a<i;)n[a]=0,++a;for(var s=0;s<i;){for(var l=0,h=0,c=0,d=0;d<i;){if(1!==n[d])for(f=0;f<i;)0===n[f]&&Math.abs(e[d][f])>=l&&(l=Math.abs(e[d][f]),h=d,c=f),++f;++d}if(++n[c],h!==c){for(var p=0;p<i;){v=e[h][p];e[h][p]=e[c][p],e[c][p]=v,++p}var u=t[h];t[h]=t[c],t[c]=u}if(o[s]=h,r[s]=c,0===e[c][c])return!1;var g=1/e[c][c];e[c][c]=1;for(var y=0;y<i;)e[c][y]*=g,++y;t[c]*=g;for(var m=0;m<i;){if(m!==c){var v=e[m][c];e[m][c]=0;for(var f=0;f<i;)e[m][f]-=e[c][f]*v,++f;t[m]-=t[c]*v}++m}++s}for(var b=i-1;b>=0;){if(o[b]!==r[b])for(var x=0;x<i;){var w=e[x][o[b]];e[x][o[b]]=e[x][r[b]],e[x][r[b]]=w,++x}--b}return!0},e.prototype.getTrendLineElements=function(e,t){Y(e);var i=e.clipRect,r=t.renderer.drawClipPath(new Di(t.element.id+"_ChartTrendlineClipRect_"+e.index,"transparent",{width:1,color:"Gray"},1,{x:0,y:0,width:i.width,height:i.height})),o=t.renderer.createGroup({id:t.element.id+"TrendlineSeriesGroup"+e.index,transform:"translate("+i.x+","+i.y+")","clip-path":"url(#"+t.element.id+"_ChartTrendlineClipRect_"+e.index+")"});o&&o.appendChild(r);for(var n=0,a=e.trendlines;n<a.length;n++){var s=a[n];this.createTrendLineElements(t,s,s.index,o,r)}},e.prototype.destroy=function(){},e.prototype.getModuleName=function(){return"TrendLine"},e}(),hn=function(){function e(e){this.arrowLocation=new Vi(0,0),this.rx=2,this.ry=2,this.chart=e,this.elementID=this.chart.element.id,this.svgRenderer=new i.SvgRenderer(this.chart.element.id),this.addEventListener()}return e.prototype.addEventListener=function(){if(!this.chart.isDestroyed){var e=t.Browser.isPointer?"pointerleave":"mouseleave";this.chart.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.chart.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),this.chart.on(e,this.mouseLeaveHandler,this),this.chart.on("tapHold",this.longPress,this)}},e.prototype.mouseUpHandler=function(){this.chart.startMove&&this.removeCrosshair(2e3)},e.prototype.mouseLeaveHandler=function(){this.removeCrosshair(1e3)},e.prototype.mouseMoveHandler=function(e){var i=this.chart;"touchmove"===e.type&&(t.Browser.isIos||t.Browser.isIos7)&&i.startMove&&e.preventDefault&&e.preventDefault(),i.disableTrackTooltip||(j(i.mouseX,i.mouseY,i.chartAxisLayoutPanel.seriesClipRect)?!i.startMove&&i.isTouch||this.crosshair():this.removeCrosshair(1e3))},e.prototype.longPress=function(){var e=this.chart;return j(e.mouseX,e.mouseY,e.chartAxisLayoutPanel.seriesClipRect)&&this.crosshair(),!1},e.prototype.crosshair=function(){var e,r,o=this.chart,n="",a="",s=document.getElementById(this.elementID+"_crosshair_axis"),l=o.crosshair,h=document.getElementById(this.elementID+"_tooltip"),c=o.chartAxisLayoutPanel.seriesClipRect,d=o.enableCanvas?document.getElementById(this.elementID+"_Secondary_Element"):document.getElementById(this.elementID+"_UserInteraction"),p=document.getElementById(this.elementID+"_Crosshair");if(o.enableCanvas&&(p||(p=t.createElement("div",{id:this.elementID+"_Crosshair",styles:"position: absolute; pointer-events: none"}),d.appendChild(p))),this.stopAnimation(),o.tooltip.enable&&!j(o.tooltipModule.valueX,o.tooltipModule.valueY,c))return null;if(o.stockChart&&o.stockChart.onPanning)return this.removeCrosshair(1e3),null;if(this.valueX=o.tooltip.enable?o.tooltipModule.valueX:o.mouseX,this.valueY=o.tooltip.enable?o.tooltipModule.valueY:o.mouseY,o.enableCanvas||d.setAttribute("opacity","1"),"Both"!==l.lineType&&"Horizontal"!==l.lineType||(n+="M "+c.x+" "+this.valueY+" L "+(c.x+c.width)+" "+this.valueY),"Both"!==l.lineType&&"Vertical"!==l.lineType||(a+="M "+this.valueX+" "+c.y+" L "+this.valueX+" "+(c.y+c.height)),o.enableCanvas){s||(s=this.svgRenderer.createGroup({id:this.elementID+"_crosshair_axis"}));var u=o.tooltip.enable?o.element.id+"_tooltip_svg":o.element.id+"_svg";r=this.svgRenderer.createSvg({id:u,width:o.availableSize.width,height:o.availableSize.height}),o.tooltip.enable&&((h=h||o.tooltipModule.createElement()).appendChild(r),d.appendChild(h)),e=new i.PathOption(this.elementID+"_HorizontalLine","none",l.line.width,l.line.color||o.themeStyle.crosshairLine,1,l.dashArray,n),this.drawCrosshairLine(e,p,c.x,this.valueY,c.width,0,n),e.d=a,e.id=this.elementID+"_VerticalLine",this.drawCrosshairLine(e,p,this.valueX,c.y,0,c.height,a),this.renderAxisTooltip(o,c,s),r.appendChild(s),o.tooltip.enable||p.appendChild(r)}else 0===d.childNodes.length?(s=o.renderer.createGroup({id:this.elementID+"_crosshair_axis"}),e=new i.PathOption(this.elementID+"_HorizontalLine","none",l.line.width,l.line.color||o.themeStyle.crosshairLine,1,l.dashArray,n),this.renderCrosshairLine(e,d),e.d=a,e.id=this.elementID+"_VerticalLine",this.renderCrosshairLine(e,d),d.appendChild(s),this.renderAxisTooltip(o,c,d.lastChild)):(document.getElementById(this.elementID+"_HorizontalLine").setAttribute("d",n),document.getElementById(this.elementID+"_VerticalLine").setAttribute("d",a),this.renderAxisTooltip(o,c,d.lastChild))},e.prototype.renderCrosshairLine=function(e,t){var i=this.chart.renderer.drawPath(e);t.appendChild(i)},e.prototype.drawCrosshairLine=function(e,i,r,o,n,a,s){if(!document.getElementById(e.id)&&s){var l=t.createElement("div",{id:e.id});i.appendChild(l)}if(document.getElementById(e.id)){var h="top:"+o.toString()+"px;left:"+r.toString()+"px;width:"+n+"px;height:"+a+"px;fill:"+e.stroke+";border: 0.5px solid black;position: absolute",c=document.getElementById(e.id),d=document.getElementById(this.elementID+"_crosshair_axis");c.setAttribute("style",h),i.style.opacity="1",d&&(d.style.opacity="1")}},e.prototype.renderAxisTooltip=function(e,t,r){for(var o,n,a,s,l,h,c,d,p=0,u=e.axisCollections.length;p<u;p++)if(o=e.axisCollections[p],d=o.placeNextToAxisLine?o.updatedRect:o.rect,o.crosshairTooltip.enable)if(this.valueX<=d.x+d.width&&d.x<=this.valueX||this.valueY<=d.y+d.height&&d.y<=this.valueY){if(s=document.getElementById(this.elementID+"_axis_tooltip_"+p),l=document.getElementById(this.elementID+"_axis_tooltip_text_"+p),!(n=this.getAxisText(o)))continue;a=this.tooltipLocation(n,o,t,d),null===s&&(s=e.enableCanvas?this.svgRenderer.drawPath({id:this.elementID+"_axis_tooltip_"+p,fill:o.crosshairTooltip.fill||e.themeStyle.crosshairFill}):e.renderer.drawPath({id:this.elementID+"_axis_tooltip_"+p,fill:o.crosshairTooltip.fill||e.themeStyle.crosshairFill},null),r.appendChild(s),h=new i.TextOption(this.elementID+"_axis_tooltip_text_"+p,0,0,"start",n),l=Ve(e.enableCanvas?this.svgRenderer:e.renderer,h,o.crosshairTooltip.textStyle,o.crosshairTooltip.textStyle.color||e.themeStyle.crosshairLabel,r,null,null,null,null,null,null,null,null,e.enableCanvas)),c=i.findDirection(this.rx,this.ry,a,this.arrowLocation,10,this.isTop,this.isBottom,this.isLeft,this.valueX,this.valueY),s.setAttribute("d",c),l.textContent=n,l.setAttribute("x",(a.x+5).toString()),l.setAttribute("y",(a.y+5+3*this.elementSize.height/4).toString())}else m(this.elementID+"_axis_tooltip_"+p),m(this.elementID+"_axis_tooltip_text_"+p)},e.prototype.getAxisText=function(e){var t;this.isBottom=!1,this.isTop=!1,this.isLeft=!1,this.isRight=!1;var i="Category"===e.valueType&&"BetweenTicks"===e.labelPlacement?.5:0;return"Horizontal"===e.orientation?(t=H(Math.abs(this.valueX-e.rect.x),e.rect.width,e)+i,this.isBottom=!e.opposedPosition,this.isTop=e.opposedPosition):(t=X(Math.abs(this.valueY-e.rect.y),e.rect.height,e)+i,this.isRight=e.opposedPosition,this.isLeft=!e.opposedPosition),"DateTime"===e.valueType?e.format(new Date(t)):"Category"===e.valueType?e.labels[Math.floor(t)]:"DateTimeCategory"===e.valueType?this.chart.dateTimeCategoryModule.getIndexedAxisLabel(e.labels[Math.floor(t)],e.format):"Logarithmic"===e.valueType?t=e.format(Math.pow(e.logBase,t)):e.labelFormat&&null!==e.labelFormat.match("{value}")?e.labelFormat.replace("{value}",e.format(t)):e.format(t)},e.prototype.tooltipLocation=function(e,t,r,o){var n,a=r.x,s=r.y,l="Inside"===t.labelPosition,h=t.scrollbarSettings.enable||t.zoomingScrollBar&&t.zoomingScrollBar.svgObject?t.scrollBarHeight:0;if(this.elementSize=i.measureText(e,t.crosshairTooltip.textStyle),"Horizontal"===t.orientation){var c=l?o.y-this.elementSize.height-20:o.y+h,d=l?o.y-this.elementSize.height-10:o.y+10;this.arrowLocation=new Vi(this.valueX,c),n=new i.Rect(this.valueX-this.elementSize.width/2-5,d+(l?0:h),this.elementSize.width+10,this.elementSize.height+10),t.opposedPosition&&(n.y=l?o.y:o.y-(this.elementSize.height+10+10)-h),n.x<a&&(n.x=a),n.x+n.width>a+r.width&&(n.x-=n.x+n.width-(a+r.width)),this.arrowLocation.x+5>n.x+n.width-this.rx&&(this.arrowLocation.x=n.x+n.width-this.rx-5),this.arrowLocation.x-5<n.x+this.rx&&(this.arrowLocation.x=n.x+this.rx+5)}else{h*=t.opposedPosition?1:-1,this.arrowLocation=new Vi(o.x,this.valueY);var p=l?o.x-h:o.x-this.elementSize.width-20;n=new i.Rect(p+h,this.valueY-this.elementSize.height/2-5,this.elementSize.width+10,this.elementSize.height+10),t.opposedPosition?(n.x=l?o.x-this.elementSize.width-10:o.x+10+h,n.x+n.width>this.chart.availableSize.width&&(this.arrowLocation.x-=n.x+n.width-this.chart.availableSize.width,n.x-=n.x+n.width-this.chart.availableSize.width)):n.x<0&&(this.arrowLocation.x-=n.x,n.x=0),n.y<s&&(n.y=s),n.y+n.height>=s+r.height&&(n.y-=n.y+n.height-(s+r.height)),this.arrowLocation.y+5>n.y+n.height-this.ry&&(this.arrowLocation.y=n.y+n.height-this.ry-5),this.arrowLocation.y-5<n.y+this.ry&&(this.arrowLocation.y=n.y+this.ry+5)}return n},e.prototype.stopAnimation=function(){Ce(this.crosshairInterval)},e.prototype.progressAnimation=function(){Ce(this.crosshairInterval)},e.prototype.removeCrosshair=function(e){var i=this.chart,r=i.enableCanvas?document.getElementById(this.elementID+"_Crosshair"):document.getElementById(this.elementID+"_UserInteraction"),o=i.enableCanvas?document.getElementById(this.elementID+"_crosshair_axis"):null;this.stopAnimation(),r&&"0"!==r.getAttribute("opacity")&&(this.crosshairInterval=+setTimeout(function(){new t.Animation({}).animate(r,{duration:200,progress:function(e){r.style.animation="",i.enableCanvas?(r.style.opacity=(1-e.timeStamp/e.duration).toString(),o.style.opacity=(1-e.timeStamp/e.duration).toString()):r.setAttribute("opacity",(1-e.timeStamp/e.duration).toString())},end:function(){i.enableCanvas?(r.style.opacity="0",o.style.opacity="0"):r.setAttribute("opacity","0"),i.startMove=!1,i.tooltipModule&&(i.tooltipModule.valueX=null,i.tooltipModule.valueY=null)}})},e))},e.prototype.getModuleName=function(){return"Crosshair"},e.prototype.destroy=function(){},e}(),cn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dn=function(e){function r(t){var i=e.call(this,t)||this;return i.element=i.chart.element,i.textStyle=t.tooltip.textStyle,i.control=t,i}return cn(r,e),r.prototype.getElement=function(e){return document.getElementById(e)},r.prototype.getTooltipElement=function(e){this.inverted=this.chart.requireInvertedAxis,this.header=null===this.control.tooltip.header?this.control.tooltip.shared?"<b>${point.x}</b>":"<b>${series.name}</b>":this.control.tooltip.header,this.formattedText=[];var t=document.getElementById(this.chart.element.id+"_tooltip"),i=this.chart.element.id.indexOf("stockChart")>-1;return!e&&!t||i?this.createElement():null},r.prototype.createElement=function(){var e=document.createElement("div");return e.id=this.element.id+"_tooltip",e.className="ejSVGTooltip",e.setAttribute("style","pointer-events:none; position:absolute;z-index: 1"),e},r.prototype.pushData=function(e,t,i,r){return!!e.series.enableTooltip&&(this.currentPoints.push(e),this.stopAnimation(),i&&!document.getElementById(i.id)&&(this.chart.stockChart?document.getElementById(this.chart.stockChart.element.id+"_Secondary_Element").appendChild(i):document.getElementById(this.element.id+"_Secondary_Element").appendChild(i)),!0)},r.prototype.removeHighlight=function(){for(var e,t=0,i=this.previousPoints.length;t<i;t++)(e=this.previousPoints[t]).series.isRectSeries?e.series.visible&&this.highlightPoint(e.series,e.point.index,!1):e.series.marker.visible||"Scatter"===e.series.type||"Bubble"===e.series.type||(this.previousPoints.shift(),i-=1)},r.prototype.highlightPoint=function(e,t,i){var r=this.getElement(this.element.id+"_Series_"+e.index+"_Point_"+t),o=this.control.accumulationSelectionModule,n=!!(o&&o.selectedDataIndexes.length>0);r&&(!n||n&&r.getAttribute("class")&&-1===r.getAttribute("class").indexOf("_ej2_chart_selection_series_")?r.setAttribute("opacity",(i?e.opacity/2:e.opacity).toString()):r.setAttribute("opacity",e.opacity.toString()))},r.prototype.highlightPoints=function(){for(var e=0,t=this.currentPoints;e<t.length;e++){var i=t[e];i.series.isRectSeries&&"Series"===i.series.category&&this.highlightPoint(i.series,i.point.index,!0)}},r.prototype.createTooltip=function(e,t,r,o,n,a,s,l,h,c,d){void 0===h&&(h=null),void 0===c&&(c=null);var p=this.currentPoints[0].series,u=e.tooltipModule||e.accumulationTooltipModule;if(u){var g=p.isRectSeries&&"Waterfall"!==p.type&&n&&n.y<0,y=this.chart.requireInvertedAxis&&p.isRectSeries,m=null;if(this.text.length<=1){var v=i.measureText(this.text[0],e.tooltip.textStyle),f=""!==this.header&&"<b></b>"!==this.header?i.measureText(this.header,this.textStyle):new i.Size(0,0);v.width=Math.max(v.width,f.width)+(a.length>0?47:0);var b=32+(f.height>0?20:0);v.height=v.height+f.height+b,m=this.getCurrentPosition(g,y),g="Left"===(m=this.getPositionBySize(v,new i.Rect(0,0,l.width,l.height),r,m))||"Bottom"===m,y="Left"===m||"Right"===m}t?this.svgTooltip=new i.Tooltip({opacity:e.tooltip.opacity,header:this.headerText,content:this.text,fill:e.tooltip.fill,border:e.tooltip.border,enableAnimation:e.tooltip.enableAnimation,location:r,shared:e.tooltip.shared,shapes:a,clipBounds:"PolarRadar"===this.chart.chartAreaType?new Vi(0,0):o,areaBounds:l,palette:this.findPalette(),template:d||e.tooltip.template,data:c,theme:e.theme,offset:s,textStyle:e.tooltip.textStyle,isNegative:g,inverted:y,arrowPadding:this.text.length>1||this.chart.stockChart?0:12,availableSize:e.availableSize,duration:this.chart.tooltip.duration,isCanvas:this.chart.enableCanvas,isTextWrap:e.tooltip.enableTextWrap&&"chart"===e.getModuleName(),blazorTemplate:{name:"Template",parent:this.chart.tooltip},controlInstance:this.chart,tooltipPlacement:m,tooltipRender:function(){u.removeHighlight(),u.highlightPoints(),u.updatePreviousPoint(h)},animationComplete:function(e){e.tooltip.fadeOuted&&u.fadeOut(u.previousPoints)}},"#"+this.element.id+"_tooltip"):this.svgTooltip&&(this.svgTooltip.location=r,this.svgTooltip.content=this.text,this.svgTooltip.header=this.headerText,this.svgTooltip.offset=s,this.svgTooltip.palette=this.findPalette(),this.svgTooltip.shapes=a,this.svgTooltip.data=c,this.svgTooltip.template=e.tooltip.template,this.svgTooltip.textStyle=e.tooltip.textStyle,this.svgTooltip.isNegative=g,this.svgTooltip.inverted=y,this.svgTooltip.clipBounds="PolarRadar"===this.chart.chartAreaType?new Vi(0,0):o,this.svgTooltip.arrowPadding=this.text.length>1||this.chart.stockChart?0:12,this.svgTooltip.tooltipPlacement=m,this.svgTooltip.dataBind()),this.chart.isReact&&this.chart.renderReactTemplates()}},r.prototype.getPositionBySize=function(e,t,r,o){var n=this.isTooltipFitPosition("Top",new i.Rect(0,0,t.width,t.height),r,e),a=this.isTooltipFitPosition("Bottom",new i.Rect(0,0,t.width,t.height),r,e),s=this.isTooltipFitPosition("Right",new i.Rect(0,0,t.width,t.height),r,e),l=this.isTooltipFitPosition("Left",new i.Rect(0,0,t.width,t.height),r,e);if(!(n||a||s||l)){var h=[r.x-t.x,t.x+t.width-r.x,r.y-t.y,t.y+t.height-r.y],c=h.indexOf(Math.max.apply(this,h));return o=0===c?"Left":1===c?"Right":2===c?"Top":"Bottom"}return"Top"===o?n?"Top":a?"Bottom":s?"Right":"Left":"Bottom"===o?a?"Bottom":n?"Top":s?"Right":"Left":"Right"===o?s?"Right":l?"Left":n?"Top":"Bottom":l?"Left":s?"Right":n?"Top":"Bottom"},r.prototype.isTooltipFitPosition=function(e,t,i,r){var o=new Vi(0,0),n=new Vi(0,0);switch(e){case"Top":o.x=i.x-r.width/2,o.y=i.y-r.height,n.x=i.x+r.width/2,n.y=i.y;break;case"Bottom":o.x=i.x-r.width/2,o.y=i.y,n.x=i.x+r.width/2,n.y=i.y+r.height;break;case"Right":o.x=i.x,o.y=i.y-r.height/2,n.x=i.x+r.width,n.y=i.y+r.height/2;break;case"Left":o.x=i.x-r.width,o.y=i.y-r.height/2,n.x=i.x,n.y=i.y+r.height/2}return j(o.x,o.y,t)&&j(n.x,n.y,t)},r.prototype.getCurrentPosition=function(e,t){return t?e?"Left":"Right":e?"Bottom":"Top"},r.prototype.findPalette=function(){for(var e=[],t=0,i=this.currentPoints;t<i.length;t++){var r=i[t];e.push(this.findColor(r,r.series))}return e},r.prototype.findColor=function(e,t){return!t.isRectSeries||"Candle"!==t.type&&"Hilo"!==t.type&&"HiloOpenClose"!==t.type?(e.point.color&&"#ffffff"!==e.point.color?e.point.color:e.point.interior)||t.marker.fill||t.interior:e.point.color},r.prototype.updatePreviousPoint=function(e){e&&(this.currentPoints=this.currentPoints.concat(e)),this.previousPoints=t.extend([],this.currentPoints,null,!0)},r.prototype.fadeOut=function(e){var t=this.chart.enableCanvas?this.getElement(this.element.id+"_tooltip_group"):this.getElement(this.element.id+"_tooltip_svg");t&&parseInt(t.getAttribute("opacity"),10)>0||(this.valueX=null,this.valueY=null,this.currentPoints=[],this.removeHighlight(),this.removeHighlightedMarker(e),this.svgTooltip=null,this.control.trigger("animationComplete",{}))},r.prototype.removeHighlightedMarker=function(e){if(this.chart.markerRender){for(var t=0,i=e;t<i.length;t++){var r=i[t];m(this.element.id+"_Series_"+r.series.index+"_Point_"+r.point.index+"_Trackball")}this.chart.markerRender.removeHighlightedMarker()}this.previousPoints=[]},r.prototype.removeText=function(){this.textElements=[];var e=this.getElement(this.element.id+"_tooltip_group");if(e&&e.childNodes.length>0)for(;e.lastChild&&1!==e.childNodes.length;)e.removeChild(e.lastChild)},r.prototype.stopAnimation=function(){Ce(this.toolTipInterval)},r.prototype.removeTooltip=function(e){var t=this,i=this.getElement(this.element.id+"_tooltip"),r=i?this.getElement(i.id+"parent_template"):null,o=r&&"<div></div>"!==r.innerHTML;this.stopAnimation(),this.chart.isReact&&o&&this.chart.clearTemplate([r.id],[0]),i&&this.previousPoints.length>0&&(this.toolTipInterval=+setTimeout(function(){t.svgTooltip&&t.svgTooltip.fadeOut()},e))},r}(Zi),pn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),un=function(e){function r(t){var i=e.call(this,t)||this;return i.addEventListener(),i}return pn(r,e),r.prototype.addEventListener=function(){if(!this.chart.isDestroyed){var e=t.Browser.isPointer?"pointerleave":"mouseleave";this.chart.on(e,this.mouseLeaveHandler,this),this.chart.on("tapHold",this.longPress,this),this.chart.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.chart.on(t.Browser.touchEndEvent,this.mouseUpHandler,this)}},r.prototype.mouseUpHandler=function(){var e=this.control;e.isTouch&&!this.isSelected(e)&&(j(e.mouseX,e.mouseY,e.chartAxisLayoutPanel.seriesClipRect)&&e.tooltip.shared||!e.tooltip.shared)&&(e.crosshair.enable?e.startMove&&this.removeTooltip(2e3):(this.tooltip(),this.removeTooltip(2e3)))},r.prototype.mouseLeaveHandler=function(){this.removeTooltip(this.chart.tooltip.fadeOutDuration)},r.prototype.mouseMoveHandler=function(){var e=this.chart;e.disableTrackTooltip||this.isSelected(e)||(e.tooltip.shared||e.isTouch&&!e.startMove||this.tooltip(),j(e.mouseX,e.mouseY,e.chartAxisLayoutPanel.seriesClipRect)?!e.tooltip.shared||e.isTouch&&!e.startMove||this.tooltip():e.tooltip.shared&&this.removeTooltip(this.chart.tooltip.fadeOutDuration))},r.prototype.longPress=function(){var e=this.chart;return e.crosshair.enable&&j(e.mouseX,e.mouseY,e.chartAxisLayoutPanel.seriesClipRect)&&this.tooltip(),!1},r.prototype.tooltip=function(){if(this.chart.stockChart&&this.chart.stockChart.onPanning)return this.removeTooltip(1e3),null;var e=this.chart.enableCanvas?this.element.id+"_tooltip_group":this.element.id+"_tooltip_svg",t=this.getElement(e),i=this.chart.stockChart&&t&&t.firstChild.childNodes.length>1,r=t&&parseInt(t.getAttribute("opacity"),10)>0&&!i,o=this.getTooltipElement(r);this.chart.enableCanvas&&o&&(document.getElementById(this.chart.element.id+"_Secondary_Element").appendChild(o),o.appendChild(document.getElementById(this.chart.element.id+"_tooltip_svg"))),this.chart.tooltip.shared?this.renderGroupedTooltip(this.chart,!r,o):this.renderSeriesTooltip(this.chart,!r,o)},r.prototype.findHeader=function(e){return""===this.header?"":(this.header=this.parseTemplate(e.point,e.series,this.header,e.series.xAxis,e.series.yAxis),""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()?this.header:"")},r.prototype.findShapes=function(){if(!this.chart.tooltip.enableMarker)return[];for(var e=[],t=0,i=this.currentPoints;t<i.length;t++){var r=i[t];e.push(r.point.marker.shape||r.series.marker.shape)}return e},r.prototype.renderSeriesTooltip=function(e,t,i){var r=this.getData();if(r.lierIndex=this.lierIndex,this.currentPoints=[],this.findData(r,this.previousPoints[0])){if((!e.dataEditingModule||!e.dataEditingModule.isPointDragging)&&this.previousPoints[0]&&r.point.index===this.previousPoints[0].point.index&&r.series.index===this.previousPoints[0].series.index)return null;this.pushData(r,t,i,!0)&&this.triggerTooltipRender(r,t,this.getTooltipText(r),this.findHeader(r))}else if(!r.point&&this.isRemove)this.removeTooltip(this.chart.tooltip.fadeOutDuration),this.isRemove=!1;else for(var o=this.mergeXvalues(this.chart.visibleSeries),n=0,a=e.visibleSeries;n<a.length;n++){var s=a[n];s.visible&&"TrendLine"!==s.category&&(r=this.getClosestX(e,s,o)||r)}r&&r.point&&this.findMouseValue(r,e)},r.prototype.triggerTooltipRender=function(e,i,r,o){var n=this,a={cancel:!1,name:"tooltipRender",text:r,headerText:o,template:void 0,series:this.chart.isBlazor?{}:e.series,textStyle:this.textStyle,point:e.point,data:{pointX:e.point.x,pointY:e.point.y,seriesIndex:e.series.index,seriesName:e.series.name,pointIndex:e.point.index,pointText:e.point.text}},s=function(r){r.cancel?(n.removeHighlight(),t.remove(n.getElement(n.element.id+"_tooltip"))):("BoxAndWhisker"===e.series.type&&(n.removeText(),i=!0),n.headerText=r.headerText,n.formattedText=n.formattedText.concat(r.text),n.text=n.formattedText,n.createTooltip(n.chart,i,n.getSymbolLocation(e),e.series.clipRect,e.point,n.findShapes(),n.findMarkerHeight(n.currentPoints[0]),n.chart.chartAxisLayoutPanel.seriesClipRect,null,n.getTemplateText(e),n.chart.tooltip.template?r.template:"")),n.isRemove=!0};s.bind(this,e),this.chart.trigger("tooltipRender",a,s)},r.prototype.findMarkerHeight=function(e){if(!this.chart.tooltip.enableMarker)return 0;var t=e.series;return(t.marker.visible||this.chart.tooltip.shared&&(!t.isRectSeries||t.marker.visible)||"Scatter"===t.type||"Scatter"===t.drawType)&&"Candle"!==t.type&&"Hilo"!==t.type&&"HiloOpenClose"!==t.type?(t.marker.height+2)/2+2*t.marker.border.width:0},r.prototype.findData=function(e,t){return e.point&&(!t||t.point!==e.point||t&&t.lierIndex>3&&t.lierIndex!==this.lierIndex||t.point===e.point)},r.prototype.getSymbolLocation=function(e){var t;if("BoxAndWhisker"!==e.series.type){if(!e.point.symbolLocations[0])return null;t=new Vi(e.point.symbolLocations[0].x,e.point.symbolLocations[0].y)}switch(e.series.type){case"BoxAndWhisker":return this.getBoxLocation(e);case"Waterfall":return this.getWaterfallRegion(e,t);case"RangeArea":return this.getRangeArea(e,t);default:return t}},r.prototype.getRangeArea=function(e,t){return e.point.regions[0]&&(this.inverted?t.x=e.point.regions[0].x+e.point.regions[0].width/2:t.y=e.point.regions[0].y+e.point.regions[0].height/2),t},r.prototype.getWaterfallRegion=function(e,t){return this.inverted?t.x=e.point.y<0?t.x+e.point.regions[0].width:t.x:t.y=e.point.y<0?t.y-e.point.regions[0].height:t.y,t},r.prototype.getTooltipText=function(e){var t=e.series;return this.parseTemplate(e.point,t,this.getFormat(this.chart,t),t.xAxis,t.yAxis)},r.prototype.getTemplateText=function(e){if(this.chart.tooltip.template){var i=t.extend({},e.point);return i.x=this.formatPointValue(e.point,e.series.xAxis,"x",!0,!1),"XY"===e.series.seriesType?i.y=this.formatPointValue(e.point,e.series.yAxis,"y",!1,!0):(i.low=this.formatPointValue(e.point,e.series.yAxis,"low",!1,!0),i.high=this.formatPointValue(e.point,e.series.yAxis,"high",!1,!0)),i}return e.point},r.prototype.findMouseValue=function(e,t){t.requireInvertedAxis?(this.valueY=(1-z(e.point.xValue,e.series.xAxis))*e.series.xAxis.rect.height+e.series.xAxis.rect.y,this.valueX=t.mouseX):("PolarRadar"===t.chartAreaType?this.valueX=N(e.point.xValue,e.series.xAxis)*e.series.xAxis.rect.width+e.series.xAxis.rect.x:this.valueX="TrendLine"===e.series.category&&t.tooltip.shared?this.valueX:z(e.point.xValue,e.series.xAxis)*e.series.xAxis.rect.width+e.series.xAxis.rect.x,this.valueY=t.mouseY)},r.prototype.renderGroupedTooltip=function(e,t,r){var o,n,a="PolarRadar"===e.chartAreaType?this.getData():null;this.stopAnimation(),this.removeHighlight(),this.currentPoints=[];var s=[];t&&(e.stockChart?r&&!i.getElement(r.id)&&document.getElementById(e.stockChart.element.id+"_Secondary_Element").appendChild(r):r&&document.getElementById(this.element.id+"_Secondary_Element").appendChild(r)),this.removeText();for(var l={text:[],cancel:!1,name:"sharedTooltipRender",data:[],headerText:"",textStyle:this.textStyle},h=this.mergeXvalues(this.chart.visibleSeries),c=0,d=e.visibleSeries;c<d.length;c++){var p=d[c];p.enableTooltip&&p.visible&&("Cartesian"===e.chartAreaType&&p.visible?o=this.getClosestX(e,p,h):"PolarRadar"===e.chartAreaType&&p.visible&&null!==a.point&&(o=new Yi(p.points[a.point.index],p)),o&&(e.isBlazor?(l.data.push({pointX:o.point.x,pointY:o.point.y,seriesIndex:o.series.index,seriesName:o.series.name,pointIndex:o.point.index,pointText:o.point.text}),l.headerText=this.findHeader(o),this.currentPoints.push(o),l.text.push(this.getTooltipText(o)),n="TrendLine"===o.series.category&&e.tooltip.shared?n:o):this.triggerSharedTooltip(o,t,this.getTooltipText(o),this.findHeader(o),s)))}e.isBlazor&&o&&this.triggerBlazorSharedTooltip(l,n,s,e,t),this.currentPoints.length>0?this.createTooltip(e,t,this.findSharedLocation(),1===this.currentPoints.length?this.currentPoints[0].series.clipRect:null,null,this.findShapes(),this.findMarkerHeight(this.currentPoints[0]),e.chartAxisLayoutPanel.seriesClipRect,s,this.chart.tooltip.template?this.getTemplateText(o):null,this.chart.tooltip.template?l.template:""):this.getElement(this.element.id+"_tooltip_path")&&this.getElement(this.element.id+"_tooltip_path").setAttribute("d","")},r.prototype.triggerBlazorSharedTooltip=function(e,t,i,r,o){var n=this,a={cancel:!1,name:"sharedTooltipRender",text:e.text,headerText:e.headerText,textStyle:e.textStyle,data:e.data},s=function(e){e.cancel?i.push(t):(n.text=e.text,n.headerText=e.headerText,n.findMouseValue(t,n.chart),t=null,n.createTooltip(r,o,n.findSharedLocation(),null,null,n.findShapes(),n.findMarkerHeight(n.currentPoints[0]),r.chartAxisLayoutPanel.seriesClipRect,i))};s.bind(this,t,i),this.chart.trigger("sharedTooltipRender",a,s)},r.prototype.triggerSharedTooltip=function(e,t,i,r,o){var n=this,a={cancel:!1,name:"tooltipRender",text:i,headerText:r,point:e.point,series:this.chart.isBlazor?{}:e.series,textStyle:this.textStyle,data:{pointX:e.point.x,pointY:e.point.y,seriesIndex:e.series.index,seriesName:e.series.name,pointIndex:e.point.index,pointText:e.point.text}},s=function(i){i.cancel?o.push(e):("BoxAndWhisker"===e.series.type&&(n.removeText(),t=!0),n.formattedText=n.formattedText.concat(i.text),n.text=n.formattedText,n.headerText=i.headerText,n.findMouseValue(e,n.chart),n.currentPoints.push(e),e=null)};s.bind(this,e,o),this.chart.trigger("tooltipRender",a,s),a.template&&(this.chart.tooltip.template=a.template)},r.prototype.findSharedLocation=function(){var e=this.chart.stockChart;if(e){1===this.text.length&&this.text.push("");var t=e.enablePeriodSelector?e.toolbarHeight:0,i=document.getElementById(e.element.id+"_ChartTitle"),r=""!==e.title?i.getBoundingClientRect().height+10:0;return new Vi(this.chart.chartAxisLayoutPanel.seriesClipRect.x+5,this.chart.chartAxisLayoutPanel.seriesClipRect.y+t+5+r)}return this.currentPoints.length>1?new Vi(this.valueX,this.valueY):this.getSymbolLocation(this.currentPoints[0])},r.prototype.getBoxLocation=function(e){return this.lierIndex>3?e.point.symbolLocations[this.lierIndex-4]:{x:e.point.regions[0].x+e.point.regions[0].width/2,y:e.point.regions[0].y+e.point.regions[0].height/2}},r.prototype.parseTemplate=function(e,t,i,r,o){for(var n,a,s=0,l=Object.keys(e);s<l.length;s++){d=l[s];n=new RegExp("${point."+d+"}","gm"),i=i.replace(n.source,this.formatPointValue(e,"${point.x}"===n.source?r:o,d,"${point.x}"===n.source,"${point.high}"===n.source||"${point.open}"===n.source||"${point.close}"===n.source||"${point.low}"===n.source||"${point.y}"===n.source||"${point.minimum}"===n.source||"${point.maximum}"===n.source||"${point.outliers}"===n.source||"${point.upperQuartile}"===n.source||"${point.lowerQuartile}"===n.source||"${point.median}"===n.source))}for(var h=0,c=Object.keys(Object.getPrototypeOf(t));h<c.length;h++){var d=c[h];n=new RegExp("${series."+d+"}","gm"),a=t[d],i=i.replace(n.source,a)}return i},r.prototype.formatPointValue=function(e,i,r,o,n){var a,s,l;return"Category"!==i.valueType&&o?a=(s=i.labelFormat&&null!==i.labelFormat.match("{value}"))?i.labelFormat.replace("{value}",i.format(e[r])):i.format(e[r]):n&&!t.isNullOrUndefined(e[r])?(s=i.labelFormat&&null!==i.labelFormat.match("{value}"),l="outliers"===r?i.format(e[r][this.lierIndex-4]):i.format(e[r]),a=s?i.labelFormat.replace("{value}",l):l):a=e[r],a},r.prototype.getFormat=function(e,t){if(t.tooltipFormat)return"XY"===t.seriesType&&"Indicator"===t.category?this.getIndicatorTooltipFormat(t,e,e.tooltip.format):t.tooltipFormat;if(!t.tooltipFormat&&e.tooltip.format)return"XY"===t.seriesType&&"Indicator"===t.category?this.getIndicatorTooltipFormat(t,e,e.tooltip.format):e.tooltip.format;var i="Histogram"===t.type?"${point.minimum}-${point.maximum}":"${point.x}",r=e.tooltip.shared?"${series.name}":i;switch(t.seriesType){case"XY":return"Indicator"===t.category&&this.getIndicatorTooltipFormat(t,e,e.tooltip.format),r+" : "+("Bubble"===t.type?"<b>${point.y}</b> Size : <b>${point.size}</b>":"<b>${point.y}</b>");case"HighLow":return r+"<br/>High : <b>${point.high}</b><br/>Low : <b>${point.low}</b>";case"HighLowOpenClose":return r+"<br/>High : <b>${point.high}</b><br/>Low : <b>${point.low}</b><br/>Open : <b>${point.open}</b><br/>Close : <b>${point.close}</b>";case"BoxPlot":return r+"<br/>"+(this.lierIndex>3?"Outliers : <b>${point.outliers}</b>":"Maximum : <b>${point.maximum}</b><br/>Q3 : <b>${point.upperQuartile}</b><br/>Median : <b>${point.median}</b><br/>Q1 : <b>${point.lowerQuartile}</b><br/>Minimum : <b>${point.minimum}</b>");default:return""}},r.prototype.getIndicatorTooltipFormat=function(e,t,i){return"XY"===e.seriesType?e.name+" : <b>${point.y}</b>":i},r.prototype.removeHighlightedMarker=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];m(this.element.id+"_Series_"+r.series.index+"_Point_"+r.point.index+"_Trackball")}this.chart.markerRender&&this.chart.markerRender.removeHighlightedMarker(),this.previousPoints=[]},r.prototype.getModuleName=function(){return"Tooltip"},r.prototype.destroy=function(){},r}(dn),gn=function(){function e(e){this.iconRectOverFill="transparent",this.iconRectSelectionFill="transparent",this.zoomCompleteEvtCollection=[],this.chart=e,this.elementId=e.element.id,this.chart.svgRenderer=new i.SvgRenderer(this.elementId),this.selectionColor="Bootstrap4"===e.theme?"#FFFFFF":"#ff4081",this.fillColor="Bootstrap4"===e.theme?"#495057":"#737373",this.iconRectOverFill="Bootstrap4"===e.theme?"#5A6268":this.iconRectOverFill,this.iconRectSelectionFill="Bootstrap4"===e.theme?"#5B6269":this.iconRectSelectionFill,this.iconRect="Bootstrap4"===e.theme?new i.Rect(-5,-5,26,26):new i.Rect(0,0,16,16)}return e.prototype.createPanButton=function(e,t){var r=this.chart.svgRenderer,o=this.chart.zoomModule.isPanning?this.selectionColor:this.fillColor,n="M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,";n+="11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z",e.id=this.elementId+"_Zooming_Pan",e.setAttribute("aria-label",this.chart.getLocalizedLabel("Pan")),this.panElements=e,e.appendChild(r.drawRectangle(new Di(this.elementId+"_Zooming_Pan_1","transparent",{},1,this.iconRect))),e.appendChild(r.drawPath(new i.PathOption(this.elementId+"_Zooming_Pan_2",o,null,null,1,null,n))),t.appendChild(e),this.wireEvents(e,this.pan)},e.prototype.createZoomButton=function(e,t){var r=this.chart.svgRenderer,o=this.chart.zoomModule.isPanning?this.fillColor:this.selectionColor,n=this.chart.zoomModule.isPanning?"transparent":this.iconRectSelectionFill,a="M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,";a+="5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571",a+="L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,",e.id=this.elementId+"_Zooming_Zoom",e.setAttribute("aria-label",this.chart.getLocalizedLabel("Zoom")),this.zoomElements=e,this.selectedID=this.chart.zoomModule.isPanning?this.chart.element.id+"_Zooming_Pan_1":this.elementId+"_Zooming_Zoom_1",e.appendChild(r.drawRectangle(new Di(this.elementId+"_Zooming_Zoom_1",n,{},1,this.iconRect))),e.appendChild(r.drawPath(new i.PathOption(this.elementId+"_Zooming_Zoom_3",o,null,null,1,null,a+"4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"))),t.appendChild(e),this.wireEvents(e,this.zoom)},e.prototype.createZoomInButton=function(e,t,r){var o=this.chart.svgRenderer,n=this.fillColor,a="M10.103,0C6.812,0,4.16,2.651,4.16,5.943c0,1.509,0.503,2.834,1.417,3.885l-0.274,0.229H4.571L0,";a+="14.628l0,0L1.372,16l4.571-4.572v-0.685l0.228-0.275c1.052,0.868,2.423,1.417,3.885,1.417c3.291,0,5.943-2.651,",a+="5.943-5.943C16,2.651,13.395,0,10.103,0z M10.058,10.058c-2.286,0-4.114-1.828-4.114-4.114c0-2.286,1.828-4.114,",e.id=this.elementId+"_Zooming_ZoomIn",e.setAttribute("aria-label",this.chart.getLocalizedLabel("ZoomIn"));e.appendChild(o.drawRectangle(new Di(this.elementId+"_Zooming_ZoomIn_1","transparent",{},1,this.iconRect))),e.appendChild(o.drawPath(new i.PathOption(this.elementId+"_Zooming_ZoomIn_2",n,null,null,1,null,a+"4.114-4.114c2.286,0,4.114,1.828,4.114,4.114C14.172,8.229,12.344,10.058,10.058,10.058z"))),e.appendChild(o.drawPolygon(new Fi(this.elementId+"_Zooming_ZoomIn_3","12.749,5.466 10.749,5.466 10.749,3.466 9.749,3.466 9.749,5.466 7.749,5.466 7.749,6.466 9.749,6.466 9.749,8.466 10.749,8.466 10.749,6.466 12.749,6.466",n))),this.zoomInElements=e,this.elementOpacity=r.zoomModule.isPanning?"0.2":"1",e.setAttribute("opacity",this.elementOpacity),t.appendChild(e),this.wireEvents(e,this.zoomIn)},e.prototype.createZoomOutButton=function(e,t,r){var o=this.chart.svgRenderer,n=this.fillColor,a="M0,14.622L1.378,16l4.533-4.533v-0.711l0.266-0.266c1.022,0.889,2.4,1.422,3.866,";a+="1.422c3.289,0,5.955-2.666,5.955-5.955S13.333,0,10.044,0S4.089,2.667,4.134,5.911c0,1.466,0.533,2.844,",a+="1.422,3.866l-0.266,0.266H4.578L0,14.622L0,14.622z M5.911,5.911c0-2.311,1.822-4.133,4.133-4.133s4.133,1.822,4.133,",e.id=this.elementId+"_Zooming_ZoomOut",e.setAttribute("aria-label",this.chart.getLocalizedLabel("ZoomOut")),e.appendChild(o.drawRectangle(new Di(this.elementId+"_Zooming_ZoomOut_1","transparent",{},1,this.iconRect))),e.appendChild(o.drawPath(new i.PathOption(this.elementId+"_Zooming_ZoomOut_2",n,null,null,1,null,a+"4.133s-1.866,4.133-4.133,4.133S5.911,8.222,5.911,5.911z M12.567,6.466h-5v-1h5V6.466z"))),this.zoomOutElements=e,this.elementOpacity=r.zoomModule.isPanning?"0.2":"1",e.setAttribute("opacity",this.elementOpacity),t.appendChild(e),this.wireEvents(e,this.zoomOut)},e.prototype.createResetButton=function(e,t,r,o){var n,a=this.chart.svgRenderer,s=this.fillColor,l="M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,";l+="1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,",l+="13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,",e.id=this.elementId+"_Zooming_Reset",e.setAttribute("aria-label",this.chart.getLocalizedLabel("Reset")),o?(n=i.measureText(this.chart.getLocalizedLabel("ResetZoom"),{size:"12px"}),e.appendChild(a.drawRectangle(new Di(this.elementId+"_Zooming_Reset_1","transparent",{},1,new i.Rect(0,0,n.width,n.height)))),Ve(r.renderer,new i.TextOption(this.elementId+"_Zooming_Reset_2",0+n.width/2,0+3*n.height/4,"middle",this.chart.getLocalizedLabel("ResetZoom"),"rotate(0,0,0)","auto"),{size:"12px"},"black",e,null,null,null,null,null,null,null,null,r.enableCanvas)):(e.appendChild(a.drawRectangle(new Di(this.elementId+"_Zooming_Reset_1","transparent",{},1,this.iconRect))),e.appendChild(a.drawPath(new i.PathOption(this.elementId+"_Zooming_Reset_2",s,null,null,1,null,l+"3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z")))),t.appendChild(e),this.wireEvents(e,this.reset)},e.prototype.wireEvents=function(e,i){t.EventHandler.add(e,"mousedown touchstart",i,this),t.EventHandler.add(e,"mouseover",this.showTooltip,this),t.EventHandler.add(e,"mouseout",this.removeTooltip,this)},e.prototype.showTooltip=function(e){var t=e.currentTarget.id.split("_Zooming_")[1],r=e.pageX-(i.measureText(t,{size:"10px"}).width+5),o=he(e.currentTarget.id+"_1"),n=he(e.currentTarget.id+"_2"),a=he(e.currentTarget.id+"_3");o&&(this.hoveredID=o.id,o.setAttribute("fill",this.iconRectOverFill)),n&&n.setAttribute("fill",this.selectionColor),a&&a.setAttribute("fill",this.selectionColor),this.chart.isTouch||F("EJ2_Chart_ZoomTip",this.chart.getLocalizedLabel(t),e.pageY+10,r,"10px")},e.prototype.removeTooltip=function(){if(he(this.hoveredID)){var e=this.chart.zoomModule.isPanning?this.hoveredID.indexOf("_Pan_")>-1?this.iconRectSelectionFill:"transparent":this.hoveredID.indexOf("_Zoom_")>-1?this.iconRectSelectionFill:"transparent";he(this.hoveredID).setAttribute("fill",e)}var t=this.hoveredID?he(this.hoveredID.replace("_1","_2")):null,i=this.hoveredID?he(this.hoveredID.replace("_1","_3")):null;if(t){r=this.chart.zoomModule.isPanning?this.hoveredID.indexOf("_Pan_")>-1?this.selectionColor:this.fillColor:this.hoveredID.indexOf("_Zoom_")>-1?this.selectionColor:this.fillColor;t.setAttribute("fill",r)}if(i){var r=this.chart.zoomModule.isPanning?this.fillColor:this.hoveredID.indexOf("_Zoom_")>-1?this.selectionColor:this.fillColor;i.setAttribute("fill",r)}m("EJ2_Chart_ZoomTip")},e.prototype.reset=function(){var e=this,i=this.chart;i.zoomModule.isDevice||t.remove(i.zoomModule.toolkitElements);var r;this.removeTooltip(),i.svgObject.setAttribute("cursor","auto");var o,n=[];this.zoomCompleteEvtCollection=[];for(var a=0,s=i.axisCollections;a<s.length;a++){var l=s[a];r={cancel:!1,name:"zoomComplete",axis:l,previousZoomFactor:l.zoomFactor,previousZoomPosition:l.zoomPosition,currentZoomFactor:1,currentZoomPosition:0,previousVisibleRange:l.visibleRange,currentVisibleRange:null},l.zoomFactor=1,l.zoomPosition=0,l.zoomingScrollBar&&(l.zoomingScrollBar.isScrollUI=!1),r.cancel||(l.zoomFactor=r.currentZoomFactor,l.zoomPosition=r.currentZoomPosition,this.zoomCompleteEvtCollection.push(r)),n.push({zoomFactor:l.zoomFactor,zoomPosition:l.zoomFactor,axisName:l.name,axisRange:l.visibleRange})}return o={cancel:!1,axisCollection:n,name:hi},!o.cancel&&this.chart.isBlazor?(this.chart.trigger(hi,o,function(){e.setDefferedZoom(i)}),!1):this.setDefferedZoom(i)},e.prototype.setDefferedZoom=function(e){return e.disableTrackTooltip=!1,e.zoomModule.isZoomed=e.zoomModule.isPanning=e.isChartDrag=e.delayRedraw=!1,e.zoomModule.touchMoveList=e.zoomModule.touchStartList=[],e.zoomModule.pinchTarget=null,e.removeSvg(),e.enableAutoIntervalOnBothAxis&&e.processData(!1),e.refreshAxis(),e.refreshBound(),this.elementOpacity="1",!1},e.prototype.zoomIn=function(e){return this.zoomInOutCalculation(1,this.chart,this.chart.axisCollections,this.chart.zoomSettings.mode),!1},e.prototype.zoomOut=function(e){return this.zoomInOutCalculation(-1,this.chart,this.chart.axisCollections,this.chart.zoomSettings.mode),!1},e.prototype.zoom=function(e){this.chart.zoomModule.isPanning=!1;this.chart.zoomModule;return this.elementOpacity="1",this.chart.svgObject.setAttribute("cursor","auto"),this.zoomInElements.setAttribute("opacity",this.elementOpacity),this.zoomOutElements.setAttribute("opacity",this.elementOpacity),this.applySelection(this.zoomElements.childNodes,this.selectionColor),this.applySelection(this.panElements.childNodes,"#737373"),he(this.selectedID)&&he(this.selectedID).setAttribute("fill","transparent"),this.selectedID=this.chart.element.id+"_Zooming_Zoom_1",he(this.selectedID).setAttribute("fill",this.iconRectSelectionFill),!1},e.prototype.pan=function(){return this.chart.zoomModule.isPanning=!0,this.chart.svgObject.setAttribute("cursor","pointer"),this.elementOpacity="0.2",this.zoomInElements?this.zoomInElements.setAttribute("opacity",this.elementOpacity):null,this.zoomOutElements?this.zoomOutElements.setAttribute("opacity",this.elementOpacity):null,this.panElements?this.applySelection(this.panElements.childNodes,this.selectionColor):null,this.zoomElements?this.applySelection(this.zoomElements.childNodes,"#737373"):null,he(this.selectedID)&&he(this.selectedID).setAttribute("fill","transparent"),this.selectedID=this.chart.element.id+"_Zooming_Pan_1",he(this.selectedID).setAttribute("fill",this.iconRectSelectionFill),!1},e.prototype.zoomInOutCalculation=function(e,t,i,r){if(!t.zoomModule.isPanning&&"0.2"!==this.elementOpacity){var o=void 0,n=void 0,a=void 0;t.disableTrackTooltip=!0,t.delayRedraw=!0;var s=void 0;this.zoomCompleteEvtCollection=[];for(var l=0,h=i;l<h.length;l++){var c=h[l];s={cancel:!1,name:"zoomComplete",axis:c,previousZoomFactor:c.zoomFactor,previousZoomPosition:c.zoomPosition,currentZoomFactor:c.zoomFactor,currentZoomPosition:c.zoomPosition,previousVisibleRange:c.visibleRange,currentVisibleRange:null},("Horizontal"===c.orientation&&"Y"!==r||"Vertical"===c.orientation&&"X"!==r)&&(o=1===(a=Math.max(Math.max(1/le(c.zoomFactor,0,1),1)+.25*e,1))?1:le(1/a,0,1),n=1===a?0:c.zoomPosition+.5*(c.zoomFactor-o),c.zoomPosition===n&&c.zoomFactor===o||(o=n+o>1?1-n:o),s.currentZoomFactor=o,s.currentZoomPosition=n,s.cancel||(c.zoomFactor=s.currentZoomFactor,c.zoomPosition=s.currentZoomPosition,this.zoomCompleteEvtCollection.push(s)))}}},e.prototype.applySelection=function(e,t){for(var i=1,r=e.length;i<r;i++)e[i].setAttribute("fill",t)},e}(),yn=function(){function e(e){this.zoomCompleteEvtCollection=[],this.chart=e,this.isPointer=t.Browser.isPointer,this.browserName=t.Browser.info.name,this.wheelEvent="mozilla"===this.browserName?this.isPointer?"mousewheel":"DOMMouseScroll":"mousewheel",this.cancelEvent=this.isPointer?"pointerleave":"mouseleave",this.addEventListener(),this.isDevice=t.Browser.isDevice;var r=e.zoomSettings;this.toolkit=new gn(e),this.zooming=r,this.elementId=e.element.id,this.zoomingRect=new i.Rect(0,0,0,0),this.zoomAxes=[],this.zoomkitOpacity=.3,this.isIOS=t.Browser.isIos||t.Browser.isIos7,this.isZoomed=this.performedUI=this.zooming.enablePan&&this.zooming.enableSelectionZooming,r.enableScrollbar&&(e.scrollElement=t.createElement("div",{id:e.element.id+"_scrollElement"}))}return e.prototype.renderZooming=function(e,t,i){this.calculateZoomAxesRange(t),!this.zooming.enableSelectionZooming||i&&(!t.isDoubleTap||1!==this.touchStartList.length)||this.isPanning&&!t.isDoubleTap?this.isPanning&&t.isChartDrag&&(!i||i&&1===this.touchStartList.length)&&(this.pinchTarget=i?e.target:null,this.doPan(t,t.axisCollections)):(this.isPanning=!!this.isDevice||this.isPanning,this.performedUI=!0,this.drawZoomingRectangle(t))},e.prototype.drawZoomingRectangle=function(e){var t=e.chartAxisLayoutPanel.seriesClipRect,i=new Vi(e.previousMouseMoveX,e.previousMouseMoveY),r=new Vi(e.mouseX,e.mouseY),o=this.zoomingRect=se(i,r,t);o.width>0&&o.height>0&&(this.isZoomed=!0,e.disableTrackTooltip=!0,e.svgObject.setAttribute("cursor","crosshair"),"X"===this.zooming.mode?(o.height=t.height,o.y=t.y):"Y"===this.zooming.mode&&(o.width=t.width,o.x=t.x),(e.enableCanvas?document.getElementById(this.elementId+"_tooltip_svg"):e.svgObject).appendChild(e.svgRenderer.drawRectangle(new Di(this.elementId+"_ZoomArea",e.themeStyle.selectionRectFill,{color:e.themeStyle.selectionRectStroke,width:1},1,o,0,0,"","3"))))},e.prototype.doPan=function(e,t){var i=this;if(e.startMove&&e.crosshair.enable)return null;var r,o;this.isZoomed=!0,this.offset=e.delayRedraw?this.offset:e.chartAxisLayoutPanel.seriesClipRect,e.delayRedraw=!0,this.zoomCompleteEvtCollection=[],e.disableTrackTooltip=!0;for(var n,a=[],s=0,l=t;s<l.length;s++){var h=l[s];n={cancel:!1,name:"zoomComplete",axis:h,previousZoomFactor:h.zoomFactor,previousZoomPosition:h.zoomPosition,currentZoomFactor:h.zoomFactor,currentZoomPosition:h.zoomPosition,previousVisibleRange:h.visibleRange,currentVisibleRange:null},r=Math.max(1/le(h.zoomFactor,0,1),1),"Horizontal"===h.orientation?(o=(e.previousMouseMoveX-e.mouseX)/h.rect.width/r,n.currentZoomPosition=le(h.zoomPosition+o,0,1-h.zoomFactor)):(o=(e.previousMouseMoveY-e.mouseY)/h.rect.height/r,n.currentZoomPosition=le(h.zoomPosition-o,0,1-h.zoomFactor)),n.cancel||(h.zoomFactor=n.currentZoomFactor,h.zoomPosition=n.currentZoomPosition,this.zoomCompleteEvtCollection.push(n)),a.push({zoomFactor:h.zoomFactor,zoomPosition:h.zoomFactor,axisName:h.name,axisRange:h.visibleRange})}var c={cancel:!1,axisCollection:a,name:hi};!c.cancel&&this.chart.isBlazor?this.chart.trigger(hi,c,function(){i.performDefferedZoom(e)}):(this.performDefferedZoom(e),this.redrawOnZooming(e,!1))},e.prototype.performDefferedZoom=function(e){var t,i;if(this.zooming.enableDeferredZooming){switch(t=e.mouseX-e.mouseDownX,i=e.mouseY-e.mouseDownY,this.zooming.mode){case"X":i=0;break;case"Y":t=0}this.setTransform(t,i,null,null,e,!1),this.refreshAxis(e.chartAxisLayoutPanel,e,e.axisCollections),e.enableCanvas&&this.performZoomRedraw(e)}else this.performZoomRedraw(e);e.previousMouseMoveX=e.mouseX,e.previousMouseMoveY=e.mouseY},e.prototype.performZoomRedraw=function(e){var t=this.zoomingRect;e.animateSeries=!1,this.isZoomed&&(t.width>0&&t.height>0?(this.performedUI=!0,e.svgObject.setAttribute("cursor","auto"),this.doZoom(e,e.axisCollections,e.chartAxisLayoutPanel.seriesClipRect),e.isDoubleTap=!1):e.disableTrackTooltip&&(e.disableTrackTooltip=!1,e.delayRedraw=!1,e.enableCanvas?e.createChartSvg():e.removeSvg(),e.refreshAxis(),e.refreshBound()))},e.prototype.refreshAxis=function(e,t,r){var o=t.zoomSettings.mode;e.measureAxis(new i.Rect(t.initialClipRect.x,t.initialClipRect.y,t.initialClipRect.width,t.initialClipRect.height)),r.map(function(t,i){"Horizontal"===t.orientation&&"Y"!==o&&e.drawXAxisLabels(t,i,null,t.placeNextToAxisLine?t.updatedRect:t.rect),"Vertical"===t.orientation&&"X"!==o&&e.drawYAxisLabels(t,i,null,t.placeNextToAxisLine?t.updatedRect:t.rect)})},e.prototype.doZoom=function(e,t,r){var o,n=this,a=this.zoomingRect,s=this.zooming.mode;this.isPanning=e.zoomSettings.enablePan||this.isPanning;var l=[];this.zoomCompleteEvtCollection=[];for(var h=0,c=t;h<c.length;h++){var d=c[h];o={cancel:!1,name:"zoomComplete",axis:d,previousZoomFactor:d.zoomFactor,previousZoomPosition:d.zoomPosition,currentZoomFactor:d.zoomFactor,currentZoomPosition:d.zoomPosition,previousVisibleRange:d.visibleRange,currentVisibleRange:null},"Horizontal"===d.orientation?"Y"!==s&&(o.currentZoomPosition+=Math.abs((a.x-r.x)/r.width)*d.zoomFactor,o.currentZoomFactor*=a.width/r.width):"X"!==s&&(o.currentZoomPosition+=(1-Math.abs((a.height+(a.y-r.y))/r.height))*d.zoomFactor,o.currentZoomFactor*=a.height/r.height),o.cancel||(d.zoomFactor=o.currentZoomFactor,d.zoomPosition=o.currentZoomPosition,this.zoomCompleteEvtCollection.push(o)),l.push({zoomFactor:d.zoomFactor,zoomPosition:d.zoomFactor,axisName:d.name,axisRange:d.visibleRange})}var p={cancel:!1,axisCollection:l,name:hi};!p.cancel&&this.chart.isBlazor?this.chart.trigger(hi,p,function(){n.zoomingRect=new i.Rect(0,0,0,0),n.performZoomRedraw(e)}):(this.zoomingRect=new i.Rect(0,0,0,0),this.redrawOnZooming(e))},e.prototype.redrawOnZooming=function(e,t,i){void 0===t&&(t=!0),void 0===i&&(i=!1);var r=i?this.toolkit.zoomCompleteEvtCollection:this.zoomCompleteEvtCollection;t&&this.performZoomRedraw(e);for(var o,n=0;n<r.length;n++)r[n].cancel||(o={cancel:!1,name:"zoomComplete",axis:e.axisCollections[n],previousZoomFactor:r[n].previousZoomFactor,previousZoomPosition:r[n].previousZoomPosition,currentZoomFactor:e.axisCollections[n].zoomFactor,currentZoomPosition:e.axisCollections[n].zoomPosition,currentVisibleRange:e.axisCollections[n].visibleRange,previousVisibleRange:r[n].previousVisibleRange},e.trigger("zoomComplete",o))},e.prototype.performMouseWheelZooming=function(e,t,i,r,o){var n,a,s,l=this,h="mozilla"!==this.browserName||this.isPointer?e.wheelDelta>0?1:-1:-e.detail/3>0?1:-1,c=this.zooming.mode,d=.5;this.isZoomed=!0,this.calculateZoomAxesRange(r),r.disableTrackTooltip=!0,this.performedUI=!0,this.isPanning=r.zoomSettings.enablePan||this.isPanning,this.zoomCompleteEvtCollection=[];for(var p,u=[],g=0,y=o;g<y.length;g++){var m=y[g];p={cancel:!1,name:"zoomComplete",axis:m,previousZoomFactor:m.zoomFactor,previousZoomPosition:m.zoomPosition,currentZoomFactor:m.zoomFactor,currentZoomPosition:m.zoomPosition,currentVisibleRange:null,previousVisibleRange:m.visibleRange},("Vertical"===m.orientation&&"X"!==c||"Horizontal"===m.orientation&&"Y"!==c)&&((n=Math.max(Math.max(1/le(m.zoomFactor,0,1),1)+.25*h,1))>=1&&(d=(d="Horizontal"===m.orientation?t/m.rect.width:1-i/m.rect.height)>1?1:d<0?0:d,a=1===n?1:le((h>0?.9:1.1)/n,0,1),s=1===n?0:m.zoomPosition+(m.zoomFactor-a)*d,m.zoomPosition===s&&m.zoomFactor===a||(a=s+a>1?1-s:a),p.currentZoomFactor=a,p.currentZoomPosition=s),p.cancel||(m.zoomFactor=p.currentZoomFactor,m.zoomPosition=p.currentZoomPosition,this.zoomCompleteEvtCollection.push(p))),u.push({zoomFactor:m.zoomFactor,zoomPosition:m.zoomFactor,axisName:m.name,axisRange:m.visibleRange})}var v={cancel:!1,axisCollection:u,name:hi};!v.cancel&&this.chart.isBlazor?this.chart.trigger(hi,v,function(){l.performZoomRedraw(r)}):this.redrawOnZooming(r)},e.prototype.performPinchZooming=function(e,t){if(this.zoomingRect.width>0&&this.zoomingRect.height>0||t.startMove&&t.crosshair.enable)return!1;this.calculateZoomAxesRange(t),this.isZoomed=!0,this.isPanning=!0,this.performedUI=!0,this.offset=t.delayRedraw?this.offset:t.chartAxisLayoutPanel.seriesClipRect,t.delayRedraw=!0,t.disableTrackTooltip=!0;var r=t.element.getBoundingClientRect(),o=this.touchStartList,n=this.touchMoveList,a=o[0].pageX-r.left,s=o[0].pageY-r.top,l=n[0].pageX-r.left,h=n[0].pageY-r.top,c=o[1].pageX-r.left,d=o[1].pageY-r.top,p=n[1].pageX-r.left,u=n[1].pageY-r.top,g=Math.abs(l-p)/Math.abs(a-c),y=Math.abs(h-u)/Math.abs(s-d),m=(this.offset.x-l)/g+a,v=(this.offset.y-h)/y+s,f=new i.Rect(m,v,this.offset.width/g,this.offset.height/y),b=l-g*a,x=h-y*s;if(!isNaN(g-g)&&!isNaN(y-y))switch(this.zooming.mode){case"XY":this.setTransform(b,x,g,y,t,!0);break;case"X":this.setTransform(b,0,g,1,t,!0);break;case"Y":this.setTransform(0,x,1,y,t,!0)}return this.calculatePinchZoomFactor(t,f),this.refreshAxis(t.chartAxisLayoutPanel,t,t.axisCollections),this.redrawOnZooming(t,!1),!0},e.prototype.calculatePinchZoomFactor=function(e,t){var i,r,o,n,a,s,l,h,c,d=this.zooming.mode,p=[];this.zoomCompleteEvtCollection=[];for(var u=0;u<e.axisCollections.length;u++){var g=e.axisCollections[u];("Horizontal"===g.orientation&&"Y"!==d||"Vertical"===g.orientation&&"X"!==d)&&(h=g.zoomFactor,c=g.zoomPosition,l={cancel:!1,name:"zoomComplete",axis:g,previousZoomFactor:g.zoomFactor,previousZoomPosition:g.zoomPosition,currentZoomFactor:h,currentZoomPosition:c,previousVisibleRange:g.visibleRange,currentVisibleRange:null},"Horizontal"===g.orientation?(o=(a=t.x-this.offset.x)/(s=g.rect.width/this.zoomAxes[u].delta)+this.zoomAxes[u].min,n=(a=t.x+t.width-this.offset.x)/s+this.zoomAxes[u].min):(a=t.y-this.offset.y,s=g.rect.height/this.zoomAxes[u].delta,o=(-1*a+g.rect.height)/s+this.zoomAxes[u].min,n=(-1*(a=t.y+t.height-this.offset.y)+g.rect.height)/s+this.zoomAxes[u].min),i=Math.min(o,n),r=Math.max(o,n),c=(i-this.zoomAxes[u].actualMin)/this.zoomAxes[u].actualDelta,h=(r-i)/this.zoomAxes[u].actualDelta,l.currentZoomPosition=c<0?0:c,l.currentZoomFactor=h>1?1:h,l.cancel||(g.zoomFactor=l.currentZoomFactor,g.zoomPosition=l.currentZoomPosition,this.zoomCompleteEvtCollection.push(l)),p.push({zoomFactor:g.zoomFactor,zoomPosition:g.zoomFactor,axisName:g.name,axisRange:g.visibleRange}))}var y={cancel:!1,axisCollection:p,name:hi};!y.cancel&&this.chart.isBlazor&&this.chart.trigger(hi,y)},e.prototype.setTransform=function(e,t,i,r,o,n){o.enableCanvas||o.seriesElements.setAttribute("clip-path","url(#"+this.elementId+"_ChartAreaClipRect_)"),o.indicatorElements&&o.indicatorElements.setAttribute("clip-path","url(#"+this.elementId+"_ChartAreaClipRect_)");var a,s,l,h;if(null!==e&&null!==t)for(var c=0,d=o.visibleSeries;c<d.length;c++){var p=d[c];s=o.requireInvertedAxis?p.yAxis.rect.x:p.xAxis.rect.x,l=o.requireInvertedAxis?p.xAxis.rect.y:p.yAxis.rect.y,a="translate("+(e+(n?i*s:s))+","+(t+(n?r*l:l))+")",a=i||r?a+" scale("+i+" "+r+")":a,p.visible&&("Indicator"===p.category?p.seriesElement.parentNode.setAttribute("transform",a):o.enableCanvas||p.seriesElement.setAttribute("transform",a),h=he(o.element.id+"_Series_"+p.index+"_DataLabelCollections"),p.errorBarElement&&p.errorBarElement.setAttribute("transform",a),p.symbolElement&&p.symbolElement.setAttribute("transform",a),p.textElement&&(p.textElement.setAttribute("visibility","hidden"),p.shapeElement.setAttribute("visibility","hidden")),h&&(h.style.visibility="hidden"))}},e.prototype.calculateZoomAxesRange=function(e){for(var t,i,r=0;r<e.axisCollections.length;r++){var o=e.axisCollections[r];i=o.visibleRange,this.zoomAxes[r]?e.delayRedraw||(this.zoomAxes[r].min=i.min,this.zoomAxes[r].delta=i.delta):(t={actualMin:o.actualRange.min,actualDelta:o.actualRange.delta,min:i.min,delta:i.delta},this.zoomAxes[r]=t)}},e.prototype.showZoomingToolkit=function(e){var r,o=this.zooming.toolbarItems,n=e.chartAxisLayoutPanel.seriesClipRect,a=e.svgRenderer,s=this.isDevice?1:o.length,l=this.isDevice?i.measureText("Reset Zoom",{size:"12px"}).width:16,h=this.isDevice?i.measureText("Reset Zoom",{size:"12px"}).height:22,c=s*l+5*(s+1)+5*(s-1),d=n.x+n.width-c-5,p=n.y+5,u=5,g=this.toolkit,y='<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';if(y+='<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>',y+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>',0===s||he(this.elementId+"_Zooming_KitCollection"))return!1;var m=a.createDefs();o=this.isDevice?["Reset"]:o,m.innerHTML=y,this.toolkitElements=a.createGroup({id:this.elementId+"_Zooming_KitCollection",transform:"translate("+d+","+p+")"}),this.toolkitElements.appendChild(m),this.toolkitElements.appendChild(a.drawRectangle(new Di(this.elementId+"_Zooming_Rect","#fafafa",{color:"transparent",width:1},1,new i.Rect(0,0,c,h+10),0,0)));var v=a.drawRectangle(new Di(this.elementId+"_Zooming_Rect","#fafafa",{color:"transparent",width:1},.1,new i.Rect(0,0,c,h+10),0,0));v.setAttribute("filter","url(#chart_shadow)"),this.toolkitElements.appendChild(v);for(var f,b=1;b<=s;b++){switch(f=o[b-1],r=a.createGroup({transform:"translate("+u+","+(this.isDevice?5:8)+")"}),f){case"Pan":g.createPanButton(r,this.toolkitElements);break;case"Zoom":g.createZoomButton(r,this.toolkitElements);break;case"ZoomIn":g.createZoomInButton(r,this.toolkitElements,e);break;case"ZoomOut":g.createZoomOutButton(r,this.toolkitElements,e);break;case"Reset":g.createResetButton(r,this.toolkitElements,e,this.isDevice)}u+=l+10}if(this.toolkitElements.setAttribute("opacity",this.isDevice?"1":""+this.zoomkitOpacity),this.toolkitElements.setAttribute("cursor","auto"),e.enableCanvas){var x=document.createElement("div");x.id=e.element.id+"_zoom",x.setAttribute("style","position:absolute; z-index:1");var w=e.availableSize.height/2,S=e.svgRenderer.createSvg({id:e.element.id+"_zoomkit_svg",width:e.availableSize.width,height:w});S.setAttribute("style","position:absolute"),S.appendChild(this.toolkitElements),x.appendChild(S),document.getElementById(this.elementId+"_Secondary_Element").appendChild(x)}else e.svgObject.appendChild(this.toolkitElements);return this.isDevice||(t.EventHandler.add(this.toolkitElements,"mousemove touchstart",this.zoomToolkitMove,this),t.EventHandler.add(this.toolkitElements,"mouseleave touchend",this.zoomToolkitLeave,this),this.isPanning&&g.pan()),!0},e.prototype.applyZoomToolkit=function(e,t){this.isAxisZoomed(t)?(this.showZoomingToolkit(e),this.isZoomed=!0):(this.toolkit.removeTooltip(),this.isPanning=!1,this.isZoomed=!1,e.svgObject.setAttribute("cursor","auto"))},e.prototype.isAxisZoomed=function(e){for(var t=!1,i=0,r=e;i<r.length;i++){var o=r[i];t=t||1!==o.zoomFactor||0!==o.zoomPosition}return t},e.prototype.zoomToolkitMove=function(){var e=this.toolkitElements;return this.zoomkitOpacity=1,e.setAttribute("opacity",""+this.zoomkitOpacity),!1},e.prototype.zoomToolkitLeave=function(){var e=this.toolkitElements;return this.zoomkitOpacity=.3,e.setAttribute("opacity",""+this.zoomkitOpacity),!1},e.prototype.addEventListener=function(){this.chart.isDestroyed||(t.EventHandler.add(this.chart.element,this.wheelEvent,this.chartMouseWheel,this),this.chart.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.chart.on(t.Browser.touchStartEvent,this.mouseDownHandler,this),this.chart.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),this.chart.on(this.cancelEvent,this.mouseCancelHandler,this))},e.prototype.removeEventListener=function(){this.chart.isDestroyed||(t.EventHandler.remove(this.chart.element,this.wheelEvent,this.chartMouseWheel),this.chart.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.chart.off(t.Browser.touchStartEvent,this.mouseDownHandler),this.chart.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.chart.off(this.cancelEvent,this.mouseCancelHandler))},e.prototype.chartMouseWheel=function(e){var t=this.chart,i=t.element.getBoundingClientRect(),r=he(t.svgId).getBoundingClientRect(),o=e.clientX-i.left-Math.max(r.left-i.left,0),n=e.clientY-i.top-Math.max(r.top-i.top,0);return this.zooming.enableMouseWheelZooming&&j(o,n,t.chartAxisLayoutPanel.seriesClipRect)&&(e.preventDefault(),this.performMouseWheelZooming(e,o,n,t,t.axisCollections)),!1},e.prototype.mouseMoveHandler=function(e){var t=this.chart,i=null;"touchmove"===e.type&&(e.preventDefault&&this.isIOS&&(this.isPanning||t.isDoubleTap||this.zooming.enablePinchZooming&&this.touchStartList.length>1)&&e.preventDefault(),i=e.touches),t.isChartDrag&&(t.isTouch&&(this.touchMoveList=this.addTouchPointer(this.touchMoveList,e,i),this.zooming.enablePinchZooming&&this.touchMoveList.length>1&&this.touchStartList.length>1&&this.performPinchZooming(e,t)),this.renderZooming(e,t,t.isTouch))},e.prototype.mouseDownHandler=function(e){var t,i=this.chart,r=null;"touchstart"===e.type?(r=e.touches,t=e.target):t=e.target,-1===t.id.indexOf(i.element.id+"_Zooming_")&&j(i.previousMouseMoveX,i.previousMouseMoveY,i.chartAxisLayoutPanel.seriesClipRect)&&(i.isChartDrag=!0),i.isTouch&&(this.touchStartList=this.addTouchPointer(this.touchStartList,e,r))},e.prototype.mouseUpHandler=function(e){var t=this.chart,i=-1===e.target.id.indexOf(t.element.id+"_ZoomOut_")||-1===e.target.id.indexOf(t.element.id+"_ZoomIn_");(t.isChartDrag||i)&&this.redrawOnZooming(t,!0,!0),t.isTouch&&(t.isDoubleTap&&j(t.mouseX,t.mouseY,t.chartAxisLayoutPanel.seriesClipRect)&&1===this.touchStartList.length&&this.isZoomed&&this.toolkit.reset(),this.touchStartList=[],t.isDoubleTap=!1)},e.prototype.mouseCancelHandler=function(){this.isZoomed&&this.performZoomRedraw(this.chart),this.pinchTarget=null,this.touchStartList=[],this.touchMoveList=[]},e.prototype.addTouchPointer=function(e,t,i){if(i){e=[];for(var r=0,o=i.length;r<o;r++)e.push({pageX:i[r].clientX,pageY:i[r].clientY,pointerId:null})}else if(0===(e=e||[]).length)e.push({pageX:t.clientX,pageY:t.clientY,pointerId:t.pointerId});else for(var r=0,n=e.length;r<n;r++)e[r].pointerId===t.pointerId?e[r]={pageX:t.clientX,pageY:t.clientY,pointerId:t.pointerId}:e.push({pageX:t.clientX,pageY:t.clientY,pointerId:t.pointerId});return e},e.prototype.getModuleName=function(){return"Zoom"},e.prototype.destroy=function(){this.removeEventListener()},e}(),mn=function(){function e(e){this.control=e}return e.prototype.seriesStyles=function(){var e,i,r=document.getElementById(this.styleId),o="{}",n=this.control.selectionPattern,a=this.control.highlightPattern;if(t.isNullOrUndefined(r)||"None"!==n||"None"!==a){(r=document.createElement("style")).setAttribute("id",this.styleId);for(var s=0,l=this.control.visibleSeries;s<l.length;s++){var h=l[s],c=this.control.visibleSeries[h.index]||this.control.visibleSeries[h.index];if(!(t.isNullOrUndefined(n)&&t.isNullOrUndefined(a)||"None"===n&&"None"===a)){var d=this.styleId.indexOf("highlight")>0?a:n;if("Pie"===c.type||"Funnel"===c.type||"Pyramid"===c.type)for(var p=0;p<c.points.length;p++)i=c.opacity,o="{ fill:"+this.pattern(this.control,c.points[p].color,h.index,d,i)+"}";else c.type&&(i=c.opacity,o="{ fill:"+this.pattern(this.control,c.interior,h.index,d,i)+"}")}e=h.selectionStyle||this.styleId+"_series_"+h.index+",."+this.styleId+"_series_"+h.index+"> *",o=o.indexOf("None")>-1?"{}":o,r.innerHTML+=h.selectionStyle?"":"."+e+o}r.innerHTML+="."+this.unselected+" { opacity:0.3;} ",document.body.appendChild(r)}},e.prototype.pattern=function(e,t,i,r,o){var n=e.svgObject,a=[],s={id:e.element.id+"_"+r+"_Selection_"+i,patternUnits:"userSpaceOnUse"};switch(r){case"Dots":s.height=s.width=6,s.width=6,a[0]={x:0,y:0,width:7,height:7,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={cx:3,cy:3,r:2,"stroke-width":1,fill:t,name:"circle"};break;case"Pacman":s.height="18.384",s.width="17.917",a[0]={name:"rect",x:0,y:0,width:17.917,height:18.384,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M9.081,9.194l5.806-3.08c-0.812-1.496-2.403-3.052-4.291-3.052H8.835C6.138,3.063,3,6.151,3,8.723v1.679 c0,2.572,3.138,5.661,5.835,5.661h1.761c2.085,0,3.835-1.76,4.535-3.514L9.081,9.194z","stroke-width":1,stroke:t,fill:t};break;case"Chessboard":s.height=s.width=10,a[0]={x:0,y:0,width:10,height:10,fill:"#ffffff",opacity:o,name:"rect"},a[1]={x:0,y:0,width:5,height:5,fill:t,opacity:o,name:"rect"},a[2]={x:5,y:5,width:5,height:5,fill:t,opacity:o,name:"rect"};break;case"Crosshatch":s.height=s.width="8",a[0]={x:0,y:0,width:8,height:8,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={d:"M0 0L8 8ZM8 0L0 8Z","stroke-width":1,stroke:t,name:"path"};break;case"DiagonalForward":s.height=s.width=6,a[0]={x:0,y:0,width:6,height:6,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={d:"M 3 -3 L 9 3 M 6 6 L 0 0 M 3 9 L -3 3","stroke-width":2,stroke:t,name:"path"};break;case"DiagonalBackward":s.height=s.width=6,a[0]={x:0,y:0,width:6,height:6,transform:"translate(0,0)",fill:"#ffffff",opacity:o,name:"rect"},a[1]={d:"M 3 -3 L -3 3 M 0 6 L 6 0 M 9 3 L 3 9","stroke-width":2,stroke:t,name:"path"};break;case"Grid":s.height=s.width=6,a[0]={name:"rect",x:0,y:0,width:6,height:6,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M1 3.5L11 3.5 M0 3.5L11 3.5 M0 7.5L11 7.5 M0 11.5L11 11.5 M5.5 0L5.5 12 M11.5 0L11.5 12Z","stroke-width":1,stroke:t};break;case"Turquoise":s.height=s.width=17,a[0]={name:"rect",x:0,y:0,width:17,height:17,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0.5739999999999998,2.643a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[2]={name:"path",d:"M11.805,2.643a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[3]={name:"path",d:"M6.19,2.643a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[4]={name:"path",d:"M11.805,8.217a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[5]={name:"path",d:"M6.19,8.217a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[6]={name:"path",d:"M11.805,13.899a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t},a[7]={name:"path",d:"M6.19,13.899a2.123,2.111 0 1,0 4.246,0a2.123,2.111 0 1,0 -4.246,0","stroke-width":1,"stroke-miterlimit":10,stroke:t,fill:t};break;case"Star":s.height=s.width=21,a[0]={name:"rect",x:0,y:0,width:21,height:21,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M15.913,18.59L10.762 12.842 5.613 18.75 8.291 11.422 0.325 9.91 8.154 8.33 5.337 0.91 10.488 6.658 15.637 0.75 12.959 8.078 20.925 9.59 13.096 11.17 z","stroke-width":1,stroke:t,fill:t};break;case"Triangle":s.height=s.width=10,a[0]={name:"rect",x:0,y:0,width:10,height:10,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M4.987,0L7.48 4.847 9.974 9.694 4.987 9.694 0 9.694 2.493 4.847 z","stroke-width":1,stroke:t,fill:t};break;case"Circle":s.height=s.width=9,a[0]={name:"rect",x:0,y:0,width:9,height:9,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"circle",cx:5.125,cy:3.875,r:3.625,"stroke-width":1,fill:t};break;case"Tile":s.height=s.width=18,a[0]={name:"rect",x:0,y:0,width:18,height:18,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0,9L0 0 9 0 z","stroke-width":1,stroke:t,fill:t},a[2]={name:"path",d:"M9,9L9 0 18 0 z","stroke-width":1,stroke:t,fill:t},a[3]={name:"path",d:"M0,18L0 9 9 9 z","stroke-width":1,stroke:t,fill:t},a[4]={name:"path",d:"M9,18L9 9 18 9 z","stroke-width":1,stroke:t,fill:t};break;case"HorizontalDash":s.height=s.width=12,a[0]={name:"rect",x:0,y:0,width:12,height:12,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0,1.5 L10 1.5 M0,5.5 L10 5.5 M0,9.5 L10 9.5 z","stroke-width":1,stroke:t,fill:t};break;case"VerticalDash":s.height=s.width=12,a[0]={name:"rect",x:0,y:0,width:12,height:12,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M1.5,0 L1.5 10 M5.5,0 L5.5 10 M9.5,0 L9.5 10 z","stroke-width":1,stroke:t,fill:t};break;case"Rectangle":s.height=s.width=12,a[0]={name:"rect",width:12,height:12,fill:"#ffffff",opacity:o},a[1]={name:"rect",x:1,y:2,width:4,height:9,fill:t,opacity:o},a[2]={name:"rect",x:7,y:2,width:4,height:9,fill:t,opacity:o};break;case"Box":s.height=s.width=10,a[0]={name:"rect",width:13,height:13,fill:"#ffffff",opacity:o},a[1]={name:"rect",x:1.5,y:1.5,width:10,height:9,fill:t,opacity:o};break;case"HorizontalStripe":s.height=12,s.width=10,a[0]={name:"rect",x:0,y:0,width:10,height:12,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0,0.5 L10 0.5 M0,4.5 L10 4.5 M0,8.5 L10 8.5 z","stroke-width":1,stroke:t,fill:t};break;case"VerticalStripe":s.height=10,s.width=12,a[0]={name:"rect",x:0,y:0,width:12,height:10,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"path",d:"M0.5,0 L0.5 10 M4.5,0 L4.5 10 M8.5,0 L8.5 10 z","stroke-width":1,stroke:t,fill:t};break;case"Bubble":s.height=s.width=20,a[0]={name:"rect",x:0,y:0,width:20,height:20,transform:"translate(0,0)",fill:"#ffffff",opacity:o},a[1]={name:"circle",cx:5.217,cy:11.325,r:3.429,"stroke-width":1,fill:"#D0A6D1"},a[2]={name:"circle",cx:13.328,cy:6.24,r:4.884,"stroke-width":1,fill:t},a[3]={name:"circle",cx:13.277,cy:14.66,r:3.018,"stroke-width":1,fill:"#D0A6D1"}}var l=e.svgRenderer||e.renderer,h=l.createPattern(s,"pattern");return this.loadPattern(e,a,h,l),n.appendChild(h),"url(#"+e.element.id+"_"+r+"_Selection_"+i+")"},e.prototype.loadPattern=function(e,t,i,r){var o;for(o=0;o<t.length;o++){var n=r.createPattern(t[o],t[o].name);i.appendChild(n)}},e.prototype.concatIndexes=function(e,t){return e.concat(t)},e.prototype.checkVisibility=function(e){if(!e)return!1;for(var t=!1,i=[],r=0,o=e;r<o.length;r++){s=o[r];-1===i.indexOf(s.series)&&i.push(s.series)}for(var n=0,a=i;n<a.length;n++){var s=a[n];if(this.control.series[s].visible){t=!0;break}}return t},e.prototype.addSvgClass=function(e,t){var i=e.getAttribute("class")||"";-1===(i+=""!==i?" ":"").indexOf(t)&&e.setAttribute("class",i+t)},e.prototype.removeSvgClass=function(e,t){var i=e.getAttribute("class")||"";i.indexOf(t)>-1&&e.setAttribute("class",i.replace(t,""))},e.prototype.getChildren=function(e){for(var t=[],i=0;i<e.childNodes.length;i++)"defs"!==e.childNodes[i].tagName&&t.push(e.childNodes[i]);return t},e}(),vn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fn=function(e){function r(t){var i=e.call(this,t)||this;i.isdrawRect=!0,i.multiDataIndexes=[],i.pathIndex=0,i.seriesIndex=0,i.count=-1,i.dragRectArray=[],i.filterArray=[],i.totalSelectedPoints=[],i.chart=t,i.renderer=t.renderer;var r=t.selectionMode;return i.isMultiDrag=t.isMultiSelect&&r.indexOf("Drag")>-1,i.addEventListener(),i}return vn(r,e),r.prototype.addEventListener=function(){if(!(this.chart.isDestroyed||this.chart.stockChart&&this.chart.stockChart.onPanning)){var e=t.Browser.isPointer?"pointerleave":"mouseleave";this.chart.on(t.Browser.touchMoveEvent,this.mouseMove,this),this.chart.on(e,this.completeSelection,this),this.chart.on("click",this.calculateSelectedElements,this),this.chart.on(t.Browser.touchStartEvent,this.mousedown,this),this.chart.on(t.Browser.touchEndEvent,this.completeSelection,this)}},r.prototype.mousedown=function(e){var t=this.chart;t.isPointMouseDown||"None"===t.selectionMode||t.isChartDrag||(t.isDoubleTap||!t.isTouch||this.rectPoints)&&this.dragStart(t,t.chartAxisLayoutPanel.seriesClipRect,t.mouseDownX,t.mouseDownY,e)},r.prototype.removeEventListener=function(){this.chart.isDestroyed||(this.chart.off(t.Browser.touchMoveEvent,this.mouseMove),this.chart.off("pointerleave",this.completeSelection),this.chart.off("click",this.calculateSelectedElements),this.chart.off(t.Browser.touchStartEvent,this.mousedown),this.chart.off(t.Browser.touchEndEvent,this.completeSelection))},r.prototype.initPrivateVariables=function(e){this.styleId=e.element.id+"_ej2_chart_selection",this.unselected=e.element.id+"_ej2_deselected",this.closeIconId=e.element.id+"_ej2_drag_close",this.draggedRectGroup=e.element.id+"_ej2_drag_group",this.multiRectGroup=e.element.id+"_ej2_drag_multi_group",this.draggedRect=e.element.id+"_ej2_drag_rect",this.lassoPath=e.element.id+"_ej2_drag_path",this.selectedDataIndexes=[],this.rectPoints=null,this.isSeriesMode="Series"===e.selectionMode},r.prototype.invokeSelection=function(e){this.initPrivateVariables(e),this.series=t.extend({},e.visibleSeries,null,!0),this.seriesStyles(),this.currentMode=e.selectionMode,e.selectionMode.indexOf("Drag")>-1||this.selectDataIndex(e,this.concatIndexes(e.selectedDataIndexes,this.selectedDataIndexes))},r.prototype.generateStyle=function(e){return e?(this.styleId.indexOf("selection")>1&&"None"!==this.chart.selectionMode&&(this.unselected=e.unSelectedStyle||this.unselected),this.styleId.indexOf("highlight")>0&&"None"!==this.chart.highlightMode&&(this.unselected=e.nonHighlightStyle||this.unselected),e.selectionStyle||this.styleId+"_series_"+e.index):"undefined"},r.prototype.selectDataIndex=function(e,t){for(var i=0,r=t;i<r.length;i++){var o=r[i];this.performSelection(o,e,this.getElementByIndex(e,o)[0])}},r.prototype.getElementByIndex=function(e,t,i){void 0===i&&(i="");var r=e.element.id+"_Series_"+t.series+"_Point_"+t.point,o=e.series[t.series];return r=!o.isRectSeries&&"Scatter"!==o.type&&"Bubble"!==o.type&&o.marker.visible?r+"_Symbol"+i:r,[he(r),"RangeArea"===o.type&&o.marker.visible?he(r+"1"):null]},r.prototype.getClusterElements=function(e,t){for(var i,r,o=[],n=0,a=e.visibleSeries;n<a.length;n++){var s=a[n];s.visible&&(t=new Jt(s.index,t.point),o.push(this.getElementByIndex(e,t)[0]),i=this.generateStyle(e.visibleSeries[t.series]),r=document.querySelectorAll("."+i),this.findTrackballElements(r,i),!e.isMultiSelect&&r.length>0&&r[0].id!==o[o.length-1].id&&this.removeSelection(e,t.series,r,i,!0))}return o},r.prototype.findTrackballElements=function(e,i){for(var r,o,n=0;n<e.length;n++)if(!t.isNullOrUndefined(e[n])&&(r=t.isNullOrUndefined(e[n].parentNode)?[]:[].slice.call(e[0].parentNode.querySelectorAll("."+i))).length>0){o=[];for(var a=0;a<r.length;a++)r[a].id.indexOf("Trackball")>-1&&o.push(r[a]);this.removeStyles(o)}},r.prototype.findElements=function(e,t,i,r){return void 0===r&&(r=""),this.isSeriesMode?this.getSeriesElements(t):"Cluster"===this.currentMode?this.getClusterElements(e,i):this.getElementByIndex(e,i,r)},r.prototype.isAlreadySelected=function(e){var t=e.target;if("click"===e.type?(this.currentMode=this.chart.selectionMode,this.styleId=this.chart.element.id+"_ej2_chart_selection"):"mousemove"===e.type&&(this.currentMode=this.chart.highlightMode,this.highlightDataIndexes=[],this.styleId=this.chart.element.id+"_ej2_chart_highlight"),"None"!==this.chart.highlightMode&&"None"===this.chart.selectionMode&&"click"===e.type)return!1;if("None"!==this.chart.highlightMode&&this.previousSelectedEle&&this.previousSelectedEle[0]){var i=t.parentNode.id,r=void 0;t.parentNode&&(r=i.indexOf("SeriesGroup")>0||i.indexOf("SymbolGroup")>0);for(var o=0;o<this.previousSelectedEle.length;o++)this.previousSelectedEle[o].hasAttribute("class")&&(this.previousSelectedEle[o].getAttribute("class").indexOf("highlight")>-1&&(r||"click"===e.type)?(this.previousSelectedEle[o].removeAttribute("class"),this.addOrRemoveIndex(this.highlightDataIndexes,this.indexFinder(this.previousSelectedEle[o].id))):!r&&this.previousSelectedEle[o].getAttribute("class").indexOf("highlight")>-1&&this.performSelection(this.indexFinder(this.previousSelectedEle[o].id),this.chart,this.previousSelectedEle[o]))}return!0},r.prototype.calculateSelectedElements=function(e){if(!t.isNullOrUndefined(e.target)){var i=e.target;if(("None"!==this.chart.selectionMode||"None"!==this.chart.highlightMode)&&-1!==i.id.indexOf(this.chart.element.id+"_")){if("mousemove"===e.type){if(i.hasAttribute("class")&&(i.getAttribute("class").indexOf("highlight")>-1||i.getAttribute("class").indexOf("selection")>-1))return;if(!t.isNullOrUndefined(i.parentNode)&&i.parentNode.hasAttribute("class")&&(i.parentNode.getAttribute("class").indexOf("highlight")>0||i.parentNode.getAttribute("class").indexOf("selection")>0))return}if(this.isAlreadySelected(e),i.id.indexOf("_Series_")>-1){var r=void 0;if(i.id.indexOf("_Trackball_1")>-1)r=he(i.id.split("_Trackball_")[0]+"_Symbol"),r=t.isNullOrUndefined(r)?he(i.id.split("_Trackball_")[0]):r;else if(i.id.indexOf("_Trackball_0")>-1)return null;this.performSelection(this.indexFinder(i.id),this.chart,r||i)}}}},r.prototype.performSelection=function(e,t,i){if(this.isSeriesMode="Series"===this.currentMode,"BoxAndWhisker"===t.series[e.series].type&&i&&i.id===t.element.id+"_Series_"+e.series+"_Point_"+e.point+"_BoxPath"&&(i=i.parentNode),"Area"===t.series[e.series].type&&("Point"===this.currentMode||"Cluster"===this.currentMode)&&i&&i.id===this.chart.element.id+"_Series_"+e.series){var r=this.generateStyle(t.series[e.series]),o=document.querySelectorAll("."+r);this.findTrackballElements(o,r),this.blurEffect(t.element.id,t.visibleSeries)}switch(this.currentMode){case"Series":this.selection(t,e,this.getSeriesElements(t.series[e.series])),this.selectionComplete(t,e,this.currentMode),this.blurEffect(t.element.id,t.visibleSeries);break;case"Point":!isNaN(e.point)&&i&&(this.selection(t,e,[i]),this.selectionComplete(t,e,this.currentMode),this.blurEffect(t.element.id,t.visibleSeries));break;case"Cluster":isNaN(e.point)||(this.clusterSelection(t,e),this.selectionComplete(t,e,this.currentMode),this.blurEffect(t.element.id,t.visibleSeries))}},r.prototype.selectionComplete=function(e,t,i){var r,o,n,a,s,l=[];if("Cluster"===i){for(var h=0,c=e.visibleSeries;h<c.length;h++)if((p=c[h]).visible)for(d=0;d<this.selectedDataIndexes.length;d++)o=e.isMultiSelect?this.selectedDataIndexes[d].point:t.point,n=p.index,r=p.points,isNaN(o)||(a="RangeArea"!==p.type?r[o].yValue:r[o].regions[0].y,s=r[o].xValue,"Category"===e.primaryXAxis.valueType?s=r[o].x.toLocaleString():"DateTime"===e.primaryXAxis.valueType&&(s=new Date(r[o].xValue)),"Indicator"!==p.category&&l.push({x:s,y:a,seriesIndex:n,pointIndex:o}),"RangeArea"===p.type&&l.push({x:s,y:r[o].regions[0].y,seriesIndex:n,pointIndex:o}))}else if("Series"===i)if(e.isMultiSelect)for(d=0;d<this.selectedDataIndexes.length;d++)n=this.selectedDataIndexes[d].series,l.push({seriesIndex:n});else n=this.selectedDataIndexes.length>0?this.selectedDataIndexes[0].series:0,l.push({seriesIndex:n});else if("Point"===i)for(var d=0;d<this.selectedDataIndexes.length;d++){o=this.selectedDataIndexes[d].point,n=this.selectedDataIndexes[d].series;var p=e.series[n];r=p.points,isNaN(o)||(s=r[o].xValue,a="RangeArea"!==p.type?r[o].yValue:r[o].regions[0].y,"Category"===e.primaryXAxis.valueType?s=r[o].x.toLocaleString():"DateTime"===e.primaryXAxis.valueType&&(s=new Date(r[o].xValue)),l.push({x:s,y:a,seriesIndex:n,pointIndex:o}))}var u={name:"selectionComplete",selectedDataValues:l,cancel:!1};e.trigger("selectionComplete",u)},r.prototype.selection=function(e,i,r){if("Lasso"!==this.currentMode&&(e.isMultiSelect||-1!==this.currentMode.indexOf("Drag")||-1!==this.styleId.indexOf("highlight")||"None"===e.selectionMode||this.removeMultiSelectElements(e,this.selectedDataIndexes,i,e.series)),!t.isNullOrUndefined(r[0])){var o=void 0,n=r[0]&&(r[0].getAttribute("class")||""),a=r[0].parentNode&&(r[0].parentNode.getAttribute("class")||"");""!==n&&"Cluster"!==this.currentMode&&this.findTrackballElements(r,n),r[0]&&n.indexOf(this.getSelectionClass(r[0].id))>-1?this.removeStyles(r):r[0].parentNode&&a.indexOf(this.getSelectionClass(r[0].id))>-1?this.removeStyles([r[0].parentNode]):(this.previousSelectedEle="None"!==e.highlightMode?r:[],this.applyStyles(r),o=!0),this.styleId.indexOf("highlight")>0&&"None"!==e.highlightMode?this.addOrRemoveIndex(this.highlightDataIndexes,i,o):this.addOrRemoveIndex(this.selectedDataIndexes,i,o)}},r.prototype.clusterSelection=function(e,t){this.selection(e,t,this.getClusterElements(e,new Jt(t.series,t.point)))},r.prototype.removeMultiSelectElements=function(e,t,i,r){for(var o,n=0;n<t.length;n++)o=r[t[n].series],(this.isSeriesMode&&!this.toEquals(t[n],i,this.isSeriesMode)||"Cluster"===this.currentMode&&!this.toEquals(t[n],i,!1)||!this.isSeriesMode&&this.toEquals(t[n],i,!0)&&!this.toEquals(t[n],i,!1))&&(this.removeStyles(this.findElements(e,o,t[n])),t.splice(n,1),n--)},r.prototype.blurEffect=function(e,i,r){void 0===r&&(r=!1);for(var o=this.checkVisibility(this.highlightDataIndexes)||this.checkVisibility(this.selectedDataIndexes),n=0,a=i;n<a.length;n++){var s=a[n];s.visible&&(this.checkSelectionElements(he(e+"SeriesGroup"+s.index),this.generateStyle(s),o,r,s.index),t.isNullOrUndefined(he(e+"SymbolGroup"+s.index))||this.checkSelectionElements(he(e+"SymbolGroup"+s.index),this.generateStyle(s),o,r,s.index))}},r.prototype.checkSelectionElements=function(e,t,i,r,o){var n=this.isSeriesMode?[e]:e.childNodes;"None"!==this.chart.selectionMode&&"None"!==this.chart.highlightMode&&(n=e.children);for(var a,s,l,h=e,c=0;c<n.length;c++)a=n[c].getAttribute("class")||"",s=n[c].parentNode.getAttribute("class")||"","None"!==this.chart.selectionMode&&"None"!==this.chart.highlightMode&&(t=a.indexOf("selection")>0||a.indexOf("highlight")>0?a:t,t=s.indexOf("selection")>0||s.indexOf("highlight")>0?s:t),-1===a.indexOf(t)&&-1===s.indexOf(t)&&i?this.addSvgClass(n[c],this.unselected):(h=n[c],this.removeSvgClass(n[c],this.unselected),this.removeSvgClass(n[c].parentNode,this.unselected)),n[c].id.indexOf("Trackball")>0&&h.classList[0]===t&&(this.removeSvgClass(n[c],this.unselected),this.removeSvgClass(n[c].parentNode,this.unselected),this.addSvgClass(n[c],t));if(e.id.indexOf("Symbol")>-1&&e.querySelectorAll("."+t)[0]&&e.querySelectorAll("."+t)[0].getAttribute("class")===t){var d=he(this.control.element.id+"_Series_"+e.id[e.id.length-1]);(d&&d.hasAttribute("class")?d.getAttribute("class"):"").indexOf(this.unselected)>-1&&this.removeSvgClass(d,this.unselected)}this.control.legendModule&&this.control.legendSettings.visible&&(l=he(this.control.element.id+"_chart_legend_shape_"+o))&&(l.hasAttribute("class")&&this.removeSvgClass(l,l.getAttribute("class")),a=h.getAttribute("class")||"",s=h.parentNode.getAttribute("class")||"",-1===a.indexOf(t)&&-1===s.indexOf(t)&&i?(this.addSvgClass(l,this.unselected),this.removeSvgClass(l,t)):(this.removeSvgClass(l,this.unselected),""===a&&""===s||"EJ2-Trackball"===a.trim()?this.removeSvgClass(l,t):this.addSvgClass(l,t)),r&&s.indexOf(t)>-1&&this.addSvgClass(l,t))},r.prototype.applyStyles=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];r&&(this.removeSvgClass(r.parentNode,this.unselected),this.removeSvgClass(r,this.unselected),this.addSvgClass(r,this.getSelectionClass(r.id)))}},r.prototype.getSelectionClass=function(e){return this.generateStyle(this.control.series[this.indexFinder(e).series])},r.prototype.removeStyles=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];r&&this.removeSvgClass(r,this.getSelectionClass(r.id))}},r.prototype.addOrRemoveIndex=function(e,t,i){for(var r=0;r<e.length;r++)this.toEquals(e[r],t,this.isSeriesMode)&&(e.splice(r,1),r--);i&&e.push(t)},r.prototype.toEquals=function(e,t,i){return(e.series===t.series||"Cluster"===this.currentMode&&!i)&&(i||e.point===t.point)},r.prototype.redrawSelection=function(e,i){this.isSeriesMode="Series"===i,t.isNullOrUndefined(i)||(-1!==i.indexOf("Drag")||"Lasso"===i?e.isRedrawSelection=!1:e.isRedrawSelection=!0);var r=t.extend([],this.selectedDataIndexes,null,!0),o=t.extend([],this.highlightDataIndexes,null,!0);this.styleId.indexOf("highlight")>0&&o.length>0?(this.removeSelectedElements(e,this.highlightDataIndexes,e.series),r=o):this.removeSelectedElements(e,this.selectedDataIndexes,e.series),this.blurEffect(e.element.id,e.visibleSeries),this.selectDataIndex(e,r)},r.prototype.legendSelection=function(e,i,r){var o=r.target;if("mousemove"===r.type){if(r.target.id.indexOf("text")>1&&(o=he(r.target.id.replace("text","shape"))),o.hasAttribute("class")&&(o.getAttribute("class").indexOf("highlight")>-1||o.getAttribute("class").indexOf("selection")>-1))return;this.currentMode=this.chart.highlightMode}if(this.isAlreadySelected(r)){var n=this.generateStyle(e.visibleSeries[i]),a=document.querySelectorAll("."+n);this.isSeriesMode="Series"===this.currentMode;if(a.length>0)this.removeSelection(e,i,a,n,!0);else{for(var s=0,l=e.visibleSeries;s<l.length;s++){var h=l[s];h.index===i||e.isMultiSelect||(n=this.generateStyle(e.visibleSeries[h.index]),a=document.querySelectorAll("."+n),this.removeSelection(e,i,a,n,!0))}for(var c=this.getSeriesElements(e.visibleSeries[i]),d=0,p=c;d<p.length;d++){var u=p[d];if(t.isNullOrUndefined(u))return;this.checkSelectionElements(u,n,!1,!0,i)}this.isSeriesMode=!0,this.selection(e,new Jt(i,NaN),c),this.isSeriesMode="Series"===e.selectionMode,this.blurEffect(e.element.id,e.visibleSeries,!0)}}},r.prototype.removeSelection=function(e,t,i,r,o){if(i.length>0){for(var n=[],a=0;a<i.length;a++)n.push(i[a]);this.removeStyles(n),this.isSeriesMode=!0,this.addOrRemoveIndex(this.selectedDataIndexes,new Jt(t,NaN));for(var s=0,l=e.visibleSeries;s<l.length;s++){var h=l[s];if(r=this.generateStyle(h),document.querySelectorAll("."+r).length>0){for(var c=0,d=n;c<d.length;c++){var p=d[c];this.checkSelectionElements(p,r,!0,!0,t)}o=!1;break}}o&&(this.isSeriesMode="Series"===e.selectionMode,this.blurEffect(e.element.id,e.visibleSeries))}},r.prototype.getSeriesElements=function(e){var t=[e.seriesElement];return e.marker.visible&&"Scatter"!==e.type&&"Bubble"!==e.type&&!e.isRectSeries&&t.push(e.symbolElement),t},r.prototype.indexFinder=function(e){var t=["NaN","NaN"];return e.indexOf("SeriesGroup")>-1?(t=e.split("SeriesGroup"))[0]=t[1]:e.indexOf("SymbolGroup")>-1?(t=e.split("SymbolGroup"))[0]=t[1]:e.indexOf("_Point_")>-1?t=e.split("_Series_")[1].split("_Point_"):e.indexOf("_Series_")>-1?t[0]=e.split("_Series_")[1]:e.indexOf("_chart_legend_shape_")>-1&&((t=e.split("_chart_legend_shape_"))[0]=t[1]),new Jt(parseInt(t[0],10),parseInt(t[1],10))},r.prototype.calculateDragSelectedElements=function(e,t,r){this.removeSelectedElements(e,this.selectedDataIndexes,e.series);var o="Lasso"===e.selectionMode,n=new i.Rect(t.x,t.y,t.width,t.height),a=new Vi(e.chartAxisLayoutPanel.seriesClipRect.x,e.chartAxisLayoutPanel.seriesClipRect.y);this.removeOffset(n,a);var s,l,h=[],c=[];this.isSeriesMode=!1;var d=e.allowMultiSelection&&(this.rectGrabbing||this.resizing);if(this.rectPoints=this.dragRectArray[d?this.targetIndex:this.count]=new i.Rect(t.x,t.y,t.width,t.height),t.width&&t.height&&!r){var p=new i.Rect(t.x,t.y,t.width,t.height);this.removeOffset(p,a),this.filterArray[d?this.targetIndex:this.count]=p}for(var u=this,g=0,y=e.visibleSeries;g<y.length;g++)!function(t){if(t.visible){s=t.points,h=[];var i,r;!e.isTransposed&&-1===t.type.indexOf("Bar")||e.isTransposed&&-1!==t.type.indexOf("Bar")?(i=t.xAxis.rect.x-a.x,r=t.yAxis.rect.y-a.y):(i=t.xAxis.rect.y-a.y,r=t.yAxis.rect.x-a.x);for(var o=0;o<s.length;o++){var d="RangeArea"!==t.type?s[o].yValue:s[o].regions[0].y,p=void 0,g=s[o].xValue;"Category"===e.primaryXAxis.valueType?g=s[o].x.toLocaleString():"DateTime"===e.primaryXAxis.valueType&&(g=new Date(s[o].xValue)),(p="BoxAndWhisker"===t.type?s[o].regions.some(function(e){return j(e.x+i,e.y+r,n)}):"Lasso"===e.selectionMode?s[o].isSelect:e.allowMultiSelection?u.isPointSelect(s[o],i,r,u.filterArray):s[o].symbolLocations.some(function(e){return e&&j(e.x+i,e.y+r,n)}))&&"Indicator"!==t.category&&(l=new Jt(t.index,s[o].index),u.selection(e,l,u.findElements(e,t,l)),h.push({x:g,y:d})),p&&"RangeArea"===t.type&&h.push({x:g,y:s[o].regions[0].y})}c.push(h)}}(y[g]);this.blurEffect(e.element.id,e.visibleSeries);var m=o?e.mouseDownX:t.x+t.width,v=o?e.mouseDownY:t.y;r||this.createCloseButton(m,v);var f={name:"dragComplete",selectedDataValues:c,cancel:!1};e.trigger("dragComplete",f)},r.prototype.removeOffset=function(e,t){e.x-=t.x,e.y-=t.y},r.prototype.isPointSelect=function(e,t,i,r){for(var o=e.symbolLocations[0],n=0,a=r;n<a.length;n++){var s=a[n];if(s&&o&&j(o.x+t,o.y+i,s))return!0}return!1},r.prototype.drawDraggingRect=function(e,r,o){var n=e.chartAxisLayoutPanel.seriesClipRect,a=e.chartArea.border.width,s=e.themeStyle.selectionRectFill,l=e.themeStyle.selectionRectStroke,h="Lasso"===e.selectionMode;switch(this.isdrawRect&&(n.x=n.x-a/2,n.y=n.y-a/2,n.width=n.width+a,n.height=n.height+a,this.isdrawRect=!1),e.selectionMode){case"DragX":r.y=n.y,r.height=n.height;break;case"DragY":r.x=n.x,r.width=n.width}if((r.width<5||r.height<5)&&!h)return null;var c=e.selectionMode.indexOf("Drag")>-1||"Lasso"===e.selectionMode;if(e.allowMultiSelection&&c){var d=void 0,p=void 0,u=he(this.multiRectGroup);if(u||(u=e.svgRenderer.createGroup({id:this.multiRectGroup}),e.svgObject.appendChild(u)),this.rectGrabbing||this.resizing){var g=void 0;(g=he(this.draggedRect+this.targetIndex)).nextSibling&&t.remove(g.nextSibling),this.setAttributes(g,r)}else if(!he(this.draggedRectGroup+this.count)){p=e.svgRenderer.createGroup({id:this.draggedRectGroup+this.count});y=document.getElementById(e.element.id+"_series_svg");e.enableCanvas?y.appendChild(p):u.appendChild(p)}"Lasso"!==e.selectionMode?(d=e.svgRenderer.drawRectangle(new Di(this.draggedRect+this.count,s,{color:l,width:1},1,r))).setAttribute("style","cursor:move;"):d=e.svgRenderer.drawPath(new i.PathOption(this.lassoPath+this.count,s,3,l,1,"",this.path)),p||this.rectGrabbing||this.resizing?this.rectGrabbing||this.resizing||p.appendChild(d):he(this.draggedRectGroup+this.count).appendChild(d)}else{d=he(h?this.lassoPath:this.draggedRect);if(this.closeIcon&&m(this.closeIconId),d)h?d.setAttribute("d",this.path):this.setAttributes(d,r);else{var p=e.svgRenderer.createGroup({id:this.draggedRectGroup}),y=document.getElementById(e.element.id+"_series_svg");e.enableCanvas?y.appendChild(p):e.svgObject.appendChild(p),d="Lasso"!==e.selectionMode?e.svgRenderer.drawRectangle(new Di(this.draggedRect,s,{color:l,width:1},1,r)):e.svgRenderer.drawPath(new i.PathOption(this.lassoPath,s,3,l,1,"",this.path)),p.appendChild(d)}}},r.prototype.getIndex=function(e){var t;for(t=e.length-1;t>0;t--){var i=Number(e[t]);if(isNaN(i))break}return+e.substr(t+1,e.length-1)},r.prototype.createCloseButton=function(e,t){var i=this.chart.allowMultiSelection,r=this.chart.themeStyle.selectionCircleStroke,o=this.rectGrabbing||this.resizing,n=this.chart.svgRenderer.createGroup({id:this.closeIconId+(i?o?this.targetIndex:this.count:""),style:"cursor:pointer; visibility: visible;"});n.appendChild(this.chart.svgRenderer.drawCircle(new Ni(this.closeIconId+"_circle"+(i?o?this.targetIndex:this.count:""),"#FFFFFF",{color:r,width:1},1,e,t,10)));var a="M "+(e-4)+" "+(t-4)+" L "+(e+4)+" "+(t+4)+" M "+(e-4)+" "+(t+4)+" L "+(e+4)+" "+(t-4);n.appendChild(this.chart.svgRenderer.drawPath({id:this.closeIconId+"_cross"+(i?o?this.targetIndex:this.count:""),d:a,stroke:r,"stroke-width":2,fill:r})),this.closeIcon=n;var s=he(this.draggedRectGroup+(i?o?this.targetIndex:this.count:""));s&&s.appendChild(n)},r.prototype.removeDraggedElements=function(e,r){if(r.target.id.indexOf(this.closeIconId)>-1&&-1===r.type.indexOf("move")){var o=!0;if(e.allowMultiSelection){var n=this.getIndex(r.target.id),a=he(this.multiRectGroup);if(t.remove(he(this.draggedRectGroup+n)),this.dragRectArray[n]=null,this.filterArray[n]=null,this.totalSelectedPoints[n]=null,a&&0===a.childElementCount&&(m(a),this.dragRectArray=[],this.filterArray=[],this.totalSelectedPoints=[]),"Lasso"===this.currentMode){if(null!=this.multiDataIndexes[n])for(h=0;h<this.multiDataIndexes[n].length;h++)this.multiDataIndexes[n][h].isSelect=!1;this.multiDataIndexes[n]=null;for(var s=0;s<this.multiDataIndexes.length;s++)if(null!=this.multiDataIndexes[s]){o=!1;for(var l=0;l<this.multiDataIndexes[s].length;l++)this.multiDataIndexes[s][l].isSelect=!0}this.calculateDragSelectedElements(e,this.dragRect,!0)}else if(this.filterArray.length)for(var h=0;h<this.filterArray.length;h++)this.filterArray[h]&&(o=!1,this.calculateDragSelectedElements(e,this.filterArray[h],!0));else this.calculateDragSelectedElements(e,new i.Rect(0,0,0,0),!0)}else t.remove(he(this.draggedRectGroup)),this.removeSelectedElements(e,this.selectedDataIndexes,e.series);this.blurEffect(e.element.id,e.visibleSeries),this.changeCursorStyle(!1,e.svgObject,"auto"),e.allowMultiSelection&&!o||(this.rectPoints=null)}},r.prototype.resizingSelectionRect=function(e,t,r,o){var n;if(e.allowMultiSelection&&o.id.indexOf("_ej2_drag_rect")>-1||this.dragRectArray[this.targetIndex]){o.id.indexOf("_ej2_drag_rect")>-1&&(this.targetIndex=this.getIndex(o.id));var a=this.dragRectArray[this.targetIndex];n=new i.Rect(a.x,a.y,a.width,a.height)}if(e.allowMultiSelection||(n=new i.Rect(this.rectPoints.x,this.rectPoints.y,this.rectPoints.width,this.rectPoints.height)),n){var s=this.findResizeMode(e.svgObject,n,t);this.resizing&&(n=xe(n.x,n.y,n.x+n.width,n.y+n.height,e.chartAxisLayoutPanel.seriesClipRect),this.drawDraggingRect(e,n),this.dragRect=n),r&&(this.resizing=s)}},r.prototype.findResizeMode=function(e,t,r){var o="se-resize",n=!1;if(this.resizing){var a=t.x,s=t.y,l=r.x-a,h=r.y-s;switch(this.resizeMode){case 0:h=Math.abs(t.height+t.y-r.y),t.y=Math.min(t.height+t.y,r.y),t.height=h;break;case 1:l=Math.abs(t.width+t.x-r.x),t.x=Math.min(t.width+t.x,r.x),t.width=l;break;case 2:t.height=Math.abs(h),t.y=Math.min(r.y,s);break;case 3:t.width=Math.abs(l),t.x=Math.min(r.x,a);break;case 4:t.width=Math.abs(l),t.height=Math.abs(h),t.x=Math.min(r.x,a),t.y=Math.min(r.y,s)}}else for(var c=[new i.Rect(t.x,t.y,t.width-5,5),new i.Rect(t.x,t.y,5,t.height),new i.Rect(t.x,t.y+t.height-5,t.width-5,5),new i.Rect(t.x+t.width-5,t.y+5,5,t.height-15),new i.Rect(t.x+t.width-10,t.y+t.height-10,10,10)],d=0;d<c.length;d++)if(j(r.x,r.y,c[d])){o=4===d?o:d%2==0?"ns-resize":"ew-resize",n=!0,this.resizeMode=d;break}return"Lasso"!==this.currentMode&&this.changeCursorStyle(n,he(this.chart.allowMultiSelection?this.draggedRect+this.targetIndex:this.draggedRect),o),this.changeCursorStyle(n,e,o),n},r.prototype.changeCursorStyle=function(e,t,i){i=e?i:this.control.svgObject===t?"auto":"move",t&&t.setAttribute("style","cursor:"+i+";")},r.prototype.removeSelectedElements=function(e,t,i){t=e.isRedrawSelection?t:t.splice(0,t.length);for(var r,o=0,n=i;o<n.length;o++){var a=n[o];r=this.getSeriesElements(a),this.removeStyles(r);for(var s=0,l=r;s<l.length;s++){var h=l[s];this.removeStyles(this.getChildren(h))}}},r.prototype.setAttributes=function(e,t){for(var i=0,r=Object.keys(t);i<r.length;i++){var o=r[i];e.setAttribute(o,t[o])}},r.prototype.draggedRectMoved=function(e,t,r,o){var n;if((this.resizing||this.rectGrabbing)&&e.allowMultiSelection){var a=this.dragRectArray[this.targetIndex];n=new i.Rect(a.x,a.y,a.width,a.height)}else n=new i.Rect(this.rectPoints.x,this.rectPoints.y,this.rectPoints.width,this.rectPoints.height);n.x-=t.x-e.mouseX,n.y-=t.y-e.mouseY,n=xe(n.x,n.y,n.x+n.width,n.height+n.y,e.chartAxisLayoutPanel.seriesClipRect),r?this.drawDraggingRect(e,n,o):this.calculateDragSelectedElements(e,n)},r.prototype.completeSelection=function(e){var t=this.chart;"None"!==t.selectionMode&&(this.currentMode=t.selectionMode,(this.dragging||this.resizing)&&this.dragRect.width>5&&this.dragRect.height>5?this.calculateDragSelectedElements(t,this.dragRect):!t.allowMultiSelection&&this.rectGrabbing&&this.rectPoints.width&&this.rectPoints.height?this.draggedRectMoved(t,this.dragRect):this.rectGrabbing&&this.dragRectArray[this.targetIndex].width&&this.dragRectArray[this.targetIndex].height&&this.draggedRectMoved(t,this.dragRect),"Lasso"===t.selectionMode&&this.dragging&&this.path&&-1!==this.path.indexOf("L")&&(t.allowMultiSelection?he(this.lassoPath+this.count)&&(he(this.lassoPath+this.count).setAttribute("d",this.path+"Z"),this.pointChecking(he(this.lassoPath+this.count))):(he(this.lassoPath).setAttribute("d",this.path+"Z"),this.pointChecking(he(this.lassoPath))),(this.dragging||this.resizing)&&this.calculateDragSelectedElements(t,this.dragRect)),this.dragging=!1,this.rectGrabbing=!1,this.resizing=!1,this.removeDraggedElements(t,e))},r.prototype.getDragRect=function(e,t){return xe(e.mouseDownX,e.mouseDownY,e.mouseX,e.mouseY,t)},r.prototype.dragStart=function(e,t,r,o,n){var a=e.selectionMode;this.currentMode=e.selectionMode,this.dragging=(a.indexOf("Drag")>-1||"Lasso"===a)&&(e.isDoubleTap||!e.isTouch)&&"PolarRadar"!==e.chartAreaType;var s=n.target;if(this.path=void 0,this.dragging&&(this.count=he(this.multiRectGroup)?this.count+1:0,this.dragRect=new i.Rect(e.mouseDownX,e.mouseDownY,0,0),(e.mouseDownX<t.x||e.mouseDownX>t.x+t.width||e.mouseDownY<t.y||e.mouseDownY>t.y+t.height)&&(this.dragging=!1)),"Lasso"===a)for(var l=0,h=e.visibleSeries;l<h.length;l++){var c=h[l];if(c.visible)for(var d=0,p=c.points;d<p.length;d++){var u=p[d];e.allowMultiSelection||(u.isSelect=!1)}}if("Lasso"!==a&&(this.rectPoints&&!e.allowMultiSelection&&(this.dragRect=new i.Rect(e.mouseDownX,e.mouseDownY,0,0),this.resizingSelectionRect(e,new Vi(r,o),!0),this.rectGrabbing=j(r,o,this.rectPoints)),e.allowMultiSelection)){var g=this.getIndex(s.id);this.targetIndex=this.isDragRect(s.id)?g:void 0,this.dragRectArray.length&&this.isDragRect(s.id)&&(this.resizingSelectionRect(e,new Vi(r,o),!0,s),this.rectGrabbing=j(r,o,this.dragRectArray[g]))}},r.prototype.isDragRect=function(e){return e.indexOf("_ej2_drag_rect")>-1},r.prototype.mouseMove=function(e){var i=this.chart,r=e.target;if("None"!==i.highlightMode&&!t.isNullOrUndefined(r)){if(e.target.id.indexOf("text")>1&&(r=he(e.target.id.replace("text","shape"))),r.hasAttribute("class")&&(r.getAttribute("class").indexOf("highlight")>-1||r.getAttribute("class").indexOf("selection")>-1))return;return void this.calculateSelectedElements(e)}"None"!==i.selectionMode&&("touchmove"===e.type&&(t.Browser.isIos||t.Browser.isIos7)&&this.dragging&&e.preventDefault&&e.preventDefault(),j(i.mouseX,i.mouseY,i.chartAxisLayoutPanel.seriesClipRect)?(this.rectGrabbing&&!this.resizing?this.draggedRectMoved(i,this.dragRect,!0,r):this.dragging&&!this.resizing&&("Lasso"===i.selectionMode?(this.getPath(i.mouseDownX,i.mouseDownY,i.mouseX,i.mouseY),this.drawDraggingRect(i,this.dragRect,r)):(this.dragRect=this.getDragRect(i,i.chartAxisLayoutPanel.seriesClipRect),this.drawDraggingRect(i,this.dragRect,r))),this.rectPoints&&!i.allowMultiSelection?this.resizingSelectionRect(i,new Vi(i.mouseX,i.mouseY),null,r):(i.allowMultiSelection&&!this.dragging||this.resizing)&&this.resizingSelectionRect(i,new Vi(i.mouseX,i.mouseY),null,r)):this.completeSelection(e))},r.prototype.getPath=function(e,t,i,r){this.dragging&&(this.path?this.path=this.path+" L"+i+" "+r:this.path="M "+e+" "+t)},r.prototype.pointChecking=function(e){var t,i=this,r=this.chart,o=he(r.svgId).getBoundingClientRect(),n=r.chartAxisLayoutPanel.seriesClipRect.x+Math.max(o.left,0),a=r.chartAxisLayoutPanel.seriesClipRect.y+Math.max(o.top,0);this.multiDataIndexes[this.count]=[];for(var s=0,l=r.visibleSeries;s<l.length;s++)l[s].points.filter(function(o){o.symbolLocations&&o.symbolLocations.length&&(t=document.elementFromPoint(o.symbolLocations[0].x+n,o.symbolLocations[0].y+a)),t===e?(o.isSelect=!0,i.chart.allowMultiSelection&&"Lasso"===i.currentMode&&(i.multiDataIndexes[i.count][i.seriesIndex]=o,i.seriesIndex++)):r.allowMultiSelection||(o.isSelect=!1)});this.seriesIndex=0},r.prototype.getModuleName=function(){return"Selection"},r.prototype.destroy=function(){this.removeEventListener()},r}(mn),bn=function(){function e(e){this.isPointDragging=!1,this.chart=e}return e.prototype.pointMouseDown=function(){var e=this.chart,t=new Zi(e),i=t.getData();!i.point||!t.insideRegion&&i.series.isRectSeries||(this.seriesIndex=i.series.index,this.pointIndex=i.point.index,e.series[this.seriesIndex].dragSettings.enable&&!e.zoomModule&&(e.trigger("dragStart",{series:i.series,seriesIndex:this.seriesIndex,pointIndex:this.pointIndex,point:i.point,oldValue:e.visibleSeries[this.seriesIndex].yData[this.pointIndex],newValue:e.visibleSeries[this.seriesIndex].points[this.pointIndex].yValue}),e.isPointMouseDown=!0,e.zoomSettings.enableDeferredZooming=!1))},e.prototype.pointMouseMove=function(e){var t,i=this.chart;"touchmove"===e.type&&e.preventDefault&&e.preventDefault();var r=new Zi(i),o=r.getData();o.series.dragSettings.enable&&o.point&&(r.insideRegion||!o.series.isRectSeries)?this.getCursorStyle(o):i.svgObject.setAttribute("style","cursor: null"),i.isPointMouseDown&&((t=i.series[this.seriesIndex]).type.indexOf("Spline")>-1&&i[G(t.type)+"SeriesModule"].findSplinePoint(t),this.pointDragging(this.seriesIndex,this.pointIndex))},e.prototype.getCursorStyle=function(e){var t=this.chart;"Bar"===e.series.type&&t.isTransposed?t.svgObject.setAttribute("style","cursor:ns-resize"):t.isTransposed||"Bar"===e.series.type?t.svgObject.setAttribute("style","cursor:ew-resize"):t.svgObject.setAttribute("style","cursor:ns-resize")},e.prototype.pointDragging=function(e,i){var r,o,n,a=this.chart,s=[],l=a.visibleSeries[e],h=l.dragSettings,c=l.xAxis,d=l.yAxis,p=l.isRectSeries?1:0,u=W(c,d,a.requireInvertedAxis);"Bar"===l.type?(r=a.isTransposed?u.y+u.height-a.mouseY:a.mouseX-u.x,o=a.isTransposed?u.height:u.width):(r=a.isTransposed?a.mouseX-u.x:u.y+u.height-a.mouseY,o=a.isTransposed?u.width:u.height),n=(n=d.isInversed?1-r/o:r/o)*d.visibleRange.delta+d.visibleRange.min;var g=null!==d.minimum?d.visibleRange.min+p:t.isNullOrUndefined(h.minY)?n:h.minY;if((null!==d.maximum?d.visibleRange.max+p:t.isNullOrUndefined(h.maxY)?n:h.maxY)>=n&&g<=n){l.points[i].yValue=l.points[i].y=a.dragY="Logarithmic"===d.valueType?Math.pow(d.logBase,n):parseFloat(n.toFixed(2)),l.points[i].interior=h.fill;for(var y=0;y<l.points.length;y++)s[y]=l.points[y].yValue;l.yMin=Math.min.apply(null,s),l.yMax=Math.max.apply(null,s),this.isPointDragging=!0,a.refreshBound(),a.trigger("drag",{seriesIndex:e,pointIndex:i,series:l,point:l.points[i],oldValue:a.visibleSeries[this.seriesIndex].yData[this.pointIndex],newValue:l.points[i].yValue})}},e.prototype.pointMouseUp=function(){var e=this.chart;e.isPointMouseDown&&e.series[this.seriesIndex].dragSettings.enable&&(e.trigger("dragEnd",{series:e.series[this.seriesIndex],point:e.visibleSeries[this.seriesIndex].points[this.pointIndex],seriesIndex:this.seriesIndex,pointIndex:this.pointIndex,oldValue:e.visibleSeries[this.seriesIndex].yData[this.pointIndex],newValue:e.visibleSeries[this.seriesIndex].points[this.pointIndex].yValue}),e.visibleSeries[this.seriesIndex].points[this.pointIndex].y=e.visibleSeries[this.seriesIndex].points[this.pointIndex].yValue,e.isPointMouseDown=!1,this.isPointDragging=!1,this.seriesIndex=this.pointIndex=void 0)},e.prototype.getModuleName=function(){return"DataEditing"},e.prototype.destroy=function(){},e}(),xn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),wn=function(e){function i(t){var i=e.call(this,t)||this;return i.chart=t,i.renderer=t.renderer,i.wireEvents(),i}return xn(i,e),i.prototype.wireEvents=function(){this.chart.isDestroyed||this.chart.stockChart&&this.chart.stockChart.onPanning||this.chart.on(t.Browser.touchMoveEvent,this.mouseMove,this)},i.prototype.unWireEvents=function(){this.chart.isDestroyed||this.chart.off(t.Browser.touchMoveEvent,this.mouseMove)},i.prototype.declarePrivateVariables=function(e){this.styleId=e.element.id+"_ej2_chart_highlight",this.unselected=e.element.id+"_ej2_deselected",this.selectedDataIndexes=[],this.highlightDataIndexes=[],this.isSeriesMode="Series"===e.highlightMode},i.prototype.invokeHighlight=function(e){this.declarePrivateVariables(e),this.series=t.extend({},e.visibleSeries,null,!0),this.seriesStyles(),this.currentMode=e.highlightMode},i.prototype.getModuleName=function(){return"Highlight"},i.prototype.destroy=function(){this.unWireEvents()},i}(fn),Sn=function(){function e(e){this.errorHeight=0,this.chart=e}return e.prototype.initPrivateVariables=function(e,t){var i="",r="",o=e.chart.renderer,n=void 0===e.index?e.category:e.index;"Cartesian"===e.chart.chartAreaType&&(i="translate("+e.clipRect.x+","+e.clipRect.y+")",r="url(#"+this.chart.element.id+"_ChartSeriesClipRect_"+n+")"),t.dataLabel.visible&&(e.shapeElement=o.createGroup({id:this.chart.element.id+"ShapeGroup"+n,transform:i,"clip-path":"url(#"+this.chart.element.id+"_ChartSeriesClipRect_"+n+")"}),e.textElement=o.createGroup({id:this.chart.element.id+"TextGroup"+n,transform:i,"clip-path":r})),this.markerHeight="Scatter"===e.type||t.visible?t.height/2:0,this.commonId=this.chart.element.id+"_Series_"+n+"_Point_",this.calculateErrorHeight(e,e.marker.dataLabel.position),this.chartBackground="transparent"===this.chart.chartArea.background?this.chart.background||this.chart.themeStyle.background:this.chart.chartArea.background},e.prototype.calculateErrorHeight=function(e,t){if(!e.errorBar.visible)return null;if(e.errorBar.visible&&"PolarRadar"!==this.chart.chartAreaType){var i=e.errorBar.direction,r=this.chart.errorBarModule.positiveHeight,o=this.chart.errorBarModule.negativeHeight;this.isRectSeries(e)?("Top"!==t&&"Auto"!==t||(this.errorHeight="Both"===i||"Minus"===i?o:0),"Outer"!==t&&"Auto"!==t||(this.errorHeight="Both"===i||"Plus"===i?r:0)):("Top"!==t&&"Outer"!==t&&"Auto"!==t||("Both"!==i&&"Plus"!==i||e.chart.isTransposed?this.errorHeight=0:this.errorHeight=r),"Bottom"!==t&&"Auto"!==t||(this.errorHeight="Both"===i||"Minus"===i?o:0))}else this.errorHeight=0},e.prototype.isRectSeries=function(e){return e.isRectSeries||"RangeArea"===e.type},e.prototype.render=function(e,r,o){this.initPrivateVariables(e,e.marker);var n,a,s,l,h,c,d,p,u={x:0,y:0};this.inverted=r.requireInvertedAxis,this.yAxisInversed=e.yAxis.isInversed;for(var y,m,v,f=r.redraw,b=!1,x=[],w=r.element.id+"_Series_"+(void 0===e.index?e.category:e.index)+"_DataLabelCollections",S=t.createElement("div",{id:w}),C=g(e),P=0;P<C.length;P++){if(y=C[P],!o.showZero&&(0!==y.y||0===y.y&&"Zero"===e.emptyPointSettings.mode))return null;this.margin=o.margin;var L=[],R=void 0,M=void 0,A=void 0,_=void 0,O=void 0,E=!0,z=e.clipRect,I=void 0;b=!1,d=p=o.angle,h={width:o.border.width,color:o.border.color};var D=t.extend({},t.getValue("properties",o.font),null,!0);if(y.symbolLocations.length&&y.symbolLocations[0]||"BoxAndWhisker"===e.type&&y.regions.length){R=(L=Se(y,e,r)).length;for(var B=0;B<R;B++)if(l={cancel:!1,name:"textRender",series:e,point:y,text:L[B],border:h,color:o.fill,template:o.template,font:D,location:u,textSize:i.measureText(L[B],o.font)},r.trigger("textRender",l),!l.cancel)if(this.fontBackground=l.color,this.isDataLabelShape(l),this.markerHeight="Bubble"===e.type?y.regions[0].height/2:this.markerHeight,null!==l.template)this.createDataLabelTemplate(S,e,o,y,l,B,f);else{if(c=i.measureText(l.text,o.font),n=this.calculateTextPosition(y,e,c,o,B),"PolarRadar"===r.chartAreaType)for(var N=0,F=r.chartAxisLayoutPanel.visibleAxisLabelRect;N<F.length;N++){var V=F[N];if(Le(new i.Rect(n.x,n.y,n.width,n.height),V)){E=!1;break}}var j=new i.Rect(n.x+z.x,n.y+z.y,n.width,n.height);if(o.enableRotation){var H=this.getRectanglePoints(n);if(m=n.x+n.width/2,v=n.y+n.height/2,x=T(H,m,v,d),!(b=this.isDataLabelOverlapWithChartBound(x,r,z))){this.chart.rotatedDataLabelCollections.push(x);for(var X=this.chart.rotatedDataLabelCollections.length-1,Y=X;Y>=0;Y--)if(this.chart.rotatedDataLabelCollections[X]&&this.chart.rotatedDataLabelCollections[Y-1]&&k(this.chart.rotatedDataLabelCollections[X],this.chart.rotatedDataLabelCollections[Y-1])){b=!0,this.chart.rotatedDataLabelCollections[X]=null;break}}}else b=Pe(n,r.dataLabelCollections,z);b&&"None"!==o.labelIntersectAction||!E||(r.dataLabelCollections.push(j),this.isShape&&(I=r.renderer.drawRectangle(new Di(this.commonId+y.index+"_TextShape_"+B,l.color,l.border,o.opacity,n,o.rx,o.ry),new Int32Array([z.x,z.y])),e.shapeElement&&e.shapeElement.appendChild(I)),a=ke(_e(this.fontBackground)),s=Math.round((299*a.r+587*a.g+114*a.b)/1e3),M=n.x+this.margin.left+c.width/2+u.x,A=n.y+this.margin.top+3*c.height/4+u.y,u={x:0,y:0},0!==d&&o.enableRotation?(_=m,O=v,p=d>360?d-360:d<-360?d+360:d):(p=0,_=n.x,O=n.y),Ve(r.renderer,new i.TextOption(this.commonId+y.index+"_Text_"+B,M,A,"middle",l.text,"rotate("+p+","+_+","+O+")","auto",p),l.font,l.font.color||(s>=128||"Hilo"===e.type?"black":"white"),e.textElement,!1,f,!0,!1,e.chart.duration,e.clipRect,null,null,r.enableCanvas))}}}S.childElementCount&&(r.enableCanvas?he(r.element.id+"_Secondary_Element").appendChild(S):be(r.enableCanvas,he(r.element.id+"_Secondary_Element"),S,r.redraw,!1,"x","y",null,"",!1,!1,null,r.duration))},e.prototype.getRectanglePoints=function(e){return[new Vi(e.x,e.y),new Vi(e.x+e.width,e.y),new Vi(e.x+e.width,e.y+e.height),new Vi(e.x,e.y+e.height)]},e.prototype.isDataLabelOverlapWithChartBound=function(e,t,i){for(var r=0;r<e.length;r++)if(!j(e[r].x+i.x,e[r].y+i.y,t.initialClipRect))return!0;return!1},e.prototype.createDataLabelTemplate=function(e,i,r,o,n,a,s){this.margin={left:0,right:0,bottom:0,top:0};var l=i.clipRect,h=ue(t.createElement("div",{id:this.chart.element.id+"_Series_"+(void 0===i.index?i.category:i.index)+"_DataLabel_"+o.index+(a?"_"+a:""),styles:"position: absolute;background-color:"+n.color+";"+ge(r.font)+";border:"+n.border.width+"px solid "+n.border.color+";"}),o.index,n.template,this.chart,o,i,this.chart.element.id+"_DataLabel",a);this.calculateTemplateLabelSize(e,h,o,i,r,a,l,s)},e.prototype.calculateTemplateLabelSize=function(e,t,r,o,n,a,s,l,h){var c=ye(t,l,h),d=this.calculateTextPosition(r,o,{width:c.width,height:c.height},n,a),p=!1;h&&(p=0===c.width||0===c.height),t.style.left=("PolarRadar"===this.chart.chartAreaType?0:o.clipRect.x)+d.x-0+"px",t.style.top=("PolarRadar"===this.chart.chartAreaType?0:o.clipRect.y)+d.y+0+"px";var u=ke(_e(this.fontBackground)),g=o.chart.requireInvertedAxis?o.xAxis:o.yAxis,y=o.chart.requireInvertedAxis?o.yAxis:o.xAxis;t.style.color=n.font.color||(Math.round((299*u.r+587*u.g+114*u.b)/1e3)>=128?"black":"white"),t.childElementCount&&!p&&(!Pe(d,this.chart.dataLabelCollections,s)||"None"===n.labelIntersectAction)&&("XY"!==o.seriesType||void 0===r.yValue||x(r.yValue,o.yAxis.visibleRange)||o.type.indexOf("Stacking")>-1||o.type.indexOf("100")>-1&&x(o.stackedValues.endValues[r.index],o.yAxis.visibleRange))&&x(r.xValue,o.xAxis.visibleRange)&&parseFloat(t.style.top)>=g.rect.y&&parseFloat(t.style.left)>=y.rect.x&&parseFloat(t.style.top)<=g.rect.y+g.rect.height&&parseFloat(t.style.left)<=y.rect.x+y.rect.width&&(this.chart.dataLabelCollections.push(new i.Rect(d.x+s.x,d.y+s.y,d.width,d.height)),be(this.chart.enableCanvas,e,t,l,!0,"left","top"),o.animation.enable&&this.chart.animateSeries&&!this.chart.enableCanvas?this.doDataLabelAnimation(o,t):this.chart.enableCanvas&&e.appendChild(t))},e.prototype.calculateTextPosition=function(e,t,i,r,o){var n=o>1&&"Candle"===t.type?e.regions[1]:e.regions[0];o>1&&"HiloOpenClose"===t.type&&(n=2===o?e.regions[1]:e.regions[2]);var a;a=this.getLabelLocation(e,t,i,o);var s=t.clipRect;if(this.chart.requireInvertedAxis&&this.isRectSeries(t)&&"BoxAndWhisker"!==t.type){this.locationY=a.y;l=i.width+this.borderWidth+this.margin.left+this.margin.right-5;a.x="Auto"===r.position?a.x:this.calculateAlignment(l,a.x,r.alignment,e.yValue<0),a.x=this.calculateRectPosition(a.x,n,e.yValue<0!==this.yAxisInversed,r.position,t,i,o,e)}else{this.locationX=a.x;var l=i.height+2*this.borderWidth+this.markerHeight+this.margin.bottom+this.margin.top+5;a.y="Auto"===r.position?a.y:this.calculateAlignment(l,a.y,r.alignment,!!this.isRectSeries(t)&&e.yValue<0),a.y=this.isRectSeries(t)&&"BoxAndWhisker"!==t.type?this.calculateRectPosition(a.y,n,e.yValue<0!==this.yAxisInversed,r.position,t,i,o,e):this.calculatePathPosition(a.y,r.position,t,e,i,o),this.isRectSeries(t)&&"PolarRadar"===this.chart.chartAreaType&&(a=this.calculatePolarRectPosition(a,r.position,t,e,i,o,r.alignment,l))}var h=Me(a,i,this.margin);return!0===r.enableRotation&&0!==r.angle||h.y>s.y+s.height||h.x>s.x+s.width||h.x+h.width<0||h.y+h.height<0||(h.x=h.x<0?5:h.x,h.y=h.y<0&&"None"!==r.labelIntersectAction?5:h.y,h.x-=h.x+h.width>s.x+s.width?h.x+h.width-(s.x+s.width)+5:0,h.y-=h.y+h.height>s.y+s.height?h.y+h.height-(s.y+s.height)+5:0,this.fontBackground="transparent"===this.fontBackground?this.chartBackground:this.fontBackground),h},e.prototype.calculatePolarRectPosition=function(e,t,i,r,o,n,a,s){var l,h=this.chart.availableSize.width,c="Center"===a?0:"Far"===a?1:-1,d=r.regionData.startAngle-.5*Math.PI+(r.regionData.endAngle-r.regionData.startAngle)/2;return l=0===n?r.regionData.radius<r.regionData.innerRadius?r.regionData.innerRadius:r.regionData.radius:r.regionData.radius>r.regionData.innerRadius?r.regionData.innerRadius:r.regionData.radius,this.fontBackground="transparent"===this.fontBackground?this.chartBackground:this.fontBackground,i.drawType.indexOf("Stacking")>-1?t="Outer"===t?"Top":t:i.drawType.indexOf("Range")>-1&&(t="Outer"===t||"Top"===t?t:"Auto"),"Outer"===t?l=0===n?l+10+this.markerHeight:l-10-this.markerHeight:"Middle"===t?(l=l/2+5,"StackingColumn"===i.drawType&&(l=r.regionData.innerRadius+(r.regionData.radius-r.regionData.innerRadius)/2+5-o.height/2)):"Top"===t?l=0===n?l-10-this.markerHeight:l+10+this.markerHeight:"Bottom"===t?(l=10,l+="StackingColumn"===i.drawType?r.regionData.innerRadius+this.markerHeight:0):l=0===n?l>=i.chart.radius?l-5:"StackingColumn"===i.drawType?l-10:l+10:l>=i.chart.radius?l+5:l-10,l+=s*c,e.x=i.clipRect.width/2+i.clipRect.x+l*Math.cos(d),"StackingColumn"===i.drawType?e.x=e.x<h/2?e.x+o.width/2:e.x>h/2?e.x-o.width/2:e.x:"Column"===i.drawType&&(e.x=e.x<h/2?e.x-o.width/2:e.x>h/2?e.x+o.width/2:e.x),e.y=i.clipRect.height/2+i.clipRect.y+l*Math.sin(d),e},e.prototype.getLabelLocation=function(e,t,i,r){var o=new Vi(0,0),n="Candle"===t.type&&r>1?e.regions[1]:e.regions[0];"HiloOpenClose"===t.type&&(n=2===r?e.regions[1]:e.regions[2]);var a=t.xAxis,s=t.yAxis,l=t.chart.requireInvertedAxis;if("BoxAndWhisker"===t.type){switch(this.markerHeight=0,r){case 0:o=ve(e.xValue,e.median,a,s,l);break;case 1:o=ve(e.xValue,e.maximum,a,s,l);break;case 2:o=ve(e.xValue,e.minimum,a,s,l);break;case 3:o=ve(e.xValue,e.upperQuartile,a,s,l);break;case 4:o=ve(e.xValue,e.lowerQuartile,a,s,l);break;default:o=ve(e.xValue,e.outliers[r-5],a,s,l),this.markerHeight=t.marker.height/2}l?o.y=e.regions[0].y+e.regions[0].height/2:o.x=e.regions[0].x+e.regions[0].width/2}else o=0===r||1===r?new Vi(e.symbolLocations[0].x,e.symbolLocations[0].y):2!==r&&3!==r||"Candle"!==t.type?l?{x:n.x+n.width/2,y:n.y}:{x:n.x+n.width,y:n.y+n.height/2}:new Vi(e.symbolLocations[1].x,e.symbolLocations[1].y);if(r>1&&"HiloOpenClose"===t.type)if(t.chart.requireInvertedAxis){var h=n.height;o.y=n.y+h/2+2*(2===r?1:-1)}else{var c=n.width;o.x=n.x+c/2+2*(2===r?1:-1)}return o},e.prototype.calculateRectPosition=function(e,t,i,r,o,n,a,s){if("PolarRadar"===o.chart.chartAreaType)return null;var l=this.margin,h=this.inverted?n.width:n.height,c=this.borderWidth+h/2+5;switch("StackingColumn100"===o.type||"StackingBar100"===o.type?r="Outer"===r?"Top":r:o.type.indexOf("Range")>-1?r="Outer"===r||"Top"===r?r:"Auto":"Waterfall"===o.type&&(r="Auto"===r?"Middle":r),r){case"Bottom":e=this.inverted?i?e+t.width-c-l.left:e-t.width+c+l.right:i?e-t.height+c+l.top:e+t.height-c-l.bottom;break;case"Middle":e=e=this.inverted?i?e+t.width/2:e-t.width/2:i?e-t.height/2:e+t.height/2;break;case"Auto":e=this.calculateRectActualPosition(e,t,i,o,n,a,s);break;default:c+=this.errorHeight,e=this.calculateTopAndOuterPosition(e,t,r,o,a,c,i)}var d=this.inverted?e<t.x||e>t.x+t.width:e<t.y||e>t.y+t.height;this.fontBackground=d?"transparent"===this.fontBackground?this.chartBackground:this.fontBackground:"transparent"===this.fontBackground?s.color||o.interior:this.fontBackground;var p=o.chart.series.length;if("Outer"===r&&o.type.indexOf("Stacking")>-1&&p-1>o.index)for(var u=void 0,g=void 0,y=o.index+1;y<p;y++)if(u=o.chart.series[y],g=u.points[s.index],u.type.indexOf("Stacking")>-1&&-1===u.type.indexOf("100")){this.fontBackground=g&&(g.yValue<0&&s.yValue<0||g.yValue>0&&s.yValue>0)?g?g.color:u.interior:this.fontBackground;break}return e},e.prototype.calculatePathPosition=function(e,t,i,r,o,n){switch(i.type.indexOf("Area")>-1&&"RangeArea"!==i.type&&this.yAxisInversed&&"Auto"!==i.marker.dataLabel.position&&(t="Top"===t?"Bottom":"Bottom"===t?"Top":t),this.fontBackground="transparent"===this.fontBackground?this.chartBackground:this.fontBackground,t){case"Top":case"Outer":e=e-this.markerHeight-this.borderWidth-o.height/2-this.margin.bottom-5-this.errorHeight;break;case"Bottom":e=e+this.markerHeight+this.borderWidth+o.height/2+this.margin.top+5+this.errorHeight;break;case"Auto":e=this.calculatePathActualPosition(e,this.markerHeight,i,r,o,n)}return e},e.prototype.isDataLabelShape=function(e){this.isShape="transparent"!==e.color||e.border.width>0,this.borderWidth=e.border.width,this.isShape||(this.margin={left:0,right:0,bottom:0,top:0})},e.prototype.calculateRectActualPosition=function(e,t,i,r,o,n,a){for(var s,l,h=!0,c=0,d=this.chart.dataLabelCollections,p=-1!==r.type.indexOf("Range")||"Hilo"===r.type?2:4;h&&c<p;){var u=this.getPosition(c);r.type.indexOf("Stacking")>-1&&"Outer"===u&&(u="Top",c++),s=this.calculateRectPosition(e,t,i,u,r,o,n,a),h=this.inverted?(l=Me(new Vi(s,this.locationY),o,this.margin)).x<0||Pe(l,d,r.clipRect)||l.x+l.width>r.clipRect.width:(l=Me(new Vi(this.locationX,s),o,this.margin)).y<0||Pe(l,d,r.clipRect)||l.y>r.clipRect.height,c++}return s},e.prototype.calculateAlignment=function(e,t,i,r){switch(i){case"Far":t=this.inverted?r?t-e:t+e:r?t+e:t-e;break;case"Near":t=this.inverted?r?t+e:t-e:r?t-e:t+e;break;case"Center":t=t}return t},e.prototype.calculateTopAndOuterPosition=function(e,t,i,r,o,n,a){var s,l=this.margin;switch(r.type){case"RangeColumn":case"RangeArea":case"Hilo":s=0===o&&!this.yAxisInversed||1===o&&this.yAxisInversed,e=this.updateLabelLocation(i,e,n,l,t,s);break;case"Candle":s=(0===o||2===o)&&!this.yAxisInversed||(1===o||3===o)&&this.yAxisInversed,e=this.updateLabelLocation(i,e,n,l,t,s,o>1);break;case"HiloOpenClose":o<=1?(s=0===o&&!this.yAxisInversed||1===o&&this.yAxisInversed,e=this.updateLabelLocation(i,e,n,l,t,s)):e=this.yAxisInversed?this.inverted?e-n-l.right:e+n+l.top:this.inverted?e+n+l.left:e-n-l.bottom;break;default:e=a&&"Top"===i||!a&&"Outer"===i?this.inverted?e+n+l.left+this.markerHeight:e-n-l.bottom-this.markerHeight:this.inverted?e-n-l.right-this.markerHeight:e+n+l.top+this.markerHeight}return e},e.prototype.updateLabelLocation=function(e,t,i,r,o,n,a){return void 0===a&&(a=!1),t=this.inverted?n?"Outer"!==e||a?t-i-r.right-this.markerHeight:t+i+r.left+this.markerHeight:"Outer"!==e||a?t-o.width+i+r.left+this.markerHeight:t-o.width-i-r.right-this.markerHeight:n?"Outer"!==e||a?t+i+r.top+this.markerHeight:t-i-r.bottom-this.markerHeight:"Outer"!==e||a?t+o.height-i-r.bottom-this.markerHeight:t+o.height+i+r.top+this.markerHeight},e.prototype.calculatePathActualPosition=function(e,t,i,r,o,n){var a,s,l,h,c,d=i.points,p=r.index,u=d[p].yValue,g=d.length-1>p?d[p+1]:null,y=p>0?d[p-1]:null,m=!0,v=this.chart.dataLabelCollections;if("Bubble"===i.type)a="Top";else if(i.type.indexOf("Step")>-1)a="Top",p&&(a=y&&y.visible&&u>y.yValue===this.yAxisInversed&&u!==y.yValue?"Bottom":"Top");else if("BoxAndWhisker"===i.type)1===n||3===n||n>4?a=i.yAxis.isInversed?"Bottom":"Top":2===n||4===n?a=i.yAxis.isInversed?"Top":"Bottom":(m=!1,a="Middle",s=this.calculatePathPosition(e,a,i,r,o,n));else if(0===p)a=!g||!g.visible||u>g.yValue||u<g.yValue&&this.yAxisInversed?"Top":"Bottom";else if(p===d.length-1)a=!y||!y.visible||u>y.yValue||u<y.yValue&&this.yAxisInversed?"Top":"Bottom";else if(g.visible||y&&y.visible)if(g.visible&&y){var f=(g.yValue-y.yValue)/2,b=f*p+(g.yValue-f*(p+1));a=this.yAxisInversed?b<u?"Bottom":"Top":b<u?"Top":"Bottom"}else a=g.yValue>u||y&&y.yValue>u?"Bottom":"Top";else a="Top";for(h="Bottom"===a,c=["Outer","Top","Bottom","Middle","Auto"].indexOf(a);m&&c<4;)s=this.calculatePathPosition(e,this.getPosition(c),i,r,o,n),m=(l=Me(new Vi(this.locationX,s),o,this.margin)).y<0||Pe(l,v,i.clipRect)||l.y+l.height>i.clipRect.height,c=h?c-1:c+1,h=!1;return s},e.prototype.doDataLabelAnimation=function(e,t){for(var i,r=e.shapeElement.childNodes,o=e.textElement.childNodes,n=e.animation.delay+e.animation.duration,a=e.chart.animated?e.chart.duration:200,s=t?1:o.length,l=0;l<s;l++)i=o[l],t?(t.style.visibility="hidden",oe(t,n,a,"ZoomIn")):(Q(i,n,a,e,null,new Vi(+i.getAttribute("x")+ +i.getAttribute("width")/2,+i.getAttribute("y")+ +i.getAttribute("height")/2),!0),r[l]&&Q(i=r[l],n,a,e,null,new Vi(+i.getAttribute("x")+ +i.getAttribute("width")/2,+i.getAttribute("y")+ +i.getAttribute("height")/2),!0))},e.prototype.getPosition=function(e){return["Outer","Top","Bottom","Middle","Auto"][e]},e.prototype.getModuleName=function(){return"DataLabel"},e.prototype.destroy=function(){},e}(),Cn=function(){function e(e){this.chart=e}return e.prototype.render=function(e){if("PolarRadar"===this.chart.chartAreaType)return null;this.createElement(e,this.chart),this.renderErrorBar(e)},e.prototype.renderErrorBar=function(e){for(var t,r,o=e.index,n=e.errorBar,a=e.errorBar.errorBarCap,s=["",""],l=e.chart.redraw,h=0,c=e.points;h<c.length;h++){var d=c[h];if(d.visible&&d.symbolLocations[0]){var p=0,u=0;switch(n.mode){case"Vertical":u=n.verticalError;break;case"Horizontal":p=n.horizontalError;break;case"Both":p=n.horizontalError,u=n.verticalError}s=this["calculate"+n.type+"Value"](d,e,this.chart.requireInvertedAxis,p,u),t=this.chart.element.id+"_Series__ErrorBarGroup_"+o+"_Point_"+d.index,r=this.chart.element.id+"_Series__ErrorBarCap_"+o+"_Point_"+d.index;var g=new i.PathOption(t,"",n.width,n.color||this.chart.themeStyle.errorBar,null,"",s[0]),y=he(g.id),m=y?y.getAttribute("d"):null;e.errorBarElement.appendChild(this.chart.renderer.drawPath(g)),J(y,s[0],l,m);var v=new i.PathOption(r,"",a.width,a.color||this.chart.themeStyle.errorBar,null,"",s[1]);m=(y=he(v.id))?y.getAttribute("d"):null,be(this.chart.enableCanvas,e.errorBarElement,this.chart.renderer.drawPath(v),l),J(y,s[1],l,m)}}},e.prototype.findLocation=function(e,t,i,r,o){var n=t.errorBar,a=n.direction,s=[],l=t.type.indexOf("Stacking")>-1?t.stackedValues.endValues[e.index]:"HighLow"===t.seriesType||"HighLowOpenClose"===t.seriesType?t.points[e.index].high:e.yValue,h=ve(e.xValue+("Plus"===a||"Both"===a?"Custom"!==n.type||"Horizontal"!==n.mode&&"Both"!==n.mode?r:r=n.horizontalPositiveError:0),l+("Plus"===a||"Both"===a?"Custom"!==n.type||"Vertical"!==n.mode&&"Both"!==n.mode?o:o=n.verticalPositiveError:0),t.xAxis,t.yAxis,i);if(s.push(h),t.isRectSeries){c=e.symbolLocations[0];s.push(c)}else{var c=ve(e.xValue,e.yValue,t.xAxis,t.yAxis,i);s.push(c)}var d=ve(e.xValue-("Minus"===a||"Both"===a?"Custom"!==n.type||"Horizontal"!==n.mode&&"Both"!==n.mode?r:r=n.horizontalNegativeError:0),l-("Minus"===a||"Both"===a?"Custom"!==n.type||"Vertical"!==n.mode&&"Both"!==n.mode?o:o=n.verticalNegativeError:0),t.xAxis,t.yAxis,i);return s.push(d),e.error="Vertical"===n.mode?n.verticalError:n.horizontalError,this.negativeHeight="Vertical"===n.mode||"Both"===n.mode?i?s[1].x-s[2].x:s[2].y-s[1].y:0,this.positiveHeight="Vertical"===n.mode||"Both"===n.mode?i?s[0].x-s[1].x:s[1].y-s[0].y:0,this.getErrorDirection(s[0],s[1],s[2],t,i)},e.prototype.calculateFixedValue=function(e,t,i,r,o,n,a){t.errorBar;return this.findLocation(e,t,i,r,o)},e.prototype.calculatePercentageValue=function(e,t,i,r,o,n,a){return r=r/100*e.xValue,o=o/100*e.yValue,this.findLocation(e,t,i,r,o)},e.prototype.calculateStandardDeviationValue=function(e,t,i,r,o,n,a){var s=this.meanCalculation(t,t.errorBar.mode);return r*=s.horizontalSquareRoot+s.horizontalMean,o*=s.verticalSquareRoot+s.verticalMean,this.findLocation(e,t,i,r,o)},e.prototype.calculateStandardErrorValue=function(e,t,i,r,o,n,a){var s=t.points.length,l=this.meanCalculation(t,t.errorBar.mode);return r=r*l.horizontalSquareRoot/Math.sqrt(s),o=o*l.verticalSquareRoot/Math.sqrt(s),this.findLocation(e,t,i,r,o)},e.prototype.calculateCustomValue=function(e,t,i,r,o,n,a){t.errorBar;return this.findLocation(e,t,i,r,o)},e.prototype.getHorizontalDirection=function(e,t,i,r,o,n){var a="",s="";return a+="M "+e.x+" "+t.y+" L "+i.x+" "+t.y,s+="Plus"===r||"Both"===r?"M "+e.x+" "+(t.y-n)+" L "+e.x+" "+(t.y+n):"",s+="Minus"===r||"Both"===r?"M "+i.x+" "+(t.y-n)+" L "+i.x+" "+(t.y+n):" ",[a,s]},e.prototype.getVerticalDirection=function(e,t,i,r,o,n){var a="",s="";return a+="M "+t.x+" "+e.y+" L "+t.x+" "+i.y,s+="Plus"===r||"Both"===r?"M "+(t.x-n)+" "+e.y+" L "+(t.x+n)+" "+e.y:"",s+="Minus"===r||"Both"===r?"M "+(t.x-n)+" "+i.y+" L "+(t.x+n)+" "+i.y:"",[a,s]},e.prototype.getBothDirection=function(e,t,i,r,o,n){var a="",s="",l=this.getHorizontalDirection(e,t,i,r,o,n),h=this.getVerticalDirection(e,t,i,r,o,n);return s=l[0].concat(h[0]),a=l[1].concat(h[1]),[s,a]},e.prototype.getErrorDirection=function(e,t,i,r,o){var n,a=r.errorBar.direction,s=r.errorBar.mode,l=r.errorBar.errorBarCap.length,h=s;switch(s){case"Both":h=s;break;case"Horizontal":h=o?"Vertical":s;break;case"Vertical":h=o?"Horizontal":s}switch(h){case"Horizontal":n=this.getHorizontalDirection(e,t,i,a,h,l);break;case"Vertical":n=this.getVerticalDirection(e,t,i,a,h,l);break;case"Both":n=this.getBothDirection(e,t,i,a,h,l)}return[n[0],n[1]]},e.prototype.meanCalculation=function(e,t){var i=0,r=0,o=0,n=0,a=e.points.length;switch(t){case"Vertical":o=(r=C(e.yData))/a;break;case"Horizontal":n=(i=C(e.xData))/a;break;case"Both":o=(r=C(e.yData))/a,n=(i=C(e.xData))/a}for(var s=0,l=e.points;s<l.length;s++){var h=l[s];"Vertical"===t?r+=Math.pow(h.yValue-o,2):"Horizontal"===t?i+=Math.pow(h.xValue-n,2):(r+=Math.pow(h.yValue-o,2),i+=Math.pow(h.xValue-n,2))}var c=r/(a-1),d=Math.sqrt(r/(a-1)),p=i/(a-1),u=Math.sqrt(i/(a-1));return new Oi(c,d,p,u,o,n)},e.prototype.createElement=function(e,t){var i="Cartesian"===t.chartAreaType?"translate("+e.clipRect.x+","+e.clipRect.y+")":"",r=(e.marker.height+5)/2,o=(e.marker.width+5)/2;if("Cartesian"===t.chartAreaType){var n=new Di(t.element.id+"_ChartErrorBarClipRect_"+e.index,"transparent",{width:1,color:"Gray"},1,{x:-o,y:-r,width:e.clipRect.width+2*o,height:e.clipRect.height+2*r});e.errorBarElement=t.renderer.createGroup({id:t.element.id+"ErrorBarGroup"+e.index,transform:i,"clip-path":"url(#"+t.element.id+"_ChartErrorBarClipRect_"+e.index+")"}),e.errorBarElement.appendChild(K(t.redraw,n,t.renderer))}},e.prototype.doErrorBarAnimation=function(e){var t=e.errorBarElement.childNodes;if(!t)return null;for(var i=e.animation.delay+e.animation.duration,r=1;r<t.length;){for(var o=0;o<e.points.length;o++)e.points[o].symbolLocations[0]&&(t[r].style.visibility="hidden",oe(t[r],i,350,e.chart.requireInvertedAxis?"SlideLeftIn":"SlideBottomIn",!1));r++}},e.prototype.getModuleName=function(){return"ErrorBar"},e.prototype.destroy=function(){},e}(),Pn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ln=function(e){function r(t){var i=e.call(this,t)||this;return i.library=i,i.addEventListener(),i}return Pn(r,e),r.prototype.addEventListener=function(){this.chart.isDestroyed||(this.chart.on(t.Browser.touchMoveEvent,this.mouseMove,this),this.chart.on("click",this.click,this),this.chart.on(t.Browser.touchEndEvent,this.mouseEnd,this))},r.prototype.removeEventListener=function(){this.chart.isDestroyed||(this.chart.off(t.Browser.touchMoveEvent,this.mouseMove),this.chart.off("click",this.click),this.chart.off(t.Browser.touchEndEvent,this.mouseEnd))},r.prototype.mouseMove=function(e){this.chart.legendSettings.visible&&!this.chart.isTouch&&(this.move(e),this.chart.highlightModule&&"None"!==this.chart.highlightMode&&this.click(e))},r.prototype.mouseEnd=function(e){this.chart.legendSettings.visible&&this.chart.isTouch&&this.move(e)},r.prototype.getLegendOptions=function(e,t){this.legendCollections=[];var i,r,o=[];e.length>1&&(this.legend.mode="Series");for(var n=0,a=e;n<a.length;n++){var s=a[n];if("Series"===this.legend.mode)"Indicator"!==s.category&&(i="PolarRadar"===t.chartAreaType?s.drawType:s.type,r=s.pointColorMapping&&s.points.length>0&&s.points[0].interior?s.points[0].interior:s.interior,this.legendCollections.push(new mr(s.name,r,s.legendShape,"TrendLine"===s.category?this.chart.series[s.sourceIndex].trendlines[s.index].visible:s.visible,i,s.legendImageUrl,s.marker.shape,s.marker.visible)));else if("Point"===this.legend.mode)for(var l=this,h=0,c=s.points;h<c.length;h++)!function(e){i="PolarRadar"===t.chartAreaType?s.drawType:s.type,r=e.interior?e.interior:s.interior,0===l.legendCollections.filter(function(t){return t.text===e.x.toString()}).length&&l.legendCollections.push(new mr(e.x.toString(),r,s.legendShape,"TrendLine"===s.category?l.chart.series[s.sourceIndex].trendlines[s.index].visible:e.visible,i,"",s.marker.shape,s.marker.visible))}(u=c[h]);else if("Range"===this.legend.mode)for(var d=0,p=s.points;d<p.length;d++){var u=p[d];i="PolarRadar"===t.chartAreaType?s.drawType:s.type,r=u.interior?u.interior:s.interior;var g="Others";if(o.indexOf(r)<0&&(o.push(r),t.rangeColorSettings.length>=1&&1===t.rangeColorSettings[0].colors.length)){for(var y=0,m=t.rangeColorSettings;y<m.length;y++){var v=m[y];v.colors[0]===r&&(g=v.label)}this.legendCollections.push(new mr(g,r,s.legendShape,"TrendLine"===s.category?this.chart.series[s.sourceIndex].trendlines[s.index].visible:u.visible,i,"",s.marker.shape,s.marker.visible))}}else if(0===this.legendCollections.length&&t.rangeColorSettings.length>0){var f=t.rangeColorSettings[0].start.toString(),b=t.rangeColorSettings[t.rangeColorSettings.length-1].end.toString();this.legendCollections.push(new mr(f,s.interior,"Rectangle",!0,i,"",s.marker.shape,s.marker.visible)),this.legendCollections.push(new mr(b,s.interior,"Rectangle",!0,i,"",s.marker.shape,s.marker.visible))}}},r.prototype.getLegendBounds=function(e,t,r){this.calculateLegendTitle(r,t),this.isTitle=!!r.title;var o=r.padding,n=r.titlePosition,a=0,s=0,l=this.arrowWidth,h=this.arrowHeight,c=this.isVertical&&!r.enablePages?h:0,d=this.isTitle&&"Top"===n?this.legendTitleSize.height+this.fivePixel:0;d=this.isTitle&&this.isVertical&&"Top"!==n?this.legendTitleSize.height+this.fivePixel:d,this.isVertical?s=r.width?0:e.width/100*5:a=r.height?0:e.height/100*5,t.height+=a,t.width+=s;var p,u=r.shapeWidth,g=r.shapePadding,y=0,m=0,v=0,f=0,b=0,x=0;this.maxItemHeight=Math.max(i.measureText("MeasureText",r.textStyle).height,r.shapeHeight);for(var w=!1,S=0,C=this.legendCollections;S<C.length;S++){var P=C[S];si.test(P.text)&&(P.text=We(P.text,si)),li.test(P.text)&&(P.text=We(P.text,li)),p={fill:P.fill,text:P.text,shape:P.shape,markerShape:P.markerShape,name:"legendRender",cancel:!1},this.chart.trigger("legendRender",p),P.render=!p.cancel,P.text=p.text,P.fill=p.fill,P.shape=p.shape,P.markerShape=p.markerShape,P.textSize=i.measureText(P.text,r.textStyle),P.render&&(w=!0,m+=v=u+g+P.textSize.width+o,r.enablePages||this.isVertical||(x=this.isTitle&&"Top"!==n?this.legendTitleSize.width+this.fivePixel:0,x+=l),(t.width<o+m+x||this.isVertical)&&(y=Math.max(y,m+o+x-(this.isVertical?0:v)),0===b&&v!==m&&(b=1),m=this.isVertical?0:v,f=++b*(this.maxItemHeight+o)+o+d+c))}f=Math.max(f,this.maxItemHeight+o+o+d),this.isPaging=t.height<f,this.isPaging&&!r.enablePages&&(f=this.isVertical?f:this.maxItemHeight+o+o+("Top"===n?d:0)),this.totalPages=b,this.isPaging||this.isVertical||(m+=this.isTitle&&"Top"!==n?this.fivePixel+this.legendTitleSize.width+this.fivePixel:0),w?this.setBounds(Math.max(m+o,y),f,r,t):this.setBounds(0,0,r,t)},r.prototype.getRenderPoint=function(e,t,i,r,o,n,a){var s=this.legend.padding,l=r.location.x+i+r.textSize.width;l+(e.textSize.width+i)>o.x+o.width+this.legend.shapeWidth/2||this.isVertical?(e.location.x=t.x,e.location.y=n===a?r.location.y:r.location.y+this.maxItemHeight+s):(e.location.x=n===a?r.location.x:l,e.location.y=r.location.y);var h=this.legendBounds.x+this.legendBounds.width-(e.location.x+i-this.legend.shapeWidth/2);e.text=Ie(+h.toFixed(4),e.text,this.legend.textStyle)},r.prototype.LegendClick=function(e,t){var i=this.chart,r="Series"===i.legendSettings.mode?e:0,o=i.visibleSeries[r],n=this.legendCollections[e];if("Series"===i.legendSettings.mode){s={legendText:n.text,legendShape:n.shape,chart:i.isBlazor?{}:i,series:o,points:o.points,name:"legendClick",cancel:!1};this.chart.trigger("legendClick",s),o.legendShape=s.legendShape,null!==o.fill&&(i.visibleSeries[e].interior=o.fill),i.legendSettings.toggleVisibility?("TrendLine"===o.category?i.series[o.sourceIndex].trendlines[o.index].visible?i.series[o.sourceIndex].trendlines[o.index].visible=!1:i.series[o.sourceIndex].trendlines[o.index].visible=!0:(o.chart.isProtectedOnChange=!0,this.changeSeriesVisiblity(o,o.visible)),n.visible="TrendLine"===o.category?i.series[o.sourceIndex].trendlines[o.index].visible:o.visible,this.refreshLegendToggle(i,o)):i.selectionModule?i.selectionModule.legendSelection(i,e,t):i.highlightModule&&i.highlightModule.legendSelection(i,e,t),o.chart.isProtectedOnChange=!1}else if("Point"===i.legendSettings.mode){var a=o.points[e],s={legendText:n.text,legendShape:n.shape,chart:i.isBlazor?{}:i,series:o,points:[a],name:"legendClick",cancel:!1};this.chart.trigger("legendClick",s),i.legendSettings.toggleVisibility&&(a.visible=!a.visible,(h=this.legendCollections[e]).visible=a.visible,this.refreshLegendToggle(i,o))}else if("Range"===i.legendSettings.mode){for(var l=[],h=this.legendCollections[e],c=0,d=o.points;c<d.length;c++){a=d[c];h.fill===(a.interior||o.interior)&&l.push(a)}s={legendText:n.text,legendShape:n.shape,chart:i.isBlazor?{}:i,series:o,points:l,name:"legendClick",cancel:!1};if(this.chart.trigger("legendClick",s),i.legendSettings.toggleVisibility){h.visible=!h.visible;for(var p=0,u=l;p<u.length;p++)(a=u[p]).visible=!a.visible;this.refreshLegendToggle(i,o)}}},r.prototype.refreshLegendToggle=function(e,r){var o=[];if(e.selectionModule&&(o=t.extend([],e.selectionModule.selectedDataIndexes,null,!0)),e.svgObject.childNodes.length>0&&!e.enableAnimation&&!e.enableCanvas){for(;e.svgObject.lastChild;)e.svgObject.removeChild(e.svgObject.lastChild);t.remove(e.svgObject)}e.animateSeries=!1,e.redraw=e.enableAnimation,e.rotatedDataLabelCollections=[],m(i.getElement(e.element.id+"_Secondary_Element").querySelectorAll(".ejSVGTooltip")[0]),Ue(e),this.redrawSeriesElements(r,e),e.removeSvg(),e.refreshAxis(),r.refreshAxisLabel(),this.refreshSeries(e.visibleSeries),e.markerRender.removeHighlightedMarker(),e.refreshBound(),e.trigger("loaded",{chart:e}),o.length>0&&(e.selectionModule.selectedDataIndexes=o,e.selectionModule.redrawSelection(e,e.selectionMode)),e.highlightModule&&"None"!==e.highlightMode&&e.highlightModule.redrawSelection(e,e.highlightMode),e.redraw=!1},r.prototype.changeSeriesVisiblity=function(e,t){e.visible=!t,this.isSecondaryAxis(e.xAxis)&&(e.xAxis.internalVisibility=e.xAxis.series.some(function(e){return e.visible})),this.isSecondaryAxis(e.yAxis)&&(e.yAxis.internalVisibility=e.yAxis.series.some(function(e){return e.visible}))},r.prototype.isSecondaryAxis=function(e){return this.chart.axes.indexOf(e)>-1},r.prototype.redrawSeriesElements=function(e,t){if(!t.redraw)return null;m(t.element.id+"_Series_"+(void 0===e.index?e.category:e.index)+"_DataLabelCollections")},r.prototype.refreshSeries=function(e){for(var t=0,i=e;t<i.length;t++)i[t].position=void 0},r.prototype.click=function(e){var t=this;if(this.chart.legendSettings.visible){for(var i,r=this.chart.mouseX,o=this.chart.mouseY,n=[],a=e.target.id,s=0,l=[this.legendID+"_text_",this.legendID+"_shape_marker_",this.legendID+"_shape_"];s<l.length;s++){var h=l[s];if(a.indexOf(h)>-1){i=parseInt(a.split(h)[1],10),this.LegendClick(i,e);break}}a.indexOf(this.legendID+"_pageup")>-1?this.changePage(e,!0):a.indexOf(this.legendID+"_pagedown")>-1&&this.changePage(e,!1),this.chart.enableCanvas&&this.pagingRegions.length&&this.checkWithinBounds(r,o),(n=this.legendRegions.filter(function(e){return j(r,o+(t.isPaging?(t.currentPageNumber-1)*t.translatePage(null,1,2):0),e.rect)})).length&&this.chart.enableCanvas&&this.LegendClick(n[0].index,e)}},r.prototype.checkWithinBounds=function(e,t){var r=this.chart.renderer,o=this.legendBounds,n=this.chart.legendSettings.border.width,a=new i.Rect(o.x,o.y,o.width,o.height);return a.x=a.x-n/2,a.y=a.y-n/2,a.width=a.width+n,a.height=a.height+n,j(e,t,this.pagingRegions[0])?(--this.currentPageNumber>0?(this.legendRegions=[],r.clearRect(a),r.canvasClip(new Di("legendClipPath","transparent",{width:0,color:""},null,a)),this.renderLegend(this.chart,this.legend,o),r.canvasRestore()):++this.currentPageNumber,null):j(e,t,this.pagingRegions[1])?(++this.currentPageNumber>0&&this.currentPageNumber<=this.totalNoOfPages?(this.legendRegions=[],r.clearRect(a),r.canvasClip(new Di("legendClipPath","transpaent",{width:0,color:""},null,a)),this.renderLegend(this.chart,this.legend,o),r.canvasRestore()):--this.currentPageNumber,null):void 0},r.prototype.getModuleName=function(){return"Legend"},r.prototype.destroy=function(){this.removeEventListener()},r}(yr),Rn=function(){function e(e){this.control=e}return e.prototype.render=function(e,i){return this.isChart="chart"===this.control.getModuleName(),this.annotation=e,ue(t.createElement("div",{id:this.control.element.id+"_Annotation_"+i,styles:"position: absolute; z-index: 1"}),i,e.content,this.control)},e.prototype.setAnnotationPixelValue=function(e){var t="Chart"===this.annotation.region?new i.Rect(0,0,this.control.availableSize.width,this.control.availableSize.height):this.isChart?this.control.chartAxisLayoutPanel.seriesClipRect:this.control.series[0].accumulationBound;return e.x=("string"!=typeof this.annotation.x?"number"==typeof this.annotation.x?this.annotation.x:0:Be(this.annotation.x,t.width))+t.x,e.y=("number"==typeof this.annotation.y?this.annotation.y:Be(this.annotation.y,t.height))+t.y,!0},e.prototype.setAnnotationPointValue=function(e){var t=new Vi(0,0);if(this.isChart){for(var i=this.control,o=this.annotation,n=o.xAxisName,a=o.yAxisName,s=i.requireInvertedAxis,l=this.control.stockChart,h=void 0,c=void 0,d=void 0,p=0,u=i.axisCollections;p<u.length;p++){var g=u[p];if(n===g.name||null==n&&"primaryXAxis"===g.name)if((h=g).valueType.indexOf("Category")>-1){var y="DateTimeCategory"===h.valueType?o.x.getTime().toString():o.x;if(h.labels.indexOf(y)<0)return!1;d=h.labels.indexOf(y)}else if("DateTime"===h.valueType){var m={skeleton:"full",type:"dateTime"};d="object"==typeof this.annotation.x||"object"==typeof new Date(this.annotation.x)?Date.parse(i.intl.getDateParser(m)(i.intl.getDateFormat(m)(new Date(r.DataUtil.parse.parseJson({val:o.x}).val)))):0}else d=+o.x;else(a===g.name||null==a&&"primaryYAxis"===g.name)&&(c=g)}return!!(h&&c&&x("Logarithmic"===h.valueType?v(d,h.logBase):d,h.visibleRange)&&x("Logarithmic"===c.valueType?v(+o.y,c.logBase):+o.y,c.visibleRange))&&(t=ve(d,+o.y,h,c,s),e.x=t.x+(s?c.rect.x:h.rect.x),e.y=t.y+(s?h.rect.y:c.rect.y)+(l&&l.enablePeriodSelector?l.toolbarHeight+l.titleSize.height:0),!0)}return this.setAccumulationPointValue(e)},e.prototype.processAnnotation=function(e,i,r){var o=this.control,n=new Vi(0,0),a=this.render(e,i),s=function(){a.style.transform="translate(-50%, -50%)"};s.bind(n,this),this["setAnnotation"+e.coordinateUnits+"Value"](n)?this.setElementStyle(n,a,r):this.control.redraw&&m(a.id),t.updateBlazorTemplate((this.control.element.id+"Annotation"+i).replace(/[^a-zA-Z0-9]/g,""),"ContentTemplate",o.stockChart?o.stockChart.annotations[i]:this.control.annotations[i],void 0,s)},e.prototype.setAccumulationPointValue=function(e){for(var t,i=0,r=this.control.visibleSeries[0].points;i<r.length;i++){var o=r[i];if("object"==typeof o.x){if(Date.parse(o.x)===Date.parse(this.annotation.x)&&o.y===this.annotation.y){t=o;break}}else if(o.x==this.annotation.x&&o.y==this.annotation.y){t=o;break}}return!(!t||!t.visible)&&(e.x=t.symbolLocation.x,e.y=t.symbolLocation.y,!0)},e.prototype.setElementStyle=function(e,t,i){var r=ye(t,this.control.redraw),o={cancel:!1,name:"annotationRender",content:t,location:e};this.control.trigger("annotationRender",o),o.cancel||(o.content.style.left=this.setAlignmentValue(this.annotation.horizontalAlignment,r.width,o.location.x)+"px",o.content.style.top=this.setAlignmentValue(this.annotation.verticalAlignment,r.height,o.location.y)+"px",o.content.setAttribute("aria-label",this.annotation.description||"Annotation"),fe(o.content,i,this.control.redraw,!0,"left","top"))},e.prototype.setAlignmentValue=function(e,t,i){switch(e){case"Top":case"Near":i-=t;break;case"Bottom":case"Far":i+=0;break;case"Middle":case"Center":i-=t/2}return i},e}(),Mn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),An=function(e){function i(t,i){var r=e.call(this,t)||this;return r.chart=t,r.annotations=i,r}return Mn(i,e),i.prototype.renderAnnotations=function(e){var i=this;this.annotations=this.chart.annotations,this.parentElement=Ne(this.chart.redraw,this.chart.element.id+"_Annotation_Collections")||t.createElement("div",{id:this.chart.element.id+"_Annotation_Collections"}),this.annotations.map(function(e,t){i.processAnnotation(e,t,i.parentElement)}),fe(this.parentElement,e,this.chart.redraw)},i.prototype.destroy=function(){},i.prototype.getModuleName=function(){return"Annotation"},i}(Rn),Tn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),kn=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return Tn(r,e),r.prototype.render=function(e,i,r,o){for(var n,a=this.getSideBySideInfo(e),s=0,l=e.points;s<l.length;s++){var h=l[s];h.symbolLocations=[],h.regions=[];var c=void 0;h.visible&&S(e.points[h.index-1],h,e.points[h.index+1],e)&&(this.findBoxPlotValues(h.y,h,e.boxPlotMode),this.updateTipRegion(e,h,a),c=this.getRectangle(h.xValue+a.start,h.upperQuartile,h.xValue+a.end,h.lowerQuartile,e),h.regions.push(c),(n=this.triggerEvent(e,h,e.interior,{color:t.isNullOrUndefined(e.border.color)||"transparent"===e.border.color?Oe(e.interior,-.6):e.border.color,width:e.border.width?e.border.width:1})).cancel||this.renderBoxAndWhisker(e,h,n,this.getPathString(h,e,ve(h.xValue,h.median,i,r,o),ve(h.xValue+a.median,h.average,i,r,o)),a.median))}e.marker.visible&&e.chart.markerRender.render(e)},r.prototype.updateTipRegion=function(e,t,i){var r=this.getRectangle(t.xValue+i.median,t.maximum,t.xValue+i.median,t.minimum,e);this.updateTipSize(e,t,r,e.chart.requireInvertedAxis)},r.prototype.updateTipSize=function(e,t,i,r){var o=e.border.width||1;r?(i.y-=o/2,i.height=i.height||o):(i.x-=o/2,i.width=i.width||o),t.regions.push(i)},r.prototype.getPathString=function(e,t,i,r){var o=e.regions[0],n=e.regions[1],a="",s=t.chart.requireInvertedAxis?o.y+o.height/2:o.x+o.width/2,l=n.x+n.width,h=n.y+n.height,c=o.x+o.width,d=o.y+o.height;return t.chart.requireInvertedAxis?(this.updateTipSize(t,e,{x:o.x,y:n.y,width:0,height:h-n.y},!1),this.updateTipSize(t,e,{x:c,y:n.y,width:0,height:h-n.y},!0),a+="M "+o.x+" "+n.y+" L "+o.x+" "+h,a+="M "+o.x+" "+s+" L "+n.x+" "+s,a+=" M "+n.x+" "+n.y+" L "+l+" "+n.y+" L "+l+" "+h+" L "+n.x+" "+h+" Z",a+=" M "+l+" "+s+" L "+c+" "+s,a+=" M "+c+" "+n.y+" L "+c+" "+h,a+=" M "+i.x+" "+n.y+" L "+i.x+" "+h,a+=t.showMean?"M "+(r.x+5)+" "+(r.y-5)+" L "+(r.x-5)+" "+(r.y+5)+"M "+(r.x-5)+" "+(r.y-5)+" L "+(r.x+5)+" "+(r.y+5):""):(this.updateTipSize(t,e,{x:n.x,y:o.y,width:l-n.x,height:0},!0),this.updateTipSize(t,e,{x:n.x,y:d,width:l-n.x,height:0},!0),a+="M "+n.x+" "+o.y+" L "+l+" "+o.y,a+=" M "+s+" "+o.y+" L "+s+" "+n.y,a+=" M "+n.x+" "+n.y+" L "+l+" "+n.y+" L "+l+" "+h+" L "+n.x+" "+h+" Z",a+=" M "+s+" "+h+" L "+s+" "+d,a+=" M "+n.x+" "+d+" L "+l+" "+d,a+=" M "+n.x+" "+i.y+" L "+l+" "+i.y,a+=t.showMean?" M "+(r.x-5)+" "+(r.y-5)+" L "+(r.x+5)+" "+(r.y+5)+" M "+(r.x+5)+" "+(r.y-5)+" L "+(r.x-5)+" "+(r.y+5):""),a},r.prototype.renderBoxAndWhisker=function(e,t,r,o,n){var a,s,l=e.chart.element.id+"_Series_"+e.index+"_Point_"+t.index,h=e.chart.renderer.drawPath(new i.PathOption(l+"_BoxPath",r.fill,r.border.width,r.border.color,e.opacity,e.dashArray,o));h.setAttribute("aria-label",t.x.toString()+":"+t.maximum.toString()+":"+t.minimum.toString()+":"+t.lowerQuartile.toString()+":"+t.upperQuartile.toString());var c=e.chart.renderer.createGroup({id:l});c.appendChild(h);for(var d=0;d<t.outliers.length;d++)a=ve(t.xValue+n,t.outliers[d],e.xAxis,e.yAxis,e.chart.requireInvertedAxis),s=new i.Size(e.marker.width,e.marker.height),t.symbolLocations.push(a),this.updateTipSize(e,t,{x:a.x-s.width/2,y:a.y-s.height/2,width:s.width,height:s.height},!0);e.seriesElement.appendChild(c)},r.prototype.findBoxPlotValues=function(e,t,i){var r=e.length,o={average:C(e)/r,lowerQuartile:0,upperQuartile:0,maximum:0,minimum:0,median:0,outliers:[]};"Exclusive"===i?(o.lowerQuartile=this.getExclusiveQuartileValue(e,r,.25),o.upperQuartile=this.getExclusiveQuartileValue(e,r,.75),o.median=this.getExclusiveQuartileValue(e,r,.5)):"Inclusive"===i?(o.lowerQuartile=this.getInclusiveQuartileValue(e,r,.25),o.upperQuartile=this.getInclusiveQuartileValue(e,r,.75),o.median=this.getInclusiveQuartileValue(e,r,.5)):(o.median=Ee(e),this.getQuartileValues(e,r,o)),this.getMinMaxOutlier(e,r,o),t.minimum=o.minimum,t.maximum=o.maximum,t.lowerQuartile=o.lowerQuartile,t.upperQuartile=o.upperQuartile,t.median=o.median,t.outliers=o.outliers,t.average=o.average},r.prototype.getExclusiveQuartileValue=function(e,t,i){if(0===t)return 0;if(1===t)return e[0];var r=i*(t+1),o=Math.floor(Math.abs(r)),n=r-o;return 0===o?e[0]:o>t-1?e[t-1]:n*(e[o]-e[o-1])+e[o-1]},r.prototype.getInclusiveQuartileValue=function(e,t,i){if(0===t)return 0;if(1===t)return e[0];var r=i*(t-1),o=Math.floor(Math.abs(r));return(r-o)*(e[o+1]-e[o])+e[o]},r.prototype.getQuartileValues=function(e,t,i){if(1===t)return i.lowerQuartile=e[0],i.upperQuartile=e[0],null;var r=t%2==0,o=t/2,n=e.slice(0,o),a=e.slice(r?o:o+1,t);i.lowerQuartile=Ee(n),i.upperQuartile=Ee(a)},r.prototype.getMinMaxOutlier=function(e,t,i){for(var r=1.5*(i.upperQuartile-i.lowerQuartile),o=0;o<t;o++){if(!(e[o]<i.lowerQuartile-r)){i.minimum=e[o];break}i.outliers.push(e[o])}for(o=t-1;o>=0;o--){if(!(e[o]>i.upperQuartile+r)){i.maximum=e[o];break}i.outliers.push(e[o])}},r.prototype.doAnimation=function(e){this.animate(e)},r.prototype.getModuleName=function(){return"BoxAndWhiskerSeries"},r.prototype.destroy=function(){},r}(jr),_n=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),On=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return _n(r,e),r.prototype.render=function(e,i,r,o){var n,a,s,l,h=this,c=null,d="",p=Math.max(e.yAxis.visibleRange.min,0),u=[],g=this.sortSegments(e,e.segments);e.visiblePoints.map(function(t,y,m){t.symbolLocations=[],t.regions=[],l=!1,t.visible&&S(m[y-1],t,m[y+1],e)&&(d+=h.getAreaPathDirection(t.xValue,p,e,o,ve,c,"M"),c=c||new Vi(t.xValue,p),n=ve(t.xValue,t.yValue,i,r,o),s&&h.setPointColor(t,s,e,"X"===e.segmentAxis,g)?(l=!0,a=ve(c.x,p,i,r,o),d+="L "+n.x+" "+n.y+" ",d+="L "+n.x+" "+a.y+" ",h.generatePathOption(u,e,s,d,"_Point_"+s.index),d="M "+n.x+" "+a.y+" L "+n.x+" "+n.y+" "):(d+="L "+n.x+" "+n.y+" ",h.setPointColor(t,null,e,"X"===e.segmentAxis,g)),m[y+1]&&!m[y+1].visible&&"Drop"!==e.emptyPointSettings.mode&&(d+=h.getAreaEmptyDirection({x:t.xValue,y:p},c,e,o,ve),c=null),s=t,h.storePointLocation(t,e,o,ve))}),t.isNullOrUndefined(l)||l||(d=e.points.length>1?d+this.getAreaPathDirection(s.xValue,p,e,o,ve,null,"L"):"",this.generatePathOption(u,e,s,d,"")),this.applySegmentAxis(e,u,g),this.renderMarker(e)},r.prototype.generatePathOption=function(e,t,r,o,n){e.push(new i.PathOption(t.chart.element.id+"_Series_"+t.index+n,t.setPointColor(r,t.interior),t.border.width,t.border.color,t.opacity,t.dashArray,o))},r.prototype.destroy=function(){},r.prototype.getModuleName=function(){return"MultiColoredAreaSeries"},r.prototype.doAnimation=function(e){this.doLinearAnimation(e,e.animation)},r}(Gr),En=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return En(t,e),t.prototype.render=function(e,t,r,o){for(var n=null,a="M",s=this.enableComplexProperty(e),l=[],h="",c=this.sortSegments(e,e.segments),d=0,p=s;d<p.length;d++){var u=p[d];u.regions=[],u.visible&&S(s[u.index-1],u,s[u.index+1],e)?(h+=this.getLineDirection(n,u,e,o,ve,a),null!=n?this.setPointColor(u,n,e,"X"===e.segmentAxis,c)?(l.push(new i.PathOption(e.chart.element.id+"_Series_"+e.index+"_Point_"+n.index,"none",e.width,e.setPointColor(n,e.interior),e.opacity,e.dashArray,h)),a="M",h=""):a="L":this.setPointColor(u,null,e,"X"===e.segmentAxis,c),n=u,this.storePointLocation(u,e,o,ve)):(n="Drop"===e.emptyPointSettings.mode?n:null,a="Drop"===e.emptyPointSettings.mode?a:"M",u.symbolLocations=[])}""!==h&&l.push(new i.PathOption(e.chart.element.id+"_Series_"+e.index,"none",e.width,e.setPointColor(s[s.length-1],e.interior),e.opacity,e.dashArray,h)),this.applySegmentAxis(e,l,c),this.renderMarker(e)},t.prototype.doAnimation=function(e){this.doLinearAnimation(e,e.animation)},t.prototype.getModuleName=function(){return"MultiColoredLineSeries"},t.prototype.destroy=function(){},t}(Gr),In=function(){function e(e){this.xAxisPrevHeight=[],this.xAxisMultiLabelHeight=[],this.yAxisPrevHeight=[],this.yAxisMultiLabelHeight=[],this.chart=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.chart.isDestroyed||this.chart.on("click",this.click,this)},e.prototype.getMultilevelLabelsHeight=function(e){var t,r,o,n=0,a=[],s=[],l="Vertical"===e.orientation,h=l?e.rect.height:e.rect.width;e.multiLevelLabels.map(function(c,d){c.categories.map(function(n){""!==n.text&&null!==n.start&&null!==n.end&&(t=i.measureText(n.text,c.textStyle),r=l?t.width:t.height,r+=2*c.border.width+("CurlyBrace"===c.border.type?10:0),o=null!==n.maximumTextWidth?n.maximumTextWidth:z("string"==typeof n.end?Number(new Date(n.end)):n.end,e)*h-z("string"==typeof n.start?Number(new Date(n.start)):n.start,e)*h,t.width>o-10&&o>0&&"Wrap"===c.overflow&&!l&&(r*=Ge(n.text,o-10,c.textStyle).length),a[d]=a[d]?a[d]<r?r:a[d]:r)}),s[d]=n,n+=a[d]?a[d]+10:0}),e.multiLevelLabelHeight=n+(""!==e.title||this.chart.legendModule&&this.chart.legendSettings.visible?5:0),l?(this.yAxisMultiLabelHeight=a,this.yAxisPrevHeight=s):(this.xAxisMultiLabelHeight=a,this.xAxisPrevHeight=s)},e.prototype.renderXAxisMultiLevelLabels=function(e,r,o,n){var a,s,l,h,c,d,p,u,g,y,m,v=this,f=(e.labelPosition===e.tickPosition?e.majorTickLines.height:0)+e.maxLabelSize.height+10,b="",x="Outside"===e.labelPosition,w=e.isInversed,S=e.opposedPosition,C=e.scrollbarSettings.enable||x&&t.isNullOrUndefined(e.crossesAt)?e.scrollBarHeight:0,P=S&&!x||!S&&x?n.y+f-e.majorTickLines.width:n.y-f-e.multiLevelLabelHeight;this.createClipRect(n.x-e.majorTickLines.width,P+C,e.multiLevelLabelHeight+10,n.width+2*e.majorTickLines.width,this.chart.element.id+"_XAxis_Clippath_"+r,this.chart.element.id+"XAxisMultiLevelLabel"+r),e.multiLevelLabels.map(function(t,o){h=0,v.labelElement=v.chart.renderer.createGroup({id:v.chart.element.id+r+"_MultiLevelLabel"+o}),t.categories.map(function(P,L){if(b="",d="string"==typeof P.start?Number(new Date(P.start)):P.start,p="string"==typeof P.end?Number(new Date(P.end)):P.end,!(m=v.triggerMultiLabelRender(e,P.text,e.multiLevelLabels[o].textStyle,e.multiLevelLabels[o].alignment,P.customAttributes)).cancel){l=z(d,e)*n.width,c=z(p,e)*n.width,c=w?[l,l=c][0]:c,u=i.measureText(m.text,m.textStyle),g=(null===P.maximumTextWidth?c-l:P.maximumTextWidth)-10,a=l+n.x+10,s=(S&&!x||!S&&x?f+n.y+u.height/2+10+v.xAxisPrevHeight[o]:n.y-f+u.height/2-v.xAxisMultiLabelHeight[o]-v.xAxisPrevHeight[o])+C,"Center"===m.alignment?(a+=(c-l-10)/2,y="middle"):"Far"===m.alignment?(a=a+(c-l-10)-t.border.width/2,y="end"):(y="start",a+=t.border.width/2),s="CurlyBrace"===t.border.type?!S&&x||S&&!x?s+10:s-5:s;var R=new i.TextOption(v.chart.element.id+r+"_Axis_MultiLevelLabel_Level_"+o+"_Text_"+L,a,s,y,m.text);"None"!==t.overflow&&(R.text="Wrap"===t.overflow?Ge(m.text,g,m.textStyle):Ie(g,m.text,m.textStyle),R.x=R.x-5),Ve(v.chart.renderer,R,m.textStyle,m.textStyle.color||v.chart.themeStyle.axisLabel,v.labelElement,!1,v.chart.redraw,!0,null,null,null,null,null,v.chart.enableCanvas),t.border.width>0&&"WithoutBorder"!==t.border.type&&""!==(b=v.renderXAxisLabelBorder(o,c-l-10,e,l,f,u,R,n,m.alignment,b,x,S,h))&&(v.createBorderElement(o,r,e,b,h),h++),v.chart.enableCanvas||v.multiElements.appendChild(v.labelElement)}})}),this.chart.enableCanvas||o.appendChild(this.multiElements)},e.prototype.renderXAxisLabelBorder=function(e,t,i,r,o,n,a,s,l,h,c,d,p){var u,g,y,m,v=10,f=i.multiLevelLabels[e],b=f.categories[p].type,x=t+v,w=this.xAxisMultiLabelHeight[e]+v,S="Outside"===i.labelPosition?i.scrollBarHeight:0,C=r+s.x,P=!d&&c||d&&!c?o+s.y+this.xAxisPrevHeight[e]+S:s.y-o-this.xAxisPrevHeight[e]-S,L=b||f.border.type;switch(L){case"WithoutTopandBottomBorder":case"Rectangle":case"WithoutTopBorder":h+="M "+C+" "+P+" L "+C+" "+(P+(w=!d&&c||d&&!c?w:-w))+" M "+(C+x)+" "+P+" L "+(C+x)+" "+(P+w),h+="WithoutTopandBottomBorder"!==L?" L "+C+" "+(P+w)+" ":" ",h+="Rectangle"===L?"M "+C+" "+P+" L "+(C+x)+" "+P:" ";break;case"Brace":"Near"===l?(y=a.x,m=a.x+n.width+2):"Center"===l?(y=a.x-n.width/2-2,m=a.x+n.width/2+2):(y=a.x-n.width-2,m=a.x),h+="M "+C+" "+P+" L "+C+" "+(P+(w=!d&&c||d&&!c?w:-w)/2)+" M "+C+" "+(P+w/2)+" L "+(y-2)+" "+(P+w/2)+" M "+m+" "+(P+w/2)+" L "+(C+x)+" "+(P+w/2)+" M "+(C+x)+" "+(P+w/2)+" L "+(C+x)+" "+P;break;case"CurlyBrace":!d&&c||d&&!c?(v=10,u=15,g=5):(v=-10,u=-15,g=-5),h+="Center"===l?"M "+C+" "+P+" C "+C+" "+P+" "+(C+5)+" "+(P+v)+" "+(C+10)+" "+(P+v)+" L "+(C+x/2-5)+" "+(P+v)+" L "+(C+x/2)+" "+(P+u)+" L "+(C+x/2+5)+" "+(P+v)+" L "+(C+x-10)+" "+(P+v)+" C "+(C+x-10)+" "+(P+v)+" "+(C+x)+" "+(P+g)+" "+(C+x)+" "+P:"Near"===l?"M "+C+" "+P+" C "+C+" "+P+" "+(C+5)+" "+(P+v)+" "+(C+10)+" "+(P+v)+" L "+(C+15)+" "+(P+u)+" L "+(C+20)+" "+(P+v)+" L "+(C+x-10)+" "+(P+v)+" C "+(C+x-10)+" "+(P+v)+" "+(C+x)+" "+(P+g)+" "+(C+x)+" "+P:"M "+C+" "+P+" C "+C+" "+P+" "+(C+5)+" "+(P+v)+" "+(C+10)+" "+(P+v)+" L "+(C+x-20)+" "+(P+v)+" L "+(C+x-15)+" "+(P+u)+" L "+(C+x-10)+" "+(P+v)+" L "+(C+x-10)+" "+(P+v)+" C "+(C+x-10)+" "+(P+v)+" "+(C+x)+" "+(P+g)+" "+(C+x)+" "+P}return h},e.prototype.renderYAxisMultiLevelLabels=function(e,r,o,n){var a,s,l,h,c,d,p,u,g,y,m=this,v="Outside"===e.labelPosition,f=(e.tickPosition===e.labelPosition?e.majorTickLines.height:0)+e.maxLabelSize.width+10,b="",x=e.isInversed,w=e.opposedPosition,S=v&&t.isNullOrUndefined(e.crossesAt)?e.scrollBarHeight:0;S*=w?1:-1;var C=w&&!v||!w&&v?n.x-e.multiLevelLabelHeight-f-10:n.x+f;this.createClipRect(C+S,n.y-e.majorTickLines.width,n.height+2*e.majorTickLines.width,e.multiLevelLabelHeight+10,this.chart.element.id+"_YAxis_Clippath_"+r,this.chart.element.id+"YAxisMultiLevelLabel"+r),e.multiLevelLabels.map(function(t,o){m.labelElement=m.chart.renderer.createGroup({id:m.chart.element.id+r+"_MultiLevelLabel"+o}),p=0,t.categories.map(function(C,P){if(b="",g="string"==typeof C.end?Number(new Date(C.end)):C.end,u="string"==typeof C.start?Number(new Date(C.start)):C.start,h=z(u,e)*n.height,c=z(g,e)*n.height,c=x?[h,h=c][0]:c,!(d=m.triggerMultiLabelRender(e,C.text,t.textStyle,t.alignment,C.customAttributes)).cancel){a=i.measureText(d.text,d.textStyle),y=c-h,s=n.x-f-m.yAxisPrevHeight[o]-m.yAxisMultiLabelHeight[o]/2-5,l=n.height+n.y-h-y/2,s=w?v?n.x+f+5+m.yAxisMultiLabelHeight[o]/2+m.yAxisPrevHeight[o]+S:n.x-f-m.yAxisMultiLabelHeight[o]/2-m.yAxisPrevHeight[o]-5:v?s+S:n.x+f+5+m.yAxisMultiLabelHeight[o]/2+m.yAxisPrevHeight[o],"Center"===d.alignment?l+=a.height/4:"Far"===d.alignment?l+=y/2-a.height/2:l=l-y/2+a.height,s="CurlyBrace"===t.border.type?!w&&v||w&&!v?s-10:s+10:s;var L=new i.TextOption(m.chart.element.id+r+"_Axis_MultiLevelLabel_Level_"+o+"_Text_"+P,s,l,"middle",d.text);L.text="Trim"===t.overflow?Ie(null===C.maximumTextWidth?m.yAxisMultiLabelHeight[o]:C.maximumTextWidth,d.text,d.textStyle):L.text,Ve(m.chart.renderer,L,d.textStyle,d.textStyle.color||m.chart.themeStyle.axisLabel,m.labelElement,m.chart.redraw,!0,null,null,null,null,null,null,m.chart.enableCanvas),t.border.width>0&&"WithoutBorder"!==t.border.type&&""!==(b=m.renderYAxisLabelBorder(o,y,e,c,f,h,a,L,n,d.alignment,b,v,w,p))&&(m.createBorderElement(o,r,e,b,p),p++),m.chart.enableCanvas||m.multiElements.appendChild(m.labelElement)}})}),this.chart.enableCanvas||o.appendChild(this.multiElements)},e.prototype.renderYAxisLabelBorder=function(e,i,r,o,n,a,s,l,h,c,d,p,u,g){var y,m,v=o-a,f=10,b=r.multiLevelLabels[e],x=b.categories[g].type,w=h.y+h.height-o,S=p&&t.isNullOrUndefined(r.crossesAt)?r.scrollBarHeight:0;S*=u?1:-1;var C=this.yAxisMultiLabelHeight[e]+f,P=(!u&&p||u&&!p?h.x-n-this.yAxisPrevHeight[e]:h.x+n+this.yAxisPrevHeight[e])+S,L=x||b.border.type;switch(L){case"WithoutTopandBottomBorder":case"Rectangle":case"WithoutTopBorder":d+="M "+P+" "+w+" L "+(P+(C=!u&&p||u&&!p?-C:C))+" "+w+" M "+P+" "+(w+v)+" L "+(P+C)+" "+(w+v),d+="WithoutTopandBottomBorder"!==L?" L "+(P+C)+" "+w+" ":" ",d+="Rectangle"===L?"M "+P+" "+(w+v)+"L "+P+" "+w+" ":" ";break;case"Brace":d+="M "+P+" "+w+" L "+(P-(C=!u&&p||u&&!p?C:-C)/2)+" "+w+" L "+(P-C/2)+" "+(l.y-s.height/2-4)+" M "+(P-C/2)+" "+(l.y+s.height/4+2)+" L "+(P-C/2)+" "+(w+v)+" L "+P+" "+(w+v);break;case"CurlyBrace":!u&&p||u&&!p?(f=-10,y=-15,m=-5):(f=10,y=15,m=5),d+="Center"===c?"M "+P+" "+w+" C "+P+" "+w+" "+(P+f)+" "+w+" "+(P+f)+" "+(w+10)+" L "+(P+f)+" "+(w+(v-10)/2)+" L "+(P+y)+" "+(w+(v-10)/2+5)+" L "+(P+f)+" "+(w+(v-10)/2+10)+" L "+(P+f)+" "+(w+(v-10))+" C "+(P+f)+" "+(w+(v-10))+" "+(P+m)+" "+(w+v)+" "+P+" "+(w+v):"Far"===c?"M "+P+" "+w+" C "+P+" "+w+" "+(P+f)+" "+w+" "+(P+f)+" "+(w+10)+" L "+(P+f)+" "+(w+v-20)+" L "+(P+y)+" "+(w+(v-15))+" L "+(P+f)+" "+(w+(v-10))+" L "+(P+f)+" "+(w+(v-10))+" C "+(P+f)+" "+(w+(v-10))+" "+(P+f)+" "+(w+v)+" "+P+" "+(w+v):"M "+P+" "+w+" C "+P+" "+w+" "+(P+f)+" "+w+" "+(P+f)+" "+(w+10)+" L "+(P+y)+" "+(w+15)+" L "+(P+f)+" "+(w+20)+" L "+(P+f)+" "+(w+(v-10))+" C "+(P+f)+" "+(w+(v-10))+" "+(P+m)+" "+(w+v)+" "+P+" "+(w+v)}return d},e.prototype.createClipRect=function(e,t,i,r,o,n){this.multiElements=this.chart.renderer.createGroup({id:n,"clip-path":"url(#"+o+")"}),this.chart.enableCanvas||this.multiElements.appendChild(K(this.chart.redraw,{id:o,x:e,y:t,width:r,height:i,fill:"white","stroke-width":1,stroke:"Gray"},this.chart.renderer))},e.prototype.createBorderElement=function(e,t,r,o,n){var a=o,s=this.chart.renderer.drawPath(new i.PathOption(this.chart.element.id+t+"_Axis_MultiLevelLabel_Rect_"+e+"_"+n,"Transparent",r.multiLevelLabels[e].border.width,r.multiLevelLabels[e].border.color||this.chart.themeStyle.axisLine,1,"",o));s.setAttribute("style","pointer-events: none"),be(this.chart.enableCanvas,this.labelElement,s,this.chart.redraw,!0,"x","y",null,a)},e.prototype.triggerMultiLabelRender=function(e,t,i,r,o){var n={cancel:!1,name:"axisMultiLabelRender",axis:e,text:t,textStyle:i,alignment:r,customAttributes:o};return this.chart.trigger("axisMultiLabelRender",n),n},e.prototype.MultiLevelLabelClick=function(e,t){var i=parseInt(e.substr(0,1),10),r=parseInt(e.substr(7),10),o=this.chart.axisCollections[t],n=o.multiLevelLabels[i].categories,a=n[r].text,s=n[r].start,l=n[r].end,h={axis:o,level:i,text:a,customAttributes:n[r].customAttributes,start:s,end:l,name:"multiLevelLabelClick",cancel:!1};return this.chart.trigger("multiLevelLabelClick",h),h},e.prototype.click=function(e){var t,i,r,o=e.target.id,n="_Axis_MultiLevelLabel_Level_";o.indexOf(n)>-1&&(t=o.split(n)[1],i=o.split(n)[0],r=parseInt(i.charAt(i.length-1),10),this.MultiLevelLabelClick(t,r))},e.prototype.getModuleName=function(){return"MultiLevelLabel"},e.prototype.destroy=function(){},e}(),Dn=function(){function e(e){this.chartId=e.element.id+"_"}return e.prototype.renderElements=function(e,t){var i=t.createGroup({id:this.chartId+"scrollBar_"+e.axis.name,transform:"translate("+(e.isVertical&&e.axis.isInversed?e.height:e.axis.isInversed?e.width:"0")+","+(e.isVertical&&e.axis.isInversed?"0":e.axis.isInversed?e.height:e.isVertical?e.width:"0")+") rotate("+(e.isVertical&&e.axis.isInversed?"90":e.isVertical?"270":e.axis.isInversed?"180":"0")+")"}),r=t.createGroup({id:this.chartId+"scrollBar_backRect_"+e.axis.name}),o=t.createGroup({id:this.chartId+"scrollBar_thumb_"+e.axis.name,transform:"translate(0,0)"});return this.backRect(e,t,r),this.thumb(e,t,o),this.renderCircle(e,t,o),this.arrows(e,t,o),this.thumbGrip(e,t,o),i.appendChild(r),i.appendChild(o),i},e.prototype.backRect=function(e,t,r){var o=e.scrollbarThemeStyle,n=t.drawRectangle(new Di(this.chartId+"scrollBarBackRect_"+e.axis.name,o.backRect,{width:1,color:o.backRect},1,new i.Rect(0,0,e.width,e.height),0,0));r.appendChild(n)},e.prototype.arrows=function(e,t,r){var o=e.scrollbarThemeStyle,n=new i.PathOption(this.chartId+"scrollBar_leftArrow_"+e.axis.name,o.arrow,1,o.arrow,1,"","");this.leftArrowEle=t.drawPath(n),n.id=this.chartId+"scrollBar_rightArrow_"+e.axis.name,this.rightArrowEle=t.drawPath(n),this.setArrowDirection(this.thumbRectX,this.thumbRectWidth,e.height),r.appendChild(this.leftArrowEle),r.appendChild(this.rightArrowEle)},e.prototype.setArrowDirection=function(e,t,i){var r="M "+(e-4+1)+" "+i/2+" L "+(e-4+6)+" 11 L "+(e-4+6)+" 5 Z",o="M "+(e+t+4-.5)+" "+i/2+" L "+(e+t+4-6)+" 11.5 L "+(e+t+4-6)+" 4.5 Z";this.leftArrowEle.setAttribute("d",r),this.rightArrowEle.setAttribute("d",o)},e.prototype.thumb=function(e,t,r){e.startX=this.thumbRectX;var o=e.scrollbarThemeStyle;this.slider=t.drawRectangle(new Di(this.chartId+"scrollBarThumb_"+e.axis.name,o.thumb,{width:1,color:""},1,new i.Rect(this.thumbRectX,0,this.thumbRectWidth,e.height))),r.appendChild(this.slider)},e.prototype.renderCircle=function(e,t,i){var r=e.scrollbarThemeStyle,o=new Ni(this.chartId+"scrollBar_leftCircle_"+e.axis.name,r.circle,{width:1,color:r.circle},1,this.thumbRectX,e.height/2,8),n=t.createDefs(),a=t.createGroup({id:this.chartId+e.axis.name+"_thumb_shadow"});n.innerHTML='<filter x="-25.0%" y="-20.0%" width="150.0%" height="150.0%" filterUnits="objectBoundingBox"id="scrollbar_shadow"><feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset><feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur><feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix></filter>',a.innerHTML='<use fill="black" fill-opacity="1" filter="url(#scrollbar_shadow)" xlink:href="#'+this.chartId+"scrollBar_leftCircle_"+e.axis.name+'"></use><use fill="black" fill-opacity="1" filter="url(#scrollbar_shadow)" xlink:href="#'+this.chartId+"scrollBar_rightCircle_"+e.axis.name+'"></use>',this.leftCircleEle=t.drawCircle(o),o.id=this.chartId+"scrollBar_rightCircle_"+e.axis.name,o.cx=this.thumbRectX+this.thumbRectWidth,this.rightCircleEle=t.drawCircle(o),i.appendChild(n),i.appendChild(this.leftCircleEle),i.appendChild(this.rightCircleEle),i.appendChild(a)},e.prototype.thumbGrip=function(e,t,i){var r=0,o=0,n=e.scrollbarThemeStyle,a=new Ni(this.chartId+"scrollBar_gripCircle0_"+e.axis.name,n.grip,{width:1,color:n.grip},1,0,0,1);this.gripCircle=t.createGroup({id:this.chartId+"scrollBar_gripCircle_"+e.axis.name,transform:"translate("+(this.thumbRectX+this.thumbRectWidth/2+5*(e.isVertical?1:-1))+","+(e.isVertical?"10":"5")+") rotate("+(e.isVertical?"180":"0")+")"});for(var s=1;s<=6;s++)a.id=this.chartId+"scrollBar_gripCircle"+s+"_"+e.axis.name,a.cx=r,a.cy=o,this.gripCircle.appendChild(t.drawCircle(a)),r=3===s?0:r+5,o=s>=3?5:0;i.appendChild(this.gripCircle)},e}(),Bn=function(){function e(e,i){this.scrollRange={max:null,min:null,interval:null,delta:null},this.component=e,this.elements=[],this.scrollElements=new Dn(e),this.axis=i,this.mouseMoveListener=this.scrollMouseMove.bind(this),this.mouseUpListener=this.scrollMouseUp.bind(this),this.animateDuration=500,this.isPointer=t.Browser.isPointer,this.browserName=t.Browser.info.name}return e.prototype.getMouseXY=function(e){var t,i,r;e.type.indexOf("touch")>-1?(t=(r=e).changedTouches[0].clientX,i=r.changedTouches[0].clientY):(t=e.clientX,i=e.clientY);var o=he(this.component.element.id+"_scrollBar_svg"+this.axis.name).getBoundingClientRect();this.mouseX=t-Math.max(o.left,0),this.mouseY=i-Math.max(o.top,0)},e.prototype.wireEvents=function(e){t.EventHandler.add(e,t.Browser.touchStartEvent,this.scrollMouseDown,this),t.EventHandler.add(e,t.Browser.touchMoveEvent,this.scrollMouseMove,this),t.EventHandler.add(e,t.Browser.touchEndEvent,this.scrollMouseUp,this),t.EventHandler.add(e,"mousewheel",this.scrollMouseWheel,this),window.addEventListener("mousemove",this.mouseMoveListener,!1),window.addEventListener("mouseup",this.mouseUpListener,!1)},e.prototype.unWireEvents=function(e){t.EventHandler.remove(e,t.Browser.touchStartEvent,this.scrollMouseDown),t.EventHandler.remove(e,t.Browser.touchMoveEvent,this.scrollMouseMove),t.EventHandler.remove(e,t.Browser.touchEndEvent,this.scrollMouseUp),t.EventHandler.remove(e,"mousewheel",this.scrollMouseWheel),window.removeEventListener("mousemove",this.mouseMoveListener,!1),window.removeEventListener("mouseup",this.mouseUpListener,!1)},e.prototype.scrollMouseDown=function(e){var t=e.target.id,i=this.scrollElements;if(this.getMouseXY(e),this.isResizeLeft=this.isExist(t,"_leftCircle_")||this.isExist(t,"_leftArrow_"),this.isResizeRight=this.isExist(t,"_rightCircle_")||this.isExist(t,"_rightArrow_"),this.previousXY=this.isVertical&&this.axis.isInversed?this.mouseY:this.isVertical?this.width-this.mouseY:this.axis.isInversed?this.width-this.mouseX:this.mouseX,this.previousWidth=i.thumbRectWidth,this.previousRectX=i.thumbRectX,this.startZoomPosition=this.axis.zoomPosition,this.startZoomFactor=this.axis.zoomFactor,this.startRange=this.axis.visibleRange,this.scrollStarted=!0,this.component.trigger("scrollStart",this.getArgs("scrollStart")),this.isExist(t,"scrollBarThumb_")||this.isExist(t,"gripCircle"))this.isThumbDrag=!0,this.svgObject.style.cursor="-webkit-grabbing";else if(this.isExist(t,"scrollBarBackRect_")){var r=this.moveLength(this.previousXY,this.previousRectX);if(i.thumbRectX=this.isWithIn(r)?r:i.thumbRectX,this.positionThumb(i.thumbRectX,i.thumbRectWidth),this.setZoomFactorPosition(i.thumbRectX,i.thumbRectWidth,!1),this.isLazyLoad){var o=i.thumbRectX>this.previousRectX?"RightMove":"LeftMove",n=this.calculateLazyRange(i.thumbRectX,i.thumbRectWidth,o);n&&this.component.trigger("scrollEnd",n)}}""===this.component.element.style.height&&(this.isCustomHeight=!0,this.component.element.style.height=this.component.availableSize.height+"px")},e.prototype.isExist=function(e,t){return e.indexOf(t)>-1},e.prototype.isWithIn=function(e){return e-8>=0&&e+this.scrollElements.thumbRectWidth+8<=this.width},e.prototype.moveLength=function(e,t,i){void 0===i&&(i=8);var r=.1*(this.width-2*i);return r=e<t?t-(t-r>i?r:i):t+(t+this.scrollElements.thumbRectWidth+r<this.width-i?r:i)},e.prototype.setZoomFactorPosition=function(e,t,i){void 0===i&&(i=!0),this.isScrollUI=!0;var r=this.axis,o=e+t+8+1;this.zoomPosition=(e-(e-8.5<=0?8.5:0))/(this.isVertical?r.rect.height:this.width),this.zoomFactor=(t+(o>=this.width?9:0))/(this.isVertical?r.rect.height:this.width),r.zoomPosition=this.zoomPosition<0?0:this.zoomPosition>.9?1:this.zoomPosition,r.zoomFactor=i?this.zoomFactor:r.zoomFactor},e.prototype.scrollMouseMove=function(e){var t=e.target,i=this.scrollElements;this.getMouseXY(e),this.setCursor(t),this.setTheme(t);var r,o=this.isVertical&&this.axis.isInversed?this.width-this.mouseY:this.isVertical?this.mouseY:this.mouseX,n=this.axis.visibleRange,a=this.zoomPosition,s=this.zoomFactor,l=this.previousRectX-i.thumbRectX<0?"RightMove":"LeftMove";this.isLazyLoad&&(this.isThumbDrag||this.isResizeLeft||this.isResizeRight)&&(r=this.calculateLazyRange(i.thumbRectX,i.thumbRectWidth,l));var h=r?r.currentRange:null;if(this.isThumbDrag){this.component.isScrolling=this.isThumbDrag,o=this.isVertical||this.axis.isInversed?this.width-o:o;var c=i.thumbRectX+(o-this.previousXY);o>=c+i.thumbRectWidth?this.setCursor(t):this.svgObject.style.cursor="-webkit-grabbing",o>=0&&o<=c+i.thumbRectWidth&&(i.thumbRectX=this.isWithIn(c)?c:i.thumbRectX,this.positionThumb(i.thumbRectX,i.thumbRectWidth),this.previousXY=o,this.setZoomFactorPosition(c,i.thumbRectWidth,!1)),this.component.trigger("scrollChanged",this.getArgs("scrollChanged",n,a,s,h))}else(this.isResizeLeft||this.isResizeRight)&&(this.resizeThumb(),this.component.trigger("scrollChanged",this.getArgs("scrollChanged",n,a,s,h)))},e.prototype.scrollMouseWheel=function(e){var t=he(this.component.element.id+"_scrollBar_svg"+this.axis.name).getBoundingClientRect();this.mouseX=e.clientX-Math.max(t.left,0),this.mouseY=e.clientY-Math.max(t.top,0);var i,r=.5,o=this.scrollElements,n=this.axis,a="mozilla"!==this.browserName||this.isPointer?e.wheelDelta/120>0?1:-1:-e.detail/3>0?1:-1,s=Math.max(Math.max(1/le(n.zoomFactor,0,1),1)+.25*a,1),l=this.axis.visibleRange,h=this.zoomPosition,c=this.zoomFactor;s>=1&&(r=(r="Horizontal"===n.orientation?this.mouseX/n.rect.width:1-this.mouseY/n.rect.height)>1?1:r<0?0:r,this.zoomFactor=1===s?1:le(1/s,0,1),this.zoomPosition=1===s?0:n.zoomPosition+(n.zoomFactor-this.zoomFactor)*r),o.thumbRectX=this.isWithIn(this.zoomPosition*this.width)?this.zoomPosition*this.width:o.thumbRectX,this.isScrollUI=!0,this.positionThumb(o.thumbRectX,o.thumbRectWidth),this.isLazyLoad&&this.setZoomFactorPosition(o.thumbRectX,o.thumbRectWidth),n.zoomFactor=this.zoomFactor,n.zoomPosition=this.zoomPosition,this.isLazyLoad&&(i=this.calculateMouseWheelRange(o.thumbRectX,o.thumbRectWidth))&&i.currentRange.minimum!==i.previousAxisRange.minimum&&i.currentRange.maximum!==i.previousAxisRange.maximum&&(this.component.trigger("scrollEnd",i),this.isScrollEnd=!1),this.isLazyLoad||this.component.trigger("scrollChanged",this.getArgs("scrollChanged",l,h,c))},e.prototype.scrollMouseUp=function(){var e;this.startX=this.scrollElements.thumbRectX;var t=this.startX+this.scrollElements.thumbRectWidth+8+1;if(!this.isResizeLeft&&!this.isResizeRight||this.isLazyLoad||(this.axis.zoomFactor=t>=this.width-1&&this.startX-8.5<=0?1:this.zoomFactor),this.isLazyLoad){var i=this.previousRectX-this.startX;if((i>0||i<0)&&this.isThumbDrag){var r=i<0?"RightMove":"LeftMove";this.startX="RightMove"===r?this.startX+Math.abs(i)<this.width-8?this.startX:this.width-8-this.scrollElements.thumbRectWidth:this.startX+this.scrollElements.thumbRectWidth-Math.abs(i)>8?this.startX:8,(e=this.calculateLazyRange(this.startX,this.scrollElements.thumbRectWidth,r))&&(this.component.trigger("scrollEnd",e),this.scrollStarted=!1)}(this.isResizeLeft||this.isResizeRight)&&(e=this.calculateLazyRange(this.startX,this.scrollElements.thumbRectWidth))&&(this.component.trigger("scrollEnd",e),this.scrollStarted=!1)}this.isThumbDrag=!1,this.isResizeLeft=!1,this.isResizeRight=!1,this.isScrollEnd=!1,this.component.isScrolling=!1,this.scrollStarted&&!this.isLazyLoad&&(this.component.trigger("scrollEnd",this.getArgs("scrollChanged",this.startRange,this.startZoomPosition,this.startZoomFactor)),this.scrollStarted=!1),this.isCustomHeight&&(this.component.element.style.height=null)},e.prototype.calculateMouseWheelRange=function(e,t){var i,r,o,n=this.scrollRange,a=this.getStartEnd(this.previousStart,this.previousEnd,!1);e+t+8<=this.width&&(r=(e-8)/this.width,i=t/this.width);var s=n.min+r*n.delta,l=s+i*n.delta;return l&&(o={axis:this.axis,currentRange:this.getStartEnd(s,l,!0),previousAxisRange:a}),o},e.prototype.calculateLazyRange=function(e,t,i){var r,o,n,a,s,l=t,h=this.scrollRange,c=this.getStartEnd(this.previousStart,this.previousEnd,!1);return this.isResizeRight||"RightMove"===i?(r=((l=this.isResizeRight?l+16:l)+8)/this.width,o="RightMove"===i?(e+8)/this.width:this.axis.zoomPosition,a=(n="RightMove"===i?h.min+o*h.delta:this.previousStart)+r*h.delta):this.isResizeLeft||"LeftMove"===i?(o=(e-8)/this.width,r=l/this.width,n=(n=h.min+o*h.delta)>=h.min?n:h.min,a="LeftMove"===i?n+r*h.delta:this.previousEnd):this.isThumbDrag&&(o="RightMove"===i?(e+8)/this.width:(e-8)/this.width,r=this.scrollElements.thumbRectWidth/this.width,a=(n=(n=h.min+o*h.delta)>=h.min?n:h.min)+r*h.delta),a&&(s={axis:this.component.isBlazor?{}:this.axis,currentRange:this.getStartEnd(n,a,!0),previousAxisRange:c}),s},e.prototype.getStartEnd=function(e,t,i){var r=this.valueType;switch("DateTime"!==r&&"DateTimeCategory"!==r||!i?i&&(this.previousStart=Math.round(e),this.previousEnd=Math.ceil(t)):(this.previousStart=e,this.previousEnd=t),r){case"Double":case"Category":case"Logarithmic":e=Math.round(e),t=Math.ceil(t);break;case"DateTime":case"DateTimeCategory":e=new Date(e),t=new Date(t)}return{minimum:e,maximum:t}},e.prototype.render=function(e){return(this.component.zoomModule||e&&this.axis.scrollbarSettings.enable)&&this.getDefaults(),this.getTheme(),this.removeScrollSvg(),Je(this,this.component.svgRenderer),this.wireEvents(this.svgObject),this.svgObject.appendChild(this.scrollElements.renderElements(this,this.component.svgRenderer)),this.svgObject},e.prototype.getTheme=function(){this.scrollbarThemeStyle=d(this.component.theme)},e.prototype.removeScrollSvg=function(){document.getElementById(this.component.element.id+"_scrollBar_svg"+this.axis.name)&&t.remove(document.getElementById(this.component.element.id+"_scrollBar_svg"+this.axis.name))},e.prototype.setCursor=function(e){var t=e.id;this.svgObject.style.cursor=t.indexOf("scrollBarThumb_")>-1||t.indexOf("_gripCircle")>-1?"-webkit-grab":t.indexOf("Circle_")>-1||t.indexOf("Arrow_")>-1?this.isVertical?"ns-resize":"ew-resize":"auto"},e.prototype.setTheme=function(e){var t=e.id,i=t.indexOf("_leftCircle_")>-1||t.indexOf("_leftArrow_")>-1,r=t.indexOf("_rightCircle_")>-1||t.indexOf("_rightArrow_")>-1,o=this.scrollbarThemeStyle,n=this.scrollElements.leftArrowEle,a=this.scrollElements.rightArrowEle,s=this.scrollElements.leftCircleEle,l=this.scrollElements.rightCircleEle,h=this.isCurrentAxis(e,n);s.style.fill=i&&h?o.circleHover:o.circle,l.style.fill=r&&h?o.circleHover:o.circle,s.style.stroke=i&&h?o.circleHover:o.circle,l.style.stroke=r&&h?o.circleHover:o.circle,"HighContrastLight"===this.component.theme&&(n.style.fill=i&&h?o.arrowHover:o.arrow,n.style.stroke=i&&h?o.arrowHover:o.arrow,a.style.fill=r&&h?o.arrowHover:o.arrow,a.style.stroke=r&&h?o.arrowHover:o.arrow,s.style.stroke=i&&h?o.circleHover:o.circle,l.style.stroke=r&&h?o.circleHover:o.circle)},e.prototype.isCurrentAxis=function(e,t){return e.id.split("_")[2]===t.id.split("_")[2]},e.prototype.resizeThumb=function(){var e,t=this.previousRectX,i=this.isVertical&&this.axis.isInversed?this.mouseY:this.isVertical?this.width-this.mouseY:this.axis.isInversed?this.width-this.mouseX:this.mouseX,r=Math.abs(this.previousXY-i);if(this.isResizeLeft&&i>=0){var o=t+(i>this.previousXY?r:-r);e=o-8>=0?this.previousWidth+(i>this.previousXY?-r:r):this.previousWidth,o=o-8>=0?o:t,e>=40&&i<o+e&&(this.scrollElements.thumbRectX=this.previousRectX=o,this.scrollElements.thumbRectWidth=this.previousWidth=e,this.previousXY=i,this.positionThumb(o,e),this.setZoomFactorPosition(o,e))}else this.isResizeRight&&(e=i>=40+this.scrollElements.thumbRectX&&i<=this.width-8?i-this.scrollElements.thumbRectX:this.previousWidth,this.scrollElements.thumbRectWidth=this.previousWidth=e,this.previousXY=i,this.positionThumb(this.startX,e),this.setZoomFactorPosition(this.startX,e),this.isLazyLoad||this.setZoomFactorPosition(this.startX,e))},e.prototype.positionThumb=function(e,t){var i=this.scrollElements;i.slider.setAttribute("x",e.toString()),i.slider.setAttribute("width",t.toString()),i.leftCircleEle.setAttribute("cx",e.toString()),i.rightCircleEle.setAttribute("cx",(e+t).toString()),i.setArrowDirection(e,t,this.height),i.gripCircle.setAttribute("transform","translate("+(e+t/2+5*(this.isVertical?1:-1))+","+(this.isVertical?"10":"5")+") rotate("+(this.isVertical?"180":"0")+")")},e.prototype.getDefaults=function(){var e=this.axis;this.axis.scrollbarSettings.enable&&(this.isLazyLoad=!0,this.getLazyDefaults(e)),this.isVertical="Vertical"===e.orientation,this.zoomFactor=this.isLazyLoad?this.zoomFactor:e.zoomFactor,this.zoomPosition=this.isLazyLoad?this.zoomPosition:e.zoomPosition;var t=this.zoomFactor*(this.isVertical?e.rect.height:e.rect.width);t=t>40?t:40,this.scrollX=e.rect.x,this.scrollY=e.rect.y,this.width=this.isVertical?e.rect.height:e.rect.width,this.height=16;var i=this.zoomPosition*(this.isVertical?e.rect.height:this.width),r=this.width-40-8;this.scrollElements.thumbRectX=i>r?r:i<8?8:i,this.scrollElements.thumbRectWidth=t+this.scrollElements.thumbRectX<this.width-16?t:this.width-this.scrollElements.thumbRectX-8},e.prototype.getLazyDefaults=function(e){var t,i,r=e.valueType,o=e.scrollbarSettings,n=e.scrollbarSettings.range,a=e.visibleRange,s=e.scrollbarSettings.pointsLength;this.valueType=r=o.range.minimum&&o.range.maximum||!o.pointsLength?r:"Double";var l={skeleton:"full",type:"dateTime"},h=this.component.intl.getDateParser(l),c=this.component.intl.getDateFormat(l);switch(r){case"Double":case"Category":case"Logarithmic":t=n.minimum?n.minimum:s?0:a.min,i=n.maximum?n.maximum:s?s-1:a.max;break;case"DateTime":case"DateTimeCategory":t=n.minimum?Date.parse(h(c(n.minimum))):a.min,i=n.maximum?Date.parse(h(c(n.maximum))):a.max}t=Math.min(t,a.min),i=Math.max(i,a.max);var d=(a.max-a.min)/(i-t),p=(a.min-t)/(i-t);this.zoomFactor=n.minimum||n.maximum?d:this.axis.maxPointLength/e.scrollbarSettings.pointsLength,this.zoomPosition=n.minimum||n.maximum?p:e.zoomPosition,this.scrollRange.min=t,this.scrollRange.max=i,this.scrollRange.delta=i-t,this.previousStart=a.min,this.previousEnd=a.max},e.prototype.getLogRange=function(e){var t=e.scrollbarSettings.range,i=v(t.minimum,e.logBase),r=v(t.maximum,e.logBase);return i=isFinite(i)?i:t.minimum,r=isFinite(i)?r:t.maximum,{minimum:Math.floor(i/1),maximum:Math.ceil(r/1)}},e.prototype.injectTo=function(t,i){t.zoomingScrollBar=new e(i,t)},e.prototype.destroy=function(){var e=this;this.axes?this.axes.map(function(e){e.zoomingScrollBar.destroy()}):(this.elements.map(function(i){e.unWireEvents(i),t.remove(i.firstChild)}),this.elements=[])},e.prototype.getModuleName=function(){return"ScrollBar"},e.prototype.getArgs=function(e,t,i,r,o){return{axis:this.component.isBlazor?{}:this.axis,name:e,range:this.axis.visibleRange,zoomFactor:this.axis.zoomFactor,zoomPosition:this.axis.zoomPosition,previousRange:t,previousZoomFactor:r,previousZoomPosition:i,currentRange:o}},e}(),Nn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.paretoAxes=[],t}return Nn(t,e),t.prototype.initSeries=function(e,t){var i=new nr(t,"series",e.properties,!0);i.name="Pareto",i.yAxisName=e.yAxisName+"_CumulativeAxis",i.category="Pareto",e.category="Pareto",i.type="Line",i.interior=t.themeStyle.errorBar,t.visibleSeries.push(i),this.initAxis(e,i,t)},t.prototype.initAxis=function(e,t,i){if(!this.paretoAxes.some(function(e){return e.name===t.yAxisName})){var r=e.yAxisName?i.axes.filter(function(t){return t.name===e.yAxisName})[0]:i.primaryYAxis,o=new Ti(i,"axis",{name:t.yAxisName,majorGridLines:{width:0},majorTickLines:r.majorTickLines,lineStyle:r.lineStyle,minimum:0,maximum:100,rowIndex:r.rowIndex,opposedPosition:!0,labelFormat:"{value}%"});this.paretoAxes.push(o)}},t.prototype.render=function(e){e.chart.columnSeriesModule.render(e)},t.prototype.performCumulativeCalculation=function(e,t){for(var i=e,r=0,o=0,n=i.length,a=0;a<n;a++)r+=i[a][t.yName];for(a=0;a<n;a++)o+=i[a][t.yName],i[a][t.yName]=Math.round(o/r*100);return i},t.prototype.doAnimation=function(e){this.animate(e)},t.prototype.getModuleName=function(){return"ParetoSeries"},t.prototype.destroy=function(){},t}(jr),Vn=function(){function e(e){this.chart=e}return e.prototype.export=function(e,t,i,r,o,n,a,s,l){var h=new xr(this.chart);r=r||[this.chart];var c={cancel:!1,name:"beforeExport",width:o,height:n};this.chart.trigger("beforeExport",c),c.cancel||h.export(e,t,i,r,o=c.width,n=c.height,a,s,l)},e.prototype.getDataUrl=function(e){return new xr(e).getDataUrl(e)},e.prototype.getModuleName=function(){return"Export"},e.prototype.destroy=function(){},e}(),jn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hn=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Xn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return jn(i,e),Hn([t.Property(null)],i.prototype,"content",void 0),Hn([t.Property("0")],i.prototype,"x",void 0),Hn([t.Property("0")],i.prototype,"y",void 0),Hn([t.Property("Pixel")],i.prototype,"coordinateUnits",void 0),Hn([t.Property("Chart")],i.prototype,"region",void 0),Hn([t.Property("Middle")],i.prototype,"verticalAlignment",void 0),Hn([t.Property("Center")],i.prototype,"horizontalAlignment",void 0),Hn([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),Yn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return jn(i,e),Hn([t.Property(!1)],i.prototype,"visible",void 0),Hn([t.Property(!0)],i.prototype,"showZero",void 0),Hn([t.Property(null)],i.prototype,"name",void 0),Hn([t.Property("transparent")],i.prototype,"fill",void 0),Hn([t.Property("Inside")],i.prototype,"position",void 0),Hn([t.Property(5)],i.prototype,"rx",void 0),Hn([t.Property(5)],i.prototype,"ry",void 0),Hn([t.Property(0)],i.prototype,"angle",void 0),Hn([t.Property(!1)],i.prototype,"enableRotation",void 0),Hn([t.Complex({width:null,color:null},Yt)],i.prototype,"border",void 0),Hn([t.Complex({size:"11px",color:"",fontStyle:"Normal",fontWeight:"Normal",fontFamily:"Segoe UI"},Xt)],i.prototype,"font",void 0),Hn([t.Complex({},Ht)],i.prototype,"connectorStyle",void 0),Hn([t.Property(null)],i.prototype,"template",void 0),i}(t.ChildProperty),Gn=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return jn(i,e),Hn([t.Property("50%")],i.prototype,"x",void 0),Hn([t.Property("50%")],i.prototype,"y",void 0),i}(t.ChildProperty),Wn=function(){function e(){this.visible=!0,this.symbolLocation=null,this.region=null,this.labelRegion=null,this.labelVisible=!0,this.regions=null,this.isExplode=!1,this.isClubbed=!1,this.isSliced=!1,this.argsData=null,this.isLabelUpdated=null,this.initialLabelRegion=null}return e}(),Un=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.points=[],t.clubbedPoints=[],t.sumOfPoints=0,t.isRectSeries=!0,t.clipRect=new i.Rect(0,0,0,0),t.category="Series",t.rightSidePoints=[],t.leftSidePoints=[],t}return jn(o,e),o.prototype.refreshDataManager=function(e,i){var o=this,n=this.dataSource||e.dataSource;if(!(n instanceof r.DataManager)&&t.isNullOrUndefined(this.query))return void this.dataManagerSuccess({result:n,count:n.length},e,i);this.dataModule.getData(this.dataModule.generateQuery().requiresCount()).then(function(t){return o.dataManagerSuccess(t,e)})},o.prototype.dataManagerSuccess=function(e,t,i){void 0===i&&(i=!0);var r={name:"seriesRender",series:this,data:e.result};t.allowServerDataBinding=!1,t.trigger("seriesRender",r),this.resultData=""!==e.result?e.result:[],t.isBlazor||i||this.getPoints(this.resultData,t),(++t.seriesCounts===t.visibleSeries.length&&i||window.Blazor&&!i&&1===t.seriesCounts)&&(this.getPoints(this.resultData,t),t.refreshChart())},o.prototype.getPoints=function(e,i){var r=Object.keys(e).length;if(this.sumOfPoints=0,0===r)return null;this.findSumOfPoints(e),this.points=[],this.clubbedPoints=[],this.sumOfClub=0;for(var o,n=this.palettes.length?this.palettes:h(i.theme),a=Be(this.groupTo,this.sumOfPoints),s=0;s<r;s++){(o=this.setPoints(e,s,n,i)).y;this.isClub(o,a,s)?(o.index=this.clubbedPoints.length,o.isExplode=!0,this.clubbedPoints.push(o),o.isSliced=!0):(t.isNullOrUndefined(o.y)&&(o.visible=!1),this.pushPoints(o,n))}if(this.lastGroupTo=this.groupTo,this.sumOfClub>0){var l=this.generateClubPoint();this.pushPoints(l,n);var c=this.points.length-1;this.clubbedPoints.map(function(e){e.index+=c,e.color=l.color})}this.clubbedPoints.length&&this.explode&&"Pie"===this.type&&(this.explodeAll||this.points[this.points.length-1].index===this.explodeIndex)&&(this.points.splice(this.points.length-1,1),this.points=this.points.concat(this.clubbedPoints))},o.prototype.generateClubPoint=function(){var e=new Wn;return e.isClubbed=!0,e.x="Others",e.y=this.sumOfClub,e.text=e.originalText=e.x+": "+this.sumOfClub,e.sliceRadius="80%",e},o.prototype.pushPoints=function(e,t){e.index=this.points.length,e.isExplode=this.explodeAll||e.index===this.explodeIndex,e.color=e.color||t[e.index%t.length],this.points.push(e)},o.prototype.isClub=function(e,i,r){if(!t.isNullOrUndefined(i)){if("Value"===this.groupMode&&Math.abs(e.y)<=i)return this.sumOfClub+=Math.abs(e.y),!0;if("Point"===this.groupMode&&r>=i)return this.sumOfClub+=Math.abs(e.y),!0}return!1},o.prototype.findSumOfPoints=function(e){for(var i=Object.keys(e).length,r=0;r<i;r++)t.isNullOrUndefined(e[r])||t.isNullOrUndefined(e[r][this.yName])||isNaN(e[r][this.yName])||(this.sumOfPoints+=Math.abs(e[r][this.yName]))},o.prototype.setPoints=function(e,i,r,o){var n=new Wn;return n.x=t.getValue(this.xName,e[i]),n.y=t.getValue(this.yName,e[i]),n.percentage=+(n.y/this.sumOfPoints*100).toFixed(2),n.legendImageUrl=t.getValue(this.legendImageUrl,e[i]),n.color=t.getValue(this.pointColorMapping,e[i]),n.text=n.originalText=t.getValue(this.dataLabel.name||"",e[i]),n.tooltip=t.getValue(this.tooltipMappingName||"",e[i]),n.sliceRadius=t.getValue(this.radius,e[i]),n.sliceRadius=t.isNullOrUndefined(n.sliceRadius)?"80%":n.sliceRadius,n.separatorY=o.intl.formatNumber(n.y,{useGrouping:o.useGroupingSeparator}),this.setAccEmptyPoint(n,i,e,r),n},o.prototype.renderSeries=function(e,t){var i=t?he(e.element.id+"_Series_"+this.index):e.renderer.createGroup({id:e.element.id+"_Series_"+this.index});this.renderPoints(e,i,t);var r;e.accumulationDataLabelModule&&this.dataLabel.visible&&((r=e.renderer.createGroup({id:e.element.id+"_datalabel_Series_"+this.index})).style.visibility=this.animation.enable&&e.animateSeries&&"Pie"===this.type?"hidden":"visible",this.renderDataLabel(e,r,t)),"Pie"===this.type&&(this.findMaxBounds(this.labelBound,this.accumulationBound),e.pieSeriesModule.animateSeries(e,this.animation,this,i)),e.accumulationLegendModule&&(this.labelBound.x-=e.explodeDistance,this.labelBound.y-=e.explodeDistance,this.labelBound.height+=e.explodeDistance-this.labelBound.y,this.labelBound.width+=e.explodeDistance-this.labelBound.x)},o.prototype.renderPoints=function(e,t,r){for(var o,n=e.element.id+"_Series_"+this.index+"_Point_",a=0,s=this.points;a<s.length;a++){var l=s[a],h={cancel:!1,name:"pointRender",series:this,point:l,fill:l.color,border:this.isEmpty(l)?{width:this.emptyPointSettings.border.width,color:this.emptyPointSettings.border.color}:{width:this.border.width,color:this.border.color}};e.trigger("pointRender",h),l.color=h.fill,o=new i.PathOption(n+l.index,l.color,h.border.width||1,h.border.color||l.color,this.opacity,"",""),e[G(this.type)+"SeriesModule"].renderPoint(l,this,e,o,t,r)}be(!1,e.getSeriesElement(),t,r)},o.prototype.renderDataLabel=function(e,i,r){e.accumulationDataLabelModule.findAreaRect();var o=t.createElement("div",{id:e.element.id+"_Series_0_DataLabelCollections"});this.leftSidePoints=[],this.rightSidePoints=[];for(var n=[],a=[],s=0,l=this.points;s<l.length;s++){var h=l[s];h.visible&&(this.dataLabel.showZero||!this.dataLabel.showZero&&(0!==h.y||0===h.y&&"Zero"===this.emptyPointSettings.mode))&&e.accumulationDataLabelModule.renderDataLabel(h,this.dataLabel,i,this.points,this.index,o,r),h.midAngle>=90&&h.midAngle<=270?this.leftSidePoints.push(h):h.midAngle>=0&&h.midAngle<=90?a.push(h):n.push(h)}if(n.sort(function(e,t){return e.midAngle-t.midAngle}),a.sort(function(e,t){return e.midAngle-t.midAngle}),this.leftSidePoints.sort(function(e,t){return e.midAngle-t.midAngle}),this.rightSidePoints=n.concat(a),e.accumulationDataLabelModule.drawDataLabels(this,this.dataLabel,i,o,r),null!==this.dataLabel.template&&o.childElementCount){var c=e.accumulationDataLabelModule.drawDataLabels.bind(e.accumulationDataLabelModule,this,this.dataLabel,i,o,r);e.isReact&&e.renderReactTemplates(c),be(!1,he(e.element.id+"_Secondary_Element"),o,r)}be(!1,e.getSeriesElement(),i,r)},o.prototype.findMaxBounds=function(e,t){e.x=t.x<e.x?t.x:e.x,e.y=t.y<e.y?t.y:e.y,e.height=t.y+t.height>e.height?t.y+t.height:e.height,e.width=t.x+t.width>e.width?t.x+t.width:e.width},o.prototype.setAccEmptyPoint=function(e,i,r,o){if(!t.isNullOrUndefined(e.y)&&!isNaN(e.y))return null;switch(e.color=this.emptyPointSettings.fill||e.color,this.emptyPointSettings.mode){case"Zero":e.y=0,e.visible=!0;break;case"Average":var n=r[i-1]?r[i-1][this.yName]||0:0,a=r[i+1]?r[i+1][this.yName]||0:0;e.y=(Math.abs(n)+Math.abs(a))/2,this.sumOfPoints+=e.y,e.visible=!0;break;default:e.visible=!1}},o.prototype.isEmpty=function(e){return e.color===this.emptyPointSettings.fill},Hn([t.Property("")],o.prototype,"dataSource",void 0),Hn([t.Property()],o.prototype,"query",void 0),Hn([t.Property("")],o.prototype,"xName",void 0),Hn([t.Property("")],o.prototype,"name",void 0),Hn([t.Property("")],o.prototype,"tooltipMappingName",void 0),Hn([t.Property("")],o.prototype,"yName",void 0),Hn([t.Property(!0)],o.prototype,"visible",void 0),Hn([t.Complex({color:null,width:0},Yt)],o.prototype,"border",void 0),Hn([t.Complex(null,qt)],o.prototype,"animation",void 0),Hn([t.Property("SeriesType")],o.prototype,"legendShape",void 0),Hn([t.Property("")],o.prototype,"legendImageUrl",void 0),Hn([t.Property("")],o.prototype,"pointColorMapping",void 0),Hn([t.Property(null)],o.prototype,"selectionStyle",void 0),Hn([t.Property(null)],o.prototype,"groupTo",void 0),Hn([t.Property("Value")],o.prototype,"groupMode",void 0),Hn([t.Complex({},Yn)],o.prototype,"dataLabel",void 0),Hn([t.Property([])],o.prototype,"palettes",void 0),Hn([t.Property(0)],o.prototype,"startAngle",void 0),Hn([t.Property(null)],o.prototype,"endAngle",void 0),Hn([t.Property("80%")],o.prototype,"radius",void 0),Hn([t.Property("0")],o.prototype,"innerRadius",void 0),Hn([t.Property("Pie")],o.prototype,"type",void 0),Hn([t.Property(!0)],o.prototype,"enableTooltip",void 0),Hn([t.Property(!1)],o.prototype,"explode",void 0),Hn([t.Property("30%")],o.prototype,"explodeOffset",void 0),Hn([t.Property(!1)],o.prototype,"explodeAll",void 0),Hn([t.Property(null)],o.prototype,"explodeIndex",void 0),Hn([t.Complex({mode:"Drop"},Kt)],o.prototype,"emptyPointSettings",void 0),Hn([t.Property(0)],o.prototype,"gapRatio",void 0),Hn([t.Property("80%")],o.prototype,"width",void 0),Hn([t.Property("80%")],o.prototype,"height",void 0),Hn([t.Property("20%")],o.prototype,"neckWidth",void 0),Hn([t.Property("20%")],o.prototype,"neckHeight",void 0),Hn([t.Property("Linear")],o.prototype,"pyramidMode",void 0),Hn([t.Property(1)],o.prototype,"opacity",void 0),o}(t.ChildProperty),Zn=function(){function e(e){this.accumulation=e}return Object.defineProperty(e.prototype,"center",{get:function(){return this.pieCenter||("Pie"===this.accumulation.visibleSeries[0].type?this.accumulation.pieSeriesModule.center:null)},set:function(e){this.pieCenter=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return void 0!==this.pieRadius?this.pieRadius:this.accumulation.pieSeriesModule.radius},set:function(e){this.pieRadius=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"labelRadius",{get:function(){return void 0!==this.pieLabelRadius?this.pieLabelRadius:this.accumulation.pieSeriesModule.labelRadius},set:function(e){this.pieLabelRadius=e},enumerable:!0,configurable:!0}),e.prototype.isCircular=function(){return"Pie"===this.accumulation.type},e.prototype.isVariousRadius=function(){return this.accumulation.pieSeriesModule.isRadiusMapped},e.prototype.processExplode=function(e){if(e.target.id.indexOf("_Series_")>-1||e.target.id.indexOf("_datalabel_")>-1){var t=D(e.target.id).point;if(isNaN(t)||e.target.id.indexOf("_datalabel_")>-1&&"Outside"===this.accumulation.visibleSeries[0].points[t].labelPosition)return null;this.explodePoints(t,this.accumulation),this.deExplodeAll(t,this.accumulation.enableAnimation?300:0)}},e.prototype.invokeExplode=function(){for(var e=this.accumulation.visibleSeries[0],t=this.accumulation.enableAnimation?300:0,i=0,r=e.points;i<r.length;i++){var o=r[i];o.isExplode&&this.pointExplode(o.index,o,t)}if(this.accumulation.accumulationSelectionModule&&"None"!==this.accumulation.selectionMode&&this.accumulation.accumulationSelectionModule.selectedDataIndexes.length)for(var n=0,a=this.accumulation.accumulationSelectionModule.selectedDataIndexes;n<a.length;n++){var s=a[n];this.explodePoints(s.point,this.accumulation,!0),this.deExplodeAll(s.point,t)}},e.prototype.deExplodeAll=function(e,t){for(var i=this.accumulation.element.id+"_Series_0_Point_",r=0,o=this.accumulation.visibleSeries[0].points;r<o.length;r++){var n=o[r];(e!==n.index&&!n.isSliced||n.isClubbed)&&(n.isExplode=!1,this.deExplodeSlice(n.index,i,t))}},e.prototype.explodePoints=function(e,i,r){void 0===r&&(r=!1);var o=i.visibleSeries[0],n=o.points,a=et(e,n),s=!0,l=this.accumulation.enableAnimation?300:0;if(t.isNullOrUndefined(a))return null;var h=!r&&(a.isSliced||o.clubbedPoints.length&&n[n.length-1].index===o.clubbedPoints[o.clubbedPoints.length-1].index);"Pie"===o.type&&(h||a.isClubbed)&&(s=this.clubPointExplode(e,a,o,n,i,l,h)),s&&this.pointExplode(e,a,l,r)},e.prototype.getSum=function(e){var t=0;return e.map(function(e){t+=e.visible?e.y:0}),t},e.prototype.clubPointExplode=function(e,t,i,r,o,n,a){if(void 0===a&&(a=!1),t.isClubbed)return o.animateSeries=!1,r.splice(r.length-1,1),i.clubbedPoints.map(function(e){e.visible=!0,e.isExplode=!0}),o.visibleSeries[0].points=r.concat(i.clubbedPoints),this.deExplodeAll(e,n),i.sumOfPoints=this.getSum(o.visibleSeries[0].points),o.refreshChart(),!1;if(a||t.isSliced){o.animateSeries=!1,r.splice(r.length-i.clubbedPoints.length,i.clubbedPoints.length);var s=i.generateClubPoint();if(s.index=r.length,s.color=i.clubbedPoints[0].color,r.push(s),i.sumOfPoints=this.getSum(r),this.deExplodeAll(e,n),s.isExplode=!1,o.visibleSeries[0].points=r,o.refreshChart(),this.pointExplode(s.index,r[s.index],0,!0),s.isExplode=!1,this.deExplodeSlice(s.index,o.element.id+"_Series_0_Point_",n),t.isSliced)return!1}return!0},e.prototype.pointExplode=function(e,t,i,r){var o,n=this.accumulation.element.id+"_Series_0_Point_",a=this.accumulation;o=this.isCircular()?M(t.midAngle,a.explodeDistance,this.center):{x:t.labelRegion&&t.labelRegion.x<t.region.x?-a.explodeDistance:a.explodeDistance,y:0},this.isExplode(n+e)||r?(t.isExplode=!0,this.explodeSlice(e,o,n,this.center||{x:0,y:0},i)):(t.isExplode=!1,this.deExplodeSlice(e,n,i))},e.prototype.isExplode=function(e){var t=he(e),i=t?t.getAttribute("transform"):null;return t&&("translate(0, 0)"===i||null===i||"translate(0)"===i)},e.prototype.deExplodeSlice=function(e,t,i){var r=he(t+e);r&&r.parentNode.lastChild.hasAttribute("transform")&&r.parentNode.lastChild.removeAttribute("transform");var o=r?r.getAttribute("transform"):null;if(this.accumulation.enableAnimation&&r&&o&&"translate(0, 0)"!==o&&"translate(0)"!==o){var n=/translate\((-?\d+\.?\d*),?\s*(-?\d+[.]?\d*)?\)/.exec(o);this.performAnimation(e,t,0,0,+n[1],+n[2]||0,i,!0)}else this.performAnimation(e,t,0,0,0,0,i,!0)},e.prototype.setTranslate=function(e,t,i,r){this.setElementTransform(t+e,i),this.accumulation.visibleSeries[0].dataLabel.visible&&(t=this.accumulation.element.id+"_datalabel_Series_0_",this.setElementTransform(t+"shape_"+e,i),this.setElementTransform(t+"text_"+e,i+r),this.setElementTransform(t+"connector_"+e,i))},e.prototype.setElementTransform=function(e,t){var i=he(e);i&&i.setAttribute("transform",t)},e.prototype.explodeSlice=function(e,t,i,r,o){this.performAnimation(e,i,0,0,t.x-r.x,t.y-r.y,o)},e.prototype.performAnimation=function(e,i,r,o,n,a,s,l){var h=this,c=this.accumulation,d=i.split("_"),p=parseInt(i.split("_")[d.length-3],10),u=c.visibleSeries[p].points[e];if(s<=0)return this.setTranslate(e,i,"translate("+n+", "+a+")",u.transform),null;var g,y;new t.Animation({}).animate(t.createElement("div"),{duration:s,progress:function(t){g=q(t.timeStamp,r,n,t.duration),y=q(t.timeStamp,o,a,t.duration),h.setTranslate(e,i,"translate("+(l?n-g:g)+", "+(l?a-y:y)+")",u.transform)},end:function(){h.setTranslate(e,i,"translate("+(l?r:n)+", "+(l?r:a)+")",u.transform)}})},e}(),qn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qn=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return qn(r,e),r.prototype.initProperties=function(e,t){this.accumulation=e,this.size=Math.min(e.initialClipRect.width,e.initialClipRect.height),this.initAngles(t);var i=parseInt(t.radius,10);if(-1===t.radius.indexOf("%")&&"number"!=typeof i||isNaN(i)){var r=[];this.isRadiusMapped=!0;for(var o=0;o<Object.keys(t.points).length;o++)-1!==t.points[o].sliceRadius.indexOf("%")?r[o]=Be(t.points[o].sliceRadius,this.size/2):r[o]=parseInt(t.points[o].sliceRadius,10);var n=Math.min.apply(null,r),a=Math.max.apply(null,r);this.radius=this.seriesRadius=a,this.innerRadius=Be(t.innerRadius,this.seriesRadius),this.innerRadius=this.innerRadius>n?this.innerRadius/2:this.innerRadius}else this.isRadiusMapped=!1,this.radius=Be(t.radius,this.size/2),this.innerRadius=Be(t.innerRadius,this.radius),this.labelRadius="Inside"===t.dataLabel.position?(this.radius-this.innerRadius)/2+this.innerRadius:this.radius+Be(t.dataLabel.connectorStyle.length||"4%",this.size/2);e.explodeDistance=t.explode?Be(t.explodeOffset,this.radius):0,this.findCenter(e,t),this.defaultLabelBound(t,t.dataLabel.visible,t.dataLabel.position),this.totalAngle-=.001},r.prototype.getLabelRadius=function(e,t){return"Inside"===e.dataLabel.position?(Be(t.sliceRadius,this.radius)-this.innerRadius)/2+this.innerRadius:Be(t.sliceRadius,this.seriesRadius)+Be(e.dataLabel.connectorStyle.length||"4%",this.size/2)},r.prototype.findCenter=function(e,t){this.accumulation=e,this.center={x:Be(e.center.x,e.initialClipRect.width)+e.initialClipRect.x,y:Be(e.center.y,e.initialClipRect.height)+e.initialClipRect.y};var i=this.getSeriesBound(t),r=new Vi(i.x+i.width/2,i.y+i.height/2);this.center.x+=this.center.x-r.x,this.center.y+=this.center.y-r.y,this.accumulation.origin=this.center},r.prototype.initAngles=function(e){var i=t.isNullOrUndefined(e.endAngle)?e.startAngle:e.endAngle;this.totalAngle=(i-e.startAngle)%360,this.startAngle=e.startAngle-90,this.totalAngle=this.totalAngle<=0?360+this.totalAngle:this.totalAngle,this.startAngle=(this.startAngle<0?this.startAngle+360:this.startAngle)%360},r.prototype.defaultLabelBound=function(e,t,r){var o=this.getSeriesBound(e);e.accumulationBound=o,e.labelBound=new i.Rect(o.x,o.y,o.width+o.x,o.height+o.y),t&&"Outside"===r&&(e.labelBound=new i.Rect(1/0,1/0,-1/0,-1/0))},r.prototype.getSeriesBound=function(e){var t=new i.Rect(1/0,1/0,-1/0,-1/0);this.initAngles(e);var r=this.startAngle,o=this.totalAngle,n=(this.startAngle+o)%360;n=0===n?360:n,e.findMaxBounds(t,this.getRectFromAngle(r)),e.findMaxBounds(t,this.getRectFromAngle(n)),e.findMaxBounds(t,new i.Rect(this.center.x,this.center.y,0,0));var a=(90*Math.floor(r/90)+90)%360,s=90*Math.floor(n/90)%360;s=0===s?360:s,(o>=90||s===a)&&(e.findMaxBounds(t,this.getRectFromAngle(a)),e.findMaxBounds(t,this.getRectFromAngle(s))),(0===r||r+o>=360)&&e.findMaxBounds(t,this.getRectFromAngle(0));for(var l=a===s?0:Math.floor(o/90),h=1;h<l;h++)((a+=90)<s||n<r||360===o)&&e.findMaxBounds(t,this.getRectFromAngle(a));return t.width-=t.x,t.height-=t.y,t},r.prototype.getRectFromAngle=function(e){var t=M(e,this.radius,this.center);return new i.Rect(t.x,t.y,0,0)},r.prototype.getPathArc=function(e,t,i,r,o){var n=i-t,a=(n=n<0?n+360:n)<180?0:1;return o||0!==o?this.getDoughnutPath(e,M(t,r,e),M(i,r,e),r,M(t,o,e),M(i,o,e),o,a):this.getPiePath(e,M(t,r,e),M(i,r,e),r,a)},r.prototype.getPiePath=function(e,t,i,r,o){return"M "+e.x+" "+e.y+" L "+t.x+" "+t.y+" A "+r+" "+r+" 0 "+o+" 1 "+i.x+" "+i.y+" Z"},r.prototype.getDoughnutPath=function(e,t,i,r,o,n,a,s){return"M "+t.x+" "+t.y+" A "+r+" "+r+" 0 "+s+" 1 "+i.x+" "+i.y+" L "+n.x+" "+n.y+" A "+a+" "+a+" 0 "+s+",0 "+o.x+" "+o.y+" Z"},r.prototype.doAnimation=function(e,i){var r,o=this,n=i.startAngle-90,a=this.accumulation.duration?this.accumulation.duration:i.animation.duration;this.center.x+=1;var s=.75*Math.max(this.accumulation.availableSize.height,this.accumulation.availableSize.width);s+=.414*s;var l=Z("Linear");new t.Animation({}).animate(e,{duration:a,delay:i.animation.delay,progress:function(t){r=l(t.timeStamp,n,o.totalAngle,t.duration),e.setAttribute("d",o.getPathArc(o.center,n,r,s,0))},end:function(){o.center.x-=1,e.setAttribute("d",o.getPathArc(o.center,0,359.99999,s,0)),o.accumulation.trigger("animationComplete",o.accumulation.isBlazor?{}:{series:i,accumulation:o.accumulation,chart:o.accumulation}),he(o.accumulation.element.id+"_datalabel_Series_"+i.index).style.visibility=o.accumulation.isDestroyed?"hidden":"visible"}})},r}(Zn),$n=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jn=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return $n(r,e),r.prototype.renderPoint=function(e,t,i,r,o,n){var a=t.sumOfPoints;e.startAngle=this.startAngle;var s=e.visible?e.y:0,l=a?Math.abs(s)/a*this.totalAngle:null,h=Math.PI/180*(90-(360-this.startAngle)-90);this.radius=this.isRadiusMapped?Be(e.sliceRadius,this.seriesRadius):this.radius,r.d=this.getPathOption(e,l,this.startAngle%360),e.midAngle=(this.startAngle-l/2)%360,e.endAngle=this.startAngle%360,e.symbolLocation=M(e.midAngle,(this.radius+this.innerRadius)/2,this.center),n?(o.appendChild(i.renderer.drawPath(r)),this.refresh(e,l,h,i,r)):(o.appendChild(i.renderer.drawPath(r)),e.degree=l,e.start=h)},r.prototype.findSeries=function(e){var t=0===this.innerRadius?this.radius+3:this.innerRadius-3,i=0===this.innerRadius?t+2:t-2;this.toggleInnerPoint(e,t,i)},r.prototype.toggleInnerPoint=function(e,r,o){var n,a=D(e.target.id,!0),s=e.target.id.substring(0,e.target.id.indexOf("Series")-1),l=document.getElementById(this.accumulation.element.id+"PointHover_Border"),h=a.series,c=a.point,d=he(s+"_Series_"+h+"_Point_"+c);if(!isNaN(a.series)&&d){if(!(t.isNullOrUndefined(h)||isNaN(h)||t.isNullOrUndefined(c)||isNaN(c))){var p=this.accumulation.visibleSeries[0].points[c],u=d.getAttribute("class")===s+"_ej2_deselected"?this.accumulation.tooltip.enable?.5:.3:this.accumulation.tooltip.enable?.5:1,g=this.getPathArc(this.accumulation.pieSeriesModule.center,p.startAngle%360,(p.startAngle+p.degree)%360,r,o);l&&s===this.accumulation.element.id&&(l.getAttribute("d")!==g||p.isExplode)&&(l.parentNode.removeChild(l),l=null);var y=he(s+"_Series_"+h);if(!l&&(!p.isExplode||p.isExplode&&"click"!==e.type)){var m=new i.PathOption(s+"PointHover_Border",p.color,1,p.color,u,"",g);if((n=this.accumulation.renderer.drawPath(m)).removeAttribute("transform"),"None"!==this.accumulation.selectionMode&&e.target.hasAttribute("class")&&this.accumulation.accumulationSelectionModule.addSvgClass(n,e.target.getAttribute("class")),y.appendChild(n),p.isExplode&&n){var v=d.getAttribute("transform");n.setAttribute("transform",v)}}}}else l&&(this.removeBorder(l,1e3),l=null)},r.prototype.removeBorder=function(e,t){e&&setTimeout(function(){e.parentNode&&e.parentNode.removeChild(e)},t)},r.prototype.refresh=function(e,i,r,o,n){var a=this,s=he(n.id),l=o.duration?o.duration:300;new t.Animation({}).animate(t.createElement("div"),{duration:l,delay:0,progress:function(t){var n=q(t.timeStamp,e.degree,i-e.degree,t.duration),l=q(t.timeStamp,e.start,r-e.start,t.duration);l=(l/(Math.PI/180)+360)%360,s.setAttribute("d",a.getPathOption(e,n,l)),e.isExplode&&o.accBaseModule.explodePoints(e.index,o,!0),s.style.visibility="visible"},end:function(){s.style.visibility=e.visible?"visible":"hidden",s.setAttribute("d",n.d),e.degree=i,e.start=r}})},r.prototype.getPathOption=function(e,t,i){if(!t)return"";var r=this.getPathArc(this.center,i%360,(i+t)%360,this.isRadiusMapped?Be(e.sliceRadius,this.seriesRadius):this.radius,this.innerRadius);return this.startAngle+=t,r},r.prototype.animateSeries=function(e,t,r,o){var n=e.element.id+"SeriesGroup"+r.index;if(r.animation.enable&&e.animateSeries){var a=e.renderer.createClipPath({id:n+"_clipPath"}),s=new i.PathOption(n+"_slice","transparent",1,"transparent",1,"",""),l=e.renderer.drawPath(s);a.appendChild(l),e.svgObject.appendChild(a),o.setAttribute("style","clip-path:url(#"+a.id+"); -webkit-clip-path:url(#"+a.id+");"),this.doAnimation(l,r)}},r.prototype.getModuleName=function(){return"PieSeries"},r.prototype.destroy=function(){},r}(Qn),Kn=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ea=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ta=function(r){function o(e,t){var i=r.call(this,e,t)||this;return i.animateselected=!1,i.explodeDistance=0,i.chartid=57724,i}return Kn(o,r),o.prototype.animate=function(e){this.duration=e||700,this.animateselected=!0,this.animateSeries=!1;var t=0,i=[],r=[],o=[],n=this.visibleSeries[0],a=[];if(a=n.dataSource,n.sumOfPoints=0,n.points.length<Object.keys(n.dataSource).length)this.refresh();else if(n.points.length>Object.keys(n.dataSource).length){var s=this.visibleSeries[0];s.points=s.points.filter(function(e){return e.visible=!1,r.push(e.index),i.push(e.color),a.some(function(i){var r=i;return e.x===r.x&&(e.visible=!0,o.push(e.index),e.index=t,t++),e.x===r.x})});for(var l=r.filter(function(e){return o.indexOf(e)<0}),h=r.length-l.length,c=r.length-1;c>=h;c--)m("container_Series_0_Point_"+r[c]);for(c=0;c<s.points.length;c++)s.points[c].y=s.dataSource[c].y,s.points[c].color=i[c],s.sumOfPoints+=s.dataSource[c].y;this.redraw=this.enableAnimation,this.animateSeries=!1,this.calculateBounds(),this.renderElements()}else{for(c=0;c<n.points.length;c++)n.points[c].y=n.dataSource[c][n.yName],n.points[c].color=null!=n.dataSource[c][n.pointColorMapping]?n.dataSource[c][n.pointColorMapping]:n.points[c].color,n.sumOfPoints+=n.dataSource[c][n.yName];this.redraw=this.enableAnimation,this.animateSeries=!1,this.removeSvg(),this.refreshPoints(n.points),this.renderElements()}},Object.defineProperty(o.prototype,"type",{get:function(){return this.series&&this.series.length?this.series[0].type:"Pie"},enumerable:!0,configurable:!0}),o.prototype.preRender=function(){if(this.isBlazor=window.Blazor,this.allowServerDataBinding=!1,this.unWireEvents(),this.setCulture(),this.animateSeries=!0,""===this.element.id){var e=document.getElementsByClassName("e-accumulationchart").length;this.element.id="acc_chart_"+this.chartid+"_"+e}je(this),this.wireEvents()},o.prototype.setTheme=function(){this.themeStyle=c(this.theme)},o.prototype.render=function(){var e=this;-1===this.element.className.indexOf("e-accumulationchart")&&this.element.classList.add("e-accumulationchart");var t={chart:this.isBlazor?{}:this,accumulation:this.isBlazor?{}:this,theme:this.theme,name:"load",cancel:!1};this.trigger("load",t,function(){e.theme=e.isBlazor?t.theme:e.theme,e.setTheme(),e.accBaseModule=new Zn(e),e.pieSeriesModule=new Jn(e),e.calculateVisibleSeries(),e.processData(),e.renderComplete(),e.allowServerDataBinding=!0})},o.prototype.unWireEvents=function(){var e=t.Browser.isPointer,i=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,o=t.Browser.touchEndEvent,n=e?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,r,this.accumulationMouseMove),t.EventHandler.remove(this.element,o,this.accumulationMouseEnd),t.EventHandler.remove(this.element,i,this.accumulationMouseStart),t.EventHandler.remove(this.element,"click",this.accumulationOnMouseClick),t.EventHandler.remove(this.element,"contextmenu",this.accumulationRightClick),t.EventHandler.remove(this.element,n,this.accumulationMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.accumulationResize)},o.prototype.wireEvents=function(){if(this.element){var e=t.Browser.isPointer,i=t.Browser.touchStartEvent,r=t.Browser.touchEndEvent,o=t.Browser.touchMoveEvent,n=e?"pointerleave":"mouseleave";t.EventHandler.add(this.element,o,this.accumulationMouseMove,this),t.EventHandler.add(this.element,r,this.accumulationMouseEnd,this),t.EventHandler.add(this.element,i,this.accumulationMouseStart,this),t.EventHandler.add(this.element,"click",this.accumulationOnMouseClick,this),t.EventHandler.add(this.element,"contextmenu",this.accumulationRightClick,this),t.EventHandler.add(this.element,n,this.accumulationMouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.accumulationResize.bind(this)),new t.Touch(this.element),this.setStyle(this.element)}},o.prototype.setMouseXY=function(e){var t,i,r=he(this.element.id+"_svg");if(r&&this.element){var o=r.getBoundingClientRect(),n=this.element.getBoundingClientRect();if(e.type.indexOf("touch")>-1){this.isTouch=!0;var a=e;i=a.changedTouches[0].clientY,t=a.changedTouches[0].clientX}else this.isTouch="touch"===e.pointerType||"2"===e.pointerType,t=e.clientX,i=e.clientY;this.mouseY=i-n.top-Math.max(o.top-n.top,0),this.mouseX=t-n.left-Math.max(o.left-n.left,0)}},o.prototype.accumulationMouseEnd=function(e){return this.setMouseXY(e),this.trigger("chartMouseUp",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.isTouch&&(this.titleTooltip(e,this.mouseX,this.mouseY,this.isTouch),this.accumulationDataLabelModule&&this.visibleSeries[0].dataLabel.visible&&this.accumulationDataLabelModule.move(e,this.mouseX,this.mouseY,this.isTouch),this.accumulationLegendModule&&this.legendSettings.visible&&this.accumulationLegendModule.move(e)),this.notify(t.Browser.touchEndEvent,e),!1},o.prototype.accumulationMouseStart=function(e){return this.setMouseXY(e),this.trigger("chartMouseDown",{target:e.target.id,x:this.mouseX,y:this.mouseY}),!1},o.prototype.accumulationResize=function(){var e=this;this.animateSeries=!1;var t={accumulation:this.isBlazor?{}:this,previousSize:new i.Size(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new i.Size(0,0),chart:this.isBlazor?{}:this},r={name:"beforeResize",cancelResizedEvent:!1};return this.resizeTo&&clearTimeout(this.resizeTo),this.trigger("beforeResize",r),r.cancelResizedEvent||(this.resizeTo=+setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);je(e),t.currentSize=e.availableSize,e.trigger("resized",t),e.refreshSeries(),e.refreshChart()},500)),!1},o.prototype.print=function(e){var t=document.getElementById(this.element.id+"_Series_0").style.clipPath;document.getElementById(this.element.id+"_Series_0").style.clipPath="",new xr(this).print(e),document.getElementById(this.element.id+"_Series_0").style.clipPath=t},o.prototype.export=function(e,t){this.exportModule&&(this.exportModule.export(e,t),this.afterExport&&this.exportModule.getDataUrl(this))},o.prototype.setStyle=function(e){e.style.touchAction="element",e.style.msTouchAction="element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative",e.style.display="block"},o.prototype.setAnnotationValue=function(e,t){var i,r=this.annotations[e],o=he(this.element.id+"_Annotation_Collections");t&&(r.content=t,o?(i=this.createElement("div"),m(this.element.id+"_Annotation_"+e),this.annotationModule.processAnnotation(r,e,i),o.appendChild(i.children[0])):this.annotationModule.renderAnnotations(he(this.element.id+"_Secondary_Element")))},o.prototype.accumulationMouseMove=function(e){return!!he(this.element.id+"_svg")&&(this.setMouseXY(e),this.trigger("chartMouseMove",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.pointMove&&this.triggerPointEvent("pointMove",e.target,e),this.accumulationLegendModule&&this.legendSettings.visible&&this.accumulationLegendModule.move(e),this.accumulationDataLabelModule&&this.visibleSeries[0]&&this.visibleSeries[0].dataLabel.visible&&this.accumulationDataLabelModule.move(e,this.mouseX,this.mouseY),this.isTouch||this.titleTooltip(e,this.mouseX,this.mouseY),this.enableBorderOnMouseMove&&"Pie"===this.type&&this.pieSeriesModule&&j(this.mouseX,this.mouseY,this.initialClipRect)&&this.pieSeriesModule.findSeries(e),this.notify(t.Browser.touchMoveEvent,e),!1)},o.prototype.titleTooltip=function(e,t,i,r){var o=e.target.id,n=o===this.element.id+"_title"||o===this.element.id+"_subTitle"||o===this.element.id+"_chart_legend_title";e.target.textContent.indexOf("...")>-1&&n?f(o===this.element.id+"_title"?this.title:o===this.element.id+"_subTitle"?this.subTitle:this.legendSettings.title,t,i,this.element.offsetWidth,this.element.id+"_EJ2_Title_Tooltip",he(this.element.id+"_Secondary_Element"),r):m(this.element.id+"_EJ2_Title_Tooltip")},o.prototype.accumulationOnMouseClick=function(e){return this.setMouseXY(e),this.accumulationLegendModule&&this.legendSettings.visible&&this.accumulationLegendModule.click(e),"None"!==this.selectionMode&&this.accumulationSelectionModule&&this.accumulationSelectionModule.calculateSelectedElements(this,e),this.visibleSeries[0].explode&&this.accBaseModule.processExplode(e),this.enableBorderOnMouseMove&&this.pieSeriesModule&&"Pie"===this.type&&this.pieSeriesModule.findSeries(e),this.trigger("chartMouseClick",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.pointClick&&this.triggerPointEvent("pointClick",e.target,e),!1},o.prototype.triggerPointEvent=function(e,t,i){var r=i,o=D(t.id,!0);o.series>=0&&o.point>=0&&this.trigger(e,{series:this.isBlazor?{}:this.series[o.series],point:this.series[o.series].points[o.point],seriesIndex:o.series,pointIndex:o.point,x:this.mouseX,y:this.mouseY,pageX:r.pageX,pageY:r.pageY})},o.prototype.accumulationRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},o.prototype.accumulationMouseLeave=function(e){this.setMouseXY(e),this.trigger("chartMouseLeave",{target:e.target.id,x:this.mouseX,y:this.mouseY}),this.notify(t.Browser.isPointer?"pointerleave":"mouseleave",e);var i=document.getElementById(this.element.id+"PointHover_Border");return i&&(this.pieSeriesModule.removeBorder(i,1e3),i=null),!1},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.createPieSvg=function(){this.removeSvg(),He(this)},o.prototype.removeSvg=function(){if(this.redraw)return null;if(Ue(this),m(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)}m("EJ2_legend_tooltip"),m("EJ2_datalabel_tooltip"),m(this.element.id+"PointHover_Border")},o.prototype.createSecondaryElement=function(){var e=Ne(this.redraw,this.element.id+"_Secondary_Element")||this.createElement("div",{id:this.element.id+"_Secondary_Element",styles:"position: relative"});be(!1,this.element,e,this.redraw)},o.prototype.calculateVisibleSeries=function(){this.visibleSeries=[];for(var e=0,t=this.series.length;e<t;e++)if(this.series[e].index=e,this.series[e].type===this.type&&0===this.visibleSeries.length){this.visibleSeries.push(this.series[e]);break}},o.prototype.processData=function(e){void 0===e&&(e=!0),this.seriesCounts=0;for(var t=0,i=this.visibleSeries;t<i.length;t++){var r=i[t];r.dataModule=new ar(r.dataSource||this.dataSource,r.query),r.refreshDataManager(this,e)}},o.prototype.refreshChart=function(){this.doGrouppingProcess(),this.createPieSvg(),this.calculateBounds(),this.renderElements(),m("chartmeasuretext")},o.prototype.doGrouppingProcess=function(){var e=this.visibleSeries[0];t.isNullOrUndefined(e.resultData)||t.isNullOrUndefined(e.lastGroupTo)||e.lastGroupTo===e.groupTo||e.getPoints(e.resultData,this)},o.prototype.calculateBounds=function(){this.initialClipRect=new i.Rect(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height),this.titleCollection=[],this.subTitleCollection=[];var e=0,t=0,r=0,o=0;if(this.titleCollection=Xe(this.title,this.titleStyle,this.initialClipRect.width),e=this.title?i.measureText(this.title,this.titleStyle).height*this.titleCollection.length:e,this.subTitle){for(var n=0,a=this.titleCollection;n<a.length;n++){var s=a[n];r=(o=i.measureText(s,this.titleStyle).width)>r?o:r}this.subTitleCollection=Xe(this.subTitle,this.subTitleStyle,r),t=i.measureText(this.subTitle,this.subTitleStyle).height*this.subTitleCollection.length}R(this.initialClipRect,new i.Rect(0,t+e,this.margin.right+this.margin.left,this.margin.bottom+this.margin.top)),this.calculateLegendBounds()},o.prototype.calculateLegendBounds=function(){if(!this.accumulationLegendModule||!this.legendSettings.visible)return null;this.accumulationLegendModule.getLegendOptions(this,this.visibleSeries),this.accumulationLegendModule.calculateLegendBounds(this.initialClipRect,this.availableSize,null)},o.prototype.renderElements=function(){this.renderBorder(),this.createSecondaryElement(),this.renderSeries(),this.renderTitle(),this.renderLegend(),be(!1,this.element,this.svgObject,this.redraw),this.processSelection(),this.processExplode(),this.renderAnnotation(),this.setSecondaryElementPosition(),t.updateBlazorTemplate(this.element.id+"_DataLabel","Template",this.series[0].dataLabel),this.trigger("loaded",{accumulation:this.isBlazor?{}:this,chart:this.isBlazor?{}:this}),this.animateSeries=!1},o.prototype.setSecondaryElementPosition=function(){var e=he(this.element.id+"_Secondary_Element");if(e){var t=this.element.getBoundingClientRect(),i=he(this.element.id+"_svg").getBoundingClientRect();e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px"}},o.prototype.renderAnnotation=function(){this.annotationModule&&this.annotationModule.renderAnnotations(he(this.element.id+"_Secondary_Element"))},o.prototype.processExplode=function(){return this.redraw?null:this.visibleSeries[0].explode?void this.accBaseModule.invokeExplode():null},o.prototype.renderSeries=function(){this.redraw||this.svgObject.appendChild(this.renderer.createGroup({id:this.element.id+"_SeriesCollection"}));for(var e=0,t=this.visibleSeries;e<t.length;e++){var i=t[e];i.visible&&this[G(i.type)+"SeriesModule"]&&(this[G(i.type)+"SeriesModule"].initProperties(this,i),i.renderSeries(this,this.redraw))}},o.prototype.renderBorder=function(){var e=this.border.width;be(!1,this.svgObject,this.renderer.drawRectangle(new Di(this.element.id+"_border",this.background||this.themeStyle.background,this.border,1,new i.Rect(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))),this.redraw);var t=this.backgroundImage;if(t){var r=new Bi(this.availableSize.height-e,this.availableSize.width-e,t,0,0,this.element.id+"_background","visible","none");be(!1,this.svgObject,this.renderer.drawImage(r),this.redraw)}},o.prototype.renderLegend=function(){if(!this.accumulationLegendModule||!this.legendSettings.visible)return null;this.accumulationLegendModule.legendCollections.length&&("Pie"===this.visibleSeries[0].type&&this.accumulationLegendModule.getSmartLegendLocation(this.visibleSeries[0].labelBound,this.accumulationLegendModule.legendBounds,this.margin),this.accumulationLegendModule.renderLegend(this,this.legendSettings,this.accumulationLegendModule.legendBounds,this.redraw))},o.prototype.processSelection=function(){if(!this.accumulationSelectionModule||"None"===this.selectionMode)return null;var e=t.extend([],this.accumulationSelectionModule.selectedDataIndexes,null,!0);this.accumulationSelectionModule.invokeSelection(this),e.length>0&&(this.accumulationSelectionModule.selectedDataIndexes=e,this.accumulationSelectionModule.redrawSelection(this))},o.prototype.renderTitle=function(){var e=this.margin;if(!this.title)return null;var t=this.titleStyle.textAlignment,r="Near"===t?"start":"Far"===t?"end":"middle",o=i.measureText(this.title,this.titleStyle),n=new i.Rect(e.left,0,this.availableSize.width-e.left-e.right,0),a=new i.TextOption(this.element.id+"_title",Ye(n,this.titleStyle),this.margin.top+3*o.height/4,r,this.titleCollection,"","auto"),s=Ve(this.renderer,a,this.titleStyle,this.titleStyle.color||this.themeStyle.chartTitle,this.svgObject,!1,this.redraw);s&&s.setAttribute("aria-label",this.title),this.subTitle&&this.renderSubTitle(a)},o.prototype.renderSubTitle=function(e){for(var t=0,r=0,o=this.titleStyle.textAlignment,n=i.measureText(this.subTitle,this.subTitleStyle),a=0,s=this.titleCollection;a<s.length;a++){var l=s[a];t=(r=i.measureText(l,this.titleStyle).width)>t?r:t}var h=new i.Rect("Center"===o?e.x-t/2:"Far"===o?e.x-t:e.x,0,t,0),c=new i.TextOption(this.element.id+"_subTitle",Ye(h,this.subTitleStyle),e.y*e.text.length+3*n.height/4+10,function(e){return"Near"===e?"start":"Far"===e?"end":"middle"}(this.subTitleStyle.textAlignment),this.subTitleCollection,"","auto");Ve(this.renderer,c,this.subTitleStyle,this.subTitleStyle.color||this.themeStyle.chartTitle,this.svgObject,!1,this.redraw)},o.prototype.getSeriesElement=function(){return this.svgObject.getElementsByTagName("g")[0]},o.prototype.refreshSeries=function(){for(var e=0,t=this.visibleSeries;e<t.length;e++){var i=t[e];this.refreshPoints(i.points)}},o.prototype.refreshPoints=function(e){for(var t=0,i=e;t<i.length;t++){var r=i[t];r.labelPosition=null,r.labelRegion=null,r.labelVisible=!0}},o.prototype.getModuleName=function(){return"accumulationchart"},o.prototype.destroy=function(){this.element&&(this.unWireEvents(),r.prototype.destroy.call(this),this.element.classList.remove("e-accumulationchart"),this.removeSvg(),this.svgObject=null)},o.prototype.requiredModules=function(){var e=[];return e.push({member:this.type+"Series",args:[this]}),this.legendSettings.visible&&e.push({member:"AccumulationLegend",args:[this]}),this.findDatalabelVisibility()&&e.push({member:"AccumulationDataLabel",args:[this]}),this.tooltip.enable&&e.push({member:"AccumulationTooltip",args:[this]}),"None"!==this.selectionMode&&e.push({member:"AccumulationSelection",args:[this]}),(this.enableExport||this.allowExport)&&e.push({member:"Export",args:[this]}),this.annotations.some(function(e){return null!==e.content})&&e.push({member:"Annotation",args:[this]}),e},o.prototype.findDatalabelVisibility=function(){for(var e=0,t=this.series;e<t.length;e++)if(t[e].dataLabel.visible)return!0;return!1},o.prototype.changeVisibleSeries=function(e,t){for(var i=0,r=e;i<r.length;i++){var o=r[i];if(t===o.index)return o}return null},o.prototype.getPersistData=function(){return""},o.prototype.onPropertyChanged=function(e,i){for(var o={refreshElements:!1,refreshBounds:!1},n=0,a=Object.keys(e);n<a.length;n++)switch(a[n]){case"theme":this.animateSeries=!0;break;case"title":case"subTitle":case"height":case"width":case"margin":o.refreshBounds=!0;break;case"titleStyle":e.titleStyle&&(e.titleStyle.size||e.titleStyle.textOverflow)?o.refreshBounds=!0:o.refreshElements=!0;break;case"subTitleStyle":e.subTitleStyle&&(e.subTitleStyle.size||e.subTitleStyle.textOverflow)?o.refreshBounds=!0:o.refreshElements=!0;break;case"legendSettings":o.refreshBounds=!0,o.refreshElements=!0;break;case"dataSource":this.processData(!1),o.refreshBounds=!0;break;case"series":if(!this.animateselected){for(var s=this.series.length,l=!1,h=void 0,c=void 0,d=0;d<s;d++)h=e.series[d],this.isBlazor&&(h.startAngle||h.endAngle||h.explodeOffset||h.neckHeight||h.neckWidth||h.radius||h.innerRadius||h.groupMode||h.emptyPointSettings)&&(c=!0),e.series[d]&&(e.series[d].dataSource||e.series[d].yName||e.series[d].xName||e.series[d].dataLabel||c)&&(t.extend(this.changeVisibleSeries(this.visibleSeries,d),h,null,!0),l=!0),e.series[d]&&e.series[d].explodeIndex&&e.series[d].explodeIndex!==i.series[d].explodeIndex&&(this.accBaseModule.explodePoints(e.series[d].explodeIndex,this),this.accBaseModule.deExplodeAll(e.series[d].explodeIndex,this.enableAnimation?300:0));l&&(this.processData(!1),o.refreshBounds=!0)}this.animateselected=!1,this.redraw=!1;break;case"locale":case"currencyCode":r.prototype.refresh.call(this);break;case"background":case"border":case"annotations":case"enableSmartLabels":o.refreshElements=!0;break;case"isMultiSelect":case"selectedDataIndexes":case"selectionMode":this.accumulationSelectionModule&&(t.isNullOrUndefined(this.accumulationSelectionModule.selectedDataIndexes)?this.accumulationSelectionModule.invokeSelection(this):this.accumulationSelectionModule.redrawSelection(this))}!o.refreshBounds&&o.refreshElements?(this.createPieSvg(),this.renderElements()):o.refreshBounds&&(this.refreshSeries(),this.createPieSvg(),this.calculateBounds(),this.renderElements())},ea([t.Property(null)],o.prototype,"width",void 0),ea([t.Property(null)],o.prototype,"height",void 0),ea([t.Property(null)],o.prototype,"title",void 0),ea([t.Property(null)],o.prototype,"backgroundImage",void 0),ea([t.Complex({},Gn)],o.prototype,"center",void 0),ea([t.Property("")],o.prototype,"dataSource",void 0),ea([t.Complex(e.Theme.chartTitleFont,Xt)],o.prototype,"titleStyle",void 0),ea([t.Property(null)],o.prototype,"subTitle",void 0),ea([t.Complex(e.Theme.chartSubTitleFont,Xt)],o.prototype,"subTitleStyle",void 0),ea([t.Complex({},gr)],o.prototype,"legendSettings",void 0),ea([t.Complex({},ti)],o.prototype,"tooltip",void 0),ea([t.Property("None")],o.prototype,"selectionMode",void 0),ea([t.Property("None")],o.prototype,"highLightMode",void 0),ea([t.Property("None")],o.prototype,"selectionPattern",void 0),ea([t.Property("None")],o.prototype,"highlightPattern",void 0),ea([t.Property(!0)],o.prototype,"enableBorderOnMouseMove",void 0),ea([t.Property(!1)],o.prototype,"isMultiSelect",void 0),ea([t.Property(!0)],o.prototype,"enableAnimation",void 0),ea([t.Collection([],Qt)],o.prototype,"selectedDataIndexes",void 0),ea([t.Complex({},Ut)],o.prototype,"margin",void 0),ea([t.Property(!0)],o.prototype,"enableSmartLabels",void 0),ea([t.Complex({color:"#DDDDDD",width:0},Yt)],o.prototype,"border",void 0),ea([t.Property(null)],o.prototype,"background",void 0),ea([t.Collection([{}],Un)],o.prototype,"series",void 0),ea([t.Collection([{}],Xn)],o.prototype,"annotations",void 0),ea([t.Property("Material")],o.prototype,"theme",void 0),ea([t.Property(!1)],o.prototype,"useGroupingSeparator",void 0),ea([t.Property(!0)],o.prototype,"enableExport",void 0),ea([t.Property(!1)],o.prototype,"allowExport",void 0),ea([t.Event()],o.prototype,"loaded",void 0),ea([t.Event()],o.prototype,"load",void 0),ea([t.Event()],o.prototype,"seriesRender",void 0),ea([t.Event()],o.prototype,"legendRender",void 0),ea([t.Event()],o.prototype,"textRender",void 0),ea([t.Event()],o.prototype,"tooltipRender",void 0),ea([t.Event()],o.prototype,"pointRender",void 0),ea([t.Event()],o.prototype,"annotationRender",void 0),ea([t.Event()],o.prototype,"beforePrint",void 0),ea([t.Event()],o.prototype,"chartMouseMove",void 0),ea([t.Event()],o.prototype,"chartMouseClick",void 0),ea([t.Event()],o.prototype,"pointClick",void 0),ea([t.Event()],o.prototype,"pointMove",void 0),ea([t.Event()],o.prototype,"animationComplete",void 0),ea([t.Event()],o.prototype,"chartMouseDown",void 0),ea([t.Event()],o.prototype,"chartMouseLeave",void 0),ea([t.Event()],o.prototype,"chartMouseUp",void 0),ea([t.Event()],o.prototype,"beforeResize",void 0),ea([t.Event()],o.prototype,"resized",void 0),ea([t.Event()],o.prototype,"afterExport",void 0),ea([t.Property("USD")],o.prototype,"currencyCode",void 0),o=ea([t.NotifyPropertyChanges],o)}(t.Component),ia=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ra=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ia(t,e),t.prototype.initProperties=function(e,t){var r=e.initialClipRect;t.triangleSize=new i.Size(Be(t.width,r.width),Be(t.height,r.height)),t.neckSize=new i.Size(Be(t.neckWidth,r.width),Be(t.neckHeight,r.height)),this.defaultLabelBound(t,t.dataLabel.visible,t.dataLabel.position,e),"30%"===t.explodeOffset&&(t.explodeOffset="25px"),e.explodeDistance=Be(t.explodeOffset,r.width);var o=t.points;this.initializeSizeRatio(o,t)},t.prototype.initializeSizeRatio=function(e,t,i){void 0===i&&(i=!1);for(var r=t.sumOfPoints,o=Math.min(Math.max(t.gapRatio,0),1),n=1/(r*(1+o/(1-o))),a=o/(e.length-1),s=0,l=e.length-1;l>=0;l--){var h=i?e.length-1-l:l;if(e[h].visible){var c=n*e[h].y;e[h].yRatio=s,e[h].heightRatio=c,s+=c+a}}},t.prototype.setLabelLocation=function(e,t,r){var o=r.length-1,n="Funnel"===e.type?r.length-2:r.length-1,a=(r[0].x+r[n].x)/2,s=(r[1].x+r[n-1].x)/2;t.region=new i.Rect(a,r[0].y,s-a,r[n].y-r[0].y),t.symbolLocation={x:t.region.x+t.region.width/2,y:t.region.y+t.region.height/2},t.labelOffset={x:t.symbolLocation.x-(r[0].x+r[o].x)/2,y:t.symbolLocation.y-(r[0].y+r[o].y)/2}},t.prototype.findPath=function(e){for(var t="M",i=0;i<e.length;i++)t+=e[i].x+" "+e[i].y,i!==e.length-1&&(t+=" L");return t},t.prototype.defaultLabelBound=function(e,t,r,o){var n=(o.initialClipRect.width-e.triangleSize.width)/2,a=(o.initialClipRect.height-e.triangleSize.height)/2,s=new i.Rect(n,a,e.triangleSize.width,e.triangleSize.height);e.labelBound=new i.Rect(s.x,s.y,s.width+s.x,s.height+s.y),e.accumulationBound=s,t&&"Outside"===r&&(e.labelBound=new i.Rect(1/0,1/0,-1/0,-1/0))},t}(Zn),oa=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),na=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return oa(t,e),t.prototype.getSegmentData=function(e,t,i){var r,o,n,a,s,l,h,c,d=t.triangleSize,p=(i.initialClipRect.width-t.triangleSize.width)/2+i.initialClipRect.x,u=i.initialClipRect.y+(i.initialClipRect.height-d.height)/2,g=e.yRatio*d.height,y=g+e.heightRatio*d.height,m=t.neckSize;r=m.width+(d.width-m.width)*((d.height-m.height-g)/(d.height-m.height)),a=(o=d.width/2-r/2)+r,r=y>d.height-m.height||d.height===m.height?m.width:m.width+(d.width-m.width)*((d.height-m.height-y)/(d.height-m.height)),s=(n=d.width/2-r/2)+r,g>=d.height-m.height?(o=n=l=d.width/2-m.width/2,a=s=h=d.width/2+m.width/2):y>d.height-m.height&&(h=s=(l=n=d.width/2-r/2)+r,c=d.height-m.height);var v={x:p+0+o,y:g+=u},f={x:p+0+a,y:g},b={x:p+0+s,y:y+=u},x={x:p+0+n,y:y},w={x:p+0+s,y:y},S={x:p+0+n,y:y};(c+=u)&&(w={x:p+0+h,y:c},S={x:p+0+l,y:c});var C=[v,f,w,b,x,S];return this.setLabelLocation(t,e,C),this.findPath(C)},t.prototype.renderPoint=function(e,t,i,r,o,n){if(!e.visible)return m(r.id),null;var a=this.getSegmentData(e,t,i);e.midAngle=0,r.d=a,be(!1,o,i.renderer.drawPath(r),n),e.isExplode&&i.accBaseModule.explodePoints(e.index,i,!0)},t.prototype.getModuleName=function(){return"FunnelSeries"},t.prototype.destroy=function(){},t}(ra),aa=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return aa(t,e),t.prototype.getSegmentData=function(e,t,i){var r=t.triangleSize,o=i.initialClipRect.y+(i.initialClipRect.height-r.height)/2,n=(i.initialClipRect.width-t.triangleSize.width)/2+i.initialClipRect.x,a=e.yRatio,s=e.yRatio+e.heightRatio,l=.5*(1-e.yRatio),h=.5*(1-s);a+=o/r.height,s+=o/r.height;var c=[{x:n+0+l*r.width,y:a*r.height},{x:n+0+(1-l)*r.width,y:a*r.height},{x:n+0+(1-h)*r.width,y:s*r.height},{x:n+0+h*r.width,y:s*r.height}];return this.setLabelLocation(t,e,c),this.findPath(c)},t.prototype.initializeSizeRatio=function(t,i){"Linear"===i.pyramidMode?e.prototype.initializeSizeRatio.call(this,t,i,!0):this.calculateSurfaceSegments(i)},t.prototype.calculateSurfaceSegments=function(e){for(var t=e.points.length,i=e.sumOfPoints,r=[],o=[],n=Math.min(0,Math.max(e.gapRatio,1))/(t-1),a=this.getSurfaceHeight(0,i),s=0,l=0;l<t;l++)e.points[l].visible&&(r[l]=s,o[l]=this.getSurfaceHeight(s,Math.abs(e.points[l].y)),s+=o[l]+n*a);for(var h=1/(s-n*a),l=0;l<t;l++)e.points[l].visible&&(e.points[l].yRatio=h*r[l],e.points[l].heightRatio=h*o[l])},t.prototype.getSurfaceHeight=function(e,t){return this.solveQuadraticEquation(1,2*e,-t)},t.prototype.solveQuadraticEquation=function(e,t,i){var r,o,n=t*t-4*e*i;if(n>=0){var a=Math.sqrt(n);return r=(-t-a)/(2*e),o=(-t+a)/(2*e),Math.max(r,o)}return 0},t.prototype.renderPoint=function(e,t,r,o,n,a){if(!e.visible)return i.removeElement(o.id),null;o.d=this.getSegmentData(e,t,r),e.midAngle=0,be(!1,n,r.renderer.drawPath(o),a),e.isExplode&&r.accBaseModule.explodePoints(e.index,r,!0)},t.prototype.getModuleName=function(){return"PyramidSeries"},t.prototype.destroy=function(){},t}(ra),la=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ha=function(e){function r(t){var r=e.call(this,t)||this;return r.library=r,r.titleRect=new i.Rect(0,t.margin.top,0,0),r}return la(r,e),r.prototype.getLegendOptions=function(e,i){this.legendCollections=[];for(var r=0;r<1;r++){var o=i[r].type;"Pie"!==o&&"Doughnut"!==o||(o="0"!==i[r].innerRadius&&"0%"!==i[r].innerRadius?"Doughnut":"Pie");for(var n=0,a=i[r].points;n<a.length;n++){var s=a[n];t.isNullOrUndefined(s.x)||t.isNullOrUndefined(s.y)||this.legendCollections.push(new mr(s.x.toString(),s.color,i[r].legendShape,s.visible,o,s.legendImageUrl,null,null,s.index,i[r].index))}}},r.prototype.getLegendBounds=function(e,t,r){this.calculateLegendTitle(r,t),this.isTitle=!!r.title;var o=0,n=0,a=r.padding,s=r.titlePosition,l=0,h=this.arrowWidth,c=r.enablePages?0:this.arrowHeight;this.isVertical?o=r.width?0:e.width/100*5:n=r.height?0:e.height/100*5,t.width+=o,t.height+=n;var d=r.shapePadding,p=0,u=r.shapeWidth,g=0,y=0,m=[],v=0,f=0,b=0;this.maxItemHeight=Math.max(i.measureText("MeasureText",r.textStyle).height,r.shapeHeight);for(var x,w=!1,S=0,C=this.legendCollections;S<C.length;S++){var P=C[S];x={fill:P.fill,text:P.text,shape:P.shape,name:"legendRender",cancel:!1},this.chart.trigger("legendRender",x),P.render=!x.cancel,P.text=x.text,P.fill=x.fill,P.shape=x.shape,P.textSize=i.measureText(P.text,r.textStyle),P.render&&""!==P.text&&(w=!0,f=u+d+P.textSize.width+a,this.isVertical?(v=++y*(this.maxItemHeight+a)+a+this.legendTitleSize.height+c,y*(this.maxItemHeight+a)+a+c>t.height&&(v=Math.max(v,y*(this.maxItemHeight+a)+a+c),g+=p,m.push(p),this.totalPages=Math.max(y,this.totalPages||1),p=0,y=1),p=Math.max(f,p)):(r.enablePages||(l=this.isTitle&&"Top"!==s?this.legendTitleSize.width+this.fivePixel:0,l+=h),g+=f,t.width<a+g+l&&(p=Math.max(p,g+a+l-f),0===y&&f!==g&&(y=1),g=f,v=++y*(this.maxItemHeight+a)+a+this.legendTitleSize.height)))}b="Top"===s?this.legendTitleSize.height:0,this.isVertical?(g+=p,this.isPaging=t.width<g+a,v=Math.max(v,(this.totalPages||1)*(this.maxItemHeight+a)+a+c),this.isPaging=this.isPaging&&this.totalPages>1,m[m.length-1]!==p&&m.push(p)):(this.isPaging=t.height<v,v=!r.enablePages&&this.isPaging?this.maxItemHeight+a+a+b:v,this.totalPages=this.totalRowCount=y,v=Math.max(v,this.maxItemHeight+a+a+b),this.isPaging||(g+=this.isTitle&&"Top"!==s?this.fivePixel+this.legendTitleSize.width+this.fivePixel:0)),this.maxColumns=0;var L=this.isVertical?this.getMaxColumn(m,t.width,a,g+a):Math.max(g+a,p);w?this.setBounds(L,v,r,t):this.setBounds(0,0,r,t)},r.prototype.getMaxColumn=function(e,t,i,r){var o=i;this.maxColumnWidth=Math.max.apply(null,e);for(var n=0,a=e;n<a.length;n++){a[n];if(o+=this.maxColumnWidth,this.maxColumns++,o+i>t){o-=this.maxColumnWidth,this.maxColumns--;break}}return this.isPaging=o<r&&this.totalPages>1,o===i&&(o=t),this.maxColumns=Math.max(1,this.maxColumns),this.maxWidth=o,o},r.prototype.getAvailWidth=function(e,t){return this.isVertical&&(t=this.maxWidth),t-(2*this.legend.padding+this.legend.shapeWidth+this.legend.shapePadding)},r.prototype.getRenderPoint=function(e,t,i,r,o,n,a){var s=this.legend.padding;if(this.isVertical)n===a||r.location.y+1.5*this.maxItemHeight+2*s>o.y+o.height?(e.location.x=r.location.x+(n===a?0:this.maxColumnWidth),e.location.y=t.y,this.pageXCollections.push(e.location.x-this.legend.shapeWidth/2-s),this.totalPages++):(e.location.x=r.location.x,e.location.y=r.location.y+this.maxItemHeight+s);else{var l=r.location.x+i+r.textSize.width;l+(e.textSize.width+i)>o.x+o.width+this.legend.shapeWidth/2?(e.location.y=n===a?r.location.y:r.location.y+this.maxItemHeight+s,e.location.x=t.x):(e.location.y=r.location.y,e.location.x=n===a?r.location.x:l),this.totalPages=this.totalRowCount}var h=this.getAvailWidth(e.location.x,this.legendBounds.width);e.text=Ie(+h.toFixed(4),e.text,this.legend.textStyle)},r.prototype.getSmartLegendLocation=function(e,t,i){var r;switch(this.position){case"Left":r=(e.x-t.width-i.left)/2,t.x=e.x-t.width<i.left?t.x:e.x-t.width-r;break;case"Right":r=(this.chart.availableSize.width-i.right-(e.x+e.width+t.width))/2,t.x=e.x+e.width+t.width>this.chart.availableSize.width-i.right?t.x:e.x+e.width+r;break;case"Top":this.getTitleRect(this.chart),r=(e.y-t.height-(this.titleRect.y+this.titleRect.height))/2,t.y=e.y-t.height<i.top?t.y:e.y-t.height-r;break;case"Bottom":r=(this.chart.availableSize.height-i.bottom-(e.y+e.height+t.height))/2,t.y=e.y+e.height+t.height>this.chart.availableSize.height-i.bottom?t.y:e.y+e.height+r}},r.prototype.getTitleRect=function(e){if(!e.title)return null;var t=i.measureText(e.title,e.titleStyle);this.titleRect=new i.Rect(e.availableSize.width/2-t.width/2,e.margin.top,t.width,t.height)},r.prototype.legendByIndex=function(e,t){for(var i=0,r=t;i<r.length;i++){var o=r[i];if(o.pointIndex===e)return o}return null},r.prototype.click=function(e){var i=e.target.id,r=this.chart,o=[this.legendID+"_text_",this.legendID+"_shape_",this.legendID+"_shape_marker_"];if(this.chart.accumulationSelectionModule)t.extend([],this.chart.accumulationSelectionModule.selectedDataIndexes,null,!0);this.chart.animateSeries=!1;for(var n=0,a=o;n<a.length;n++){var s=a[n];if(i.indexOf(s)>-1){var l=parseInt(i.split(s)[1],10);if(this.chart.legendSettings.toggleVisibility&&!isNaN(l)){var h=this.chart.visibleSeries[0],c=et(l,h.points),d=this.legendByIndex(l,this.legendCollections);c.visible=!c.visible,d.visible=c.visible,h.sumOfPoints+=c.visible?c.y:-c.y,r.redraw=r.enableAnimation,this.sliceVisibility(l,c.visible),r.removeSvg(),Ue(r),this.chart.refreshPoints(h.points),this.chart.renderElements()}else this.chart.accumulationSelectionModule&&!isNaN(l)&&this.chart.accumulationSelectionModule.legendSelection(this.chart,0,l)}}i.indexOf(this.legendID+"_pageup")>-1?this.changePage(e,!0):i.indexOf(this.legendID+"_pagedown")>-1&&this.changePage(e,!1),r.redraw=!1},r.prototype.sliceVisibility=function(e,t){var i=this.chart.element.id+"_Series_0_Point_";this.chart.visibleSeries[0].dataLabel.visible&&(i=this.chart.element.id+"_datalabel_Series_0_",this.sliceAnimate(he(i+"g_"+e),t))},r.prototype.sliceAnimate=function(e,i){if(!e)return null;new t.Animation({}).animate(e,{duration:300,delay:0,name:i?"FadeIn":"FadeOut",end:function(e){e.element.style.visibility=i?"visible":"hidden"}})},r.prototype.getModuleName=function(){return"AccumulationLegend"},r.prototype.destroy=function(){},r}(yr),ca=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),da=function(e){function r(t){var r=e.call(this,t)||this;if(r.rightSideRenderingPoints=[],r.leftSideRenderingPoints=[],r.id=t.element.id+"_datalabel_Series_",t.title){var o=i.measureText(t.title,t.titleStyle);r.titleRect=new i.Rect(t.availableSize.width/2-o.width/2,t.margin.top,o.width,o.height)}return r}return ca(r,e),r.prototype.getDataLabelPosition=function(e,t,i,r){var o=this.isCircular()?this.isVariousRadius()?this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0],e):this.accumulation.pieSeriesModule.labelRadius:this.getLabelDistance(e,t);this.getLabelRegion(e,t.position,i,o,this.marginValue),e.labelAngle=e.midAngle,e.labelPosition=t.position,this.accumulation.enableSmartLabels&&this.getSmartLabel(e,t,i,r)},r.prototype.getLabelRegion=function(e,t,r,o,n,a){void 0===a&&(a=0);var s=a||e.midAngle,l=M(s,o,this.isCircular()?this.center:this.getLabelLocation(e,t));l.y="Inside"===t?l.y-r.height/2:l.y,l.x="Inside"===t?l.x-r.width/2:l.x,e.labelRegion=new i.Rect(l.x,l.y,r.width+2*n,r.height+2*n),"Outside"===t&&(e.labelRegion.y-=e.labelRegion.height/2,s>=90&&s<=270?e.labelRegion.x-=e.labelRegion.width+10:e.labelRegion.x+=10)},r.prototype.getSmartLabel=function(e,t,r,o){var n=this.isCircular(),a=n?this.radius:this.getLabelDistance(e,t);a+=Be(n?t.connectorStyle.length||"4%":"0px",a);var s=this.findPreviousPoint(o,e.index,e.labelPosition);if("Inside"===t.position?(s&&s.labelRegion&&(Le(e.labelRegion,s.labelRegion)||this.isOverlapping(e,o))||!n&&!Re(e.region,e.labelRegion))&&(e.labelPosition="Outside",n||(a=this.getLabelDistance(e,t)),this.getLabelRegion(e,e.labelPosition,r,a,this.marginValue),(s=this.findPreviousPoint(o,e.index,e.labelPosition))&&(Le(e.labelRegion,s.labelRegion)||this.isConnectorLineOverlapping(e,s))&&this.setOuterSmartLabel(s,e,t.border.width,a,r,this.marginValue)):s&&s.labelRegion&&(Le(e.labelRegion,s.labelRegion)||this.isOverlapping(e,o)||this.isConnectorLineOverlapping(e,s))&&this.setOuterSmartLabel(s,e,t.border.width,a,r,this.marginValue),this.isOverlapping(e,o)&&("Pyramid"===this.accumulation.type||"Funnel"===this.accumulation.type)){var l=e.midAngle||0,h=n?this.radius:this.getLabelDistance(e,t),c=M(l,-h,this.isCircular()?this.center:this.getLabelLocation(e,"OutsideLeft"));e.labelRegion=new i.Rect(c.x,c.y,r.width+2*this.marginValue,r.height+2*this.marginValue),e.labelRegion.y-=e.labelRegion.height/2,e.labelRegion.x=e.labelRegion.x-10-e.labelRegion.width,s&&s.labelRegion&&(Le(e.labelRegion,s.labelRegion)||this.isOverlapping(e,o)||this.isConnectorLineOverlapping(e,s))&&this.setOuterSmartLabel(s,e,t.border.width,h,r,this.marginValue)}},r.prototype.move=function(e,t,i,r){var o=this;if(e.target.textContent.indexOf("...")>-1){var n=e.target.id.split(this.id);if(2===n.length){var a=parseInt(n[1].split("_text_")[0],10),s=parseInt(n[1].split("_text_")[1],10);if(!isNaN(a)&&!isNaN(s)){r&&m(this.accumulation.element.id+"_EJ2_Datalabel_Tooltip");var l=Ke(a,this.accumulation.visibleSeries).points[s];f(l.text||l.y.toString(),t,i,this.areaRect.width,this.accumulation.element.id+"_EJ2_Datalabel_Tooltip",he(this.accumulation.element.id+"_Secondary_Element"))}}}else m(this.accumulation.element.id+"_EJ2_Datalabel_Tooltip");r&&(clearTimeout(this.clearTooltip),this.clearTooltip=+setTimeout(function(){m(o.accumulation.element.id+"_EJ2_Datalabel_Tooltip")},1e3))},r.prototype.findPreviousPoint=function(e,t,i){for(var r=e[0],o=t-1;o>=0;o--)if((r=e[o]).visible&&r.labelVisible&&r.labelRegion&&r.labelPosition===i)return r;return null},r.prototype.isOverlapping=function(e,t){for(var i=e.index-1;i>=0;i--)if(t[i].visible&&t[i].labelVisible&&t[i].labelRegion&&e.labelRegion&&e.labelVisible&&Le(e.labelRegion,t[i].labelRegion))return!0;return!1},r.prototype.textTrimming=function(e,t,i,r){if(Le(e.labelRegion,t)){var o=e.labelRegion.width;"Right"===r?o=t.x-e.labelRegion.x:"Left"===r?(o=e.labelRegion.x-(t.x+t.width))<0&&(o+=e.labelRegion.width,e.labelRegion.x=t.x+t.width):"InsideRight"===r?o=t.x+t.width-e.labelRegion.x:"InsideLeft"===r?(o=e.labelRegion.x+e.labelRegion.width-t.x)<e.labelRegion.width&&(e.labelRegion.x=t.x):this.setPointVisibileFalse(e),e.labelVisible&&e.labelRegion&&(o<e.labelRegion.width&&(e.label=Ie(o-2*this.marginValue,e.label,i),e.labelRegion.width=o),3===e.label.length&&e.label.indexOf("...")>-1&&this.setPointVisibileFalse(e))}},r.prototype.setPointVisibileFalse=function(e){e.labelVisible=!1,e.labelRegion=null},r.prototype.setPointVisibleTrue=function(e){e.labelVisible=!0},r.prototype.setOuterSmartLabel=function(e,t,i,r,o,n){if(this.isCircular()){var a=this.getOverlappedAngle(e.labelRegion,t.labelRegion,t.midAngle,2*i);for(this.getLabelRegion(t,"Outside",o,r,n,a),a>t.endAngle&&(a=t.midAngle),t.labelAngle=a;t.labelVisible&&(Le(e.labelRegion,t.labelRegion)||a<=e.labelAngle||this.isConnectorLineOverlapping(t,e))&&!(a>t.endAngle);)t.labelAngle=a,this.getLabelRegion(t,"Outside",o,r,n,a),a+=.1}else this.setSmartLabelForSegments(t,e)},r.prototype.setSmartLabelForSegments=function(e,t){var i=e.labelRegion,r="Funnel"===this.accumulation.type?t.labelRegion.y-(i.y+i.height):e.labelRegion.y-(t.labelRegion.y+t.labelRegion.height);r<0&&(e.labelRegion.y+="Funnel"===this.accumulation.type?r:-r)},r.prototype.isConnectorLineOverlapping=function(e,t){var i;!this.isCircular()&&e.labelRegion.x<e.region.x&&(i="outsideLeft");var r=this.getLabelLocation(e,i),o=new Vi(0,0);this.getEdgeOfLabel(e.labelRegion,e.labelAngle,o,0,e);var n=this.getLabelLocation(t),a=new Vi(0,0);return this.getEdgeOfLabel(t.labelRegion,t.labelAngle,a,0,e),this.isLineRectangleIntersect(r,o,e.labelRegion)||this.isLineRectangleIntersect(r,o,t.labelRegion)||this.isLineRectangleIntersect(n,a,e.labelRegion)},r.prototype.isLineRectangleIntersect=function(e,t,i){var r=[new Vi(Math.round(i.x),Math.round(i.y)),new Vi(Math.round(i.x+i.width),Math.round(i.y)),new Vi(Math.round(i.x+i.width),Math.round(i.y+i.height)),new Vi(Math.round(i.x),Math.round(i.y+i.height))];e.x=Math.round(e.x),e.y=Math.round(e.y),t.x=Math.round(t.x),t.y=Math.round(t.y);for(var o=0;o<r.length;o++)if(this.isLinesIntersect(e,t,r[o],r[(o+1)%r.length]))return!0;return!1},r.prototype.isLinesIntersect=function(e,t,i,r){var o=t.y-e.y,n=e.x-t.x,a=o*e.x+n*e.y,s=r.y-i.y,l=i.x-r.x,h=s*i.x+l*i.y,c=o*l-s*n;if(0!==c){var d=(l*a-n*h)/c,p=(o*h-s*a)/c,u=Math.min(e.x,t.x)<=d&&d<=Math.max(e.x,t.x);return u=u&&Math.min(e.y,t.y)<=p&&p<=Math.max(e.y,t.y),u=u&&Math.min(i.x,r.x)<=d&&d<=Math.max(i.x,r.x),u=u&&Math.min(i.y,r.y)<=p&&p<=Math.max(i.y,r.y)}return!1},r.prototype.getOverlappedAngle=function(e,t,i,r){var o=e.x;return i>=90&&i<=270?(t.y=e.y-(r+t.height/2),o=e.x+e.width):t.y=e.y+e.height+r,O(this.center,new Vi(o,t.y))},r.prototype.getConnectorPath=function(e,t,i,r){void 0===r&&(r=0);var o=i.connectorStyle,n=this.isCircular()?this.isVariousRadius()?this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0],t):this.labelRadius:this.getLabelDistance(t,i),a=this.getConnectorStartPoint(t,o),s=this.accumulation.enableSmartLabels?t.midAngle:r||t.midAngle,l=new Vi(0,0),h=this.getEdgeOfLabel(e,s,l,o.width,t);if("Curve"===o.type){if(this.isCircular()){var c=n-(this.isVariousRadius()?Be(t.sliceRadius,this.accumulation.pieSeriesModule.seriesRadius):this.radius);return t.isLabelUpdated?l=this.getPerpendicularDistance(a,t):(l=M(s,n-c/2,this.center),"Outside"===t.labelPosition&&"Inside"===i.position&&(l=M(s,n-1.25*c,this.center))),"M "+a.x+" "+a.y+" Q "+l.x+" "+l.y+" "+h.x+" "+h.y}return this.getPolyLinePath(a,h)}return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" L "+h.x+" "+h.y},r.prototype.getPolyLinePath=function(e,t){var i=[e,t];if(e.y===t.y)return"M "+e.x+" "+e.y+" L "+t.x+" "+t.y;for(var r="M",o=0;o<=16;o++){var n=o/16,a=this.getBezierPoint(n,i,0,2);r+=a.x+","+a.y,16!==o&&(r+=" L")}return r},r.prototype.getBezierPoint=function(e,t,i,r){if(1===r)return t[i];var o=this.getBezierPoint(e,t,i,r-1),n=this.getBezierPoint(e,t,i+1,r-1),a=(o.x,o.x),s=(o.y,o.y),l=(1-e)*a+e*(n.x,n.x),h=(1-e)*s+e*(n.y,n.y);return o.x,{x:l,y:h}},r.prototype.getEdgeOfLabel=function(e,t,i,r,o){void 0===r&&(r=1);var n=new Vi(e.x,e.y);return t>=90&&t<=270?(n.x+=e.width+r/2,n.y+=e.height/2,i.x=n.x+10,i.y=n.y):o&&o.region&&o.region.x>o.labelRegion.x?(n.x+=2*r+e.width,n.y+=e.height/2,i.x=n.x+10,i.y=n.y):(n.x-=r/2,n.y+=e.height/2,i.x=n.x-10,i.y=n.y),n},r.prototype.getLabelDistance=function(e,t){if(e.labelPosition&&t.position!==e.labelPosition||t.connectorStyle.length){var i=Be(t.connectorStyle.length||"70px",this.accumulation.initialClipRect.width);if(i<this.accumulation.initialClipRect.width)return i}var r,o=e.labelPosition||t.position,n=this.accumulation.visibleSeries[0],a=(this.accumulation.initialClipRect.width-n.triangleSize.width)/2;switch(o){case"Inside":return 0;case"Outside":return r=e.symbolLocation.x+e.labelOffset.x,this.accumulation.initialClipRect.width-r-a}},r.prototype.getLabelLocation=function(e,t){if(void 0===t&&(t="Outside"),"Pie"!==this.accumulation.type){t="OutsideLeft"===t?"OutsideLeft":e.labelPosition||t;var i={x:e.symbolLocation.x,y:e.symbolLocation.y-e.labelOffset.y};switch(t){case"Inside":i.y=e.region.y+e.region.height/2;break;case"Outside":i.x+=e.labelOffset.x;break;case"OutsideLeft":i.x-=e.labelOffset.x}return i}return M(e.midAngle,this.isVariousRadius()?Be(e.sliceRadius,this.accumulation.pieSeriesModule.seriesRadius):this.radius,this.center)},r.prototype.getConnectorStartPoint=function(e,t){var i;return!this.isCircular()&&e.region.x>e.labelRegion.x&&(i="OutsideLeft"),this.isCircular()?M(e.midAngle,(this.isVariousRadius()?Be(e.sliceRadius,this.accumulation.pieSeriesModule.seriesRadius):this.radius)-t.width,this.center):this.getLabelLocation(e,i)},r.prototype.findAreaRect=function(){this.areaRect=new i.Rect(0,0,this.accumulation.availableSize.width,this.accumulation.availableSize.height);var e=this.accumulation.margin;L(this.areaRect,new Hi(e.left,e.right,e.top,e.bottom))},r.prototype.renderDataLabel=function(e,i,r,o,n,a,s){var l=this.accumulation.element.id+"_datalabel_Series_"+n+"_",h=this.accumulation.renderer.createGroup({id:l+"g_"+e.index});e.label=e.originalText||e.y.toString();var c={width:i.border.width,color:i.border.color},d=t.extend({},t.getValue("properties",i.font),null,!0),p={cancel:!1,name:"textRender",series:this.accumulation.visibleSeries[0],point:e,text:e.label,border:c,color:i.fill,template:i.template,font:d};this.accumulation.trigger("textRender",p),e.argsData=p;var u=null!==p.template;e.labelVisible=!p.cancel,e.text=e.label=p.text,Number(e.label)&&(e.label=this.accumulation.intl.formatNumber(+e.label,{useGrouping:this.accumulation.useGroupingSeparator})),this.marginValue=p.border.width?5+p.border.width:1;var g=t.createElement("div",{id:this.accumulation.element.id+"_Series_0_DataLabel_"+e.index,styles:"position: absolute;background-color:"+p.color+";"+ge(i.font)+";border:"+p.border.width+"px solid "+p.border.color+";"});this.calculateLabelSize(u,g,e,o,p,h,l,i,s)},r.prototype.calculateLabelSize=function(e,t,r,o,n,a,s,l,h,c,d){var p=e?d?{width:c.width,height:c.height}:this.getTemplateSize(t,r,n,h,e,o,a,s,l):i.measureText(r.label,l.font);p.height+=4,p.width+=4,r.textSize=p,r.templateElement=t,this.getDataLabelPosition(r,l,p,o),r.labelRegion&&this.correctLabelRegion(r.labelRegion,r.textSize)},r.prototype.drawDataLabels=function(e,r,o,n,a){var s,l,h=e.leftSidePoints.concat(e.rightSidePoints);h.sort(function(e,t){return e.index-t.index}),"Pie"===e.type&&this.accumulation.enableSmartLabels&&this.extendedLabelsCalculation();for(var c=0,d=h;c<d.length;c++){var p=d[c];if(!t.isNullOrUndefined(p.argsData)&&!t.isNullOrUndefined(p.y)){this.finalizeDatalabels(p,h,r);var u=this.accumulation.element.id+"_datalabel_Series_0_",g=this.accumulation.renderer.createGroup({id:u+"g_"+p.index}),y=void 0,m=void 0;if(p.visible&&p.labelVisible){if(s=l=r.angle,p.argsData.template)this.setTemplateStyle(p.templateElement,p,n,r.font.color,p.color,a);else{y=new Vi(p.labelRegion.x+this.marginValue,p.labelRegion.y+3*p.textSize.height/4+this.marginValue);var v=(m=he(u+"shape_"+p.index))?new Vi(+m.getAttribute("x"),+m.getAttribute("y")):null;be(!1,g,this.accumulation.renderer.drawRectangle(new Di(u+"shape_"+p.index,p.argsData.color,p.argsData.border,1,p.labelRegion,r.rx,r.ry)),a,!0,"x","y",v,null,!1,!1,null,this.accumulation.duration);var f=p.textSize.width,b=p.textSize.height,x=void 0;x=0!==s&&r.enableRotation?"rotate("+(l="Outside"===p.labelPosition?0:p.midAngle>=90&&p.midAngle<=270?p.midAngle+180:p.midAngle)+","+(y.x+f/2)+","+(y.y-b/4)+")":"rotate("+(l=s?s>360?s-360:s<-360?s+360:s:0)+","+(y.x+f/2)+","+y.y+")",p.transform=x,Ve(this.accumulation.renderer,new i.TextOption(u+"text_"+p.index,y.x,y.y,"start",p.label,x,"auto",l),p.argsData.font,p.argsData.font.color||this.getSaturatedColor(p,p.argsData.color),g,!1,a,!0,!1,this.accumulation.duration),m=null}if(this.accumulation.accumulationLegendModule&&("Outside"===r.position||this.accumulation.enableSmartLabels)&&this.accumulation.visibleSeries[0].findMaxBounds(this.accumulation.visibleSeries[0].labelBound,p.labelRegion),"Outside"===p.labelPosition){var w=he(u+"connector_"+p.index),S=w?w.getAttribute("d"):"";be(!1,g,this.accumulation.renderer.drawPath(new i.PathOption(u+"connector_"+p.index,"transparent",r.connectorStyle.width,r.connectorStyle.color||p.color,1,r.connectorStyle.dashArray,this.getConnectorPath(t.extend({},p.labelRegion,null,!0),p,r,p.labelAngle))),a,!0,null,null,null,S,!1,!1,null,this.accumulation.duration)}be(!1,o,g,a)}}}},r.prototype.finalizeDatalabels=function(e,t,r){if((this.isOverlapping(e,t)||this.titleRect&&e.labelRegion&&Le(e.labelRegion,this.titleRect))&&this.isCircular()&&"Outside"===e.labelPosition&&this.setPointVisibileFalse(e),this.accumulation.accumulationLegendModule&&e.labelVisible&&e.labelRegion){var o=this.accumulation.accumulationLegendModule.legendBounds,n=this.accumulation.legendSettings.border.width/2;this.textTrimming(e,new i.Rect(o.x-n,o.y-n,o.width+2*n,o.height+2*n),r.font,this.accumulation.accumulationLegendModule.position)}if(e.labelVisible&&e.labelRegion){var a=this.isCircular()?e.labelRegion.x>=this.center.x?"InsideRight":"InsideLeft":e.labelRegion.x>=e.region.x?"InsideRight":"InsideLeft";this.textTrimming(e,this.areaRect,r.font,a)}e.labelVisible&&e.labelRegion&&(e.labelRegion.y+e.labelRegion.height>this.areaRect.y+this.areaRect.height||e.labelRegion.y<this.areaRect.y||e.labelRegion.x<this.areaRect.x||e.labelRegion.x+e.labelRegion.width>this.areaRect.x+this.areaRect.width)&&this.setPointVisibileFalse(e)},r.prototype.getTemplateSize=function(e,t,i,r,o,n,a,s,l){var h=ye(e=ue(e,t.index,i.template,this.accumulation,t,this.accumulation.visibleSeries[0],this.accumulation.element.id+"_DataLabel",0,i,o,n,a,s,l,r),r);return{width:h.width,height:h.height}},r.prototype.setTemplateStyle=function(e,t,i,r,o,n){if(e.style.left=t.labelRegion.x+"px",e.style.top=t.labelRegion.y+"px",e.style.color=r||this.getSaturatedColor(t,o),this.accumulation.isBlazor){var a=this.isCircular()?t.labelRegion.x>=this.center.x?"InsideRight":"InsideLeft":t.labelRegion.x>=t.region.x?"InsideRight":"InsideLeft";e.style.transform="InsideRight"===a?"translate(0%, -50%)":"translate(-100%, -50%)"}e.childElementCount&&(be(!1,i,e,n,!0,"left","top"),this.doTemplateAnimation(this.accumulation,e))},r.prototype.getSaturatedColor=function(e,t){var i,r=ke(_e(i="transparent"===(i=this.marginValue>=1?"transparent"===t?this.getLabelBackground(e):t:this.getLabelBackground(e))?window.getComputedStyle(document.body,null).backgroundColor:i));return Math.round((299*r.r+587*r.g+114*r.b)/1e3)>=128?"black":"white"},r.prototype.doTemplateAnimation=function(e,t){var i=e.visibleSeries[0],r=i.animation.delay+i.animation.duration;i.animation.enable&&e.animateSeries&&(t.style.visibility="hidden",oe(t,r,200,"ZoomIn"))},r.prototype.getLabelBackground=function(e){return"Outside"===e.labelPosition?this.accumulation.background||this.accumulation.themeStyle.background:e.color},r.prototype.correctLabelRegion=function(e,t,i){void 0===i&&(i=4),e.height-=i,e.width-=i,e.x+=i/2,e.y+=i/2,t.height-=i,t.width-=i},r.prototype.getModuleName=function(){return"AccumulationDataLabel"},r.prototype.destroy=function(){},r.prototype.extendedLabelsCalculation=function(){var e=this,t=this.accumulation.series[0];t.rightSidePoints.forEach(function(t,i,r){t.initialLabelRegion=t.labelRegion,t.isLabelUpdated=0,e.skipPoints(t,r,i)}),t.leftSidePoints.forEach(function(t,i,r){t.initialLabelRegion=t.labelRegion,t.isLabelUpdated=0,e.skipPoints(t,r,i)}),this.arrangeLeftSidePoints(t),this.isIncreaseAngle=!1,this.arrangeRightSidePoints(t)},r.prototype.arrangeRightSidePoints=function(e){var t,i,r=e.rightSidePoints.filter(function(e){return e.labelVisible&&"Outside"===e.labelPosition});this.rightSideRenderingPoints=r;var o,n,a,s=r[r.length-1];s&&s.labelAngle>90&&s.labelAngle<270&&(this.isIncreaseAngle=!0,this.changeLabelAngle(s,89));for(var l=r.length-1;l>=0;l--)if(n=r[l],a=r[l+1],this.isOverlapWithNext(n,r,l)&&n.labelVisible||!(n.labelAngle<=90||n.labelAngle>=270))if(o=s.labelAngle+10,i=!0,t?this.isIncreaseAngle=!1:o>90&&o<270&&a.isLabelUpdated&&(this.isIncreaseAngle=!0),this.isIncreaseAngle)for(h=l+1;h>0;h--)this.decreaseAngle(r[h],r[h-1],e,!0);else for(var h=l+1;h<r.length;h++)this.increaseAngle(r[h-1],r[h],e,!0);else i&&a&&!a.isLabelUpdated&&(t=!0)},r.prototype.arrangeLeftSidePoints=function(e){var t=this,i=e.leftSidePoints.filter(function(e){return e.labelVisible&&"Outside"===e.labelPosition});this.leftSideRenderingPoints=i;for(var r,o,n,a,s=0;s<i.length;s++)if(o=i[s],r=i[s-1],this.isOverlapWithPrevious(o,i,s)&&o.labelVisible||!(o.labelAngle<270))if(n=!0,a&&(this.isIncreaseAngle=!1),this.isIncreaseAngle)for(l=s;l<i.length;l++)this.increaseAngle(i[l-1],i[l],e,!1);else for(var l=s;l>0;l--)this.decreaseAngle(i[l],i[l-1],e,!1),i.filter(function(e,r){e.isLabelUpdated&&i[r].labelAngle-10<100&&(t.isIncreaseAngle=!0)});else n&&r&&r.isLabelUpdated&&(a=!0)},r.prototype.decreaseAngle=function(e,i,r,o){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i))return null;var n=1;if(o)for(;Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&!(i.labelRegion.height+i.labelRegion.y<e.labelRegion.y);){if((a=i.midAngle-n)<0&&(a=360+a),a<=270&&a>=90){a=270,this.isIncreaseAngle=!0;break}this.changeLabelAngle(i,a),n++}else for(e.labelAngle>270&&(this.changeLabelAngle(e,270),i.labelAngle=270);Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&e.labelRegion.y+e.labelRegion.height>i.labelRegion.y;){var a=i.midAngle-n;if(!(a<=270&&a>=90)){a=90,this.isIncreaseAngle=!0;break}if(this.changeLabelAngle(i,a),Le(e.labelRegion,i.labelRegion)&&!r.leftSidePoints.indexOf(i)&&a-1<90&&a-1>270){this.changeLabelAngle(e,e.labelAngle+1),this.arrangeLeftSidePoints(r);break}n++}},r.prototype.increaseAngle=function(e,i,r,o){if(t.isNullOrUndefined(e)||t.isNullOrUndefined(i))return null;var n=1;if(o)for(;Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&!(e.labelRegion.y+e.labelRegion.height<i.labelRegion.y);){if((a=i.midAngle+n)<270&&a>90){a=90,this.isIncreaseAngle=!0;break}if(this.changeLabelAngle(i,a),Le(e.labelRegion,i.labelRegion)&&a+1>90&&a+1<270&&this.rightSideRenderingPoints.indexOf(i)===this.rightSideRenderingPoints.length-1){this.changeLabelAngle(e,e.labelAngle-1),i.labelRegion=i.initialLabelRegion,this.arrangeRightSidePoints(r);break}n++}else for(;Le(e.labelRegion,i.labelRegion)||!this.isVariousRadius()&&e.labelRegion.y<i.labelRegion.y+i.labelRegion.height;){var a=i.midAngle+n;if(!(a<270&&a>90)){a=270,this.isIncreaseAngle=!1;break}this.changeLabelAngle(i,a),n++}},r.prototype.changeLabelAngle=function(e,t){var i,r=this.accumulation.series[0].dataLabel;this.isVariousRadius()&&(i=this.accumulation.pieSeriesModule.getLabelRadius(this.accumulation.visibleSeries[0],e));var o="Outside"===e.labelPosition&&this.accumulation.enableSmartLabels&&"Inside"===r.position?this.radius+Be(r.connectorStyle.length||"4%",this.accumulation.pieSeriesModule.size/2):this.isVariousRadius()?i:this.accumulation.pieSeriesModule.labelRadius+10,n=this.isVariousRadius()?i:o;this.getLabelRegion(e,"Outside",e.textSize,n,this.marginValue,t),e.isLabelUpdated=1,e.labelAngle=t},r.prototype.isOverlapWithPrevious=function(e,t,i){for(var r=0;r<i;r++)if(r!==t.indexOf(e)&&t[r].visible&&t[r].labelVisible&&t[r].labelRegion&&e.labelRegion&&e.labelVisible&&Le(e.labelRegion,t[r].labelRegion))return!0;return!1},r.prototype.isOverlapWithNext=function(e,t,i){for(var r=i;r<t.length;r++)if(r!==t.indexOf(e)&&t[r].visible&&t[r].labelVisible&&t[r].labelRegion&&e.labelRegion&&e.labelVisible&&Le(e.labelRegion,t[r].labelRegion))return!0;return!1},r.prototype.skipPoints=function(e,t,i){if(i>0&&(e.midAngle<285&&e.midAngle>255||e.midAngle<105&&e.midAngle>75)){var r=t[i-1],o=e.endAngle%360-e.startAngle%360;(s=r.endAngle%360-r.startAngle%360)<=o&&o<5&&r.labelVisible&&this.setPointVisibleTrue(e)}else if(i>1&&(e.midAngle<300&&e.midAngle>240||e.midAngle<120&&e.midAngle>60)){var n=t[i-1],a=t[i-2],o=e.endAngle%360-e.startAngle%360,s=n.endAngle%360-n.startAngle%360,l=a.endAngle%360-a.startAngle%360;o<3&&s<3&&l<3&&n.labelVisible&&e.labelVisible&&this.setPointVisibleTrue(e)}},r.prototype.getPerpendicularDistance=function(e,t){var i=10+10*Math.sin(t.midAngle*Math.PI/360);return t.midAngle>270&&t.midAngle<360?new Vi(e.x+i*Math.cos((360-t.midAngle)*Math.PI/180),e.y-i*Math.sin((360-t.midAngle)*Math.PI/180)):t.midAngle>0&&t.midAngle<90?new Vi(e.x+i*Math.cos(t.midAngle*Math.PI/180),e.y+i*Math.sin(t.midAngle*Math.PI/180)):t.midAngle>0&&t.midAngle<90?new Vi(e.x-i*Math.cos((t.midAngle-90)*Math.PI/180),e.y+i*Math.sin((t.midAngle-90)*Math.PI/180)):new Vi(e.x-i*Math.cos((t.midAngle-180)*Math.PI/180),e.y-i*Math.sin((t.midAngle-180)*Math.PI/180))},r}(Zn),pa=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ua=function(e){function i(t){var i=e.call(this,t)||this;return i.accumulation=t,i.addEventListener(),i}return pa(i,e),i.prototype.addEventListener=function(){this.accumulation.isDestroyed||(this.accumulation.on(t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeaveHandler,this),this.accumulation.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.accumulation.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},i.prototype.mouseLeaveHandler=function(e){this.removeTooltip(this.accumulation.tooltip.fadeOutDuration)},i.prototype.mouseUpHandler=function(e){var t=this.accumulation;t.tooltip.enable&&t.isTouch&&j(t.mouseX,t.mouseY,t.initialClipRect)&&(this.tooltip(e),this.removeTooltip(2e3))},i.prototype.mouseMoveHandler=function(e){var t=this.accumulation;t.tooltip.enable&&j(t.mouseX,t.mouseY,t.initialClipRect)&&this.tooltip(e)},i.prototype.tooltip=function(e){var t=this.getElement(this.element.id+"_tooltip_svg"),i=t&&parseInt(t.getAttribute("opacity"),10)>0,r=this.getTooltipElement(i);this.renderSeriesTooltip(e,this.accumulation,!i,r)},i.prototype.renderSeriesTooltip=function(e,t,i,r){var o=this.getPieData(e,t,t.mouseX,t.mouseY);t.initialClipRect;if(this.currentPoints=[],!o.point||this.previousPoints[0]&&this.previousPoints[0].point===o.point)!o.point&&this.isRemove&&(this.removeTooltip(this.accumulation.tooltip.fadeOutDuration),this.isRemove=!1);else{if(this.previousPoints[0]&&o.point.index===this.previousPoints[0].point.index&&o.series.index===this.previousPoints[0].series.index)return null;this.pushData(o,i,r,!1)&&this.triggerTooltipRender(o,i,this.getTooltipText(o,t.tooltip),this.findHeader(o))}},i.prototype.triggerTooltipRender=function(e,i,r,o,n){var a=this;void 0===n&&(n=!0);var s={cancel:!1,name:"tooltipRender",text:r,point:e.point,textStyle:this.textStyle,series:this.accumulation.isBlazor?{}:e.series,headerText:o,data:{pointX:e.point.x,pointY:e.point.y,seriesIndex:e.series.index,pointIndex:e.point.index,pointText:e.point.text,seriesName:e.series.name}},l=function(r){r.cancel?(a.removeHighlight(),t.remove(a.getElement(a.element.id+"_tooltip"))):(a.formattedText=a.formattedText.concat(r.text),a.text=a.formattedText,a.headerText=r.headerText,a.createTooltip(a.chart,i,e.point.symbolLocation,e.series.clipRect,e.point,["Circle"],0,a.chart.initialClipRect,null,e.point,a.accumulation.tooltip.template?r.template:"")),a.isRemove=!0};l.bind(this,e),this.chart.trigger("tooltipRender",s,l)},i.prototype.getPieData=function(e,i,r,o){var n=D(e.target.id,!0);if(!isNaN(n.series)){var a=n.series,s=n.point;if(!(t.isNullOrUndefined(a)||isNaN(a)||t.isNullOrUndefined(s)||isNaN(s))){var l=this.getSeriesFromIndex(a,i.visibleSeries);if(l.enableTooltip)return new Gi(l.points[s],l)}}return new Gi(null,null)},i.prototype.getSeriesFromIndex=function(e,t){return t[0]},i.prototype.getTooltipText=function(e,t){var i=e.series,r=this.accumulation.useGroupingSeparator?"${point.x} : <b>${point.separatorY}</b>":"${point.x} : <b>${point.y}</b>";return r=t.format?t.format:r,this.parseTemplate(e.point,i,r)},i.prototype.findHeader=function(e){return""===this.header?"":(this.header=this.parseTemplate(e.point,e.series,this.header),""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()?this.header:"")},i.prototype.parseTemplate=function(e,t,i){for(var r,o,n=0,a=Object.keys(e);n<a.length;n++){h=a[n];r=new RegExp("${point."+h+"}","gm"),i=i.replace(r.source,e[h])}for(var s=0,l=Object.keys(Object.getPrototypeOf(t));s<l.length;s++){var h=l[s];r=new RegExp("${series."+h+"}","gm"),o=t[h],i=i.replace(r.source,o)}return i},i.prototype.getModuleName=function(){return"AccumulationTooltip"},i.prototype.destroy=function(e){},i}(dn),ga=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ya=function(e){function i(t){var i=e.call(this,t)||this;return i.renderer=t.renderer,i}return ga(i,e),i.prototype.initPrivateVariables=function(e){this.styleId=e.element.id+"_ej2_chart_selection",this.unselected=e.element.id+"_ej2_deselected",this.selectedDataIndexes=[],this.rectPoints=null},i.prototype.invokeSelection=function(e){this.initPrivateVariables(e),this.series=t.extend({},e.visibleSeries,null,!0),this.seriesStyles(),this.selectDataIndex(this.concatIndexes(e.selectedDataIndexes,this.selectedDataIndexes),e)},i.prototype.generateStyle=function(e){return e.selectionStyle||this.styleId+"_series_"+e.index},i.prototype.findElements=function(e,t,i){return[this.getElementByIndex(i)]},i.prototype.getElementByIndex=function(e){var t=this.control.element.id+"_Series_"+e.series+"_Point_"+e.point;return document.getElementById(t)},i.prototype.calculateSelectedElements=function(e,t){-1!==t.target.id.indexOf(e.element.id+"_")&&(t.target.id.indexOf("_Series_")>-1||t.target.id.indexOf("_datalabel_")>-1)&&this.performSelection(D(t.target.id),e,t.target)},i.prototype.performSelection=function(e,t,i){switch(i=i.id.indexOf("datalabel")>-1?t.getSeriesElement().childNodes[e.series].childNodes[e.point]:i,t.selectionMode){case"Point":isNaN(e.point)||(this.selection(t,e,[i]),this.blurEffect(t.element.id,t.visibleSeries))}},i.prototype.selection=function(e,i,r){e.isMultiSelect||this.removeMultiSelectEelments(e,this.selectedDataIndexes,i,e.series);var o=r[0]&&(r[0].getAttribute("class")||"");if(r[0]&&o.indexOf(this.getSelectionClass(r[0].id))>-1){if(this.removeStyles(r,i),this.addOrRemoveIndex(this.selectedDataIndexes,i),e.enableBorderOnMouseMove){n=document.getElementById(r[0].id.split("_")[0]+"PointHover_Border");t.isNullOrUndefined(n)||this.removeSvgClass(n,n.getAttribute("class"))}}else{if(this.applyStyles(r,i),e.enableBorderOnMouseMove){var n=document.getElementById(r[0].id.split("_")[0]+"PointHover_Border");t.isNullOrUndefined(n)||this.addSvgClass(n,r[0].getAttribute("class"))}this.addOrRemoveIndex(this.selectedDataIndexes,i,!0)}},i.prototype.redrawSelection=function(e){var i=t.extend([],this.selectedDataIndexes,null,!0);this.removeSelectedElements(e,this.selectedDataIndexes),this.blurEffect(e.element.id,e.visibleSeries),this.selectDataIndex(i,e)},i.prototype.removeSelectedElements=function(e,t){for(var i=0,r=t;i<r.length;i++){var o=r[i];this.removeStyles([this.getElementByIndex(o)],o)}},i.prototype.legendSelection=function(e,t,i){var r=e.getSeriesElement().childNodes[t].childNodes[i];this.selection(e,new Jt(t,i),[r]),this.blurEffect(e.element.id,e.visibleSeries)},i.prototype.selectDataIndex=function(e,t){for(var i,r=0,o=e;r<o.length;r++){var n=o[r];(i=this.getElementByIndex(n))&&this.performSelection(n,t,i)}},i.prototype.removeMultiSelectEelments=function(e,t,i,r){for(var o,n=0;n<t.length;n++)o=r[t[n].series],this.checkEquals(t[n],i)||(this.removeStyles(this.findElements(e,o,t[n]),t[n]),t.splice(n,1),n--)},i.prototype.blurEffect=function(e,t){for(var i=this.checkPointVisibility(this.selectedDataIndexes),r=0,o=t;r<o.length;r++){var n=o[r];n.visible&&this.checkSelectionElements(document.getElementById(e+"_SeriesCollection"),this.generateStyle(n),i)}},i.prototype.checkSelectionElements=function(e,t,i){for(var r,o,n,a=e.childNodes[0].childNodes,s=0;s<a.length;s++)o=a[s].getAttribute("class")||"",n=a[s].parentNode.getAttribute("class")||"",-1===o.indexOf(t)&&-1===n.indexOf(t)&&i?this.addSvgClass(a[s],this.unselected):this.removeSvgClass(a[s],this.unselected),this.control.accumulationLegendModule&&this.control.legendSettings.visible&&(r=document.getElementById(this.control.element.id+"_chart_legend_shape_"+s))&&(-1===o.indexOf(t)&&-1===n.indexOf(t)&&i?this.addSvgClass(r,this.unselected):this.removeSvgClass(r,this.unselected))},i.prototype.applyStyles=function(e,t){for(var i=this.control.accumulationTooltipModule,r=0,o=e;r<o.length;r++){var n=o[r],a=void 0;if(n){this.control.accumulationLegendModule&&this.control.legendSettings.visible&&(a=document.getElementById(this.control.element.id+"_chart_legend_shape_"+t.point),this.removeSvgClass(a,this.unselected),this.addSvgClass(a,this.getSelectionClass(a.id))),this.removeSvgClass(n.parentNode,this.unselected),this.removeSvgClass(n,this.unselected);var s=i&&i.previousPoints.length>0&&i.previousPoints[0].point.index!==t.point?i.svgTooltip.opacity:this.series[t.series].opacity;n.setAttribute("opacity",s.toString()),this.addSvgClass(n,this.getSelectionClass(n.id))}}},i.prototype.getSelectionClass=function(e){return this.generateStyle(this.control.series[D(e).series])},i.prototype.removeStyles=function(e,t){for(var i,r=this.control.accumulationTooltipModule,o=0,n=e;o<n.length;o++){var a=n[o];if(a){this.control.accumulationLegendModule&&this.control.legendSettings.visible&&(i=document.getElementById(this.control.element.id+"_chart_legend_shape_"+t.point),this.removeSvgClass(i,this.getSelectionClass(i.id)));var s=r&&r.previousPoints[0].point.index===t.point?r.svgTooltip.opacity:this.series[t.series].opacity;a.setAttribute("opacity",s.toString()),this.removeSvgClass(a,this.getSelectionClass(a.id))}}},i.prototype.addOrRemoveIndex=function(e,t,i){for(var r=0;r<e.length;r++)this.checkEquals(e[r],t)&&(e.splice(r,1),r--);i&&e.push(t)},i.prototype.checkEquals=function(e,t){return e.point===t.point&&e.series===t.series},i.prototype.checkPointVisibility=function(e){for(var t=!1,i=0,r=e;i<r.length;i++)if(et(r[i].point,this.control.visibleSeries[0].points).visible){t=!0;break}return t},i.prototype.getModuleName=function(){return"AccumulationSelection"},i.prototype.destroy=function(){},i}(mn),ma=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),va=function(e){function i(t){var i=e.call(this,t)||this;return i.pie=t,i}return ma(i,e),i.prototype.renderAnnotations=function(e){var i=this;this.annotations=this.pie.annotations;var r=this.pie.redraw;this.parentElement=Ne(r,this.pie.element.id+"_Annotation_Collections")||t.createElement("div",{id:this.pie.element.id+"_Annotation_Collections"}),this.annotations.map(function(e,t){i.processAnnotation(e,t,i.parentElement)}),fe(this.parentElement,e,r)},i.prototype.getModuleName=function(){return"Annotation"},i.prototype.destroy=function(){},i}(Rn),fa=function(){function e(e,t,i,r,o){void 0===o&&(o=!0),this.x=e,this.y=t,this.xValue=i,this.visible=o}return e}(),ba=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xa=function(e){function o(t){var i=e.call(this)||this;return i.dataSource=t.dataSource,i.xName=t.xName,i.yName=t.yName,i.query=t.query,i.xMin=1/0,i.xMax=-1/0,i.yMin=1/0,i.yMax=-1/0,i}return ba(o,e),o.prototype.renderChart=function(e){var t,i,r=this;this.seriesLength=0,e.rangeSlider.points=[],e.series.length?e.series.map(function(o){t=o.dataSource||e.dataSource,i=o.query||e.query,o.points=[],r.processDataSource(t,i,e,o)}):this.processDataSource(e.dataSource,e.query,e)},o.prototype.processDataSource=function(e,i,o,n){var a=this;if(!(e instanceof r.DataManager)&&!t.isNullOrUndefined(e)&&t.isNullOrUndefined(i))return void this.dataManagerSuccess({result:e,count:e.length},o,n);o.dataModule=new ar(e,i),o.dataModule.getData(o.dataModule.generateQuery().requiresCount()).then(function(e){return a.dataManagerSuccess(e,o,n)})},o.prototype.dataManagerSuccess=function(e,t,i){var r=e.count?e.result:[];t.allowServerDataBinding=!1,this.processJsonData(r,t,Object.keys(r).length,i),this.seriesLength+=i?1:this.seriesLength,i&&this.seriesLength!==t.series.length||(this.processXAxis(t),this.calculateGroupingBounds(t),this.processYAxis(t),t.renderChart())},o.prototype.processJsonData=function(e,i,o,n){for(var a,s=0,l=n&&n.xName||i.xName,h=n&&n.yName||i.yName;s<o;){if(a=new fa(t.getValue(l,e[s]),t.getValue(h,e[s])),a.yValue=i.isBlazor&&t.isNullOrUndefined(a.y)?0:+a.y,"DateTime"===i.valueType){var c=i.intl.getDateParser({skeleton:"full",type:"dateTime"}),d=i.intl.getDateFormat({skeleton:"full",type:"dateTime"});a.x=new Date(r.DataUtil.parse.parseJson({val:a.x}).val),a.xValue=i.isBlazor?Date.parse(a.x.toString()):Date.parse(c(d(a.x)))}else a.xValue=i.isBlazor&&t.isNullOrUndefined(a.x)?0:+a.x;n&&n.points.push(a),this.xMin=Math.min(this.xMin,a.xValue),this.yMin=Math.min(this.yMin,a.yValue),this.xMax=Math.max(this.xMax,a.xValue),this.yMax=Math.max(this.yMax,a.yValue),i.rangeSlider.points.push(a),s++}},o.prototype.processXAxis=function(e){var t={minimum:e.minimum,maximum:e.maximum,interval:e.interval,valueType:e.valueType,isInversed:e.enableRtl,labelFormat:e.labelFormat,logBase:e.logBase,skeleton:e.skeleton,skeletonType:e.skeletonType};this.xAxis=t,this.xAxis.intervalType=e.intervalType,this.xAxis.maximumLabels=3,this.xAxis.skeleton=e.skeleton,this.xAxis.intervalDivs=[10,5,2,1],this.xAxis.rect=e.bounds,this.xAxis.visibleLabels=[],this.xAxis.orientation="Horizontal";var i=e[G(e.valueType)+"Module"];i.min=this.xMin,i.max=this.xMax,i.getActualRange(this.xAxis,e.bounds),"Double"!==this.xAxis.valueType&&"DateTime"!==this.xAxis.valueType||i.updateActualRange(this.xAxis,this.xAxis.actualRange.min,this.xAxis.actualRange.max,this.xAxis.actualRange.interval),this.xAxis.actualRange.delta=this.xAxis.actualRange.max-this.xAxis.actualRange.min,this.xAxis.visibleRange=this.xAxis.actualRange,i.calculateVisibleLabels(this.xAxis,e)},o.prototype.processYAxis=function(e){var t={majorGridLines:{width:0},rangePadding:"None",majorTickLines:{width:0},labelStyle:{size:"0"},visible:!1,valueType:"Double",minimum:null,maximum:null,interval:null};this.yAxis=t,this.yAxis.rect=e.bounds,this.yAxis.maximumLabels=3,this.yAxis.intervalDivs=[10,5,2,1],this.yAxis.orientation="Vertical",e.doubleModule.min=this.yMin,e.doubleModule.max=this.yMax,e.doubleModule.getActualRange(this.yAxis,e.bounds),e.doubleModule.updateActualRange(this.yAxis,this.yAxis.actualRange.min,this.yAxis.actualRange.max,this.yAxis.actualRange.interval),this.yAxis.actualRange.delta=this.yAxis.actualRange.max-this.yAxis.actualRange.min,this.yAxis.visibleRange=this.yAxis.actualRange},o.prototype.renderSeries=function(e){var t=this;this.chartGroup=e.renderer.createGroup({id:e.element.id+"_chart"});var i=h(e.theme);e.series.map(function(r,o){(!e.stockChart||e.stockChart.series[o].visible)&&(r.xAxis=t.xAxis,r.yAxis=t.yAxis,r.chart=e,r.index=o,r.xAxis.isInversed=e.enableRtl,r.interior=r.fill||i[o%i.length],t.createSeriesElement(e,r,o),e[G(r.type)+"SeriesModule"]?e[G(r.type)+"SeriesModule"].render(r,t.xAxis,t.yAxis,!1):e.lineSeriesModule.render(r,t.xAxis,t.yAxis,!1),t.chartGroup.appendChild(r.seriesElement),r.animation.enable&&e.animateSeries&&e[G(r.type)+"SeriesModule"]&&e[G(r.type)+"SeriesModule"].doAnimation(r))})},o.prototype.appendSeriesElements=function(e){e.svgObject.appendChild(this.chartGroup),e.series.length&&this.drawSeriesBorder(e)},o.prototype.createSeriesElement=function(e,t,r){var o=e.element.id;t.clipRect=new i.Rect(this.xAxis.rect.x,this.yAxis.rect.y,this.xAxis.rect.width,this.yAxis.rect.height),t.clipRectElement=e.renderer.drawClipPath(new Di(o+"_RangeSeriesClipRect_"+r,"transparent",{width:1,color:"Gray"},1,{x:0,y:0,width:t.clipRect.width,height:t.clipRect.height})),t.seriesElement=e.renderer.createGroup({id:o+"SeriesGroup"+r,transform:"translate("+t.clipRect.x+","+t.clipRect.y+")","clip-path":"url(#"+o+"_RangeSeriesClipRect_"+r+")"}),t.seriesElement.appendChild(t.clipRectElement)},o.prototype.calculateGroupingBounds=function(e){var t=e.margin.bottom,r=i.measureText("string",e.labelStyle).height;this.calculateDateTimeNiceInterval(this.xAxis,new i.Size(e.bounds.width,e.bounds.height),this.xMin,this.xMax,!1),!e.enableGrouping||"DateTime"!==e.valueType||"Years"===this.xAxis.actualIntervalType&&e.series.length||(e.bounds.height-="Outside"===e.labelPosition||0===e.series.length?t+r:r+2*t),e.series.length||(e.bounds.y+=e.bounds.height/4,e.bounds.height=e.bounds.height/2)},o.prototype.drawSeriesBorder=function(e){var t=e.stockChart?"M":"L",r=e.stockChart?"":"Z",o=new i.PathOption(e.element.id+"_SeriesBorder","transparent",e.navigatorBorder.width,e.navigatorBorder.color,1,"","M "+e.bounds.x+" "+e.bounds.y+" L "+(e.bounds.x+e.bounds.width)+" "+e.bounds.y+t+(e.bounds.x+e.bounds.width)+" "+(e.bounds.y+e.bounds.height)+" L "+e.bounds.x+" "+(e.bounds.y+e.bounds.height)+r),n=e.renderer.drawPath(o);e.svgObject.appendChild(n)},o}(Ar),wa=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Sa=function(e){function t(t){var i=e.call(this)||this;return i.firstLevelLabels=[],i.secondLevelLabels=[],i.rangeNavigator=t,i}return wa(t,e),t.prototype.renderGridLines=function(){var e=0,t=this.rangeNavigator,r=t.majorGridLines,o=t.majorTickLines,n="",a="",s=t.bounds,l=t.chartSeries.xAxis,h=t.disableRangeSelector?"transparent":null;this.gridLines=t.renderer.createGroup({id:t.element.id+"_GridLines"});var c="Outside"===t.tickPosition||0===t.series.length?s.y+s.height+o.height:s.y+s.height-o.height;this.firstLevelLabels=[],l.labelStyle=t.labelStyle,l.skeleton=t.skeleton,l.skeletonType=t.skeletonType,l.isChart=!1,"DateTime"===t.valueType&&(this.calculateDateTimeNiceInterval(l,s,l.doubleRange.start,l.doubleRange.end,l.isChart),this.actualIntervalType=l.actualIntervalType,this.findAxisLabels(l)),this.firstLevelLabels=l.visibleLabels,this.lowerValues=[];for(var d=l.visibleLabels.length,p=0;p<d;p++)this.lowerValues.push(this.firstLevelLabels[p].value),(e=z(this.firstLevelLabels[p].value,l)*s.width+s.x)>=s.x&&s.x+s.width>=e&&(n=n.concat("M "+e+" "+(t.bounds.y+t.bounds.height)+" L "+e+" "+t.bounds.y+" "),a=a.concat("M "+e+" "+(s.y+s.height)+" L "+e+" "+c+" "));var u=new i.PathOption(t.element.id+"_MajorGridLine","transparent",r.width,t.series.length?h||r.color||t.themeStyle.gridLineColor:"transparent",1,r.dashArray,n);this.gridLines.appendChild(t.renderer.drawPath(u)),u=new i.PathOption(t.element.id+"_MajorTickLine","transparent",o.width,h||o.color||t.themeStyle.gridLineColor,1,r.dashArray,a),this.gridLines.appendChild(t.renderer.drawPath(u))},t.prototype.renderAxisLabels=function(){var e,t=this.rangeNavigator.chartSeries.xAxis,r=this.rangeNavigator,o=r.renderer.createGroup({id:r.element.id+"_AxisLabels"}),n=r.renderer.createGroup({id:r.element.id+"_FirstLevelAxisLabels"}),a=r.renderer.createGroup({id:r.element.id+"_SecondLevelAxisLabels"}),s=t;if(e=this.findLabelY(r,!1),this.placeAxisLabels(t,e,"_AxisLabel_",r,n),s.intervalType=s.actualIntervalType=r.groupBy||this.getSecondaryLabelType(t.actualIntervalType),s.labelFormat="",r.enableGrouping&&"DateTime"===r.valueType&&"Years"!==this.actualIntervalType){s.visibleRange.interval=1,s.visibleLabels=[],this.findAxisLabels(s),this.secondLevelLabels=s.visibleLabels,e=this.findLabelY(r,!0);var l=this.placeAxisLabels(s,e,"_SecondaryLabel_",r,a),h=new i.PathOption(r.element.id+"_SecondaryMajorLines","transparent",r.majorTickLines.width,r.majorTickLines.color||r.themeStyle.gridLineColor,1,r.majorGridLines.dashArray,l);this.gridLines.appendChild(r.renderer.drawPath(h))}r.chartSeries.xAxis.visibleLabels=r.chartSeries.xAxis.visibleLabels.concat(s.visibleLabels),o.appendChild(n),o.appendChild(a),r.svgObject.appendChild(this.gridLines),r.svgObject.appendChild(o)},t.prototype.getSecondaryLabelType=function(e){var t=["Years","Quarter","Months","Weeks","Days","Hours","Minutes","Seconds"];return"Years"===e?"Years":t[t.indexOf(e)-1]},t.prototype.findAxisLabels=function(e){e.visibleLabels=[];var t,i,r=new Date(e.visibleRange.min),o=this.rangeNavigator.interval?this.rangeNavigator.interval:1;switch(e.actualIntervalType){case"Years":r=new Date(r.getFullYear(),0,1);break;case"Quarter":r=r.getMonth()<=2?new Date(r.getFullYear(),0,1):r.getMonth()<=5?new Date(r.getFullYear(),3,1):r.getMonth()<=8?new Date(r.getFullYear(),6,1):new Date(r.getFullYear(),9,1);break;case"Months":r=new Date(r.getFullYear(),r.getMonth());break;case"Weeks":r=new Date(r.getFullYear(),r.getMonth(),r.getDate()-r.getDay());break;case"Days":r=new Date(r.getFullYear(),r.getMonth(),r.getDate());break;case"Hours":r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours());break;case"Minutes":r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes());break;case"Seconds":r=new Date(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds())}for(t=r.getTime(),this.rangeNavigator.format=this.rangeNavigator.intl.getDateFormat({format:e.labelFormat||this.blazorFormat(e),type:G(e.skeletonType),skeleton:this.getSkeleton(e,null,null,this.rangeNavigator.isBlazor)});t<=e.visibleRange.max;)i=this.dateFormats(this.rangeNavigator.format(new Date(t)),e,e.visibleLabels.length),e.visibleLabels.push(new ki(i,t,this.rangeNavigator.labelStyle,i)),t=this.increaseDateTimeInterval(e,t,o).getTime()},t.prototype.blazorFormat=function(e){return this.rangeNavigator.isBlazor&&"Years"===e.actualIntervalType?"yyyy":""},t.prototype.dateFormats=function(e,t,i){var r=e,o=this.rangeNavigator.isBlazor,n=this.rangeNavigator.enableGrouping&&0===this.firstLevelLabels.length;switch(t.actualIntervalType){case"Quarter":e.indexOf("Jan")>-1?r=n?"Quarter1":e.replace(o?"January":"Jan","Quarter1"):e.indexOf("Apr")>-1?r=n?"Quarter2":e.replace(o?"April":"Apr","Quarter2"):e.indexOf("Jul")>-1?r=n?"Quarter3":e.replace(o?"July":"Jul","Quarter3"):e.indexOf("Oct")>-1&&(r=n?"Quarter4":e.replace(o?"October":"Oct","Quarter4"));break;case"Weeks":r="Week"+ ++i;break;default:r=e}return r},t.prototype.findLabelY=function(e,t){var r,o=e.bounds.y+e.bounds.height,n=e.majorTickLines.height,a=i.measureText("Quarter1 2011",e.labelStyle).height,s=8;return r="Outside"===e.labelPosition&&"Outside"===e.tickPosition||0===e.series.length?o+n+s+.75*a:"Inside"===e.labelPosition&&"Inside"===e.tickPosition?o-n-s:"Inside"===e.labelPosition&&"Outside"===e.tickPosition?o-s:o+s+.75*a,t&&(s=15,"Outside"===e.labelPosition||0===e.series.length?r+=s+.75*a:r="Outside"===e.tickPosition||0===e.series.length?o+n+s+.75*a:o+s+.75*a),r},t.prototype.placeAxisLabels=function(e,t,r,o,n){var a,s,l,h,c=e.visibleLabels.length,d=o.bounds,p="",u=o.disableRangeSelector?"transparent":null,g=o.enableRtl?d.x+d.width:d.x,y=e.actualIntervalType,m="DateTime"===o.valueType?c>1?e.visibleLabels[1].value-e.visibleLabels[0].value:(e.visibleRange.max-e.visibleLabels[0].value)/2:0;"DateTime"!==o.valueType||"Quarter"!==y&&"Weeks"!==y||this.findSuitableFormat(e,o);for(var v=0,f=c;v<f;v++)if(a=e.visibleLabels[v],a.size=i.measureText(a.text,e.labelStyle),"Middle"===o.secondaryLabelAlignment?l=z(a.value+m/2,e)*d.width+d.x:r.indexOf("Secondary")>-1&&(l=this.findAlignment(e,v)),h=z(a.value,e)*d.width+d.x,(0===v||v===e.visibleLabels.length-1&&o.enableRtl)&&l<d.x&&(l=d.x+a.size.width/2),(v===e.visibleLabels.length-1||0===v&&o.enableRtl)&&l+a.size.width>d.x+d.width&&(l=d.x+d.width-a.size.width/2),r.indexOf("_SecondaryLabel_")>-1&&l>=d.x&&d.x+d.width>=l&&(p=p.concat("M "+h+" "+t+" L "+h+" "+(t-a.size.height))),"Hide"!==o.labelIntersectAction||0===v||!this.isIntersect(e,l,a.size.width,g,s.size.width)){"Middle"===o.secondaryLabelAlignment&&1===e.visibleLabels.length&&(l=z(a.value,e)+(d.x+d.width/2));var b=o.labelStyle,x={size:b.size,color:u||b.color||o.themeStyle.labelFontColor,fontFamily:b.fontFamily,fontStyle:b.fontStyle||o.labelStyle.fontStyle,fontWeight:b.fontWeight||o.labelStyle.fontWeight,opacity:b.opacity||o.labelStyle.opacity,textAlignment:b.textAlignment||o.labelStyle.textAlignment,textOverflow:b.textOverflow||o.labelStyle.textOverflow},w={cancel:!1,name:"labelRender",text:a.text,value:a.value,labelStyle:x,region:new i.Rect(l,t,a.size.width,a.size.height)};o.trigger("labelRender",w),w.cancel||(o.labels.push(w),Ve(this.rangeNavigator.renderer,new i.TextOption(this.rangeNavigator.element.id+r+v,l,t,"middle",w.text),w.labelStyle,w.labelStyle.color||o.themeStyle.labelFontColor,n).style.cursor="DateTime"===e.valueType?"cursor: pointer":"cursor: default",g=l,s=a)}return p},t.prototype.isIntersect=function(e,t,i,r,o){return e.isInversed?t+i/2>r-o/2:t-i/2<r+o/2},t.prototype.findSuitableFormat=function(e,t){for(var r,o,n=e.visibleLabels,a=n.length,s=t.bounds,l="DateTime"===t.valueType?a>1?n[1].value-n[0].value:e.visibleRange.interval:0,h=0;h<a;h++)o=z(n[h].value+l/2,e)*s.width+s.x,n[h].size=i.measureText(n[h].text,e.labelStyle),0===h&&o<s.x&&(o=s.x+n[h].size.width/2),"Quarter"===e.actualIntervalType?0!==h&&(n[h].text.indexOf("Quarter")>-1&&this.isIntersect(e,o,n[h].size.width,r,n[h-1].size.width)?(n.every(function(e){return e.text=e.text.toString().replace("Quarter","QTR"),!0}),e.visibleLabels=n,this.findSuitableFormat(e,t)):this.isIntersect(e,o,n[h].size.width,r,n[h-1].size.width)&&(n.every(function(e){return e.text=e.text.toString().replace("QTR","Q"),!0}),e.visibleLabels=n)):"Weeks"===e.actualIntervalType&&0!==h&&n[h].text.indexOf("Week")>-1&&this.isIntersect(e,o,n[h].size.width,r,n[h-1].size.width)&&(n.every(function(e){return e.text=e.text.toString().replace("Week","W"),!0}),e.visibleLabels=n),r=o},t.prototype.findAlignment=function(e,t){var i=e.visibleLabels[t],r=e.visibleLabels[t+1],o=this.rangeNavigator.bounds;return"Near"===this.rangeNavigator.secondaryLabelAlignment?z(i.value,e)*o.width+o.x+i.size.width/2:z(r?r.value:e.visibleRange.max,e)*o.width+o.x-i.size.width},t}(kr);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.tooltipLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}(e.RangeNavigatorTheme||(e.RangeNavigatorTheme={}));var Ca=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pa=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},La=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.clipRect=new i.Rect(0,0,0,0),t}return Ca(r,e),Pa([t.Property(null)],r.prototype,"dataSource",void 0),Pa([t.Property(null)],r.prototype,"xName",void 0),Pa([t.Property(null)],r.prototype,"yName",void 0),Pa([t.Property()],r.prototype,"query",void 0),Pa([t.Property("Line")],r.prototype,"type",void 0),Pa([t.Complex({enable:!1},qt)],r.prototype,"animation",void 0),Pa([t.Complex({color:"transparent",width:2},Yt)],r.prototype,"border",void 0),Pa([t.Property(null)],r.prototype,"fill",void 0),Pa([t.Property(1)],r.prototype,"width",void 0),Pa([t.Property(1)],r.prototype,"opacity",void 0),Pa([t.Property("0")],r.prototype,"dashArray",void 0),r}(t.ChildProperty),Ra=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ca(i,e),Pa([t.Property(null)],i.prototype,"width",void 0),Pa([t.Property(null)],i.prototype,"height",void 0),Pa([t.Complex({width:1,color:null},Yt)],i.prototype,"border",void 0),Pa([t.Property(null)],i.prototype,"fill",void 0),Pa([t.Property("Circle")],i.prototype,"type",void 0),i}(t.ChildProperty),Ma=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ca(i,e),Pa([t.Complex({},Ra)],i.prototype,"thumb",void 0),Pa([t.Property(null)],i.prototype,"selectedRegionColor",void 0),Pa([t.Property(null)],i.prototype,"unselectedRegionColor",void 0),i}(t.ChildProperty),Aa=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ca(r,i),Pa([t.Property(!1)],r.prototype,"enable",void 0),Pa([t.Property(.85)],r.prototype,"opacity",void 0),Pa([t.Property(null)],r.prototype,"fill",void 0),Pa([t.Property(null)],r.prototype,"format",void 0),Pa([t.Complex(e.RangeNavigatorTheme.tooltipLabelFont,Xt)],r.prototype,"textStyle",void 0),Pa([t.Property(null)],r.prototype,"template",void 0),Pa([t.Complex({color:"#cccccc",width:.5},Yt)],r.prototype,"border",void 0),Pa([t.Property("OnDemand")],r.prototype,"displayMode",void 0),r}(t.ChildProperty),Ta=function(){function e(e){this.control=e,this.points=[],this.isIOS=t.Browser.isIos||t.Browser.isIos7;var i=e.navigatorStyleSettings.thumb;this.thumbVisible=0!==e.themeStyle.thumbWidth&&0!==e.themeStyle.thumbHeight,this.elementId=e.element.id,this.thumpPadding=e.themeStyle.thumbWidth/2,this.addEventListener(),this.thumbColor=e.disableRangeSelector?"transparent":i.fill||e.themeStyle.thumbBackground}return e.prototype.render=function(e){var t=e.renderer,i=e.navigatorStyleSettings,r=e.disableRangeSelector?"transparent":null,o=t.createGroup({id:this.elementId+"_sliders",style:e.disableRangeSelector?"pointer-events:none;":""}),n=new Di(this.elementId+"_leftUnSelectedArea",r||i.unselectedRegionColor||e.themeStyle.unselectedRectColor,{width:0},1,{x:e.bounds.x,y:e.bounds.y,width:e.bounds.width/3,height:e.bounds.height});this.leftUnSelectedElement=t.drawRectangle(n),n.id=this.elementId+"_rightUnSelectedArea",this.rightUnSelectedElement=t.drawRectangle(n),n.id=this.elementId+"_SelectedArea",n.fill=r||i.selectedRegionColor||e.themeStyle.selectedRegionColor,this.selectedElement=t.drawRectangle(n),this.selectedElement.setAttribute("style","cursor: -webkit-grab"),this.leftSlider=t.createGroup({id:this.elementId+"_LeftSlider",style:"cursor: ew-resize"}),this.rightSlider=t.createGroup({id:this.elementId+"_RightSlider",style:"cursor: ew-resize"}),this.createThump(t,e.bounds,this.leftSlider,this.elementId+"_LeftSlider",o),this.createThump(t,e.bounds,this.rightSlider,this.elementId+"_RightSlider"),o.appendChild(this.leftUnSelectedElement),o.appendChild(this.rightUnSelectedElement),o.appendChild(this.selectedElement),o.appendChild(this.leftSlider),o.appendChild(this.rightSlider),e.svgObject.appendChild(o)},e.prototype.createThump=function(e,t,r,o,n){var a,s=this.control,l=s.navigatorStyleSettings.thumb,h=s.themeStyle,c=t.y+t.height/2,d=this.thumpPadding,p=s.themeStyle.thumbHeight/2-5,u=s.disableRangeSelector?"transparent":null,g=u||l.border.color||h.thumpLineColor;r.appendChild(e.drawPath(new i.PathOption(o+"_ThumpLine","transparent",l.border.width,s.series.length?g:"transparent",1,null,"M "+d+" "+t.y+" L "+d+" "+(t.y+t.height)+" "))),this.thumpY=c-s.themeStyle.thumbHeight/2,this.sliderY=t.y>this.thumpY?this.thumpY:t.y,n&&!s.disableRangeSelector&&((a=e.createDefs()).innerHTML='<rect xmlns="http://www.w3.org/2000/svg" id="'+this.control.element.id+'_shadow" x="0" y="'+this.thumpY+'" width="'+s.themeStyle.thumbWidth+'" height="'+s.themeStyle.thumbHeight+'" rx="'+("Circle"===l.type?"50%":"0%")+'"/><filter xmlns="http://www.w3.org/2000/svg" x="-25.0%" y="-20.0%" width="150.0%" height="150.0%" filterUnits="objectBoundingBox" id="ej2-range-shadow"><feOffset dx="0" dy="1" in="SourceAlpha"result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"/><feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0" type="matrix" in="shadowBlurOuter1"/></filter>',n.appendChild(a)),r.innerHTML+='<use xmlns="http://www.w3.org/2000/svg" fill="black" fill-opacity="1" filter="url(#ej2-range-shadow)" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#path-1"/>',"Circle"===l.type?r.appendChild(ne({x:d,y:c},"Circle",{width:s.themeStyle.thumbWidth,height:s.themeStyle.thumbHeight},"",new i.PathOption(o+"_ThumpSymbol",u||this.thumbColor,l.border.width,g,1,null),"Thumb")):r.appendChild(e.drawRectangle(new Di(o+"_ThumpSymbol",u||this.thumbColor,{width:l.border.width,color:g},1,{x:d-s.themeStyle.thumbWidth/2,y:c-s.themeStyle.thumbHeight/2,width:s.themeStyle.thumbWidth,height:s.themeStyle.thumbHeight},2,2))),this.thumbVisible&&r.appendChild(e.drawPath(new i.PathOption(o+"_ThumpGrip","transparent",1,u||s.themeStyle.gripColor,1,null,"M "+(d+2)+" "+(c+p)+" L "+(d+2)+" "+(c-p)+" M "+d+" "+(c+p)+" L "+d+" "+(c-p)+" M "+(d-2)+" "+(c+p)+" L "+(d-2)+" "+(c-p)+" ")))},e.prototype.setSlider=function(e,t,i,r){var o=this.control,n=o.bounds.x,a=o.chartSeries.xAxis.actualRange,s=0===o.series.length;isNaN(e)&&isNaN(t)&&(e=0,t=o.bounds.width),t>=e||(e=[t,t=e][0]),e=t>=e?e:[t,t=e][0],e=Math.max(e,a.min),t=Math.min(t,a.max),this.startX=n+it(e,a,o.bounds.width,o.enableRtl),this.endX=n+it(t,a,o.bounds.width,o.enableRtl);var l=o.enableRtl?this.endX:this.startX,h=o.enableRtl?this.startX:this.endX;this.sliderWidth=Math.abs(this.endX-this.startX),this.selectedElement.setAttribute("x",l+""),this.selectedElement.setAttribute("width",this.sliderWidth+""),this.leftUnSelectedElement.setAttribute("width",l-n+""),this.rightUnSelectedElement.setAttribute("x",h+""),this.rightUnSelectedElement.setAttribute("width",o.bounds.width-(h-n)+""),this.leftSlider.setAttribute("transform","translate("+(this.startX-this.thumpPadding)+", 0)"),this.rightSlider.setAttribute("transform","translate("+(this.endX-this.thumpPadding)+", 0)");var c=this.control.svgObject.getBoundingClientRect().left-this.control.element.getBoundingClientRect().left,d=this.control.enableRtl?this.endX:this.startX,p=this.control.enableRtl?this.startX:this.endX;this.leftRect={x:s?c+n:n,y:s?0:o.bounds.y,width:s?d-n:d,height:s?this.thumpY:o.bounds.height},this.rightRect={x:s?c+p:p,y:s?0:o.bounds.y,width:o.bounds.width-(h-n),height:s?this.thumpY:o.bounds.height},this.midRect={x:s?d+c:0,y:s?0:o.bounds.y,width:s?Math.abs(this.endX-this.startX):p,height:s?this.thumpY:o.bounds.height},this.currentStart=e,this.currentEnd=t,r&&(this.control.rangeTooltipModule.renderLeftTooltip(this),this.control.rangeTooltipModule.renderRightTooltip(this)),i&&this.triggerEvent(a)},e.prototype.triggerEvent=function(e){var t=this.control.chartSeries.xAxis,i=t.valueType,r=this.control.enableDeferredUpdate,o=this.control.tooltip.enable;this.isDrag&&this.control.allowSnapping&&(this.isDrag=!1,this.setAllowSnapping(this.control,this.currentStart,this.currentEnd,r,o));var n={cancel:!1,start:"DateTime"===i?new Date(this.currentStart):"Logarithmic"===i?Math.pow(t.logBase,this.currentStart):this.currentStart,end:"DateTime"===i?new Date(this.currentEnd):"Logarithmic"===i?Math.pow(t.logBase,this.currentEnd):this.currentEnd,name:"changed",selectedData:ot(this.points,this.currentStart,this.currentEnd),zoomPosition:(this.control.enableRtl?e.max-this.currentEnd:this.currentStart-e.min)/e.delta,zoomFactor:(this.currentEnd-this.currentStart)/e.delta};this.control.trigger("changed",n)},e.prototype.addEventListener=function(){this.control.isDestroyed||(this.control.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.control.on(t.Browser.touchStartEvent,this.mouseDownHandler,this),this.control.on(t.Browser.touchEndEvent,this.mouseUpHandler,this),this.control.on(t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseCancelHandler,this))},e.prototype.removeEventListener=function(){this.control.isDestroyed||(this.control.off(t.Browser.touchMoveEvent,this.mouseMoveHandler),this.control.off(t.Browser.touchStartEvent,this.mouseDownHandler),this.control.off(t.Browser.touchEndEvent,this.mouseUpHandler),this.control.off(t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseCancelHandler))},e.prototype.mouseMoveHandler=function(e){var t,i,r=this.control,o=r.chartSeries.xAxis.actualRange,n=r.bounds;if(this.getCurrentSlider(e.target.id),this.isDrag&&r.mouseX>=n.x){switch(this.currentSlider){case"Left":r.startValue=this.getRangeValue(Math.abs(r.mouseX-n.x));break;case"Right":r.endValue=this.getRangeValue(Math.abs(r.mouseX-n.x));break;case"Middle":t=Math.max(this.getRangeValue(Math.abs(this.startX-(this.previousMoveX-r.mouseX)-n.x)),o.min),i=Math.min(this.getRangeValue(Math.abs(this.endX-(this.previousMoveX-r.mouseX)-n.x)),o.max),Math.floor(Math.abs(it(i,o,r.bounds.width,r.enableRtl)-it(t,o,r.bounds.width,r.enableRtl)))===Math.floor(this.sliderWidth)&&(r.startValue=t,r.endValue=i)}e.preventDefault&&this.isIOS&&e.preventDefault(),this.setSlider(r.startValue,r.endValue,!r.enableDeferredUpdate,r.rangeTooltipModule&&r.tooltip.enable),this.previousMoveX=r.mouseX}},e.prototype.getRangeValue=function(e){var t=this.control,i=t.chartSeries.xAxis.actualRange;return rt(e,t.bounds.width,i,t.enableRtl)},e.prototype.mouseDownHandler=function(e){this.currentSlider=this.getCurrentSlider(e.target.id),this.selectedElement.setAttribute("style","cursor: -webkit-grabbing"),this.isDrag=!("UnSelectedArea"===this.currentSlider||!this.currentSlider),this.previousMoveX=this.control.mouseDownX},e.prototype.getCurrentSlider=function(e){var t=this.control.themeStyle.thumbHoverColor;return e.indexOf(this.elementId+"_LeftSlider")>-1?(this.leftSlider.childNodes[2].setAttribute("fill",t),"Left"):e.indexOf(this.elementId+"_RightSlider")>-1?(this.rightSlider.childNodes[2].setAttribute("fill",t),"Right"):e.indexOf(this.elementId+"_SelectedArea")>-1?"Middle":e.indexOf("UnSelectedArea")>-1?(this.leftSlider.childNodes[2].setAttribute("fill",this.thumbColor),this.rightSlider.childNodes[2].setAttribute("fill",this.thumbColor),"UnSelectedArea"):e.indexOf(this.elementId+"_AxisLabel_")>-1&&"DateTime"===this.control.valueType?(this.labelIndex=+e.substring(e.lastIndexOf("_")+1,e.length),"firstLevelLabels"):e.indexOf(this.elementId+"_SecondaryLabel")>-1&&"DateTime"===this.control.valueType?(this.labelIndex=+e.substring(e.lastIndexOf("_")+1,e.length),"secondLevelLabels"):(this.leftSlider.childNodes[2].setAttribute("fill",this.thumbColor),this.rightSlider.childNodes[2].setAttribute("fill",this.thumbColor),this.control.periodSelectorModule&&(this.control.periodSelectorModule.triggerChange=!0),null)},e.prototype.mouseUpHandler=function(){var e=this.control,t=e.chartSeries.xAxis.actualRange,i=e.enableDeferredUpdate,r=e.tooltip.enable;if(e.stockChart&&(e.stockChart.zoomChange=!1),"UnSelectedArea"===this.currentSlider){var o=void 0,n=void 0,a=void 0,s=e.enableRtl,l=e.endValue-e.startValue;e.mouseDownX<this.startX?(o=Math.max(this.getRangeValue(e.mouseDownX-this.sliderWidth/2-e.bounds.x),t.min),a=s?o:o+l,n=s?o-l:o):(o=Math.min(this.getRangeValue(e.mouseDownX+this.sliderWidth/2-e.bounds.x),t.max),n=s?o:o-l,a=s?o+l:o),this.performAnimation(n,a,e),i=!1}else if("firstLevelLabels"===this.currentSlider||"secondLevelLabels"===this.currentSlider){var h=e.rangeAxis[this.currentSlider][this.labelIndex+1];this.performAnimation(e.rangeAxis[this.currentSlider][this.labelIndex].value,h?e.allowIntervalData?h.value-1:h.value:t.max,e),i=!1}this.isDrag&&e.allowSnapping&&(this.setAllowSnapping(e,this.currentStart,this.currentEnd,i,r),i=!1),i&&this.setSlider(this.currentStart,this.currentEnd,!0,r),null!==this.currentSlider&&this.control.periodSelectorSettings.periods.length>0&&(this.control.periodSelectorModule.triggerChange=!1,this.control.periodSelectorModule.datePicker.startDate=new Date(this.currentStart),this.control.periodSelectorModule.datePicker.endDate=new Date(this.currentEnd)),this.selectedElement.setAttribute("style","cursor: -webkit-grab"),e.startValue=this.currentStart,e.endValue=this.currentEnd,this.isDrag=!1,this.labelIndex=null,this.currentSlider=null},e.prototype.setAllowSnapping=function(e,t,i,r,o){var n=e.rangeAxis.lowerValues;n.push(e.chartSeries.xAxis.actualRange.max),this.setSlider(nt(n,t),nt(n,i),r,o),e.startValue=this.currentStart,e.endValue=this.currentEnd},e.prototype.performAnimation=function(e,i,r,o){var n=this,a=this.currentStart,s=this.currentEnd,l=r.enableDeferredUpdate,h=r.tooltip.enable;new t.Animation({}).animate(t.createElement("div"),{duration:t.isNullOrUndefined(o)?this.control.animationDuration:o,progress:function(t){n.setSlider(q(t.timeStamp,0,e-a,t.duration)+a,q(t.timeStamp,0,i-s,t.duration)+s,!l,h)},end:function(){r.allowSnapping?n.setAllowSnapping(r,e,i,!0,h):n.setSlider(e,i,!0,h),n.control.startValue=n.currentStart,n.control.endValue=n.currentEnd,n.control.periodSelectorSettings.periods.length>0&&(n.control.periodSelectorModule.triggerChange=!1,n.control.periodSelectorModule.datePicker.startDate=new Date(n.currentStart),n.control.periodSelectorModule.datePicker.endDate=new Date(n.currentEnd))}})},e.prototype.mouseCancelHandler=function(){this.isDrag&&this.control.allowSnapping&&this.setAllowSnapping(this.control,this.currentStart,this.currentEnd,!1,this.control.tooltip.enable),this.isDrag=!1,this.currentSlider=null,this.control.startValue=this.currentStart,this.control.endValue=this.currentEnd},e.prototype.destroy=function(){this.removeEventListener()},e}(),ka=function(){function e(e){this.control={},this.rootControl=e}return e.prototype.setControlValues=function(e){"rangeNavigator"===e.getModuleName()?(this.control.periods=this.rootControl.periodSelectorSettings.periods,this.control.seriesXMax=e.chartSeries.xMax,this.control.seriesXMin=e.chartSeries.xMin,this.control.rangeSlider=e.rangeSlider,this.control.rangeNavigatorControl=e,this.control.endValue=e.endValue,this.control.startValue=e.startValue):(this.control.periods=this.rootControl.periods,this.control.endValue=this.control.seriesXMax=e.seriesXMax,this.control.startValue=this.control.seriesXMin=e.seriesXMin,this.control.rangeNavigatorControl=this.rootControl.rangeNavigator,this.control.rangeNavigatorControl&&(this.control.rangeSlider=this.rootControl.rangeNavigator.rangeSlider)),this.control.element=e.element,this.control.disableRangeSelector=e.disableRangeSelector},e.prototype.appendSelector=function(e,t){void 0===t&&(t=0),this.renderSelectorElement(null,e,t),this.renderSelector()},e.prototype.renderSelectorElement=function(e,r,o){this.periodSelectorSize=e?this.periodSelectorSize:new i.Rect(o,this.rootControl.titleSize.height,r.width,r.height);var n,a;e?(n=e.themeStyle.thumbWidth,a=e.element):(n=r.thumbSize,a=r.element),he(a.id+"_Secondary_Element")&&t.remove(he(a.id+"_Secondary_Element")),this.periodSelectorDiv=t.createElement("div",{id:a.id+"_Secondary_Element",styles:"width: "+(this.periodSelectorSize.width-n)+"px;height: "+this.periodSelectorSize.height+"px;top:"+this.periodSelectorSize.y+"px;left:"+(this.periodSelectorSize.x+n/2)+"px; position: absolute"}),a.appendChild(this.periodSelectorDiv)},e.prototype.renderSelector=function(){var e=this;this.setControlValues(this.rootControl);var i=!0,r=this.control.element.id,o=t.createElement("div",{id:r+"_selector"}),s=this.control.periods,l=this.updateCustomElement(),h="text-transform: none; text-overflow: unset",c=r+"customRange";this.periodSelectorDiv.appendChild(o);for(var d=0;d<s.length;d++)l.push({align:"Left",text:s[d].text});"stockChart"===this.rootControl.getModuleName()&&(i=this.rootControl.enableCustomRange),i&&(this.calendarId=r+"_calendar",l.push({template:"<button id="+this.calendarId+"></button>",align:"Right"}));var p={selector:l,name:"RangeSelector",cancel:!1,enableCustomFormat:!0,content:"Date Range"};"stockChart"===this.rootControl.getModuleName()&&(l.push({template:t.createElement("button",{id:r+"_reset",innerHTML:"Reset",styles:h,className:"e-dropdown-btn e-btn"}),align:"Right"}),this.rootControl.exportType.indexOf("Print")>-1&&l.push({template:t.createElement("button",{id:r+"_print",innerHTML:"Print",styles:h,className:"e-dropdown-btn e-btn"}),align:"Right"}),this.rootControl.exportType.length&&l.push({template:t.createElement("button",{id:r+"_export",innerHTML:"Export",styles:h,className:"e-dropdown-btn e-btn"}),align:"Right"})),this.rootControl.trigger("selectorRender",p),this.toolbar=new n.Toolbar({items:p.selector,height:this.periodSelectorSize.height,clicked:function(t){e.buttonClick(t,e.control)},created:function(){e.nodes=e.toolbar.element.querySelectorAll(".e-toolbar-left")[0],t.isNullOrUndefined(e.selectedIndex)&&s.map(function(t,i){t.selected&&(e.control.startValue=e.changedRange(t.intervalType,e.control.endValue,t.interval).getTime(),e.selectedIndex=e.nodes.childNodes.length-s.length+i)}),e.setSelectedStyle(e.selectedIndex)}}),this.toolbar.isStringTemplate=!0,this.toolbar.appendTo(o),this.triggerChange=!0,i&&(this.datePicker=new a.DateRangePicker({min:new Date(this.control.seriesXMin),max:new Date(this.control.seriesXMax),format:"dd'/'MM'/'yyyy",placeholder:"Select a range",showClearButton:!1,startDate:new Date(this.control.startValue),endDate:new Date(this.control.endValue),created:function(){if(p.enableCustomFormat){for(var i=document.getElementsByClassName("e-date-range-wrapper"),o=void 0,n=0;n<i.length;n++)-1!==i[n].children[0].id.indexOf(r)&&(o=i[n]);o.style.display="none",o.insertAdjacentElement("afterend",t.createElement("div",{id:c,innerHTML:p.content,className:"e-btn e-dropdown-btn",styles:'font-family: "Segoe UI"; font-size: 14px; font-weight: 500; text-transform: none '})),he(c).insertAdjacentElement("afterbegin",t.createElement("span",{id:r+"dateIcon",className:"e-input-group-icon e-range-icon e-btn-icon e-icons",styles:"font-size: 16px; min-height: 0px; margin: -3px 0 0 0; outline: none; min-width: 30px"})),document.getElementById(c).onclick=function(){e.datePicker.show(he(c))}}},change:function(t){if(e.triggerChange&&(e.control.rangeSlider&&t.event?e.control.rangeSlider.performAnimation(t.startDate.getTime(),t.endDate.getTime(),e.control.rangeNavigatorControl):t.event&&e.rootControl.rangeChanged(t.startDate.getTime(),t.endDate.getTime()),e.nodes=e.toolbar.element.querySelectorAll(".e-toolbar-left")[0],!e.rootControl.resizeTo&&e.control.rangeSlider&&e.control.rangeSlider.isDrag))for(var i=0,r=e.nodes.childNodes.length;i<r;i++)e.nodes.childNodes[i].childNodes[0].classList.remove("e-active"),e.nodes.childNodes[i].childNodes[0].classList.remove("e-active")}}),this.datePicker.appendTo("#"+this.calendarId))},e.prototype.updateCustomElement=function(){var e=[],i=this.rootControl.element.id,r="text-transform: none; text-overflow: unset";return"stockChart"===this.rootControl.getModuleName()&&(this.rootControl.seriesType.length&&e.push({template:t.createElement("button",{id:i+"_seriesType",innerHTML:"Series",styles:r}),align:"Left"}),this.rootControl.indicatorType.length&&e.push({template:t.createElement("button",{id:i+"_indicatorType",innerHTML:"Indicators",styles:r}),align:"Left"}),this.rootControl.trendlineType.length&&e.push({template:t.createElement("button",{id:i+"_trendType",innerHTML:"Trendline",styles:r}),align:"Left"})),e},e.prototype.setSelectedStyle=function(e){if(this.control.disableRangeSelector||"stockChart"===this.rootControl.getModuleName()){for(var t=0,i=this.nodes.childNodes.length;t<i;t++)this.nodes.childNodes[t].childNodes[0].classList.remove("e-active"),this.nodes.childNodes[t].childNodes[0].classList.remove("e-active");this.nodes.childNodes[e].childNodes[0].classList.add("e-flat"),this.nodes.childNodes[e].childNodes[0].classList.add("e-active")}},e.prototype.buttonClick=function(e,i){var r,o,n=this,a=e.item,s=this.control.rangeSlider,l=this.control.periods,h=l.filter(function(e){return e.text===a.text});l.map(function(t,i){t.text===e.item.text&&(n.selectedIndex=n.nodes.childNodes.length-l.length+i)}),""!==e.item.text&&this.setSelectedStyle(this.selectedIndex),"all"===a.text.toLowerCase()?(r=i.seriesXMin,o=i.seriesXMax,s?s.performAnimation(r,o,this.control.rangeNavigatorControl):this.rootControl.rangeChanged(r,o)):"ytd"===a.text.toLowerCase()?s?(r=new Date(new Date(s.currentEnd).getFullYear().toString()).getTime(),o=s.currentEnd,s.performAnimation(r,o,this.control.rangeNavigatorControl)):(r=new Date(new Date(this.rootControl.currentEnd).getFullYear().toString()).getTime(),o=this.rootControl.currentEnd,this.rootControl.rangeChanged(r,o)):""!==a.text.toLowerCase()&&(s?(r=this.changedRange(h[0].intervalType,s.currentEnd,h[0].interval).getTime(),o=s.currentEnd,s.performAnimation(r,o,this.control.rangeNavigatorControl)):(r=this.changedRange(h[0].intervalType,this.rootControl.currentEnd,h[0].interval).getTime(),o=this.rootControl.currentEnd,this.rootControl.rangeChanged(r,o))),"stockChart"===this.rootControl.getModuleName()&&(this.rootControl.zoomChange=!1),he(this.calendarId+"_popup")&&!t.Browser.isDevice&&(he(this.calendarId+"_popup").querySelectorAll(".e-range-header")[0].style.display="none")},e.prototype.changedRange=function(e,t,i){var r=new Date(t);switch(e){case"Quarter":r.setMonth(r.getMonth()-3*i);break;case"Months":r.setMonth(r.getMonth()-i);break;case"Weeks":r.setDate(r.getDate()-7*i);break;case"Days":r.setDate(r.getDate()-i);break;case"Hours":r.setHours(r.getHours()-i);break;case"Minutes":r.setMinutes(r.getMinutes()-i);break;case"Seconds":r.setSeconds(r.getSeconds()-i);break;default:r.setFullYear(r.getFullYear()-i)}return r},e.prototype.getModuleName=function(){return"PeriodSelector"},e.prototype.destroy=function(){},e}(),_a=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Oa=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Ea=function(r){function o(e,t){var i=r.call(this,e,t)||this;return i.animateSeries=!0,i.chartid=57725,i}return _a(o,r),o.prototype.preRender=function(){if(this.isBlazor=window.Blazor,this.unWireEvents(),this.setCulture(),this.allowServerDataBinding=!1,""===this.element.id){var e=document.getElementsByClassName("e-rangenavigator").length;this.element.id="rangenavigator_"+this.chartid+"_"+e}this.wireEvents()},o.prototype.initPrivateVariables=function(){this.doubleModule=new ni,this.labels=[],this.rangeSlider=new Ta(this),this.chartSeries=new xa(this),this.lineSeriesModule=new Vr,this.rangeAxis=new Sa(this)},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.setSliderValue=function(){var e="DateTime"===this.valueType,t=this.chartSeries.xAxis.actualRange;this.startValue=this.startValue?this.startValue:this.value[0]?e?new Date(this.value[0].toString()).getTime():+this.value[0]:t.min,this.endValue=this.endValue?this.endValue:this.value[1]?e?new Date(this.value[1].toString()).getTime():+this.value[1]:t.max},o.prototype.render=function(){var e=this,t={name:"load",rangeNavigator:this.isBlazor?{}:this,theme:this.theme};this.trigger("load",t,function(){e.theme=e.isBlazor?t.theme:e.theme,e.setTheme(),e.initPrivateVariables(),e.createRangeSvg(),e.calculateBounds(),e.chartSeries.renderChart(e),m("chartmeasuretext"),e.renderComplete(),e.allowServerDataBinding=!0})},o.prototype.setTheme=function(){this.themeStyle=at(this.theme,this)},o.prototype.createRangeSvg=function(){this.removeSvg(),He(this),this.renderChartBackground()},o.prototype.calculateBounds=function(){var e=this.enableGrouping?15:8,t=this.navigatorStyleSettings.thumb,r=i.measureText("tempString",this.labelStyle).height,o=this.margin,n=!this.series.length,a=!this.disableRangeSelector&&n&&this.tooltip.enable?35:0;this.isBlazor&&!this.periodSelectorModule&&this.periodSelectorSettings.periods.length&&!this.stockChart&&(this.periodSelectorModule=new ka(this));var s=this.periodSelectorModule;this.periodSelectorModule&&this.periodSelectorSettings.periods.length>0&&(s.periodSelectorSize={x:0,y:0,height:0,width:0},s.periodSelectorSize.width=this.availableSize.width,s.periodSelectorSize.height=this.periodSelectorSettings.height,s.periodSelectorSize.y="Bottom"===this.periodSelectorSettings.position?this.availableSize.height-s.periodSelectorSize.height:0);var l="Top"===this.periodSelectorSettings.position&&s?s.periodSelectorSize.y+s.periodSelectorSize.height:0;this.bounds=new i.Rect(this.themeStyle.thumbWidth/2+t.border.width+o.left,o.top+a+l,this.availableSize.width-this.themeStyle.thumbWidth-2*t.border.width-o.left-o.right,this.availableSize.height-o.top-o.bottom-a-(s?s.periodSelectorSize.height:0));var h=("Outside"===this.labelPosition||n?r+e:0)+("Outside"===this.tickPosition||n?this.majorTickLines.height:0);if(this.bounds.height-=h,n){var c=this.enableGrouping?this.bounds.height-(r+e):this.bounds.height;this.bounds.y+=this.themeStyle.thumbHeight>c?(this.themeStyle.thumbHeight-c)/2:0}this.disableRangeSelector&&(this.bounds.y=0,this.bounds.height=this.periodSelectorSettings.periods.length>0?this.periodSelectorSettings.height:0)},o.prototype.renderChart=function(){this.chartSeries.renderSeries(this),this.rangeAxis.renderGridLines(),this.rangeAxis.renderAxisLabels(),this.chartSeries.appendSeriesElements(this),this.createSecondaryElement(),this.setSliderValue(),this.renderPeriodSelector(),this.renderSlider(),this.stockChart||this.element.appendChild(this.svgObject),this.trigger("loaded",{rangeNavigator:this.isBlazor?{}:this}),this.rangeSlider.setSlider(this.startValue,this.endValue,!1,this.tooltip.enable&&"Always"===this.tooltip.displayMode)},o.prototype.renderPeriodSelector=function(){this.periodSelectorModule&&(this.periodSelectorModule.renderSelectorElement(this),this.periodSelectorModule.renderSelector())},o.prototype.createSecondaryElement=function(){if(this.tooltip.enable){var e=this.createElement("div");e.id=this.element.id+"_Secondary_Element",e.setAttribute("style","position: relative"),this.element.appendChild(e)}},o.prototype.renderSlider=function(){this.rangeSlider.render(this),this.rangeSlider.setSlider(this.startValue,this.endValue,!0,this.tooltip.enable&&"Always"===this.tooltip.displayMode)},o.prototype.removeSvg=function(){he(this.element.id+"_Secondary_Element")&&(t.remove(he(this.element.id+"_Secondary_Element")),this.isReact&&this.clearTemplate());if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);this.svgObject.hasChildNodes()||!this.svgObject.parentNode||this.stockChart||t.remove(this.svgObject)}},o.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,i=t.Browser.touchMoveEvent,r=t.Browser.touchEndEvent,o=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,e,this.rangeOnMouseDown),t.EventHandler.remove(this.element,i,this.mouseMove),t.EventHandler.remove(this.element,r,this.mouseEnd),t.EventHandler.remove(this.element,"click",this.rangeOnMouseClick),t.EventHandler.remove(this.element,o,this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.rangeResize)},o.prototype.wireEvents=function(){var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.rangeOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"click",this.rangeOnMouseClick,this),t.EventHandler.add(this.element,e,this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.rangeResize.bind(this));var i=this.element;i.style.touchAction="none",i.style.msTouchAction="none",i.style.msContentZooming="none",i.style.msUserSelect="none",i.style.webkitUserSelect="none",i.style.position="relative",i.style.display="block"},o.prototype.rangeResize=function(){var e=this;if(!document.getElementById(this.element.id))return!1;this.animateSeries=!1,this.removeAllTooltip(),this.resizeTo&&clearTimeout(this.resizeTo);var t={rangeNavigator:this,name:"resized",currentSize:new i.Size(0,0),previousSize:new i.Size(this.availableSize.width,this.availableSize.height)};return this.resizeTo=+setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);e.createRangeSvg(),t.currentSize=e.availableSize,e.trigger("resized",t),e.calculateBounds(),e.chartSeries.renderChart(e)},500),!1},o.prototype.removeAllTooltip=function(){this.tooltip.enable&&"Always"===this.tooltip.displayMode&&(he(this.element.id+"_leftTooltip")&&t.remove(he(this.element.id+"_leftTooltip")),he(this.element.id+"_rightTooltip")&&t.remove(he(this.element.id+"_rightTooltip")))},o.prototype.mouseMove=function(e){return he(this.stockChart?this.element.id:this.element.id+"_svg")&&(this.mouseX=this.setMouseX(e),this.notify(t.Browser.touchMoveEvent,e)),!1},o.prototype.mouseLeave=function(e){var i=this.rangeSlider;i.isDrag&&i.triggerEvent(this.chartSeries.xAxis.actualRange);var r=t.Browser.isPointer?"pointerleave":"mouseleave";return this.mouseX=this.setMouseX(e),this.notify(r,e),!1},o.prototype.rangeOnMouseClick=function(e){return this.notify("click",e),!1},o.prototype.print=function(e){new xr(this).print(e)},o.prototype.export=function(e,t,i,r,o,n,a){r=r||[this],new xr(this).export(e,t,i,r,o,n,a)},o.prototype.renderChartBackground=function(){var e=new Di(this.element.id+"_ChartBorder",this.themeStyle.background,{width:0,color:"transparent"},1,new i.Rect(0,0,this.availableSize.width,this.availableSize.height));this.svgObject.appendChild(this.renderer.drawRectangle(e))},o.prototype.rangeOnMouseDown=function(e){return this.mouseDownX=this.setMouseX(e),this.notify(t.Browser.touchStartEvent,e),!1},o.prototype.mouseEnd=function(e){return this.mouseX=this.setMouseX(e),this.notify(t.Browser.touchEndEvent,e),!1},o.prototype.setMouseX=function(e){var t=e.type.indexOf("touch")>-1?e.changedTouches[0].clientX:e.clientX,i=this.element.getBoundingClientRect(),r=this.stockChart?he(this.element.id).getBoundingClientRect():he(this.element.id+"_svg").getBoundingClientRect();return t-i.left-Math.max(r.left-i.left,0)},o.prototype.getPersistData=function(){var e=["loaded"];return this.addOnPersist(e)},o.prototype.onPropertyChanged=function(e,t){var i=!1,o=!1,n=!1;this.animateSeries=!1;for(var a=0,s=Object.keys(e);a<s.length;a++)switch(s[a]){case"width":case"height":case"navigatorBorder":case"enableGrouping":case"labelPosition":case"tickPosition":case"labelStyle":o=!0;break;case"enableRtl":case"xName":case"yName":case"query":case"minimum":case"maximum":case"interval":case"intervalType":case"logBase":case"valueType":case"majorGridLines":case"minorGridLines":case"navigatorStyleSettings":case"labelFormat":case"skeleton":case"skeletonType":case"secondaryLabelAlignment":i=!0;break;case"dataSource":case"series":i=!0,o=!0;break;case"theme":this.animateSeries=!0;break;case"locale":r.prototype.refresh.call(this);break;case"value":this.startValue=null,this.endValue=null,n=!0}!o&&i&&(this.removeSvg(),this.chartSeries.xMin=1/0,this.chartSeries.xMax=-1/0,this.chartSeries.renderChart(this)),o&&i&&(this.removeSvg(),this.chartSeries.xMin=this.chartSeries.yMin=1/0,this.chartSeries.xMax=this.chartSeries.yMax=-1/0,this.calculateBounds(),this.chartSeries.renderChart(this)),o&&!i&&(this.removeSvg(),this.calculateBounds(),this.chartSeries.renderChart(this)),o||i||!n||(this.setSliderValue(),this.rangeSlider.setSlider(this.startValue,this.endValue,!0,this.tooltip.enable&&"Always"===this.tooltip.displayMode))},o.prototype.requiredModules=function(){var e=this,t=[];return this.series.map(function(i){t.push({member:i.type+"Series",args:[e]})}),this.periodSelectorSettings.periods.length>0&&t.push({member:"PeriodSelector",args:[this]}),"Double"!==this.valueType&&t.push({member:this.valueType,args:[this]}),this.tooltip.enable&&t.push({member:"RangeTooltip",args:[this]}),t},o.prototype.getModuleName=function(){return"rangeNavigator"},o.prototype.destroy=function(){this.unWireEvents(),this.isReact&&this.clearTemplate(),this.rangeSlider.destroy(),r.prototype.destroy.call(this),this.element.innerHTML="",this.element.classList.remove("e-rangenavigator")},Oa([t.Property(null)],o.prototype,"width",void 0),Oa([t.Property(null)],o.prototype,"height",void 0),Oa([t.Property(null)],o.prototype,"dataSource",void 0),Oa([t.Property(null)],o.prototype,"xName",void 0),Oa([t.Property(null)],o.prototype,"yName",void 0),Oa([t.Property()],o.prototype,"query",void 0),Oa([t.Collection([],La)],o.prototype,"series",void 0),Oa([t.Complex({},Aa)],o.prototype,"tooltip",void 0),Oa([t.Property(null)],o.prototype,"minimum",void 0),Oa([t.Property(null)],o.prototype,"maximum",void 0),Oa([t.Property(null)],o.prototype,"interval",void 0),Oa([t.Property("Auto")],o.prototype,"intervalType",void 0),Oa([t.Property("Hide")],o.prototype,"labelIntersectAction",void 0),Oa([t.Property(10)],o.prototype,"logBase",void 0),Oa([t.Property("Double")],o.prototype,"valueType",void 0),Oa([t.Property("Outside")],o.prototype,"labelPosition",void 0),Oa([t.Property(500)],o.prototype,"animationDuration",void 0),Oa([t.Property(!1)],o.prototype,"enableGrouping",void 0),Oa([t.Property(!1)],o.prototype,"enableDeferredUpdate",void 0),Oa([t.Property(!1)],o.prototype,"disableRangeSelector",void 0),Oa([t.Property(!1)],o.prototype,"allowSnapping",void 0),Oa([t.Property(!1)],o.prototype,"allowIntervalData",void 0),Oa([t.Property(!1)],o.prototype,"useGroupingSeparator",void 0),Oa([t.Property()],o.prototype,"groupBy",void 0),Oa([t.Property("Outside")],o.prototype,"tickPosition",void 0),Oa([t.Complex(e.RangeNavigatorTheme.axisLabelFont,Xt)],o.prototype,"labelStyle",void 0),Oa([t.Complex({},Ci)],o.prototype,"majorGridLines",void 0),Oa([t.Complex({},Ri)],o.prototype,"majorTickLines",void 0),Oa([t.Complex({},Ma)],o.prototype,"navigatorStyleSettings",void 0),Oa([t.Complex({},ri)],o.prototype,"periodSelectorSettings",void 0),Oa([t.Complex({color:"#DDDDDD",width:1},Yt)],o.prototype,"navigatorBorder",void 0),Oa([t.Property("Material")],o.prototype,"theme",void 0),Oa([t.Property([])],o.prototype,"value",void 0),Oa([t.Property("")],o.prototype,"labelFormat",void 0),Oa([t.Property("")],o.prototype,"skeleton",void 0),Oa([t.Property("DateTime")],o.prototype,"skeletonType",void 0),Oa([t.Property("Middle")],o.prototype,"secondaryLabelAlignment",void 0),Oa([t.Complex({top:5,bottom:5,right:5,left:5},Ut)],o.prototype,"margin",void 0),Oa([t.Event()],o.prototype,"load",void 0),Oa([t.Event()],o.prototype,"loaded",void 0),Oa([t.Event()],o.prototype,"resized",void 0),Oa([t.Event()],o.prototype,"labelRender",void 0),Oa([t.Event()],o.prototype,"changed",void 0),Oa([t.Event()],o.prototype,"tooltipRender",void 0),Oa([t.Event()],o.prototype,"selectorRender",void 0),Oa([t.Event()],o.prototype,"beforePrint",void 0),o=Oa([t.NotifyPropertyChanges],o)}(t.Component),za=function(){function e(e){this.stockChart=e}return e.prototype.initializeChart=function(e){var i=this,r=this.stockChart;if(r.isProtectedOnChange=!0,r.chartObject){for(var o=document.getElementById(r.chartObject.id);o.firstChild;)o.removeChild(o.firstChild);he(r.chartObject+"_tooltip")&&t.remove(he(r.chartObject+"_tooltip"))}else r.chartObject=r.renderer.createGroup({id:r.element.id+"_stockChart_chart"}),r.mainObject.appendChild(r.chartObject);if(this.cartesianChartSize=this.calculateChartSize(),r.chart=new Rr({chartArea:r.chartArea,margin:this.findMargin(r),primaryXAxis:this.copyObject(r.primaryXAxis),primaryYAxis:this.copyObject(r.primaryYAxis),rows:r.rows,indicators:r.indicators,axes:r.axes,tooltipRender:function(e){i.stockChart.trigger("tooltipRender",e)},axisLabelRender:function(e){i.stockChart.trigger("axisLabelRender",e)},seriesRender:function(t){t.data&&i.stockChart.startValue&&i.stockChart.endValue&&(t.data=t.data.filter(function(e){return new Date(Date.parse(e[t.series.xName])).getTime()>=i.stockChart.startValue&&new Date(Date.parse(e[t.series.xName])).getTime()<=i.stockChart.endValue})),t.data=e||t.data,i.stockChart.trigger("seriesRender",t)},onZooming:function(e){i.stockChart.trigger(hi,e)},pointClick:function(e){i.stockChart.trigger("pointClick",e)},pointMove:function(e){i.stockChart.trigger("pointMove",e)},dataSource:r.dataSource,series:this.findSeriesCollection(r.series),zoomSettings:this.copyObject(r.zoomSettings),tooltip:r.tooltip,crosshair:r.crosshair,height:this.cartesianChartSize.height.toString(),selectedDataIndexes:r.selectedDataIndexes,selectionMode:r.selectionMode,isMultiSelect:r.isMultiSelect,annotations:r.annotations,theme:r.theme,legendSettings:{visible:!1},zoomComplete:function(e){if("DateTime"===e.axis.valueType&&r.rangeNavigator){i.stockChart.zoomChange=!0;var t=i.calculateUpdatedRange(e.currentZoomFactor,e.currentZoomPosition,e.axis);r.rangeSelector.sliderChange(t.start,t.end)}}}),0!==r.indicators.length){if(r.isSelect)for(var n=0;n<r.indicators.length;n++)r.chart.indicators[n].animation.enable=!1,r.chart.indicators[n].dataSource=t.extend([],r.chart.series[0].dataSource,null,!0);r.isSelect=!0}r.chart.stockChart=r,r.chart.appendTo(r.chartObject),r.isProtectedOnChange=!1},e.prototype.findMargin=function(e){var t={};return t.top=2*e.margin.top,t.left=e.margin.left,t.right=e.margin.right,t.bottom=e.margin.bottom,t},e.prototype.findSeriesCollection=function(e){for(var t=[],i=0,r=e.length;i<r;i++)t.push(e[i]),t[i].high=e[i].high,t[i].low=e[i].low,t[i].open=e[i].open,t[i].close=e[i].close,t[i].xName=e[i].xName,t[i].volume=e[i].volume,t[i].animation=e[i].animation,e[i].localData&&(t[i].dataSource=e[i].localData),"HiloOpenClose"!==t[i].type&&"Candle"!==t[i].type&&"volume"===t[i].yName&&(t[i].enableTooltip=!1);return t},e.prototype.calculateChartSize=function(){var e=this.stockChart;return new i.Size(e.availableSize.width,e.enablePeriodSelector&&e.enableSelector?e.availableSize.height-e.toolbarHeight-80:e.enableSelector&&!e.enablePeriodSelector?e.availableSize.height-80:e.enablePeriodSelector&&!e.enableSelector?e.availableSize.height-e.toolbarHeight:e.availableSize.height)},e.prototype.calculateUpdatedRange=function(e,t,i){var r,o,n=i.actualRange;return o=(r=n.min+t*n.delta)+e*n.delta,{start:r,end:o}},e.prototype.cartesianChartRefresh=function(e,t){e.cartesianChart.initializeChart(t)},e.prototype.copyObject=function(e){return t.extend({},e,{},!0)},e}(),Ia=function(){function e(e){this.stockChart=e}return e.prototype.initializeRangeNavigator=function(){var e=this,i=this.stockChart;if(i.selectorObject){for(var r=document.getElementById(i.selectorObject.id);r.firstChild;)r.removeChild(r.firstChild);he(i.selectorObject.id+"_leftTooltip")&&t.remove(he(i.selectorObject.id+"_leftTooltip")),he(i.selectorObject.id+"_rightTooltip")&&t.remove(he(i.selectorObject.id+"_rightTooltip"))}else i.selectorObject=i.renderer.createGroup({id:i.element.id+"_stockChart_rangeSelector",transform:"translate(0,"+i.cartesianChart.cartesianChartSize.height+")"}),i.mainObject.appendChild(i.selectorObject);i.rangeNavigator=new Ea({locale:"en",valueType:i.primaryXAxis.valueType,theme:this.stockChart.theme,series:this.findSeriesCollection(i.series),height:this.calculateChartSize().height.toString(),value:[new Date(i.startValue),new Date(i.endValue)],margin:this.findMargin(),tooltip:{enable:i.tooltip.enable,displayMode:"Always"},dataSource:i.dataSource,changed:function(t){var r={name:"rangeChange",end:t.end,selectedData:t.selectedData,start:t.start,zoomFactor:t.zoomFactor,zoomPosition:t.zoomPosition,data:void 0};e.stockChart.trigger("rangeChange",r),e.stockChart.startValue=t.start,e.stockChart.endValue=t.end,e.stockChart.zoomChange||e.stockChart.cartesianChart.cartesianChartRefresh(e.stockChart,r.data),i.periodSelector&&i.periodSelector.datePicker&&(i.periodSelector.datePicker.startDate=new Date(t.start),i.periodSelector.datePicker.endDate=new Date(t.end),i.periodSelector.datePicker.dataBind())}}),i.rangeNavigator.stockChart=i,i.rangeNavigator.appendTo(i.selectorObject)},e.prototype.findMargin=function(){var e={};return e.top=5,e.left=0,e.right=0,e.bottom=0,e},e.prototype.findSeriesCollection=function(e){for(var t=[],i=0,r=e.length;i<r;i++)t.push(e[i]),t[i].xName=e[i].xName,t[i].yName=""===e[i].yName?e[i].close:e[i].yName;return t},e.prototype.calculateChartSize=function(){var e=this.stockChart;return new i.Size(e.availableSize.width,e.enableSelector?80:0)},e.prototype.sliderChange=function(e,t){this.stockChart.rangeNavigator.rangeSlider.performAnimation(e,t,this.stockChart.rangeNavigator,0)},e}(),Da=function(){function e(e){this.selectedSeries="",this.selectedIndicator="",this.selectedTrendLine="",this.indicators=[],this.secondayIndicators=[],this.stockChart=e,this.selectedSeries=this.stockChart.series[0].type}return e.prototype.initializePeriodSelector=function(){var e=this.stockChart.tempPeriods;this.stockChart.periods=e,this.stockChart.periodSelector.rootControl=this.stockChart;var t=this.stockChart.chart.chartAxisLayoutPanel.seriesClipRect,i=he(this.stockChart.element.id+"_Secondary_Element"),r=this.stockChart.toolbarHeight;this.stockChart.periodSelector.appendSelector({thumbSize:0,element:i,width:t.width,height:r},t.x),this.initializeSeriesSelector(),this.initializeIndicatorSelector(),this.initializeTrendlineSelector(),this.exportButton(),this.printButton(),this.resetButton()},e.prototype.getDropDownItems=function(e){var t=[];if(e===this.stockChart.seriesType){for(o=0;o<e.length;o++)t.push({text:" "+e[o].toString()});for(o=0;o<this.stockChart.series.length;o++)for(var i=0;i<t.length;i++){var r=t[i].text.replace(" ","");(r="OHLC"===r?"HiloOpenClose":r)===this.stockChart.series[o].type&&(t[i].text=t[i].text.replace(" ","✔ "))}}else if(e===this.stockChart.exportType)for(o=0;o<e.length;o++)t.push({text:e[o].toString()});else for(var o=0;o<e.length;o++)"Print"!==e[o].toString()&&t.push({text:" "+e[o].toString()});return t},e.prototype.addedSeries=function(e){for(var t=this.stockChart.series,i=0;i<t.length;i++)if("volume"!==t[i].yName){t[i].type=e.indexOf("Candle")>-1?"Candle":e.indexOf("OHLC")>-1?"HiloOpenClose":e,t[i].enableSolidCandles="Candle"===e;for(var r=0;r<t[i].trendlines.length;r++){var o=t[i].trendlines[r];o.animation.enable=!1,o.enableTooltip=!1}}},e.prototype.initializeSeriesSelector=function(){var e=this;new s.DropDownButton({items:this.getDropDownItems(this.stockChart.seriesType),select:function(t){e.selectedSeries=t.item.text;var i=e.tickMark(t);e.addedSeries(i),e.stockChart.cartesianChart.initializeChart()}}).appendTo("#"+this.stockChart.element.id+"_seriesType")},e.prototype.resetButton=function(){var e=this;this.stockChart.isProtectedOnChange=!0,(new l.Button).appendTo("#"+this.stockChart.element.id+"_reset"),document.getElementById(this.stockChart.element.id+"_reset").onclick=function(){for(var t=e.indicators.length;t;)e.stockChart.indicators.pop(),t--;e.indicators=[],e.secondayIndicators=[],e.stockChart.isSingleAxis?e.stockChart.rows=[{}]:(e.stockChart.rows.length>2&&e.stockChart.rows.splice(2,e.stockChart.rows.length-1),e.stockChart.axes.length>2&&(e.stockChart.axes.splice(1,e.stockChart.axes.length-1),e.stockChart.axes[0].rowIndex=1));for(var i=0;i<e.stockChart.series.length;i++)"volume"!==e.stockChart.series[i].yName&&(e.stockChart.series[i].type=e.stockChart.tempSeriesType[i],0!==e.stockChart.series[i].trendlines.length&&(e.stockChart.series[i].trendlines[0].width=0));e.stockChart.indicatorElements=null,e.stockChart.resizeTo=null,e.stockChart.zoomChange=!1,e.stockChart.refresh(),e.stockChart.isProtectedOnChange=!0}},e.prototype.initializeTrendlineSelector=function(){var e=this;this.trendlineDropDown=new s.DropDownButton({items:this.stockChart.resizeTo?this.trendlineDropDown.items:this.getDropDownItems(this.stockChart.trendlineType),select:function(t){var i=e.tickMark(t),r=i=(i=i.split(" ")[0].toLocaleLowerCase()+(i.split(" ")[1]?i.split(" ")[1]:"")).substr(0,1).toUpperCase()+i.substr(1);if(e.selectedTrendLine=""===e.selectedTrendLine?r:e.selectedTrendLine+","+r,e.trendline!==r){e.trendline=r;for(var o=0;o<e.stockChart.series.length;o++)if("volume"!==e.stockChart.series[o].yName)if(0===e.stockChart.series[0].trendlines.length){var n=void 0;e.stockChart.trendlinetriggered&&(n=[{type:r,width:1,enableTooltip:!1}],e.stockChart.trendlinetriggered=!1),e.stockChart.series[0].trendlines=n}else e.stockChart.series[0].trendlines[0].width=1,e.stockChart.series[0].trendlines[0].type=r,e.stockChart.series[0].trendlines[0].animation.enable=!!e.stockChart.trendlinetriggered;e.stockChart.cartesianChart.initializeChart()}else t.item.text=" "+t.item.text.replace("✔ ",""),e.stockChart.series[0].trendlines[0].width=0,e.trendline=null,e.stockChart.cartesianChart.initializeChart()}}),this.trendlineDropDown.appendTo("#"+this.stockChart.element.id+"_trendType")},e.prototype.initializeIndicatorSelector=function(){var e=this;this.indicatorDropDown=new s.DropDownButton({items:this.stockChart.resizeTo?this.indicatorDropDown.items:this.getDropDownItems(this.stockChart.indicatorType),select:function(t){for(var i=0;i<e.stockChart.series.length;i++)0!==e.stockChart.series[i].trendlines.length&&(e.stockChart.series[i].trendlines[0].animation.enable=!1);t.item.text=t.item.text.indexOf("✔ ")>=0?t.item.text.substr(t.item.text.indexOf(";")+1):t.item.text;var r=t.item.text.replace(" ",""),o=r=(r=r.split(" ")[0].toLocaleLowerCase()+(r.split(" ")[1]?r.split(" ")[1]:"")).substr(0,1).toUpperCase()+r.substr(1);if(e.selectedIndicator=-1===e.selectedIndicator.indexOf(o)?e.selectedIndicator+" "+o:e.selectedIndicator.replace(o,""),"Tma"===o||"BollingerBands"===o||"Sma"===o||"Ema"===o)if(-1===e.indicators.indexOf(o)){t.item.text="✔ "+t.item.text.replace(" ","");var n=e.getIndicator(o,e.stockChart.series[0].yAxisName);e.indicators.push(o),e.stockChart.indicators=e.stockChart.indicators.concat(n),e.stockChart.cartesianChart.initializeChart()}else{t.item.text=" "+t.item.text;for(var a=0;a<e.stockChart.indicators.length;a++)e.stockChart.indicators[a].type===o&&e.stockChart.indicators.splice(a,1);e.indicators.splice(e.indicators.indexOf(o),1),e.stockChart.cartesianChart.initializeChart()}else e.createIndicatorAxes(o,t)}}),this.indicatorDropDown.appendTo("#"+this.stockChart.element.id+"_indicatorType")},e.prototype.getIndicator=function(e,t){var i=this.stockChart.series[0];return[{type:e,period:3,yAxisName:t,dataSource:i.localData,xName:i.xName,open:i.open,close:i.close,high:i.high,low:i.low,volume:i.volume,fill:"Sma"===e?"#32CD32":"#6063ff",animation:{enable:!1},upperLine:{color:"#FFE200",width:1},periodLine:{width:2},lowerLine:{color:"#FAA512",width:1},fastPeriod:8,slowPeriod:5,macdType:"Both",width:1,macdPositiveColor:"#6EC992",macdNegativeColor:"#FF817F",bandColor:"rgba(245, 203, 35, 0.12)"}]},e.prototype.createIndicatorAxes=function(e,t){if(-1===this.indicators.indexOf(e)){t.item.text="✔ "+t.item.text.replace(" ",""),this.indicators.push(e);var i=this.stockChart.rows.length;this.stockChart.rows[this.stockChart.rows.length-1].height="15%";var r=[{height:100-15*i+"px"}];if(1===this.stockChart.rows.length&&(this.stockChart.isSingleAxis=!0),this.stockChart.rows=this.stockChart.rows.concat(r),this.stockChart.isSingleAxis)for(a=0;a<this.stockChart.axes.length;a++)this.stockChart.axes[a].rowIndex+=1;else this.stockChart.axes[0].rowIndex+=1;var o=[{plotOffset:10,opposedPosition:!0,rowIndex:this.stockChart.isSingleAxis?0:this.stockChart.axes.length,desiredIntervals:1,labelFormat:"n2",majorGridLines:this.stockChart.primaryYAxis.majorGridLines,lineStyle:this.stockChart.primaryYAxis.lineStyle,labelPosition:this.stockChart.primaryYAxis.labelPosition,majorTickLines:this.stockChart.primaryYAxis.majorTickLines,rangePadding:"None",name:e.toString()}];this.stockChart.axes=this.stockChart.axes.concat(o),this.stockChart.primaryYAxis.rowIndex=this.stockChart.isSingleAxis?i+1:0;var n=this.getIndicator(e,e.toString());this.stockChart.indicators=this.stockChart.indicators.concat(n),this.stockChart.cartesianChart.initializeChart()}else{t.item.text=" "+t.item.text;for(var a=0;a<this.stockChart.indicators.length;a++)this.stockChart.indicators[a].type===e&&this.stockChart.indicators.splice(a,1);this.indicators.splice(this.indicators.indexOf(e),1);for(var s=0,l=0;l<this.stockChart.axes.length;l++)this.stockChart.axes[l].name===e&&(s=this.stockChart.axes[l].rowIndex,this.stockChart.rows.splice(l,1),this.stockChart.axes.splice(l,1));for(l=0;l<this.stockChart.axes.length;l++)0!==this.stockChart.axes[l].rowIndex&&this.stockChart.axes[l].rowIndex>s&&(this.stockChart.axes[l].rowIndex=this.stockChart.axes[l].rowIndex-1);this.stockChart.cartesianChart.initializeChart()}},e.prototype.tickMark=function(e){for(var t,i=e.item.parentObj.items,r=0;r<i.length;r++)i[r].text=i[r].text.indexOf("✔ ")>=0?i[r].text.substr(i[r].text.indexOf(";")+1):i[r].text,i[r].text.indexOf(" ")>=0||(i[r].text=" "+i[r].text);return e.item.text.indexOf(" ")>=0?(t=e.item.text.replace(" ",""),e.item.text=e.item.text.replace(" ","✔ ")):t=e.item.text.replace("✔ ",""),t},e.prototype.printButton=function(){var e=this;this.stockChart.exportType.indexOf("Print")>-1&&((new l.Button).appendTo("#"+this.stockChart.element.id+"_print"),document.getElementById(this.stockChart.element.id+"_print").onclick=function(){e.stockChart.chart.print(e.stockChart.element.id)})},e.prototype.exportButton=function(){var e=this;new s.DropDownButton({items:this.getDropDownItems(this.stockChart.exportType),select:function(i){var r,o=i.item.text,n=e.stockChart,a=n.element.id+"_stockChart_",s=n.svgObject.getBoundingClientRect();n.chart.exportModule&&(e.stockChart.svgObject.insertAdjacentElement("afterbegin",e.addExportSettings()),r=n.svgObject.firstElementChild.getBoundingClientRect(),e.stockChart.svgObject.setAttribute("height",(s.height+r.height).toString()),he(a+"chart").style.transform="translateY("+r.height+"px)",n.enableSelector&&he(a+"rangeSelector").setAttribute("transform","translate(0,"+(n.cartesianChart.cartesianChartSize.height+r.height)+")"),n.chart.exportModule.export(o,"StockChart",null,[n],null,n.svgObject.clientHeight),t.remove(he(e.stockChart.element.id+"_additionalExport")),he(a+"chart").style.transform="translateY(0px)",n.enableSelector&&he(a+"rangeSelector").setAttribute("transform","translate(0,"+n.cartesianChart.cartesianChartSize.height+")"),e.stockChart.svgObject.setAttribute("height",s.height.toString()))}}).appendTo("#"+this.stockChart.element.id+"_export")},e.prototype.calculateAutoPeriods=function(){var e=[];return(e=this.findRange(this.stockChart.seriesXMin,this.stockChart.seriesXMax)).push({text:"YTD",selected:!0},{text:"All"}),e},e.prototype.findRange=function(e,t){var i=[];return(t-e)/3154e7>=1?i.push({text:"1M",interval:1,intervalType:"Months"},{text:"3M",interval:3,intervalType:"Months"},{text:"6M",interval:6,intervalType:"Months"},{text:"1Y",interval:1,intervalType:"Years"}):(t-e)/1577e7>=1?i.push({text:"1M",interval:1,intervalType:"Months"},{text:"3M",interval:3,intervalType:"Months"},{text:"6M",interval:6,intervalType:"Months"}):(t-e)/2628e6>=1?i.push({text:"1D",interval:1,intervalType:"Days"},{text:"3W",interval:3,intervalType:"Weeks"},{text:"1M",interval:1,intervalType:"Months"}):(t-e)/864e5>=1&&i.push({text:"1H",interval:1,intervalType:"Hours"},{text:"12H",interval:12,intervalType:"Hours"},{text:"1D",interval:1,intervalType:"Days"}),i},e.prototype.addExportSettings=function(){var e=this.stockChart.renderer.createGroup({id:this.stockChart.element.id+"_additionalExport",width:this.stockChart.availableSize.width}),t=i.measureText(this.stockChart.title,this.stockChart.titleStyle).height,r=new i.TextOption(e.id+"_Title",Ye(new i.Rect(0,0,this.stockChart.availableSize.width,0),this.stockChart.titleStyle),0,"middle",this.stockChart.title,"","text-before-edge");Ve(this.stockChart.renderer,r,this.stockChart.titleStyle,this.stockChart.titleStyle.color,e);var o={size:"15px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},n=i.measureText("Series: "+this.selectedSeries,o).width/2,a=t;return this.textElementSpan(new i.TextOption(e.id+"_Series",n,a,"start",["Series : ",this.selectedSeries],"","text-before-edge"),o,"black",e),n+=i.measureText("Series: "+this.selectedSeries+" Z",o).width,""!==this.selectedIndicator&&(this.textElementSpan(new i.TextOption(e.id+"_Indicator",n,a,"start",["Indicator :",this.selectedIndicator],"","text-before-edge"),o,"black",e),n+=i.measureText("Indicator: "+this.selectedIndicator+" Z",o).width),""!==this.selectedTrendLine&&this.textElementSpan(new i.TextOption(e.id+"_TrendLine",n,a,"start",["Trendline :",this.selectedTrendLine],"","text-before-edge"),o,"black",e),e},e.prototype.textElementSpan=function(e,t,r,o,n,a,s,l,h){void 0===n&&(n=!1),void 0===l&&(l=!1);var c,d=new i.SvgRenderer(""),p={};p={id:e.id,"font-style":t.fontStyle,"font-family":t.fontFamily,"font-weight":t.fontWeight,"text-anchor":e.anchor,x:e.x,y:e.y,fill:r,"font-size":t.size,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine};var u="string"==typeof e.text?e.text:n?e.text[e.text.length-1]:e.text[0],g=d.createText(p,u);if("string"!=typeof e.text&&e.text.length>1)for(var y=1,m=e.text.length;y<m;y++)e.text[y]=" "+e.text[y],c=d.createTSpan({x:e.x+i.measureText(u,t).width+5,id:e.id,y:e.y,opacity:.5},e.text[y]),g.appendChild(c);return be(!1,o,g,a,s,"x","y",null,null,l,!1,null,h),g},e}(),Ba=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Na=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Fa=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("")],i.prototype,"color",void 0),Na([t.Property("16px")],i.prototype,"size",void 0),Na([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),Na([t.Property("Normal")],i.prototype,"fontStyle",void 0),Na([t.Property("Normal")],i.prototype,"fontWeight",void 0),Na([t.Property(1)],i.prototype,"opacity",void 0),Na([t.Property("Trim")],i.prototype,"textOverflow",void 0),Na([t.Property("Center")],i.prototype,"textAlignment",void 0),i}(t.ChildProperty),Va=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("")],i.prototype,"color",void 0),Na([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),ja=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Complex({},Va)],i.prototype,"border",void 0),Na([t.Property("transparent")],i.prototype,"background",void 0),Na([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Ha=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(10)],i.prototype,"left",void 0),Na([t.Property(10)],i.prototype,"right",void 0),Na([t.Property(10)],i.prototype,"top",void 0),Na([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),Xa=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ba(r,i),Na([t.Property(!1)],r.prototype,"startFromAxis",void 0),Na([t.Property(!0)],r.prototype,"visible",void 0),Na([t.Property(null)],r.prototype,"start",void 0),Na([t.Property("#808080")],r.prototype,"color",void 0),Na([t.Property(null)],r.prototype,"end",void 0),Na([t.Property(null)],r.prototype,"size",void 0),Na([t.Property("Auto")],r.prototype,"sizeType",void 0),Na([t.Property(null)],r.prototype,"dashArray",void 0),Na([t.Property(!1)],r.prototype,"isRepeat",void 0),Na([t.Property(null)],r.prototype,"repeatEvery",void 0),Na([t.Property(!1)],r.prototype,"isSegmented",void 0),Na([t.Property(null)],r.prototype,"repeatUntil",void 0),Na([t.Property(null)],r.prototype,"segmentStart",void 0),Na([t.Property(null)],r.prototype,"segmentAxisName",void 0),Na([t.Property(null)],r.prototype,"segmentEnd",void 0),Na([t.Property(1)],r.prototype,"opacity",void 0),Na([t.Property("")],r.prototype,"text",void 0),Na([t.Complex({color:"transparent",width:1},Va)],r.prototype,"border",void 0),Na([t.Property(null)],r.prototype,"rotation",void 0),Na([t.Property("Behind")],r.prototype,"zIndex",void 0),Na([t.Property("Middle")],r.prototype,"horizontalAlignment",void 0),Na([t.Property("Middle")],r.prototype,"verticalAlignment",void 0),Na([t.Complex(e.Theme.stripLineLabelFont,Fa)],r.prototype,"textStyle",void 0),r}(t.ChildProperty),Ya=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(0)],i.prototype,"delay",void 0),Na([t.Property(!1)],i.prototype,"enable",void 0),Na([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),Ga=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(null)],i.prototype,"fill",void 0),Na([t.Property("Gap")],i.prototype,"mode",void 0),Na([t.Complex({color:"transparent",width:0},Va)],i.prototype,"border",void 0),i}(t.ChildProperty),Wa=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("Line")],i.prototype,"type",void 0),Na([t.Property(null)],i.prototype,"length",void 0),Na([t.Property(null)],i.prototype,"color",void 0),Na([t.Property("")],i.prototype,"dashArray",void 0),Na([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Ua=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.localData=void 0,t}return Ba(i,e),Na([t.Property("date")],i.prototype,"xName",void 0),Na([t.Property("close")],i.prototype,"yName",void 0),Na([t.Property("open")],i.prototype,"open",void 0),Na([t.Property("close")],i.prototype,"close",void 0),Na([t.Property("high")],i.prototype,"high",void 0),Na([t.Property("low")],i.prototype,"low",void 0),Na([t.Property("volume")],i.prototype,"volume",void 0),Na([t.Property("")],i.prototype,"pointColorMapping",void 0),Na([t.Complex(null,Ya)],i.prototype,"animation",void 0),Na([t.Property(null)],i.prototype,"xAxisName",void 0),Na([t.Property(null)],i.prototype,"yAxisName",void 0),Na([t.Property(null)],i.prototype,"fill",void 0),Na([t.Property("0")],i.prototype,"dashArray",void 0),Na([t.Property(1)],i.prototype,"width",void 0),Na([t.Property("")],i.prototype,"name",void 0),Na([t.Property("")],i.prototype,"dataSource",void 0),Na([t.Property()],i.prototype,"query",void 0),Na([t.Property("#e74c3d")],i.prototype,"bullFillColor",void 0),Na([t.Property("#2ecd71")],i.prototype,"bearFillColor",void 0),Na([t.Property(!1)],i.prototype,"enableSolidCandles",void 0),Na([t.Property(!0)],i.prototype,"visible",void 0),Na([t.Complex({color:"transparent",width:0},Va)],i.prototype,"border",void 0),Na([t.Property(1)],i.prototype,"opacity",void 0),Na([t.Property("Candle")],i.prototype,"type",void 0),Na([t.Complex(null,Ji)],i.prototype,"marker",void 0),Na([t.Collection([],er)],i.prototype,"trendlines",void 0),Na([t.Property(!0)],i.prototype,"enableTooltip",void 0),Na([t.Property("")],i.prototype,"tooltipMappingName",void 0),Na([t.Property(null)],i.prototype,"selectionStyle",void 0),Na([t.Property(.5)],i.prototype,"cardinalSplineTension",void 0),Na([t.Complex(null,$t)],i.prototype,"cornerRadius",void 0),Na([t.Complex(null,Ga)],i.prototype,"emptyPointSettings",void 0),Na([t.Property(null)],i.prototype,"columnWidth",void 0),Na([t.Property(0)],i.prototype,"columnSpacing",void 0),i}(t.ChildProperty),Za=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("Sma")],i.prototype,"type",void 0),Na([t.Property(14)],i.prototype,"period",void 0),Na([t.Property(3)],i.prototype,"dPeriod",void 0),Na([t.Property(14)],i.prototype,"kPeriod",void 0),Na([t.Property(80)],i.prototype,"overBought",void 0),Na([t.Property(20)],i.prototype,"overSold",void 0),Na([t.Property("Close")],i.prototype,"field",void 0),Na([t.Property(2)],i.prototype,"standardDeviation",void 0),Na([t.Property(12)],i.prototype,"slowPeriod",void 0),Na([t.Property(!0)],i.prototype,"showZones",void 0),Na([t.Property(26)],i.prototype,"fastPeriod",void 0),Na([t.Complex({color:"#ff9933",width:2},Wa)],i.prototype,"macdLine",void 0),Na([t.Property("Both")],i.prototype,"macdType",void 0),Na([t.Property("#e74c3d")],i.prototype,"macdNegativeColor",void 0),Na([t.Property("#2ecd71")],i.prototype,"macdPositiveColor",void 0),Na([t.Property("rgba(211,211,211,0.25)")],i.prototype,"bandColor",void 0),Na([t.Complex({color:"#ffb735",width:1},Wa)],i.prototype,"upperLine",void 0),Na([t.Property("")],i.prototype,"seriesName",void 0),Na([t.Complex({color:"#f2ec2f",width:1},Wa)],i.prototype,"periodLine",void 0),Na([t.Complex({color:"#f2ec2f",width:1},Wa)],i.prototype,"lowerLine",void 0),Na([t.Property("")],i.prototype,"high",void 0),Na([t.Property("")],i.prototype,"open",void 0),Na([t.Property("")],i.prototype,"low",void 0),Na([t.Property("")],i.prototype,"xName",void 0),Na([t.Property("")],i.prototype,"close",void 0),Na([t.Property("")],i.prototype,"pointColorMapping",void 0),Na([t.Property("")],i.prototype,"volume",void 0),Na([t.Property(null)],i.prototype,"xAxisName",void 0),Na([t.Property(null)],i.prototype,"yAxisName",void 0),Na([t.Complex(null,Ya)],i.prototype,"animation",void 0),Na([t.Property(null)],i.prototype,"fill",void 0),Na([t.Property("0")],i.prototype,"dashArray",void 0),Na([t.Property(1)],i.prototype,"width",void 0),Na([t.Property()],i.prototype,"query",void 0),Na([t.Property("")],i.prototype,"dataSource",void 0),i}(t.ChildProperty),qa=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ba(r,i),Na([t.Complex({},Ai)],r.prototype,"crosshairTooltip",void 0),Na([t.Complex(e.Theme.axisLabelFont,Fa)],r.prototype,"labelStyle",void 0),Na([t.Property("")],r.prototype,"title",void 0),Na([t.Complex(e.Theme.axisTitleFont,Fa)],r.prototype,"titleStyle",void 0),Na([t.Property("")],r.prototype,"labelFormat",void 0),Na([t.Property("DateTime")],r.prototype,"skeletonType",void 0),Na([t.Property("")],r.prototype,"skeleton",void 0),Na([t.Property(0)],r.prototype,"plotOffset",void 0),Na([t.Property(10)],r.prototype,"logBase",void 0),Na([t.Property(0)],r.prototype,"rowIndex",void 0),Na([t.Property(1)],r.prototype,"span",void 0),Na([t.Property(3)],r.prototype,"maximumLabels",void 0),Na([t.Property(null)],r.prototype,"desiredIntervals",void 0),Na([t.Property(1)],r.prototype,"zoomFactor",void 0),Na([t.Property(0)],r.prototype,"zoomPosition",void 0),Na([t.Property(!1)],r.prototype,"opposedPosition",void 0),Na([t.Property(!0)],r.prototype,"enableAutoIntervalOnZooming",void 0),Na([t.Property("Double")],r.prototype,"valueType",void 0),Na([t.Property("Auto")],r.prototype,"rangePadding",void 0),Na([t.Property("None")],r.prototype,"edgeLabelPlacement",void 0),Na([t.Property("BetweenTicks")],r.prototype,"labelPlacement",void 0),Na([t.Property("Auto")],r.prototype,"intervalType",void 0),Na([t.Property("Outside")],r.prototype,"tickPosition",void 0),Na([t.Property("")],r.prototype,"name",void 0),Na([t.Property("Outside")],r.prototype,"labelPosition",void 0),Na([t.Property(!0)],r.prototype,"visible",void 0),Na([t.Property(0)],r.prototype,"labelRotation",void 0),Na([t.Property(0)],r.prototype,"minorTicksPerInterval",void 0),Na([t.Property(null)],r.prototype,"crossesAt",void 0),Na([t.Property(null)],r.prototype,"crossesInAxis",void 0),Na([t.Property(!0)],r.prototype,"placeNextToAxisLine",void 0),Na([t.Property(null)],r.prototype,"minimum",void 0),Na([t.Property(null)],r.prototype,"interval",void 0),Na([t.Property(null)],r.prototype,"maximum",void 0),Na([t.Property(34)],r.prototype,"maximumLabelWidth",void 0),Na([t.Complex({},Ri)],r.prototype,"majorTickLines",void 0),Na([t.Property(!1)],r.prototype,"enableTrim",void 0),Na([t.Complex({},Mi)],r.prototype,"minorTickLines",void 0),Na([t.Complex({},Pi)],r.prototype,"minorGridLines",void 0),Na([t.Complex({},Ci)],r.prototype,"majorGridLines",void 0),Na([t.Complex({},Li)],r.prototype,"lineStyle",void 0),Na([t.Property(!1)],r.prototype,"isInversed",void 0),Na([t.Property("Trim")],r.prototype,"labelIntersectAction",void 0),Na([t.Property(100)],r.prototype,"coefficient",void 0),Na([t.Property(0)],r.prototype,"startAngle",void 0),Na([t.Property(2)],r.prototype,"tabIndex",void 0),Na([t.Collection([],Xa)],r.prototype,"stripLines",void 0),Na([t.Property(null)],r.prototype,"description",void 0),r}(t.ChildProperty),Qa=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("100%")],i.prototype,"height",void 0),Na([t.Complex({},Va)],i.prototype,"border",void 0),i}(t.ChildProperty),$a=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(2)],i.prototype,"period",void 0),Na([t.Property("")],i.prototype,"name",void 0),Na([t.Property("Linear")],i.prototype,"type",void 0),Na([t.Property(2)],i.prototype,"polynomialOrder",void 0),Na([t.Property(0)],i.prototype,"forwardForecast",void 0),Na([t.Property(0)],i.prototype,"backwardForecast",void 0),Na([t.Complex({},Ya)],i.prototype,"animation",void 0),Na([t.Property(!0)],i.prototype,"enableTooltip",void 0),Na([t.Complex({},Ji)],i.prototype,"marker",void 0),Na([t.Property(null)],i.prototype,"intercept",void 0),Na([t.Property("")],i.prototype,"fill",void 0),Na([t.Property("SeriesType")],i.prototype,"legendShape",void 0),Na([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Ja=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property("0")],i.prototype,"y",void 0),Na([t.Property("0")],i.prototype,"x",void 0),Na([t.Property(null)],i.prototype,"content",void 0),Na([t.Property("Chart")],i.prototype,"region",void 0),Na([t.Property("Center")],i.prototype,"horizontalAlignment",void 0),Na([t.Property("Pixel")],i.prototype,"coordinateUnits",void 0),Na([t.Property("Middle")],i.prototype,"verticalAlignment",void 0),Na([t.Property(null)],i.prototype,"yAxisName",void 0),Na([t.Property(null)],i.prototype,"description",void 0),Na([t.Property(null)],i.prototype,"xAxisName",void 0),i}(t.ChildProperty),Ka=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ba(i,e),Na([t.Property(0)],i.prototype,"point",void 0),Na([t.Property(0)],i.prototype,"series",void 0),i}(t.ChildProperty),es=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return Ba(r,i),Na([t.Property("Circle")],r.prototype,"type",void 0),Na([t.Property("")],r.prototype,"text",void 0),Na([t.Property("")],r.prototype,"description",void 0),Na([t.Property()],r.prototype,"date",void 0),Na([t.Complex({color:"black",width:1},Va)],r.prototype,"border",void 0),Na([t.Property("transparent")],r.prototype,"background",void 0),Na([t.Property(!0)],r.prototype,"showOnSeries",void 0),Na([t.Property("close")],r.prototype,"placeAt",void 0),Na([t.Complex(e.Theme.stockEventFont,Fa)],r.prototype,"textStyle",void 0),Na([t.Property([])],r.prototype,"seriesIndexes",void 0),r}(t.ChildProperty),ts=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),is=function(e){function o(t){var i=e.call(this,t.chart)||this;return i.symbolLocations=[],i.stockChart=t,i.chartId=i.stockChart.element.id,i}return ts(o,e),o.prototype.renderStockEvents=function(){var e,t,r,o=this.stockChart,n=o.renderer.createGroup({id:this.chartId+"_StockEvents"});this.symbolLocations=st(o.series.length,o.stockEvents.length,new Vi(0,0));for(var a=0;a<o.stockEvents.length;a++){e=this.stockChart.stockEvents[a];for(var s=0,l=o.chart.series;s<l.length;s++){var h=l[s],c={name:"stockEventRender",stockChart:o,text:e.text,type:e.type,cancel:!1,series:h};if(o.trigger("stockEventRender",c),e.text=c.text,e.type=c.type,r=i.measureText(e.text+"W",e.textStyle),!c.cancel&&(t=o.renderer.createGroup({id:this.chartId+"_Series_"+h.index+"_StockEvents_"+a}),x(this.stockChart.isBlazor?Date.parse(e.date.toString()):this.dateParse(e.date).getTime(),h.xAxis.visibleRange)))if(e.seriesIndexes.length>0)for(var d=0;d<e.seriesIndexes.length;d++)e.seriesIndexes[d]===h.index&&n.appendChild(this.creatEventGroup(t,h,e,a,r));else n.appendChild(this.creatEventGroup(t,h,e,a,r))}}return n},o.prototype.creatEventGroup=function(e,t,i,r,o){var n=this.findClosePoint(t,i);return i.showOnSeries||(n.y=t.yAxis.rect.y+t.yAxis.rect.height),this.symbolLocations[t.index][r]=n,this.createStockElements(e,i,t,r,n,o),e},o.prototype.findClosePoint=function(e,t){for(var i,r,o,n=this.stockChart.isBlazor?Date.parse(t.date.toString()):this.dateParse(t.date).getTime(),a=this.getClosest(e,n),s=0;s<e.points.length;s++)a===(r=e.points[s]).xValue&&r.visible?i=new Yi(r,e):0!==s&&s!==e.points.length&&a>e.points[s-1].xValue&&a<e.points[s+1].xValue&&(i=new Yi(r,e));var l=e.xAxis.rect.x+z(i.point.xValue,e.xAxis)*e.xAxis.rect.width;return o=z(i.point[t.placeAt],e.yAxis)*e.yAxis.rect.height,o=-1*o+(e.yAxis.rect.y+e.yAxis.rect.height),new Vi(l,o)},o.prototype.createStockElements=function(e,t,r,o,n,a){var s,l,h=new i.Size(a.width>20?a.width:20,a.height>20?a.height:20),c=n.x,d=n.y,p=this.chartId+"_Series_"+r.index+"_StockEvents_"+o,u=t.border;switch(t.type){case"Flag":case"Circle":case"Square":e.appendChild(ne(new Vi(c,d),"Circle",new i.Size(2,2),"",new i.PathOption(p+"_Circle","transparent",u.width,u.color),this.dateParse(t.date).toISOString())),e.appendChild(ne(new Vi(c,d-5),"VerticalLine",new i.Size(9,9),"",new i.PathOption(p+"_Path",u.color,u.width,u.color),this.dateParse(t.date).toISOString())),e.appendChild(ne(new Vi("Flag"!==t.type?c:c+h.width/2,d-h.height),t.type,h,"",new i.PathOption(p+"_Shape",t.background,u.width,u.color),this.dateParse(t.date).toISOString())),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text","Flag"!==t.type?n.x:n.x+h.width/2,n.y-h.height,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e);break;case"ArrowUp":case"ArrowDown":case"ArrowRight":case"ArrowLeft":s="M "+c+" "+d+" "+this.findArrowpaths(t.type),l=new i.PathOption(p+"_Shape",t.background,u.width,u.color,1,"",s),e.appendChild(this.stockChart.renderer.drawPath(l));break;case"Triangle":case"InvertedTriangle":h.height=3*a.height,h.width=a.width+1.5*a.width,e.appendChild(ne(new Vi(n.x,n.y),t.type,new i.Size(20,20),"",new i.PathOption(p+"_Shape",t.background,u.width,u.color),this.dateParse(t.date).toISOString())),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text",n.x,n.y,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e);break;case"Text":a.height+=8,s="M "+c+" "+d+" L "+(c-5)+" "+(d-5)+" L "+(c-a.width/2)+" "+(d-5)+" L "+(c-a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-5)+" L "+(c+5)+" "+(d-5)+" Z",l=new i.PathOption(p+"_Shape",t.background,u.width,u.color,1,"",s),e.appendChild(this.stockChart.renderer.drawPath(l)),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text",c,d-a.height/2,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e);break;default:s="M "+c+" "+d+" L "+(c-a.width/2)+" "+(d-a.height/3)+" L "+(c-a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-a.height)+" L "+(c+a.width/2)+" "+(d-a.height/3)+" Z",l=new i.PathOption(p+"_Shape",t.background,u.width,u.color,1,"",s),e.appendChild(this.stockChart.renderer.drawPath(l)),Ve(this.stockChart.renderer,new i.TextOption(p+"_Text",c,d-a.height/2,"middle",t.text,"","middle"),t.textStyle,t.textStyle.color,e)}},o.prototype.renderStockEventTooltip=function(e){var r=parseInt(e.split("_StockEvents_")[0].split(this.chartId+"_Series_")[1],10),o=parseInt(e.split("_StockEvents_")[1].replace(/\D+/g,""),10),n=this.symbolLocations[r][o],a=new Vi(n.x,n.y+this.stockChart.toolbarHeight+this.stockChart.titleSize.height);this.applyHighLights(o,r);var s=this.getElement(this.chartId+"_StockEvents_Tooltip_svg");if(s&&parseInt(s.getAttribute("opacity"),10)>0)this.stockEventTooltip.content=[this.stockChart.stockEvents[o].description],this.stockEventTooltip.location=a,this.stockEventTooltip.dataBind();else{he(this.chartId+"_StockEvents_Tooltip_svg")&&t.remove(he(this.chartId+"_StockEvents_Tooltip"));var l=t.createElement("div",{id:this.chartId+"_StockEvents_Tooltip",className:"ejSVGTooltip",attrs:{style:"pointer-events:none; position:absolute;z-index: 1"}});he(this.chartId+"_Secondary_Element").appendChild(l),this.stockEventTooltip=new i.Tooltip({opacity:1,header:"",content:[this.stockChart.stockEvents[o].description],enableAnimation:!0,location:a,theme:this.stockChart.theme,inverted:!0,areaBounds:this.stockChart.chart.chartAxisLayoutPanel.seriesClipRect}),this.stockEventTooltip.areaBounds.y+=this.stockChart.toolbarHeight+this.stockChart.titleSize.height,this.stockEventTooltip.appendTo("#"+l.id)}},o.prototype.removeStockEventTooltip=function(e){var t=this,i=this.getElement(this.chartId+"_StockEvents_Tooltip");this.stopAnimation(),i&&this.stockEventTooltip&&(this.toolTipInterval=+setTimeout(function(){t.stockEventTooltip.fadeOut(),t.removeHighLights()},e))},o.prototype.findArrowpaths=function(e){var t="";switch(e){case"ArrowUp":t="l -10 10 l 5 0 l 0 10 l 10 0 l 0 -10 l 5 0 z";break;case"ArrowDown":t="l -10 -10 l 5 0 l 0 -10 l 10 0 l 0 10 l 5 0 z";break;case"ArrowLeft":t="l -10 -10 l 0 5 l -10 0 l 0 10 l 10 0 l 0 5 z";break;case"ArrowRight":t="l 10 -10 l 0 5 l 10 0 l 0 10 l -10 0 l 0 5 z"}return t},o.prototype.applyHighLights=function(e,t){this.pointIndex===e&&this.seriesIndex===t||this.removeHighLights(),this.pointIndex=e,this.seriesIndex=t;var i=this.chartId+"_Series_"+t+"_StockEvents_"+e;this.setOpacity(i+"_Shape",.5),this.setOpacity(i+"_Text",.5)},o.prototype.removeHighLights=function(){var e=this.chartId+"_Series_"+this.seriesIndex+"_StockEvents_"+this.pointIndex;this.setOpacity(e+"_Shape",1),this.setOpacity(e+"_Text",1)},o.prototype.setOpacity=function(e,t){he(e)&&he(e).setAttribute("opacity",t.toString())},o.prototype.dateParse=function(e){var t=this.chart.intl.getDateParser({skeleton:"full",type:"dateTime"}),i=this.chart.intl.getDateFormat({skeleton:"full",type:"dateTime"});return new Date(Date.parse(t(i(new Date(r.DataUtil.parse.parseJson({val:e}).val)))))},o}(dn),rs=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),os=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ns=function(e){function o(i,r){var o=e.call(this,i,r)||this;return o.isSingleAxis=!1,o.chartid=57723,o.tempSeriesType=[],o.zoomChange=!1,o.allowPan=!1,o.onPanning=!1,o.trendlinetriggered=!0,o.initialRender=!0,o.rangeFound=!1,o.tempPeriods=[],o.toolbarHeight=o.enablePeriodSelector?t.Browser.isDevice?56:42:0,o}return rs(o,e),o.prototype.onPropertyChanged=function(e,t){for(var i=0,r=Object.keys(e);i<r.length;i++)switch(r[i]){case"series":this.render()}},o.prototype.rangeChanged=function(e,t){var i=document.getElementById(this.chartObject.id);if(i)for(;i.firstChild;)i.removeChild(i.firstChild);this.startValue=e,this.endValue=t,this.cartesianChart.initializeChart(),this.periodSelector.datePicker.startDate=new Date(e),this.periodSelector.datePicker.endDate=new Date(t),this.periodSelector.datePicker.dataBind()},o.prototype.preRender=function(){this.isBlazor=window.Blazor,this.unWireEvents(),this.initPrivateVariable(),this.allowServerDataBinding=!1,this.isProtectedOnChange=!0,this.setCulture(),this.wireEvents()},o.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,i=t.Browser.touchMoveEvent,r=t.Browser.touchEndEvent,o=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,e,this.stockChartOnMouseDown),t.EventHandler.remove(this.element,i,this.stockChartOnMouseMove),t.EventHandler.remove(this.element,r,this.stockChartMouseEnd),t.EventHandler.remove(this.element,"click",this.stockChartOnMouseClick),t.EventHandler.remove(this.element,"contextmenu",this.stockChartRightClick),t.EventHandler.remove(this.element,o,this.stockChartOnMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.stockChartResize)},o.prototype.wireEvents=function(){var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.stockChartOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.stockChartOnMouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.stockChartMouseEnd,this),t.EventHandler.add(this.element,"click",this.stockChartOnMouseClick,this),t.EventHandler.add(this.element,"contextmenu",this.stockChartRightClick,this),t.EventHandler.add(this.element,e,this.stockChartOnMouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.stockChartResize.bind(this)),this.setStyle(this.element)},o.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-stockChart").length;this.element.id="stockChart_"+this.chartid+"_"+e}this.seriesXMax=null,this.seriesXMin=null,this.startValue=null,this.endValue=null,this.currentEnd=null},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.storeDataSource=function(){for(var e=0;e<this.series.length;e++){var t=this.series[e];this.tempSeriesType.push(t.type),t.localData=void 0}0===this.series.length&&this.series.push({}),this.initialRender=!0,this.rangeFound=!1,this.resizeTo=null,this.startValue=null,this.endValue=null},o.prototype.render=function(){var e=this,t={name:"load",stockChart:this.isBlazor?{}:this,theme:this.theme};this.trigger("load",t,function(){e.theme=e.isBlazor?t.theme:e.theme,e.stockChartTheme=c(e.theme),e.storeDataSource(),e.drawSVG(),e.renderTitle(),e.chartModuleInjection(),e.chartRender(),e.dataSource instanceof r.DataManager&&e.series[0].dataSource instanceof r.DataManager||(e.stockChartDataManagerSuccess(),e.initialRender=!1),e.renderComplete(),e.allowServerDataBinding=!0,e.isProtectedOnChange=!1})},o.prototype.stockChartDataManagerSuccess=function(){this.findRange(),this.renderRangeSelector(),this.renderPeriodSelector(),this.trigger("loaded",{stockChart:this.isBlazor?{}:this})},o.prototype.setStyle=function(e){var t=this.zoomSettings,i=t.enableSelectionZooming||t.enablePinchZooming||"None"!==this.selectionMode||this.crosshair.enable;e.style.msTouchAction=i?"none":"element",e.style.touchAction=i?"none":"element",e.style.msUserSelect="none",e.style.msContentZooming="none",e.style.position="relative",e.style.display="block",e.style.webkitUserSelect="none"},o.prototype.drawSVG=function(){this.removeSvg(),je(this),this.renderer=new i.SvgRenderer(this.element.id),this.renderBorder(),this.createSecondaryElements(),this.mainObject=this.renderer.createSvg({id:this.element.id+"_stockChart_svg",width:this.availableSize.width,height:this.availableSize.height-(this.enablePeriodSelector?this.toolbarHeight:0)-this.titleSize.height}),this.svgObject=this.mainObject,this.element.appendChild(this.mainObject)},o.prototype.createSecondaryElements=function(){var e=Ne(!1,this.element.id+"_Secondary_Element")||this.createElement("div");e.id=this.element.id+"_Secondary_Element",this.title?(this.titleSize=i.measureText(this.title,this.titleStyle),this.titleSize.height+=15):this.titleSize={height:null,width:null};var t=(this.enablePeriodSelector?this.toolbarHeight:0)+this.titleSize.height;e.setAttribute("style","position: relative; height:"+t+"px"),be(!1,this.element,e,!1)},o.prototype.findCurrentData=function(e,t){var i,r=this;return e&&this.startValue&&this.endValue&&(i=e.filter(function(e){return new Date(Date.parse(e[t])).getTime()>=r.startValue&&new Date(Date.parse(e[t])).getTime()<=r.endValue})),i},o.prototype.renderPeriodSelector=function(){this.enablePeriodSelector&&(this.toolbarSelector.initializePeriodSelector(),this.periodSelector.toolbar.refreshOverflow(),this.enableSelector||this.cartesianChart.cartesianChartRefresh(this))},o.prototype.chartRender=function(){this.cartesianChart=new za(this),this.cartesianChart.initializeChart()},o.prototype.renderRangeSelector=function(){this.enableSelector&&(this.rangeSelector=new Ia(this),this.rangeSelector.initializeRangeNavigator())},o.prototype.getModuleName=function(){return"stockChart"},o.prototype.getPersistData=function(){return""},o.prototype.removeSvg=function(){document.getElementById(this.element.id+"_Secondary_Element")&&t.remove(document.getElementById(this.element.id+"_Secondary_Element"));if(this.mainObject){for(;this.mainObject.childNodes.length>0;)this.mainObject.removeChild(this.mainObject.firstChild);!this.mainObject.hasChildNodes()&&this.mainObject.parentNode&&(t.remove(this.mainObject),this.mainObject=null,this.selectorObject=null,this.chartObject=null)}},o.prototype.chartModuleInjection=function(){for(var e,t=0,i=this.getInjectedModules();t<i.length;t++){var r=i[t];-1===(e=r.prototype.getModuleName().toLowerCase()).indexOf("rangetooltip")?Rr.Inject(r):Ea.Inject(r),"datetime"!==e&&"areaseries"!==e&&"steplineseries"!==e||Ea.Inject(r)}},o.prototype.findRange=function(){var e=this;this.seriesXMin=1/0,this.seriesXMax=-1/0;for(var t=0,i=this.chart.series;t<i.length;t++){var r=i[t];r.visible&&(this.seriesXMin=Math.min(this.seriesXMin,r.xMin),this.seriesXMax=Math.max(this.seriesXMax,r.xMax))}this.endValue=this.currentEnd=this.seriesXMax,this.enablePeriodSelector?(this.toolbarSelector=new Da(this),this.periodSelector=new ka(this),this.tempPeriods=this.periods.length?this.periods:this.toolbarSelector.calculateAutoPeriods(),this.tempPeriods.map(function(t){t.selected&&"ytd"===t.text.toLowerCase()?e.startValue=new Date(new Date(e.currentEnd).getFullYear().toString()).getTime():t.selected&&"all"===t.text.toLowerCase()?e.startValue=e.seriesXMin:t.selected&&(e.startValue=e.periodSelector.changedRange(t.intervalType,e.endValue,t.interval).getTime())})):this.startValue=this.seriesXMin,this.rangeFound=!0},o.prototype.stockChartResize=function(){var e=this;return!!document.getElementById(this.element.id)&&(this.animateSeries=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=+setTimeout(function(){je(e),e.renderBorder(),e.renderTitle(),e.cartesianChart.cartesianChartRefresh(e),e.mainObject.setAttribute("width",e.availableSize.width.toString()),e.enablePeriodSelector&&e.renderPeriodSelector()},500),!1)},o.prototype.stockChartOnMouseDown=function(e){var i,r,o,n,a=this.chart.element.getBoundingClientRect(),s=e.target;if(this.trigger("stockChartMouseDown",{target:s.id,x:this.mouseX,y:this.mouseY}),"touchstart"===e.type?(this.isTouch=!0,i=(n=e).changedTouches[0].clientX,o=n.target,r=n.changedTouches[0].clientY):(this.isTouch="touch"===e.pointerType,i=e.clientX,r=e.clientY,o=e.target),o.id.indexOf(this.element.id+"_stockChart_chart")>-1){var l=he(this.element.id+"_stockChart_chart").getBoundingClientRect();this.mouseDownY=this.previousMouseMoveY=r-a.top-Math.max(l.top-a.top,0),this.mouseDownX=this.previousMouseMoveX=i-a.left-Math.max(l.left-a.left,0),this.setMouseXY(this.mouseDownX,this.mouseDownY),this.referenceXAxis=this.chart.primaryXAxis,he(this.element.id+"_stockChart_chart").setAttribute("cursor","pointer"),this.mouseDownXPoint=rt(this.mouseX-this.referenceXAxis.rect.x,this.referenceXAxis.rect.width,this.referenceXAxis.visibleRange,this.referenceXAxis.isInversed),this.allowPan=!0,this.notify(t.Browser.touchStartEvent,e)}return!1},o.prototype.stockChartMouseEnd=function(e){var t,i,r;return"touchend"===e.type?(i=(r=e).changedTouches[0].clientX,t=r.changedTouches[0].clientY,this.isTouch=!0):(t=e.clientY,i=e.clientX,this.isTouch="touch"===e.pointerType||"2"===e.pointerType),he(this.element.id+"_stockChart_chart").setAttribute("cursor","auto"),this.onPanning=!1,this.setMouseXY(i,t),this.stockChartOnMouseUp(e),!1},o.prototype.stockChartOnMouseUp=function(e){var i=e.target;return this.trigger("stockChartMouseUp",{target:i.id,x:this.mouseX,y:this.mouseY}),this.isChartDrag=!1,this.allowPan=!1,this.isTouch&&(this.threshold=(new Date).getTime()+300),this.notify(t.Browser.touchEndEvent,e),this.stockEvent&&this.stockEvent.removeStockEventTooltip(0),!1},o.prototype.setMouseXY=function(e,t){var i=he(this.element.id+"_stockChart_chart");if(this.element&&i){var r=this.element.getBoundingClientRect(),o=i.getBoundingClientRect();this.mouseX=e-r.left-Math.max(o.left-r.left,0),this.mouseY=t-r.top-Math.max(o.top-r.top,0)}},o.prototype.stockChartOnMouseMove=function(e){var t,i,r;return"touchmove"===e.type?(this.isTouch=!0,r=(i=e).changedTouches[0].clientY,t=i.changedTouches[0].clientX):(this.isTouch="touch"===e.pointerType||"2"===e.pointerType||this.isTouch,t=e.clientX,r=e.clientY),this.trigger("stockChartMouseMove",{target:e.target.id,x:this.mouseX,y:this.mouseY}),he(this.element.id+"_stockChart_chart")&&(this.setMouseXY(t,r),this.chartOnMouseMove(e)),!1},o.prototype.chartOnMouseMove=function(e){if(this.allowPan&&this.mouseDownXPoint&&this.mouseX!==this.previousMouseMoveX&&this.zoomSettings.enablePan){this.onPanning=!0,he(this.element.id+"_stockChart_chart").setAttribute("cursor","pointer"),this.mouseUpXPoint=rt(this.mouseX-this.referenceXAxis.rect.x,this.referenceXAxis.rect.width,this.referenceXAxis.visibleRange,this.referenceXAxis.isInversed);var i=Math.abs(this.mouseUpXPoint-this.mouseDownXPoint);this.mouseDownXPoint<this.mouseUpXPoint?this.seriesXMin<=this.referenceXAxis.visibleRange.min-i&&(this.startValue=this.referenceXAxis.visibleRange.min-i,this.endValue=this.referenceXAxis.visibleRange.max-i,this.cartesianChart.cartesianChartRefresh(this),this.rangeSelector.sliderChange(this.referenceXAxis.visibleRange.min-i,this.referenceXAxis.visibleRange.max-i)):this.seriesXMax>=this.referenceXAxis.visibleRange.max+i&&(this.startValue=this.referenceXAxis.visibleRange.min+i,this.endValue=this.referenceXAxis.visibleRange.max+i,this.cartesianChart.cartesianChartRefresh(this),this.rangeSelector.sliderChange(this.referenceXAxis.visibleRange.min+i,this.referenceXAxis.visibleRange.max+i))}if(this.notify(t.Browser.touchMoveEvent,e),""===e.target.id){var r=void 0;(this.chart.tooltip.enable||this.crosshair.enable)&&(r=document.getElementById(this.element.id+"_stockChart_chart_tooltip"))&&t.remove(r),he(this.element.id+"_StockEvents_Tooltip")&&this.stockEvent.removeStockEventTooltip(0)}return-1!==e.target.id.indexOf("StockEvents")?(clearInterval(this.stockEvent.toolTipInterval),this.stockEvent.renderStockEventTooltip(e.target.id)):this.stockEvent&&this.stockEvent.removeStockEventTooltip(1e3),this.isTouch=!1,!1},o.prototype.stockChartOnMouseClick=function(e){var t=e.target;return this.trigger("stockChartMouseClick",{target:t.id,x:this.mouseX,y:this.mouseY}),this.notify("click",e),!1},o.prototype.stockChartRightClick=function(e){return!this.crosshair.enable||2!==e.buttons&&0!==e.which&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},o.prototype.stockChartOnMouseLeave=function(e){var t,i,r;return"touchleave"===e.type?(this.isTouch=!0,i=(t=e).changedTouches[0].clientX,r=t.changedTouches[0].clientY):(i=e.clientX,r=e.clientY,this.isTouch="touch"===e.pointerType||"2"===e.pointerType),this.setMouseXY(i,r),this.allowPan=!1,this.stockChartOnMouseLeaveEvent(e),!1},o.prototype.stockChartOnMouseLeaveEvent=function(e){var i=t.Browser.isPointer?"pointerleave":"mouseleave";return this.isChartDrag=!1,this.notify(i,e),this.stockEvent&&this.stockEvent.removeStockEventTooltip(1e3),!1},o.prototype.destroy=function(){},o.prototype.renderBorder=function(){if(this.border.width){var e=this.createElement("div");e.id=this.element.id+"_stock_border",e.style.width=this.availableSize.width+"px",e.style.height=this.availableSize.height+"px",e.style.position="absolute",e.style.border=this.border.width+"px solid "+this.border.color,e.style.pointerEvents="none",be(!1,he(this.element.id),e)}},o.prototype.renderTitle=function(){var e;if(this.title){be(!1,he(this.element.id+"_Secondary_Element"),this.renderer.createSvg({id:this.element.id+"_stockChart_Title",width:this.availableSize.width,height:this.titleSize.height,fill:this.background||this.stockChartTheme.background}),!1);var t=this.titleStyle.textAlignment,r="Near"===t?"start":"Far"===t?"end":"middle";e=new i.Rect(0,0,this.availableSize.width,0);var o=new i.TextOption(this.element.id+"_ChartTitle",Ye(e,this.titleStyle),this.titleSize.height-10,r,this.title,"","auto");Ve(this.renderer,o,this.titleStyle,this.titleStyle.color||this.findTitleColor(),he(this.element.id+"_stockChart_Title"),!1,!1),this.availableSize.height-=this.titleSize.height+5}},o.prototype.findTitleColor=function(){return this.theme.toLocaleLowerCase().indexOf("highcontrast")>-1||this.theme.indexOf("Dark")>-1?"#ffffff":"#424242"},o.prototype.calculateStockEvents=function(){this.stockEvents.length&&(this.stockEvent=new is(this),be(!1,this.chartObject,this.stockEvent.renderStockEvents()))},os([t.Property(null)],o.prototype,"width",void 0),os([t.Property(null)],o.prototype,"height",void 0),os([t.Property("")],o.prototype,"dataSource",void 0),os([t.Complex({},Ha)],o.prototype,"margin",void 0),os([t.Complex({color:"#DDDDDD",width:1},Va)],o.prototype,"border",void 0),os([t.Property(null)],o.prototype,"background",void 0),os([t.Property("Material")],o.prototype,"theme",void 0),os([t.Complex({name:"primaryXAxis",valueType:"DateTime"},qa)],o.prototype,"primaryXAxis",void 0),os([t.Complex({border:{color:null,width:.5},background:"transparent"},ja)],o.prototype,"chartArea",void 0),os([t.Complex({name:"primaryYAxis",opposedPosition:!0,labelPosition:"Inside"},qa)],o.prototype,"primaryYAxis",void 0),os([t.Collection([{}],Qa)],o.prototype,"rows",void 0),os([t.Collection([{opposedPosition:!0}],qa)],o.prototype,"axes",void 0),os([t.Collection([],Ua)],o.prototype,"series",void 0),os([t.Collection([],es)],o.prototype,"stockEvents",void 0),os([t.Property(!1)],o.prototype,"isTransposed",void 0),os([t.Property("")],o.prototype,"title",void 0),os([t.Complex({size:"15px",fontWeight:"500",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},Fa)],o.prototype,"titleStyle",void 0),os([t.Collection([],Za)],o.prototype,"indicators",void 0),os([t.Complex({shared:!0,enableMarker:!1},ti)],o.prototype,"tooltip",void 0),os([t.Complex({dashArray:"5"},Pr)],o.prototype,"crosshair",void 0),os([t.Complex({},Lr)],o.prototype,"zoomSettings",void 0),os([t.Property(!0)],o.prototype,"enablePeriodSelector",void 0),os([t.Property(!0)],o.prototype,"enableCustomRange",void 0),os([t.Property(!1)],o.prototype,"isSelect",void 0),os([t.Property(!0)],o.prototype,"enableSelector",void 0),os([t.Collection([],ii)],o.prototype,"periods",void 0),os([t.Collection([{}],Ja)],o.prototype,"annotations",void 0),os([t.Event()],o.prototype,"selectorRender",void 0),os([t.Event()],o.prototype,"stockChartMouseMove",void 0),os([t.Event()],o.prototype,"stockChartMouseLeave",void 0),os([t.Event()],o.prototype,"stockChartMouseDown",void 0),os([t.Event()],o.prototype,"stockChartMouseUp",void 0),os([t.Event()],o.prototype,"stockChartMouseClick",void 0),os([t.Event()],o.prototype,"pointClick",void 0),os([t.Event()],o.prototype,"pointMove",void 0),os([t.Event()],o.prototype,"onZooming",void 0),os([t.Property("None")],o.prototype,"selectionMode",void 0),os([t.Property(!1)],o.prototype,"isMultiSelect",void 0),os([t.Event()],o.prototype,"load",void 0),os([t.Event()],o.prototype,"loaded",void 0),os([t.Event()],o.prototype,"rangeChange",void 0),os([t.Event()],o.prototype,"axisLabelRender",void 0),os([t.Event()],o.prototype,"tooltipRender",void 0),os([t.Event()],o.prototype,"seriesRender",void 0),os([t.Event()],o.prototype,"stockEventRender",void 0),os([t.Collection([],Ka)],o.prototype,"selectedDataIndexes",void 0),os([t.Property(["Line","Hilo","OHLC","Hollow Candle","Spline","Candle"])],o.prototype,"seriesType",void 0),os([t.Property(["EMA","TMA","SMA","Momentum","ATR","Accumulation Distribution","Bollinger Bands","MACD","Stochastic","RSI"])],o.prototype,"indicatorType",void 0),os([t.Property(["PNG","JPEG","SVG","PDF","Print"])],o.prototype,"exportType",void 0),os([t.Property(["Linear","Exponential","Polynomial","Logarithmic","Moving Average"])],o.prototype,"trendlineType",void 0),o}(t.Component),as=function(){function e(e){this.control=e,this.elementId=e.element.id}return e.prototype.renderLeftTooltip=function(e){this.fadeOutTooltip();var t=this.getTooltipContent(e.currentStart),i=this.getContentSize(t),r=this.control.enableRtl?e.rightRect:e.leftRect;i>r.width&&(r=e.midRect),this.leftTooltip=this.renderTooltip(r,this.createElement("_leftTooltip"),e.startX,t)},e.prototype.getContentSize=function(e){var r=this.control.tooltip.textStyle;return this.control.tooltip.template?ue(t.createElement("div",{id:"measureElement",styles:"position: absolute;"}),0,this.control.tooltip.template,this.control).getBoundingClientRect().width:i.measureText(e[0],r).width+20},e.prototype.renderRightTooltip=function(e){this.fadeOutTooltip();var t=this.getTooltipContent(e.currentEnd),i=this.getContentSize(t),r=this.control.enableRtl?e.leftRect:e.rightRect;i>r.width&&((r=e.midRect).x=this.control.series.length?0:r.x),this.rightTooltip=this.renderTooltip(r,this.createElement("_rightTooltip"),e.endX,t)},e.prototype.createElement=function(e){if(he(this.elementId+e))return he(this.elementId+e);var t=document.createElement("div");if(t.id=this.elementId+e,t.className="ejSVGTooltip",t.setAttribute("style","pointer-events:none; position:absolute;z-index: 1"),this.control.stockChart){var i=this.control.stockChart;he(i.element.id+"_Secondary_Element").appendChild(t),t.style.transform="translateY("+(i.availableSize.height-i.toolbarHeight-80+i.toolbarHeight+i.titleSize.height)+"px)"}else he(this.elementId+"_Secondary_Element").appendChild(t);return t},e.prototype.renderTooltip=function(e,t,r,o){var n=this.control,a=n.tooltip,s={cancel:!1,name:"tooltipRender",text:o,textStyle:a.textStyle};this.control.trigger("tooltipRender",s);var l=n.svgObject.getBoundingClientRect().left-n.element.getBoundingClientRect().left;return s.cancel?null:new i.Tooltip({location:{x:r,y:n.rangeSlider.sliderY},content:s.text,marginX:2,enableShadow:!1,marginY:2,arrowPadding:8,rx:0,ry:0,inverted:n.series.length>0,areaBounds:e,fill:a.fill,theme:this.control.theme,clipBounds:{x:l},border:a.border,opacity:a.opacity,template:a.template,textStyle:s.textStyle,availableSize:n.availableSize,data:{start:this.getTooltipContent(this.control.startValue)[0],end:this.getTooltipContent(this.control.endValue)[0],value:o[0]}},t)},e.prototype.getTooltipContent=function(e){var t,i=this.control,r=i.tooltip,o=i.chartSeries.xAxis,n=r.format||o.labelFormat,a=null!==n.match("{value}"),s=o.valueType;return"DateTime"===s?t=i.intl.getDateFormat({format:n||"MM/dd/yyyy",type:G(i.skeletonType),skeleton:i.dateTimeModule.getSkeleton(o,null,null,i.isBlazor)})(new Date(e)):(o.format=i.intl.getNumberFormat({format:a?"":n,useGrouping:i.useGroupingSeparator}),t=i.doubleModule.formatValue(o,a,n,"Logarithmic"===s?Math.pow(o.logBase,e):e)),[t]},e.prototype.fadeOutTooltip=function(){var e=this;"OnDemand"===this.control.tooltip.displayMode&&(Ce(this.toolTipInterval),this.rightTooltip&&(this.toolTipInterval=+setTimeout(function(){e.leftTooltip.fadeOut(),e.rightTooltip.fadeOut()},1e3)))},e.prototype.getModuleName=function(){return"RangeTooltip"},e.prototype.destroy=function(){},e}(),ss=function(){function e(e){this.bulletChart=e,this.isVertical="Vertical"===e.orientation,this.isLabelsInside="Inside"===e.labelPosition,this.isHorizontal="Horizontal"===e.orientation,this.isLeft="Left"===e.titlePosition,this.isRight="Right"===e.titlePosition,this.isTop="Top"===e.titlePosition,this.majorTickSize=e.majorTickLines.height,this.location=10,this.labelOffset=15,this.labelSize=parseFloat(e.labelStyle.size),this.isLabelBelow=!this.bulletChart.opposedPosition}return e.prototype.renderMajorTickLines=function(e,t){"Horizontal"===this.bulletChart.orientation?this.renderXMajorTickLines(e,t):this.renderYMajorTickLines(e,t)},e.prototype.renderMinorTickLines=function(e,t){"Horizontal"===this.bulletChart.orientation?this.renderXMinorTickLines(e,t):this.renderYMinorTickLines(e,t)},e.prototype.renderAxisLabels=function(e,t){"Horizontal"===this.bulletChart.orientation?this.renderXAxisLabels(e,t):this.renderYAxisLabels(e,t)},e.prototype.renderXMajorTickLines=function(e,t){for(var i,r,o=this.bulletChart,n=o.renderer.createGroup({id:o.svgObject.id+"_majorTickGroup"}),a=o.minimum,s=o.maximum,l=o.interval,h=o.enableRtl,c=o.initialClipRect.y+(o.opposedPosition?0:o.initialClipRect.height),d=c+(o.opposedPosition?"Inside"!==o.tickPosition?-this.majorTickSize:this.majorTickSize:"Inside"!==o.tickPosition?this.majorTickSize:-this.majorTickSize),p=o.majorTickLines,u=p.color||o.themeStyle.majorTickLineColor,g=o.initialClipRect.x+(o.enableRtl?o.initialClipRect.width:0),y=o.initialClipRect.x+p.width/2+(h?o.initialClipRect.width:0),m=a;m<=s;m+=l){(r=o.enableRtl?m===a:m===s)&&(y-=p.width/2),r=o.enableRtl?m===a:m===s,o.majorTickLines.useRangeColor&&(u=this.bindingRangeStrokes(y-(r?this.bulletChart.majorTickLines.width/2:0),g,this.bulletChart.orientation,o.enableRtl)),i=this.majorTicks(y,y,c,d,u,m);var v=o.renderer.drawLine(i);y+=h?-e:e,n.appendChild(v),t.appendChild(n)}},e.prototype.renderYMajorTickLines=function(e,t){for(var i,r,o=this.bulletChart,n=o.renderer.createGroup({id:o.svgObject.id+"_majorTickGroup"}),a=o.minimum,s=o.maximum,l=o.interval,h=o.enableRtl,c=o.initialClipRect,d=c.x+(o.opposedPosition?c.width:0),p=d-(o.opposedPosition?"Inside"!==o.tickPosition?-this.majorTickSize:this.majorTickSize:"Inside"!==o.tickPosition?this.majorTickSize:-this.majorTickSize),u=o.majorTickLines,g=u.color||o.themeStyle.majorTickLineColor,y=c.y+(o.enableRtl?0:c.height),m=c.y+u.width/2+(h?0:c.height),v=a;v<=s;v+=l){(i=o.enableRtl?v===s:v===a)&&(m-=u.width/2),i=o.enableRtl?v===a:v===s,o.majorTickLines.useRangeColor&&(g=this.bindingRangeStrokes(m-(i?this.bulletChart.majorTickLines.width/2:0),y,this.bulletChart.orientation,o.enableRtl)),r=this.majorTicks(d,p,m,m,g,v);var f=o.renderer.drawLine(r);m+=h?e:-e,n.appendChild(f),t.appendChild(n)}},e.prototype.majorTicks=function(e,t,i,r,o,n){return{id:this.bulletChart.svgObject.id+"_MajorTickLine_"+n,x1:e,y1:i,x2:t,y2:r,"stroke-width":this.bulletChart.majorTickLines.width,stroke:this.bulletChart.majorTickLines.useRangeColor&&o?o:this.bulletChart.majorTickLines.color||o}},e.prototype.bindingRangeStrokes=function(e,t,i,r){return"Vertical"===i&&!r||r&&"Horizontal"===i?this.backwardStrokeBinding(e,t):this.forwardStrokeBinding(e,t)},e.prototype.renderXMinorTickLines=function(e,t){for(var i,r,o,n,a=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_minorTickGroup"}),s=this.bulletChart,l=s.maximum,h=s.minimum,c=s.interval,d=s.minorTickLines.height,p=this.bulletChart.minorTicksPerInterval,u=s.initialClipRect.x,g=s.initialClipRect.y+(s.opposedPosition?0:s.initialClipRect.height),y=g+(s.opposedPosition?"Inside"!==s.tickPosition?-d:d:"Inside"!==s.tickPosition?d:-d),m=s.minorTickLines.color||s.themeStyle.minorTickLineColor,v=s.initialClipRect.x+(s.enableRtl?s.initialClipRect.width:0),f=h;f<l;f+=c){i=e/p;for(var b=1;b<=p;b++)r=u+i-i/(p+1),s.minorTickLines.useRangeColor&&(m=this.bindingRangeStrokes(r,v,this.bulletChart.orientation,s.enableRtl)),o=this.minorXTicks(r,r,g,y,m,f.toString()+b.toString()),n=this.bulletChart.renderer.drawLine(o),a.appendChild(n),t.appendChild(a),i=e/p*(b+1);u+=e}},e.prototype.renderYMinorTickLines=function(e,t){for(var i,r,o,n,a=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_minorTickGroup"}),s=this.bulletChart,l=s.maximum,h=s.minimum,c=s.interval,d=s.minorTickLines.height,p=this.bulletChart.minorTicksPerInterval,u=s.initialClipRect.y+(s.enableRtl?0:s.initialClipRect.height),g=s.initialClipRect.x+(s.opposedPosition?s.initialClipRect.width:0),y=g-(s.opposedPosition?"Inside"!==s.tickPosition?-d:d:"Inside"!==s.tickPosition?d:-d),m=s.minorTickLines.color||s.themeStyle.minorTickLineColor,v=s.initialClipRect.y+(s.enableRtl?0:s.initialClipRect.height),f=h;f<l;f+=c){i=e/p;for(var b=1;b<=p;b++)r=this.bulletChart.enableRtl?u+i-i/(p+1):u-i+i/(p+1),s.minorTickLines.useRangeColor&&(m=this.bindingRangeStrokes(r,v,this.bulletChart.orientation,s.enableRtl)),o=this.minorXTicks(g,y,r,r,m,f.toString()+b.toString()),n=this.bulletChart.renderer.drawLine(o),a.appendChild(n),t.appendChild(a),i=e/p*(b+1);u-=this.bulletChart.enableRtl?-e:e}},e.prototype.minorXTicks=function(e,t,i,r,o,n){return{id:this.bulletChart.svgObject.id+"_MajorTickLine_"+n,x1:e,x2:t,y1:i,y2:r,"stroke-width":this.bulletChart.minorTickLines.width,stroke:this.bulletChart.minorTickLines.useRangeColor&&o?o:this.bulletChart.minorTickLines.color||o}},e.prototype.forwardStrokeBinding=function(e,t){for(var i=this.bulletChart,r=t,o=0;o<=i.rangeCollection.length-1;o++)if(r+=o?i.rangeCollection[o-1]:0,e>=r&&e<r+i.rangeCollection[o])return i.ranges[o].color;return null},e.prototype.backwardStrokeBinding=function(e,t){for(var i=this.bulletChart,r=t,o=0;o<=i.rangeCollection.length-1;o++)if(r-=o?i.rangeCollection[o-1]:0,Math.round(e)>=Math.round(r-i.rangeCollection[o])&&e<=r)return i.ranges[o].color;return null},e.prototype.renderXAxisLabels=function(e,t){var r,o,n=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_axisLabelGroup"}),a=this.bulletChart,s=this.bulletChart.locale,l=a.enableRtl,h=(a.tickPosition===a.labelPosition?a.majorTickLines.height:0)+10,c=a.initialClipRect.y+(a.opposedPosition?"Inside"===a.labelPosition?h:-h:a.initialClipRect.height+("Inside"===a.labelPosition?-h:h)),d=a.initialClipRect.x+(l?a.initialClipRect.width:0),p=a.minimum,u=a.maximum,g=a.interval,y=s&&this.bulletChart.enableGroupSeparator,m=this.getFormat(this.bulletChart),v=a.labelStyle.color||a.themeStyle.labelFontColor,f=null!==m.match("{value}");this.format=this.bulletChart.intl.getNumberFormat({format:f?"":m,useGrouping:this.bulletChart.enableGroupSeparator});var b=a.initialClipRect.x+(a.enableRtl?a.initialClipRect.width:0);c+=i.measureText(this.formatValue(this,f,m,this.bulletChart.maximum),a.labelStyle).height/3;for(var x=p;x<=u;x+=g){o=a.enableRtl?x===p:x===u,a.labelStyle.useRangeColor&&(v=this.bindingRangeStrokes(d-(o?this.bulletChart.majorTickLines.width/2:0),b,this.bulletChart.orientation,a.enableRtl)),r=y?x.toLocaleString(s):this.formatValue(this,f,m,x);var w=this.labelXOptions(d,c,r,x),S=i.textElement(w,this.bulletChart.labelStyle,v,t);n.appendChild(S),d+=l?-e:e}t.appendChild(n)},e.prototype.labelXOptions=function(e,t,i,r){return{id:this.bulletChart.svgObject.id+"_AxisLabel_"+r,anchor:"middle",text:i,transform:"",x:e,y:t,baseLine:"",labelRotation:0}},e.prototype.renderYAxisLabels=function(e,t){var r,o,n=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_axisLabelGroup"}),a=this.bulletChart,s=a.locale,l=a.enableRtl,h=(a.tickPosition===a.labelPosition?a.majorTickLines.height:0)+10,c=a.initialClipRect.y+(l?0:a.initialClipRect.height),d=a.initialClipRect.x+(a.opposedPosition?a.initialClipRect.width+("Inside"===a.labelPosition?-(h+10):h):"Inside"===a.labelPosition?h+10:-h),p=a.minimum,u=a.maximum,g=a.interval,y=s&&this.bulletChart.enableGroupSeparator,m=a.labelStyle.color||a.themeStyle.labelFontColor,v=this.getFormat(this.bulletChart),f=null!==v.match("{value}");this.format=this.bulletChart.intl.getNumberFormat({format:f?"":v,useGrouping:this.bulletChart.enableGroupSeparator});var b=a.initialClipRect.y+(a.enableRtl?0:a.initialClipRect.height),x=i.measureText(this.formatValue(this,f,v,this.bulletChart.maximum),a.labelStyle).width/2,w=i.measureText(this.formatValue(this,f,v,this.bulletChart.maximum),a.labelStyle).height/3;c+=w;for(var S=p;S<=u;S+=g){o=a.enableRtl?S===u:S===p,a.labelStyle.useRangeColor&&(m=this.bindingRangeStrokes(c-w-(o?this.bulletChart.majorTickLines.width/2:0),b,this.bulletChart.orientation,a.enableRtl)),r=y?S.toLocaleString(s):this.formatValue(this,f,v,S);var C=this.labelXOptions(d-(this.bulletChart.opposedPosition?-x:x),c,r,S),P=i.textElement(C,this.bulletChart.labelStyle,m,t);n.appendChild(P),c+=l?e:-e}t.appendChild(n)},e.prototype.getFormat=function(e){return e.labelFormat?e.labelFormat:""},e.prototype.formatValue=function(e,t,i,r){return t?i.replace("{value}",e.format(r)):e.format(r)},e}();!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto-Regular"},e.tooltipLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.legendLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.dataLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.titleFont={size:"15px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto-Regular"},e.subTitleFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto-Regular"}}(e.BulletChartTheme||(e.BulletChartTheme={}));var ls,hs=function(){function e(e){this.comparative=[],this.dataSource=e.dataSource,this.isVertical="Vertical"===e.orientation,this.isTicksInside="Inside"===e.tickPosition,this.isLabelsInside="Inside"===e.labelPosition,this.isHorizontal="Horizontal"===e.orientation,this.isLeft="Left"===e.titlePosition,this.isRight="Right"===e.titlePosition,this.isTop="Top"===e.titlePosition,this.location=10,this.featureBarBounds=[],this.majorTickSize=e.majorTickLines.height,this.labelOffset=15,this.labelSize=12,this.bulletChart=e,this.isLabelBelow=!this.bulletChart.opposedPosition,this.scaleOrientation=this.bulletChart.orientation,this.rangeColor=[]}return e.prototype.drawScaleGroup=function(e){var t=this.bulletChart.renderer.createGroup({id:this.bulletChart.svgObject.id+"_rangeGroup"}),r=this.bulletChart.maximum,o=this.bulletChart.ranges;this.scaleSettingsGroup=e;var n,a=this.bulletChart,s=a.enableRtl,l=a.initialClipRect,h=l.x+(s&&"Horizontal"===a.orientation?l.width:0),c=l.y+(s||"Vertical"!==a.orientation?0:l.height),d=0;a.rangeCollection=[];for(var p=0,u="Horizontal"===a.orientation?l.width:l.height,g="Horizontal"===a.orientation?l.height:l.width,y=0;y<o.length;y++){d=u*((o[y].end-p)/r),"Horizontal"===a.orientation?h-=s?d:0:c-=s?0:d,n=new Di(a.svgObject.id+"_range_"+y,o[y].color||this.bulletChart.themeStyle.rangeStrokes[y].color,{width:1},o[y].opacity,new i.Rect(h,c,"Horizontal"===a.orientation?d:g,"Horizontal"===a.orientation?g:d));var m=a.renderer.drawRectangle(n);t.appendChild(m),e.appendChild(t),"Horizontal"===a.orientation?h+=s?0:d:c+=s?d:0,a.rangeCollection.push(d),p=o[y].end}return this.bulletChart.rangeCollection},e.prototype.sortRangeCollection=function(e,t){return e-t},e.prototype.renderFeatureBar=function(e){0!==e&&this.renderCommonFeatureBar(e,this.isHorizontal)},e.prototype.renderCommonFeatureBar=function(e,r){for(var o,n,a,s,l=this.bulletChart,h=r?l.initialClipRect.y+l.initialClipRect.height:l.initialClipRect.x,c=l.renderer.createGroup({id:l.svgObject.id+"_featureGroup"}),d=(r?l.initialClipRect.height:l.initialClipRect.width)/e,p=0;p<e;p++){if(a=l.dataSource[p],o=a[l.categoryField],n=r?h-d*p-(d+l.valueHeight)/2:h+d*p+d/2-l.valueHeight/2,s=this.calculateFeatureMeasureBounds(a[l.valueField],o,r),a&&"Dot"===l.type){var u=a[l.valueField];s.pointX=r?s.pointX+(u>0&&!l.enableRtl||u<0&&l.enableRtl?s.width:0)-3:s.pointX+(u>0&&l.enableRtl||u<0&&!l.enableRtl?s.width:0)-3,s.width=6}if(s){var g=r?this.featureBar(s.pointX,n,s.width,p):this.verticalFeatureBar(n,s.pointX,s.width,p);if(c.appendChild(g),this.feature=g,this.scaleSettingsGroup.appendChild(c),this.featureBarBounds[p]={x:s.pointX,y:n,width:s.width,height:l.valueHeight},!t.isNullOrUndefined(o)){var y=i.measureText(o,l.categoryLabelStyle),m=r?y.width:y.height,v=l.initialClipRect,f=void 0,b=void 0;r?(f=l.enableRtl?v.x+v.width+5+m/2:v.x-5-m/2,b=this.drawcategory(f,n,o)):(f=l.enableRtl?v.y-5-m/2:v.y+v.height+5+m/2,b=this.drawcategory(n+l.valueHeight/2,f,o)),i.textElement(b,l.categoryLabelStyle,l.categoryLabelStyle.color||l.themeStyle.categoryFontColor,this.scaleSettingsGroup)}}l.animation.enable&&this.doValueBarAnimation()}},e.prototype.featureBar=function(e,t,r,o){var n=new Di(this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,this.bulletChart.valueFill,this.bulletChart.valueBorder,1,new i.Rect(e,t,r,this.bulletChart.valueHeight)),a=this.bulletChart.renderer.drawRectangle(n);return a.setAttribute("class",this.bulletChart.svgObject.id+"_FeatureMeasure"),a.id=this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,a},e.prototype.verticalFeatureBar=function(e,t,r,o){var n=new Di(this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,this.bulletChart.valueFill,this.bulletChart.valueBorder,1,new i.Rect(e,t,this.bulletChart.valueHeight,r)),a=this.bulletChart.renderer.drawRectangle(n);return a.setAttribute("class",this.bulletChart.svgObject.id+"_FeatureMeasure"),a.id=this.bulletChart.svgObject.id+"_FeatureMeasure_"+o,a},e.prototype.drawcategory=function(e,t,i){return{id:"",anchor:"middle",x:e,y:t+this.bulletChart.valueHeight,transform:"",text:i,baseLine:"",labelRotation:0}},e.prototype.renderComparativeSymbol=function(e){0!==e&&this.renderCommonComparativeSymbol(e,this.isHorizontal)},e.prototype.renderCommonComparativeSymbol=function(e,t){for(var i,r,o,n,a,s,l=this.bulletChart,h=l.initialClipRect,c=t?h.width:h.height,d=t?h.y+h.height:h.x,p=l.renderer.createGroup({id:l.svgObject.id+"_comparativeGroup"}),u=l.minimum,g=l.maximum,y=g-u,m=l.targetWidth,v=t?h.x-m/2:h.y+h.height,f=[],b=l.targetTypes,x="Rect",w=b.length,S=(t?h.height:h.width)/e,C=0;C<e;C++){i=l.dataSource[C][l.targetField],f=f.concat(i);for(var P=0;P<f.length;P++)x=b[P%w],f[P]>=u&&f[P]<=g&&(r=(a=t?d-S*C-S/2:d+S*C+S/2)-1.5*m,o=a+1.5*m,a=c/(y/(y-(g-f[P]))),n=t?v+(l.enableRtl?c-a:a):v-(l.enableRtl?c-a:a),s=this.getTargetElement(x,t,n,r,o,f[P],C),this.comparative.push(s),p.appendChild(s),r=0,o=0),this.scaleSettingsGroup.appendChild(p);f=[],l.animation.enable&&this.doTargetBarAnimation(0)}},e.prototype.getTargetElement=function(e,t,r,o,n,a,s){var l,h,c=this.bulletChart,d="Cross"===e?c.targetWidth-1:1,p="Circle"===e?c.targetWidth-1:c.targetWidth,u=t?r+p/2:o+(n-o)/2,g=t?o+(n-o)/2:r,y=c.svgObject.id+"_ComparativeMeasure_"+s,m=c.svgObject.id+"_ComparativeMeasure";if("Rect"===e)l=t?this.compareMeasure(r,o,n,s,a):this.compareVMeasure(o,n,r,s),h=c.renderer.drawLine(l);else if("Circle"===e)l=new Ni(y,c.targetColor,{width:1,color:c.targetColor||"black"},1,u,g,p),h=c.renderer.drawCircle(l);else{var v="M "+(u-p)+" "+(g-p)+" L "+(u+p)+" "+(g+p)+" M "+(u-p)+" "+(g+p)+" L "+(u+p)+" "+(g-p);l=new i.PathOption(y,"transparent",d,c.targetColor,1,"",v),h=c.renderer.drawPath(l)}return h.setAttribute("class",m),h},e.prototype.compareMeasure=function(e,t,i,r,o){var n=this.bulletChart;return{class:n.svgObject.id+"_ComparativeMeasure",id:n.svgObject.id+"_ComparativeMeasure_"+r,x1:o===n.maximum?e-n.targetWidth/2:o===n.minimum?e+n.targetWidth/2:e,y1:t,x2:o===n.maximum?e-n.targetWidth/2:o===n.minimum?e+n.targetWidth/2:e,y2:i,"stroke-width":n.targetWidth,stroke:n.targetColor||"black"}},e.prototype.compareVMeasure=function(e,t,i,r){var o=this.bulletChart;return{class:o.svgObject.id+"_ComparativeMeasure",id:o.svgObject.id+"_ComparativeMeasure_"+r,x1:e,y1:i,x2:t,y2:i,"stroke-width":o.targetWidth,stroke:o.targetColor||"black"}},e.prototype.calculateFeatureMeasureBounds=function(e,r,o){var n=this.bulletChart,a=n.minimum;if((e=e<a&&a<=0?a:e)>=a){var s=void 0,l=void 0,h=void 0,c=o?n.initialClipRect.x:n.initialClipRect.y,d=o?n.initialClipRect.width:n.initialClipRect.height,p=n.maximum-n.minimum,u=n.maximum-e,g=(n.enableRtl?"backward":"forward")+this.scaleOrientation.toLowerCase();r=t.isNullOrUndefined(r)?"":r;var y=i.measureText(r.toString(),n.labelStyle).width;switch(g){case"forwardhorizontal":case"backwardvertical":s=c+(a>0?0:d/p*Math.abs(a)),h=d/(p/(a>0?p-u:e)),e<0&&(s-=h=Math.abs(h)),h=s+h<c+d?h:c+d-s,l=c-("forwardhorizontal"===g?y/2+5:this.labelOffset);break;default:s=c+(d-d/(p/(p-u))),h=a>0?d/(p/(p-u)):d/(p/e),e<0&&(s-=h=Math.abs(h)),s<c&&(h=s+h-c,s=c),l=c+d+("backwardhorizontal"===g?y/2+5:5)}return{pointX:s,width:h,lastPointX:l}}return null},e.prototype.doValueBarAnimation=function(){var e=this.feature;if(!e)return null;var i,r,o,n,a,s=this.bulletChart.animation,l=this.bulletChart.animateSeries?this.bulletChart.animation.duration:s.duration,h=Z("Linear"),c=this.bulletChart.dataSource<0,d=e.getBoundingClientRect().height,p=e.getBoundingClientRect().width;"Horizontal"===this.bulletChart.orientation&&e&&(r=parseInt(e.getAttribute("height"),10),i=parseInt(e.getAttribute("x"),10),n=c?r:r+d,o=i),e.style.visibility="hidden",new t.Animation({}).animate(e,{duration:l,delay:s.delay,progress:function(t){t.timeStamp>=t.delay&&(e.style.visibility="visible",p=p||1,a=h(t.timeStamp-t.delay,0,p,t.duration),e.setAttribute("transform","translate("+o+" "+n+") scale("+a/p+", 1) translate("+-o+" "+-n+")"))},end:function(){e.setAttribute("transform","translate(0,0)"),e.style.visibility="visible"}})},e.prototype.doTargetBarAnimation=function(e){var t,i,r=this.comparative[e];if(!r)return null;"Horizontal"===this.bulletChart.orientation&&r&&(i=parseFloat(r.getAttribute("y1"))+parseFloat(r.getAttribute("y2")),t=parseFloat(r.getAttribute("x1"))),r.style.visibility="hidden",this.animateRect(r,t,i,e+1)},e.prototype.animateRect=function(e,i,r,o){var n,a=this,s=Z("Linear"),l=this.bulletChart.animation,h=this.comparative.length,c=this.bulletChart.animateSeries?this.bulletChart.animation.duration:l.duration;new t.Animation({}).animate(e,{duration:c,delay:l.delay,progress:function(t){t.timeStamp>=t.delay&&(e.style.visibility="visible",n=s(t.timeStamp-t.delay,0,1,t.duration),e.setAttribute("transform","translate("+i+" "+r/2+") scale(1,"+n+") translate("+-i+" "+-r/2+")"))},end:function(){e.setAttribute("transform","translate(0,0)"),o<h&&a.doTargetBarAnimation(o+1)}})},e}(),cs=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ds=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ps=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property(null)],i.prototype,"end",void 0),ds([t.Property(1)],i.prototype,"opacity",void 0),ds([t.Property(null)],i.prototype,"color",void 0),ds([t.Property(null)],i.prototype,"index",void 0),ds([t.Property(null)],i.prototype,"name",void 0),ds([t.Property("Rectangle")],i.prototype,"shape",void 0),ds([t.Property("")],i.prototype,"legendImageUrl",void 0),i}(t.ChildProperty),us=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property(12)],i.prototype,"height",void 0),ds([t.Property(1)],i.prototype,"width",void 0),ds([t.Property(null)],i.prototype,"color",void 0),ds([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),gs=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property(8)],i.prototype,"height",void 0),ds([t.Property(1)],i.prototype,"width",void 0),ds([t.Property(null)],i.prototype,"color",void 0),ds([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),ys=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return cs(i,e),ds([t.Property("Normal")],i.prototype,"fontStyle",void 0),ds([t.Property("16px")],i.prototype,"size",void 0),ds([t.Property("")],i.prototype,"color",void 0),ds([t.Property("Normal")],i.prototype,"fontWeight",void 0),ds([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),ds([t.Property("Center")],i.prototype,"textAlignment",void 0),ds([t.Property("None")],i.prototype,"textOverflow",void 0),ds([t.Property(1)],i.prototype,"opacity",void 0),ds([t.Property(!0)],i.prototype,"enableTrim",void 0),ds([t.Property(null)],i.prototype,"maximumTitleWidth",void 0),ds([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),ms=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return cs(r,i),ds([t.Property(!1)],r.prototype,"enable",void 0),ds([t.Property(null)],r.prototype,"fill",void 0),ds([t.Complex(e.BulletChartTheme.tooltipLabelFont,ys)],r.prototype,"textStyle",void 0),ds([t.Complex({color:"#cccccc",width:.5},Yt)],r.prototype,"border",void 0),ds([t.Property(null)],r.prototype,"template",void 0),r}(t.ChildProperty),vs=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return cs(r,i),ds([t.Property(!1)],r.prototype,"enable",void 0),ds([t.Complex(e.BulletChartTheme.dataLabelFont,ys)],r.prototype,"labelStyle",void 0),r}(t.ChildProperty),fs=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return cs(r,i),ds([t.Property(!1)],r.prototype,"visible",void 0),ds([t.Complex({x:0,y:0},ur)],r.prototype,"location",void 0),ds([t.Property(8)],r.prototype,"padding",void 0),ds([t.Property("Center")],r.prototype,"alignment",void 0),ds([t.Property(10)],r.prototype,"shapeHeight",void 0),ds([t.Property(10)],r.prototype,"shapeWidth",void 0),ds([t.Complex(e.BulletChartTheme.legendLabelFont,ys)],r.prototype,"textStyle",void 0),ds([t.Property("Auto")],r.prototype,"position",void 0),ds([t.Complex({left:0,right:0,top:0,bottom:0},Ut)],r.prototype,"margin",void 0),ds([t.Complex({},Yt)],r.prototype,"border",void 0),ds([t.Property(5)],r.prototype,"shapePadding",void 0),ds([t.Property("transparent")],r.prototype,"background",void 0),ds([t.Property(1)],r.prototype,"opacity",void 0),ds([t.Property(3)],r.prototype,"tabIndex",void 0),r}(t.ChildProperty),bs=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xs=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ws=function(r){function o(e,t){var o=r.call(this,e,t)||this;return o.bulletid=57726,o.animateSeries=!0,o.padding=5,o.leftSize=0,o.rightSize=0,o.topSize=0,o.bottomSize=0,o.maxLabelSize=new i.Size(0,0),o.maxTitleSize=new i.Size(0,0),o.intervalDivs=[10,5,2,1],o}return bs(o,r),o.prototype.preRender=function(){this.isBlazor=window.Blazor,this.allowServerDataBinding=!1,this.unWireEvents(),this.initPrivateValues(),this.setCulture(),this.wireEvents()},o.prototype.initPrivateValues=function(){if(this.delayRedraw=!1,this.scale=new hs(this),this.bulletAxis=new ss(this),""===this.element.id){var e=document.getElementsByClassName("e-BulletChart").length;this.element.id="BulletChart_"+this.bulletid+"_"+e}},o.prototype.setCulture=function(){this.intl=new t.Internationalization},o.prototype.render=function(){var e=this,t={bulletChart:this.isBlazor?{}:this,theme:this.theme,name:"load"};this.trigger("load",t,function(){e.theme=e.isBlazor?t.theme:e.theme,e.setTheme(),e.createSvg(e),e.findRange(),e.bulletChartLegendModule&&e.legendSettings.visible&&(e.calculateVisibleElements(),e.bulletChartLegendModule.getLegendOptions(e.visibleRanges)),e.calculatePosition(),e.renderBulletElements();e.trigger("loaded",{bulletChart:window.Blazor?{}:e}),e.allowServerDataBinding=!0,e.renderComplete()})},o.prototype.setTheme=function(){this.themeStyle=lt(this.theme)},o.prototype.findRange=function(){if(this.minimum||(this.minimum=0),!this.maximum){this.maximum=0;for(e=0;e<this.ranges.length;e++)this.maximum=this.maximum>this.ranges[e].end?this.maximum:this.ranges[e].end}if(null===this.maximum)if(t.isNullOrUndefined(this.dataSource))this.maximum=10;else for(var e=0;e<Object.keys(this.dataSource).length;e++)this.dataSource[e][this.targetField]>this.dataSource[e][this.valueField]?this.maximum=this.maximum>this.dataSource[e][this.targetField]?this.maximum+this.interval:this.dataSource[e][this.targetField]+this.interval:this.maximum=this.maximum>this.dataSource[e][this.valueField]?this.maximum+this.interval:this.dataSource[e][this.valueField]+this.interval;this.interval||(this.interval=this.calculateNumericNiceInterval(this.maximum-this.minimum))},o.prototype.getActualDesiredIntervalsCount=function(e){var t="Horizontal"===this.orientation?e.width:e.height,i=3*("Horizontal"===this.orientation?.533:1);return i=Math.max(t*(i/100),1)},o.prototype.calculateNumericNiceInterval=function(e){for(var t=this.getActualDesiredIntervalsCount(this.availableSize),i=e/t,r=Math.pow(10,Math.floor(v(i,10))),o=0,n=this.intervalDivs;o<n.length;o++){var a=r*n[o];if(t<e/a)break;i=a}return i},o.prototype.setSecondaryElementPosition=function(){var e=he(this.element.id+"_Secondary_Element");if(e){var t=this.element.getBoundingClientRect(),i=he(this.element.id+"_svg").getBoundingClientRect();e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px",e.style.position="relative"}},o.prototype.createSvg=function(e){this.removeSvg(),e.renderer=new i.SvgRenderer(e.element.id),this.calculateAvailableSize(this),e.svgObject=e.renderer.createSvg({id:e.element.id+"_svg",width:e.availableSize.width,height:e.availableSize.height}),this.renderChartBackground()},o.prototype.renderChartBackground=function(){var e=new Di(this.element.id+"_ChartBorder",this.themeStyle.background,{width:this.border.width||0,color:this.border.color||"transparent"},1,new i.Rect(0,0,this.availableSize.width,this.availableSize.height));this.svgObject.appendChild(this.renderer.drawRectangle(e))},o.prototype.renderBulletElements=function(){var e=this.renderer.createGroup({id:this.svgObject.id+"_scaleGroup"});this.svgObject.appendChild(e),this.renderBulletChartTitle(),this.rangeCollection=this.scale.drawScaleGroup(e);var t=("Horizontal"===this.orientation?this.initialClipRect.width:this.initialClipRect.height)/((this.maximum-this.minimum)/this.interval);this.bulletAxis.renderMajorTickLines(t,e),this.bulletAxis.renderMinorTickLines(t,e),this.bulletAxis.renderAxisLabels(t,e),this.bulletChartRect.x="Left"===this.titlePosition||"Right"===this.titlePosition||"Vertical"===this.orientation?this.bulletChartRect.x:0;var i=this.element.id;if("g"!==this.element.tagName){var r=Ne(this.redraw,i+"_Secondary_Element")||this.createElement("div");r.id=i+"_Secondary_Element",be(!1,this.element,r,this.redraw)}this.tooltip.enable&&be(!1,this.svgObject,this.renderer.createGroup({id:i+"_UserInteraction",style:"pointer-events:none;"}),this.redraw),this.bindData(),this.renderDataLabel(),this.renderBulletLegend(),this.element.appendChild(this.svgObject),this.setSecondaryElementPosition()},o.prototype.renderBulletLegend=function(){if(this.bulletChartLegendModule&&this.bulletChartLegendModule.legendCollections.length){this.bulletChartLegendModule.calTotalPage=!0;var e=this.bulletChartLegendModule.legendBounds;this.bulletChartLegendModule.renderLegend(this,this.legendSettings,e)}},o.prototype.bulletResize=function(){var e=this;this.animateSeries=!1;var t={chart:this,name:"resized",currentSize:new i.Size(0,0),previousSize:new i.Size(this.availableSize.width,this.availableSize.height)};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=+setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);e.createSvg(e),t.currentSize=e.availableSize,e.trigger("resized",t),e.calculatePosition(),e.renderBulletElements()},500),!1},o.prototype.bindData=function(){null!=this.dataSource&&(this.dataCount=this.dataSource.length,this.drawMeasures(this.dataCount))},o.prototype.drawMeasures=function(e){this.scale.renderFeatureBar(e),this.scale.renderComparativeSymbol(e)},o.prototype.calculatePosition=function(){var e=this.margin,t=0,r=0,o=new i.Size(0,0);this.titleCollections=[],this.subTitleCollections=[];var n=0,a=0,s=5;if(this.title){this.titleCollections=Xe(this.title,this.titleStyle,this.titleStyle.maximumTitleWidth),t=i.measureText(this.title,this.titleStyle).height*this.titleCollections.length+5;for(var l=0,h=this.titleCollections;l<h.length;l++){var c=h[l];n=(o=i.measureText(c,this.titleStyle)).width>n?o.width:n,a=o.height>a?o.height:a}if(s+=a,this.subTitleCollections=Xe(this.subtitle,this.subtitleStyle,this.titleStyle.maximumTitleWidth),this.subtitle){for(var d=0,p=this.subTitleCollections;d<p.length;d++){var u=p[d];n=(o=i.measureText(u,this.subtitleStyle)).width>n?o.width:n,a=o.height>a?o.height:a}r=i.measureText(this.subtitle,this.subtitleStyle).height*this.subTitleCollections.length+5,s+=a}}this.maxTitleSize=new i.Size(n,"Vertical"===this.orientation?s:a),this.maxLabelSize=this.getMaxLabelWidth(),this.initialClipRect=this.getBulletBounds("Vertical"===this.orientation?s:n,t,r,e),this.bulletChartRect=new i.Rect(this.initialClipRect.x,this.initialClipRect.y,this.initialClipRect.width,this.initialClipRect.height),this.bulletChartLegendModule&&this.bulletChartLegendModule.calculateLegendBounds(this.initialClipRect,this.availableSize,this.maxLabelSize)},o.prototype.getBulletBounds=function(e,t,r,o){var n=new i.Rect(0,0,0,0),a=this.enableRtl,s=this.labelPosition===this.tickPosition?5:0,l="Inside"===this.tickPosition?0:this.majorTickLines.height,h="Inside"===this.labelPosition?0:5+("Outside"===this.tickPosition?0:i.measureText(this.maximum.toString(),this.labelStyle).height),c=0,d=0,p=0,u=0,g=0,y=0,m=0,v=0,f=e,b=this.bulletAxis.getFormat(this),x=null!==b.match("{value}");this.bulletAxis.format=this.intl.getNumberFormat({format:x?"":b,useGrouping:this.enableGroupSeparator});var w,S=i.measureText(this.bulletAxis.formatValue(this.bulletAxis,x,b,this.maximum),this.labelStyle).width;switch("Horizontal"===this.orientation?(w=this.maxLabelSize.width,c=this.opposedPosition?l+h+s:0,d=this.opposedPosition?0:l+h+s,m=w&&!a?w:0,m+=f&&"Left"===this.titlePosition?15:0,v=w&&a?w:0,v+=f&&"Right"===this.titlePosition?5:0):(w=this.maxLabelSize.height,u=this.opposedPosition?l+s:0,u+=this.opposedPosition&&"Inside"!==this.labelPosition?S:0,p=this.opposedPosition?0:l+s,p+=this.opposedPosition||"Inside"===this.labelPosition?0:S,g=w&&a?w+5:0,y=w&&!a?w+5:0),this.titlePosition){case"Left":n.x=o.left+f+m+p,n.width=this.availableSize.width-o.right-n.x-v-u,n.y=o.top+c+g,n.height=this.availableSize.height-n.y-o.bottom-d-y;break;case"Right":n.x=o.left+m+p,n.width=this.availableSize.width-u-o.right-n.x-(f+5)-v,n.y=o.top+c+g,n.height=this.availableSize.height-n.y-o.bottom-d-y;break;case"Top":n.x=o.left+p+m,n.width=this.availableSize.width-o.right-n.x-v-u,n.y=o.top+(t+r)+c+g,n.height=this.availableSize.height-n.y-o.bottom-d-y;break;case"Bottom":n.x=o.left+p+m,n.y=o.top+c+g,n.width=this.availableSize.width-o.right-n.x-v-u,n.height=this.availableSize.height-n.y-y-o.bottom-d-(t+r)}return n},o.prototype.getMaxLabelWidth=function(){if(this.maxLabelSize=new i.Size(0,0),!this.categoryField)return this.maxLabelSize;for(var e,t=0,r=Object.keys(this.dataSource).length;t<r;t++)(e=i.measureText(this.dataSource[t][this.categoryField]||"",this.categoryLabelStyle)).width>this.maxLabelSize.width&&(this.maxLabelSize.width=e.width),e.height>this.maxLabelSize.height&&(this.maxLabelSize.height=e.height);return this.maxLabelSize},o.prototype.calculateVisibleElements=function(){var e,t=this.ranges;this.visibleRanges=[];for(var i=0,r=t.length;i<r;i++)(e=t[i]).index=i,e.color=e.color,this.visibleRanges.push(e),t[i]=e},o.prototype.renderBulletChartTitle=function(){var e=this.margin,t=0,r=0,o="middle",n="",a=this.titleStyle.textAlignment,s=i.measureText(this.title,this.titleStyle),l=this.subtitle?i.measureText(this.subtitle,this.subtitleStyle):new i.Size(0,0);if(this.title){if("Horizontal"===this.orientation)switch(this.titlePosition){case"Top":t=this.findHorizontalAlignment(e),o="Far"===a?"end":"Near"===a?"start":"middle",r=e.top+s.height/2+5;break;case"Bottom":t=this.findHorizontalAlignment(e),o="Far"===a?"end":"Near"===a?"start":"middle",r=this.availableSize.height-e.bottom-s.height/3+10-(l.height?l.height+5:0);break;case"Left":o="end",t=e.left+this.maxTitleSize.width,r=this.margin.top+this.availableSize.height/2-s.height/3-(l.height?l.height:0);break;case"Right":o="start",t=this.availableSize.width-e.right-this.maxTitleSize.width+5,r=this.margin.top+this.availableSize.height/2-s.height/3-(l.height?l.height:0)}else{switch(this.titlePosition){case"Top":t=this.availableSize.width/2+10,r=this.margin.top+s.height/2+5;break;case"Bottom":t=this.availableSize.width/2,r=this.availableSize.height-this.margin.bottom-s.height/3+10-(l.height?l.height+5:0);break;case"Left":r=this.findVerticalAlignment(e),o="Far"===a?"start":"Near"===a?"end":"middle",t=e.left;break;case"Right":t=this.availableSize.width-e.right-s.height/3,o="Far"===a?"start":"Near"===a?"end":"middle",r=this.findVerticalAlignment(e)}n="Left"===this.titlePosition?"rotate(-90,"+t+","+r+")":"Right"===this.titlePosition?"rotate(90,"+t+","+r+")":""}var h=new i.TextOption(this.element.id+"_BulletChartTitle",t,r,o,this.titleCollections,n,"auto"),c=Ve(this.renderer,h,this.titleStyle,this.titleStyle.color||this.themeStyle.titleFontColor,this.svgObject);c&&(c.setAttribute("aria-label",this.title),c.setAttribute("tabindex",this.tabIndex.toString())),this.subtitle&&this.renderBulletChartSubTitle(t,r,o)}},o.prototype.renderDataLabel=function(){var e,t,r,o=0,n=0,a=this.enableRtl,s=this.labelFormat?this.labelFormat:"",l=null!==s.match("{value}");if(this.dataLabel.enable)for(var h=0,c=Object.keys(this.dataSource).length;h<c;h++){t=this.dataSource[h],r=this.scale.featureBarBounds[h];var d=t[this.valueField].toString();this.format=this.intl.getNumberFormat({format:l?"":s,useGrouping:this.enableGroupSeparator}),d=l?s.replace("{value}",this.format(d)):d;var p=i.measureText(d,this.dataLabel.labelStyle),u=p.width,g=p.height;"Horizontal"===this.orientation?(e="Rect"===this.type?"end":a?"end":"start",o=r.x+(a?"Rect"===this.type?u+10:-10:r.width)+("Rect"===this.type?-5:5),n=r.y+r.height/2):(e="middle",o=r.y+r.height/2,n=r.x+(a?r.width+("Rect"===this.type?-g:g):0)+("Rect"===this.type?10:-10));var y=new i.TextOption(this.element.id+"_DataLabel_"+h,o,n,e,d,"","middle");Ve(this.renderer,y,this.dataLabel.labelStyle,this.dataLabel.labelStyle.color||this.themeStyle.dataLabelFontColor,this.svgObject)}},o.prototype.findHorizontalAlignment=function(e){var t=0;switch(this.titleStyle.textAlignment){case"Center":t=(this.availableSize.width-e.left-e.right)/2;break;case"Near":t=e.left;break;case"Far":t=this.availableSize.width-e.right}return t},o.prototype.findVerticalAlignment=function(e){var t=0;switch(this.titleStyle.textAlignment){case"Center":t=(this.availableSize.height-e.top-e.bottom)/2;break;case"Near":t=e.top;break;case"Far":t=this.availableSize.height-e.bottom}return t},o.prototype.renderBulletChartSubTitle=function(e,t,r){var o=this.margin,n="",a=i.measureText(this.subtitle,this.subtitleStyle);if("Horizontal"===this.orientation)switch(this.titlePosition){case"Top":t=t+a.height+2.5;break;case"Bottom":t=this.availableSize.height-o.bottom-a.height/3+5;break;case"Left":case"Right":t=t+a.height+2.5}else{switch(this.titlePosition){case"Top":t=t+a.height+2.5;break;case"Bottom":t=this.availableSize.height-o.bottom-a.height/3+5;break;case"Left":e+=a.height+2.5;break;case"Right":e-=a.height+2.5}n="Left"===this.titlePosition?"rotate(-90,"+e+","+t+")":"Right"===this.titlePosition?"rotate(90,"+e+","+t+")":""}var s=new i.TextOption(this.element.id+"_BulletChartSubTitle",e,t,r,this.subTitleCollections,n,"auto"),l=Ve(this.renderer,s,this.subtitleStyle,this.subtitleStyle.color||this.themeStyle.subTitleFontColor,this.svgObject);l&&(l.setAttribute("aria-label",this.title),l.setAttribute("tabindex",this.tabIndex.toString()))},o.prototype.calculateAvailableSize=function(e){var t=this.element.clientWidth||this.element.offsetWidth||200,r="Vertical"===this.orientation?450:"Left"===this.titlePosition||"Right"===this.titlePosition?83:126,o=this.element.clientHeight||r;e.availableSize=new i.Size(Be(e.width,t)||t,Be(e.height,o)||o)},o.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"_svg");e&&t.remove(e)},o.prototype.getPersistData=function(){var e=["loaded"];return this.addOnPersist(e)},o.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,i=t.Browser.touchMoveEvent,r=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,e,this.bulletMouseDown),t.EventHandler.remove(this.element,i,this.bulletMouseMove),t.EventHandler.remove(this.element,r,this.bulletMouseLeave),t.EventHandler.remove(this.element,"click",this.bulletChartOnMouseClick),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBound)},o.prototype.wireEvents=function(){var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.bulletMouseMove,this),t.EventHandler.add(this.element,e,this.bulletMouseLeave,this),t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.bulletMouseDown,this),t.EventHandler.add(this.element,"click",this.bulletChartOnMouseClick,this),this.resizeBound=this.bulletResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBound),this.setStyle(this.element)},o.prototype.setStyle=function(e){e.style.position="relative",e.style.display="block"},o.prototype.bulletMouseMove=function(e){var i=e.clientX,r=e.clientY;this.setPointMouseXY(i,r);var o=e.target.id,n=e.target.className.baseVal;if(!(n===this.svgObject.id+"_FeatureMeasure"&&(this.svgObject.id,0)||t.isNullOrUndefined(this.dataSource)))for(var a=0;a<Object.keys(this.dataSource).length;a++)document.getElementById(this.svgObject.id+"_FeatureMeasure_"+a).setAttribute("opacity","1"),document.getElementById(this.svgObject.id+"_ComparativeMeasure_"+a).setAttribute("opacity","1");if(!this.isTouchEvent(e)){var s="tooltipDiv"+this.element.id,l=document.getElementById(s);l&&(this.isReact&&this.clearTemplate(),t.remove(l)),this.bulletTooltipModule&&(this.bulletTooltipModule._elementTooltip(e,n,o,this.mouseX),this.bulletTooltipModule._displayTooltip(e,n,o,this.mouseX,this.mouseY))}},o.prototype.setPointMouseXY=function(e,t){var i=he(this.svgObject.id).getBoundingClientRect(),r=this.element.getBoundingClientRect();this.mouseX=e-r.left-Math.max(i.left-r.left,0),this.mouseY=t-r.top-Math.max(i.top-r.top,0)},o.prototype.bulletMouseLeave=function(e){if(!this.isTouchEvent(e)){var i=document.getElementById(".tooltipDiv"+this.element.id);i&&(this.isReact&&this.clearTemplate(),t.remove(i))}},o.prototype.isTouchEvent=function(e){return"touch"===e.pointerType||e.type.indexOf("touch")>-1},o.prototype.bulletMouseDown=function(e){if(this.isTouchEvent(e)){this.isReact&&this.clearTemplate(),t.remove(document.getElementById("tooltipDiv"+this.element.id));var i=e.target.id,r=e.target.className.baseVal;this.bulletTooltipModule&&(this.bulletTooltipModule._elementTooltip(e,r,i,this.mouseX),this.bulletTooltipModule._displayTooltip(e,r,i,this.mouseX,this.mouseY))}},o.prototype.bulletChartOnMouseClick=function(e){var t=e.target;return this.trigger("chartMouseClick",{target:t.id,x:this.mouseX,y:this.mouseY}),this.notify("click",e),!1},o.prototype.print=function(e){new xr(this).print(e)},o.prototype.export=function(e,t,i,r,o,n,a){r=r||[this],new xr(this).export(e,t,i,r,o,n,a)},o.prototype.onPropertyChanged=function(e,t){var i=!1,o=!1;if(this.animateSeries=!1,!this.delayRedraw){for(var n=0,a=Object.keys(e);n<a.length;n++)switch(a[n]){case"height":case"width":this.createSvg(this),o=!0;break;case"subtitle":case"title":o=!0;break;case"tickPosition":case"labelPosition":case"titlePosition":i=!0;break;case"minimum":case"maximum":case"interval":o=!0;break;case"majorTickLines":case"minorTickLines":case"type":case"ranges":case"valueFill":case"targetColor":o=!0;break;case"titleStyle":e.titleStyle?o=!0:i=!0;break;case"subtitleStyle":e.subtitleStyle&&(e.subtitleStyle.size||e.subtitleStyle.textOverflow)?o=!0:i=!0;break;case"border":case"opposedPosition":i=!0;break;case"dataSource":this.bindData(),o=!0;break;case"theme":this.animateSeries=!0;break;case"locale":case"currencyCode":r.prototype.refresh.call(this)}if(!o&&i){this.removeSvg(),this.renderBulletElements();s="Blazor";this.trigger("loaded",{bulletChart:window[s]?{}:this})}if(o){this.render();var s="Blazor";this.trigger("loaded",{bulletChart:window[s]?{}:this}),this.redraw=!1}}},o.prototype.requiredModules=function(){for(var e,t=[],i=0;i<this.ranges.length;i++)null!==this.ranges[i].name&&(e=!0);return this.isLegend=this.legendSettings.visible&&(e||!!this.isLegend||""!==this.targetField||""!==this.valueField),this.tooltip.enable&&t.push({member:"BulletTooltip",args:[this]}),this.isLegend&&t.push({member:"BulletChartLegend",args:[this]}),t},o.prototype.getModuleName=function(){return"bulletChart"},o.prototype.destroy=function(){this.unWireEvents(),r.prototype.destroy.call(this),this.removeSvg(),this.svgObject=null,this.element.classList.remove("e-BulletChart"),this.element.innerHTML=""},xs([t.Property(null)],o.prototype,"width",void 0),xs([t.Property(null)],o.prototype,"height",void 0),xs([t.Property(null)],o.prototype,"locale",void 0),xs([t.Complex({},us)],o.prototype,"majorTickLines",void 0),xs([t.Complex({},gs)],o.prototype,"minorTickLines",void 0),xs([t.Property(null)],o.prototype,"minimum",void 0),xs([t.Property(null)],o.prototype,"maximum",void 0),xs([t.Property(null)],o.prototype,"interval",void 0),xs([t.Property(4)],o.prototype,"minorTicksPerInterval",void 0),xs([t.Complex(e.BulletChartTheme.axisLabelFont,ys)],o.prototype,"labelStyle",void 0),xs([t.Complex(e.BulletChartTheme.axisLabelFont,ys)],o.prototype,"categoryLabelStyle",void 0),xs([t.Property("")],o.prototype,"labelFormat",void 0),xs([t.Property("")],o.prototype,"title",void 0),xs([t.Complex(e.BulletChartTheme.titleFont,ys)],o.prototype,"titleStyle",void 0),xs([t.Property("")],o.prototype,"subtitle",void 0),xs([t.Complex(e.BulletChartTheme.subTitleFont,ys)],o.prototype,"subtitleStyle",void 0),xs([t.Property("Horizontal")],o.prototype,"orientation",void 0),xs([t.Complex({color:"#DDDDDD",width:0},Yt)],o.prototype,"border",void 0),xs([t.Complex({},ms)],o.prototype,"tooltip",void 0),xs([t.Collection([{end:null,opacity:1,color:""},{end:null,opacity:1,color:""},{end:null,opacity:1,color:""}],ps)],o.prototype,"ranges",void 0),xs([t.Property("Outside")],o.prototype,"labelPosition",void 0),xs([t.Property("Outside")],o.prototype,"tickPosition",void 0),xs([t.Property("Top")],o.prototype,"titlePosition",void 0),xs([t.Property(!1)],o.prototype,"opposedPosition",void 0),xs([t.Property("Material")],o.prototype,"theme",void 0),xs([t.Complex({},qt)],o.prototype,"animation",void 0),xs([t.Complex({},vs)],o.prototype,"dataLabel",void 0),xs([t.Complex({},fs)],o.prototype,"legendSettings",void 0),xs([t.Property(!1)],o.prototype,"enableGroupSeparator",void 0),xs([t.Complex({top:15,bottom:10,left:15,right:15},Ut)],o.prototype,"margin",void 0),xs([t.Property(5)],o.prototype,"targetWidth",void 0),xs([t.Property("#191919")],o.prototype,"targetColor",void 0),xs([t.Property(6)],o.prototype,"valueHeight",void 0),xs([t.Property(null)],o.prototype,"valueFill",void 0),xs([t.Complex({color:"transparent",width:0},Yt)],o.prototype,"valueBorder",void 0),xs([t.Property(null)],o.prototype,"dataSource",void 0),xs([t.Property(null)],o.prototype,"query",void 0),xs([t.Property(null)],o.prototype,"categoryField",void 0),xs([t.Property("Rect")],o.prototype,"type",void 0),xs([t.Property("")],o.prototype,"valueField",void 0),xs([t.Property("")],o.prototype,"targetField",void 0),xs([t.Property(["Rect","Cross","Circle"])],o.prototype,"targetTypes",void 0),xs([t.Property(1)],o.prototype,"tabIndex",void 0),xs([t.Event()],o.prototype,"tooltipRender",void 0),xs([t.Event()],o.prototype,"load",void 0),xs([t.Event()],o.prototype,"loaded",void 0),xs([t.Event()],o.prototype,"bulletChartMouseClick",void 0),xs([t.Event()],o.prototype,"legendRender",void 0),xs([t.Event()],o.prototype,"beforePrint",void 0),o=xs([t.NotifyPropertyChanges],o)}(t.Component),Ss=function(){function i(e){this.control=e,this.elementId=e.element.id,this.bulletAxis=new ss(this.control)}return i.prototype._elementTooltip=function(t,i,r,o){var n=this.control.createElement("div");n.id="tooltip",n.className="tooltipDiv";var a=t.target,s=o+20,l=t.clientY,h="",c=this.control.tooltip.textStyle.fontStyle?this.control.tooltip.textStyle.fontStyle:e.BulletChartTheme.tooltipLabelFont.fontStyle,d=this.control.tooltip.fill?this.control.tooltip.fill:this.control.themeStyle.tooltipFill,p="left:"+s+"px;top:"+l+'px;display: block; position: absolute; "z-index": "13000",cursor: default;font-family: Segoe UI;color:'+(e.BulletChartTheme.tooltipLabelFont.color||this.control.themeStyle.tooltipBoldLabel)+"; font-size: 13px; background-color:"+d+"; border: 1px solid #707070;font-style:"+c+";";n.setAttribute("style",p),i===this.control.svgObject.id+"_Caption"?h=a.textContent===this.control.title?"":this.control.title:i===this.control.svgObject.id+"_SubTitle"&&(h=a.textContent===this.control.subtitle?"":this.control.subtitle),""!==h&&(n.innerHTML=" "+h+" ",document.body.insertAdjacentElement("afterbegin",n))},i.prototype._displayTooltip=function(i,r,o,n,a){if("undefined"!==r&&this.control.tooltip.enable&&(r===this.control.svgObject.id+"_FeatureMeasure"||r===this.control.svgObject.id+"_ComparativeMeasure")){var s=void 0,l=void 0,h=void 0,c=void 0,d=[],p=void 0,u=void 0,g=this.bulletAxis.getFormat(this.control),y=null!==g.match("{value}");h=o.substring(o.lastIndexOf("_")+1);var m=[];this.bulletAxis.format=this.bulletAxis.bulletChart.intl.getNumberFormat({format:y?"":g,useGrouping:this.bulletAxis.bulletChart.enableGroupSeparator}),c=this.control.dataSource[h][this.control.valueField],d=d.concat(this.control.dataSource[h][this.control.targetField]),p=this.control.dataSource[h][this.control.categoryField];var v=c?c.toString():"",f=d?d.toString():"",b=p?p.toString():"";v=this.bulletAxis.formatValue(this.bulletAxis,y,g,+c);for(L=0;L<d.length;L++)m=m.concat(this.bulletAxis.formatValue(this.bulletAxis,y,g,+d[L]));s={value:v,target:m,category:b=this.bulletAxis.formatValue(this.bulletAxis,y,g,+p)},l={value:v,target:f,category:b};var x="position: absolute; z-index: 13000; display: block;";0===document.getElementsByClassName("tooltipDiv"+this.control.element.id).length&&((u=this.control.createElement("div")).id="tooltipDiv"+this.control.element.id,u.setAttribute("style",x),document.getElementById(this.control.element.id+"_Secondary_Element").appendChild(u));var w={value:s.value,target:s.target,name:"tooltipRender"};if(""!==this.control.tooltip.template&&null!=this.control.tooltip.template){this.updateTemplateFn();for(var S=this.control.createElement("div",{id:this.control.element.id+"parent_template"}),C=this.templateFn(l,this.control,"template",S.id+"_blazorTemplate","",null,S);C&&C.length>0;)t.isBlazor()||1===C.length?(S.appendChild(C[0]),C=null):S.appendChild(C[0]);w.template=S.innerHTML,this.control.trigger("tooltipRender",w),S.innerHTML=w.template,u.appendChild(S)}else{for(var P="Value : "+w.value,L=0;L<w.target.length;L++)P+="<br/> Target"+(0===L?"":"_"+L)+" : "+w.target[L];w.text=P,this.control.trigger("tooltipRender",w),u.innerHTML=w.text,u.style.font=this.control.tooltip.textStyle.fontStyle?this.control.tooltip.textStyle.fontStyle:e.BulletChartTheme.tooltipLabelFont.fontStyle,u.style.color=e.BulletChartTheme.tooltipLabelFont.color||this.control.themeStyle.tooltipBoldLabel,u.style.fontSize=e.BulletChartTheme.titleFont.size}var R=this.control.tooltip.fill?this.control.tooltip.fill:this.control.themeStyle.tooltipFill,M=this.control.tooltip.border.width?this.control.tooltip.border.width:1,A=this.control.tooltip.border.color?this.control.tooltip.border.color:"Black",T=n,k=a;if(T=T+Be(u.getAttribute("width"),this.control.containerWidth)<window.innerWidth?T:Be(u.getAttribute("width"),this.control.containerWidth),k=k+Be(u.getAttribute("height"),this.control.containerHeight)<window.innerHeight?k:Be(u.getAttribute("height"),this.control.containerHeight),void 0!==T&&null!==T||(T=n),void 0!==k&&null!==k||(k=i.clientY),""!==this.control.tooltip.template&&null!=this.control.tooltip.template)u.setAttribute("style","position: absolute;left:"+(T+20)+"px;top:"+(k+20)+"px;"),t.isBlazor()&&t.updateBlazorTemplate(this.control.element.id+"parent_template_blazorTemplate","Template",this.control.tooltip);else{var _=x+"left:"+(T+20)+"px;top:"+(k+20)+"px;-webkit-border-radius: 5px 5px 5px 5px; -moz-border-radius: 5px 5px 5px 5px;-o-border-radius: 5px 5px 5px 5px;border-radius: 5px 5px 5px 5px;background-color:"+R+";color:"+u.style.color+"; border:"+M+"px Solid "+A+";padding-bottom: 7px;font-style:"+e.BulletChartTheme.tooltipLabelFont.fontStyle+"; padding-left: 10px; font-family: Segoe UI; padding-right: 10px; padding-top: 7px";u.setAttribute("style",_),r!==this.control.svgObject.id+"_FeatureMeasure"&&r!==this.control.svgObject.id+"_ComparativeMeasure"||document.getElementById(o).setAttribute("opacity","0.6")}this.control.isReact&&this.control.renderReactTemplates()}},i.prototype.updateTemplateFn=function(){if(this.control.tooltip.template)try{document.querySelectorAll(this.control.tooltip.template).length&&(this.templateFn=t.compile(document.querySelector(this.control.tooltip.template).innerHTML.trim()))}catch(e){this.templateFn=t.compile(this.control.tooltip.template)}},i.prototype.getModuleName=function(){return"BulletTooltip"},i.prototype.destroy=function(){},i}(),Cs=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ps=function(e){function r(t){var i=e.call(this,t)||this;return i.library=i,i.addEventListener(),i}return Cs(r,e),r.prototype.addEventListener=function(){this.chart.isDestroyed||(this.chart.on("click",this.click,this),this.chart.on(t.Browser.touchEndEvent,this.mouseEnd,this),this.chart.on(t.Browser.touchMoveEvent,this.bulletMouseMove,this))},r.prototype.removeEventListener=function(){this.chart.isDestroyed||(this.chart.off("click",this.click),this.chart.off(t.Browser.touchEndEvent,this.mouseEnd),this.chart.off(t.Browser.touchMoveEvent,this.bulletMouseMove))},r.prototype.bulletMouseMove=function(e){this.chart.legendSettings.visible&&this.chart.isTouch&&this.move(e)},r.prototype.mouseEnd=function(e){this.chart.legendSettings.visible&&this.chart.isTouch&&this.move(e)},r.prototype.getLegendOptions=function(e){this.legendCollections=[];for(var i,r=0,o=this.chart,n=0,a=e;n<a.length;n++){var s=a[n];null!==s.name&&(i=s.color?s.color:o.themeStyle.rangeStrokes[s.index].color,this.legendCollections.push(new mr(s.name,i,s.shape,this.chart.legendSettings.visible,null,s.legendImageUrl,null,!1,s.index,null)),r++)}if(null!==o.dataSource&&""!==o.valueField){i=o.valueFill||"black";l="Vertical"===o.orientation?"TargetRect":"ActualRect";this.legendCollections.push(new mr("Actual",i,l,this.chart.legendSettings.visible,null,"",null,!1,r++,null))}if(null!==o.dataSource&&""!==o.targetField){i=o.targetColor||"black";for(var l="Vertical"===o.orientation?"ActualRect":"TargetRect",h=0;h<Object.keys(o.dataSource).length;h++)if(t.isNullOrUndefined(o.dataSource[h][o.targetField].length)||1===o.dataSource[h][o.targetField].length)for(;0===h;){this.legendCollections.push(new mr("Target",i,l,this.chart.legendSettings.visible,null,"",null,!1,r++,null));break}else for(var c=o.targetTypes,d=[],p=c.length;0===h;){for(var u=0;u<p;u++)d[u]=c[u%p],d[u]="Rect"===d[u]?"Vertical"===o.orientation?"ActualRect":"TargetRect":d[u],d[u]="Cross"===d[u]?"Multiply":d[u],this.legendCollections.push(new mr("Target_"+u,i,d[u],this.chart.legendSettings.visible,null,"",null,!1,r++,null));break}}},r.prototype.getLegendBounds=function(e,t,r){var o=0,n=r.padding,a=0;this.isVertical?o=r.width?0:e.width/100*5:a=r.height?0:e.height/100*5,t.height+=a,t.width+=o;var s,l=0,h=0,c=0,d=0,p=0,u=r.shapeWidth,g=r.shapePadding;this.maxItemHeight=Math.max(i.measureText("MeasureText",r.textStyle).height,r.shapeHeight);for(var y=!1,m=0,v=this.legendCollections;m<v.length;m++){var f=v[m];s={fill:f.fill,text:f.text,shape:f.shape,name:"legendRender",cancel:!1},this.chart.trigger("legendRender",s),f.render=!s.cancel,f.text=s.text,f.fill=s.fill,f.shape=s.shape,f.textSize=i.measureText(f.text,r.textStyle),f.render&&""!==f.text&&(y=!0,h+=d=u+g+f.textSize.width+n,(t.width<n+h||this.isVertical)&&(l=Math.max(l,h+n-(this.isVertical?0:d)),0===c&&d!==h&&(c=1),h=this.isVertical?0:d,p=++c*(this.maxItemHeight+n)+n))}p=Math.max(p,this.maxItemHeight+n+n),this.isPaging=t.height<p,this.totalPages=c,y?this.setBounds(Math.max(h+n,l),p,r,t):this.setBounds(0,0,r,t)},r.prototype.getRenderPoint=function(e,t,i,r,o,n,a){var s=r.location.x+i+r.textSize.width,l=this.legend.padding;s+(e.textSize.width+i)>o.x+o.width+this.legend.shapeWidth/2||this.isVertical?(e.location.x=t.x,e.location.y=n===a?r.location.y:r.location.y+this.maxItemHeight+l):(e.location.x=n===a?r.location.x:s,e.location.y=r.location.y);var h=this.legendBounds.x+this.legendBounds.width-(e.location.x+i-this.legend.shapeWidth/2);e.text=Ie(+h.toFixed(4),e.text,this.legend.textStyle)},r.prototype.click=function(e){var t=e.target.id;t.indexOf(this.legendID+"_pagedown")>-1?this.changePage(e,!1):t.indexOf(this.legendID+"_pageup")>-1&&this.changePage(e,!0)},r.prototype.getModuleName=function(){return"BulletChartLegend"},r.prototype.destroy=function(){this.removeEventListener()},r}(yr),Ls=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Rs=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Ms=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ls(i,e),Rs([t.Property("Segoe UI")],i.prototype,"fontFamily",void 0),Rs([t.Property("Normal")],i.prototype,"fontStyle",void 0),Rs([t.Property("Regular")],i.prototype,"fontWeight",void 0),Rs([t.Property("")],i.prototype,"color",void 0),Rs([t.Property("12px")],i.prototype,"size",void 0),Rs([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),As=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ls(i,e),Rs([t.Property(10)],i.prototype,"top",void 0),Rs([t.Property(10)],i.prototype,"bottom",void 0),Rs([t.Property(10)],i.prototype,"right",void 0),Rs([t.Property(10)],i.prototype,"left",void 0),i}(t.ChildProperty),Ts=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Ls(i,e),Rs([t.Property(0)],i.prototype,"width",void 0),Rs([t.Property(1)],i.prototype,"opacity",void 0),Rs([t.Property("transparent")],i.prototype,"color",void 0),i}(t.ChildProperty),ks=function(){function e(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r}return e}(),_s=function(){function e(){}return e}(),Os=function(){function e(){}return e}(),Es=function(){function e(){}return e}(),zs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ls(t,e),t}(_s),Is=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ls(t,e),t}(zs),Ds=function(){function e(){}return e}(),Bs=function(){function e(){}return e}(),Ns=function(){function e(){}return e}(),Fs=function(){function e(){}return e}(),Vs=function(){function e(e,t,i,r,o){this.id=e,this.fill=t,this.borderColor=i,this.borderWidth=r,this.opacity=o}return e}(),js=function(){function e(){}return e}(),Hs=function(){function e(){this.counterclockwise=0,this.clockwise=1}return e}(),Xs=function(){function e(){}return e}(),Ys=function(){function e(){}return e}(),Gs=function(){function e(e,t){this.width=e,this.height=t}return e}(),Ws=function(){function e(){}return e}(),Us=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zs=function(){function e(e,t,i,r,o,n,a){this.id=e,this.opacity=o,this.fill=t,this.stroke=r,this["stroke-width"]=i,this["stroke-dasharray"]=n,this.d=a}return e}(),qs=function(e){function t(t,i,r,o,n){var a=e.call(this,t,i,r.width,r.color,o)||this;return a.y=n.y,a.x=n.x,a.height=n.height,a.width=n.width,a}return Us(t,e),t}(Zs),Qs=function(e){function t(t,i,r,o,n,a,s,l){var h=e.call(this,t,i,r.width,r.color,o)||this;return h.cy=a,h.cx=n,h.r=s,h["stroke-dasharray"]=l,h}return Us(t,e),t}(Zs),$s=function(){function e(e,t,i,r,o){this.id=e,this.x=t,this.y=i,this.anchor=r,this.text=o}return e}();!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.smithchartTitleFont={size:"15px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.smithchartSubtitleFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.dataLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},e.legendLabelFont={size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"}}(ls||(ls={}));var Js=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ks=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},el=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(!0)],i.prototype,"visible",void 0),Ks([t.Property("")],i.prototype,"text",void 0),Ks([t.Property("")],i.prototype,"description",void 0),Ks([t.Property("Center")],i.prototype,"textAlignment",void 0),Ks([t.Complex(ls.legendLabelFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),tl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(0)],i.prototype,"x",void 0),Ks([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),il=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(1)],i.prototype,"width",void 0),Ks([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),rl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(10)],i.prototype,"width",void 0),Ks([t.Property(10)],i.prototype,"height",void 0),Ks([t.Complex({},il)],i.prototype,"border",void 0),i}(t.ChildProperty),ol=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(1)],i.prototype,"width",void 0),Ks([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),nl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Js(i,e),Ks([t.Property(!1)],i.prototype,"visible",void 0),Ks([t.Property("bottom")],i.prototype,"position",void 0),Ks([t.Property("Center")],i.prototype,"alignment",void 0),Ks([t.Property(null)],i.prototype,"width",void 0),Ks([t.Property(null)],i.prototype,"height",void 0),Ks([t.Property("circle")],i.prototype,"shape",void 0),Ks([t.Property(null)],i.prototype,"rowCount",void 0),Ks([t.Property(null)],i.prototype,"columnCount",void 0),Ks([t.Property(8)],i.prototype,"itemPadding",void 0),Ks([t.Property(5)],i.prototype,"shapePadding",void 0),Ks([t.Property("")],i.prototype,"description",void 0),Ks([t.Property(!0)],i.prototype,"toggleVisibility",void 0),Ks([t.Complex({},el)],i.prototype,"title",void 0),Ks([t.Complex({},tl)],i.prototype,"location",void 0),Ks([t.Complex({},rl)],i.prototype,"itemStyle",void 0),Ks([t.Complex({},ol)],i.prototype,"border",void 0),Ks([t.Complex(ls.legendLabelFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),al=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},ll=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(1)],i.prototype,"width",void 0),sl([t.Property("")],i.prototype,"dashArray",void 0),sl([t.Property(!0)],i.prototype,"visible",void 0),sl([t.Property(null)],i.prototype,"color",void 0),sl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),hl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(1)],i.prototype,"width",void 0),sl([t.Property("")],i.prototype,"dashArray",void 0),sl([t.Property(!1)],i.prototype,"visible",void 0),sl([t.Property(null)],i.prototype,"color",void 0),sl([t.Property(8)],i.prototype,"count",void 0),i}(t.ChildProperty),cl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(!0)],i.prototype,"visible",void 0),sl([t.Property(1)],i.prototype,"width",void 0),sl([t.Property(null)],i.prototype,"color",void 0),sl([t.Property("")],i.prototype,"dashArray",void 0),i}(t.ChildProperty),dl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return al(i,e),sl([t.Property(!0)],i.prototype,"visible",void 0),sl([t.Property("Outside")],i.prototype,"labelPosition",void 0),sl([t.Property("Hide")],i.prototype,"labelIntersectAction",void 0),sl([t.Complex({},ll)],i.prototype,"majorGridLines",void 0),sl([t.Complex({},hl)],i.prototype,"minorGridLines",void 0),sl([t.Complex({},cl)],i.prototype,"axisLine",void 0),sl([t.Complex(ls.axisLabelFont,Ms)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),pl=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ul=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},gl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return pl(i,e),ul([t.Property(!0)],i.prototype,"visible",void 0),ul([t.Property("")],i.prototype,"text",void 0),ul([t.Property("")],i.prototype,"description",void 0),ul([t.Property("Far")],i.prototype,"textAlignment",void 0),ul([t.Property(!0)],i.prototype,"enableTrim",void 0),ul([t.Property(null)],i.prototype,"maximumWidth",void 0),ul([t.Complex(ls.smithchartSubtitleFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),yl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return pl(i,e),ul([t.Property(!0)],i.prototype,"visible",void 0),ul([t.Property("")],i.prototype,"text",void 0),ul([t.Property("")],i.prototype,"description",void 0),ul([t.Property("Center")],i.prototype,"textAlignment",void 0),ul([t.Property(!0)],i.prototype,"enableTrim",void 0),ul([t.Property(null)],i.prototype,"maximumWidth",void 0),ul([t.Complex({},gl)],i.prototype,"subtitle",void 0),ul([t.Complex(ls.smithchartTitleFont,Ms)],i.prototype,"font",void 0),ul([t.Complex(ls.smithchartTitleFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),ml=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},fl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(1)],i.prototype,"width",void 0),vl([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),bl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(!1)],i.prototype,"visible",void 0),vl([t.Property(null)],i.prototype,"fill",void 0),vl([t.Property(.95)],i.prototype,"opacity",void 0),vl([t.Property("")],i.prototype,"template",void 0),vl([t.Complex({},fl)],i.prototype,"border",void 0),i}(t.ChildProperty),xl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(3)],i.prototype,"width",void 0),vl([t.Property("white")],i.prototype,"color",void 0),i}(t.ChildProperty),wl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(.1)],i.prototype,"width",void 0),vl([t.Property("white")],i.prototype,"color",void 0),i}(t.ChildProperty),Sl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(1)],i.prototype,"width",void 0),vl([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),Cl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(!1)],i.prototype,"visible",void 0),vl([t.Property("")],i.prototype,"template",void 0),vl([t.Property(null)],i.prototype,"fill",void 0),vl([t.Property(1)],i.prototype,"opacity",void 0),vl([t.Complex({},wl)],i.prototype,"border",void 0),vl([t.Complex({},Sl)],i.prototype,"connectorLine",void 0),vl([t.Complex(ls.dataLabelFont,Ms)],i.prototype,"textStyle",void 0),i}(t.ChildProperty),Pl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property(!1)],i.prototype,"visible",void 0),vl([t.Property("circle")],i.prototype,"shape",void 0),vl([t.Property(6)],i.prototype,"width",void 0),vl([t.Property(6)],i.prototype,"height",void 0),vl([t.Property("")],i.prototype,"imageUrl",void 0),vl([t.Property("")],i.prototype,"fill",void 0),vl([t.Property(1)],i.prototype,"opacity",void 0),vl([t.Complex({},xl)],i.prototype,"border",void 0),vl([t.Complex({},Cl)],i.prototype,"dataLabel",void 0),i}(t.ChildProperty),Ll=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return ml(i,e),vl([t.Property("visible")],i.prototype,"visibility",void 0),vl([t.Property([])],i.prototype,"points",void 0),vl([t.Property("")],i.prototype,"resistance",void 0),vl([t.Property("")],i.prototype,"reactance",void 0),vl([t.Property("")],i.prototype,"tooltipMappingName",void 0),vl([t.Property(null)],i.prototype,"dataSource",void 0),vl([t.Property("")],i.prototype,"name",void 0),vl([t.Property(null)],i.prototype,"fill",void 0),vl([t.Property(!1)],i.prototype,"enableAnimation",void 0),vl([t.Property("2000ms")],i.prototype,"animationDuration",void 0),vl([t.Property(!1)],i.prototype,"enableSmartLabels",void 0),vl([t.Property(1)],i.prototype,"width",void 0),vl([t.Property(1)],i.prototype,"opacity",void 0),vl([t.Complex({},Pl)],i.prototype,"marker",void 0),vl([t.Complex({},bl)],i.prototype,"tooltip",void 0),i}(t.ChildProperty),Rl=function(){function e(){}return e.prototype.calculateAreaBounds=function(e,t,i){var r=e.margin,o=e.border,n=this.getLegendSpace(e,i),a=n.leftLegendWidth+r.left+o.width,s=n.rightLegendWidth+r.left+r.right+2*o.width,l=e.availableSize.width-(a+s);return{x:a,y:r.top+2*e.elementSpacing+n.modelTitleHeight+n.modelsubTitleHeight+n.topLegendHeight+o.width,width:l,height:e.availableSize.height-(n.modelTitleHeight+2*e.elementSpacing+n.modelsubTitleHeight+r.top+n.topLegendHeight+n.bottomLegendHeight)}},e.prototype.getLegendSpace=function(e,t){var i,r=e.title,o=e.legendSettings,n=o.position.toLowerCase(),a=0,s=0,l=e.font,h=0,c=o.border.width,d=0,p=0,u=0,g=0,y=0;return o.visible&&(i=t.width+5+e.elementSpacing+2*c,d="left"===n?i:0,p="right"===n?i:0,y=o.title.visible?ft(o.title.text,l).height:0,u="top"===n?e.elementSpacing+t.height+y:0,g="bottom"===n?e.elementSpacing+t.height+y:0),a=ft(r.subtitle.text,l).height,""!==r.text&&r.visible,h=0,s=""!==r.subtitle.text&&r.subtitle.visible?a:0,{leftLegendWidth:d,rightLegendWidth:p,topLegendHeight:u,bottomLegendHeight:g,modelTitleHeight:h,modelsubTitleHeight:s}},e}(),Ml=function(){function e(){this.radialLabels=[-50,-20,-10,-5,-4,-3,-2,-1.5,-1,-.8,-.6,-.4,-.2,0,.2,.4,.6,.8,1,1.5,2,3,4,5,10,20,50],this.radialLabelCollections=[],this.horizontalLabelCollections=[],this.labelCollections=[],this.direction=new Hs}return e.prototype.renderArea=function(e,t){this.calculateChartArea(e,t),this.calculateCircleMargin(e,t),this.calculateXAxisRange(e),this.calculateRAxisRange(e),this.measureHorizontalAxis(e),this.measureRadialAxis(e),e.horizontalAxis.visible&&this.updateHAxis(e),e.radialAxis.visible&&this.updateRAxis(e),e.horizontalAxis.visible&&this.drawHAxisLabels(e),e.radialAxis.visible&&this.drawRAxisLabels(e)},e.prototype.updateHAxis=function(e){var t=e.horizontalAxis.majorGridLines,i=e.horizontalAxis.minorGridLines,r=e.horizontalAxis.axisLine;t.visible&&this.updateHMajorGridLines(e),i.visible&&this.updateHMinorGridLines(e),r.visible&&this.updateHAxisLine(e)},e.prototype.updateRAxis=function(e){var t=e.radialAxis.majorGridLines,i=e.radialAxis.minorGridLines,r=e.radialAxis.axisLine;t.visible&&this.updateRMajorGridLines(e),i.visible&&this.updateRMinorGridLines(e),r.visible&&this.updateRAxisLine(e)},e.prototype.measureHorizontalAxis=function(e){var t=e.horizontalAxis.minorGridLines;this.measureHMajorGridLines(e),t.visible&&this.measureHMinorGridLines(e)},e.prototype.measureRadialAxis=function(e){var t=e.radialAxis.minorGridLines;this.measureRMajorGridLines(e),t.visible&&this.measureRMinorGridLines(e)},e.prototype.calculateChartArea=function(e,t){var i=e.availableSize.width,r=e.availableSize.height;i=t.width,r=t.height;var o=Math.min(i,r),n=Math.min(i,r),a=t.x+(t.width/2-o/2),s=t.y+((r-n)/2>0?(r-n)/2:0);e.chartArea={x:a,y:s,width:o,height:n}},e.prototype.calculateCircleMargin=function(e,t){var i=0,r=e.chartArea.width,o=e.radius;i=this.maximumLabelLength(e);var n="Outside"===e.radialAxis.labelPosition?i+10:10,a=(r-2*n>0?r-2*n:0)/2,s=o>1?1:o<.1?.1:o;this.areaRadius=a*s,this.circleLeftX=e.chartArea.x+n+a*(1-s),this.circleTopY=e.chartArea.y+n+a*(1-s),this.circleCenterX=this.circleLeftX+this.areaRadius,this.circleCenterY=t.y+t.height/2},e.prototype.maximumLabelLength=function(e){for(var t,i=0,r=e.horizontalAxis.labelStyle,o=0;o<this.radialLabels.length;o++)i<(t=ft(this.radialLabels[o].toString(),r)).width&&(i=t.width);return i},e.prototype.calculateAxisLabels=function(){for(var e=0,t=0,i=[],r=2*this.areaRadius,o=0;o<2;o+=.1){var n=!1,a=!1,s=r*(1/((o=Math.round(10*o)/10)+1))/2*2;0!==e&&1!==o?(o<1&&(n=this.isOverlap(1,r,s,30)),o>1&&(a=this.isOverlap(2,r,s,30)),n||a||e-s>=30&&(i[t]=o,t++,e=s)):(e=s,i[t]=o,t++)}for(var l=[2,3,4,5,10,20,50],h=0;h<l.length;h++)i[t]=l[h],t++;return i},e.prototype.isOverlap=function(e,t,i,r){return i-t*(1/(e+1))/2*2<r},e.prototype.calculateXAxisRange=function(e){for(var t,i,r,o=2*this.areaRadius,n=this.calculateAxisLabels(),a=this.circleCenterY,s=this.circleLeftX,l=this.circleLeftX,h=0;h<n.length;h++)i=o*(1/((t=n[h])+1))/2,"Impedance"===e.renderType&&(l=s+o-2*i),r=l+i,this.horizontalLabelCollections.push({centerX:r,centerY:a,radius:i,value:t,region:null})},e.prototype.calculateRAxisRange=function(e){var t,i,r,o=2*this.areaRadius,n=new Ns;"Impedance"===e.renderType?(n.x=this.circleLeftX+o,n.y=this.circleTopY+this.areaRadius):(n.x=this.circleLeftX,n.y=this.circleTopY+this.areaRadius);for(var a=0;a<this.radialLabels.length;a++)r=this.radialLabels[a],i=Math.abs(1/r*o/2),t="Impedance"===e.renderType?r>0?n.y-i:n.y+i:r<0?n.y-i:n.y+i,this.radialLabelCollections.push({centerX:n.x,centerY:t,radius:i,value:r})},e.prototype.measureHMajorGridLines=function(e){var t,i,r,o,n,a=[];this.majorHGridArcPoints=[];for(var s=0;s<this.horizontalLabelCollections.length;s++){var l=new zs;l=this.horizontalLabelCollections[s],a=this.calculateHMajorArcStartEndPoints(l.value),"Impedance"===e.renderType?(r=a[0],o=a[1]):(r=a[1],o=a[0]),n={width:l.radius,height:l.radius},0!==l.value&&50!==l.value?(t=this.intersectingCirclePoints(r[0].centerX,r[0].centerY,r[0].radius,l.centerX,l.centerY,l.radius,e.renderType),i=this.intersectingCirclePoints(o[0].centerX,o[0].centerY,o[0].radius,l.centerX,l.centerY,l.radius,e.renderType),this.majorHGridArcPoints.push({startPoint:t,endPoint:i,rotationAngle:2*Math.PI,sweepDirection:"Impedance"===e.renderType?this.direction.counterclockwise:this.direction.clockwise,isLargeArc:!0,size:n})):(t={x:l.centerX+l.radius,y:l.centerY},i={x:l.centerX+l.radius,y:l.centerY-.05},this.majorHGridArcPoints.push({startPoint:t,endPoint:i,rotationAngle:2*Math.PI,sweepDirection:this.direction.clockwise,isLargeArc:!0,size:n}))}},e.prototype.measureRMajorGridLines=function(e){var t,i,r,o,n,a,s,l,h,c=[];this.majorRGridArcPoints=[],this.labelCollections=[];for(var d=gt(),p=0;p<this.radialLabelCollections.length;p++)(t=this.radialLabelCollections[p]).radius<=d||(i=t.value,r=(c=this.calculateMajorArcStartEndPoints(t,Math.abs(i),e))[0],o=c[1],n=this.circleXYRadianValue(this.circleCenterX,this.circleCenterY,o.x,o.y)*(180/Math.PI),0!==i?(a={x:r.x,y:r.y},s={x:o.x,y:o.y},l={width:t.radius,height:t.radius},h=i>0?this.direction.clockwise:this.direction.counterclockwise,this.majorRGridArcPoints.push({startPoint:a,endPoint:s,size:l,rotationAngle:2*Math.PI,isLargeArc:!1,sweepDirection:h}),this.labelCollections.push({centerX:o.x,centerY:o.y,angle:n,value:i,radius:this.areaRadius,region:null})):(a={x:this.circleLeftX,y:this.circleCenterY},s={x:this.circleCenterX+this.areaRadius,y:this.circleCenterY},this.majorRGridArcPoints.push({startPoint:a,endPoint:s,size:null,rotationAngle:null,isLargeArc:null,sweepDirection:null}),this.labelCollections.push({centerX:"Impedance"===e.renderType?this.circleCenterX-this.areaRadius:this.circleCenterX+this.areaRadius,centerY:this.circleCenterY,angle:"Impedance"===e.renderType?180:360,value:i,radius:this.areaRadius,region:null})))},e.prototype.circleXYRadianValue=function(e,t,i,r){var o;return o=Math.atan2(r-t,i-e),o=o<0?o+360*Math.PI/180:o},e.prototype.calculateMajorArcStartEndPoints=function(e,t,i){var r=[],o=[],n=this.circleCenterX,a=this.circleCenterY;return t>=10?r[0]="Impedance"===i.renderType?{x:n+this.areaRadius,y:a}:{x:n-this.areaRadius,y:a}:o=t>=3?this.horizontalLabelCollections.filter(function(e){return 10===e.value}):t>=1?this.horizontalLabelCollections.filter(function(e){return 5===e.value}):this.horizontalLabelCollections.filter(function(e){return 3===e.value}),o.length>0&&(r[0]=this.intersectingCirclePoints(e.centerX,e.centerY,e.radius,o[0].centerX,o[0].centerY,o[0].radius,i.renderType)),r[1]=this.intersectingCirclePoints(e.centerX,e.centerY,e.radius,n,a,this.areaRadius,i.renderType),r},e.prototype.calculateHMajorArcStartEndPoints=function(e){var t,i,r=[];return e<=.3?(t=2,i=-2):e<=1?(t=3,i=-3):e<=2?(t=5,i=-5):e<=5?(t=10,i=-10):(t=50,i=-50),r[0]=this.radialLabelCollections.filter(function(e){return e.value===t}),r[1]=this.radialLabelCollections.filter(function(e){return e.value===i}),r},e.prototype.calculateMinorArcStartEndPoints=function(e){var t,i,r=[];return e<=.1?(t=1,i=-1):e<=.2?(t=.8,i=-.8):e<=.3?(t=.4,i=-.4):e<=.6?(t=1,i=-1):e<=1?(t=1.5,i=-1.5):e<=1.5?(t=2,i=-2):e<=2?(t=1,i=-1):e<=5?(t=3,i=-3):(t=10,i=-10),r[0]=this.radialLabelCollections.filter(function(e){return e.value===t}),r[1]=this.radialLabelCollections.filter(function(e){return e.value===i}),r},e.prototype.intersectingCirclePoints=function(e,t,i,r,o,n,a){var s={x:0,y:0},l=e-r,h=t-o,c=Math.sqrt(l*l+h*h),d=c*c,p=(i*i-n*n)/(2*d),u=i*i-n*n,g=Math.sqrt(2*(i*i+n*n)/d-u*u/(d*d)-1),y=(e+r)/2+p*(r-e),m=g*(o-t)/2,v=y+m,f=y-m,b=(t+o)/2+p*(o-t),x=g*(e-r)/2,w=b+x,S=b-x;return"Impedance"===a?f<v?(s.x=f,s.y=S):(s.x=v,s.y=w):v>f?(s.x=v,s.y=w):(s.x=f,s.y=S),{x:s.x,y:s.y}},e.prototype.updateHMajorGridLines=function(e){var t=e.horizontalAxis.majorGridLines,i=e.renderer.createGroup({id:e.element.id+"_svg_horizontalAxisMajorGridLines"}),r=this.calculateGridLinesPath(this.majorHGridArcPoints),o=new Zs(e.element.id+"_horizontalAxisMajorGridLines","none",t.width,t.color?t.color:e.themeStyle.majorGridLine,t.opacity,t.dashArray,r),n=e.renderer.drawPath(o);i.appendChild(n),e.svgObject.appendChild(i)},e.prototype.updateRMajorGridLines=function(e){var t=e.radialAxis.majorGridLines,i=e.renderer.createGroup({id:e.element.id+"_svg_radialAxisMajorGridLines"}),r=this.calculateGridLinesPath(this.majorRGridArcPoints),o=new Zs(e.element.id+"_radialAxisMajorGridLines","none",t.width,t.color?t.color:e.themeStyle.majorGridLine,t.opacity,t.dashArray,r),n=e.renderer.drawPath(o);i.appendChild(n),e.svgObject.appendChild(i)},e.prototype.updateHAxisLine=function(e){var t=this.areaRadius,i=e.horizontalAxis.axisLine,r=e.renderer.createGroup({id:e.element.id+"_svg_hAxisLine"}),o={x:this.circleCenterX+t,y:this.circleCenterY},n={x:this.circleCenterX+t,y:this.circleCenterY-.05},a={width:t,height:t},s=this.direction.clockwise,l=2*Math.PI,h="M"+o.x+" "+o.y+" A "+a.width+" "+a.height+" "+l+" 1 "+s+" "+n.x+" "+n.y,c=new Zs(e.element.id+"_horizontalAxisLine","none",i.width,i.color?i.color:e.themeStyle.axisLine,1,i.dashArray,h),d=e.renderer.drawPath(c);r.appendChild(d),e.svgObject.appendChild(r)},e.prototype.updateRAxisLine=function(e){var t=this.areaRadius,i=e.radialAxis.axisLine,r={x:this.circleCenterX-t,y:this.circleCenterY},o={x:this.circleCenterX+t,y:this.circleCenterY},n={width:0,height:0},a=this.direction.counterclockwise,s="M "+r.x+" "+r.y+" A "+n.width+" "+n.height+" 0 0 "+a+" "+o.x+" "+o.y,l=new Zs(e.element.id+"_radialAxisLine","none",i.width,i.color?i.color:e.themeStyle.axisLine,1,i.dashArray,s),h=e.renderer.createGroup({id:e.element.id+"_svg_rAxisLine"}),c=e.renderer.drawPath(l);h.appendChild(c),e.svgObject.appendChild(h)},e.prototype.drawHAxisLabels=function(e){var t=e.horizontalAxis;e.radialAxis.labelStyle.fontFamily=e.themeStyle.fontFamily||e.radialAxis.labelStyle.fontFamily;for(var i,r,o,n,a,s,l,h,c,d,p,u,g,y=e.horizontalAxis.labelStyle,m=e.renderer.createGroup({id:e.element.id+"_HAxisLabels"}),v=this,f=0;f<this.horizontalLabelCollections.length;f++)!function(f){if(i=v.horizontalLabelCollections[f],r=v.horizontalLabelCollections[f].value.toString(),0!==i.value){if(o="Impedance"===e.renderType?i.centerX-i.radius:i.centerX+i.radius,n=i.centerY,a=ft(r,y),o="Impedance"===e.renderType?o-a.width:o,"Outside"===t.labelPosition?n-=a.height/4:n+=a.height,v.horizontalLabelCollections[f].region=v.calculateRegion(r,a,o,n),"Hide"===t.labelIntersectAction){s=v.horizontalLabelCollections[f],l=s.region.bounds,h=l.width,c=l.x;for(var b=1;b<f;b++)d=v.horizontalLabelCollections[b],p=d.region.bounds,u=p.width,g=p.x,"Impedance"===e.renderType&&g+u>c&&(r=""),"Admittance"===e.renderType&&g<c+h&&(r="")}var x={text:r.toString(),x:o,y:n,name:"axisLabelRender",cancel:!1},w=function(t){if(!t.cancel){var i=new $s(e.element.id+"_HLabel_"+f,x.x,x.y,"none",x.text),r=y.color?y.color:e.themeStyle.axisLabel;y.fontFamily=y.fontFamily||e.themeStyle.labelFontFamily;var o=Ct(i,y,r,m);m.appendChild(o)}};w.bind(v),e.trigger("axisLabelRender",x,w)}}(f);e.svgObject.appendChild(m)},e.prototype.drawRAxisLabels=function(e){e.radialAxis.labelStyle.fontFamily=e.themeStyle.fontFamily||e.radialAxis.labelStyle.fontFamily;for(var t,i,r,o,n,a,s,l,h,c,d,p,u,g,y,m,v,f=e.radialAxis.labelStyle,b=new Is,x=e.radialAxis,w=e.renderer.createGroup({id:e.element.id+"_RAxisLabels"}),S=this,C=0;C<this.labelCollections.length;C++)!function(C){if(b=S.labelCollections[C],t=b.value.toString(),i=ft(t,f),r=Math.round(100*b.angle)/100,"Outside"===x.labelPosition?(o=S.circlePointPosition(S.circleCenterX,S.circleCenterY,b.angle,S.areaRadius+2),n=S.setLabelsOutsidePosition(r,o.x,o.y,i)):(o=S.circlePointPosition(S.circleCenterX,S.circleCenterY,b.angle,S.areaRadius-2),n=S.setLabelsInsidePosition(r,o.x,o.y,i)),S.labelCollections[C].region=S.calculateRegion(t,i,n.x,n.y),"Hide"===x.labelIntersectAction){c=S.labelCollections[C],d=c.region.bounds,l=d.width,h=d.height,a=d.x,s=d.y;for(var P=0;P<C;P++)m=S.labelCollections[P],v=m.region.bounds,g=v.width,y=v.height,p=v.x,u=v.y,p<=a+l&&a<=p+g&&u<=s+h&&s<=u+y&&(t=" ")}var L={text:t.toString(),x:n.x,y:n.y,name:"axisLabelRender",cancel:!1},R=function(t){if(!t.cancel){var i=new $s(e.element.id+"_RLabel_"+C,L.x,L.y,"none",L.text),r=f.color?f.color:e.themeStyle.axisLabel;f.fontFamily=e.themeStyle.labelFontFamily?e.themeStyle.labelFontFamily:f.fontFamily;var o=Ct(i,f,r,w);w.appendChild(o)}};R.bind(S),e.trigger("axisLabelRender",L,R)}(C);e.svgObject.appendChild(w)},e.prototype.calculateRegion=function(e,t,i,r){new Es;return{bounds:{x:i,y:r,width:t.width,height:t.height},labelText:e}},e.prototype.updateHMinorGridLines=function(e){var t=e.horizontalAxis.minorGridLines,i=e.renderer.createGroup({id:e.element.id+"_svg_horizontalAxisMinorGridLines"}),r=this.calculateGridLinesPath(this.minorHGridArcPoints),o=new Zs(e.element.id+"_horizontalAxisMinorGridLines","none",t.width,t.color?t.color:e.themeStyle.minorGridLine,t.opacity,t.dashArray,r),n=e.renderer.drawPath(o);i.appendChild(n),e.svgObject.appendChild(i)},e.prototype.updateRMinorGridLines=function(e){var t=e.radialAxis.minorGridLines,i=e.renderer.createGroup({id:e.element.id+"_svg_radialAxisMinorGridLines"}),r=this.calculateGridLinesPath(this.minorGridArcPoints),o=new Zs(e.element.id+"_radialAxisMinorGridLines","none",t.width,t.color?t.color:e.themeStyle.minorGridLine,t.opacity,t.dashArray,r),n=e.renderer.drawPath(o);i.appendChild(n),e.svgObject.appendChild(i)},e.prototype.calculateGridLinesPath=function(e){for(var t,i,r,o,n=new Ws,a="",s=0;s<e.length;s++)t=(n=e[s]).startPoint.x,i=n.startPoint.y,r=n.endPoint.x,o=n.endPoint.y,a=a+"M "+t+" "+i+" A "+(n.size?n.size.width:0)+" "+(n.size?n.size.height:0)+" "+(n.rotationAngle?n.rotationAngle:0)+" "+(n.isLargeArc?1:0)+" "+(n.sweepDirection?n.sweepDirection:0)+" "+r+" "+o+" ";return a.toString()},e.prototype.measureHMinorGridLines=function(e){var t,i,r,o,n,a,s,l,h,c,d,p,u,g=[],y=e.horizontalAxis.minorGridLines.count;this.minorHGridArcPoints=[];for(var m=2*this.areaRadius,v=0;v<this.horizontalLabelCollections.length-3;v++){l=this.horizontalLabelCollections[v],h=this.horizontalLabelCollections[v+1],p=(c=2*(l.radius-h.radius))/(d=Math.floor(y/100*c));for(var f=0;f<d;f++)u=h.radius+f*p/2,s=("Impedance"===e.renderType?this.circleLeftX+m-2*u:this.circleLeftX)+u,r=h.value>5,g=this.calculateMinorArcStartEndPoints(h.value),"Impedance"===e.renderType?(t=g[0],i=g[1]):(t=g[1],i=g[0]),o=this.intersectingCirclePoints(t[0].centerX,t[0].centerY,t[0].radius,s,l.centerY,u,e.renderType),n=this.intersectingCirclePoints(i[0].centerX,i[0].centerY,i[0].radius,s,l.centerY,u,e.renderType),a={width:u,height:u},this.minorHGridArcPoints.push({startPoint:o,endPoint:n,rotationAngle:2*Math.PI,sweepDirection:"Impedance"===e.renderType?this.direction.counterclockwise:this.direction.clockwise,isLargeArc:r,size:a})}},e.prototype.measureRMinorGridLines=function(e){var t,i,r,o,n,a,s,l,h,c,d,p=e.radialAxis.minorGridLines.count,u=Math.PI*(2*this.areaRadius),g=t="Impedance"===e.renderType?this.circleCenterX+this.areaRadius:this.circleCenterX-this.areaRadius,y=this.circleCenterY;this.minorGridArcPoints=[];for(var m={x:g,y:y},v=2;v<this.labelCollections.length-3;v++){n=this.labelCollections[v],a=this.labelCollections[v+1],"Impedance"===e.renderType?(i=360===a.angle?0:a.angle,r=Math.abs(i-n.angle)):(i=360===n.angle?0:n.angle,r=Math.abs(i-a.angle)),l=u/360*r,c=r/(h=Math.floor(p/100*l)),d=a.value>0?a.value:n.value,o=this.minorGridLineArcIntersectCircle(Math.abs(d));for(var f=1;f<h;f++){var b=c*f+(360===n.angle?i:n.angle),x=this.circlePointPosition(this.circleCenterX,this.circleCenterY,b,this.areaRadius),w=this.arcRadius(m,x,b),S=b>180?this.circleCenterY-w:this.circleCenterY+w,C=this.intersectingCirclePoints(t,S,w,o[0].centerX,o[0].centerY,o[0].radius,e.renderType),P={x:C.x,y:C.y},L={x:x.x,y:x.y};s={width:w,height:w};var R=n.value>=0?this.direction.clockwise:this.direction.counterclockwise;this.minorGridArcPoints.push({startPoint:P,endPoint:L,rotationAngle:2*Math.PI,sweepDirection:R,isLargeArc:!1,size:s})}}},e.prototype.minorGridLineArcIntersectCircle=function(e){var t;return t=e>=3?20:e>=1.5?10:e>=.6?3:2,this.horizontalLabelCollections.filter(function(e){return e.value===t})},e.prototype.circlePointPosition=function(e,t,i,r){var o=i*(Math.PI/180);return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}},e.prototype.setLabelsInsidePosition=function(e,t,i,r){var o=t,n=i;return 0===e||360===e?(o-=r.width,n-=r.height/2):90===e?(o-=r.width,n+=r.height/8):180===e?n+=r.height:270===e?n+=r.height/2:e>0&&e<=20?o-=r.width:e>20&&e<=60?(o-=r.width+r.width/2,n+=r.height/2):e>60&&e<90?(o-=r.width+r.width/4,n+=r.height/4):e>90&&e<=135?(o-=r.width/2,n+=r.height/16):e>135&&e<=150?(o+=r.width/2,n+=r.height/2):e>150&&e<180?(o+=r.width/2,n+=r.height):e>180&&e<=210?(o+=r.width/6,n+=r.height/6):e>210&&e<240?n+=r.height/4:e>225&&e<270?n+=r.height/3:e>270&&e<=300?(o-=r.width+r.width/4,n+=r.height/4):e>300&&e<=330?(o-=r.width+r.width/3,n+=r.height/4):e>330&&e<=340?(o-=r.width+r.width/2,n+=r.height/4):e>340&&(o-=r.width,n+=r.height/8),{x:o,y:n}},e.prototype.setLabelsOutsidePosition=function(e,t,i,r){var o=t,n=i;return 90===e?(o-=r.width/2,n+=r.height):180===e?(o-=r.width+5,n-=r.height/4):270===e?(o-=r.width/2,n-=r.height/4):360===e?(o+=5,n-=r.height/2):e>0&&e<=30?(o+=r.width/4,n+=r.height/8):e>30&&e<=60?(o+=r.width/2,n+=r.height/4):e>60&&e<=90?(o-=r.width/2,n+=r.height):e>90&&e<=135?(o-=r.width,n+=r.height):e>135&&e<=180?(o-=r.width+r.width/4,n+=r.height/4):e>180&&e<=210?(o-=r.width+r.width/4,n-=r.height/4):e>210&&e<=270?(o-=r.width,n-=r.height/4):e>270&&e<=340?n-=r.height/4:e>340&&(n+=r.height/4,o+=r.width/6),{x:o,y:n}},e.prototype.arcRadius=function(e,t,i){var r=i>180?90*Math.PI/180:270*Math.PI/180,o=(t.x-e.x)/2,n=(t.y-e.y)/2,a=(n-o*((Math.cos(r)*n-Math.sin(r)*o)/(Math.cos(r)*o+Math.sin(r)*n)))/Math.sin(r),s=e.y+Math.sin(r)*a;return Math.abs(e.y-s)},e}(),Al=function(){function e(){}return e.prototype.drawMarker=function(e,t,i,r){if(e.series[t].marker.visible){var o=e.series[t].marker,n=e.series[t].points.length-1,a=o.width,s=o.height,l=o.shape,h=e.renderer.createGroup({id:e.element.id+"_svg_series"+t+"_Marker"});i.appendChild(h);for(var c=o.border.width,d=o.border.color,p=o.opacity,u=o.fill?o.fill:e.series[t].fill||e.seriesColors[t%e.seriesColors.length],g=0;g<n+1;g++){var y=r[g].point,m=g,v=new Vs(e.element.id+"_Series"+t+"_Points"+m+"_Marker"+m,u,d,c,p);h.appendChild(this.drawSymbol(l,o.imageUrl,y,new Gs(a,s),v,e))}}},e.prototype.drawSymbol=function(e,t,i,r,o,n){var a,s,l,h,c=e.toLowerCase(),d={color:o.borderColor,width:o.borderWidth},p=o.opacity,u=i.x,g=i.y,y=Math.sqrt(r.height*r.height+r.width*r.width)/2;switch(c){case"circle":s=new Qs(o.id,o.fill,d,p,i.x,i.y,y,null),a=n.renderer.drawCircle(s);break;case"rectangle":h="M "+(u+-r.width/2)+" "+(g+-r.height/2)+" L "+(u+r.width/2)+" "+(g+-r.height/2)+" L "+(u+r.width/2)+" "+(g+r.height/2)+" L "+(u+-r.width/2)+" "+(g+r.height/2)+" L "+(u+-r.width/2)+" "+(g+-r.height/2)+"z",l=new Zs(o.id,o.fill,d.width,d.color,p,"",h),a=n.renderer.drawPath(l);break;case"triangle":h="M "+(u+-r.width/2)+" "+(g+r.height/2)+" L "+u+" "+(g+-r.height/2)+" L "+(u+r.width/2)+" "+(g+r.height/2)+" L "+(u+-r.width/2)+" "+(g+r.height/2)+"z",l=new Zs(o.id,o.fill,d.width,d.color,p,"",h),a=n.renderer.drawPath(l);break;case"diamond":h="M "+(u+-r.width/2)+" "+g+" L "+u+" "+(g+-r.height/2)+" L "+(u+r.width/2)+" "+g+" L "+u+" "+(g+r.height/2)+" L "+(u+-r.width/2)+" "+g+"z",l=new Zs(o.id,o.fill,d.width,d.color,p,"",h),a=n.renderer.drawPath(l);break;case"pentagon":for(var m=0;m<=5;m++){var v=y*Math.cos(Math.PI/180*(72*m)),f=y*Math.sin(Math.PI/180*(72*m));h=0===m?"M "+(u+v)+" "+(g+f)+" ":h.concat("L "+(u+v)+" "+(g+f)+" ")}h=h.concat("Z"),l=new Zs(o.id,o.fill,d.width,d.color,p,"",h),a=n.renderer.drawPath(l)}return a},e}(),Tl=function(){function e(){this.textOptions=[],this.labelOptions=[],this.allPoints=[]}return e.prototype.drawDataLabel=function(e,t,i,r,o){this.textOptions=[],this.allPoints=[];for(var n,a,s,l,h,c=e.margin,d=e.series[t].marker,p=d.dataLabel,u=p.textStyle,g=r.length,y=0;y<g;y++){h=ft(l=e.series[t].points[y].reactance.toString(),u);var m=(a=r[y].point).x-h.width/2,v=a.y-(h.height+d.height+c.top),f=h.width+c.left/2+c.right/2,b=h.height+c.top/2+c.bottom/2;n=y,s=new js,s={textX:m+c.left/2,textY:v+b/2+c.top/2,x:m,y:v},this.textOptions[y]={id:e.element.id+"_Series"+t+"_Points"+n+"_dataLabel_displayText"+y,x:s.textX,y:s.textY,fill:"black",text:l,font:u,xPosition:m,yPosition:v,width:f,height:b,location:a,labelOptions:s,visible:!0,connectorFlag:null}}var x=new Ys;x.textOptions=this.textOptions,this.labelOptions.push(x),this.drawDatalabelSymbol(e,t,p,i,o,r)},e.prototype.calculateSmartLabels=function(e,t){for(var i=e.textOptions.length,r=0;r<i;r++)this.allPoints[this.allPoints.length]=e.textOptions[r],this.connectorFlag=!1,this.compareDataLabels(r,e,0,t),this.labelOptions[t].textOptions[r]=e.textOptions[r],this.labelOptions[t].textOptions[r].connectorFlag=this.connectorFlag},e.prototype.compareDataLabels=function(e,t,i,r){for(var o,n,a=this.allPoints.length,s=0;s<a;s++)if(n=this.allPoints[s],o=this.allPoints[a-1],this.isCollide(n,o))switch(this.connectorFlag=!0,i){case 0:this.resetValues(o),this.prevLabel=n,o.xPosition=this.prevLabel.xPosition+(this.prevLabel.width/2+o.width/2+10),o.x=o.xPosition+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 1:this.resetValues(o),o.xPosition=this.prevLabel.xPosition+this.prevLabel.width/2+o.width/2+10,o.x=o.xPosition+5,o.yPosition=o.location.y+o.height/2+5,o.y=o.yPosition+o.height/2+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 2:this.resetValues(o),o.yPosition=o.location.y+o.height/2+5,o.y=o.yPosition+o.height/2+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 3:this.resetValues(o),o.xPosition=this.prevLabel.xPosition-this.prevLabel.width/2-o.width/2-10,o.x=o.xPosition+5,o.yPosition=o.height/2+o.location.y+5,o.y=o.yPosition+o.height/2+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 4:this.resetValues(o),o.xPosition=this.prevLabel.xPosition-this.prevLabel.width/2-o.width/2-10,o.x=o.xPosition+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 5:this.resetValues(o),o.xPosition=this.prevLabel.xPosition-this.prevLabel.width/2-o.width/2-10,o.x=o.xPosition+5,o.yPosition=this.prevLabel.yPosition-o.height-10,o.y=o.yPosition+o.height/2+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 6:this.resetValues(o),o.yPosition=this.prevLabel.yPosition-(o.height+10),o.y=o.yPosition+o.height/2+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 7:this.resetValues(o),o.xPosition=this.prevLabel.xPosition+this.prevLabel.width/2+o.width/2+10,o.x=o.xPosition+5,o.yPosition=this.prevLabel.yPosition-o.height-10,o.y=o.yPosition+o.height/2+5,i+=1,this.compareDataLabels(e,t,i,r);break;case 8:i=0,this.compareDataLabels(e,t,i,r)}},e.prototype.isCollide=function(e,t){var i=!1;return e!==t&&(i=!(e.y+e.height<t.y||e.y>t.y+t.height||e.x+e.width/2<t.x-t.width/2||e.x-e.width/2>t.x+t.width/2)),i},e.prototype.resetValues=function(e){e.xPosition=e.labelOptions.x,e.yPosition=e.labelOptions.y,e.x=e.labelOptions.textX,e.y=e.labelOptions.textY},e.prototype.drawConnectorLines=function(e,t,i,r,o){var n,a=r.location;n=a.y>r.y?r.y:r.y-r.height/2;var s="M "+a.x+" "+a.y+" L "+r.x+" "+n,l=e.series[t].marker.dataLabel.connectorLine,h=l.color?l.color:e.series[t].fill||e.seriesColors[t%e.seriesColors.length],c=new Zs(e.element.id+"_dataLabelConnectorLine_series"+t+"_point"+i,"none",l.width,h,1,"none",s),d=e.renderer.drawPath(c);o.appendChild(d)},e.prototype.drawDatalabelSymbol=function(e,i,r,o,n,a){for(var s=0;s<e.series[i].points.length;s++)if(r.template){var l=t.createElement("div",{id:e.element.id+"_seriesIndex_"+i+"_Label_Template_Group",className:"template",styles:"position: absolute;"});document.getElementById(e.element.id+"_Secondary_Element").appendChild(l);var h=r.template+"_seriesIndex"+i+"_pointIndex"+s+e.element.id,c={point:e.series[i].points[s].reactance},d=ut(pt(r.template)(e),h,c);l.appendChild(d),d.style.left=a[s].point.x-d.offsetWidth/2+"px",d.style.top=a[s].point.y-d.offsetHeight-e.series[i].marker.height/2+"px";var p="_seriesIndex"+i+"_pointIndex"+s+e.element.id;t.updateBlazorTemplate(p+"Template","Template");var u=parseInt(d.style.left,10),g=parseInt(d.style.top,10),y=d.offsetWidth,m=d.offsetHeight,v=a[s].point,f={textX:u,textY:g,x:u,y:g};this.labelOptions[i].textOptions[s]={id:h,x:u,y:g,fill:"black",text:"",font:r.textStyle,xPosition:u,yPosition:g,width:y,height:m,location:v,labelOptions:f,visible:!0,connectorFlag:null}}},e}(),kl=function(){function e(){this.xValues=[],this.yValues=[],this.pointsRegion=[],this.lineSegments=[],this.location=[],this.dataLabel=new Tl}return e.prototype.processData=function(e){var t=e.dataSource,i=e.resistance,r=e.reactance,o=e.tooltipMappingName;e.points=[];for(var n=0;n<t.length;n++)e.points.push({resistance:t[n][i],reactance:t[n][r],tooltip:t[n][o]})},e.prototype.draw=function(e,t,i){for(var r,o,n,a,s=e.renderer.createGroup({id:e.element.id+"_svg_seriesCollections"}),l=e.series,h=l.length,c=t.areaRadius,d=0;d<h;d++){var p=d;l[d].dataSource&&l[d].resistance&&l[d].reactance&&this.processData(l[d]),this.pointsRegion[d]=[],this.location[d]=[];for(M=0;M<l[d].points.length;M++)this.xValues[M]=l[d].points[M].resistance,this.yValues[M]=l[d].points[M].reactance;for(var u=t.circleCenterX,g=t.circleCenterY,y=2*t.areaRadius,m=g,v={x:u+("Impedance"===e.renderType?c:-c),y:g}.x,f=0;f<l[d].points.length;f++){var b=this.xValues[f],x=y*(1/(b+1))/2,w=this.yValues[f],S=Math.abs(1/w*y/2);"Impedance"===e.renderType?(o=w>0?g-S:g+S,r=t.circleLeftX+y-x):(o=w<0?g-S:g+S,r=t.circleLeftX+x),n=t.intersectingCirclePoints(v,o,S,r,m,x,e.renderType);var C=gt();Math.abs(w)<C&&(n.x="Impedance"===e.renderType?r-x:r+x,n.y=g),this.pointsRegion[d][f]=new Bs,this.pointsRegion[d][f]={point:n,x:b,y:w},this.location[d][f]={x:n.x,y:n.y}}for(A=0;A<l[d].points.length-1;A++)a=A+1,this.lineSegments[A]=new Ds,this.lineSegments[A]={x1:this.xValues[A],y1:this.yValues[A],x2:this.xValues[a],y2:this.yValues[a]};e.svgObject.appendChild(s),this.drawSeries(e,p,s,i)}for(M=0;M<e.series.length;M++)if(e.series[M].enableSmartLabels&&e.series[M].marker.dataLabel.visible){var P=e.renderer.createGroup({id:e.element.id+"_svg_series"+M+"_Datalabel_connectorLines"});(T=document.getElementById(e.element.id+"_svg_seriesCollection"+M))&&T.appendChild(P),this.dataLabel.calculateSmartLabels(this.dataLabel.labelOptions[M],M);for(f=0;f<e.series[M].points.length;f++){var L=this.dataLabel.labelOptions[M].textOptions[f];(L.xPosition+L.width>e.chartArea.x+e.chartArea.width||L.xPosition<e.chartArea.x||L.yPosition<e.chartArea.y||L.yPosition+L.height>e.chartArea.y+e.chartArea.height)&&(this.dataLabel.labelOptions[M].textOptions[f].connectorFlag=!1,this.dataLabel.labelOptions[M].textOptions[f].visible=!1),L.connectorFlag&&this.dataLabel.drawConnectorLines(e,M,f,L,P)}}for(var R=this,M=0;M<e.series.length;M++)!function(t){var i=e.series[t].marker.dataLabel;if(e.series[t].marker.dataLabel.visible){var r=document.getElementById(e.element.id+"_svg_seriesCollection"+t),o=e.renderer.createGroup({id:e.element.id+"_svg_series"+t+"_Datalabel"});r&&r.appendChild(o);for(var n=0;n<e.series[t].points.length;n++)!function(r){var n=R.dataLabel.labelOptions[t].textOptions[r];if(!i.template&&n.visible){var a=new Xs;a=R.dataLabel.labelOptions[t].textOptions[r];var s=i.textStyle,l=a.xPosition,h=a.yPosition,c=e.element.id+"_Series"+t+"_Points"+r+"_dataLabel_symbol"+r,d=i.fill?i.fill:e.series[t].fill||e.seriesColors[t%e.seriesColors.length],p=e.series[t].marker.dataLabel.border,u=new qs(c,d,p,a.opacity,new ks(l,h,a.width,a.height)),g=e.renderer.drawRectangle(u);o.appendChild(g);var y={text:a.text,x:a.x,y:a.y,seriesIndex:t,pointIndex:r,name:"textRender",cancel:!1},m=function(t){if(!t.cancel){var i=new $s(a.id,t.x,t.y,"start",t.text),r=s.color?s.color:e.themeStyle.dataLabel,n=Ct(i,s,r,o);o.appendChild(n)}};m.bind(R),e.trigger("textRender",y,m)}else if(i.template){var v=document.getElementById(i.template+"_seriesIndex"+t+"_pointIndex"+r+e.element.id);v.style.left=R.dataLabel.labelOptions[t].textOptions[r].xPosition+"px",v.style.top=R.dataLabel.labelOptions[t].textOptions[r].yPosition+"px"}}(n)}}(M);for(var A=0;A<e.series.length;A++)if(e.series[A].enableAnimation&&e.animateSeries){e.series[A].marker.dataLabel.template&&this.animateDataLabelTemplate(A,e);var T=document.getElementById(e.element.id+"_svg_seriesCollection"+A);this.performAnimation(e,T,A)}},e.prototype.drawSeries=function(e,t,i,r){var o=this,n=e.renderer.createGroup({id:e.element.id+"_svg_seriesCollection"+t,"clip-path":"url(#"+e.element.id+"_ChartSeriesClipRect_"+t+")"});n.setAttribute("visibility",e.series[t].visibility),i.appendChild(n);for(var a,s,l="",h=(e.series[t].marker,e.series[t].points.length-1),c=0;c<h;c++){var d=this.pointsRegion[t][c].point,p=this.pointsRegion[t][c+1].point;l=l+"M "+d.x+" "+d.y+" L "+p.x+" "+p.y+" "}a=l.toString();var u=e.series[t].fill||e.seriesColors[t%e.seriesColors.length],g={text:e.series[t].name,fill:u,name:"seriesRender",cancel:!1},y=function(i){if(!i.cancel){var l=new Zs(e.element.id+"_series"+t+"_points","none",e.series[t].width,g.fill,e.series[t].opacity,"none",a);o.clipRectElement=e.renderer.drawClipPath(new qs(e.element.id+"_ChartSeriesClipRect_"+t,"transparent",{width:1,color:"Gray"},1,{x:r.x,y:r.y,width:e.availableSize.width,height:e.availableSize.height})),n.appendChild(o.clipRectElement);var h=e.renderer.createGroup({id:e.element.id+"_svg"+t});s=e.renderer.drawPath(l),h.appendChild(s),n.appendChild(h)}};y.bind(this),e.trigger("seriesRender",g,y),(new Al).drawMarker(e,t,n,this.pointsRegion[t]),this.dataLabel.drawDataLabel(e,t,n,this.pointsRegion[t],r)},e.prototype.animateDataLabelTemplate=function(e,t){for(var i=t.series[e].points.length,r=parseFloat(t.series[e].animationDuration),o=0;o<i;o++){var n=document.getElementById(t.series[e].marker.dataLabel.template+"_seriesIndex"+e+"_pointIndex"+o+t.element.id);n.style.visibility="hidden",mt(t,n,0,r,"FadeIn")}},e.prototype.performAnimation=function(e,i,r){var o,n=new t.Animation({}),a=(document.getElementById("container_svg_seriesCollections"),i.childNodes[0].childNodes[0].childNodes[0]),s=St("Linear"),l=St("Reverse"),h=+a.getAttribute("width"),c=+a.getAttribute("x");n.animate(a,{duration:parseFloat(e.series[r].animationDuration),progress:function(t){"Impedance"===e.renderType?(o=s(t.timeStamp-t.delay,0,h,t.duration),a.setAttribute("width",o.toString())):(o=l(t.timeStamp-t.delay,h,0,t.duration),a.setAttribute("x",o.toString()))},end:function(t){"Impedance"===e.renderType?a.setAttribute("width",h.toString()):a.setAttribute("x",c.toString());var i={cancel:!1,name:"animationComplete",smithchart:e.isBlazor?null:e};e.trigger("animationComplete",i)}})},e.prototype.getLocation=function(e,t){var i,r;return i=this.location[e][t].x,r=this.location[e][t].y,{x:i,y:r}},e}(),_l=function(){function e(e){this.control=e}return e.prototype.print=function(e){this.smithchartPrint=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.smithchartPrint.moveTo(0,0),this.smithchartPrint.resizeTo(screen.availWidth,screen.availHeight);var i={cancel:!1,htmlContent:this.getHTMLContent(e),name:"beforePrint"};this.control.trigger("beforePrint",i),i.cancel||t.print(i.htmlContent,this.smithchartPrint)},e.prototype.getHTMLContent=function(e){var i=t.createElement("div");return e?e instanceof Array?e.forEach(function(e){i.appendChild(ct(e).cloneNode(!0))}):e instanceof Element?i.appendChild(e.cloneNode(!0)):i.appendChild(ct(e).cloneNode(!0)):i.appendChild(this.control.element.cloneNode(!0)),i},e.prototype.export=function(e,i,r){var n=this,a=t.createElement("canvas",{id:"ej2-canvas",attrs:{width:this.control.availableSize.width.toString(),height:this.control.availableSize.height.toString()}}),s=!(t.Browser.userAgent.toString().indexOf("HeadlessChrome")>-1);r=t.isNullOrUndefined(r)?o.PdfPageOrientation.Landscape:r;var l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+this.control.svgObject.outerHTML+"</svg>",h=window.URL.createObjectURL(new Blob("SVG"===e?[l]:[(new XMLSerializer).serializeToString(this.control.svgObject)],{type:"image/svg+xml"}));if("SVG"===e)this.triggerDownload(i,e,h,s);else{var c=new Image,d=a.getContext("2d");c.onload=function(){if(d.drawImage(c,0,0),window.URL.revokeObjectURL(h),"PDF"===e){var t=new o.PdfDocument,l=a.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");t.pageSettings.orientation=r,l=l.slice(l.indexOf(",")+1),t.pages.add().graphics.drawImage(new o.PdfBitmap(l),0,0,n.control.availableSize.width-60,n.control.availableSize.height),s&&(t.save(i+".pdf"),t.destroy())}else n.triggerDownload(i,e,a.toDataURL("image/png").replace("image/png","image/octet-stream"),s)},c.src=h}},e.prototype.triggerDownload=function(e,i,r,o){t.createElement("a",{attrs:{download:e+"."+i.toLocaleLowerCase(),href:r}}).dispatchEvent(new MouseEvent(o?"click":"move",{view:window,bubbles:!1,cancelable:!0}))},e}(),Ol=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),El=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},zl=function(e){function i(t,i){return e.call(this,t,i)||this}return Ol(i,e),i.prototype.getModuleName=function(){return"smithchart"},i.prototype.getPersistData=function(){return""},i.prototype.createChartSvg=function(){this.removeSvg(),ht(this)},i.prototype.renderTitle=function(e,i,r){var o,n=this,a=e.font?e.font:e.textStyle,s=ft(e.text,a),l=e.textAlignment,h=e.text,c=t.isNullOrUndefined(e.maximumWidth)?Math.abs(this.margin.left+this.margin.right-this.availableSize.width):e.maximumWidth,d=s.width>c;o=s.width>this.availableSize.width?this.margin.left+this.border.width:"Center"===l?this.availableSize.width/2-s.width/2:"Near"===l?this.margin.left+this.elementSpacing+this.border.width:this.availableSize.width-s.width-(this.margin.right+this.elementSpacing+this.border.width);var p=this.margin.top+s.height/2+this.elementSpacing;e.enableTrim&&d&&(h=dt(c,e.text,a),s=ft(h,a)),r=this.renderer.createGroup({id:this.element.id+"_Title_Group"});var u,g={text:h,x:o,y:p,name:"titleRender",cancel:!1},y=function(t){if(!t.cancel){u=new $s(n.element.id+"_Smithchart_"+i,t.x,t.y,"start",t.text),a.fontFamily=n.themeStyle.fontFamily||e.textStyle.fontFamily,a.size=n.themeStyle.fontSize||e.textStyle.size,Ct(u,a,n.themeStyle.chartTitle,r).setAttribute("aria-label",e.description||t.text);var o={x:t.x,y:t.y,textSize:s};n.svgObject.appendChild(r),""!==e.subtitle.text&&e.subtitle.visible&&n.renderSubtitle(e,i,s,n.availableSize,o,r)}};y.bind(this),this.trigger("titleRender",g,y)},i.prototype.renderSubtitle=function(e,i,r,o,n,a){var s=this,l=e.subtitle.textStyle,h=e.subtitle,c=ft(h.text,l),d=h.text,p=t.isNullOrUndefined(h.maximumWidth)?.75*this.bounds.width:h.maximumWidth;h.enableTrim&&c.width>p&&(d=dt(p,h.text,l));var u="Far"===e.subtitle.textAlignment?n.x+n.textSize.width:"Near"===e.subtitle.textAlignment?n.x:n.x+n.textSize.width/2,g=n.y+2*this.elementSpacing,y="Far"===e.subtitle.textAlignment?"end":"Near"===e.subtitle.textAlignment?"start":"middle",m={text:d,x:u,y:g,name:"subtitleRender",cancel:!1},v=function(e){if(!e.cancel){var t=Ct(new $s(s.element.id+"_Smithchart_"+i,e.x,e.y,y,e.text),l,s.themeStyle.chartTitle,a);t.setAttribute("aria-label",h.description||e.text),a.appendChild(t)}};v.bind(this),this.trigger("subtitleRender",m,v)},i.prototype.renderBorder=function(){var e=this.border;this.background=this.background?this.background:this.themeStyle.background;var t=new qs(this.element.id+"_SmithchartBorder",this.background,e,1,new ks(e.width/2,e.width/2,this.availableSize.width-e.width,this.availableSize.height-e.width));this.svgObject.appendChild(this.renderer.drawRectangle(t))},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,r=0,o=Object.keys(e);r<o.length;r++)switch(o[r]){case"background":case"border":case"series":case"legendSettings":case"radius":i=!0;break;case"size":this.createChartSvg(),i=!0;break;case"theme":case"renderType":this.animateSeries=!0,i=!0}i&&this.render()},i.prototype.preRender=function(){this.isBlazor=t.isBlazor(),this.allowServerDataBinding=!1,this.trigger("load",{smithchart:this.isBlazor?null:this}),this.unWireEVents(),this.initPrivateVariable(),this.wireEVents()},i.prototype.initPrivateVariable=function(){this.animateSeries=!0},i.prototype.setTheme=function(){this.themeStyle=Lt(this.theme),this.seriesColors=Pt(this.theme)},i.prototype.render=function(){this.createChartSvg(),this.element.appendChild(this.svgObject),this.setTheme(),this.createSecondaryElement(),this.renderBorder(),this.smithchartLegendModule&&this.legendSettings.visible&&(this.legendBounds=this.smithchartLegendModule.renderLegend(this)),this.legendBounds=this.legendBounds?this.legendBounds:{x:0,y:0,width:0,height:0};var e=new Rl;this.bounds=e.calculateAreaBounds(this,this.title,this.legendBounds),""!==this.title.text&&this.title.visible&&this.renderTitle(this.title,"title",null);var t=new Ml;t.renderArea(this,this.bounds),this.seriesrender=new kl,this.seriesrender.draw(this,t,this.bounds),this.renderComplete(),this.allowServerDataBinding=!0,this.trigger("loaded",{smithchart:this.isBlazor?null:this})},i.prototype.createSecondaryElement=function(){if(t.isNullOrUndefined(document.getElementById(this.element.id+"_Secondary_Element"))){var e=t.createElement("div",{id:this.element.id+"_Secondary_Element",styles:"position: absolute;z-index:1;"});this.element.appendChild(e);var i=this.element.getBoundingClientRect(),r=document.getElementById(this.element.id+"_svg");if(r){var o=r.getBoundingClientRect();e.style.left=Math.max(o.left-i.left,0)+"px",e.style.top=Math.max(o.top-i.top,0)+"px"}}else bt(this.element.id+"_Secondary_Element")},i.prototype.destroy=function(){this.unWireEVents(),e.prototype.destroy.call(this),this.element.classList.remove("e-smithchart")},i.prototype.wireEVents=function(){t.EventHandler.add(this.element,"click",this.smithchartOnClick,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.smithchartOnResize.bind(this))},i.prototype.mouseMove=function(e){"touchmove"===e.type?this.isTouch=!0:this.isTouch="touch"===e.pointerType||"2"===e.pointerType||this.isTouch,this.tooltipRenderModule&&!this.isTouch&&this.tooltipRenderModule.smithchartMouseMove(this,e)},i.prototype.mouseEnd=function(e){if("touchend"===e.type?this.isTouch=!0:this.isTouch="touch"===e.pointerType||"2"===e.pointerType,this.tooltipRenderModule&&this.isTouch){var t=this.tooltipRenderModule.smithchartMouseMove(this,e);t&&(this.fadeoutTo=+setTimeout(function(){t.fadeOut()},2e3))}},i.prototype.smithchartOnClick=function(e){var t=e.target.id,i=document.getElementById(t).parentElement;if("containerlegendItem_Group"===document.getElementById(i.id).parentElement.id&&this.legendSettings.toggleVisibility){for(var r=i.childNodes[1],o=i.childNodes[0],n=r.textContent,a=void 0,s=void 0,l=0;l<this.smithchartLegendModule.legendSeries.length;l++)n===this.smithchartLegendModule.legendSeries[l].text&&(a=this.smithchartLegendModule.legendSeries[l].seriesIndex,s=this.smithchartLegendModule.legendSeries[l].fill);var h=document.getElementById(this.element.id+"_svg_seriesCollection"+a);"visible"===h.getAttribute("visibility")?(o.setAttribute("fill","gray"),h.setAttribute("visibility","hidden"),this.series[a].visibility="hidden"):(o.setAttribute("fill",s),h.setAttribute("visibility","visible"),this.series[a].visibility="visible")}},i.prototype.unWireEVents=function(){t.EventHandler.remove(this.element,"click",this.smithchartOnClick),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.smithchartOnResize)},i.prototype.print=function(e){new _l(this).print(e)},i.prototype.export=function(e,t,i){new _l(this).export(e,t,i)},i.prototype.smithchartOnResize=function(){var e=this;return this.animateSeries=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=+setTimeout(function(){e.render()},500),!1},i.prototype.requiredModules=function(){var e=[];this.legendSettings.visible&&e.push({member:"SmithchartLegend",args:[this]});for(var t=0;t<this.series.length;t++)if(this.series[t].tooltip.visible){e.push({member:"TooltipRender",args:[this]});break}return e},i.prototype.removeSvg=function(){bt(this.element.id+"_Secondary_Element");if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}},El([t.Property("Impedance")],i.prototype,"renderType",void 0),El([t.Property("")],i.prototype,"width",void 0),El([t.Property("")],i.prototype,"height",void 0),El([t.Property("Material")],i.prototype,"theme",void 0),El([t.Complex({},As)],i.prototype,"margin",void 0),El([t.Complex({},Ms)],i.prototype,"font",void 0),El([t.Complex({},Ts)],i.prototype,"border",void 0),El([t.Complex({},yl)],i.prototype,"title",void 0),El([t.Collection([{}],Ll)],i.prototype,"series",void 0),El([t.Complex({},nl)],i.prototype,"legendSettings",void 0),El([t.Complex({},dl)],i.prototype,"horizontalAxis",void 0),El([t.Complex({},dl)],i.prototype,"radialAxis",void 0),El([t.Property(null)],i.prototype,"background",void 0),El([t.Property(10)],i.prototype,"elementSpacing",void 0),El([t.Property(1)],i.prototype,"radius",void 0),El([t.Event()],i.prototype,"beforePrint",void 0),El([t.Event()],i.prototype,"animationComplete",void 0),El([t.Event()],i.prototype,"load",void 0),El([t.Event()],i.prototype,"loaded",void 0),El([t.Event()],i.prototype,"legendRender",void 0),El([t.Event()],i.prototype,"titleRender",void 0),El([t.Event()],i.prototype,"subtitleRender",void 0),El([t.Event()],i.prototype,"textRender",void 0),El([t.Event()],i.prototype,"axisLabelRender",void 0),El([t.Event()],i.prototype,"seriesRender",void 0),El([t.Event()],i.prototype,"tooltipRender",void 0),i=El([t.NotifyPropertyChanges],i)}(t.Component),Il=function(){function e(){}return e.prototype.smithchartMouseMove=function(e,t){var i,r,o;"touchend"===t.type||"touchmove"===t.type?(r=(i=t).changedTouches[0].clientX,o=i.changedTouches[0].clientY,this.tooltipElement=void 0):(o=t.clientY,r=t.clientX),this.setMouseXY(e,r,o);for(var n=0;n<e.series.length;n++){var a=e.series[n],s=n,l=new Fs;if((l=this.closestPointXY(e,this.mouseX,this.mouseY,a,s)).location&&a.tooltip.visible&&"visible"===a.visibility){this.createTooltip(e,t,l.index,s,a);break}this.tooltipElement&&(this.tooltipElement.enable&&!a.tooltip.template&&(this.tooltipElement.enable=!1),this.tooltipElement.fadeOut())}return this.tooltipElement},e.prototype.setMouseXY=function(e,t,i){var r=document.getElementById(e.element.id+"_svg");if(e.element&&r){var o=e.element.getBoundingClientRect(),n=r.getBoundingClientRect();this.mouseX=t-o.left-Math.max(n.left-o.left,0),this.mouseY=i-o.top-Math.max(n.top-o.top,0)}},e.prototype.createTooltip=function(e,r,o,n,a){var s=this,l=a.points[o],h=[l.resistance+" : <b>"+l.reactance+"</b>"],c={cancel:!1,name:"tooltipRender",text:(l.tooltip?[l.tooltip]:null)||h,headerText:"<b>"+a.name+"</b>",template:a.tooltip.template,point:l},d=function(r){var o=e.series[n].marker.height/2,h=document.getElementById(e.element.id+"_smithchart_tooltip_div");t.isNullOrUndefined(h)&&(h=t.createElement("div",{id:e.element.id+"_smithchart_tooltip_div",styles:"pointer-events: none; position: absolute;z-index:1;"}),document.getElementById(e.element.id+"_Secondary_Element").appendChild(h)),s.tooltipElement=new i.Tooltip({enable:!0,header:r.headerText,content:r.text,border:a.tooltip.border,fill:e.themeStyle.tooltipFill,data:l,template:r.template,location:{x:s.locationX+e.element.offsetLeft,y:s.locationY-o+e.element.offsetTop},shared:!1,areaBounds:new ks(e.bounds.x,e.bounds.y,e.bounds.width,e.bounds.height),palette:[a.fill||e.seriesColors[n%e.seriesColors.length]],shapes:["Circle"],availableSize:e.availableSize,theme:e.theme,blazorTemplate:{name:"TooltipTemplate",parent:e.series[n].tooltip}}),s.tooltipElement.opacity=e.themeStyle.tooltipFillOpacity||s.tooltipElement.opacity,s.tooltipElement.textStyle.fontFamily=e.themeStyle.fontFamily||"Roboto, Segoe UI, Noto, Sans-serif",s.tooltipElement.textStyle.opacity=e.themeStyle.tooltipTextOpacity||s.tooltipElement.textStyle.opacity,s.tooltipElement.appendTo(h)};d.bind(this,e),e.trigger("tooltipRender",c,d)},e.prototype.closestPointXY=function(e,t,i,r,o){for(var n,a,s,l=0;l<r.points.length;l++){a=e.seriesrender.getLocation(o,l),this.locationX=a.x,this.locationY=a.y,n=l;var h=t-a.x,c=i-a.y;if(Math.abs(Math.sqrt(h*h+c*c))<r.marker.width){s=a,n=l;break}}return{location:s,index:n}},e.prototype.getModuleName=function(){return"TooltipRender"},e.prototype.destroy=function(){},e}(),Dl=function(){function e(){this.legendSeries=[]}return e.prototype.renderLegend=function(e){return this.calculateLegendBounds(e),this._drawLegend(e),this.legendActualBounds},e.prototype.calculateLegendBounds=function(e){this.legendSeries=[];var t,i,r=e.legendSettings,o=r.height,n=r.width,a=r.itemPadding>0?r.itemPadding:0,s=r.position.toLowerCase(),l=r.title.textStyle,h=0,c=0,d=0,p=e.availableSize.width-(4*e.elementSpacing-2*r.border.width+2*e.border.width),u=r.rowCount,g=r.columnCount,y=ft(e.legendSettings.title.text,l),m=0,v=0,f=0,b=0,x=0,w=e.series.length;if(e.legendSettings.visible&&0!==w){"bottom"===s||"top"===s||"custom"===s?(u&&g&&u<=g?u=w/g:null==u&&null!=g?u=w/g:null==u&&null==g&&(u=1),u&&(t=Math.ceil(w/u))):(u&&g&&u<=g?g=w/u:null!=u&&null==g?g=w/u:null==u&&null==g&&(g=1),g&&(t=g));for(var S=0;S<w;S++){this.legendSeries.push({text:e.series[S].name?e.series[S].name:"series"+S,seriesIndex:S,shape:e.legendSettings.shape,fill:e.series[S].fill||e.seriesColors[S%e.seriesColors.length],bounds:null});var C=this._getLegendSize(e,this.legendSeries[S]);h=Math.max(C.width,h),c=Math.max(C.height,c),this.legendSeries[S].bounds={width:h,height:c},x+=1,f=f+h+a,b=Math.max(c,b),"top"!==s&&"bottom"!==s&&"custom"!==s||f>p&&(f-=C.width+a,m=Math.max(m,f),f=C.width+a,v=v+b+a),x!==t&&S!==w-1||(m=Math.max(m,f),d=v=v+b+a,x=0,b=0,f=0)}i={x:0,y:0,width:y.width>m-a?y.width+20+a:m+20-2*e.border.width,height:d+e.elementSpacing}}this.legendActualBounds=i,null!=n&&(this.legendActualBounds.width=n),null!=o&&(this.legendActualBounds.height=o)},e.prototype._getLegendSize=function(e,t){var i=e.legendSettings,r=i.itemStyle.width,o=i.itemStyle.height,n=ft(t.text,i.textStyle);return{width:r+n.width+i.shapePadding,height:Math.max(o,n.height)}},e.prototype._drawLegend=function(e){var t,i,r=e.legendSettings,o=r.position.toLowerCase(),n=r.alignment,a=this.legendActualBounds,s=0,l=e.title.font?e.title.font:e.title.textStyle,h=ft(e.title.text,l).height,c=ft(e.title.subtitle.text,e.title.subtitle.textStyle).height,d=e.elementSpacing,p=h+c+d+e.margin.top,u=r.itemPadding>0?r.itemPadding:0,g=e.availableSize.width,y=e.availableSize.height,m=r.border.width,v=0,f=ft(r.title.text,r.title.textStyle).height,b=e.border.width,x=g-2*b,w=y-2*b;if(a.height+=f,"custom"!==o){switch(o){case"bottom":a.y=w-(a.height+m+d);break;case"top":a.y=b+p;break;case"right":a.x=x-a.width-2*d;break;case"left":a.x=b+2*d}if("left"===o||"right"===o)switch(n){case"Center":a.y=w/2-(a.height+2*m)/2+d/2;break;case"Near":a.y=b+2*d+p;break;case"Far":a.y=w-(a.height+m)-2*d}else switch(n){case"Center":a.x=x/2-(a.width+2*m)/2+d/2;break;case"Near":a.x=b+2*d;break;case"Far":a.x=x-(a.width+m)-2*d}}else a.y=r.location.y<w?r.location.y:0,a.x=r.location.x<x?r.location.x:0;if("bottom"===o||"top"===o)for(var S=0;S<this.legendSeries.length;S++)if((v+=this.legendSeries[S].bounds.width+u)>x){a.x=x/2-(a.width+2*m)/2+d/2;break}var C=e.renderer.createGroup({id:e.element.id+"_legend_group"});e.svgObject.appendChild(C),this.legendItemGroup=e.renderer.createGroup({id:e.element.id+"legendItem_Group"});var P=t=d,L=i=d;""!==r.title.text&&r.title.visible&&(C.appendChild(this.drawLegendTitle(e,r,a,C)),L=i=d+f);for(var R=0;R<this.legendSeries.length;R++)!(r.rowCount<r.columnCount||r.rowCount===r.columnCount)||"top"!==o&&"bottom"!==o&&"custom"!==o?(L+this.legendSeries[R].bounds.height+u+f+b>a.height+i&&(L=i,P+=s+u),this.legendGroup=this.drawLegendItem(e,r,this.legendSeries[R],R,P,L,a),C.appendChild(this.legendGroup),L+=this.legendSeries[R].bounds.height+u,s=Math.max(s,this.legendSeries[R].bounds.width)):(P+this.legendSeries[R].bounds.width>a.width+t&&(P=d,L+=this.legendSeries[R].bounds.height+u),this.legendGroup=this.drawLegendItem(e,r,this.legendSeries[R],R,P,L,a),C.appendChild(this.legendGroup),P+=this.legendSeries[R].bounds.width+u);C.setAttribute("transform","translate("+a.x.toString()+","+a.y.toString()+")"),this.drawLegendBorder(C,e,r,a)},e.prototype.drawLegendBorder=function(e,t,i,r){var o=new qs(t.element.id+"_svg_legendRect","none",i.border,1,new ks(0,0,r.width,r.height));e.appendChild(t.renderer.drawRectangle(o))},e.prototype.drawLegendTitle=function(e,t,i,r){var o=e.elementSpacing,n=ft(t.title.text,t.title.textStyle),a=n.width,s=n.height,l=t.title.textAlignment,h=0,c=i.width,d=o+s/2;switch(l){case"Far":h=c-a-h;break;case"Center":h=c/2-a/2}h<0&&(h=0,c=a),c<a+h&&(c=a+h);var p=Ct(new $s(e.element.id+"_LegendTitleText",h,d,"start",t.title.text),t.title.textStyle,e.themeStyle.legendLabel,r);return p.setAttribute("aria-label",t.title.description||t.title.text),p},e.prototype.drawLegendItem=function(e,t,i,r,o,n,a){var s,l,h=this,c=t.itemStyle;t.itemPadding;Math.sqrt(c.width*c.width+c.height*c.height),l=ft(i.text,t.textStyle).height,s={x:o+c.width/2,y:n+(l>c.height?l:c.height)/2};var d=e.renderer.createGroup({id:e.element.id+"_svg_Legend"+r.toString()});d.style.cursor=t.toggleVisibility?"pointer":"default";var p={text:i.text,fill:i.fill,shape:i.shape,name:"legendRender",cancel:!1},u=function(o){if(!o.cancel){var n=h.drawLegendShape(e,i,s.x,s.y,r,t,o);d.appendChild(n);var a=new $s(e.element.id+"_LegendItemText"+r.toString(),s.x+c.width/2+t.shapePadding,s.y+l/4,"start",o.text);t.textStyle.fontFamily=e.themeStyle.fontFamily||t.textStyle.fontFamily,t.textStyle.size=e.themeStyle.fontSize||t.textStyle.size;var p=Ct(a,t.textStyle,e.themeStyle.legendLabel,d);p.setAttribute("aria-label",t.description||"Click to show or hide the "+a.text+" series"),d.appendChild(p),h.legendItemGroup.appendChild(d)}};return u.bind(this),e.trigger("legendRender",p,u),this.legendItemGroup},e.prototype.drawLegendShape=function(e,t,i,r,o,n,a){var s,l,h,c,d=n.itemStyle,p=d.width,u=d.height,g=i+-p/2,y={color:d.border.color,width:d.border.width},m="visible"===e.series[o].visibility?a.fill:"grey",v=a.shape.toLowerCase(),f=Math.sqrt(u*u+p*p)/2;switch(v){case"circle":l=new Qs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y,1,i,r,f,null),s=e.renderer.drawCircle(l);break;case"rectangle":c="M "+g+" "+(r+-u/2)+" L "+(p/2+i)+" "+(r+-u/2)+" L "+(i+p/2)+" "+(r+u/2)+" L "+g+" "+(r+u/2)+" L "+g+" "+(r+-u/2)+" z",h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h);break;case"diamond":c="M "+g+" "+r+" L "+i+" "+(r+-u/2)+" L "+(p/2+i)+" "+r+" L "+i+" "+(r+u/2)+" L "+g+" "+r+" z",h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h);break;case"pentagon":for(var b=0;b<=5;b++){var x=f*Math.cos(Math.PI/180*(72*b)),w=f*Math.sin(Math.PI/180*(72*b));c=0===b?"M "+(x+i)+" "+(r+w)+" ":c.concat("L "+(i+x)+" "+(r+w)+" ")}c=c.concat("Z"),h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h);break;case"triangle":c="M "+g+" "+(u/2+r)+" L "+i+" "+(r+-u/2)+" L "+(i+p/2)+" "+(r+u/2)+" L "+g+" "+(r+u/2)+" Z",h=new Zs(e.element.id+"_svg_LegendItemShape"+o.toString(),m,y.width,y.color,1,"",c),s=e.renderer.drawPath(h)}return s},e.prototype.getModuleName=function(){return"SmithchartLegend"},e.prototype.destroy=function(e){},e}(),Bl=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Nl=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},Fl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property("")],i.prototype,"color",void 0),Nl([t.Property(0)],i.prototype,"width",void 0),i}(t.ChildProperty),Vl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(null)],i.prototype,"size",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property("Roboto, Segoe UI, Noto, Sans-serif")],i.prototype,"fontFamily",void 0),Nl([t.Property(null)],i.prototype,"fontWeight",void 0),Nl([t.Property(null)],i.prototype,"fontStyle",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),jl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(!1)],i.prototype,"visible",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Hl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(!1)],i.prototype,"visible",void 0),Nl([t.Property("")],i.prototype,"fill",void 0),Nl([t.Property("")],i.prototype,"template",void 0),Nl([t.Property("")],i.prototype,"format",void 0),Nl([t.Complex({color:"#cccccc",width:.5},Fl)],i.prototype,"border",void 0),Nl([t.Complex({size:"13px",fontWeight:"Normal",fontStyle:"Normal",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},Vl)],i.prototype,"textStyle",void 0),Nl([t.Complex({},jl)],i.prototype,"trackLineSettings",void 0),i}(t.ChildProperty),Xl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property("transparent")],i.prototype,"background",void 0),Nl([t.Complex({},Fl)],i.prototype,"border",void 0),i}(t.ChildProperty),Yl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(!1)],i.prototype,"visible",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property("")],i.prototype,"dashArray",void 0),Nl([t.Property(1)],i.prototype,"width",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Gl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(null)],i.prototype,"startRange",void 0),Nl([t.Property(null)],i.prototype,"endRange",void 0),Nl([t.Property(null)],i.prototype,"color",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),Wl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(null)],i.prototype,"minX",void 0),Nl([t.Property(null)],i.prototype,"maxX",void 0),Nl([t.Property(null)],i.prototype,"minY",void 0),Nl([t.Property(null)],i.prototype,"maxY",void 0),Nl([t.Property(0)],i.prototype,"value",void 0),Nl([t.Complex({},Yl)],i.prototype,"lineSettings",void 0),i}(t.ChildProperty),Ul=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(5)],i.prototype,"left",void 0),Nl([t.Property(5)],i.prototype,"right",void 0),Nl([t.Property(5)],i.prototype,"bottom",void 0),Nl([t.Property(5)],i.prototype,"top",void 0),i}(t.ChildProperty),Zl=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property([])],i.prototype,"visible",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),Nl([t.Property(5)],i.prototype,"size",void 0),Nl([t.Property("#00bdae")],i.prototype,"fill",void 0),Nl([t.Complex({width:1},Fl)],i.prototype,"border",void 0),i}(t.ChildProperty),ql=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property(0)],i.prototype,"x",void 0),Nl([t.Property(0)],i.prototype,"y",void 0),i}(t.ChildProperty),Ql=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return Bl(i,e),Nl([t.Property([])],i.prototype,"visible",void 0),Nl([t.Property(1)],i.prototype,"opacity",void 0),Nl([t.Property("transparent")],i.prototype,"fill",void 0),Nl([t.Property("")],i.prototype,"format",void 0),Nl([t.Complex({color:"transparent",width:0},Fl)],i.prototype,"border",void 0),Nl([t.Complex({size:"14px",fontWeight:"Medium",fontStyle:"Medium",fontFamily:"Roboto, Segoe UI, Noto, Sans-serif"},Vl)],i.prototype,"textStyle",void 0),Nl([t.Complex({},ql)],i.prototype,"offset",void 0),Nl([t.Property("None")],i.prototype,"edgeLabelMode",void 0),i}(t.ChildProperty),$l=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jl=function(){function e(e,t){this.width=e,this.height=t}return e}(),Kl=function(){function e(e,t,i,r){this.x=e,this.y=t,this.width=i,this.height=r}return e}(),eh=function(){function e(e,t,i,r,o,n,a){this.id=e,this.fill=t,this.opacity=o,this["stroke-width"]=i,this.stroke=r,this.d=a,this["stroke-dasharray"]=n}return e}(),th=function(e){function t(t,i,r,o,n,a,s,l,h){void 0===a&&(a=0),void 0===s&&(s=0),void 0===l&&(l=0),void 0===h&&(h=0);var c=e.call(this,t,i,r.width,r.color,o)||this;return c.rect=n,c.topLeft=a,c.topRight=s,c.bottomLeft=l,c.bottomRight=h,c}return $l(t,e),t}(eh),ih=function(e){function t(t,i,r,o,n,a,s,l){var h=e.call(this,t,i,r.width,r.color,o)||this;return h.cy=a,h.cx=n,h.r=s,h["stroke-dasharray"]=l,h}return $l(t,e),t}(eh),rh=function(){function e(e,t,i,r,o,n,a){void 0===a&&(a=""),this.transform="",this.baseLine="auto",this.id=e,this.x=t,this.y=i,this.anchor=r,this.text=o,this.transform=a,this.baseLine=n}return e}(),oh=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(i[r[o]]=e[r[o]]);return i},nh=function(){function e(e){this.sparkline=e}return e.prototype.processData=function(){var e=this.sparkline.dataSource;!t.isNullOrUndefined(e)&&e.length&&(isNaN(this.sparkline.dataSource[0])&&"Numeric"!==this.sparkline.valueType?this["process"+this.sparkline.valueType]():(e=this.sparkline.enableRtl?e.reverse():e,this.sparkline.sparklineData=e),this.axisCalculation())},e.prototype.processDataManager=function(){var e,t,i=this;this.sparkline.dataSource instanceof r.DataManager?(e=this.sparkline.dataSource,t=this.sparkline.query instanceof r.Query?this.sparkline.query:new r.Query,e.executeQuery(t).then(function(e){i.sparkline.setProperties({dataSource:e.result},!0),i.sparkline.sparklineData=i.sparkline.dataSource,i.sparkline.processSparklineData()})):this.sparkline.processSparklineData()},e.prototype.processCategory=function(e,t,i){var r=this;void 0===e&&(e=this.sparkline.dataSource),void 0===t&&(t=this.sparkline.xName),void 0===i&&(i=this.sparkline.yName);var o=[],n=[];e.forEach(function(e){-1===n.indexOf(e[t])&&n.push(e[t]);var a={};a[r.sparkline.xName]=n.indexOf(e[t]),a[r.sparkline.yName]=e[i],o.push(a)}),this.sparkline.sparklineData=o},e.prototype.processDateTime=function(e,t,i){void 0===e&&(e=this.sparkline.dataSource),void 0===t&&(t=this.sparkline.xName),void 0===i&&(i=this.sparkline.yName);var r=[];e.forEach(function(e){var o={};o[t]=e[t].getTime(),o[i]=e[i],r.push(o)}),this.sparkline.sparklineData=r},e.prototype.renderSeries=function(){var e=this,t=this.sparkline;this.clipId=t.element.id+"_sparkline_clip_path",this.drawAxis();var i={name:"seriesRendering",cancel:!1,lineWidth:t.lineWidth,border:t.border,fill:t.fill,sparkline:this.sparkline.isBlazor?null:t},r=function(i){if(e.visiblePoints&&!i.cancel){if("Pie"!==t.type&&"WinLoss"!==t.type&&t.rangeBandSettings.length){for(var r=e.sparkline.renderer.createGroup({id:e.sparkline.element.id+"_sparkline_rangeband_g"}),o=0;o<t.rangeBandSettings.length;o++)(t.axisSettings.minY<=t.rangeBandSettings[o].startRange||t.axisSettings.maxY>=t.rangeBandSettings[o].endRange)&&e.rangeBand(t.rangeBandSettings[o],r,o);e.sparkline.svgObject.appendChild(r)}e["render"+t.type](e.visiblePoints,i),e.renderMarker(e.visiblePoints),e.renderLabel(e.visiblePoints)}};r.bind(this),t.trigger("seriesRendering",i,r)},e.prototype.rangeBand=function(e,t,i){var r=this.sparkline,o=r.availableSize.height-2*r.padding.top,n=r.availableSize.width-2*r.padding.left,a=e.startRange,s=e.endRange,l=o-o/this.unitY*(a-this.min)+r.padding.top,h=o-o/this.unitY*(s-this.min)+r.padding.top,c=e.color||this.sparkline.sparkTheme.rangeBandColor;h>o+r.padding.top?h=o+r.padding.top:h<0+r.padding.top&&(h=0+r.padding.top),l>o+r.padding.top?l=o+r.padding.top:l<0+r.padding.top&&(l=0+r.padding.top);var d="M "+r.padding.left+" "+l+" L "+(n+r.padding.left)+" "+l+" L "+(n+r.padding.left)+" "+h+" L "+r.padding.left+" "+h+" Z ",p={id:r.element.id+"_rangeBand_"+i,fill:c,opacity:e.opacity,stroke:"transparent","stroke-width":r.lineWidth,d:d,"stroke-dasharray":""};zt(this.sparkline,p,t)},e.prototype.renderLine=function(e,t){var i=this.sparkline,r=this.sparkline.renderer.createGroup({id:i.element.id+"_sparkline_g","clip-path":"url(#"+this.clipId+")"}),o=this.sparkline.fill;o="#00bdae"===this.sparkline.fill&&"Bootstrap4"===this.sparkline.theme?this.sparkline.sparkTheme.axisLineColor:o;for(var n=new eh(i.element.id+"_sparkline_line","transparent",t.lineWidth,o,i.opacity),a="",s=0,l=e.length;s<l;s++)0===s&&(a="M "+e[0].x+" "+e[s].y+" "),a+="L "+e[s].x+" "+e[s].y+" ";n.d=a,zt(this.sparkline,n,r),this.sparkline.svgObject.appendChild(r)},e.prototype.renderPie=function(e,i){var r,o,n,a,s=this.sparkline,l=s.availableSize.height-(s.padding.top+s.padding.bottom),h=s.availableSize.width-(s.padding.left+s.padding.right),c=l<=h?l/2:h/2,d=s.availableSize.width/2,p=s.availableSize.height/2,u=0,g=i.border.color,y=s.opacity,m=i.border.width,v=s.palette.length?s.palette:["#00bdae","#404041","#357cd2","#e56590","#f8b883","#70ad47","#dd8abd","#7f84e8","#7bb4eb","#ea7a57"],f=this.sparkline.renderer.createGroup({id:s.element.id+"_sparkline_g"}),b=t.extend([],[],e);if(s.highPointColor||s.lowPointColor){var x=b.map(function(e){return e.yVal});n=Math.min.apply(null,x),a=Math.max.apply(null,x)}this.negativePointIndexes=[];for(var w=0,S=90,C=void 0,P=void 0;w<e.length;w++){C=(S+=u)+(u=e[w].degree),r=(S-90)*Math.PI/180,o=(C-90)*Math.PI/180,e[w].stAng=r,e[w].endAng=o,P=u<180?"0":"1";var L=e[w].coordinates={sX:d+c*Math.cos(r),sY:p+c*Math.sin(r),eX:d+c*Math.cos(o),eY:p+c*Math.sin(o)},R="M "+d+" "+p+" L "+L.eX+" "+L.eY+" A "+c+" "+c+" 0 "+P+",0 "+L.sX+" "+L.sY+" Z",M={id:s.element.id+"_sparkline_pie_"+w,opacity:y,fill:v[w%v.length],stroke:g,"stroke-width":m,d:R,"stroke-dasharray":""};this.getPieSpecialPoint(e[w],s,M,w,a,n,e.length);var A=this.triggerPointRender("pointRendering",w,M.fill,{color:g,width:m});M.fill=A.fill,M.stroke=A.border.color,M["stroke-width"]=A.border.width,A.cancel||zt(this.sparkline,M,f).setAttribute("aria-label",s.dataSource[w][s.xName]+" : "+e[w].yVal);var T=o-r,k={x:d+c/2*Math.cos(r+T/2),y:p+c/2*Math.sin(r+T/2)};e[w].location.x=k.x,e[w].location.y=k.y}this.sparkline.svgObject.appendChild(f)},e.prototype.getPieSpecialPoint=function(e,t,i,r,o,n,a){e.yVal<0&&t.negativePointColor&&(i.fill=t.negativePointColor,this.negativePointIndexes.push(r)),0===r&&t.startPointColor?(i.fill=t.startPointColor,this.startPointIndex=r):r===a-1&&t.endPointColor&&(i.fill=t.endPointColor,this.endPointIndex=r),e.yVal===o&&t.highPointColor?(i.fill=t.highPointColor,this.highPointIndex=r):e.yVal===n&&t.lowPointColor&&(i.fill=t.lowPointColor,this.lowPointIndex=r)},e.prototype.renderArea=function(e,t){for(var i=this.sparkline,r=this.sparkline.renderer.createGroup({id:i.element.id+"_sparkline_g","clip-path":"url(#"+this.clipId+")"}),o=new eh(i.element.id+"_sparkline_area",t.fill,0,"transparent",i.opacity),n="",a="",s=0,l=e.length;s<l;s++)0!==s?a+="L "+e[s].x+" "+e[s].y+" ":(n="M "+e[s].x+" "+this.axisHeight+" ",a="M "+e[s].x+" "+e[s].y+" "),n+="L "+e[s].x+" "+e[s].y+" ",s===l-1&&(n+="L "+e[s].x+" "+this.axisHeight+" Z");o.d=n,zt(this.sparkline,o,r),o=new eh(i.element.id+"_sparkline_area_str","transparent",t.border.width,t.border.color,i.opacity,"",a),zt(this.sparkline,o,r),this.sparkline.svgObject.appendChild(r)},e.prototype.renderColumn=function(e,i){var r,o,n=this,a=this.sparkline,s=t.extend([],[],e),l=this.sparkline.renderer.createGroup({id:a.element.id+"_sparkline_g","clip-path":"url(#"+this.clipId+")"});if(this.sparkline.highPointColor||this.sparkline.lowPointColor){var h=s.map(function(e){return e.markerPosition});o=Math.min.apply(null,h),r=Math.max.apply(null,h)}var c,d=a.element.id+"_sparkline_column_",p=new th(d,"",i.border,a.opacity,null),u=a.palette.length,g=e.length;this.negativePointIndexes=[];for(var y=this,m=0;m<g;m++)!function(t){c=e[t],p.id=d+t,p.fill=u?a.palette[t%u]:i.fill,p.rect=new Kl(c.x,c.y,c.width,c.height),y.getSpecialPoint(!0,c,a,p,t,o,r,g),c.location.y=c.markerPosition<=y.axisHeight?c.y:c.y+c.height,c.location.x=c.x+c.width/2,p.stroke=i.border.color?i.border.color:p.fill;var s={name:"pointRendering",cancel:!1,pointIndex:t,fill:p.fill,border:{color:p.stroke,width:i.border.width}};if(y.sparkline.isBlazor){var h=oh(s,[]);s=h}y.sparkline.trigger("pointRendering",s,function(){if(c=e[t],p.id=d+t,p.rect=new Kl(c.x,c.y,c.width,c.height),n.getSpecialPoint(!0,c,a,p,t,o,r,g),p.fill=s.fill,p.stroke=s.border.color,c.location.y=c.markerPosition<=n.axisHeight?c.y:c.y+c.height,p["stroke-width"]=s.border.width,c.location.x=c.x+c.width/2,!s.cancel){var i=Et(a,p,l);i.setAttribute("aria-label",a.dataSource[t][a.xName]+" : "+e[t].yVal),l.appendChild(i)}})}(m);this.sparkline.svgObject.appendChild(l)},e.prototype.renderWinLoss=function(e,t){for(var i,r=this.sparkline,o=this.sparkline.renderer.createGroup({id:r.element.id+"_sparkline_g","clip-path":"url(#"+this.clipId+")"}),n=r.element.id+"_sparkline_winloss_",a=new th(n,"",t.border,r.opacity,null),s=e.length,l=r.palette.length,h=0;h<s;h++){i=e[h],a.id=n+h,a.fill=l?r.palette[h%l]:i.yVal===this.axisValue?this.sparkline.tiePointColor||"#a216f3":i.yVal>this.axisValue?t.fill:r.negativePointColor||"#e20f07",a.stroke=t.border.color?t.border.color:a.fill,a.rect=new Kl(i.x,i.y,i.width,i.height),i.location.x=i.x+i.width/2,i.location.y=i.yVal>=this.axisValue?i.y:i.y+i.height;var c=this.triggerPointRender("pointRendering",h,a.fill,{color:a.stroke,width:t.border.width});a.fill=c.fill,a.stroke=c.border.color,a["stroke-width"]=c.border.width,c.cancel||Et(r,a,o).setAttribute("aria-label",r.dataSource[h][r.xName]+" : "+e[h].yVal)}this.sparkline.svgObject.appendChild(o)},e.prototype.renderMarker=function(e){var i=this.sparkline,r=i.markerSettings;if("Pie"!==i.type&&"WinLoss"!==i.type&&r.visible.length){var o,n,a,s=t.extend([],[],e),l=this.sparkline.renderer.createGroup({id:i.element.id+"_sparkline_marker_g","clip-path":"url(#"+this.clipId+")"}),h=i.element.id+"_sparkline_marker_",c=new ih("",r.fill,r.border,r.opacity,0,0,r.size/2,""),d=r.visible.join();if(d.toLowerCase().indexOf("high")>-1||d.toLowerCase().indexOf("low")>-1){var p=s.map(function(e){return e.markerPosition});n=Math.min.apply(null,p),a=Math.max.apply(null,p)}this.negativePointIndexes=[];for(var u=this,g=0,y=e.length;g<y;g++)!function(t,s){o=e[t],c.id=h+t,c.cx=o.location.x,c.cy=o.location.y,c.fill=r.fill;var p=d.toLowerCase().indexOf("all")>-1;p=u.getSpecialPoint(p,o,i,c,t,n,a,s,d.toLowerCase()),c.stroke=r.border.color||c.fill;var g={name:"markerRendering",cancel:!1,border:{color:c.stroke,width:r.border.width},fill:c.fill,pointIndex:t,sparkline:u.sparkline.isBlazor?null:u.sparkline,x:c.cx,y:c.cy,size:r.size};if(u.sparkline.isBlazor){var y=oh(g,[]);g=y}u.sparkline.trigger("markerRendering",g,function(){if(p&&!g.cancel){c.id=h+t,c.cx=g.x,c.cy=g.y,c.fill=g.fill,c.stroke=g.border.color,c["stroke-width"]=g.border.width,c.r=g.size/2;var r=_t(i,c,l);r.setAttribute("aria-label",i.dataSource[t][i.xName]+" : "+e[t].yVal),l.appendChild(r)}})}(g,y);this.sparkline.svgObject.appendChild(l)}},e.prototype.getSpecialPoint=function(e,t,i,r,o,n,a,s,l){return void 0===l&&(l=""),t.markerPosition>this.axisHeight&&(r.fill=i.negativePointColor||r.fill,this.negativePointIndexes.push(o),e=e||l.indexOf("negative")>-1),0===o?(r.fill=i.startPointColor||r.fill,this.startPointIndex=o,e=e||l.indexOf("start")>-1):o===s-1&&(r.fill=i.endPointColor||r.fill,this.endPointIndex=o,e=e||l.indexOf("end")>-1),t.markerPosition===n?(r.fill=i.highPointColor||r.fill,this.highPointIndex=o,e=e||l.indexOf("high")>-1):t.markerPosition===a&&(r.fill=i.lowPointColor||r.fill,this.lowPointIndex=o,e=e||l.indexOf("low")>-1),l.indexOf("none")>-1&&(e=!1),e},e.prototype.renderLabel=function(e){var i=this,r=this.sparkline,o=r.dataLabelSettings,n=o.textStyle.color||r.sparkTheme.dataLabelColor;if("WinLoss"!==r.type&&o.visible.length){var a,s,l,h=t.extend([],[],e),c=r.element.id+"_sparkline_label_",d=this.sparkline.renderer.createGroup({id:r.element.id+"_sparkline_label_g",style:"pointer-events: none;"}),p=c+"text_",u=c+"rect_",g=new rh("",0,0,"middle","","middle"),y=o.textStyle,m=h.map(function(e){return e.markerPosition}),v=Math.min.apply(null,m),f=Math.max.apply(null,m),b="transparent"!==o.fill||o.border.width?2:0,x=It("sparkline_measure_text",y),w=new th("",o.fill,o.border,o.opacity,null);y.fontFamily=r.sparkTheme.labelFontFamily||y.fontFamily;for(var S=this,C=0,P=e.length;C<P;C++)!function(t,h){s=e[t],g.id=p+t,g.x=s.location.x+o.offset.x,g.y=("Pie"===r.type?s.location.y:s.markerPosition>S.axisHeight?s.location.y+x.height/2+1+2+b:s.location.y-x.height/2-1-b)+o.offset.y,g.text=""!==o.format?S.formatter(o.format,S.sparkline.dataSource[t]):s.yVal.toString();var m={name:"dataLabelRendering",cancel:!1,border:o.border,fill:o.fill,pointIndex:t,sparkline:S.sparkline.isBlazor?null:S.sparkline,x:g.x,y:g.y,text:g.text,color:n};if(S.sparkline.isBlazor){var C=oh(m,[]);m=C}S.sparkline.trigger("dataLabelRendering",m,function(){x=It(m.text,y),g.text=m.text;var e=o.visible.join().toLowerCase().indexOf("all")>-1;e=i.getLabelVisible(e,s,t,o,h,v,f),l=i.arrangeLabelPosition(o.edgeLabelMode,e,m.x,t,h,x,b),e&&!m.cancel&&l.render&&(w.id=u+t,w.fill=m.fill,w.stroke=m.border.color,w["stroke-width"]=m.border.width,g.y=m.y,g.x=l.x,w.rect=new Kl(g.x-(x.width/2+b),g.y-b-x.height/1.75,x.width+2*b,x.height+2*b),a=i.sparkline.renderer.createGroup({id:c+"g"+t}),Et(r,w,a),Dt(g,y,m.color,a),d.appendChild(a))})}(C,P);this.sparkline.svgObject.appendChild(d)}},e.prototype.arrangeLabelPosition=function(e,t,i,r,o,n,a){return"None"===e?{x:i,render:t}:(0===r&&i-n.width/2-a<=0?"Hide"===e?t=!1:i=this.sparkline.padding.left+a+n.width/2:r===o-1&&i+n.width/2+a>=this.sparkline.availableSize.width&&("Hide"===e?t=!1:i-=n.width/2+a),{x:i,render:t})},e.prototype.getLabelVisible=function(e,t,i,r,o,n,a){var s=r.visible.join().toLowerCase();return t.markerPosition>this.axisHeight&&(e=e||s.indexOf("negative")>-1),0===i?e=e||s.indexOf("start")>-1:i===o-1&&(e=e||s.indexOf("end")>-1),t.markerPosition===n?e=e||s.indexOf("high")>-1:t.markerPosition===a&&(e=e||s.indexOf("low")>-1),r.visible.join().toLowerCase().indexOf("none")>-1&&(e=!1),e},e.prototype.formatter=function(e,i){if(t.isNullOrUndefined(e))return null;for(var r=0,o=Object.keys(i);r<o.length;r++){var n=o[r];e=e.split("${"+n+"}").join(i[n])}return e},e.prototype.axisCalculation=function(){this.findRanges(this.sparkline.sparklineData)},e.prototype.getInterval=function(e,i){var r=1,o=e[0][i],n=t.isNullOrUndefined(e[1])?void 0:e[1][i];if(!t.isNullOrUndefined(o)&&!t.isNullOrUndefined(n)){var a=[];t.extend([],e).forEach(function(e){t.isNullOrUndefined(e[i])||a.push(e)}),a.sort(function(e,r){return t.isNullOrUndefined(e[i])||t.isNullOrUndefined(r[i])?0:e[i]-r[i]}),r=(a=this.sparkline.enableRtl?a.reverse():a)[1][i]-a[0][i]}return r},e.prototype.getPaddingInterval=function(e,t,i,r){for(var o=this.sparkline.availableSize.height,n=1*e.length,a=r/(n=Math.max(o*(n/100),1)),s=0,l=this.sparkline.intervalDivs;s<l.length;s++){var h=1*l[s];if(n<r/h)break;a=h}return a},e.prototype.findRanges=function(e){var i,r,o,n,a,s=this.sparkline,l=e.length,h=0,c=Array.isArray(e)&&"object"!=typeof e[0];if(c)if("Pie"===s.type)for(_=0;_<l;_++)h+=Math.abs(e[_]);else i=Math.max.apply(null,e),r=Math.min.apply(null,e),o=0,n=l-1;else if("Pie"===s.type)for(_=0;_<l;_++)h+=Math.abs(e[_][s.yName]);else{if(t.isNullOrUndefined(e[0][s.xName])){var d=e.map(function(e){return e[s.yName]});i=Math.max.apply(null,d),r=Math.min.apply(null,d)}else i=(a=(a=t.extend([],e)).sort(function(e,t){return e[s.yName]-t[s.yName]}))[a.length-1][s.yName],r=a[0][s.yName];t.isNullOrUndefined(e[0][s.xName])?(o=0,n=l-1):(a=a.sort(function(e,t){return e[s.xName]-t[s.xName]}),n=(a=this.sparkline.enableRtl?a.reverse():a)[a.length-1][s.xName],o=a[0][s.xName])}var p,u,g,y,m,v=0,f=s.padding,b=s.axisSettings,x=b.value;if("Pie"!==s.type){this.maxLength=l,u=s.availableSize.height-(f.bottom+f.top),g=s.availableSize.width-(f.left+f.right),n=t.isNullOrUndefined(b.maxX)?n:b.maxX,o=t.isNullOrUndefined(b.minX)?o:b.minX,i=t.isNullOrUndefined(b.maxY)?i:b.maxY,r=t.isNullOrUndefined(b.minY)?r:b.minY;var w=b.lineSettings.color||this.sparkline.sparkTheme.axisLineColor,S={name:"axisRendering",cancel:!1,sparkline:this.sparkline.isBlazor?null:s,maxX:n,minX:o,maxY:i,minY:r,value:b.value,lineColor:w,lineWidth:b.lineSettings.width};if(s.trigger("axisRendering",S),S.cancel)return void(this.visiblePoints=[]);n=S.maxX,o=S.minX,i=S.maxY,r=S.minY,x=this.axisValue=S.value,this.axisColor=S.lineColor,this.axisWidth=S.lineWidth}var C=n-o,P=i-r;C=0===C?1:C,P=0===P?1:P,this.unitX=C,this.unitY=P,this.min=r,v=0,y=u-u/P*-r,y=r<0&&i<=0?0:r<0&&i>0?y:u,x>=r&&x<=i&&(y=u-Math.round(u*((x-r)/this.unitY))),this.axisHeight=y+f.top;for(var L,R,M=[],A=i-r,T=this.getInterval(e,s.xName),k=this.getPaddingInterval(e,s.xName,s.valueType,A),_=0;_<l;_++)if(t.isNullOrUndefined(e[_][s.xName])&&t.isNullOrUndefined(e[_][s.yName])&&0!==e[_][s.yName]&&c?(L=_,R=e[_]):t.isNullOrUndefined(e[_][s.xName])?(L=_,R=e[_][s.yName]):(L=e[_][s.xName],R=e[_][s.yName]),!t.isNullOrUndefined(L)&&!t.isNullOrUndefined(R)){if("Line"===s.type||"Area"===s.type)p=r!==i&&1!==l?u-Math.round(u*((R-r)/this.unitY)):f.top,m={x:o!==n?Math.round(g*((L-o)/this.unitX)):g/2,y:p,markerPosition:p};else if("Column"===s.type||"WinLoss"===s.type){var O=g/((n-o)/T+1);if(O-=1,v=(L-o)/T*(O+1)+.5,"WinLoss"===s.type){m={x:v,y:p=R>x?u/4:R<x?.5*u:.5*u-u/40,height:R!==x?u/4:u/20,width:O,markerPosition:p>y?y+Math.abs(p-y):p}}else{0===_&&"None"!==s.rangePadding&&(r-="Additional"===s.rangePadding?k+f.top:k,P=(i+="Additional"===s.rangePadding?k+f.top:k)-r,C=0===(C=n-o)?1:C,P=0===P?1:P,this.unitX=C,this.unitY=P,this.min=r);var E=u/this.unitY*(R-r),z=R===r&&R>x?1!==l&&1!==this.unitY?u/this.unitY*(r/2):1|E:R===i&&R<x&&1!==l&&1!==this.unitY?u/this.unitY*(-i/2):E;m={x:v,y:(p=Math.abs(u-z))>y?y:p,height:Math.abs(p-y),width:O,markerPosition:p>y?y+Math.abs(p-y):p}}}else"Pie"===s.type&&(m={percent:Math.abs(R)/h*100,degree:Math.abs(R)/h*360});"Pie"!==s.type&&(m.x+=f.left,m.y+=f.top),"WinLoss"!==s.type&&(m.markerPosition+=f.top),m.location={x:m.x,y:m.y},m.xVal=L,m.yVal=R,M.push(m)}M.sort(function(e,t){return e.x-t.x}),this.visiblePoints=M},e.prototype.drawAxis=function(){var e=this.sparkline,t=this.axisHeight;if("WinLoss"!==e.type&&"Pie"!==e.type&&e.axisSettings.lineSettings.visible){var i={id:e.element.id+"_Sparkline_XAxis",x1:e.padding.left,y1:t,x2:e.availableSize.width-e.padding.right,y2:t,stroke:this.axisColor,opacity:e.axisSettings.lineSettings.opacity,"stroke-dasharray":e.axisSettings.lineSettings.dashArray,"stroke-width":this.axisWidth,"clip-path":"url(#"+this.clipId+")"};e.svgObject.appendChild(e.renderer.drawLine(i))}},e.prototype.triggerPointRender=function(e,t,i,r){var o={name:e,cancel:!1,border:r,fill:i,sparkline:this.sparkline.isBlazor?null:this.sparkline,pointIndex:t};return this.sparkline.trigger(e,o),o},e}(),ah=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 r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sh=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a},lh=function(e){function i(i,r){var o=e.call(this,i,r)||this;return o.isDevice=t.Browser.isDevice,o.intervalDivs=[10,5,2,1],o}return ah(i,e),i.prototype.preRender=function(){this.isBlazor=t.isBlazor(),this.allowServerDataBinding=!1,this.unWireEvents(),this.trigger("load",{sparkline:this.isBlazor?null:this}),this.sparkTheme=Rt(this.theme),this.sparklineRenderer=new nh(this),this.createSVG(),this.wireEvents(),this.setCulture()},i.prototype.render=function(){this.sparklineRenderer.processDataManager(),this.renderComplete(),this.allowServerDataBinding=!0},i.prototype.processSparklineData=function(){this.sparklineRenderer.processData(),this.renderSparkline(),this.element.appendChild(this.svgObject),this.setSecondaryElementPosition(),this.trigger("loaded",{sparkline:this.isBlazor?null:this})},i.prototype.renderSparkline=function(){this.renderBorder(),this.createDiv(),this.sparklineRenderer.renderSeries()},i.prototype.createDiv=function(){var e=document.createElement("div");e.id=this.element.id+"_Secondary_Element",e.setAttribute("style","position: relative"),this.element.appendChild(e),this.element.style.display="block",this.element.style.position="relative"},i.prototype.setSecondaryElementPosition=function(){var e=Nt(this.element.id+"_Secondary_Element");if(e){var t=this.element.getBoundingClientRect(),i=Nt(this.element.id+"_svg").getBoundingClientRect();e.style.left=Math.max(i.left-t.left,0)+"px",e.style.top=Math.max(i.top-t.top,0)+"px"}},i.prototype.renderBorder=function(){var e,t=this.containerArea.border.width;(t>0||"transparent"!==this.containerArea.background)&&(e=new th(this.element.id+"_SparklineBorder",this.sparkTheme.background,this.containerArea.border,1,new Kl(t/2,t/2,this.availableSize.width-t,this.availableSize.height-t)),this.svgObject.appendChild(Et(this,e)));var i=this.padding;this.markerSettings.visible.length&&(i.left=0,i.right=0,i.bottom=0,i.top=0),e=new th(this.element.id+"_sparkline_clip_rect","transparent",{color:"transparent",width:0},1,new Kl(i.left,i.top,this.availableSize.width-(i.left+i.right),this.availableSize.height-(i.top+i.bottom)));var r=this.renderer.createClipPath({id:this.element.id+"_sparkline_clip_path"});Et(this,e,r),this.svgObject.appendChild(r)},i.prototype.createSVG=function(){this.removeSvg(),Tt(this)},i.prototype.removeSvg=function(){if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&t.remove(this.svgObject)}Bt(this.element.id+"_Secondary_Element"),this.sparklineTooltipModule&&this.sparklineTooltipModule.removeTooltipElements()},i.prototype.setCulture=function(){this.intl=new t.Internationalization,this.localeObject=new t.L10n(this.getModuleName(),this.defaultLocalConstants,this.locale)},i.prototype.requiredModules=function(){var e=[];return(this.tooltipSettings.visible||this.tooltipSettings.trackLineSettings.visible)&&e.push({member:"SparklineTooltip",args:[this]}),e},i.prototype.unWireEvents=function(){t.Browser.touchMoveEvent;var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.sparklineMove),t.EventHandler.remove(this.element,e,this.sparklineMouseLeave),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.sparklineMouseEnd),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.sparklineResize)},i.prototype.wireEvents=function(){var e=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.sparklineMove,this),t.EventHandler.add(this.element,"click",this.sparklineClick,this),t.EventHandler.add(this.element,e,this.sparklineMouseLeave,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.sparklineMouseEnd,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.sparklineResize.bind(this)),new t.Touch(this.element)},i.prototype.sparklineResize=function(e){var t=this,i={name:"resize",previousSize:this.availableSize,sparkline:this.isBlazor?null:this,currentSize:new Jl(0,0)};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=+setTimeout(function(){if(t.isDestroyed)return void clearTimeout(t.resizeTo);t.unWireEvents(),t.createSVG(),t.refreshing=!0,t.wireEvents(),i.currentSize=t.availableSize,t.trigger("resize",i),t.render()},500),!1},i.prototype.sparklineMove=function(e){this.setSparklineMouseXY(e),this.notify(t.Browser.touchMoveEvent,e);var i={name:"sparklineMouseMove",cancel:!1,sparkline:this.isBlazor?null:this,event:e};this.trigger(i.name,i);var r=this.isPointRegion(e);if(r.isPointRegion){var o={name:"pointRegionMouseMove",cancel:!1,event:e,sparkline:this.isBlazor?null:this,pointIndex:r.pointIndex};this.trigger(o.name,o)}return!1},i.prototype.sparklineClick=function(e){this.setSparklineMouseXY(e);var t={name:"sparklineMouseClick",cancel:!1,sparkline:this.isBlazor?null:this,event:e};this.trigger(t.name,t);var i=this.isPointRegion(e);if(i.isPointRegion){var r={name:"pointRegionMouseClick",cancel:!1,event:e,sparkline:this.isBlazor?null:this,pointIndex:i.pointIndex};this.trigger(r.name,r)}return!1},i.prototype.isPointRegion=function(e){var i=this,r=this.element.id+"_",o=e.target.id.replace(r,"").split("_");if(o[1]===this.type.toLowerCase()){var n=parseInt(o[2],10);return!t.isNullOrUndefined(n)&&!isNaN(n)||"Line"!==this.type&&"Area"!==this.type||this.sparklineRenderer.visiblePoints.forEach(function(e,t){if(Ft(i.mouseX,i.mouseY,new Kl(e.x-5,e.y-5,10,10)))return void(n=t)}),{isPointRegion:!0,pointIndex:n}}return{isPointRegion:!1,pointIndex:null}},i.prototype.sparklineMouseEnd=function(e){return this.setSparklineMouseXY(e),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.sparklineMouseLeave=function(e){return this.setSparklineMouseXY(e),this.notify(t.Browser.isPointer?"pointerleave":"mouseleave",e),!1},i.prototype.setSparklineMouseXY=function(e){var t,i;if(e.type.indexOf("touch")>-1){this.isTouch=!0;var r=e;i=r.changedTouches[0].clientX,t=r.changedTouches[0].clientY}else this.isTouch="touch"===e.pointerType||"2"===e.pointerType,t=e.clientY,i=e.clientX;var o=this.element.getBoundingClientRect(),n=Nt(this.element.id+"_svg").getBoundingClientRect();this.mouseY=t-o.top-Math.max(n.top-o.top,0),this.mouseX=i-o.left-Math.max(n.left-o.left,0)},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,r=!1,o=0,n=Object.keys(e);o<n.length;o++)switch(n[o]){case"xName":case"yName":case"axisSettings":case"rangeBandSettings":case"type":case"valueType":case"enableRtl":r=!0;break;case"dataSource":if(this.isBlazor){this.sparklineRenderer.processDataManager(),this.createSVG();break}r=!0;break;case"border":case"markerSettings":case"dataLabelSettings":case"tooltipSettings":case"startPointColor":case"highPointColor":case"lowPointColor":case"endPointColor":case"negativePointColor":case"theme":i=!0}r?(this.createSVG(),this.sparklineRenderer.processData(),this.refreshSparkline()):i&&(this.createSVG(),this.refreshSparkline())},i.prototype.refreshSparkline=function(){this.renderSparkline(),this.element.appendChild(this.svgObject),this.setSecondaryElementPosition()},i.prototype.getModuleName=function(){return"sparkline"},i.prototype.destroy=function(){e.prototype.destroy.call(this)},i.prototype.getPersistData=function(){return""},sh([t.Property(null)],i.prototype,"width",void 0),sh([t.Property(null)],i.prototype,"height",void 0),sh([t.Complex({},Fl)],i.prototype,"border",void 0),sh([t.Property("Line")],i.prototype,"type",void 0),sh([t.Property("None")],i.prototype,"rangePadding",void 0),sh([t.Property(null)],i.prototype,"dataSource",void 0),sh([t.Property(null)],i.prototype,"query",void 0),sh([t.Property("Numeric")],i.prototype,"valueType",void 0),sh([t.Property(null)],i.prototype,"xName",void 0),sh([t.Property(null)],i.prototype,"yName",void 0),sh([t.Property("#00bdae")],i.prototype,"fill",void 0),sh([t.Property("")],i.prototype,"highPointColor",void 0),sh([t.Property("")],i.prototype,"lowPointColor",void 0),sh([t.Property("")],i.prototype,"startPointColor",void 0),sh([t.Property("")],i.prototype,"endPointColor",void 0),sh([t.Property("")],i.prototype,"negativePointColor",void 0),sh([t.Property("")],i.prototype,"tiePointColor",void 0),sh([t.Property([])],i.prototype,"palette",void 0),sh([t.Property(1)],i.prototype,"lineWidth",void 0),sh([t.Property(1)],i.prototype,"opacity",void 0),sh([t.Property(null)],i.prototype,"format",void 0),sh([t.Property(!1)],i.prototype,"useGroupingSeparator",void 0),sh([t.Complex({},Hl)],i.prototype,"tooltipSettings",void 0),sh([t.Complex({},Xl)],i.prototype,"containerArea",void 0),sh([t.Collection([],Gl)],i.prototype,"rangeBandSettings",void 0),sh([t.Complex({},Wl)],i.prototype,"axisSettings",void 0),sh([t.Complex({},Zl)],i.prototype,"markerSettings",void 0),sh([t.Complex({},Ql)],i.prototype,"dataLabelSettings",void 0),sh([t.Complex({},Ul)],i.prototype,"padding",void 0),sh([t.Property("Material")],i.prototype,"theme",void 0),sh([t.Event()],i.prototype,"loaded",void 0),sh([t.Event()],i.prototype,"load",void 0),sh([t.Event()],i.prototype,"tooltipInitialize",void 0),sh([t.Event()],i.prototype,"seriesRendering",void 0),sh([t.Event()],i.prototype,"axisRendering",void 0),sh([t.Event()],i.prototype,"pointRendering",void 0),sh([t.Event()],i.prototype,"pointRegionMouseMove",void 0),sh([t.Event()],i.prototype,"pointRegionMouseClick",void 0),sh([t.Event()],i.prototype,"sparklineMouseMove",void 0),sh([t.Event()],i.prototype,"sparklineMouseClick",void 0),sh([t.Event()],i.prototype,"dataLabelRendering",void 0),sh([t.Event()],i.prototype,"markerRendering",void 0),sh([t.Event()],i.prototype,"resize",void 0),i=sh([t.NotifyPropertyChanges],i)}(t.Component),hh=function(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(i[r[o]]=e[r[o]]);return i},ch=function(){function e(e){this.sparkline=e,this.addEventListener()}return e.prototype.addEventListener=function(){this.sparkline.isDestroyed||(this.sparkline.on(t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeaveHandler,this),this.sparkline.on(t.Browser.touchMoveEvent,this.mouseMoveHandler,this),this.sparkline.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.mouseLeaveHandler=function(){this.removeTooltipElements()},e.prototype.mouseUpHandler=function(e){this.sparkline.isTouch&&(this.processTooltip(e),this.fadeOut())},e.prototype.fadeOut=function(){clearTimeout(this.clearTooltip),this.clearTooltip=+setTimeout(this.removeTooltipElements.bind(this),5e3)},e.prototype.removeTooltipElements=function(){this.removeTooltip(),this.removeTracker()},e.prototype.mouseMoveHandler=function(e){this.processTooltip(e)},e.prototype.processTooltip=function(e){var i,r=this.sparkline,o=r.sparklineRenderer.visiblePoints,n=r.mouseX,a=r.mouseY;if("Pie"!==r.type)for(var s=t.extend([],[],o).map(function(e){return e.location.x}),l=1/0,h=0,c=void 0,d=s.length;h<d;h++)l>(c=Math.abs(n-s[h]))&&(l=c,i=h);else{var p=e.target.id;i=parseInt(p.split("_pie_")[1],10)}if(isNaN(i)||!Ft(n,a,new Kl(0,0,r.availableSize.width,r.availableSize.height)))return this.removeTracker(),void this.removeTooltip();this.pointIndex!==i&&(this.pointIndex=i,this.renderTrackerLine(o[i]),this.renderTooltip(o[i]))},e.prototype.renderTrackerLine=function(e){var i=this.sparkline,r=(i.theme.toLowerCase(),i.tooltipSettings.trackLineSettings),o=i.sparkTheme.trackerLineColor?i.sparkTheme.trackerLineColor:r.color;if(r.visible&&"Pie"!==i.type){var n=Nt(i.element.id+"_sparkline_tracker_g");t.isNullOrUndefined(n)&&(n=i.renderer.createGroup({id:i.element.id+"_sparkline_tracker_g"}),i.svgObject.appendChild(n));var a=Nt(i.element.id+"_sparkline_tracker"),s="M "+e.location.x+" "+i.padding.top+" L "+e.location.x+" "+(i.availableSize.height-i.padding.bottom);if(t.isNullOrUndefined(a)){var l=new eh(i.element.id+"_sparkline_tracker","transparent",r.width,o,1);l.d=s,zt(i,l,n)}else a.setAttribute("d",s),a.setAttribute("stroke-width",r.width.toString()),a.setAttribute("stroke",o)}},e.prototype.renderTooltip=function(e){var i=this,r=this.sparkline,o=r.tooltipSettings;if(o.visible){var n=Nt(r.element.id+"_sparkline_tooltip_div");t.isNullOrUndefined(n)&&(n=t.createElement("div",{id:r.element.id+"_sparkline_tooltip_div",styles:"pointer-events: none; position: absolute;z-index:1;"}),Nt(r.element.id+"_Secondary_Element").appendChild(n));var a=e.xVal.toString();"Category"===r.valueType?a=r.dataSource[e.xVal][r.xName]:"DateTime"===r.valueType&&(a=new Date(e.xVal).toDateString());var s=this.getFormat(r.tooltipSettings.format,r,a,this.formatValue(e.yVal,r).toString()),l={x:e.location.x,y:e.location.y};l="Pie"===r.type?{x:e.location.x,y:e.location.y}:l;var h=o.textStyle.color||r.sparkTheme.tooltipFontColor,c=""===o.fill?r.sparkTheme.tooltipFill:o.fill,d={name:"tooltipInitialize",cancel:!1,text:s,textStyle:{size:o.textStyle.size,opacity:r.sparkTheme.tooltipTextOpacity||o.textStyle.opacity,fontWeight:o.textStyle.fontWeight,fontStyle:o.textStyle.fontStyle,fontFamily:r.sparkTheme.fontFamily||o.textStyle.fontFamily,color:h}};if(r.isBlazor){var p=hh(d,[]);d=p}r.trigger("tooltipInitialize",d,function(){i.addTooltip(d,r,c,o,l,n)})}},e.prototype.addTooltip=function(e,r,o,n,a,s,l){var h;if(t.isNullOrUndefined(e))l.cancel,h=l;else{var c=e.cancel;hh(e,["cancel"]);c,h=e}if(!e.cancel){var d=new i.Tooltip({content:h.text,border:n.border,template:n.template,data:r.dataSource[this.pointIndex],fill:o,textStyle:h.textStyle,enableAnimation:!1,location:{x:a.x,y:a.y},shared:!1,availableSize:this.sparkline.availableSize,areaBounds:new Kl(0,0,r.availableSize.width,r.availableSize.height),theme:r.theme,blazorTemplate:{name:"TooltipTemplate",parent:r.tooltipSettings}});d.opacity=r.sparkTheme.tooltipFillOpacity||d.opacity,d.appendTo(s)}},e.prototype.getFormat=function(e,i,r,o){if(t.isNullOrUndefined(e)||""===e)return[o];var n=e;return n=n.split("${"+i.xName+"}").join(r).split("${"+i.yName+"}").join(o),[n]},e.prototype.formatValue=function(e,t){return t.format&&!isNaN(Number(e))?t.intl.getNumberFormat({format:t.format,useGrouping:t.useGroupingSeparator})(e):e},e.prototype.removeTracker=function(){var e=this.sparkline.element.querySelector("#"+this.sparkline.element.id+"_sparkline_tracker_g");return e?t.remove(e):null},e.prototype.removeTooltip=function(){this.pointIndex=null;var e=this.sparkline.element.querySelector("#"+this.sparkline.element.id+"_sparkline_tooltip_div");return e?t.remove(e):null},e.prototype.getModuleName=function(){return"SparklineTooltip"},e.prototype.destroy=function(e){},e}();return Rr.Inject(Vr,bo,Xr,zo,No,Br,Ur,Bn,ho,po,so,fo,go,mo,qr,ro,wo,ko,un,hn,Or,kr,zr,Ln,yn,Sn,fn,An,Lo,Mo,Co,To,no,Kr,to,Ho,Wo,Yo,Zo,sn,Qo,en,Jo,rn,nn,kn,Do,Cn,ln,Dr,zn,On,In,Fn,Vn,bn,wn),ta.Inject(Jn,na,sa,ua,ha,ya,da,va,Vn),Ea.Inject(as,ka,Ur,ho,kr,zr,Vn),lh.Inject(ch),zl.Inject(Dl,Il),ns.Inject(Vr,Xr,zo,No,Br,Ur,un,hn,kr,yn,Sn,fn,An,Lo,Mo,no,Ho,Wo,Yo,Zo,sn,Qo,en,Jo,rn,nn,ln,as,Vn),ws.Inject(Ss,Ps),e.RangeColorSetting=Cr,e.CrosshairSettings=Pr,e.ZoomSettings=Lr,e.Chart=Rr,e.Row=wi,e.Column=Si,e.MajorGridLines=Ci,e.MinorGridLines=Pi,e.AxisLine=Li,e.MajorTickLines=Ri,e.MinorTickLines=Mi,e.CrosshairTooltip=Ai,e.Axis=Ti,e.VisibleLabels=ki,e.Double=ni,e.DateTime=kr,e.Category=Or,e.Logarithmic=zr,e.DateTimeCategory=Dr,e.NiceInterval=Ar,e.StripLine=Br,e.Connector=Ht,e.Font=Xt,e.Border=Yt,e.Offset=Gt,e.ChartArea=Wt,e.Margin=Ut,e.ContainerPadding=Zt,e.Animation=qt,e.Indexes=Qt,e.CornerRadius=$t,e.Index=Jt,e.EmptyPointSettings=Kt,e.DragSettings=ei,e.TooltipSettings=ti,e.Periods=ii,e.PeriodSelectorSettings=ri,e.LineSeries=Vr,e.ColumnSeries=Xr,e.AreaSeries=Ur,e.BarSeries=qr,e.PolarSeries=Kr,e.RadarSeries=to,e.StackingBarSeries=ro,e.CandleSeries=no,e.StackingColumnSeries=so,e.StepLineSeries=ho,e.StepAreaSeries=po,e.StackingAreaSeries=go,e.StackingStepAreaSeries=mo,e.StackingLineSeries=fo,e.ScatterSeries=bo,e.RangeColumnSeries=wo,e.WaterfallSeries=Co,e.HiloSeries=Lo,e.HiloOpenCloseSeries=Mo,e.RangeAreaSeries=To,e.BubbleSeries=ko,e.SplineSeries=zo,e.HistogramSeries=Do,e.SplineAreaSeries=No,e.TechnicalIndicator=br,e.SmaIndicator=Ho,e.EmaIndicator=Yo,e.TmaIndicator=Wo,e.AccumulationDistributionIndicator=Zo,e.AtrIndicator=Qo,e.MomentumIndicator=Jo,e.RsiIndicator=en,e.StochasticIndicator=rn,e.BollingerBands=nn,e.MacdIndicator=sn,e.Trendlines=ln,e.sort=p,e.isBreakLabel=u,e.getVisiblePoints=g,e.rotateTextSize=y,e.removeElement=m,e.logBase=v,e.showTooltip=f,e.inside=b,e.withIn=x,e.logWithIn=w,e.withInRange=S,e.sum=C,e.subArraySum=P,e.subtractThickness=L,e.subtractRect=R,e.degreeToLocation=M,e.degreeToRadian=A,e.getRotatedRectangleCoordinates=T,e.isRotatedRectIntersect=k,e.getAngle=O,e.subArray=E,e.valueToCoefficient=z,e.TransformToVisible=I,e.indexFinder=D,e.CoefficientToVector=B,e.valueToPolarCoefficient=N,e.Mean=Oi,e.PolarArc=Ei,e.createTooltip=F,e.createZoomingLabels=V,e.withInBounds=j,e.getValueXByPoint=H,e.getValueYByPoint=X,e.findClipRect=Y,e.firstToLowerCase=G,e.getTransform=W,e.getMinPointsDelta=U,e.getAnimationFunction=Z,e.linear=q,e.markerAnimate=Q,e.animateRectElement=$,e.pathAnimation=J,e.appendClipElement=K,e.triggerLabelRender=ee,e.setRange=te,e.isZoomSet=ie,e.getActualDesiredIntervalsCount=re,e.templateAnimate=oe,e.drawSymbol=ne,e.calculateShapes=ae,e.getRectLocation=se,e.minMax=le,e.getElement=he,e.getTemplateFunction=ce,e.accReactTemplate=de,e.chartReactTemplate=pe,e.createTemplate=ue,e.getFontStyle=ge,e.measureElementRect=ye,e.findlElement=me,e.getPoint=ve,e.appendElement=fe,e.appendChildElement=be,e.getDraggedRectLocation=xe,e.checkBounds=we,e.getLabelText=Se,e.stopTimer=Ce,e.isCollide=Pe,e.isOverlap=Le,e.containsRect=Re,e.calculateRect=Me,e.convertToHexCode=Ae,e.componentToHex=Te,e.convertHexToColor=ke,e.colorNameToHex=_e,e.getSaturationColor=Oe,e.getMedian=Ee,e.calculateLegendShapes=ze,e.textTrim=Ie,e.lineBreakLabelTrim=De,e.stringToNumber=Be,e.redrawElement=Ne,e.animateRedrawElement=Fe,e.textElement=Ve,e.calculateSize=je,e.createSvg=He,e.getTitle=Xe,e.titlePositionX=Ye,e.textWrap=Ge,e.getUnicodeText=We,e.blazorTemplatesReset=Ue,e.CustomizeOption=zi,e.StackValues=Ii,e.RectOption=Di,e.ImageOption=Bi,e.CircleOption=Ni,e.PolygonOption=Fi,e.ChartLocation=Vi,e.LabelLocation=ji,e.Thickness=Hi,e.ColorValue=Xi,e.PointData=Yi,e.AccPointData=Gi,e.ControlPoints=Wi,e.getColorByValue=Ze,e.getGradientColor=qe,e.getPercentageColor=Qe,e.getPercentage=$e,e.Crosshair=hn,e.Tooltip=un,e.Zoom=yn,e.Selection=fn,e.DataEditing=bn,e.Highlight=wn,e.DataLabel=Sn,e.ErrorBar=Cn,e.DataLabelSettings=$i,e.MarkerSettings=Ji,e.Points=Ki,e.Trendline=er,e.ErrorBarCapSettings=tr,e.ChartSegment=ir,e.ErrorBarSettings=rr,e.SeriesBase=or,e.Series=nr,e.Legend=Ln,e.ChartAnnotation=An,e.ChartAnnotationSettings=pi,e.LabelBorder=ui,e.MultiLevelCategories=gi,e.StripLineSettings=yi,e.MultiLevelLabels=mi,e.ScrollbarSettingsRange=vi,e.ScrollbarSettings=fi,e.BoxAndWhiskerSeries=kn,e.MultiColoredAreaSeries=On,e.MultiColoredLineSeries=zn,e.MultiColoredSeries=Gr,e.MultiLevelLabel=In,e.ScrollBar=Bn,e.ParetoSeries=Fn,e.Export=Vn,e.AccumulationChart=ta,e.AccumulationAnnotationSettings=Xn,e.AccumulationDataLabelSettings=Yn,e.PieCenter=Gn,e.AccPoints=Wn,e.AccumulationSeries=Un,e.getSeriesFromIndex=Ke,e.pointByIndex=et,e.PieSeries=Jn,e.FunnelSeries=na,e.PyramidSeries=sa,e.AccumulationLegend=ha,e.AccumulationDataLabel=da,e.AccumulationTooltip=ua,e.AccumulationSelection=ya,e.AccumulationAnnotation=va,e.StockChart=ns,e.StockChartFont=Fa,e.StockChartBorder=Va,e.StockChartArea=ja,e.StockMargin=Ha,e.StockChartStripLineSettings=Xa,e.StockEmptyPointSettings=Ga,e.StockChartConnector=Wa,e.StockSeries=Ua,e.StockChartIndicator=Za,e.StockChartAxis=qa,e.StockChartRow=Qa,e.StockChartTrendline=$a,e.StockChartAnnotationSettings=Ja,e.StockChartIndexes=Ka,e.StockEventsSettings=es,e.loaded="loaded",e.legendClick="legendClick",e.load="load",e.animationComplete="animationComplete",e.legendRender="legendRender",e.textRender="textRender",e.pointRender="pointRender",e.sharedTooltipRender="sharedTooltipRender",e.seriesRender="seriesRender",e.axisLabelRender=ai,e.axisLabelClick="axisLabelClick",e.axisRangeCalculated="axisRangeCalculated",e.axisMultiLabelRender="axisMultiLabelRender",e.tooltipRender="tooltipRender",e.chartMouseMove="chartMouseMove",e.chartMouseClick="chartMouseClick",e.pointClick="pointClick",e.pointDoubleClick="pointDoubleClick",e.pointMove="pointMove",e.chartMouseLeave="chartMouseLeave",e.chartMouseDown="chartMouseDown",e.chartMouseUp="chartMouseUp",e.zoomComplete="zoomComplete",e.dragComplete="dragComplete",e.selectionComplete="selectionComplete",e.resized="resized",e.beforeResize="beforeResize",e.beforePrint="beforePrint",e.annotationRender="annotationRender",e.scrollStart="scrollStart",e.scrollEnd="scrollEnd",e.scrollChanged="scrollChanged",e.stockEventRender="stockEventRender",e.multiLevelLabelClick="multiLevelLabelClick",e.dragStart="dragStart",e.drag="drag",e.dragEnd="dragEnd",e.regSub=si,e.regSup=li,e.beforeExport="beforeExport",e.afterExport="afterExport",e.bulletChartMouseClick="chartMouseClick",e.onZooming=hi,e.getSeriesColor=h,e.getThemeColor=c,e.getScrollbarThemeColor=d,e.PeriodSelector=ka,e.RangeNavigator=Ea,e.rangeValueToCoefficient=tt,e.getXLocation=it,e.getRangeValueXByPoint=rt,e.getExactData=ot,e.getNearestValue=nt,e.DataPoint=fa,e.getRangeThemeColor=at,e.RangeNavigatorAxis=Sa,e.RangeSeries=xa,e.RangeSlider=Ta,e.RangeNavigatorSeries=La,e.ThumbSettings=Ra,e.StyleSettings=Ma,e.RangeTooltipSettings=Aa,e.RangeTooltip=as,e.BulletChart=ws,e.Range=ps,e.MajorTickLinesSettings=us,e.MinorTickLinesSettings=gs,e.BulletLabelStyle=ys,e.BulletTooltipSettings=ms,e.BulletDataLabel=vs,e.BulletChartLegendSettings=fs,e.getBulletThemeColor=lt,e.BulletTooltip=Ss,e.BulletChartLegend=Ps,e.Smithchart=zl,e.SmithchartMajorGridLines=ll,e.SmithchartMinorGridLines=hl,e.SmithchartAxisLine=cl,e.SmithchartAxis=dl,e.LegendTitle=el,e.LegendLocation=tl,e.LegendItemStyleBorder=il,e.LegendItemStyle=rl,e.LegendBorder=ol,e.SmithchartLegendSettings=nl,e.SeriesTooltipBorder=fl,e.SeriesTooltip=bl,e.SeriesMarkerBorder=xl,e.SeriesMarkerDataLabelBorder=wl,e.SeriesMarkerDataLabelConnectorLine=Sl,e.SeriesMarkerDataLabel=Cl,e.SeriesMarker=Pl,e.SmithchartSeries=Ll,e.TooltipRender=Il,e.Subtitle=gl,e.Title=yl,e.SmithchartFont=Ms,e.SmithchartMargin=As,e.SmithchartBorder=Ts,e.SmithchartRect=ks,e.LabelCollection=_s,e.LegendSeries=Os,e.LabelRegion=Es,e.HorizontalLabelCollection=zs,e.RadialLabelCollections=Is,e.LineSegment=Ds,e.PointRegion=Bs,e.Point=Ns,e.ClosestPoint=Fs,e.MarkerOptions=Vs,e.SmithchartLabelPosition=js,e.Direction=Hs,e.DataLabelTextOptions=Xs,e.LabelOption=Ys,e.SmithchartSize=Gs,e.GridArcPoints=Ws,e.smithchartBeforePrint="beforePrint",e.SmithchartLegend=Dl,e.Sparkline=lh,e.SparklineTooltip=ch,e.SparklineBorder=Fl,e.SparklineFont=Vl,e.TrackLineSettings=jl,e.SparklineTooltipSettings=Hl,e.ContainerArea=Xl,e.LineSettings=Yl,e.RangeBandSettings=Gl,e.AxisSettings=Wl,e.Padding=Ul,e.SparklineMarkerSettings=Zl,e.LabelOffset=ql,e.SparklineDataLabelSettings=Ql,e}({},ej.base,ej.svgbase,ej.data,ej.pdfexport,ej.navigations,ej.calendars,ej.splitbuttons,ej.buttons),this.ejs=ej;
|