!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("@angular/core"),require("rxjs/operators"),require("echarts/lib/echarts")):"function"==typeof define&&define.amd?define("ngx-echarts/core",["exports","rxjs","@angular/core","rxjs/operators","echarts/lib/echarts"],e):e((t["ngx-echarts"]=t["ngx-echarts"]||{},t["ngx-echarts"].core={}),t.rxjs,t.ng.core,t.rxjs.operators,t["echarts/lib/echarts"])}(this,function(t,r,n,e,i){"use strict";var h=function(){function e(t){this._changes=t}return e.of=function(t){return new e(t)},e.prototype.notEmpty=function(t){if(this._changes[t]){var e=this._changes[t].currentValue;if(e!==undefined&&null!==e)return r.of(e)}return r.EMPTY},e.prototype.has=function(t){if(this._changes[t]){var e=this._changes[t].currentValue;return r.of(e)}return r.EMPTY},e.prototype.notFirst=function(t){if(this._changes[t]&&!this._changes[t].isFirstChange()){var e=this._changes[t].currentValue;return r.of(e)}return r.EMPTY},e.prototype.notFirstAndEmpty=function(t){if(this._changes[t]&&!this._changes[t].isFirstChange()){var e=this._changes[t].currentValue;if(e!==undefined&&null!==e)return r.of(e)}return r.EMPTY},e}(),a=function(){function t(t,e){this.el=t,this.ngZone=e,this.autoResize=!0,this.loadingType="default",this.detectEventChanges=!0,this.chartInit=new n.EventEmitter,this.chartClick=this.createLazyEvent("click"),this.chartDblClick=this.createLazyEvent("dblclick"),this.chartMouseDown=this.createLazyEvent("mousedown"),this.chartMouseMove=this.createLazyEvent("mousemove"),this.chartMouseUp=this.createLazyEvent("mouseup"),this.chartMouseOver=this.createLazyEvent("mouseover"),this.chartMouseOut=this.createLazyEvent("mouseout"),this.chartGlobalOut=this.createLazyEvent("globalout"),this.chartContextMenu=this.createLazyEvent("contextmenu"),this.chartLegendSelectChanged=this.createLazyEvent("legendselectchanged"),this.chartLegendSelected=this.createLazyEvent("legendselected"),this.chartLegendUnselected=this.createLazyEvent("legendunselected"),this.chartLegendScroll=this.createLazyEvent("legendscroll"),this.chartDataZoom=this.createLazyEvent("datazoom"),this.chartDataRangeSelected=this.createLazyEvent("datarangeselected"),this.chartTimelineChanged=this.createLazyEvent("timelinechanged"),this.chartTimelinePlayChanged=this.createLazyEvent("timelineplaychanged"),this.chartRestore=this.createLazyEvent("restore"),this.chartDataViewChanged=this.createLazyEvent("dataviewchanged"),this.chartMagicTypeChanged=this.createLazyEvent("magictypechanged"),this.chartPieSelectChanged=this.createLazyEvent("pieselectchanged"),this.chartPieSelected=this.createLazyEvent("pieselected"),this.chartPieUnselected=this.createLazyEvent("pieunselected"),this.chartMapSelectChanged=this.createLazyEvent("mapselectchanged"),this.chartMapSelected=this.createLazyEvent("mapselected"),this.chartMapUnselected=this.createLazyEvent("mapunselected"),this.chartAxisAreaSelected=this.createLazyEvent("axisareaselected"),this.chartFocusNodeAdjacency=this.createLazyEvent("focusnodeadjacency"),this.chartUnfocusNodeAdjacency=this.createLazyEvent("unfocusnodeadjacency"),this.chartBrush=this.createLazyEvent("brush"),this.chartBrushSelected=this.createLazyEvent("brushselected"),this.chartRendered=this.createLazyEvent("rendered"),this.chartFinished=this.createLazyEvent("finished"),this.currentOffsetWidth=0,this.currentOffsetHeight=0}return t.prototype.ngOnChanges=function(t){var e=this,n=h.of(t);n.notFirstAndEmpty("options").subscribe(function(t){return e.onOptionsChange(t)}),n.notFirstAndEmpty("merge").subscribe(function(t){return e.setOption(t)}),n.has("loading").subscribe(function(t){return e.toggleLoading(!!t)}),n.notFirst("theme").subscribe(function(){return e.refreshChart()})},t.prototype.ngOnInit=function(){var t=this;this.resizeSub=r.fromEvent(window,"resize").pipe(e.debounceTime(50)).subscribe(function(){t.autoResize&&window.innerWidth!==t.currentWindowWidth&&(t.currentWindowWidth=window.innerWidth,t.currentOffsetWidth=t.el.nativeElement.offsetWidth,t.currentOffsetHeight=t.el.nativeElement.offsetHeight,t.resize())})},t.prototype.ngOnDestroy=function(){this.resizeSub&&this.resizeSub.unsubscribe(),this.dispose()},t.prototype.ngDoCheck=function(){if(this.chart&&this.autoResize){var t=this.el.nativeElement.offsetWidth,e=this.el.nativeElement.offsetHeight;this.currentOffsetWidth===t&&this.currentOffsetHeight===e||(this.currentOffsetWidth=t,this.currentOffsetHeight=e,this.resize())}},t.prototype.ngAfterViewInit=function(){var t=this;setTimeout(function(){return t.initChart()})},t.prototype.dispose=function(){this.chart&&(this.chart.dispose(),this.chart=null)},t.prototype.resize=function(){this.chart&&this.chart.resize()},t.prototype.toggleLoading=function(t){this.chart&&(t?this.chart.showLoading(this.loadingType,this.loadingOpts):this.chart.hideLoading())},t.prototype.setOption=function(t,e){this.chart&&this.chart.setOption(t,e)},t.prototype.refreshChart=function(){this.dispose(),this.initChart()},t.prototype.createChart=function(){var t=this;this.currentWindowWidth=window.innerWidth,this.currentOffsetWidth=this.el.nativeElement.offsetWidth,this.currentOffsetHeight=this.el.nativeElement.offsetHeight;var e=this.el.nativeElement;if(window&&window.getComputedStyle){var n=window.getComputedStyle(e,null).getPropertyValue("height");n&&"0px"!==n||e.style.height&&"0px"!==e.style.height||(e.style.height="400px")}return this.ngZone.runOutsideAngular(function(){return i.init(e,t.theme,t.initOpts)})},t.prototype.initChart=function(){this.onOptionsChange(this.options),this.merge&&this.chart&&this.setOption(this.merge)},t.prototype.onOptionsChange=function(t){t&&(this.chart||(this.chart=this.createChart(),this.chartInit.emit(this.chart)),this.chart.setOption(this.options,!0))},t.prototype.createLazyEvent=function(n){var i=this;return this.chartInit.pipe(e.switchMap(function(t){return new r.Observable(function(e){return t.on(n,function(t){return i.ngZone.run(function(){return e.next(t)})}),null})}))},t.decorators=[{type:n.Directive,args:[{selector:"echarts, [echarts]"}]}],t.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone}]},t.propDecorators={options:[{type:n.Input}],theme:[{type:n.Input}],loading:[{type:n.Input}],initOpts:[{type:n.Input}],merge:[{type:n.Input}],autoResize:[{type:n.Input}],loadingType:[{type:n.Input}],loadingOpts:[{type:n.Input}],detectEventChanges:[{type:n.Input}],chartInit:[{type:n.Output}],chartClick:[{type:n.Output}],chartDblClick:[{type:n.Output}],chartMouseDown:[{type:n.Output}],chartMouseMove:[{type:n.Output}],chartMouseUp:[{type:n.Output}],chartMouseOver:[{type:n.Output}],chartMouseOut:[{type:n.Output}],chartGlobalOut:[{type:n.Output}],chartContextMenu:[{type:n.Output}],chartLegendSelectChanged:[{type:n.Output}],chartLegendSelected:[{type:n.Output}],chartLegendUnselected:[{type:n.Output}],chartLegendScroll:[{type:n.Output}],chartDataZoom:[{type:n.Output}],chartDataRangeSelected:[{type:n.Output}],chartTimelineChanged:[{type:n.Output}],chartTimelinePlayChanged:[{type:n.Output}],chartRestore:[{type:n.Output}],chartDataViewChanged:[{type:n.Output}],chartMagicTypeChanged:[{type:n.Output}],chartPieSelectChanged:[{type:n.Output}],chartPieSelected:[{type:n.Output}],chartPieUnselected:[{type:n.Output}],chartMapSelectChanged:[{type:n.Output}],chartMapSelected:[{type:n.Output}],chartMapUnselected:[{type:n.Output}],chartAxisAreaSelected:[{type:n.Output}],chartFocusNodeAdjacency:[{type:n.Output}],chartUnfocusNodeAdjacency:[{type:n.Output}],chartBrush:[{type:n.Output}],chartBrushSelected:[{type:n.Output}],chartRendered:[{type:n.Output}],chartFinished:[{type:n.Output}]},t}(),s=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[],declarations:[a],exports:[a]}]}],t}();t.NgxEchartsCoreModule=s,t.ɵa=a,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-echarts-core.umd.min.js.map