@esfaenza/es-charts 11.2.9 → 11.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@esfaenza/extensions"),require("@angular/common"),require("@amcharts/amcharts4/core"),require("@amcharts/amcharts4/charts")):"function"==typeof define&&define.amd?define("@esfaenza/es-charts",["exports","@angular/core","@esfaenza/extensions","@angular/common","@amcharts/amcharts4/core","@amcharts/amcharts4/charts"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).esfaenza=e.esfaenza||{},e.esfaenza["es-charts"]={}),e.ng.core,e.extensions,e.ng.common,e.am4core,e.am4charts)}(this,(function(e,t,n,a,i,r){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var l=o(i),s=o(r),d=function(){function e(){}return e.prototype.adaptDataForAreaChart=function(e){return e},e.prototype.adaptDataForLineChart=function(e){return e},e.prototype.adaptDataForPieChart=function(e){return e},e.prototype.adaptDataForVerticalChart=function(e){return e},e.prototype.adaptDataForVertical2DChart=function(e){return e},e.prototype.adaptDataForVerticalStackedChart=function(e){return e},e}();d.decorators=[{type:t.Injectable}];var c=function(e){void 0===e&&(e=[]),this.series=e},p=function(e){void 0===e&&(e=[]),this.values=e},h=function(e,t){void 0===e&&(e=[]),this.groups=e,this.interval=t},u=function(e,t){void 0===e&&(e=[]),this.groups=e,this.colorInfos=t},g=function(e){void 0===e&&(e=[]),this.values=e},m=function(e){void 0===e&&(e=[]),this.groups=e},f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}Object.create;var b=function(){},I=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),D=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(b),x=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),S=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),P=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),T=function(){},A=function(){},w=function(e,t){this.d=e,this.v=t},k=function(e,t){this.k=e,this.v=t},O=function(e,t,n){this.k=e,this.v=t,this.c=n},W=function(e,t,n,a,i){this.name=e,this.values=t,this.interval=n,this.color=a,this.uom=i},z=new t.InjectionToken("ESC_LOCALE"),j=new t.InjectionToken("ESC_ANIMATIONS"),M=new t.InjectionToken("ESC_THEME"),R=new t.InjectionToken("ESC_LOGS"),E=function(){function e(e){this.logs=e,this.Initializations=[],this.InitializedGraphs=[]}return e.prototype.register=function(e,t){if(-1!=this.InitializedGraphs.indexOf(e))throw"Attempting to register a duplicate chart '"+e+"'. Make sure the 'name' properties of your charts are univoque";this.log("DISPATCHER: Registering chart creation function execution for "+e),this.Initializations.push({name:e,function:t}),1==this.Initializations.length&&(this.log("DISPATCHER: Initial drain started"),this.drainInitQueues())},e.prototype.deregisterGraph=function(e){var t=this.InitializedGraphs.indexOf(e);-1!=t?(this.log("DISPATCHER: Chart deregistered "+e),this.InitializedGraphs.splice(t,1)):this.log("DISPATCHER: Registration missing for chart "+e+" it was probably destroyed during load")},e.prototype.drainInitQueues=function(){var e=this,t=this.Initializations[0];this.log("DISPATCHER: Executing initialization function for chart "+t.name),t.function().then((function(){e.log("DISPATCHER: initialization for chart "+t.name+" is done"),e.InitializedGraphs.push(t.name),e.Initializations.splice(0,1),e.Initializations.length>=1?(e.log("DISPATCHER: Found queued initializations. Continuing"),e.drainInitQueues()):e.log("DISPATCHER: queue is over, nothing more to do")}))},e.prototype.log=function(e){this.logs&&console.log("@esfaenza/es-charts: "+e)},e}();E.decorators=[{type:t.Injectable}],E.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Inject,args:[R]}]}]};var _="spiritedaway",F="moonrisekingdom",V="frozen",G="dark",B="kelly",Z="material",X="dataviz",Y="none",H="animated",N=function(){function e(){}return Object.defineProperty(e.prototype,"spiritedaway",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moonrisekingdom",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frozen",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dark",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kelly",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return Z},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataviz",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"none",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animated",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(e,"spiritedaway",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e,"moonrisekingdom",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e,"frozen",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(e,"dark",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(e,"kelly",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e,"material",{get:function(){return Z},enumerable:!1,configurable:!0}),Object.defineProperty(e,"dataviz",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(e,"none",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"animated",{get:function(){return H},enumerable:!1,configurable:!0}),e}(),$=function(){function e(e){this.logs=e,this.AnimationsAreLoaded=!1,this.LastLoadedTheme="",this.themeCache={},this.localizationCache={}}return e.prototype.applyAnimations=function(e){var t=this;return this.AnimationsAreLoaded?(this.log("CORE: theme already applyed "+N.animated),new Promise((function(e){e(!0)}))):this.importIfNeeded("themes",N.animated).then((function(){t.log("CORE: Applying theme "+N.animated),e.useTheme(t.themeCache[N.animated]),t.AnimationsAreLoaded=!0}))},e.prototype.unapplyAnimations=function(e){return this.AnimationsAreLoaded?(this.log("CORE: Animations in use, unapplying theme "+N.animated),e.unuseTheme(this.themeCache[N.animated]),this.AnimationsAreLoaded=!1):this.log("CORE: Animations already unused, no need to unapply them"),new Promise((function(e){e(!0)}))},e.prototype.applyTheme=function(e,t){var n=this;return this.LastLoadedTheme==t?(this.log("CORE: theme already applied "+t),new Promise((function(e){e(!0)}))):(this.unapplyPreviousTheme(e),t==N.none?(this.LastLoadedTheme=N.none,new Promise((function(e){e(!0)}))):this.importIfNeeded("themes",t).then((function(){n.log("CORE: Applying theme "+t),e.useTheme(n.themeCache[t]),n.LastLoadedTheme=t})))},e.prototype.unapplyPreviousTheme=function(e){this.LastLoadedTheme&&this.LastLoadedTheme!=N.none&&(this.log("CORE: Unapplying previously used theme "+this.LastLoadedTheme),e.unuseTheme(this.themeCache[this.LastLoadedTheme]))},e.prototype.applyLocale=function(e,t){var n=this;return this.importIfNeeded("lang",t).then((function(){n.log("Chart "+e.htmlContainer.id+": applying locale "+t),e.language.locale=n.localizationCache[t]}))},e.prototype.importIfNeeded=function(e,t){var n=this;if(("themes"!=e||this.themeCache[t])&&("lang"!=e||this.localizationCache[t]))return this.log("CORE: "+("lang"==e?"Language ":"Theme ")+t+" already loaded"),new Promise((function(e){e(!0)}));switch(this.log("CORE: Loading "+("lang"==e?"language ":"theme ")+t),e){case"themes":switch(t){case N.spiritedaway:return import("@amcharts/amcharts4/themes/spiritedaway").then((function(e){return n.themeCache[t]=e.default}));case N.moonrisekingdom:return import("@amcharts/amcharts4/themes/moonrisekingdom").then((function(e){return n.themeCache[t]=e.default}));case N.frozen:return import("@amcharts/amcharts4/themes/frozen").then((function(e){return n.themeCache[t]=e.default}));case N.dark:return import("@amcharts/amcharts4/themes/dark").then((function(e){return n.themeCache[t]=e.default}));case N.kelly:return import("@amcharts/amcharts4/themes/kelly").then((function(e){return n.themeCache[t]=e.default}));case N.material:return import("@amcharts/amcharts4/themes/material").then((function(e){return n.themeCache[t]=e.default}));case N.dataviz:return import("@amcharts/amcharts4/themes/dataviz").then((function(e){return n.themeCache[t]=e.default}));case N.animated:return import("@amcharts/amcharts4/themes/animated").then((function(e){return n.themeCache[t]=e.default}))}break;case"lang":switch(t){case"it-IT":return import("@amcharts/amcharts4/lang/it_IT").then((function(e){return n.localizationCache[t]=e.default}));case"en-US":return import("@amcharts/amcharts4/lang/en_US").then((function(e){return n.localizationCache[t]=e.default}))}}return this.log("CORE: Loading Failed. "+("lang"==e?"Language ":"Theme")+" not recognized: "+t),new Promise((function(e){e(!0)}))},e.prototype.log=function(e){this.logs&&console.log("@esfaenza/es-charts: "+e)},e}(),q=function(){function e(e,n,a,i,r,o,l,s,d){this.el=e,this.platformId=n,this.zone=a,this.Charter=i,this.Dispatcher=r,this.logs=o,this.animations=l,this.locale=s,this.theme=d,this.name="",this.BrowseDelayMs=500,this.onSelectionChanged=new t.EventEmitter,this.onSeriesClicked=new t.EventEmitter,this.onLoadStart=new t.EventEmitter,this.onLoadEnd=new t.EventEmitter,this.isPaged=!1,this.initDone=!1}return e.prototype.ngOnInit=function(){var e,t,n,a,i,r;this.Animations=null!=(null===(e=this.Settings)||void 0===e?void 0:e.Animations)?null===(t=this.Settings)||void 0===t?void 0:t.Animations:null!=this.Animations?this.Animations:this.animations,this.Theme=null!=(null===(n=this.Settings)||void 0===n?void 0:n.Theme)?null===(a=this.Settings)||void 0===a?void 0:a.Theme:null!=this.Theme?this.Theme:this.theme,this.Locale=null!=(null===(i=this.Settings)||void 0===i?void 0:i.Locale)?null===(r=this.Settings)||void 0===r?void 0:r.Locale:null!=this.Locale?this.Locale:this.locale,this.isPaged=this.DataArray&&this.DataArray.length>0&&!this.Data||this.DataDtos&&this.DataDtos.length>0&&!!this.DataRetrieve,this.log("Chart "+this.name+": ngOnInit")},e.prototype.ngOnChanges=function(e){if(this.initDone){this.log("Chart "+this.name+": ngOnChanges");var t=C(["Timeline","Legend","Settings","Animations","Theme","Locale"],this.getSpecificPropertiesToCheck());this.checkPropertiesAndRegraphicateAsNeeded(e,t)}},e.prototype.ngAfterViewInit=function(){if(!this.name)throw"a Unique name is mandatory to create a chart";this.log("Chart "+this.name+": ngAfterViewInit, graphicating chart outside Angular"),this.isPaged||this.dispatchLoadChart()},e.prototype.ngOnDestroy=function(){var e=this;this.Chart?(this.log("Chart "+this.name+": Unloading destroyed chart"),this.browserOnly((function(){e.Chart.dispose(),e.Dispatcher.deregisterGraph(e.name)}))):this.log("Chart "+this.name+": Unloading uncreated chart component. It probably was a duplicated")},e.prototype.dispatchLoadChart=function(){var e=this;this.browserOnly((function(){e.Dispatcher.register(e.name,(function(){return e.loadChart()}))}))},e.prototype.loadChart=function(){var e=this;return this.log("Chart "+this.name+": Start loading Modules if needed"),Promise.all([this.setupAmChartsThemes().then((function(){e.log("Chart "+e.name+": Graphicating after modules load");var t=e.getCastedSettings();return e.fillSettings(t),e.fillSpecificSettings(t),e.ChartService=e.graphicate(t),e.Chart=e.ChartService.ChartInstance,e.Chart||e.log("Chart "+e.name+": Could not create graph"),e.Charter.applyLocale(e.Chart,e.Locale).then((function(){return e.initDone=!0}))}))])},e.prototype.fillSettings=function(e){var t,n=this;e.Theme=e.Theme?e.Theme:this.Theme,e.Locale=e.Locale?e.Locale:this.Locale,e.Animations=null!=e.Animations?e.Animations:this.Animations,e.Legend=null!=e.Legend?e.Legend:this.Legend,e.Name=e.Name?e.Name:this.name,e.Timeline=null!=e.Timeline?e.Timeline:this.Timeline,e.AdaptLabelSizeAndOrientation=null!=e.AdaptLabelSizeAndOrientation?e.AdaptLabelSizeAndOrientation:this.AdaptLabelSizeAndOrientation,e.XAxisTitle=e.XAxisTitle?e.XAxisTitle:this.XTitle,e.YAxisTitle=e.YAxisTitle?e.YAxisTitle:this.YTitle,e.LegendPosition=e.LegendPosition?e.LegendPosition:this.LegendPosition,e.HideSeriesOnLabelClick=null!=e.HideSeriesOnLabelClick?e.HideSeriesOnLabelClick:this.HideSeriesOnLabelClick,e.MinGridDistance=null!=e.MinGridDistance?e.MinGridDistance:this.MinGridDistance,e.LegendPadding=e.LegendPadding?e.LegendPadding:null!==(t=this.LegendPadding)&&void 0!==t?t:null,e.ContainerHeight=this.el.nativeElement.parentElement.offsetHeight,e.OnSeriesClickCallback=function(e){n.onSeriesClicked.emit(e)},e.OnSelectionChangedCallback=function(e){n.onSelectionChanged.emit({from:e.from,to:e.to,initial:e.initial})}},e.prototype.checkPropertiesAndRegraphicateAsNeeded=function(e,t){for(var n=!1,a=0;a<t.length;a++)n=n||e[t[a]]&&e[t[a]].currentValue;n&&this.reloadChart()},e.prototype.changePage=function(e){var t=this;if(!e.data)return this.loadingChart=!0,this.DataRetrieve&&this.DataRetrieve(null,e.index),void this.onLoadStart.emit();this.DataRetrieve?this.DataRetrieve(e.data,e.index).then((function(e){t.changePageDataReceived(e)})):this.changePageDataReceived(e.data)},e.prototype.changePageDataReceived=function(e){this.loadingChart=!1,this.onLoadEnd.emit();var t=!this.Data;this.Data=e,t?this.dispatchLoadChart():this.reloadChart()},e.prototype.reloadChart=function(){var e=this;this.browserOnly((function(){e.Chart.isDisposed()||e.Chart.dispose(),e.Dispatcher.deregisterGraph(e.name)})),this.Dispatcher.register(this.name,(function(){return e.loadChart()}))},e.prototype.setupAmChartsThemes=function(){var e=this;return Promise.all([this.Charter.applyTheme(l,this.Theme).then((function(){return e.Animations?e.Charter.applyAnimations(l):e.Charter.unapplyAnimations(l)}))])},e.prototype.log=function(e){this.logs&&console.log("@esfaenza/es-charts: "+e)},e.prototype.browserOnly=function(e){a.isPlatformBrowser(this.platformId)&&this.zone.runOutsideAngular((function(){e()}))},e}();q.decorators=[{type:t.Directive}],q.ctorParameters=function(){return[{type:t.ElementRef},{type:Object},{type:t.NgZone},{type:$},{type:E},{type:Boolean},{type:Boolean},{type:String},{type:String}]},q.propDecorators={XTitle:[{type:t.Input}],YTitle:[{type:t.Input}],Settings:[{type:t.Input}],Legend:[{type:t.Input}],LegendPosition:[{type:t.Input}],Timeline:[{type:t.Input}],name:[{type:t.Input}],Animations:[{type:t.Input}],Theme:[{type:t.Input}],Locale:[{type:t.Input}],HideSeriesOnLabelClick:[{type:t.Input}],MinGridDistance:[{type:t.Input}],AdaptLabelSizeAndOrientation:[{type:t.Input}],LegendPadding:[{type:t.Input}],DataDtos:[{type:t.Input}],DataDtoStartIndex:[{type:t.Input}],DataRetrieve:[{type:t.Input}],BrowseDelayMs:[{type:t.Input}],header_tr:[{type:t.ContentChild,args:["header",{static:!1}]}],loading_template:[{type:t.ContentChild,args:["loading",{static:!1}]}],onSelectionChanged:[{type:t.Output}],onSeriesClicked:[{type:t.Output}],onLoadStart:[{type:t.Output}],onLoadEnd:[{type:t.Output}]};var U=function(){function e(e,t){this.Adapter=e,this.dateExts=t,this.DataGroupBucketSize=1500,this.OpacityOnSelected=.3,this.executionTimers={}}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p,h,u,g,m=this,f=this.Adapter?this.Adapter.adaptDataForLineChart(e):e,y=null!==(n=t.DataGroupingThreshold)&&void 0!==n?n:3e3,v=null!==(a=t.MergeDatasets)&&void 0!==a&&a,b=null==t.ShowTicks||(null==t?void 0:t.ShowTicks),I=Math.max.apply(Math,C(f.series.map((function(e){return e.values.length}))))>y,D=t.Timeline||I,L=f.series.some((function(e){return e.interval})),x=L?f.series.find((function(e){return e.interval})).interval:null,S=null==(null==t?void 0:t.AllowGaps)?L:null==t?void 0:t.AllowGaps,P=null===(i=null==t?void 0:t.FinalInstants)||void 0===i||i,T=null!==(r=null==t?void 0:t.Fill)&&void 0!==r&&r;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var A=this.ChartInstance,w=A.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(w.title.text=t.YAxisTitle,w.title.fontWeight="bold"),t.Min&&(w.min=t.Min),t.Max&&(w.max=t.Max);var k=A.xAxes.push(new s.DateAxis);if(t.XAxisTitle&&(k.title.text=t.XAxisTitle,k.title.fontWeight="bold"),b&&(k.renderer.ticks.template.disabled=!1,k.renderer.ticks.template.strokeOpacity=1,k.renderer.ticks.template.stroke=l.color("#495C43"),k.renderer.ticks.template.strokeWidth=2,k.renderer.ticks.template.length=10,k.renderer.ticks.template.location=0),k.renderer.minGridDistance=null!==(o=null==t?void 0:t.MinGridDistance)&&void 0!==o?o:50,k.renderer.grid.template.location=0,k.minZoomCount=5,k.groupData=I,k.groupCount=null!==(d=t.DataGroupBucketSize)&&void 0!==d?d:this.DataGroupBucketSize,S){if(!L)return console.error("Per utilizzare la funzionalità dei gap è obbligatorio definire un intervallo nelle serie del grafico"),null;k.baseInterval={count:x.count,timeUnit:x.timeunit}}D&&(A.scrollbarX=new s.XYChartScrollbar);var O=[],W=[],z=0;if(v){var j={};f.series.forEach((function(e,t){for(var n=0;n<e.values.length;n++){var a=e.values[n],i=new Date(a.d).valueOf();j[i]||(j[i]={}),j[i]["v"+t]=a.v}}));for(var M=Object.keys(j),R=[],E=0;E<M.length;E++){for(var _=j[M[E]],F={d:new Date(parseInt(M[E]))},V=Object.keys(_),G=0;G<V.length;G++){var B=V[G],Z=_[B];F[B]=Z}R.push(F)}this.ChartInstance.data=R,k.cursorTooltipEnabled=!1}if(f.series.forEach((function(e,n){var a,i;if(e.values[0]&&!(e.values[0].d instanceof Date))for(var r=0;r<e.values.length;r++)e.values[r].d=new Date(e.values[r].d);var o=!0,d=null;for(r=0;r<e.values.length;r++)if(d){if(e.values[r].d<d){o=!1;break}}else d=e.values[r].d;o||e.values.sort((function(e,t){return e.d.getTime()-t.d.getTime()}));var c=(null==t?void 0:t.Step)?new s.StepLineSeries:new s.LineSeries;c.dataFields.valueY="v"+(v?n:""),c.dataFields.dateX="d",c.dataFields.measureUnit=e.uom,c.name=e.name,c.strokeWidth=null!==(a=null==t?void 0:t.StrokeSize)&&void 0!==a?a:1,c.connect=!S,c.minBulletDistance=10,c.tooltipText=v?"":"{name}: [bold]{valueY}[/]",c.tooltip.pointerOrientation="vertical",c.tooltip.background.fillOpacity=.5,c.tooltip.label.padding(12,12,12,12),c.fillOpacity=T?1:1e-4,c.stacked=T,v?(c.tooltip.getFillFromObject=!1,c.tooltip.background.fill=l.color("#eee"),c.tooltip.label.fill=l.color("#00"),c.tooltip.defaultState.transitionDuration=0,c.tooltip.hiddenState.transitionDuration=0,c.dateFormatter.format=function(e){if(!x||!P)return m.dateExts.getFormatted(e,!1,!!x&&"second"==x.timeunit);var t=null;switch(x.timeunit){case"hour":t="day";break;case"minute":t="hour";break;case"second":t="minute"}return t?m.dateExts.adjustDateToFinalInstant(e,t,!!x&&"second"==x.timeunit):void 0},c.adapter.add("tooltipText",(function(){var e="[bold]{dateX.formatDate()}[/]\n";return m.ChartInstance.series.each((function(t){var n=" [font-style: italic]"+c.dataFields.measureUnit||"[/]";e+="["+t.stroke.hex+"]●[/] "+t.name+": [bold]{"+t.dataFields.valueY+"}[/]"+n+"\n"})),e}))):c.data=e.values;var p=c.segments.template;p.states.create("hover").properties.strokeWidth=(null!==(i=null==t?void 0:t.StrokeSize)&&void 0!==i?i:1)+1,p.states.create("dimmed").properties.stroke=l.color("#dadada"),e.color?W.push(l.color(e.color)):(W.push(A.colors.list[z%A.colors.list.length]),z++),O.push(c)})),A.colors.list=W,O.forEach((function(e){A.series.push(e),D&&A.scrollbarX.series.push(e)})),t.Legend&&(this.ChartInstance.legend=new s.Legend,this.ChartInstance.legend.position=null!==(c=null==t?void 0:t.LegendPosition)&&void 0!==c?c:"right",this.ChartInstance.legend.scrollable=!0,this.ChartInstance.legend.itemContainers.template.tooltipText="{name}",this.ChartInstance.legend.itemContainers.template.events.on("over",(function(e){m.processOver(e.target.dataItem.dataContext,T)})),this.ChartInstance.legend.itemContainers.template.events.on("out",(function(e){m.processOut(T)})),t.LegendPadding)){var X=this.ChartInstance.legend.itemContainers.template;X.paddingTop=null!==(p=t.LegendPadding.top)&&void 0!==p?p:0,X.paddingBottom=null!==(h=t.LegendPadding.bottom)&&void 0!==h?h:0,X.paddingLeft=null!==(u=t.LegendPadding.left)&&void 0!==u?u:0,X.paddingRight=null!==(g=t.LegendPadding.right)&&void 0!==g?g:0}return this.ChartInstance.cursor=new s.XYCursor,this.ChartInstance.cursor.xAxis=k,this.ChartInstance.cursor.yAxis=w,v&&(this.ChartInstance.cursor.maxTooltipDistance=-1),k.events.on("startchanged",(function(e){return m.emitSelectionChanged(e,t)})),k.events.on("endchanged",(function(e){return m.emitSelectionChanged(e,t)})),this},e.prototype.refreshData=function(e){},e.prototype.emitSelectionChanged=function(e,t){t.OnSelectionChangedCallback&&this.throttla("selchange",(function(){var n=e.target,a=new Date(n.minZoomed),i=new Date(n.maxZoomed),r=n.min==n.minZoomed&&n.max==n.maxZoomed;t.OnSelectionChangedCallback({from:a,to:i,initial:r})}),150)},e.prototype.processOver=function(e,t){var n=this;e.toFront(),e.segments.each((function(e){e.setState("hover"),t||(e.fillSprite.fillOpacity=n.OpacityOnSelected)})),t||(e.legendDataItem.marker.children.getIndex(1).fillOpacity=this.OpacityOnSelected),this.ChartInstance.series.each((function(n){n!=e&&n.segments.each((function(e){e.setState("dimmed"),t||(e.fillSprite.fillOpacity=0)}))}))},e.prototype.processOut=function(e){this.ChartInstance.series.each((function(t){t.segments.each((function(t){t.setState("default"),e||(t.fillSprite.fillOpacity=0)})),e||(t.legendDataItem.marker.children.getIndex(1).fillOpacity=0)}))},e.prototype.throttla=function(e,t,n){var a=this;this.executionTimers[e]&&clearTimeout(this.executionTimers[e]),this.executionTimers[e]=setTimeout((function(){t(),a.executionTimers[e]=null}),n)},e}(),Q=function(){function e(e){this.Adapter=e,this.executionTimers={}}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c=this;if(t.Timeline)return console.error("Timeline not supported for area chart"),null;var p=this.Adapter?this.Adapter.adaptDataForAreaChart(e):e,h=null==t.ShowTicks||(null==t?void 0:t.ShowTicks),u=p.interval;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var g=this.ChartInstance;if(t.Legend&&(g.legend=new s.Legend,g.legend.position=null!==(n=null==t?void 0:t.LegendPosition)&&void 0!==n?n:"right",g.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var m=this.ChartInstance.legend.itemContainers.template;m.paddingTop=null!==(a=t.LegendPadding.top)&&void 0!==a?a:0,m.paddingBottom=null!==(i=t.LegendPadding.bottom)&&void 0!==i?i:0,m.paddingLeft=null!==(r=t.LegendPadding.left)&&void 0!==r?r:0,m.paddingRight=null!==(o=t.LegendPadding.right)&&void 0!==o?o:0}var f=g.yAxes.push(new s.ValueAxis);f.tooltip.disabled=!0,t.YAxisTitle&&(f.title.text=t.YAxisTitle,f.title.fontWeight="bold"),f.min=0;var y=g.xAxes.push(new s.DateAxis);y.renderer.minGridDistance=null!==(d=null==t?void 0:t.MinGridDistance)&&void 0!==d?d:50,y.startLocation=.5,y.endLocation=.5,t.XAxisTitle&&(y.title.text=t.XAxisTitle,y.title.fontWeight="bold"),h&&(y.renderer.ticks.template.disabled=!1,y.renderer.ticks.template.strokeOpacity=1,y.renderer.ticks.template.stroke=l.color("#495C43"),y.renderer.ticks.template.strokeWidth=2,y.renderer.ticks.template.length=10,y.renderer.ticks.template.location=0),u&&(y.baseInterval={count:u.count,timeUnit:u.timeunit});for(var v=[],C={},b=[],I=0;I<p.groups.length;I++){for(var D=p.groups[I],L={date:D.name},x=0;x<D.values.length;x++){var S=D.values[x];L[S.k]=S.v,C[S.k]||(C[S.k]=!0,b.push(S.k))}v.push(L)}return g.data=v,b.forEach((function(e){c.createSeries(g,e)})),g.cursor=new s.XYCursor,g.cursor.xAxis=y,y.events.on("startchanged",(function(e){return c.emitSelectionChanged(e,t)})),y.events.on("endchanged",(function(e){return c.emitSelectionChanged(e,t)})),this},e.prototype.refreshData=function(e){},e.prototype.emitSelectionChanged=function(e,t){t.OnSelectionChangedCallback&&this.throttla("selchange",(function(){var n=e.target,a=new Date(n.minZoomed),i=new Date(n.maxZoomed),r=n.min==n.minZoomed&&n.max==n.maxZoomed;t.OnSelectionChangedCallback({from:a,to:i,initial:r})}),150)},e.prototype.createSeries=function(e,t){var n=e.series.push(new s.LineSeries);return n.dataFields.dateX="date",n.name=t[0].toUpperCase()+t.slice(1),n.dataFields.valueY=t,n.tooltipText="[#000]{valueY.value}[/]",n.tooltip.getStrokeFromObject=!0,n.tooltip.background.strokeWidth=3,n.tooltip.getFillFromObject=!1,n.fillOpacity=.6,n.strokeWidth=2,n.stacked=!0,n},e.prototype.throttla=function(e,t,n){var a=this;this.executionTimers[e]&&clearTimeout(this.executionTimers[e]),this.executionTimers[e]=setTimeout((function(){t(),a.executionTimers[e]=null}),n)},e}(),K=function(){function e(e){this.Adapter=e,this.ViewAbsoluteValues=!0}return e.prototype.graphicate=function(e,t){var n,a,i,r;if(t.Timeline)return console.error("Timeline not supported for pie chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,t.Mode3D?s.PieChart3D:s.PieChart),this.ChartInstance.innerRadius=(t.DonutRadiusPercentage||15)/100*t.ContainerHeight;var o=this.ChartInstance.series.push(t.Mode3D?new s.PieSeries3D:new s.PieSeries);o.dataFields.value="v",o.dataFields.category="k",this.ViewAbsoluteValues&&(o.legendSettings.valueText="{value}",o.labels.template.text="{category}: [bold]{value}[/]"),o.slices.template.stroke=l.color("#fff"),o.slices.template.strokeOpacity=1,o.slices.template.togglable=!1,o.hiddenState.properties.opacity=1,o.hiddenState.properties.endAngle=-90,o.hiddenState.properties.startAngle=-90,(null==t.HideZeroes||t.HideZeroes)&&(o.ticks.template.events.on("ready",this.hideZeroes),o.ticks.template.events.on("visibilitychanged",this.hideZeroes),o.labels.template.events.on("ready",this.hideZeroes),o.labels.template.events.on("visibilitychanged",this.hideZeroes)),o.slices.template.events.on("hit",(function(e){if(t.OnSeriesClickCallback){var n=e.target.dataItem.dataContext.k;t.OnSeriesClickCallback(n)}}));for(var d=this.Adapter?this.Adapter.adaptDataForPieChart(e):e,c=0,p=0;p<d.values.length;p++)d.values[p].c?d.values[p].c=l.color(d.values[p].c):(d.values[p].c=this.ChartInstance.colors.list[c%this.ChartInstance.colors.list.length],c++);if(o.slices.template.propertyFields.fill="c",this.ChartInstance.data=d.values,t.LabelsVisible?(t.LabelsWrap||t.LabelsTruncate)&&(o.labels.template.maxWidth=t.LabelsWidth||100,t.LabelsWrap?o.labels.template.wrap=!0:t.LabelsTruncate&&(o.labels.template.truncate=!0)):(o.labels.template.disabled=!0,o.ticks.template.disabled=!0),t.Legend){var h=new s.Legend;if(this.ChartInstance.legend=h,h.position=(null==t?void 0:t.LegendPosition)||"bottom",h.itemContainers.template.togglable=!0===t.HideSeriesOnLabelClick,h.itemContainers.template.tooltipText="{category}",t.HideSeriesOnLabelClick||h.itemContainers.template.events.on("hit",(function(e){if(t.OnSeriesClickCallback){var n=e.target.dataItem.dataContext.legendDataItem.name;t.OnSeriesClickCallback(n)}})),t.LegendPadding){var u=this.ChartInstance.legend.itemContainers.template;u.paddingTop=null!==(n=t.LegendPadding.top)&&void 0!==n?n:0,u.paddingBottom=null!==(a=t.LegendPadding.bottom)&&void 0!==a?a:0,u.paddingLeft=null!==(i=t.LegendPadding.left)&&void 0!==i?i:0,u.paddingRight=null!==(r=t.LegendPadding.right)&&void 0!==r?r:0}}return this},e.prototype.refreshData=function(e){},e.prototype.hideZeroes=function(e){e.target.dataItem&&0==e.target.dataItem.values.value.percent?e.target.hide():e.target.show()},e}(),J=function(){function e(e){this.Adapter=e,this.DefaultGroupPaddingPercentage=5,this.dangerZone=50,this.LabelWidth=150,this.LabelRightWhenCompressed=20,this.LabelTopWhenCompressed=-5,this.DefaultColumnWidthPercentage=85}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p,h,u=this;if(t.Timeline)return console.error("Timeline not supported for vertical chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var g=this.ChartInstance;if(t.Legend&&(g.legend=new s.Legend,g.legend.position=null!==(n=null==t?void 0:t.LegendPosition)&&void 0!==n?n:"right",g.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var m=this.ChartInstance.legend.itemContainers.template;m.paddingTop=null!==(a=t.LegendPadding.top)&&void 0!==a?a:0,m.paddingBottom=null!==(i=t.LegendPadding.bottom)&&void 0!==i?i:0,m.paddingLeft=null!==(r=t.LegendPadding.left)&&void 0!==r?r:0,m.paddingRight=null!==(o=t.LegendPadding.right)&&void 0!==o?o:0}var f=g.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(f.title.text=t.YAxisTitle,f.title.fontWeight="bold");var y=g.xAxes.push(new s.CategoryAxis);t.XAxisTitle&&(y.title.text=t.XAxisTitle,y.title.fontWeight="bold"),f.min=0,y.dataFields.category="key",y.renderer.cellStartLocation=l.percent(null!==(d=t.GroupPaddingPercentage)&&void 0!==d?d:this.DefaultGroupPaddingPercentage).value,y.renderer.cellEndLocation=l.percent(100-(null!==(c=t.GroupPaddingPercentage)&&void 0!==c?c:this.DefaultGroupPaddingPercentage)).value,y.renderer.grid.template.location=0,y.renderer.minGridDistance=null!==(p=null==t?void 0:t.MinGridDistance)&&void 0!==p?p:30;var v=y.renderer.labels.template;v.truncate=!0,v.maxWidth=null!==(h=t.LabelWidth)&&void 0!==h?h:this.LabelWidth,v.tooltipText="{category}",(null==(null==t?void 0:t.AdaptLabelSizeAndOrientation)||(null==t?void 0:t.AdaptLabelSizeAndOrientation))&&y.events.on("sizechanged",(function(e){var n,a,i,r=e.target,o=r.pixelWidth/(r.endIndex-r.startIndex);if(o<r.renderer.labels.template.maxWidth){var l=o<(null!==(n=null==t?void 0:t.LabelVerticalOrientationCutoffWidth)&&void 0!==n?n:u.dangerZone);r.renderer.labels.template.rotation=l?-90:-45,r.renderer.labels.template.dx=(null!==(a=t.LabelRightWhenCompressed)&&void 0!==a?a:l)?0:u.LabelRightWhenCompressed,r.renderer.labels.template.dy=null!==(i=t.LabelTopWhenCompressed)&&void 0!==i?i:u.LabelTopWhenCompressed,r.renderer.labels.template.horizontalCenter="right",r.renderer.labels.template.verticalCenter="middle"}else r.renderer.labels.template.rotation=0,r.renderer.labels.template.dx=0,r.renderer.labels.template.dy=0,r.renderer.labels.template.horizontalCenter="middle",r.renderer.labels.template.verticalCenter="top"}));for(var C=this.Adapter?this.Adapter.adaptDataForVertical2DChart(e):e,b=[],I=0;I<C.groups.length;I++){for(var D=C.groups[I],L={key:D.name},x=0;x<D.values.length;x++){var S=D.values[x];L[S.k]=S.v}b.push(L)}for(var P in g.data=b,C.colorInfos&&(g.colors.list=C.colorInfos.map((function(e){return l.color(e.color)}))),b[0])"key"!==P&&this.createSeries(g,t,P,P);return this},e.prototype.refreshData=function(e){},e.prototype.createSeries=function(e,t,n,a){var i,r=this,o=e.series.push(new s.ColumnSeries);return o.dataFields.valueY=n,o.dataFields.categoryX="key",o.name=a,o.columns.template.tooltipText="{name} {categoryX}: [bold]{valueY}[/]",o.columns.template.fillOpacity=.8,o.columns.template.width=l.percent(null!==(i=t.ColumnWidthPercentage)&&void 0!==i?i:this.DefaultColumnWidthPercentage),o.events.on("hidden",(function(){return r.arrangeColumns})),o.events.on("shown",(function(){return r.arrangeColumns})),o},e.prototype.arrangeColumns=function(){var e=this.ChartInstance,t=e.series.getIndex(0),n=e.xAxes.getIndex(0),a=1-n.renderer.cellStartLocation-(1-n.renderer.cellEndLocation);if(t.dataItems.length>1){var i=n.getX(t.dataItems.getIndex(0),"categoryX"),r=(n.getX(t.dataItems.getIndex(1),"categoryX")-i)/e.series.length*a;if(l.isNumber(r)){var o=e.series.length/2,s=0;e.series.each((function(t){t.isHidden||t.isHiding?t.dummyData=e.series.indexOf(t):(t.dummyData=s,s++)}));var d=s/2;e.series.each((function(t){var n=e.series.indexOf(t),a=(t.dummyData-n+o-d)*r;t.animate({property:"dx",to:a},t.interpolationDuration,t.interpolationEasing),t.bulletsContainer.animate({property:"dx",to:a},t.interpolationDuration,t.interpolationEasing)}))}}},e}(),ee=function(){function e(e){this.Adapter=e,this.dangerZone=50,this.LabelWidth=150,this.LabelRightWhenCompressed=20,this.LabelTopWhenCompressed=-5,this.DefaultColumnWidthPercentage=85}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p,h=this;if(t.Timeline)return console.error("Timeline not supported for vertical chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var u=this.ChartInstance,g=this.Adapter?this.Adapter.adaptDataForVerticalChart(e):e;if(u.data=g.values,t.Legend&&(u.legend=new s.Legend,u.legend.position=null!==(n=null==t?void 0:t.LegendPosition)&&void 0!==n?n:"right",u.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var m=this.ChartInstance.legend.itemContainers.template;m.paddingTop=null!==(a=t.LegendPadding.top)&&void 0!==a?a:0,m.paddingBottom=null!==(i=t.LegendPadding.bottom)&&void 0!==i?i:0,m.paddingLeft=null!==(r=t.LegendPadding.left)&&void 0!==r?r:0,m.paddingRight=null!==(o=t.LegendPadding.right)&&void 0!==o?o:0}var f=u.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(f.title.text=t.YAxisTitle,f.title.fontWeight="bold");var y=u.xAxes.push(new s.CategoryAxis);t.XAxisTitle&&(y.title.text=t.XAxisTitle,y.title.fontWeight="bold"),y.dataFields.category="k",y.renderer.grid.template.location=0,y.renderer.minGridDistance=null!==(d=null==t?void 0:t.MinGridDistance)&&void 0!==d?d:30;var v=y.renderer.labels.template;v.truncate=!0,v.maxWidth=null!==(c=t.LabelWidth)&&void 0!==c?c:this.LabelWidth,v.tooltipText="{category}",(null==(null==t?void 0:t.AdaptLabelSizeAndOrientation)||(null==t?void 0:t.AdaptLabelSizeAndOrientation))&&y.events.on("sizechanged",(function(e){var n,a,i,r=e.target,o=r.pixelWidth/(r.endIndex-r.startIndex);if(o<r.renderer.labels.template.maxWidth){var l=o<(null!==(n=null==t?void 0:t.LabelVerticalOrientationCutoffWidth)&&void 0!==n?n:h.dangerZone);r.renderer.labels.template.rotation=l?-90:-45,r.renderer.labels.template.dx=(null!==(a=t.LabelRightWhenCompressed)&&void 0!==a?a:l)?0:h.LabelRightWhenCompressed,r.renderer.labels.template.dy=null!==(i=t.LabelTopWhenCompressed)&&void 0!==i?i:h.LabelTopWhenCompressed,r.renderer.labels.template.horizontalCenter="right",r.renderer.labels.template.verticalCenter="middle"}else r.renderer.labels.template.rotation=0,r.renderer.labels.template.dx=0,r.renderer.labels.template.dy=0,r.renderer.labels.template.horizontalCenter="middle",r.renderer.labels.template.verticalCenter="top"}));var C=u.series.push(new s.ColumnSeries);C.dataFields.valueY="v",C.dataFields.categoryX="k",C.name="",C.columns.template.tooltipText="{categoryX}: [bold]{valueY}[/]",C.columns.template.fillOpacity=.8,C.columns.template.width=l.percent(null!==(p=t.ColumnWidthPercentage)&&void 0!==p?p:this.DefaultColumnWidthPercentage);var b=C.columns.template;return b.strokeWidth=2,b.strokeOpacity=1,this},e.prototype.refreshData=function(e){},e}(),te=function(){function e(e){this.Adapter=e,this.dangerZone=50,this.LabelWidth=150,this.LabelRightWhenCompressed=20,this.LabelTopWhenCompressed=-5,this.DefaultColumnWidthPercentage=85}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p=this;if(t.Timeline)return console.error("Timeline not supported for vertical chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var h=this.ChartInstance,u=h.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(u.title.text=t.YAxisTitle,u.title.fontWeight="bold");var g=h.xAxes.push(new s.CategoryAxis);t.XAxisTitle&&(g.title.text=t.XAxisTitle,g.title.fontWeight="bold"),u.min=0,g.dataFields.category="key",g.renderer.grid.template.location=0,g.renderer.minGridDistance=null!==(n=null==t?void 0:t.MinGridDistance)&&void 0!==n?n:30;var m=g.renderer.labels.template;m.truncate=!0,m.maxWidth=null!==(a=t.LabelWidth)&&void 0!==a?a:this.LabelWidth,m.tooltipText="{category}",(null==(null==t?void 0:t.AdaptLabelSizeAndOrientation)||(null==t?void 0:t.AdaptLabelSizeAndOrientation))&&g.events.on("sizechanged",(function(e){var n,a,i,r=e.target,o=r.pixelWidth/(r.endIndex-r.startIndex);if(o<r.renderer.labels.template.maxWidth){var l=o<(null!==(n=null==t?void 0:t.LabelVerticalOrientationCutoffWidth)&&void 0!==n?n:p.dangerZone);r.renderer.labels.template.rotation=l?-90:-45,r.renderer.labels.template.dx=(null!==(a=t.LabelRightWhenCompressed)&&void 0!==a?a:l)?0:p.LabelRightWhenCompressed,r.renderer.labels.template.dy=null!==(i=t.LabelTopWhenCompressed)&&void 0!==i?i:p.LabelTopWhenCompressed,r.renderer.labels.template.horizontalCenter="right",r.renderer.labels.template.verticalCenter="middle"}else r.renderer.labels.template.rotation=0,r.renderer.labels.template.dx=0,r.renderer.labels.template.dy=0,r.renderer.labels.template.horizontalCenter="middle",r.renderer.labels.template.verticalCenter="top"}));for(var f=this.Adapter?this.Adapter.adaptDataForVerticalStackedChart(e):e,y=[],v=0;v<f.groups.length;v++){for(var C=f.groups[v],b={key:C.name},I=0;I<C.values.length;I++){var D=C.values[I];b[D.k]=D.v}y.push(b)}for(var L in h.data=y,y[0])"key"!==L&&this.createSeriesStacked(h,t,L,L);if(t.Legend&&(h.legend=new s.Legend,h.legend.position=null!==(i=null==t?void 0:t.LegendPosition)&&void 0!==i?i:"right",h.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var x=this.ChartInstance.legend.itemContainers.template;x.paddingTop=null!==(r=t.LegendPadding.top)&&void 0!==r?r:0,x.paddingBottom=null!==(o=t.LegendPadding.bottom)&&void 0!==o?o:0,x.paddingLeft=null!==(d=t.LegendPadding.left)&&void 0!==d?d:0,x.paddingRight=null!==(c=t.LegendPadding.right)&&void 0!==c?c:0}return this},e.prototype.refreshData=function(e){},e.prototype.createSeriesStacked=function(e,t,n,a){var i,r=e.series.push(new s.ColumnSeries);return r.name=a,r.dataFields.valueY=n,r.dataFields.categoryX="key",r.sequencedInterpolation=!0,r.columns.template.tooltipText="{name} {categoryX}: [bold]{valueY}[/]",r.columns.template.fillOpacity=.8,r.columns.template.width=l.percent(null!==(i=t.ColumnWidthPercentage)&&void 0!==i?i:this.DefaultColumnWidthPercentage),r.stacked=!0,r},e}(),ne=function(e){function t(t,n,a,i,r,o,l,s,d,c,p){var h=e.call(this,t,l,o,n,a,s,d,c,p)||this;return h.dateService=i,h.adapter=r,h}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","Type"]},t.prototype.getCastedSettings=function(){var e,t,n,a,i,r;switch(this.Type){case"pie":return null!==(e=this.Settings)&&void 0!==e?e:new L;case"area":return null!==(t=this.Settings)&&void 0!==t?t:new I;case"line":return null!==(n=this.Settings)&&void 0!==n?n:new D;case"vertical":return null!==(a=this.Settings)&&void 0!==a?a:new S;case"vertical-2d":return null!==(i=this.Settings)&&void 0!==i?i:new x;case"vertical-stacked":return null!==(r=this.Settings)&&void 0!==r?r:new P}},t.prototype.fillSpecificSettings=function(e){},t.prototype.graphicate=function(e){switch(this.Type){case"pie":return new K(this.adapter).graphicate(this.Data,e);case"area":return new Q(this.adapter).graphicate(this.Data,e);case"line":return new U(this.adapter,this.dateService).graphicate(this.Data,e);case"vertical":return new ee(this.adapter).graphicate(this.Data,e);case"vertical-2d":return new J(this.adapter).graphicate(this.Data,e);case"vertical-stacked":return new te(this.adapter).graphicate(this.Data,e)}},t}(q);ne.decorators=[{type:t.Component,args:[{selector:"es-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],ne.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:n.DateService},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},ne.propDecorators={Type:[{type:t.Input}],Data:[{type:t.Input}],DataArray:[{type:t.Input}]};var ae=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new I},t.prototype.fillSpecificSettings=function(e){},t.prototype.graphicate=function(e){return new Q(this.adapter).graphicate(this.Data,e)},t}(q);ae.decorators=[{type:t.Component,args:[{selector:"es-area-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],ae.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},ae.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}]};var ie=function(e){function t(t,n,a,i,r,o,l,s,d,c,p){var h=e.call(this,t,l,o,n,a,s,d,c,p)||this;return h.adapter=i,h.dateService=r,h}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray","Step","DataGroupBucketSize","DataGroupingThreshold","StrokeSize","AllowGaps","MergeDatasets","FinalInstants","Fill","Min","Max"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new D},t.prototype.fillSpecificSettings=function(e){e.Step=null!=e.Step?e.Step:this.Step,e.DataGroupBucketSize=null!=e.DataGroupBucketSize?e.DataGroupBucketSize:this.DataGroupBucketSize,e.StrokeSize=null!=e.StrokeSize?e.StrokeSize:this.StrokeSize,e.DataGroupingThreshold=null!=e.DataGroupingThreshold?e.DataGroupingThreshold:this.DataGroupingThreshold,e.AllowGaps=null!=e.AllowGaps?e.AllowGaps:this.AllowGaps,e.MergeDatasets=null!=e.MergeDatasets?e.MergeDatasets:this.MergeDatasets,e.FinalInstants=null!=e.FinalInstants?e.FinalInstants:this.FinalInstants,e.Min=null!=e.Min?e.Min:this.Min,e.Max=null!=e.Max?e.Max:this.Max,e.Fill=null!=e.Fill?e.Fill:this.Fill},t.prototype.graphicate=function(e){return new U(this.adapter,this.dateService).graphicate(this.Data,e)},t}(q);ie.decorators=[{type:t.Component,args:[{selector:"es-line-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],ie.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:n.DateService},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},ie.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],Step:[{type:t.Input}],DataGroupBucketSize:[{type:t.Input}],DataGroupingThreshold:[{type:t.Input}],StrokeSize:[{type:t.Input}],AllowGaps:[{type:t.Input}],MergeDatasets:[{type:t.Input}],FinalInstants:[{type:t.Input}],Min:[{type:t.Input}],Max:[{type:t.Input}],Fill:[{type:t.Input}]};var re=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray","HideZeroes","Mode3D","LabelsWrap","LabelsTruncate","LabelsWidth","LabelsVisible"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new L},t.prototype.fillSpecificSettings=function(e){e.HideZeroes=null!=e.HideZeroes?e.HideZeroes:this.HideZeroes,e.Mode3D=null!=e.Mode3D?e.Mode3D:this.Mode3D,e.DonutRadiusPercentage=null!=e.DonutRadiusPercentage?e.DonutRadiusPercentage:this.DonutRadiusPercentage,e.LabelsWrap=null!=e.LabelsWrap?e.LabelsWrap:this.LabelsWrap,e.LabelsTruncate=null!=e.LabelsTruncate?e.LabelsTruncate:this.LabelsTruncate,e.LabelsWidth=null!=e.LabelsWidth?e.LabelsWidth:this.LabelsWidth,e.LabelsVisible=null!=e.LabelsVisible?e.LabelsVisible:this.LabelsVisible},t.prototype.graphicate=function(e){return new K(this.adapter).graphicate(this.Data,e)},t}(q);re.decorators=[{type:t.Component,args:[{selector:"es-pie-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],re.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},re.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],HideZeroes:[{type:t.Input}],Mode3D:[{type:t.Input}],DonutRadiusPercentage:[{type:t.Input}],LabelsWrap:[{type:t.Input}],LabelsTruncate:[{type:t.Input}],LabelsWidth:[{type:t.Input}],LabelsVisible:[{type:t.Input}]};var oe=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new x},t.prototype.fillSpecificSettings=function(e){e.ColumnWidthPercentage=null!=e.ColumnWidthPercentage?e.ColumnWidthPercentage:this.ColumnWidthPercentage,e.GroupPaddingPercentage=null!=e.GroupPaddingPercentage?e.GroupPaddingPercentage:this.GroupPaddingPercentage,e.LabelWidth=null!=e.LabelWidth?e.LabelWidth:this.LabelWidth,e.LabelVerticalOrientationCutoffWidth=null!=e.LabelVerticalOrientationCutoffWidth?e.LabelVerticalOrientationCutoffWidth:this.LabelVerticalOrientationCutoffWidth,e.LabelRightWhenCompressed=null!=e.LabelRightWhenCompressed?e.LabelRightWhenCompressed:this.LabelRightWhenCompressed,e.LabelTopWhenCompressed=null!=e.LabelTopWhenCompressed?e.LabelTopWhenCompressed:this.LabelTopWhenCompressed},t.prototype.graphicate=function(e){return new J(this.adapter).graphicate(this.Data,e)},t}(q);oe.decorators=[{type:t.Component,args:[{selector:"es-vertical-2d-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],oe.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},oe.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],ColumnWidthPercentage:[{type:t.Input}],GroupPaddingPercentage:[{type:t.Input}],LabelWidth:[{type:t.Input}],LabelVerticalOrientationCutoffWidth:[{type:t.Input}],LabelRightWhenCompressed:[{type:t.Input}],LabelTopWhenCompressed:[{type:t.Input}]};var le=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new S},t.prototype.fillSpecificSettings=function(e){e.ColumnWidthPercentage=null!=e.ColumnWidthPercentage?e.ColumnWidthPercentage:this.ColumnWidthPercentage,e.LabelWidth=null!=e.LabelWidth?e.LabelWidth:this.LabelWidth,e.LabelVerticalOrientationCutoffWidth=null!=e.LabelVerticalOrientationCutoffWidth?e.LabelVerticalOrientationCutoffWidth:this.LabelVerticalOrientationCutoffWidth,e.LabelRightWhenCompressed=null!=e.LabelRightWhenCompressed?e.LabelRightWhenCompressed:this.LabelRightWhenCompressed,e.LabelTopWhenCompressed=null!=e.LabelTopWhenCompressed?e.LabelTopWhenCompressed:this.LabelTopWhenCompressed},t.prototype.graphicate=function(e){return new ee(this.adapter).graphicate(this.Data,e)},t}(q);le.decorators=[{type:t.Component,args:[{selector:"es-vertical-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],le.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},le.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],ColumnWidthPercentage:[{type:t.Input}],LabelWidth:[{type:t.Input}],LabelVerticalOrientationCutoffWidth:[{type:t.Input}],LabelRightWhenCompressed:[{type:t.Input}],LabelTopWhenCompressed:[{type:t.Input}]};var se=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new P},t.prototype.fillSpecificSettings=function(e){e.ColumnWidthPercentage=null!=e.ColumnWidthPercentage?e.ColumnWidthPercentage:this.ColumnWidthPercentage,e.LabelWidth=null!=e.LabelWidth?e.LabelWidth:this.LabelWidth,e.LabelVerticalOrientationCutoffWidth=null!=e.LabelVerticalOrientationCutoffWidth?e.LabelVerticalOrientationCutoffWidth:this.LabelVerticalOrientationCutoffWidth,e.LabelRightWhenCompressed=null!=e.LabelRightWhenCompressed?e.LabelRightWhenCompressed:this.LabelRightWhenCompressed,e.LabelTopWhenCompressed=null!=e.LabelTopWhenCompressed?e.LabelTopWhenCompressed:this.LabelTopWhenCompressed},t.prototype.graphicate=function(e){return new te(this.adapter).graphicate(this.Data,e)},t}(q);se.decorators=[{type:t.Component,args:[{selector:"es-vertical-stacked-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],se.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},se.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],ColumnWidthPercentage:[{type:t.Input}],LabelWidth:[{type:t.Input}],LabelVerticalOrientationCutoffWidth:[{type:t.Input}],LabelRightWhenCompressed:[{type:t.Input}],LabelTopWhenCompressed:[{type:t.Input}]};var de=function(e,t,n,a){this.data=e,this.title=t,this.dataRetrieveDto=n,this.dataRetrieveFunction=a},ce=function(){function e(){this.onPageChange=new t.EventEmitter}return e.prototype.ngOnChanges=function(){if(!this.Items&&!this.Dtos||0==(this.Items||this.Dtos).length)throw new Error("Chart array cannot be empty!");var e=this.StartIndex||0;this.currentindex=e,this.currentpage=e+1,this.handlePageChange()},e.prototype.handlePageChange=function(){this.finalIndex=this.currentpage-1,this.currentindex=this.currentpage-1;var e=this.Items&&this.Items.length>0?this.Items[this.finalIndex].data:this.Dtos[this.finalIndex];this.onPageChange.emit({data:e,index:this.finalIndex})},e.prototype.Next=function(){var e=this;this.currentpage++,this.onPageChange.emit({data:null,index:this.currentpage-1}),setTimeout((function(){e.currentindex==e.currentpage-2?e.handlePageChange():e.currentindex++}),this.BrowseDelayMs)},e.prototype.Previous=function(){var e=this;this.currentpage--,this.onPageChange.emit({data:null,index:this.currentpage-1}),setTimeout((function(){e.currentindex==e.currentpage?e.handlePageChange():e.currentindex--}),this.BrowseDelayMs)},e}();ce.decorators=[{type:t.Component,args:[{selector:"chart-pager",template:'<div *ngIf="(Items || Dtos) && (Items || Dtos).length > 0" class="pcs-no-selection">\r\n <div class="pcs-button pcs-backward">\r\n <svg class="pcs-svg-header">\r\n <g class="pcs-svg-button-container" role="button" (click)="currentpage != 1 && Previous(); $event.stopPropagation(); $event.preventDefault();">\r\n \x3c!--Pulsante e freccettina all\'interno--\x3e\r\n <g class="pcs-svg-button" [style.cursor]="currentpage == 1 ? \'not-allowed\' : \'pointer\'"><path d="M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z"></path></g>\r\n <g class="pcs-svg-arrow pcs-svg-arrow-left"><path d="M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class="pcs-infos">\r\n <ng-container *ngIf="headerInner_tr">\r\n <ng-container *ngTemplateOutlet="headerInner_tr; context : {$implicit: (Items || Dtos)[currentpage - 1]}"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class="pcs-button pcs-forward">\r\n <svg class="pcs-svg-header">\r\n <g class="pcs-svg-button-container" role="button" (click)="(Items || Dtos).length != currentpage && Next(); $event.stopPropagation(); $event.preventDefault();">\r\n \x3c!--Pulsante e freccettina all\'interno--\x3e\r\n <g class="pcs-svg-button" [style.cursor]="(Items || Dtos).length == currentpage ? \'not-allowed\' : \'pointer\'"><path d="M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z"></path></g>\r\n <g class="pcs-svg-arrow pcs-svg-arrow-right"><path d="M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div style="clear: both;"></div>\r\n</div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".pcs-button{width:60px}.pcs-forward{float:right;text-align:end}.pcs-backward{float:left}.pcs-svg-header{width:57px;height:40px}.pcs-svg-button-container{outline:medium none currentcolor}.pcs-svg-arrow{pointer-events:none;fill:#555}.pcs-svg-arrow-right{transform:translate(44px,36px) rotate(180deg)}.pcs-svg-arrow-left{transform:translate(13px,4px)}.pcs-svg-button{fill:#d9d9d9;stroke:#fff;fill-opacity:1;stroke-opacity:1}.pcs-svg-button:hover{fill:#a3a3a3;cursor:pointer}.pcs-infos{width:calc(100% - 120px);height:44px;float:left}.pcs-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}"]}]}],ce.propDecorators={Items:[{type:t.Input}],Dtos:[{type:t.Input}],BrowseDelayMs:[{type:t.Input}],StartIndex:[{type:t.Input}],onPageChange:[{type:t.Output}],headerInner_tr:[{type:t.ContentChild,args:["header_inner",{static:!1}]}]};var pe=[ne,ie,re,oe,le,se,ce,ae],he=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:z,useValue:(null==t?void 0:t.locale)||"it-IT"},{provide:j,useValue:null==(null==t?void 0:t.animations)||(null==t?void 0:t.animations)},{provide:M,useValue:(null==t?void 0:t.theme)||"spiritedaway"},{provide:R,useValue:null!=(null==t?void 0:t.debugMode)&&(null==t?void 0:t.debugMode)},{provide:d,useClass:(null==t?void 0:t.adapter)||d},{provide:$,useValue:new $(null!=(null==t?void 0:t.debugMode)&&(null==t?void 0:t.debugMode))}]}},e}();he.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule],declarations:C(pe),providers:[E],exports:C(pe)}]}],e.AreaChartData=h,e.AreaChartSettings=I,e.BaseAdapter=d,e.BaseInterval=T,e.BaseSettings=b,e.ChartThemes=N,e.DateValue=w,e.EsAreaChartComponent=ae,e.EsChartComponent=ne,e.EsChartsModule=he,e.EsLineChartComponent=ie,e.EsPieChartComponent=re,e.EsVertical2DChartComponent=oe,e.EsVerticalChartComponent=le,e.EsVerticalStackedChartComponent=se,e.KeyValue=k,e.KeyValueColor=O,e.LegendPad=A,e.LineChartData=c,e.LineChartSettings=D,e.LineSerie=W,e.PagedChartData=de,e.PieChartData=p,e.PieChartSettings=L,e.Vertical2DChartData=u,e.Vertical2DChartSettings=x,e.VerticalChartData=g,e.VerticalChartSettings=S,e.VerticalStackedChartData=m,e.VerticalStackedChartSettings=P,e.ɵa=T,e.ɵb=q,e.ɵc=$,e.ɵd=E,e.ɵe=z,e.ɵf=j,e.ɵg=M,e.ɵh=R,e.ɵi=d,e.ɵj=ne,e.ɵk=ie,e.ɵl=re,e.ɵm=oe,e.ɵn=le,e.ɵo=se,e.ɵp=ce,e.ɵq=ae,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@esfaenza/extensions"),require("@angular/common"),require("@amcharts/amcharts4/core"),require("@amcharts/amcharts4/charts")):"function"==typeof define&&define.amd?define("@esfaenza/es-charts",["exports","@angular/core","@esfaenza/extensions","@angular/common","@amcharts/amcharts4/core","@amcharts/amcharts4/charts"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).esfaenza=e.esfaenza||{},e.esfaenza["es-charts"]={}),e.ng.core,e.extensions,e.ng.common,e.am4core,e.am4charts)}(this,(function(e,t,n,a,i,r){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var l=o(i),s=o(r),d=function(){function e(){}return e.prototype.adaptDataForAreaChart=function(e){return e},e.prototype.adaptDataForLineChart=function(e){return e},e.prototype.adaptDataForPieChart=function(e){return e},e.prototype.adaptDataForVerticalChart=function(e){return e},e.prototype.adaptDataForVertical2DChart=function(e){return e},e.prototype.adaptDataForVerticalStackedChart=function(e){return e},e}();d.decorators=[{type:t.Injectable}];var c=function(e){void 0===e&&(e=[]),this.series=e},p=function(e){void 0===e&&(e=[]),this.values=e},h=function(e,t){void 0===e&&(e=[]),this.groups=e,this.interval=t},u=function(e,t){void 0===e&&(e=[]),this.groups=e,this.colorInfos=t},g=function(e){void 0===e&&(e=[]),this.values=e},m=function(e){void 0===e&&(e=[]),this.groups=e},f=function(e,t){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}Object.create;var b=function(){},I=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),D=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(b),x=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),S=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),P=function(e){function t(){return e.call(this)||this}return y(t,e),t}(b),T=function(){},A=function(){},w=function(e,t){this.d=e,this.v=t},k=function(e,t){this.k=e,this.v=t},O=function(e,t,n){this.k=e,this.v=t,this.c=n},W=function(e,t,n,a,i,r){this.name=e,this.values=t,this.interval=n,this.color=a,this.uom=i,this.fill=r},z=new t.InjectionToken("ESC_LOCALE"),j=new t.InjectionToken("ESC_ANIMATIONS"),M=new t.InjectionToken("ESC_THEME"),R=new t.InjectionToken("ESC_LOGS"),E=function(){function e(e){this.logs=e,this.Initializations=[],this.InitializedGraphs=[]}return e.prototype.register=function(e,t){if(-1!=this.InitializedGraphs.indexOf(e))throw"Attempting to register a duplicate chart '"+e+"'. Make sure the 'name' properties of your charts are univoque";this.log("DISPATCHER: Registering chart creation function execution for "+e),this.Initializations.push({name:e,function:t}),1==this.Initializations.length&&(this.log("DISPATCHER: Initial drain started"),this.drainInitQueues())},e.prototype.deregisterGraph=function(e){var t=this.InitializedGraphs.indexOf(e);-1!=t?(this.log("DISPATCHER: Chart deregistered "+e),this.InitializedGraphs.splice(t,1)):this.log("DISPATCHER: Registration missing for chart "+e+" it was probably destroyed during load")},e.prototype.drainInitQueues=function(){var e=this,t=this.Initializations[0];this.log("DISPATCHER: Executing initialization function for chart "+t.name),t.function().then((function(){e.log("DISPATCHER: initialization for chart "+t.name+" is done"),e.InitializedGraphs.push(t.name),e.Initializations.splice(0,1),e.Initializations.length>=1?(e.log("DISPATCHER: Found queued initializations. Continuing"),e.drainInitQueues()):e.log("DISPATCHER: queue is over, nothing more to do")}))},e.prototype.log=function(e){this.logs&&console.log("@esfaenza/es-charts: "+e)},e}();E.decorators=[{type:t.Injectable}],E.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Inject,args:[R]}]}]};var _="spiritedaway",F="moonrisekingdom",V="frozen",G="dark",B="kelly",Z="material",X="dataviz",Y="none",H="animated",N=function(){function e(){}return Object.defineProperty(e.prototype,"spiritedaway",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"moonrisekingdom",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frozen",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dark",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"kelly",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return Z},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataviz",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"none",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animated",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(e,"spiritedaway",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e,"moonrisekingdom",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e,"frozen",{get:function(){return V},enumerable:!1,configurable:!0}),Object.defineProperty(e,"dark",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(e,"kelly",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e,"material",{get:function(){return Z},enumerable:!1,configurable:!0}),Object.defineProperty(e,"dataviz",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(e,"none",{get:function(){return Y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"animated",{get:function(){return H},enumerable:!1,configurable:!0}),e}(),$=function(){function e(e){this.logs=e,this.AnimationsAreLoaded=!1,this.LastLoadedTheme="",this.themeCache={},this.localizationCache={}}return e.prototype.applyAnimations=function(e){var t=this;return this.AnimationsAreLoaded?(this.log("CORE: theme already applyed "+N.animated),new Promise((function(e){e(!0)}))):this.importIfNeeded("themes",N.animated).then((function(){t.log("CORE: Applying theme "+N.animated),e.useTheme(t.themeCache[N.animated]),t.AnimationsAreLoaded=!0}))},e.prototype.unapplyAnimations=function(e){return this.AnimationsAreLoaded?(this.log("CORE: Animations in use, unapplying theme "+N.animated),e.unuseTheme(this.themeCache[N.animated]),this.AnimationsAreLoaded=!1):this.log("CORE: Animations already unused, no need to unapply them"),new Promise((function(e){e(!0)}))},e.prototype.applyTheme=function(e,t){var n=this;return this.LastLoadedTheme==t?(this.log("CORE: theme already applied "+t),new Promise((function(e){e(!0)}))):(this.unapplyPreviousTheme(e),t==N.none?(this.LastLoadedTheme=N.none,new Promise((function(e){e(!0)}))):this.importIfNeeded("themes",t).then((function(){n.log("CORE: Applying theme "+t),e.useTheme(n.themeCache[t]),n.LastLoadedTheme=t})))},e.prototype.unapplyPreviousTheme=function(e){this.LastLoadedTheme&&this.LastLoadedTheme!=N.none&&(this.log("CORE: Unapplying previously used theme "+this.LastLoadedTheme),e.unuseTheme(this.themeCache[this.LastLoadedTheme]))},e.prototype.applyLocale=function(e,t){var n=this;return this.importIfNeeded("lang",t).then((function(){n.log("Chart "+e.htmlContainer.id+": applying locale "+t),e.language.locale=n.localizationCache[t]}))},e.prototype.importIfNeeded=function(e,t){var n=this;if(("themes"!=e||this.themeCache[t])&&("lang"!=e||this.localizationCache[t]))return this.log("CORE: "+("lang"==e?"Language ":"Theme ")+t+" already loaded"),new Promise((function(e){e(!0)}));switch(this.log("CORE: Loading "+("lang"==e?"language ":"theme ")+t),e){case"themes":switch(t){case N.spiritedaway:return import("@amcharts/amcharts4/themes/spiritedaway").then((function(e){return n.themeCache[t]=e.default}));case N.moonrisekingdom:return import("@amcharts/amcharts4/themes/moonrisekingdom").then((function(e){return n.themeCache[t]=e.default}));case N.frozen:return import("@amcharts/amcharts4/themes/frozen").then((function(e){return n.themeCache[t]=e.default}));case N.dark:return import("@amcharts/amcharts4/themes/dark").then((function(e){return n.themeCache[t]=e.default}));case N.kelly:return import("@amcharts/amcharts4/themes/kelly").then((function(e){return n.themeCache[t]=e.default}));case N.material:return import("@amcharts/amcharts4/themes/material").then((function(e){return n.themeCache[t]=e.default}));case N.dataviz:return import("@amcharts/amcharts4/themes/dataviz").then((function(e){return n.themeCache[t]=e.default}));case N.animated:return import("@amcharts/amcharts4/themes/animated").then((function(e){return n.themeCache[t]=e.default}))}break;case"lang":switch(t){case"it-IT":return import("@amcharts/amcharts4/lang/it_IT").then((function(e){return n.localizationCache[t]=e.default}));case"en-US":return import("@amcharts/amcharts4/lang/en_US").then((function(e){return n.localizationCache[t]=e.default}))}}return this.log("CORE: Loading Failed. "+("lang"==e?"Language ":"Theme")+" not recognized: "+t),new Promise((function(e){e(!0)}))},e.prototype.log=function(e){this.logs&&console.log("@esfaenza/es-charts: "+e)},e}(),q=function(){function e(e,n,a,i,r,o,l,s,d){this.el=e,this.platformId=n,this.zone=a,this.Charter=i,this.Dispatcher=r,this.logs=o,this.animations=l,this.locale=s,this.theme=d,this.name="",this.BrowseDelayMs=500,this.onSelectionChanged=new t.EventEmitter,this.onSeriesClicked=new t.EventEmitter,this.onLoadStart=new t.EventEmitter,this.onLoadEnd=new t.EventEmitter,this.isPaged=!1,this.initDone=!1}return e.prototype.ngOnInit=function(){var e,t,n,a,i,r;this.Animations=null!=(null===(e=this.Settings)||void 0===e?void 0:e.Animations)?null===(t=this.Settings)||void 0===t?void 0:t.Animations:null!=this.Animations?this.Animations:this.animations,this.Theme=null!=(null===(n=this.Settings)||void 0===n?void 0:n.Theme)?null===(a=this.Settings)||void 0===a?void 0:a.Theme:null!=this.Theme?this.Theme:this.theme,this.Locale=null!=(null===(i=this.Settings)||void 0===i?void 0:i.Locale)?null===(r=this.Settings)||void 0===r?void 0:r.Locale:null!=this.Locale?this.Locale:this.locale,this.isPaged=this.DataArray&&this.DataArray.length>0&&!this.Data||this.DataDtos&&this.DataDtos.length>0&&!!this.DataRetrieve,this.log("Chart "+this.name+": ngOnInit")},e.prototype.ngOnChanges=function(e){if(this.initDone){this.log("Chart "+this.name+": ngOnChanges");var t=C(["Timeline","Legend","Settings","Animations","Theme","Locale"],this.getSpecificPropertiesToCheck());this.checkPropertiesAndRegraphicateAsNeeded(e,t)}},e.prototype.ngAfterViewInit=function(){if(!this.name)throw"a Unique name is mandatory to create a chart";this.log("Chart "+this.name+": ngAfterViewInit, graphicating chart outside Angular"),this.isPaged||this.dispatchLoadChart()},e.prototype.ngOnDestroy=function(){var e=this;this.Chart?(this.log("Chart "+this.name+": Unloading destroyed chart"),this.browserOnly((function(){e.Chart.dispose(),e.Dispatcher.deregisterGraph(e.name)}))):this.log("Chart "+this.name+": Unloading uncreated chart component. It probably was a duplicated")},e.prototype.dispatchLoadChart=function(){var e=this;this.browserOnly((function(){e.Dispatcher.register(e.name,(function(){return e.loadChart()}))}))},e.prototype.loadChart=function(){var e=this;return this.log("Chart "+this.name+": Start loading Modules if needed"),Promise.all([this.setupAmChartsThemes().then((function(){e.log("Chart "+e.name+": Graphicating after modules load");var t=e.getCastedSettings();return e.fillSettings(t),e.fillSpecificSettings(t),e.ChartService=e.graphicate(t),e.Chart=e.ChartService.ChartInstance,e.Chart||e.log("Chart "+e.name+": Could not create graph"),e.Charter.applyLocale(e.Chart,e.Locale).then((function(){return e.initDone=!0}))}))])},e.prototype.fillSettings=function(e){var t,n=this;e.Theme=e.Theme?e.Theme:this.Theme,e.Locale=e.Locale?e.Locale:this.Locale,e.Animations=null!=e.Animations?e.Animations:this.Animations,e.Legend=null!=e.Legend?e.Legend:this.Legend,e.Name=e.Name?e.Name:this.name,e.Timeline=null!=e.Timeline?e.Timeline:this.Timeline,e.AdaptLabelSizeAndOrientation=null!=e.AdaptLabelSizeAndOrientation?e.AdaptLabelSizeAndOrientation:this.AdaptLabelSizeAndOrientation,e.XAxisTitle=e.XAxisTitle?e.XAxisTitle:this.XTitle,e.YAxisTitle=e.YAxisTitle?e.YAxisTitle:this.YTitle,e.LegendPosition=e.LegendPosition?e.LegendPosition:this.LegendPosition,e.HideSeriesOnLabelClick=null!=e.HideSeriesOnLabelClick?e.HideSeriesOnLabelClick:this.HideSeriesOnLabelClick,e.MinGridDistance=null!=e.MinGridDistance?e.MinGridDistance:this.MinGridDistance,e.LegendPadding=e.LegendPadding?e.LegendPadding:null!==(t=this.LegendPadding)&&void 0!==t?t:null,e.ContainerHeight=this.el.nativeElement.parentElement.offsetHeight,e.OnSeriesClickCallback=function(e){n.onSeriesClicked.emit(e)},e.OnSelectionChangedCallback=function(e){n.onSelectionChanged.emit({from:e.from,to:e.to,initial:e.initial})}},e.prototype.checkPropertiesAndRegraphicateAsNeeded=function(e,t){for(var n=!1,a=0;a<t.length;a++)n=n||e[t[a]]&&e[t[a]].currentValue;n&&this.reloadChart()},e.prototype.changePage=function(e){var t=this;if(!e.data)return this.loadingChart=!0,this.DataRetrieve&&this.DataRetrieve(null,e.index),void this.onLoadStart.emit();this.DataRetrieve?this.DataRetrieve(e.data,e.index).then((function(e){t.changePageDataReceived(e)})):this.changePageDataReceived(e.data)},e.prototype.changePageDataReceived=function(e){this.loadingChart=!1,this.onLoadEnd.emit();var t=!this.Data;this.Data=e,t?this.dispatchLoadChart():this.reloadChart()},e.prototype.reloadChart=function(){var e=this;this.browserOnly((function(){e.Chart.isDisposed()||e.Chart.dispose(),e.Dispatcher.deregisterGraph(e.name)})),this.Dispatcher.register(this.name,(function(){return e.loadChart()}))},e.prototype.setupAmChartsThemes=function(){var e=this;return Promise.all([this.Charter.applyTheme(l,this.Theme).then((function(){return e.Animations?e.Charter.applyAnimations(l):e.Charter.unapplyAnimations(l)}))])},e.prototype.log=function(e){this.logs&&console.log("@esfaenza/es-charts: "+e)},e.prototype.browserOnly=function(e){a.isPlatformBrowser(this.platformId)&&this.zone.runOutsideAngular((function(){e()}))},e}();q.decorators=[{type:t.Directive}],q.ctorParameters=function(){return[{type:t.ElementRef},{type:Object},{type:t.NgZone},{type:$},{type:E},{type:Boolean},{type:Boolean},{type:String},{type:String}]},q.propDecorators={XTitle:[{type:t.Input}],YTitle:[{type:t.Input}],Settings:[{type:t.Input}],Legend:[{type:t.Input}],LegendPosition:[{type:t.Input}],Timeline:[{type:t.Input}],name:[{type:t.Input}],Animations:[{type:t.Input}],Theme:[{type:t.Input}],Locale:[{type:t.Input}],HideSeriesOnLabelClick:[{type:t.Input}],MinGridDistance:[{type:t.Input}],AdaptLabelSizeAndOrientation:[{type:t.Input}],LegendPadding:[{type:t.Input}],DataDtos:[{type:t.Input}],DataDtoStartIndex:[{type:t.Input}],DataRetrieve:[{type:t.Input}],BrowseDelayMs:[{type:t.Input}],header_tr:[{type:t.ContentChild,args:["header",{static:!1}]}],loading_template:[{type:t.ContentChild,args:["loading",{static:!1}]}],onSelectionChanged:[{type:t.Output}],onSeriesClicked:[{type:t.Output}],onLoadStart:[{type:t.Output}],onLoadEnd:[{type:t.Output}]};var U=function(){function e(e,t){this.Adapter=e,this.dateExts=t,this.DataGroupBucketSize=1500,this.OpacityOnSelected=.3,this.executionTimers={}}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p,h,u,g=this,m=this.Adapter?this.Adapter.adaptDataForLineChart(e):e,f=null!==(n=t.DataGroupingThreshold)&&void 0!==n?n:3e3,y=null!==(a=t.MergeDatasets)&&void 0!==a&&a,v=null==t.ShowTicks||(null==t?void 0:t.ShowTicks),b=Math.max.apply(Math,C(m.series.map((function(e){return e.values.length}))))>f,I=t.Timeline||b,D=m.series.some((function(e){return e.interval})),L=D?m.series.find((function(e){return e.interval})).interval:null,x=null==(null==t?void 0:t.AllowGaps)?D:null==t?void 0:t.AllowGaps,S=null===(i=null==t?void 0:t.FinalInstants)||void 0===i||i;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var P=this.ChartInstance,T=P.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(T.title.text=t.YAxisTitle,T.title.fontWeight="bold"),t.Min&&(T.min=t.Min),t.Max&&(T.max=t.Max);var A=P.xAxes.push(new s.DateAxis);if(t.XAxisTitle&&(A.title.text=t.XAxisTitle,A.title.fontWeight="bold"),v&&(A.renderer.ticks.template.disabled=!1,A.renderer.ticks.template.strokeOpacity=1,A.renderer.ticks.template.stroke=l.color("#495C43"),A.renderer.ticks.template.strokeWidth=2,A.renderer.ticks.template.length=10,A.renderer.ticks.template.location=0),A.renderer.minGridDistance=null!==(r=null==t?void 0:t.MinGridDistance)&&void 0!==r?r:50,A.renderer.grid.template.location=0,A.minZoomCount=5,A.groupData=b,A.groupCount=null!==(o=t.DataGroupBucketSize)&&void 0!==o?o:this.DataGroupBucketSize,x){if(!D)return console.error("Per utilizzare la funzionalità dei gap è obbligatorio definire un intervallo nelle serie del grafico"),null;A.baseInterval={count:L.count,timeUnit:L.timeunit}}I&&(P.scrollbarX=new s.XYChartScrollbar);var w=[],k=[],O=0;if(y){var W={};m.series.forEach((function(e,t){for(var n=0;n<e.values.length;n++){var a=e.values[n],i=new Date(a.d).valueOf();W[i]||(W[i]={}),W[i]["v"+t]=a.v}}));for(var z=Object.keys(W),j=[],M=0;M<z.length;M++){for(var R=W[z[M]],E={d:new Date(parseInt(z[M]))},_=Object.keys(R),F=0;F<_.length;F++){var V=_[F],G=R[V];E[V]=G}j.push(E)}this.ChartInstance.data=j,A.cursorTooltipEnabled=!1}if(m.series.forEach((function(e,n){var a,i,r;if(e.values[0]&&!(e.values[0].d instanceof Date))for(var o=0;o<e.values.length;o++)e.values[o].d=new Date(e.values[o].d);var d=!0,c=null;for(o=0;o<e.values.length;o++)if(c){if(e.values[o].d<c){d=!1;break}}else c=e.values[o].d;d||e.values.sort((function(e,t){return e.d.getTime()-t.d.getTime()}));var p=null!=e.fill&&null!=e.fill?e.fill:null!==(a=null==t?void 0:t.Fill)&&void 0!==a&&a,h=(null==t?void 0:t.Step)?new s.StepLineSeries:new s.LineSeries;h.dataFields.valueY="v"+(y?n:""),h.dataFields.dateX="d",h.dataFields.measureUnit=e.uom,h.name=e.name,h.strokeWidth=null!==(i=null==t?void 0:t.StrokeSize)&&void 0!==i?i:1,h.connect=!x,h.minBulletDistance=10,h.tooltipText=y?"":"{name}: [bold]{valueY}[/]",h.tooltip.pointerOrientation="vertical",h.tooltip.background.fillOpacity=.5,h.tooltip.label.padding(12,12,12,12),h.fillOpacity=p?1:1e-4,h.stacked=p,y?(h.tooltip.getFillFromObject=!1,h.tooltip.background.fill=l.color("#eee"),h.tooltip.label.fill=l.color("#00"),h.tooltip.defaultState.transitionDuration=0,h.tooltip.hiddenState.transitionDuration=0,h.dateFormatter.format=function(e){if(!L||!S)return g.dateExts.getFormatted(e,!1,!!L&&"second"==L.timeunit);var t=null;switch(L.timeunit){case"hour":t="day";break;case"minute":t="hour";break;case"second":t="minute"}return t?g.dateExts.adjustDateToFinalInstant(e,t,!!L&&"second"==L.timeunit):void 0},h.adapter.add("tooltipText",(function(){var e="[bold]{dateX.formatDate()}[/]\n";return g.ChartInstance.series.each((function(t){var n=" [font-style: italic]"+h.dataFields.measureUnit||"[/]";e+="["+t.stroke.hex+"]●[/] "+t.name+": [bold]{"+t.dataFields.valueY+"}[/]"+n+"\n"})),e}))):h.data=e.values;var u=h.segments.template;u.states.create("hover").properties.strokeWidth=(null!==(r=null==t?void 0:t.StrokeSize)&&void 0!==r?r:1)+1,u.states.create("dimmed").properties.stroke=l.color("#dadada"),e.color?k.push(l.color(e.color)):(k.push(P.colors.list[O%P.colors.list.length]),O++),w.push(h)})),P.colors.list=k,w.forEach((function(e){P.series.push(e),I&&P.scrollbarX.series.push(e)})),t.Legend&&(this.ChartInstance.legend=new s.Legend,this.ChartInstance.legend.position=null!==(d=null==t?void 0:t.LegendPosition)&&void 0!==d?d:"right",this.ChartInstance.legend.scrollable=!0,this.ChartInstance.legend.itemContainers.template.tooltipText="{name}",this.ChartInstance.legend.itemContainers.template.events.on("over",(function(e){g.processOver(e.target.dataItem.dataContext)})),this.ChartInstance.legend.itemContainers.template.events.on("out",(function(){g.processOut()})),t.LegendPadding)){var B=this.ChartInstance.legend.itemContainers.template;B.paddingTop=null!==(c=t.LegendPadding.top)&&void 0!==c?c:0,B.paddingBottom=null!==(p=t.LegendPadding.bottom)&&void 0!==p?p:0,B.paddingLeft=null!==(h=t.LegendPadding.left)&&void 0!==h?h:0,B.paddingRight=null!==(u=t.LegendPadding.right)&&void 0!==u?u:0}return this.ChartInstance.cursor=new s.XYCursor,this.ChartInstance.cursor.xAxis=A,this.ChartInstance.cursor.yAxis=T,y&&(this.ChartInstance.cursor.maxTooltipDistance=-1),A.events.on("startchanged",(function(e){return g.emitSelectionChanged(e,t)})),A.events.on("endchanged",(function(e){return g.emitSelectionChanged(e,t)})),this},e.prototype.refreshData=function(e){},e.prototype.emitSelectionChanged=function(e,t){t.OnSelectionChangedCallback&&this.throttla("selchange",(function(){var n=e.target,a=new Date(n.minZoomed),i=new Date(n.maxZoomed),r=n.min==n.minZoomed&&n.max==n.maxZoomed;t.OnSelectionChangedCallback({from:a,to:i,initial:r})}),150)},e.prototype.processOver=function(e){var t=this;e.toFront();var n=e.stacked;e.segments.each((function(e){e.setState("hover"),n||(e.fillSprite.fillOpacity=t.OpacityOnSelected)})),n||(e.legendDataItem.marker.children.getIndex(1).fillOpacity=this.OpacityOnSelected),this.ChartInstance.series.each((function(t){if(t!=e){var n=t.stacked;t.segments.each((function(e){e.setState("dimmed"),n||(e.fillSprite.fillOpacity=0)}))}}))},e.prototype.processOut=function(){this.ChartInstance.series.each((function(e){var t=e.stacked;e.segments.each((function(e){e.setState("default"),t||(e.fillSprite.fillOpacity=0)})),t||(e.legendDataItem.marker.children.getIndex(1).fillOpacity=0)}))},e.prototype.throttla=function(e,t,n){var a=this;this.executionTimers[e]&&clearTimeout(this.executionTimers[e]),this.executionTimers[e]=setTimeout((function(){t(),a.executionTimers[e]=null}),n)},e}(),Q=function(){function e(e){this.Adapter=e,this.executionTimers={}}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c=this;if(t.Timeline)return console.error("Timeline not supported for area chart"),null;var p=this.Adapter?this.Adapter.adaptDataForAreaChart(e):e,h=null==t.ShowTicks||(null==t?void 0:t.ShowTicks),u=p.interval;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var g=this.ChartInstance;if(t.Legend&&(g.legend=new s.Legend,g.legend.position=null!==(n=null==t?void 0:t.LegendPosition)&&void 0!==n?n:"right",g.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var m=this.ChartInstance.legend.itemContainers.template;m.paddingTop=null!==(a=t.LegendPadding.top)&&void 0!==a?a:0,m.paddingBottom=null!==(i=t.LegendPadding.bottom)&&void 0!==i?i:0,m.paddingLeft=null!==(r=t.LegendPadding.left)&&void 0!==r?r:0,m.paddingRight=null!==(o=t.LegendPadding.right)&&void 0!==o?o:0}var f=g.yAxes.push(new s.ValueAxis);f.tooltip.disabled=!0,t.YAxisTitle&&(f.title.text=t.YAxisTitle,f.title.fontWeight="bold"),f.min=0;var y=g.xAxes.push(new s.DateAxis);y.renderer.minGridDistance=null!==(d=null==t?void 0:t.MinGridDistance)&&void 0!==d?d:50,y.startLocation=.5,y.endLocation=.5,t.XAxisTitle&&(y.title.text=t.XAxisTitle,y.title.fontWeight="bold"),h&&(y.renderer.ticks.template.disabled=!1,y.renderer.ticks.template.strokeOpacity=1,y.renderer.ticks.template.stroke=l.color("#495C43"),y.renderer.ticks.template.strokeWidth=2,y.renderer.ticks.template.length=10,y.renderer.ticks.template.location=0),u&&(y.baseInterval={count:u.count,timeUnit:u.timeunit});for(var v=[],C={},b=[],I=0;I<p.groups.length;I++){for(var D=p.groups[I],L={date:D.name},x=0;x<D.values.length;x++){var S=D.values[x];L[S.k]=S.v,C[S.k]||(C[S.k]=!0,b.push(S.k))}v.push(L)}return g.data=v,b.forEach((function(e){c.createSeries(g,e)})),g.cursor=new s.XYCursor,g.cursor.xAxis=y,y.events.on("startchanged",(function(e){return c.emitSelectionChanged(e,t)})),y.events.on("endchanged",(function(e){return c.emitSelectionChanged(e,t)})),this},e.prototype.refreshData=function(e){},e.prototype.emitSelectionChanged=function(e,t){t.OnSelectionChangedCallback&&this.throttla("selchange",(function(){var n=e.target,a=new Date(n.minZoomed),i=new Date(n.maxZoomed),r=n.min==n.minZoomed&&n.max==n.maxZoomed;t.OnSelectionChangedCallback({from:a,to:i,initial:r})}),150)},e.prototype.createSeries=function(e,t){var n=e.series.push(new s.LineSeries);return n.dataFields.dateX="date",n.name=t[0].toUpperCase()+t.slice(1),n.dataFields.valueY=t,n.tooltipText="[#000]{valueY.value}[/]",n.tooltip.getStrokeFromObject=!0,n.tooltip.background.strokeWidth=3,n.tooltip.getFillFromObject=!1,n.fillOpacity=.6,n.strokeWidth=2,n.stacked=!0,n},e.prototype.throttla=function(e,t,n){var a=this;this.executionTimers[e]&&clearTimeout(this.executionTimers[e]),this.executionTimers[e]=setTimeout((function(){t(),a.executionTimers[e]=null}),n)},e}(),K=function(){function e(e){this.Adapter=e,this.ViewAbsoluteValues=!0}return e.prototype.graphicate=function(e,t){var n,a,i,r;if(t.Timeline)return console.error("Timeline not supported for pie chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,t.Mode3D?s.PieChart3D:s.PieChart),this.ChartInstance.innerRadius=(t.DonutRadiusPercentage||15)/100*t.ContainerHeight;var o=this.ChartInstance.series.push(t.Mode3D?new s.PieSeries3D:new s.PieSeries);o.dataFields.value="v",o.dataFields.category="k",this.ViewAbsoluteValues&&(o.legendSettings.valueText="{value}",o.labels.template.text="{category}: [bold]{value}[/]"),o.slices.template.stroke=l.color("#fff"),o.slices.template.strokeOpacity=1,o.slices.template.togglable=!1,o.hiddenState.properties.opacity=1,o.hiddenState.properties.endAngle=-90,o.hiddenState.properties.startAngle=-90,(null==t.HideZeroes||t.HideZeroes)&&(o.ticks.template.events.on("ready",this.hideZeroes),o.ticks.template.events.on("visibilitychanged",this.hideZeroes),o.labels.template.events.on("ready",this.hideZeroes),o.labels.template.events.on("visibilitychanged",this.hideZeroes)),o.slices.template.events.on("hit",(function(e){if(t.OnSeriesClickCallback){var n=e.target.dataItem.dataContext.k;t.OnSeriesClickCallback(n)}}));for(var d=this.Adapter?this.Adapter.adaptDataForPieChart(e):e,c=0,p=0;p<d.values.length;p++)d.values[p].c?d.values[p].c=l.color(d.values[p].c):(d.values[p].c=this.ChartInstance.colors.list[c%this.ChartInstance.colors.list.length],c++);if(o.slices.template.propertyFields.fill="c",this.ChartInstance.data=d.values,t.LabelsVisible?(t.LabelsWrap||t.LabelsTruncate)&&(o.labels.template.maxWidth=t.LabelsWidth||100,t.LabelsWrap?o.labels.template.wrap=!0:t.LabelsTruncate&&(o.labels.template.truncate=!0)):(o.labels.template.disabled=!0,o.ticks.template.disabled=!0),t.Legend){var h=new s.Legend;if(this.ChartInstance.legend=h,h.position=(null==t?void 0:t.LegendPosition)||"bottom",h.itemContainers.template.togglable=!0===t.HideSeriesOnLabelClick,h.itemContainers.template.tooltipText="{category}",t.HideSeriesOnLabelClick||h.itemContainers.template.events.on("hit",(function(e){if(t.OnSeriesClickCallback){var n=e.target.dataItem.dataContext.legendDataItem.name;t.OnSeriesClickCallback(n)}})),t.LegendPadding){var u=this.ChartInstance.legend.itemContainers.template;u.paddingTop=null!==(n=t.LegendPadding.top)&&void 0!==n?n:0,u.paddingBottom=null!==(a=t.LegendPadding.bottom)&&void 0!==a?a:0,u.paddingLeft=null!==(i=t.LegendPadding.left)&&void 0!==i?i:0,u.paddingRight=null!==(r=t.LegendPadding.right)&&void 0!==r?r:0}}return this},e.prototype.refreshData=function(e){},e.prototype.hideZeroes=function(e){e.target.dataItem&&0==e.target.dataItem.values.value.percent?e.target.hide():e.target.show()},e}(),J=function(){function e(e){this.Adapter=e,this.DefaultGroupPaddingPercentage=5,this.dangerZone=50,this.LabelWidth=150,this.LabelRightWhenCompressed=20,this.LabelTopWhenCompressed=-5,this.DefaultColumnWidthPercentage=85}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p,h,u=this;if(t.Timeline)return console.error("Timeline not supported for vertical chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var g=this.ChartInstance;if(t.Legend&&(g.legend=new s.Legend,g.legend.position=null!==(n=null==t?void 0:t.LegendPosition)&&void 0!==n?n:"right",g.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var m=this.ChartInstance.legend.itemContainers.template;m.paddingTop=null!==(a=t.LegendPadding.top)&&void 0!==a?a:0,m.paddingBottom=null!==(i=t.LegendPadding.bottom)&&void 0!==i?i:0,m.paddingLeft=null!==(r=t.LegendPadding.left)&&void 0!==r?r:0,m.paddingRight=null!==(o=t.LegendPadding.right)&&void 0!==o?o:0}var f=g.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(f.title.text=t.YAxisTitle,f.title.fontWeight="bold");var y=g.xAxes.push(new s.CategoryAxis);t.XAxisTitle&&(y.title.text=t.XAxisTitle,y.title.fontWeight="bold"),f.min=0,y.dataFields.category="key",y.renderer.cellStartLocation=l.percent(null!==(d=t.GroupPaddingPercentage)&&void 0!==d?d:this.DefaultGroupPaddingPercentage).value,y.renderer.cellEndLocation=l.percent(100-(null!==(c=t.GroupPaddingPercentage)&&void 0!==c?c:this.DefaultGroupPaddingPercentage)).value,y.renderer.grid.template.location=0,y.renderer.minGridDistance=null!==(p=null==t?void 0:t.MinGridDistance)&&void 0!==p?p:30;var v=y.renderer.labels.template;v.truncate=!0,v.maxWidth=null!==(h=t.LabelWidth)&&void 0!==h?h:this.LabelWidth,v.tooltipText="{category}",(null==(null==t?void 0:t.AdaptLabelSizeAndOrientation)||(null==t?void 0:t.AdaptLabelSizeAndOrientation))&&y.events.on("sizechanged",(function(e){var n,a,i,r=e.target,o=r.pixelWidth/(r.endIndex-r.startIndex);if(o<r.renderer.labels.template.maxWidth){var l=o<(null!==(n=null==t?void 0:t.LabelVerticalOrientationCutoffWidth)&&void 0!==n?n:u.dangerZone);r.renderer.labels.template.rotation=l?-90:-45,r.renderer.labels.template.dx=(null!==(a=t.LabelRightWhenCompressed)&&void 0!==a?a:l)?0:u.LabelRightWhenCompressed,r.renderer.labels.template.dy=null!==(i=t.LabelTopWhenCompressed)&&void 0!==i?i:u.LabelTopWhenCompressed,r.renderer.labels.template.horizontalCenter="right",r.renderer.labels.template.verticalCenter="middle"}else r.renderer.labels.template.rotation=0,r.renderer.labels.template.dx=0,r.renderer.labels.template.dy=0,r.renderer.labels.template.horizontalCenter="middle",r.renderer.labels.template.verticalCenter="top"}));for(var C=this.Adapter?this.Adapter.adaptDataForVertical2DChart(e):e,b=[],I=0;I<C.groups.length;I++){for(var D=C.groups[I],L={key:D.name},x=0;x<D.values.length;x++){var S=D.values[x];L[S.k]=S.v}b.push(L)}for(var P in g.data=b,C.colorInfos&&(g.colors.list=C.colorInfos.map((function(e){return l.color(e.color)}))),b[0])"key"!==P&&this.createSeries(g,t,P,P);return this},e.prototype.refreshData=function(e){},e.prototype.createSeries=function(e,t,n,a){var i,r=this,o=e.series.push(new s.ColumnSeries);return o.dataFields.valueY=n,o.dataFields.categoryX="key",o.name=a,o.columns.template.tooltipText="{name} {categoryX}: [bold]{valueY}[/]",o.columns.template.fillOpacity=.8,o.columns.template.width=l.percent(null!==(i=t.ColumnWidthPercentage)&&void 0!==i?i:this.DefaultColumnWidthPercentage),o.events.on("hidden",(function(){return r.arrangeColumns})),o.events.on("shown",(function(){return r.arrangeColumns})),o},e.prototype.arrangeColumns=function(){var e=this.ChartInstance,t=e.series.getIndex(0),n=e.xAxes.getIndex(0),a=1-n.renderer.cellStartLocation-(1-n.renderer.cellEndLocation);if(t.dataItems.length>1){var i=n.getX(t.dataItems.getIndex(0),"categoryX"),r=(n.getX(t.dataItems.getIndex(1),"categoryX")-i)/e.series.length*a;if(l.isNumber(r)){var o=e.series.length/2,s=0;e.series.each((function(t){t.isHidden||t.isHiding?t.dummyData=e.series.indexOf(t):(t.dummyData=s,s++)}));var d=s/2;e.series.each((function(t){var n=e.series.indexOf(t),a=(t.dummyData-n+o-d)*r;t.animate({property:"dx",to:a},t.interpolationDuration,t.interpolationEasing),t.bulletsContainer.animate({property:"dx",to:a},t.interpolationDuration,t.interpolationEasing)}))}}},e}(),ee=function(){function e(e){this.Adapter=e,this.dangerZone=50,this.LabelWidth=150,this.LabelRightWhenCompressed=20,this.LabelTopWhenCompressed=-5,this.DefaultColumnWidthPercentage=85}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p,h=this;if(t.Timeline)return console.error("Timeline not supported for vertical chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var u=this.ChartInstance,g=this.Adapter?this.Adapter.adaptDataForVerticalChart(e):e;if(u.data=g.values,t.Legend&&(u.legend=new s.Legend,u.legend.position=null!==(n=null==t?void 0:t.LegendPosition)&&void 0!==n?n:"right",u.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var m=this.ChartInstance.legend.itemContainers.template;m.paddingTop=null!==(a=t.LegendPadding.top)&&void 0!==a?a:0,m.paddingBottom=null!==(i=t.LegendPadding.bottom)&&void 0!==i?i:0,m.paddingLeft=null!==(r=t.LegendPadding.left)&&void 0!==r?r:0,m.paddingRight=null!==(o=t.LegendPadding.right)&&void 0!==o?o:0}var f=u.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(f.title.text=t.YAxisTitle,f.title.fontWeight="bold");var y=u.xAxes.push(new s.CategoryAxis);t.XAxisTitle&&(y.title.text=t.XAxisTitle,y.title.fontWeight="bold"),y.dataFields.category="k",y.renderer.grid.template.location=0,y.renderer.minGridDistance=null!==(d=null==t?void 0:t.MinGridDistance)&&void 0!==d?d:30;var v=y.renderer.labels.template;v.truncate=!0,v.maxWidth=null!==(c=t.LabelWidth)&&void 0!==c?c:this.LabelWidth,v.tooltipText="{category}",(null==(null==t?void 0:t.AdaptLabelSizeAndOrientation)||(null==t?void 0:t.AdaptLabelSizeAndOrientation))&&y.events.on("sizechanged",(function(e){var n,a,i,r=e.target,o=r.pixelWidth/(r.endIndex-r.startIndex);if(o<r.renderer.labels.template.maxWidth){var l=o<(null!==(n=null==t?void 0:t.LabelVerticalOrientationCutoffWidth)&&void 0!==n?n:h.dangerZone);r.renderer.labels.template.rotation=l?-90:-45,r.renderer.labels.template.dx=(null!==(a=t.LabelRightWhenCompressed)&&void 0!==a?a:l)?0:h.LabelRightWhenCompressed,r.renderer.labels.template.dy=null!==(i=t.LabelTopWhenCompressed)&&void 0!==i?i:h.LabelTopWhenCompressed,r.renderer.labels.template.horizontalCenter="right",r.renderer.labels.template.verticalCenter="middle"}else r.renderer.labels.template.rotation=0,r.renderer.labels.template.dx=0,r.renderer.labels.template.dy=0,r.renderer.labels.template.horizontalCenter="middle",r.renderer.labels.template.verticalCenter="top"}));var C=u.series.push(new s.ColumnSeries);C.dataFields.valueY="v",C.dataFields.categoryX="k",C.name="",C.columns.template.tooltipText="{categoryX}: [bold]{valueY}[/]",C.columns.template.fillOpacity=.8,C.columns.template.width=l.percent(null!==(p=t.ColumnWidthPercentage)&&void 0!==p?p:this.DefaultColumnWidthPercentage);var b=C.columns.template;return b.strokeWidth=2,b.strokeOpacity=1,this},e.prototype.refreshData=function(e){},e}(),te=function(){function e(e){this.Adapter=e,this.dangerZone=50,this.LabelWidth=150,this.LabelRightWhenCompressed=20,this.LabelTopWhenCompressed=-5,this.DefaultColumnWidthPercentage=85}return e.prototype.graphicate=function(e,t){var n,a,i,r,o,d,c,p=this;if(t.Timeline)return console.error("Timeline not supported for vertical chart"),null;l.options.autoDispose=!0,this.ChartInstance=l.create(t.Name,s.XYChart);var h=this.ChartInstance,u=h.yAxes.push(new s.ValueAxis);t.YAxisTitle&&(u.title.text=t.YAxisTitle,u.title.fontWeight="bold");var g=h.xAxes.push(new s.CategoryAxis);t.XAxisTitle&&(g.title.text=t.XAxisTitle,g.title.fontWeight="bold"),u.min=0,g.dataFields.category="key",g.renderer.grid.template.location=0,g.renderer.minGridDistance=null!==(n=null==t?void 0:t.MinGridDistance)&&void 0!==n?n:30;var m=g.renderer.labels.template;m.truncate=!0,m.maxWidth=null!==(a=t.LabelWidth)&&void 0!==a?a:this.LabelWidth,m.tooltipText="{category}",(null==(null==t?void 0:t.AdaptLabelSizeAndOrientation)||(null==t?void 0:t.AdaptLabelSizeAndOrientation))&&g.events.on("sizechanged",(function(e){var n,a,i,r=e.target,o=r.pixelWidth/(r.endIndex-r.startIndex);if(o<r.renderer.labels.template.maxWidth){var l=o<(null!==(n=null==t?void 0:t.LabelVerticalOrientationCutoffWidth)&&void 0!==n?n:p.dangerZone);r.renderer.labels.template.rotation=l?-90:-45,r.renderer.labels.template.dx=(null!==(a=t.LabelRightWhenCompressed)&&void 0!==a?a:l)?0:p.LabelRightWhenCompressed,r.renderer.labels.template.dy=null!==(i=t.LabelTopWhenCompressed)&&void 0!==i?i:p.LabelTopWhenCompressed,r.renderer.labels.template.horizontalCenter="right",r.renderer.labels.template.verticalCenter="middle"}else r.renderer.labels.template.rotation=0,r.renderer.labels.template.dx=0,r.renderer.labels.template.dy=0,r.renderer.labels.template.horizontalCenter="middle",r.renderer.labels.template.verticalCenter="top"}));for(var f=this.Adapter?this.Adapter.adaptDataForVerticalStackedChart(e):e,y=[],v=0;v<f.groups.length;v++){for(var C=f.groups[v],b={key:C.name},I=0;I<C.values.length;I++){var D=C.values[I];b[D.k]=D.v}y.push(b)}for(var L in h.data=y,y[0])"key"!==L&&this.createSeriesStacked(h,t,L,L);if(t.Legend&&(h.legend=new s.Legend,h.legend.position=null!==(i=null==t?void 0:t.LegendPosition)&&void 0!==i?i:"right",h.legend.itemContainers.template.tooltipText="{category}",t.LegendPadding)){var x=this.ChartInstance.legend.itemContainers.template;x.paddingTop=null!==(r=t.LegendPadding.top)&&void 0!==r?r:0,x.paddingBottom=null!==(o=t.LegendPadding.bottom)&&void 0!==o?o:0,x.paddingLeft=null!==(d=t.LegendPadding.left)&&void 0!==d?d:0,x.paddingRight=null!==(c=t.LegendPadding.right)&&void 0!==c?c:0}return this},e.prototype.refreshData=function(e){},e.prototype.createSeriesStacked=function(e,t,n,a){var i,r=e.series.push(new s.ColumnSeries);return r.name=a,r.dataFields.valueY=n,r.dataFields.categoryX="key",r.sequencedInterpolation=!0,r.columns.template.tooltipText="{name} {categoryX}: [bold]{valueY}[/]",r.columns.template.fillOpacity=.8,r.columns.template.width=l.percent(null!==(i=t.ColumnWidthPercentage)&&void 0!==i?i:this.DefaultColumnWidthPercentage),r.stacked=!0,r},e}(),ne=function(e){function t(t,n,a,i,r,o,l,s,d,c,p){var h=e.call(this,t,l,o,n,a,s,d,c,p)||this;return h.dateService=i,h.adapter=r,h}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","Type"]},t.prototype.getCastedSettings=function(){var e,t,n,a,i,r;switch(this.Type){case"pie":return null!==(e=this.Settings)&&void 0!==e?e:new L;case"area":return null!==(t=this.Settings)&&void 0!==t?t:new I;case"line":return null!==(n=this.Settings)&&void 0!==n?n:new D;case"vertical":return null!==(a=this.Settings)&&void 0!==a?a:new S;case"vertical-2d":return null!==(i=this.Settings)&&void 0!==i?i:new x;case"vertical-stacked":return null!==(r=this.Settings)&&void 0!==r?r:new P}},t.prototype.fillSpecificSettings=function(e){},t.prototype.graphicate=function(e){switch(this.Type){case"pie":return new K(this.adapter).graphicate(this.Data,e);case"area":return new Q(this.adapter).graphicate(this.Data,e);case"line":return new U(this.adapter,this.dateService).graphicate(this.Data,e);case"vertical":return new ee(this.adapter).graphicate(this.Data,e);case"vertical-2d":return new J(this.adapter).graphicate(this.Data,e);case"vertical-stacked":return new te(this.adapter).graphicate(this.Data,e)}},t}(q);ne.decorators=[{type:t.Component,args:[{selector:"es-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],ne.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:n.DateService},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},ne.propDecorators={Type:[{type:t.Input}],Data:[{type:t.Input}],DataArray:[{type:t.Input}]};var ae=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new I},t.prototype.fillSpecificSettings=function(e){},t.prototype.graphicate=function(e){return new Q(this.adapter).graphicate(this.Data,e)},t}(q);ae.decorators=[{type:t.Component,args:[{selector:"es-area-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],ae.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},ae.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}]};var ie=function(e){function t(t,n,a,i,r,o,l,s,d,c,p){var h=e.call(this,t,l,o,n,a,s,d,c,p)||this;return h.adapter=i,h.dateService=r,h}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray","Step","DataGroupBucketSize","DataGroupingThreshold","StrokeSize","AllowGaps","MergeDatasets","FinalInstants","Fill","Min","Max"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new D},t.prototype.fillSpecificSettings=function(e){e.Step=null!=e.Step?e.Step:this.Step,e.DataGroupBucketSize=null!=e.DataGroupBucketSize?e.DataGroupBucketSize:this.DataGroupBucketSize,e.StrokeSize=null!=e.StrokeSize?e.StrokeSize:this.StrokeSize,e.DataGroupingThreshold=null!=e.DataGroupingThreshold?e.DataGroupingThreshold:this.DataGroupingThreshold,e.AllowGaps=null!=e.AllowGaps?e.AllowGaps:this.AllowGaps,e.MergeDatasets=null!=e.MergeDatasets?e.MergeDatasets:this.MergeDatasets,e.FinalInstants=null!=e.FinalInstants?e.FinalInstants:this.FinalInstants,e.Min=null!=e.Min?e.Min:this.Min,e.Max=null!=e.Max?e.Max:this.Max,e.Fill=null!=e.Fill?e.Fill:this.Fill},t.prototype.graphicate=function(e){return new U(this.adapter,this.dateService).graphicate(this.Data,e)},t}(q);ie.decorators=[{type:t.Component,args:[{selector:"es-line-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],ie.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:n.DateService},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},ie.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],Step:[{type:t.Input}],DataGroupBucketSize:[{type:t.Input}],DataGroupingThreshold:[{type:t.Input}],StrokeSize:[{type:t.Input}],AllowGaps:[{type:t.Input}],MergeDatasets:[{type:t.Input}],FinalInstants:[{type:t.Input}],Min:[{type:t.Input}],Max:[{type:t.Input}],Fill:[{type:t.Input}]};var re=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray","HideZeroes","Mode3D","LabelsWrap","LabelsTruncate","LabelsWidth","LabelsVisible"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new L},t.prototype.fillSpecificSettings=function(e){e.HideZeroes=null!=e.HideZeroes?e.HideZeroes:this.HideZeroes,e.Mode3D=null!=e.Mode3D?e.Mode3D:this.Mode3D,e.DonutRadiusPercentage=null!=e.DonutRadiusPercentage?e.DonutRadiusPercentage:this.DonutRadiusPercentage,e.LabelsWrap=null!=e.LabelsWrap?e.LabelsWrap:this.LabelsWrap,e.LabelsTruncate=null!=e.LabelsTruncate?e.LabelsTruncate:this.LabelsTruncate,e.LabelsWidth=null!=e.LabelsWidth?e.LabelsWidth:this.LabelsWidth,e.LabelsVisible=null!=e.LabelsVisible?e.LabelsVisible:this.LabelsVisible},t.prototype.graphicate=function(e){return new K(this.adapter).graphicate(this.Data,e)},t}(q);re.decorators=[{type:t.Component,args:[{selector:"es-pie-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],re.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},re.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],HideZeroes:[{type:t.Input}],Mode3D:[{type:t.Input}],DonutRadiusPercentage:[{type:t.Input}],LabelsWrap:[{type:t.Input}],LabelsTruncate:[{type:t.Input}],LabelsWidth:[{type:t.Input}],LabelsVisible:[{type:t.Input}]};var oe=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new x},t.prototype.fillSpecificSettings=function(e){e.ColumnWidthPercentage=null!=e.ColumnWidthPercentage?e.ColumnWidthPercentage:this.ColumnWidthPercentage,e.GroupPaddingPercentage=null!=e.GroupPaddingPercentage?e.GroupPaddingPercentage:this.GroupPaddingPercentage,e.LabelWidth=null!=e.LabelWidth?e.LabelWidth:this.LabelWidth,e.LabelVerticalOrientationCutoffWidth=null!=e.LabelVerticalOrientationCutoffWidth?e.LabelVerticalOrientationCutoffWidth:this.LabelVerticalOrientationCutoffWidth,e.LabelRightWhenCompressed=null!=e.LabelRightWhenCompressed?e.LabelRightWhenCompressed:this.LabelRightWhenCompressed,e.LabelTopWhenCompressed=null!=e.LabelTopWhenCompressed?e.LabelTopWhenCompressed:this.LabelTopWhenCompressed},t.prototype.graphicate=function(e){return new J(this.adapter).graphicate(this.Data,e)},t}(q);oe.decorators=[{type:t.Component,args:[{selector:"es-vertical-2d-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],oe.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},oe.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],ColumnWidthPercentage:[{type:t.Input}],GroupPaddingPercentage:[{type:t.Input}],LabelWidth:[{type:t.Input}],LabelVerticalOrientationCutoffWidth:[{type:t.Input}],LabelRightWhenCompressed:[{type:t.Input}],LabelTopWhenCompressed:[{type:t.Input}]};var le=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new S},t.prototype.fillSpecificSettings=function(e){e.ColumnWidthPercentage=null!=e.ColumnWidthPercentage?e.ColumnWidthPercentage:this.ColumnWidthPercentage,e.LabelWidth=null!=e.LabelWidth?e.LabelWidth:this.LabelWidth,e.LabelVerticalOrientationCutoffWidth=null!=e.LabelVerticalOrientationCutoffWidth?e.LabelVerticalOrientationCutoffWidth:this.LabelVerticalOrientationCutoffWidth,e.LabelRightWhenCompressed=null!=e.LabelRightWhenCompressed?e.LabelRightWhenCompressed:this.LabelRightWhenCompressed,e.LabelTopWhenCompressed=null!=e.LabelTopWhenCompressed?e.LabelTopWhenCompressed:this.LabelTopWhenCompressed},t.prototype.graphicate=function(e){return new ee(this.adapter).graphicate(this.Data,e)},t}(q);le.decorators=[{type:t.Component,args:[{selector:"es-vertical-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],le.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},le.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],ColumnWidthPercentage:[{type:t.Input}],LabelWidth:[{type:t.Input}],LabelVerticalOrientationCutoffWidth:[{type:t.Input}],LabelRightWhenCompressed:[{type:t.Input}],LabelTopWhenCompressed:[{type:t.Input}]};var se=function(e){function t(t,n,a,i,r,o,l,s,d,c){var p=e.call(this,t,o,r,n,a,l,s,d,c)||this;return p.adapter=i,p}return y(t,e),t.prototype.getSpecificPropertiesToCheck=function(){return["Data","DataArray"]},t.prototype.getCastedSettings=function(){var e;return null!==(e=this.Settings)&&void 0!==e?e:new P},t.prototype.fillSpecificSettings=function(e){e.ColumnWidthPercentage=null!=e.ColumnWidthPercentage?e.ColumnWidthPercentage:this.ColumnWidthPercentage,e.LabelWidth=null!=e.LabelWidth?e.LabelWidth:this.LabelWidth,e.LabelVerticalOrientationCutoffWidth=null!=e.LabelVerticalOrientationCutoffWidth?e.LabelVerticalOrientationCutoffWidth:this.LabelVerticalOrientationCutoffWidth,e.LabelRightWhenCompressed=null!=e.LabelRightWhenCompressed?e.LabelRightWhenCompressed:this.LabelRightWhenCompressed,e.LabelTopWhenCompressed=null!=e.LabelTopWhenCompressed?e.LabelTopWhenCompressed:this.LabelTopWhenCompressed},t.prototype.graphicate=function(e){return new te(this.adapter).graphicate(this.Data,e)},t}(q);se.decorators=[{type:t.Component,args:[{selector:"es-vertical-stacked-chart",template:'<chart-pager *ngIf="isPaged" (onPageChange)="changePage($event)" [Items]="DataArray" [Dtos]="DataDtos" [StartIndex]="DataDtoStartIndex"\r\n [BrowseDelayMs]="BrowseDelayMs">\r\n <ng-template #header_inner let-headerItem>\r\n <ng-container *ngTemplateOutlet="header_tr; context : {$implicit: headerItem}"></ng-container>\r\n </ng-template>\r\n</chart-pager>\r\n\r\n<ng-container *ngIf="loadingChart && loading_template">\r\n <div style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <ng-container *ngTemplateOutlet="loading_template"></ng-container>\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf="loadingChart && !loading_template">\r\n <div class="esc-loading-overlay" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'">\r\n <p class="label">Loading....</p>\r\n </div>\r\n</ng-container>\r\n\r\n<div [class.hide-block]="loadingChart" id="{{name}}" style="width: 100%;" [style.height]="isPaged ? \'calc(100% - 44px)\' : \'100%\'"></div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".esc-loading-overlay{background:hsla(0,0%,60%,.6);text-transform:uppercase;font-size:30px;font-weight:700;color:#fff;text-align:center;font-family:monospace}.esc-loading-overlay .label{margin:0;padding-top:7%}.hide-block{display:none}"]}]}],se.ctorParameters=function(){return[{type:t.ElementRef},{type:$},{type:E},{type:d},{type:t.NgZone},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:Boolean,decorators:[{type:t.Inject,args:[R]}]},{type:Boolean,decorators:[{type:t.Inject,args:[j]}]},{type:String,decorators:[{type:t.Inject,args:[z]}]},{type:String,decorators:[{type:t.Inject,args:[M]}]}]},se.propDecorators={Data:[{type:t.Input}],DataArray:[{type:t.Input}],ColumnWidthPercentage:[{type:t.Input}],LabelWidth:[{type:t.Input}],LabelVerticalOrientationCutoffWidth:[{type:t.Input}],LabelRightWhenCompressed:[{type:t.Input}],LabelTopWhenCompressed:[{type:t.Input}]};var de=function(e,t,n,a){this.data=e,this.title=t,this.dataRetrieveDto=n,this.dataRetrieveFunction=a},ce=function(){function e(){this.onPageChange=new t.EventEmitter}return e.prototype.ngOnChanges=function(){if(!this.Items&&!this.Dtos||0==(this.Items||this.Dtos).length)throw new Error("Chart array cannot be empty!");var e=this.StartIndex||0;this.currentindex=e,this.currentpage=e+1,this.handlePageChange()},e.prototype.handlePageChange=function(){this.finalIndex=this.currentpage-1,this.currentindex=this.currentpage-1;var e=this.Items&&this.Items.length>0?this.Items[this.finalIndex].data:this.Dtos[this.finalIndex];this.onPageChange.emit({data:e,index:this.finalIndex})},e.prototype.Next=function(){var e=this;this.currentpage++,this.onPageChange.emit({data:null,index:this.currentpage-1}),setTimeout((function(){e.currentindex==e.currentpage-2?e.handlePageChange():e.currentindex++}),this.BrowseDelayMs)},e.prototype.Previous=function(){var e=this;this.currentpage--,this.onPageChange.emit({data:null,index:this.currentpage-1}),setTimeout((function(){e.currentindex==e.currentpage?e.handlePageChange():e.currentindex--}),this.BrowseDelayMs)},e}();ce.decorators=[{type:t.Component,args:[{selector:"chart-pager",template:'<div *ngIf="(Items || Dtos) && (Items || Dtos).length > 0" class="pcs-no-selection">\r\n <div class="pcs-button pcs-backward">\r\n <svg class="pcs-svg-header">\r\n <g class="pcs-svg-button-container" role="button" (click)="currentpage != 1 && Previous(); $event.stopPropagation(); $event.preventDefault();">\r\n \x3c!--Pulsante e freccettina all\'interno--\x3e\r\n <g class="pcs-svg-button" [style.cursor]="currentpage == 1 ? \'not-allowed\' : \'pointer\'"><path d="M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z"></path></g>\r\n <g class="pcs-svg-arrow pcs-svg-arrow-left"><path d="M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class="pcs-infos">\r\n <ng-container *ngIf="headerInner_tr">\r\n <ng-container *ngTemplateOutlet="headerInner_tr; context : {$implicit: (Items || Dtos)[currentpage - 1]}"></ng-container>\r\n </ng-container>\r\n </div>\r\n <div class="pcs-button pcs-forward">\r\n <svg class="pcs-svg-header">\r\n <g class="pcs-svg-button-container" role="button" (click)="(Items || Dtos).length != currentpage && Next(); $event.stopPropagation(); $event.preventDefault();">\r\n \x3c!--Pulsante e freccettina all\'interno--\x3e\r\n <g class="pcs-svg-button" [style.cursor]="(Items || Dtos).length == currentpage ? \'not-allowed\' : \'pointer\'"><path d="M3,0 L53.027,0 a3,3 0 0 1 3,3 L56.027,36.817 a3,3 0 0 1 -3,3 L3,39.817 a3,3 0 0 1 -3,-3 L0,3 a3,3 0 0 1 3,-3 Z"></path></g>\r\n <g class="pcs-svg-arrow pcs-svg-arrow-right"><path d="M26,14H10l5.17-6.79A2,2,0,0,0,12,4.79l-7.62,10a2,2,0,0,0,0,2.42l7.62,10a2,2,0,0,0,3.18-2.42L10,18H26a2,2,0,0,0,0-4Z"></path></g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div style="clear: both;"></div>\r\n</div>',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".pcs-button{width:60px}.pcs-forward{float:right;text-align:end}.pcs-backward{float:left}.pcs-svg-header{width:57px;height:40px}.pcs-svg-button-container{outline:medium none currentcolor}.pcs-svg-arrow{pointer-events:none;fill:#555}.pcs-svg-arrow-right{transform:translate(44px,36px) rotate(180deg)}.pcs-svg-arrow-left{transform:translate(13px,4px)}.pcs-svg-button{fill:#d9d9d9;stroke:#fff;fill-opacity:1;stroke-opacity:1}.pcs-svg-button:hover{fill:#a3a3a3;cursor:pointer}.pcs-infos{width:calc(100% - 120px);height:44px;float:left}.pcs-no-selection{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}"]}]}],ce.propDecorators={Items:[{type:t.Input}],Dtos:[{type:t.Input}],BrowseDelayMs:[{type:t.Input}],StartIndex:[{type:t.Input}],onPageChange:[{type:t.Output}],headerInner_tr:[{type:t.ContentChild,args:["header_inner",{static:!1}]}]};var pe=[ne,ie,re,oe,le,se,ce,ae],he=function(){function e(){}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:z,useValue:(null==t?void 0:t.locale)||"it-IT"},{provide:j,useValue:null==(null==t?void 0:t.animations)||(null==t?void 0:t.animations)},{provide:M,useValue:(null==t?void 0:t.theme)||"spiritedaway"},{provide:R,useValue:null!=(null==t?void 0:t.debugMode)&&(null==t?void 0:t.debugMode)},{provide:d,useClass:(null==t?void 0:t.adapter)||d},{provide:$,useValue:new $(null!=(null==t?void 0:t.debugMode)&&(null==t?void 0:t.debugMode))}]}},e}();he.decorators=[{type:t.NgModule,args:[{imports:[a.CommonModule],declarations:C(pe),providers:[E],exports:C(pe)}]}],e.AreaChartData=h,e.AreaChartSettings=I,e.BaseAdapter=d,e.BaseInterval=T,e.BaseSettings=b,e.ChartThemes=N,e.DateValue=w,e.EsAreaChartComponent=ae,e.EsChartComponent=ne,e.EsChartsModule=he,e.EsLineChartComponent=ie,e.EsPieChartComponent=re,e.EsVertical2DChartComponent=oe,e.EsVerticalChartComponent=le,e.EsVerticalStackedChartComponent=se,e.KeyValue=k,e.KeyValueColor=O,e.LegendPad=A,e.LineChartData=c,e.LineChartSettings=D,e.LineSerie=W,e.PagedChartData=de,e.PieChartData=p,e.PieChartSettings=L,e.Vertical2DChartData=u,e.Vertical2DChartSettings=x,e.VerticalChartData=g,e.VerticalChartSettings=S,e.VerticalStackedChartData=m,e.VerticalStackedChartSettings=P,e.ɵa=T,e.ɵb=q,e.ɵc=$,e.ɵd=E,e.ɵe=z,e.ɵf=j,e.ɵg=M,e.ɵh=R,e.ɵi=d,e.ɵj=ne,e.ɵk=ie,e.ɵl=re,e.ɵm=oe,e.ɵn=le,e.ɵo=se,e.ɵp=ce,e.ɵq=ae,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=esfaenza-es-charts.umd.min.js.map