smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
41 lines (24 loc) • 479 kB
JavaScript
/* Smart UI v20.0.2 (2024-09-06)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */ //
(function(){ if (typeof document === 'undefined') { return; }
/* Smart UI v19.1.1 (2024-June)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 2612:
/***/ (() => {
Smart("smart-button",class extends Smart.ContentElement{static get properties(){return{value:{type:"string"},name:{type:"string"},type:{value:"button",type:"string"},clickMode:{allowedValues:["hover","press","release","pressAndRelease"],type:"string",value:"release"}}}static get styleUrls(){return["smart.button.css"]}template(){return"<button class=\"smart-button smart-unselectable\" inner-h-t-m-l='[[innerHTML]]' id='button' type='[[type]]' name='[[name]]' value='[[value]]' disabled='[[disabled]]' role=\"presentation\"></button>"}refresh(){}static get listeners(){return{"button.down":"_downHandler","button.mouseenter":"_mouseEnterHandler","button.mouseleave":"_mouseLeaveHandler","button.touchend":"_touchEndHandler","button.click":"_clickHandler","button.up":"_upHandler",up:"_upHandler","button.focus":"_focusHandler","button.blur":"_blurHandler"}}focus(){const e=this;e.$.button?e.$.button.focus():HTMLElement.prototype.focus.call(e)}blur(){const e=this;e.$.button?e.$.button.blur():HTMLElement.prototype.blur.call(e)}_upHandler(e){const t=this;if(e.stopPropagation(),t.$.setAttributeValue("active",!1),t.dataset.target){const n=document.querySelector(t.dataset.target);let a=t.dataset.toggle;const r="smart-window".toLowerCase();if(n&&n.nodeName.toLowerCase()===r&&"modal"===a&&(a="openModal"),"tab"===a||"pill"===a||"list"===a){const e=this.closest(".nav, .list-group"),a='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',r=!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?e.children(".active"):e.querySelectorAll("li > .active");if(e){const n=e.querySelectorAll(a);for(let e=0;e<n.length;e++)n[e].classList.remove("primary");for(let e=0;e<r.length;e++)r[e].classList.remove("active");let i=t.parentNode;for(;i;){if("LI"===i.nodeName){i.classList.add("active");break}i=i.parentNode}t.classList.add("primary")}return n.parentNode.querySelectorAll(".active").forEach((e=>{e.classList.remove("active"),e.classList.add("smart-hidden")})),n.classList.add("active"),void n.classList.remove("smart-hidden")}a&&n&&!n[a]&&"collapse"===a&&(setTimeout((()=>{n.classList.contains("smart-hidden")?n.classList.remove("smart-hidden"):n.classList.add("smart-hidden")})),e.originalEvent.preventDefault()),a&&n&&!n[a]&&"dropdown"===a?(setTimeout((()=>{n.opened=!n.opened})),e.originalEvent.preventDefault()):a&&n&&n[a]&&(setTimeout((()=>{n[a]()}),50),e.originalEvent.preventDefault())}}_focusHandler(){this.$.setAttributeValue("focus",!0),this.$.fireEvent("focus")}_blurHandler(){this.$.setAttributeValue("focus",!1),this.$.fireEvent("blur")}_clickHandler(e){const t=this;("release"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly)&&(e.preventDefault(),e.stopPropagation())}_downHandler(e){const t=this;if(!(t.disabled||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t.$.setAttributeValue("active",!0),"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||t.readonly))){if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_mouseEnterHandler(e){const t=this;if(!t.readonly&&(t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0),"hover"===t.clickMode)){const n="buttons"in e?e.buttons:e.which;if(t.hasAttribute("smart-blazor"))return void t.$.dispatchEvent(new Event("click"));t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY})}}_touchEndHandler(){const e=this;setTimeout((function(){e.$button.setAttributeValue("hover",!1),e.$.setAttributeValue("hover",!1)}),300)}_mouseLeaveHandler(){this.$button.setAttributeValue("hover",!1),this.$.setAttributeValue("hover",!1)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;"disabled"===e?(a._setFocusable(),a.$button&&a.$button.setAttributeValue("hover",!1),a.$.setAttributeValue("hover",!1),a instanceof Smart.RepeatButton&&a._stopRepeat()):"unfocusable"===e&&a._setFocusable()}_setFocusable(){const e=this,t=e.$.button?e.$.button:e;if(e.disabled||e.unfocusable)return t.removeAttribute("tabindex"),void(t.tabIndex=-1);t.tabIndex=e.tabIndex>0?e.tabIndex:0}ready(){const e=this;super.ready(),e.setAttribute("role","button"),e._setFocusable(),e.enableShadowDOM&&e.$.hiddenInput&&e.appendChild(e.$.hiddenInput)}}),Smart("smart-repeat-button",class extends Smart.Button{static get properties(){return{delay:{value:50,type:"number"},initialDelay:{value:150,type:"number"}}}static get listeners(){return{"button.down":"_startRepeat","button.mouseenter":"_overriddenHandler","button.mouseleave":"_overriddenHandler","button.pointerenter":"_updateInBoundsFlag","button.pointerleave":"_updateInBoundsFlag","button.touchmove":"_touchmoveHandler","document.up":"_stopRepeat"}}_clickHandler(e){const t=this;("release"!==t.clickMode||t.preventDefaultClick||t.readonly||t.disabled)&&(e.preventDefault(),e.stopPropagation(),t.preventDefaultClick=!1)}_updateInBoundsFlag(e){const t=this;-1!==e.type.indexOf("leave")?(t._isPointerInBounds=!1,t.$button.setAttributeValue("hover",!1),t.$.setAttributeValue("hover",!1)):(t._isPointerInBounds=!0,t.$button.setAttributeValue("hover",!0),t.$.setAttributeValue("hover",!0)),1!==("buttons"in e?e.buttons:e.which)&&t._stopRepeat(e)}_startRepeat(e){const t=this;t.setAttribute("active",""),t._initialTimer||t.readonly||(t._initialTimer=setTimeout((function(){t._repeatTimer=setInterval((()=>{if(t._isPointerInBounds){if(t.hasAttribute("smart-blazor"))return t.$.dispatchEvent(new Event("click")),void(t.preventDefaultClick=!0);const n="buttons"in e?e.buttons:e.which;t.$.fireEvent("click",{buttons:n,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),t.preventDefaultClick=!0}}),t.delay)}),t.initialDelay))}_stopRepeat(e){const t=this;t.readonly||e&&("pointercancel"===e.type||e.originalEvent&&"pointercancel"===e.originalEvent.type)||(t.$.setAttributeValue("active",!1),t._repeatTimer&&(clearInterval(t._repeatTimer),t._repeatTimer=null),t._initialTimer&&(clearTimeout(t._initialTimer),t._initialTimer=null))}_touchmoveHandler(e){this.preventDefaultClick&&e.cancelable&&(e.preventDefault(),e.stopPropagation())}_overriddenHandler(){}}),Smart("smart-toggle-button",class extends Smart.Button{static get properties(){return{checked:{value:!1,type:"boolean?"},falseContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminate:{value:!1,type:"boolean"},trueContent:{value:"",reflectToAttribute:!1,type:"string"},indeterminateTemplate:{value:null,type:"any"},trueTemplate:{value:null,type:"any"},falseTemplate:{value:null,type:"any"},type:{value:"toggle",type:"string",defaultReflectToAttribute:!0,readonly:!0}}}static get listeners(){return{keydown:"_keyHandler",keyup:"_keyHandler",dragstart:"_dragStartHandler","button.click":"_buttonClickHandler","button.mouseenter":"_buttonMouseEnterHandler","button.mouseleave":"_buttonMouseLeaveHandler","document.up":"_documentUpHandler"}}ready(){super.ready(),this._setAriaState(),this._updateGroupValue()}_setAriaState(){const e=this,t=e.checked;null!==t?e.setAttribute("aria-pressed",t):e.setAttribute("aria-pressed","mixed")}_buttonClickHandler(){}_buttonMouseLeaveHandler(){this.removeAttribute("hover")}_buttonMouseEnterHandler(){const e=this;e.setAttribute("hover",""),e.disabled||e.readonly||"hover"!==e.clickMode||(e._changeCheckState("pointer"),e.focus(),e._updateHidenInputNameAndValue())}_documentUpHandler(e){const t=this;t._pressed&&(t._pressed=!1,t.disabled||t.readonly||"press"===t.clickMode||"pointercancel"===e.originalEvent.type||(t._changeCheckState("pointer"),t.focus(),t._updateHidenInputNameAndValue()))}_downHandler(e){const t=this;t.disabled||t.readonly||(t.hasRippleAnimation&&Smart.Utilities.Animation.Ripple.animate(t,e.pageX,e.pageY),t._pressed=!0,"press"!==t.clickMode&&"pressAndRelease"!==t.clickMode||(t._changeCheckState("pointer"),t.hasAttribute("smart-blazor")?t.$.dispatchEvent(new Event("click")):t.$.fireEvent("click"),t._updateHidenInputNameAndValue()),"press"===t.clickMode&&(e.preventDefault(),e.stopPropagation()))}_dragStartHandler(e){e.preventDefault()}_keyHandler(e){const t=this;if(!0!==t.disabled&&!t.readonly&&32===e.keyCode){if("keydown"===e.type)return void e.preventDefault();if("none"===t.switchMode)return;t._changeCheckState("keyboard"),t._updateHidenInputNameAndValue()}}_updateGroupValue(){const e=this;if(e.dataset.target){const t=document.querySelector(e.dataset.target);if(t){const n=document.querySelectorAll('[data-target="'+e.dataset.target+'"]'),a=[];if(e.checked){const n=e.dataset.property,a=e.dataset.value;if(n&&void 0!==t[n]){let e=a;"true"===e&&(e=!0),"false"===e&&(e=!1),t[n]=e}}for(let t=0;t<n.length;t++){const r=n[t];r.checked&&(r.name?(a.push(r.name),e.id&&r.setAttribute("data-id",e.id)):e.id&&a.push(e.id))}t.value=a.toString(),e._targetDispatchTimer&&clearTimeout(e._targetDispatchTimer),e._targetDispatchTimer=setTimeout((()=>{t.dispatchEvent(new Event("change"))}),100)}}}_changeCheckState(e){const t=this;let n=null;null===t.checked?t.checked=!0:(n=t.checked,t.checked=!t.checked),t._handleTextSelection(),t.$.fireEvent("change",{value:t.checked,oldValue:n,changeType:e}),t.checked?t.$.fireEvent("checkValue",{changeType:e}):t.$.fireEvent("uncheckValue",{changeType:e}),t._updateGroupValue(),t._setAriaState()}_handleTextSelection(){const e=this;e.$.addClass("smart-unselectable"),e.timer&&clearTimeout(e.timer),e.timer=setTimeout((()=>e.$.removeClass("smart-unselectable")),500)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const a=this;if("checked"===e)return a.$.fireEvent("change",{value:n,oldValue:t,changeType:"api"}),void a._setAriaState();switch(e){case"trueTemplate":a._handleTemplate(!0);break;case"falseTemplate":a._handleTemplate(!1);break;case"indeterminateTemplate":a._handleTemplate()}}_htmlBindOnInitialization(){const e=this;e._bindContentProperty("trueContent","smart-true-content"),e._bindContentProperty("falseContent","smart-false-content"),e._bindContentProperty("indeterminateContent","smart-indeterminate-content")}_bindContentProperty(e,t){const n=this;if(!n.$[e+"Container"])return;let a=document.createElement("div");a.innerHTML=n.innerHTML;let r,i=a.getElementsByClassName(t);if(i.length>0)for(let e=0;e<i.length;e++)r=i[e];""===n[e]&&(n[e]=void 0===r?"":r.outerHTML),n.$[e+"Container"].innerHTML=n[e]}_updateContentProperties(){const e=this;function t(t){e.$[t+"Container"]&&(e[t]=e.$[t+"Container"].innerHTML)}t("trueContent"),t("falseContent"),t("indeterminateContent")}_updateHidenInputValue(){const e=this;if(!e.$.hiddenInput)return;let t;t=null===e.checked?"null":!1===e.checked?"off":e.value||"on",e.$.hiddenInput.setAttribute("value",t)}_updateHidenInputName(){const e=this;if(!e.$.hiddenInput)return;let t=!1===e.checked?"":e.name||"";e.$.hiddenInput.setAttribute("name",t)}_updateHidenInputNameAndValue(){this._updateHidenInputName(),this._updateHidenInputValue()}_handleTemplate(e,t){const n=this;let a,r,i;if(!0===e?(a=n.trueTemplate,r=n.$.trueContentContainer,i=n.trueContent):!1===e?(a=n.falseTemplate,r=n.$.falseContentContainer,i=n.falseContent):(a=n.indeterminateTemplate,r=n.$.indeterminateContentContainer,i=n.indeterminateContent),t&&(r.innerHTML=i||""),null===a||!a)return;if("function"==typeof a)return void a(r,{value:i});if(!("content"in document.createElement("template")))return void n.error(n.localize("htmlTemplateNotSuported",{elementType:n.nodeName.toLowerCase()}));if(a=document.getElementById(a),null===a||!("content"in a))return void n.error(n.localize("invalidTemplate",{elementType:n.nodeName.toLowerCase(),property:"template"}));const o=a.content,l=o.childNodes.length,s=/{{\w+}}/g;let u,d=[];for(let e=0;e<l;e++)for(u=s.exec(o.childNodes[e].innerHTML);u;)d.push({childNodeIndex:e,bindingString:u[0]}),u=s.exec(o.childNodes[e].innerHTML);const c=d.length;let p,h,m=document.importNode(a.content,!0);for(let e=0;e<c;e++){p=m.childNodes[d[e].childNodeIndex],h=d.length;for(let t=0;t<h;t++)p.innerHTML=p.innerHTML.replace(d[e].bindingString,i)}r.innerHTML="";for(let e=0;e<m.childNodes.length;e++)m.childNodes[e].outerHTML&&(r.innerHTML+=m.childNodes[e].outerHTML)}});
/***/ }),
/***/ 8243:
/***/ (() => {
Smart.Chart&&(Smart.Chart.prototype._moduleAnnotations=!0,Smart.Chart.prototype._renderAnnotation=function(t,e){const i=this.seriesGroups[t],a=this.renderer;if(isNaN(t))return;let s=this._get([this.getXAxisDataPointOffset(e.xValue,t),e.x]),o=this._get([this.getValueAxisDataPointOffset(e.yValue,t),e.y]),n=this._get([this.getXAxisDataPointOffset(e.xValue2,t),e.x2]),r=this._get([this.getValueAxisDataPointOffset(e.yValue2,t),e.y2]);if(i.polar||i.spider){const i=this.getPolarDataPointOffset(e.xValue,e.yValue,t);!i||isNaN(i.x)||isNaN(i.y)?(s=e.x,o=e.y):(s=i.x,o=i.y)}if(isNaN(o)||isNaN(s))return!1;if("horizontal"===i.orientation){let t=s;s=o,o=t,t=n,n=r,r=t}e.offset&&(isNaN(e.offset.x)||(s+=e.offset.x,n+=e.offset.x),isNaN(e.offset.y)||(o+=e.offset.y,r+=e.offset.y));const l=this._get([e.width,n-s]),f=this._get([e.height,r-o]);let c,h;switch(e.type){case"rect":c=a.rect(s,o,l,f);break;case"circle":c=a.rect(s,o,e.radius);break;case"line":c=a.rect(s,o,n,r);break;case"path":c=a.path(e.path)}if(c&&a.attr(c,{fill:e.fillColor,stroke:e.lineColor,opacity:this._get([e.fillOpacity,e.opacity]),"stroke-opacity":this._get([e.lineOpacity,e.opacity]),"stroke-width":e.lineWidth,"stroke-dasharray":e.dashStyle||"none"}),e.text){const t=e.text;let i=0,n=0;t.offset&&(isNaN(t.offset.x)||(i+=t.offset.x),isNaN(t.offset.y)||(n+=t.offset.y)),h=a.text(t.value,s+i,o+n,NaN,NaN,t.angle,{},!0===t.clip,t.horizontalAlignment||"center",t.verticalAlignment||"center",t.rotationPoint||"centermiddle"),a.attr(h,{fill:t.fillColor,stroke:t.lineColor,class:"smart-chart-annotation-text "+(t.class||"")})}const y=["click","mouseenter","mouseleave"],p=this;for(let t=0;t<y.length;t++){const i=y[t];c&&this.renderer.addHandler(c,i,(function(){p._raiseAnnotationEvent(e,i)})),h&&this.renderer.addHandler(h,i,(function(){p._raiseAnnotationEvent(e,i)}))}},Smart.Chart.prototype._raiseAnnotationEvent=function(t,e){this.$.fireEvent("annotation"+e.charAt(0).toUpperCase()+e.slice(1),{annotation:t})});
/***/ }),
/***/ 7177:
/***/ (() => {
Smart.Chart&&(Smart.Chart.prototype._moduleApi=!0,Smart.Chart.prototype.getItemsCount=function(t,e){const r=this.seriesGroups[t];if(!this._isSerieVisible(t,e))return 0;const i=this._renderData;return!r||!i||i.length<=t?0:r.series[e]?i[t].offsets[e].length:0},Smart.Chart.prototype.getXAxisRect=function(t){const e=this._renderData;if(e&&!(e.length<=t)&&e[t].xAxis)return e[t].xAxis.rect},Smart.Chart.prototype.getXAxisLabels=function(t){const e=[];let r=this._renderData;if(!r||r.length<=t)return e;if(r=r[t].xAxis,!r)return e;const i=this.seriesGroups[t];if(i.polar||i.spider){for(let t=0;t<r.polarLabels.length;t++){const i=r.polarLabels[t];e.push({offset:{x:i.x,y:i.y},value:i.value})}return e}const s=this._getXAxis(t),o=this.getXAxisRect(t),a="top"===s.position||"right"===s.position,n="horizontal"===i.orientation;for(let t=0;t<r.data.length;t++)n?e.push({offset:{x:o.x+(a?0:o.width),y:o.y+r.data.data[t]},value:r.data.xvalues[t]}):e.push({offset:{x:o.x+r.data.data[t],y:o.y+(a?o.height:0)},value:r.data.xvalues[t]});return e},Smart.Chart.prototype.getValueAxisRect=function(t){const e=this._renderData;if(e&&!(e.length<=t)&&e[t].valueAxis)return e[t].valueAxis.rect},Smart.Chart.prototype.getValueAxisLabels=function(t){const e=[];let r=this._renderData;if(!r||r.length<=t)return e;if(r=r[t].valueAxis,!r)return e;const i=this._getValueAxis(t),s="top"===i.position||"right"===i.position,o=this.seriesGroups[t],a="horizontal"===o.orientation;if(o.polar||o.spider){for(let t=0;t<r.polarLabels.length;t++){const i=r.polarLabels[t];e.push({offset:{x:i.x,y:i.y},value:i.value})}return e}for(let t=0;t<r.items.length;t++)a?e.push({offset:{x:r.itemOffsets[r.items[t]].x+r.itemWidth/2,y:r.rect.y+(s?r.rect.height:0)},value:r.items[t]}):e.push({offset:{x:r.rect.x+r.rect.width,y:r.itemOffsets[r.items[t]].y+r.itemWidth/2},value:r.items[t]});return e},Smart.Chart.prototype.getPlotAreaRect=function(){return this._plotRect},Smart.Chart.prototype.getRect=function(){return this._rect},Smart.Chart.prototype.showToolTip=function(t,e,r,i,s){const o=this.getItemCoord(t,e,r);isNaN(o.x)||isNaN(o.y)||this._startTooltipTimer(t,e,r,o.x,o.y,i,s)},Smart.Chart.prototype.hideToolTip=function(t){isNaN(t)&&(t=0);const e=this;e._cancelTooltipTimer(),setTimeout((function(){e._hideToolTip(0)}),t)});
/***/ }),
/***/ 7799:
/***/ (() => {
Smart("smart-chart",class extends Smart.BaseElement{static get properties(){return{animationDuration:{value:300,type:"number"},backgroundColor:{value:null,type:"string?"},backgroundImage:{value:"",type:"string"},borderLineColor:{value:null,type:"string?"},borderLineWidth:{value:1,type:"number"},caption:{value:"Caption",type:"string"},clip:{value:!0,type:"boolean"},colorScheme:{value:"scheme01",type:"string"},columnSeriesOverlap:{value:!1,type:"boolean"},crosshairsColor:{value:null,type:"string?"},crosshairsDashStyle:{value:"2,2",type:"string"},crosshairsLineWidth:{value:1,type:"number"},dataSource:{value:[],type:"object",reflectToAttribute:!1},description:{value:"Description",type:"string"},draw:{value:null,type:"function?"},drawBefore:{value:null,type:"function?"},enableAxisTextAnimation:{value:!1,type:"boolean"},enableCrosshairs:{value:!1,type:"boolean"},greyScale:{value:!1,type:"boolean"},legendLayout:{value:{flow:{value:"horizontal",allowedValues:["horizontal","vertical"],type:"string"},height:{value:null,type:"number?"},left:{value:null,type:"number?"},top:{value:null,type:"number?"},width:{value:null,type:"number?"}},type:"object?"},localization:{value:{decimalSeparator:{value:".",type:"string"},patterns:{value:null,type:"object?"},thousandsSeparator:{value:"",type:"string"}},type:"object"},messages:{value:{en:{invalidRadiusDataField:"smart-chart: Invalid radiusDataField value at [{{index}}]",invalidSeries:"smart-chart: Invalid property: each series group must have a 'series' property which must be a valid array.",invalidSeriesGroups:"smart-chart: Invalid property: 'seriesGroups' property is required and must be a valid array.",invalidType:'smart-chart: Invalid serie type "{{type}}".',missingAxis:"smart-chart: seriesGroup[{{index}}] is missing {{axis}} definition.",missingReference:"smart-chart: Missing reference to {{files}}.",missingType:"smart-chart: Invalid property: each series group must have a valid 'type' property."}},type:"object",extend:!0},padding:{value:{bottom:{value:5,type:"number"},left:{value:5,type:"number"},right:{value:5,type:"number"},top:{value:5,type:"number"}},type:"object"},renderEngine:{value:"",allowedValues:["","SVG","HTML5"],type:"string"},rightToLeft:{value:!1,type:"boolean"},seriesGroups:{value:[],type:"any",reflectToAttribute:!1},showBorderLine:{value:!0,type:"boolean"},showLegend:{value:!0,type:"boolean"},showToolTips:{value:!0,type:"boolean"},showToolTipsOnAllSeries:{value:!1,type:"boolean"},theme:{value:"light",allowedValues:["light","dark"],type:"string"},titlePadding:{value:{bottom:{value:10,type:"number"},left:{value:5,type:"number"},right:{value:5,type:"number"},top:{value:5,type:"number"}},type:"object"},toolTipBackground:{value:null,type:"string?"},toolTipFormatFunction:{value:null,type:"function?"},toolTipHideDelay:{value:4e3,type:"number"},toolTipLineColor:{value:null,type:"string?"},toolTipShowDelay:{value:300,type:"number"},valueAxis:{value:{alternatingBackgroundColor:{value:"",type:"string"},alternatingBackgroundColor2:{value:"",type:"string"},alternatingBackgroundOpacity:{value:1,type:"number"},axisSize:{value:null,type:"any"},bands:{value:null,type:"array?"},baselineValue:{value:0,type:"any"},customDraw:{value:!1,type:"boolean"},flip:{value:!1,type:"boolean"},formatFunction:{value:null,type:"function?"},formatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},gridLines:{value:{color:{value:"",type:"string"},custom:{value:null,type:"array?"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},visible:{value:!0,type:"any"}},type:"object"},labels:{value:{angle:{value:0,type:"number"},autoRotate:{value:!1,type:"boolean"},class:{value:null,type:"string?"},custom:{value:null,type:"array?"},formatFunction:{value:null,type:"function?"},formatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},horizontalAlignment:{value:"center",allowedValues:["left","center","right"],type:"string"},offset:{value:{x:{value:0,type:"number"},y:{value:0,type:"number"}},type:"object"},rotationPoint:{value:"auto",allowedValues:["auto","left","center","right","topleft","topcenter","topright","bottomleft","bottomcenter","bottomright","centermiddle"],type:"string"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},verticalAlignment:{value:"center",allowedValues:["top","center","bottom"],type:"string"},visible:{value:!0,type:"any"}},type:"object"},line:{value:{color:{value:"",type:"string"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},visible:{value:!0,type:"any"}},type:"object"},logarithmicScale:{value:!1,type:"boolean"},logarithmicScaleBase:{value:10,type:"number"},maxValue:{value:NaN,type:"any"},minValue:{value:NaN,type:"any"},padding:{value:{bottom:{value:0,type:"number"},left:{value:0,type:"number"},right:{value:0,type:"number"},top:{value:0,type:"number"}},type:"object"},position:{value:"left",allowedValues:["left","right","top","bottom"],type:"string"},textRotationAngle:{value:null,type:"number?"},textRotationPoint:{value:"auto",allowedValues:["auto","left","center","right","topleft","topcenter","topright","bottomleft","bottomcenter","bottomright","centermiddle"],type:"string"},tickMarks:{value:{color:{value:"",type:"string"},custom:{value:null,type:"array?"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},size:{value:4,type:"number"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},visible:{value:!0,type:"any"}},type:"object"},title:{value:{class:{value:null,type:"string?"},horizontalAlignment:{value:"center",allowedValues:["left","center","right"],type:"string"},text:{value:"",type:"string"},verticalAlignment:{value:"center",allowedValues:["top","center","bottom"],type:"string"},visible:{value:!0,type:"boolean"}},type:"object"},unitInterval:{value:null,type:"number?"},valuesOnTicks:{value:!0,type:"boolean"},visible:{value:!0,type:"boolean"}},type:"object"},xAxis:{value:{alternatingBackgroundColor:{value:"",type:"string"},alternatingBackgroundColor2:{value:"",type:"string"},alternatingBackgroundOpacity:{value:1,type:"number"},axisSize:{value:null,type:"any"},bands:{value:null,type:"array?"},baseUnit:{value:null,allowedValues:["year","month","day","hour","minute","second","millisecond",null],type:"string?"},customDraw:{value:!1,type:"boolean"},dataField:{value:"",type:"string"},dateFormat:{value:null,type:"string?"},displayText:{value:null,type:"string?"},flip:{value:!1,type:"boolean"},formatFunction:{value:null,type:"function?"},formatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},gridLines:{value:{color:{value:"",type:"string"},custom:{value:null,type:"array?"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},visible:{value:!0,type:"any"}},type:"object"},labels:{value:{angle:{value:0,type:"number"},autoRotate:{value:!1,type:"boolean"},class:{value:null,type:"string?"},custom:{value:null,type:"array?"},formatFunction:{value:null,type:"function?"},formatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},horizontalAlignment:{value:"center",allowedValues:["left","center","right"],type:"string"},offset:{value:{x:{value:0,type:"number"},y:{value:0,type:"number"}},type:"object"},rotationPoint:{value:"auto",allowedValues:["auto","left","center","right","topleft","topcenter","topright","bottomleft","bottomcenter","bottomright","centermiddle"],type:"string"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},verticalAlignment:{value:"center",allowedValues:["top","center","bottom"],type:"string"},visible:{value:!0,type:"any"}},type:"object"},line:{value:{color:{value:"",type:"string"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},visible:{value:!0,type:"any"}},type:"object"},logarithmicScale:{value:!1,type:"boolean"},logarithmicScaleBase:{value:10,type:"number"},maxValue:{value:NaN,type:"any"},minValue:{value:NaN,type:"any"},padding:{value:{bottom:{value:0,type:"number"},left:{value:0,type:"number"},right:{value:0,type:"number"},top:{value:0,type:"number"}},type:"object"},position:{value:"bottom",allowedValues:["bottom","top","left","right"],type:"string"},rangeSelector:{value:{backgroundColor:{value:null,type:"string?"},backgroundImage:{value:"",type:"string"},baseUnit:{value:null,allowedValues:["year","month","day","hour","minute","second","millisecond",null],type:"string?"},borderLineColor:{value:null,type:"string?"},borderLineWidth:{value:null,type:"number?"},caption:{value:"",type:"string"},colorScheme:{value:null,type:"string?"},columnSeriesOverlap:{value:!1,type:"boolean"},columnsGapPercent:{value:25,type:"number"},dataField:{value:null,type:"string?"},description:{value:"",type:"string"},greyScale:{value:null,type:"boolean?"},gridLines:{value:{color:{value:"",type:"string"},custom:{value:null,type:"array?"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},visible:{value:!0,type:"any"}},type:"object"},labels:{value:{angle:{value:0,type:"number"},autoRotate:{value:!1,type:"boolean"},class:{value:null,type:"string?"},custom:{value:null,type:"array?"},formatFunction:{value:null,type:"function?"},formatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},horizontalAlignment:{value:"center",allowedValues:["left","center","right"],type:"string"},offset:{value:{x:{value:0,type:"number"},y:{value:0,type:"number"}},type:"object"},rotationPoint:{value:"auto",allowedValues:["auto","left","center","right","topleft","topcenter","topright","bottomleft","bottomcenter","bottomright","centermiddle"],type:"string"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},verticalAlignment:{value:"center",allowedValues:["top","center","bottom"],type:"string"},visible:{value:!0,type:"any"}},type:"object"},maxValue:{value:NaN,type:"any"},minValue:{value:NaN,type:"any"},padding:{value:{bottom:{value:0,type:"number"},left:{value:0,type:"number"},right:{value:0,type:"number"},top:{value:0,type:"number"}},type:"object"},position:{value:null,allowedValues:["bottom","top","left","right"],type:"string?"},renderTo:{value:null,type:"any"},rightToLeft:{value:null,type:"boolean?"},seriesGapPercent:{value:10,type:"number"},seriesGroups:{value:null,type:"array?"},serieType:{value:"area",type:"string"},showBorderLine:{value:null,type:"boolean?"},size:{value:null,type:"number?"},skipOverlappingPoints:{value:!0,type:"boolean"},titlePadding:{value:{bottom:{value:10,type:"number"},left:{value:5,type:"number"},right:{value:5,type:"number"},top:{value:5,type:"number"}},type:"object"},unitInterval:{value:null,type:"number?"},valueAxis:{value:{alternatingBackgroundColor:{value:"",type:"string"},alternatingBackgroundColor2:{value:"",type:"string"},alternatingBackgroundOpacity:{value:1,type:"number"},axisSize:{value:null,type:"any"},bands:{value:null,type:"array?"},baselineValue:{value:0,type:"any"},customDraw:{value:!1,type:"boolean"},flip:{value:!1,type:"boolean"},formatFunction:{value:null,type:"function?"},formatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},gridLines:{value:{color:{value:"",type:"string"},custom:{value:null,type:"array?"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},visible:{value:!0,type:"any"}},type:"object"},labels:{value:{angle:{value:0,type:"number"},autoRotate:{value:!1,type:"boolean"},class:{value:null,type:"string?"},custom:{value:null,type:"array?"},formatFunction:{value:null,type:"function?"},formatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},horizontalAlignment:{value:"center",allowedValues:["left","center","right"],type:"string"},offset:{value:{x:{value:0,type:"number"},y:{value:0,type:"number"}},type:"object"},rotationPoint:{value:"auto",allowedValues:["auto","left","center","right","topleft","topcenter","topright","bottomleft","bottomcenter","bottomright","centermiddle"],type:"string"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},verticalAlignment:{value:"center",allowedValues:["top","center","bottom"],type:"string"},visible:{value:!0,type:"any"}},type:"object"},line:{value:{color:{value:"",type:"string"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},visible:{value:!0,type:"any"}},type:"object"},logarithmicScale:{value:!1,type:"boolean"},logarithmicScaleBase:{value:10,type:"number"},maxValue:{value:NaN,type:"any"},minValue:{value:NaN,type:"any"},padding:{value:{bottom:{value:0,type:"number"},left:{value:0,type:"number"},right:{value:0,type:"number"},top:{value:0,type:"number"}},type:"object"},position:{value:"left",allowedValues:["left","right","top","bottom"],type:"string"},textRotationAngle:{value:null,type:"number?"},textRotationPoint:{value:"auto",allowedValues:["auto","left","center","right","topleft","topcenter","topright","bottomleft","bottomcenter","bottomright","centermiddle"],type:"string"},tickMarks:{value:{color:{value:"",type:"string"},custom:{value:null,type:"array?"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},size:{value:4,type:"number"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},visible:{value:!0,type:"any"}},type:"object"},title:{value:{class:{value:null,type:"string?"},horizontalAlignment:{value:"center",allowedValues:["left","center","right"],type:"string"},text:{value:"",type:"string"},verticalAlignment:{value:"center",allowedValues:["top","center","bottom"],type:"string"},visible:{value:!0,type:"boolean"}},type:"object"},unitInterval:{value:null,type:"number?"},valuesOnTicks:{value:!0,type:"boolean"},visible:{value:!1,type:"boolean"}},type:"object"},visible:{value:!1,type:"boolean"}},type:"object"},textRotationAngle:{value:null,type:"number?"},textRotationPoint:{value:"auto",allowedValues:["auto","left","center","right","topleft","topcenter","topright","bottomleft","bottomcenter","bottomright","centermiddle"],type:"string"},tickMarks:{value:{color:{value:"",type:"string"},custom:{value:null,type:"array?"},dashStyle:{value:"",type:"string"},lineWidth:{value:1,type:"number"},size:{value:4,type:"number"},step:{value:null,type:"number?"},unitInterval:{value:null,type:"number?"},visible:{value:!0,type:"any"}},type:"object"},title:{value:{class:{value:null,type:"string?"},horizontalAlignment:{value:"center",allowedValues:["left","center","right"],type:"string"},text:{value:"",type:"string"},verticalAlignment:{value:"center",allowedValues:["top","center","bottom"],type:"string"},visible:{value:!0,type:"boolean"}},type:"object"},toolTipFormatFunction:{value:null,type:"function?"},toolTipFormatSettings:{value:{dateFormat:{value:null,type:"string?"},decimalPlaces:{value:null,type:"number?"},decimalSeparator:{value:null,type:"string?"},negativeWithBrackets:{value:!1,type:"boolean"},prefix:{value:"",type:"string"},sufix:{value:"",type:"string"},thousandsSeparator:{value:null,type:"string?"}},type:"object"},type:{value:"auto",allowedValues:["auto","date","basic","linear"],type:"string"},unitInterval:{value:null,type:"number?"},valuesOnTicks:{value:!0,type:"boolean"},visible:{value:!0,type:"boolean"}},type:"object",reflectToAttribute:!1}}}get _legendLayout(){const e=this.legendLayout;return null!==e.height||null!==e.left||null!==e.top||null!==e.width||"vertical"===e.flow}_getFormatSettings(e,t){if(!e)return null;const i=e[t||"formatSettings"];return i&&(i.dateFormat||null!==i.decimalPlaces||i.decimalSeparator||i.negativeWithBrackets||i.prefix||i.sufix||i.thousandsSeparator)?i:null}static get listeners(){return{click:"_clickHandler",down:"_downMoveHandler",mouseleave:"_mouseleaveHandler",move:"_moveHandler",resize:"_resizeHandler","document.move":"_downMoveHandler","document.up":"_documentUpHandler"}}static get requires(){return{"Smart.Utilities.Draw":"smart.draw.js"}}static get styleUrls(){return["smart.chart.css"]}template(){return'<div role="presentation"></div>'}ready(){super.ready(),this.checkLicense()}render(){const e=this;e._observeSeriesGroups(),e._isTouchDevice=Smart.Utilities.Core.isMobile,e._setDefaults(),e._createColorsCache(),e.refresh(),e._setAriaProperties(),super.render()}attached(){const e=this;super.attached(),e.isCompleted&&!e._isRangeSelectorInstance&&Object.values(e._rangeSelectorInstances).forEach((e=>{e.parentDiv.parentDiv.appendChild(e.parentDiv)}))}detached(){const e=this;super.detached(),e._isRangeSelectorInstance||(e._ttEl&&e._ttEl.box&&e._ttEl.box.remove(),delete e._ttEl,Object.values(e._rangeSelectorInstances).forEach((e=>{e.parentDiv.remove()})))}_setAriaProperties(){const e=this;if(e._isRangeSelectorInstance)return;const t=e.xAxis,i=e.valueAxis,r=e.seriesGroups;let s=e.$.content.children[1],a="",l=!0;function n(e,t){e&&(e.title&&e.title.text||e.description||e.dataField)&&(a+='; "',e.title&&e.title.text?a+=e.title.text:a+=e.description||e.dataField,a+='" on the '+t,isNaN(e.minValue)||(a+=" from "+e.minValue),isNaN(e.maxValue)||(a+=" up to "+e.maxValue))}e.setAttribute("role","figure"),s||(s=document.createElement("div"),s.id=e.id+"DescriptionContainer",s.className="smart-hidden",e.$.content.appendChild(s)),e.setAttribute("aria-labelledby",e.id+"TitleText"),e.setAttribute("aria-describedby",e.id+"TitleDescription "+s.id),a+="This chart displays:",n(t,"x-axis"),n(i,"y-axis");for(let e=0;e<r.length;e++){const t=r[e];if(n(t.valueAxis,"y-axis"),t.series){l=l&&"horizontal"===t.orientation;for(let i=0;i<t.series.length;i++){const r=t.series[i];0===i&&(a+=0===e?" for ":"; "),a+='"'+(r.displayText||r.dataField)+'"',i!==t.series.length-1&&(a+=", ")}}}a=a.replace(":;",":"),a=a.replace(/<.+?>/g,""),l&&(a=a.replace(/x-axis/g,"@@@"),a=a.replace(/y-axis/g,"x-axis"),a=a.replace(/@@@/g,"y-axis")),e.description&&(a="; "+a),s.innerHTML=a}_observeSeriesGroups(){const e=this;function t(t){e.context!==e&&t.newValue!==t.oldValue&&e.update()}if(e._validateSeriesGroups(),Array.isArray(e.seriesGroups)){e.seriesGroups=new Smart.ObservableArray(e.seriesGroups),e.seriesGroups.canNotify=!0;for(let i=0;i<e.seriesGroups.length;i++)Array.isArray(e.seriesGroups[i].series)&&(e.seriesGroups[i].series=new Smart.ObservableArray(e.seriesGroups[i].series),e.seriesGroups[i].series.canNotify=!0,e.seriesGroups[i].series.notify(t));e.seriesGroups.notify(t)}}_downMoveHandler(e){const t=this;let i=e.originalEvent.target;t.shadowRoot&&i===t&&(i=e.originalEvent.composedPath()[0]);const r=i.closest(".smart-chart-range-selector");if(!r)return;const s=r.firstElementChild,a=s.parentChart;t!==s&&t!==a||a["_onSliderMouse"+e.type.slice(0,1).toUpperCase()+e.type.slice(1)](e)}_documentUpHandler(e){const t=this;t._draggingRangeSelector&&t._onSliderMouseUp(e)}_setDefaults(){const e=this;e.axisPadding=5,e.enableEvents=!0,e.enableSampling=!0,e._itemsToggleState=[],e._isToggleRefresh=!1,e._isSelectorRefresh=!1,e._sliders=[],e._selectorRange=[],e._rangeSelectorInstances={},e._resizeState={},e._isRangeSelectorInstance=e._isRangeSelectorInstance||!1,e._renderData={},e._smartPlot=null,e._animTickInt=50,e._seriesTypes=["line","stackedline","stackedline100","spline","stackedspline","stackedspline100","stepline","stackedstepline","stackedstepline100","area","stackedarea","stackedarea100","splinearea","stackedsplinearea","stackedsplinearea100","steparea","stackedsteparea","stackedsteparea100","rangearea","splinerangearea","steprangearea","column","stackedcolumn","stackedcolumn100","rangecolumn","scatter","stackedscatter","stackedscatter100","bubble","stackedbubble","stackedbubble100","pie","donut","candlestick","ohlc","waterfall","stackedwaterfall"],e.colorSchemes=[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]},{name:"scheme28",colors:["#3A43BA","#281E5D","#48AAAD","#0492C2","#1E456E","#59788D","#52B2C0","#82EDFD"]},{name:"scheme29",colors:["#003F5C","#BC5090","#58508D","#FF6361","#FFA600"]},{name:"scheme30",colors:["#16736F","#A2D56A","#1C515C","#62B773","#EEEF63","#1F313F","#309577"]},{name:"scheme31",colors:["#74CC66","#191A4D","#2D867A","#EEE3CD","#224D19","#0D261B","#5771C7","#B6D7E7","#206052","#6B5724","#C3AF4B","#603620","#536722","#B6E7B9","#34819D","#94ACDB"]},{name:"scheme32",colors:["#87C5FF","#5B5B60","#9BE076","#F7A384","#7479D3","#F13A80","#E4D388","#2BC6B2","#F45B14"]}]}_clickHandler(e){const t=this;if(t.disabled||t._isRangeSelectorInstance)return;let i=e.pageX||e.clientX||e.screenX,r=e.pageY||e.clientY||e.screenY;const s=t.getBoundingClientRect();t._isTouchDevice&&(i=e.pageX,r=e.pageY),i-=s.left,r-=s.top,t._mouseX=i,t._mouseY=r,!isNaN(t._lastClickTs)&&(new Date).valueOf()-t._lastClickTs<100||(this._hostClickTimer=setTimeout((function(){if(t._isTouchDevice||(t._cancelTooltipTimer(),t._hideToolTip(),t._unselect()),t._pointMarker&&t._pointMarker.element){const i=t.seriesGroups[t._pointMarker.gidx],r=i.series[t._pointMarker.sidx];e.stopImmediatePropagation(),t._raiseItemEvent("click",i,r,t._pointMarker.iidx)}}),100),"HTML5"===t.renderEngine&&t._canvasClickHandler(i,r))}_canvasClickHandler(e,t){const i=this,r=i.renderer._elements;let s;for(let i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&"0"!==i){const a=r[i];if(t>a.y&&t<a.y+a.height&&e>a.x&&e<a.x+a.width){s=a;break}}if(s&&s.purpose&&"legend-toggle"===s.purpose){const e=s.data;i._toggleSerie(e.groupIndex,e.seriesIndex,e.itemIndex)}}_mouseleaveHandler(){const e=this;if(e.disabled||e._isRangeSelectorInstance)return;const t=e._mouseX,i=e._mouseY,r=e._plotRect;r&&t>=r.x&&t<=r.x+r.width&&i>=r.y&&i<=r.y+r.height||(e._cancelTooltipTimer(),e._hideToolTip(0),e._unselect())}_moveHandler(e){const t=this;if(t.disabled)return;if(t._isRangeSelectorInstance){const i=t.parentChart;null===i.xAxis.rangeSelector.renderTo&&(i._unselect(),i._hideToolTip()),"touchmove"===e.originalEvent.type&&e.originalEvent.preventDefault()}else t.style.cursor="default";let i=e.pageX||e.clientX||e.screenX,r=e.pageY||e.clientY||e.screenY;const s=t.getBoundingClientRect();t._isTouchDevice&&(i=e.pageX,r=e.pageY),i-=s.left,r-=s.top,t.onmousemove(i,r)}_resizeHandler(){const e=this,t=e.animation;e._isRangeSelectorInstance||(e.animation="none",e.refresh(),e.animation=t)}propertyChangedHandler(e,t,i){const r=this;switch(e){case"animation":case"theme":r._ttEl&&r._ttEl.box.setAttribute(e,i);break;case"rightToLeft":if(!r._ttEl||!r._ttEl.box)break;i?r._ttEl.box.setAttribute("right-to-left",i):r._ttEl.box.removeAttribute("right-to-left");break;case"seriesGroups":r._observeSeriesGroups();break;case"xAxis_rangeSelector_renderTo":if(null===i){const e=t.getElementsByClassName("smart-chart-range-selector")[0];e.parentElement.removeChild(e)}}this.refresh()}_initRenderer(){const e=this;e._draw=new Smart.Utilities.Draw(e.$.content,e.renderEngine),e.renderer=e._draw.renderer,e._smartPlot||(e._smartPlot=new Smart.Utilities.Plot(e.renderer)),e.$.content.firstElementChild.setAttribute("role","presentation")}_internalRefresh(){const e=this;if(!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))return;e._stopAnimations(),e.renderer&&(e._isToggleRefresh||e._isUpdate)||(e._hideToolTip(0),e.$.content.innerHTML="",e._initRenderer());const t=e.renderer;if(!t)return;const i=t.getRect();e._render({x:1,y:1,width:i.width,height:i.height}),this.$.fireEvent("refreshBegin",{instance:this}),t instanceof Smart.Utilities.HTML5Renderer&&t.refresh(),e._isUpdate=!1,this.$.fireEvent("refreshEnd",{instance:this})}saveAsPNG(e){return this._saveAsImage("png",e)}saveAsJPEG(e){return this._saveAsImage("jpeg",e)}saveAsPDF(e,t){return this._saveAsImage("pdf",e,t)}print(){return this._saveAsImage("print")}_saveAsImage(e,t,i){const r=this;return r._draw._widgetToImage(r,e,t,r._hasRangeSelector?r._selectorSaveAsImageCallback:void 0,i)}_selectorSaveAsImageCallback(e,t){let i=e;for(let e=0;e<i.seriesGroups.length;e++){let r=i._getXAxis(e);if(!r||!r.rangeSelector||!r.rangeSelector.visible||r.rangeSelector.renderTo)continue;let s=i._rangeSelectorInstances[e];if(!s)continue;let a=s.renderer.getRect(),l=s.renderer.getContainer().getElementsByTagName("canvas")[0].getContext("2d"),n=i._sliders[e],o="horizontal"===i.seriesGroups[e].orientation,h=o?"height":"width",d=o?"width":"height",u=o?"y":"x",g=o?"x":"y",f={};f[u]=n.startOffset+n.rect[u],f[g]=n.rect[g],f[h]=n.endOffset-n.startOffset,f[d]=n.rect[d];let p=r.rangeSelector.colorSelectedRange||"blue",c=r.rangeSelector.colorRangeLine||"grey",m=[];m.push(s.renderer.rect(f.x,f.y,f.width,f.height,{fill:p,opacity:.1}));const y=i.renderer;o?(m.push(s.renderer.line(y._ptrnd(n.rect.x+n.rect.width),y._ptrnd(n.rect.y),y._ptrnd(n.rect.x+n.rect.width),y._ptrnd(f.y),{stroke:c,opacity:.5})),m.push(s.renderer.line(y._ptrnd(n.rect.x+n.rect.width),y._ptrnd(f.y+f.height),y._ptrnd(n.rect.x+n.rect.width),y._ptrnd(n.rect.y+n.rect.height),{stroke:c,opacity:.5})),m.push(s.renderer.line(y._ptrnd(n.rect.x),y._ptrnd(f.y),y._ptrnd(n.rect.x+n.rect.width),y._ptrnd(f.y),{stroke:c,opacity:.5})),m.push(s.renderer.line(y._ptrnd(n.rect.x),y._ptrnd(f.y+f.height),y._ptrnd(n.rect.x+n.rect.width),y._ptrnd(f.y+f.height),{stroke:c,opacity:.5}))):(m.push(s.renderer.line(y._ptrnd(n.rect.x),y._ptrnd(n.rect.y),y._ptrnd(f.x),y._ptrnd(n.rect.y),{stroke:c,opacity:.5})),m.push(s.renderer.line(y._ptrnd(f.x+f.width),y._ptrnd(n.rect.y),y._ptrnd(n.rect.x+n.rect.width),y._ptrnd(n.rect.y),{stroke:c,opacity:.5})),m.push(s.renderer.line(y._ptrnd(f.x),y._ptrnd(n.rect.y),y._ptrnd(f.x),y._ptrnd(n.rect.y+n.rect.height),{stroke:c,opacity:.5})),m.push(s.renderer.line(y._ptrnd(f.x+f.width),y._ptrnd(n.rect.y),y._ptrnd(f.x+f.width),y._ptrnd(n.rect.y+n.rect.height),{stroke:c,opacity:.5}))),s.renderer.refresh();let _=l.getImageData(a.x,a.y,a.width,a.height);const x=t.getContext("2d"),v=i.getBoundingClientRect(),b=s.getBoundingClientRect();x.putImageData(_,b.left-v.left,b.top-v.top,1,1,a.width,a.height);for(let e=0;e<m.length;e++)s.renderer.removeElement(m[e]);s.renderer.refresh()}return!0}refresh(){this._internalRefresh(),this._setAriaProperties()}update(){this._isUpdate=!0,this._internalRefresh()}clear(){const e=this;e.caption="",e.description="",e.refresh()}_validateSeriesGroups(){const e=this;Array.isArray(this.seriesGroups)||e.seriesGroups instanceof Smart.ObservableArray||e.error(e.localize("invalidSeriesGroups"));for(let t=0;t<this.seriesGroups.length;t++){const i=this.seriesGroups[t];i.type||e.error(e.localize("missingType")),Array.isArray(i.series)||i.series instanceof Smart.ObservableArray||e.error(e.localize("invalidSeries"))}}_render(e){var t=this,i=t.renderer;t._colorsCache.clear(),!t._isToggleRefresh&&t._isUpdate&&t._renderData&&t._renderDataClone(),t._renderData=[],i.clear(),t._unselect(),t._hideToolTip(0);var r=t.backgroundImage;t.style.backgroundImage=null==r||""===r?"":-1!==r.indexOf("(")?r:'url("'+r+'")',t._rect=e;var s=t.padding||{left:5,top:5,right:5,bottom:5},a=i.createClipRect(e),l=i.beginGroup();i.setClip(l,a);var n=i.rect(e.x,e.y,e.width-2,e.height-2);if(null==r||""===r?i.attr(n,{fill:t.backgroundColor||t._getThemeColor("background")}):i.attr(n,{fill:"transparent"}),!1!==t.showBorderLine){var o=this.borderLineWidth;(isNaN(o)||o<0||o>10)&&(o=1),i.attr(n,{"stroke-width":o,stroke:t.borderLineColor||t._getThemeColor("line")})}"function"==typeof t.drawBefore&&t.drawBefore(i,e);var h={x:s.left,y:s.top,width:e.width-s.left-s.right,height:e.height-s.top-s.bottom};t._paddedRect=h;var d,u=t.titlePadding||{left:2,top:2,right:2,bottom:2};t.caption&&t.caption.length>0&&(d=i.measureText(t.caption,0,{class:"smart-chart-title-text"}),i.text(t.caption,h.x+u.left,h.y+u.top,h.width-(u.left+u.right),d.height,0,{class:"smart-chart-title-text"},!0,"center","center").id=t.id+"TitleText",h.y+=d.height,h.height-=d.height),t.description&&t.description.length>0&&(d=i.measureText(t.description,0,{class:"smart-chart-title-description"}),i.text(t.description,h.x+u.left,h.y+u.top,h.width-(u.left+u.right),d.height,0,{class:"smart-chart-title-description"},!0,"center","center").id=t.id+"TitleDescription",h.y+=d.height,h.height-=d.height),(t.caption||t.description)&&(h.y+=u.bottom+u.top,h.height-=u.bottom+u.top);var g={x:h.x,y:h.y,width:h.width,height:h.height};t._plotRect=g,t._buildStats(g);var f,p=t._isPieOnlySeries(),c=t.seriesGroups,m={xAxis:{},valueAxis:{}};for(let e=0;e<c.length&&!p;e++){if("pie"===c[e].type||"donut"===c[e].type)continue;var y=t._getXAxis(e);y||t.error(t.localize("missingAxis",{index:e,axis:"xAxis"}));let i=y===t._getXAxis()?-1:e;m.xAxis[i]=0}var _=t.axisPadding;isNaN(_)&&(_=5);var x={left:0,right:0,leftCount:0,rightCount:0},v=[];for(let e=0;e<c.length;e++){const i=c[e];if("pie"===i.type||"donut"===i.type||!0===i.spider||!0===i.polar){v.push({width:0,position:0,xRel:0});continue}f="horizontal"===i.orientation;let r=t._getXAxis(e),s=r===t._getXAxis()?-1:e;var b=t._getValueAxis(e),N=b===t._getValueAxis()?-1:e,M=f?r.axisSize:b.axisSize,A={x:0,y:g.y,width:g.width,height:g.height},w=f?t._getXAxis(e).position:b.position;M&&"auto"!==M||(f?(M=this._renderXAxis(e,A,!0,g).width,1==(1&m.xAxis[s])?M=0:M>0&&(m.xAxis[s]|=1)):(M=t._