{"version":3,"sources":["webpack:///./node_modules/@amcharts/amcharts4/.internal/core/DataItem.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Options.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/System.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Registry.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/SpriteState.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Container.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/Component.js","webpack:///./node_modules/@amcharts/amcharts4/.internal/core/SpriteEvents.js"],"names":["__webpack_require__","d","__webpack_exports__","DataItem","tslib__WEBPACK_IMPORTED_MODULE_0__","_Base__WEBPACK_IMPORTED_MODULE_1__","_utils_Adapter__WEBPACK_IMPORTED_MODULE_2__","_utils_Animation__WEBPACK_IMPORTED_MODULE_3__","_utils_Utils__WEBPACK_IMPORTED_MODULE_4__","_utils_Array__WEBPACK_IMPORTED_MODULE_5__","_utils_Object__WEBPACK_IMPORTED_MODULE_6__","_utils_Type__WEBPACK_IMPORTED_MODULE_7__","_super","_this","call","this","adapter","_disabled","hasProperties","values","categories","dates","locations","workingLocations","properties","sprites","isTemplate","_index","_visible","_hidden","_ignoreMinMax","hasChildren","isHiding","_valueAnimations","_locationAnimations","className","applyTheme","Object","defineProperty","prototype","get","component","enumerable","configurable","_animations","_disposers","push","set","value","hidden","setVisibility","sprite","__disabled","noChangeValues","visible","defaultState","hiddenState","events","isEnabled","event_1","type","target","dispatchImmediately","show","duration","delay","fields","animation_1","_hideDisposer","removeDispose","field","setWorkingValue","animation","isFinished","dispose","hide","toValue","animation_2","anim","on","getDuration","interpolationDuration","apply","getValue","name","calculated","dataFields","getWorkingValue","realName","workingValue","getActualWorkingValue","setValue","currentValue","newDuration","event_2","property","handleDataItemValueChange","setCalculatedValue","event_3","handleDataItemCalculatedValueChange","animate","childObject","from","to","dummyData","interpolationEasing","handleInterpolationProgress","valueAnimation","stop","event_4","handleDataItemWorkingValueChange","setLocation","currentLocation","event_5","setWorkingLocation","workingLocation","locationAnimation","event_6","handleDataItemWorkingLocationChange","setDate","date","dateFormatter","parse","currentDate","getTime","getDate","setProperty","event_7","handleDataItemPropertyChange","setCategory","clone","cloneId","dataItem","copyFrom","source","dataContext","opacity","event_8","animationOptions","easing","start","event","event_9","hasValue","i","len","length","parent","depth","_dataContext","addSprite","options","verbose","commercialLicense","classNamePrefix","autoSetClassName","minPolylineStep","onlyShowOnViewport","queue","system","_Registry__WEBPACK_IMPORTED_MODULE_0__","_Options__WEBPACK_IMPORTED_MODULE_1__","_utils_AsyncPending__WEBPACK_IMPORTED_MODULE_2__","_utils_Array__WEBPACK_IMPORTED_MODULE_3__","_utils_Object__WEBPACK_IMPORTED_MODULE_4__","System","_isPaused","animations","uid","getUniqueId","dummyCounter","_frameRequested","updateStepDuration","time","Date","now","reportTime","msg","reset","update","skippedComponents","key","invalidDatas","invalidData","dataProvider","isDisposed","dataInvalid","validateData","dataValidationProgress","e","raiseCriticalError","invalidRawDatas","validateRawData","invalidDataItems","validateDataItems","invalidDataRange","validateDataRange","skipRangeEvent","skippedSprites","invalidLayouts","validateLayouts","invalidPositions","validatePositions","hasSkipped","invalidSprites","count","_systemCheckIfValidate","checkIfValidate2","_systemUpdate","invalid","concat","x","requestFrame","all0_1","id","_systemValidatePositions","positionInvalid","container","children","each","_systemValidateLayouts","validateLayout","layoutInvalid","log","console","VERSION","registry","_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_0__","_utils_Dictionary__WEBPACK_IMPORTED_MODULE_1__","_utils_Cache__WEBPACK_IMPORTED_MODULE_2__","_utils_Type__WEBPACK_IMPORTED_MODULE_3__","_utils_String__WEBPACK_IMPORTED_MODULE_4__","Registry","themes","loadedThemes","_uidCount","registeredClasses","_placeholders","baseSprites","baseSpritesByUid","noBase","_map","setCache","ttl","getCache","undefined","dispatch","eventType","data","getPlaceholder","addToInvalidComponents","baseId","removeFromInvalidComponents","addToInvalidSprites","removeFromInvalidSprites","addToInvalidPositions","removeFromInvalidPositions","addToInvalidLayouts","removeFromInvalidLayouts","SpriteState","_Registry__WEBPACK_IMPORTED_MODULE_2__","_utils_Adapter__WEBPACK_IMPORTED_MODULE_3__","_utils_List__WEBPACK_IMPORTED_MODULE_4__","_utils_Color__WEBPACK_IMPORTED_MODULE_5__","_utils_Percent__WEBPACK_IMPORTED_MODULE_6__","_utils_Utils__WEBPACK_IMPORTED_MODULE_7__","_utils_Ease__WEBPACK_IMPORTED_MODULE_8__","_utils_Object__WEBPACK_IMPORTED_MODULE_9__","_utils_Type__WEBPACK_IMPORTED_MODULE_10__","transitionDuration","transitionEasing","propertyFields","filters","ev","newValue","getPropertyValue","propertyName","propValue","fieldName","spriteValue","res","prop","keys","_x","clear","processConfig","config","match","Container","_Sprite__WEBPACK_IMPORTED_MODULE_1__","_SpriteState__WEBPACK_IMPORTED_MODULE_2__","_utils_List__WEBPACK_IMPORTED_MODULE_3__","_utils_Disposer__WEBPACK_IMPORTED_MODULE_4__","_utils_Dictionary__WEBPACK_IMPORTED_MODULE_5__","_interaction_Interaction__WEBPACK_IMPORTED_MODULE_6__","_elements_Rectangle__WEBPACK_IMPORTED_MODULE_7__","_utils_Percent__WEBPACK_IMPORTED_MODULE_8__","_Registry__WEBPACK_IMPORTED_MODULE_9__","_core_utils_InterfaceColorSet__WEBPACK_IMPORTED_MODULE_10__","_utils_Iterator__WEBPACK_IMPORTED_MODULE_11__","_utils_Array__WEBPACK_IMPORTED_MODULE_12__","_utils_Math__WEBPACK_IMPORTED_MODULE_13__","_utils_Type__WEBPACK_IMPORTED_MODULE_14__","_System__WEBPACK_IMPORTED_MODULE_15__","_childrenByLayout","_childrenDisposers","hasFocused","setStateOnSprites","_absoluteWidth","_absoluteHeight","_shouldBeReady","_tapToActivate","tapTimeout","_element","paper","addGroup","group","add","element","setPropertyValue","_positionPrecision","handleChildAdded","handleChildRemoved","processChild","child","insertKey","handleChildTransform","sortAndAdd","err","disabled","invalidate","sortChildren","addChildren","oldValue","removeKey","removeElement","isMeasured","invalidateLayout","layout","deepInvalidate","_children","fixed_1","relative_1","iterator","percentWidth","percentHeight","calculateRelativeSize","totalRelativeWidth","totalRelativeHeight","relativeWidth","relativeHeight","zindexed","sortArray","map","idx","sort","a","b","ai","zIndex","bi","val","group_1","isCorrect","node","childNodes","_background","addToBack","createChild","classType","removeChildren","getIndex","removeValue","disposeChildren","createBackground","processBackground","background","handleGlobalScale","fill","getFor","_availableWidth","innerWidth","_availableHeight","innerHeight","measuredWidth","measuredHeight","allValid","maxWidth","maxHeight","pixelMarginRight","pixelMarginLeft","validate","pixelMarginTop","pixelMarginBottom","childMeasuredWidth","childMeasuredHeight","align","valign","Math","max","arrange","left","right","top","bottom","maxCellWidth","minCellWidth","columnCount","contentLeft","contentRight","contentTop","contentBottom","paddingLeft","pixelPaddingLeft","paddingRight","pixelPaddingRight","paddingTop","pixelPaddingTop","paddingBottom","pixelPaddingBottom","nextX","nextY","row","column","columnWidth","rowHeight","minWidth","minHeight","childrenCopy","reverseOrder","reverse","fixedWidthGrid","floor","maxColumns","getColumnWidth","validatePosition","y","childMarginLeft","childMarginRight","childMarginTop","childMarginBottom","childWidth","childHeight","childLeft","childRight","childTop","childBottom","maxLeft","maxRight","pixelX","maxTop","maxBottom","pixelY","nextColumnWidth","moveTo","noneBBox","bbox","width","height","_pixelWidth","_pixelHeight","measuredContentWidth","measuredContentHeight","contentAlign","contentValign","dx_1","dy_1","mwa","mha","ddx","ddy","oldBBox","contentWidth","contentHeight","_bbox","prevLeft","prevTop","prevBotttom","prevRight","measure","updateCenter","updateBackground","fitsToBounds","point","deviation","pixelWidth","pixelHeight","setStateOnChildren","shouldClone","clonedChild","preloader","_preloader","tooltipContainer","setPaper","changed","topParent","removeFromInvalids","setDataItem","_dataItem","measureElement","getTooltipX","getTooltipY","setSVGAttribute","font-family","invalidateLabels","font-size","font-weight","text-decoration","setState","stateName","isActive","item","setActive","dispatchReady","isReady","allReady_1","once","setTapToActivate","interactions","isTouchProtected","setEventDisposer","handleTapToActivate","initTapTimeout","body","isLocalElement","pointer","svg","handleTapToActivateDeactivation","_tapToActivateTimeout","tapToActivate","setTimeout","Component","_Container__WEBPACK_IMPORTED_MODULE_1__","_utils_List__WEBPACK_IMPORTED_MODULE_2__","_utils_SortedList__WEBPACK_IMPORTED_MODULE_3__","_utils_Dictionary__WEBPACK_IMPORTED_MODULE_4__","_utils_Disposer__WEBPACK_IMPORTED_MODULE_5__","_data_DataSource__WEBPACK_IMPORTED_MODULE_6__","_utils_Responsive__WEBPACK_IMPORTED_MODULE_7__","_System__WEBPACK_IMPORTED_MODULE_8__","_DataItem__WEBPACK_IMPORTED_MODULE_9__","_Registry__WEBPACK_IMPORTED_MODULE_10__","_utils_Math__WEBPACK_IMPORTED_MODULE_11__","_utils_Ease__WEBPACK_IMPORTED_MODULE_13__","_utils_Utils__WEBPACK_IMPORTED_MODULE_14__","_utils_Iterator__WEBPACK_IMPORTED_MODULE_15__","_utils_Object__WEBPACK_IMPORTED_MODULE_16__","_utils_Type__WEBPACK_IMPORTED_MODULE_17__","_dataSources","_parseDataFrom","_dataDisposers","_start","_end","rangeChangeDuration","rangeChangeEasing","parsingStepDuration","rawDataInvalid","dataRangeInvalid","dataItemsInvalid","sequencedInterpolation","sequencedInterpolationDelay","_addAllDataItems","minZoomCount","_dataItems","createDataItem","handleDataItemAdded","handleDataItemRemoved","template","invalidateData","dataUsers","handleDataUserAdded","maxZoomDeclination","dataUser","invalidateDataItems","processDataItem","hasSomeValues_1","fieldValue","dataItems","rawDataItem","childDataItem","create","anyDataItem","f","remove","updateDataItem","dataContext_1","validateDataElements","endIndex","startIndex","validateDataElement","addData","removeCount","inited","Array","removeData","shift","invalidateDataUsers","invalidateDataRange","_prevStartIndex","_prevEndIndex","rangeChangeUpdate","appendDataItems","sliceData","_workingStartIndex","_workingEndIndex","invalidateRawData","clones","disposeData","_startIndex","_endIndex","getDataItem","_data","counter","startTime","n","_loop_1","this_1","dataUserDataItem","elapsed","progress","state_1","_internalDefaultsApplied","applyInternalDefaults","setData","getDataSource","setDataSourceEvents","dataSourceDateFields","dataSourceNumberFields","loadData","load","populateDataSourceFields","list","targetList","ds","openModal","message","incremental","keepCount","updateCurrentData","index","_responsive","zoom","range","instantly","declination","end","priority","_finalStart","_finalEnd","maxZoomFactor","rangeChangeAnimation","kill","zoomToIndexes","round","indexToPosition","min","ceil","_updateDataItemIndexes","_dataMethods","bindDataField","invalidateProcessedData","resetProcessedRange","_dataUsers","reinit","_inited","getExporting","_export","has","_exportData","menu","handleDataUpdated","arg","setDisabled","setShowOnInit","_showOnInitDisposer2","hideInitially","setBaseId","_baseId","SpriteEventDispatcher","_utils_EventDispatcher__WEBPACK_IMPORTED_MODULE_2__","_utils_Disposer__WEBPACK_IMPORTED_MODULE_3__","_utils_Object__WEBPACK_IMPORTED_MODULE_5__","arguments","_interactionEvents","_dispatchSpriteEvent","imev","_dispatchSpritePointEvent","spritePoint","svgPoint","getSvgPoint","_addInteractionObjectEvent","callback","context","insertKeyIfEmpty","disposer","increment","_on","info","disposers","clickable","togglable","draggable","trackable","resizable","swipeable","wheelable","hoverable","focusable"],"mappings":"gHAAAA,EAAAC,EAAAC,EAAA,sBAAAC,IAAA,IAAAC,EAAAJ,EAAA,QAAAK,EAAAL,EAAA,QAAAM,EAAAN,EAAA,QAAAO,EAAAP,EAAA,QAAAQ,EAAAR,EAAA,QAAAS,EAAAT,EAAA,QAAAU,EAAAV,EAAA,QAAAW,EAAAX,EAAA,QA4CAG,EAAA,SAAAS,GAMA,SAAAT,IACA,IAAAU,EAAAD,EAAAE,KAAAC,YA6HA,OAzHAF,EAAAG,QAAA,IAA4BV,EAAA,KAAOO,GAMnCA,EAAAI,WAAA,EAQAJ,EAAAK,eAAA,EAIAL,EAAAM,OAAA,GAQAN,EAAAO,WAAA,GAIAP,EAAAQ,MAAA,GAOAR,EAAAS,UAAA,GAIAT,EAAAU,iBAAA,GAeAV,EAAAW,WAAA,GAUAX,EAAAY,QAAA,GAKAZ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AA8C,OAAAooB,WAAA,EACA,MACA,WACAlrB,KAAA8C,OAAAqoB,WAAA,EACA,UACAnrB,KAAA8C,OAAAqoB,WAAA,EACA,MACA,YACA,WACAnrB,KAAA8C,OAAAsoB,WAAA,EACA,MAGA,OADAV,EAAAH,SAAA,IAA4Bd,EAAA,KAAakB,GACzCD,GAEAnB,EAhKA,CAiKEC,EAAA","file":"js/chunk-611d868d.b5b73dce.js","sourcesContent":["/**\r\n * Defines functionality for \"Data Item\"\r\n *\r\n * A Data Item can be any object that can hold data. For example [[LineSeries]]\r\n * holds a number of values, that comprise a line graph. Each of those values\r\n * (data points) is a {DataItem}.\r\n *\r\n * Furthermore the [[LineSeries]] itself can be represented as a entry in the\r\n * legend. Since legend needs access to Line Series' value, a DataItem is\r\n * created for the series.\r\n */\r\nimport * as tslib_1 from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObjectEvents } from \"./Base\";\r\nimport { Adapter } from \"./utils/Adapter\";\r\nimport { Animation, AnimationDisposer } from \"./utils/Animation\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\n/**\r\n * ============================================================================\r\n * DATA ITEM\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * DataItem represents single element in data, for example a data point in a\r\n * Serial Chart Series, e.g. a column.\r\n *\r\n * DataItem defines relationship between structured data, required for specific\r\n * chart type or task, and raw source data.\r\n *\r\n * It also implements required calculations, updates related visual elements,\r\n * etc.\r\n *\r\n * @todo Description\r\n * @important\r\n */\r\nvar DataItem = /** @class */ (function (_super) {\r\n tslib_1.__extends(DataItem, _super);\r\n /**\r\n * Constructor\r\n * @todo Adding events to disposers produces errors in some cases, which means that chart is using disposed Data Items which is not right\r\n */\r\n function DataItem() {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Holds Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * This Data Item is currently disabled.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._disabled = false;\r\n /**\r\n * Indicates whether Data Item has any properties set.\r\n *\r\n * If it does not have any, the code can use this property to check whether\r\n * they need to apply costly operation of re-applying properties, whenever\r\n * Data Item-related element is redrawn, e.g. series.\r\n */\r\n _this.hasProperties = false;\r\n /**\r\n * An object containing calculated values.\r\n */\r\n _this.values = {};\r\n /**\r\n * An object container current working values.\r\n */\r\n //public readonly workingValues: { [index: string]: { [index: string]: number } } = {};\r\n /**\r\n * An object containing categories.\r\n */\r\n _this.categories = {};\r\n /**\r\n * An object containing dates.\r\n */\r\n _this.dates = {};\r\n /**\r\n * An object containing locations for the Data Item.\r\n *\r\n * A location is a position within date or category, or, in some other cases,\r\n * where there is no single point but rather some period.\r\n */\r\n _this.locations = {};\r\n /**\r\n * Current working locations.\r\n */\r\n _this.workingLocations = {};\r\n /**\r\n * An object containing Data Item specific appearance properties in key-value\r\n * pairs.\r\n *\r\n * Sometimes a single Data Item needs to apply different properties than the\r\n * rest of the data [[Series]] it is part of. E.g. a single column,\r\n * represented by a Data Item needs to be filled with a different color than\r\n * the reset of the [[ColumnSeries]] it belongs to.\r\n *\r\n * That's where Data Item's `properties` come into play.\r\n *\r\n * Please note that you should set Data Item-specific properties using\r\n * `setProperty()` method, rather than access `properties` object directly.\r\n */\r\n _this.properties = {};\r\n /**\r\n * A list of [[Sprite]] elements that are associated with this Data Item.\r\n *\r\n * E.g. an [[Axis]] Data Item has several separate elements associated with\r\n * it, like [[AxisTick]], [[AxisLabel]], and [[Grid]].\r\n *\r\n * Data Item keeps track of all of them, so it can toggle all related visual\r\n * elements when it itself is toggled.\r\n */\r\n _this.sprites = [];\r\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\r\n _this.isTemplate = false;\r\n /**\r\n * The current index within the dataItems\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._index = null;\r\n /**\r\n * Is Data Item currently visible?\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._visible = true;\r\n /**\r\n * Is Data Item currently hidden?\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._hidden = false;\r\n /**\r\n * Should this Data Item be used when calculating data ranges and scales?\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._ignoreMinMax = false;\r\n /**\r\n * Some of the Data Item's data fields may contain an array of children. This\r\n * property contains an object indicating which fields hold an array, so that\r\n * they can be processed properly.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.hasChildren = {};\r\n /**\r\n * Indicates whether Data Item is currently animiting from visible to hidden\r\n * state.\r\n */\r\n _this.isHiding = false;\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._valueAnimations = {};\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._locationAnimations = {};\r\n _this.className = \"DataItem\";\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n Object.defineProperty(DataItem.prototype, \"index\", {\r\n /**\r\n * Data Item's position index in Component's data.\r\n *\r\n * @return Index\r\n */\r\n get: function () {\r\n if (this.component) {\r\n if (this._index != null) {\r\n return this._index;\r\n }\r\n else {\r\n return -1;\r\n }\r\n }\r\n else {\r\n return -1;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"animations\", {\r\n /**\r\n * A list of [[Animations]] objects currently mutating Data Item's values.\r\n *\r\n * @return [description]\r\n */\r\n get: function () {\r\n if (!this._animations) {\r\n this._animations = [];\r\n this._disposers.push(new AnimationDisposer(this._animations));\r\n }\r\n return this._animations;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"visible\", {\r\n /**\r\n * Returns `true` if this Data Item is currently visible.\r\n *\r\n * @return Visible?\r\n */\r\n get: function () {\r\n if (this._hidden) {\r\n return false;\r\n }\r\n return this._visible;\r\n },\r\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Visible?\r\n */\r\n set: function (value) {\r\n if (value) {\r\n this.hidden = false;\r\n }\r\n if (this._visible != value) {\r\n this.setVisibility(value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"hidden\", {\r\n /**\r\n * Returns `true` if this Data Item is currently hidden.\r\n *\r\n * @return Hidden?\r\n */\r\n get: function () {\r\n return this._hidden;\r\n },\r\n /**\r\n * Sets hidden flag for data item. Mostly used to initially hide data item.\r\n *\r\n * @param value Hidden?\r\n */\r\n set: function (value) {\r\n if (this._hidden != value) {\r\n this._hidden = value;\r\n if (value) {\r\n this.setVisibility(false);\r\n }\r\n else {\r\n this.setVisibility(true, true);\r\n }\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"__disabled\", {\r\n /**\r\n * Is this Data Item currently disabled?\r\n *\r\n * @ignore Exclude from docs\r\n * @param {boolean}\r\n */\r\n get: function () {\r\n return this._disabled;\r\n },\r\n /**\r\n * Disables all Sprites associated with this Data Item.\r\n *\r\n * @ignore Exclude from docs\r\n * @param {boolean}\r\n */\r\n set: function (value) {\r\n //\tif (this._disabled != value) { // not good\r\n this._disabled = value;\r\n $array.each(this.sprites, function (sprite) {\r\n sprite.__disabled = value;\r\n });\r\n //\t}\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets visibility of the Data Item.\r\n *\r\n * @param value Data Item\r\n */\r\n DataItem.prototype.setVisibility = function (value, noChangeValues) {\r\n $array.each(this.sprites, function (sprite) {\r\n if (value) {\r\n sprite.visible = sprite.defaultState.properties.visible;\r\n }\r\n else {\r\n if (sprite.hiddenState) {\r\n sprite.visible = sprite.hiddenState.properties.visible;\r\n }\r\n else {\r\n sprite.visible = false;\r\n }\r\n }\r\n });\r\n this._visible = value;\r\n if (this.events.isEnabled(\"visibilitychanged\")) {\r\n var event_1 = {\r\n type: \"visibilitychanged\",\r\n target: this,\r\n visible: value\r\n };\r\n this.events.dispatchImmediately(\"visibilitychanged\", event_1);\r\n }\r\n };\r\n /**\r\n * Shows the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param fields A list of fields to set values of\r\n */\r\n DataItem.prototype.show = function (duration, delay, fields) {\r\n var _this = this;\r\n if (!this.hidden) {\r\n this.setVisibility(true, true);\r\n this.isHiding = false;\r\n if (this._hideDisposer) {\r\n this.removeDispose(this._hideDisposer);\r\n }\r\n var animation_1;\r\n if (fields) {\r\n $array.each(fields, function (field) {\r\n animation_1 = _this.setWorkingValue(field, _this.values[field].value, duration, delay);\r\n });\r\n }\r\n $array.each(this.sprites, function (sprite) {\r\n var animation = sprite.show(duration);\r\n if (animation != null && !animation.isFinished()) {\r\n _this._disposers.push(animation);\r\n if (delay != null && delay > 0) {\r\n animation.delay(delay);\r\n }\r\n }\r\n });\r\n return animation_1;\r\n }\r\n };\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n DataItem.prototype.dispose = function () {\r\n _super.prototype.dispose.call(this);\r\n $array.each(this.sprites, function (sprite) {\r\n sprite.dispose();\r\n });\r\n this.sprites = [];\r\n };\r\n /**\r\n * Hides the Data Item and related visual elements.\r\n *\r\n * @param duration Animation duration (ms)\r\n * @param delay Delay animation (ms)\r\n * @param toValue A value to set to `fields` when hiding\r\n * @param fields A list of data fields to set value to `toValue`\r\n */\r\n DataItem.prototype.hide = function (duration, delay, toValue, fields) {\r\n var _this = this;\r\n this.isHiding = true;\r\n $array.each(this.sprites, function (sprite) {\r\n var animation = sprite.hide(duration);\r\n if (animation != null && !animation.isFinished()) {\r\n _this._disposers.push(animation);\r\n if (delay != null && delay > 0) {\r\n animation.delay(delay);\r\n }\r\n }\r\n });\r\n if ($type.isNumber(toValue) && fields) {\r\n var animation_2;\r\n $array.each(fields, function (field) {\r\n var anim = _this.setWorkingValue(field, toValue, duration, delay);\r\n if (anim) {\r\n animation_2 = anim;\r\n }\r\n });\r\n if (animation_2 && !animation_2.isFinished()) {\r\n this._hideDisposer = animation_2.events.on(\"animationended\", function () {\r\n _this.setVisibility(false, true);\r\n _this.isHiding = false;\r\n });\r\n this._disposers.push(this._hideDisposer);\r\n return animation_2;\r\n }\r\n else {\r\n this.isHiding = false;\r\n this.setVisibility(false, true);\r\n }\r\n }\r\n else {\r\n this.isHiding = false;\r\n this.setVisibility(false);\r\n }\r\n };\r\n /**\r\n * Returns a duration (ms) the Data Item should take to animate from one\r\n * value to another.\r\n *\r\n * If the duration is not specified via parameter, this method will try to\r\n * request a default duration from the related `Component`.\r\n *\r\n * @param duration Default duration (ms)\r\n * @return Duration (ms)\r\n */\r\n DataItem.prototype.getDuration = function (duration) {\r\n if (!$type.isNumber(duration)) {\r\n var component = this.component;\r\n if (component) {\r\n duration = component.interpolationDuration;\r\n }\r\n }\r\n if (duration != null) {\r\n return this.adapter.apply(\"duration\", duration);\r\n }\r\n };\r\n /**\r\n * Returns a numeric value for specific data field.\r\n *\r\n * If `calculated` is not set, it will return a raw value, as it is in\r\n * source data.\r\n *\r\n * If `calculated` is set, it will return a pre-calculated specific value.\r\n *\r\n * @param name Data field name\r\n * @param calculated A calculated value name\r\n * @return Value\r\n */\r\n DataItem.prototype.getValue = function (name, calculated) {\r\n if (name && this.component) {\r\n if (!calculated) {\r\n calculated = this.component.dataFields[name + \"Show\"];\r\n if (!calculated) {\r\n calculated = \"value\";\r\n }\r\n }\r\n var value = this.values[name][calculated];\r\n if (this.adapter.isEnabled(\"value\")) {\r\n return this.adapter.apply(\"value\", {\r\n value: value,\r\n field: name\r\n }).value;\r\n }\r\n else {\r\n return value;\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a current working value for a specific data field.\r\n *\r\n * The actual value may differ from the one returned by `getValue()`. The\r\n * latter returns static values from the data source.\r\n *\r\n * `getWorkingValue()` returns current value, which is usually different if\r\n * Data Item is animating from one state to another.\r\n *\r\n * @param name Data field name\r\n * @return Value\r\n */\r\n DataItem.prototype.getWorkingValue = function (name) {\r\n if (name && this.component) {\r\n var realName = this.component.dataFields[name + \"Show\"];\r\n if (!realName) {\r\n realName = \"workingValue\";\r\n }\r\n return this.adapter.apply(\"workingValue\", {\r\n workingValue: this.values[name][realName],\r\n field: name\r\n }).workingValue;\r\n }\r\n };\r\n /**\r\n * @ignore\r\n * @return Value\r\n */\r\n DataItem.prototype.getActualWorkingValue = function (name) {\r\n return this.values[name].workingValue;\r\n };\r\n /**\r\n * Sets a numeric value for specific data field.\r\n *\r\n * @param name Data field name\r\n * @param value Value\r\n * @param calculated Calculated data field name\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\r\n DataItem.prototype.setValue = function (name, value, duration, delay) {\r\n var currentValue = this.values[name].value;\r\n var newDuration = this.getDuration(duration);\r\n value = $type.toNumber(value);\r\n if (currentValue !== value) {\r\n this.values[name].value = value;\r\n if (this.events.isEnabled(\"valuechanged\")) {\r\n var event_2 = {\r\n type: \"valuechanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"valuechanged\", event_2);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemValueChange(this, name);\r\n }\r\n }\r\n this.setWorkingValue(name, value, newDuration, delay);\r\n };\r\n DataItem.prototype.setCalculatedValue = function (name, value, calculated) {\r\n var currentValue = this.values[name][calculated];\r\n if (currentValue !== value && $type.isNumber(value)) {\r\n this.values[name][calculated] = value;\r\n if (this.events.isEnabled(\"calculatedvaluechanged\")) {\r\n var event_3 = {\r\n type: \"calculatedvaluechanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"calculatedvaluechanged\", event_3);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemCalculatedValueChange(this, name);\r\n }\r\n }\r\n };\r\n /**\r\n * Set current working numeric value for a specific data field.\r\n *\r\n * @param name Data field name\r\n * @param value Value\r\n * @param calculated Calculated data field name\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n * @return An [[Animation]] object used for transition to new values\r\n */\r\n DataItem.prototype.setWorkingValue = function (name, value, duration, delay) {\r\n if ($type.isNumber(this.values[name].value)) {\r\n var newDuration = this.getDuration(duration);\r\n var workingValue = this.values[name].workingValue;\r\n if (newDuration != null && newDuration > 0 && $type.isNumber(workingValue) && this.component) { // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop\r\n if (workingValue != value) {\r\n var animation = this.animate({ childObject: this.values[name], property: \"workingValue\", from: workingValue, to: value, dummyData: name }, newDuration, this.component.interpolationEasing);\r\n if (delay != null) {\r\n animation.delay(delay);\r\n }\r\n animation.events.on(\"animationstarted\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationprogress\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationended\", this.handleInterpolationProgress, this);\r\n this._valueAnimations[name] = animation;\r\n return animation;\r\n }\r\n else {\r\n var valueAnimation = this._valueAnimations[name];\r\n if (valueAnimation) {\r\n valueAnimation.stop();\r\n }\r\n this.values[name].workingValue = value;\r\n }\r\n }\r\n else {\r\n var valueAnimation = this._valueAnimations[name];\r\n if (valueAnimation) {\r\n valueAnimation.stop();\r\n }\r\n this.values[name].workingValue = value;\r\n if (this.events.isEnabled(\"workingvaluechanged\")) {\r\n var event_4 = {\r\n type: \"workingvaluechanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"workingvaluechanged\", event_4);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemWorkingValueChange(this, name);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a relative location for a data field.\r\n *\r\n * A location is always relative on a 0 to 1 scale, with 0 being beginning,\r\n * 0.5 middle and 1 end.\r\n *\r\n * @todo Rewiew description\r\n * @param name Data field name\r\n * @param value Location (0-1)\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\r\n DataItem.prototype.setLocation = function (name, value, duration, delay) {\r\n var currentLocation = this.locations[name];\r\n if (currentLocation !== value) {\r\n this.locations[name] = value;\r\n if (this.events.isEnabled(\"locationchanged\")) {\r\n var event_5 = {\r\n type: \"locationchanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"locationchanged\", event_5);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemValueChange(this, name); // correct\r\n }\r\n this.setWorkingLocation(name, value, duration, delay);\r\n }\r\n };\r\n /**\r\n * Sets a current working location for a data field.\r\n *\r\n * @todo Rewiew description\r\n * @param name Data field name\r\n * @param value Location (0-1)\r\n * @param duration Duration (ms) to animate to new value to\r\n * @param delay Delay animation (ms)\r\n */\r\n DataItem.prototype.setWorkingLocation = function (name, value, duration, delay) {\r\n var newDuration = this.getDuration(duration);\r\n var workingLocation = this.workingLocations[name];\r\n if (newDuration != null && newDuration > 0 && $type.isNumber(workingLocation) && this.component) { // sometimes NaN is passed, so only change this to != null if all cases of NaN are handled, otherwise animation won't stop\r\n if (workingLocation != value) {\r\n var animation = this.animate({ childObject: this.workingLocations, property: name, from: workingLocation, to: value, dummyData: name }, newDuration, this.component.interpolationEasing);\r\n if (delay != null) {\r\n animation.delay(delay);\r\n }\r\n animation.events.on(\"animationstarted\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationprogress\", this.handleInterpolationProgress, this);\r\n animation.events.on(\"animationended\", this.handleInterpolationProgress, this);\r\n this._locationAnimations[name] = animation;\r\n return animation;\r\n }\r\n else {\r\n var locationAnimation = this._locationAnimations[name];\r\n if (locationAnimation) {\r\n locationAnimation.stop();\r\n }\r\n this.workingLocations[name] = value;\r\n }\r\n }\r\n else {\r\n var locationAnimation = this._locationAnimations[name];\r\n if (locationAnimation) {\r\n locationAnimation.stop();\r\n }\r\n this.workingLocations[name] = value;\r\n if (this.events.isEnabled(\"workinglocationchanged\")) {\r\n var event_6 = {\r\n type: \"workinglocationchanged\",\r\n target: this,\r\n property: name\r\n };\r\n this.events.dispatchImmediately(\"workinglocationchanged\", event_6);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemWorkingLocationChange(this, name);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets Date value to a data field.\r\n *\r\n * @param name Data field name\r\n * @param date Date object\r\n * @param duration Duration (ms) to animate to new value to\r\n */\r\n DataItem.prototype.setDate = function (name, date, duration) {\r\n if (!$type.isDate(date) && this.component) {\r\n date = this.component.dateFormatter.parse(date);\r\n }\r\n var currentDate = this.dates[name];\r\n if (currentDate !== date) {\r\n this.dates[name] = date;\r\n this.setValue(name, date.getTime(), duration);\r\n }\r\n };\r\n /**\r\n * Returns a Date value of the data field.\r\n *\r\n * @param name Data field name\r\n * @return Date object\r\n */\r\n DataItem.prototype.getDate = function (name) {\r\n return this.adapter.apply(\"date\", {\r\n date: this.dates[name],\r\n field: name\r\n }).date;\r\n };\r\n /**\r\n * Sets a Data Item-specific visual properties to apply to related elements.\r\n *\r\n * @param name Property name\r\n * @param value Property value\r\n */\r\n DataItem.prototype.setProperty = function (name, value) {\r\n if (this.properties[name] !== value) {\r\n this.hasProperties = true;\r\n this.properties[name] = value;\r\n if (this.events.isEnabled(\"propertychanged\")) {\r\n var event_7 = {\r\n type: \"propertychanged\",\r\n target: this,\r\n property: name,\r\n value: value\r\n };\r\n this.events.dispatchImmediately(\"propertychanged\", event_7);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemPropertyChange(this, name);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a related category for this Data Item.\r\n *\r\n * @todo Review description\r\n * @param name Data field name\r\n * @param value Category\r\n */\r\n DataItem.prototype.setCategory = function (name, value) {\r\n if (!$type.isString(value)) {\r\n value = $type.castString(value);\r\n }\r\n if (this.categories[name] !== value) {\r\n this.categories[name] = value;\r\n }\r\n };\r\n /**\r\n * Clones the Data Item, including all related data.\r\n *\r\n * @return New Data Item clone\r\n */\r\n DataItem.prototype.clone = function (cloneId) {\r\n var dataItem = _super.prototype.clone.call(this, cloneId);\r\n dataItem.copyFrom(this);\r\n return dataItem;\r\n };\r\n /**\r\n * Copies all properties and related data from different data item.\r\n *\r\n * @param object Source data item\r\n */\r\n DataItem.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n _super.prototype.copyFrom.call(this, source);\r\n if (source.dataContext) {\r\n this.dataContext = $utils.copy(source.dataContext, {});\r\n }\r\n $utils.copyProperties(source.locations, this.locations);\r\n $utils.copyProperties(source.properties, this.properties);\r\n $utils.copyProperties(source.categories, this.categories);\r\n $utils.copyProperties(source.values, this.values);\r\n $utils.copyProperties(source.dates, this.dates);\r\n $object.each(source.values, function (name, value) {\r\n _this.values[name] = $object.copy(value);\r\n });\r\n this.adapter.copyFrom(source.adapter);\r\n this.events.copyFrom(source.events);\r\n this.component = source.component;\r\n };\r\n Object.defineProperty(DataItem.prototype, \"opacity\", {\r\n /**\r\n * Sets opacity for all Data Item's related elements (Sprites).\r\n *\r\n * @param value Opacity (0-1)\r\n */\r\n set: function (value) {\r\n $array.each(this.sprites, function (sprite) {\r\n sprite.opacity = value;\r\n });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"ignoreMinMax\", {\r\n /**\r\n * Exclude from min/max calculations?\r\n * @return Exclude from min/max calculations?\r\n */\r\n get: function () {\r\n return this._ignoreMinMax;\r\n },\r\n /**\r\n * Sets whether this data point should not be included in the scale and\r\n * minimum/maximum calculations.\r\n *\r\n * E.g. some we may want to exclude a particular data point from influencing\r\n * [[ValueAxis]] scale.\r\n *\r\n * @param value Exclude from min/max calculations?\r\n */\r\n set: function (value) {\r\n this._ignoreMinMax = value;\r\n if (this.events.isEnabled(\"propertychanged\")) {\r\n var event_8 = {\r\n type: \"propertychanged\",\r\n target: this,\r\n property: \"ignoreMinMax\",\r\n value: value\r\n };\r\n this.events.dispatchImmediately(\"propertychanged\", event_8);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemPropertyChange(this, \"ignoreMinMax\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Creates and starts an [[Animation]] to interpolate (morph) Data Item's\r\n * properties and/or values.\r\n *\r\n * @see {@link Animation}\r\n * @param animationOptions Animation options\r\n * @param duration Animation duration (ms)\r\n * @param easing Easing function\r\n * @return Animation\r\n */\r\n DataItem.prototype.animate = function (animationOptions, duration, easing) {\r\n return new Animation(this, animationOptions, duration, easing).start();\r\n };\r\n /**\r\n * Handles intermediate steps when Data Item is interpolating (morphing) from\r\n * one value to another.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\r\n DataItem.prototype.handleInterpolationProgress = function (event) {\r\n var animation = event.target;\r\n // it's always only one options, no need cycle\r\n var animationOptions = animation.animationOptions[0];\r\n if (animationOptions) {\r\n if (this.events.isEnabled(\"workingvaluechanged\")) {\r\n var event_9 = {\r\n type: \"workingvaluechanged\",\r\n target: this,\r\n property: animationOptions.dummyData\r\n };\r\n this.events.dispatchImmediately(\"workingvaluechanged\", event_9);\r\n }\r\n if (this.component) {\r\n this.component.handleDataItemWorkingValueChange(this, animationOptions.dummyData);\r\n }\r\n }\r\n };\r\n /**\r\n * Checks whether Data Item has values set for all of the data fields,\r\n * supplied via argument.\r\n *\r\n * @ignore Exclude from docs\r\n * @param fields Field list to check\r\n * @return Has values for all fields?\r\n */\r\n DataItem.prototype.hasValue = function (fields) {\r\n // todo: what about categories?\r\n for (var i = 0, len = fields.length; i < len; i++) {\r\n var values = this.values[fields[i]];\r\n if (!values || !$type.hasValue(values.value)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n Object.defineProperty(DataItem.prototype, \"depth\", {\r\n /**\r\n * Depth of the Data Item.\r\n *\r\n * In nested data structures, like TreeMap, this indicates the level this\r\n * data point is at, in relation to the parent Data Item.\r\n *\r\n * @return Depth\r\n */\r\n get: function () {\r\n if (!this.parent) {\r\n return 0;\r\n }\r\n else {\r\n return this.parent.depth + 1;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DataItem.prototype, \"dataContext\", {\r\n /**\r\n * Sets to a reference to an original object from Component's data.\r\n *\r\n * @return [description]\r\n */\r\n get: function () {\r\n return this._dataContext;\r\n },\r\n /**\r\n * A reference to an original object in Component's data, that this Data Item\r\n * is derived from.\r\n *\r\n * @param value Original data object\r\n */\r\n set: function (value) {\r\n this._dataContext = value;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * adds a sprite to dataItem.sprites array\r\n * @ignore\r\n */\r\n DataItem.prototype.addSprite = function (sprite) {\r\n if (sprite.dataItem && sprite.dataItem != this) {\r\n $array.remove(sprite.dataItem.sprites, sprite);\r\n }\r\n if (!this.visible) {\r\n sprite.hide(0);\r\n }\r\n if (this.isHiding) {\r\n sprite.hide();\r\n }\r\n this.sprites.push(sprite);\r\n sprite.dataItem = this;\r\n };\r\n return DataItem;\r\n}(BaseObjectEvents));\r\nexport { DataItem };\r\n//# sourceMappingURL=DataItem.js.map","export var options = {\r\n verbose: true,\r\n commercialLicense: false,\r\n classNamePrefix: \"amcharts-\",\r\n autoSetClassName: false,\r\n minPolylineStep: 0.5,\r\n onlyShowOnViewport: false,\r\n queue: false\r\n};\r\n//# sourceMappingURL=Options.js.map","/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { registry } from \"./Registry\";\r\nimport { options } from \"./Options\";\r\nimport { raf } from \"./utils/AsyncPending\";\r\nimport { triggerIdle } from \"./utils/AsyncPending\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $object from \"./utils/Object\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * The main class that handles system-wide tasks, like caching, heartbeats, etc.\r\n * @important\r\n */\r\nvar System = /** @class */ (function () {\r\n /**\r\n * Performs initialization of the System object.\r\n *\r\n * Called when the first [[Sprite]] object is created.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n function System() {\r\n /**\r\n * A flag indicating if the system is on pause.\r\n */\r\n this._isPaused = false;\r\n /**\r\n * Holds the list of currently playing animations.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.animations = [];\r\n /**\r\n * Unique ID of the object.\r\n */\r\n this.uid = registry.getUniqueId();\r\n /**\r\n * @todo Description\r\n * @todo Needed?\r\n * @ignore Exclude from docs\r\n */\r\n this.dummyCounter = 0;\r\n this._frameRequested = false;\r\n this.updateStepDuration = 45;\r\n this.time = Date.now();\r\n }\r\n /**\r\n * Reports time elapsed since timer was reset.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Needed?\r\n * @param msg Message to report in console\r\n * @param reset Reset time counter\r\n */\r\n System.prototype.reportTime = function (msg, reset) {\r\n if (this.dummyCounter < 6) {\r\n //console.log(Date.now() - this.time, msg, this.dummyCounter2);\r\n }\r\n if (reset) {\r\n this.time = Date.now();\r\n }\r\n };\r\n /**\r\n * Performs \"heartbeat\" operations `frameRate` number of times per second.\r\n *\r\n * When the chart element is invalidated, it is not immediately redrawn.\r\n *\r\n * Instead it waits for the next `update()` cycle to be re-validated.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\r\n System.prototype.update = function () {\r\n var _this = this;\r\n if (this._isPaused) {\r\n return;\r\n }\r\n this._frameRequested = false;\r\n var time = Date.now();\r\n registry.dispatchImmediately(\"enterframe\");\r\n //this.validateLayouts();\r\n //this.validatePositions();\r\n /*\r\n for (let key in registry.invalidLayouts) {\r\n this.validateLayouts(key);\r\n }\r\n for (let key in registry.invalidPositions) {\r\n this.validatePositions(key);\r\n }\r\n */\r\n var skippedComponents = [];\r\n // data objects first - do all calculations\r\n // only data is parsed in chunks, thats why we do for loop instead of a while like with other invalid items.\r\n // important to go backwards, as items are removed!\r\n // TODO use iterator instead\r\n for (var key in registry.invalidDatas) {\r\n if ($object.hasKey(registry.invalidDatas, key)) {\r\n var invalidData = registry.invalidDatas[key];\r\n while (invalidData.length > 0) {\r\n var component = invalidData[0];\r\n var dataProvider = component.dataProvider;\r\n if (!component.isDisposed()) {\r\n if (dataProvider && dataProvider.dataInvalid) {\r\n try {\r\n dataProvider.validateData();\r\n if (dataProvider.dataValidationProgress < 1) {\r\n break;\r\n }\r\n }\r\n catch (e) {\r\n $array.remove(invalidData, dataProvider);\r\n dataProvider.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n try {\r\n component.validateData();\r\n if (component.dataValidationProgress < 1) {\r\n break;\r\n }\r\n }\r\n catch (e) {\r\n $array.remove(invalidData, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n }\r\n else {\r\n $array.remove(invalidData, component);\r\n }\r\n }\r\n if (Date.now() - time > this.updateStepDuration) {\r\n break;\r\n }\r\n }\r\n }\r\n while (registry.invalidRawDatas.length > 0) {\r\n var component = registry.invalidRawDatas[0];\r\n if (!component.isDisposed()) {\r\n try {\r\n component.validateRawData();\r\n }\r\n catch (e) {\r\n $array.remove(registry.invalidRawDatas, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n $array.remove(registry.invalidRawDatas, component);\r\n }\r\n }\r\n // TODO use iterator instead\r\n while (registry.invalidDataItems.length > 0) {\r\n var component = registry.invalidDataItems[0];\r\n var dataProvider = component.dataProvider;\r\n // this is needed to avoid partial value validation when data is parsed in chunks\r\n if (component.isDisposed() || component.dataInvalid || (dataProvider && dataProvider.dataInvalid)) {\r\n // void\r\n }\r\n else {\r\n try {\r\n component.validateDataItems();\r\n }\r\n catch (e) {\r\n $array.remove(registry.invalidDataItems, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n // this might seem too much, as validateValues removes from invalidDataItems aswell, but just to be sure (in case validateData is overriden and no super is called)\r\n $array.remove(registry.invalidDataItems, component);\r\n }\r\n // TODO use iterator instead\r\n while (registry.invalidDataRange.length > 0) {\r\n var component = registry.invalidDataRange[0];\r\n var dataProvider = component.dataProvider;\r\n if (component.isDisposed() || component.dataInvalid || (dataProvider && dataProvider.dataInvalid)) {\r\n // void\r\n }\r\n else {\r\n try {\r\n component.validateDataRange();\r\n if (!component.skipRangeEvent) {\r\n component.dispatchImmediately(\"datarangechanged\");\r\n }\r\n component.skipRangeEvent = false;\r\n }\r\n catch (e) {\r\n $array.remove(registry.invalidDataRange, component);\r\n component.raiseCriticalError(e);\r\n }\r\n }\r\n // this might seem too much, as validateDataRange removes from invalidDataRange aswell, but just to be sure (in case validateData is overriden and no super is called)\r\n $array.remove(registry.invalidDataRange, component);\r\n }\r\n var skippedSprites = [];\r\n // display objects later\r\n // TODO use iterator instead\r\n $object.each(registry.invalidLayouts, function (key) {\r\n _this.validateLayouts(key);\r\n });\r\n $object.each(registry.invalidPositions, function (key) {\r\n _this.validatePositions(key);\r\n });\r\n var hasSkipped = false;\r\n time = Date.now();\r\n $object.each(registry.invalidSprites, function (key, invalidSprites) {\r\n var count = 0;\r\n while (invalidSprites.length > 0) {\r\n _this.validateLayouts(key);\r\n _this.validatePositions(key);\r\n count++;\r\n if (count == 5) {\r\n if (Date.now() - time > _this.updateStepDuration) {\r\n break;\r\n }\r\n count = 0;\r\n }\r\n var sprite = invalidSprites[invalidSprites.length - 1];\r\n // we need to check this, as validateLayout might validate sprite\r\n if (sprite && !sprite.isDisposed()) {\r\n if (!sprite._systemCheckIfValidate()) {\r\n // void\r\n skippedSprites.push(sprite);\r\n }\r\n else {\r\n if (!_this.checkIfValidate2(sprite)) {\r\n // void\r\n skippedSprites.push(sprite);\r\n }\r\n else {\r\n try {\r\n sprite._systemUpdate(skippedSprites);\r\n }\r\n catch (e) {\r\n sprite.invalid = false;\r\n $array.remove(invalidSprites, sprite);\r\n sprite.raiseCriticalError(e);\r\n }\r\n }\r\n }\r\n // this might seem too much, but it's ok\r\n sprite.invalid = false;\r\n }\r\n $array.remove(invalidSprites, sprite);\r\n }\r\n registry.invalidSprites[key] = registry.invalidSprites[key].concat(skippedSprites);\r\n });\r\n $object.each(registry.invalidSprites, function (key, value) {\r\n if (value.length > 0) {\r\n hasSkipped = true;\r\n }\r\n });\r\n $object.each(registry.invalidDatas, function (key, value) {\r\n if (value.length > 0) {\r\n hasSkipped = true;\r\n }\r\n });\r\n // TODO make this more efficient\r\n // TODO don't copy the array\r\n $array.each($array.copy(this.animations), function (x) {\r\n x.update();\r\n });\r\n //if(!hasSkipped){\r\n $object.each(registry.invalidLayouts, function (key) {\r\n _this.validateLayouts(key);\r\n });\r\n $object.each(registry.invalidPositions, function (key) {\r\n _this.validatePositions(key);\r\n });\r\n //}\r\n triggerIdle();\r\n $object.each(registry.invalidLayouts, function (key) {\r\n _this.validateLayouts(key);\r\n });\r\n $object.each(registry.invalidPositions, function (key) {\r\n _this.validatePositions(key);\r\n });\r\n registry.dispatchImmediately(\"exitframe\");\r\n if (hasSkipped || this.animations.length > 0 || skippedComponents.length > 0) {\r\n this.requestFrame();\r\n }\r\n if (this.updateStepDuration < 200) {\r\n var all0_1 = true;\r\n $object.each(registry.invalidDatas, function (key, value) {\r\n if (value.length > 0) {\r\n all0_1 = false;\r\n }\r\n });\r\n $object.each(registry.invalidSprites, function (key, value) {\r\n if (value.length > 0) {\r\n all0_1 = false;\r\n }\r\n });\r\n if (all0_1) {\r\n this.updateStepDuration = 200;\r\n }\r\n }\r\n };\r\n System.prototype.checkIfValidate2 = function (sprite) {\r\n if (sprite.dataItem && sprite.dataItem.component && sprite.dataItem.component.dataInvalid && !sprite.dataItem.component.isTemplate) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n /**\r\n * Requests new animation frame\r\n */\r\n System.prototype.requestFrame = function () {\r\n var _this = this;\r\n if (!this._frameRequested) {\r\n raf(function () {\r\n _this.update();\r\n });\r\n this._frameRequested = true;\r\n }\r\n };\r\n /**\r\n * Triggers position re-validation on all [[Sprite]] elements that have\r\n * invalid(ated) positions.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\r\n System.prototype.validatePositions = function (id) {\r\n // invalid positions\r\n // TODO use iterator instead\r\n var invalidPositions = registry.invalidPositions[id];\r\n while (invalidPositions.length > 0) {\r\n var sprite = invalidPositions[invalidPositions.length - 1];\r\n if (!sprite.isDisposed()) {\r\n try {\r\n sprite._systemValidatePositions();\r\n }\r\n catch (e) {\r\n sprite.positionInvalid = false;\r\n $array.remove(invalidPositions, sprite);\r\n sprite.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n $array.remove(invalidPositions, sprite);\r\n }\r\n }\r\n };\r\n /**\r\n * Triggers position re-validation on all [[Container]] elements that have\r\n * invalid(ated) layouts.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Maybe should be private?\r\n */\r\n System.prototype.validateLayouts = function (id) {\r\n // invalid positions\r\n // TODO use iterator instead\r\n var invalidLayouts = registry.invalidLayouts[id];\r\n while (invalidLayouts.length > 0) {\r\n var container = invalidLayouts[invalidLayouts.length - 1];\r\n if (!container.isDisposed()) {\r\n try {\r\n container.children.each(function (sprite) {\r\n sprite._systemValidateLayouts();\r\n });\r\n container.validateLayout();\r\n }\r\n catch (e) {\r\n container.layoutInvalid = false;\r\n $array.remove(invalidLayouts, container);\r\n container.raiseCriticalError(e);\r\n }\r\n }\r\n else {\r\n $array.remove(invalidLayouts, container);\r\n }\r\n }\r\n };\r\n /**\r\n * Outputs string to console if `verbose` is `true`.\r\n *\r\n * @param value Message to output to console\r\n */\r\n System.prototype.log = function (value) {\r\n if (options.verbose) {\r\n if (console) {\r\n console.log(value);\r\n }\r\n }\r\n };\r\n Object.defineProperty(System.prototype, \"isPaused\", {\r\n /**\r\n * @return Is system on pause?\r\n */\r\n get: function () {\r\n return this._isPaused;\r\n },\r\n /**\r\n * Pauses all the processes of all the amCharts objects on the page\r\n *\r\n * @return is paused?\r\n */\r\n set: function (value) {\r\n this._isPaused = value;\r\n if (!value) {\r\n this._frameRequested = false;\r\n this.requestFrame();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * amCharts Version.\r\n *\r\n * This follows npm's semver specification.\r\n *\r\n * @see {@link https://docs.npmjs.com/misc/semver}\r\n */\r\n System.VERSION = \"4.5.10\";\r\n return System;\r\n}());\r\nexport { System };\r\n/**\r\n * A singleton global instance of [[System]].\r\n *\r\n * All code should use this, rather than instantiating their\r\n * own System objects.\r\n */\r\nexport var system = new System();\r\n//# sourceMappingURL=System.js.map","import { EventDispatcher } from \"./utils/EventDispatcher\";\r\nimport { Dictionary } from \"./utils/Dictionary\";\r\nimport { cache } from \"./utils/Cache\";\r\nimport * as $type from \"./utils/Type\";\r\nimport * as $string from \"./utils/String\";\r\nimport * as $array from \"./utils/Array\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Registry is used to store miscellaneous system-wide information, like ids,\r\n * maps, themes, and registered classes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nvar Registry = /** @class */ (function () {\r\n function Registry() {\r\n /**\r\n * Event dispacther.\r\n */\r\n this.events = new EventDispatcher();\r\n /**\r\n * All currently applied themes. All new chart instances created will\r\n * automatically inherit and retain System's themes.\r\n */\r\n this.themes = [];\r\n /**\r\n * List of all loaded available themes.\r\n *\r\n * Whenever a theme loads, it registers itself in System's `loadedThemes`\r\n * collection.\r\n */\r\n this.loadedThemes = {};\r\n /**\r\n * An indeternal counter used to generate unique IDs.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this._uidCount = 0;\r\n /**\r\n * Keeps register of class references so that they can be instnatiated using\r\n * string key.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.registeredClasses = {};\r\n /**\r\n * Holds all generated placeholders.\r\n */\r\n this._placeholders = {};\r\n /**\r\n * A list of invalid(ated) [[Sprite]] objects that need to be re-validated\r\n * during next cycle.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidSprites = {};\r\n /**\r\n * Components are added to this list when their data provider changes to\r\n * a new one or data is added/removed from their data provider.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidDatas = {};\r\n /**\r\n * Components are added to this list when values of their raw data change.\r\n * Used when we want a smooth animation from one set of values to another.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidRawDatas = [];\r\n /**\r\n * Components are added to this list when values of their data changes\r\n * (but not data provider itself).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidDataItems = [];\r\n /**\r\n * Components are added to this list when their data range (selection) is\r\n * changed, e.g. zoomed.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidDataRange = [];\r\n /**\r\n * A list of [[Sprite]] objects that have invalid(ated) positions, that need\r\n * to be recalculated.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidPositions = {};\r\n /**\r\n * A list of [[Container]] objects with invalid(ated) layouts.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n this.invalidLayouts = {};\r\n /**\r\n * An array holding all active (non-disposed) top level elemens.\r\n *\r\n * When, for example, a new chart is created, its instance will be added to\r\n * this array, and will be removed when the chart is disposed.\r\n */\r\n this.baseSprites = [];\r\n this.baseSpritesByUid = {};\r\n this.queue = [];\r\n this.uid = this.getUniqueId();\r\n this.invalidSprites.noBase = [];\r\n this.invalidDatas.noBase = [];\r\n this.invalidLayouts.noBase = [];\r\n this.invalidPositions.noBase = [];\r\n }\r\n /**\r\n * Generates a unique chart system-wide ID.\r\n *\r\n * @return Generated ID\r\n */\r\n Registry.prototype.getUniqueId = function () {\r\n var uid = this._uidCount;\r\n this._uidCount += 1;\r\n return \"id-\" + uid;\r\n };\r\n Object.defineProperty(Registry.prototype, \"map\", {\r\n /**\r\n * Returns a universal collection for mapping ids with objects.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Map collection\r\n */\r\n get: function () {\r\n if (!this._map) {\r\n this._map = new Dictionary();\r\n }\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Caches value in object's cache.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value\r\n * @param ttl TTL in seconds\r\n */\r\n Registry.prototype.setCache = function (key, value, ttl) {\r\n cache.set(this.uid, key, value, ttl);\r\n };\r\n /**\r\n * Retrieves cached value.\r\n *\r\n * @ignore Exclude from docs\r\n * @param key Key\r\n * @param value Value to return if cache is not available\r\n * @return Value\r\n */\r\n Registry.prototype.getCache = function (key, value) {\r\n if (value === void 0) { value = undefined; }\r\n return cache.get(this.uid, key, value);\r\n };\r\n /**\r\n * Dispatches an event using own event dispatcher. Will automatically\r\n * populate event data object with event type and target (this element).\r\n * It also checks if there are any handlers registered for this sepecific\r\n * event.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\r\n Registry.prototype.dispatch = function (eventType, data) {\r\n // @todo Implement proper type check\r\n if (this.events.isEnabled(eventType)) {\r\n if (data) {\r\n data.type = eventType;\r\n data.target = data.target || this;\r\n this.events.dispatch(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n else {\r\n this.events.dispatch(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Works like `dispatch`, except event is triggered immediately, without\r\n * waiting for the next frame cycle.\r\n *\r\n * @param eventType Event type (name)\r\n * @param data Data to pass into event handler(s)\r\n */\r\n Registry.prototype.dispatchImmediately = function (eventType, data) {\r\n // @todo Implement proper type check\r\n if (this.events.isEnabled(eventType)) {\r\n if (data) {\r\n data.type = eventType;\r\n data.target = data.target || this;\r\n this.events.dispatchImmediately(eventType, data);\r\n }\r\n else {\r\n this.events.dispatchImmediately(eventType, {\r\n type: eventType,\r\n target: this\r\n });\r\n }\r\n }\r\n };\r\n /**\r\n * Returns a unique placeholder suitable for the key.\r\n *\r\n * @param key Key\r\n * @return Random string to be used as placeholder\r\n */\r\n Registry.prototype.getPlaceholder = function (key) {\r\n if ($type.hasValue(this._placeholders[key])) {\r\n return this._placeholders[key];\r\n }\r\n this._placeholders[key] = \"__amcharts_\" + key + \"_\" + $string.random(8) + \"__\";\r\n return this._placeholders[key];\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidComponents = function (component) {\r\n if (component.baseId) {\r\n $array.move(this.invalidDatas[component.baseId], component);\r\n }\r\n else {\r\n $array.move(this.invalidDatas[\"noBase\"], component);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidComponents = function (component) {\r\n if (component.baseId) {\r\n $array.remove(this.invalidDatas[component.baseId], component);\r\n }\r\n $array.remove(this.invalidDatas[\"noBase\"], component);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidSprites = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.add(this.invalidSprites[sprite.baseId], sprite);\r\n }\r\n else {\r\n $array.add(this.invalidSprites[\"noBase\"], sprite);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidSprites = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.remove(this.invalidSprites[sprite.baseId], sprite);\r\n }\r\n $array.remove(this.invalidSprites[\"noBase\"], sprite);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidPositions = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.add(this.invalidPositions[sprite.baseId], sprite);\r\n }\r\n else {\r\n $array.add(this.invalidPositions[\"noBase\"], sprite);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidPositions = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.remove(this.invalidPositions[sprite.baseId], sprite);\r\n }\r\n $array.remove(this.invalidPositions[\"noBase\"], sprite);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.addToInvalidLayouts = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.add(this.invalidLayouts[sprite.baseId], sprite);\r\n }\r\n else {\r\n $array.add(this.invalidLayouts[\"noBase\"], sprite);\r\n }\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Registry.prototype.removeFromInvalidLayouts = function (sprite) {\r\n if (sprite.baseId) {\r\n $array.remove(this.invalidLayouts[sprite.baseId], sprite);\r\n }\r\n $array.remove(this.invalidLayouts[\"noBase\"], sprite);\r\n };\r\n return Registry;\r\n}());\r\nexport { Registry };\r\n/**\r\n * A singleton global instance of [[Registry]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\nexport var registry = new Registry();\r\n//# sourceMappingURL=Registry.js.map","/**\r\n * Module contains functionality related to [[Sprite]] states.\r\n */\r\nimport * as tslib_1 from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { BaseObject } from \"./Base\";\r\nimport { registry } from \"./Registry\";\r\nimport { Adapter } from \"./utils/Adapter\";\r\nimport { List, ListDisposer } from \"./utils/List\";\r\nimport { toColor } from \"./utils/Color\";\r\nimport { percent } from \"./utils/Percent\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $ease from \"./utils/Ease\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\n/**\r\n * Defines a state for [[Sprite]].\r\n *\r\n * A \"state\" is a special object that has all the same properties as the\r\n * [[Sprite]] of the same type, and which can be used to quickly apply a set\r\n * of property values. (set state)\r\n *\r\n * When [[Sprite]] (or any object that extends Sprite) is created it creates a\r\n * \"default\" state. You can modify the \"default\" state so that when the Sprite\r\n * returns to default state certain properties are added.\r\n *\r\n * Default state can be accessed using Sprite's `defaultState` getter.\r\n *\r\n * ```TypeScript\r\n * sprite.defaultState.properties.fillOpacity = 0.5;\r\n * ```\r\n * ```JavaScript\r\n * sprite.defaultState.properties.fillOpacity = 0.5;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"defaultState\": {\r\n * \"properties\": {\r\n * \"fillOpacity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * If Sprite is \"hoverable\", it automatically adds a \"hover\" state, which is\r\n * applied when it has a cursor over it.\r\n *\r\n * ```TypeScript\r\n * let hoverstate = sprite.states.create(\"hover\");\r\n * hoverstate.properties.fillOpacity = 1;\r\n * ```\r\n * ```JavaScript\r\n * var hoverstate = sprite.states.create(\"hover\");\r\n * hoverstate.properties.fillOpacity = 1;\r\n * ```\r\n * ```JSON\r\n * {\r\n * // ...\r\n * \"states\": {\r\n * \"hover\": {\r\n * \"properties\": {\r\n * \"fillOpacity\": 0.5\r\n * }\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * The above will automatically apply \"hover\" state when the Sprite is hovered,\r\n * thus will set its `fillOpacity` property to 1, and will reset it to 0.5 when\r\n * it's no longer hovered.\r\n *\r\n * Every object that inherits from [[Sprite]] can and will add their own\r\n * properties to the available list.\r\n *\r\n * User can create their own states, and apply them as needed:\r\n *\r\n * ```TypeScript\r\n * let myCustomState = sprite.states.create(\"mystate\");\r\n * myCustomState.properties.fillOpacity = 0.5;\r\n * myCustomState.properties.strokeOpacity = 0.8;\r\n * sprite.setState(\"mystate\");\r\n * ```\r\n * ```JavaScript\r\n * var myCustomState = sprite.states.create(\"mystate\");\r\n * myCustomState.properties.fillOpacity = 0.5;\r\n * myCustomState.properties.strokeOpacity = 0.8;\r\n * sprite.setState(\"mystate\");\r\n * ```\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/states/}\r\n * @important\r\n */\r\nvar SpriteState = /** @class */ (function (_super) {\r\n tslib_1.__extends(SpriteState, _super);\r\n /**\r\n * Constructor\r\n */\r\n function SpriteState() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Holds Adapter.\r\n */\r\n _this.adapter = new Adapter(_this);\r\n /**\r\n * Duration of the transition to this state. 0 means instantenous transition.\r\n * Any number means the [[Sprite]] will transit smoothly to this state,\r\n * animating all animatable properties.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.transitionDuration = 0;\r\n /**\r\n * Easing function to use when transitioning to this state.\r\n *\r\n * @default cubicOut\r\n * @see {@link Ease}\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.transitionEasing = $ease.cubicOut;\r\n /**\r\n * Collection of properties and their values that should be applied to [[Sprite]]\r\n * when switching to this State.\r\n *\r\n * The property values set on a [[SpriteState]] will override the ones set\r\n * directly on a [[Sprite]].\r\n */\r\n _this.properties = {};\r\n /**\r\n * A collection of key/value pairs that can be used to bind specific Sprite\r\n * properties to [[DataItem]].\r\n *\r\n * For example: `fill` property can be bound to `myCustomColor` field in\r\n * DataItem. The Sprite will automatically get the value for `fill` from its\r\n * DataItem.\r\n *\r\n * SpriteState-specific binding will override binding set directly on\r\n * [[Sprite]]. I.e. you can make Sprite use different fill color on hover by\r\n * adding a `fill` binding to a different DataItem key for Sprite's \"hover\"\r\n * state object.\r\n *\r\n * @see {@link Sprite}\r\n */\r\n _this.propertyFields = {};\r\n //public propertyFields: Dictionary = new Dictionary();;\r\n /**\r\n * A list of [[Filter]] elements to be applied to the relative [[Sprite]]\r\n * when switching to this State.\r\n *\r\n * @param {List}\r\n */\r\n _this.filters = new List();\r\n /**\r\n * Identifies if this object is a \"template\" and should not be treated as\r\n * real object that is drawn or actually used in the chart.\r\n */\r\n _this.isTemplate = false;\r\n _this.className = \"SpriteState\";\r\n // Make filter list disposable\r\n _this._disposers.push(new ListDisposer(_this.filters));\r\n // Decorate adapter with events so that we can apply its settings whenever\r\n // it is modified\r\n _this.adapter.events.on(\"inserted\", function (ev) {\r\n _this[ev.newValue.key] = _this[ev.newValue.key];\r\n }, undefined, false);\r\n _this.adapter.events.on(\"removed\", function (ev) {\r\n _this[ev.newValue.key] = _this[ev.newValue.key];\r\n }, undefined, false);\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns [[Sprite]] element's property value.\r\n *\r\n * Will check if there are any bindings with [[DataItem]] and if there are\r\n * any method callbacks set up for the specific property.\r\n *\r\n * @param propertyName Property name\r\n * @return Property value\r\n */\r\n SpriteState.prototype.getPropertyValue = function (propertyName) {\r\n var propValue = this.properties[propertyName];\r\n var sprite = this.sprite;\r\n if (sprite) {\r\n var fieldName = this.propertyFields[propertyName];\r\n if ($type.hasValue(fieldName)) {\r\n if (sprite.dataItem) {\r\n propValue = sprite.dataItem.dataContext[fieldName];\r\n }\r\n }\r\n // Apply adapters\r\n // If the value itself is undefined, we're going to pass in Sprite's\r\n // value to adapters\r\n // @todo get rid of \r\n if (!$type.hasValue(propValue)) {\r\n var spriteValue = sprite.getPropertyValue(propertyName);\r\n propValue = this.adapter.apply(propertyName, sprite.getPropertyValue(propertyName));\r\n if (propValue == spriteValue) {\r\n propValue = undefined;\r\n }\r\n }\r\n else {\r\n propValue = this.adapter.apply(propertyName, propValue);\r\n }\r\n /*let method = this.propertyMethods.getKey(propertyName);\r\n if (method) {\r\n propValue = method(sprite, propertyName);\r\n }*/\r\n }\r\n return propValue;\r\n };\r\n /**\r\n * Copies all property and style values from another [[SpriteState]] object.\r\n *\r\n * @param source Source [[SpriteState]]\r\n */\r\n SpriteState.prototype.copyFrom = function (source) {\r\n if (source && source != this) {\r\n this.transitionDuration = source.transitionDuration;\r\n this.transitionEasing = source.transitionEasing;\r\n $utils.copyProperties(source.properties, this.properties);\r\n $utils.copyProperties(source.propertyFields, this.propertyFields);\r\n this.filters.copyFrom(source.filters);\r\n this.adapter.copyFrom(source.adapter);\r\n }\r\n };\r\n Object.defineProperty(SpriteState.prototype, \"allValues\", {\r\n /**\r\n * Returns all values that should be applied by the SpriteState.\r\n *\r\n * It takes adapters into account.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Properties\r\n * @todo Add adapter values\r\n * @todo proper type this[\"_properties\"]\r\n */\r\n get: function () {\r\n var _this = this;\r\n // Init return value\r\n var res = {};\r\n // Apply adapters to all values\r\n $object.each(this.properties, function (prop, value) {\r\n res[prop] = _this.getPropertyValue(prop);\r\n });\r\n // Cycle through all adapters and add values for missing properties\r\n var keys = this.adapter.keys();\r\n $object.each(keys, function (_x, prop) {\r\n var value = _this.getPropertyValue(prop);\r\n res[prop] = value;\r\n });\r\n // Cycle through all property fileds and add values for missing properties\r\n var propertyFields = this.propertyFields;\r\n $object.each(propertyFields, function (prop) {\r\n var value = _this.getPropertyValue(prop);\r\n res[prop] = value;\r\n });\r\n return res;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Resets the State to initial state - no values or Filters applied.\r\n */\r\n SpriteState.prototype.reset = function () {\r\n this.properties = {};\r\n this.filters.clear();\r\n };\r\n /**\r\n * Processes JSON-based config before it is applied to the object.\r\n *\r\n * @ignore Exclude from docs\r\n * @param config Config\r\n */\r\n SpriteState.prototype.processConfig = function (config) {\r\n if ($type.hasValue(config) && $type.hasValue(config[\"properties\"])) {\r\n $object.each(config[\"properties\"], function (key, value) {\r\n if ($type.isString(value)) {\r\n if (value.match(/^[0-9.\\-]+\\%$/)) {\r\n config[\"properties\"][key] = percent($type.toNumber(value));\r\n }\r\n else if (value.match(/^\\#[0-9abcdef]{3,}$/i)) {\r\n config[\"properties\"][key] = toColor(value);\r\n }\r\n }\r\n });\r\n }\r\n _super.prototype.processConfig.call(this, config);\r\n };\r\n return SpriteState;\r\n}(BaseObject));\r\nexport { SpriteState };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"SpriteState\"] = SpriteState;\r\n//# sourceMappingURL=SpriteState.js.map","/**\r\n * Container module\r\n * @todo Needs description\r\n */\r\nimport * as tslib_1 from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Sprite } from \"./Sprite\";\r\nimport { SpriteState } from \"./SpriteState\";\r\nimport { List } from \"./utils/List\";\r\nimport { MultiDisposer } from \"./utils/Disposer\";\r\nimport { Dictionary, DictionaryDisposer } from \"./utils/Dictionary\";\r\nimport { getInteraction } from \"./interaction/Interaction\";\r\nimport { Rectangle } from \"./elements/Rectangle\";\r\nimport { Percent } from \"./utils/Percent\";\r\nimport { registry } from \"./Registry\";\r\nimport { InterfaceColorSet } from \"../core/utils/InterfaceColorSet\";\r\nimport * as $iter from \"./utils/Iterator\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $math from \"./utils/Math\";\r\nimport * as $type from \"./utils/Type\";\r\nimport { system } from \"./System\";\r\n;\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * Container can contain multiple sprites and arrange them in various layouts.\r\n *\r\n * @see {@link IContainerEvents} for a list of available events\r\n * @see {@link IContainerAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar Container = /** @class */ (function (_super) {\r\n tslib_1.__extends(Container, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Container() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Container children. (sorted by layout)\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._childrenByLayout = [];\r\n /**\r\n * Container's disposers for its child elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._childrenDisposers = new Dictionary();\r\n /**\r\n * Indicates if this container contains any focused elements, including\r\n * itself.\r\n */\r\n _this.hasFocused = false;\r\n /**\r\n * An array of references to elements the state should be set, when it is set\r\n * on this element.\r\n */\r\n _this.setStateOnSprites = [];\r\n /*\r\n * @ignore\r\n */\r\n _this.layoutInvalid = false;\r\n _this._absoluteWidth = 0;\r\n _this._absoluteHeight = 0;\r\n /**\r\n * An array of child Sprites that should be ready before this object can\r\n * fire a \"ready\" event.\r\n */\r\n _this._shouldBeReady = [];\r\n /**\r\n * Enables touch tap protection.\r\n */\r\n _this._tapToActivate = false;\r\n /**\r\n * If `tapToActivate` is used, this setting will determine how long the chart\r\n * will stay in \"active\" mode.\r\n *\r\n * @default 3000\r\n * @since 4.4.0\r\n */\r\n _this.tapTimeout = 3000;\r\n _this.className = \"Container\";\r\n _this._element = _this.paper.addGroup(\"g\");\r\n _this.group.add(_this.element);\r\n _this.setPropertyValue(\"pixelPerfect\", false);\r\n _this.setPropertyValue(\"layout\", \"absolute\");\r\n _this.setPropertyValue(\"fixedWidthGrid\", false);\r\n _this.setPropertyValue(\"verticalCenter\", \"none\");\r\n _this.setPropertyValue(\"horizontalCenter\", \"none\");\r\n _this._positionPrecision = 4;\r\n _this._disposers.push(new DictionaryDisposer(_this._childrenDisposers));\r\n _this.children.events.on(\"inserted\", _this.handleChildAdded, _this);\r\n _this.children.events.on(\"removed\", _this.handleChildRemoved, _this);\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Handles adding of a new child into `children`. Adding new children might\r\n * affect the whole layout so it needs to be revalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n * @todo Throw an exception on adding a disposed object. Of course it's better NOT TO add disposed objects, so that what we should focus on.\r\n */\r\n Container.prototype.handleChildAdded = function (event) {\r\n this.processChild(event.newValue);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Container.prototype.processChild = function (child) {\r\n // try solves the problem when somedy adds child directly to children\r\n try {\r\n this._childrenDisposers.insertKey(child.uid, new MultiDisposer([\r\n // it's not enough to listen to POSITION_CHANGED only, as some extra redrawals will happen.\r\n child.events.on(\"transformed\", this.handleChildTransform, this),\r\n child.events.on(\"zIndexChanged\", this.sortAndAdd, this)\r\n ]));\r\n }\r\n catch (err) {\r\n // void\r\n }\r\n if (this.element && !child.disabled) {\r\n var group = this.element;\r\n group.add(child.group);\r\n }\r\n child.parent = this;\r\n child.paper = this.paper;\r\n this.dispatchImmediately(\"childadded\", { type: \"childadded\", newValue: child });\r\n this.invalidate();\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Container.prototype.sortAndAdd = function () {\r\n this.sortChildren();\r\n this.addChildren();\r\n };\r\n /**\r\n * Handles child removal. Changing size of the child may change the\r\n * whole layout of the Container, hence layout needs to be invalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\r\n Container.prototype.handleChildRemoved = function (event) {\r\n var child = event.oldValue;\r\n // TODO figure out why the key sometimes doesn't exist\r\n this._childrenDisposers.removeKey(child.uid);\r\n if (this.element) {\r\n var group = this.element;\r\n group.removeElement(child.group);\r\n }\r\n if (child.isMeasured) {\r\n this.invalidateLayout();\r\n }\r\n this.dispatchImmediately(\"childremoved\", { type: \"childremoved\", oldValue: child });\r\n };\r\n /**\r\n * Handles child transformation. Changing size of the child may change the\r\n * whole layout of the Container, hence layout needs to be invalidated.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event Event object\r\n */\r\n Container.prototype.handleChildTransform = function (event) {\r\n var child = event.target;\r\n if (child.isMeasured) { // && this.layout != \"none\" && this.layout != \"absolute\") {\r\n this.invalidateLayout();\r\n }\r\n };\r\n /**\r\n * Invalidates Container's layout, causing it to be re-evaluated again.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.invalidateLayout = function () {\r\n if (this.layoutInvalid || this.disabled || this.isTemplate || this.layout == \"none\" || this.__disabled) {\r\n return;\r\n }\r\n this.layoutInvalid = true;\r\n registry.addToInvalidLayouts(this);\r\n system.requestFrame();\r\n };\r\n /**\r\n * Invalidates element.\r\n *\r\n * Object will be redrawn during the next update cycle.\r\n *\r\n * Please note that in most cases elements will auto-invalidate when needed. If\r\n * everything works, DO NOT use this method. Use it only if some changes do\r\n * not take otherwise.\r\n */\r\n Container.prototype.invalidate = function () {\r\n _super.prototype.invalidate.call(this);\r\n this.invalidateLayout();\r\n };\r\n /**\r\n * Invalidates the whole element, including layout AND all its child\r\n * elements.\r\n *\r\n * As this will essentially force all elements to redraw, use only if\r\n * absolutely necessary.\r\n */\r\n Container.prototype.deepInvalidate = function () {\r\n _super.prototype.invalidate.call(this);\r\n //this.sortChildren();\r\n $array.each(this._childrenByLayout, function (child) {\r\n if (child instanceof Container) {\r\n child.deepInvalidate();\r\n }\r\n else {\r\n child.invalidate();\r\n }\r\n });\r\n this.invalidateLayout();\r\n };\r\n Object.defineProperty(Container.prototype, \"children\", {\r\n /**\r\n * Returns a list of the child [[Sprite]] elements contained in this\r\n * Container.\r\n *\r\n * @return List of child elements (Sprites)\r\n */\r\n get: function () {\r\n // @todo Review if we can add all children to disposers\r\n if (!this._children) {\r\n this._children = new List();\r\n //this._disposers.push(new ListDisposer(this._children));\r\n }\r\n return this._children;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"minWidth\", {\r\n /**\r\n * @return Width (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minWidth\");\r\n },\r\n /**\r\n * Minimum width (px) for the Container. A container will not\r\n * auto-shrink beyond this value, even if child elements are smaller.\r\n *\r\n * @param value Width (px)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"minWidth\", value)) {\r\n this.invalidateLayout();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"minHeight\", {\r\n /**\r\n * @return Height (px)\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minHeight\");\r\n },\r\n /**\r\n * Minimum height (px) for the Container. A container will not\r\n * auto-shrink beyond this value, even if child elements are smaller.\r\n *\r\n * @param value Height (px)\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"minHeight\", value)) {\r\n this.invalidateLayout();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Overrides the original `removeElement` so that Container's actual element\r\n * is not removed. We do not need to remove element of a Container.\r\n *\r\n * We do this because remove element each time will fail the `getBBox`.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.removeElement = function () {\r\n };\r\n /**\r\n * Sorts Container's children: the ones with variable width and height are\r\n * put at the end of the list (depending on layout type), so that fixed-width\r\n * ones can be drawn first.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.sortChildren = function () {\r\n var _this = this;\r\n this._childrenByLayout = [];\r\n if (this.layout == \"none\" || this.layout == \"absolute\" || !this.layout) {\r\n //$iter.each(this.children.iterator(), (child) => {\r\n //\tthis._childrenByLayout.push(child);\r\n //});\r\n this._childrenByLayout = this.children.values;\r\n }\r\n else {\r\n // Assemble fixed-size and relative lists\r\n var fixed_1 = [];\r\n var relative_1 = [];\r\n $iter.each(this.children.iterator(), function (child) {\r\n if (_this.layout == \"horizontal\" || _this.layout == \"grid\") {\r\n if (!$type.isNumber(child.percentWidth)) {\r\n fixed_1.push(child);\r\n }\r\n else {\r\n relative_1.push(child);\r\n }\r\n }\r\n else if (_this.layout == \"vertical\") {\r\n if (!$type.isNumber(child.percentHeight)) {\r\n fixed_1.push(child);\r\n }\r\n else {\r\n relative_1.push(child);\r\n }\r\n }\r\n else {\r\n fixed_1.push(child);\r\n }\r\n });\r\n // Concat everything into list\r\n this._childrenByLayout = fixed_1.concat(relative_1);\r\n }\r\n this.calculateRelativeSize();\r\n };\r\n /**\r\n * Calculates relative sizes for all Container's children.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make it protected?\r\n */\r\n Container.prototype.calculateRelativeSize = function () {\r\n var _this = this;\r\n var totalRelativeWidth = 0;\r\n var totalRelativeHeight = 0;\r\n $array.each(this._childrenByLayout, function (child) {\r\n // if child is not measured, we do not care about it at all.\r\n if (child.isMeasured) {\r\n if ($type.isNumber(child.percentWidth)) {\r\n totalRelativeWidth += child.percentWidth;\r\n }\r\n if ($type.isNumber(child.percentHeight)) {\r\n totalRelativeHeight += child.percentHeight;\r\n }\r\n }\r\n });\r\n $array.each(this._childrenByLayout, function (child) {\r\n if (child.isMeasured) {\r\n if (_this.layout == \"horizontal\") {\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / totalRelativeWidth;\r\n }\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / 100;\r\n }\r\n }\r\n if (_this.layout == \"vertical\") {\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / totalRelativeHeight;\r\n }\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / 100;\r\n }\r\n }\r\n if (_this.layout == \"grid\") {\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / 100;\r\n }\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / 100;\r\n }\r\n }\r\n }\r\n if (_this.layout == \"absolute\" || !child.isMeasured) {\r\n if ($type.isNumber(child.percentWidth)) {\r\n child.relativeWidth = child.percentWidth / 100;\r\n }\r\n if ($type.isNumber(child.percentHeight)) {\r\n child.relativeHeight = child.percentHeight / 100;\r\n }\r\n }\r\n });\r\n };\r\n /**\r\n * Adds all children to Container's SVG element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.addChildren = function () {\r\n /*\r\n Need this check because a child might be assigned to parent even before element is created, for example a theme\r\n access scrollbar.thumb\r\n */\r\n if (this.element) {\r\n var zindexed = $array.copy(this.children.values); // not children by layout!\r\n var sortArray = zindexed.map(function (data, idx) {\r\n return { idx: idx, data: data };\r\n });\r\n sortArray.sort(function (a, b) {\r\n var ai = (a.data.zIndex || 0);\r\n var bi = (b.data.zIndex || 0);\r\n if (ai < bi) {\r\n return -1;\r\n }\r\n if (ai > bi) {\r\n return 1;\r\n }\r\n return a.idx - b.idx;\r\n });\r\n zindexed = sortArray.map(function (val) {\r\n return val.data;\r\n });\r\n var group_1 = this.element;\r\n // check, maybe the order is good already\r\n var isCorrect = true;\r\n if (group_1.node && group_1.node.childNodes) {\r\n for (var i = 0, len = group_1.node.childNodes.length; i < len; i++) {\r\n if (group_1.node.childNodes[i] != zindexed[i].group.node) {\r\n isCorrect = false;\r\n break;\r\n }\r\n }\r\n }\r\n if (!isCorrect) {\r\n $array.each(zindexed, function (child) {\r\n if (child.group) {\r\n group_1.add(child.group);\r\n }\r\n });\r\n if (this._background) {\r\n this.group.addToBack(this._background.group);\r\n }\r\n this.invalidateLayout();\r\n }\r\n }\r\n };\r\n /**\r\n * Creates a new element of specific type and assigns as a child to the\r\n * Container.\r\n *\r\n * @param Class type for the new element\r\n * @return New element\r\n */\r\n Container.prototype.createChild = function (classType) {\r\n var sprite = new classType();\r\n sprite.parent = this;\r\n return sprite;\r\n };\r\n /**\r\n * Removes all Container's children without actually destroying them.\r\n *\r\n * To destroy children use `disposeChildren()` instead.\r\n */\r\n Container.prototype.removeChildren = function () {\r\n // remove all children\r\n // TODO use iteration instead\r\n while (this.children.length > 0) {\r\n var child = this.children.getIndex(0);\r\n child.parent = undefined;\r\n this.children.removeValue(child);\r\n }\r\n };\r\n /**\r\n * Removes and destroys all Container's children.\r\n *\r\n * To remove children from Container without destroying them, use\r\n * `removeChildren()`.\r\n */\r\n Container.prototype.disposeChildren = function () {\r\n // TODO use iteration instead\r\n while (this.children.length > 0) {\r\n var child = this.children.getIndex(0);\r\n child.dispose();\r\n this.children.removeValue(child);\r\n }\r\n };\r\n Object.defineProperty(Container.prototype, \"background\", {\r\n /**\r\n * @return Background element\r\n */\r\n get: function () {\r\n if (!this._background) {\r\n this._background = this.createBackground();\r\n this.processBackground();\r\n }\r\n return this._background;\r\n },\r\n /**\r\n * An element to use as container background.\r\n *\r\n * @param background Background element\r\n */\r\n set: function (background) {\r\n if (this._background && this.background != background) {\r\n this.removeDispose(this._background);\r\n }\r\n if (background) {\r\n this._background = background;\r\n this._disposers.push(background);\r\n this.processBackground();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Handles the situation where parent element is resized.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.handleGlobalScale = function () {\r\n _super.prototype.handleGlobalScale.call(this);\r\n this.children.each(function (child) {\r\n child.handleGlobalScale();\r\n });\r\n };\r\n /**\r\n * Creates and returns a [[Rectangle]] to use as a background for Container.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Background Rectangle element\r\n */\r\n Container.prototype.createBackground = function () {\r\n return new Rectangle();\r\n };\r\n /**\r\n * Decorates background element with required properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.processBackground = function () {\r\n var background = this._background;\r\n if (background) {\r\n background.isMeasured = false;\r\n this._background.fill = new InterfaceColorSet().getFor(\"background\");\r\n background.parent = this;\r\n background.isMeasured = false;\r\n this.children.removeValue(background);\r\n this._disposers.push(background);\r\n this.group.addToBack(this._background.group);\r\n }\r\n };\r\n /**\r\n * Measures the size of container and informs its children of how much size\r\n * they can occupy, by setting their relative `maxWidth` and `maxHeight`\r\n * properties.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.validateLayout = function () {\r\n var _this = this;\r\n registry.removeFromInvalidLayouts(this);\r\n this.layoutInvalid = false;\r\n // prevents from drawing if topparent is 0x0\r\n /*\r\n let topParent = this.topParent;\r\n if (topParent) {\r\n if (!topParent.maxWidth || !topParent.maxHeight) {\r\n this._disposers.push(topParent.events.once(\"maxsizechanged\", this.invalidateLayout, this));\r\n }\r\n }*/\r\n this._availableWidth = this.innerWidth;\r\n this._availableHeight = this.innerHeight;\r\n var measuredWidth = 0;\r\n var measuredHeight = 0;\r\n var allValid = true;\r\n if (this.children) {\r\n this.sortChildren();\r\n // we itterate through list of children, sorted by layout priority. sprites which width non-relative width/height will go first, so we will reduce available width before proceeding to sprites with relative width/height\r\n $array.each(this._childrenByLayout, function (child) {\r\n var maxWidth;\r\n var maxHeight;\r\n if ($type.isNumber(child.relativeWidth)) {\r\n maxWidth = $math.round(_this._availableWidth * child.relativeWidth, 2);\r\n if (_this.layout == \"horizontal\") { // || this.layout == \"absolute\") {\r\n maxWidth -= child.pixelMarginRight + child.pixelMarginLeft;\r\n }\r\n }\r\n else {\r\n if (_this.layout == \"horizontal\") {\r\n if (child.invalid) {\r\n child.validate();\r\n }\r\n }\r\n }\r\n if ($type.isNumber(child.relativeHeight)) {\r\n maxHeight = $math.round(_this._availableHeight * child.relativeHeight, 2);\r\n if (_this.layout == \"vertical\") { // || this.layout == \"absolute\") {\r\n maxHeight -= child.pixelMarginTop + child.pixelMarginBottom;\r\n }\r\n }\r\n else {\r\n if (_this.layout == \"vertical\") {\r\n if (child.invalid) {\r\n child.validate();\r\n }\r\n }\r\n }\r\n // if child is valid\r\n if (child.invalid == false) {\r\n if ($type.isNumber(child.relativeWidth)) {\r\n child.maxWidth = maxWidth;\r\n }\r\n if ($type.isNumber(child.relativeHeight)) {\r\n child.maxHeight = maxHeight;\r\n }\r\n if (child.isMeasured) {\r\n // reduce available width if this is horizontal layout\r\n if (_this.layout == \"horizontal\") {\r\n if (!$type.isNumber(child.percentWidth)) {\r\n if (child.measuredWidth > 0) {\r\n _this._availableWidth -= child.measuredWidth + child.pixelMarginLeft + child.pixelMarginRight;\r\n }\r\n }\r\n }\r\n // reduce available height if this is vertical layout\r\n if (_this.layout == \"vertical\") {\r\n if (!$type.isNumber(child.percentHeight)) {\r\n if (child.measuredHeight > 0) {\r\n _this._availableHeight -= child.measuredHeight + child.pixelMarginTop + child.pixelMarginBottom;\r\n }\r\n }\r\n }\r\n var childMeasuredWidth = child.measuredWidth;\r\n var childMeasuredHeight = child.measuredHeight;\r\n if (child.align != \"none\") {\r\n childMeasuredWidth += child.pixelMarginLeft + child.pixelMarginRight;\r\n }\r\n if (child.valign != \"none\") {\r\n childMeasuredHeight += child.pixelMarginTop + child.pixelMarginBottom;\r\n }\r\n measuredWidth = Math.max(measuredWidth, childMeasuredWidth);\r\n measuredHeight = Math.max(measuredHeight, childMeasuredHeight);\r\n }\r\n }\r\n // if child is not valid\r\n else {\r\n // tell child what maximum width/ height it can occupy\r\n if (child.isMeasured) {\r\n if ($type.isNumber(child.relativeWidth)) {\r\n if (child.maxWidth != maxWidth) { // need to check this because of allValid\r\n child.maxWidth = maxWidth;\r\n allValid = false;\r\n }\r\n }\r\n if ($type.isNumber(child.relativeHeight)) {\r\n if (child.maxHeight != maxHeight) { // need to check this because of allValid\r\n child.maxHeight = maxHeight;\r\n allValid = false;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n this._absoluteWidth = measuredWidth;\r\n this._absoluteHeight = measuredHeight;\r\n // arrange after measuring, only if all children are valid already\r\n if (allValid) {\r\n this.arrange();\r\n }\r\n };\r\n /**\r\n * Arranges children according to layout specs and available space / child\r\n * sizes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.arrange = function () {\r\n var _this = this;\r\n var children = this.children;\r\n /*\r\n in this method we not only arrange children but also find out the size of the container\r\n it might seem it would be easier to get container size using sprite's measure method,\r\n however it would return only actual size of the bbox. However as each child meight have\r\n margins set, we need to check each child - we do it here.\r\n\r\n This method doesn't do anything with DOM, so it's not expensive\r\n */\r\n var measuredWidth = 0;\r\n var measuredHeight = 0;\r\n //let innerWidth: number = this.innerWidth; //$math.max(this.innerWidth, this._measuredWidth - paddingLeft - paddingRight);\r\n //let innerHeight: number = this.innerHeight; //$math.max(this.innerHeight, this._measuredHeight - paddingTop - paddingBottom);\r\n // above is wrong, as if a w/h is not specified, it is 0 and alignment doesn't work at all.\r\n var innerWidth = $math.max(this.innerWidth, this._absoluteWidth);\r\n var innerHeight = $math.max(this.innerHeight, this._absoluteHeight);\r\n var left; // = 0;\r\n var right; // = innerWidth;\r\n var top; // = 0;\r\n var bottom; // = innerHeight;\r\n var paddingLeft = this.pixelPaddingLeft;\r\n var paddingRight = this.pixelPaddingRight;\r\n var paddingTop = this.pixelPaddingTop;\r\n var paddingBottom = this.pixelPaddingBottom;\r\n var nextX = 0;\r\n var nextY = 0;\r\n var row = 0;\r\n var column = 0;\r\n var columnWidth = [];\r\n var rowHeight = [];\r\n var maxCellWidth;\r\n var minCellWidth;\r\n var columnCount;\r\n var maxWidth = this.maxWidth;\r\n var maxHeight = this.maxHeight;\r\n var minWidth = this.minWidth;\r\n var minHeight = this.minHeight;\r\n var childrenCopy = $array.copy(children.values);\r\n if (this.reverseOrder) {\r\n childrenCopy.reverse();\r\n }\r\n // GRID PRECALCULATIONS\r\n if (this.layout == \"grid\") {\r\n minCellWidth = maxWidth;\r\n maxCellWidth = 1;\r\n for (var i = 0, len = childrenCopy.length; i < len; i++) {\r\n var child = childrenCopy[i];\r\n if (child.isMeasured && !child.disabled && !child.__disabled) {\r\n var childMeasuredWidth = child.measuredWidth;\r\n if (childMeasuredWidth < minCellWidth) {\r\n minCellWidth = childMeasuredWidth;\r\n }\r\n if (childMeasuredWidth > maxCellWidth) {\r\n maxCellWidth = childMeasuredWidth;\r\n }\r\n }\r\n }\r\n minCellWidth = $math.fitToRange(minCellWidth, 1, maxWidth);\r\n maxCellWidth = $math.fitToRange(maxCellWidth, 1, maxWidth);\r\n if (this.fixedWidthGrid) {\r\n columnCount = maxWidth / maxCellWidth;\r\n }\r\n else {\r\n columnCount = maxWidth / minCellWidth; // predicted number of columns, yes it is usually much more than real number, but we fix that later\r\n }\r\n columnCount = $math.max(1, Math.floor(columnCount));\r\n columnCount = $math.min(this.maxColumns, columnCount);\r\n columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);\r\n }\r\n var contentLeft;\r\n var contentRight;\r\n var contentTop;\r\n var contentBottom;\r\n // we itterate through array of children\r\n // TODO use iterator instead\r\n for (var i = 0, len = childrenCopy.length; i < len; i++) {\r\n var child = childrenCopy[i];\r\n if (child.isMeasured && !child.disabled && !child.__disabled) {\r\n var x = undefined; //child.pixelX; // must reset\r\n var y = undefined; //child.pixelY; // must reset\r\n var childMarginLeft = child.pixelMarginLeft;\r\n var childMarginRight = child.pixelMarginRight;\r\n var childMarginTop = child.pixelMarginTop;\r\n var childMarginBottom = child.pixelMarginBottom;\r\n var childWidth = child.measuredWidth;\r\n var childHeight = child.measuredHeight;\r\n var childLeft = void 0;\r\n var childRight = void 0;\r\n var childTop = void 0;\r\n var childBottom = void 0;\r\n switch (this.layout) {\r\n case \"none\":\r\n break;\r\n // absolute layout\r\n case \"absolute\":\r\n // horizontal alignment\r\n switch (child.align) {\r\n case \"left\":\r\n x = childMarginLeft - child.maxLeft;\r\n break;\r\n case \"center\":\r\n x = (innerWidth - childWidth) / 2 - child.maxLeft;\r\n break;\r\n case \"right\":\r\n x = innerWidth - childMarginRight - child.maxRight;\r\n break;\r\n default:\r\n if (!(child.x instanceof Percent)) {\r\n x = child.pixelX;\r\n }\r\n break;\r\n }\r\n // vertical alignment\r\n switch (child.valign) {\r\n case \"top\":\r\n y = childMarginTop - child.maxTop;\r\n break;\r\n case \"middle\":\r\n y = (innerHeight - childHeight) / 2 - child.maxTop;\r\n break;\r\n case \"bottom\":\r\n y = innerHeight - childMarginBottom - child.maxBottom;\r\n break;\r\n default:\r\n if (!(child.y instanceof Percent)) {\r\n y = child.pixelY;\r\n }\r\n break;\r\n }\r\n break;\r\n // vertical layout\r\n case \"vertical\":\r\n //if ($type.isNumber(child.relativeHeight)) {\r\n //\tchildHeight = child.maxHeight;\r\n //}\r\n switch (child.align) {\r\n case \"left\":\r\n x = childMarginLeft - child.maxLeft;\r\n break;\r\n case \"center\":\r\n x = (innerWidth - childWidth) / 2 - child.maxLeft;\r\n break;\r\n case \"right\":\r\n x = innerWidth - childMarginRight - child.maxRight;\r\n break;\r\n default:\r\n x = child.pixelX;\r\n break;\r\n }\r\n y = nextY + childMarginTop - child.maxTop;\r\n nextY = y + child.maxBottom + childMarginBottom;\r\n break;\r\n // horizontal layout\r\n case \"horizontal\":\r\n //if ($type.isNumber(child.relativeHeight)) {\r\n //\tchildHeight = child.maxHeight;\r\n //}\r\n switch (child.valign) {\r\n case \"top\":\r\n y = childMarginTop - child.maxTop;\r\n break;\r\n case \"middle\":\r\n y = (innerHeight - childHeight) / 2 - child.maxTop;\r\n break;\r\n case \"bottom\":\r\n y = innerHeight - childMarginBottom - child.maxBottom;\r\n break;\r\n default:\r\n y = child.pixelY;\r\n break;\r\n }\r\n x = nextX + childMarginLeft - child.maxLeft;\r\n nextX = x + child.maxRight + childMarginRight;\r\n break;\r\n case \"grid\":\r\n x = nextX + childMarginLeft - child.maxLeft;\r\n switch (child.valign) {\r\n case \"top\":\r\n y = nextY + childMarginTop - child.maxTop;\r\n break;\r\n case \"middle\":\r\n y = nextY + (innerHeight - childHeight) / 2 - child.maxTop;\r\n break;\r\n case \"bottom\":\r\n y = nextY + innerHeight - childMarginBottom - child.maxBottom;\r\n break;\r\n default:\r\n y = nextY - child.maxTop;\r\n break;\r\n }\r\n nextX += columnWidth[column];\r\n rowHeight[row] = $math.max(rowHeight[row], childHeight);\r\n column++;\r\n var nextColumnWidth = columnWidth[column];\r\n if (!$type.isNumber(nextColumnWidth)) {\r\n nextColumnWidth = maxCellWidth;\r\n }\r\n if (nextX > $math.min(this.innerWidth, maxWidth) - nextColumnWidth + 1 && column < columnCount) {\r\n columnCount = column;\r\n nextX = 0;\r\n nextY = 0;\r\n row = 0;\r\n column = 0;\r\n columnWidth = this.getColumnWidth(childrenCopy, columnCount, maxCellWidth);\r\n rowHeight = [];\r\n i = -1;\r\n continue;\r\n }\r\n if (column >= columnCount) {\r\n column = 0;\r\n nextY += rowHeight[row];\r\n row++;\r\n nextX = 0;\r\n }\r\n break;\r\n }\r\n if (this.layout !== \"none\") {\r\n child.moveTo({ x: x, y: y }); // must use moveTo, otherwise x/y set in percent won't work\r\n childLeft = x + child.maxLeft - childMarginLeft;\r\n childRight = x + child.maxRight + childMarginRight;\r\n childTop = y + child.maxTop - childMarginTop;\r\n childBottom = y + child.maxBottom + childMarginBottom;\r\n if (childRight > right || !$type.isNumber(right)) {\r\n right = childRight;\r\n }\r\n if (childLeft < left || !$type.isNumber(left)) {\r\n left = childLeft;\r\n }\r\n if (childTop < top || !$type.isNumber(top)) {\r\n top = childTop;\r\n }\r\n if (childBottom > bottom || !$type.isNumber(bottom)) {\r\n bottom = childBottom;\r\n }\r\n if (childRight > contentRight || !$type.isNumber(contentRight)) {\r\n contentRight = childRight;\r\n }\r\n if (childLeft < contentLeft || !$type.isNumber(contentLeft)) {\r\n contentLeft = childLeft;\r\n }\r\n if (childTop < contentTop || !$type.isNumber(contentTop)) {\r\n contentTop = childTop;\r\n }\r\n if (childBottom > contentBottom || !$type.isNumber(contentBottom)) {\r\n contentBottom = contentBottom;\r\n }\r\n }\r\n }\r\n else {\r\n child.validatePosition();\r\n }\r\n }\r\n if (this.layout == \"none\") {\r\n var noneBBox = this.bbox;\r\n left = noneBBox.x;\r\n right = noneBBox.x + noneBBox.width;\r\n top = noneBBox.y;\r\n bottom = noneBBox.y + noneBBox.height;\r\n }\r\n if (!$type.isNumber(left)) {\r\n left = 0;\r\n contentLeft = 0;\r\n }\r\n if (!$type.isNumber(right)) {\r\n right = this._availableWidth;\r\n contentRight = right;\r\n }\r\n if (!$type.isNumber(top)) {\r\n top = 0;\r\n contentTop = 0;\r\n }\r\n if (!$type.isNumber(bottom)) {\r\n bottom = this._availableHeight;\r\n contentBottom = bottom;\r\n }\r\n if (!$type.isNumber(contentTop)) {\r\n contentTop = 0;\r\n }\r\n if (!$type.isNumber(contentBottom)) {\r\n contentBottom = contentTop;\r\n }\r\n if (!$type.isNumber(contentLeft)) {\r\n contentLeft = 0;\r\n }\r\n if (!$type.isNumber(contentRight)) {\r\n contentRight = contentLeft;\r\n }\r\n measuredWidth = right - left;\r\n measuredHeight = bottom - top;\r\n if ($type.isNumber(this.relativeWidth)) {\r\n measuredWidth = maxWidth - paddingLeft - paddingRight;\r\n left = 0;\r\n right = measuredWidth;\r\n }\r\n if ($type.isNumber(this.relativeHeight)) {\r\n measuredHeight = maxHeight - paddingTop - paddingBottom;\r\n top = 0;\r\n bottom = measuredHeight;\r\n }\r\n if ($type.isNumber(this._pixelWidth)) {\r\n left = 0;\r\n measuredWidth = this._pixelWidth - paddingLeft - paddingRight;\r\n }\r\n if ($type.isNumber(minWidth) && measuredWidth < minWidth) {\r\n left = 0;\r\n measuredWidth = this.minWidth - paddingLeft - paddingRight;\r\n }\r\n if ($type.isNumber(this._pixelHeight)) {\r\n top = 0;\r\n measuredHeight = this._pixelHeight - paddingTop - paddingBottom;\r\n }\r\n if ($type.isNumber(minHeight) && measuredHeight < minHeight) {\r\n top = 0;\r\n measuredHeight = minHeight - paddingTop - paddingBottom;\r\n }\r\n var measuredContentWidth = contentRight - contentLeft;\r\n var measuredContentHeight = contentBottom - contentTop;\r\n /// handle content alignment\r\n if (this.layout != \"none\" && (this.contentAlign || this.contentValign) && children.length > 0) {\r\n var dx_1;\r\n var dy_1;\r\n var mwa = measuredWidth;\r\n var mha = measuredHeight;\r\n if (mwa < measuredContentWidth) {\r\n mwa = measuredContentWidth;\r\n }\r\n if (mha < measuredContentHeight) {\r\n mha = measuredContentHeight;\r\n }\r\n if (this.contentAlign == \"center\") {\r\n dx_1 = (mwa - measuredContentWidth) / 2;\r\n }\r\n if (this.contentAlign == \"right\") {\r\n dx_1 = mwa - measuredContentWidth;\r\n }\r\n if (this.contentValign == \"middle\") {\r\n dy_1 = (mha - measuredContentHeight) / 2;\r\n }\r\n if (this.contentValign == \"bottom\") {\r\n dy_1 = mha - measuredContentHeight;\r\n }\r\n if ($type.isNumber(dx_1)) {\r\n $iter.each(children.iterator(), function (child) {\r\n var childLeft = child.maxLeft;\r\n var ddx = dx_1;\r\n if (_this.layout == \"horizontal\") {\r\n child.x = child.pixelX + ddx;\r\n }\r\n // individual grid elements can not be aligned vertically, that's why it's different from horizontal\r\n if (_this.layout == \"grid\") {\r\n child.x = child.pixelX + ddx;\r\n }\r\n if (_this.layout == \"vertical\") {\r\n ddx += child.pixelMarginLeft;\r\n if (child.align == \"none\") {\r\n child.x = ddx - childLeft;\r\n }\r\n }\r\n if (_this.layout == \"absolute\") {\r\n ddx += child.pixelMarginLeft;\r\n if (child.align == \"none\") {\r\n child.x = ddx - childLeft;\r\n }\r\n }\r\n });\r\n }\r\n if ($type.isNumber(dy_1)) {\r\n $iter.each(children.iterator(), function (child) {\r\n var childTop = child.maxTop;\r\n var ddy = dy_1;\r\n if (_this.layout == \"horizontal\") {\r\n ddy += child.pixelMarginTop;\r\n if (child.valign == \"none\") {\r\n child.y = ddy - childTop;\r\n }\r\n }\r\n // individual grid elements can not be aligned vertically, that's why it's different from horizontal\r\n if (_this.layout == \"grid\") {\r\n ddy += child.pixelMarginTop;\r\n child.y = ddy - childTop;\r\n }\r\n if (_this.layout == \"vertical\") {\r\n child.y = child.pixelY + ddy;\r\n }\r\n if (_this.layout == \"absolute\") {\r\n ddy += child.pixelMarginTop;\r\n if (child.valign == \"none\") {\r\n child.y = ddy - childTop;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n var oldBBox = this.bbox;\r\n // this will mess up maxw/maxh set by container layout, we need a separate min/maxwidth for users\r\n // this prevents invalidating layout in such cases as scrolling category axis, when labels go outside bounds and results transformed event\r\n // todo: need to check if this doesn't cause other problems.\r\n //if (this.maxWidth > 0) {\r\n //measuredWidth = $math.min(measuredWidth, this.maxWidth);\r\n //measuredWidth = $math.max(measuredWidth, this.minWidth);\r\n //}\r\n //if (this.maxHeight > 0) {\r\n //measuredHeight = $math.min(measuredHeight, this.maxHeight);\r\n //measuredHeight = $math.max(measuredHeight, this.minHeight);\r\n //}\r\n measuredWidth = $math.max(measuredWidth, minWidth);\r\n measuredHeight = $math.max(measuredHeight, minHeight);\r\n this.contentWidth = measuredWidth;\r\n this.contentHeight = measuredHeight;\r\n // new\r\n measuredWidth = $math.min(measuredWidth, maxWidth);\r\n measuredHeight = $math.min(measuredHeight, maxHeight);\r\n this._bbox = { x: left, y: top, width: measuredWidth, height: measuredHeight };\r\n var prevLeft = this.maxLeft;\r\n var prevTop = this.maxTop;\r\n var prevBotttom = this.maxBottom;\r\n var prevRight = this.maxRight;\r\n this.measure();\r\n if (prevLeft != this.maxLeft || prevRight != this.maxRight || prevTop != this.maxTop || prevBotttom != this.maxBottom) {\r\n if (this.events.isEnabled(\"transformed\")) {\r\n var event_1 = {\r\n type: \"transformed\",\r\n target: this\r\n };\r\n if (oldBBox) {\r\n event_1.dummyData = oldBBox.width + \" \" + measuredWidth + \" \" + oldBBox.height + \" \" + measuredHeight;\r\n }\r\n this.events.dispatchImmediately(\"transformed\", event_1);\r\n }\r\n }\r\n };\r\n /**\r\n * Positions element according its center settings.\r\n *\r\n * @todo Description (review)\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.updateCenter = function () {\r\n _super.prototype.updateCenter.call(this);\r\n this.updateBackground();\r\n };\r\n /**\r\n * Update the background to fit into specific dimensions.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Make it protected?\r\n */\r\n Container.prototype.updateBackground = function () {\r\n var background = this._background; // accessing protected, as getter creates instance if it doesn't exist\r\n if (background) {\r\n background.x = this.maxLeft;\r\n background.y = this.maxTop;\r\n background.width = this.maxRight - this.maxLeft;\r\n background.height = this.maxBottom - this.maxTop;\r\n }\r\n };\r\n /**\r\n * Returns widths of all columns in a horizontal Container layout.\r\n *\r\n * @ignore Exclude from docs\r\n * @param columnCount Number of columns\r\n * @param maxCellWidth Maximum width of one grid cell\r\n * @return An array of column widths\r\n */\r\n Container.prototype.getColumnWidth = function (children, columnCount, maxCellWidth) {\r\n var _this = this;\r\n var columnWidth = [];\r\n var column = 0;\r\n $array.each(children, function (child) {\r\n if (child.isMeasured) {\r\n if (_this.fixedWidthGrid) {\r\n columnWidth[column] = maxCellWidth;\r\n }\r\n else {\r\n columnWidth[column] = $math.max(columnWidth[column], child.measuredWidth + child.pixelMarginRight + child.pixelMarginLeft);\r\n }\r\n column++;\r\n if (column == columnCount) {\r\n column = 0;\r\n }\r\n }\r\n });\r\n return columnWidth;\r\n };\r\n Object.defineProperty(Container.prototype, \"layout\", {\r\n /**\r\n * @return Layout\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"layout\");\r\n },\r\n /**\r\n * Container layout.\r\n *\r\n * Options: \"absolute\" (default), \"vertical\", \"horizontal\", \"grid\", \"none\". \"none\" is quite the same as \"absolute\" - the objects will\r\n * be positioned at their x, y coordinates, the difference is that with \"absolute\" you can still use align/valign for children and with \"none\" you can not.\r\n * Use \"none\" as much as you can as it's most cpu-saving layout.\r\n *\r\n * @default \"absolute\"\r\n * @param value Layout\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"layout\", value)) {\r\n this.invalidateLayout();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"contentValign\", {\r\n /**\r\n * @return Vertical alignment\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"contentValign\");\r\n },\r\n /**\r\n * Vertical alignment of the elements for the vertical Container.\r\n *\r\n * This is used when Container is larger than the height of all its children.\r\n *\r\n * @param value vertical alignment\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"contentValign\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"contentAlign\", {\r\n /**\r\n * @return Horizontal alignment\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"contentAlign\");\r\n },\r\n /**\r\n * Horizontal alignment of the elements for the horizontal Container.\r\n *\r\n * This is used when Container is larger than the height of all its children.\r\n *\r\n * @param value Horizontal alignment\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"contentAlign\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"fixedWidthGrid\", {\r\n /**\r\n * @return Should use fixed width grid?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fixedWidthGrid\");\r\n },\r\n /**\r\n * Controls if the grid of the Container should use fixed width. Fixed width\r\n * grid will divide available space to all its columns/rows equally, without\r\n * adapting to actual child sizes or size requirements.\r\n *\r\n * @default false\r\n * @param value Should use fixed width grid?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"fixedWidthGrid\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"maxColumns\", {\r\n /**\r\n * @return Should use fixed width grid?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxColumns\");\r\n },\r\n /**\r\n * Maximum number of columns (when using `\"grid\"` layout).\r\n *\r\n * @param value Should use fixed width grid?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"maxColumns\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"reverseOrder\", {\r\n /**\r\n * @return Reverse children?\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"reverseOrder\");\r\n },\r\n /**\r\n * If set to `true`, the children of the container will be drawn in reverse\r\n * order.\r\n *\r\n * @default false\r\n * @param value Reverse children?\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"reverseOrder\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"setStateOnChildren\", {\r\n /**\r\n * @return Set state on children\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"setStateOnChildren\");\r\n },\r\n /**\r\n * Specifies if, when state is applied on this container, the same state\r\n * should be applied to container's children as well as `background`.\r\n *\r\n * @default false\r\n * @param value Set state on children\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"setStateOnChildren\", value, true);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Checks if point is within bounds of a container.\r\n *\r\n * @param point A coordinate to check\r\n * @return `true` if it fits within container\r\n */\r\n Container.prototype.fitsToBounds = function (point) {\r\n var x = point.x;\r\n var y = point.y;\r\n var deviation = 0.5; // sometimes coordinates are rounded to numbers like .999 so we add deviation here\r\n if (x >= -deviation && x <= this.pixelWidth + deviation && y >= -deviation && y <= this.pixelHeight + deviation) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n /**\r\n * Copies all properties from different Container, including background\r\n * clone.\r\n *\r\n * @param source Source Container to copy from\r\n */\r\n Container.prototype.copyFrom = function (source) {\r\n var _this = this;\r\n _super.prototype.copyFrom.call(this, source);\r\n this.layout = source.layout;\r\n this.setStateOnChildren = source.setStateOnChildren;\r\n if (source._background) {\r\n this.background = source._background.clone();\r\n this.background.copyFrom(source._background); // won't work without this\r\n }\r\n $iter.each(source.children.iterator(), function (child) {\r\n if (child.shouldClone) {\r\n var clonedChild = child.clone();\r\n clonedChild.parent = _this;\r\n }\r\n });\r\n };\r\n Object.defineProperty(Container.prototype, \"preloader\", {\r\n /**\r\n * @return Preloader instance\r\n */\r\n get: function () {\r\n var preloader = this._preloader;\r\n if (preloader) {\r\n return preloader;\r\n }\r\n else if (this.parent) {\r\n return this.parent.preloader;\r\n }\r\n },\r\n /**\r\n * A [[Preloader]] instance to be used when Container is busy.\r\n *\r\n * @param preloader Preloader instance\r\n */\r\n set: function (preloader) {\r\n if (this._preloader) {\r\n this.removeDispose(this._preloader);\r\n }\r\n this._preloader = preloader;\r\n if (preloader) {\r\n preloader.parent = this.tooltipContainer;\r\n this._disposers.push(preloader);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets [[Paper]] instance to use to draw elements.\r\n * @ignore\r\n * @param paper Paper\r\n * @return true if paper was changed, false, if it's the same\r\n */\r\n Container.prototype.setPaper = function (paper) {\r\n var _this = this;\r\n var changed = _super.prototype.setPaper.call(this, paper);\r\n if (changed) {\r\n if (this._background) {\r\n this._background.paper = paper;\r\n this._background.topParent = this.topParent;\r\n }\r\n this.children.each(function (child) {\r\n child.setPaper(paper);\r\n child.topParent = _this.topParent;\r\n });\r\n }\r\n return changed;\r\n };\r\n /**\r\n * Removes Container from the system-wide list of invalid Containers.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.removeFromInvalids = function () {\r\n _super.prototype.removeFromInvalids.call(this);\r\n registry.removeFromInvalidLayouts(this);\r\n };\r\n /**\r\n * Sets a [[DataItem]] to be used as data for the Container.\r\n *\r\n * @todo Description\r\n * @param dataItem DataItem\r\n */\r\n Container.prototype.setDataItem = function (dataItem) {\r\n // this place is potentially dangerous, as if we set datItem for some dummy container, all children dataItems will be overriden\r\n // the main reason for doing this is that we need a setDataItem code to be called for each sprite, otherwise property fields won't be\r\n // applied. Also, getting dataItem from parent all the time is more expensive than saving value.\r\n if (this._dataItem != dataItem) {\r\n $iter.each(this.children.iterator(), function (child) {\r\n child.dataItem = dataItem;\r\n });\r\n if (this._background) {\r\n this._background.dataItem = dataItem;\r\n }\r\n }\r\n _super.prototype.setDataItem.call(this, dataItem);\r\n };\r\n /**\r\n * Measures the element.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype.measureElement = function () {\r\n if (this.disabled || this.isTemplate || this.layout == \"none\" || this.__disabled) {\r\n // void\r\n }\r\n else {\r\n this.validateLayout();\r\n }\r\n };\r\n /**\r\n * Returns Tooltip X coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return X (px)\r\n */\r\n Container.prototype.getTooltipX = function () {\r\n return _super.prototype.getTooltipX.call(this);\r\n };\r\n /**\r\n * Returns Tooltip Y coordinate if it's set, or middle of the element.\r\n *\r\n * @ignore Exclude from docs\r\n * @return Y (px)\r\n */\r\n Container.prototype.getTooltipY = function () {\r\n return _super.prototype.getTooltipY.call(this);\r\n };\r\n Object.defineProperty(Container.prototype, \"fontFamily\", {\r\n /**\r\n * @return Font family\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fontFamily\");\r\n },\r\n /**\r\n * Font family to be used for the text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font family value\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"fontFamily\", value, true)) {\r\n this.setSVGAttribute({ \"font-family\": value });\r\n this.invalidateLabels();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"fontSize\", {\r\n /**\r\n * @return Font size\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fontSize\");\r\n },\r\n /**\r\n * Font size to be used for the text. The size can either be numeric, in\r\n * pixels, or other measurements.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font size value\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"fontSize\", value, true)) {\r\n this.setSVGAttribute({ \"font-size\": value });\r\n this.invalidateLabels();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * When fontSize of fontFamily changes we need to hard-invalidate all Labels of this container to position them properly.\r\n */\r\n Container.prototype.invalidateLabels = function () {\r\n this.children.each(function (child) {\r\n // can't import Label because of Circular dependencies\r\n if (child[\"hardInvalidate\"]) {\r\n child[\"hardInvalidate\"]();\r\n }\r\n else if (child instanceof Container) {\r\n child.invalidateLabels();\r\n }\r\n });\r\n };\r\n Object.defineProperty(Container.prototype, \"fontWeight\", {\r\n /**\r\n * @return Font weight\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"fontWeight\");\r\n },\r\n /**\r\n * Font weight to use for text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Font weight\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"fontWeight\", value);\r\n this.setSVGAttribute({ \"font-weight\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Container.prototype, \"textDecoration\", {\r\n /**\r\n * @return Decoration\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"textDecoration\");\r\n },\r\n /**\r\n * A text decoration to use for text.\r\n *\r\n * Parts of the text may override this setting using in-line formatting.\r\n *\r\n * @param value Decoration\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"textDecoration\", value);\r\n this.setSVGAttribute({ \"text-decoration\": value });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Disposes (destroys) the element and all its children.\r\n */\r\n Container.prototype.dispose = function () {\r\n if (this._background) {\r\n this._background.dispose();\r\n }\r\n this._shouldBeReady = [];\r\n this.disposeChildren();\r\n _super.prototype.dispose.call(this);\r\n };\r\n /**\r\n * Applies a [[SpriteState]] on this element.\r\n *\r\n * The first parameter can either be a name of the state or a [[SpriteState]]\r\n * instance.\r\n *\r\n * When run, this method will apply SVG properties defined in a\r\n * [[SpriteState]], but only those that are relevant to this particular\r\n * element, that is are listed in its respective `properties` array.\r\n *\r\n * @see {@link SpriteState}\r\n * @param value A state - name key or instance\r\n * @param transitionDuration Duration of the transition between current and new state\r\n * @param easing An easing function\r\n */\r\n Container.prototype.setState = function (value, transitionDuration, easing) {\r\n var stateName = value;\r\n if (value instanceof SpriteState) {\r\n stateName = value.name;\r\n }\r\n if (this.setStateOnChildren) {\r\n $iter.each(this.children.iterator(), function (child) {\r\n child.setState(stateName, transitionDuration, easing);\r\n // not good to set it in child setState\r\n if (stateName != \"active\") {\r\n child.isActive = false;\r\n }\r\n });\r\n }\r\n if (this._background) {\r\n this._background.setState(stateName);\r\n }\r\n if (this.setStateOnSprites.length) {\r\n $array.each(this.setStateOnSprites, function (item) {\r\n item.setState(stateName, transitionDuration, easing);\r\n });\r\n }\r\n return _super.prototype.setState.call(this, value, transitionDuration, easing);\r\n };\r\n // otherwise isActive won't work properly with background\r\n Container.prototype.setActive = function (value) {\r\n _super.prototype.setActive.call(this, value);\r\n if (this._background) {\r\n this._background.isActive = value;\r\n }\r\n };\r\n /**\r\n * Dispatches ready event. Dispatches when all children are ready.\r\n */\r\n Container.prototype.dispatchReady = function () {\r\n var _this = this;\r\n if (!this.isReady() && !this.isDisposed()) {\r\n var allReady_1 = true;\r\n this.children.each(function (sprite) {\r\n if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {\r\n allReady_1 = false;\r\n }\r\n });\r\n $array.each(this._shouldBeReady, function (sprite) {\r\n if (!sprite.__disabled && !sprite.disabled && !sprite.isReady()) {\r\n allReady_1 = false;\r\n }\r\n });\r\n if (allReady_1) {\r\n _super.prototype.dispatchReady.call(this);\r\n }\r\n else {\r\n registry.events.once(\"exitframe\", function () {\r\n _this.dispatchReady();\r\n system.requestFrame();\r\n }, undefined, false);\r\n }\r\n }\r\n };\r\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype._systemUpdate = function (skippedSprites) {\r\n this.children.each(function (child) {\r\n if (child.invalid) {\r\n if (!child._systemCheckIfValidate()) {\r\n skippedSprites.push(child);\r\n }\r\n else if (child.dataItem && child.dataItem.component && child.dataItem.component.dataInvalid) {\r\n skippedSprites.push(child);\r\n }\r\n else {\r\n child.validate();\r\n }\r\n }\r\n });\r\n _super.prototype._systemUpdate.call(this, skippedSprites);\r\n };\r\n /**\r\n * Called during the System.validatePositions method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype._systemValidatePositions = function () {\r\n this.children.each(function (sprite) {\r\n if (sprite.positionInvalid) {\r\n sprite.validatePosition();\r\n }\r\n });\r\n _super.prototype._systemValidatePositions.call(this);\r\n };\r\n /**\r\n * Called during the System.validateLayouts method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Container.prototype._systemValidateLayouts = function () {\r\n if (this.layoutInvalid && !this.isDisposed()) {\r\n this.validateLayout();\r\n }\r\n };\r\n Object.defineProperty(Container.prototype, \"tapToActivate\", {\r\n /**\r\n * @return Enable touch protection?\r\n */\r\n get: function () {\r\n return this._tapToActivate;\r\n },\r\n /**\r\n * If set to `true` the chart's regular touch functionality will be suspended\r\n * so that the whole page it is located in remains scrollable, even when\r\n * swiping over the chart's body.\r\n *\r\n * User will need to tap the chart in order to activate its regular touch\r\n * functionality.\r\n *\r\n * The chart will remain \"active\" as long as user keeps interacting with the\r\n * chart. After `tapTimeout` milliseconds the chart will return to its\r\n * \"protected\" mode.\r\n *\r\n * @default false\r\n * @since 4.4.0\r\n * @param value Enable touch protection?\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/touch/} For more information.\r\n */\r\n set: function (value) {\r\n if (this._tapToActivate != value) {\r\n this.setTapToActivate(value);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Container.prototype.setTapToActivate = function (value) {\r\n var _this = this;\r\n this._tapToActivate = value;\r\n this.interactions.isTouchProtected = value;\r\n // setEventDisposer will also remove listeners if value == false\r\n if (value) {\r\n this.interactions.setEventDisposer(\"container-tapToActivate\", value, function () { return new MultiDisposer([\r\n _this.events.on(\"hit\", _this.handleTapToActivate, _this, false),\r\n _this.events.on(\"down\", _this.initTapTimeout, _this, false),\r\n _this.events.on(\"track\", _this.initTapTimeout, _this, false),\r\n //this.events.on(\"drag\", this.initTapTimeout, this, false),\r\n getInteraction().body.events.on(\"down\", function (ev) {\r\n if (!getInteraction().isLocalElement(ev.pointer, _this.paper.svg, _this.uid)) {\r\n _this.handleTapToActivateDeactivation();\r\n }\r\n }, _this, false)\r\n ]); });\r\n }\r\n getInteraction();\r\n };\r\n /**\r\n * @todo Ignore on non-touch events\r\n */\r\n Container.prototype.handleTapToActivate = function () {\r\n this.interactions.isTouchProtected = false;\r\n this.initTapTimeout();\r\n };\r\n Container.prototype.handleTapToActivateDeactivation = function () {\r\n this.interactions.isTouchProtected = true;\r\n };\r\n Container.prototype.initTapTimeout = function () {\r\n var _this = this;\r\n if (this._tapToActivateTimeout) {\r\n this._tapToActivateTimeout.dispose();\r\n }\r\n if (this.tapToActivate && !this.interactions.isTouchProtected && this.tapTimeout) {\r\n this._tapToActivateTimeout = this.setTimeout(function () {\r\n _this.handleTapToActivateDeactivation();\r\n }, this.tapTimeout);\r\n }\r\n };\r\n return Container;\r\n}(Sprite));\r\nexport { Container };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Container\"] = Container;\r\n//# sourceMappingURL=Container.js.map","import * as tslib_1 from \"tslib\";\r\n/**\r\n * ============================================================================\r\n * IMPORTS\r\n * ============================================================================\r\n * @hidden\r\n */\r\nimport { Container } from \"./Container\";\r\nimport { List, ListDisposer } from \"./utils/List\";\r\nimport { OrderedListTemplate } from \"./utils/SortedList\";\r\nimport { Dictionary } from \"./utils/Dictionary\";\r\nimport { Disposer, MultiDisposer } from \"./utils/Disposer\";\r\nimport { DataSource } from \"./data/DataSource\";\r\nimport { Responsive } from \"./utils/Responsive\";\r\nimport { system } from \"./System\";\r\nimport { DataItem } from \"./DataItem\";\r\nimport { registry } from \"./Registry\";\r\nimport * as $math from \"./utils/Math\";\r\nimport * as $array from \"./utils/Array\";\r\nimport * as $ease from \"./utils/Ease\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $iter from \"./utils/Iterator\";\r\nimport * as $object from \"./utils/Object\";\r\nimport * as $type from \"./utils/Type\";\r\n/**\r\n * ============================================================================\r\n * MAIN CLASS\r\n * ============================================================================\r\n * @hidden\r\n */\r\n/**\r\n * A Component represents an independent functional element or control, that\r\n * can have it's own behavior, children, data, etc.\r\n *\r\n * A few examples of a Component: [[Legend]], [[Series]], [[Scrollbar]].\r\n *\r\n * @see {@link IComponentEvents} for a list of available events\r\n * @see {@link IComponentAdapters} for a list of available Adapters\r\n * @important\r\n */\r\nvar Component = /** @class */ (function (_super) {\r\n tslib_1.__extends(Component, _super);\r\n /**\r\n * Constructor\r\n */\r\n function Component() {\r\n var _this = \r\n // Init\r\n _super.call(this) || this;\r\n /**\r\n * Holds data field names.\r\n *\r\n * Data fields define connection beween [[DataItem]] and actual properties\r\n * in raw data.\r\n */\r\n _this.dataFields = {};\r\n /**\r\n * A list of [[DataSource]] definitions of external data source.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._dataSources = {};\r\n /**\r\n * This is used when only new data is invalidated (if added using `addData`\r\n * method).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._parseDataFrom = 0;\r\n /**\r\n * Holds the disposers for the dataItems and dataUsers\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._dataDisposers = [];\r\n /**\r\n * [_start description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._start = 0;\r\n /**\r\n * [_end description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this._end = 1;\r\n /**\r\n * If set to `true`, changing data range in element will not trigger\r\n * `daterangechanged` event.\r\n */\r\n _this.skipRangeEvent = false;\r\n /**\r\n * Whenever selected scope changes (chart is zoomed or panned), for example\r\n * by interaction from a Scrollbar, or API, a chart needs to reposition\r\n * its contents.\r\n *\r\n * `rangeChangeDuration` influences how this is performed.\r\n *\r\n * If set to zero (0), the change will happen instantenously.\r\n *\r\n * If set to non-zero value, the chart will gradually animate into new\r\n * position for the set amount of milliseconds.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.rangeChangeDuration = 0;\r\n /**\r\n * An easing function to use for range change animation.\r\n *\r\n * @see {@link Ease}\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.rangeChangeEasing = $ease.cubicOut;\r\n /**\r\n * A duration (ms) of each data parsing step. A Component parses its data in\r\n * chunks in order to avoid completely freezing the machine when large data\r\n * sets are used. This setting will control how many milliseconds should pass\r\n * when parsing data until parser stops for a brief moment to let other\r\n * processes catch up.\r\n */\r\n _this.parsingStepDuration = 50;\r\n /**\r\n * [dataInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this.dataInvalid = false;\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.rawDataInvalid = false;\r\n /**\r\n * [dataRangeInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this.dataRangeInvalid = false;\r\n /**\r\n * [dataItemsInvalid description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n _this.dataItemsInvalid = false;\r\n /**\r\n * If set to a non-zero number the element will \"animate\" data values of its\r\n * children.\r\n *\r\n * This will happen on first load and whenever data values change.\r\n *\r\n * Enabling interpolation will mean that elements will transit smoothly into\r\n * new values rather than updating instantly.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.interpolationDuration = 0;\r\n /**\r\n * An easing function to use for interpolating values when transiting from\r\n * one source value to another.\r\n *\r\n * @default cubicOut\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n * @see {@link Ease}\r\n */\r\n _this.interpolationEasing = $ease.cubicOut;\r\n /**\r\n * Indicates whether transition between data item's values should start and\r\n * play out all at once, or with a small delay (as defined by\r\n * `sequencedInterpolationDelay`) for each subsequent data item.\r\n *\r\n * @default true\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.sequencedInterpolation = true;\r\n /**\r\n * A delay (ms) to wait between animating each subsequent data item's\r\n * interpolation animation.\r\n *\r\n * Relative only if `sequencedInterpolation = true`.\r\n *\r\n * @default 0\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/animations/} for more info about animations\r\n */\r\n _this.sequencedInterpolationDelay = 0;\r\n /**\r\n * A progress (0-1) for the data validation process.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n _this.dataValidationProgress = 0;\r\n _this._addAllDataItems = true;\r\n _this.className = \"Component\";\r\n _this.minZoomCount = 1;\r\n _this._dataItems = new OrderedListTemplate(_this.createDataItem());\r\n _this._dataItems.events.on(\"inserted\", _this.handleDataItemAdded, _this, false);\r\n _this._dataItems.events.on(\"removed\", _this.handleDataItemRemoved, _this, false);\r\n _this._disposers.push(new ListDisposer(_this._dataItems));\r\n _this._disposers.push(_this._dataItems.template);\r\n _this.invalidateData();\r\n // TODO what about remove ?\r\n _this.dataUsers.events.on(\"inserted\", _this.handleDataUserAdded, _this, false);\r\n // Set up disposers\r\n _this._disposers.push(new MultiDisposer(_this._dataDisposers));\r\n _this._start = 0;\r\n _this._end = 1;\r\n _this.maxZoomDeclination = 1;\r\n // Apply theme\r\n _this.applyTheme();\r\n return _this;\r\n }\r\n /**\r\n * Returns a new/empty DataItem of the type appropriate for this object.\r\n *\r\n * @see {@link DataItem}\r\n * @return Data Item\r\n */\r\n Component.prototype.createDataItem = function () {\r\n return new DataItem();\r\n };\r\n /**\r\n * [handleDataUserAdded description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param event Event object\r\n */\r\n Component.prototype.handleDataUserAdded = function (event) {\r\n var dataUser = event.newValue;\r\n dataUser.dataProvider = this;\r\n };\r\n /**\r\n * [handleDataItemValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.handleDataItemValueChange = function (dataItem, name) {\r\n if (!this.dataItemsInvalid) {\r\n this.invalidateDataItems();\r\n }\r\n };\r\n /**\r\n * [handleDataItemWorkingValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemWorkingValueChange = function (dataItem, name) {\r\n };\r\n /**\r\n * [handleDataItemWorkingLocationChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemWorkingLocationChange = function (dataItem, name) {\r\n };\r\n /**\r\n * [handleDataItemCalculatedValueChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemCalculatedValueChange = function (dataItem, name) {\r\n };\r\n /**\r\n * [handleDataItemPropertyChange description]\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.handleDataItemPropertyChange = function (dataItem, name) {\r\n };\r\n /**\r\n * Populates a [[DataItem]] width data from data source.\r\n *\r\n * Loops through all the fields and if such a field is found in raw data\r\n * object, a corresponding value on passed in `dataItem` is set.\r\n *\r\n * @ignore Exclude from docs\r\n * @param item\r\n */\r\n Component.prototype.processDataItem = function (dataItem, dataContext) {\r\n var _this = this;\r\n if (dataItem) {\r\n if (!dataContext) {\r\n dataContext = {};\r\n }\r\n // store reference to original data item\r\n dataItem.dataContext = dataContext;\r\n var hasSomeValues_1 = false;\r\n $object.each(this.dataFields, function (key, fieldValue) {\r\n var fieldName = key;\r\n var value = dataContext[fieldValue];\r\n // Apply adapters to a retrieved value\r\n if (_this.adapter.isEnabled(\"dataContextValue\")) {\r\n value = _this.adapter.apply(\"dataContextValue\", {\r\n field: fieldName,\r\n value: value,\r\n dataItem: dataItem\r\n }).value;\r\n }\r\n if (dataItem.hasChildren[fieldName]) {\r\n if ($type.hasValue(value)) {\r\n hasSomeValues_1 = true;\r\n var template = _this.createDataItem();\r\n template.copyFrom(_this.dataItems.template);\r\n var children = new OrderedListTemplate(template);\r\n children.events.on(\"inserted\", _this.handleDataItemAdded, _this, false);\r\n children.events.on(\"removed\", _this.handleDataItemRemoved, _this, false);\r\n _this._dataDisposers.push(new ListDisposer(children));\r\n var count = value.length;\r\n for (var i = 0; i < count; i++) {\r\n var rawDataItem = value[i];\r\n var childDataItem = children.create();\r\n childDataItem.parent = dataItem;\r\n _this.processDataItem(childDataItem, rawDataItem);\r\n }\r\n var anyDataItem = dataItem;\r\n anyDataItem[fieldName] = children;\r\n }\r\n }\r\n else {\r\n // data is converted to numbers/dates in each dataItem\r\n if ($type.hasValue(value)) {\r\n hasSomeValues_1 = true;\r\n dataItem[fieldName] = value;\r\n }\r\n }\r\n });\r\n $object.each(this.propertyFields, function (key, fieldValue) {\r\n var f = key;\r\n var value = dataContext[fieldValue];\r\n if ($type.hasValue(value)) {\r\n hasSomeValues_1 = true;\r\n dataItem.setProperty(f, value);\r\n }\r\n });\r\n // @todo we might need some flag which would tell whether we should create empty data items or not.\r\n if (!this._addAllDataItems && !hasSomeValues_1) {\r\n this.dataItems.remove(dataItem);\r\n }\r\n }\r\n };\r\n /**\r\n *\r\n * When validating raw data, instead of processing data item, we update it\r\n *\r\n * @ignore Exclude from docs\r\n * @param item\r\n */\r\n Component.prototype.updateDataItem = function (dataItem) {\r\n var _this = this;\r\n if (dataItem) {\r\n var dataContext_1 = dataItem.dataContext;\r\n $object.each(this.dataFields, function (key, fieldValue) {\r\n var fieldName = key;\r\n var value = dataContext_1[fieldValue];\r\n // Apply adapters to a retrieved value\r\n value = _this.adapter.apply(\"dataContextValue\", {\r\n field: fieldName,\r\n value: value,\r\n dataItem: dataItem\r\n }).value;\r\n if (dataItem.hasChildren[fieldName]) {\r\n if (value) {\r\n var anyDataItem = dataItem;\r\n var children = (anyDataItem[fieldName]);\r\n $iter.each(children.iterator(), function (child) {\r\n _this.updateDataItem(child);\r\n });\r\n }\r\n }\r\n else {\r\n // data is converted to numbers/dates in each dataItem\r\n if ($type.hasValue(value)) {\r\n dataItem[fieldName] = value;\r\n }\r\n }\r\n });\r\n $object.each(this.propertyFields, function (key, fieldValue) {\r\n var f = key;\r\n var value = dataContext_1[fieldValue];\r\n if ($type.hasValue(value)) {\r\n dataItem.setProperty(f, value);\r\n }\r\n });\r\n }\r\n };\r\n /**\r\n * [validateDataElements description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.validateDataElements = function () {\r\n var count = this.endIndex;\r\n for (var i = this.startIndex; i < count; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n // TODO is this correct\r\n if (dataItem) {\r\n this.validateDataElement(dataItem);\r\n }\r\n }\r\n };\r\n /**\r\n * Validates this element and its related elements.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validate = function () {\r\n this.validateDataElements();\r\n _super.prototype.validate.call(this);\r\n };\r\n /**\r\n * [validateDataElement description]\r\n *\r\n * @ignore Exclude from docs\r\n * @param dataItem [description]\r\n */\r\n Component.prototype.validateDataElement = function (dataItem) {\r\n };\r\n /**\r\n * Adds one or several (array) of data items to the existing data.\r\n *\r\n * @param rawDataItem One or many raw data item objects\r\n */\r\n Component.prototype.addData = function (rawDataItem, removeCount) {\r\n var _this = this;\r\n // need to check if data is invalid, as addData might be called multiple times\r\n if (!this.dataInvalid && this.inited) {\r\n this._parseDataFrom = this.data.length; // save length of parsed data\r\n }\r\n if (rawDataItem instanceof Array) {\r\n // can't use concat because new array is returned\r\n $array.each(rawDataItem, function (dataItem) {\r\n _this.data.push(dataItem);\r\n });\r\n }\r\n else {\r\n this.data.push(rawDataItem); // add to raw data array\r\n }\r\n if (this.inited) {\r\n this.removeData(removeCount);\r\n }\r\n else {\r\n if ($type.isNumber(removeCount)) {\r\n while (removeCount > 0) {\r\n this.data.shift();\r\n removeCount--;\r\n }\r\n }\r\n }\r\n this.invalidateData();\r\n };\r\n /**\r\n * Removes elements from the beginning of data\r\n *\r\n * @param count number of elements to remove\r\n */\r\n Component.prototype.removeData = function (count) {\r\n if ($type.isNumber(count)) {\r\n while (count > 0) {\r\n var dataItem = this.dataItems.getIndex(0);\r\n if (dataItem) {\r\n this.dataItems.remove(dataItem);\r\n }\r\n this.dataUsers.each(function (dataUser) {\r\n var dataItem = dataUser.dataItems.getIndex(0);\r\n if (dataItem) {\r\n dataUser.dataItems.remove(dataItem);\r\n }\r\n });\r\n this.data.shift();\r\n this._parseDataFrom--;\r\n count--;\r\n }\r\n }\r\n };\r\n /**\r\n * Triggers a data (re)parsing.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateData = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.dataInvalid){\r\n registry.addToInvalidComponents(this);\r\n system.requestFrame();\r\n this.dataInvalid = true;\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidateDataItems();\r\n });\r\n //}\r\n };\r\n /**\r\n * [invalidateDataUsers description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.invalidateDataUsers = function () {\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidate();\r\n });\r\n };\r\n /**\r\n * Invalidates data values. When data array is not changed, but values within\r\n * it changes, we invalidate data so that component would process changes.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateDataItems = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.dataItemsInvalid){\r\n $array.move(registry.invalidDataItems, this);\r\n system.requestFrame();\r\n this.dataItemsInvalid = true;\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidateDataItems();\r\n });\r\n //}\r\n };\r\n /**\r\n * Invalidates data range. This is done when data which must be shown\r\n * changes (chart is zoomed for example).\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateDataRange = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.dataRangeInvalid){\r\n this.dataRangeInvalid = true;\r\n $array.move(registry.invalidDataRange, this);\r\n system.requestFrame();\r\n //}\r\n };\r\n /**\r\n * Processes data range.\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validateDataRange = function () {\r\n $array.remove(registry.invalidDataRange, this);\r\n this.dataRangeInvalid = false;\r\n if (this.startIndex != this._prevStartIndex || this.endIndex != this._prevEndIndex) {\r\n this.rangeChangeUpdate();\r\n this.appendDataItems();\r\n this.invalidate();\r\n this.dispatchImmediately(\"datarangechanged\");\r\n }\r\n };\r\n /**\r\n * [sliceData description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.sliceData = function () {\r\n this._workingStartIndex = this.startIndex;\r\n this._workingEndIndex = this.endIndex;\r\n };\r\n /**\r\n * [rangeChangeUpdate description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.rangeChangeUpdate = function () {\r\n this.sliceData();\r\n this._prevStartIndex = this.startIndex;\r\n this._prevEndIndex = this.endIndex;\r\n };\r\n /**\r\n * [appendDataItems description]\r\n *\r\n * @todo Description\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.appendDataItems = function () {\r\n // TODO use an iterator instead\r\n var count = this.endIndex;\r\n for (var i = this.startIndex; i < count; i++) {\r\n // data item\r\n var dataItem = this.dataItems.getIndex(i);\r\n if (dataItem) {\r\n dataItem.__disabled = false;\r\n }\r\n }\r\n for (var i = 0; i < this.startIndex; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n dataItem.__disabled = true;\r\n }\r\n for (var i = this.endIndex; i < this.dataItems.length; i++) {\r\n var dataItem = this.dataItems.getIndex(i);\r\n dataItem.__disabled = true;\r\n }\r\n };\r\n /**\r\n * If you want to have a smooth transition from one data values to another, you change your raw data and then you must call this method.\r\n * then instead of redrawing everything, the chart will check raw data and smoothly transit from previous to new data\r\n */\r\n Component.prototype.invalidateRawData = function () {\r\n if (this.disabled || this.isTemplate) {\r\n return;\r\n }\r\n //if(!this.rawDataInvalid){\r\n $array.move(registry.invalidRawDatas, this);\r\n system.requestFrame();\r\n this.rawDataInvalid = true;\r\n $iter.each(this.dataUsers.iterator(), function (x) {\r\n x.invalidateRawData();\r\n });\r\n //}\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Component.prototype.validateRawData = function () {\r\n var _this = this;\r\n $array.remove(registry.invalidRawDatas, this);\r\n $iter.each(this.dataItems.iterator(), function (dataItem) {\r\n if (dataItem) {\r\n _this.updateDataItem(dataItem);\r\n }\r\n });\r\n };\r\n /**\r\n * Destroys this object and all related data.\r\n */\r\n Component.prototype.dispose = function () {\r\n this.dataItems.template.clones.clear();\r\n _super.prototype.dispose.call(this);\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Component.prototype.disposeData = function () {\r\n this.dataItems.template.clones.clear();\r\n $array.each(this._dataDisposers, function (x) {\r\n x.dispose();\r\n });\r\n // and for all components\r\n $iter.each(this.dataUsers.iterator(), function (dataUser) {\r\n dataUser.disposeData();\r\n });\r\n this._dataDisposers.length = 0;\r\n this._startIndex = undefined;\r\n this._endIndex = undefined;\r\n // dispose old\r\n this.dataItems.clear();\r\n this.dataItems.template.clones.clear();\r\n };\r\n Component.prototype.getDataItem = function (dataContext) {\r\n return this.dataItems.create();\r\n };\r\n /**\r\n * Validates (processes) data.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validateData = function () {\r\n this.dispatchImmediately(\"beforedatavalidated\");\r\n this.dataInvalid = false;\r\n registry.removeFromInvalidComponents(this);\r\n if (this.__disabled) {\r\n return;\r\n }\r\n this.dataValidationProgress = 0;\r\n // need this to slice new data\r\n this._prevStartIndex = undefined;\r\n this._prevEndIndex = undefined;\r\n // todo: this needs some overthinking, maybe some extra settings like zoomOotonDataupdate like in v3 or so. some charts like pie chart probably should act like this always\r\n this._startIndex = undefined;\r\n this._endIndex = undefined;\r\n if (this.dataFields.data && this.dataItem) {\r\n var dataContext = this.dataItem.dataContext;\r\n this._data = dataContext[this.dataFields.data];\r\n }\r\n // data items array is reset only if all data is validated, if _parseDataFrom is not 0, we append new data only\r\n // check heatmap demo if uncommented\r\n // fixed both issues by adding && this.data.length > 0\r\n // check adding series example if changed\r\n if (this._parseDataFrom === 0 && this.data.length > 0) {\r\n this.disposeData();\r\n }\r\n if (this.data.length > 0) {\r\n var preloader = this.preloader;\r\n // and for all components\r\n $iter.each(this.dataUsers.iterator(), function (dataUser) {\r\n // todo: this needs some overthinking, maybe some extra settings like zoomOUtonDataupdate like in v3 or so. some charts like pie chart probably should act like this always\r\n dataUser._startIndex = undefined;\r\n dataUser._endIndex = undefined;\r\n });\r\n var counter = 0;\r\n var startTime = Date.now();\r\n // parse data\r\n var i = this._parseDataFrom;\r\n var n = this.data.length;\r\n var _loop_1 = function () {\r\n var rawDataItem = this_1.data[i];\r\n var dataItem = this_1.getDataItem(rawDataItem);\r\n this_1.processDataItem(dataItem, rawDataItem);\r\n this_1.dataUsers.each(function (dataUser) {\r\n if (dataUser.data.length == 0) { // checking if data is not set directly\r\n var dataUserDataItem = dataUser.getDataItem(rawDataItem);\r\n dataUser.processDataItem(dataUserDataItem, rawDataItem);\r\n }\r\n });\r\n counter++;\r\n // show preloader if this takes too many time\r\n if (counter == 100) { // no need to check it on each data item\r\n counter = 0;\r\n var elapsed = Date.now() - startTime;\r\n if (elapsed > this_1.parsingStepDuration) {\r\n if (i < this_1.data.length - 10) {\r\n this_1._parseDataFrom = i + 1;\r\n // update preloader\r\n if (preloader) {\r\n if (i / this_1.data.length > 0.5 && !preloader.visible) {\r\n // do not start showing\r\n }\r\n else {\r\n preloader.progress = i / this_1.data.length;\r\n }\r\n }\r\n this_1.dataValidationProgress = i / this_1.data.length;\r\n i = this_1.data.length; // stops cycle\r\n this_1.invalidateData();\r\n return { value: void 0 };\r\n }\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (i; i < n; i++) {\r\n var state_1 = _loop_1();\r\n if (typeof state_1 === \"object\")\r\n return state_1.value;\r\n }\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n this.dataUsers.each(function (dataUser) {\r\n if (dataUser.hidden) {\r\n dataUser.hide(0);\r\n }\r\n });\r\n }\r\n this.dataValidationProgress = 1;\r\n this._parseDataFrom = 0; // reset this index, it is set to dataItems.length if addData() method was used.\r\n this.invalidateDataItems();\r\n if (!this._internalDefaultsApplied) {\r\n this.applyInternalDefaults();\r\n }\r\n this.dispatch(\"datavalidated\"); // can't zoom chart if dispatched immediately\r\n };\r\n /**\r\n * Validates (processes) data items.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.validateDataItems = function () {\r\n $array.remove(registry.invalidDataItems, this);\r\n this.dataItemsInvalid = false;\r\n this.invalidateDataRange();\r\n this.invalidate();\r\n this.dispatch(\"dataitemsvalidated\");\r\n };\r\n Object.defineProperty(Component.prototype, \"data\", {\r\n /**\r\n * Returns element's source (raw) data.\r\n *\r\n * @return Data\r\n */\r\n get: function () {\r\n if (!this._data) {\r\n this._data = [];\r\n }\r\n return this.adapter.apply(\"data\", this._data);\r\n },\r\n /**\r\n * Sets source (raw) data for the element. The \"data\" is always an `Array`\r\n * of objects.\r\n *\r\n * @param value Data\r\n */\r\n set: function (value) {\r\n this.setData(value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Component.prototype.setData = function (value) {\r\n // array might be the same, but there might be items added\r\n // todo: check if array changed, toString maybe?\r\n //if (this._data != value) {\r\n this._parseDataFrom = 0;\r\n this.disposeData();\r\n this._data = value;\r\n if (value && value.length > 0) {\r\n this.invalidateData();\r\n }\r\n //}\t\t\r\n };\r\n /**\r\n * Returns (creates if necessary) a [[DataSource]] bound to any specific\r\n * property.\r\n *\r\n * For example if I want to bind `data` to an external JSON file, I'd create\r\n * a DataSource for it.\r\n *\r\n * @param property Property to bind external data to\r\n * @return A DataSource for property\r\n */\r\n Component.prototype.getDataSource = function (property) {\r\n var _this = this;\r\n if (!$type.hasValue(this._dataSources[property])) {\r\n this._dataSources[property] = new DataSource();\r\n this._dataSources[property].component = this;\r\n this.setDataSourceEvents(this._dataSources[property], property);\r\n this._dataSources[property].adapter.add(\"dateFields\", function (val) {\r\n return _this.dataSourceDateFields(val);\r\n });\r\n this._dataSources[property].adapter.add(\"numberFields\", function (val) {\r\n return _this.dataSourceNumberFields(val);\r\n });\r\n this.events.on(\"inited\", function () {\r\n _this.loadData(property);\r\n }, this, false);\r\n }\r\n return this._dataSources[property];\r\n };\r\n Object.defineProperty(Component.prototype, \"dataSource\", {\r\n /**\r\n * @return Data source\r\n */\r\n get: function () {\r\n if (!this._dataSources[\"data\"]) {\r\n this.getDataSource(\"data\");\r\n }\r\n return this._dataSources[\"data\"];\r\n },\r\n /**\r\n *A [[DataSource]] to be used for loading Component's data.\r\n *\r\n * @see {@link https://www.amcharts.com/docs/v4/concepts/loading-external-data/} for more on loading external data\r\n * @param value Data source\r\n */\r\n set: function (value) {\r\n var _this = this;\r\n if (this._dataSources[\"data\"]) {\r\n this.removeDispose(this._dataSources[\"data\"]);\r\n }\r\n this._dataSources[\"data\"] = value;\r\n this._dataSources[\"data\"].component = this;\r\n this.events.on(\"inited\", function () {\r\n _this.loadData(\"data\");\r\n }, this, false);\r\n this.setDataSourceEvents(value, \"data\");\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Initiates loading of the external data via [[DataSource]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.loadData = function (property) {\r\n this._dataSources[property].load();\r\n };\r\n /**\r\n * This function is called by the [[DataSource]]'s `dateFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Array of date fields\r\n * @return Array of date fields populated with chart's date fields\r\n */\r\n Component.prototype.dataSourceDateFields = function (value) {\r\n return value;\r\n };\r\n /**\r\n * This function is called by the [[DataSource]]'s `numberFields` adapater\r\n * so that particular chart types can popuplate this setting with their\r\n * own type-specific data fields so they are parsed properly.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Array of number fields\r\n * @return Array of number fields populated with chart's number fields\r\n */\r\n Component.prototype.dataSourceNumberFields = function (value) {\r\n return value;\r\n };\r\n /**\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @param list [description]\r\n * @param dataFields [description]\r\n * @param targetList [description]\r\n * @return [description]\r\n */\r\n Component.prototype.populateDataSourceFields = function (list, dataFields, targetList) {\r\n $array.each(targetList, function (value) {\r\n if (dataFields[value] && $array.indexOf(list, dataFields[value]) === -1) {\r\n list.push(dataFields[value]);\r\n }\r\n });\r\n return list;\r\n };\r\n /**\r\n * Sets events on a [[DataSource]].\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.setDataSourceEvents = function (ds, property) {\r\n var _this = this;\r\n ds.events.on(\"started\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0;\r\n //preloader.label.text = this.language.translate(\"Loading\");\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"loadstarted\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0.25;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"loadended\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0.5;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"parseended\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 0.75;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"ended\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n }, undefined, false);\r\n ds.events.on(\"error\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n _this.openModal(ev.message);\r\n }, undefined, false);\r\n if (property) {\r\n ds.events.on(\"done\", function (ev) {\r\n var preloader = _this.preloader;\r\n if (preloader) {\r\n preloader.progress = 1;\r\n }\r\n if (property == \"data\" && !$type.isArray(ev.data)) {\r\n ev.data = [ev.data];\r\n }\r\n if (ds.incremental && property == \"data\" && _this.data.length) {\r\n _this.addData(ev.data, ds.keepCount ? ev.data.length : 0);\r\n }\r\n else if (ds.updateCurrentData && property == \"data\" && _this.data.length) {\r\n // cycle through existing data items\r\n $array.each(_this.data, function (item, index) {\r\n if ($type.hasValue(ev.data[index])) {\r\n $object.each(item, function (key, val) {\r\n if ($type.hasValue(ev.data[index][key])) {\r\n item[key] = ev.data[index][key];\r\n }\r\n });\r\n }\r\n });\r\n _this.invalidateRawData();\r\n }\r\n else {\r\n _this[property] = ev.data;\r\n }\r\n });\r\n }\r\n };\r\n Object.defineProperty(Component.prototype, \"responsive\", {\r\n /**\r\n * @return Data source\r\n */\r\n get: function () {\r\n if (!this._responsive) {\r\n this._responsive = new Responsive();\r\n this._responsive.component = this;\r\n }\r\n return this._responsive;\r\n },\r\n /**\r\n * A [[Responsive]] instance to be used when applying conditional\r\n * property values.\r\n *\r\n * NOTE: Responsive features are currently in development and may not work\r\n * as expected, if at all.\r\n *\r\n * @param value Data source\r\n */\r\n set: function (value) {\r\n this._responsive = value;\r\n this._responsive.component = this;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Sets current zoom.\r\n *\r\n * The range uses relative values from 0 to 1, with 0 marking beginning and 1\r\n * marking end of the available data range.\r\n *\r\n * This method will not have any effect when called on a chart object.\r\n * Since the chart can have a number of axes and series, each with its own\r\n * data, the meaning of \"range\" is very ambiguous.\r\n *\r\n * To zoom the chart use `zoom*` methods on its respective axes.\r\n *\r\n * @param range Range\r\n * @param skipRangeEvent Should rangechanged event not be triggered?\r\n * @param instantly Do not animate?\r\n * @return Actual modidied range (taking `maxZoomFactor` into account)\r\n */\r\n Component.prototype.zoom = function (range, skipRangeEvent, instantly, declination) {\r\n var _this = this;\r\n if (skipRangeEvent === void 0) { skipRangeEvent = false; }\r\n if (instantly === void 0) { instantly = false; }\r\n var start = range.start;\r\n var end = range.end;\r\n var priority = range.priority;\r\n if (!$type.isNumber(declination)) {\r\n declination = this.maxZoomDeclination;\r\n }\r\n if (!$type.isNumber(start) || !$type.isNumber(end)) {\r\n return { start: this.start, end: this.end };\r\n }\r\n if (this._finalStart != start || this._finalEnd != end) {\r\n var maxZoomFactor = this.maxZoomFactor / this.minZoomCount;\r\n // most likely we are dragging left scrollbar grip here, so we tend to modify end\r\n if (priority == \"start\") {\r\n // add to the end\r\n if (1 / (end - start) > maxZoomFactor) {\r\n end = start + 1 / maxZoomFactor;\r\n }\r\n //unless end is > 0\r\n if (end > 1 && end - start < 1 / maxZoomFactor) {\r\n //end = 1;\r\n start = end - 1 / maxZoomFactor;\r\n }\r\n }\r\n // most likely we are dragging right, so we modify left\r\n else {\r\n // remove from start\r\n if (1 / (end - start) > maxZoomFactor) {\r\n start = end - 1 / maxZoomFactor;\r\n }\r\n if (start < 0 && end - start < 1 / maxZoomFactor) {\r\n //start = 0;\r\n end = start + 1 / maxZoomFactor;\r\n }\r\n }\r\n if (start < -declination) {\r\n start = -declination;\r\n }\r\n if (1 / (end - start) > maxZoomFactor) {\r\n end = start + 1 / maxZoomFactor;\r\n }\r\n if (end > 1 + declination) {\r\n end = 1 + declination;\r\n }\r\n if (1 / (end - start) > maxZoomFactor) {\r\n start = end - 1 / maxZoomFactor;\r\n }\r\n this._finalEnd = end;\r\n this._finalStart = start;\r\n this.skipRangeEvent = skipRangeEvent;\r\n if (this.rangeChangeDuration > 0 && !instantly) {\r\n // todo: maybe move this to Animation\r\n var rangeChangeAnimation = this.rangeChangeAnimation;\r\n if (rangeChangeAnimation && rangeChangeAnimation.progress < 1) {\r\n var options = rangeChangeAnimation.animationOptions;\r\n if (options.length > 1) {\r\n if (options[0].to == start && options[1].to == end) {\r\n return { start: start, end: end };\r\n }\r\n }\r\n }\r\n this.dispatchImmediately(\"rangechangestarted\");\r\n if (this.rangeChangeAnimation) {\r\n this.rangeChangeAnimation.kill();\r\n }\r\n rangeChangeAnimation = this.animate([{ property: \"start\", to: start }, { property: \"end\", to: end }], this.rangeChangeDuration, this.rangeChangeEasing);\r\n this.rangeChangeAnimation = rangeChangeAnimation;\r\n if (rangeChangeAnimation && !rangeChangeAnimation.isFinished()) {\r\n rangeChangeAnimation.events.on(\"animationended\", function () {\r\n _this.dispatchImmediately(\"rangechangeended\");\r\n });\r\n }\r\n else {\r\n this.dispatchImmediately(\"rangechangeended\");\r\n }\r\n }\r\n else {\r\n this.start = start;\r\n this.end = end;\r\n }\r\n }\r\n return { start: start, end: end };\r\n };\r\n /**\r\n * Zooms to specific data items using their index in data.\r\n *\r\n * This method will not have any effect when called on a chart object.\r\n * Since the chart can have a number of axes and series, each with its own\r\n * data, the meaning of \"index\" is very ambiguous.\r\n *\r\n * To zoom the chart use `zoom*` methods on its respective axes.\r\n *\r\n * @param startIndex Index of the starting data item\r\n * @param endIndex Index of the ending data item\r\n * @param skipRangeEvent Should rangechanged event not be triggered?\r\n * @param instantly Do not animate?\r\n */\r\n Component.prototype.zoomToIndexes = function (startIndex, endIndex, skipRangeEvent, instantly) {\r\n if (!$type.isNumber(startIndex) || !$type.isNumber(endIndex)) {\r\n return;\r\n }\r\n var start = startIndex / this.dataItems.length;\r\n var end = endIndex / this.dataItems.length;\r\n this.zoom({ start: start, end: end }, skipRangeEvent, instantly);\r\n };\r\n Object.defineProperty(Component.prototype, \"zoomFactor\", {\r\n /**\r\n * A current zoom factor (0-1). 1 meaning fully zoomed out. (showing all of\r\n * the available data)\r\n *\r\n * @return Zoom factor\r\n */\r\n get: function () {\r\n return $math.fitToRange(1 / (this.end - this.start), 1, this.maxZoomFactor);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"maxZoomFactor\", {\r\n /**\r\n * @return Maximum zoomFactor\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxZoomFactor\");\r\n },\r\n /**\r\n * Max available `zoomFactor`.\r\n *\r\n * The element will not allow zoom to occur beyond this factor.\r\n *\r\n * [[DateAxis]] and [[CategoryAxis]] calculate this atutomatically so that\r\n * category axis could be zoomed to one category and date axis allows to be\r\n * zoomed up to one base interval.\r\n *\r\n * In case you want to restrict category or date axis to be zoomed to more\r\n * than one category or more than one base interval, use `minZoomCount`\r\n * property (set it to `> 1`).\r\n *\r\n * Default value of [[ValueAxis]]'s `maxZoomFactor` is `1000`.\r\n *\r\n * Feel free to modify it to allow bigger zoom or to restrict zooming.\r\n *\r\n * @param value Maximum zoomFactor\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"maxZoomFactor\", value)) {\r\n if (value == 1) {\r\n this.maxZoomDeclination = 0;\r\n }\r\n this.invalidateDataRange();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"maxZoomDeclination\", {\r\n /**\r\n * @ignore\r\n * @return Maximum zoom declination\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"maxZoomDeclination\");\r\n },\r\n /**\r\n * Max zoom declination.\r\n *\r\n * @ignore\r\n * @default 1\r\n * @param value Maximum zoom declination\r\n */\r\n set: function (value) {\r\n if (this.setPropertyValue(\"maxZoomDeclination\", value)) {\r\n this.invalidateDataRange();\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"startIndex\", {\r\n /**\r\n * Current starting index.\r\n *\r\n * @return Start index\r\n */\r\n get: function () {\r\n if (!$type.isNumber(this._startIndex)) {\r\n this._startIndex = 0;\r\n }\r\n return this._startIndex;\r\n },\r\n /**\r\n * Sets current starting index.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value Start index\r\n */\r\n set: function (value) {\r\n this._startIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length);\r\n //this._workingStartIndex = this._startIndex; // not good, breaks adjusted working start index of line series\r\n this.start = this.indexToPosition(this._startIndex);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @ignore\r\n * @todo:review description\r\n * returns item's relative position by the index of the item\r\n * @param index\r\n */\r\n Component.prototype.indexToPosition = function (index) {\r\n return index / this.dataItems.length;\r\n };\r\n Object.defineProperty(Component.prototype, \"endIndex\", {\r\n /**\r\n * Current ending index.\r\n *\r\n * @return End index\r\n */\r\n get: function () {\r\n if (!$type.isNumber(this._endIndex)) {\r\n this._endIndex = this.dataItems.length;\r\n }\r\n return this._endIndex;\r\n },\r\n /**\r\n * Sets current ending index.\r\n *\r\n * @ignore Exclude from docs\r\n * @param value End index\r\n */\r\n set: function (value) {\r\n this._endIndex = $math.fitToRange(Math.round(value), 0, this.dataItems.length);\r\n //this._workingEndIndex = this._endIndex; // not good, breaks adjusted workingend index of line series\r\n this.end = this.indexToPosition(this._endIndex);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"start\", {\r\n /**\r\n * @return Start (0-1)\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"start\", this._start);\r\n },\r\n /**\r\n * Start of the current data range (zoom).\r\n *\r\n * These are relative values from 0 (beginning) to 1 (end).\r\n *\r\n * @param value Start (0-1)\r\n */\r\n set: function (value) {\r\n // value = $math.round(value, 10); not good\r\n //if (1 / (this.end - value) > this.maxZoomFactor) {\r\n //\tvalue = this.end - 1 / this.maxZoomFactor;\r\n //}\r\n if (this._start != value) {\r\n this._start = value;\r\n var startIndex = Math.max(0, Math.floor(this.dataItems.length * value) || 0);\r\n this._startIndex = Math.min(startIndex, this.dataItems.length);\r\n this.invalidateDataRange();\r\n this.invalidate();\r\n this.dispatchImmediately(\"startchanged\");\r\n this.dispatch(\"startendchanged\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(Component.prototype, \"end\", {\r\n /**\r\n * @return End (0-1)\r\n */\r\n get: function () {\r\n return this.adapter.apply(\"end\", this._end);\r\n },\r\n /**\r\n * End of the current data range (zoom).\r\n *\r\n * These are relative values from 0 (beginning) to 1 (end).\r\n *\r\n * @param value End (0-1)\r\n */\r\n set: function (value) {\r\n // value = $math.round(value, 10); // not good\r\n //if (1 / (value - this.start) > this.maxZoomFactor) {\r\n //\tvalue = 1 / this.maxZoomFactor + this.start;\r\n //}\r\n if (this._end != value) {\r\n this._end = value;\r\n this._endIndex = Math.min(this.dataItems.length, Math.ceil(this.dataItems.length * value) || 0);\r\n this.invalidateDataRange();\r\n this.invalidate();\r\n this.dispatchImmediately(\"endchanged\");\r\n this.dispatch(\"startendchanged\");\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * [removeFromInvalids description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.removeFromInvalids = function () {\r\n _super.prototype.removeFromInvalids.call(this);\r\n registry.removeFromInvalidComponents(this);\r\n $array.remove(registry.invalidDataItems, this);\r\n $array.remove(registry.invalidDataRange, this);\r\n $array.remove(registry.invalidRawDatas, this);\r\n };\r\n Object.defineProperty(Component.prototype, \"dataItems\", {\r\n /**\r\n * Returns a list of source [[DataItem]] objects.\r\n *\r\n * @return List of data items\r\n */\r\n get: function () {\r\n return this._dataItems;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Updates the indexes for the dataItems\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype._updateDataItemIndexes = function (startIndex) {\r\n var dataItems = this.dataItems.values;\r\n var length = dataItems.length;\r\n for (var i = startIndex; i < length; ++i) {\r\n dataItems[i]._index = i;\r\n }\r\n };\r\n /**\r\n * Processes newly added [[DataItem]] as well as triggers data re-validation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event [description]\r\n */\r\n Component.prototype.handleDataItemAdded = function (event) {\r\n event.newValue.component = this;\r\n this._updateDataItemIndexes(event.index);\r\n if (!this.dataItemsInvalid) {\r\n this.invalidateDataItems();\r\n }\r\n };\r\n /**\r\n * removes [[DataItem]] as well as triggers data re-validation.\r\n *\r\n * @ignore Exclude from docs\r\n * @param event [description]\r\n */\r\n Component.prototype.handleDataItemRemoved = function (event) {\r\n //\t\tevent.oldValue.component = undefined; // not good, as some items might be not removed from component lists\r\n this._updateDataItemIndexes(event.index);\r\n if (!this.dataItemsInvalid) {\r\n this.invalidateDataItems();\r\n }\r\n };\r\n Object.defineProperty(Component.prototype, \"dataMethods\", {\r\n /**\r\n * [dataMethods description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n * @deprecated Not used?\r\n * @param List of data methods\r\n */\r\n get: function () {\r\n if (!this._dataMethods) {\r\n this._dataMethods = new Dictionary();\r\n }\r\n return this._dataMethods;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Binds a data element's field to a specific field in raw data.\r\n * For example, for the very basic column chart you'd want to bind a `value`\r\n * field to a field in data, such as `price`.\r\n *\r\n * Some more advanced Components, like [[CandlestickSeries]] need several\r\n * data fields bound to data, such as ones for open, high, low and close\r\n * values.\r\n *\r\n * @todo Example\r\n * @param field Field name\r\n * @param value Field name in data\r\n */\r\n Component.prototype.bindDataField = function (field, value) {\r\n this.dataFields[field] = value;\r\n this.invalidateDataRange();\r\n };\r\n /**\r\n * Invalidates processed data.\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype.invalidateProcessedData = function () {\r\n this.resetProcessedRange();\r\n this.invalidateDataRange();\r\n };\r\n /**\r\n * [resetProcessedRange description]\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description\r\n */\r\n Component.prototype.resetProcessedRange = function () {\r\n this._prevEndIndex = null;\r\n this._prevStartIndex = null;\r\n };\r\n Object.defineProperty(Component.prototype, \"dataUsers\", {\r\n /**\r\n * Returns all other [[Component]] objects that are using this element's\r\n * data.\r\n *\r\n * @ignore Exclude from docs\r\n * @todo Description (review)\r\n * @return [description]\r\n */\r\n get: function () {\r\n var _this = this;\r\n if (!this._dataUsers) {\r\n this._dataUsers = new List();\r\n //this._disposers.push(new ListDisposer(this._dataUsers));\r\n // TODO better way of handling this? e.g. move into another module ?\r\n this._disposers.push(new Disposer(function () {\r\n // TODO clear the list ?\r\n $iter.each(_this._dataUsers.iterator(), function (x) {\r\n x.dispose();\r\n });\r\n }));\r\n }\r\n return this._dataUsers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Returns a clone of this element.\r\n *\r\n * @return Clone\r\n */\r\n Component.prototype.clone = function () {\r\n var component = _super.prototype.clone.call(this);\r\n component.dataFields = $utils.copyProperties(this.dataFields, {});\r\n return component;\r\n };\r\n /**\r\n * Copies all parameters from another [[Component]].\r\n *\r\n * @param source Source Component\r\n */\r\n Component.prototype.copyFrom = function (source) {\r\n _super.prototype.copyFrom.call(this, source);\r\n this.data = source.data;\r\n this.sequencedInterpolation = source.sequencedInterpolation;\r\n this.sequencedInterpolationDelay = source.sequencedInterpolationDelay;\r\n this.interpolationDuration = source.interpolationDuration;\r\n this.interpolationEasing = source.interpolationEasing;\r\n };\r\n /**\r\n * Invalidates the whole element, including all its children, causing\r\n * complete re-parsing of data and redraw.\r\n *\r\n * Use sparingly!\r\n */\r\n Component.prototype.reinit = function () {\r\n this._inited = false;\r\n this.deepInvalidate();\r\n };\r\n /**\r\n * Add an adapter for data.\r\n *\r\n * @return Exporting\r\n */\r\n Component.prototype.getExporting = function () {\r\n var _export = _super.prototype.getExporting.call(this);\r\n if (!_export.adapter.has(\"data\", this._exportData, null, this)) {\r\n _export.adapter.add(\"data\", this._exportData, null, this);\r\n this.events.on(\"datavalidated\", function (ev) {\r\n if (_export.menu) {\r\n _export.menu.invalidate();\r\n }\r\n _export.handleDataUpdated();\r\n });\r\n }\r\n return _export;\r\n };\r\n Component.prototype._exportData = function (arg) {\r\n arg.data = this.data;\r\n return arg;\r\n };\r\n Component.prototype.setDisabled = function (value) {\r\n var changed = _super.prototype.setDisabled.call(this, value);\r\n if (changed) {\r\n this.invalidateData();\r\n }\r\n return changed;\r\n };\r\n /**\r\n * @ignore\r\n */\r\n Component.prototype.setShowOnInit = function (value) {\r\n if (value != this.getPropertyValue(\"showOnInit\")) {\r\n if (value && !this.inited && !this.hidden) {\r\n this._showOnInitDisposer2 = this.events.once(\"dataitemsvalidated\", this.hideInitially, this, false);\r\n this._disposers.push(this._showOnInitDisposer2);\r\n }\r\n else {\r\n if (this._showOnInitDisposer2) {\r\n this._showOnInitDisposer2.dispose();\r\n }\r\n }\r\n }\r\n // important order here\r\n _super.prototype.setShowOnInit.call(this, value);\r\n };\r\n Component.prototype.setBaseId = function (value) {\r\n if (value != this._baseId) {\r\n if (this.dataInvalid) {\r\n this.dataInvalid = false;\r\n registry.removeFromInvalidComponents(this);\r\n this._baseId = value;\r\n this.invalidateData();\r\n }\r\n }\r\n _super.prototype.setBaseId.call(this, value);\r\n };\r\n Object.defineProperty(Component.prototype, \"minZoomCount\", {\r\n /**\r\n * @return Min zoom count\r\n */\r\n get: function () {\r\n return this.getPropertyValue(\"minZoomCount\");\r\n },\r\n /**\r\n * Use this for [[CategoryAxis]] or [[DateAxis]].\r\n *\r\n * Allows restricting zoom in beyond certain number of categories or base\r\n * intervals.\r\n *\r\n * @default 1\r\n * @param value Min zoom count\r\n */\r\n set: function (value) {\r\n this.setPropertyValue(\"minZoomCount\", value);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Called during the System.update method\r\n *\r\n * @ignore Exclude from docs\r\n */\r\n Component.prototype._systemCheckIfValidate = function () {\r\n if (this.dataInvalid || (this.dataProvider && this.dataProvider.dataInvalid)) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n };\r\n return Component;\r\n}(Container));\r\nexport { Component };\r\n/**\r\n * Register class in system, so that it can be instantiated using its name from\r\n * anywhere.\r\n *\r\n * @ignore\r\n */\r\nregistry.registeredClasses[\"Component\"] = Component;\r\n//# sourceMappingURL=Component.js.map","import * as tslib_1 from \"tslib\";\r\nimport { Dictionary } from \"./utils/Dictionary\";\r\nimport { TargetedEventDispatcher } from \"./utils/EventDispatcher\";\r\nimport { MultiDisposer, CounterDisposer } from \"./utils/Disposer\";\r\nimport * as $utils from \"./utils/Utils\";\r\nimport * as $object from \"./utils/Object\";\r\n/**\r\n * An [[EventDispatcher]] for [[Sprite]].\r\n *\r\n * @important\r\n */\r\nvar SpriteEventDispatcher = /** @class */ (function (_super) {\r\n tslib_1.__extends(SpriteEventDispatcher, _super);\r\n function SpriteEventDispatcher() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * [_interactionEvents description]\r\n *\r\n * @todo Description\r\n */\r\n _this._interactionEvents = new Dictionary();\r\n return _this;\r\n }\r\n /**\r\n * [_dispatchSpriteEvent description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._dispatchSpriteEvent = function (ev) {\r\n if (this.target.disabled || this.target.isTemplate) {\r\n return;\r\n }\r\n // TODO remove this later\r\n if (this.target.events.isEnabled(ev.type)) {\r\n var imev = $object.merge(ev, {\r\n target: this.target\r\n });\r\n this.target.events.dispatchImmediately(imev.type, imev);\r\n }\r\n };\r\n /**\r\n * [_dispatchSpritePointEvent description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._dispatchSpritePointEvent = function (ev) {\r\n if (this.target.disabled || this.target.isTemplate) {\r\n return;\r\n }\r\n // TODO remove this later\r\n if (this.target.events.isEnabled(ev.type)) {\r\n var imev = $object.merge(ev, {\r\n target: this.target,\r\n spritePoint: $utils.documentPointToSprite(ev.point, this.target),\r\n svgPoint: this.target.getSvgPoint(ev.point)\r\n });\r\n this.target.events.dispatchImmediately(imev.type, imev);\r\n }\r\n };\r\n /**\r\n * [_addInteractionObjectEvent description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._addInteractionObjectEvent = function (type, callback, context, shouldClone) {\r\n var _this = this;\r\n var counter = this._interactionEvents.insertKeyIfEmpty(type, function () {\r\n var disposer = _this.target.interactions.events.on(type, callback, context, shouldClone);\r\n return new CounterDisposer(function () {\r\n _this._interactionEvents.removeKey(type);\r\n disposer.dispose();\r\n });\r\n });\r\n return counter.increment();\r\n };\r\n /**\r\n * [_on description]\r\n *\r\n * @todo Description\r\n */\r\n SpriteEventDispatcher.prototype._on = function (once, type, callback, context, shouldClone, dispatch) {\r\n var info = _super.prototype._on.call(this, once, type, callback, context, shouldClone, dispatch);\r\n var disposers = [info.disposer];\r\n /**\r\n * Catching Sprite-related events, converting them to [[SpriteEvent]] and\r\n * triggering them on sprite\r\n */\r\n switch (type) {\r\n case \"hit\":\r\n case \"track\":\r\n case \"doublehit\":\r\n case \"wheel\":\r\n case \"wheelup\":\r\n case \"wheeldown\":\r\n case \"wheelleft\":\r\n case \"wheelright\":\r\n disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpritePointEvent, this, shouldClone));\r\n break;\r\n case \"rightclick\":\r\n case \"down\":\r\n //case \"hold\":\r\n case \"up\":\r\n case \"drag\":\r\n case \"dragged\":\r\n case \"dragstart\":\r\n case \"dragstop\":\r\n case \"over\":\r\n case \"out\":\r\n case \"swipe\":\r\n case \"swipeleft\":\r\n case \"swiperight\":\r\n case \"resize\":\r\n //case \"rotate\":\r\n case \"focus\":\r\n case \"blur\":\r\n case \"toggled\":\r\n disposers.push(this._addInteractionObjectEvent(type, this._dispatchSpriteEvent, this, shouldClone));\r\n break;\r\n }\r\n /**\r\n * Set functional properties based on events. For example if we add a\r\n * \"drag\" event handler, we want to make the Sprite draggable, even if we\r\n * don't explicitly set \"draggable\"\r\n */\r\n switch (type) {\r\n case \"hit\":\r\n case \"doublehit\":\r\n case \"rightclick\":\r\n case \"down\":\r\n case \"up\":\r\n this.target.clickable = true;\r\n break;\r\n case \"toggled\":\r\n this.target.togglable = true;\r\n break;\r\n case \"drag\":\r\n case \"dragstart\":\r\n case \"dragstop\":\r\n this.target.draggable = true;\r\n break;\r\n case \"track\":\r\n this.target.trackable = true;\r\n break;\r\n case \"resize\":\r\n this.target.resizable = true;\r\n break;\r\n case \"swipe\":\r\n case \"swipeleft\":\r\n case \"swiperight\":\r\n this.target.swipeable = true;\r\n break;\r\n case \"wheel\":\r\n case \"wheelup\":\r\n case \"wheeldown\":\r\n case \"wheelleft\":\r\n case \"wheelright\":\r\n this.target.wheelable = true;\r\n break;\r\n case \"over\":\r\n this.target.hoverable = true;\r\n case \"out\":\r\n this.target.hoverable = true;\r\n break;\r\n case \"focus\":\r\n case \"blur\":\r\n this.target.focusable = true;\r\n break;\r\n }\r\n info.disposer = new MultiDisposer(disposers);\r\n return info;\r\n };\r\n return SpriteEventDispatcher;\r\n}(TargetedEventDispatcher));\r\nexport { SpriteEventDispatcher };\r\n//# sourceMappingURL=SpriteEvents.js.map"],"sourceRoot":""}